wj-elements 0.2.0-alpha.9 → 0.3.0-alpha.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 (217) hide show
  1. package/dist/dark.css +15 -1
  2. package/dist/{form-associated-element-o0UjvdUp.js → form-associated-element-DEQ4y-jn.js} +1 -2
  3. package/dist/form-associated-element-DEQ4y-jn.js.map +1 -0
  4. package/dist/{icon-DY5AZ6xM.js → icon-DVyMc4Wv.js} +36 -2
  5. package/dist/{icon-DY5AZ6xM.js.map → icon-DVyMc4Wv.js.map} +1 -1
  6. package/dist/light.css +7 -2
  7. package/dist/localize.js +8 -5
  8. package/dist/localize.js.map +1 -1
  9. package/dist/packages/internals/form-associated-element.d.ts +0 -1
  10. package/dist/packages/utils/utils.d.ts +16 -0
  11. package/dist/packages/wje-accordion-item/accordion-item.element.d.ts +3 -0
  12. package/dist/packages/wje-avatar/avatar.element.d.ts +5 -0
  13. package/dist/packages/wje-breadcrumb/breadcrumb.element.d.ts +1 -0
  14. package/dist/packages/wje-button/button.element.d.ts +5 -1
  15. package/dist/packages/wje-button-group/button-group.element.d.ts +4 -0
  16. package/dist/packages/wje-card/card.element.d.ts +15 -6
  17. package/dist/packages/wje-carousel/carousel.element.d.ts +4 -0
  18. package/dist/packages/wje-checkbox/checkbox.element.d.ts +14 -0
  19. package/dist/packages/wje-chip/chip.element.d.ts +6 -0
  20. package/dist/packages/wje-color-picker/color-picker.element.d.ts +43 -1
  21. package/dist/packages/wje-copy-button/copy-button.element.d.ts +4 -0
  22. package/dist/packages/wje-dialog/dialog.element.d.ts +2 -0
  23. package/dist/packages/wje-dropdown/dropdown.element.d.ts +7 -0
  24. package/dist/packages/wje-element/element.d.ts +55 -24
  25. package/dist/packages/wje-file-upload/file-upload.element.d.ts +17 -6
  26. package/dist/packages/wje-file-upload/service/service.d.ts +0 -23
  27. package/dist/packages/wje-file-upload-item/file-upload-item.element.d.ts +5 -0
  28. package/dist/packages/wje-format-digital/format-digital.element.d.ts +2 -0
  29. package/dist/packages/wje-icon/icon.element.d.ts +11 -0
  30. package/dist/packages/wje-icon-picker/icon-picker.element.d.ts +4 -0
  31. package/dist/packages/wje-img/img.element.d.ts +1 -0
  32. package/dist/packages/wje-infinite-scroll/infinite-scroll.element.d.ts +4 -0
  33. package/dist/packages/wje-input/input.element.d.ts +9 -1
  34. package/dist/packages/wje-item/item.element.d.ts +8 -0
  35. package/dist/packages/wje-kanban/kanban.element.d.ts +4 -0
  36. package/dist/packages/wje-level-indicator/level-indicator.element.d.ts +17 -0
  37. package/dist/packages/wje-list/list.element.d.ts +4 -0
  38. package/dist/packages/wje-menu-item/menu-item.element.d.ts +4 -0
  39. package/dist/packages/wje-option/option.element.d.ts +4 -0
  40. package/dist/packages/wje-options/options.element.d.ts +4 -0
  41. package/dist/packages/wje-orgchart/orgchart.element.d.ts +4 -0
  42. package/dist/packages/wje-progress-bar/progress-bar.element.d.ts +11 -0
  43. package/dist/packages/wje-qr-code/qr-code.element.d.ts +63 -0
  44. package/dist/packages/wje-radio/radio.element.d.ts +5 -0
  45. package/dist/packages/wje-radio-group/radio-group.element.d.ts +16 -1
  46. package/dist/packages/wje-rate/rate.element.d.ts +4 -0
  47. package/dist/packages/wje-relative-time/relative-time.element.d.ts +2 -0
  48. package/dist/packages/wje-reorder/reorder.element.d.ts +4 -0
  49. package/dist/packages/wje-reorder-handle/reorder-handle.element.d.ts +4 -0
  50. package/dist/packages/wje-select/select.element.d.ts +7 -0
  51. package/dist/packages/wje-slider/slider.element.d.ts +5 -0
  52. package/dist/packages/wje-sliding-container/sliding-container.element.d.ts +4 -0
  53. package/dist/packages/wje-split-view/split-view.element.d.ts +1 -0
  54. package/dist/packages/wje-stepper/stepper.element.d.ts +1 -0
  55. package/dist/packages/wje-tab/tab.element.d.ts +10 -0
  56. package/dist/packages/wje-tab-group/tab-group.element.d.ts +11 -0
  57. package/dist/packages/wje-textarea/textarea.element.d.ts +20 -1
  58. package/dist/packages/wje-thumbnail/thumbnail.element.d.ts +4 -0
  59. package/dist/packages/wje-timeline/timeline.element.d.ts +4 -0
  60. package/dist/packages/wje-toggle/toggle.element.d.ts +4 -0
  61. package/dist/packages/wje-toolbar/toolbar.element.d.ts +4 -0
  62. package/dist/packages/wje-tooltip/tooltip.element.d.ts +3 -0
  63. package/dist/packages/wje-tree/tree.element.d.ts +4 -0
  64. package/dist/packages/wje-tree-item/tree-item.element.d.ts +5 -0
  65. package/dist/{popup.element-DeajFyOQ.js → popup.element-Cl6QeG8M.js} +2 -2
  66. package/dist/{popup.element-DeajFyOQ.js.map → popup.element-Cl6QeG8M.js.map} +1 -1
  67. package/dist/skeleton.css +197 -0
  68. package/dist/utils.js +18 -1
  69. package/dist/utils.js.map +1 -1
  70. package/dist/wje-accordion-item.js +26 -4
  71. package/dist/wje-accordion-item.js.map +1 -1
  72. package/dist/wje-accordion.js +1 -0
  73. package/dist/wje-accordion.js.map +1 -1
  74. package/dist/wje-animation.js +1 -0
  75. package/dist/wje-animation.js.map +1 -1
  76. package/dist/wje-avatar.js +18 -0
  77. package/dist/wje-avatar.js.map +1 -1
  78. package/dist/wje-badge.js +1 -0
  79. package/dist/wje-badge.js.map +1 -1
  80. package/dist/wje-breadcrumb.js +13 -1
  81. package/dist/wje-breadcrumb.js.map +1 -1
  82. package/dist/wje-breadcrumbs.js +1 -0
  83. package/dist/wje-breadcrumbs.js.map +1 -1
  84. package/dist/wje-button-group.js +10 -0
  85. package/dist/wje-button-group.js.map +1 -1
  86. package/dist/wje-button.js +29 -5
  87. package/dist/wje-button.js.map +1 -1
  88. package/dist/wje-card.js +37 -0
  89. package/dist/wje-card.js.map +1 -1
  90. package/dist/wje-carousel.js +38 -4
  91. package/dist/wje-carousel.js.map +1 -1
  92. package/dist/wje-checkbox.js +48 -3
  93. package/dist/wje-checkbox.js.map +1 -1
  94. package/dist/wje-chip.js +22 -0
  95. package/dist/wje-chip.js.map +1 -1
  96. package/dist/wje-color-picker.js +143 -29
  97. package/dist/wje-color-picker.js.map +1 -1
  98. package/dist/wje-copy-button.js +21 -0
  99. package/dist/wje-copy-button.js.map +1 -1
  100. package/dist/wje-dialog.js +35 -2
  101. package/dist/wje-dialog.js.map +1 -1
  102. package/dist/wje-dropdown.js +27 -3
  103. package/dist/wje-dropdown.js.map +1 -1
  104. package/dist/wje-element.js +87 -242
  105. package/dist/wje-element.js.map +1 -1
  106. package/dist/wje-file-upload-item.js +23 -1
  107. package/dist/wje-file-upload-item.js.map +1 -1
  108. package/dist/wje-file-upload.js +100 -77
  109. package/dist/wje-file-upload.js.map +1 -1
  110. package/dist/wje-format-digital.js +9 -0
  111. package/dist/wje-format-digital.js.map +1 -1
  112. package/dist/wje-icon-picker.js +15 -0
  113. package/dist/wje-icon-picker.js.map +1 -1
  114. package/dist/wje-icon.js +1 -1
  115. package/dist/wje-img-comparer.js +5 -1
  116. package/dist/wje-img-comparer.js.map +1 -1
  117. package/dist/wje-img.js +16 -1
  118. package/dist/wje-img.js.map +1 -1
  119. package/dist/wje-infinite-scroll.js +10 -0
  120. package/dist/wje-infinite-scroll.js.map +1 -1
  121. package/dist/wje-input-file.js +2 -0
  122. package/dist/wje-input-file.js.map +1 -1
  123. package/dist/wje-input.js +59 -4
  124. package/dist/wje-input.js.map +1 -1
  125. package/dist/wje-item.js +14 -0
  126. package/dist/wje-item.js.map +1 -1
  127. package/dist/wje-kanban.js +14 -0
  128. package/dist/wje-kanban.js.map +1 -1
  129. package/dist/wje-level-indicator.js +36 -0
  130. package/dist/wje-level-indicator.js.map +1 -1
  131. package/dist/wje-list.js +10 -0
  132. package/dist/wje-list.js.map +1 -1
  133. package/dist/wje-master.js +11 -2
  134. package/dist/wje-master.js.map +1 -1
  135. package/dist/wje-menu-button.js +1 -0
  136. package/dist/wje-menu-button.js.map +1 -1
  137. package/dist/wje-menu-item.js +24 -0
  138. package/dist/wje-menu-item.js.map +1 -1
  139. package/dist/wje-menu.js +4 -1
  140. package/dist/wje-menu.js.map +1 -1
  141. package/dist/wje-option.js +14 -1
  142. package/dist/wje-option.js.map +1 -1
  143. package/dist/wje-options.js +13 -0
  144. package/dist/wje-options.js.map +1 -1
  145. package/dist/wje-orgchart.js +9 -0
  146. package/dist/wje-orgchart.js.map +1 -1
  147. package/dist/wje-pagination.js +18 -9
  148. package/dist/wje-pagination.js.map +1 -1
  149. package/dist/wje-popup.js +1 -1
  150. package/dist/wje-progress-bar.js +26 -0
  151. package/dist/wje-progress-bar.js.map +1 -1
  152. package/dist/wje-qr-code.js +159 -17
  153. package/dist/wje-qr-code.js.map +1 -1
  154. package/dist/wje-radio-group.js +49 -2
  155. package/dist/wje-radio-group.js.map +1 -1
  156. package/dist/wje-radio.js +27 -1
  157. package/dist/wje-radio.js.map +1 -1
  158. package/dist/wje-rate.js +23 -1
  159. package/dist/wje-rate.js.map +1 -1
  160. package/dist/wje-relative-time.js +14 -1
  161. package/dist/wje-relative-time.js.map +1 -1
  162. package/dist/wje-reorder-handle.js +21 -0
  163. package/dist/wje-reorder-handle.js.map +1 -1
  164. package/dist/wje-reorder.js +10 -0
  165. package/dist/wje-reorder.js.map +1 -1
  166. package/dist/wje-select.js +35 -5
  167. package/dist/wje-select.js.map +1 -1
  168. package/dist/wje-slider.js +51 -1
  169. package/dist/wje-slider.js.map +1 -1
  170. package/dist/wje-sliding-container.js +18 -0
  171. package/dist/wje-sliding-container.js.map +1 -1
  172. package/dist/wje-split-view.js +9 -0
  173. package/dist/wje-split-view.js.map +1 -1
  174. package/dist/wje-status.js +1 -0
  175. package/dist/wje-status.js.map +1 -1
  176. package/dist/wje-stepper.js +24 -1
  177. package/dist/wje-stepper.js.map +1 -1
  178. package/dist/wje-tab-group.js +59 -2
  179. package/dist/wje-tab-group.js.map +1 -1
  180. package/dist/wje-tab.js +30 -0
  181. package/dist/wje-tab.js.map +1 -1
  182. package/dist/wje-textarea.js +96 -14
  183. package/dist/wje-textarea.js.map +1 -1
  184. package/dist/wje-thumbnail.js +19 -0
  185. package/dist/wje-thumbnail.js.map +1 -1
  186. package/dist/wje-toast.js +4 -0
  187. package/dist/wje-toast.js.map +1 -1
  188. package/dist/wje-toggle.js +17 -1
  189. package/dist/wje-toggle.js.map +1 -1
  190. package/dist/wje-toolbar.js +14 -0
  191. package/dist/wje-toolbar.js.map +1 -1
  192. package/dist/wje-tooltip.js +31 -7
  193. package/dist/wje-tooltip.js.map +1 -1
  194. package/dist/wje-tree-item.js +41 -5
  195. package/dist/wje-tree-item.js.map +1 -1
  196. package/dist/wje-tree.js +12 -1
  197. package/dist/wje-tree.js.map +1 -1
  198. package/package.json +21 -2
  199. package/dist/form-associated-element-o0UjvdUp.js.map +0 -1
  200. package/dist/packages/wje-accordion/accordion.test.d.ts +0 -0
  201. package/dist/packages/wje-animation/animation.test.d.ts +0 -1
  202. package/dist/packages/wje-avatar/avatar.test.d.ts +0 -1
  203. package/dist/packages/wje-badge/badge.test.d.ts +0 -1
  204. package/dist/packages/wje-breadcrumbs/breadcrumbs.test.d.ts +0 -1
  205. package/dist/packages/wje-button/button.test.d.ts +0 -1
  206. package/dist/packages/wje-chip/chip.test.d.ts +0 -1
  207. package/dist/packages/wje-color-picker/color-picker.test.d.ts +0 -1
  208. package/dist/packages/wje-file-upload/file-upload.test.d.ts +0 -1
  209. package/dist/packages/wje-format-digital/format-digital.test.d.ts +0 -1
  210. package/dist/packages/wje-pagination/pagination.test.d.ts +0 -1
  211. package/dist/packages/wje-relative-time/relative-time.test.d.ts +0 -1
  212. package/dist/packages/wje-select/select.test.d.ts +0 -1
  213. package/dist/packages/wje-tab-group/tab-group.test.d.ts +0 -1
  214. package/dist/packages/wje-toast/toast.test.d.ts +0 -1
  215. package/dist/packages/wje-toggle/toggle.test.d.ts +0 -1
  216. package/dist/packages/wje-tree/tree.test.d.ts +0 -1
  217. package/dist/packages/wje-tree-item/tree-item.test.d.ts +0 -1
@@ -15,6 +15,7 @@ import { default as WJElement } from '../wje-element/element.js';
15
15
  * @csspart alpha - The alpha slider part of the color picker.
16
16
  * @csspart color-preview - The color preview part of the color picker.
17
17
  * @csspart input - The input part of the color picker.
18
+ * @attribute {boolean} input-editable - Enables manual color typing into the input field.
18
19
  * @cssproperty [--wje-color-picker-area] - The color of the color area background.
19
20
  * @cssproperty [--wje-color-picker-value] - The value of the color picker input.
20
21
  * @cssproperty [--wje-color-picker-swatch] - The color of the color swatch button.
@@ -46,6 +47,13 @@ export default class ColorPicker extends WJElement {
46
47
  * @private
47
48
  */
48
49
  private _swatches;
50
+ /**
51
+ * Stores last raw value typed by user in editable input.
52
+ * Used to avoid aggressive normalization while typing.
53
+ * @type {string|null}
54
+ * @private
55
+ */
56
+ private _manualInputValue;
49
57
  /**
50
58
  * Sets the color attribute of the element.
51
59
  * @param {string} value The color value to be set. It should be a valid color string such as a named color, HEX, RGB, or HSL format.
@@ -76,6 +84,13 @@ export default class ColorPicker extends WJElement {
76
84
  * @returns {Array} The current color swatches.
77
85
  */
78
86
  get swatches(): any[];
87
+ /**
88
+ * Normalizes swatch colors from a string to an array.
89
+ * Supports comma and semicolon separators.
90
+ * @param {string} value
91
+ * @returns {string[]}
92
+ */
93
+ parseSwatches(value?: string): string[];
79
94
  /**
80
95
  * Sets or removes the 'no-color-area' attribute based on the provided value.
81
96
  * @param {boolean} value A boolean value indicating whether to set or remove the 'no-color-area' attribute. If true, the attribute is added; if false, the attribute is removed.
@@ -108,6 +123,16 @@ export default class ColorPicker extends WJElement {
108
123
  * @returns {boolean} Returns true if the 'no-swatches' attribute is present; otherwise, false.
109
124
  */
110
125
  get noSwatches(): boolean;
126
+ /**
127
+ * Enables/disables manual typing in the input.
128
+ * @param {boolean} value
129
+ */
130
+ set inputEditable(value: boolean);
131
+ /**
132
+ * Returns true when manual input typing is enabled.
133
+ * @returns {boolean}
134
+ */
135
+ get inputEditable(): boolean;
111
136
  /**
112
137
  * Creates and returns a document fragment containing the structure and components of a custom color picker.
113
138
  * The method initializes DOM elements such as divs, sliders, and inputs, with specific classes and attributes,
@@ -174,6 +199,16 @@ export default class ColorPicker extends WJElement {
174
199
  * @param y
175
200
  */
176
201
  setMarkerPosition(x: any, y: any): void;
202
+ /**
203
+ * Clamps marker coordinates to the color area boundaries.
204
+ * @param {number} x
205
+ * @param {number} y
206
+ * @returns {{x: number, y: number}}
207
+ */
208
+ clampMarkerPosition(x: number, y: number): {
209
+ x: number;
210
+ y: number;
211
+ };
177
212
  /**
178
213
  * Sets the color at the given position.
179
214
  * @param x
@@ -194,7 +229,7 @@ export default class ColorPicker extends WJElement {
194
229
  /**
195
230
  * Updates the color picker's current color and its associated UI elements.
196
231
  * @param {tinycolor.Instance|null} [color] The color value to set. If null, the current value from the input field is used.
197
- * @param {string} [type] The type of action determining which UI element to update. Possible values: "marker", "hue", "alpha", "swatch".
232
+ * @param {string} [type] The type of action determining which UI element to update. Possible values: "marker", "hue", "alpha", "swatch", "input".
198
233
  */
199
234
  setColor: (color?: tinycolor.Instance | null, type?: string) => void;
200
235
  value: {
@@ -226,5 +261,12 @@ export default class ColorPicker extends WJElement {
226
261
  * @returns {string} - The HSVA color string in the format `hsva(h, 100%, 100%, a)`.
227
262
  */
228
263
  getHSVA: (hue: number, alpha: number) => string;
264
+ /**
265
+ * Returns fully saturated and bright color for the current hue.
266
+ * Used as base color for the SV area so neutral grays do not black out the palette.
267
+ * @param {string} color
268
+ * @returns {string}
269
+ */
270
+ getHueAreaColor(color?: string): string;
229
271
  #private;
230
272
  }
@@ -49,6 +49,10 @@ export default class CopyButton extends WJElement {
49
49
  * Adds event listeners for the click, focus, and blur events.
50
50
  */
51
51
  afterDraw(): void;
52
+ /**
53
+ * Sync ARIA attributes on host.
54
+ */
55
+ syncAria(): void;
52
56
  /**
53
57
  * Handles the click event.
54
58
  * @param {Event} e The event object.
@@ -21,6 +21,7 @@ import { default as WJElement } from '../wje-element/element.js';
21
21
  * @tag wje-dialog
22
22
  */
23
23
  export default class Dialog extends WJElement {
24
+ static _instanceId: number;
24
25
  /**
25
26
  * Returns the CSS styles for the component.
26
27
  * @returns {*}
@@ -31,6 +32,7 @@ export default class Dialog extends WJElement {
31
32
  * @returns {*[]}
32
33
  */
33
34
  static get observedAttributes(): any[];
35
+ _instanceId: number;
34
36
  /**
35
37
  * Sets the value of the 'headline' attribute.
36
38
  * @param {string} value The new value for the 'headline' attribute.
@@ -14,11 +14,13 @@ import { default as Popup } from '../wje-popup/popup.element.js';
14
14
  * @tag wje-dropdown
15
15
  */
16
16
  export default class Dropdown extends WJElement {
17
+ static _instanceId: number;
17
18
  /**
18
19
  * Getter for the CSS stylesheet.
19
20
  * @returns {string[]}
20
21
  */
21
22
  static get observedAttributes(): string[];
23
+ _instanceId: number;
22
24
  /**
23
25
  * The placement of the dropdown.
24
26
  * @type {{"wje-popup": Popup}}
@@ -74,6 +76,7 @@ export default class Dropdown extends WJElement {
74
76
  * Adds event listeners for the mouseenter and mouseleave events.
75
77
  */
76
78
  afterDraw(): void;
79
+ onSlotChange: () => void;
77
80
  popupHideCallback: (e: any) => void;
78
81
  /**
79
82
  * Handles delegated clicks from inside the popup and closes the dropdown when a leaf menu item is selected.
@@ -104,5 +107,9 @@ export default class Dropdown extends WJElement {
104
107
  beforeClose: () => void;
105
108
  afterClose: () => void;
106
109
  onClose: () => void;
110
+ /**
111
+ * Syncs ARIA attributes for the trigger element.
112
+ */
113
+ syncAria(): void;
107
114
  #private;
108
115
  }
@@ -18,6 +18,7 @@ export default class WJElement extends HTMLElement {
18
18
  * @param [options] Additional options for defining the element.
19
19
  */
20
20
  static define(name: any, elementConstructor?: typeof WJElement, options?: {}): void;
21
+ internals: ElementInternals;
21
22
  service: UniversalService;
22
23
  _dependencies: {};
23
24
  /**
@@ -121,6 +122,18 @@ export default class WJElement extends HTMLElement {
121
122
  * @returns {object} The store instance.
122
123
  */
123
124
  get store(): object;
125
+ /**
126
+ * Returns ElementInternals when available.
127
+ * @returns {ElementInternals|null}
128
+ */
129
+ getInternals(): ElementInternals | null;
130
+ /**
131
+ * Sets ARIA state via attributes.
132
+ * Accepts camelCase keys without the "aria" prefix, plus "role".
133
+ * Example: setAriaState({ role: 'tab', selected: true, controls: 'panel-1' })
134
+ * @param {object} state
135
+ */
136
+ setAriaState(state?: object): void;
124
137
  /**
125
138
  * @typedef {object} ArrayActions
126
139
  * @property {Function} addAction - Adds an item to the array.
@@ -185,25 +198,6 @@ export default class WJElement extends HTMLElement {
185
198
  * }
186
199
  */
187
200
  draw(context: any, appStoreObj: any, params: any): any;
188
- /**
189
- * Renders the component within the provided context.
190
- * @param context The rendering context, usually the element's shadow root or main DOM element.
191
- * @param appStore The global application store for managing state.
192
- * @param params Additional parameters or attributes for rendering the component.
193
- * @returns This implementation does not render anything and returns `null`.
194
- * @description
195
- * The `draw` method is responsible for rendering the component's content.
196
- * Override this method in subclasses to define custom rendering logic.
197
- * @example
198
- * class MyComponent extends WJElement {
199
- * draw(context, appStore, params) {
200
- * const div = document.createElement('div');
201
- * div.textContent = 'Hello, world!';
202
- * context.appendChild(div);
203
- * }
204
- * }
205
- */
206
- draw(context: any, appStore: any, params: any): any;
207
201
  /**
208
202
  * Hook for extending behavior after drawing the component.
209
203
  * @param context The rendering context, usually the element's shadow root or main DOM element.
@@ -217,18 +211,29 @@ export default class WJElement extends HTMLElement {
217
211
  * Return: string | Node | DocumentFragment | null | Promise of those.
218
212
  */
219
213
  renderSkeleton(params: any): any;
220
- set skeletonDelay(value: number);
214
+ /**
215
+ * Sets the delay for the skeleton loading indicator.
216
+ * @param {string|number|null|undefined} value The delay value to be set. Accepts a numerical value,
217
+ * a string that can be converted to a number, null, or undefined.
218
+ * If null or undefined is provided, the skeleton delay will be cleared.
219
+ */
220
+ set skeletonDelay(value: string | number | null | undefined);
221
221
  /**
222
222
  * Retrieves the delay duration for the skeleton display, determining the value based on a hierarchy of overrides and defaults.
223
223
  * The method prioritizes in the following order:
224
- * 1. A finite number set as the `_wjSkeletonSlotClone` property.
224
+ * 1. A finite number set as the `_wjSkeletonDelayOverride` property.
225
225
  * 2. A valid numeric value from the `skeleton-delay` attribute.
226
226
  * 3. The `skeletonDelayMs` property, if defined with a finite number.
227
227
  * 4. A default value of 150 if none of the above are set.
228
228
  * @returns {number} The delay in milliseconds before the skeleton is displayed.
229
229
  */
230
230
  get skeletonDelay(): number;
231
- set skeletonMinDuration(value: number);
231
+ /**
232
+ * Sets the minimum duration for the skeleton state. If the provided value is null, undefined, or an empty string,
233
+ * the override for the minimum duration is removed.
234
+ * @param {string|number|null|undefined} value The minimum duration to be set for the skeleton state. It can be a numeric value, string representation of a number, or null/undefined to reset the value.
235
+ */
236
+ set skeletonMinDuration(value: string | number | null | undefined);
232
237
  /**
233
238
  * Retrieves the minimum duration for the skeleton animation.
234
239
  * The method checks for an internally stored finite value. If unavailable,
@@ -238,9 +243,22 @@ export default class WJElement extends HTMLElement {
238
243
  * @returns {number} The minimum duration for the skeleton animation in milliseconds.
239
244
  */
240
245
  get skeletonMinDuration(): number;
241
- _wjSkeletonSlotClone: number | Node;
246
+ _wjSkeletonMinDurationOverride: number;
247
+ /**
248
+ * Sets or removes the 'skeleton' attribute based on the provided value.
249
+ * @param {boolean} value A boolean value indicating whether to set ('true') or remove ('false') the 'skeleton' attribute.
250
+ */
242
251
  set skeleton(value: boolean);
252
+ /**
253
+ * Checks if the 'skeleton' attribute is present on the element.
254
+ * @returns {boolean} True if the 'skeleton' attribute exists, false otherwise.
255
+ */
243
256
  get skeleton(): boolean;
257
+ _wjSkeletonDelayOverride: number;
258
+ /**
259
+ * Retrieves the delay value used for skeleton loading.
260
+ * @returns {number} The delay value for the skeleton loader.
261
+ */
244
262
  get skeletonDelayValue(): number;
245
263
  /**
246
264
  * Lifecycle method invoked when the component is connected to the DOM.
@@ -286,7 +304,17 @@ export default class WJElement extends HTMLElement {
286
304
  * @param newName The new value of the attribute.
287
305
  */
288
306
  attributeChangedCallback(name: any, old: any, newName: any): void;
307
+ /**
308
+ * Triggers a refresh operation by initializing the update lifecycle and setting up promises
309
+ * to track its completion or failure status. Marks the instance as not pristine and queues
310
+ * an update.
311
+ * @returns {void} Does not return a value.
312
+ */
289
313
  refresh(): void;
314
+ /**
315
+ * Stops the current render loop if it is running by canceling the requestAnimationFrame.
316
+ * @returns {void} This method does not return a value.
317
+ */
290
318
  stopRenderLoop(): void;
291
319
  /**
292
320
  * Displays the component's content, optionally forcing a re-render.
@@ -332,7 +360,10 @@ export default class WJElement extends HTMLElement {
332
360
  */
333
361
  checkGetterSetter(obj: object, property: string): object;
334
362
  /**
335
- * Sets up property accessors for the component's attributes.
363
+ * Sets up accessors (getter and setter) for all attributes of the current object.
364
+ * This method retrieves the attribute names, sanitizes them, and dynamically defines
365
+ * property accessors for each attribute using `Object.defineProperty`.
366
+ * @returns {void} This method does not return any value.
336
367
  */
337
368
  setUpAccessors(): void;
338
369
  #private;
@@ -131,6 +131,17 @@ export default class FileUpload extends WJElement {
131
131
  * @returns {number} The maximum number of files allowed.
132
132
  */
133
133
  get maxFiles(): number;
134
+ /**
135
+ * Sets the label attribute for the upload button.
136
+ * @param {string} value
137
+ */
138
+ set label(value: string);
139
+ /**
140
+ * Gets the label attribute for the upload button.
141
+ * @returns {string}
142
+ */
143
+ get label(): string;
144
+ attributeChangedCallback(name: any, oldValue: any, newValue: any): void;
134
145
  beforeDraw(): void;
135
146
  uploadFunction: Function;
136
147
  /**
@@ -148,19 +159,19 @@ export default class FileUpload extends WJElement {
148
159
  afterDraw(): void;
149
160
  /**
150
161
  * Method to handle form submission.
151
- * @param {Event} event The form submission event.
162
+ * @param {Event} e The form submission event.
152
163
  */
153
- handleSubmit(event: Event): void;
164
+ handleSubmit(e: Event): void;
154
165
  /**
155
166
  * Method to handle file drop event.
156
- * @param {Event} event The file drop event object.
167
+ * @param {Event} e The file drop event object.
157
168
  */
158
- handleDrop: (event: Event) => void;
169
+ handleDrop: (e: Event) => void;
159
170
  /**
160
171
  * Method to handle file input change event.
161
- * @param {Event} event The file input change event object.
172
+ * @param {Event} e The file input change event object.
162
173
  */
163
- handleInputChange: (event: Event) => void;
174
+ handleInputChange: (e: Event) => void;
164
175
  /**
165
176
  * Method to add files to the queue.
166
177
  * @param files
@@ -7,29 +7,6 @@
7
7
  * getFileTypeIcon('folder'); // Returns 'folder'.
8
8
  */
9
9
  export function getFileTypeIcon(type: string): string;
10
- /**
11
- * Checks if a given file matches any of the accepted file types.
12
- * @param {File} file The file to validate.
13
- * @param {string|string[]} acceptedFileTypes A comma-separated string or an array of accepted MIME types or file extensions.
14
- * @returns {boolean} Returns `true` if the file type is valid, otherwise `false`.
15
- * @throws {Error} Throws an error if `acceptedFileTypes` is empty.
16
- * @example
17
- * const file = new File([""], "example.png", { type: "image/png" });
18
- * const isValid = isValidFileType(file, "image/*,application/pdf");
19
- * console.log(isValid); // true
20
- * @example
21
- * const file = new File([""], "example.txt", { type: "text/plain" });
22
- * const isValid = isValidFileType(file, ["text/plain", "application/json"]);
23
- * console.log(isValid); // true
24
- */
25
- export function isValidFileType(file: File, acceptedFileTypes: string | string[]): boolean;
26
- /**
27
- * Uploads a file in chunks using `XMLHttpRequest`, allowing for progress tracking.
28
- * @param {File} file The file to be uploaded.
29
- * @param {number} chunkSize The size of each chunk in bytes.
30
- * @param {HTMLElement} preview The element used to display upload progress.
31
- */
32
- export function uploadFile(file: File, chunkSize: number, preview: HTMLElement): void;
33
10
  /**
34
11
  * Returns a function for uploading files either in chunks or as a whole file, based on the provided options.
35
12
  * @param {string} url The URL to which the file will be uploaded.
@@ -74,10 +74,15 @@ export default class FileUploadItem extends WJElement {
74
74
  button: HTMLElement;
75
75
  uploadedEl: HTMLElement;
76
76
  sliderEl: HTMLElement;
77
+ nameEl: HTMLSpanElement;
77
78
  /**
78
79
  * Called after the component has been drawn.
79
80
  */
80
81
  afterDraw(): void;
82
+ /**
83
+ * Sync ARIA attributes on host and actions.
84
+ */
85
+ syncAria(): void;
81
86
  /**
82
87
  * Handles the delete action.
83
88
  */
@@ -67,6 +67,7 @@ export default class FormatDigital extends WJElement {
67
67
  * @returns {string} - The current unit display style.
68
68
  */
69
69
  get unitDisplay(): string;
70
+ attributeChangedCallback(name: any, oldValue: any, newValue: any): void;
70
71
  /**
71
72
  * Prepares the component before rendering.
72
73
  * Computes the formatted value based on the input value and unit.
@@ -80,4 +81,5 @@ export default class FormatDigital extends WJElement {
80
81
  * @returns {DocumentFragment} - The DOM structure for the component.
81
82
  */
82
83
  draw(): DocumentFragment;
84
+ formatted: HTMLSpanElement;
83
85
  }
@@ -37,4 +37,15 @@ export default class Icon extends WJElement {
37
37
  * Called after the component has been drawn.
38
38
  */
39
39
  afterDraw(): void;
40
+ /**
41
+ * Sync ARIA attributes on host.
42
+ */
43
+ syncAria(): void;
44
+ /**
45
+ * Handles attribute changes for ARIA sync.
46
+ * @param {string} name
47
+ * @param {string|null} oldValue
48
+ * @param {string|null} newValue
49
+ */
50
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
40
51
  }
@@ -101,6 +101,10 @@ export default class IconPicker extends WJElement {
101
101
  */
102
102
  afterDraw(): void;
103
103
  init: boolean;
104
+ /**
105
+ * Sync ARIA attributes on host.
106
+ */
107
+ syncAria(): void;
104
108
  /**
105
109
  * Handles the selection of an icon from a given input element and updates the relevant properties and events.
106
110
  * @function selectIcon
@@ -71,6 +71,7 @@ export default class Img extends WJElement {
71
71
  * @returns {string|null} The value of the 'loader' attribute if set, otherwise null.
72
72
  */
73
73
  get loader(): string | null;
74
+ attributeChangedCallback(name: any, oldValue: any, newValue: any): void;
74
75
  /**
75
76
  * Creates and assembles a lazy-loaded image element within a document fragment.
76
77
  * @returns {DocumentFragment} A document fragment containing the image element.
@@ -78,6 +78,10 @@ export default class InfiniteScroll extends WJElement {
78
78
  queryParams: any;
79
79
  size: any;
80
80
  currentPage: number;
81
+ /**
82
+ * Sync ARIA attributes on host.
83
+ */
84
+ syncAria(): void;
81
85
  /**
82
86
  * Attaches a scroll event listener to the current object.
83
87
  * The `scrollEvent` function binds the `onScroll` method to the 'scroll' event
@@ -26,6 +26,7 @@ import { FormAssociatedElement } from '../internals/form-associated-element.js';
26
26
  * // @fires wje-input:clear - Dispatched when the input is cleared.
27
27
  */
28
28
  export default class Input extends FormAssociatedElement {
29
+ static _instanceId: number;
29
30
  /**
30
31
  * Getter for the cssStyleSheet attribute.
31
32
  * @returns {CSSStyleSheet} The CSS style sheet of the input element.
@@ -37,6 +38,7 @@ export default class Input extends FormAssociatedElement {
37
38
  */
38
39
  static get observedAttributes(): any[];
39
40
  pristine: boolean;
41
+ _instanceId: number;
40
42
  /**
41
43
  * Setter for the value attribute.
42
44
  * @param {string} value The value to set.
@@ -48,7 +50,7 @@ export default class Input extends FormAssociatedElement {
48
50
  * @returns {string} The current value from the input element, the internal _value, or an empty string.
49
51
  */
50
52
  get value(): string;
51
- _value: string;
53
+ _value: any;
52
54
  /**
53
55
  * Sets the label attribute of the element.
54
56
  * @param {string} value The value to set as the label attribute.
@@ -135,11 +137,13 @@ export default class Input extends FormAssociatedElement {
135
137
  * @returns {string} The value of the 'variant' attribute or 'default' if not set.
136
138
  */
137
139
  get variant(): string;
140
+ attributeChangedCallback(name: any, oldValue: any, newValue: any): void;
138
141
  /**
139
142
  * Draws the input element.
140
143
  * @returns {DocumentFragment} The drawn input.
141
144
  */
142
145
  draw(): DocumentFragment;
146
+ _ariaErrorId: string;
143
147
  clear: HTMLElement;
144
148
  native: HTMLDivElement;
145
149
  labelElement: HTMLLabelElement;
@@ -149,6 +153,10 @@ export default class Input extends FormAssociatedElement {
149
153
  * Runs after the input is drawn to the DOM.
150
154
  */
151
155
  afterDraw(): void;
156
+ /**
157
+ * Syncs ARIA attributes on the host element.
158
+ */
159
+ syncAria(): void;
152
160
  /**
153
161
  * Checks whether the input has a slot.
154
162
  * @param {HTMLElement} el The element to check.
@@ -58,6 +58,14 @@ export default class Item extends WJElement {
58
58
  * @returns {DocumentFragment}
59
59
  */
60
60
  draw(): DocumentFragment;
61
+ /**
62
+ * Called after the component has been drawn.
63
+ */
64
+ afterDraw(): void;
65
+ /**
66
+ * Sync ARIA attributes on host.
67
+ */
68
+ syncAria(): void;
61
69
  /**
62
70
  * Determines if the given element or any of its ancestors matches the specified selector.
63
71
  * @param {string} selector The CSS selector to match against the element's ancestors.
@@ -69,6 +69,10 @@ export default class Kanban extends WJElement {
69
69
  * @returns {DocumentFragment}
70
70
  */
71
71
  draw(): DocumentFragment;
72
+ /**
73
+ * Sync ARIA attributes on host.
74
+ */
75
+ syncAria(): void;
72
76
  /**
73
77
  * Called after the component has been drawn.
74
78
  */
@@ -16,6 +16,12 @@ export default class LevelIndicator extends WJElement {
16
16
  * @returns {CSSStyleSheet}
17
17
  */
18
18
  static get cssStyleSheet(): CSSStyleSheet;
19
+ /**
20
+ * Returns the list of attributes to observe for changes.
21
+ * @static
22
+ * @returns {Array<string>}
23
+ */
24
+ static get observedAttributes(): Array<string>;
19
25
  /**
20
26
  * Sets the level attribute for an instance.
21
27
  * @param {string} value The value to set for the 'level' attribute.
@@ -74,6 +80,17 @@ export default class LevelIndicator extends WJElement {
74
80
  * @returns {void} This method does not return any value.
75
81
  */
76
82
  afterDraw(): void;
83
+ /**
84
+ * Handles attribute changes for ARIA sync.
85
+ * @param {string} name
86
+ * @param {string|null} oldValue
87
+ * @param {string|null} newValue
88
+ */
89
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
90
+ /**
91
+ * Sync ARIA attributes on host.
92
+ */
93
+ syncAria(): void;
77
94
  /**
78
95
  * Updates the class of each bar element based on the specified level.
79
96
  * @param {number} level The threshold level determining how many bars should be active.
@@ -28,4 +28,8 @@ export default class List extends WJElement {
28
28
  * Called after the component has been drawn.
29
29
  */
30
30
  afterDraw(): void;
31
+ /**
32
+ * Sync ARIA attributes on host.
33
+ */
34
+ syncAria(): void;
31
35
  }
@@ -100,6 +100,10 @@ export default class MenuItem extends WJElement {
100
100
  */
101
101
  afterDraw(): void;
102
102
  unbindRouterLinks: any;
103
+ /**
104
+ * Syncs ARIA attributes based on menu item state.
105
+ */
106
+ syncAria(): void;
103
107
  mouseenterHandler: (e: any) => void;
104
108
  rebindRouterLinks: (e: any) => void;
105
109
  unbindPortalRouterLinks: any;
@@ -85,6 +85,10 @@ export default class Option extends WJElement {
85
85
  * @returns {void} Does not return a value.
86
86
  */
87
87
  afterDraw(): void;
88
+ /**
89
+ * Syncs ARIA attributes on the host element.
90
+ */
91
+ syncAria(): void;
88
92
  /**
89
93
  * Handles the click event on an option element and dispatches a custom event when triggered.
90
94
  * @param {Event} e The click event object that triggered the callback.
@@ -177,6 +177,10 @@ export default class Options extends WJElement {
177
177
  draw(): DocumentFragment;
178
178
  infiniteScroll: HTMLElement;
179
179
  response: any;
180
+ /**
181
+ * Syncs ARIA attributes on the host element.
182
+ */
183
+ syncAria(): void;
180
184
  afterDraw(): void;
181
185
  dispatchOptionsLoadEvent: (e: any) => void;
182
186
  /**
@@ -21,4 +21,8 @@ export default class Orgchart extends WJElement {
21
21
  */
22
22
  draw(): DocumentFragment;
23
23
  native: HTMLDivElement;
24
+ /**
25
+ * Sync ARIA attributes on host.
26
+ */
27
+ syncAria(): void;
24
28
  }
@@ -71,6 +71,17 @@ export default class ProgressBar extends WJElement {
71
71
  draw(context: object, store: object, params: object): DocumentFragment;
72
72
  background: SVGCircleElement | SVGRectElement;
73
73
  bar: SVGCircleElement | SVGRectElement;
74
+ /**
75
+ * Handles attribute changes for ARIA sync.
76
+ * @param {string} name
77
+ * @param {string|null} oldValue
78
+ * @param {string|null} newValue
79
+ */
80
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
81
+ /**
82
+ * Sync ARIA attributes on host.
83
+ */
84
+ syncAria(): void;
74
85
  /**
75
86
  * Adds event listeners after the component is drawn.
76
87
  */