@fremtind/jokul 3.6.0 → 3.7.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.
Files changed (271) hide show
  1. package/README.md +15 -2
  2. package/build/build-stats.html +1 -1
  3. package/build/cjs/components/menu/Menu.cjs +1 -1
  4. package/build/cjs/components/menu/Menu.cjs.map +1 -1
  5. package/build/cjs/components/text-input/BaseTextInput.cjs +1 -1
  6. package/build/cjs/components/text-input/BaseTextInput.cjs.map +1 -1
  7. package/build/cjs/core/tokens/style-dictionary/build.cjs +1 -1
  8. package/build/cjs/core/tokens/style-dictionary/build.cjs.map +1 -1
  9. package/build/cjs/core/tokens.cjs +1 -1
  10. package/build/cjs/core/tokens.cjs.map +1 -1
  11. package/build/cjs/core/tokens.d.cts +114 -0
  12. package/build/cjs/tailwind/plugins/jokulTypographyPlugin.cjs +1 -1
  13. package/build/cjs/tailwind/plugins/jokulTypographyPlugin.cjs.map +1 -1
  14. package/build/es/components/menu/Menu.js +1 -1
  15. package/build/es/components/menu/Menu.js.map +1 -1
  16. package/build/es/components/text-input/BaseTextInput.js +1 -1
  17. package/build/es/components/text-input/BaseTextInput.js.map +1 -1
  18. package/build/es/core/tokens/style-dictionary/build.js +1 -1
  19. package/build/es/core/tokens/style-dictionary/build.js.map +1 -1
  20. package/build/es/core/tokens.d.ts +114 -0
  21. package/build/es/core/tokens.js +1 -1
  22. package/build/es/core/tokens.js.map +1 -1
  23. package/build/es/tailwind/plugins/jokulTypographyPlugin.js +1 -1
  24. package/build/es/tailwind/plugins/jokulTypographyPlugin.js.map +1 -1
  25. package/package.json +4 -2
  26. package/styles/components/autosuggest/_index.scss +2 -0
  27. package/styles/components/autosuggest/autosuggest.scss +87 -0
  28. package/styles/components/breadcrumb/_index.scss +2 -0
  29. package/styles/components/breadcrumb/breadcrumb.scss +38 -0
  30. package/styles/components/button/_index.scss +2 -0
  31. package/styles/components/button/button.scss +169 -0
  32. package/styles/components/card/_index.scss +3 -0
  33. package/styles/components/card/card.scss +105 -0
  34. package/styles/components/checkbox/_index.scss +1 -0
  35. package/styles/components/checkbox/checkbox.css +4 -4
  36. package/styles/components/checkbox/checkbox.min.css +1 -1
  37. package/styles/components/checkbox/checkbox.scss +248 -0
  38. package/styles/components/checkbox-panel/_index.scss +1 -0
  39. package/styles/components/checkbox-panel/checkbox-panel.css +6 -6
  40. package/styles/components/checkbox-panel/checkbox-panel.min.css +1 -1
  41. package/styles/components/checkbox-panel/checkbox-panel.scss +95 -0
  42. package/styles/components/checkbox-panel/development/styles.scss +27 -0
  43. package/styles/components/chip/_index.scss +2 -0
  44. package/styles/components/chip/chip.scss +104 -0
  45. package/styles/components/combobox/_index.scss +6 -0
  46. package/styles/components/combobox/combobox.scss +238 -0
  47. package/styles/components/cookie-consent/_index.scss +5 -0
  48. package/styles/components/cookie-consent/cookie-consent.scss +31 -0
  49. package/styles/components/countdown/_index.scss +1 -0
  50. package/styles/components/countdown/countdown.css +2 -2
  51. package/styles/components/countdown/countdown.min.css +1 -1
  52. package/styles/components/countdown/countdown.scss +25 -0
  53. package/styles/components/datepicker/_calendar-date-button.scss +85 -0
  54. package/styles/components/datepicker/_calendar-navigation-dropdown.scss +52 -0
  55. package/styles/components/datepicker/_calendar-navigation.scss +12 -0
  56. package/styles/components/datepicker/_calendar-table.scss +27 -0
  57. package/styles/components/datepicker/_calendar.scss +36 -0
  58. package/styles/components/datepicker/_index.scss +6 -0
  59. package/styles/components/datepicker/datepicker.scss +47 -0
  60. package/styles/components/description-list/_index.scss +1 -0
  61. package/styles/components/description-list/description-list.scss +58 -0
  62. package/styles/components/expander/_index.scss +4 -0
  63. package/styles/components/expander/expandable.scss +141 -0
  64. package/styles/components/feedback/_index.scss +10 -0
  65. package/styles/components/feedback/feedback.css +2 -2
  66. package/styles/components/feedback/feedback.min.css +1 -1
  67. package/styles/components/feedback/feedback.scss +113 -0
  68. package/styles/components/file/_index.scss +3 -0
  69. package/styles/components/file/file.scss +164 -0
  70. package/styles/components/file-input/_index.scss +5 -0
  71. package/styles/components/file-input/file-input.css +9 -9
  72. package/styles/components/file-input/file-input.min.css +1 -1
  73. package/styles/components/file-input/file-input.scss +130 -0
  74. package/styles/components/flex/_index.scss +1 -0
  75. package/styles/components/flex/flex.scss +252 -0
  76. package/styles/components/help/_index.scss +2 -0
  77. package/styles/components/help/help.scss +47 -0
  78. package/styles/components/icon/_base-styles.scss +21 -0
  79. package/styles/components/icon/_index.scss +1 -0
  80. package/styles/components/icon/development/internal/icons-example-grid.scss +13 -0
  81. package/styles/components/icon/icon.scss +139 -0
  82. package/styles/components/icon-button/_index.scss +1 -0
  83. package/styles/components/icon-button/icon-button.scss +38 -0
  84. package/styles/components/image/_index.scss +1 -0
  85. package/styles/components/image/development/style.scss +9 -0
  86. package/styles/components/image/image.scss +37 -0
  87. package/styles/components/image/stories/styles.scss +9 -0
  88. package/styles/components/input-group/_field-group.scss +5 -0
  89. package/styles/components/input-group/_index.scss +3 -0
  90. package/styles/components/input-group/_labels.scss +159 -0
  91. package/styles/components/input-group/input-group.css +2 -2
  92. package/styles/components/input-group/input-group.min.css +1 -1
  93. package/styles/components/input-group/input-group.scss +11 -0
  94. package/styles/components/input-panel/input-panel.scss +84 -0
  95. package/styles/components/link/_index.scss +1 -0
  96. package/styles/components/link/link.scss +62 -0
  97. package/styles/components/link-list/_index.scss +2 -0
  98. package/styles/components/link-list/link-list.scss +94 -0
  99. package/styles/components/list/_index.scss +1 -0
  100. package/styles/components/list/list.scss +98 -0
  101. package/styles/components/loader/_index.scss +2 -0
  102. package/styles/components/loader/development/styles.scss +11 -0
  103. package/styles/components/loader/loader.css +6 -6
  104. package/styles/components/loader/loader.min.css +1 -1
  105. package/styles/components/loader/loader.scss +139 -0
  106. package/styles/components/loader/skeleton-loader.css +3 -3
  107. package/styles/components/loader/skeleton-loader.min.css +1 -1
  108. package/styles/components/loader/skeleton-loader.scss +137 -0
  109. package/styles/components/logo/_index.scss +1 -0
  110. package/styles/components/logo/development/styles.scss +9 -0
  111. package/styles/components/logo/logo.scss +90 -0
  112. package/styles/components/menu/_index.scss +1 -0
  113. package/styles/components/menu/_menu-divider.scss +10 -0
  114. package/styles/components/menu/_menu-item.scss +71 -0
  115. package/styles/components/menu/menu.scss +40 -0
  116. package/styles/components/message/_index.scss +2 -0
  117. package/styles/components/message/message.css +2 -2
  118. package/styles/components/message/message.min.css +1 -1
  119. package/styles/components/message/message.scss +187 -0
  120. package/styles/components/modal/_index.scss +3 -0
  121. package/styles/components/modal/modal.scss +107 -0
  122. package/styles/components/nav-link/_index.scss +1 -0
  123. package/styles/components/nav-link/nav-link.scss +66 -0
  124. package/styles/components/pagination/_index.scss +5 -0
  125. package/styles/components/pagination/development/styles.scss +35 -0
  126. package/styles/components/pagination/pagination.scss +49 -0
  127. package/styles/components/popover/_index.scss +1 -0
  128. package/styles/components/popover/popover.scss +19 -0
  129. package/styles/components/progress-bar/_index.scss +1 -0
  130. package/styles/components/progress-bar/progress-bar.css +1 -1
  131. package/styles/components/progress-bar/progress-bar.min.css +1 -1
  132. package/styles/components/progress-bar/progress-bar.scss +27 -0
  133. package/styles/components/radio-button/_index.scss +2 -0
  134. package/styles/components/radio-button/radio-button.css +2 -2
  135. package/styles/components/radio-button/radio-button.min.css +1 -1
  136. package/styles/components/radio-button/radio-button.scss +219 -0
  137. package/styles/components/radio-panel/_index.scss +1 -0
  138. package/styles/components/radio-panel/development/styles.scss +27 -0
  139. package/styles/components/radio-panel/radio-panel.css +2 -2
  140. package/styles/components/radio-panel/radio-panel.min.css +1 -1
  141. package/styles/components/radio-panel/radio-panel.scss +82 -0
  142. package/styles/components/segmented-control/_index.scss +3 -0
  143. package/styles/components/segmented-control/segmented-control.css +4 -4
  144. package/styles/components/segmented-control/segmented-control.min.css +1 -1
  145. package/styles/components/segmented-control/segmented-control.scss +99 -0
  146. package/styles/components/select/_index.scss +3 -0
  147. package/styles/components/select/select.scss +299 -0
  148. package/styles/components/summary-table/_index.scss +1 -0
  149. package/styles/components/summary-table/development/summary-table-example.scss +10 -0
  150. package/styles/components/summary-table/summary-table.scss +49 -0
  151. package/styles/components/system-message/_index.scss +2 -0
  152. package/styles/components/system-message/system-message.css +2 -2
  153. package/styles/components/system-message/system-message.min.css +1 -1
  154. package/styles/components/system-message/system-message.scss +177 -0
  155. package/styles/components/table/_index.scss +6 -0
  156. package/styles/components/table/_table-caption.scss +7 -0
  157. package/styles/components/table/_table-cell.scss +90 -0
  158. package/styles/components/table/_table-head.scss +36 -0
  159. package/styles/components/table/_table-header.scss +65 -0
  160. package/styles/components/table/_table-pagination.scss +126 -0
  161. package/styles/components/table/_table-row.scss +177 -0
  162. package/styles/components/table/table.css +4 -0
  163. package/styles/components/table/table.min.css +1 -1
  164. package/styles/components/table/table.scss +53 -0
  165. package/styles/components/table-of-contents/_index.scss +1 -0
  166. package/styles/components/tabs/_index.scss +1 -0
  167. package/styles/components/tabs/tabs.scss +114 -0
  168. package/styles/components/tag/_index.scss +3 -0
  169. package/styles/components/tag/tag.scss +65 -0
  170. package/styles/components/text-area/_index.scss +4 -0
  171. package/styles/components/text-area/text-area.scss +111 -0
  172. package/styles/components/text-input/_index.scss +4 -0
  173. package/styles/components/text-input/text-input.scss +43 -0
  174. package/styles/components/toast/_index.scss +4 -0
  175. package/styles/components/toast/toast.css +4 -4
  176. package/styles/components/toast/toast.min.css +1 -1
  177. package/styles/components/toast/toast.scss +219 -0
  178. package/styles/components/toggle-switch/_index.scss +2 -0
  179. package/styles/components/toggle-switch/_toggle-slider.scss +123 -0
  180. package/styles/components/toggle-switch/toggle-switch.scss +137 -0
  181. package/styles/components/tooltip/_index.scss +3 -0
  182. package/styles/components/tooltip/popuptip.scss +5 -0
  183. package/styles/components/tooltip/tooltip.scss +87 -0
  184. package/styles/components-beta/description-list/_index.scss +1 -0
  185. package/styles/components-beta/description-list/description-list.scss +80 -0
  186. package/styles/components-beta/link-list/_index.scss +2 -0
  187. package/styles/components-beta/link-list/link-list.scss +81 -0
  188. package/styles/components-beta/nav-link/_index.scss +1 -0
  189. package/styles/components-beta/nav-link/navlink.scss +66 -0
  190. package/styles/components-beta/search/_index.scss +4 -0
  191. package/styles/components-beta/search/search-with-submit-button.scss +37 -0
  192. package/styles/components-beta/search/search.scss +106 -0
  193. package/styles/components-beta/select/_index.scss +3 -0
  194. package/styles/components-beta/select/select.scss +128 -0
  195. package/styles/components-beta/table-of-contents/_index.scss +2 -0
  196. package/styles/components-beta/table-of-contents/table-of-contents.scss +88 -0
  197. package/styles/core/_layers.scss +3 -0
  198. package/styles/core/core.css +61 -3
  199. package/styles/core/core.min.css +1 -1
  200. package/styles/core/core.scss +6 -0
  201. package/styles/core/global/_base-class.scss +38 -0
  202. package/styles/core/global/_index.scss +2 -0
  203. package/styles/core/global/_top-layer.scss +20 -0
  204. package/styles/core/jkl/_colors.scss +26 -0
  205. package/styles/core/jkl/_convert.scss +102 -0
  206. package/styles/core/jkl/_helpers.scss +26 -0
  207. package/styles/core/jkl/_index.scss +18 -0
  208. package/styles/core/jkl/_motion.scss +63 -0
  209. package/styles/core/jkl/_navigation.scss +9 -0
  210. package/styles/core/jkl/_ornaments.scss +28 -0
  211. package/styles/core/jkl/_reset.scss +45 -0
  212. package/styles/core/jkl/_responsive-units.scss +30 -0
  213. package/styles/core/jkl/_screenreader.scss +59 -0
  214. package/styles/core/jkl/_screens.scss +135 -0
  215. package/styles/core/jkl/_shadows.scss +25 -0
  216. package/styles/core/jkl/_spacing.scss +149 -0
  217. package/styles/core/jkl/_theme.scss +119 -0
  218. package/styles/core/jkl/_tokens.scss +58 -0
  219. package/styles/core/jkl/_typography.scss +269 -0
  220. package/styles/core/jkl/_underline.scss +16 -0
  221. package/styles/core/jkl/_z-index.scss +23 -0
  222. package/styles/core/jkl/legacy/_dynamic-colors.scss +40 -0
  223. package/styles/core/jkl/legacy/_index.scss +2 -0
  224. package/styles/core/jkl/legacy/_tokens.scss +566 -0
  225. package/styles/core/resets/_index.scss +2 -0
  226. package/styles/core/resets/_normalize.scss +251 -0
  227. package/styles/core/resets/_reset.scss +68 -0
  228. package/styles/core/theme/_color-tokens.scss +73 -0
  229. package/styles/core/theme/_dynamic-spacing.scss +55 -0
  230. package/styles/core/theme/_index.scss +8 -0
  231. package/styles/core/theme/_legacy-color-tokens.scss +81 -0
  232. package/styles/core/theme/_legacy-tokens.scss +215 -0
  233. package/styles/core/theme/_old-vars.scss +30 -0
  234. package/styles/core/theme/_spacing-tokens.scss +32 -0
  235. package/styles/core/theme/_tokens.scss +32 -0
  236. package/styles/core/theme/_typography.scss +27 -0
  237. package/styles/core/utility/_headings.scss +31 -0
  238. package/styles/core/utility/_index.scss +4 -0
  239. package/styles/core/utility/_paragraphs.scss +18 -0
  240. package/styles/core/utility/_screen-reader.scss +11 -0
  241. package/styles/core/utility/_spacing.scss +49 -0
  242. package/styles/hooks/stories/styles.scss +78 -0
  243. package/styles/shared/input/shared-input-styles.scss +181 -0
  244. package/styles/shared/track/track.scss +27 -0
  245. package/styles/styles.css +38 -34
  246. package/styles/styles.min.css +2 -2
  247. package/styles/styles.scss +52 -0
  248. package/styles/components/checkbox/development/public/fonts/webfonts.css +0 -115
  249. package/styles/components/checkbox/development/public/fonts/webfonts.min.css +0 -1
  250. package/styles/components/file-input/development/public/fonts/_index.scss +0 -1
  251. package/styles/components/file-input/development/public/fonts/webfonts.css +0 -108
  252. package/styles/components/file-input/development/public/fonts/webfonts.min.css +0 -1
  253. package/styles/components/file-input/development/public/fonts/webfonts.scss +0 -137
  254. package/styles/components/menu/development/public/fonts/_index.scss +0 -1
  255. package/styles/components/menu/development/public/fonts/webfonts.css +0 -108
  256. package/styles/components/menu/development/public/fonts/webfonts.min.css +0 -1
  257. package/styles/components/menu/development/public/fonts/webfonts.scss +0 -137
  258. package/styles/components/radio-button/development/public/fonts/_index.scss +0 -1
  259. package/styles/components/radio-button/development/public/fonts/webfonts.css +0 -115
  260. package/styles/components/radio-button/development/public/fonts/webfonts.min.css +0 -1
  261. package/styles/components/radio-button/development/public/fonts/webfonts.scss +0 -145
  262. package/styles/components/text-input/development/public/fonts/_index.scss +0 -1
  263. package/styles/components/text-input/development/public/fonts/webfonts.css +0 -115
  264. package/styles/components/text-input/development/public/fonts/webfonts.min.css +0 -1
  265. package/styles/components/text-input/development/public/fonts/webfonts.scss +0 -145
  266. package/styles/components/toggle-switch/development/public/fonts/_index.scss +0 -1
  267. package/styles/components/toggle-switch/development/public/fonts/webfonts.css +0 -115
  268. package/styles/components/toggle-switch/development/public/fonts/webfonts.min.css +0 -1
  269. package/styles/components/toggle-switch/development/public/fonts/webfonts.scss +0 -145
  270. /package/styles/{components/checkbox/development/public/fonts → fonts}/_index.scss +0 -0
  271. /package/styles/{components/checkbox/development/public/fonts → fonts}/webfonts.scss +0 -0
@@ -0,0 +1,105 @@
1
+ @charset "UTF-8";
2
+ @use "../../core/jkl";
3
+
4
+ @layer jokul.components {
5
+ .jkl-card {
6
+ --padding-s: var(--jkl-unit-05);
7
+ --padding-m: var(--jkl-unit-15);
8
+ --padding-l: var(--jkl-unit-20);
9
+ --padding-xl: var(--jkl-unit-30);
10
+ --border-radius: #{jkl.rem(4px)};
11
+ --border-color: transparent;
12
+ --border-width: #{jkl.rem(1px)};
13
+ --background-color: transparent;
14
+
15
+ position: relative;
16
+ overflow: hidden;
17
+ display: block;
18
+ background-color: var(--background-color);
19
+ border-radius: var(--border-radius);
20
+ box-sizing: border-box;
21
+ padding: var(--padding, var(--padding-s));
22
+ text-decoration: none;
23
+ color: var(--jkl-color-text-default);
24
+
25
+ &::after {
26
+ content: "";
27
+ position: absolute;
28
+ inset: 0;
29
+ pointer-events: none;
30
+ border-radius: var(--border-radius);
31
+ border: var(--border-width) solid var(--border-color);
32
+
33
+ @include jkl.motion("standard", "snappy", border-color, border-size);
34
+ }
35
+
36
+ @include jkl.from-medium-device {
37
+ --padding-s: var(--jkl-unit-10);
38
+ --padding-m: var(--jkl-unit-20);
39
+ --padding-l: var(--jkl-unit-30);
40
+ --padding-xl: var(--jkl-unit-40);
41
+ }
42
+
43
+ &[data-padding="s"] {
44
+ --padding: var(--padding-s);
45
+ }
46
+
47
+ &[data-padding="m"] {
48
+ --padding: var(--padding-m);
49
+ }
50
+
51
+ &[data-padding="l"] {
52
+ --padding: var(--padding-l);
53
+ }
54
+
55
+ &[data-padding="xl"] {
56
+ --padding: var(--padding-xl);
57
+ }
58
+
59
+ &--high {
60
+ --background-color: var(--jkl-color-background-container-high);
61
+ }
62
+
63
+ &--low {
64
+ --background-color: var(--jkl-color-background-container-low);
65
+ }
66
+
67
+ &--outlined {
68
+ --border-color: var(--jkl-color-border-separator);
69
+ }
70
+
71
+ &[data-clickable="true"] {
72
+ cursor: pointer;
73
+
74
+ &:hover {
75
+ --border-color: var(--jkl-color-border-separator-hover);
76
+ --border-width: #{jkl.rem(2px)};
77
+ }
78
+
79
+ &:focus-visible {
80
+ @include jkl.focus-outline;
81
+ }
82
+ }
83
+ }
84
+
85
+ .jkl-card-image {
86
+ --margin: calc(var(--padding, 0) * -1); // Sett negativ margin tilsvarende padding (fra Card)
87
+
88
+ width: calc(100% + 2 * var(--padding, 0));
89
+ aspect-ratio: var(--image-aspect-ratio, 3/2);
90
+ margin-inline: var(--margin, 0);
91
+ object-fit: cover;
92
+
93
+ &--top {
94
+ margin-top: var(--margin, 0);
95
+ }
96
+
97
+ &--bottom {
98
+ margin-bottom: var(--margin, 0);
99
+ }
100
+
101
+ &--full {
102
+ margin-block: var(--margin, 0);
103
+ }
104
+ }
105
+ }
@@ -0,0 +1 @@
1
+ @forward "checkbox";
@@ -30,7 +30,7 @@
30
30
  --jkl-checkbox-box-size: 1.125rem;
31
31
  --jkl-checkbox-line-height: 1.5rem;
32
32
  }
33
- @keyframes jkl-checkbox-checked-ui6ra6k {
33
+ @keyframes jkl-checkbox-checked-uwwt5n4 {
34
34
  0% {
35
35
  width: 0;
36
36
  height: 0;
@@ -44,7 +44,7 @@
44
44
  height: 58%;
45
45
  }
46
46
  }
47
- @keyframes jkl-checkbox-indeterminate-ui6ra7a {
47
+ @keyframes jkl-checkbox-indeterminate-uwwt5o2 {
48
48
  0% {
49
49
  width: 0;
50
50
  }
@@ -73,11 +73,11 @@
73
73
  left: calc(-0.5 * var(--jkl-checkbox-box-size));
74
74
  }
75
75
  .jkl-checkbox__input:checked + .jkl-checkbox__label .jkl-checkbox__check-mark::after {
76
- animation: jkl-checkbox-checked-ui6ra6k 150ms ease-in-out forwards;
76
+ animation: jkl-checkbox-checked-uwwt5n4 150ms ease-in-out forwards;
77
77
  opacity: 1;
78
78
  }
79
79
  .jkl-checkbox__input:indeterminate:not(:checked) + .jkl-checkbox__label .jkl-checkbox__indeterminate-mark::after {
80
- animation: jkl-checkbox-indeterminate-ui6ra7a 150ms ease-in-out forwards;
80
+ animation: jkl-checkbox-indeterminate-uwwt5o2 150ms ease-in-out forwards;
81
81
  opacity: 1;
82
82
  }
83
83
  .jkl-checkbox__input:focus-visible + .jkl-checkbox__label {
@@ -1 +1 @@
1
- @layer jokul.components{:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-checkbox-font-size:var(--jkl-body-font-size);--jkl-checkbox-line-height:var(--jkl-body-line-height);--jkl-checkbox-font-weight:var(--jkl-body-font-weight);--jkl-checkbox-height:3rem;--jkl-checkbox-box-size:1.5rem;--jkl-checkbox-line-height:2rem}@media (width >= 0) and (max-width:679px){:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-checkbox-height:2.5rem;--jkl-checkbox-box-size:1.5rem;--jkl-checkbox-line-height:1.75rem}}[data-density=compact],[data-layout-density=compact]{--jkl-checkbox-font-size:var(--jkl-small-font-size);--jkl-checkbox-line-height:var(--jkl-small-line-height);--jkl-checkbox-font-weight:var(--jkl-small-font-weight);--jkl-checkbox-height:1.75rem;--jkl-checkbox-box-size:1.125rem;--jkl-checkbox-line-height:1.5rem}@keyframes jkl-checkbox-checked-ui6ra6k{0%{height:0;width:0}40%{height:0;width:18%}to{height:58%;width:18%}}@keyframes jkl-checkbox-indeterminate-ui6ra7a{0%{width:0}to{width:66%}}.jkl-checkbox{--box-color:var(--jkl-color-border-action);--check-color:var(--jkl-color-border-action);--text-color:var(--jkl-color-text-default);--background-color:#0000;color:var(--text-color);display:flex;flex-wrap:wrap;font-size:var(--jkl-checkbox-font-size);font-weight:var(--jkl-checkbox-font-weight);line-height:var(--jkl-checkbox-line-height);min-height:var(--jkl-checkbox-height);position:relative}.jkl-checkbox__input{left:calc(var(--jkl-checkbox-box-size)*-.5);opacity:0;position:absolute;top:var(--jkl-checkbox-box-size)}.jkl-checkbox__input:checked+.jkl-checkbox__label .jkl-checkbox__check-mark:after{animation:jkl-checkbox-checked-ui6ra6k .15s ease-in-out forwards;opacity:1}.jkl-checkbox__input:indeterminate:not(:checked)+.jkl-checkbox__label .jkl-checkbox__indeterminate-mark:after{animation:jkl-checkbox-indeterminate-ui6ra7a .15s ease-in-out forwards;opacity:1}.jkl-checkbox__input:focus-visible+.jkl-checkbox__label{color:var(--jkl-checkbox-focus-color)}.jkl-checkbox__input:focus-visible+.jkl-checkbox__label>.jkl-checkbox__mark{outline:3px solid var(--jkl-color-border-action);outline-offset:3px}.jkl-checkbox__input:disabled+.jkl-checkbox__label{color:var(--jkl-checkbox-disabled-color)}.jkl-checkbox__input:active{--background-color:var(--jkl-color-background-input-focus)}.jkl-checkbox__label{cursor:pointer;display:flex;flex-shrink:0;max-width:100%;min-width:0}.jkl-checkbox__label:active .jkl-checkbox__mark,.jkl-checkbox__label:hover .jkl-checkbox__mark{outline:1px solid var(--box-color)}.jkl-checkbox__text{margin:calc((var(--jkl-checkbox-height) - var(--jkl-checkbox-line-height))*.5) 0;transition-duration:.15s;transition-property:color;transition-timing-function:ease;translate:0 .0625rem}.jkl-checkbox__mark{box-sizing:border-box;height:var(--jkl-checkbox-box-size);margin-block:calc((var(--jkl-checkbox-height) - var(--jkl-checkbox-box-size))*.5);position:relative;width:var(--jkl-checkbox-box-size);-webkit-margin-end:var(--jkl-unit-10);align-self:flex-start;background-color:var(--background-color);border:1px solid;border-color:var(--box-color);border-radius:0;flex-shrink:0;margin-inline-end:var(--jkl-unit-10);outline:none;transition-duration:.15s;transition-property:background-color;transition-timing-function:ease}@media screen and (forced-colors:active){.jkl-checkbox__mark{border:1px solid ButtonText;outline:revert}}.jkl-checkbox__check-mark:after{border-bottom:.125rem solid var(--check-color);border-left-width:.125rem;border-left:0 solid var(--check-color);border-right:.125rem solid var(--check-color);border-top-width:.125rem;border-top:0 solid var(--check-color);bottom:42%;content:"";display:block;height:58%;left:18%;opacity:0;position:absolute;transform:rotate(45deg);transform-origin:bottom left;transition-duration:.15s;transition-property:opacity,border-color;transition-timing-function:ease;width:18%}@media screen and (forced-colors:active){.jkl-checkbox__check-mark:after{border-color:ButtonText}}.jkl-checkbox__indeterminate-mark:after{--width:66%;--thickness:0.125rem;border-bottom:solid var(--thickness) var(--check-color);bottom:calc(50% - var(--thickness)/2);content:"";display:block;left:calc((100% - var(--width))/2);opacity:0;position:absolute;transition-duration:.15s;transition-property:opacity,border-color;transition-timing-function:ease;width:var(--width)}@media screen and (forced-colors:active){.jkl-checkbox__indeterminate-mark:after{border-color:ButtonText}}.jkl-checkbox--inline{display:inline-flex}.jkl-checkbox--inline:not(:last-of-type){margin-right:calc(var(--jkl-unit-10)*3)}.jkl-checkbox--error{--background-color:var(--jkl-color-background-alert-error);--check-color:var(--jkl-color-text-on-alert)}}
1
+ @layer jokul.components{:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-checkbox-font-size:var(--jkl-body-font-size);--jkl-checkbox-line-height:var(--jkl-body-line-height);--jkl-checkbox-font-weight:var(--jkl-body-font-weight);--jkl-checkbox-height:3rem;--jkl-checkbox-box-size:1.5rem;--jkl-checkbox-line-height:2rem}@media (width >= 0) and (max-width:679px){:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-checkbox-height:2.5rem;--jkl-checkbox-box-size:1.5rem;--jkl-checkbox-line-height:1.75rem}}[data-density=compact],[data-layout-density=compact]{--jkl-checkbox-font-size:var(--jkl-small-font-size);--jkl-checkbox-line-height:var(--jkl-small-line-height);--jkl-checkbox-font-weight:var(--jkl-small-font-weight);--jkl-checkbox-height:1.75rem;--jkl-checkbox-box-size:1.125rem;--jkl-checkbox-line-height:1.5rem}@keyframes jkl-checkbox-checked-uwwt5n4{0%{height:0;width:0}40%{height:0;width:18%}to{height:58%;width:18%}}@keyframes jkl-checkbox-indeterminate-uwwt5o2{0%{width:0}to{width:66%}}.jkl-checkbox{--box-color:var(--jkl-color-border-action);--check-color:var(--jkl-color-border-action);--text-color:var(--jkl-color-text-default);--background-color:#0000;color:var(--text-color);display:flex;flex-wrap:wrap;font-size:var(--jkl-checkbox-font-size);font-weight:var(--jkl-checkbox-font-weight);line-height:var(--jkl-checkbox-line-height);min-height:var(--jkl-checkbox-height);position:relative}.jkl-checkbox__input{left:calc(var(--jkl-checkbox-box-size)*-.5);opacity:0;position:absolute;top:var(--jkl-checkbox-box-size)}.jkl-checkbox__input:checked+.jkl-checkbox__label .jkl-checkbox__check-mark:after{animation:jkl-checkbox-checked-uwwt5n4 .15s ease-in-out forwards;opacity:1}.jkl-checkbox__input:indeterminate:not(:checked)+.jkl-checkbox__label .jkl-checkbox__indeterminate-mark:after{animation:jkl-checkbox-indeterminate-uwwt5o2 .15s ease-in-out forwards;opacity:1}.jkl-checkbox__input:focus-visible+.jkl-checkbox__label{color:var(--jkl-checkbox-focus-color)}.jkl-checkbox__input:focus-visible+.jkl-checkbox__label>.jkl-checkbox__mark{outline:3px solid var(--jkl-color-border-action);outline-offset:3px}.jkl-checkbox__input:disabled+.jkl-checkbox__label{color:var(--jkl-checkbox-disabled-color)}.jkl-checkbox__input:active{--background-color:var(--jkl-color-background-input-focus)}.jkl-checkbox__label{cursor:pointer;display:flex;flex-shrink:0;max-width:100%;min-width:0}.jkl-checkbox__label:active .jkl-checkbox__mark,.jkl-checkbox__label:hover .jkl-checkbox__mark{outline:1px solid var(--box-color)}.jkl-checkbox__text{margin:calc((var(--jkl-checkbox-height) - var(--jkl-checkbox-line-height))*.5) 0;transition-duration:.15s;transition-property:color;transition-timing-function:ease;translate:0 .0625rem}.jkl-checkbox__mark{box-sizing:border-box;height:var(--jkl-checkbox-box-size);margin-block:calc((var(--jkl-checkbox-height) - var(--jkl-checkbox-box-size))*.5);position:relative;width:var(--jkl-checkbox-box-size);-webkit-margin-end:var(--jkl-unit-10);align-self:flex-start;background-color:var(--background-color);border:1px solid;border-color:var(--box-color);border-radius:0;flex-shrink:0;margin-inline-end:var(--jkl-unit-10);outline:none;transition-duration:.15s;transition-property:background-color;transition-timing-function:ease}@media screen and (forced-colors:active){.jkl-checkbox__mark{border:1px solid ButtonText;outline:revert}}.jkl-checkbox__check-mark:after{border-bottom:.125rem solid var(--check-color);border-left-width:.125rem;border-left:0 solid var(--check-color);border-right:.125rem solid var(--check-color);border-top-width:.125rem;border-top:0 solid var(--check-color);bottom:42%;content:"";display:block;height:58%;left:18%;opacity:0;position:absolute;transform:rotate(45deg);transform-origin:bottom left;transition-duration:.15s;transition-property:opacity,border-color;transition-timing-function:ease;width:18%}@media screen and (forced-colors:active){.jkl-checkbox__check-mark:after{border-color:ButtonText}}.jkl-checkbox__indeterminate-mark:after{--width:66%;--thickness:0.125rem;border-bottom:solid var(--thickness) var(--check-color);bottom:calc(50% - var(--thickness)/2);content:"";display:block;left:calc((100% - var(--width))/2);opacity:0;position:absolute;transition-duration:.15s;transition-property:opacity,border-color;transition-timing-function:ease;width:var(--width)}@media screen and (forced-colors:active){.jkl-checkbox__indeterminate-mark:after{border-color:ButtonText}}.jkl-checkbox--inline{display:inline-flex}.jkl-checkbox--inline:not(:last-of-type){margin-right:calc(var(--jkl-unit-10)*3)}.jkl-checkbox--error{--background-color:var(--jkl-color-background-alert-error);--check-color:var(--jkl-color-text-on-alert)}}
@@ -0,0 +1,248 @@
1
+ @charset "UTF-8";
2
+ @use "sass:string";
3
+ @use "../../core/jkl";
4
+ @use "../../core/jkl/colors";
5
+
6
+ @layer jokul.components {
7
+ @include jkl.comfortable-density-variables {
8
+ @include jkl.declare-font-variables("jkl-checkbox", "body");
9
+
10
+ --jkl-checkbox-height: #{jkl.rem(48px)};
11
+ --jkl-checkbox-box-size: #{jkl.rem(24px)};
12
+ --jkl-checkbox-line-height: #{jkl.rem(32px)};
13
+
14
+ @include jkl.small-device {
15
+ --jkl-checkbox-height: #{jkl.rem(40px)};
16
+ --jkl-checkbox-box-size: #{jkl.rem(24px)};
17
+ --jkl-checkbox-line-height: #{jkl.rem(28px)};
18
+ }
19
+ }
20
+
21
+ @include jkl.compact-density-variables {
22
+ @include jkl.declare-font-variables("jkl-checkbox", "small");
23
+
24
+ --jkl-checkbox-height: #{jkl.rem(28px)};
25
+ --jkl-checkbox-box-size: #{jkl.rem(18px)};
26
+ --jkl-checkbox-line-height: #{jkl.rem(24px)};
27
+ }
28
+
29
+ $_checkbox-checked-animation-name: jkl-checkbox-checked-#{string.unique-id(
30
+
31
+ )};
32
+ $_checkbox-indeterminate-animation-name: jkl-checkbox-indeterminate-#{string.unique-id(
33
+
34
+ )};
35
+
36
+ @keyframes #{$_checkbox-checked-animation-name} {
37
+ 0% {
38
+ width: 0;
39
+ height: 0;
40
+ }
41
+
42
+ 40% {
43
+ width: 18%;
44
+ height: 0;
45
+ }
46
+
47
+ 100% {
48
+ width: 18%;
49
+ height: 58%;
50
+ }
51
+ }
52
+
53
+ @keyframes #{$_checkbox-indeterminate-animation-name} {
54
+ 0% {
55
+ width: 0;
56
+ }
57
+
58
+ 100% {
59
+ width: 66%;
60
+ }
61
+ }
62
+
63
+ .jkl-checkbox {
64
+ --box-color: var(--jkl-color-border-action);
65
+ --check-color: var(--jkl-color-border-action);
66
+ --text-color: var(--jkl-color-text-default);
67
+ --background-color: transparent;
68
+
69
+ @include jkl.use-font-variables("jkl-checkbox");
70
+
71
+ display: flex;
72
+ flex-wrap: wrap;
73
+ min-height: var(--jkl-checkbox-height);
74
+ color: var(--text-color);
75
+ position: relative;
76
+
77
+ &__input {
78
+ // Hide native checkbox
79
+ position: absolute;
80
+ opacity: 0;
81
+ // Make sure that when the browser scrolls here because of focus, the control
82
+ // is positioned below the label so that the label becomes visible.
83
+ top: var(--jkl-checkbox-box-size);
84
+ left: calc(-0.5 * var(--jkl-checkbox-box-size));
85
+
86
+ &:checked {
87
+ + .jkl-checkbox__label .jkl-checkbox__check-mark::after {
88
+ animation: $_checkbox-checked-animation-name
89
+ jkl.timing("productive") ease-in-out forwards;
90
+ opacity: 1;
91
+ }
92
+ }
93
+
94
+ &:indeterminate:not(:checked) {
95
+ + .jkl-checkbox__label
96
+ .jkl-checkbox__indeterminate-mark::after {
97
+ animation: $_checkbox-indeterminate-animation-name
98
+ jkl.timing("productive") ease-in-out forwards;
99
+ opacity: 1;
100
+ }
101
+ }
102
+
103
+ &:focus-visible + .jkl-checkbox__label {
104
+ color: var(--jkl-checkbox-focus-color);
105
+
106
+ & > .jkl-checkbox__mark {
107
+ @include jkl.focus-outline;
108
+ }
109
+ }
110
+
111
+ &:disabled + .jkl-checkbox__label {
112
+ color: var(--jkl-checkbox-disabled-color);
113
+ }
114
+
115
+ &:active {
116
+ --background-color: var(--jkl-color-background-input-focus);
117
+ }
118
+ }
119
+
120
+ &__label {
121
+ display: flex;
122
+ min-width: 0;
123
+ max-width: 100%;
124
+ cursor: pointer;
125
+ flex-shrink: 0;
126
+
127
+ &:hover,
128
+ &:active {
129
+ .jkl-checkbox__mark {
130
+ outline: 1px solid var(--box-color);
131
+ }
132
+ }
133
+ }
134
+
135
+ &__text {
136
+ margin: calc(
137
+ (
138
+ var(--jkl-checkbox-height) - var(--jkl-checkbox-line-height)
139
+ )
140
+ * 0.5
141
+ ) 0;
142
+ translate: 0 jkl.rem(1px);
143
+
144
+ @include jkl.motion;
145
+ transition-property: color;
146
+ }
147
+
148
+ &__mark {
149
+ box-sizing: border-box;
150
+ position: relative;
151
+ height: var(--jkl-checkbox-box-size);
152
+ width: var(--jkl-checkbox-box-size);
153
+
154
+ margin-block: calc(
155
+ (
156
+ var(--jkl-checkbox-height) - var(--jkl-checkbox-box-size)
157
+ )
158
+ * 0.5
159
+ );
160
+ margin-inline-end: var(--jkl-unit-10);
161
+ align-self: flex-start;
162
+ flex-shrink: 0; // Don't allow the mark to shrink in case of really long text
163
+
164
+ outline: none;
165
+ border-radius: 0; // fixes rounded corners in iOS Safari
166
+ border: 1px solid;
167
+ border-color: var(--box-color);
168
+ background-color: var(--background-color);
169
+
170
+ @include jkl.motion;
171
+ transition-property: background-color;
172
+
173
+ @include jkl.forced-colors-mode {
174
+ outline: revert;
175
+ border: 1px solid ButtonText;
176
+ }
177
+ }
178
+
179
+ // This is the check marker
180
+ &__check-mark {
181
+ &::after {
182
+ content: "";
183
+ position: absolute;
184
+ transform-origin: bottom left;
185
+ bottom: 42%;
186
+ left: 18%;
187
+
188
+ display: block;
189
+ width: 18%;
190
+ height: 58%;
191
+ transform: rotate(45deg);
192
+
193
+ border: solid jkl.rem(2px) var(--check-color);
194
+ border-left-width: 0;
195
+ border-top-width: 0;
196
+
197
+ opacity: 0;
198
+
199
+ @include jkl.motion;
200
+ transition-property: opacity, border-color;
201
+
202
+ @include jkl.forced-colors-mode {
203
+ border-color: ButtonText;
204
+ }
205
+ }
206
+ }
207
+
208
+ // This is the indeterminate marker
209
+ &__indeterminate-mark {
210
+ &::after {
211
+ --width: 66%;
212
+ --thickness: #{jkl.rem(2px)};
213
+
214
+ content: "";
215
+ position: absolute;
216
+ bottom: calc(50% - var(--thickness) / 2);
217
+ left: calc((100% - var(--width)) / 2);
218
+
219
+ display: block;
220
+ width: var(--width);
221
+
222
+ border-bottom: solid var(--thickness) var(--check-color);
223
+
224
+ opacity: 0;
225
+
226
+ @include jkl.motion;
227
+ transition-property: opacity, border-color;
228
+
229
+ @include jkl.forced-colors-mode {
230
+ border-color: ButtonText;
231
+ }
232
+ }
233
+ }
234
+
235
+ &--inline {
236
+ display: inline-flex;
237
+
238
+ &:not(:last-of-type) {
239
+ margin-right: jkl.$unit-30;
240
+ }
241
+ }
242
+
243
+ &--error {
244
+ --background-color: var(--jkl-color-background-alert-error);
245
+ --check-color: var(--jkl-color-text-on-alert);
246
+ }
247
+ }
248
+ }
@@ -0,0 +1 @@
1
+ @forward "checkbox-panel";
@@ -105,7 +105,7 @@
105
105
  --jkl-checkbox-box-size: 1.125rem;
106
106
  --jkl-checkbox-line-height: 1.5rem;
107
107
  }
108
- @keyframes jkl-checkbox-checked-u513wc2 {
108
+ @keyframes jkl-checkbox-checked-uclkrrk {
109
109
  0% {
110
110
  width: 0;
111
111
  height: 0;
@@ -119,7 +119,7 @@
119
119
  height: 58%;
120
120
  }
121
121
  }
122
- @keyframes jkl-checkbox-indeterminate-u513wcu {
122
+ @keyframes jkl-checkbox-indeterminate-uclkrsc {
123
123
  0% {
124
124
  width: 0;
125
125
  }
@@ -148,11 +148,11 @@
148
148
  left: calc(-0.5 * var(--jkl-checkbox-box-size));
149
149
  }
150
150
  .jkl-checkbox__input:checked + .jkl-checkbox__label .jkl-checkbox__check-mark::after {
151
- animation: jkl-checkbox-checked-u513wc2 150ms ease-in-out forwards;
151
+ animation: jkl-checkbox-checked-uclkrrk 150ms ease-in-out forwards;
152
152
  opacity: 1;
153
153
  }
154
154
  .jkl-checkbox__input:indeterminate:not(:checked) + .jkl-checkbox__label .jkl-checkbox__indeterminate-mark::after {
155
- animation: jkl-checkbox-indeterminate-u513wcu 150ms ease-in-out forwards;
155
+ animation: jkl-checkbox-indeterminate-uclkrsc 150ms ease-in-out forwards;
156
156
  opacity: 1;
157
157
  }
158
158
  .jkl-checkbox__input:focus-visible + .jkl-checkbox__label {
@@ -263,7 +263,7 @@
263
263
  --check-color: var(--jkl-color-text-on-alert);
264
264
  }
265
265
  }
266
- @keyframes jkl-checkbox-checked-u513wds {
266
+ @keyframes jkl-checkbox-checked-uclkrt3 {
267
267
  0% {
268
268
  width: 0;
269
269
  height: 0;
@@ -327,7 +327,7 @@
327
327
  }
328
328
  }
329
329
  .jkl-checkbox-panel:has(:checked) .jkl-checkbox-panel__decorator::after {
330
- animation: jkl-checkbox-checked-u513wds 150ms ease-in-out forwards;
330
+ animation: jkl-checkbox-checked-uclkrt3 150ms ease-in-out forwards;
331
331
  opacity: 1;
332
332
  }
333
333
  .jkl-checkbox-panel:has([aria-invalid=true]) {
@@ -1,3 +1,3 @@
1
- @layer components{.jkl-input-panel{--outer-border-color:var(--jkl-color-border-input);--outer-border-thickness:0.0625rem;--background-color:#0000;background-color:var(--background-color);border-radius:4px;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:.15s;transition-property:box-shadow;transition-timing-function:ease}.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-spacing-s) var(--jkl-spacing-m);position:relative}.jkl-input-panel__header__amount{align-items:center;display:flex;font-size:var(--jkl-checkbox-font-size);font-weight:var(--jkl-checkbox-font-weight);height:100%;line-height:var(--jkl-checkbox-line-height)}.jkl-input-panel__header .jkl-checkbox,.jkl-input-panel__header .jkl-radio-button,.jkl-input-panel__header label{position:unset}.jkl-input-panel__header label:after{block-size:100%;content:"";inline-size:100%;left:0;position:absolute;top:0}.jkl-input-panel__description{height:0;overflow:hidden;padding-inline:var(--jkl-spacing-m);-webkit-padding-after:var(--jkl-spacing-none);font-size:var(--jkl-checkbox-font-size);font-weight:var(--jkl-checkbox-font-weight);line-height:normal;line-height:var(--jkl-checkbox-line-height);padding-block-end:var(--jkl-spacing-none);transition-duration:.15s;transition-property:height;transition-timing-function:ease}.jkl-input-panel:has(:focus-visible){outline:3px solid var(--jkl-color-border-action);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-high)}.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-spacing-s);padding-block-end:var(--jkl-spacing-s)}.jkl-input-panel:has(input:hover){--outer-border-color:var(--jkl-color-border-separator-hover);--outer-border-thickness:0.125rem;cursor:pointer}}@layer jokul.components{:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-checkbox-font-size:var(--jkl-body-font-size);--jkl-checkbox-line-height:var(--jkl-body-line-height);--jkl-checkbox-font-weight:var(--jkl-body-font-weight);--jkl-checkbox-height:3rem;--jkl-checkbox-box-size:1.5rem;--jkl-checkbox-line-height:2rem}@media (width >= 0) and (max-width:679px){:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-checkbox-height:2.5rem;--jkl-checkbox-box-size:1.5rem;--jkl-checkbox-line-height:1.75rem}}[data-density=compact],[data-layout-density=compact]{--jkl-checkbox-font-size:var(--jkl-small-font-size);--jkl-checkbox-line-height:var(--jkl-small-line-height);--jkl-checkbox-font-weight:var(--jkl-small-font-weight);--jkl-checkbox-height:1.75rem;--jkl-checkbox-box-size:1.125rem;--jkl-checkbox-line-height:1.5rem}@keyframes jkl-checkbox-checked-u513wc2{0%{height:0;width:0}40%{height:0;width:18%}to{height:58%;width:18%}}@keyframes jkl-checkbox-indeterminate-u513wcu{0%{width:0}to{width:66%}}.jkl-checkbox{--box-color:var(--jkl-color-border-action);--check-color:var(--jkl-color-border-action);--text-color:var(--jkl-color-text-default);--background-color:#0000;color:var(--text-color);display:flex;flex-wrap:wrap;font-size:var(--jkl-checkbox-font-size);font-weight:var(--jkl-checkbox-font-weight);line-height:var(--jkl-checkbox-line-height);min-height:var(--jkl-checkbox-height);position:relative}.jkl-checkbox__input{left:calc(var(--jkl-checkbox-box-size)*-.5);opacity:0;position:absolute;top:var(--jkl-checkbox-box-size)}.jkl-checkbox__input:checked+.jkl-checkbox__label .jkl-checkbox__check-mark:after{animation:jkl-checkbox-checked-u513wc2 .15s ease-in-out forwards;opacity:1}.jkl-checkbox__input:indeterminate:not(:checked)+.jkl-checkbox__label .jkl-checkbox__indeterminate-mark:after{animation:jkl-checkbox-indeterminate-u513wcu .15s ease-in-out forwards;opacity:1}.jkl-checkbox__input:focus-visible+.jkl-checkbox__label{color:var(--jkl-checkbox-focus-color)}.jkl-checkbox__input:focus-visible+.jkl-checkbox__label>.jkl-checkbox__mark{outline:3px solid var(--jkl-color-border-action);outline-offset:3px}.jkl-checkbox__input:disabled+.jkl-checkbox__label{color:var(--jkl-checkbox-disabled-color)}.jkl-checkbox__input:active{--background-color:var(--jkl-color-background-input-focus)}.jkl-checkbox__label{cursor:pointer;display:flex;flex-shrink:0;max-width:100%;min-width:0}.jkl-checkbox__label:active .jkl-checkbox__mark,.jkl-checkbox__label:hover .jkl-checkbox__mark{outline:1px solid var(--box-color)}.jkl-checkbox__text{margin:calc((var(--jkl-checkbox-height) - var(--jkl-checkbox-line-height))*.5) 0;transition-duration:.15s;transition-property:color;transition-timing-function:ease;translate:0 .0625rem}.jkl-checkbox__mark{box-sizing:border-box;height:var(--jkl-checkbox-box-size);margin-block:calc((var(--jkl-checkbox-height) - var(--jkl-checkbox-box-size))*.5);position:relative;width:var(--jkl-checkbox-box-size);-webkit-margin-end:var(--jkl-unit-10);align-self:flex-start;background-color:var(--background-color);border:1px solid;border-color:var(--box-color);border-radius:0;flex-shrink:0;margin-inline-end:var(--jkl-unit-10);outline:none;transition-duration:.15s;transition-property:background-color;transition-timing-function:ease}@media screen and (forced-colors:active){.jkl-checkbox__mark{border:1px solid ButtonText;outline:revert}}.jkl-checkbox__check-mark:after{border-bottom:.125rem solid var(--check-color);border-left-width:.125rem;border-left:0 solid var(--check-color);border-right:.125rem solid var(--check-color);border-top-width:.125rem;border-top:0 solid var(--check-color);bottom:42%;content:"";display:block;height:58%;left:18%;opacity:0;position:absolute;transform:rotate(45deg);transform-origin:bottom left;transition-duration:.15s;transition-property:opacity,border-color;transition-timing-function:ease;width:18%}@media screen and (forced-colors:active){.jkl-checkbox__check-mark:after{border-color:ButtonText}}.jkl-checkbox__indeterminate-mark:after{--width:66%;--thickness:0.125rem;border-bottom:solid var(--thickness) var(--check-color);bottom:calc(50% - var(--thickness)/2);content:"";display:block;left:calc((100% - var(--width))/2);opacity:0;position:absolute;transition-duration:.15s;transition-property:opacity,border-color;transition-timing-function:ease;width:var(--width)}@media screen and (forced-colors:active){.jkl-checkbox__indeterminate-mark:after{border-color:ButtonText}}.jkl-checkbox--inline{display:inline-flex}.jkl-checkbox--inline:not(:last-of-type){margin-right:calc(var(--jkl-unit-10)*3)}.jkl-checkbox--error{--background-color:var(--jkl-color-background-alert-error);--check-color:var(--jkl-color-text-on-alert)}}@keyframes jkl-checkbox-checked-u513wds{0%{height:0;width:0}40%{height:0;width:18%}to{height:58%;width:18%}}@layer jokul.components{.jkl-checkbox-panel{--checkbox-background-color:#0000;--checkbox-box-color:var(--jkl-color-border-action);--checkbox-check-color:var(--jkl-color-border-action)}.jkl-checkbox-panel__decorator{background-color:var(--checkbox-background-color);border:1px solid;border-color:var(--checkbox-box-color);border-radius:0;box-sizing:border-box;height:var(--jkl-checkbox-box-size);outline:none;position:relative;transition-duration:.15s;transition-property:background-color;transition-timing-function:ease;width:var(--jkl-checkbox-box-size)}@media screen and (forced-colors:active){.jkl-checkbox-panel__decorator{border:1px solid ButtonText;outline:revert}}.jkl-checkbox-panel__decorator:after{border-bottom:.125rem solid var(--checkbox-check-color);border-left-width:.125rem;border-left:0 solid var(--checkbox-check-color);border-right:.125rem solid var(--checkbox-check-color);border-top-width:.125rem;border-top:0 solid var(--checkbox-check-color);bottom:42%;content:"";display:block;height:58%;left:18%;opacity:0;position:absolute;transform:rotate(45deg);transform-origin:bottom left;transition-duration:.15s;transition-property:opacity,border-color;transition-timing-function:ease;width:18%}@media screen and (forced-colors:active){.jkl-checkbox-panel__decorator:after{border-color:ButtonText}}.jkl-checkbox-panel:has(:checked) .jkl-checkbox-panel__decorator:after{animation:jkl-checkbox-checked-u513wds .15s ease-in-out forwards;opacity:1}.jkl-checkbox-panel:has([aria-invalid=true]){--checkbox-background-color:var(
1
+ @layer components{.jkl-input-panel{--outer-border-color:var(--jkl-color-border-input);--outer-border-thickness:0.0625rem;--background-color:#0000;background-color:var(--background-color);border-radius:4px;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:.15s;transition-property:box-shadow;transition-timing-function:ease}.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-spacing-s) var(--jkl-spacing-m);position:relative}.jkl-input-panel__header__amount{align-items:center;display:flex;font-size:var(--jkl-checkbox-font-size);font-weight:var(--jkl-checkbox-font-weight);height:100%;line-height:var(--jkl-checkbox-line-height)}.jkl-input-panel__header .jkl-checkbox,.jkl-input-panel__header .jkl-radio-button,.jkl-input-panel__header label{position:unset}.jkl-input-panel__header label:after{block-size:100%;content:"";inline-size:100%;left:0;position:absolute;top:0}.jkl-input-panel__description{height:0;overflow:hidden;padding-inline:var(--jkl-spacing-m);-webkit-padding-after:var(--jkl-spacing-none);font-size:var(--jkl-checkbox-font-size);font-weight:var(--jkl-checkbox-font-weight);line-height:normal;line-height:var(--jkl-checkbox-line-height);padding-block-end:var(--jkl-spacing-none);transition-duration:.15s;transition-property:height;transition-timing-function:ease}.jkl-input-panel:has(:focus-visible){outline:3px solid var(--jkl-color-border-action);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-high)}.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-spacing-s);padding-block-end:var(--jkl-spacing-s)}.jkl-input-panel:has(input:hover){--outer-border-color:var(--jkl-color-border-separator-hover);--outer-border-thickness:0.125rem;cursor:pointer}}@layer jokul.components{:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-checkbox-font-size:var(--jkl-body-font-size);--jkl-checkbox-line-height:var(--jkl-body-line-height);--jkl-checkbox-font-weight:var(--jkl-body-font-weight);--jkl-checkbox-height:3rem;--jkl-checkbox-box-size:1.5rem;--jkl-checkbox-line-height:2rem}@media (width >= 0) and (max-width:679px){:root,[data-density=comfortable],[data-layout-density=comfortable]{--jkl-checkbox-height:2.5rem;--jkl-checkbox-box-size:1.5rem;--jkl-checkbox-line-height:1.75rem}}[data-density=compact],[data-layout-density=compact]{--jkl-checkbox-font-size:var(--jkl-small-font-size);--jkl-checkbox-line-height:var(--jkl-small-line-height);--jkl-checkbox-font-weight:var(--jkl-small-font-weight);--jkl-checkbox-height:1.75rem;--jkl-checkbox-box-size:1.125rem;--jkl-checkbox-line-height:1.5rem}@keyframes jkl-checkbox-checked-uclkrrk{0%{height:0;width:0}40%{height:0;width:18%}to{height:58%;width:18%}}@keyframes jkl-checkbox-indeterminate-uclkrsc{0%{width:0}to{width:66%}}.jkl-checkbox{--box-color:var(--jkl-color-border-action);--check-color:var(--jkl-color-border-action);--text-color:var(--jkl-color-text-default);--background-color:#0000;color:var(--text-color);display:flex;flex-wrap:wrap;font-size:var(--jkl-checkbox-font-size);font-weight:var(--jkl-checkbox-font-weight);line-height:var(--jkl-checkbox-line-height);min-height:var(--jkl-checkbox-height);position:relative}.jkl-checkbox__input{left:calc(var(--jkl-checkbox-box-size)*-.5);opacity:0;position:absolute;top:var(--jkl-checkbox-box-size)}.jkl-checkbox__input:checked+.jkl-checkbox__label .jkl-checkbox__check-mark:after{animation:jkl-checkbox-checked-uclkrrk .15s ease-in-out forwards;opacity:1}.jkl-checkbox__input:indeterminate:not(:checked)+.jkl-checkbox__label .jkl-checkbox__indeterminate-mark:after{animation:jkl-checkbox-indeterminate-uclkrsc .15s ease-in-out forwards;opacity:1}.jkl-checkbox__input:focus-visible+.jkl-checkbox__label{color:var(--jkl-checkbox-focus-color)}.jkl-checkbox__input:focus-visible+.jkl-checkbox__label>.jkl-checkbox__mark{outline:3px solid var(--jkl-color-border-action);outline-offset:3px}.jkl-checkbox__input:disabled+.jkl-checkbox__label{color:var(--jkl-checkbox-disabled-color)}.jkl-checkbox__input:active{--background-color:var(--jkl-color-background-input-focus)}.jkl-checkbox__label{cursor:pointer;display:flex;flex-shrink:0;max-width:100%;min-width:0}.jkl-checkbox__label:active .jkl-checkbox__mark,.jkl-checkbox__label:hover .jkl-checkbox__mark{outline:1px solid var(--box-color)}.jkl-checkbox__text{margin:calc((var(--jkl-checkbox-height) - var(--jkl-checkbox-line-height))*.5) 0;transition-duration:.15s;transition-property:color;transition-timing-function:ease;translate:0 .0625rem}.jkl-checkbox__mark{box-sizing:border-box;height:var(--jkl-checkbox-box-size);margin-block:calc((var(--jkl-checkbox-height) - var(--jkl-checkbox-box-size))*.5);position:relative;width:var(--jkl-checkbox-box-size);-webkit-margin-end:var(--jkl-unit-10);align-self:flex-start;background-color:var(--background-color);border:1px solid;border-color:var(--box-color);border-radius:0;flex-shrink:0;margin-inline-end:var(--jkl-unit-10);outline:none;transition-duration:.15s;transition-property:background-color;transition-timing-function:ease}@media screen and (forced-colors:active){.jkl-checkbox__mark{border:1px solid ButtonText;outline:revert}}.jkl-checkbox__check-mark:after{border-bottom:.125rem solid var(--check-color);border-left-width:.125rem;border-left:0 solid var(--check-color);border-right:.125rem solid var(--check-color);border-top-width:.125rem;border-top:0 solid var(--check-color);bottom:42%;content:"";display:block;height:58%;left:18%;opacity:0;position:absolute;transform:rotate(45deg);transform-origin:bottom left;transition-duration:.15s;transition-property:opacity,border-color;transition-timing-function:ease;width:18%}@media screen and (forced-colors:active){.jkl-checkbox__check-mark:after{border-color:ButtonText}}.jkl-checkbox__indeterminate-mark:after{--width:66%;--thickness:0.125rem;border-bottom:solid var(--thickness) var(--check-color);bottom:calc(50% - var(--thickness)/2);content:"";display:block;left:calc((100% - var(--width))/2);opacity:0;position:absolute;transition-duration:.15s;transition-property:opacity,border-color;transition-timing-function:ease;width:var(--width)}@media screen and (forced-colors:active){.jkl-checkbox__indeterminate-mark:after{border-color:ButtonText}}.jkl-checkbox--inline{display:inline-flex}.jkl-checkbox--inline:not(:last-of-type){margin-right:calc(var(--jkl-unit-10)*3)}.jkl-checkbox--error{--background-color:var(--jkl-color-background-alert-error);--check-color:var(--jkl-color-text-on-alert)}}@keyframes jkl-checkbox-checked-uclkrt3{0%{height:0;width:0}40%{height:0;width:18%}to{height:58%;width:18%}}@layer jokul.components{.jkl-checkbox-panel{--checkbox-background-color:#0000;--checkbox-box-color:var(--jkl-color-border-action);--checkbox-check-color:var(--jkl-color-border-action)}.jkl-checkbox-panel__decorator{background-color:var(--checkbox-background-color);border:1px solid;border-color:var(--checkbox-box-color);border-radius:0;box-sizing:border-box;height:var(--jkl-checkbox-box-size);outline:none;position:relative;transition-duration:.15s;transition-property:background-color;transition-timing-function:ease;width:var(--jkl-checkbox-box-size)}@media screen and (forced-colors:active){.jkl-checkbox-panel__decorator{border:1px solid ButtonText;outline:revert}}.jkl-checkbox-panel__decorator:after{border-bottom:.125rem solid var(--checkbox-check-color);border-left-width:.125rem;border-left:0 solid var(--checkbox-check-color);border-right:.125rem solid var(--checkbox-check-color);border-top-width:.125rem;border-top:0 solid var(--checkbox-check-color);bottom:42%;content:"";display:block;height:58%;left:18%;opacity:0;position:absolute;transform:rotate(45deg);transform-origin:bottom left;transition-duration:.15s;transition-property:opacity,border-color;transition-timing-function:ease;width:18%}@media screen and (forced-colors:active){.jkl-checkbox-panel__decorator:after{border-color:ButtonText}}.jkl-checkbox-panel:has(:checked) .jkl-checkbox-panel__decorator:after{animation:jkl-checkbox-checked-uclkrt3 .15s ease-in-out forwards;opacity:1}.jkl-checkbox-panel:has([aria-invalid=true]){--checkbox-background-color:var(
2
2
  --jkl-color-background-alert-error
3
3
  );--checkbox-check-color:var(--jkl-color-text-on-alert)}}
@@ -0,0 +1,95 @@
1
+ @use "../../core/jkl" as jkl;
2
+ @use "sass:string";
3
+ @use "../input-panel/input-panel";
4
+ @use "../checkbox/checkbox.scss";
5
+
6
+ $_checkbox-checked-animation-name: jkl-checkbox-checked-#{string.unique-id()};
7
+
8
+ @keyframes #{$_checkbox-checked-animation-name} {
9
+ 0% {
10
+ width: 0;
11
+ height: 0;
12
+ }
13
+
14
+ 40% {
15
+ width: 18%;
16
+ height: 0;
17
+ }
18
+
19
+ 100% {
20
+ width: 18%;
21
+ height: 58%;
22
+ }
23
+ }
24
+
25
+ @layer jokul.components {
26
+ .jkl-checkbox-panel {
27
+ --checkbox-background-color: transparent;
28
+ --checkbox-box-color: var(--jkl-color-border-action);
29
+ --checkbox-check-color: var(--jkl-color-border-action);
30
+
31
+ // The box
32
+ &__decorator {
33
+ box-sizing: border-box;
34
+ height: var(--jkl-checkbox-box-size);
35
+ width: var(--jkl-checkbox-box-size);
36
+ position: relative;
37
+
38
+ outline: none;
39
+ border-radius: 0; // fixes rounded corners in iOS Safari
40
+ border: 1px solid;
41
+ border-color: var(--checkbox-box-color);
42
+ background-color: var(--checkbox-background-color);
43
+
44
+ @include jkl.motion;
45
+ transition-property: background-color;
46
+
47
+ @include jkl.forced-colors-mode {
48
+ outline: revert;
49
+ border: 1px solid ButtonText;
50
+ }
51
+
52
+ // The check
53
+ &::after {
54
+ content: "";
55
+ position: absolute;
56
+ transform-origin: bottom left;
57
+ bottom: 42%;
58
+ left: 18%;
59
+
60
+ display: block;
61
+ width: 18%;
62
+ height: 58%;
63
+ transform: rotate(45deg);
64
+
65
+ border: solid jkl.rem(2px) var(--checkbox-check-color);
66
+ border-left-width: 0;
67
+ border-top-width: 0;
68
+
69
+ opacity: 0;
70
+
71
+ @include jkl.motion;
72
+ transition-property: opacity, border-color;
73
+
74
+ @include jkl.forced-colors-mode {
75
+ border-color: ButtonText;
76
+ }
77
+ }
78
+ }
79
+
80
+ &:has(:checked) &__decorator {
81
+ &::after {
82
+ animation: $_checkbox-checked-animation-name
83
+ jkl.timing("productive") ease-in-out forwards;
84
+ opacity: 1;
85
+ }
86
+ }
87
+
88
+ &:has([aria-invalid="true"]) {
89
+ --checkbox-background-color: var(
90
+ --jkl-color-background-alert-error
91
+ );
92
+ --checkbox-check-color: var(--jkl-color-text-on-alert);
93
+ }
94
+ }
95
+ }
@@ -0,0 +1,27 @@
1
+ @use "../../core/jkl/" as jkl;
2
+
3
+ .input-panel-example {
4
+ &__season-tag {
5
+ position: absolute;
6
+ top: calc(-50% - 2px);
7
+ right: 2px;
8
+
9
+ @include jkl.from-medium-device {
10
+ top: 2px;
11
+ }
12
+ }
13
+
14
+ &__custom-label {
15
+ position: relative;
16
+ height: 100%;
17
+ width: 100%;
18
+
19
+ &--small {
20
+ font-size: 0.8em;
21
+ }
22
+
23
+ &--bold {
24
+ font-weight: bold;
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,2 @@
1
+ @forward "chip";
2
+ @use "../icon" as icon;