@fristil/designsystem 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +85 -0
- package/LICENSE +21 -0
- package/README.md +101 -0
- package/dist/cli.d.ts +31 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +261 -0
- package/dist/cli.js.map +1 -0
- package/dist/components/css/accordion/accordion.d.ts +37 -0
- package/dist/components/css/accordion/accordion.d.ts.map +1 -0
- package/dist/components/css/accordion/accordion.js +31 -0
- package/dist/components/css/accordion/accordion.js.map +1 -0
- package/dist/components/css/alert/alert.d.ts +35 -0
- package/dist/components/css/alert/alert.d.ts.map +1 -0
- package/dist/components/css/alert/alert.js +29 -0
- package/dist/components/css/alert/alert.js.map +1 -0
- package/dist/components/css/avatar/avatar.d.ts +40 -0
- package/dist/components/css/avatar/avatar.d.ts.map +1 -0
- package/dist/components/css/avatar/avatar.js +30 -0
- package/dist/components/css/avatar/avatar.js.map +1 -0
- package/dist/components/css/badge/badge.d.ts +24 -0
- package/dist/components/css/badge/badge.d.ts.map +1 -0
- package/dist/components/css/badge/badge.js +24 -0
- package/dist/components/css/badge/badge.js.map +1 -0
- package/dist/components/css/breadcrumbs/breadcrumbs.d.ts +25 -0
- package/dist/components/css/breadcrumbs/breadcrumbs.d.ts.map +1 -0
- package/dist/components/css/breadcrumbs/breadcrumbs.js +23 -0
- package/dist/components/css/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/components/css/button/button.d.ts +26 -0
- package/dist/components/css/button/button.d.ts.map +1 -0
- package/dist/components/css/button/button.js +25 -0
- package/dist/components/css/button/button.js.map +1 -0
- package/dist/components/css/card/card.d.ts +36 -0
- package/dist/components/css/card/card.d.ts.map +1 -0
- package/dist/components/css/card/card.js +28 -0
- package/dist/components/css/card/card.js.map +1 -0
- package/dist/components/css/checkbox/checkbox.d.ts +32 -0
- package/dist/components/css/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/css/checkbox/checkbox.js +27 -0
- package/dist/components/css/checkbox/checkbox.js.map +1 -0
- package/dist/components/css/dialog/dialog.d.ts +30 -0
- package/dist/components/css/dialog/dialog.d.ts.map +1 -0
- package/dist/components/css/dialog/dialog.js +28 -0
- package/dist/components/css/dialog/dialog.js.map +1 -0
- package/dist/components/css/divider/divider.d.ts +28 -0
- package/dist/components/css/divider/divider.d.ts.map +1 -0
- package/dist/components/css/divider/divider.js +22 -0
- package/dist/components/css/divider/divider.js.map +1 -0
- package/dist/components/css/error-text/error-text.d.ts +24 -0
- package/dist/components/css/error-text/error-text.d.ts.map +1 -0
- package/dist/components/css/error-text/error-text.js +18 -0
- package/dist/components/css/error-text/error-text.js.map +1 -0
- package/dist/components/css/fieldset/fieldset.d.ts +55 -0
- package/dist/components/css/fieldset/fieldset.d.ts.map +1 -0
- package/dist/components/css/fieldset/fieldset.js +39 -0
- package/dist/components/css/fieldset/fieldset.js.map +1 -0
- package/dist/components/css/file-upload/file-upload.d.ts +41 -0
- package/dist/components/css/file-upload/file-upload.d.ts.map +1 -0
- package/dist/components/css/file-upload/file-upload.js +32 -0
- package/dist/components/css/file-upload/file-upload.js.map +1 -0
- package/dist/components/css/heading/heading.d.ts +29 -0
- package/dist/components/css/heading/heading.d.ts.map +1 -0
- package/dist/components/css/heading/heading.js +23 -0
- package/dist/components/css/heading/heading.js.map +1 -0
- package/dist/components/css/help-text/help-text.d.ts +24 -0
- package/dist/components/css/help-text/help-text.d.ts.map +1 -0
- package/dist/components/css/help-text/help-text.js +23 -0
- package/dist/components/css/help-text/help-text.js.map +1 -0
- package/dist/components/css/input/input.d.ts +39 -0
- package/dist/components/css/input/input.d.ts.map +1 -0
- package/dist/components/css/input/input.js +44 -0
- package/dist/components/css/input/input.js.map +1 -0
- package/dist/components/css/label/label.d.ts +33 -0
- package/dist/components/css/label/label.d.ts.map +1 -0
- package/dist/components/css/label/label.js +23 -0
- package/dist/components/css/label/label.js.map +1 -0
- package/dist/components/css/link/link.d.ts +21 -0
- package/dist/components/css/link/link.d.ts.map +1 -0
- package/dist/components/css/link/link.js +14 -0
- package/dist/components/css/link/link.js.map +1 -0
- package/dist/components/css/list/list.d.ts +29 -0
- package/dist/components/css/list/list.d.ts.map +1 -0
- package/dist/components/css/list/list.js +23 -0
- package/dist/components/css/list/list.js.map +1 -0
- package/dist/components/css/pagination/pagination.d.ts +27 -0
- package/dist/components/css/pagination/pagination.d.ts.map +1 -0
- package/dist/components/css/pagination/pagination.js +25 -0
- package/dist/components/css/pagination/pagination.js.map +1 -0
- package/dist/components/css/paragraph/paragraph.d.ts +36 -0
- package/dist/components/css/paragraph/paragraph.d.ts.map +1 -0
- package/dist/components/css/paragraph/paragraph.js +26 -0
- package/dist/components/css/paragraph/paragraph.js.map +1 -0
- package/dist/components/css/radio/radio.d.ts +32 -0
- package/dist/components/css/radio/radio.d.ts.map +1 -0
- package/dist/components/css/radio/radio.js +27 -0
- package/dist/components/css/radio/radio.js.map +1 -0
- package/dist/components/css/search/search.d.ts +33 -0
- package/dist/components/css/search/search.d.ts.map +1 -0
- package/dist/components/css/search/search.js +31 -0
- package/dist/components/css/search/search.js.map +1 -0
- package/dist/components/css/select/select.d.ts +23 -0
- package/dist/components/css/select/select.d.ts.map +1 -0
- package/dist/components/css/select/select.js +18 -0
- package/dist/components/css/select/select.js.map +1 -0
- package/dist/components/css/shared.d.ts +26 -0
- package/dist/components/css/shared.d.ts.map +1 -0
- package/dist/components/css/shared.js +34 -0
- package/dist/components/css/shared.js.map +1 -0
- package/dist/components/css/skeleton/skeleton.d.ts +29 -0
- package/dist/components/css/skeleton/skeleton.d.ts.map +1 -0
- package/dist/components/css/skeleton/skeleton.js +23 -0
- package/dist/components/css/skeleton/skeleton.js.map +1 -0
- package/dist/components/css/skip-link/skip-link.d.ts +18 -0
- package/dist/components/css/skip-link/skip-link.d.ts.map +1 -0
- package/dist/components/css/skip-link/skip-link.js +16 -0
- package/dist/components/css/skip-link/skip-link.js.map +1 -0
- package/dist/components/css/spinner/spinner.d.ts +33 -0
- package/dist/components/css/spinner/spinner.d.ts.map +1 -0
- package/dist/components/css/spinner/spinner.js +25 -0
- package/dist/components/css/spinner/spinner.js.map +1 -0
- package/dist/components/css/sr-only/sr-only.d.ts +17 -0
- package/dist/components/css/sr-only/sr-only.d.ts.map +1 -0
- package/dist/components/css/sr-only/sr-only.js +14 -0
- package/dist/components/css/sr-only/sr-only.js.map +1 -0
- package/dist/components/css/switch/switch.d.ts +33 -0
- package/dist/components/css/switch/switch.d.ts.map +1 -0
- package/dist/components/css/switch/switch.js +29 -0
- package/dist/components/css/switch/switch.js.map +1 -0
- package/dist/components/css/table/table.d.ts +36 -0
- package/dist/components/css/table/table.d.ts.map +1 -0
- package/dist/components/css/table/table.js +28 -0
- package/dist/components/css/table/table.js.map +1 -0
- package/dist/components/css/tag/tag.d.ts +35 -0
- package/dist/components/css/tag/tag.d.ts.map +1 -0
- package/dist/components/css/tag/tag.js +27 -0
- package/dist/components/css/tag/tag.js.map +1 -0
- package/dist/components/css/textarea/textarea.d.ts +23 -0
- package/dist/components/css/textarea/textarea.d.ts.map +1 -0
- package/dist/components/css/textarea/textarea.js +18 -0
- package/dist/components/css/textarea/textarea.js.map +1 -0
- package/dist/components/css/toggle-group/toggle-group.d.ts +31 -0
- package/dist/components/css/toggle-group/toggle-group.d.ts.map +1 -0
- package/dist/components/css/toggle-group/toggle-group.js +29 -0
- package/dist/components/css/toggle-group/toggle-group.js.map +1 -0
- package/dist/components/css/tooltip/tooltip.d.ts +30 -0
- package/dist/components/css/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/css/tooltip/tooltip.js +28 -0
- package/dist/components/css/tooltip/tooltip.js.map +1 -0
- package/dist/components/frittstaende/calendar/fs-calendar.d.ts +52 -0
- package/dist/components/frittstaende/calendar/fs-calendar.d.ts.map +1 -0
- package/dist/components/frittstaende/calendar/fs-calendar.js +462 -0
- package/dist/components/frittstaende/calendar/fs-calendar.js.map +1 -0
- package/dist/components/frittstaende/date-field/fs-date-field.d.ts +110 -0
- package/dist/components/frittstaende/date-field/fs-date-field.d.ts.map +1 -0
- package/dist/components/frittstaende/date-field/fs-date-field.js +264 -0
- package/dist/components/frittstaende/date-field/fs-date-field.js.map +1 -0
- package/dist/components/frittstaende/suggestion/fs-suggestion.d.ts +133 -0
- package/dist/components/frittstaende/suggestion/fs-suggestion.d.ts.map +1 -0
- package/dist/components/frittstaende/suggestion/fs-suggestion.js +280 -0
- package/dist/components/frittstaende/suggestion/fs-suggestion.js.map +1 -0
- package/dist/components/frittstaende/toast/fs-toast.d.ts +67 -0
- package/dist/components/frittstaende/toast/fs-toast.d.ts.map +1 -0
- package/dist/components/frittstaende/toast/fs-toast.js +108 -0
- package/dist/components/frittstaende/toast/fs-toast.js.map +1 -0
- package/dist/components/ramme/error-summary/fs-error-summary.d.ts +70 -0
- package/dist/components/ramme/error-summary/fs-error-summary.d.ts.map +1 -0
- package/dist/components/ramme/error-summary/fs-error-summary.js +155 -0
- package/dist/components/ramme/error-summary/fs-error-summary.js.map +1 -0
- package/dist/components/ramme/field/field-core.d.ts +70 -0
- package/dist/components/ramme/field/field-core.d.ts.map +1 -0
- package/dist/components/ramme/field/field-core.js +60 -0
- package/dist/components/ramme/field/field-core.js.map +1 -0
- package/dist/components/ramme/field/fs-field.d.ts +49 -0
- package/dist/components/ramme/field/fs-field.d.ts.map +1 -0
- package/dist/components/ramme/field/fs-field.js +118 -0
- package/dist/components/ramme/field/fs-field.js.map +1 -0
- package/dist/components/ramme/popover/fs-popover.d.ts +68 -0
- package/dist/components/ramme/popover/fs-popover.d.ts.map +1 -0
- package/dist/components/ramme/popover/fs-popover.js +167 -0
- package/dist/components/ramme/popover/fs-popover.js.map +1 -0
- package/dist/components/ramme/tabs/fs-tabs.d.ts +61 -0
- package/dist/components/ramme/tabs/fs-tabs.d.ts.map +1 -0
- package/dist/components/ramme/tabs/fs-tabs.js +156 -0
- package/dist/components/ramme/tabs/fs-tabs.js.map +1 -0
- package/dist/dom.d.ts +33 -0
- package/dist/dom.d.ts.map +1 -0
- package/dist/dom.js +77 -0
- package/dist/dom.js.map +1 -0
- package/dist/fs.d.ts +199 -0
- package/dist/fs.d.ts.map +1 -0
- package/dist/fs.js +128 -0
- package/dist/fs.js.map +1 -0
- package/dist/index.d.ts +84 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +48 -0
- package/dist/index.js.map +1 -0
- package/dist/jsx/react.d.ts +127 -0
- package/dist/jsx/react.d.ts.map +1 -0
- package/dist/jsx/react.js +2 -0
- package/dist/jsx/react.js.map +1 -0
- package/dist/react.d.ts +207 -0
- package/dist/react.d.ts.map +1 -0
- package/dist/react.js +109 -0
- package/dist/react.js.map +1 -0
- package/dist/tailwind/preset.d.ts +120 -0
- package/dist/tailwind/preset.d.ts.map +1 -0
- package/dist/tailwind/preset.js +107 -0
- package/dist/tailwind/preset.js.map +1 -0
- package/dist/takeover.d.ts +79 -0
- package/dist/takeover.d.ts.map +1 -0
- package/dist/takeover.js +119 -0
- package/dist/takeover.js.map +1 -0
- package/dist/tokens/color.d.ts +85 -0
- package/dist/tokens/color.d.ts.map +1 -0
- package/dist/tokens/color.js +212 -0
- package/dist/tokens/color.js.map +1 -0
- package/dist/tokens/theme.d.ts +52 -0
- package/dist/tokens/theme.d.ts.map +1 -0
- package/dist/tokens/theme.js +197 -0
- package/dist/tokens/theme.js.map +1 -0
- package/dist/tokens/tokens.d.ts +210 -0
- package/dist/tokens/tokens.d.ts.map +1 -0
- package/dist/tokens/tokens.js +238 -0
- package/dist/tokens/tokens.js.map +1 -0
- package/package.json +334 -0
- package/src/components/css/accordion/accordion.css +74 -0
- package/src/components/css/accordion/accordion.ts +50 -0
- package/src/components/css/alert/alert.css +50 -0
- package/src/components/css/alert/alert.ts +48 -0
- package/src/components/css/avatar/avatar.css +64 -0
- package/src/components/css/avatar/avatar.ts +57 -0
- package/src/components/css/badge/badge.css +42 -0
- package/src/components/css/badge/badge.ts +43 -0
- package/src/components/css/breadcrumbs/breadcrumbs.css +50 -0
- package/src/components/css/breadcrumbs/breadcrumbs.ts +29 -0
- package/src/components/css/button/button.css +101 -0
- package/src/components/css/button/button.ts +44 -0
- package/src/components/css/card/card.css +48 -0
- package/src/components/css/card/card.ts +50 -0
- package/src/components/css/checkbox/checkbox.css +96 -0
- package/src/components/css/checkbox/checkbox.ts +50 -0
- package/src/components/css/dialog/dialog.css +50 -0
- package/src/components/css/dialog/dialog.ts +36 -0
- package/src/components/css/divider/divider.css +18 -0
- package/src/components/css/divider/divider.ts +41 -0
- package/src/components/css/error-text/error-text.css +21 -0
- package/src/components/css/error-text/error-text.ts +37 -0
- package/src/components/css/fieldset/fieldset.css +57 -0
- package/src/components/css/fieldset/fieldset.ts +87 -0
- package/src/components/css/file-upload/file-upload.css +92 -0
- package/src/components/css/file-upload/file-upload.ts +65 -0
- package/src/components/css/heading/heading.css +33 -0
- package/src/components/css/heading/heading.ts +42 -0
- package/src/components/css/help-text/help-text.css +24 -0
- package/src/components/css/help-text/help-text.ts +42 -0
- package/src/components/css/input/input.css +131 -0
- package/src/components/css/input/input.ts +76 -0
- package/src/components/css/label/label.css +34 -0
- package/src/components/css/label/label.ts +51 -0
- package/src/components/css/link/link.css +36 -0
- package/src/components/css/link/link.ts +29 -0
- package/src/components/css/list/list.css +40 -0
- package/src/components/css/list/list.ts +42 -0
- package/src/components/css/pagination/pagination.css +77 -0
- package/src/components/css/pagination/pagination.ts +33 -0
- package/src/components/css/paragraph/paragraph.css +31 -0
- package/src/components/css/paragraph/paragraph.ts +53 -0
- package/src/components/css/radio/radio.css +76 -0
- package/src/components/css/radio/radio.ts +50 -0
- package/src/components/css/search/search.css +49 -0
- package/src/components/css/search/search.ts +52 -0
- package/src/components/css/select/select.css +95 -0
- package/src/components/css/select/select.ts +40 -0
- package/src/components/css/shared.ts +40 -0
- package/src/components/css/skeleton/skeleton.css +49 -0
- package/src/components/css/skeleton/skeleton.ts +43 -0
- package/src/components/css/skip-link/skip-link.css +36 -0
- package/src/components/css/skip-link/skip-link.ts +22 -0
- package/src/components/css/spinner/spinner.css +48 -0
- package/src/components/css/spinner/spinner.ts +48 -0
- package/src/components/css/sr-only/sr-only.css +16 -0
- package/src/components/css/sr-only/sr-only.ts +18 -0
- package/src/components/css/switch/switch.css +101 -0
- package/src/components/css/switch/switch.ts +46 -0
- package/src/components/css/table/table.css +63 -0
- package/src/components/css/table/table.ts +50 -0
- package/src/components/css/tag/tag.css +58 -0
- package/src/components/css/tag/tag.ts +49 -0
- package/src/components/css/textarea/textarea.css +71 -0
- package/src/components/css/textarea/textarea.ts +40 -0
- package/src/components/css/toggle-group/toggle-group.css +82 -0
- package/src/components/css/toggle-group/toggle-group.ts +37 -0
- package/src/components/css/tooltip/tooltip.css +47 -0
- package/src/components/css/tooltip/tooltip.ts +36 -0
- package/src/components/frittstaende/calendar/fs-calendar.ts +525 -0
- package/src/components/frittstaende/date-field/date-field.css +54 -0
- package/src/components/frittstaende/date-field/fs-date-field.ts +309 -0
- package/src/components/frittstaende/suggestion/fs-suggestion.ts +333 -0
- package/src/components/frittstaende/suggestion/suggestion.css +63 -0
- package/src/components/frittstaende/toast/fs-toast.ts +146 -0
- package/src/components/frittstaende/toast/toast.css +71 -0
- package/src/components/ramme/error-summary/error-summary.css +45 -0
- package/src/components/ramme/error-summary/fs-error-summary.ts +197 -0
- package/src/components/ramme/field/field-core.ts +132 -0
- package/src/components/ramme/field/field.css +6 -0
- package/src/components/ramme/field/fs-field.ts +154 -0
- package/src/components/ramme/popover/fs-popover.ts +205 -0
- package/src/components/ramme/popover/popover.css +34 -0
- package/src/components/ramme/tabs/fs-tabs.ts +182 -0
- package/src/components/ramme/tabs/tabs.css +68 -0
- package/src/tailwind/tailwind.css +134 -0
- package/src/tokens/color.ts +267 -0
- package/src/tokens/theme.ts +350 -0
- package/src/tokens/tokens.css +214 -0
- package/src/tokens/tokens.ts +293 -0
|
@@ -0,0 +1,238 @@
|
|
|
1
|
+
export const Breakpoints = {
|
|
2
|
+
sm: "640px",
|
|
3
|
+
md: "768px",
|
|
4
|
+
lg: "1024px",
|
|
5
|
+
xl: "1280px",
|
|
6
|
+
"2xl": "1536px",
|
|
7
|
+
};
|
|
8
|
+
export const Containers = {
|
|
9
|
+
xs: "100%",
|
|
10
|
+
sm: "576px",
|
|
11
|
+
md: "960px",
|
|
12
|
+
lg: "1152px",
|
|
13
|
+
xl: "1536px",
|
|
14
|
+
aside: "384px",
|
|
15
|
+
asideNarrow: "288px",
|
|
16
|
+
wideContent: "768px",
|
|
17
|
+
};
|
|
18
|
+
export const cssTokens = {
|
|
19
|
+
// Font sizes
|
|
20
|
+
"--font-size-reference": "16px",
|
|
21
|
+
"--font-size-xxs": "0.625rem",
|
|
22
|
+
"--font-size-xs": "0.75rem",
|
|
23
|
+
"--font-size-s": "0.875rem",
|
|
24
|
+
"--font-size-m": "1rem",
|
|
25
|
+
"--font-size-l": "1.125rem",
|
|
26
|
+
"--font-size-xl": "1.375rem",
|
|
27
|
+
"--font-size-xxl": "1.875rem",
|
|
28
|
+
"--font-size-mega": "2.625rem",
|
|
29
|
+
// Size scale (Tailwind-kompatibel, 4px-base)
|
|
30
|
+
"--size-px": "1px",
|
|
31
|
+
"--size-0-5": "0.125rem",
|
|
32
|
+
"--size-1": "0.25rem",
|
|
33
|
+
"--size-2": "0.5rem",
|
|
34
|
+
"--size-3": "0.75rem",
|
|
35
|
+
"--size-4": "1rem",
|
|
36
|
+
"--size-5": "1.25rem",
|
|
37
|
+
"--size-6": "1.5rem",
|
|
38
|
+
"--size-7": "1.75rem",
|
|
39
|
+
"--size-8": "2rem",
|
|
40
|
+
"--size-10": "2.5rem",
|
|
41
|
+
"--size-12": "3rem",
|
|
42
|
+
"--size-16": "4rem",
|
|
43
|
+
// Semantic: størrelse og avstand
|
|
44
|
+
"--semantic-size-default": "var(--size-4)",
|
|
45
|
+
"--semantic-spacing-default": "var(--size-4)",
|
|
46
|
+
// Palette: Burgundy
|
|
47
|
+
"--palette-burgundy-5": "#faf0f3",
|
|
48
|
+
"--palette-burgundy-10": "#f7e2e8",
|
|
49
|
+
"--palette-burgundy-30": "#f3a7b0",
|
|
50
|
+
"--palette-burgundy-50": "#f06674",
|
|
51
|
+
"--palette-burgundy-70": "#b04c5c",
|
|
52
|
+
"--palette-burgundy-100": "#6f2c3f",
|
|
53
|
+
// Palette: Forest
|
|
54
|
+
"--palette-forest-5": "#f4faf5",
|
|
55
|
+
"--palette-forest-10": "#e3f5ea",
|
|
56
|
+
"--palette-forest-30": "#b9e1c8",
|
|
57
|
+
"--palette-forest-50": "#91d6ac",
|
|
58
|
+
"--palette-forest-70": "#5d9b73",
|
|
59
|
+
"--palette-forest-100": "#2b6940",
|
|
60
|
+
// Palette: Ochre
|
|
61
|
+
"--palette-ochre-5": "#f9f4f0",
|
|
62
|
+
"--palette-ochre-10": "#f9ede2",
|
|
63
|
+
"--palette-ochre-30": "#f0d2b6",
|
|
64
|
+
"--palette-ochre-50": "#e7b78a",
|
|
65
|
+
"--palette-ochre-70": "#a9805b",
|
|
66
|
+
"--palette-ochre-100": "#6b492c",
|
|
67
|
+
// Palette: Denim
|
|
68
|
+
"--palette-denim-5": "#eff3f9",
|
|
69
|
+
"--palette-denim-10": "#e2eaf7",
|
|
70
|
+
"--palette-denim-30": "#b5cbee",
|
|
71
|
+
"--palette-denim-50": "#89abe5",
|
|
72
|
+
"--palette-denim-70": "#5a77a8",
|
|
73
|
+
"--palette-denim-100": "#2c436b",
|
|
74
|
+
// Palette: Azure
|
|
75
|
+
"--palette-azure-10": "#cde1f9",
|
|
76
|
+
"--palette-azure-30": "#9ccff2",
|
|
77
|
+
"--palette-azure-70": "#1362ae",
|
|
78
|
+
"--palette-azure-100": "#093e61",
|
|
79
|
+
// Palette: Graphite
|
|
80
|
+
"--palette-graphite-0": "#ffffff",
|
|
81
|
+
"--palette-graphite-5": "#f4f4f4",
|
|
82
|
+
"--palette-graphite-10": "#e5e5e5",
|
|
83
|
+
"--palette-graphite-30": "#b2b2b2",
|
|
84
|
+
"--palette-graphite-50": "#757575",
|
|
85
|
+
"--palette-graphite-70": "#4d4d4d",
|
|
86
|
+
"--palette-graphite-100": "#1a1a1a",
|
|
87
|
+
// Palette: Alpha
|
|
88
|
+
"--palette-dark-alpha-50": "#1a1a1a80",
|
|
89
|
+
// Semantic: side
|
|
90
|
+
"--semantic-page-background": "var(--palette-graphite-0)",
|
|
91
|
+
"--semantic-page-foreground": "var(--palette-graphite-100)",
|
|
92
|
+
// Semantic: status
|
|
93
|
+
"--semantic-danger-background": "var(--palette-burgundy-10)",
|
|
94
|
+
"--semantic-danger-foreground": "#a82e39",
|
|
95
|
+
"--semantic-warning-background": "var(--palette-ochre-10)",
|
|
96
|
+
"--semantic-warning-foreground": "#896508",
|
|
97
|
+
"--semantic-success-background": "var(--palette-forest-10)",
|
|
98
|
+
"--semantic-success-foreground": "#316f2a",
|
|
99
|
+
/**
|
|
100
|
+
* Deaktiverte kontroller. WCAG 1.4.3 unntar inaktive komponenter fra
|
|
101
|
+
* kontrastkravet, men teksten bør fortsatt kunne leses, siden et avslått
|
|
102
|
+
* felt ofte viser innhold brukeren trenger. Bruk den bare på noe som faktisk er
|
|
103
|
+
* slått av; dempet tekst som skal leses bruker `muted-foreground`.
|
|
104
|
+
*/
|
|
105
|
+
"--semantic-disabled-background": "var(--palette-graphite-10)",
|
|
106
|
+
"--semantic-disabled-foreground": "var(--palette-graphite-50)",
|
|
107
|
+
/**
|
|
108
|
+
* Dempet tekst som likevel skal leses: hjelpetekst, plassholdere,
|
|
109
|
+
* «(valgfri)»-markeringen, ukedagene i kalenderen. Holder 4,5:1 mot
|
|
110
|
+
* sideflaten i begge temaer.
|
|
111
|
+
*/
|
|
112
|
+
"--semantic-muted-foreground": "var(--palette-graphite-50)",
|
|
113
|
+
// Nøytral status: informasjon brukeren skal lese, ikke en avslått
|
|
114
|
+
// kontroll. Derfor mørkere enn disabled: 6,71:1 mot egen bakgrunn.
|
|
115
|
+
"--semantic-neutral-background": "var(--palette-graphite-10)",
|
|
116
|
+
"--semantic-neutral-foreground": "var(--palette-graphite-70)",
|
|
117
|
+
// Semantic: interaktiv
|
|
118
|
+
"--semantic-interactive-background": "var(--palette-azure-10)",
|
|
119
|
+
"--semantic-interactive-main": "var(--palette-azure-70)",
|
|
120
|
+
"--semantic-interactive-foreground": "var(--palette-azure-100)",
|
|
121
|
+
/** Tekst oppå `interactive-main`. Snur med temaet. */
|
|
122
|
+
"--semantic-interactive-contrast": "var(--palette-graphite-0)",
|
|
123
|
+
"--semantic-interactive-visited": "var(--palette-denim-70)",
|
|
124
|
+
// Semantic: skjemafelt
|
|
125
|
+
/**
|
|
126
|
+
* Rammen rundt input, textarea, select og kalenderpanelet.
|
|
127
|
+
*
|
|
128
|
+
* graphite-50, ikke graphite-30. WCAG 1.4.11 krever 3:1 for grafiske
|
|
129
|
+
* avgrensninger, og graphite-30 gir bare 2,12:1 mot hvit flate. Feltet var
|
|
130
|
+
* så vidt synlig for den som ser dårlig.
|
|
131
|
+
*/
|
|
132
|
+
"--semantic-field-border": "var(--palette-graphite-50)",
|
|
133
|
+
"--semantic-field-border-hover": "var(--palette-graphite-70)",
|
|
134
|
+
// Semantic: farefylte handlinger
|
|
135
|
+
/**
|
|
136
|
+
* Fylt flate på danger-knappen når den holdes over, med `danger-contrast`
|
|
137
|
+
* som tekst. Før mørknet bakgrunnen mens teksten ble stående, og hover
|
|
138
|
+
* havnet på 3,52:1, altså svakere enn hviletilstanden.
|
|
139
|
+
*/
|
|
140
|
+
"--semantic-danger-main": "#a82e39",
|
|
141
|
+
"--semantic-danger-contrast": "var(--palette-graphite-0)",
|
|
142
|
+
// Semantic: skillelinjer
|
|
143
|
+
"--semantic-divider-30": "var(--palette-graphite-30)",
|
|
144
|
+
"--semantic-divider-100": "var(--palette-graphite-100)",
|
|
145
|
+
/** Forstørrelsesglasset i søkefeltet. */
|
|
146
|
+
"--semantic-icon-search": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234d4d4d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='21' y2='21'/%3E%3C/svg%3E\")",
|
|
147
|
+
/**
|
|
148
|
+
* Haken og streken i avkryssingsboksen.
|
|
149
|
+
*
|
|
150
|
+
* De tegnes oppå `interactive-main`, og må derfor følge
|
|
151
|
+
* `interactive-contrast`, ikke sideflaten.
|
|
152
|
+
*/
|
|
153
|
+
"--semantic-icon-check": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E\")",
|
|
154
|
+
"--semantic-icon-dash": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='6' y1='12' x2='18' y2='12'/%3E%3C/svg%3E\")",
|
|
155
|
+
/**
|
|
156
|
+
* Ikonene som tegnes inn i bakgrunnen til dato- og klokkeslettfeltet.
|
|
157
|
+
*
|
|
158
|
+
* De hører hjemme her og ikke i komponenten, fordi en data-URL ikke kan
|
|
159
|
+
* lese en CSS-variabel: streken er malt inn i selve bildet. Med ikonet som
|
|
160
|
+
* token snur det med temaet, som alt annet. Før var streken fast
|
|
161
|
+
* graphite-70, altså 2,03:1 mot den mørke flaten, og så vidt synlig.
|
|
162
|
+
*/
|
|
163
|
+
"--semantic-icon-calendar": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234d4d4d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E\")",
|
|
164
|
+
"--semantic-icon-clock": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%234d4d4d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolyline points='12 7 12 12 15 15'/%3E%3C/svg%3E\")",
|
|
165
|
+
/**
|
|
166
|
+
* Flaten bak en dialog som er åpnet med `showModal()`.
|
|
167
|
+
*
|
|
168
|
+
* Den ligger mellom siden og dialogen, og må dempe sideinnholdet i begge
|
|
169
|
+
* temaer. I mørkt tema er en sort flate nesten usynlig mot bakgrunnen, så
|
|
170
|
+
* den er kraftigere der.
|
|
171
|
+
*/
|
|
172
|
+
"--semantic-overlay-backdrop": "var(--palette-dark-alpha-50)",
|
|
173
|
+
/**
|
|
174
|
+
* Skyggen under flater som ligger over siden, som kalenderpanelet.
|
|
175
|
+
*
|
|
176
|
+
* Hører til det semantiske laget fordi den må snu med temaet: en svak
|
|
177
|
+
* sort skygge er usynlig mot en nesten sort flate, og panelet mistet
|
|
178
|
+
* dybden si i mørkt tema.
|
|
179
|
+
*/
|
|
180
|
+
"--semantic-shadow-overlay": "0 16px 40px rgba(0, 0, 0, 0.12)",
|
|
181
|
+
};
|
|
182
|
+
/**
|
|
183
|
+
* Verdiene som overstyres i mørkt tema.
|
|
184
|
+
*
|
|
185
|
+
* Bare det semantiske laget snur. Paletten er råverdier og er den samme i
|
|
186
|
+
* begge temaer. Det er hva fargene *betyr* som endrer seg, ikke hvilke
|
|
187
|
+
* farger som finnes.
|
|
188
|
+
*
|
|
189
|
+
* Alle par er kontrollert mot WCAG AA. Se `tokens.browser.test.ts`.
|
|
190
|
+
*/
|
|
191
|
+
export const darkTokens = {
|
|
192
|
+
// Side: nær sort flate, dempet hvit tekst
|
|
193
|
+
"--semantic-page-background": "var(--palette-graphite-100)",
|
|
194
|
+
"--semantic-page-foreground": "var(--palette-graphite-5)",
|
|
195
|
+
// Status: mørk flate, lys tekst. Speilvendt av lyst tema.
|
|
196
|
+
"--semantic-danger-background": "var(--palette-burgundy-100)",
|
|
197
|
+
"--semantic-danger-foreground": "var(--palette-burgundy-30)",
|
|
198
|
+
"--semantic-warning-background": "var(--palette-ochre-100)",
|
|
199
|
+
"--semantic-warning-foreground": "var(--palette-ochre-30)",
|
|
200
|
+
"--semantic-success-background": "var(--palette-forest-100)",
|
|
201
|
+
"--semantic-success-foreground": "var(--palette-forest-30)",
|
|
202
|
+
// Deaktivert: graphite-50 på graphite-70 ga 1,83:1 og var uleselig.
|
|
203
|
+
// graphite-30 gir 3,99:1: fortsatt tydelig av, men mulig å lese.
|
|
204
|
+
"--semantic-disabled-background": "var(--palette-graphite-70)",
|
|
205
|
+
"--semantic-disabled-foreground": "var(--palette-graphite-30)",
|
|
206
|
+
// Dempet, lesbar tekst som holder 8,21:1 mot den mørke flaten
|
|
207
|
+
"--semantic-muted-foreground": "var(--palette-graphite-30)",
|
|
208
|
+
// Nøytral status som fortsatt skal leses, og holder 6,71:1
|
|
209
|
+
"--semantic-neutral-background": "var(--palette-graphite-70)",
|
|
210
|
+
"--semantic-neutral-foreground": "var(--palette-graphite-10)",
|
|
211
|
+
// Interaktiv: lys blå på mørk flate, med mørk tekst oppå
|
|
212
|
+
"--semantic-interactive-background": "var(--palette-azure-100)",
|
|
213
|
+
"--semantic-interactive-main": "var(--palette-azure-30)",
|
|
214
|
+
"--semantic-interactive-foreground": "var(--palette-azure-10)",
|
|
215
|
+
"--semantic-interactive-contrast": "var(--palette-graphite-100)",
|
|
216
|
+
"--semantic-interactive-visited": "var(--palette-denim-30)",
|
|
217
|
+
// Skjemafelt: rammen må være lysere enn flaten, ikke mørkere
|
|
218
|
+
"--semantic-field-border": "var(--palette-graphite-50)",
|
|
219
|
+
"--semantic-field-border-hover": "var(--palette-graphite-30)",
|
|
220
|
+
// Farefylte handlinger
|
|
221
|
+
"--semantic-danger-main": "var(--palette-burgundy-30)",
|
|
222
|
+
"--semantic-danger-contrast": "var(--palette-graphite-100)",
|
|
223
|
+
// Skillelinjer
|
|
224
|
+
"--semantic-divider-30": "var(--palette-graphite-70)",
|
|
225
|
+
"--semantic-divider-100": "var(--palette-graphite-30)",
|
|
226
|
+
"--semantic-icon-search": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b2b2b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='16.5' y1='16.5' x2='21' y2='21'/%3E%3C/svg%3E\")",
|
|
227
|
+
// Hake og strek ligger oppå interactive-main, som er lys i mørkt tema
|
|
228
|
+
"--semantic-icon-check": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E\")",
|
|
229
|
+
"--semantic-icon-dash": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231a1a1a' stroke-width='3' stroke-linecap='round'%3E%3Cline x1='6' y1='12' x2='18' y2='12'/%3E%3C/svg%3E\")",
|
|
230
|
+
// Ikoner: lysere strek, så de holder seg synlige mot den mørke flaten
|
|
231
|
+
"--semantic-icon-calendar": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b2b2b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2' ry='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E\")",
|
|
232
|
+
"--semantic-icon-clock": "url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b2b2b2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpolyline points='12 7 12 12 15 15'/%3E%3C/svg%3E\")",
|
|
233
|
+
// Flaten bak en dialog må dempe mer når siden under alt er mørk
|
|
234
|
+
"--semantic-overlay-backdrop": "rgba(0, 0, 0, 0.72)",
|
|
235
|
+
// Skygge: kraftigere, siden flaten under er nesten sort
|
|
236
|
+
"--semantic-shadow-overlay": "0 16px 40px rgba(0, 0, 0, 0.6)",
|
|
237
|
+
};
|
|
238
|
+
//# sourceMappingURL=tokens.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tokens.js","sourceRoot":"","sources":["../../src/tokens/tokens.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,WAAW,GAAG;IACzB,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,KAAK,EAAE,QAAQ;CACP,CAAA;AAEV,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,EAAE,EAAE,MAAM;IACV,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,OAAO;IACX,EAAE,EAAE,QAAQ;IACZ,EAAE,EAAE,QAAQ;IACZ,KAAK,EAAE,OAAO;IACd,WAAW,EAAE,OAAO;IACpB,WAAW,EAAE,OAAO;CACZ,CAAA;AAKV,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,aAAa;IACb,uBAAuB,EAAE,MAAM;IAC/B,iBAAiB,EAAE,UAAU;IAC7B,gBAAgB,EAAE,SAAS;IAC3B,eAAe,EAAE,UAAU;IAC3B,eAAe,EAAE,MAAM;IACvB,eAAe,EAAE,UAAU;IAC3B,gBAAgB,EAAE,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sEAAsE;IACtE,uBAAuB,EACrB,8OAA8O;IAChP,sBAAsB,EACpB,yNAAyN;IAE3N,sEAAsE;IACtE,0BAA0B,EACxB,6XAA6X;IAC/X,uBAAuB,EACrB,mRAAmR;IAErR,gEAAgE;IAChE,6BAA6B,EAAE,qBAAqB;IAEpD,wDAAwD;IACxD,2BAA2B,EAAE,gCAAgC;CACT,CAAA"}
|
package/package.json
ADDED
|
@@ -0,0 +1,334 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@fristil/designsystem",
|
|
3
|
+
"version": "0.2.0",
|
|
4
|
+
"description": "Rammeverksuavhengig designsystem: tokens, CSS-komponenter og web components.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"author": "MarkusAugust",
|
|
7
|
+
"homepage": "https://fristil.netlify.app",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/MarkusAugust/fristil.git",
|
|
11
|
+
"directory": "designsystem"
|
|
12
|
+
},
|
|
13
|
+
"bugs": {
|
|
14
|
+
"url": "https://github.com/MarkusAugust/fristil/issues"
|
|
15
|
+
},
|
|
16
|
+
"keywords": [
|
|
17
|
+
"designsystem",
|
|
18
|
+
"design-system",
|
|
19
|
+
"web-components",
|
|
20
|
+
"custom-elements",
|
|
21
|
+
"css",
|
|
22
|
+
"design-tokens",
|
|
23
|
+
"lit",
|
|
24
|
+
"accessibility",
|
|
25
|
+
"universell-utforming"
|
|
26
|
+
],
|
|
27
|
+
"type": "module",
|
|
28
|
+
"sideEffects": [
|
|
29
|
+
"*.css"
|
|
30
|
+
],
|
|
31
|
+
"main": "./dist/index.js",
|
|
32
|
+
"types": "./dist/index.d.ts",
|
|
33
|
+
"bin": {
|
|
34
|
+
"fristil": "./dist/cli.js"
|
|
35
|
+
},
|
|
36
|
+
"exports": {
|
|
37
|
+
".": {
|
|
38
|
+
"types": "./dist/index.d.ts",
|
|
39
|
+
"import": "./dist/index.js"
|
|
40
|
+
},
|
|
41
|
+
"./tokens.css": "./src/tokens/tokens.css",
|
|
42
|
+
"./button.css": "./src/components/css/button/button.css",
|
|
43
|
+
"./link.css": "./src/components/css/link/link.css",
|
|
44
|
+
"./sr-only.css": "./src/components/css/sr-only/sr-only.css",
|
|
45
|
+
"./file-upload.css": "./src/components/css/file-upload/file-upload.css",
|
|
46
|
+
"./popover.css": "./src/components/ramme/popover/popover.css",
|
|
47
|
+
"./toast.css": "./src/components/frittstaende/toast/toast.css",
|
|
48
|
+
"./suggestion.css": "./src/components/frittstaende/suggestion/suggestion.css",
|
|
49
|
+
"./checkbox.css": "./src/components/css/checkbox/checkbox.css",
|
|
50
|
+
"./radio.css": "./src/components/css/radio/radio.css",
|
|
51
|
+
"./switch.css": "./src/components/css/switch/switch.css",
|
|
52
|
+
"./fieldset.css": "./src/components/css/fieldset/fieldset.css",
|
|
53
|
+
"./alert.css": "./src/components/css/alert/alert.css",
|
|
54
|
+
"./card.css": "./src/components/css/card/card.css",
|
|
55
|
+
"./divider.css": "./src/components/css/divider/divider.css",
|
|
56
|
+
"./spinner.css": "./src/components/css/spinner/spinner.css",
|
|
57
|
+
"./badge.css": "./src/components/css/badge/badge.css",
|
|
58
|
+
"./label.css": "./src/components/css/label/label.css",
|
|
59
|
+
"./input.css": "./src/components/css/input/input.css",
|
|
60
|
+
"./textarea.css": "./src/components/css/textarea/textarea.css",
|
|
61
|
+
"./select.css": "./src/components/css/select/select.css",
|
|
62
|
+
"./help-text.css": "./src/components/css/help-text/help-text.css",
|
|
63
|
+
"./error-text.css": "./src/components/css/error-text/error-text.css",
|
|
64
|
+
"./field.css": "./src/components/ramme/field/field.css",
|
|
65
|
+
"./tabs.css": "./src/components/ramme/tabs/tabs.css",
|
|
66
|
+
"./error-summary.css": "./src/components/ramme/error-summary/error-summary.css",
|
|
67
|
+
"./date-field.css": "./src/components/frittstaende/date-field/date-field.css",
|
|
68
|
+
"./label": {
|
|
69
|
+
"types": "./dist/components/css/label/label.d.ts",
|
|
70
|
+
"import": "./dist/components/css/label/label.js"
|
|
71
|
+
},
|
|
72
|
+
"./input": {
|
|
73
|
+
"types": "./dist/components/css/input/input.d.ts",
|
|
74
|
+
"import": "./dist/components/css/input/input.js"
|
|
75
|
+
},
|
|
76
|
+
"./textarea": {
|
|
77
|
+
"types": "./dist/components/css/textarea/textarea.d.ts",
|
|
78
|
+
"import": "./dist/components/css/textarea/textarea.js"
|
|
79
|
+
},
|
|
80
|
+
"./select": {
|
|
81
|
+
"types": "./dist/components/css/select/select.d.ts",
|
|
82
|
+
"import": "./dist/components/css/select/select.js"
|
|
83
|
+
},
|
|
84
|
+
"./help-text": {
|
|
85
|
+
"types": "./dist/components/css/help-text/help-text.d.ts",
|
|
86
|
+
"import": "./dist/components/css/help-text/help-text.js"
|
|
87
|
+
},
|
|
88
|
+
"./error-text": {
|
|
89
|
+
"types": "./dist/components/css/error-text/error-text.d.ts",
|
|
90
|
+
"import": "./dist/components/css/error-text/error-text.js"
|
|
91
|
+
},
|
|
92
|
+
"./calendar": {
|
|
93
|
+
"types": "./dist/components/frittstaende/calendar/fs-calendar.d.ts",
|
|
94
|
+
"import": "./dist/components/frittstaende/calendar/fs-calendar.js"
|
|
95
|
+
},
|
|
96
|
+
"./field": {
|
|
97
|
+
"types": "./dist/components/ramme/field/fs-field.d.ts",
|
|
98
|
+
"import": "./dist/components/ramme/field/fs-field.js"
|
|
99
|
+
},
|
|
100
|
+
"./tabs": {
|
|
101
|
+
"types": "./dist/components/ramme/tabs/fs-tabs.d.ts",
|
|
102
|
+
"import": "./dist/components/ramme/tabs/fs-tabs.js"
|
|
103
|
+
},
|
|
104
|
+
"./error-summary": {
|
|
105
|
+
"types": "./dist/components/ramme/error-summary/fs-error-summary.d.ts",
|
|
106
|
+
"import": "./dist/components/ramme/error-summary/fs-error-summary.js"
|
|
107
|
+
},
|
|
108
|
+
"./date-field": {
|
|
109
|
+
"types": "./dist/components/frittstaende/date-field/fs-date-field.d.ts",
|
|
110
|
+
"import": "./dist/components/frittstaende/date-field/fs-date-field.js"
|
|
111
|
+
},
|
|
112
|
+
"./button": {
|
|
113
|
+
"types": "./dist/components/css/button/button.d.ts",
|
|
114
|
+
"import": "./dist/components/css/button/button.js"
|
|
115
|
+
},
|
|
116
|
+
"./tokens": {
|
|
117
|
+
"types": "./dist/tokens/tokens.d.ts",
|
|
118
|
+
"import": "./dist/tokens/tokens.js"
|
|
119
|
+
},
|
|
120
|
+
"./tema": {
|
|
121
|
+
"types": "./dist/tokens/theme.d.ts",
|
|
122
|
+
"import": "./dist/tokens/theme.js"
|
|
123
|
+
},
|
|
124
|
+
"./farge": {
|
|
125
|
+
"types": "./dist/tokens/color.d.ts",
|
|
126
|
+
"import": "./dist/tokens/color.js"
|
|
127
|
+
},
|
|
128
|
+
"./tailwind.css": "./src/tailwind/tailwind.css",
|
|
129
|
+
"./badge": {
|
|
130
|
+
"types": "./dist/components/css/badge/badge.d.ts",
|
|
131
|
+
"import": "./dist/components/css/badge/badge.js"
|
|
132
|
+
},
|
|
133
|
+
"./link": {
|
|
134
|
+
"types": "./dist/components/css/link/link.d.ts",
|
|
135
|
+
"import": "./dist/components/css/link/link.js"
|
|
136
|
+
},
|
|
137
|
+
"./sr-only": {
|
|
138
|
+
"types": "./dist/components/css/sr-only/sr-only.d.ts",
|
|
139
|
+
"import": "./dist/components/css/sr-only/sr-only.js"
|
|
140
|
+
},
|
|
141
|
+
"./file-upload": {
|
|
142
|
+
"types": "./dist/components/css/file-upload/file-upload.d.ts",
|
|
143
|
+
"import": "./dist/components/css/file-upload/file-upload.js"
|
|
144
|
+
},
|
|
145
|
+
"./popover": {
|
|
146
|
+
"types": "./dist/components/ramme/popover/fs-popover.d.ts",
|
|
147
|
+
"import": "./dist/components/ramme/popover/fs-popover.js"
|
|
148
|
+
},
|
|
149
|
+
"./toast": {
|
|
150
|
+
"types": "./dist/components/frittstaende/toast/fs-toast.d.ts",
|
|
151
|
+
"import": "./dist/components/frittstaende/toast/fs-toast.js"
|
|
152
|
+
},
|
|
153
|
+
"./suggestion": {
|
|
154
|
+
"types": "./dist/components/frittstaende/suggestion/fs-suggestion.d.ts",
|
|
155
|
+
"import": "./dist/components/frittstaende/suggestion/fs-suggestion.js"
|
|
156
|
+
},
|
|
157
|
+
"./checkbox": {
|
|
158
|
+
"types": "./dist/components/css/checkbox/checkbox.d.ts",
|
|
159
|
+
"import": "./dist/components/css/checkbox/checkbox.js"
|
|
160
|
+
},
|
|
161
|
+
"./radio": {
|
|
162
|
+
"types": "./dist/components/css/radio/radio.d.ts",
|
|
163
|
+
"import": "./dist/components/css/radio/radio.js"
|
|
164
|
+
},
|
|
165
|
+
"./switch": {
|
|
166
|
+
"types": "./dist/components/css/switch/switch.d.ts",
|
|
167
|
+
"import": "./dist/components/css/switch/switch.js"
|
|
168
|
+
},
|
|
169
|
+
"./fieldset": {
|
|
170
|
+
"types": "./dist/components/css/fieldset/fieldset.d.ts",
|
|
171
|
+
"import": "./dist/components/css/fieldset/fieldset.js"
|
|
172
|
+
},
|
|
173
|
+
"./alert": {
|
|
174
|
+
"types": "./dist/components/css/alert/alert.d.ts",
|
|
175
|
+
"import": "./dist/components/css/alert/alert.js"
|
|
176
|
+
},
|
|
177
|
+
"./card": {
|
|
178
|
+
"types": "./dist/components/css/card/card.d.ts",
|
|
179
|
+
"import": "./dist/components/css/card/card.js"
|
|
180
|
+
},
|
|
181
|
+
"./divider": {
|
|
182
|
+
"types": "./dist/components/css/divider/divider.d.ts",
|
|
183
|
+
"import": "./dist/components/css/divider/divider.js"
|
|
184
|
+
},
|
|
185
|
+
"./spinner": {
|
|
186
|
+
"types": "./dist/components/css/spinner/spinner.d.ts",
|
|
187
|
+
"import": "./dist/components/css/spinner/spinner.js"
|
|
188
|
+
},
|
|
189
|
+
"./shared": {
|
|
190
|
+
"types": "./dist/components/css/shared.d.ts",
|
|
191
|
+
"import": "./dist/components/css/shared.js"
|
|
192
|
+
},
|
|
193
|
+
"./field-core": {
|
|
194
|
+
"types": "./dist/components/ramme/field/field-core.d.ts",
|
|
195
|
+
"import": "./dist/components/ramme/field/field-core.js"
|
|
196
|
+
},
|
|
197
|
+
"./react": {
|
|
198
|
+
"types": "./dist/react.d.ts",
|
|
199
|
+
"import": "./dist/react.js"
|
|
200
|
+
},
|
|
201
|
+
"./react-jsx": {
|
|
202
|
+
"types": "./dist/jsx/react.d.ts",
|
|
203
|
+
"import": "./dist/jsx/react.js"
|
|
204
|
+
},
|
|
205
|
+
"./dom": {
|
|
206
|
+
"types": "./dist/dom.d.ts",
|
|
207
|
+
"import": "./dist/dom.js"
|
|
208
|
+
},
|
|
209
|
+
"./table.css": "./src/components/css/table/table.css",
|
|
210
|
+
"./table": {
|
|
211
|
+
"types": "./dist/components/css/table/table.d.ts",
|
|
212
|
+
"import": "./dist/components/css/table/table.js"
|
|
213
|
+
},
|
|
214
|
+
"./list.css": "./src/components/css/list/list.css",
|
|
215
|
+
"./list": {
|
|
216
|
+
"types": "./dist/components/css/list/list.d.ts",
|
|
217
|
+
"import": "./dist/components/css/list/list.js"
|
|
218
|
+
},
|
|
219
|
+
"./tag.css": "./src/components/css/tag/tag.css",
|
|
220
|
+
"./tag": {
|
|
221
|
+
"types": "./dist/components/css/tag/tag.d.ts",
|
|
222
|
+
"import": "./dist/components/css/tag/tag.js"
|
|
223
|
+
},
|
|
224
|
+
"./avatar.css": "./src/components/css/avatar/avatar.css",
|
|
225
|
+
"./avatar": {
|
|
226
|
+
"types": "./dist/components/css/avatar/avatar.d.ts",
|
|
227
|
+
"import": "./dist/components/css/avatar/avatar.js"
|
|
228
|
+
},
|
|
229
|
+
"./skeleton.css": "./src/components/css/skeleton/skeleton.css",
|
|
230
|
+
"./skeleton": {
|
|
231
|
+
"types": "./dist/components/css/skeleton/skeleton.d.ts",
|
|
232
|
+
"import": "./dist/components/css/skeleton/skeleton.js"
|
|
233
|
+
},
|
|
234
|
+
"./breadcrumbs.css": "./src/components/css/breadcrumbs/breadcrumbs.css",
|
|
235
|
+
"./breadcrumbs": {
|
|
236
|
+
"types": "./dist/components/css/breadcrumbs/breadcrumbs.d.ts",
|
|
237
|
+
"import": "./dist/components/css/breadcrumbs/breadcrumbs.js"
|
|
238
|
+
},
|
|
239
|
+
"./pagination.css": "./src/components/css/pagination/pagination.css",
|
|
240
|
+
"./pagination": {
|
|
241
|
+
"types": "./dist/components/css/pagination/pagination.d.ts",
|
|
242
|
+
"import": "./dist/components/css/pagination/pagination.js"
|
|
243
|
+
},
|
|
244
|
+
"./skip-link.css": "./src/components/css/skip-link/skip-link.css",
|
|
245
|
+
"./skip-link": {
|
|
246
|
+
"types": "./dist/components/css/skip-link/skip-link.d.ts",
|
|
247
|
+
"import": "./dist/components/css/skip-link/skip-link.js"
|
|
248
|
+
},
|
|
249
|
+
"./accordion.css": "./src/components/css/accordion/accordion.css",
|
|
250
|
+
"./accordion": {
|
|
251
|
+
"types": "./dist/components/css/accordion/accordion.d.ts",
|
|
252
|
+
"import": "./dist/components/css/accordion/accordion.js"
|
|
253
|
+
},
|
|
254
|
+
"./dialog.css": "./src/components/css/dialog/dialog.css",
|
|
255
|
+
"./dialog": {
|
|
256
|
+
"types": "./dist/components/css/dialog/dialog.d.ts",
|
|
257
|
+
"import": "./dist/components/css/dialog/dialog.js"
|
|
258
|
+
},
|
|
259
|
+
"./search.css": "./src/components/css/search/search.css",
|
|
260
|
+
"./search": {
|
|
261
|
+
"types": "./dist/components/css/search/search.d.ts",
|
|
262
|
+
"import": "./dist/components/css/search/search.js"
|
|
263
|
+
},
|
|
264
|
+
"./toggle-group.css": "./src/components/css/toggle-group/toggle-group.css",
|
|
265
|
+
"./toggle-group": {
|
|
266
|
+
"types": "./dist/components/css/toggle-group/toggle-group.d.ts",
|
|
267
|
+
"import": "./dist/components/css/toggle-group/toggle-group.js"
|
|
268
|
+
},
|
|
269
|
+
"./tooltip.css": "./src/components/css/tooltip/tooltip.css",
|
|
270
|
+
"./tooltip": {
|
|
271
|
+
"types": "./dist/components/css/tooltip/tooltip.d.ts",
|
|
272
|
+
"import": "./dist/components/css/tooltip/tooltip.js"
|
|
273
|
+
},
|
|
274
|
+
"./heading.css": "./src/components/css/heading/heading.css",
|
|
275
|
+
"./heading": {
|
|
276
|
+
"types": "./dist/components/css/heading/heading.d.ts",
|
|
277
|
+
"import": "./dist/components/css/heading/heading.js"
|
|
278
|
+
},
|
|
279
|
+
"./paragraph.css": "./src/components/css/paragraph/paragraph.css",
|
|
280
|
+
"./paragraph": {
|
|
281
|
+
"types": "./dist/components/css/paragraph/paragraph.d.ts",
|
|
282
|
+
"import": "./dist/components/css/paragraph/paragraph.js"
|
|
283
|
+
}
|
|
284
|
+
},
|
|
285
|
+
"files": [
|
|
286
|
+
"dist",
|
|
287
|
+
"src/tokens",
|
|
288
|
+
"src/components",
|
|
289
|
+
"src/tailwind",
|
|
290
|
+
"CHANGELOG.md",
|
|
291
|
+
"!**/*.browser.test.ts",
|
|
292
|
+
"!**/*.test.ts",
|
|
293
|
+
"!**/*.tsbuildinfo"
|
|
294
|
+
],
|
|
295
|
+
"publishConfig": {
|
|
296
|
+
"access": "public"
|
|
297
|
+
},
|
|
298
|
+
"scripts": {
|
|
299
|
+
"generate": "bun scripts/generate-tokens.ts",
|
|
300
|
+
"build": "bun run generate && tsc -b --force && bun run sjekk:eksport && bun run sjekk:cli && bun run sjekk:versjon && bun run sjekk:pakke",
|
|
301
|
+
"typecheck": "tsc --noEmit",
|
|
302
|
+
"typecheck:tests": "tsc --noEmit -p tsconfig.tests.json",
|
|
303
|
+
"test:browser": "vitest --config vitest.config.ts --run",
|
|
304
|
+
"sjekk:eksport": "bun scripts/sjekk-eksport.ts",
|
|
305
|
+
"sjekk:tailwind": "bun scripts/sjekk-tailwind.ts",
|
|
306
|
+
"nettlesere": "playwright install chromium firefox webkit",
|
|
307
|
+
"tema": "bun src/cli.ts",
|
|
308
|
+
"sjekk:cli": "bun scripts/sjekk-cli.ts",
|
|
309
|
+
"sjekk:versjon": "bun scripts/sjekk-versjon.ts",
|
|
310
|
+
"sjekk:pakke": "publint",
|
|
311
|
+
"prepublishOnly": "bun run build"
|
|
312
|
+
},
|
|
313
|
+
"peerDependencies": {
|
|
314
|
+
"lit": ">=3.0.0"
|
|
315
|
+
},
|
|
316
|
+
"peerDependenciesMeta": {
|
|
317
|
+
"lit": {
|
|
318
|
+
"optional": true
|
|
319
|
+
}
|
|
320
|
+
},
|
|
321
|
+
"devDependencies": {
|
|
322
|
+
"@types/node": "24.12.4",
|
|
323
|
+
"@types/react": "19",
|
|
324
|
+
"@vitest/browser": "4.1.7",
|
|
325
|
+
"@vitest/browser-playwright": "^4.1.7",
|
|
326
|
+
"axe-core": "^4.13.0",
|
|
327
|
+
"lit": "3.3.3",
|
|
328
|
+
"playwright": "1.60.0",
|
|
329
|
+
"publint": "^0.3.24",
|
|
330
|
+
"tailwindcss": "4.3.0",
|
|
331
|
+
"vite": "7.0.0",
|
|
332
|
+
"vitest": "4.1.7"
|
|
333
|
+
}
|
|
334
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
@layer fristil {
|
|
2
|
+
.fs-accordion {
|
|
3
|
+
box-sizing: border-box;
|
|
4
|
+
border: 1px solid var(--semantic-divider-30);
|
|
5
|
+
border-radius: var(--fs-accordion-radius, var(--size-1));
|
|
6
|
+
font-family: inherit;
|
|
7
|
+
font-size: var(--font-size-m);
|
|
8
|
+
line-height: 1.5;
|
|
9
|
+
color: var(--semantic-page-foreground);
|
|
10
|
+
background: var(--semantic-page-background);
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.fs-accordion + .fs-accordion {
|
|
14
|
+
margin-block-start: var(--size-2);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
.fs-accordion summary {
|
|
18
|
+
display: flex;
|
|
19
|
+
align-items: center;
|
|
20
|
+
justify-content: space-between;
|
|
21
|
+
gap: var(--size-2);
|
|
22
|
+
padding: var(--fs-accordion-padding, var(--size-3) var(--size-4));
|
|
23
|
+
font-weight: 600;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
/* Trekanten fra nettleseren er ulik i hver av dem. Den byttes ut med en
|
|
26
|
+
som er lik overalt, og som snur med panelet. */
|
|
27
|
+
list-style: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.fs-accordion summary::-webkit-details-marker {
|
|
31
|
+
display: none;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.fs-accordion summary::after {
|
|
35
|
+
content: "";
|
|
36
|
+
inline-size: var(--size-2);
|
|
37
|
+
block-size: var(--size-2);
|
|
38
|
+
flex: none;
|
|
39
|
+
border-inline-end: 2px solid var(--semantic-interactive-main);
|
|
40
|
+
border-block-end: 2px solid var(--semantic-interactive-main);
|
|
41
|
+
transform: rotate(45deg) translate(-2px, -2px);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.fs-accordion[open] summary::after {
|
|
45
|
+
transform: rotate(225deg) translate(-2px, -2px);
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.fs-accordion summary:hover {
|
|
49
|
+
background: var(--semantic-neutral-background);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.fs-accordion summary:focus-visible {
|
|
53
|
+
outline: 2px solid var(--semantic-interactive-main);
|
|
54
|
+
outline-offset: -2px;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.fs-accordion__content {
|
|
58
|
+
padding: 0 var(--size-4) var(--size-4);
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
.fs-accordion__content > :first-child {
|
|
62
|
+
margin-block-start: 0;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.fs-accordion__content > :last-child {
|
|
66
|
+
margin-block-end: 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.fs-accordion[data-variant="plain"] {
|
|
70
|
+
border-inline: 0;
|
|
71
|
+
border-block-start: 0;
|
|
72
|
+
border-radius: 0;
|
|
73
|
+
}
|
|
74
|
+
}
|