diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 000000000..7e108c091
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,33 @@
+# Ignore Cypress autogenerated files
+.nyc_output
+coverage
+cypress
+merged-coverage
+
+# Ignore dev environment files
+dev-env
+
+# Ignore deployment files
+deployment
+
+# Ignore both dist folders from SPA and Design System
+dist
+/packages/design-system/dist
+
+# Ignore mdx files due to different conflicts between prettier and mdx files
+*.mdx
+
+# Ignore config files
+.babelrc
+.eslintrc.json
+.nycrc.json
+.prettierrc
+.stylelintrc.json
+cypress.config.ts
+dev.Dockerfile
+lerna.json
+LICENSE
+package.json
+package-lock.json
+tsconfig.json
+vite.config.ts
diff --git a/.storybook/preview-head.html b/.storybook/preview-head.html
index 05da1e9df..7100922b6 100644
--- a/.storybook/preview-head.html
+++ b/.storybook/preview-head.html
@@ -1,3 +1,3 @@
\ No newline at end of file
+ window.global = window
+
diff --git a/.stylelintrc.json b/.stylelintrc.json
index 63dff8775..a8fce0bd4 100644
--- a/.stylelintrc.json
+++ b/.stylelintrc.json
@@ -22,6 +22,14 @@
{
"ignoreSelectors": [":export"]
}
+ ],
+ "at-rule-empty-line-before": [
+ "always",
+ {
+ "ignore": ["after-comment", "first-nested", "inside-block", "blockless-after-same-name-blockless"],
+ "severity": "warning",
+ "except": ["blockless-after-blockless"]
+ }
]
}
}
diff --git a/index.html b/index.html
index 9b3fccc07..565fbf246 100644
--- a/index.html
+++ b/index.html
@@ -2,34 +2,17 @@
-
+
-
-
-
-
+
+
+
Dataverse
-
diff --git a/package.json b/package.json
index 4e35f4257..fe43d59f1 100644
--- a/package.json
+++ b/package.json
@@ -53,10 +53,10 @@
"build": "tsc && vite build",
"preview": "vite preview",
"lint": "npm run lint:eslint && npm run lint:stylelint && npm run lint:prettier",
- "lint:fix": "eslint --fix --ext .ts,.tsx ./src --ignore-path .gitignore . && stylelint --fix **/*.scss && prettier --write '**/*.(yml|json|md|css)'",
+ "lint:fix": "eslint --fix --ext .ts,.tsx ./src --ignore-path .gitignore . && stylelint --fix **/*.scss && prettier . --write",
"lint:eslint": "eslint --ignore-path .gitignore .",
"lint:stylelint": "stylelint **/*.scss ",
- "lint:prettier": "prettier --check '**/*.(yml|json|md|css)' --ignore-path packages/design-system/.gitignore",
+ "lint:prettier": "prettier . --check",
"format": "prettier --write './**/*.{js,jsx,ts,tsx,css,md,json,yml,md}' --config ./.prettierrc",
"cy:open-e2e": "cypress open --e2e --browser chrome",
"cy:open-unit": "cypress open --component --browser chrome",
diff --git a/packages/design-system/.storybook/preview-head.html b/packages/design-system/.storybook/preview-head.html
index 05da1e9df..7100922b6 100644
--- a/packages/design-system/.storybook/preview-head.html
+++ b/packages/design-system/.storybook/preview-head.html
@@ -1,3 +1,3 @@
\ No newline at end of file
+ window.global = window
+
diff --git a/packages/design-system/src/lib/assets/styles/design-tokens/typography.module.scss b/packages/design-system/src/lib/assets/styles/design-tokens/typography.module.scss
index e8b2b40d0..5d6658d7e 100644
--- a/packages/design-system/src/lib/assets/styles/design-tokens/typography.module.scss
+++ b/packages/design-system/src/lib/assets/styles/design-tokens/typography.module.scss
@@ -2,7 +2,7 @@ $dv-font-size: 16px;
$dv-font-size-sm: 12px;
$dv-brand-font-size: 24px;
-$dv-font-family: ("Helvetica Neue",helvetica,arial,sans-serif);
+$dv-font-family: ('Helvetica Neue', helvetica, arial, sans-serif);
$dv-font-weight: 400;
$dv-font-weight-light: 300;
@@ -19,4 +19,4 @@ $dv-line-height: 1.5;
fontWeightLight: $dv-font-weight-light;
fontWeightBold: $dv-font-weight-bold;
lineHeight: $dv-line-height;
-}
\ No newline at end of file
+}
diff --git a/packages/design-system/src/lib/assets/styles/fontcustom.scss b/packages/design-system/src/lib/assets/styles/fontcustom.scss
index e915d66a1..c273ff290 100644
--- a/packages/design-system/src/lib/assets/styles/fontcustom.scss
+++ b/packages/design-system/src/lib/assets/styles/fontcustom.scss
@@ -6,20 +6,22 @@
font-weight: normal;
font-family: fontcustom;
font-style: normal;
- src: url("fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.woff2") format("woff2"),
- url("fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.woff") format("woff"),
- url("fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.ttf") format("truetype"),
- url("fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.svg#fontcustom") format("svg");
+ src: url('fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.woff2') format('woff2'),
+ url('fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.woff') format('woff'),
+ url('fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.ttf') format('truetype'),
+ url('fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.svg#fontcustom') format('svg');
}
@media screen and (min-resolution) {
@font-face {
font-family: fontcustom;
- src: url("fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.svg#fontcustom") format("svg");
+ src: url('fontcustom/fontcustom_8c9f858763dbca8e064e7fd59d1aa2b7.svg#fontcustom') format('svg');
}
}
-[data-icon]::before { content: attr(data-icon); }
+[data-icon]::before {
+ content: attr(data-icon);
+}
[data-icon]::before,
.icon-astro::before,
@@ -50,18 +52,62 @@
-webkit-font-smoothing: antialiased;
}
-.icon-astro::before { content: "\f100"; }
-.icon-audio::before { content: "\f101"; }
-.icon-code::before { content: "\f102"; }
-.icon-collection::before { content: "\f103"; }
-.icon-dataset::before { content: "\f104"; }
-.icon-document::before { content: "\f105"; }
-.icon-file::before { content: "\f106"; }
-.icon-geodata::before { content: "\f107"; }
-.icon-image::before { content: "\f108"; }
-.icon-network::before { content: "\f109"; }
-.icon-other::before { content: "\f10a"; }
-.icon-package::before { content: "\f10b"; }
-.icon-tabular::before { content: "\f10c"; }
-.icon-unlock::before { content: "\f10d"; }
-.icon-video::before { content: "\f10e"; }
+.icon-astro::before {
+ content: '\f100';
+}
+
+.icon-audio::before {
+ content: '\f101';
+}
+
+.icon-code::before {
+ content: '\f102';
+}
+
+.icon-collection::before {
+ content: '\f103';
+}
+
+.icon-dataset::before {
+ content: '\f104';
+}
+
+.icon-document::before {
+ content: '\f105';
+}
+
+.icon-file::before {
+ content: '\f106';
+}
+
+.icon-geodata::before {
+ content: '\f107';
+}
+
+.icon-image::before {
+ content: '\f108';
+}
+
+.icon-network::before {
+ content: '\f109';
+}
+
+.icon-other::before {
+ content: '\f10a';
+}
+
+.icon-package::before {
+ content: '\f10b';
+}
+
+.icon-tabular::before {
+ content: '\f10c';
+}
+
+.icon-unlock::before {
+ content: '\f10d';
+}
+
+.icon-video::before {
+ content: '\f10e';
+}
diff --git a/packages/design-system/src/lib/assets/styles/index.scss b/packages/design-system/src/lib/assets/styles/index.scss
index 2bcc590fe..335bcddfa 100644
--- a/packages/design-system/src/lib/assets/styles/index.scss
+++ b/packages/design-system/src/lib/assets/styles/index.scss
@@ -1,3 +1,2 @@
-@import "fontcustom";
-@import "bootstrap-customized";
-
+@import 'fontcustom';
+@import 'bootstrap-customized';
diff --git a/packages/design-system/src/lib/components/badge/Badge.module.scss b/packages/design-system/src/lib/components/badge/Badge.module.scss
index c3e0ac8ba..30a09833a 100644
--- a/packages/design-system/src/lib/components/badge/Badge.module.scss
+++ b/packages/design-system/src/lib/components/badge/Badge.module.scss
@@ -3,25 +3,25 @@
@import 'src/lib/assets/styles/design-tokens/colors.module';
.primary:not(#\#) {
- color: color-contrast($dv-primary-color);
+ color: color-contrast($dv-primary-color);
}
.secondary:not(#\#) {
- color: color-contrast($dv-secondary-color);
+ color: color-contrast($dv-secondary-color);
}
.info:not(#\#) {
- color: color-contrast($dv-info-color);
+ color: color-contrast($dv-info-color);
}
.success:not(#\#) {
- color: color-contrast($dv-success-color);
+ color: color-contrast($dv-success-color);
}
.warning:not(#\#) {
- color: color-contrast($dv-warning-color);
+ color: color-contrast($dv-warning-color);
}
.danger:not(#\#) {
- color: color-contrast($dv-danger-color);
-}
\ No newline at end of file
+ color: color-contrast($dv-danger-color);
+}
diff --git a/packages/design-system/src/lib/components/button-group/ButtonGroup.module.scss b/packages/design-system/src/lib/components/button-group/ButtonGroup.module.scss
index 78fd402fc..e54fd9cad 100644
--- a/packages/design-system/src/lib/components/button-group/ButtonGroup.module.scss
+++ b/packages/design-system/src/lib/components/button-group/ButtonGroup.module.scss
@@ -1,5 +1,6 @@
-@import "src/lib/assets/styles/design-tokens/colors.module";
+@import 'src/lib/assets/styles/design-tokens/colors.module';
-.border > button, .border > [role="group"] > button {
+.border > button,
+.border > [role='group'] > button {
border: 1px solid $dv-button-border-color;
-}
\ No newline at end of file
+}
diff --git a/packages/design-system/src/lib/components/button/Button.module.scss b/packages/design-system/src/lib/components/button/Button.module.scss
index 019b0c60f..9bc0bd1c5 100644
--- a/packages/design-system/src/lib/components/button/Button.module.scss
+++ b/packages/design-system/src/lib/components/button/Button.module.scss
@@ -1,3 +1,3 @@
.spacing {
margin: 0 7px;
-}
\ No newline at end of file
+}
diff --git a/packages/design-system/src/lib/components/dropdown-button/DropdownButton.module.scss b/packages/design-system/src/lib/components/dropdown-button/DropdownButton.module.scss
index b7f8e8153..9bc0bd1c5 100644
--- a/packages/design-system/src/lib/components/dropdown-button/DropdownButton.module.scss
+++ b/packages/design-system/src/lib/components/dropdown-button/DropdownButton.module.scss
@@ -1,3 +1,3 @@
.spacing {
- margin: 0 7px
+ margin: 0 7px;
}
diff --git a/packages/design-system/src/lib/components/form/form-group-multiple-fields/FormGroupWithMultipleFields.module.scss b/packages/design-system/src/lib/components/form/form-group-multiple-fields/FormGroupWithMultipleFields.module.scss
index d8700a3ab..7485212bf 100644
--- a/packages/design-system/src/lib/components/form/form-group-multiple-fields/FormGroupWithMultipleFields.module.scss
+++ b/packages/design-system/src/lib/components/form/form-group-multiple-fields/FormGroupWithMultipleFields.module.scss
@@ -1,7 +1,7 @@
-@import "src/lib/assets/styles/design-tokens/typography.module";
+@import 'src/lib/assets/styles/design-tokens/typography.module';
.title {
padding-top: calc(0.375rem + 1px);
padding-bottom: calc(0.375rem + 1px);
font-weight: $dv-font-weight-bold;
-}
\ No newline at end of file
+}
diff --git a/packages/design-system/src/lib/components/form/required-input-symbol/RequiredInputSymbol.module.scss b/packages/design-system/src/lib/components/form/required-input-symbol/RequiredInputSymbol.module.scss
index 6b755b404..f3d57e2e6 100644
--- a/packages/design-system/src/lib/components/form/required-input-symbol/RequiredInputSymbol.module.scss
+++ b/packages/design-system/src/lib/components/form/required-input-symbol/RequiredInputSymbol.module.scss
@@ -1,5 +1,5 @@
-@import "src/lib/assets/styles/design-tokens/colors.module";
+@import 'src/lib/assets/styles/design-tokens/colors.module';
.asterisk {
- color: $dv-danger-color;
-}
\ No newline at end of file
+ color: $dv-danger-color;
+}
diff --git a/packages/design-system/src/lib/components/icon/Icon.module.scss b/packages/design-system/src/lib/components/icon/Icon.module.scss
index 750589cdf..ed171714c 100644
--- a/packages/design-system/src/lib/components/icon/Icon.module.scss
+++ b/packages/design-system/src/lib/components/icon/Icon.module.scss
@@ -1,3 +1,3 @@
.icon {
- margin-right: .3em;
-}
\ No newline at end of file
+ margin-right: 0.3em;
+}
diff --git a/packages/design-system/src/lib/components/table/Table.module.scss b/packages/design-system/src/lib/components/table/Table.module.scss
index 6576729f8..3981fb1b2 100644
--- a/packages/design-system/src/lib/components/table/Table.module.scss
+++ b/packages/design-system/src/lib/components/table/Table.module.scss
@@ -1,3 +1,3 @@
.table > thead {
text-align: center;
-}
\ No newline at end of file
+}
diff --git a/packages/design-system/src/lib/components/tooltip/question-mark-tooltip/QuestionIcon.module.scss b/packages/design-system/src/lib/components/tooltip/question-mark-tooltip/QuestionIcon.module.scss
index 581aa0ec2..6b02be1ff 100644
--- a/packages/design-system/src/lib/components/tooltip/question-mark-tooltip/QuestionIcon.module.scss
+++ b/packages/design-system/src/lib/components/tooltip/question-mark-tooltip/QuestionIcon.module.scss
@@ -1,4 +1,4 @@
-@import "src/lib/assets/styles/design-tokens/colors.module";
+@import 'src/lib/assets/styles/design-tokens/colors.module';
.question-tooltip {
color: $dv-tooltip-color;
@@ -6,4 +6,4 @@
.question-tooltip:hover {
color: $dv-tooltip-hover-color;
-}
\ No newline at end of file
+}
diff --git a/packages/design-system/src/lib/components/tooltip/question-mark-tooltip/QuestionMarkTooltip.module.scss b/packages/design-system/src/lib/components/tooltip/question-mark-tooltip/QuestionMarkTooltip.module.scss
index 5df6117e2..c1602bcff 100644
--- a/packages/design-system/src/lib/components/tooltip/question-mark-tooltip/QuestionMarkTooltip.module.scss
+++ b/packages/design-system/src/lib/components/tooltip/question-mark-tooltip/QuestionMarkTooltip.module.scss
@@ -1,4 +1,4 @@
.tooltip {
display: inline-block;
vertical-align: 0.125em;
-}
\ No newline at end of file
+}
diff --git a/packages/design-system/tests/support/component-index.html b/packages/design-system/tests/support/component-index.html
index dec6b92ce..910611c2f 100644
--- a/packages/design-system/tests/support/component-index.html
+++ b/packages/design-system/tests/support/component-index.html
@@ -1,12 +1,12 @@
-
-
-
-
+
+
+
+
Components App
-
-
-
-
-
\ No newline at end of file
+
+
+
+
+