@skf-design-system/ui-components 1.0.2-beta.0 → 1.0.2-beta.10

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 (297) hide show
  1. package/README.md +37 -9
  2. package/dist/components/accordion/accordion-item.component.d.ts +36 -0
  3. package/dist/components/accordion/accordion-item.component.js +98 -0
  4. package/dist/components/accordion/accordion-item.d.ts +3 -3
  5. package/dist/components/accordion/accordion-item.js +4 -5
  6. package/dist/components/accordion/accordion-item.styles.js +77 -0
  7. package/dist/components/accordion/accordion.component.d.ts +6 -10
  8. package/dist/components/accordion/accordion.component.js +9 -10
  9. package/dist/components/accordion/accordion.d.ts +0 -1
  10. package/dist/components/accordion/accordion.js +0 -2
  11. package/dist/components/alert/alert.component.d.ts +12 -10
  12. package/dist/components/alert/alert.component.js +59 -51
  13. package/dist/components/alert/alert.styles.js +50 -51
  14. package/dist/components/breadcrumb/breadcrumb-item.component.js +59 -0
  15. package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.d.ts +2 -2
  16. package/dist/components/breadcrumb/breadcrumb-item.js +6 -0
  17. package/dist/components/breadcrumb/breadcrumb-item.styles.js +63 -0
  18. package/dist/components/breadcrumb/breadcrumb.component.d.ts +6 -3
  19. package/dist/components/breadcrumb/breadcrumb.component.js +65 -0
  20. package/dist/components/breadcrumb/breadcrumb.d.ts +2 -2
  21. package/dist/components/breadcrumb/breadcrumb.js +6 -0
  22. package/dist/components/breadcrumb/breadcrumb.styles.js +25 -0
  23. package/dist/components/button/button.component.d.ts +13 -10
  24. package/dist/components/button/button.component.js +69 -66
  25. package/dist/components/button/button.styles.d.ts +1 -2
  26. package/dist/components/button/button.styles.js +6 -5
  27. package/dist/components/card/card.component.d.ts +6 -1
  28. package/dist/components/card/card.component.js +46 -24
  29. package/dist/components/card/card.styles.js +31 -14
  30. package/dist/components/checkbox/checkbox.component.d.ts +14 -11
  31. package/dist/components/checkbox/checkbox.component.js +67 -69
  32. package/dist/components/checkbox/checkbox.styles.d.ts +1 -2
  33. package/dist/components/checkbox/checkbox.styles.js +2 -6
  34. package/dist/components/{date-picker/datepicker.calendar.component.d.ts → datepicker/datepicker-calendar.component.d.ts} +8 -1
  35. package/dist/components/{date-picker/datepicker.calendar.component.js → datepicker/datepicker-calendar.component.js} +109 -115
  36. package/dist/components/datepicker/datepicker-calendar.d.ts +8 -0
  37. package/dist/components/datepicker/datepicker-calendar.js +6 -0
  38. package/dist/components/{date-picker/datepicker.component.d.ts → datepicker/datepicker-popup.component.d.ts} +9 -20
  39. package/dist/components/datepicker/datepicker-popup.component.js +272 -0
  40. package/dist/components/datepicker/datepicker-popup.d.ts +8 -0
  41. package/dist/components/{date-picker/datepicker.helpers.d.ts → datepicker/datepicker-popup.helpers.d.ts} +3 -3
  42. package/dist/components/datepicker/datepicker-popup.helpers.js +83 -0
  43. package/dist/components/datepicker/datepicker-popup.js +6 -0
  44. package/dist/components/{date-picker/datepicker.styles.js → datepicker/datepicker-popup.styles.js} +3 -3
  45. package/dist/components/{date-picker-input/datepicker-input.component.d.ts → datepicker/datepicker.component.d.ts} +22 -14
  46. package/dist/components/datepicker/datepicker.component.js +455 -0
  47. package/dist/components/datepicker/datepicker.d.ts +8 -0
  48. package/dist/components/datepicker/datepicker.js +6 -0
  49. package/dist/components/dialog/dialog.component.d.ts +8 -6
  50. package/dist/components/dialog/dialog.component.js +67 -67
  51. package/dist/components/dialog/dialog.d.ts +2 -2
  52. package/dist/components/dialog/dialog.styles.js +4 -4
  53. package/dist/components/divider/divider.component.d.ts +3 -0
  54. package/dist/components/divider/divider.component.js +43 -22
  55. package/dist/components/divider/divider.styles.js +9 -9
  56. package/dist/components/drawer/drawer.component.d.ts +24 -12
  57. package/dist/components/drawer/drawer.component.js +87 -63
  58. package/dist/components/drawer/drawer.d.ts +2 -2
  59. package/dist/components/drawer/drawer.styles.js +47 -40
  60. package/dist/components/header/header.component.d.ts +7 -4
  61. package/dist/components/header/header.component.js +68 -55
  62. package/dist/components/header/header.d.ts +2 -2
  63. package/dist/components/header/header.styles.js +2 -2
  64. package/dist/components/heading/heading.component.d.ts +8 -6
  65. package/dist/components/heading/heading.component.js +52 -24
  66. package/dist/components/heading/heading.styles.js +34 -36
  67. package/dist/components/icon/icon.component.d.ts +15 -17
  68. package/dist/components/icon/icon.component.js +62 -43
  69. package/dist/components/icon/icon.styles.d.ts +1 -2
  70. package/dist/components/icon/icon.styles.js +60 -60
  71. package/dist/components/input/input.component.d.ts +34 -39
  72. package/dist/components/input/input.component.js +159 -153
  73. package/dist/components/input/input.controllers.d.ts +0 -1
  74. package/dist/components/input/input.controllers.js +14 -19
  75. package/dist/components/link/link.component.d.ts +20 -25
  76. package/dist/components/link/link.component.js +104 -107
  77. package/dist/components/link/link.styles.d.ts +1 -2
  78. package/dist/components/link/link.styles.js +54 -46
  79. package/dist/components/loader/loader.component.d.ts +6 -4
  80. package/dist/components/loader/loader.component.js +49 -42
  81. package/dist/components/loader/loader.styles.d.ts +1 -2
  82. package/dist/components/loader/loader.styles.js +34 -30
  83. package/dist/components/logo/logo.component.d.ts +8 -6
  84. package/dist/components/logo/logo.component.js +55 -51
  85. package/dist/components/logo/logo.styles.js +26 -16
  86. package/dist/components/menu/menu-item.component.d.ts +13 -0
  87. package/dist/components/menu/menu-item.component.js +13 -0
  88. package/dist/components/{menu-item → menu}/menu-item.d.ts +2 -2
  89. package/dist/components/menu/menu-item.styles.js +23 -0
  90. package/dist/components/menu/menu.component.d.ts +14 -8
  91. package/dist/components/menu/menu.component.js +10 -12
  92. package/dist/components/menu/menu.d.ts +2 -2
  93. package/dist/components/{nav-item → nav}/nav-item.component.d.ts +6 -4
  94. package/dist/components/nav/nav-item.component.js +57 -0
  95. package/dist/components/nav/nav-item.styles.js +43 -0
  96. package/dist/components/nav/nav.component.d.ts +9 -0
  97. package/dist/components/nav/nav.component.js +47 -21
  98. package/dist/components/nav/nav.d.ts +2 -2
  99. package/dist/components/nav/nav.styles.js +15 -9
  100. package/dist/components/popover/popover.component.d.ts +17 -6
  101. package/dist/components/popover/popover.component.js +22 -16
  102. package/dist/components/popover/popover.d.ts +2 -2
  103. package/dist/components/progress/progress.component.d.ts +4 -2
  104. package/dist/components/progress/progress.component.js +38 -35
  105. package/dist/components/progress/progress.d.ts +2 -2
  106. package/dist/components/progress/progress.styles.js +42 -35
  107. package/dist/components/radio/radio.component.d.ts +13 -9
  108. package/dist/components/radio/radio.component.js +96 -91
  109. package/dist/components/radio/radio.styles.js +1 -1
  110. package/dist/components/{segmented-button-item → segmented-button}/segmented-button-item.component.d.ts +4 -4
  111. package/dist/components/segmented-button/segmented-button-item.component.js +56 -0
  112. package/dist/components/{segmented-button-item → segmented-button}/segmented-button-item.d.ts +2 -2
  113. package/dist/components/segmented-button/segmented-button-item.js +6 -0
  114. package/dist/components/segmented-button/segmented-button-item.styles.js +62 -0
  115. package/dist/components/segmented-button/segmented-button.component.d.ts +0 -2
  116. package/dist/components/segmented-button/segmented-button.component.js +71 -0
  117. package/dist/components/segmented-button/segmented-button.d.ts +2 -2
  118. package/dist/components/segmented-button/segmented-button.js +6 -0
  119. package/dist/components/segmented-button/segmented-button.styles.js +16 -0
  120. package/dist/components/{select-option-group → select}/select-option-group.component.d.ts +4 -0
  121. package/dist/components/select/select-option-group.component.js +50 -0
  122. package/dist/components/{select-option-group → select}/select-option-group.d.ts +2 -2
  123. package/dist/components/select/select-option-group.style.js +24 -0
  124. package/dist/components/{select-option → select}/select-option.component.d.ts +16 -12
  125. package/dist/components/select/select-option.component.js +135 -0
  126. package/dist/components/select/select-option.styles.js +65 -0
  127. package/dist/components/select/select.component.d.ts +35 -25
  128. package/dist/components/select/select.component.js +126 -88
  129. package/dist/components/select/select.controllers.d.ts +1 -1
  130. package/dist/components/select/select.controllers.js +16 -18
  131. package/dist/components/select/select.styles.js +8 -2
  132. package/dist/components/select/stories/select.stories.icons.d.ts +7 -0
  133. package/dist/components/{stepper-item → stepper}/stepper-item.component.d.ts +1 -1
  134. package/dist/components/stepper/stepper-item.component.js +116 -0
  135. package/dist/components/{stepper-item → stepper}/stepper-item.d.ts +2 -2
  136. package/dist/components/{stepper-item → stepper}/stepper-item.styles.js +4 -4
  137. package/dist/components/stepper/stepper.component.d.ts +2 -2
  138. package/dist/components/stepper/stepper.component.js +17 -18
  139. package/dist/components/stepper/stepper.d.ts +2 -2
  140. package/dist/components/stepper/stepper.helpers.d.ts +1 -1
  141. package/dist/components/stepper/stepper.helpers.js +6 -7
  142. package/dist/components/switch/switch.component.d.ts +4 -2
  143. package/dist/components/switch/switch.component.js +64 -58
  144. package/dist/components/switch/switch.d.ts +2 -2
  145. package/dist/components/switch/switch.styles.js +1 -1
  146. package/dist/components/{tab-panel → tabs}/tab-panel.component.d.ts +1 -1
  147. package/dist/components/tabs/tab-panel.component.js +39 -0
  148. package/dist/components/{tab-panel → tabs}/tab-panel.d.ts +2 -2
  149. package/dist/components/{tab → tabs}/tab.component.d.ts +3 -3
  150. package/dist/components/{tab → tabs}/tab.component.js +18 -15
  151. package/dist/components/{tab → tabs}/tab.d.ts +2 -2
  152. package/dist/components/{tab → tabs}/tab.styles.js +2 -2
  153. package/dist/components/{tab-group/tab-group.component.d.ts → tabs/tabs.component.d.ts} +3 -4
  154. package/dist/components/{tab-group/tab-group.component.js → tabs/tabs.component.js} +36 -37
  155. package/dist/components/tabs/tabs.d.ts +8 -0
  156. package/dist/components/tabs/tabs.js +6 -0
  157. package/dist/components/{tab-group/tab-group.styles.js → tabs/tabs.styles.js} +16 -16
  158. package/dist/components/tag/tag.component.d.ts +20 -16
  159. package/dist/components/tag/tag.component.js +74 -65
  160. package/dist/components/tag/tag.d.ts +2 -2
  161. package/dist/components/tag/tag.styles.js +63 -50
  162. package/dist/components/textarea/textarea.component.d.ts +14 -13
  163. package/dist/components/textarea/textarea.component.js +77 -72
  164. package/dist/components/{toast-item → toast}/toast-item.d.ts +2 -0
  165. package/dist/components/{toast-item → toast}/toast-item.js +4 -0
  166. package/dist/components/toast/toast-item.styles.js +21 -0
  167. package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.js +1 -1
  168. package/dist/components/toast/toast-wrapper.styles.d.ts +1 -0
  169. package/dist/components/toast/toast.component.d.ts +5 -4
  170. package/dist/components/toast/toast.component.js +16 -16
  171. package/dist/components/toast/toast.singleton.d.ts +5 -5
  172. package/dist/components/toast/toast.singleton.js +28 -29
  173. package/dist/components/tooltip/tooltip.component.d.ts +11 -3
  174. package/dist/components/tooltip/tooltip.component.js +18 -9
  175. package/dist/components/tooltip/tooltip.d.ts +2 -2
  176. package/dist/custom-elements.json +2202 -1720
  177. package/dist/index.d.ts +19 -12
  178. package/dist/index.js +108 -89
  179. package/dist/internal/base-classes/popover/popover.base.d.ts +30 -6
  180. package/dist/internal/base-classes/popover/popover.base.js +83 -69
  181. package/dist/internal/base-classes/popover/popover.styles.js +4 -5
  182. package/dist/internal/components/formBase.d.ts +1 -0
  183. package/dist/internal/components/formBase.js +11 -19
  184. package/dist/internal/components/hint/hint.component.d.ts +6 -2
  185. package/dist/internal/components/hint/hint.component.js +47 -20
  186. package/dist/internal/components/hint/hint.styles.d.ts +1 -2
  187. package/dist/internal/components/hint/hint.styles.js +30 -26
  188. package/dist/internal/components/skf-element.d.ts +1 -3
  189. package/dist/internal/components/skf-element.js +4 -9
  190. package/dist/internal/constants/iconSeverity.d.ts +3 -2
  191. package/dist/internal/constants/iconSeverity.js +2 -3
  192. package/dist/internal/controllers/popover.controller.d.ts +2 -0
  193. package/dist/internal/controllers/popover.controller.js +11 -14
  194. package/dist/internal/helpers/hintSeverity.d.ts +2 -2
  195. package/dist/internal/helpers/hintSeverity.js +1 -1
  196. package/dist/internal/helpers/stateMap.d.ts +14 -0
  197. package/dist/internal/helpers/stateMap.js +68 -0
  198. package/dist/internal/helpers/uuid.d.ts +8 -10
  199. package/dist/internal/helpers/uuid.js +4 -11
  200. package/dist/internal/helpers/watch.d.ts +1 -1
  201. package/dist/internal/helpers/watch.js +12 -12
  202. package/dist/internal/templates/asterisk.d.ts +1 -1
  203. package/dist/internal/templates/asterisk.js +4 -4
  204. package/dist/internal/types/formField.d.ts +1 -1
  205. package/dist/internal/types.d.ts +22 -0
  206. package/dist/styles/component.styles.d.ts +1 -2
  207. package/dist/styles/component.styles.js +38 -37
  208. package/dist/styles/global-alt.css +1 -0
  209. package/dist/styles/global.css +1 -1
  210. package/dist/translations/en.d.ts +3 -0
  211. package/dist/translations/en.js +27 -0
  212. package/dist/translations/es.d.ts +3 -0
  213. package/dist/translations/es.js +27 -0
  214. package/dist/translations/index.d.ts +4 -0
  215. package/dist/translations/pt.d.ts +3 -0
  216. package/dist/translations/pt.js +27 -0
  217. package/dist/translations/sv.d.ts +3 -0
  218. package/dist/translations/sv.js +27 -0
  219. package/dist/types/jsx/custom-element-jsx.d.ts +2031 -927
  220. package/dist/types/vue/index.d.ts +357 -324
  221. package/dist/utilities/localize.d.ts +28 -0
  222. package/dist/utilities/localize.js +13 -0
  223. package/dist/vscode.html-custom-data.json +360 -1241
  224. package/dist/web-types.json +932 -805
  225. package/package.json +38 -52
  226. package/dist/components/accordion/accordion.test.d.ts +0 -1
  227. package/dist/components/checkbox/checkbox.test.d.ts +0 -1
  228. package/dist/components/collapse/collapse.component.d.ts +0 -40
  229. package/dist/components/collapse/collapse.component.js +0 -86
  230. package/dist/components/collapse/collapse.d.ts +0 -8
  231. package/dist/components/collapse/collapse.js +0 -6
  232. package/dist/components/collapse/collapse.styles.d.ts +0 -2
  233. package/dist/components/collapse/collapse.styles.js +0 -77
  234. package/dist/components/collapse/collapse.test.d.ts +0 -1
  235. package/dist/components/date-picker/datepicker.component.js +0 -261
  236. package/dist/components/date-picker/datepicker.d.ts +0 -10
  237. package/dist/components/date-picker/datepicker.helpers.js +0 -76
  238. package/dist/components/date-picker/datepicker.js +0 -8
  239. package/dist/components/date-picker-input/datepicker-input.component.js +0 -441
  240. package/dist/components/date-picker-input/datepicker-input.d.ts +0 -8
  241. package/dist/components/date-picker-input/datepicker-input.js +0 -6
  242. package/dist/components/input/input.test.d.ts +0 -1
  243. package/dist/components/menu-item/menu-item.component.d.ts +0 -25
  244. package/dist/components/menu-item/menu-item.component.js +0 -13
  245. package/dist/components/menu-item/menu-item.styles.js +0 -19
  246. package/dist/components/nav-item/nav-item.component.js +0 -38
  247. package/dist/components/nav-item/nav-item.styles.js +0 -39
  248. package/dist/components/radio/radio.test.d.ts +0 -1
  249. package/dist/components/select-option/select-option.component.js +0 -123
  250. package/dist/components/select-option/select-option.styles.js +0 -53
  251. package/dist/components/select-option-group/select-option-group.component.js +0 -31
  252. package/dist/components/select-option-group/select-option-group.style.js +0 -18
  253. package/dist/components/stepper-item/stepper-item.component.js +0 -113
  254. package/dist/components/switch/switch.test.d.ts +0 -1
  255. package/dist/components/tab-group/tab-group.d.ts +0 -8
  256. package/dist/components/tab-group/tab-group.js +0 -6
  257. package/dist/components/tab-panel/tab-panel.component.js +0 -36
  258. package/dist/components/toast-item/toast-item.styles.js +0 -18
  259. package/dist/internal/constants/heading.d.ts +0 -2
  260. package/dist/internal/playwright/index.d.ts +0 -1
  261. /package/dist/components/{breadcrumb-item/breadcrumb-item.styles.d.ts → accordion/accordion-item.styles.d.ts} +0 -0
  262. /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.component.d.ts +0 -0
  263. /package/dist/components/{date-picker/datepicker.calendar.styles.d.ts → breadcrumb/breadcrumb-item.styles.d.ts} +0 -0
  264. /package/dist/components/{date-picker/datepicker.styles.d.ts → datepicker/datepicker-calendar.styles.d.ts} +0 -0
  265. /package/dist/components/{date-picker/datepicker.calendar.styles.js → datepicker/datepicker-calendar.styles.js} +0 -0
  266. /package/dist/components/{menu-item/menu-item.styles.d.ts → datepicker/datepicker-popup.styles.d.ts} +0 -0
  267. /package/dist/components/{date-picker-input/datepicker-input.helpers.d.ts → datepicker/datepicker.helpers.d.ts} +0 -0
  268. /package/dist/components/{date-picker-input/datepicker-input.helpers.js → datepicker/datepicker.helpers.js} +0 -0
  269. /package/dist/components/{date-picker-input/datepicker-input.styles.d.ts → datepicker/datepicker.styles.d.ts} +0 -0
  270. /package/dist/components/{date-picker-input/datepicker-input.styles.js → datepicker/datepicker.styles.js} +0 -0
  271. /package/dist/components/{menu-item → menu}/menu-item.js +0 -0
  272. /package/dist/components/{nav-item/nav-item.styles.d.ts → menu/menu-item.styles.d.ts} +0 -0
  273. /package/dist/components/{nav-item → nav}/nav-item.d.ts +0 -0
  274. /package/dist/components/{nav-item → nav}/nav-item.js +0 -0
  275. /package/dist/components/{segmented-button-item/segmented-button-item.styles.d.ts → nav/nav-item.styles.d.ts} +0 -0
  276. /package/dist/components/{select-option-group/select-option-group.style.d.ts → segmented-button/segmented-button-item.styles.d.ts} +0 -0
  277. /package/dist/components/{select-option-group → select}/select-option-group.js +0 -0
  278. /package/dist/components/{select-option/select-option.styles.d.ts → select/select-option-group.style.d.ts} +0 -0
  279. /package/dist/components/{select-option → select}/select-option.controllers.d.ts +0 -0
  280. /package/dist/components/{select-option → select}/select-option.d.ts +0 -0
  281. /package/dist/components/{select-option → select}/select-option.js +0 -0
  282. /package/dist/components/{stepper-item/stepper-item.styles.d.ts → select/select-option.styles.d.ts} +0 -0
  283. /package/dist/components/{stepper-item → stepper}/stepper-item.js +0 -0
  284. /package/dist/components/{tab-group/tab-group.styles.d.ts → stepper/stepper-item.styles.d.ts} +0 -0
  285. /package/dist/components/{tab-panel → tabs}/tab-panel.js +0 -0
  286. /package/dist/components/{tab-panel → tabs}/tab-panel.styles.d.ts +0 -0
  287. /package/dist/components/{tab-panel → tabs}/tab-panel.styles.js +0 -0
  288. /package/dist/components/{tab → tabs}/tab.js +0 -0
  289. /package/dist/components/{tab → tabs}/tab.styles.d.ts +0 -0
  290. /package/dist/components/{toast-wrapper/toast-wrapper.styles.d.ts → tabs/tabs.styles.d.ts} +0 -0
  291. /package/dist/components/{toast-item → toast}/toast-item.component.d.ts +0 -0
  292. /package/dist/components/{toast-item → toast}/toast-item.component.js +0 -0
  293. /package/dist/components/{toast-item → toast}/toast-item.styles.d.ts +0 -0
  294. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.d.ts +0 -0
  295. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.d.ts +0 -0
  296. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.js +0 -0
  297. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.styles.js +0 -0
@@ -1,33 +1,38 @@
1
+ var f = (i) => {
2
+ throw TypeError(i);
3
+ };
4
+ var u = (i, e, t) => e.has(i) || f("Cannot " + t);
5
+ var h = (i, e, t) => (u(i, e, "read from private field"), t ? t.call(i) : e.get(i)), _ = (i, e, t) => e.has(i) ? f("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(i) : e.set(i, t), v = (i, e, t, a) => (u(i, e, "write to private field"), a ? a.call(i, t) : e.set(i, t), t);
1
6
  import "../icon/icon.js";
2
7
  import "../loader/loader.js";
3
- import { SkfElement as m } from "../../internal/components/skf-element.js";
4
- import { watch as f } from "../../internal/helpers/watch.js";
5
- import u from "../../styles/component.styles.js";
6
- import { html as d, LitElement as _, nothing as p } from "lit";
7
- import { property as o, state as v, query as c } from "lit/decorators.js";
8
- import { classMap as $ } from "lit/directives/class-map.js";
9
- import { ifDefined as b } from "lit/directives/if-defined.js";
10
- import g from "./button.styles.js";
11
- var O = Object.defineProperty, V = Object.getOwnPropertyDescriptor, s = (y, t, l, r) => {
12
- for (var e = r > 1 ? void 0 : r ? V(t, l) : t, a = y.length - 1, n; a >= 0; a--)
13
- (n = y[a]) && (e = (r ? n(t, l, e) : n(e)) || e);
14
- return r && e && O(t, l, e), e;
15
- };
16
- const h = class h extends m {
8
+ import { SkfElement as g } from "../../internal/components/skf-element.js";
9
+ import { watch as O } from "../../internal/helpers/watch.js";
10
+ import { componentStyles as V } from "../../styles/component.styles.js";
11
+ import { html as p, LitElement as w, nothing as b } from "lit";
12
+ import { property as r, state as z, query as m } from "lit/decorators.js";
13
+ import { classMap as P } from "lit/directives/class-map.js";
14
+ import { ifDefined as $ } from "lit/directives/if-defined.js";
15
+ import { styles as L } from "./button.styles.js";
16
+ var C = Object.defineProperty, F = Object.getOwnPropertyDescriptor, s = (i, e, t, a) => {
17
+ for (var n = a > 1 ? void 0 : a ? F(e, t) : e, c = i.length - 1, y; c >= 0; c--)
18
+ (y = i[c]) && (n = (a ? y(e, t, n) : y(n)) || n);
19
+ return a && n && C(e, t, n), n;
20
+ }, l;
21
+ const d = class d extends g {
17
22
  constructor() {
18
- super(), this._transitionOptions = {
23
+ super();
24
+ _(this, l);
25
+ this._transitionOptions = {
19
26
  duration: 200,
20
27
  fill: "forwards"
21
28
  }, this.destructive = !1, this.disabled = !1, this.iconOnly = !1, this.iconPosition = "left", this.loading = !1, this.noValidate = !1, this.size = "md", this.type = "button", this.variant = "primary", this._loaderVisible = !1, this._handleClick = (t) => {
22
29
  t.preventDefault(), t.stopPropagation(), !(this.disabled || this.loading) && (this.dispatchEvent(new CustomEvent("click", { bubbles: !0, composed: !0, detail: t })), this.type === "submit" && this._submitForm(), this.type === "reset" && this._resetForm());
23
30
  }, this._submitForm = () => {
24
- var e, a, n;
25
- const t = !((e = this._internals.form) != null && e.reportValidity()), l = !this.noValidate, r = !((a = this._internals.form) != null && a.hasAttribute("no-validate"));
26
- (l || r) && t || (n = this._internals.form) == null || n.requestSubmit();
31
+ const t = !h(this, l).form?.reportValidity(), a = !this.noValidate, n = !h(this, l).form?.hasAttribute("no-validate");
32
+ (a || n) && t || h(this, l).form?.requestSubmit();
27
33
  }, this._resetForm = () => {
28
- var t;
29
- (t = this._internals.form) == null || t.reset();
30
- }, this._renderIcon = () => d`<skf-icon class="skf-icon-host" name=${b(this.icon)}></skf-icon>`, this._internals = this.attachInternals();
34
+ h(this, l).form?.reset();
35
+ }, this._renderIcon = () => p`<skf-icon data-color="custom" name=${$(this.icon)}></skf-icon>`, v(this, l, this.attachInternals());
31
36
  }
32
37
  firstUpdated(t) {
33
38
  if (t.has("loading") && this.loading) {
@@ -40,24 +45,23 @@ const h = class h extends m {
40
45
  }
41
46
  /** Simulates a click on the button. */
42
47
  click() {
43
- var t;
44
- (t = this.$button) == null || t.click();
48
+ this.$button?.click();
45
49
  }
46
50
  /** @internal */
47
51
  async _showLoader() {
48
- var t;
49
- this._loaderVisible = !0, await ((t = this.$body) == null ? void 0 : t.animate({ opacity: 0 }, this._transitionOptions).finished), !(!this.$body || !this.$loader) && this.$loader.animate({ opacity: 1 }, this._transitionOptions);
52
+ this._loaderVisible = !0, await this.$body?.animate({ opacity: 0 }, this._transitionOptions).finished, !(!this.$body || !this.$loader) && this.$loader.animate({ opacity: 1 }, this._transitionOptions);
50
53
  }
51
54
  /** @internal */
52
55
  async _hideLoader() {
53
56
  !this.$body || !this.$loader || (await this.$loader.animate({ opacity: 0 }, this._transitionOptions).finished, this._loaderVisible = !1, this.$body.animate({ opacity: 1 }, this._transitionOptions));
54
57
  }
55
58
  render() {
56
- return d`
59
+ return p`
57
60
  <button
58
61
  ?disabled=${this.disabled || this.loading}
62
+ @click=${this._handleClick}
59
63
  aria-busy=${this.loading}
60
- class=${$({
64
+ class=${P({
61
65
  btn: !0,
62
66
  "btn--destructive": this.destructive,
63
67
  "btn--icon-only": this.iconOnly,
@@ -68,68 +72,67 @@ const h = class h extends m {
68
72
  "btn--variant-secondary": this.variant === "secondary",
69
73
  "btn--variant-tertiary": this.variant === "tertiary"
70
74
  })}
71
- type=${b(this.type)}
72
- @click=${this._handleClick}
75
+ type=${$(this.type)}
73
76
  title=${/* An empty title prevents browser validation tooltips from appearing on hover */
74
77
  this.title}
75
78
  >
76
- ${this.variant === "primary" && this._loaderVisible ? d`<skf-loader class="btn__loader" invert size="sm"></skf-loader>` : ""}
79
+ ${this.variant === "primary" && this._loaderVisible ? p`<skf-loader class="btn__loader" invert size="sm"></skf-loader>` : ""}
77
80
  <div class="btn__body" id="body">
78
- ${this.icon && this.iconPosition === "left" ? this._renderIcon() : p}
79
- ${this.iconOnly ? p : d`<slot class="btn__label"></slot>`}
80
- ${this.icon && this.iconPosition === "right" ? this._renderIcon() : p}
81
+ ${this.icon && this.iconPosition === "left" ? this._renderIcon() : b}
82
+ ${this.iconOnly ? b : p`<slot class="btn__label"></slot>`}
83
+ ${this.icon && this.iconPosition === "right" ? this._renderIcon() : b}
81
84
  </div>
82
85
  </button>
83
86
  `;
84
87
  }
85
88
  };
86
- h.formAssociated = !0, h.shadowRootOptions = { ..._.shadowRootOptions, delegatesFocus: !0 }, h.styles = [u, g];
87
- let i = h;
89
+ l = new WeakMap(), d.styles = [V, L], d.formAssociated = !0, d.shadowRootOptions = { ...w.shadowRootOptions, delegatesFocus: !0 };
90
+ let o = d;
88
91
  s([
89
- o({ type: Boolean })
90
- ], i.prototype, "destructive", 2);
92
+ r({ type: Boolean })
93
+ ], o.prototype, "destructive", 2);
91
94
  s([
92
- o({ type: Boolean })
93
- ], i.prototype, "disabled", 2);
95
+ r({ type: Boolean })
96
+ ], o.prototype, "disabled", 2);
94
97
  s([
95
- o()
96
- ], i.prototype, "icon", 2);
98
+ r()
99
+ ], o.prototype, "icon", 2);
97
100
  s([
98
- o({ type: Boolean })
99
- ], i.prototype, "iconOnly", 2);
101
+ r({ type: Boolean, attribute: "icon-only" })
102
+ ], o.prototype, "iconOnly", 2);
100
103
  s([
101
- o({ attribute: "icon-position" })
102
- ], i.prototype, "iconPosition", 2);
104
+ r({ attribute: "icon-position" })
105
+ ], o.prototype, "iconPosition", 2);
103
106
  s([
104
- o({ type: Boolean, reflect: !0 })
105
- ], i.prototype, "loading", 2);
107
+ r({ type: Boolean, reflect: !0 })
108
+ ], o.prototype, "loading", 2);
106
109
  s([
107
- o({ type: Boolean, attribute: "no-validate" })
108
- ], i.prototype, "noValidate", 2);
110
+ r({ type: Boolean, attribute: "no-validate" })
111
+ ], o.prototype, "noValidate", 2);
109
112
  s([
110
- o({ reflect: !0 })
111
- ], i.prototype, "size", 2);
113
+ r({ reflect: !0 })
114
+ ], o.prototype, "size", 2);
112
115
  s([
113
- o()
114
- ], i.prototype, "type", 2);
116
+ r()
117
+ ], o.prototype, "type", 2);
115
118
  s([
116
- o({ reflect: !0 })
117
- ], i.prototype, "variant", 2);
119
+ r({ reflect: !0 })
120
+ ], o.prototype, "variant", 2);
118
121
  s([
119
- v()
120
- ], i.prototype, "_loaderVisible", 2);
122
+ z()
123
+ ], o.prototype, "_loaderVisible", 2);
121
124
  s([
122
- c("skf-loader")
123
- ], i.prototype, "$loader", 2);
125
+ m("skf-loader")
126
+ ], o.prototype, "$loader", 2);
124
127
  s([
125
- c("#body")
126
- ], i.prototype, "$body", 2);
128
+ m("#body")
129
+ ], o.prototype, "$body", 2);
127
130
  s([
128
- c("button")
129
- ], i.prototype, "$button", 2);
131
+ m("button")
132
+ ], o.prototype, "$button", 2);
130
133
  s([
131
- f("loading", { afterUpdate: !0 })
132
- ], i.prototype, "_handleLoadingChange", 1);
134
+ O("loading", { afterUpdate: !0 })
135
+ ], o.prototype, "_handleLoadingChange", 1);
133
136
  export {
134
- i as SkfButton
137
+ o as SkfButton
135
138
  };
@@ -1,2 +1 @@
1
- declare const _default: import("lit").CSSResult;
2
- export default _default;
1
+ export declare const styles: import("lit").CSSResult;
@@ -49,7 +49,8 @@ const r = o`
49
49
 
50
50
  .btn--icon-only {
51
51
  aspect-ratio: 1;
52
- place-items: center;
52
+ display: inherit;
53
+ place-content: center;
53
54
  }
54
55
 
55
56
  /**
@@ -85,9 +86,9 @@ const r = o`
85
86
  --_skf-button-bg-color: var(--skf-interactive-bg-color-secondary);
86
87
  --_skf-button-bg-color-active: var(--skf-interactive-bg-color-secondary-active);
87
88
  --_skf-button-bg-color-hover: var(--skf-interactive-bg-color-secondary-hover);
88
- --_skf-button-border-color: var(--skf-border-color-emphasised);
89
+ --_skf-button-border-color: var(--skf-border-color-emphasized);
89
90
  --_skf-button-border-color-disabled: var(--skf-interactive-border-color-disabled);
90
- --_skf-button-color: var(--skf-text-color-emphasised);
91
+ --_skf-button-color: var(--skf-text-color-emphasized);
91
92
  --_skf-button-color-disabled: var(--skf-interactive-text-color-disabled);
92
93
  }
93
94
 
@@ -96,7 +97,7 @@ const r = o`
96
97
  --_skf-button-bg-color-active: var(--skf-interactive-bg-color-secondary-active);
97
98
  --_skf-button-bg-color-hover: var(--skf-interactive-bg-color-secondary-hover);
98
99
  --_skf-button-border-color: transparent;
99
- --_skf-button-color: var(--skf-text-color-emphasised);
100
+ --_skf-button-color: var(--skf-text-color-emphasized);
100
101
  --_skf-button-color-disabled: var(--skf-interactive-text-color-disabled);
101
102
  }
102
103
 
@@ -128,5 +129,5 @@ const r = o`
128
129
  }
129
130
  `;
130
131
  export {
131
- r as default
132
+ r as styles
132
133
  };
@@ -3,13 +3,16 @@ import { type CSSResultGroup } from 'lit';
3
3
  /**
4
4
  * The `<skf-card>` can be used to group related subjects in a container
5
5
  *
6
- * @documentation See [InVision DSM](https://skf.invisionapp.com/dsm/ab-skf/4-web-applications/nav/5fa7caf78c01200018354495/asset/6229d63d9fe16020a60657e5) for design principles
6
+ * See [zeroheight](https://zeroheight.com/853e936c9/p/021eed-card) for design principles
7
7
  *
8
8
  * @slot - The card's main content
9
9
  *
10
+ * @cssproperty --mod-card-bg-color - Ability to set a custom background color
11
+ *
10
12
  * @tagname skf-card
11
13
  */
12
14
  export declare class SkfCard extends SkfElement {
15
+ #private;
13
16
  static styles: CSSResultGroup;
14
17
  /** If true, removes border */
15
18
  noBorder: boolean;
@@ -17,5 +20,7 @@ export declare class SkfCard extends SkfElement {
17
20
  noPadding: boolean;
18
21
  /** If true, the Card fills the parent element height */
19
22
  stretch: boolean;
23
+ /** @internal */
24
+ _handleStateChange(property: string, _prev: unknown, next: unknown): void;
20
25
  render(): import("lit").TemplateResult<1>;
21
26
  }
@@ -1,32 +1,54 @@
1
- import { SkfElement as f } from "../../internal/components/skf-element.js";
2
- import m from "../../styles/component.styles.js";
3
- import { html as d } from "lit";
4
- import { property as o } from "lit/decorators.js";
5
- import { styles as u } from "./card.styles.js";
6
- var c = Object.defineProperty, s = (p, l, i, y) => {
7
- for (var t = void 0, r = p.length - 1, a; r >= 0; r--)
8
- (a = p[r]) && (t = a(l, i, t) || t);
9
- return t && c(l, i, t), t;
1
+ var g = (t) => {
2
+ throw TypeError(t);
10
3
  };
11
- const n = class n extends f {
4
+ var u = (t, e, o) => e.has(t) || g("Cannot " + o);
5
+ var m = (t, e, o) => (u(t, e, "read from private field"), o ? o.call(t) : e.get(t)), d = (t, e, o) => e.has(t) ? g("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, o), c = (t, e, o, s) => (u(t, e, "write to private field"), s ? s.call(t, o) : e.set(t, o), o);
6
+ import { SkfElement as b } from "../../internal/components/skf-element.js";
7
+ import { stateMap as v } from "../../internal/helpers/stateMap.js";
8
+ import { watch as P } from "../../internal/helpers/watch.js";
9
+ import { componentStyles as B } from "../../styles/component.styles.js";
10
+ import { html as O } from "lit";
11
+ import { property as f } from "lit/decorators.js";
12
+ import { styles as j } from "./card.styles.js";
13
+ var w = Object.defineProperty, x = Object.getOwnPropertyDescriptor, i = (t, e, o, s) => {
14
+ for (var r = s > 1 ? void 0 : s ? x(e, o) : e, h = t.length - 1, l; h >= 0; h--)
15
+ (l = t[h]) && (r = (s ? l(e, o, r) : l(r)) || r);
16
+ return s && r && w(e, o, r), r;
17
+ };
18
+ const _ = {
19
+ noBorder: "no-border",
20
+ noPadding: "no-padding",
21
+ stretch: "stretch"
22
+ };
23
+ var p, a;
24
+ const y = class y extends b {
12
25
  constructor() {
13
- super(...arguments), this.noBorder = !1, this.noPadding = !1, this.stretch = !1;
26
+ super(...arguments);
27
+ d(this, p);
28
+ d(this, a);
29
+ c(this, p, this.attachInternals()), c(this, a, m(this, p).states), this.noBorder = !1, this.noPadding = !1, this.stretch = !1;
30
+ }
31
+ _handleStateChange(o, s, r) {
32
+ v(m(this, a), _[o]).set(r);
14
33
  }
15
34
  render() {
16
- return d`<slot></slot>`;
35
+ return O`<slot id="root"></slot>`;
17
36
  }
18
37
  };
19
- n.styles = [m, u];
20
- let e = n;
21
- s([
22
- o({ type: Boolean, attribute: "no-border", reflect: !0 })
23
- ], e.prototype, "noBorder");
24
- s([
25
- o({ type: Boolean, attribute: "no-padding", reflect: !0 })
26
- ], e.prototype, "noPadding");
27
- s([
28
- o({ type: Boolean, reflect: !0 })
29
- ], e.prototype, "stretch");
38
+ p = new WeakMap(), a = new WeakMap(), y.styles = [B, j];
39
+ let n = y;
40
+ i([
41
+ f({ type: Boolean, attribute: "no-border" })
42
+ ], n.prototype, "noBorder", 2);
43
+ i([
44
+ f({ type: Boolean, attribute: "no-padding" })
45
+ ], n.prototype, "noPadding", 2);
46
+ i([
47
+ f({ type: Boolean })
48
+ ], n.prototype, "stretch", 2);
49
+ i([
50
+ P(Object.keys(_))
51
+ ], n.prototype, "_handleStateChange", 1);
30
52
  export {
31
- e as SkfCard
53
+ n as SkfCard
32
54
  };
@@ -1,33 +1,50 @@
1
1
  import { css as r } from "lit";
2
- const s = r`
2
+ const a = r`
3
3
  @layer components {
4
4
  @layer base {
5
5
  :host {
6
- background-color: var(--skf-bg-color-neutral-1);
7
- border: var(--skf-border-width-sm) solid
8
- var(--_skf-card-border-color, var(--skf-border-color-tertiary));
9
- border-radius: var(--skf-border-radius-sm);
10
- box-shadow: var(--skf-shadow-md);
11
6
  contain: layout;
12
- padding: var(--_skf-card-padding, var(--skf-spacing-100));
7
+ }
8
+
9
+ #root {
10
+ --_skf-card-bg-color: var(--mod-card-bg-color, var(--skf-bg-color-neutral-1));
11
+ --_skf-card-border-color: var(--skf-border-color-tertiary);
12
+ --_skf-card-padding: var(--skf-spacing-100);
13
+ --_skf-card-shadow: var(--skf-shadow-md);
14
+
15
+ background-color: var(--_skf-card-bg-color);
16
+ border: var(--skf-border-width-sm) solid var(--_skf-card-border-color);
17
+ border-radius: var(--skf-border-radius-sm);
18
+ box-shadow: var(--_skf-card-shadow);
19
+ display: block;
20
+ padding: var(--_skf-card-padding);
13
21
  }
14
22
  }
15
23
 
16
24
  @layer mods {
17
- :host([stretch]) {
18
- block-size: 100%;
25
+ :host(:state(no-border)) {
26
+ #root {
27
+ --_skf-card-border-color: transparent;
28
+ --_skf-card-shadow: none;
29
+ }
19
30
  }
20
31
 
21
- :host([no-border]) {
22
- --_skf-card-border-color: transparent;
32
+ :host(:state(no-padding)) {
33
+ #root {
34
+ --_skf-card-padding: 0;
35
+ }
23
36
  }
24
37
 
25
- :host([no-padding]) {
26
- --_skf-card-padding: 0;
38
+ :host(:state(stretch)) {
39
+ block-size: 100%;
40
+
41
+ #root {
42
+ block-size: inherit;
43
+ }
27
44
  }
28
45
  }
29
46
  }
30
47
  `;
31
48
  export {
32
- s as styles
49
+ a as styles
33
50
  };
@@ -1,6 +1,8 @@
1
1
  import '../icon/icon.js';
2
2
  import { FormBase } from '../../internal/components/formBase.js';
3
+ import type { FormFieldSeverity } from '../../internal/types.js';
3
4
  import type { FormFieldBaseProps } from '../../internal/types/formField.js';
5
+ import { type Language } from '../../utilities/localize.js';
4
6
  import { type CSSResultGroup } from 'lit';
5
7
  /**
6
8
  * The `<skf-checkbox>` component is used to create a checkbox input
@@ -10,13 +12,14 @@ import { type CSSResultGroup } from 'lit';
10
12
  * @attribute {boolean} [disabled=false] - If true, sets disabled state
11
13
  * @attribute {boolean} [required=false] - If true, value is required or must be checked for the form to be submittable
12
14
  *
13
- * @event change {object} - When the value of the input changes
15
+ * @event {Event} change - When the value of the input changes
14
16
  *
15
17
  * @slot - The Radios label. Alternatively, you can use the `label` attribute.
16
18
  *
17
19
  * @tagname skf-checkbox
18
20
  */
19
21
  export declare class SkfCheckbox extends FormBase implements FormFieldBaseProps {
22
+ #private;
20
23
  static styles: CSSResultGroup;
21
24
  /**
22
25
  * @internal
@@ -26,23 +29,19 @@ export declare class SkfCheckbox extends FormBase implements FormFieldBaseProps
26
29
  /** If defined, outputs helping hints in console */
27
30
  debug: boolean;
28
31
  /** If true, outputs helping hints in console */
29
- get checked(): boolean;
30
- set checked(value: boolean);
32
+ checked: boolean;
31
33
  /** If true, forces component to invalid state until removed */
32
34
  customInvalid: boolean;
33
35
  /** If true and the checkbox is unchecked, the checkbox will appear indeterminate */
34
36
  indeterminate: boolean;
35
37
  /** If defined, sets the input's label. Alternatively, you can use the `label` attribute. */
36
38
  label?: string;
39
+ /** Sets the internal language of the component */
40
+ lang: Language;
37
41
  /** If defined, adds name to the input-element */
38
42
  name?: string;
39
- /** If defined, renders an alternative A11y text for the asterisk */
40
- requiredLabel?: string;
41
- /**
42
- * If defined, styles checkbox using provided severity
43
- * @type { "alert" | "success" | "info" | "warning" }
44
- */
45
- severity?: FormFieldBaseProps['severity'];
43
+ /** If defined, styles checkbox using provided severity */
44
+ severity?: FormFieldSeverity;
46
45
  /** If true, displays valid state after interaction */
47
46
  showValid: boolean;
48
47
  /** Size of the checkbox */
@@ -54,9 +53,13 @@ export declare class SkfCheckbox extends FormBase implements FormFieldBaseProps
54
53
  private _invalid;
55
54
  /** @internal */
56
55
  private $input?;
57
- handleCheckedChange(): void;
56
+ /** @internal */
57
+ _handleCheckedChange(): void;
58
+ /** @internal */
58
59
  handleInvalidChange(): void;
60
+ /** @internal */
59
61
  handleDebugInvalid(): void;
62
+ /** @internal */
60
63
  handleCustomInvalidChange(): void;
61
64
  protected firstUpdated(): void;
62
65
  /** @internal */