@skf-design-system/ui-components 1.0.1-beta.1 → 1.0.2-beta.1

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 (299) hide show
  1. package/README.md +13 -26
  2. package/dist/components/accordion/accordion-item.component.d.ts +36 -0
  3. package/dist/components/accordion/accordion-item.component.js +87 -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 +9 -13
  8. package/dist/components/accordion/accordion.component.js +12 -13
  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 +6 -10
  12. package/dist/components/alert/alert.component.js +15 -16
  13. package/dist/components/alert/alert.styles.js +0 -5
  14. package/dist/components/breadcrumb/breadcrumb-item.component.js +61 -0
  15. package/dist/components/breadcrumb/breadcrumb-item.js +6 -0
  16. package/dist/components/breadcrumb/breadcrumb-item.styles.js +62 -0
  17. package/dist/components/breadcrumb/breadcrumb.component.d.ts +2 -2
  18. package/dist/components/breadcrumb/breadcrumb.component.js +60 -0
  19. package/dist/components/breadcrumb/breadcrumb.js +6 -0
  20. package/dist/components/breadcrumb/breadcrumb.styles.js +22 -0
  21. package/dist/components/button/button.component.d.ts +13 -10
  22. package/dist/components/button/button.component.js +83 -76
  23. package/dist/components/button/button.styles.d.ts +1 -2
  24. package/dist/components/button/button.styles.js +1 -1
  25. package/dist/components/card/card.component.d.ts +1 -1
  26. package/dist/components/card/card.component.js +18 -30
  27. package/dist/components/card/card.styles.js +25 -28
  28. package/dist/components/checkbox/checkbox.component.d.ts +16 -14
  29. package/dist/components/checkbox/checkbox.component.js +5 -5
  30. package/dist/components/checkbox/checkbox.styles.d.ts +1 -2
  31. package/dist/components/checkbox/checkbox.styles.js +1 -5
  32. package/dist/components/date-picker/datepicker.calendar.component.d.ts +5 -0
  33. package/dist/components/date-picker/datepicker.calendar.component.js +128 -95
  34. package/dist/components/date-picker/datepicker.calendar.styles.js +35 -25
  35. package/dist/components/date-picker/datepicker.component.d.ts +5 -0
  36. package/dist/components/date-picker/datepicker.component.js +117 -97
  37. package/dist/components/date-picker/datepicker.helpers.d.ts +3 -2
  38. package/dist/components/date-picker/datepicker.helpers.js +46 -39
  39. package/dist/components/date-picker/datepicker.styles.js +14 -26
  40. package/dist/components/date-picker-input/datepicker-input.component.d.ts +14 -5
  41. package/dist/components/date-picker-input/datepicker-input.component.js +264 -219
  42. package/dist/components/date-picker-input/datepicker-input.helpers.d.ts +36 -2
  43. package/dist/components/date-picker-input/datepicker-input.helpers.js +25 -23
  44. package/dist/components/date-picker-input/datepicker-input.styles.js +6 -10
  45. package/dist/components/dialog/dialog.component.d.ts +20 -29
  46. package/dist/components/dialog/dialog.component.js +85 -75
  47. package/dist/components/dialog/dialog.styles.js +4 -4
  48. package/dist/components/divider/divider.component.d.ts +4 -8
  49. package/dist/components/divider/divider.component.js +24 -46
  50. package/dist/components/divider/divider.styles.js +34 -30
  51. package/dist/components/drawer/drawer.component.d.ts +61 -0
  52. package/dist/components/drawer/drawer.component.js +125 -0
  53. package/dist/components/drawer/drawer.d.ts +8 -0
  54. package/dist/components/drawer/drawer.js +6 -0
  55. package/dist/components/drawer/drawer.styles.js +71 -0
  56. package/dist/components/header/header.component.d.ts +46 -0
  57. package/dist/components/header/header.component.js +116 -0
  58. package/dist/components/header/header.d.ts +8 -0
  59. package/dist/components/header/header.js +6 -0
  60. package/dist/components/header/header.styles.js +68 -0
  61. package/dist/components/heading/heading.component.d.ts +3 -11
  62. package/dist/components/heading/heading.component.js +24 -23
  63. package/dist/components/heading/heading.styles.d.ts +1 -2
  64. package/dist/components/heading/heading.styles.js +1 -1
  65. package/dist/components/icon/icon.component.d.ts +11 -17
  66. package/dist/components/icon/icon.component.js +2 -2
  67. package/dist/components/icon/icon.styles.d.ts +1 -2
  68. package/dist/components/icon/icon.styles.js +1 -1
  69. package/dist/components/input/input.component.d.ts +30 -31
  70. package/dist/components/input/input.component.js +138 -125
  71. package/dist/components/input/input.controllers.d.ts +20 -6
  72. package/dist/components/input/input.controllers.js +14 -10
  73. package/dist/components/link/link.component.d.ts +12 -14
  74. package/dist/components/link/link.component.js +35 -34
  75. package/dist/components/link/link.styles.d.ts +1 -2
  76. package/dist/components/link/link.styles.js +24 -20
  77. package/dist/components/loader/loader.component.d.ts +1 -1
  78. package/dist/components/loader/loader.component.js +36 -40
  79. package/dist/components/loader/loader.styles.d.ts +1 -2
  80. package/dist/components/loader/loader.styles.js +40 -32
  81. package/dist/components/logo/logo.component.d.ts +4 -5
  82. package/dist/components/logo/logo.component.js +1 -1
  83. package/dist/components/menu/menu-item.component.d.ts +13 -0
  84. package/dist/components/{menu-item → menu}/menu-item.component.js +3 -3
  85. package/dist/components/menu/menu.component.d.ts +10 -8
  86. package/dist/components/menu/menu.component.js +8 -10
  87. package/dist/components/nav/nav-item.component.d.ts +18 -0
  88. package/dist/components/nav/nav-item.component.js +38 -0
  89. package/dist/components/nav/nav-item.d.ts +8 -0
  90. package/dist/components/nav/nav-item.js +6 -0
  91. package/dist/components/nav/nav-item.styles.js +39 -0
  92. package/dist/components/nav/nav.component.d.ts +17 -0
  93. package/dist/components/nav/nav.component.js +34 -0
  94. package/dist/components/nav/nav.d.ts +8 -0
  95. package/dist/components/nav/nav.js +6 -0
  96. package/dist/components/nav/nav.styles.d.ts +1 -0
  97. package/dist/components/nav/nav.styles.js +17 -0
  98. package/dist/components/popover/popover.component.d.ts +11 -8
  99. package/dist/components/popover/popover.component.js +24 -26
  100. package/dist/components/progress/progress.component.d.ts +2 -2
  101. package/dist/components/progress/progress.component.js +31 -37
  102. package/dist/components/progress/progress.styles.js +40 -35
  103. package/dist/components/radio/radio.component.d.ts +19 -13
  104. package/dist/components/radio/radio.component.js +12 -12
  105. package/dist/components/radio/radio.styles.d.ts +1 -2
  106. package/dist/components/radio/radio.styles.js +1 -1
  107. package/dist/components/segmented-button/segmented-button-item.component.d.ts +36 -0
  108. package/dist/components/segmented-button/segmented-button-item.component.js +56 -0
  109. package/dist/components/segmented-button/segmented-button-item.d.ts +8 -0
  110. package/dist/components/segmented-button/segmented-button-item.js +6 -0
  111. package/dist/components/segmented-button/segmented-button-item.styles.d.ts +1 -0
  112. package/dist/components/segmented-button/segmented-button-item.styles.js +62 -0
  113. package/dist/components/segmented-button/segmented-button.component.d.ts +30 -0
  114. package/dist/components/segmented-button/segmented-button.component.js +73 -0
  115. package/dist/components/segmented-button/segmented-button.d.ts +8 -0
  116. package/dist/components/segmented-button/segmented-button.js +6 -0
  117. package/dist/components/segmented-button/segmented-button.styles.d.ts +1 -0
  118. package/dist/components/segmented-button/segmented-button.styles.js +16 -0
  119. package/dist/components/{select-option-group → select}/select-option-group.component.js +1 -1
  120. package/dist/components/select/select-option-group.style.d.ts +1 -0
  121. package/dist/components/{select-option → select}/select-option.component.d.ts +7 -8
  122. package/dist/components/{select-option → select}/select-option.component.js +15 -15
  123. package/dist/components/select/select-option.controllers.d.ts +15 -0
  124. package/dist/components/select/select-option.styles.d.ts +1 -0
  125. package/dist/components/select/select.component.d.ts +16 -15
  126. package/dist/components/select/select.component.js +19 -19
  127. package/dist/components/select/select.controllers.d.ts +21 -10
  128. package/dist/components/select/select.controllers.js +31 -23
  129. package/dist/components/select/select.stories.icons.d.ts +7 -0
  130. package/dist/components/{stepper-item → stepper}/stepper-item.component.js +8 -8
  131. package/dist/components/stepper/stepper-item.styles.d.ts +1 -0
  132. package/dist/components/stepper/stepper.component.d.ts +4 -3
  133. package/dist/components/stepper/stepper.component.js +15 -15
  134. package/dist/components/stepper/stepper.helpers.d.ts +1 -1
  135. package/dist/components/switch/switch.component.d.ts +7 -6
  136. package/dist/components/switch/switch.component.js +21 -21
  137. package/dist/components/tab/tab.component.js +1 -1
  138. package/dist/components/tab-group/tab-group.component.js +1 -1
  139. package/dist/components/tab-panel/tab-panel.component.js +1 -1
  140. package/dist/components/tag/tag.component.d.ts +14 -16
  141. package/dist/components/tag/tag.component.js +36 -39
  142. package/dist/components/textarea/textarea.component.d.ts +10 -11
  143. package/dist/components/textarea/textarea.component.js +65 -67
  144. package/dist/components/{toast-item → toast}/toast-item.d.ts +2 -0
  145. package/dist/components/{toast-item → toast}/toast-item.js +4 -0
  146. package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.js +1 -1
  147. package/dist/components/toast/toast-wrapper.styles.d.ts +1 -0
  148. package/dist/components/toast/toast.component.d.ts +6 -5
  149. package/dist/components/toast/toast.component.js +15 -15
  150. package/dist/components/toast/toast.singleton.d.ts +4 -4
  151. package/dist/components/toast/toast.singleton.js +12 -12
  152. package/dist/components/tooltip/tooltip.component.d.ts +7 -7
  153. package/dist/components/tooltip/tooltip.component.js +16 -11
  154. package/dist/custom-elements.json +2718 -2073
  155. package/dist/index.d.ts +16 -6
  156. package/dist/index.js +103 -75
  157. package/dist/internal/base-classes/popover/popover.base.d.ts +24 -9
  158. package/dist/internal/base-classes/popover/popover.base.js +138 -77
  159. package/dist/internal/base-classes/popover/popover.styles.js +14 -1
  160. package/dist/internal/components/hint/hint.component.d.ts +2 -2
  161. package/dist/internal/components/hint/hint.component.js +2 -2
  162. package/dist/internal/components/hint/hint.styles.d.ts +1 -2
  163. package/dist/internal/components/hint/hint.styles.js +1 -1
  164. package/dist/internal/constants/iconSeverity.d.ts +3 -2
  165. package/dist/internal/constants/iconSeverity.js +2 -3
  166. package/dist/internal/controllers/elementOverflowController.d.ts +13 -0
  167. package/dist/internal/controllers/popover.controller.d.ts +12 -7
  168. package/dist/internal/controllers/popover.controller.js +9 -14
  169. package/dist/internal/helpers/hintSeverity.d.ts +2 -2
  170. package/dist/internal/helpers/hintSeverity.js +1 -1
  171. package/dist/internal/helpers/utilityTypes.d.ts +1 -1
  172. package/dist/internal/helpers/uuid.d.ts +15 -0
  173. package/dist/internal/helpers/uuid.js +14 -0
  174. package/dist/internal/storybook/styles.d.ts +1 -0
  175. package/dist/internal/types/formField.d.ts +1 -1
  176. package/dist/internal/types.d.ts +18 -0
  177. package/dist/styles/component.styles.d.ts +1 -2
  178. package/dist/styles/component.styles.js +1 -1
  179. package/dist/styles/form-field.styles.js +11 -6
  180. package/dist/styles/global.css +1 -1
  181. package/dist/types/jsx/custom-element-jsx.d.ts +673 -1310
  182. package/dist/types/vue/index.d.ts +456 -319
  183. package/dist/vscode.html-custom-data.json +402 -1080
  184. package/dist/web-types.json +986 -767
  185. package/package.json +44 -55
  186. package/dist/components/collapse/collapse.component.d.ts +0 -40
  187. package/dist/components/collapse/collapse.component.js +0 -86
  188. package/dist/components/collapse/collapse.d.ts +0 -8
  189. package/dist/components/collapse/collapse.js +0 -6
  190. package/dist/components/collapse/collapse.styles.d.ts +0 -2
  191. package/dist/components/collapse/collapse.styles.js +0 -77
  192. package/dist/components/menu-item/menu-item.component.d.ts +0 -25
  193. package/dist/components/select-option/select-option.controllers.d.ts +0 -9
  194. package/dist/internal/constants/heading.d.ts +0 -2
  195. package/dist/react/index.d.ts +0 -36
  196. package/dist/react/index.js +0 -36
  197. package/dist/react/skf-accordion/index.d.ts +0 -3
  198. package/dist/react/skf-accordion/index.js +0 -13
  199. package/dist/react/skf-alert/index.d.ts +0 -9
  200. package/dist/react/skf-alert/index.js +0 -17
  201. package/dist/react/skf-breadcrumb/index.d.ts +0 -9
  202. package/dist/react/skf-breadcrumb/index.js +0 -17
  203. package/dist/react/skf-breadcrumb-item/index.d.ts +0 -3
  204. package/dist/react/skf-breadcrumb-item/index.js +0 -13
  205. package/dist/react/skf-button/index.d.ts +0 -9
  206. package/dist/react/skf-button/index.js +0 -17
  207. package/dist/react/skf-card/index.d.ts +0 -3
  208. package/dist/react/skf-card/index.js +0 -13
  209. package/dist/react/skf-checkbox/index.d.ts +0 -9
  210. package/dist/react/skf-checkbox/index.js +0 -17
  211. package/dist/react/skf-collapse/index.d.ts +0 -9
  212. package/dist/react/skf-collapse/index.js +0 -17
  213. package/dist/react/skf-datepicker/index.d.ts +0 -12
  214. package/dist/react/skf-datepicker/index.js +0 -18
  215. package/dist/react/skf-dialog/index.d.ts +0 -15
  216. package/dist/react/skf-dialog/index.js +0 -19
  217. package/dist/react/skf-divider/index.d.ts +0 -3
  218. package/dist/react/skf-divider/index.js +0 -13
  219. package/dist/react/skf-heading/index.d.ts +0 -3
  220. package/dist/react/skf-heading/index.js +0 -13
  221. package/dist/react/skf-icon/index.d.ts +0 -3
  222. package/dist/react/skf-icon/index.js +0 -13
  223. package/dist/react/skf-input/index.d.ts +0 -12
  224. package/dist/react/skf-input/index.js +0 -18
  225. package/dist/react/skf-link/index.d.ts +0 -3
  226. package/dist/react/skf-link/index.js +0 -13
  227. package/dist/react/skf-loader/index.d.ts +0 -3
  228. package/dist/react/skf-loader/index.js +0 -13
  229. package/dist/react/skf-logo/index.d.ts +0 -3
  230. package/dist/react/skf-logo/index.js +0 -13
  231. package/dist/react/skf-menu/index.d.ts +0 -12
  232. package/dist/react/skf-menu/index.js +0 -18
  233. package/dist/react/skf-menu-item/index.d.ts +0 -27
  234. package/dist/react/skf-menu-item/index.js +0 -23
  235. package/dist/react/skf-popover/index.d.ts +0 -12
  236. package/dist/react/skf-popover/index.js +0 -18
  237. package/dist/react/skf-progress/index.d.ts +0 -3
  238. package/dist/react/skf-progress/index.js +0 -13
  239. package/dist/react/skf-radio/index.d.ts +0 -9
  240. package/dist/react/skf-radio/index.js +0 -17
  241. package/dist/react/skf-select/index.d.ts +0 -21
  242. package/dist/react/skf-select/index.js +0 -21
  243. package/dist/react/skf-select-option/index.d.ts +0 -9
  244. package/dist/react/skf-select-option/index.js +0 -17
  245. package/dist/react/skf-select-option-group/index.d.ts +0 -3
  246. package/dist/react/skf-select-option-group/index.js +0 -13
  247. package/dist/react/skf-stepper/index.d.ts +0 -9
  248. package/dist/react/skf-stepper/index.js +0 -17
  249. package/dist/react/skf-stepper-item/index.d.ts +0 -9
  250. package/dist/react/skf-stepper-item/index.js +0 -17
  251. package/dist/react/skf-switch/index.d.ts +0 -3
  252. package/dist/react/skf-switch/index.js +0 -13
  253. package/dist/react/skf-tab/index.d.ts +0 -12
  254. package/dist/react/skf-tab/index.js +0 -18
  255. package/dist/react/skf-tab-group/index.d.ts +0 -3
  256. package/dist/react/skf-tab-group/index.js +0 -13
  257. package/dist/react/skf-tab-panel/index.d.ts +0 -3
  258. package/dist/react/skf-tab-panel/index.js +0 -13
  259. package/dist/react/skf-tag/index.d.ts +0 -3
  260. package/dist/react/skf-tag/index.js +0 -13
  261. package/dist/react/skf-textarea/index.d.ts +0 -12
  262. package/dist/react/skf-textarea/index.js +0 -18
  263. package/dist/react/skf-toast/index.d.ts +0 -3
  264. package/dist/react/skf-toast/index.js +0 -13
  265. package/dist/react/skf-toast-wrapper/index.d.ts +0 -3
  266. package/dist/react/skf-toast-wrapper/index.js +0 -13
  267. package/dist/react/skf-tooltip/index.d.ts +0 -12
  268. package/dist/react/skf-tooltip/index.js +0 -18
  269. /package/dist/components/{breadcrumb-item/breadcrumb-item.styles.d.ts → accordion/accordion-item.styles.d.ts} +0 -0
  270. /package/dist/components/{collapse/collapse.test.d.ts → accordion/accordion-item.test.d.ts} +0 -0
  271. /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.component.d.ts +0 -0
  272. /package/dist/components/{breadcrumb-item → breadcrumb}/breadcrumb-item.d.ts +0 -0
  273. /package/dist/components/{menu-item/menu-item.styles.d.ts → breadcrumb/breadcrumb-item.styles.d.ts} +0 -0
  274. /package/dist/components/{select-option-group/select-option-group.style.d.ts → drawer/drawer.styles.d.ts} +0 -0
  275. /package/dist/components/{select-option/select-option.styles.d.ts → header/header.styles.d.ts} +0 -0
  276. /package/dist/components/{menu-item → menu}/menu-item.d.ts +0 -0
  277. /package/dist/components/{menu-item → menu}/menu-item.js +0 -0
  278. /package/dist/components/{stepper-item/stepper-item.styles.d.ts → menu/menu-item.styles.d.ts} +0 -0
  279. /package/dist/components/{menu-item → menu}/menu-item.styles.js +0 -0
  280. /package/dist/components/{toast-wrapper/toast-wrapper.styles.d.ts → nav/nav-item.styles.d.ts} +0 -0
  281. /package/dist/components/{select-option-group → select}/select-option-group.component.d.ts +0 -0
  282. /package/dist/components/{select-option-group → select}/select-option-group.d.ts +0 -0
  283. /package/dist/components/{select-option-group → select}/select-option-group.js +0 -0
  284. /package/dist/components/{select-option-group → select}/select-option-group.style.js +0 -0
  285. /package/dist/components/{select-option → select}/select-option.d.ts +0 -0
  286. /package/dist/components/{select-option → select}/select-option.js +0 -0
  287. /package/dist/components/{select-option → select}/select-option.styles.js +0 -0
  288. /package/dist/components/{stepper-item → stepper}/stepper-item.component.d.ts +0 -0
  289. /package/dist/components/{stepper-item → stepper}/stepper-item.d.ts +0 -0
  290. /package/dist/components/{stepper-item → stepper}/stepper-item.js +0 -0
  291. /package/dist/components/{stepper-item → stepper}/stepper-item.styles.js +0 -0
  292. /package/dist/components/{toast-item → toast}/toast-item.component.d.ts +0 -0
  293. /package/dist/components/{toast-item → toast}/toast-item.component.js +0 -0
  294. /package/dist/components/{toast-item → toast}/toast-item.styles.d.ts +0 -0
  295. /package/dist/components/{toast-item → toast}/toast-item.styles.js +0 -0
  296. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.component.d.ts +0 -0
  297. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.d.ts +0 -0
  298. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.js +0 -0
  299. /package/dist/components/{toast-wrapper → toast}/toast-wrapper.styles.js +0 -0
@@ -1,9 +1,10 @@
1
- import { raiseError as l } from "../../internal/helpers/raiseError.js";
1
+ import { raiseError as a } from "../../internal/helpers/raiseError.js";
2
2
  class d {
3
3
  constructor(t) {
4
4
  this._globalClickHandler = (e) => {
5
- e.target.closest(this.host.localName) || (this.host._expanded = !1);
6
- }, this.host = t, t.addController(this);
5
+ var i;
6
+ !((i = this.host) != null && i.localName) || e.target.closest(this.host.localName) || (this.host._expanded = !1);
7
+ }, (this.host = t).addController(this);
7
8
  }
8
9
  // hostConnected() {
9
10
  // this.enableGlobalClickDetection();
@@ -12,7 +13,8 @@ class d {
12
13
  this.disableGlobalClickDetection();
13
14
  }
14
15
  hostUpdated() {
15
- this.host._expanded ? this.enableGlobalClickDetection() : this.disableGlobalClickDetection();
16
+ var t;
17
+ (t = this.host) != null && t._expanded ? this.enableGlobalClickDetection() : this.disableGlobalClickDetection();
16
18
  }
17
19
  enableGlobalClickDetection() {
18
20
  document.addEventListener("click", this._globalClickHandler);
@@ -35,18 +37,19 @@ class p {
35
37
  e.preventDefault(), this._selectFocusedOption(e.target);
36
38
  break;
37
39
  case "Escape":
38
- e.preventDefault(), this.host._expanded = !1, setTimeout(() => {
40
+ e.preventDefault(), this.host && (this.host._expanded = !1), setTimeout(() => {
39
41
  this.host.focus();
40
42
  });
41
43
  break;
42
44
  }
43
- }, this.host = t, t.addController(this), this._listenerActivated = !1;
45
+ }, (this.host = t).addController(this), this._listenerActivated = !1;
44
46
  }
45
47
  hostDisconnected() {
46
48
  this.removeKeyboardListener();
47
49
  }
48
50
  hostUpdated() {
49
- this.host._expanded && !this._listenerActivated && this.setupKeyboardListener(), !this.host._expanded && this._listenerActivated && this.removeKeyboardListener();
51
+ var t, e;
52
+ (t = this.host) != null && t._expanded && !this._listenerActivated && this.setupKeyboardListener(), !((e = this.host) != null && e._expanded) && this._listenerActivated && this.removeKeyboardListener();
50
53
  }
51
54
  setupKeyboardListener() {
52
55
  this._listenerActivated = !0, this.host.addEventListener("keydown", this._handleKeyDown);
@@ -61,52 +64,57 @@ class p {
61
64
  });
62
65
  }
63
66
  _focusSiblingOption(t) {
64
- const e = (n) => n === document.activeElement, s = this._selectableOptions.find((n) => e(n));
67
+ const e = (l) => l === document.activeElement, s = this._selectableOptions.find((l) => e(l));
65
68
  if (!s) {
66
69
  this._focusFirstOption();
67
70
  return;
68
71
  }
69
- const r = this._selectableOptions.indexOf(s);
70
- let i = r - 1, o = r + 1;
71
- i < 0 && (i = this._selectableOptions.length - 1), o >= this._selectableOptions.length && (o = 0);
72
- const h = this._selectableOptions[t === "next" ? o : i];
72
+ const i = this._selectableOptions.indexOf(s);
73
+ let o = i - 1, n = i + 1;
74
+ o < 0 && (o = this._selectableOptions.length - 1), n >= this._selectableOptions.length && (n = 0);
75
+ const h = this._selectableOptions[t === "next" ? n : o];
73
76
  s.blur(), h.focus();
74
77
  }
75
78
  _selectFocusedOption(t) {
76
79
  t.selected = !0;
77
80
  }
78
81
  get _selectableOptions() {
79
- return this.host._optionsList.filter((t) => !t.disabled);
82
+ return !this.host || !this.host._optionsList ? [] : this.host._optionsList.filter((t) => !t.disabled);
80
83
  }
81
84
  }
82
- class b {
85
+ class u {
83
86
  constructor(t) {
84
- this.host = t, t.addController(this);
87
+ (this.host = t).addController(this);
85
88
  }
86
89
  hostConnected() {
87
90
  this._badAttributeCombinationWarning();
88
91
  }
89
92
  _badAttributeCombinationWarning() {
90
- l({
93
+ if (!this.host) return;
94
+ const t = this.host.localName ?? "never";
95
+ a({
91
96
  assert: (this.host.min ?? 0) <= (this.host.max ?? 1 / 0),
92
97
  reason: "attribute-mismatch",
93
- replaceStrings: [this.host.localName, "min", "smaller than max"]
94
- }), l({
98
+ replaceStrings: [t, "min", "smaller than max"]
99
+ }), a({
95
100
  assert: (
96
101
  // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
97
102
  (this.host.min || this.host.max) && this.host.multiple || !(this.host.min && this.host.max)
98
103
  ),
99
104
  reason: "attribute-mismatch",
100
- replaceStrings: [this.host.localName, "min or max", "together with multiple"]
101
- }), l({
102
- assert: (this.host.hideTags && this.host.multiple) ?? !this.host.hideTags,
105
+ replaceStrings: [t, "min or max", "together with multiple"]
106
+ });
107
+ const e = this.host.hideTags && this.host.multiple, s = !this.host.hideTags;
108
+ a({
109
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing
110
+ assert: e || s,
103
111
  reason: "attribute-mismatch",
104
- replaceStrings: [this.host.localName, "hide-tags", "together with multiple"]
112
+ replaceStrings: [t, "hide-tags", "together with multiple"]
105
113
  });
106
114
  }
107
115
  }
108
116
  export {
109
- b as DeveloperFeedbackController,
117
+ u as DeveloperFeedbackController,
110
118
  d as GlobalClickController,
111
119
  p as KeyboardNavigationController
112
120
  };
@@ -0,0 +1,7 @@
1
+ export declare const icons: {
2
+ dummy1: import("lit").TemplateResult<1>;
3
+ dummy4: import("lit").TemplateResult<1>;
4
+ dummy5: import("lit").TemplateResult<1>;
5
+ dummy6: import("lit").TemplateResult<1>;
6
+ dummy7: import("lit").TemplateResult<1>;
7
+ };
@@ -6,17 +6,17 @@ var d = (e, i, t) => (u(e, i, "read from private field"), t ? t.call(e) : i.get(
6
6
  import "../icon/icon.js";
7
7
  import { SkfElement as b } from "../../internal/components/skf-element.js";
8
8
  import { watch as g } from "../../internal/helpers/watch.js";
9
- import C from "../../styles/component.styles.js";
9
+ import { componentStyles as C } from "../../styles/component.styles.js";
10
10
  import "lit";
11
11
  import { property as y, state as c } from "lit/decorators.js";
12
12
  import { classMap as $ } from "lit/directives/class-map.js";
13
13
  import { ifDefined as x } from "lit/directives/if-defined.js";
14
- import { literal as w, unsafeStatic as U, html as S } from "lit/static-html.js";
15
- import { styles as I } from "./stepper-item.styles.js";
16
- var O = Object.defineProperty, P = Object.getOwnPropertyDescriptor, l = (e, i, t, s) => {
17
- for (var p = s > 1 ? void 0 : s ? P(i, t) : i, h = e.length - 1, m; h >= 0; h--)
14
+ import { literal as w, html as S } from "lit/static-html.js";
15
+ import { styles as U } from "./stepper-item.styles.js";
16
+ var I = Object.defineProperty, O = Object.getOwnPropertyDescriptor, l = (e, i, t, s) => {
17
+ for (var p = s > 1 ? void 0 : s ? O(i, t) : i, h = e.length - 1, m; h >= 0; h--)
18
18
  (m = e[h]) && (p = (s ? m(i, t, p) : m(p)) || p);
19
- return s && p && O(i, t, p), p;
19
+ return s && p && I(i, t, p), p;
20
20
  }, o, n;
21
21
  const f = class f extends b {
22
22
  constructor() {
@@ -60,7 +60,7 @@ const f = class f extends b {
60
60
  }), r(this, n, !1);
61
61
  }
62
62
  render() {
63
- const t = this._linear ? "div" : "button", s = w`${U(t)}`;
63
+ const t = this._linear ? "div" : "button", s = w`${t}`;
64
64
  return S`
65
65
  <${s}
66
66
  @click=${this._handleClick}
@@ -82,7 +82,7 @@ const f = class f extends b {
82
82
  `;
83
83
  }
84
84
  };
85
- o = new WeakMap(), n = new WeakMap(), f.styles = [C, I];
85
+ o = new WeakMap(), n = new WeakMap(), f.styles = [C, U];
86
86
  let a = f;
87
87
  l([
88
88
  y({ reflect: !0 })
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -1,14 +1,14 @@
1
- import type { SkfStepperItem } from '../stepper-item/stepper-item.component.js';
2
1
  import { SkfElement } from '../../internal/components/skf-element';
3
2
  import { type CSSResultGroup } from 'lit';
3
+ import type { SkfStepperItem } from './stepper-item.component.js';
4
4
  /**
5
5
  * The `<skf-stepper>` is a component that displays a list of actions or options.
6
6
  *
7
- * @documentation See [zeroheight](https://zeroheight.com/****) for design principles
7
+ * @documentation See [zeroheight](https://zeroheight.com/853e936c9/p/842a0a-stepper) for design principles
8
8
  *
9
9
  * @slot - One or more `<skf-stepper-item>`
10
10
  *
11
- * @event skf-stepper-item-select - Dispatched when the stepper item is selected
11
+ * @event {CustomEvent} skf-stepper-item-select - Dispatched when the stepper item is selected
12
12
  *
13
13
  * @tagname skf-stepper
14
14
  */
@@ -27,6 +27,7 @@ export declare class SkfStepper extends SkfElement {
27
27
  _handleActiveIndexChanged(): void;
28
28
  /** @internal */
29
29
  _handleLinearMode(): void;
30
+ /** @internal */
30
31
  private _handleSelected;
31
32
  /** @internal */
32
33
  private _resetActive;
@@ -2,30 +2,30 @@ var p = (t) => {
2
2
  throw TypeError(t);
3
3
  };
4
4
  var m = (t, i, e) => i.has(t) || p("Cannot " + e);
5
- var _ = (t, i, e) => (m(t, i, "read from private field"), e ? e.call(t) : i.get(t)), f = (t, i, e) => i.has(t) ? p("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, e), l = (t, i, e, s) => (m(t, i, "write to private field"), s ? s.call(t, e) : i.set(t, e), e);
5
+ var _ = (t, i, e) => (m(t, i, "read from private field"), e ? e.call(t) : i.get(t)), v = (t, i, e) => i.has(t) ? p("Cannot add the same private member more than once") : i instanceof WeakSet ? i.add(t) : i.set(t, e), l = (t, i, e, s) => (m(t, i, "write to private field"), s ? s.call(t, e) : i.set(t, e), e);
6
6
  import { SkfElement as I } from "../../internal/components/skf-element.js";
7
- import { watch as v } from "../../internal/helpers/watch.js";
8
- import u from "../../styles/component.styles.js";
7
+ import { watch as f } from "../../internal/helpers/watch.js";
8
+ import { componentStyles as u } from "../../styles/component.styles.js";
9
9
  import { html as g } from "lit";
10
10
  import { property as x, queryAssignedElements as y } from "lit/decorators.js";
11
11
  import { classMap as A } from "lit/directives/class-map.js";
12
12
  import { stepperState as C } from "./stepper.helpers.js";
13
13
  import { styles as b } from "./stepper.styles.js";
14
14
  var E = Object.defineProperty, S = Object.getOwnPropertyDescriptor, h = (t, i, e, s) => {
15
- for (var n = s > 1 ? void 0 : s ? S(i, e) : i, r = t.length - 1, d; r >= 0; r--)
16
- (d = t[r]) && (n = (s ? d(i, e, n) : d(n)) || n);
15
+ for (var n = s > 1 ? void 0 : s ? S(i, e) : i, r = t.length - 1, o; r >= 0; r--)
16
+ (o = t[r]) && (n = (s ? o(i, e, n) : o(n)) || n);
17
17
  return s && n && E(i, e, n), n;
18
- }, o;
18
+ }, d;
19
19
  const c = class c extends I {
20
20
  constructor() {
21
21
  super();
22
- f(this, o);
23
- l(this, o, !1), this.activeIndex = -1, this.linear = !1, this._handleSelected = (e) => {
24
- if (!_(this, o)) return;
25
- const { item: s, triggerActiveIndexUpdate: n } = e.detail, r = [...this._items ?? []].findIndex((d) => d === s);
22
+ v(this, d);
23
+ l(this, d, !1), this.activeIndex = -1, this.linear = !1, this._handleSelected = (e) => {
24
+ if (!_(this, d)) return;
25
+ const { item: s, triggerActiveIndexUpdate: n } = e.detail, r = [...this._items ?? []].findIndex((o) => o === s);
26
26
  r === this.activeIndex ? this._handleActiveIndexChanged() : (n && this._resetActive(r), this.activeIndex = r);
27
27
  }, this._handleSlotChanged = () => {
28
- l(this, o, !0), this.activeIndex = this._getCurrentActiveIndex();
28
+ l(this, d, !0), this.activeIndex = this._getCurrentActiveIndex();
29
29
  }, this.addEventListener("skf-stepper-item-select", this._handleSelected);
30
30
  }
31
31
  firstUpdated() {
@@ -69,10 +69,10 @@ const c = class c extends I {
69
69
  `;
70
70
  }
71
71
  };
72
- o = new WeakMap(), c.styles = [u, b];
72
+ d = new WeakMap(), c.styles = [u, b];
73
73
  let a = c;
74
74
  h([
75
- x({ type: Number })
75
+ x({ type: Number, attribute: "active-index" })
76
76
  ], a.prototype, "activeIndex", 2);
77
77
  h([
78
78
  x({ type: Boolean })
@@ -81,10 +81,10 @@ h([
81
81
  y()
82
82
  ], a.prototype, "_items", 2);
83
83
  h([
84
- v("activeIndex")
84
+ f("activeIndex")
85
85
  ], a.prototype, "_handleActiveIndexChanged", 1);
86
86
  h([
87
- v("linear")
87
+ f("linear")
88
88
  ], a.prototype, "_handleLinearMode", 1);
89
89
  export {
90
90
  a as SkfStepper
@@ -1,4 +1,4 @@
1
- import type { SkfStepperItem, SkfStepperItemState } from '../stepper-item/stepper-item.component.js';
1
+ import type { SkfStepperItem, SkfStepperItemState } from './stepper-item.component.js';
2
2
  import type { SkfStepper } from './stepper.component.js';
3
3
  interface StepperStateProps extends Pick<SkfStepper, '_items' | 'linear'>, Pick<SkfStepperItem, 'state'> {
4
4
  items: SkfStepperItem[];
@@ -4,10 +4,10 @@ import { type CSSResultGroup } from 'lit';
4
4
  /**
5
5
  * The `<skf-switch>` is a component that displays a list of actions or options
6
6
  *
7
- * @documentation See [InVision DSM](https://skf.invisionapp.com/dsm/ab-skf/4-web-applications/nav/5fa7caf78c01200018354495/asset/6229d63d9fe16020a60657e5) for design principles
7
+ * See [zeroheight](https://zeroheight.com/853e936c9/p/7282a2-switch) for design principle
8
8
  *
9
- * @attribute {boolean} disabled - If true, sets disabled state
10
- * @attribute {boolean} required - If true, value is required or must be checked for the form to be submittable
9
+ * @attribute {boolean} [disabled=false] - If true, sets disabled state
10
+ * @attribute {boolean} [required=false] - If true, value is required or must be checked for the form to be submittable
11
11
  *
12
12
  * @slot - The Switchs label. Alternatively, you can use the `label` attribute.
13
13
  *
@@ -15,13 +15,14 @@ import { type CSSResultGroup } from 'lit';
15
15
  */
16
16
  export declare class SkfSwitch extends FormBase implements FormFieldBaseProps {
17
17
  static styles: CSSResultGroup;
18
+ /** @internal */
18
19
  private _initialChecked;
19
20
  /** If true, outputs helping hints in console */
20
- debug?: boolean;
21
+ debug: boolean;
21
22
  /** If true, outputs helping hints in console */
22
- checked?: boolean;
23
+ checked: boolean;
23
24
  /** If true, hides the label visually */
24
- hideLabel?: boolean;
25
+ hideLabel: boolean;
25
26
  /** If defined, sets the input's label unless the default slot is used. Alternatively, you can use the `label` attribute. */
26
27
  label?: string;
27
28
  /** If defined, adds name to the input-element */
@@ -1,21 +1,21 @@
1
1
  import { FormBase as o } from "../../internal/components/formBase.js";
2
2
  import { Asterisk as u } from "../../internal/templates/asterisk.js";
3
- import p from "../../styles/component.styles.js";
4
- import { html as c } from "lit";
5
- import { property as s, state as v, query as f } from "lit/decorators.js";
6
- import { classMap as m } from "lit/directives/class-map.js";
7
- import { ifDefined as _ } from "lit/directives/if-defined.js";
8
- import { styles as b } from "./switch.styles.js";
9
- var y = Object.defineProperty, i = (d, e, a, g) => {
10
- for (var l = void 0, r = d.length - 1, n; r >= 0; r--)
11
- (n = d[r]) && (l = n(e, a, l) || l);
12
- return l && y(e, a, l), l;
3
+ import { componentStyles as p } from "../../styles/component.styles.js";
4
+ import { nothing as c, html as v } from "lit";
5
+ import { property as s, state as f, query as m } from "lit/decorators.js";
6
+ import { classMap as _ } from "lit/directives/class-map.js";
7
+ import { ifDefined as b } from "lit/directives/if-defined.js";
8
+ import { styles as y } from "./switch.styles.js";
9
+ var g = Object.defineProperty, i = (d, e, a, k) => {
10
+ for (var l = void 0, h = d.length - 1, n; h >= 0; h--)
11
+ (n = d[h]) && (l = n(e, a, l) || l);
12
+ return l && g(e, a, l), l;
13
13
  };
14
- const h = class h extends o {
14
+ const r = class r extends o {
15
15
  constructor() {
16
- super(...arguments), this._initialChecked = !1, this.size = "md", this.value = "", this._invalid = !1, this._handleChange = (e) => {
16
+ super(...arguments), this._initialChecked = !1, this.debug = !1, this.checked = !1, this.hideLabel = !1, this.size = "md", this.value = "", this._invalid = !1, this._handleChange = (e) => {
17
17
  var a;
18
- e.stopPropagation(), this.pristine = !1, this.checked = (a = this.$input) == null ? void 0 : a.checked, this._validateInput(), this.checked ? this.setFormValue(this.value) : this.setFormValue(null), this.emitEvent("change");
18
+ e.stopPropagation(), this.pristine = !1, this.checked = ((a = this.$input) == null ? void 0 : a.checked) ?? !1, this._validateInput(), this.checked ? this.setFormValue(this.value) : this.setFormValue(null), this.emitEvent("change");
19
19
  }, this._handleInvalid = (e) => {
20
20
  this.pristine = !1, this._invalid = !0, this.customErrorDisplay && e.preventDefault();
21
21
  }, this._resetValue = (e) => {
@@ -51,9 +51,9 @@ const h = class h extends o {
51
51
  this.setValidity({});
52
52
  }
53
53
  render() {
54
- return c`
54
+ return v`
55
55
  <label
56
- class=${m({
56
+ class=${_({
57
57
  switch: !0,
58
58
  "switch--small": this.size === "sm"
59
59
  })}
@@ -67,11 +67,11 @@ const h = class h extends o {
67
67
  @reset=${this._resetValue}
68
68
  aria-invalid=${!!this._invalid}
69
69
  class="switch__input"
70
- name=${_(this.name)}
70
+ name=${b(this.name)}
71
71
  type="checkbox"
72
72
  value=${this.value}
73
73
  />
74
- <div class="switch__label">
74
+ <div class="switch__label ${this.hideLabel ? "visually-hidden" : c}">
75
75
  <slot>${this.label}</slot>
76
76
  ${this.required ? u(this.requiredLabel, "switch__asterisk") : null}
77
77
  </div>
@@ -79,8 +79,8 @@ const h = class h extends o {
79
79
  `;
80
80
  }
81
81
  };
82
- h.styles = [p, b];
83
- let t = h;
82
+ r.styles = [p, y];
83
+ let t = r;
84
84
  i([
85
85
  s({ type: Boolean })
86
86
  ], t.prototype, "debug");
@@ -106,10 +106,10 @@ i([
106
106
  s()
107
107
  ], t.prototype, "value");
108
108
  i([
109
- v()
109
+ f()
110
110
  ], t.prototype, "_invalid");
111
111
  i([
112
- f("input")
112
+ m("input")
113
113
  ], t.prototype, "$input");
114
114
  export {
115
115
  t as SkfSwitch
@@ -1,6 +1,6 @@
1
1
  import { SkfElement as n } from "../../internal/components/skf-element.js";
2
2
  import { watch as h } from "../../internal/helpers/watch.js";
3
- import m from "../../styles/component.styles.js";
3
+ import { componentStyles as m } from "../../styles/component.styles.js";
4
4
  import { html as f } from "lit";
5
5
  import { property as v, state as d } from "lit/decorators.js";
6
6
  import { classMap as b } from "lit/directives/class-map.js";
@@ -1,6 +1,6 @@
1
1
  import "../card/card.js";
2
2
  import { SkfElement as c } from "../../internal/components/skf-element.js";
3
- import b from "../../styles/component.styles.js";
3
+ import { componentStyles as b } from "../../styles/component.styles.js";
4
4
  import { html as f } from "lit";
5
5
  import { property as o, queryAssignedElements as p } from "lit/decorators.js";
6
6
  import { classMap as u } from "lit/directives/class-map.js";
@@ -1,6 +1,6 @@
1
1
  import { SkfElement as c } from "../../internal/components/skf-element.js";
2
2
  import { watch as h } from "../../internal/helpers/watch.js";
3
- import l from "../../styles/component.styles.js";
3
+ import { componentStyles as l } from "../../styles/component.styles.js";
4
4
  import { html as v } from "lit";
5
5
  import { property as f, state as d } from "lit/decorators.js";
6
6
  import { styles as y } from "./tab-panel.styles.js";
@@ -1,6 +1,6 @@
1
1
  import '../icon/icon.js';
2
2
  import { SkfElement } from '../../internal/components/skf-element';
3
- import type { Icon, SeverityBgColor } from '@skf-design-system/ui-assets';
3
+ import type { Icon, Severity } from '../../internal/types.js';
4
4
  import { type CSSResultGroup } from 'lit';
5
5
  /**
6
6
  * The `<skf-tag>` is a component that displays a list of actions or options
@@ -13,20 +13,16 @@ import { type CSSResultGroup } from 'lit';
13
13
  */
14
14
  export declare class SkfTag extends SkfElement {
15
15
  static styles: CSSResultGroup;
16
+ /** @internal */
16
17
  private _onClick?;
18
+ /** @internal */
17
19
  protected _onRemove?: (event: Event) => void;
18
20
  /** Specifies Tag size */
19
- size: 'sm' | 'md' | 'lg';
20
- /**
21
- * If defined, displays leading/provided icon
22
- * @type { "arrowDown" | "arrowDownUp" | "arrowLeft" | "arrowRight" | "arrowUp" | "article" | "artificialIntelligence" | "asset" | "attachment" | "bandCursor" | "bands" | "batteryEmpty" | "batteryFull" | "batteryLow" | "bearingFault" | "book" | "bulb" | "burger" | "cPM" | "calendar" | "calendarBooked" | "calendarEmpty" | "calendarNotBooked" | "calendarRecurring" | "caretDown" | "caretUp" | "caretUpDown" | "chat" | "check" | "checkCircle" | "checkSmall" | "chevronDown" | "chevronLeft" | "chevronRight" | "chevronUp" | "chevronUpDown" | "close" | "closeAllFaults" | "closeFault" | "closeSmall" | "columnGraph" | "comment" | "connection1" | "connection2" | "connection3" | "connection4" | "danger" | "defectFrequencies" | "defectFrequenciesAlternative" | "doubleChevronLeft" | "doubleChevronRight" | "download" | "draft" | "draftFilled" | "draftOutlined" | "dragNDrop" | "drop" | "duplicate" | "edit" | "emailFilled" | "emailOutlined" | "exclamation" | "eye" | "eyeHidden" | "eyeVisible" | "filter" | "forbidden" | "fullScreen" | "fullScreenExit" | "functionalLocation" | "harmonicCursor" | "heatmap" | "hierarchy" | "history" | "historyAlt" | "hourglassFramedFilled" | "hourglassFramedOutlined" | "hourglassOutlined" | "hz" | "iMX" | "image" | "infoCircleFilled" | "infoCircleOutlined" | "integration" | "kebab" | "link" | "listGroup" | "listItem" | "locationPin" | "lock" | "logOut" | "meatballs" | "microphone" | "minus" | "minusSmall" | "noData" | "o" | "openInNew" | "overlayBaseline" | "pDF" | "paper" | "pause" | "pieChart" | "pin" | "play" | "plus" | "powerOff" | "printer" | "proCollect" | "recAction" | "received" | "refresh" | "reorder" | "replace" | "reply" | "rewalkableRoute" | "routes" | "search" | "send" | "sensorA" | "sensorB" | "settings" | "sidebandCursor" | "singleCursor" | "spectrum" | "starFilled" | "starOutlined" | "statusCircle" | "stop" | "structuralVibration" | "sync" | "timewave" | "trash" | "trend" | "trendingUp" | "undo" | "unknownCircle" | "unknownDiamond" | "unlink" | "unlock" | "unscheduledAction" | "upload" | "user" | "viewFull" | "viewHorizontal" | "viewVertical" | "warning" | "warningCircle" | "warningDiamond" | "zoomIn" | "zoomOut" }
23
- */
21
+ size: 'sm' | 'md';
22
+ /** If defined, displays leading/provided icon */
24
23
  icon?: Icon;
25
- /**
26
- * If defined, gives the supplied appearance
27
- * @type { "warning" | "success" | "info" | "error" | "alert" }
28
- */
29
- color?: SeverityBgColor;
24
+ /** If defined, gives the supplied appearance */
25
+ color?: Severity;
30
26
  /** If defined, accepts a function that runs on click */
31
27
  set onClick(onClickFn: ((event: Event) => void) | undefined);
32
28
  get onClick(): ((event: Event) => void) | undefined;
@@ -34,15 +30,17 @@ export declare class SkfTag extends SkfElement {
34
30
  set onRemove(onRemoveFn: ((event: Event) => void) | undefined);
35
31
  get onRemove(): ((event: Event) => void) | undefined;
36
32
  /** If true, adds trailing button to remove tag */
37
- removable?: boolean;
33
+ removable: boolean;
38
34
  /** @internal */
39
35
  $removeButton: HTMLButtonElement;
40
36
  connectedCallback(): void;
41
37
  disconnectedCallback(): void;
42
38
  attributeChangedCallback(name: string, _old: string | null, value: string | null): void;
43
- protected _handleKeyDown: (e: KeyboardEvent) => void;
44
- /** run externally provided callback (if any) first. Let click propagate to handleClick. */
45
- protected _handleRemove: (e: Event) => void;
46
- protected _handleClick: (e: Event) => void;
39
+ /** @internal */
40
+ private _handleKeyDown;
41
+ /** @internal run externally provided callback (if any) first. Let click propagate to handleClick. */
42
+ private _handleRemove;
43
+ /** @internal */
44
+ private _handleClick;
47
45
  render(): import("lit").TemplateResult<1>;
48
46
  }
@@ -1,37 +1,35 @@
1
1
  import "../icon/icon.js";
2
2
  import { SkfElement as u } from "../../internal/components/skf-element.js";
3
- import f from "../../styles/component.styles.js";
4
- import { html as a, nothing as p } from "lit";
5
- import { property as l, query as d } from "lit/decorators.js";
6
- import { classMap as v } from "lit/directives/class-map.js";
3
+ import { componentStyles as f } from "../../styles/component.styles.js";
4
+ import { nothing as p, html as a } from "lit";
5
+ import { property as n, query as v } from "lit/decorators.js";
6
+ import { classMap as d } from "lit/directives/class-map.js";
7
7
  import { ifDefined as _ } from "lit/directives/if-defined.js";
8
8
  import { styles as k } from "./tag.styles.js";
9
- var b = Object.defineProperty, y = Object.getOwnPropertyDescriptor, i = (m, t, s, r) => {
10
- for (var e = r > 1 ? void 0 : r ? y(t, s) : t, n = m.length - 1, c; n >= 0; n--)
11
- (c = m[n]) && (e = (r ? c(t, s, e) : c(e)) || e);
12
- return r && e && b(t, s, e), e;
9
+ var b = Object.defineProperty, y = Object.getOwnPropertyDescriptor, r = (m, e, i, s) => {
10
+ for (var t = s > 1 ? void 0 : s ? y(e, i) : e, l = m.length - 1, c; l >= 0; l--)
11
+ (c = m[l]) && (t = (s ? c(e, i, t) : c(t)) || t);
12
+ return s && t && b(e, i, t), t;
13
13
  };
14
14
  const h = class h extends u {
15
15
  constructor() {
16
- super(...arguments), this.size = "md", this._handleKeyDown = (t) => {
17
- (t.key === "Enter" || t.key === " ") && this.$removeButton.click();
18
- }, this._handleRemove = (t) => {
19
- this._onRemove && this._onRemove(t);
20
- }, this._handleClick = (t) => {
21
- var e;
22
- t.stopPropagation();
23
- const s = t.composedPath()[0];
24
- console.log("$clickTarget", s), s.localName === "button" ? this.remove() : (e = this.onClick) == null || e.call(this, t);
16
+ super(...arguments), this.size = "md", this.removable = !1, this._handleKeyDown = (e) => {
17
+ (e.key === "Enter" || e.key === " ") && this.$removeButton.click();
18
+ }, this._handleRemove = (e) => {
19
+ this._onRemove && this._onRemove(e);
20
+ }, this._handleClick = (e) => {
21
+ var t;
22
+ e.stopPropagation(), e.composedPath()[0].localName === "button" ? this.remove() : (t = this.onClick) == null || t.call(this, e);
25
23
  };
26
24
  }
27
- set onClick(t) {
28
- t && (this._onClick = t);
25
+ set onClick(e) {
26
+ e && (this._onClick = e);
29
27
  }
30
28
  get onClick() {
31
29
  return this._onClick;
32
30
  }
33
- set onRemove(t) {
34
- t && (this._onRemove = t);
31
+ set onRemove(e) {
32
+ e && (this._onRemove = e);
35
33
  }
36
34
  get onRemove() {
37
35
  return this._onRemove;
@@ -42,15 +40,14 @@ const h = class h extends u {
42
40
  disconnectedCallback() {
43
41
  super.disconnectedCallback(), this.removeEventListener("click", this._handleClick);
44
42
  }
45
- attributeChangedCallback(t, s, r) {
46
- super.attributeChangedCallback(t, s, r), t === "removable" && r !== null ? this.addEventListener("keydown", this._handleKeyDown) : this.removeEventListener("keydown", this._handleKeyDown);
43
+ attributeChangedCallback(e, i, s) {
44
+ super.attributeChangedCallback(e, i, s), e === "removable" && s !== null ? this.addEventListener("keydown", this._handleKeyDown) : this.removeEventListener("keydown", this._handleKeyDown);
47
45
  }
48
46
  render() {
49
47
  return a`
50
48
  <div
51
- class=${v({
49
+ class=${d({
52
50
  tag: !0,
53
- "tag--color-alert": this.color === "alert",
54
51
  "tag--color-error": this.color === "error",
55
52
  "tag--color-info": this.color === "info",
56
53
  "tag--color-success": this.color === "success",
@@ -78,26 +75,26 @@ const h = class h extends u {
78
75
  };
79
76
  h.styles = [f, k];
80
77
  let o = h;
81
- i([
82
- l({ reflect: !0 })
78
+ r([
79
+ n({ reflect: !0 })
83
80
  ], o.prototype, "size", 2);
84
- i([
85
- l()
81
+ r([
82
+ n()
86
83
  ], o.prototype, "icon", 2);
87
- i([
88
- l({ reflect: !0 })
84
+ r([
85
+ n({ reflect: !0 })
89
86
  ], o.prototype, "color", 2);
90
- i([
91
- l({ attribute: !1 })
87
+ r([
88
+ n({ attribute: !1 })
92
89
  ], o.prototype, "onClick", 1);
93
- i([
94
- l({ attribute: !1 })
90
+ r([
91
+ n({ attribute: !1 })
95
92
  ], o.prototype, "onRemove", 1);
96
- i([
97
- l({ type: Boolean, reflect: !0 })
93
+ r([
94
+ n({ type: Boolean, reflect: !0 })
98
95
  ], o.prototype, "removable", 2);
99
- i([
100
- d("button")
96
+ r([
97
+ v("button")
101
98
  ], o.prototype, "$removeButton", 2);
102
99
  export {
103
100
  o as SkfTag