wj-elements 0.2.0-alpha.7 → 0.2.0-alpha.9

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 (243) hide show
  1. package/dist/packages/index.d.ts +107 -0
  2. package/dist/packages/internals/form-associated-element.d.ts +143 -0
  3. package/dist/packages/localize/localize.d.ts +48 -0
  4. package/dist/packages/translations/en-gb.d.ts +18 -0
  5. package/dist/packages/translations/sk-sk.d.ts +13 -0
  6. package/dist/packages/utils/animations.d.ts +2 -0
  7. package/dist/packages/utils/base-path.d.ts +14 -0
  8. package/dist/packages/utils/date.d.ts +2 -0
  9. package/dist/packages/utils/element-utils.d.ts +46 -0
  10. package/dist/packages/utils/event.d.ts +67 -0
  11. package/dist/packages/utils/icon-library.d.ts +3 -0
  12. package/dist/packages/utils/localize.d.ts +4 -0
  13. package/dist/packages/utils/permissions.d.ts +40 -0
  14. package/dist/packages/utils/universal-service.d.ts +18 -0
  15. package/dist/packages/utils/utils.d.ts +1 -0
  16. package/dist/packages/wje-accordion/accordion.d.ts +2 -0
  17. package/dist/packages/wje-accordion/accordion.element.d.ts +72 -0
  18. package/dist/packages/wje-accordion/accordion.test.d.ts +0 -0
  19. package/dist/packages/wje-accordion-item/accordion-item.d.ts +2 -0
  20. package/dist/packages/wje-accordion-item/accordion-item.element.d.ts +40 -0
  21. package/dist/packages/wje-animation/animation.d.ts +2 -0
  22. package/dist/packages/wje-animation/animation.element.d.ts +158 -0
  23. package/dist/packages/wje-animation/animation.test.d.ts +1 -0
  24. package/dist/packages/wje-aside/aside.d.ts +2 -0
  25. package/dist/packages/wje-aside/aside.element.d.ts +31 -0
  26. package/dist/packages/wje-avatar/avatar.d.ts +2 -0
  27. package/dist/packages/wje-avatar/avatar.element.d.ts +76 -0
  28. package/dist/packages/wje-avatar/avatar.test.d.ts +1 -0
  29. package/dist/packages/wje-avatar/service/service.d.ts +52 -0
  30. package/dist/packages/wje-badge/badge.d.ts +2 -0
  31. package/dist/packages/wje-badge/badge.element.d.ts +35 -0
  32. package/dist/packages/wje-badge/badge.test.d.ts +1 -0
  33. package/dist/packages/wje-breadcrumb/breadcrumb.d.ts +2 -0
  34. package/dist/packages/wje-breadcrumb/breadcrumb.element.d.ts +98 -0
  35. package/dist/packages/wje-breadcrumbs/breadcrumbs.d.ts +2 -0
  36. package/dist/packages/wje-breadcrumbs/breadcrumbs.element.d.ts +105 -0
  37. package/dist/packages/wje-breadcrumbs/breadcrumbs.test.d.ts +1 -0
  38. package/dist/packages/wje-button/button.d.ts +2 -0
  39. package/dist/packages/wje-button/button.element.d.ts +204 -0
  40. package/dist/packages/wje-button/button.test.d.ts +1 -0
  41. package/dist/packages/wje-button-group/button-group.d.ts +2 -0
  42. package/dist/packages/wje-button-group/button-group.element.d.ts +96 -0
  43. package/dist/packages/wje-card/card.d.ts +2 -0
  44. package/dist/packages/wje-card/card.element.d.ts +31 -0
  45. package/dist/packages/wje-card-content/card-content.d.ts +2 -0
  46. package/dist/packages/wje-card-content/card-content.element.d.ts +22 -0
  47. package/dist/packages/wje-card-controls/card-controls.d.ts +2 -0
  48. package/dist/packages/wje-card-controls/card-controls.element.d.ts +23 -0
  49. package/dist/packages/wje-card-header/card-header.d.ts +2 -0
  50. package/dist/packages/wje-card-header/card-header.element.d.ts +22 -0
  51. package/dist/packages/wje-card-subtitle/card-subtitle.d.ts +2 -0
  52. package/dist/packages/wje-card-subtitle/card-subtitle.element.d.ts +30 -0
  53. package/dist/packages/wje-card-title/card-title.d.ts +2 -0
  54. package/dist/packages/wje-card-title/card-title.element.d.ts +32 -0
  55. package/dist/packages/wje-carousel/carousel.d.ts +2 -0
  56. package/dist/packages/wje-carousel/carousel.element.d.ts +154 -0
  57. package/dist/packages/wje-carousel-item/carousel-item.d.ts +2 -0
  58. package/dist/packages/wje-carousel-item/carousel-item.element.d.ts +38 -0
  59. package/dist/packages/wje-checkbox/checkbox.d.ts +2 -0
  60. package/dist/packages/wje-checkbox/checkbox.element.d.ts +100 -0
  61. package/dist/packages/wje-chip/chip.d.ts +2 -0
  62. package/dist/packages/wje-chip/chip.element.d.ts +76 -0
  63. package/dist/packages/wje-chip/chip.test.d.ts +1 -0
  64. package/dist/packages/wje-col/col.d.ts +2 -0
  65. package/dist/packages/wje-col/col.element.d.ts +16 -0
  66. package/dist/packages/wje-color-picker/color-picker.d.ts +2 -0
  67. package/dist/packages/wje-color-picker/color-picker.element.d.ts +230 -0
  68. package/dist/packages/wje-color-picker/color-picker.test.d.ts +1 -0
  69. package/dist/packages/wje-container/container.d.ts +2 -0
  70. package/dist/packages/wje-container/container.element.d.ts +31 -0
  71. package/dist/packages/wje-copy-button/copy-button.d.ts +2 -0
  72. package/dist/packages/wje-copy-button/copy-button.element.d.ts +89 -0
  73. package/dist/packages/wje-copy-button/service/service.d.ts +12 -0
  74. package/dist/packages/wje-dialog/dialog.d.ts +2 -0
  75. package/dist/packages/wje-dialog/dialog.element.d.ts +132 -0
  76. package/dist/packages/wje-divider/divider.d.ts +2 -0
  77. package/dist/packages/wje-divider/divider.element.d.ts +32 -0
  78. package/dist/packages/wje-dropdown/dropdown.d.ts +2 -0
  79. package/dist/packages/wje-dropdown/dropdown.element.d.ts +108 -0
  80. package/dist/packages/wje-element/element.d.ts +341 -0
  81. package/dist/packages/wje-file-upload/file-upload.d.ts +2 -0
  82. package/dist/packages/wje-file-upload/file-upload.element.d.ts +203 -0
  83. package/dist/packages/wje-file-upload/file-upload.test.d.ts +1 -0
  84. package/dist/packages/wje-file-upload/service/service.d.ts +70 -0
  85. package/dist/packages/wje-file-upload-item/file-upload-item.d.ts +2 -0
  86. package/dist/packages/wje-file-upload-item/file-upload-item.element.d.ts +85 -0
  87. package/dist/packages/wje-footer/footer.d.ts +2 -0
  88. package/dist/packages/wje-footer/footer.element.d.ts +28 -0
  89. package/dist/packages/wje-form/form.d.ts +2 -0
  90. package/dist/packages/wje-form/form.element.d.ts +28 -0
  91. package/dist/packages/wje-format-digital/format-digital.d.ts +2 -0
  92. package/dist/packages/wje-format-digital/format-digital.element.d.ts +83 -0
  93. package/dist/packages/wje-format-digital/format-digital.test.d.ts +1 -0
  94. package/dist/packages/wje-grid/grid.d.ts +2 -0
  95. package/dist/packages/wje-grid/grid.element.d.ts +26 -0
  96. package/dist/packages/wje-header/header.d.ts +2 -0
  97. package/dist/packages/wje-header/header.element.d.ts +35 -0
  98. package/dist/packages/wje-icon/icon.d.ts +2 -0
  99. package/dist/packages/wje-icon/icon.element.d.ts +40 -0
  100. package/dist/packages/wje-icon/service/library.d.ts +3 -0
  101. package/dist/packages/wje-icon/service/service.d.ts +11 -0
  102. package/dist/packages/wje-icon-picker/icon-picker.d.ts +2 -0
  103. package/dist/packages/wje-icon-picker/icon-picker.element.d.ts +210 -0
  104. package/dist/packages/wje-img/img.d.ts +2 -0
  105. package/dist/packages/wje-img/img.element.d.ts +118 -0
  106. package/dist/packages/wje-img-comparer/img-comparer.d.ts +2 -0
  107. package/dist/packages/wje-img-comparer/img-comparer.element.d.ts +60 -0
  108. package/dist/packages/wje-img-comparer/service/service.d.ts +1 -0
  109. package/dist/packages/wje-infinite-scroll/infinite-scroll.d.ts +2 -0
  110. package/dist/packages/wje-infinite-scroll/infinite-scroll.element.d.ts +173 -0
  111. package/dist/packages/wje-input/input.d.ts +2 -0
  112. package/dist/packages/wje-input/input.element.d.ts +159 -0
  113. package/dist/packages/wje-input-file/input-file.d.ts +2 -0
  114. package/dist/packages/wje-input-file/input-file.element.d.ts +50 -0
  115. package/dist/packages/wje-item/item.d.ts +2 -0
  116. package/dist/packages/wje-item/item.element.d.ts +68 -0
  117. package/dist/packages/wje-kanban/kanban.d.ts +2 -0
  118. package/dist/packages/wje-kanban/kanban.element.d.ts +182 -0
  119. package/dist/packages/wje-label/label.d.ts +2 -0
  120. package/dist/packages/wje-label/label.element.d.ts +34 -0
  121. package/dist/packages/wje-level-indicator/level-indicator.d.ts +2 -0
  122. package/dist/packages/wje-level-indicator/level-indicator.element.d.ts +91 -0
  123. package/dist/packages/wje-list/list.d.ts +2 -0
  124. package/dist/packages/wje-list/list.element.d.ts +31 -0
  125. package/dist/packages/wje-main/main.d.ts +2 -0
  126. package/dist/packages/wje-main/main.element.d.ts +30 -0
  127. package/dist/packages/wje-masonry/masonry.d.ts +2 -0
  128. package/dist/packages/wje-masonry/masonry.element.d.ts +114 -0
  129. package/dist/packages/wje-masonry/service/service.d.ts +32 -0
  130. package/dist/packages/wje-menu/menu.d.ts +2 -0
  131. package/dist/packages/wje-menu/menu.element.d.ts +47 -0
  132. package/dist/packages/wje-menu-button/menu-button.d.ts +2 -0
  133. package/dist/packages/wje-menu-button/menu-button.element.d.ts +34 -0
  134. package/dist/packages/wje-menu-item/menu-item.d.ts +2 -0
  135. package/dist/packages/wje-menu-item/menu-item.element.d.ts +161 -0
  136. package/dist/packages/wje-menu-label/menu-label.d.ts +2 -0
  137. package/dist/packages/wje-menu-label/menu-label.element.d.ts +39 -0
  138. package/dist/packages/wje-option/option.d.ts +2 -0
  139. package/dist/packages/wje-option/option.element.d.ts +95 -0
  140. package/dist/packages/wje-options/options.d.ts +2 -0
  141. package/dist/packages/wje-options/options.element.d.ts +232 -0
  142. package/dist/packages/wje-orgchart/orgchart.d.ts +2 -0
  143. package/dist/packages/wje-orgchart/orgchart.element.d.ts +24 -0
  144. package/dist/packages/wje-orgchart-group/orgchart-group.d.ts +2 -0
  145. package/dist/packages/wje-orgchart-group/orgchart-group.element.d.ts +28 -0
  146. package/dist/packages/wje-orgchart-item/orgchart-item.d.ts +2 -0
  147. package/dist/packages/wje-orgchart-item/orgchart-item.element.d.ts +49 -0
  148. package/dist/packages/wje-pagination/pagination.d.ts +2 -0
  149. package/dist/packages/wje-pagination/pagination.element.d.ts +178 -0
  150. package/dist/packages/wje-pagination/pagination.test.d.ts +1 -0
  151. package/dist/packages/wje-pagination/service/service.d.ts +9 -0
  152. package/dist/packages/wje-panel/panel.d.ts +2 -0
  153. package/dist/packages/wje-panel/panel.element.d.ts +34 -0
  154. package/dist/packages/wje-popup/popup.d.ts +2 -0
  155. package/dist/packages/wje-popup/popup.element.d.ts +145 -0
  156. package/dist/packages/wje-progress-bar/progress-bar.d.ts +2 -0
  157. package/dist/packages/wje-progress-bar/progress-bar.element.d.ts +96 -0
  158. package/dist/packages/wje-qr-code/qr-code.d.ts +2 -0
  159. package/dist/packages/wje-qr-code/qr-code.element.d.ts +33 -0
  160. package/dist/packages/wje-radio/radio.d.ts +2 -0
  161. package/dist/packages/wje-radio/radio.element.d.ts +64 -0
  162. package/dist/packages/wje-radio-group/radio-group.d.ts +2 -0
  163. package/dist/packages/wje-radio-group/radio-group.element.d.ts +61 -0
  164. package/dist/packages/wje-rate/rate.d.ts +2 -0
  165. package/dist/packages/wje-rate/rate.element.d.ts +156 -0
  166. package/dist/packages/wje-relative-time/relative-time.d.ts +2 -0
  167. package/dist/packages/wje-relative-time/relative-time.element.d.ts +55 -0
  168. package/dist/packages/wje-relative-time/relative-time.test.d.ts +1 -0
  169. package/dist/packages/wje-reorder/reorder.d.ts +2 -0
  170. package/dist/packages/wje-reorder/reorder.element.d.ts +119 -0
  171. package/dist/packages/wje-reorder-dropzone/reorder-dropzone.d.ts +2 -0
  172. package/dist/packages/wje-reorder-dropzone/reorder-dropzone.element.d.ts +23 -0
  173. package/dist/packages/wje-reorder-handle/reorder-handle.d.ts +2 -0
  174. package/dist/packages/wje-reorder-handle/reorder-handle.element.d.ts +84 -0
  175. package/dist/packages/wje-reorder-item/reorder-item.d.ts +2 -0
  176. package/dist/packages/wje-reorder-item/reorder-item.element.d.ts +24 -0
  177. package/dist/packages/wje-route/route.d.ts +2 -0
  178. package/dist/packages/wje-route/route.element.d.ts +22 -0
  179. package/dist/packages/wje-router/router.d.ts +2 -0
  180. package/dist/packages/wje-router/router.element.d.ts +43 -0
  181. package/dist/packages/wje-router-link/router-link.d.ts +2 -0
  182. package/dist/packages/wje-router-link/router-link.element.d.ts +31 -0
  183. package/dist/packages/wje-router-outlet/router-outlet.d.ts +2 -0
  184. package/dist/packages/wje-router-outlet/router-outlet.element.d.ts +16 -0
  185. package/dist/packages/wje-row/row.d.ts +2 -0
  186. package/dist/packages/wje-row/row.element.d.ts +23 -0
  187. package/dist/packages/wje-select/select.d.ts +2 -0
  188. package/dist/packages/wje-select/select.element.d.ts +388 -0
  189. package/dist/packages/wje-select/select.test.d.ts +1 -0
  190. package/dist/packages/wje-slider/slider.d.ts +2 -0
  191. package/dist/packages/wje-slider/slider.element.d.ts +103 -0
  192. package/dist/packages/wje-sliding-container/sliding-container.d.ts +2 -0
  193. package/dist/packages/wje-sliding-container/sliding-container.element.d.ts +265 -0
  194. package/dist/packages/wje-split-view/service/service.d.ts +1 -0
  195. package/dist/packages/wje-split-view/split-view.d.ts +2 -0
  196. package/dist/packages/wje-split-view/split-view.element.d.ts +65 -0
  197. package/dist/packages/wje-status/status.d.ts +2 -0
  198. package/dist/packages/wje-status/status.element.d.ts +26 -0
  199. package/dist/packages/wje-step/step.d.ts +2 -0
  200. package/dist/packages/wje-step/step.element.d.ts +23 -0
  201. package/dist/packages/wje-stepper/stepper.d.ts +2 -0
  202. package/dist/packages/wje-stepper/stepper.element.d.ts +125 -0
  203. package/dist/packages/wje-store/default-store-actions.d.ts +25 -0
  204. package/dist/packages/wje-store/pubsub.d.ts +22 -0
  205. package/dist/packages/wje-store/store.d.ts +153 -0
  206. package/dist/packages/wje-tab/tab.d.ts +2 -0
  207. package/dist/packages/wje-tab/tab.element.d.ts +66 -0
  208. package/dist/packages/wje-tab-group/tab-group.d.ts +2 -0
  209. package/dist/packages/wje-tab-group/tab-group.element.d.ts +131 -0
  210. package/dist/packages/wje-tab-group/tab-group.test.d.ts +1 -0
  211. package/dist/packages/wje-tab-panel/tab-panel.d.ts +2 -0
  212. package/dist/packages/wje-tab-panel/tab-panel.element.d.ts +23 -0
  213. package/dist/packages/wje-textarea/textarea.d.ts +2 -0
  214. package/dist/packages/wje-textarea/textarea.element.d.ts +89 -0
  215. package/dist/packages/wje-thumbnail/thumbnail.d.ts +2 -0
  216. package/dist/packages/wje-thumbnail/thumbnail.element.d.ts +31 -0
  217. package/dist/packages/wje-timeline/timeline.d.ts +2 -0
  218. package/dist/packages/wje-timeline/timeline.element.d.ts +25 -0
  219. package/dist/packages/wje-timeline-item/timeline-item.d.ts +2 -0
  220. package/dist/packages/wje-timeline-item/timeline-item.element.d.ts +27 -0
  221. package/dist/packages/wje-toast/toast.d.ts +2 -0
  222. package/dist/packages/wje-toast/toast.element.d.ts +173 -0
  223. package/dist/packages/wje-toast/toast.test.d.ts +1 -0
  224. package/dist/packages/wje-toggle/toggle.d.ts +2 -0
  225. package/dist/packages/wje-toggle/toggle.element.d.ts +81 -0
  226. package/dist/packages/wje-toggle/toggle.test.d.ts +1 -0
  227. package/dist/packages/wje-toolbar/toolbar.d.ts +2 -0
  228. package/dist/packages/wje-toolbar/toolbar.element.d.ts +39 -0
  229. package/dist/packages/wje-toolbar-action/toolbar-action.d.ts +2 -0
  230. package/dist/packages/wje-toolbar-action/toolbar-action.element.d.ts +35 -0
  231. package/dist/packages/wje-tooltip/tooltip.d.ts +2 -0
  232. package/dist/packages/wje-tooltip/tooltip.element.d.ts +77 -0
  233. package/dist/packages/wje-tree/tree.d.ts +2 -0
  234. package/dist/packages/wje-tree/tree.element.d.ts +105 -0
  235. package/dist/packages/wje-tree/tree.test.d.ts +1 -0
  236. package/dist/packages/wje-tree-item/tree-item.d.ts +2 -0
  237. package/dist/packages/wje-tree-item/tree-item.element.d.ts +155 -0
  238. package/dist/packages/wje-tree-item/tree-item.test.d.ts +1 -0
  239. package/dist/packages/wje-visually-hidden/visually-hidden.d.ts +2 -0
  240. package/dist/packages/wje-visually-hidden/visually-hidden.element.d.ts +29 -0
  241. package/dist/wje-file-upload-item.js +1 -1
  242. package/dist/wje-file-upload-item.js.map +1 -1
  243. package/package.json +1 -1
@@ -0,0 +1,388 @@
1
+ import { FormAssociatedElement } from '../internals/form-associated-element.js';
2
+ import { default as Button } from '../wje-button/button.js';
3
+ import { default as Popup } from '../wje-popup/popup.js';
4
+ import { default as Icon } from '../wje-icon/icon.js';
5
+ import { default as Label } from '../wje-label/label.js';
6
+ import { default as Chip } from '../wje-chip/chip.js';
7
+ import { default as Input } from '../wje-input/input.js';
8
+ import { default as Option } from '../wje-option/option.js';
9
+ import { default as Options } from '../wje-options/options.js';
10
+ import { default as Checkbox } from '../wje-checkbox/checkbox.js';
11
+ export class Select extends FormAssociatedElement {
12
+ /**
13
+ * Returns the CSS styles for the component.
14
+ * @static
15
+ * @returns {CSSStyleSheet}
16
+ */
17
+ static get cssStyleSheet(): CSSStyleSheet;
18
+ /**
19
+ * Returns the list of attributes to observe for changes.
20
+ * @static
21
+ * @returns {Array<string>}
22
+ */
23
+ static get observedAttributes(): Array<string>;
24
+ /**
25
+ * @type {HTMLElement|null}
26
+ * @description A reference to the counter element, initially null.
27
+ * @private
28
+ */
29
+ private counterEl;
30
+ /**
31
+ * @type {boolean}
32
+ * @description Tracks whether the select element was previously opened, initially false.
33
+ * @private
34
+ * @default {boolean} false
35
+ */
36
+ private _wasOppened;
37
+ /**
38
+ * @type {HTMLElement|null}
39
+ * @description A reference to the native select element, initially null.
40
+ */
41
+ native: HTMLElement | null;
42
+ /**
43
+ * @type {HTMLElement|null}
44
+ * @description A reference to the popup element, initially null.
45
+ */
46
+ popup: HTMLElement | null;
47
+ /**
48
+ * @type {HTMLElement|null}
49
+ * @description A reference to the label element, initially null.
50
+ */
51
+ labelElement: HTMLElement | null;
52
+ /**
53
+ * @type {HTMLElement|null}
54
+ * @description A reference to the slot start element, initially null.
55
+ */
56
+ slotStart: HTMLElement | null;
57
+ /**
58
+ * @type {HTMLElement|null}
59
+ * @description A reference to the slot end element, initially null.
60
+ */
61
+ slotEnd: HTMLElement | null;
62
+ /**
63
+ * @type {HTMLElement|null}
64
+ * @description A reference to the input element, initially null.
65
+ */
66
+ input: HTMLElement | null;
67
+ /**
68
+ * @type {HTMLElement|null}
69
+ * @description A reference to the chips element, initially null.
70
+ */
71
+ chips: HTMLElement | null;
72
+ /**
73
+ * @type {HTMLElement|null}
74
+ * @description A reference to the clear button element, initially null.
75
+ */
76
+ clear: HTMLElement | null;
77
+ /**
78
+ * @type {HTMLElement|null}
79
+ * @description A reference to the list element, initially null.
80
+ */
81
+ list: HTMLElement | null;
82
+ _value: any[];
83
+ _selectedOptions: any[];
84
+ /**
85
+ * An object representing component dependencies with their respective classes.
86
+ * Each property in the object maps a custom component name (as a string key)
87
+ * to its corresponding class or constructor.
88
+ * @typedef {{[key: string]: Function}} Dependencies
89
+ * @property {Function} 'wje-button' Represents the Button component class.
90
+ * @property {Function} 'wje-popup' Represents the Popup component class.
91
+ * @property {Function} 'wje-icon' Represents the Icon component class.
92
+ * @property {Function} 'wje-label' Represents the Label component class.
93
+ * @property {Function} 'wje-chip' Represents the Chip component class.
94
+ * @property {Function} 'wje-input' Represents the Input component class.
95
+ * @property {Function} 'wje-option' Represents the Option component class.
96
+ * @property {Function} 'wje-checkbox' Represents the Checkbox component class.
97
+ */
98
+ dependencies: {
99
+ 'wje-button': typeof Button;
100
+ 'wje-popup': typeof Popup;
101
+ 'wje-icon': typeof Icon;
102
+ 'wje-label': typeof Label;
103
+ 'wje-chip': typeof Chip;
104
+ 'wje-input': typeof Input;
105
+ 'wje-option': typeof Option;
106
+ 'wje-options': typeof Options;
107
+ 'wje-checkbox': typeof Checkbox;
108
+ };
109
+ /**
110
+ * Sets the maximum number of options allowed.
111
+ * @param { number | object} value The value to set as the maximum number of options.
112
+ * If null, the 'max-options' attribute will be removed.
113
+ */
114
+ set maxOptions(value: number | object);
115
+ /**
116
+ * Retrieves the maximum number of options allowed.
117
+ * Parses the value of the 'max-options' attribute from the element and converts it to a number.
118
+ * If the attribute is not present or cannot be converted to a valid number, defaults to 1.
119
+ * @returns {number} The maximum number of options, or 0 if the attribute is not set or invalid.
120
+ */
121
+ get maxOptions(): number;
122
+ /**
123
+ * @summary Setter for the defaultValue attribute.
124
+ * This method sets the 'value' attribute of the custom input element to the provided value.
125
+ * The 'value' attribute represents the default value of the input element.
126
+ * @param {string} value The value to set as the default value.
127
+ */
128
+ set defaultValue(value: string);
129
+ /**
130
+ * @summary Getter for the defaultValue attribute.
131
+ * This method retrieves the 'value' attribute of the custom input element.
132
+ * The 'value' attribute represents the default value of the input element.
133
+ * If the 'value' attribute is not set, it returns an empty string.
134
+ * @returns {string} The default value of the input element.
135
+ */
136
+ get defaultValue(): string;
137
+ /**
138
+ * Sets the trigger value.
139
+ * @param {string} value The trigger value to set.
140
+ */
141
+ set trigger(value: string);
142
+ /**
143
+ * Returns the trigger value.
144
+ * @returns {string} The trigger value.
145
+ */
146
+ get trigger(): string;
147
+ /**
148
+ * Sets the readonly state of the element. When set to true,
149
+ * the element and its associated inputs are marked as readonly or disabled.
150
+ * When set to false, the readonly and disabled attributes are removed,
151
+ * allowing user interaction.
152
+ * @param {boolean} value A boolean value indicating whether to set the
153
+ * element and its associated inputs to readonly (true) or not (false).
154
+ */
155
+ set readonly(value: boolean);
156
+ /**
157
+ * Checks if the 'readonly' attribute is present on the element.
158
+ * @returns {boolean} Returns true if the 'readonly' attribute is set, otherwise false.
159
+ */
160
+ get readonly(): boolean;
161
+ /**
162
+ * Sets the maximum height value for the element.
163
+ * If a value is provided, it sets the 'max-height' attribute on the element.
164
+ * If no value is provided, it removes the 'max-height' attribute from the element.
165
+ * @param {string|null} value The maximum height to be set. If null or undefined, the attribute is removed.
166
+ */
167
+ set maxHeight(value: string | null);
168
+ /**
169
+ * Retrieves the maximum height value, which is determined by the 'max-height' attribute.
170
+ * If the attribute is not set, a default value of '200px' is returned.
171
+ * @returns {string} The maximum height value as a string.
172
+ */
173
+ get maxHeight(): string;
174
+ /**
175
+ * Sets the offset attribute for the element.
176
+ * @param {string} value The value to assign to the offset attribute.
177
+ */
178
+ set offset(value: string);
179
+ /**
180
+ * Gets the value of the offset attribute of the current element.
181
+ * If the offset attribute is not present, returns a default value of '0'.
182
+ * @returns {string} The value of the offset attribute or the default value '0'.
183
+ */
184
+ get offset(): string;
185
+ /**
186
+ * Sets the selected options for the object.
187
+ * @param {Array|object} value The new value for the selected options. It can be an array or object containing the selected options.
188
+ */
189
+ set selectedOptions(value: any[] | object);
190
+ /**
191
+ * Retrieves the selected options.
192
+ * @returns {Array} An array containing the currently selected options. If no options are selected, an empty array is returned.
193
+ */
194
+ get selectedOptions(): any[];
195
+ /**
196
+ * Sets the `lazy` attribute on the element. If the provided value is truthy, the `lazy` attribute is added. If the value is falsy, the `lazy` attribute is removed.
197
+ * @param {boolean} value A boolean value indicating whether to add or remove the `lazy` attribute. If `true`, the attribute is added; if `false`, it is removed.
198
+ */
199
+ set lazy(value: boolean);
200
+ /**
201
+ * Getter for the 'lazy' property.
202
+ * @returns {boolean} Returns true if the 'lazy' attribute is present on the element, otherwise false.
203
+ */
204
+ get lazy(): boolean;
205
+ /**
206
+ * Sets or removes the 'no-size' attribute on an element.
207
+ * @param {boolean} value A boolean indicating whether to add or remove the 'no-size' attribute. If true, the attribute is added; if false, the attribute is removed.
208
+ */
209
+ set noSize(value: boolean);
210
+ /**
211
+ * Gets the value of the 'no-size' attribute for the element.
212
+ * @returns {boolean} True if the 'no-size' attribute is present, otherwise false.
213
+ */
214
+ get noSize(): boolean;
215
+ /**
216
+ * Getter for the customErrorDisplay attribute.
217
+ * @returns {boolean} Whether the attribute is present.
218
+ */
219
+ get customErrorDisplay(): boolean;
220
+ /**
221
+ * Retrieves the complete list of options available for the component.
222
+ * The options are determined by combining elements from various sources, including loaded options, added options, and HTML-sourced options.
223
+ * If a `wje-options` element is present within the component, its loaded options are included in the merged list.
224
+ * In the absence of a `wje-options` element, duplicates among the added and HTML options are removed, retaining their order.
225
+ * @returns {Array<object>} An array containing all the available options, combining the loaded, added, and HTML-based options, with duplicates removed where applicable.
226
+ */
227
+ get options(): Array<object>;
228
+ beforeDraw(): void;
229
+ /**
230
+ * Draws the component for the select.
231
+ * @returns {DocumentFragment}
232
+ */
233
+ draw(): DocumentFragment;
234
+ findEl: HTMLElement;
235
+ displayInput: HTMLInputElement;
236
+ slotFooter: HTMLSlotElement;
237
+ /**
238
+ * Executes post-render logic for the custom element.
239
+ * This includes validation, event listener registration, managing custom attributes, and
240
+ * handling options initialization for the component.
241
+ * @returns {void} This method does not return any value.
242
+ */
243
+ afterDraw(): void;
244
+ pristine: boolean;
245
+ /**
246
+ * Handles the change event for an option element within a select-like component.
247
+ * This method processes user interactions with options and updates the state of the component,
248
+ * including selection management, validation, and UI updates. Behavior differs based on
249
+ * whether the component supports multiple selections.
250
+ * Key functionality:
251
+ * - Prevents the default behavior, event propagation, and immediate propagation of the event.
252
+ * - Retrieves all options within the component.
253
+ * - If the component doesn't support multiple selection:
254
+ * - Marks only the clicked option as selected and deselects others.
255
+ * - Hides the option popup.
256
+ * - If the component supports multiple selection:
257
+ * - Processes the clicked option without deselecting others.
258
+ * - Updates the selected options and triggers validation.
259
+ * - Marks the form state as non-pristine.
260
+ * - Propagates the validation state to other relevant parts of the component or system.
261
+ * @param {Event} e The event object representing the option change interaction.
262
+ */
263
+ optionChange: (e: Event) => void;
264
+ /**
265
+ * Handles the logic for processing the selection state of a clicked option element.
266
+ * @function processClickedOption
267
+ * @param {Element} option The option element that is clicked.
268
+ * @param {boolean} [multiple] A Boolean indicating whether multiple options can be selected. Defaults to false.
269
+ * Changes the selected state of the passed option and updates the selected options list.
270
+ * Checks if the option already has a "selected" attribute, toggles its state,
271
+ * and updates the internal selected options.
272
+ */
273
+ processClickedOption: (option: Element, multiple?: boolean) => void;
274
+ /**
275
+ * Returns all the options as HTML.
276
+ * @returns {NodeList} The options as HTML.
277
+ */
278
+ getAllOptions(): NodeList;
279
+ /**
280
+ * Handles changes in the selection for a component, updating internal values, input fields,
281
+ * and visual presentation (like chips or slots) as per the given selection options.
282
+ * @param {Array|null} options The collection of selected option elements. If null, no options are selected.
283
+ * @param {number} length The total number of selected options.
284
+ * @returns {void}
285
+ */
286
+ selectionChanged(options?: any[] | null, length?: number): void;
287
+ /**
288
+ * Handles the logic for updating selections based on the current selected options,
289
+ * updating chips content, and dispatching change events if necessary.
290
+ * @param {boolean} [silence] If true, suppresses the dispatch of a custom change event.
291
+ * @returns {void} This method does not return a value.
292
+ */
293
+ selections(silence?: boolean): void;
294
+ /**
295
+ * Updates the counter element to reflect the current state of selected values relative to the maximum allowed options.
296
+ * If the maximum options are selected, the counter element is removed. If it does not already exist and needs to be displayed, it is created.
297
+ * @returns {void} Does not return a value.
298
+ */
299
+ counter(): void;
300
+ /**
301
+ * Creates and returns a chip element with specified properties and a label.
302
+ * @param {object} option The configuration object for the chip. Typically includes properties such as value and textContent to set up the chip's label and data.
303
+ * @returns {HTMLElement} The newly created chip element with a label and default properties.
304
+ */
305
+ getChip(option: object): HTMLElement;
306
+ /**
307
+ * Handles the removal of a chip element from the DOM and updates the related state.
308
+ * @param {Event} e The event object triggered by the chip removal action.
309
+ * The target of the event is expected to be the chip element itself.
310
+ */
311
+ removeChip: (e: Event) => void;
312
+ /**
313
+ * Generates an HTML option element based on the provided item and mapping.
314
+ * @param {object} item The item to generate the option for.
315
+ * @param {object} [map] The mapping object that specifies the properties of the item to use for the option's value and text.
316
+ * @param {string} [map.value] The property of the item to use for the option's value.
317
+ * @param {string} [map.text] The property of the item to use for the option's text.
318
+ * @returns {HTMLElement} The generated HTML option element.
319
+ */
320
+ htmlOption(item: object, map?: {
321
+ value?: string;
322
+ text?: string;
323
+ }): HTMLElement;
324
+ /**
325
+ * Returns the provided item.
326
+ * @param {any} item The item to be returned.
327
+ * @returns {any} The same item that was passed as input.
328
+ */
329
+ htmlSelectedItem(item: any): any;
330
+ /**
331
+ * Adds a new option to the component.
332
+ * @param {object} optionData The data used to create the new option.
333
+ * @param {boolean} [silent] Whether the addition should trigger events or not.
334
+ * @param {object} [map] Mapping of keys to identify value and text in the optionData.
335
+ * @param {string} [map.value] The key in optionData that represents the value of the option.
336
+ * @param {string} [map.text] The key in optionData that represents the text of the option.
337
+ * @returns {void}
338
+ */
339
+ addOption(optionData: object, silent?: boolean, map?: {
340
+ value?: string;
341
+ text?: string;
342
+ }): void;
343
+ /**
344
+ * Adds one or more options to a collection. If the input is an array, it adds each option within the array.
345
+ * Otherwise, it adds a single option.
346
+ * @param {Array | object} optionsData The data representing the options to be added. It can be a single object or an array of objects.
347
+ * @param {boolean} [silent] Optional flag to determine if events or notifications should be suppressed while adding options.
348
+ * @param {object} [map] An optional mapping object specifying how to map data properties to value and text for the options.
349
+ * @param {string} [map.value] The property in the optionsData that represents the value of the option.
350
+ * @param {string} [map.text] The property in the optionsData that represents the text of the option.
351
+ * @returns {void}
352
+ */
353
+ addOptions(optionsData: any[] | object, silent?: boolean, map?: {
354
+ value?: string;
355
+ text?: string;
356
+ }): void;
357
+ /**
358
+ * Selects an option from the available options within the component.
359
+ * @param {string} value The value of the option to be selected.
360
+ * @param {boolean} [silent] Determines whether the selection should trigger notification or updates. Defaults to false.
361
+ * @returns {void} Does not return a value.
362
+ */
363
+ selectOption(value: string, silent?: boolean): void;
364
+ /**
365
+ * Selects multiple options based on the provided values. If a single value is provided, it selects that option.
366
+ * If an array of values is provided, it iterates through the array and selects each option.
367
+ * @param {any|any[]} values A single value or an array of values to be selected.
368
+ * @param {boolean} [silent] Determines whether the selection action should occur silently without triggering other side effects or events.
369
+ * @returns {void} This method does not return a value.
370
+ */
371
+ selectOptions(values: any | any[], silent?: boolean): void;
372
+ /**
373
+ * Clones and appends an icon with the "check" slot to the specified option element.
374
+ * If the option already contains a custom element with slot="check" (e.g. <wje-status slot="check">),
375
+ * it is left untouched and no template icon is added.
376
+ * @param {HTMLElement} option The target HTML element to which the cloned "check" icon will be appended.
377
+ * @returns {void} This method does not return a value, but it modifies the DOM by appending a cloned "check" icon to the provided option element.
378
+ */
379
+ optionCheckSlot(option: HTMLElement): void;
380
+ /**
381
+ * Clears all selected options and resets selections.
382
+ * The method ensures that all options are deselected, updates the internal state, validates the selections,
383
+ * propagates the validation status, and indicates invalid state if necessary.
384
+ * @returns {void} No value is returned by this method.
385
+ */
386
+ clearSelections(): void;
387
+ #private;
388
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { default as Slider } from './slider.element.js';
2
+ export default Slider;
@@ -0,0 +1,103 @@
1
+ import { default as WJElement } from '../wje-element/element.js';
2
+ /**
3
+ * Represents a slider component that extends the WJElement class.
4
+ * This slider supports features such as min, max, step values, bubble display, and event handling.
5
+ * It offers both getter and setter methods for its attributes and dynamically handles rendering and updates.
6
+ */
7
+ export default class Slider extends WJElement {
8
+ /**
9
+ * Returns the CSS styles for the component.
10
+ * @static
11
+ * @returns {CSSStyleSheet}
12
+ */
13
+ static get cssStyleSheet(): CSSStyleSheet;
14
+ /**
15
+ * Returns the list of attributes to observe for changes.
16
+ * @static
17
+ * @returns {Array<string>}
18
+ */
19
+ static get observedAttributes(): Array<string>;
20
+ /**
21
+ * Sets the value of the slider.
22
+ * @param {number} value The value to set.
23
+ */
24
+ set value(value: number);
25
+ /**
26
+ * Returns the value of the slider.
27
+ * @returns {number} The value of the slider input.
28
+ */
29
+ get value(): number;
30
+ /**
31
+ * Sets the minimum value of the slider.
32
+ * @param {number} value The minimum value to set.
33
+ */
34
+ set min(value: number);
35
+ /**
36
+ * Returns the minimum value of the slider.
37
+ * @returns {number} The minimum value of the slider.
38
+ */
39
+ get min(): number;
40
+ /**
41
+ * Sets the maximum value of the slider.
42
+ * @param {number} value The maximum value to set.
43
+ */
44
+ set max(value: number);
45
+ /**
46
+ * Returns the maximum value of the slider.
47
+ * @returns {number} The maximum value of the slider.
48
+ */
49
+ get max(): number;
50
+ /**
51
+ * Sets the step value of the slider.
52
+ * @param {number} value The step value to set.
53
+ */
54
+ set step(value: number);
55
+ /**
56
+ * Returns the step value of the slider.
57
+ * @returns {number} The step value of the slider.
58
+ */
59
+ get step(): number;
60
+ /**
61
+ * Draws the component for the slider.
62
+ * @returns {DocumentFragment}
63
+ */
64
+ draw(): DocumentFragment;
65
+ input: HTMLInputElement;
66
+ output: HTMLOutputElement;
67
+ /**
68
+ * Handles the post-rendering logic for a custom slider component. This method performs the following tasks:
69
+ * - Sets the position of the handle.
70
+ * - Displays a bubble indicator with the current value, if the slider has a "bubble" attribute.
71
+ * - Dispatches initialization, movement, and change custom events for the slider input element.
72
+ * - Updates the bubble position and value dynamically on input changes.
73
+ * @returns {void} This method does not return a value.
74
+ */
75
+ afterDraw(): void;
76
+ /**
77
+ * Sets the handle position of the slider.
78
+ */
79
+ setHandlePosition: () => void;
80
+ /**
81
+ * Updates the position and content of a bubble element based on the input value.
82
+ *
83
+ * This function calculates the position of the bubble using the percentage representation
84
+ * of the input's current value relative to its minimum and maximum bounds. It then adjusts
85
+ * the bubble's left position dynamically for aesthetic purposes and updates its displayed
86
+ * content to reflect the current input value.
87
+ *
88
+ * The function relies on the following elements:
89
+ * - `this.input`: Represents the input element with properties `min`, `max`, and `value`.
90
+ * - `this.output`: Represents the bubble element to be positioned and updated.
91
+ *
92
+ * The left positioning of the bubble ensures precise alignment with the input value indicator.
93
+ */
94
+ setBubble: () => void;
95
+ /**
96
+ * Calculates the percentage of a value within a given range.
97
+ * @param {number} min The minimum value of the range.
98
+ * @param {number} max The maximum value of the range.
99
+ * @param {number} [value] The current value within the range. Defaults to 0 if not provided.
100
+ * @returns {number} The calculated percentage as a number between 0 and 100. Returns 0 if the range is invalid.
101
+ */
102
+ getPercentage(min: number, max: number, value?: number): number;
103
+ }
@@ -0,0 +1,2 @@
1
+ import { default as SlidingContainer } from './sliding-container.element.js';
2
+ export default SlidingContainer;