@fremtind/jokul 5.0.0-next.1 → 5.0.0-next.2
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/README.md +29 -6
- package/bin/jokul.mjs +10 -0
- package/bin/run-jokul-cli.mjs +63 -0
- package/build/build-stats.html +1 -1
- package/build/cjs/components/card/Card.cjs +1 -1
- package/build/cjs/components/card/Card.cjs.map +1 -1
- package/build/cjs/components/card/types.cjs +1 -1
- package/build/cjs/components/card/types.cjs.map +1 -1
- package/build/cjs/components/card/types.d.cts +2 -2
- package/build/cjs/components/checkbox/Checkbox.cjs +1 -1
- package/build/cjs/components/checkbox/Checkbox.cjs.map +1 -1
- package/build/cjs/components/cookie-consent/CookieConsent.cjs +1 -1
- package/build/cjs/components/cookie-consent/CookieConsent.cjs.map +1 -1
- package/build/cjs/components/cookie-consent/CookieConsent.d.cts +1 -1
- package/build/cjs/components/cookie-consent/types.d.cts +4 -0
- package/build/cjs/components/datepicker/DatePicker.cjs +1 -1
- package/build/cjs/components/datepicker/DatePicker.cjs.map +1 -1
- package/build/cjs/components/expander/ExpandablePanel.cjs +1 -1
- package/build/cjs/components/expander/ExpandablePanel.cjs.map +1 -1
- package/build/cjs/components/link/Link.cjs +1 -1
- package/build/cjs/components/link/Link.cjs.map +1 -1
- package/build/cjs/components/link/Link.d.cts +2 -2
- package/build/cjs/components/link/types.d.cts +1 -4
- package/build/cjs/components/modal/Modal.cjs +1 -1
- package/build/cjs/components/modal/Modal.cjs.map +1 -1
- package/build/cjs/components/modal/Modal.d.cts +2 -9
- package/build/cjs/components/modal/index.d.cts +1 -1
- package/build/cjs/components/modal/types.d.cts +18 -0
- package/build/cjs/components/popover/Popover.cjs +1 -1
- package/build/cjs/components/popover/Popover.cjs.map +1 -1
- package/build/cjs/components/radio-button/BaseRadioButton.cjs +1 -1
- package/build/cjs/components/radio-button/BaseRadioButton.cjs.map +1 -1
- package/build/cjs/core/tokens.cjs +2 -0
- package/build/cjs/core/tokens.cjs.map +1 -0
- package/build/cjs/core/tokens.d.cts +593 -0
- package/build/cjs/tailwind/colors.cjs +2 -0
- package/build/cjs/tailwind/colors.cjs.map +1 -0
- package/build/cjs/tailwind/colors.d.cts +39 -0
- package/build/cjs/tokens.cjs +1 -1
- package/build/cjs/tokens.cjs.map +1 -1
- package/build/cjs/tokens.d.cts +98 -39
- package/build/es/components/card/Card.js +1 -1
- package/build/es/components/card/Card.js.map +1 -1
- package/build/es/components/card/types.d.ts +2 -2
- package/build/es/components/card/types.js +1 -1
- package/build/es/components/card/types.js.map +1 -1
- package/build/es/components/checkbox/Checkbox.js +1 -1
- package/build/es/components/checkbox/Checkbox.js.map +1 -1
- package/build/es/components/cookie-consent/CookieConsent.d.ts +1 -1
- package/build/es/components/cookie-consent/CookieConsent.js +1 -1
- package/build/es/components/cookie-consent/CookieConsent.js.map +1 -1
- package/build/es/components/cookie-consent/types.d.ts +4 -0
- package/build/es/components/datepicker/DatePicker.js +1 -1
- package/build/es/components/datepicker/DatePicker.js.map +1 -1
- package/build/es/components/expander/ExpandablePanel.js +1 -1
- package/build/es/components/expander/ExpandablePanel.js.map +1 -1
- package/build/es/components/link/Link.d.ts +2 -2
- package/build/es/components/link/Link.js +1 -1
- package/build/es/components/link/Link.js.map +1 -1
- package/build/es/components/link/types.d.ts +1 -4
- package/build/es/components/modal/Modal.d.ts +2 -9
- package/build/es/components/modal/Modal.js +1 -1
- package/build/es/components/modal/Modal.js.map +1 -1
- package/build/es/components/modal/index.d.ts +1 -1
- package/build/es/components/modal/types.d.ts +18 -0
- package/build/es/components/popover/Popover.js +1 -1
- package/build/es/components/popover/Popover.js.map +1 -1
- package/build/es/components/radio-button/BaseRadioButton.js +1 -1
- package/build/es/components/radio-button/BaseRadioButton.js.map +1 -1
- package/build/es/core/tokens.d.ts +593 -0
- package/build/es/core/tokens.js +2 -0
- package/build/es/core/tokens.js.map +1 -0
- package/build/es/tailwind/colors.d.ts +39 -0
- package/build/es/tailwind/colors.js +2 -0
- package/build/es/tailwind/colors.js.map +1 -0
- package/build/es/tokens.d.ts +98 -39
- package/build/es/tokens.js +1 -1
- package/build/es/tokens.js.map +1 -1
- package/codemods/__tests__/import-paths.test.mjs +84 -0
- package/codemods/import-paths.mjs +393 -0
- package/package.json +6 -1
- package/styles/base.css +483 -66
- package/styles/base.min.css +1 -1
- package/styles/components/autosuggest/autosuggest.css +2 -2
- package/styles/components/autosuggest/autosuggest.min.css +1 -1
- package/styles/components/autosuggest/autosuggest.scss +2 -2
- package/styles/components/beta/description-list/description-list.css +1 -1
- package/styles/components/beta/description-list/description-list.min.css +1 -1
- package/styles/components/beta/description-list/description-list.scss +1 -1
- package/styles/components/beta/nav-link/navlink.css +2 -2
- package/styles/components/beta/nav-link/navlink.min.css +1 -1
- package/styles/components/beta/nav-link/navlink.scss +2 -2
- package/styles/components/beta/select/select.css +9 -9
- package/styles/components/beta/select/select.min.css +1 -1
- package/styles/components/beta/select/select.scss +8 -7
- package/styles/components/breadcrumb/breadcrumb.css +1 -1
- package/styles/components/breadcrumb/breadcrumb.min.css +1 -1
- package/styles/components/button/button.css +6 -2
- package/styles/components/button/button.min.css +1 -1
- package/styles/components/button/button.scss +12 -12
- package/styles/components/card/card.css +6 -9
- package/styles/components/card/card.min.css +1 -1
- package/styles/components/card/card.scss +6 -10
- package/styles/components/checkbox/checkbox.css +43 -9
- package/styles/components/checkbox/checkbox.min.css +1 -1
- package/styles/components/checkbox/checkbox.scss +38 -21
- package/styles/components/checkbox-panel/checkbox-panel.css +65 -26
- package/styles/components/checkbox-panel/checkbox-panel.min.css +1 -1
- package/styles/components/checkbox-panel/checkbox-panel.scss +4 -0
- package/styles/components/chip/chip.css +2 -2
- package/styles/components/chip/chip.min.css +1 -1
- package/styles/components/chip/chip.scss +1 -1
- package/styles/components/combobox/combobox.css +18 -15
- package/styles/components/combobox/combobox.min.css +1 -1
- package/styles/components/combobox/combobox.scss +9 -6
- package/styles/components/countdown/countdown.css +4 -4
- package/styles/components/countdown/countdown.min.css +1 -1
- package/styles/components/datepicker/_calendar-date-button.scss +7 -7
- package/styles/components/datepicker/_calendar-navigation-dropdown.scss +1 -1
- package/styles/components/datepicker/_calendar.scss +6 -7
- package/styles/components/datepicker/datepicker.css +19 -11
- package/styles/components/datepicker/datepicker.min.css +1 -1
- package/styles/components/description-list/description-list.css +1 -1
- package/styles/components/description-list/description-list.min.css +1 -1
- package/styles/components/description-list/description-list.scss +1 -1
- package/styles/components/expander/expandable.css +17 -17
- package/styles/components/expander/expandable.min.css +1 -1
- package/styles/components/expander/expandable.scss +15 -19
- package/styles/components/feedback/feedback.css +6 -8
- package/styles/components/feedback/feedback.min.css +1 -1
- package/styles/components/feedback/feedback.scss +4 -9
- package/styles/components/file/file.css +5 -5
- package/styles/components/file/file.min.css +1 -1
- package/styles/components/file/file.scss +5 -5
- package/styles/components/file-input/file-input.css +26 -22
- package/styles/components/file-input/file-input.min.css +1 -1
- package/styles/components/file-input/file-input.scss +3 -3
- package/styles/components/help/help.css +2 -2
- package/styles/components/help/help.min.css +1 -1
- package/styles/components/help/help.scss +2 -2
- package/styles/components/icon/icon.css +4 -4
- package/styles/components/icon/icon.min.css +1 -1
- package/styles/components/icon/icon.scss +4 -4
- package/styles/components/icon-button/icon-button.css +1 -1
- package/styles/components/icon-button/icon-button.min.css +1 -1
- package/styles/components/input-group/input-group.css +2 -2
- package/styles/components/input-group/input-group.min.css +1 -1
- package/styles/components/input-panel/input-panel.css +19 -17
- package/styles/components/input-panel/input-panel.min.css +1 -1
- package/styles/components/input-panel/input-panel.scss +20 -18
- package/styles/components/link/link.css +1 -1
- package/styles/components/link/link.min.css +1 -1
- package/styles/components/link-list/link-list.css +6 -2
- package/styles/components/link-list/link-list.min.css +1 -1
- package/styles/components/link-list/link-list.scss +6 -2
- package/styles/components/loader/loader.css +6 -6
- package/styles/components/loader/loader.min.css +1 -1
- package/styles/components/loader/skeleton-loader.css +4 -4
- package/styles/components/loader/skeleton-loader.min.css +1 -1
- package/styles/components/loader/skeleton-loader.scss +1 -1
- package/styles/components/menu/_menu-divider.scss +1 -1
- package/styles/components/menu/menu.css +3 -3
- package/styles/components/menu/menu.min.css +1 -1
- package/styles/components/menu/menu.scss +2 -2
- package/styles/components/message/message.css +19 -9
- package/styles/components/message/message.min.css +1 -1
- package/styles/components/message/message.scss +16 -6
- package/styles/components/modal/_layout.scss +22 -0
- package/styles/components/modal/_modal-base.scss +32 -0
- package/styles/components/modal/_motion.scss +45 -0
- package/styles/components/modal/_overlay.scss +20 -0
- package/styles/components/modal/_parts.scss +33 -0
- package/styles/components/modal/_placement.scss +59 -0
- package/styles/components/modal/modal.css +118 -34
- package/styles/components/modal/modal.min.css +1 -1
- package/styles/components/modal/modal.scss +6 -95
- package/styles/components/nav-link/nav-link.css +1 -1
- package/styles/components/nav-link/nav-link.min.css +1 -1
- package/styles/components/pagination/pagination.css +1 -1
- package/styles/components/pagination/pagination.min.css +1 -1
- package/styles/components/popover/popover.css +12 -1
- package/styles/components/popover/popover.min.css +1 -1
- package/styles/components/popover/popover.scss +15 -1
- package/styles/components/progress-bar/progress-bar.css +27 -3
- package/styles/components/progress-bar/progress-bar.min.css +1 -1
- package/styles/components/progress-bar/progress-bar.scss +5 -0
- package/styles/components/radio-button/radio-button.css +41 -6
- package/styles/components/radio-button/radio-button.min.css +1 -1
- package/styles/components/radio-button/radio-button.scss +35 -16
- package/styles/components/radio-panel/radio-panel.css +22 -17
- package/styles/components/radio-panel/radio-panel.min.css +1 -1
- package/styles/components/radio-panel/radio-panel.scss +4 -0
- package/styles/components/search/search-with-submit-button.css +1 -1
- package/styles/components/search/search-with-submit-button.min.css +1 -1
- package/styles/components/search/search-with-submit-button.scss +1 -1
- package/styles/components/search/search.css +2 -2
- package/styles/components/search/search.min.css +1 -1
- package/styles/components/search/search.scss +1 -1
- package/styles/components/segmented-control/segmented-control.css +54 -19
- package/styles/components/segmented-control/segmented-control.min.css +1 -1
- package/styles/components/segmented-control/segmented-control.scss +4 -4
- package/styles/components/select/select.css +15 -15
- package/styles/components/select/select.min.css +1 -1
- package/styles/components/select/select.scss +12 -12
- package/styles/components/summary-table/summary-table.css +2 -2
- package/styles/components/summary-table/summary-table.min.css +1 -1
- package/styles/components/summary-table/summary-table.scss +2 -2
- package/styles/components/system-message/system-message.css +20 -10
- package/styles/components/system-message/system-message.min.css +1 -1
- package/styles/components/system-message/system-message.scss +17 -7
- package/styles/components/table/_table-head.scss +1 -1
- package/styles/components/table/_table-row.scss +2 -2
- package/styles/components/table/table.css +3 -3
- package/styles/components/table/table.min.css +1 -1
- package/styles/components/table-of-contents/table-of-contents.css +1 -1
- package/styles/components/table-of-contents/table-of-contents.min.css +1 -1
- package/styles/components/table-of-contents/table-of-contents.scss +1 -1
- package/styles/components/tabs/tabs.css +3 -3
- package/styles/components/tabs/tabs.min.css +1 -1
- package/styles/components/tabs/tabs.scss +2 -2
- package/styles/components/tag/tag.css +16 -6
- package/styles/components/tag/tag.min.css +1 -1
- package/styles/components/tag/tag.scss +16 -6
- package/styles/components/text-area/text-area.css +8 -8
- package/styles/components/text-area/text-area.min.css +1 -1
- package/styles/components/text-input/text-input.css +8 -8
- package/styles/components/text-input/text-input.min.css +1 -1
- package/styles/components/toast/toast.css +19 -12
- package/styles/components/toast/toast.min.css +1 -1
- package/styles/components/toast/toast.scss +15 -12
- package/styles/components/toggle-switch/_toggle-slider.scss +4 -4
- package/styles/components/toggle-switch/toggle-switch.css +14 -19
- package/styles/components/toggle-switch/toggle-switch.min.css +2 -2
- package/styles/components/toggle-switch/toggle-switch.scss +9 -16
- package/styles/components/tooltip/tooltip.css +3 -3
- package/styles/components/tooltip/tooltip.min.css +1 -1
- package/styles/components/tooltip/tooltip.scss +3 -3
- package/styles/components.css +536 -294
- package/styles/components.min.css +2 -2
- package/styles/core/jkl/_tokens.scss +59 -0
- package/styles/core/jkl/legacy/_dynamic-colors.scss +40 -0
- package/styles/core/jkl/legacy/_tokens.scss +742 -0
- package/styles/core/theme/_color-tokens.scss +73 -0
- package/styles/core/theme/_legacy-color-tokens.scss +81 -0
- package/styles/core/theme/_legacy-tokens.scss +279 -0
- package/styles/core/theme/_spacing-tokens.scss +33 -0
- package/styles/core/theme/_tokens.scss +33 -0
- package/styles/hooks/stories/styles.scss +2 -2
- package/styles/jkl/_ornaments.scss +1 -1
- package/styles/jkl/_tokens.scss +151 -71
- package/styles/shared/input/shared-input-styles.scss +6 -6
- package/styles/shared/track/track.scss +2 -2
- package/styles/tailwind.css +108 -66
- package/styles/theme/_color-scheme.scss +135 -66
- package/styles/theme/_index.scss +3 -0
- package/styles/theme/brands/dnb/_color-scheme.scss +119 -0
- package/styles/theme/brands/eika/_color-scheme.scss +119 -0
- package/styles/theme/brands/sparebank1/_color-scheme.scss +119 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
--padding-m: var(--jkl-unit-15);
|
|
8
8
|
--padding-l: var(--jkl-unit-20);
|
|
9
9
|
--padding-xl: var(--jkl-unit-30);
|
|
10
|
-
--border-radius:
|
|
10
|
+
--border-radius: var(--jkl-border-radius-m);
|
|
11
11
|
--border-color: transparent;
|
|
12
12
|
--border-width: #{jkl.rem(1px)};
|
|
13
13
|
--background-color: transparent;
|
|
@@ -56,23 +56,19 @@
|
|
|
56
56
|
--padding: var(--padding-xl);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
|
-
&--
|
|
60
|
-
--background-color: var(--jkl-color-background-container
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
&--low {
|
|
64
|
-
--background-color: var(--jkl-color-background-container-low);
|
|
59
|
+
&--filled {
|
|
60
|
+
--background-color: var(--jkl-color-background-container);
|
|
65
61
|
}
|
|
66
62
|
|
|
67
63
|
&--outlined {
|
|
68
|
-
--border-color: var(--jkl-color-border-
|
|
64
|
+
--border-color: var(--jkl-color-border-default);
|
|
69
65
|
}
|
|
70
66
|
|
|
71
67
|
&[data-clickable="true"] {
|
|
72
68
|
cursor: pointer;
|
|
73
69
|
|
|
74
70
|
&:hover {
|
|
75
|
-
--border-color: var(--jkl-color-border-
|
|
71
|
+
--border-color: var(--jkl-color-border-strong);
|
|
76
72
|
--border-width: #{jkl.rem(2px)};
|
|
77
73
|
}
|
|
78
74
|
|
|
@@ -102,4 +98,4 @@
|
|
|
102
98
|
margin-block: var(--margin, 0);
|
|
103
99
|
}
|
|
104
100
|
}
|
|
105
|
-
}
|
|
101
|
+
}
|
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
--jkl-checkbox-error-color: #ab2e43;
|
|
8
8
|
--jkl-checkbox-error-color: light-dark(#ab2e43, #d79ba5);
|
|
9
9
|
/* stylelint-enable declaration-block-no-duplicate-custom-properties */
|
|
10
|
-
--box-color: var(--jkl-color-border-
|
|
11
|
-
--check-color: var(--jkl-color-border-
|
|
10
|
+
--box-color: var(--jkl-color-border-strong);
|
|
11
|
+
--check-color: var(--jkl-color-border-strong);
|
|
12
12
|
--text-color: var(--jkl-color-text-default);
|
|
13
13
|
--background-color: transparent;
|
|
14
14
|
font: var(--jkl-text-style-text-medium);
|
|
@@ -19,10 +19,37 @@
|
|
|
19
19
|
}
|
|
20
20
|
.jkl-checkbox__input {
|
|
21
21
|
position: absolute;
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
inset-block-start: 0;
|
|
23
|
+
inset-inline-start: 0;
|
|
24
|
+
block-size: 1lh;
|
|
25
|
+
inline-size: 1lh;
|
|
26
|
+
margin: 0;
|
|
27
|
+
padding: 0;
|
|
28
|
+
cursor: pointer;
|
|
29
|
+
z-index: 1;
|
|
30
|
+
appearance: none;
|
|
31
|
+
background: transparent;
|
|
32
|
+
border: 0;
|
|
33
|
+
}
|
|
34
|
+
.jkl-checkbox__input {
|
|
35
|
+
outline: 0;
|
|
36
|
+
border-style: none;
|
|
37
|
+
outline-style: none;
|
|
38
|
+
}
|
|
39
|
+
.jkl-checkbox__input:active, .jkl-checkbox__input:hover, .jkl-checkbox__input:focus {
|
|
40
|
+
outline: 0;
|
|
41
|
+
outline-style: none;
|
|
42
|
+
}
|
|
43
|
+
@media screen and (forced-colors: active) {
|
|
44
|
+
.jkl-checkbox__input {
|
|
45
|
+
outline: revert;
|
|
46
|
+
border-style: revert;
|
|
47
|
+
outline-style: revert;
|
|
48
|
+
}
|
|
49
|
+
.jkl-checkbox__input:active, .jkl-checkbox__input:hover, .jkl-checkbox__input:focus {
|
|
50
|
+
outline: revert;
|
|
51
|
+
outline-style: revert;
|
|
52
|
+
}
|
|
26
53
|
}
|
|
27
54
|
.jkl-checkbox__label {
|
|
28
55
|
cursor: pointer;
|
|
@@ -48,15 +75,22 @@
|
|
|
48
75
|
transition-duration: var(--jkl-motion-timing-energetic);
|
|
49
76
|
transition-property: font-variation-settings, transform;
|
|
50
77
|
}
|
|
51
|
-
.jkl-
|
|
78
|
+
.jkl-checkbox__input:focus-visible + .jkl-checkbox__label::before {
|
|
79
|
+
outline: 3px solid var(--jkl-color-border-strong);
|
|
80
|
+
outline-offset: 3px;
|
|
81
|
+
}
|
|
82
|
+
.jkl-checkbox__input:is(:hover, :active) + .jkl-checkbox__label, .jkl-checkbox__label:hover, .jkl-checkbox__label:active {
|
|
83
|
+
--jkl-icon-weight: var(--jkl-font-weight-bold);
|
|
84
|
+
}
|
|
85
|
+
.jkl-checkbox__input:checked + .jkl-checkbox__label::before {
|
|
52
86
|
content: "check_box";
|
|
53
87
|
--jkl-icon-fill: 1;
|
|
54
88
|
}
|
|
55
|
-
.jkl-
|
|
89
|
+
.jkl-checkbox__input:indeterminate:not(:checked) + .jkl-checkbox__label::before {
|
|
56
90
|
content: "indeterminate_check_box";
|
|
57
91
|
--jkl-icon-fill: 1;
|
|
58
92
|
}
|
|
59
|
-
.jkl-
|
|
93
|
+
.jkl-checkbox__input[aria-invalid=true] + .jkl-checkbox__label::before {
|
|
60
94
|
color: var(--jkl-checkbox-error-color);
|
|
61
95
|
}
|
|
62
96
|
.jkl-checkbox + .jkl-checkbox {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer jokul.components{.jkl-checkbox{--jkl-checkbox-error-color:#ab2e43;--jkl-checkbox-error-color:light-dark(#ab2e43,#d79ba5);--box-color:var(--jkl-color-border-
|
|
1
|
+
@layer jokul.components{.jkl-checkbox{--jkl-checkbox-error-color:#ab2e43;--jkl-checkbox-error-color:light-dark(#ab2e43,#d79ba5);--box-color:var(--jkl-color-border-strong);--check-color:var(--jkl-color-border-strong);--text-color:var(--jkl-color-text-default);--background-color:transparent;color:var(--text-color);display:flex;flex-wrap:wrap;font:var(--jkl-text-style-text-medium);position:relative}.jkl-checkbox__input{-webkit-appearance:none;appearance:none;background:transparent;block-size:1lh;border:0;border-style:none;cursor:pointer;inline-size:1lh;inset-block-start:0;inset-inline-start:0;margin:0;outline:0;outline-style:none;padding:0;position:absolute;z-index:1}.jkl-checkbox__input:active,.jkl-checkbox__input:focus,.jkl-checkbox__input:hover{outline:0;outline-style:none}@media screen and (forced-colors:active){.jkl-checkbox__input{border-style:revert;outline:revert;outline-style:revert}.jkl-checkbox__input:active,.jkl-checkbox__input:focus,.jkl-checkbox__input:hover{outline:revert;outline-style:revert}}.jkl-checkbox__label{cursor:pointer;display:flex;font:var(--jkl-text-style-text-medium);transition-duration:var(--jkl-motion-timing-productive);transition-property:color;transition-timing-function:var(--jkl-motion-easing-standard)}.jkl-checkbox__label:before{content:"check_box_outline_blank";-webkit-margin-end:.25em;display:inline-block;font-family:Fremtind Material Symbols,Fremtind Material Symbols Fallback,sans-serif;font-feature-settings:"liga";-webkit-font-feature-settings:"liga";font-size:1.3em;font-variation-settings:"FILL" var(--jkl-icon-fill,0);font-weight:400;line-height:1;margin-inline-end:.25em;-webkit-font-smoothing:antialiased;transition-duration:var(--jkl-motion-timing-energetic);transition-property:font-variation-settings,transform;transition-timing-function:var(--jkl-motion-easing-standard)}.jkl-checkbox__input:focus-visible+.jkl-checkbox__label:before{outline:3px solid var(--jkl-color-border-strong);outline-offset:3px}.jkl-checkbox__input:is(:hover,:active)+.jkl-checkbox__label,.jkl-checkbox__label:active,.jkl-checkbox__label:hover{--jkl-icon-weight:var(--jkl-font-weight-bold)}.jkl-checkbox__input:checked+.jkl-checkbox__label:before{content:"check_box";--jkl-icon-fill:1}.jkl-checkbox__input:indeterminate:not(:checked)+.jkl-checkbox__label:before{content:"indeterminate_check_box";--jkl-icon-fill:1}.jkl-checkbox__input[aria-invalid=true]+.jkl-checkbox__label:before{color:var(--jkl-checkbox-error-color)}.jkl-checkbox+.jkl-checkbox{margin-top:.75em}.jkl-checkbox--inline{display:inline-flex}.jkl-checkbox--inline:not(:last-of-type){margin-right:var(--jkl-unit-30)}}
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
--jkl-checkbox-error-color: #ab2e43;
|
|
10
10
|
--jkl-checkbox-error-color: light-dark(#ab2e43, #d79ba5);
|
|
11
11
|
/* stylelint-enable declaration-block-no-duplicate-custom-properties */
|
|
12
|
-
--box-color: var(--jkl-color-border-
|
|
13
|
-
--check-color: var(--jkl-color-border-
|
|
12
|
+
--box-color: var(--jkl-color-border-strong);
|
|
13
|
+
--check-color: var(--jkl-color-border-strong);
|
|
14
14
|
--text-color: var(--jkl-color-text-default);
|
|
15
15
|
--background-color: transparent;
|
|
16
16
|
|
|
@@ -22,14 +22,21 @@
|
|
|
22
22
|
position: relative;
|
|
23
23
|
|
|
24
24
|
&__input {
|
|
25
|
-
//
|
|
25
|
+
// Keep the real input on top of the icon so automation tools can target it.
|
|
26
26
|
position: absolute;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
27
|
+
inset-block-start: 0;
|
|
28
|
+
inset-inline-start: 0;
|
|
29
|
+
block-size: 1lh;
|
|
30
|
+
inline-size: 1lh;
|
|
31
|
+
margin: 0;
|
|
32
|
+
padding: 0;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
z-index: 1;
|
|
35
|
+
appearance: none;
|
|
36
|
+
background: transparent;
|
|
37
|
+
border: 0;
|
|
38
|
+
|
|
39
|
+
@include jkl.reset-outline;
|
|
33
40
|
}
|
|
34
41
|
|
|
35
42
|
&__label {
|
|
@@ -47,22 +54,32 @@
|
|
|
47
54
|
|
|
48
55
|
@include icon.base-styles;
|
|
49
56
|
}
|
|
57
|
+
}
|
|
50
58
|
|
|
51
|
-
|
|
52
|
-
|
|
59
|
+
&__input:focus-visible + &__label::before {
|
|
60
|
+
@include jkl.focus-outline;
|
|
61
|
+
}
|
|
53
62
|
|
|
54
|
-
|
|
55
|
-
|
|
63
|
+
&__input:is(:hover, :active) + &__label,
|
|
64
|
+
&__label:hover,
|
|
65
|
+
&__label:active {
|
|
66
|
+
--jkl-icon-weight: #{jkl.$font-weight-bold};
|
|
67
|
+
}
|
|
56
68
|
|
|
57
|
-
|
|
58
|
-
|
|
69
|
+
&__input:checked + &__label::before {
|
|
70
|
+
content: "check_box";
|
|
59
71
|
|
|
60
|
-
|
|
61
|
-
|
|
72
|
+
--jkl-icon-fill: 1;
|
|
73
|
+
}
|
|
62
74
|
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
75
|
+
&__input:indeterminate:not(:checked) + &__label::before {
|
|
76
|
+
content: "indeterminate_check_box";
|
|
77
|
+
|
|
78
|
+
--jkl-icon-fill: 1;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
&__input[aria-invalid="true"] + &__label::before {
|
|
82
|
+
color: var(--jkl-checkbox-error-color);
|
|
66
83
|
}
|
|
67
84
|
|
|
68
85
|
& + & {
|
|
@@ -77,4 +94,4 @@
|
|
|
77
94
|
}
|
|
78
95
|
}
|
|
79
96
|
}
|
|
80
|
-
}
|
|
97
|
+
}
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
@layer jokul.components {
|
|
5
5
|
.jkl-input-panel {
|
|
6
|
-
--outer-border-color: var(--jkl-color-border-
|
|
6
|
+
--outer-border-color: var(--jkl-color-border-default);
|
|
7
7
|
--outer-border-thickness: 0.0625rem;
|
|
8
8
|
--background-color: transparent;
|
|
9
9
|
--padding-inline: var(--jkl-unit-25);
|
|
@@ -26,26 +26,28 @@
|
|
|
26
26
|
position: relative;
|
|
27
27
|
padding: var(--jkl-unit-20) var(--padding-inline);
|
|
28
28
|
}
|
|
29
|
+
.jkl-input-panel__header .jkl-radio-button,
|
|
30
|
+
.jkl-input-panel__header .jkl-checkbox {
|
|
31
|
+
grid-column: 1/-1;
|
|
32
|
+
grid-row: 1;
|
|
33
|
+
inline-size: 100%;
|
|
34
|
+
}
|
|
35
|
+
.jkl-input-panel__header label {
|
|
36
|
+
inline-size: 100%;
|
|
37
|
+
}
|
|
29
38
|
.jkl-input-panel__header__amount {
|
|
30
39
|
display: flex;
|
|
31
40
|
height: 100%;
|
|
32
41
|
align-items: center;
|
|
42
|
+
grid-column: 2;
|
|
43
|
+
grid-row: 1;
|
|
44
|
+
justify-self: end;
|
|
45
|
+
pointer-events: none;
|
|
46
|
+
position: relative;
|
|
47
|
+
z-index: 1;
|
|
33
48
|
font: var(--jkl-text-style-text-medium);
|
|
34
49
|
font-weight: var(--jkl-font-weight-bold);
|
|
35
50
|
}
|
|
36
|
-
.jkl-input-panel__header label,
|
|
37
|
-
.jkl-input-panel__header .jkl-radio-button,
|
|
38
|
-
.jkl-input-panel__header .jkl-checkbox {
|
|
39
|
-
position: unset;
|
|
40
|
-
}
|
|
41
|
-
.jkl-input-panel__header label::after {
|
|
42
|
-
content: "";
|
|
43
|
-
position: absolute;
|
|
44
|
-
top: 0;
|
|
45
|
-
left: 0;
|
|
46
|
-
inline-size: 100%;
|
|
47
|
-
block-size: 100%;
|
|
48
|
-
}
|
|
49
51
|
.jkl-input-panel__description {
|
|
50
52
|
height: 0;
|
|
51
53
|
overflow: hidden;
|
|
@@ -58,18 +60,18 @@
|
|
|
58
60
|
transition-property: height;
|
|
59
61
|
}
|
|
60
62
|
.jkl-input-panel:has(:focus-visible) {
|
|
61
|
-
outline: 3px solid var(--jkl-color-border-
|
|
63
|
+
outline: 3px solid var(--jkl-color-border-strong);
|
|
62
64
|
outline-offset: 3px;
|
|
63
65
|
}
|
|
64
66
|
.jkl-input-panel:has(:checked), .jkl-input-panel[data-always-open=true], .jkl-input-panel:not([data-always-open]) {
|
|
65
|
-
--background-color: var(--jkl-color-background-container
|
|
67
|
+
--background-color: var(--jkl-color-background-container);
|
|
66
68
|
}
|
|
67
69
|
.jkl-input-panel:has(:checked) .jkl-input-panel__description, .jkl-input-panel[data-always-open=true] .jkl-input-panel__description, .jkl-input-panel:not([data-always-open]) .jkl-input-panel__description {
|
|
68
70
|
height: auto;
|
|
69
71
|
padding-block-end: var(--jkl-unit-20);
|
|
70
72
|
}
|
|
71
73
|
.jkl-input-panel:has(input:hover) {
|
|
72
|
-
--outer-border-color: var(--jkl-color-border-
|
|
74
|
+
--outer-border-color: var(--jkl-color-border-default);
|
|
73
75
|
--outer-border-thickness: 0.125rem;
|
|
74
76
|
cursor: pointer;
|
|
75
77
|
}
|
|
@@ -80,8 +82,8 @@
|
|
|
80
82
|
--jkl-checkbox-error-color: #ab2e43;
|
|
81
83
|
--jkl-checkbox-error-color: light-dark(#ab2e43, #d79ba5);
|
|
82
84
|
/* stylelint-enable declaration-block-no-duplicate-custom-properties */
|
|
83
|
-
--box-color: var(--jkl-color-border-
|
|
84
|
-
--check-color: var(--jkl-color-border-
|
|
85
|
+
--box-color: var(--jkl-color-border-strong);
|
|
86
|
+
--check-color: var(--jkl-color-border-strong);
|
|
85
87
|
--text-color: var(--jkl-color-text-default);
|
|
86
88
|
--background-color: transparent;
|
|
87
89
|
font: var(--jkl-text-style-text-medium);
|
|
@@ -92,10 +94,37 @@
|
|
|
92
94
|
}
|
|
93
95
|
.jkl-checkbox__input {
|
|
94
96
|
position: absolute;
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
97
|
+
inset-block-start: 0;
|
|
98
|
+
inset-inline-start: 0;
|
|
99
|
+
block-size: 1lh;
|
|
100
|
+
inline-size: 1lh;
|
|
101
|
+
margin: 0;
|
|
102
|
+
padding: 0;
|
|
103
|
+
cursor: pointer;
|
|
104
|
+
z-index: 1;
|
|
105
|
+
appearance: none;
|
|
106
|
+
background: transparent;
|
|
107
|
+
border: 0;
|
|
108
|
+
}
|
|
109
|
+
.jkl-checkbox__input {
|
|
110
|
+
outline: 0;
|
|
111
|
+
border-style: none;
|
|
112
|
+
outline-style: none;
|
|
113
|
+
}
|
|
114
|
+
.jkl-checkbox__input:active, .jkl-checkbox__input:hover, .jkl-checkbox__input:focus {
|
|
115
|
+
outline: 0;
|
|
116
|
+
outline-style: none;
|
|
117
|
+
}
|
|
118
|
+
@media screen and (forced-colors: active) {
|
|
119
|
+
.jkl-checkbox__input {
|
|
120
|
+
outline: revert;
|
|
121
|
+
border-style: revert;
|
|
122
|
+
outline-style: revert;
|
|
123
|
+
}
|
|
124
|
+
.jkl-checkbox__input:active, .jkl-checkbox__input:hover, .jkl-checkbox__input:focus {
|
|
125
|
+
outline: revert;
|
|
126
|
+
outline-style: revert;
|
|
127
|
+
}
|
|
99
128
|
}
|
|
100
129
|
.jkl-checkbox__label {
|
|
101
130
|
cursor: pointer;
|
|
@@ -121,15 +150,22 @@
|
|
|
121
150
|
transition-duration: var(--jkl-motion-timing-energetic);
|
|
122
151
|
transition-property: font-variation-settings, transform;
|
|
123
152
|
}
|
|
124
|
-
.jkl-
|
|
153
|
+
.jkl-checkbox__input:focus-visible + .jkl-checkbox__label::before {
|
|
154
|
+
outline: 3px solid var(--jkl-color-border-strong);
|
|
155
|
+
outline-offset: 3px;
|
|
156
|
+
}
|
|
157
|
+
.jkl-checkbox__input:is(:hover, :active) + .jkl-checkbox__label, .jkl-checkbox__label:hover, .jkl-checkbox__label:active {
|
|
158
|
+
--jkl-icon-weight: var(--jkl-font-weight-bold);
|
|
159
|
+
}
|
|
160
|
+
.jkl-checkbox__input:checked + .jkl-checkbox__label::before {
|
|
125
161
|
content: "check_box";
|
|
126
162
|
--jkl-icon-fill: 1;
|
|
127
163
|
}
|
|
128
|
-
.jkl-
|
|
164
|
+
.jkl-checkbox__input:indeterminate:not(:checked) + .jkl-checkbox__label::before {
|
|
129
165
|
content: "indeterminate_check_box";
|
|
130
166
|
--jkl-icon-fill: 1;
|
|
131
167
|
}
|
|
132
|
-
.jkl-
|
|
168
|
+
.jkl-checkbox__input[aria-invalid=true] + .jkl-checkbox__label::before {
|
|
133
169
|
color: var(--jkl-checkbox-error-color);
|
|
134
170
|
}
|
|
135
171
|
.jkl-checkbox + .jkl-checkbox {
|
|
@@ -147,4 +183,7 @@
|
|
|
147
183
|
/* Visuell justering ettersom ikonet ikke fyller bounding box helt */
|
|
148
184
|
margin-inline-start: -0.1em;
|
|
149
185
|
}
|
|
186
|
+
.jkl-checkbox-panel .jkl-checkbox__input:focus-visible + .jkl-checkbox__label::before {
|
|
187
|
+
outline: none;
|
|
188
|
+
}
|
|
150
189
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer jokul.components{.jkl-input-panel{--outer-border-color:var(--jkl-color-border-
|
|
1
|
+
@layer jokul.components{.jkl-input-panel{--outer-border-color:var(--jkl-color-border-default);--outer-border-thickness:0.0625rem;--background-color:transparent;--padding-inline:var(--jkl-unit-25);background-color:var(--background-color);border-radius:var(--jkl-border-radius-s);box-shadow:inset 0 0 0 var(--outer-border-thickness) var(--outer-border-color);display:flex;flex-direction:column;interpolate-size:allow-keywords;transition-duration:var(--jkl-motion-timing-productive);transition-property:box-shadow;transition-timing-function:var(--jkl-motion-easing-standard)}.jkl-input-panel__header{align-items:center;cursor:pointer;display:grid;gap:.5rem;grid-template-columns:1fr -webkit-max-content;grid-template-columns:1fr max-content;padding:var(--jkl-unit-20) var(--padding-inline);position:relative}.jkl-input-panel__header .jkl-checkbox,.jkl-input-panel__header .jkl-radio-button{grid-column:1/-1;grid-row:1;inline-size:100%}.jkl-input-panel__header label{inline-size:100%}.jkl-input-panel__header__amount{align-items:center;display:flex;font:var(--jkl-text-style-text-medium);font-weight:var(--jkl-font-weight-bold);grid-column:2;grid-row:1;height:100%;justify-self:end;pointer-events:none;position:relative;z-index:1}.jkl-input-panel__description{height:0;overflow:hidden;padding-inline:var(--padding-inline);-webkit-padding-after:var(--jkl-spacing-none);line-height:normal;font:var(--jkl-text-style-paragraph-medium);padding-block-end:var(--jkl-spacing-none);transition-duration:var(--jkl-motion-timing-productive);transition-property:height;transition-timing-function:var(--jkl-motion-easing-standard)}.jkl-input-panel:has(:focus-visible){outline:3px solid var(--jkl-color-border-strong);outline-offset:3px}.jkl-input-panel:has(:checked),.jkl-input-panel:not([data-always-open]),.jkl-input-panel[data-always-open=true]{--background-color:var(--jkl-color-background-container)}.jkl-input-panel:has(:checked) .jkl-input-panel__description,.jkl-input-panel:not([data-always-open]) .jkl-input-panel__description,.jkl-input-panel[data-always-open=true] .jkl-input-panel__description{height:auto;-webkit-padding-after:var(--jkl-unit-20);padding-block-end:var(--jkl-unit-20)}.jkl-input-panel:has(input:hover){--outer-border-color:var(--jkl-color-border-default);--outer-border-thickness:0.125rem;cursor:pointer}}@layer jokul.components{.jkl-checkbox{--jkl-checkbox-error-color:#ab2e43;--jkl-checkbox-error-color:light-dark(#ab2e43,#d79ba5);--box-color:var(--jkl-color-border-strong);--check-color:var(--jkl-color-border-strong);--text-color:var(--jkl-color-text-default);--background-color:transparent;color:var(--text-color);display:flex;flex-wrap:wrap;font:var(--jkl-text-style-text-medium);position:relative}.jkl-checkbox__input{-webkit-appearance:none;appearance:none;background:transparent;block-size:1lh;border:0;border-style:none;cursor:pointer;inline-size:1lh;inset-block-start:0;inset-inline-start:0;margin:0;outline:0;outline-style:none;padding:0;position:absolute;z-index:1}.jkl-checkbox__input:active,.jkl-checkbox__input:focus,.jkl-checkbox__input:hover{outline:0;outline-style:none}@media screen and (forced-colors:active){.jkl-checkbox__input{border-style:revert;outline:revert;outline-style:revert}.jkl-checkbox__input:active,.jkl-checkbox__input:focus,.jkl-checkbox__input:hover{outline:revert;outline-style:revert}}.jkl-checkbox__label{cursor:pointer;display:flex;font:var(--jkl-text-style-text-medium);transition-duration:var(--jkl-motion-timing-productive);transition-property:color;transition-timing-function:var(--jkl-motion-easing-standard)}.jkl-checkbox__label:before{content:"check_box_outline_blank";-webkit-margin-end:.25em;display:inline-block;font-family:Fremtind Material Symbols,Fremtind Material Symbols Fallback,sans-serif;font-feature-settings:"liga";-webkit-font-feature-settings:"liga";font-size:1.3em;font-variation-settings:"FILL" var(--jkl-icon-fill,0);font-weight:400;line-height:1;margin-inline-end:.25em;-webkit-font-smoothing:antialiased;transition-duration:var(--jkl-motion-timing-energetic);transition-property:font-variation-settings,transform;transition-timing-function:var(--jkl-motion-easing-standard)}.jkl-checkbox__input:focus-visible+.jkl-checkbox__label:before{outline:3px solid var(--jkl-color-border-strong);outline-offset:3px}.jkl-checkbox__input:is(:hover,:active)+.jkl-checkbox__label,.jkl-checkbox__label:active,.jkl-checkbox__label:hover{--jkl-icon-weight:var(--jkl-font-weight-bold)}.jkl-checkbox__input:checked+.jkl-checkbox__label:before{content:"check_box";--jkl-icon-fill:1}.jkl-checkbox__input:indeterminate:not(:checked)+.jkl-checkbox__label:before{content:"indeterminate_check_box";--jkl-icon-fill:1}.jkl-checkbox__input[aria-invalid=true]+.jkl-checkbox__label:before{color:var(--jkl-checkbox-error-color)}.jkl-checkbox+.jkl-checkbox{margin-top:.75em}.jkl-checkbox--inline{display:inline-flex}.jkl-checkbox--inline:not(:last-of-type){margin-right:var(--jkl-unit-30)}}@layer jokul.components{.jkl-checkbox-panel .jkl-checkbox{-webkit-margin-start:-.1em;margin-inline-start:-.1em}.jkl-checkbox-panel .jkl-checkbox__input:focus-visible+.jkl-checkbox__label:before{outline:none}}
|
|
@@ -10,4 +10,8 @@ $_checkbox-checked-animation-name: jkl-checkbox-checked-#{string.unique-id()};
|
|
|
10
10
|
/* Visuell justering ettersom ikonet ikke fyller bounding box helt */
|
|
11
11
|
margin-inline-start: -0.1em;
|
|
12
12
|
}
|
|
13
|
+
|
|
14
|
+
.jkl-checkbox-panel .jkl-checkbox__input:focus-visible + .jkl-checkbox__label::before {
|
|
15
|
+
outline: none;
|
|
16
|
+
}
|
|
13
17
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
--height: var(--jkl-unit-40);
|
|
8
8
|
--gap: var(--jkl-unit-05);
|
|
9
9
|
--text-color: var(--jkl-color-text-default);
|
|
10
|
-
--border-color: var(--jkl-color-border-
|
|
10
|
+
--border-color: var(--jkl-color-border-subdued);
|
|
11
11
|
--background-color: transparent;
|
|
12
12
|
--border-width: 0.0625rem;
|
|
13
13
|
font: var(--jkl-text-style-text-small);
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
transition-property: opacity;
|
|
45
45
|
}
|
|
46
46
|
.jkl-chip:focus-visible {
|
|
47
|
-
outline: 3px solid var(--jkl-color-border-
|
|
47
|
+
outline: 3px solid var(--jkl-color-border-strong);
|
|
48
48
|
outline-offset: 3px;
|
|
49
49
|
}
|
|
50
50
|
.jkl-chip:hover::after {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.jkl-chip{--padding-inline:var(--jkl-unit-15);--padding-icon:var(--jkl-unit-10);--height:var(--jkl-unit-40);--gap:var(--jkl-unit-05);--text-color:var(--jkl-color-text-default);--border-color:var(--jkl-color-border-
|
|
1
|
+
.jkl-chip{--padding-inline:var(--jkl-unit-15);--padding-icon:var(--jkl-unit-10);--height:var(--jkl-unit-40);--gap:var(--jkl-unit-05);--text-color:var(--jkl-color-text-default);--border-color:var(--jkl-color-border-subdued);--background-color:transparent;--border-width:0.0625rem;align-items:center;background-color:var(--background-color);border:var(--border-width) solid var(--border-color);border-radius:99999px;color:var(--text-color);cursor:pointer;display:inline-flex;font:var(--jkl-text-style-text-small);font-weight:var(--jkl-font-weight-bold);gap:var(--gap);min-height:var(--height);padding:0 var(--padding-inline);position:relative;text-align:initial;white-space:nowrap}@media screen and (forced-colors:active){.jkl-chip{border:2px CanvasText;border-style:none none dotted}}.jkl-chip:after{background-color:var(--text-color);border-radius:inherit;content:"";inset:0;opacity:0;position:absolute;transition-duration:var(--jkl-motion-timing-productive);transition-property:opacity;transition-timing-function:var(--jkl-motion-easing-standard)}.jkl-chip:focus-visible{outline:3px solid var(--jkl-color-border-strong);outline-offset:3px}.jkl-chip:hover:after{opacity:.15}.jkl-chip--filter[aria-pressed=true]{--background-color:var(--jkl-color-background-action);--text-color:var(--jkl-color-text-on-action);--border-color:var(--text-color)}@media screen and (forced-colors:active){.jkl-chip--filter[aria-pressed=true]{forced-color-adjust:none;--background-color:CanvasText;--text-color:Canvas}}.jkl-chip:has(.jkl-icon){-webkit-padding-end:var(--padding-icon);padding-inline-end:var(--padding-icon)}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
--height: var(--jkl-unit-40);
|
|
8
8
|
--gap: var(--jkl-unit-05);
|
|
9
9
|
--text-color: var(--jkl-color-text-default);
|
|
10
|
-
--border-color: var(--jkl-color-border-
|
|
10
|
+
--border-color: var(--jkl-color-border-subdued);
|
|
11
11
|
--background-color: transparent;
|
|
12
12
|
--border-width: #{jkl.rem(1px)};
|
|
13
13
|
|
|
@@ -63,8 +63,8 @@
|
|
|
63
63
|
--jkl-text-input-action-button-padding: var(--jkl-unit-10) 0;
|
|
64
64
|
--jkl-text-input-action-button-focus-position: var(--jkl-unit-05);
|
|
65
65
|
--text-color: var(--jkl-color-text-default);
|
|
66
|
-
--background-color:
|
|
67
|
-
--border-color: var(--jkl-color-border-
|
|
66
|
+
--background-color: transparent;
|
|
67
|
+
--border-color: var(--jkl-color-border-default);
|
|
68
68
|
--placeholder-color: var(--jkl-color-text-subdued);
|
|
69
69
|
border-radius: var(--jkl-border-radius-s);
|
|
70
70
|
box-sizing: border-box;
|
|
@@ -81,15 +81,15 @@
|
|
|
81
81
|
box-shadow: inset 0 0 0 0.0625rem var(--border-color), 0 0 0 0.0625rem transparent;
|
|
82
82
|
}
|
|
83
83
|
.jkl-combobox__wrapper:focus-within, .jkl-combobox__wrapper:has([data-focused=true]) {
|
|
84
|
-
--background-color: var(--jkl-color-background-
|
|
84
|
+
--background-color: var(--jkl-color-background-container);
|
|
85
85
|
}
|
|
86
86
|
.jkl-combobox__wrapper[data-invalid=true]:not(:focus-within):not(:has([data-focused=true])) {
|
|
87
|
-
--background-color: var(--jkl-color-background-
|
|
88
|
-
--text-color: var(--jkl-color-text-
|
|
87
|
+
--background-color: var(--jkl-color-error-background-container);
|
|
88
|
+
--text-color: var(--jkl-color-error-text-default);
|
|
89
89
|
--placeholder-color: color(from currentColor sRGB r g b / 75%);
|
|
90
90
|
}
|
|
91
91
|
.jkl-combobox__wrapper:hover, .jkl-combobox__wrapper:focus-within, .jkl-combobox__wrapper:has([data-focused=true]) {
|
|
92
|
-
--border-color: var(--jkl-color-border-
|
|
92
|
+
--border-color: var(--jkl-color-border-strong);
|
|
93
93
|
box-shadow: inset 0 0 0 0.0625rem var(--border-color), 0 0 0 0.0625rem var(--border-color);
|
|
94
94
|
}
|
|
95
95
|
@media screen and (forced-colors: active) {
|
|
@@ -98,11 +98,11 @@
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
html:not([data-mousenavigation]):not([data-touchnavigation]) .jkl-combobox__wrapper:has(.jkl-text-input__input:focus-visible), html:not([data-mousenavigation]):not([data-touchnavigation]) .jkl-combobox__wrapper:has(.jkl-text-area__text-area:focus-visible) {
|
|
101
|
-
outline: 3px solid var(--jkl-color-border-
|
|
101
|
+
outline: 3px solid var(--jkl-color-border-strong);
|
|
102
102
|
outline-offset: 3px;
|
|
103
103
|
}
|
|
104
104
|
.jkl-combobox__wrapper > .jkl-icon-button:focus-visible {
|
|
105
|
-
outline: 3px solid var(--jkl-color-border-
|
|
105
|
+
outline: 3px solid var(--jkl-color-border-strong);
|
|
106
106
|
outline-offset: -8px;
|
|
107
107
|
}
|
|
108
108
|
@media screen and (forced-colors: active) {
|
|
@@ -145,9 +145,9 @@
|
|
|
145
145
|
padding: 0.46875rem;
|
|
146
146
|
}
|
|
147
147
|
html:not([data-mousenavigation]):not([data-touchnavigation]) .jkl-combobox__wrapper:has(:focus-visible) {
|
|
148
|
-
outline: 3px solid var(--jkl-color-border-
|
|
148
|
+
outline: 3px solid var(--jkl-color-border-strong);
|
|
149
149
|
outline-offset: 3px;
|
|
150
|
-
background-color: var(--jkl-color-background-
|
|
150
|
+
background-color: var(--jkl-color-background-container);
|
|
151
151
|
}
|
|
152
152
|
.jkl-combobox__wrapper:has(.jkl-icon-button:focus-visible) {
|
|
153
153
|
outline: none;
|
|
@@ -160,6 +160,7 @@
|
|
|
160
160
|
outline: none;
|
|
161
161
|
padding: 0;
|
|
162
162
|
flex: 1 1 1ch;
|
|
163
|
+
min-width: 0;
|
|
163
164
|
max-height: var(--jkl-combobox-search-input-height);
|
|
164
165
|
background: none;
|
|
165
166
|
-webkit-appearance: none;
|
|
@@ -233,8 +234,8 @@
|
|
|
233
234
|
z-index: 7000;
|
|
234
235
|
left: -0.0625rem;
|
|
235
236
|
right: -0.0625rem;
|
|
236
|
-
background-color: var(--jkl-color-background-container
|
|
237
|
-
border: 0.125rem solid var(--jkl-color-border-
|
|
237
|
+
background-color: var(--jkl-color-background-container);
|
|
238
|
+
border: 0.125rem solid var(--jkl-color-border-strong);
|
|
238
239
|
border-radius: 0 0 0.1875rem 0.1875rem;
|
|
239
240
|
box-sizing: border-box;
|
|
240
241
|
max-height: calc((var(--jkl-combobox-max-shown-options, 5) + 0.5) * var(--jkl-combobox-input-height));
|
|
@@ -272,10 +273,12 @@
|
|
|
272
273
|
}
|
|
273
274
|
.jkl-combobox__chips {
|
|
274
275
|
display: flex;
|
|
276
|
+
flex: 1 1 auto;
|
|
275
277
|
flex-wrap: wrap;
|
|
276
278
|
align-items: center;
|
|
277
279
|
gap: var(--jkl-combobox-chips-gap);
|
|
278
|
-
width:
|
|
280
|
+
min-width: 0;
|
|
281
|
+
box-sizing: border-box;
|
|
279
282
|
padding: var(--jkl-text-input-padding);
|
|
280
283
|
}
|
|
281
284
|
.jkl-combobox__chips .jkl-chip {
|
|
@@ -286,12 +289,12 @@
|
|
|
286
289
|
}
|
|
287
290
|
.jkl-combobox--invalid .jkl-combobox__search-input,
|
|
288
291
|
.jkl-combobox--invalid .jkl-combobox__wrapper {
|
|
289
|
-
background-color: var(--jkl-color-background-
|
|
292
|
+
background-color: var(--jkl-color-error-background-container);
|
|
290
293
|
}
|
|
291
294
|
.jkl-combobox--invalid .jkl-combobox__search-input,
|
|
292
295
|
.jkl-combobox--invalid .jkl-combobox__button,
|
|
293
296
|
.jkl-combobox--invalid .jkl-combobox__wrapper {
|
|
294
|
-
color: var(--jkl-color-text-
|
|
297
|
+
color: var(--jkl-color-error-text-default);
|
|
295
298
|
}
|
|
296
299
|
.jkl-combobox--menu-closed .jkl-combobox__search-input {
|
|
297
300
|
position: absolute;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
@layer jokul.components{.jkl-combobox{--jkl-combobox-button-padding:var(--jkl-unit-10);--jkl-combobox-button-active-value-padding:var(--jkl-unit-10) var(--jkl-unit-05) var(--jkl-unit-5) var(--jkl-unit-10);--jkl-combobox-input-height:3rem;--jkl-combobox-actions-right:var(--jkl-unit-10);--jkl-combobox-actions-top:var(--jkl-unit-05);--jkl-combobox-chips-gap:var(--jkl-unit-05);--jkl-combobox-search-input-padding:var(--jkl-combobox-button-padding);--jkl-combobox-native-padding:0 var(--jkl-unit-50) 0 var(--jkl-unit-10);--jkl-combobox-option-padding:var(--jkl-unit-10) var(--jkl-unit-15);--jkl-combobox-option-line-height:2rem;--jkl-combobox-search-input-height:1.75rem}@media (width >= 0) and (max-width:679px){.jkl-combobox{--jkl-combobox-input-height:2.75rem}}.jkl-combobox{border-style:none;outline:0;outline-style:none;position:relative}.jkl-combobox:active,.jkl-combobox:focus,.jkl-combobox:hover{outline:0;outline-style:none}@media screen and (forced-colors:active){.jkl-combobox{border-style:revert;outline:revert;outline-style:revert}.jkl-combobox:active,.jkl-combobox:focus,.jkl-combobox:hover{outline:revert;outline-style:revert}}.jkl-combobox .jkl-combobox__option:focus{outline:none}.jkl-combobox__wrapper{cursor:pointer;gap:1ch;--jkl-text-input-padding:var(--jkl-text-input-vertical-padding) var(--jkl-text-input-horizontal-padding);--jkl-text-input-vertical-padding:var(--jkl-unit-15);--jkl-text-input-horizontal-padding:var(--jkl-unit-15);--jkl-text-input-action-button-size:var(--jkl-unit-60);--jkl-text-input-action-button-icon-size:var(--jkl-unit-30);--jkl-text-input-action-button-padding:var(--jkl-unit-10) 0;--jkl-text-input-action-button-focus-position:var(--jkl-unit-05);--text-color:var(--jkl-color-text-default);--background-color:
|
|
1
|
+
@layer jokul.components{.jkl-combobox{--jkl-combobox-button-padding:var(--jkl-unit-10);--jkl-combobox-button-active-value-padding:var(--jkl-unit-10) var(--jkl-unit-05) var(--jkl-unit-5) var(--jkl-unit-10);--jkl-combobox-input-height:3rem;--jkl-combobox-actions-right:var(--jkl-unit-10);--jkl-combobox-actions-top:var(--jkl-unit-05);--jkl-combobox-chips-gap:var(--jkl-unit-05);--jkl-combobox-search-input-padding:var(--jkl-combobox-button-padding);--jkl-combobox-native-padding:0 var(--jkl-unit-50) 0 var(--jkl-unit-10);--jkl-combobox-option-padding:var(--jkl-unit-10) var(--jkl-unit-15);--jkl-combobox-option-line-height:2rem;--jkl-combobox-search-input-height:1.75rem}@media (width >= 0) and (max-width:679px){.jkl-combobox{--jkl-combobox-input-height:2.75rem}}.jkl-combobox{border-style:none;outline:0;outline-style:none;position:relative}.jkl-combobox:active,.jkl-combobox:focus,.jkl-combobox:hover{outline:0;outline-style:none}@media screen and (forced-colors:active){.jkl-combobox{border-style:revert;outline:revert;outline-style:revert}.jkl-combobox:active,.jkl-combobox:focus,.jkl-combobox:hover{outline:revert;outline-style:revert}}.jkl-combobox .jkl-combobox__option:focus{outline:none}.jkl-combobox__wrapper{cursor:pointer;gap:1ch;--jkl-text-input-padding:var(--jkl-text-input-vertical-padding) var(--jkl-text-input-horizontal-padding);--jkl-text-input-vertical-padding:var(--jkl-unit-15);--jkl-text-input-horizontal-padding:var(--jkl-unit-15);--jkl-text-input-action-button-size:var(--jkl-unit-60);--jkl-text-input-action-button-icon-size:var(--jkl-unit-30);--jkl-text-input-action-button-padding:var(--jkl-unit-10) 0;--jkl-text-input-action-button-focus-position:var(--jkl-unit-05);--text-color:var(--jkl-color-text-default);--background-color:transparent;--border-color:var(--jkl-color-border-default);--placeholder-color:var(--jkl-color-text-subdued);align-items:center;background-color:var(--background-color);border-radius:var(--jkl-border-radius-s);box-shadow:inset 0 0 0 .0625rem var(--border-color),0 0 0 .0625rem transparent;box-sizing:border-box;color:var(--text-color);display:flex;font:var(--jkl-text-style-text-medium);max-width:100%;position:relative;transition-duration:var(--jkl-motion-timing-productive);transition-property:color,box-shadow,background-color;transition-timing-function:var(--jkl-motion-easing-standard)}.jkl-combobox__wrapper:focus-within,.jkl-combobox__wrapper:has([data-focused=true]){--background-color:var(--jkl-color-background-container)}.jkl-combobox__wrapper[data-invalid=true]:not(:focus-within):not(:has([data-focused=true])){--background-color:var(--jkl-color-error-background-container);--text-color:var(--jkl-color-error-text-default);--placeholder-color:color(from currentColor sRGB r g b/75%)}.jkl-combobox__wrapper:focus-within,.jkl-combobox__wrapper:has([data-focused=true]),.jkl-combobox__wrapper:hover{--border-color:var(--jkl-color-border-strong);box-shadow:inset 0 0 0 .0625rem var(--border-color),0 0 0 .0625rem var(--border-color)}@media screen and (forced-colors:active){.jkl-combobox__wrapper:focus-within,.jkl-combobox__wrapper:has([data-focused=true]),.jkl-combobox__wrapper:hover{border:.125rem solid ButtonText}}html:not([data-mousenavigation]):not([data-touchnavigation]) .jkl-combobox__wrapper:has(.jkl-text-area__text-area:focus-visible),html:not([data-mousenavigation]):not([data-touchnavigation]) .jkl-combobox__wrapper:has(.jkl-text-input__input:focus-visible){outline:3px solid var(--jkl-color-border-strong);outline-offset:3px}.jkl-combobox__wrapper>.jkl-icon-button:focus-visible{outline:3px solid var(--jkl-color-border-strong);outline-offset:-8px}@media screen and (forced-colors:active){.jkl-combobox__wrapper>.jkl-icon-button:focus-visible{--border-color:ButtonText}}.jkl-combobox__wrapper>.jkl-text-input-action-button{align-items:center;box-sizing:border-box;display:flex;flex-shrink:0;height:var(--jkl-text-input-action-button-size);justify-content:center;padding:var(--jkl-text-input-action-button-padding);width:var(--jkl-text-input-action-button-size);-webkit-margin-start:calc(var(--jkl-text-input-horizontal-padding)*-1);margin-inline-start:calc(var(--jkl-text-input-horizontal-padding)*-1)}.jkl-combobox__wrapper>.jkl-text-input-action-button .jkl-icon-button__icon{height:var(--jkl-text-input-action-button-icon-size);width:var(--jkl-text-input-action-button-icon-size)}.jkl-combobox__wrapper>.jkl-text-input-action-button:hover{color:var(--jkl-color-text-interactive-hover)}@media screen and (forced-colors:active){.jkl-combobox__wrapper>.jkl-text-input-action-button:hover{border:.125rem inset ButtonText}}@media screen and (forced-colors:active){.jkl-combobox__wrapper{border:.125rem inset ButtonText}}.jkl-combobox__wrapper--active-value .jkl-combobox__chips{padding:.46875rem}html:not([data-mousenavigation]):not([data-touchnavigation]) .jkl-combobox__wrapper:has(:focus-visible){background-color:var(--jkl-color-background-container);outline:3px solid var(--jkl-color-border-strong);outline-offset:3px}.jkl-combobox__wrapper:has(.jkl-icon-button:focus-visible){outline:none}.jkl-combobox__wrapper:hover~.jkl-combobox__arrow{transform:translateY(calc(-50% + .1875rem))}.jkl-combobox__search-input{-webkit-appearance:none;background:none;border:none;border-style:none;color:inherit;flex:1 1 1ch;font:var(--jkl-text-style-text-medium);max-height:var(--jkl-combobox-search-input-height);min-width:0;outline:none;outline:0;outline-style:none;padding:0}.jkl-combobox__search-input:active,.jkl-combobox__search-input:focus,.jkl-combobox__search-input:hover{outline:0;outline-style:none}@media screen and (forced-colors:active){.jkl-combobox__search-input{border-style:revert;outline:revert;outline-style:revert}.jkl-combobox__search-input:active,.jkl-combobox__search-input:focus,.jkl-combobox__search-input:hover{outline:revert;outline-style:revert}}.jkl-combobox__search-input input[type=number]::-webkit-inner-spin-button,.jkl-combobox__search-input input[type=number]::-webkit-outer-spin-button{-webkit-appearance:none}.jkl-combobox__search-input input[type=number]{-moz-appearance:textfield}@media screen and (forced-colors:active){.jkl-combobox__search-input{border:none;outline:none}.jkl-combobox__search-input:focus-visible{outline:none}}.jkl-combobox__search-input::placeholder{color:var(--placeholder-color);opacity:1}.jkl-combobox__arrow{pointer-events:none;transform:translateY(-50%);transition-duration:var(--jkl-motion-timing-productive);transition-property:transform,color;transition-timing-function:var(--jkl-motion-easing-standard)}@media screen and (forced-colors:active){.jkl-combobox__arrow,.jkl-combobox__arrow path,.jkl-combobox__arrow svg{fill:CanvasText;stroke:CanvasText}}.jkl-combobox__menu{background-color:var(--jkl-color-background-container);border:.125rem solid var(--jkl-color-border-strong);border-radius:0 0 .1875rem .1875rem;box-sizing:border-box;left:-.0625rem;max-height:calc((var(--jkl-combobox-max-shown-options, 5) + .5)*var(--jkl-combobox-input-height));overflow-y:auto;position:absolute;right:-.0625rem;top:calc(100% - 1px);transition-duration:var(--jkl-motion-timing-productive);transition-property:height;transition-timing-function:var(--jkl-motion-easing-standard);z-index:7000}.jkl-combobox__option{align-items:center;background-color:var(--jkl-color-background-interactive);border:0;color:var(--jkl-color-text-default);cursor:pointer;display:flex;font:var(--jkl-text-style-text-small);line-height:var(--jkl-combobox-option-line-height);padding:var(--jkl-combobox-option-padding);text-align:left;transition-duration:var(--jkl-motion-timing-productive);transition-property:color,background-color;transition-timing-function:var(--jkl-motion-easing-standard);width:100%}.jkl-combobox__option:focus,.jkl-combobox__option:hover{background-color:var(--jkl-color-background-interactive-hover)}.jkl-combobox__option-description{color:var(--jkl-color-text-subdued);display:block;font:var(--jkl-text-style-text-small);width:100%}.jkl-combobox__option--selected{justify-content:space-between}.jkl-combobox__no-option{padding:var(--jkl-combobox-option-padding)}.jkl-combobox__chips{align-items:center;box-sizing:border-box;display:flex;flex:1 1 auto;flex-wrap:wrap;gap:var(--jkl-combobox-chips-gap);min-width:0;padding:var(--jkl-text-input-padding)}.jkl-combobox__chips .jkl-chip{white-space:break-spaces}.jkl-combobox__chips .jkl-chip .jkl-tooltip-trigger{font-weight:700}.jkl-combobox--invalid .jkl-combobox__search-input,.jkl-combobox--invalid .jkl-combobox__wrapper{background-color:var(--jkl-color-error-background-container)}.jkl-combobox--invalid .jkl-combobox__button,.jkl-combobox--invalid .jkl-combobox__search-input,.jkl-combobox--invalid .jkl-combobox__wrapper{color:var(--jkl-color-error-text-default)}.jkl-combobox--menu-closed .jkl-combobox__search-input{background-color:transparent;padding-right:0;position:absolute;width:94%}.jkl-combobox--menu-open .jkl-combobox__wrapper{border-bottom-left-radius:0;border-bottom-right-radius:0}.jkl-combobox--menu-open .jkl-combobox__wrapper:hover .jkl-combobox__actions{transform:translateY(-.1875rem)}.jkl-combobox--menu-open .jkl-combobox__search-input{cursor:text}}
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
@include jkl.keyboard-navigation {
|
|
48
48
|
&:has(:focus-visible) {
|
|
49
49
|
@include jkl.focus-outline;
|
|
50
|
-
background-color: var(--jkl-color-background-
|
|
50
|
+
background-color: var(--jkl-color-background-container);
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
|
|
@@ -65,6 +65,7 @@
|
|
|
65
65
|
outline: none;
|
|
66
66
|
padding: 0;
|
|
67
67
|
flex: 1 1 1ch;
|
|
68
|
+
min-width: 0;
|
|
68
69
|
max-height: var(--jkl-combobox-search-input-height);
|
|
69
70
|
|
|
70
71
|
@include shared.input-styles;
|
|
@@ -92,8 +93,8 @@
|
|
|
92
93
|
z-index: jkl.$z-index--dropdown;
|
|
93
94
|
left: jkl.rem(-1px);
|
|
94
95
|
right: jkl.rem(-1px);
|
|
95
|
-
background-color: var(--jkl-color-background-container
|
|
96
|
-
border: jkl.rem(2px) solid var(--jkl-color-border-
|
|
96
|
+
background-color: var(--jkl-color-background-container);
|
|
97
|
+
border: jkl.rem(2px) solid var(--jkl-color-border-strong);
|
|
97
98
|
border-radius: 0 0 jkl.rem(3px) jkl.rem(3px);
|
|
98
99
|
box-sizing: border-box;
|
|
99
100
|
max-height: calc(
|
|
@@ -140,10 +141,12 @@
|
|
|
140
141
|
|
|
141
142
|
&__chips {
|
|
142
143
|
display: flex;
|
|
144
|
+
flex: 1 1 auto;
|
|
143
145
|
flex-wrap: wrap;
|
|
144
146
|
align-items: center;
|
|
145
147
|
gap: var(--jkl-combobox-chips-gap);
|
|
146
|
-
width:
|
|
148
|
+
min-width: 0;
|
|
149
|
+
box-sizing: border-box;
|
|
147
150
|
padding: var(--jkl-text-input-padding);
|
|
148
151
|
|
|
149
152
|
.jkl-chip {
|
|
@@ -158,13 +161,13 @@
|
|
|
158
161
|
&--invalid {
|
|
159
162
|
.jkl-combobox__search-input,
|
|
160
163
|
.jkl-combobox__wrapper {
|
|
161
|
-
background-color: var(--jkl-color-background-
|
|
164
|
+
background-color: var(--jkl-color-error-background-container);
|
|
162
165
|
}
|
|
163
166
|
|
|
164
167
|
.jkl-combobox__search-input,
|
|
165
168
|
.jkl-combobox__button,
|
|
166
169
|
.jkl-combobox__wrapper {
|
|
167
|
-
color: var(--jkl-color-text-
|
|
170
|
+
color: var(--jkl-color-error-text-default);
|
|
168
171
|
}
|
|
169
172
|
}
|
|
170
173
|
|