@skf-design-system/ui-components 1.0.0-beta.5 → 1.0.1-beta.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 (204) hide show
  1. package/dist/components/accordion/accordion-item.d.ts +1 -1
  2. package/dist/components/accordion/accordion.component.d.ts +4 -4
  3. package/dist/components/accordion/accordion.component.js +18 -17
  4. package/dist/components/accordion/accordion.styles.d.ts +1 -2
  5. package/dist/components/accordion/accordion.styles.js +5 -4
  6. package/dist/components/alert/alert.component.d.ts +5 -5
  7. package/dist/components/alert/alert.component.js +46 -35
  8. package/dist/components/alert/alert.styles.d.ts +1 -2
  9. package/dist/components/alert/alert.styles.js +29 -24
  10. package/dist/components/breadcrumb/breadcrumb.component.d.ts +29 -0
  11. package/dist/components/breadcrumb/breadcrumb.d.ts +8 -0
  12. package/dist/components/breadcrumb-item/breadcrumb-item.component.d.ts +25 -0
  13. package/dist/components/breadcrumb-item/breadcrumb-item.d.ts +8 -0
  14. package/dist/components/button/button.component.d.ts +29 -5
  15. package/dist/components/button/button.component.js +89 -52
  16. package/dist/components/button/button.styles.js +65 -45
  17. package/dist/components/card/card.component.d.ts +4 -4
  18. package/dist/components/card/card.component.js +35 -24
  19. package/dist/components/card/card.styles.d.ts +1 -2
  20. package/dist/components/card/card.styles.js +14 -12
  21. package/dist/components/checkbox/checkbox.component.d.ts +11 -12
  22. package/dist/components/checkbox/checkbox.component.js +96 -90
  23. package/dist/components/collapse/collapse.component.d.ts +8 -8
  24. package/dist/components/collapse/collapse.component.js +42 -34
  25. package/dist/components/collapse/collapse.styles.js +15 -14
  26. package/dist/components/dialog/dialog.component.d.ts +74 -0
  27. package/dist/components/dialog/dialog.component.js +187 -0
  28. package/dist/components/dialog/dialog.d.ts +8 -0
  29. package/dist/components/dialog/dialog.js +6 -0
  30. package/dist/components/dialog/dialog.styles.d.ts +1 -0
  31. package/dist/components/dialog/dialog.styles.js +91 -0
  32. package/dist/components/divider/divider.component.d.ts +3 -3
  33. package/dist/components/divider/divider.component.js +39 -27
  34. package/dist/components/divider/divider.styles.d.ts +1 -2
  35. package/dist/components/divider/divider.styles.js +26 -26
  36. package/dist/components/heading/heading.component.d.ts +2 -2
  37. package/dist/components/heading/heading.component.js +13 -13
  38. package/dist/components/icon/icon.component.d.ts +2 -5
  39. package/dist/components/icon/icon.component.js +32 -23
  40. package/dist/components/icon/icon.styles.js +53 -47
  41. package/dist/components/input/input.component.d.ts +12 -11
  42. package/dist/components/input/input.component.js +88 -89
  43. package/dist/components/link/link.component.d.ts +7 -6
  44. package/dist/components/link/link.component.js +49 -43
  45. package/dist/components/link/link.styles.js +36 -40
  46. package/dist/components/loader/loader.component.d.ts +2 -2
  47. package/dist/components/loader/loader.component.js +39 -32
  48. package/dist/components/loader/loader.styles.js +11 -10
  49. package/dist/components/logo/logo.component.d.ts +3 -3
  50. package/dist/components/logo/logo.component.js +28 -17
  51. package/dist/components/logo/logo.styles.d.ts +1 -2
  52. package/dist/components/logo/logo.styles.js +11 -9
  53. package/dist/components/menu/menu.component.d.ts +24 -0
  54. package/dist/components/menu/menu.component.js +18 -0
  55. package/dist/components/menu/menu.d.ts +8 -0
  56. package/dist/components/menu/menu.js +6 -0
  57. package/dist/components/menu/menu.styles.d.ts +1 -0
  58. package/dist/components/menu/menu.styles.js +11 -0
  59. package/dist/components/menu-item/menu-item.component.d.ts +25 -0
  60. package/dist/components/menu-item/menu-item.component.js +13 -0
  61. package/dist/components/menu-item/menu-item.d.ts +8 -0
  62. package/dist/components/menu-item/menu-item.js +6 -0
  63. package/dist/components/menu-item/menu-item.styles.d.ts +1 -0
  64. package/dist/components/menu-item/menu-item.styles.js +19 -0
  65. package/dist/components/popover/popover.component.d.ts +29 -0
  66. package/dist/components/popover/popover.component.js +37 -0
  67. package/dist/components/popover/popover.d.ts +8 -0
  68. package/dist/components/popover/popover.js +6 -0
  69. package/dist/components/popover/popover.styles.d.ts +1 -0
  70. package/dist/components/popover/popover.styles.js +12 -0
  71. package/dist/components/progress/progress.component.d.ts +22 -0
  72. package/dist/components/progress/progress.component.js +49 -0
  73. package/dist/components/progress/progress.d.ts +8 -0
  74. package/dist/components/progress/progress.js +6 -0
  75. package/dist/components/progress/progress.styles.d.ts +1 -0
  76. package/dist/components/progress/progress.styles.js +48 -0
  77. package/dist/components/radio/radio.component.d.ts +7 -9
  78. package/dist/components/radio/radio.component.js +95 -79
  79. package/dist/components/select/select.component.d.ts +10 -12
  80. package/dist/components/select/select.component.js +120 -120
  81. package/dist/components/select/select.controllers.d.ts +1 -26
  82. package/dist/components/select/select.controllers.js +35 -95
  83. package/dist/components/select-option/select-option.component.d.ts +1 -1
  84. package/dist/components/select-option/select-option.controllers.d.ts +1 -1
  85. package/dist/components/select-option-group/select-option-group.component.d.ts +1 -1
  86. package/dist/components/select-option-group/select-option-group.component.js +9 -9
  87. package/dist/components/stepper/stepper.component.d.ts +38 -0
  88. package/dist/components/stepper/stepper.component.js +91 -0
  89. package/dist/components/stepper/stepper.d.ts +8 -0
  90. package/dist/components/stepper/stepper.helpers.d.ts +16 -0
  91. package/dist/components/stepper/stepper.helpers.js +18 -0
  92. package/dist/components/stepper/stepper.js +6 -0
  93. package/dist/components/stepper/stepper.styles.d.ts +1 -0
  94. package/dist/components/stepper/stepper.styles.js +15 -0
  95. package/dist/components/stepper-item/stepper-item.component.d.ts +47 -0
  96. package/dist/components/stepper-item/stepper-item.component.js +113 -0
  97. package/dist/components/stepper-item/stepper-item.d.ts +8 -0
  98. package/dist/components/stepper-item/stepper-item.js +6 -0
  99. package/dist/components/stepper-item/stepper-item.styles.d.ts +1 -0
  100. package/dist/components/stepper-item/stepper-item.styles.js +98 -0
  101. package/dist/components/switch/switch.component.d.ts +2 -2
  102. package/dist/components/switch/switch.component.js +17 -7
  103. package/dist/components/switch/switch.styles.js +16 -13
  104. package/dist/components/tab/tab.component.d.ts +29 -0
  105. package/dist/components/tab/tab.component.js +57 -0
  106. package/dist/components/tab/tab.d.ts +8 -0
  107. package/dist/components/tab/tab.js +6 -0
  108. package/dist/components/tab/tab.styles.d.ts +1 -0
  109. package/dist/components/tab/tab.styles.js +123 -0
  110. package/dist/components/tab-group/tab-group.component.d.ts +43 -0
  111. package/dist/components/tab-group/tab-group.component.js +98 -0
  112. package/dist/components/tab-group/tab-group.d.ts +8 -0
  113. package/dist/components/tab-group/tab-group.js +6 -0
  114. package/dist/components/tab-group/tab-group.styles.d.ts +1 -0
  115. package/dist/components/tab-group/tab-group.styles.js +75 -0
  116. package/dist/components/tab-panel/tab-panel.component.d.ts +19 -0
  117. package/dist/components/tab-panel/tab-panel.component.js +36 -0
  118. package/dist/components/tab-panel/tab-panel.d.ts +8 -0
  119. package/dist/components/tab-panel/tab-panel.js +6 -0
  120. package/dist/components/tab-panel/tab-panel.styles.d.ts +1 -0
  121. package/dist/components/tab-panel/tab-panel.styles.js +13 -0
  122. package/dist/components/tag/tag.component.d.ts +2 -2
  123. package/dist/components/tag/tag.component.js +61 -45
  124. package/dist/components/tag/tag.styles.js +30 -28
  125. package/dist/components/textarea/textarea.component.d.ts +4 -4
  126. package/dist/components/textarea/textarea.component.js +2 -2
  127. package/dist/components/toast/toast.component.d.ts +8 -5
  128. package/dist/components/toast/toast.component.js +30 -26
  129. package/dist/components/toast/toast.singleton.d.ts +5 -10
  130. package/dist/components/toast/toast.singleton.js +25 -25
  131. package/dist/components/toast/toast.styles.d.ts +1 -0
  132. package/dist/components/toast-item/toast-item.component.d.ts +1 -1
  133. package/dist/components/toast-item/toast-item.component.js +15 -15
  134. package/dist/components/toast-item/toast-item.styles.js +18 -0
  135. package/dist/components/toast-wrapper/toast-wrapper.component.d.ts +2 -2
  136. package/dist/components/toast-wrapper/toast-wrapper.component.js +11 -11
  137. package/dist/components/toast-wrapper/toast-wrapper.styles.d.ts +1 -0
  138. package/dist/components/tooltip/tooltip.component.d.ts +24 -0
  139. package/dist/components/tooltip/tooltip.component.js +18 -0
  140. package/dist/components/tooltip/tooltip.d.ts +8 -0
  141. package/dist/components/tooltip/tooltip.js +6 -0
  142. package/dist/components/tooltip/tooltip.styles.d.ts +1 -0
  143. package/dist/components/tooltip/tooltip.styles.js +12 -0
  144. package/dist/custom-elements.json +2465 -629
  145. package/dist/index.d.ts +11 -0
  146. package/dist/index.js +77 -44
  147. package/dist/internal/base-classes/popover/popover.base.d.ts +29 -0
  148. package/dist/internal/base-classes/popover/popover.base.js +116 -0
  149. package/dist/internal/base-classes/popover/popover.styles.d.ts +1 -0
  150. package/dist/internal/base-classes/popover/popover.styles.js +29 -0
  151. package/dist/internal/components/formBase.d.ts +1 -0
  152. package/dist/internal/components/formBase.js +11 -11
  153. package/dist/internal/components/hint/hint.component.d.ts +2 -2
  154. package/dist/internal/components/hint/hint.component.js +13 -13
  155. package/dist/internal/components/skf-element.js +26 -25
  156. package/dist/internal/controllers/popover.controller.d.ts +16 -0
  157. package/dist/internal/controllers/popover.controller.js +44 -0
  158. package/dist/internal/helpers/hintSeverity.d.ts +2 -2
  159. package/dist/internal/helpers/watch.d.ts +27 -0
  160. package/dist/internal/helpers/watch.js +28 -0
  161. package/dist/internal/templates/asterisk.d.ts +1 -1
  162. package/dist/internal/templates/asterisk.js +7 -6
  163. package/dist/react/index.d.ts +13 -0
  164. package/dist/react/index.js +13 -0
  165. package/dist/react/skf-breadcrumb/index.d.ts +9 -0
  166. package/dist/react/skf-breadcrumb/index.js +17 -0
  167. package/dist/react/skf-breadcrumb-item/index.d.ts +3 -0
  168. package/dist/react/skf-breadcrumb-item/index.js +13 -0
  169. package/dist/react/skf-button/index.d.ts +7 -1
  170. package/dist/react/skf-button/index.js +5 -1
  171. package/dist/react/skf-dialog/index.d.ts +15 -0
  172. package/dist/react/skf-dialog/index.js +19 -0
  173. package/dist/react/skf-menu/index.d.ts +12 -0
  174. package/dist/react/skf-menu/index.js +18 -0
  175. package/dist/react/skf-menu-item/index.d.ts +27 -0
  176. package/dist/react/skf-menu-item/index.js +23 -0
  177. package/dist/react/skf-popover/index.d.ts +12 -0
  178. package/dist/react/skf-popover/index.js +18 -0
  179. package/dist/react/skf-progress/index.d.ts +3 -0
  180. package/dist/react/skf-progress/index.js +13 -0
  181. package/dist/react/skf-stepper/index.d.ts +9 -0
  182. package/dist/react/skf-stepper/index.js +17 -0
  183. package/dist/react/skf-stepper-item/index.d.ts +9 -0
  184. package/dist/react/skf-stepper-item/index.js +17 -0
  185. package/dist/react/skf-tab/index.d.ts +12 -0
  186. package/dist/react/skf-tab/index.js +18 -0
  187. package/dist/react/skf-tab-group/index.d.ts +3 -0
  188. package/dist/react/skf-tab-group/index.js +13 -0
  189. package/dist/react/skf-tab-panel/index.d.ts +3 -0
  190. package/dist/react/skf-tab-panel/index.js +13 -0
  191. package/dist/react/skf-tooltip/index.d.ts +12 -0
  192. package/dist/react/skf-tooltip/index.js +18 -0
  193. package/dist/styles/component.styles.js +15 -2
  194. package/dist/types/jsx/custom-element-jsx.d.ts +603 -27
  195. package/dist/types/vue/index.d.ts +413 -11
  196. package/dist/vscode.html-custom-data.json +462 -36
  197. package/dist/web-types.json +944 -90
  198. package/package.json +43 -42
  199. package/dist/components/toast-item/toast-item.style.js +0 -16
  200. /package/dist/components/{toast/toast.style.d.ts → breadcrumb/breadcrumb.styles.d.ts} +0 -0
  201. /package/dist/components/{toast-wrapper/toast-wrapper.style.d.ts → breadcrumb-item/breadcrumb-item.styles.d.ts} +0 -0
  202. /package/dist/components/toast/{toast.style.js → toast.styles.js} +0 -0
  203. /package/dist/components/toast-item/{toast-item.style.d.ts → toast-item.styles.d.ts} +0 -0
  204. /package/dist/components/toast-wrapper/{toast-wrapper.style.js → toast-wrapper.styles.js} +0 -0
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ export { default as SkfButton } from './components/button/button.js';
4
4
  export { default as SkfCard } from './components/card/card.js';
5
5
  export { default as SkfCheckbox } from './components/checkbox/checkbox.js';
6
6
  export { default as SkfCollapse } from './components/collapse/collapse.js';
7
+ export { default as SkfDialog } from './components/dialog/dialog.js';
7
8
  export { default as SkfDivider } from './components/divider/divider.js';
8
9
  export { default as SkfHeading } from './components/heading/heading.js';
9
10
  export { default as SkfIcon } from './components/icon/icon.js';
@@ -11,11 +12,21 @@ export { default as SkfInput } from './components/input/input.js';
11
12
  export { default as SkfLink } from './components/link/link.js';
12
13
  export { default as SkfLoader } from './components/loader/loader.js';
13
14
  export { default as SkfLogo } from './components/logo/logo.js';
15
+ export { default as SkfMenuItem } from './components/menu-item/menu-item.js';
16
+ export { default as SkfMenu } from './components/menu/menu.js';
17
+ export { default as SkfPopover } from './components/popover/popover.js';
18
+ export { default as SkfProgress } from './components/progress/progress.js';
14
19
  export { default as SkfRadio } from './components/radio/radio.js';
15
20
  export { default as SkfOptionGroup } from './components/select-option-group/select-option-group.js';
16
21
  export { default as SkfOption } from './components/select-option/select-option.js';
17
22
  export { default as SkfSelect } from './components/select/select.js';
23
+ export { default as SkfStepperItem } from './components/stepper-item/stepper-item.js';
24
+ export { default as SkfStepper } from './components/stepper/stepper.js';
18
25
  export { default as SkfSwitch } from './components/switch/switch.js';
26
+ export { default as SkfTabGoup } from './components/tab-group/tab-group.js';
27
+ export { default as SkfTabPanel } from './components/tab-panel/tab-panel.js';
28
+ export { default as SkfTab } from './components/tab/tab.js';
19
29
  export { default as SkfTag } from './components/tag/tag.js';
20
30
  export { default as SkfTextArea } from './components/textarea/textarea.js';
21
31
  export { default as SkfToast } from './components/toast/toast.js';
32
+ export { default as SkfTooltip } from './components/tooltip/tooltip.js';
package/dist/index.js CHANGED
@@ -4,6 +4,7 @@ import "./components/button/button.js";
4
4
  import "./components/card/card.js";
5
5
  import "./components/checkbox/checkbox.js";
6
6
  import "./components/collapse/collapse.js";
7
+ import "./components/dialog/dialog.js";
7
8
  import "./components/divider/divider.js";
8
9
  import "./components/heading/heading.js";
9
10
  import "./components/icon/icon.js";
@@ -11,57 +12,89 @@ import "./components/input/input.js";
11
12
  import "./components/link/link.js";
12
13
  import "./components/loader/loader.js";
13
14
  import "./components/logo/logo.js";
15
+ import "./components/menu-item/menu-item.js";
16
+ import "./components/menu/menu.js";
17
+ import "./components/popover/popover.js";
18
+ import "./components/progress/progress.js";
14
19
  import "./components/radio/radio.js";
15
20
  import "./components/select-option-group/select-option-group.js";
16
21
  import "./components/select-option/select-option.js";
17
22
  import "./components/select/select.js";
23
+ import "./components/stepper-item/stepper-item.js";
24
+ import "./components/stepper/stepper.js";
18
25
  import "./components/switch/switch.js";
26
+ import "./components/tab-group/tab-group.js";
27
+ import "./components/tab-panel/tab-panel.js";
28
+ import "./components/tab/tab.js";
19
29
  import "./components/tag/tag.js";
20
30
  import "./components/textarea/textarea.js";
21
31
  import "./components/toast/toast.js";
22
- import { SkfAccordion as L } from "./components/accordion/accordion.component.js";
23
- import { SkfAlert as h } from "./components/alert/alert.component.js";
24
- import { SkfButton as b } from "./components/button/button.component.js";
25
- import { SkfCard as w } from "./components/card/card.component.js";
26
- import { SkfCheckbox as D } from "./components/checkbox/checkbox.component.js";
27
- import { SkfCollapse as R } from "./components/collapse/collapse.component.js";
28
- import { SkfDivider as q } from "./components/divider/divider.component.js";
29
- import { SkfHeading as z } from "./components/heading/heading.component.js";
30
- import { SkfIcon as F } from "./components/icon/icon.component.js";
31
- import { SkfInput as K } from "./components/input/input.component.js";
32
- import { SkfLink as N } from "./components/link/link.component.js";
33
- import { SkfLoader as Q } from "./components/loader/loader.component.js";
34
- import { SkfLogo as V } from "./components/logo/logo.component.js";
35
- import { SkfRadio as X } from "./components/radio/radio.component.js";
36
- import { SkfSelectOptionGroup as Z } from "./components/select-option-group/select-option-group.component.js";
37
- import { SkfSelectOption as $ } from "./components/select-option/select-option.component.js";
38
- import { SkfSelect as ro } from "./components/select/select.component.js";
39
- import { SkfSwitch as po } from "./components/switch/switch.component.js";
40
- import { SkfTag as mo } from "./components/tag/tag.component.js";
41
- import { SkfTextArea as io } from "./components/textarea/textarea.component.js";
42
- import { SkfToast as ko } from "./components/toast/toast.component.js";
43
- import { SkfAccordionItem as no } from "./components/accordion/accordion-item.js";
32
+ import "./components/tooltip/tooltip.js";
33
+ import { SkfAccordion as H } from "./components/accordion/accordion.component.js";
34
+ import { SkfAlert as j } from "./components/alert/alert.component.js";
35
+ import { SkfButton as y } from "./components/button/button.component.js";
36
+ import { SkfCard as E } from "./components/card/card.component.js";
37
+ import { SkfCheckbox as J } from "./components/checkbox/checkbox.component.js";
38
+ import { SkfCollapse as N } from "./components/collapse/collapse.component.js";
39
+ import { SkfDialog as U } from "./components/dialog/dialog.component.js";
40
+ import { SkfDivider as W } from "./components/divider/divider.component.js";
41
+ import { SkfHeading as Y } from "./components/heading/heading.component.js";
42
+ import { SkfIcon as _ } from "./components/icon/icon.component.js";
43
+ import { SkfInput as oo } from "./components/input/input.component.js";
44
+ import { SkfLink as to } from "./components/link/link.component.js";
45
+ import { SkfLoader as fo } from "./components/loader/loader.component.js";
46
+ import { SkfLogo as eo } from "./components/logo/logo.component.js";
47
+ import { SkfMenuItem as So } from "./components/menu-item/menu-item.component.js";
48
+ import { SkfMenu as xo } from "./components/menu/menu.component.js";
49
+ import { SkfPopover as no } from "./components/popover/popover.component.js";
50
+ import { SkfProgress as lo } from "./components/progress/progress.component.js";
51
+ import { SkfRadio as To } from "./components/radio/radio.component.js";
52
+ import { SkfSelectOptionGroup as bo } from "./components/select-option-group/select-option-group.component.js";
53
+ import { SkfSelectOption as Io } from "./components/select-option/select-option.component.js";
54
+ import { SkfSelect as Go } from "./components/select/select.component.js";
55
+ import { SkfStepperItem as Co } from "./components/stepper-item/stepper-item.component.js";
56
+ import { SkfStepper as Po } from "./components/stepper/stepper.component.js";
57
+ import { SkfSwitch as vo } from "./components/switch/switch.component.js";
58
+ import { SkfTabGroup as Mo } from "./components/tab-group/tab-group.component.js";
59
+ import { SkfTabPanel as Bo } from "./components/tab-panel/tab-panel.component.js";
60
+ import { SkfTab as Ro } from "./components/tab/tab.component.js";
61
+ import { SkfTag as qo } from "./components/tag/tag.component.js";
62
+ import { SkfTextArea as zo } from "./components/textarea/textarea.component.js";
63
+ import { SkfToast as Fo } from "./components/toast/toast.component.js";
64
+ import { SkfTooltip as Ko } from "./components/tooltip/tooltip.component.js";
65
+ import { SkfAccordionItem as Qo } from "./components/accordion/accordion-item.js";
44
66
  export {
45
- L as SkfAccordion,
46
- no as SkfAccordionItem,
47
- h as SkfAlert,
48
- b as SkfButton,
49
- w as SkfCard,
50
- D as SkfCheckbox,
51
- R as SkfCollapse,
52
- q as SkfDivider,
53
- z as SkfHeading,
54
- F as SkfIcon,
55
- K as SkfInput,
56
- N as SkfLink,
57
- Q as SkfLoader,
58
- V as SkfLogo,
59
- $ as SkfOption,
60
- Z as SkfOptionGroup,
61
- X as SkfRadio,
62
- ro as SkfSelect,
63
- po as SkfSwitch,
64
- mo as SkfTag,
65
- io as SkfTextArea,
66
- ko as SkfToast
67
+ H as SkfAccordion,
68
+ Qo as SkfAccordionItem,
69
+ j as SkfAlert,
70
+ y as SkfButton,
71
+ E as SkfCard,
72
+ J as SkfCheckbox,
73
+ N as SkfCollapse,
74
+ U as SkfDialog,
75
+ W as SkfDivider,
76
+ Y as SkfHeading,
77
+ _ as SkfIcon,
78
+ oo as SkfInput,
79
+ to as SkfLink,
80
+ fo as SkfLoader,
81
+ eo as SkfLogo,
82
+ xo as SkfMenu,
83
+ So as SkfMenuItem,
84
+ Io as SkfOption,
85
+ bo as SkfOptionGroup,
86
+ no as SkfPopover,
87
+ lo as SkfProgress,
88
+ To as SkfRadio,
89
+ Go as SkfSelect,
90
+ Po as SkfStepper,
91
+ Co as SkfStepperItem,
92
+ vo as SkfSwitch,
93
+ Ro as SkfTab,
94
+ Mo as SkfTabGoup,
95
+ Bo as SkfTabPanel,
96
+ qo as SkfTag,
97
+ zo as SkfTextArea,
98
+ Fo as SkfToast,
99
+ Ko as SkfTooltip
67
100
  };
@@ -0,0 +1,29 @@
1
+ import { type Placement } from '@floating-ui/dom';
2
+ import { SkfElement } from '../../components/skf-element.js';
3
+ import { PopoverController } from '../../controllers/popover.controller.js';
4
+ import { type CSSResultGroup } from 'lit';
5
+ export declare class SkfPopoverBase extends SkfElement {
6
+ static styles: CSSResultGroup;
7
+ static classMap: {};
8
+ isOpen: boolean;
9
+ placement: Placement;
10
+ variant: 'dropdown' | 'popup' | 'tooltip';
11
+ anchor?: string;
12
+ offset: number;
13
+ $anchor?: Element | HTMLElement | null;
14
+ arrow: boolean;
15
+ $popover: HTMLElement;
16
+ $arrow: HTMLElement;
17
+ /** @internal */
18
+ protected popoverController: PopoverController;
19
+ private _toggleOpen;
20
+ private _handleToggle;
21
+ handleToggleOpen: () => void;
22
+ handleAnchorChange: () => Promise<void>;
23
+ reposition: () => Promise<void>;
24
+ open: () => boolean;
25
+ close: () => boolean;
26
+ addEventListeners($element: HTMLElement | Element): void;
27
+ removeEventListeners($element: HTMLElement | Element): void;
28
+ render(): import("lit").TemplateResult<1>;
29
+ }
@@ -0,0 +1,116 @@
1
+ import { flip as b, offset as C, arrow as _, computePosition as E } from "@floating-ui/dom";
2
+ import { SkfElement as P } from "../../components/skf-element.js";
3
+ import { PopoverController as L } from "../../controllers/popover.controller.js";
4
+ import { watch as $ } from "../../helpers/watch.js";
5
+ import M from "../../../styles/component.styles.js";
6
+ import { html as y, nothing as T } from "lit";
7
+ import { property as a, state as h, query as u } from "lit/decorators.js";
8
+ import { classMap as j } from "lit/directives/class-map.js";
9
+ import { styles as k } from "./popover.styles.js";
10
+ var B = Object.defineProperty, o = (l, t, i, c) => {
11
+ for (var r = void 0, n = l.length - 1, p; n >= 0; n--)
12
+ (p = l[n]) && (r = p(t, i, r) || r);
13
+ return r && B(t, i, r), r;
14
+ }, s;
15
+ const e = (s = class extends P {
16
+ constructor() {
17
+ super(...arguments), this.isOpen = !1, this.placement = "top", this.variant = "popup", this.offset = 0, this.arrow = !1, this.popoverController = new L(this), this._toggleOpen = (t) => this.isOpen = t ?? !this.isOpen, this._handleToggle = (t) => {
18
+ const i = t.newState === "open";
19
+ this.isOpen = i, this.emit(i ? "open" : "close");
20
+ }, this.handleToggleOpen = () => {
21
+ this.$popover.togglePopover(this.isOpen), this.$popover.animate([{ opacity: 0 }, { opacity: 1 }], {
22
+ duration: 150,
23
+ easing: "ease-out",
24
+ fill: "forwards"
25
+ });
26
+ }, this.handleAnchorChange = async () => {
27
+ if (!this.anchor) return;
28
+ await this.popoverController.stop(), this.$anchor && this.removeEventListeners(this.$anchor);
29
+ const t = this.getRootNode();
30
+ this.$anchor = t.getElementById(this.anchor), this.$anchor && (this.addEventListeners(this.$anchor), this.popoverController.start());
31
+ }, this.reposition = async () => {
32
+ var n, p, f;
33
+ if (!this.$anchor) return;
34
+ const t = [b(), C(this.offset)];
35
+ this.arrow && t.push(_({ element: this.$arrow }));
36
+ const { x: i, y: c, middlewareData: r } = await E(this.$anchor, this.$popover, {
37
+ placement: this.placement,
38
+ middleware: t,
39
+ strategy: "fixed"
40
+ });
41
+ if (Object.assign(this.$popover.style, {
42
+ left: `${String(i)}px`,
43
+ top: `${String(c)}px`
44
+ }), this.arrow) {
45
+ const m = this.placement.split("-")[0], d = { top: "bottom", right: "left", bottom: "top", left: "right" }[m] ?? "", g = (n = r.flip) == null ? void 0 : n.index, v = (p = r.arrow) == null ? void 0 : p.x, w = (f = r.arrow) == null ? void 0 : f.y, O = typeof v == "number" ? `${String(v)}px` : "", S = typeof w == "number" ? `${String(w)}px` : "", x = {
46
+ bottom: 45,
47
+ right: 135,
48
+ top: 225,
49
+ left: 315
50
+ };
51
+ Object.assign(this.$arrow.style, {
52
+ top: S,
53
+ [this.placement.includes("left") ? "right" : "left"]: O,
54
+ [g ? m : d]: "calc(var(--_skf-popover-arrow-size) * -1)",
55
+ rotate: `${(x[d] + (g ? 180 : 0)).toString()}deg`
56
+ });
57
+ }
58
+ }, this.open = () => this._toggleOpen(!0), this.close = () => this._toggleOpen(!1);
59
+ }
60
+ addEventListeners(t) {
61
+ throw new Error(`Cannot add eventListeners for ${t.id}. Method not implemented.`);
62
+ }
63
+ removeEventListeners(t) {
64
+ throw new Error(`Cannot remove eventListeners for ${t.id}. Method not implemented.`);
65
+ }
66
+ render() {
67
+ return y`
68
+ <div
69
+ @toggle=${this._handleToggle}
70
+ class=${j({ popover: !0, ...s.classMap })}
71
+ id="popover"
72
+ popover
73
+ >
74
+ <slot></slot>
75
+ ${this.arrow ? y`<div class="popover__arrow" id="arrow"></div>` : T}
76
+ </div>
77
+ `;
78
+ }
79
+ }, s.styles = [M, k], s.classMap = {}, s);
80
+ o([
81
+ a({ type: Boolean, reflect: !0 })
82
+ ], e.prototype, "isOpen");
83
+ o([
84
+ a()
85
+ ], e.prototype, "placement");
86
+ o([
87
+ a()
88
+ ], e.prototype, "variant");
89
+ o([
90
+ a()
91
+ ], e.prototype, "anchor");
92
+ o([
93
+ h()
94
+ ], e.prototype, "offset");
95
+ o([
96
+ h()
97
+ ], e.prototype, "$anchor");
98
+ o([
99
+ h()
100
+ ], e.prototype, "arrow");
101
+ o([
102
+ u("#popover")
103
+ ], e.prototype, "$popover");
104
+ o([
105
+ u("#arrow")
106
+ ], e.prototype, "$arrow");
107
+ o([
108
+ $("isOpen", { afterUpdate: !0 })
109
+ ], e.prototype, "handleToggleOpen");
110
+ o([
111
+ $("anchor")
112
+ ], e.prototype, "handleAnchorChange");
113
+ let X = e;
114
+ export {
115
+ X as SkfPopoverBase
116
+ };
@@ -0,0 +1 @@
1
+ export declare const styles: import("lit").CSSResult;
@@ -0,0 +1,29 @@
1
+ import { css as o } from "lit";
2
+ const e = o`
3
+ /* stylelint-disable selector-class-pattern */
4
+ @layer components {
5
+ .popover {
6
+ background-color: var(--skf-bg-color-neutral-1);
7
+ border: none;
8
+ border-radius: var(--skf-border-radius-sm);
9
+ box-shadow: var(--skf-shadow-md);
10
+ opacity: 0;
11
+ overflow: visible;
12
+ }
13
+
14
+ .popover__arrow {
15
+ --_skf-popover-arrow-size: calc(6px * 0.7071);
16
+
17
+ background-color: var(--skf-bg-color-neutral-1);
18
+ block-size: calc(var(--_skf-popover-arrow-size) * 2);
19
+ box-shadow: 1px 1px 2px 0 rgb(0 0 0 / 5%);
20
+ inline-size: calc(var(--_skf-popover-arrow-size) * 2);
21
+ position: absolute;
22
+ rotate: 45deg;
23
+ z-index: -1;
24
+ }
25
+ }
26
+ `;
27
+ export {
28
+ e as styles
29
+ };
@@ -22,6 +22,7 @@ export declare class FormBase extends SkfElement {
22
22
  protected customErrorDisplay: boolean;
23
23
  protected pristine: boolean;
24
24
  protected validateOnChange: boolean;
25
+ protected withFallback: (message?: string | null) => string;
25
26
  static shadowRootOptions: {
26
27
  delegatesFocus: boolean;
27
28
  mode: ShadowRootMode;
@@ -1,14 +1,14 @@
1
1
  import { LitElement as c } from "lit";
2
2
  import { property as d } from "lit/decorators.js";
3
3
  import { SkfElement as u } from "./skf-element.js";
4
- var p = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, h = (l, t, e, s) => {
4
+ var p = Object.defineProperty, _ = Object.getOwnPropertyDescriptor, h = (l, t, e, r) => {
5
5
  for (var i = _(t, e), n = l.length - 1, o; n >= 0; n--)
6
6
  (o = l[n]) && (i = o(t, e, i) || i);
7
7
  return i && p(t, e, i), i;
8
8
  };
9
9
  const a = class a extends u {
10
10
  constructor() {
11
- super(), this._disabled = !1, this._pristine = !0, this.validationError = "", this.customErrorDisplay = !1, this.pristine = !0, this.validateOnChange = !0, this._dispatchResetEvent = () => {
11
+ super(), this._disabled = !1, this._pristine = !0, this.validationError = "", this.customErrorDisplay = !1, this.pristine = !0, this.validateOnChange = !0, this.withFallback = (t) => String(t).trim() || "A unspecified form validation error occured.", this._dispatchResetEvent = () => {
12
12
  this.dispatchEvent(new Event("reset", { bubbles: !0, composed: !0, cancelable: !1 }));
13
13
  }, this._internals = this.attachInternals(), this._required = !1;
14
14
  }
@@ -59,8 +59,8 @@ const a = class a extends u {
59
59
  get willValidate() {
60
60
  return this._internals.willValidate;
61
61
  }
62
- setValidity(t, e, s) {
63
- this._internals.setValidity(t, e, s);
62
+ setValidity(t, e, r) {
63
+ this._internals.setValidity(t, e, r);
64
64
  }
65
65
  setFormValue(t) {
66
66
  this._internals.setFormValue(t);
@@ -88,20 +88,20 @@ const a = class a extends u {
88
88
  * @returns
89
89
  */
90
90
  emitEvent(t, e = {}) {
91
- const s = { bubbles: !0, composed: !0, cancelable: !0 };
91
+ const r = { bubbles: !0, composed: !0, cancelable: !0 };
92
92
  return t.startsWith("skf-") ? this.dispatchEvent(
93
- new CustomEvent(t, { detail: null, ...s, ...e })
94
- ) : this.dispatchEvent(new Event(t, { ...s, ...e }));
93
+ new CustomEvent(t, { detail: null, ...r, ...e })
94
+ ) : this.dispatchEvent(new Event(t, { ...r, ...e }));
95
95
  }
96
96
  };
97
97
  a.formAssociated = !0, a.shadowRootOptions = { ...c.shadowRootOptions, delegatesFocus: !0 };
98
- let r = a;
98
+ let s = a;
99
99
  h([
100
100
  d({ type: Boolean })
101
- ], r.prototype, "required");
101
+ ], s.prototype, "required");
102
102
  h([
103
103
  d({ type: Boolean, attribute: "native-validation" })
104
- ], r.prototype, "nativeValidation");
104
+ ], s.prototype, "nativeValidation");
105
105
  export {
106
- r as FormBase
106
+ s as FormBase
107
107
  };
@@ -1,5 +1,5 @@
1
- import '@components/icon/icon.js';
2
- import { SkfElement } from '@internal/components/skf-element.js';
1
+ import '../../../components/icon/icon.js';
2
+ import { SkfElement } from '../../components/skf-element.js';
3
3
  import type { SeverityFgColor } from '@skf-design-system/ui-assets';
4
4
  import { type CSSResultGroup } from 'lit';
5
5
  export declare class SkfHint extends SkfElement {
@@ -1,21 +1,21 @@
1
1
  import "../../../components/icon/icon.js";
2
- import { SkfElement as l } from "../skf-element.js";
3
- import { ICON_SEVERITY as n } from "../../constants/iconSeverity.js";
2
+ import { SkfElement as n } from "../skf-element.js";
3
+ import { ICON_SEVERITY as l } from "../../constants/iconSeverity.js";
4
4
  import v from "../../../styles/component.styles.js";
5
5
  import { html as f } from "lit";
6
- import { property as y } from "lit/decorators.js";
7
- import d from "./hint.styles.js";
6
+ import { property as d } from "lit/decorators.js";
7
+ import y from "./hint.styles.js";
8
8
  var a = Object.defineProperty, c = (s, i, m, h) => {
9
- for (var r = void 0, t = s.length - 1, p; t >= 0; t--)
10
- (p = s[t]) && (r = p(i, m, r) || r);
9
+ for (var r = void 0, e = s.length - 1, p; e >= 0; e--)
10
+ (p = s[e]) && (r = p(i, m, r) || r);
11
11
  return r && a(i, m, r), r;
12
12
  };
13
- const o = class o extends l {
13
+ const o = class o extends n {
14
14
  render() {
15
15
  return f`
16
16
  <div id="root">
17
17
  ${this.severity && f`
18
- <skf-icon color=${this.severity} name="${n[this.severity]}" size="xs">
18
+ <skf-icon color=${this.severity} name="${l[this.severity]}" size="xs">
19
19
  </skf-icon>
20
20
  `}
21
21
  <slot></slot>
@@ -23,11 +23,11 @@ const o = class o extends l {
23
23
  `;
24
24
  }
25
25
  };
26
- o.styles = [v, d];
27
- let e = o;
26
+ o.styles = [v, y];
27
+ let t = o;
28
28
  c([
29
- y()
30
- ], e.prototype, "severity");
29
+ d()
30
+ ], t.prototype, "severity");
31
31
  export {
32
- e as SkfHint
32
+ t as SkfHint
33
33
  };
@@ -17,43 +17,44 @@ const s = class s extends d {
17
17
  /** Custom event emitter helper function. Transmits user actions or component state change. Use composed=false for event that should not pierce shadowDom. */
18
18
  emit(e, t = {}) {
19
19
  if ([
20
- "click",
21
- "dblclick",
22
- "mousedown",
23
- "mouseup",
24
- "mouseover",
25
- "mouseout",
26
- "mousemove",
27
- "keydown",
28
- "keyup",
29
- "keypress",
30
- "submit",
31
- "focus",
32
20
  "blur",
33
- "load",
34
- "unload",
35
- "resize",
36
- "scroll",
21
+ "canplay",
37
22
  "change",
38
- "input",
23
+ "click",
24
+ "close",
39
25
  "contextmenu",
26
+ "dblclick",
40
27
  "drag",
41
- "dragstart",
42
28
  "dragend",
43
29
  "dragenter",
44
30
  "dragleave",
45
31
  "dragover",
32
+ "dragstart",
46
33
  "drop",
47
- "touchstart",
48
- "touchend",
49
- "touchmove",
50
- "play",
51
- "pause",
52
34
  "ended",
53
- "canplay",
35
+ "error",
36
+ "focus",
37
+ "input",
38
+ "keydown",
39
+ "keypress",
40
+ "keyup",
41
+ "load",
54
42
  "loadeddata",
43
+ "mousedown",
44
+ "mousemove",
45
+ "mouseout",
46
+ "mouseover",
47
+ "mouseup",
48
+ "pause",
49
+ "play",
55
50
  "progress",
56
- "error"
51
+ "resize",
52
+ "scroll",
53
+ "submit",
54
+ "touchend",
55
+ "touchmove",
56
+ "touchstart",
57
+ "unload"
57
58
  ].includes(e)) {
58
59
  const u = {
59
60
  bubbles: !0,
@@ -0,0 +1,16 @@
1
+ import { SkfSelect } from '../../components/select/select.component.js';
2
+ import type { SkfPopoverBase } from '../base-classes/popover/popover.base.js';
3
+ import type { ReactiveController } from 'lit';
4
+ type ControllerHost = SkfPopoverBase | SkfSelect;
5
+ export declare class PopoverController implements ReactiveController {
6
+ host?: ControllerHost;
7
+ private cleanup;
8
+ private active;
9
+ private autoStart;
10
+ constructor(host: ControllerHost, autoStart?: boolean);
11
+ hostConnected(): void;
12
+ hostDisconnected(): void;
13
+ start(): void;
14
+ stop(): Promise<void>;
15
+ }
16
+ export {};
@@ -0,0 +1,44 @@
1
+ import "../../components/select/select.component.js";
2
+ import { autoUpdate as n } from "@floating-ui/dom";
3
+ class p {
4
+ constructor(t, o = !0) {
5
+ this.active = !1, this.autoStart = !0, this.host = t, t.addController(this), this.autoStart = o;
6
+ }
7
+ hostConnected() {
8
+ var t;
9
+ this.autoStart && ((t = this.host) == null || t.updateComplete.then(() => {
10
+ this.start();
11
+ }).catch((o) => {
12
+ console.error(o);
13
+ }));
14
+ }
15
+ hostDisconnected() {
16
+ this.stop().catch((t) => {
17
+ console.error(t);
18
+ });
19
+ }
20
+ start() {
21
+ var e, r;
22
+ const t = (e = this.host) == null ? void 0 : e.$anchor, o = (r = this.host) == null ? void 0 : r.$popover;
23
+ if (!t || !o) {
24
+ console.warn("PopoverController: anchor or popup not found");
25
+ return;
26
+ }
27
+ this.active || (this.cleanup = n(t, o, () => {
28
+ var s;
29
+ (s = this.host) == null || s.reposition().catch((i) => {
30
+ console.error(i);
31
+ });
32
+ }), this.active = !0);
33
+ }
34
+ async stop() {
35
+ return new Promise((t) => {
36
+ this.cleanup ? (this.cleanup(), this.cleanup = void 0, requestAnimationFrame(() => {
37
+ t();
38
+ })) : t(), this.active = !1;
39
+ });
40
+ }
41
+ }
42
+ export {
43
+ p as PopoverController
44
+ };
@@ -1,2 +1,2 @@
1
- import type { FormFieldBaseProps } from '@internal/types/formField.js';
2
- export declare function hintSeverity(hostSeverity: FormFieldBaseProps['severity'], invalid: boolean): "error" | ("info" | "warning" | "success" | "alert") | undefined;
1
+ import type { FormFieldBaseProps } from '../types/formField.js';
2
+ export declare function hintSeverity(hostSeverity: FormFieldBaseProps['severity'], invalid: boolean): "error" | ("success" | "info" | "warning" | "alert") | undefined;
@@ -0,0 +1,27 @@
1
+ import type { LitElement } from 'lit';
2
+ type UpdateHandler = (prev?: unknown, next?: unknown) => void;
3
+ type NonUndefined<A> = A extends undefined ? never : A;
4
+ type UpdateHandlerFunctionKeys<T extends object> = {
5
+ [K in keyof T]-?: NonUndefined<T[K]> extends UpdateHandler ? K : never;
6
+ }[keyof T];
7
+ interface WatchOptions {
8
+ /**
9
+ * If true, will only start watching after the initial update/render
10
+ */
11
+ waitUntilFirstUpdate?: boolean;
12
+ afterUpdate?: boolean;
13
+ }
14
+ /**
15
+ * Runs when observed properties change, e.g. @property or @state, but before the component updates. To wait for an
16
+ * update to complete after a change occurs, use `await this.updateComplete` in the handler. To start watching after the
17
+ * initial update/render, use `{ waitUntilFirstUpdate: true }` or `this.hasUpdated` in the handler.
18
+ *
19
+ * Usage:
20
+ *
21
+ * @watch('propName')
22
+ * handlePropChange(oldValue, newValue) {
23
+ * ...
24
+ * }
25
+ */
26
+ export declare function watch(propertyName: string | string[], options?: WatchOptions): <ElemClass extends LitElement>(proto: ElemClass, decoratedFnName: UpdateHandlerFunctionKeys<ElemClass>) => void;
27
+ export {};