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

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 (245) hide show
  1. package/dist/wje-file-upload.js +1 -0
  2. package/dist/wje-file-upload.js.map +1 -1
  3. package/dist/wje-select.js +76 -32
  4. package/dist/wje-select.js.map +1 -1
  5. package/package.json +1 -1
  6. package/dist/packages/index.d.ts +0 -107
  7. package/dist/packages/internals/form-associated-element.d.ts +0 -143
  8. package/dist/packages/localize/localize.d.ts +0 -48
  9. package/dist/packages/translations/en-gb.d.ts +0 -18
  10. package/dist/packages/translations/sk-sk.d.ts +0 -13
  11. package/dist/packages/utils/animations.d.ts +0 -2
  12. package/dist/packages/utils/base-path.d.ts +0 -14
  13. package/dist/packages/utils/date.d.ts +0 -2
  14. package/dist/packages/utils/element-utils.d.ts +0 -46
  15. package/dist/packages/utils/event.d.ts +0 -67
  16. package/dist/packages/utils/icon-library.d.ts +0 -3
  17. package/dist/packages/utils/localize.d.ts +0 -4
  18. package/dist/packages/utils/permissions.d.ts +0 -40
  19. package/dist/packages/utils/universal-service.d.ts +0 -18
  20. package/dist/packages/utils/utils.d.ts +0 -1
  21. package/dist/packages/wje-accordion/accordion.d.ts +0 -2
  22. package/dist/packages/wje-accordion/accordion.element.d.ts +0 -72
  23. package/dist/packages/wje-accordion/accordion.test.d.ts +0 -0
  24. package/dist/packages/wje-accordion-item/accordion-item.d.ts +0 -2
  25. package/dist/packages/wje-accordion-item/accordion-item.element.d.ts +0 -40
  26. package/dist/packages/wje-animation/animation.d.ts +0 -2
  27. package/dist/packages/wje-animation/animation.element.d.ts +0 -158
  28. package/dist/packages/wje-animation/animation.test.d.ts +0 -1
  29. package/dist/packages/wje-aside/aside.d.ts +0 -2
  30. package/dist/packages/wje-aside/aside.element.d.ts +0 -31
  31. package/dist/packages/wje-avatar/avatar.d.ts +0 -2
  32. package/dist/packages/wje-avatar/avatar.element.d.ts +0 -76
  33. package/dist/packages/wje-avatar/avatar.test.d.ts +0 -1
  34. package/dist/packages/wje-avatar/service/service.d.ts +0 -52
  35. package/dist/packages/wje-badge/badge.d.ts +0 -2
  36. package/dist/packages/wje-badge/badge.element.d.ts +0 -35
  37. package/dist/packages/wje-badge/badge.test.d.ts +0 -1
  38. package/dist/packages/wje-breadcrumb/breadcrumb.d.ts +0 -2
  39. package/dist/packages/wje-breadcrumb/breadcrumb.element.d.ts +0 -98
  40. package/dist/packages/wje-breadcrumbs/breadcrumbs.d.ts +0 -2
  41. package/dist/packages/wje-breadcrumbs/breadcrumbs.element.d.ts +0 -105
  42. package/dist/packages/wje-breadcrumbs/breadcrumbs.test.d.ts +0 -1
  43. package/dist/packages/wje-button/button.d.ts +0 -2
  44. package/dist/packages/wje-button/button.element.d.ts +0 -204
  45. package/dist/packages/wje-button/button.test.d.ts +0 -1
  46. package/dist/packages/wje-button-group/button-group.d.ts +0 -2
  47. package/dist/packages/wje-button-group/button-group.element.d.ts +0 -96
  48. package/dist/packages/wje-card/card.d.ts +0 -2
  49. package/dist/packages/wje-card/card.element.d.ts +0 -31
  50. package/dist/packages/wje-card-content/card-content.d.ts +0 -2
  51. package/dist/packages/wje-card-content/card-content.element.d.ts +0 -22
  52. package/dist/packages/wje-card-controls/card-controls.d.ts +0 -2
  53. package/dist/packages/wje-card-controls/card-controls.element.d.ts +0 -23
  54. package/dist/packages/wje-card-header/card-header.d.ts +0 -2
  55. package/dist/packages/wje-card-header/card-header.element.d.ts +0 -22
  56. package/dist/packages/wje-card-subtitle/card-subtitle.d.ts +0 -2
  57. package/dist/packages/wje-card-subtitle/card-subtitle.element.d.ts +0 -30
  58. package/dist/packages/wje-card-title/card-title.d.ts +0 -2
  59. package/dist/packages/wje-card-title/card-title.element.d.ts +0 -32
  60. package/dist/packages/wje-carousel/carousel.d.ts +0 -2
  61. package/dist/packages/wje-carousel/carousel.element.d.ts +0 -154
  62. package/dist/packages/wje-carousel-item/carousel-item.d.ts +0 -2
  63. package/dist/packages/wje-carousel-item/carousel-item.element.d.ts +0 -38
  64. package/dist/packages/wje-checkbox/checkbox.d.ts +0 -2
  65. package/dist/packages/wje-checkbox/checkbox.element.d.ts +0 -100
  66. package/dist/packages/wje-chip/chip.d.ts +0 -2
  67. package/dist/packages/wje-chip/chip.element.d.ts +0 -76
  68. package/dist/packages/wje-chip/chip.test.d.ts +0 -1
  69. package/dist/packages/wje-col/col.d.ts +0 -2
  70. package/dist/packages/wje-col/col.element.d.ts +0 -16
  71. package/dist/packages/wje-color-picker/color-picker.d.ts +0 -2
  72. package/dist/packages/wje-color-picker/color-picker.element.d.ts +0 -230
  73. package/dist/packages/wje-color-picker/color-picker.test.d.ts +0 -1
  74. package/dist/packages/wje-container/container.d.ts +0 -2
  75. package/dist/packages/wje-container/container.element.d.ts +0 -31
  76. package/dist/packages/wje-copy-button/copy-button.d.ts +0 -2
  77. package/dist/packages/wje-copy-button/copy-button.element.d.ts +0 -89
  78. package/dist/packages/wje-copy-button/service/service.d.ts +0 -12
  79. package/dist/packages/wje-dialog/dialog.d.ts +0 -2
  80. package/dist/packages/wje-dialog/dialog.element.d.ts +0 -132
  81. package/dist/packages/wje-divider/divider.d.ts +0 -2
  82. package/dist/packages/wje-divider/divider.element.d.ts +0 -32
  83. package/dist/packages/wje-dropdown/dropdown.d.ts +0 -2
  84. package/dist/packages/wje-dropdown/dropdown.element.d.ts +0 -108
  85. package/dist/packages/wje-element/element.d.ts +0 -341
  86. package/dist/packages/wje-file-upload/file-upload.d.ts +0 -2
  87. package/dist/packages/wje-file-upload/file-upload.element.d.ts +0 -203
  88. package/dist/packages/wje-file-upload/file-upload.test.d.ts +0 -1
  89. package/dist/packages/wje-file-upload/service/service.d.ts +0 -70
  90. package/dist/packages/wje-file-upload-item/file-upload-item.d.ts +0 -2
  91. package/dist/packages/wje-file-upload-item/file-upload-item.element.d.ts +0 -84
  92. package/dist/packages/wje-footer/footer.d.ts +0 -2
  93. package/dist/packages/wje-footer/footer.element.d.ts +0 -28
  94. package/dist/packages/wje-form/form.d.ts +0 -2
  95. package/dist/packages/wje-form/form.element.d.ts +0 -28
  96. package/dist/packages/wje-format-digital/format-digital.d.ts +0 -2
  97. package/dist/packages/wje-format-digital/format-digital.element.d.ts +0 -83
  98. package/dist/packages/wje-format-digital/format-digital.test.d.ts +0 -1
  99. package/dist/packages/wje-grid/grid.d.ts +0 -2
  100. package/dist/packages/wje-grid/grid.element.d.ts +0 -26
  101. package/dist/packages/wje-header/header.d.ts +0 -2
  102. package/dist/packages/wje-header/header.element.d.ts +0 -35
  103. package/dist/packages/wje-icon/icon.d.ts +0 -2
  104. package/dist/packages/wje-icon/icon.element.d.ts +0 -40
  105. package/dist/packages/wje-icon/service/library.d.ts +0 -3
  106. package/dist/packages/wje-icon/service/service.d.ts +0 -11
  107. package/dist/packages/wje-icon-picker/icon-picker.d.ts +0 -2
  108. package/dist/packages/wje-icon-picker/icon-picker.element.d.ts +0 -210
  109. package/dist/packages/wje-img/img.d.ts +0 -2
  110. package/dist/packages/wje-img/img.element.d.ts +0 -118
  111. package/dist/packages/wje-img-comparer/img-comparer.d.ts +0 -2
  112. package/dist/packages/wje-img-comparer/img-comparer.element.d.ts +0 -60
  113. package/dist/packages/wje-img-comparer/service/service.d.ts +0 -1
  114. package/dist/packages/wje-infinite-scroll/infinite-scroll.d.ts +0 -2
  115. package/dist/packages/wje-infinite-scroll/infinite-scroll.element.d.ts +0 -173
  116. package/dist/packages/wje-input/input.d.ts +0 -2
  117. package/dist/packages/wje-input/input.element.d.ts +0 -159
  118. package/dist/packages/wje-input-file/input-file.d.ts +0 -2
  119. package/dist/packages/wje-input-file/input-file.element.d.ts +0 -50
  120. package/dist/packages/wje-item/item.d.ts +0 -2
  121. package/dist/packages/wje-item/item.element.d.ts +0 -68
  122. package/dist/packages/wje-kanban/kanban.d.ts +0 -2
  123. package/dist/packages/wje-kanban/kanban.element.d.ts +0 -182
  124. package/dist/packages/wje-label/label.d.ts +0 -2
  125. package/dist/packages/wje-label/label.element.d.ts +0 -34
  126. package/dist/packages/wje-level-indicator/level-indicator.d.ts +0 -2
  127. package/dist/packages/wje-level-indicator/level-indicator.element.d.ts +0 -91
  128. package/dist/packages/wje-list/list.d.ts +0 -2
  129. package/dist/packages/wje-list/list.element.d.ts +0 -31
  130. package/dist/packages/wje-main/main.d.ts +0 -2
  131. package/dist/packages/wje-main/main.element.d.ts +0 -30
  132. package/dist/packages/wje-masonry/masonry.d.ts +0 -2
  133. package/dist/packages/wje-masonry/masonry.element.d.ts +0 -114
  134. package/dist/packages/wje-masonry/service/service.d.ts +0 -32
  135. package/dist/packages/wje-menu/menu.d.ts +0 -2
  136. package/dist/packages/wje-menu/menu.element.d.ts +0 -47
  137. package/dist/packages/wje-menu-button/menu-button.d.ts +0 -2
  138. package/dist/packages/wje-menu-button/menu-button.element.d.ts +0 -34
  139. package/dist/packages/wje-menu-item/menu-item.d.ts +0 -2
  140. package/dist/packages/wje-menu-item/menu-item.element.d.ts +0 -161
  141. package/dist/packages/wje-menu-label/menu-label.d.ts +0 -2
  142. package/dist/packages/wje-menu-label/menu-label.element.d.ts +0 -39
  143. package/dist/packages/wje-option/option.d.ts +0 -2
  144. package/dist/packages/wje-option/option.element.d.ts +0 -95
  145. package/dist/packages/wje-options/options.d.ts +0 -2
  146. package/dist/packages/wje-options/options.element.d.ts +0 -232
  147. package/dist/packages/wje-orgchart/orgchart.d.ts +0 -2
  148. package/dist/packages/wje-orgchart/orgchart.element.d.ts +0 -24
  149. package/dist/packages/wje-orgchart-group/orgchart-group.d.ts +0 -2
  150. package/dist/packages/wje-orgchart-group/orgchart-group.element.d.ts +0 -28
  151. package/dist/packages/wje-orgchart-item/orgchart-item.d.ts +0 -2
  152. package/dist/packages/wje-orgchart-item/orgchart-item.element.d.ts +0 -49
  153. package/dist/packages/wje-pagination/pagination.d.ts +0 -2
  154. package/dist/packages/wje-pagination/pagination.element.d.ts +0 -178
  155. package/dist/packages/wje-pagination/pagination.test.d.ts +0 -1
  156. package/dist/packages/wje-pagination/service/service.d.ts +0 -9
  157. package/dist/packages/wje-panel/panel.d.ts +0 -2
  158. package/dist/packages/wje-panel/panel.element.d.ts +0 -34
  159. package/dist/packages/wje-popup/popup.d.ts +0 -2
  160. package/dist/packages/wje-popup/popup.element.d.ts +0 -145
  161. package/dist/packages/wje-progress-bar/progress-bar.d.ts +0 -2
  162. package/dist/packages/wje-progress-bar/progress-bar.element.d.ts +0 -96
  163. package/dist/packages/wje-qr-code/qr-code.d.ts +0 -2
  164. package/dist/packages/wje-qr-code/qr-code.element.d.ts +0 -33
  165. package/dist/packages/wje-radio/radio.d.ts +0 -2
  166. package/dist/packages/wje-radio/radio.element.d.ts +0 -64
  167. package/dist/packages/wje-radio-group/radio-group.d.ts +0 -2
  168. package/dist/packages/wje-radio-group/radio-group.element.d.ts +0 -61
  169. package/dist/packages/wje-rate/rate.d.ts +0 -2
  170. package/dist/packages/wje-rate/rate.element.d.ts +0 -156
  171. package/dist/packages/wje-relative-time/relative-time.d.ts +0 -2
  172. package/dist/packages/wje-relative-time/relative-time.element.d.ts +0 -55
  173. package/dist/packages/wje-relative-time/relative-time.test.d.ts +0 -1
  174. package/dist/packages/wje-reorder/reorder.d.ts +0 -2
  175. package/dist/packages/wje-reorder/reorder.element.d.ts +0 -119
  176. package/dist/packages/wje-reorder-dropzone/reorder-dropzone.d.ts +0 -2
  177. package/dist/packages/wje-reorder-dropzone/reorder-dropzone.element.d.ts +0 -23
  178. package/dist/packages/wje-reorder-handle/reorder-handle.d.ts +0 -2
  179. package/dist/packages/wje-reorder-handle/reorder-handle.element.d.ts +0 -84
  180. package/dist/packages/wje-reorder-item/reorder-item.d.ts +0 -2
  181. package/dist/packages/wje-reorder-item/reorder-item.element.d.ts +0 -24
  182. package/dist/packages/wje-route/route.d.ts +0 -2
  183. package/dist/packages/wje-route/route.element.d.ts +0 -22
  184. package/dist/packages/wje-router/router.d.ts +0 -2
  185. package/dist/packages/wje-router/router.element.d.ts +0 -43
  186. package/dist/packages/wje-router-link/router-link.d.ts +0 -2
  187. package/dist/packages/wje-router-link/router-link.element.d.ts +0 -31
  188. package/dist/packages/wje-router-outlet/router-outlet.d.ts +0 -2
  189. package/dist/packages/wje-router-outlet/router-outlet.element.d.ts +0 -16
  190. package/dist/packages/wje-row/row.d.ts +0 -2
  191. package/dist/packages/wje-row/row.element.d.ts +0 -23
  192. package/dist/packages/wje-select/select.d.ts +0 -2
  193. package/dist/packages/wje-select/select.element.d.ts +0 -386
  194. package/dist/packages/wje-select/select.test.d.ts +0 -1
  195. package/dist/packages/wje-slider/slider.d.ts +0 -2
  196. package/dist/packages/wje-slider/slider.element.d.ts +0 -103
  197. package/dist/packages/wje-sliding-container/sliding-container.d.ts +0 -2
  198. package/dist/packages/wje-sliding-container/sliding-container.element.d.ts +0 -265
  199. package/dist/packages/wje-split-view/service/service.d.ts +0 -1
  200. package/dist/packages/wje-split-view/split-view.d.ts +0 -2
  201. package/dist/packages/wje-split-view/split-view.element.d.ts +0 -65
  202. package/dist/packages/wje-status/status.d.ts +0 -2
  203. package/dist/packages/wje-status/status.element.d.ts +0 -26
  204. package/dist/packages/wje-step/step.d.ts +0 -2
  205. package/dist/packages/wje-step/step.element.d.ts +0 -23
  206. package/dist/packages/wje-stepper/stepper.d.ts +0 -2
  207. package/dist/packages/wje-stepper/stepper.element.d.ts +0 -125
  208. package/dist/packages/wje-store/default-store-actions.d.ts +0 -25
  209. package/dist/packages/wje-store/pubsub.d.ts +0 -22
  210. package/dist/packages/wje-store/store.d.ts +0 -153
  211. package/dist/packages/wje-tab/tab.d.ts +0 -2
  212. package/dist/packages/wje-tab/tab.element.d.ts +0 -66
  213. package/dist/packages/wje-tab-group/tab-group.d.ts +0 -2
  214. package/dist/packages/wje-tab-group/tab-group.element.d.ts +0 -131
  215. package/dist/packages/wje-tab-group/tab-group.test.d.ts +0 -1
  216. package/dist/packages/wje-tab-panel/tab-panel.d.ts +0 -2
  217. package/dist/packages/wje-tab-panel/tab-panel.element.d.ts +0 -23
  218. package/dist/packages/wje-textarea/textarea.d.ts +0 -2
  219. package/dist/packages/wje-textarea/textarea.element.d.ts +0 -89
  220. package/dist/packages/wje-thumbnail/thumbnail.d.ts +0 -2
  221. package/dist/packages/wje-thumbnail/thumbnail.element.d.ts +0 -31
  222. package/dist/packages/wje-timeline/timeline.d.ts +0 -2
  223. package/dist/packages/wje-timeline/timeline.element.d.ts +0 -25
  224. package/dist/packages/wje-timeline-item/timeline-item.d.ts +0 -2
  225. package/dist/packages/wje-timeline-item/timeline-item.element.d.ts +0 -27
  226. package/dist/packages/wje-toast/toast.d.ts +0 -2
  227. package/dist/packages/wje-toast/toast.element.d.ts +0 -173
  228. package/dist/packages/wje-toast/toast.test.d.ts +0 -1
  229. package/dist/packages/wje-toggle/toggle.d.ts +0 -2
  230. package/dist/packages/wje-toggle/toggle.element.d.ts +0 -81
  231. package/dist/packages/wje-toggle/toggle.test.d.ts +0 -1
  232. package/dist/packages/wje-toolbar/toolbar.d.ts +0 -2
  233. package/dist/packages/wje-toolbar/toolbar.element.d.ts +0 -39
  234. package/dist/packages/wje-toolbar-action/toolbar-action.d.ts +0 -2
  235. package/dist/packages/wje-toolbar-action/toolbar-action.element.d.ts +0 -35
  236. package/dist/packages/wje-tooltip/tooltip.d.ts +0 -2
  237. package/dist/packages/wje-tooltip/tooltip.element.d.ts +0 -77
  238. package/dist/packages/wje-tree/tree.d.ts +0 -2
  239. package/dist/packages/wje-tree/tree.element.d.ts +0 -105
  240. package/dist/packages/wje-tree/tree.test.d.ts +0 -1
  241. package/dist/packages/wje-tree-item/tree-item.d.ts +0 -2
  242. package/dist/packages/wje-tree-item/tree-item.element.d.ts +0 -155
  243. package/dist/packages/wje-tree-item/tree-item.test.d.ts +0 -1
  244. package/dist/packages/wje-visually-hidden/visually-hidden.d.ts +0 -2
  245. package/dist/packages/wje-visually-hidden/visually-hidden.element.d.ts +0 -29
@@ -1,84 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- import { Localizer } from '../utils/localize.js';
3
- /**
4
- * @summary This element allows users to upload files.
5
- * `FileUploadItem` is a custom web component that represents a file upload item.
6
- * It extends from `WJElement` and uses the `Localizer` utility for localization.
7
- * @documentation https://elements.webjet.sk/components/file-upload
8
- * @status stable
9
- * @augments WJElement
10
- * @csspart button - The delete button part
11
- * @csspart image - The image part
12
- * @csspart name - The name part
13
- * @csspart size - The size part
14
- * @slot img - Slot for the image
15
- * @slot action - Slot for the action buttons
16
- * @cssproperty --primary-color - The primary color of the file upload item.
17
- * //@fires wje-button:click - Dispatches when the delete button is clicked
18
- * @tag wje-file-upload
19
- */
20
- export default class FileUploadItem extends WJElement {
21
- /**
22
- * Returns the CSS styles for the component.
23
- * @static
24
- * @returns {CSSStyleSheet}
25
- */
26
- static get cssStyleSheet(): CSSStyleSheet;
27
- /**
28
- * Returns the list of attributes to observe for changes.
29
- * @static
30
- * @returns {Array<string>}
31
- */
32
- static get observedAttributes(): Array<string>;
33
- localizer: Localizer;
34
- /**
35
- * Sets the 'is-uploaded' attribute to indicate the uploaded status.
36
- * @param {boolean} value The value to determine if the element is uploaded.
37
- */
38
- set isUploaded(value: boolean);
39
- /**
40
- * Checks if the 'is-uploaded' attribute is present on the element.
41
- * @returns {boolean} True if the 'is-uploaded' attribute exists, otherwise false.
42
- */
43
- get isUploaded(): boolean;
44
- /**
45
- * Sets the size attribute of the element.
46
- * @param {string | number} value The value to set for the size attribute.
47
- */
48
- set size(value: string | number);
49
- /**
50
- * Retrieves the value of the 'size' attribute.
51
- * @returns {string|null} The value of the 'size' attribute, or null if the attribute is not present.
52
- */
53
- get size(): string | null;
54
- /**
55
- * Dependencies for the component.
56
- * @type {object}
57
- */
58
- dependencies: object;
59
- /**
60
- * A lifecycle method that is called when one of the observed attributes of the custom element is added, removed, or changed.
61
- * This method is used to react to changes in the specified attributes.
62
- * @param {string} name The name of the attribute that was changed.
63
- * @param {string|null} oldValue The previous value of the attribute before the change, or null if the attribute was not previously set.
64
- * @param {string|null} newValue The new value of the attribute after the change, or null if the attribute has been removed.
65
- * @returns {void} This method does not return a value.
66
- */
67
- attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
68
- /**
69
- * Method to draw the component on the screen.
70
- * @returns {DocumentFragment} The fragment containing the component.
71
- */
72
- draw(): DocumentFragment;
73
- button: HTMLElement;
74
- uploadedEl: HTMLElement;
75
- sliderEl: HTMLElement;
76
- /**
77
- * Called after the component has been drawn.
78
- */
79
- afterDraw(): void;
80
- /**
81
- * Handles the delete action.
82
- */
83
- onDelete: () => void;
84
- }
@@ -1,2 +0,0 @@
1
- import { default as Footer } from './footer.element.js';
2
- export default Footer;
@@ -1,28 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- /**
3
- * @summary This element represents a footer. `Footer` is a custom web component that represents a footer.
4
- * @documentation https://elements.webjet.sk/components/footer
5
- * @status stable
6
- * @augments WJElement
7
- * @slot default - Default slot for the footer content
8
- * @cssproperty --primary-color - The primary color of the footer
9
- */
10
- export default class Footer extends WJElement {
11
- /**
12
- * Returns the CSS styles for the component.
13
- * @static
14
- * @returns {CSSStyleSheet}
15
- */
16
- static get cssStyleSheet(): CSSStyleSheet;
17
- /**
18
- * Returns the list of attributes to observe for changes.
19
- * @static
20
- * @returns {Array<string>}
21
- */
22
- static get observedAttributes(): Array<string>;
23
- /**
24
- * Draws the component.
25
- * @returns {DocumentFragment}
26
- */
27
- draw(): DocumentFragment;
28
- }
@@ -1,2 +0,0 @@
1
- import { default as Form } from './form.element.js';
2
- export default Form;
@@ -1,28 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- /**
3
- * @summary The Form class is a custom
4
- * web component that extends WJElement. It is a simple form that can hold other elements or components.
5
- * It provides a slot for adding child elements or components.
6
- * @documentation https://elements.webjet.sk/components/form
7
- * @status stable
8
- * @augments WJElement
9
- * @slot - The slot for adding child elements or components.
10
- * @tag wje-form
11
- */
12
- export default class Form extends WJElement {
13
- /**
14
- * Getter for the CSS stylesheet.
15
- * @returns {*}
16
- */
17
- static get cssStyleSheet(): any;
18
- /**
19
- * Getter for the observed attributes.
20
- * @returns {*[]}
21
- */
22
- static get observedAttributes(): any[];
23
- /**
24
- * Draws the Form.
25
- * @returns {DocumentFragment}
26
- */
27
- draw(): DocumentFragment;
28
- }
@@ -1,2 +0,0 @@
1
- import { default as FormatDigital } from './format-digital.element.js';
2
- export default FormatDigital;
@@ -1,83 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- import { Localizer } from '../utils/localize.js';
3
- /**
4
- * @summary This element formats and displays digital values such as file sizes or data transfer rates.
5
- * `FormatDigital` is a custom web component that represents a formatted digital value with units like
6
- * bytes or bits. It extends from `WJElement` and utilizes the `Localizer` class for locale-aware formatting.
7
- * @documentation https://elements.webjet.sk/components/format-digital
8
- * @status stable
9
- * @augments {WJElement}
10
- * @attribute {number} value - The numeric value to format (e.g., 1024 for 1 KB).
11
- * @attribute {string} unit - The unit of the value (`byte` or `bit`). Defaults to `byte`.
12
- * @attribute {string} unitDisplay - The display style of the unit (`short`, `long`, or `narrow`). Defaults to `short`.
13
- * @csspart native - The native part of the component.
14
- * @csspart formatted - The part representing the formatted value.
15
- * @csspart start - Slot for content before the formatted value.
16
- * @csspart end - Slot for content after the formatted value.
17
- * @tag wje-format-digital
18
- */
19
- export default class FormatDigital extends WJElement {
20
- /**
21
- * Returns the CSS styles for the component.
22
- * Encapsulated using shadow DOM.
23
- * @static
24
- * @returns {CSSStyleSheet} - The CSS styles for the component.
25
- */
26
- static get cssStyleSheet(): CSSStyleSheet;
27
- /**
28
- * Returns the list of attributes to observe for changes.
29
- * Observes `value` and `unit-display` for re-rendering.
30
- * @static
31
- * @returns {Array<string>} - The attributes to observe.
32
- */
33
- static get observedAttributes(): Array<string>;
34
- localizer: Localizer;
35
- /**
36
- * Sets the value of the digital format.
37
- * This value determines the size in bytes or bits to be displayed.
38
- * @param {number} value The value to set.
39
- */
40
- set value(value: number);
41
- /**
42
- * Returns the value of the digital format.
43
- * @returns {number} The current value of the component.
44
- */
45
- get value(): number;
46
- /**
47
- * Sets the unit of the digital format.
48
- * Valid values are `bit` or `byte`.
49
- * @param {string} value The unit to set.
50
- */
51
- set unit(value: string);
52
- /**
53
- * Returns the unit of the digital format.
54
- * Defaults to `byte` if no unit is set.
55
- * @returns {string} The current unit (`bit` or `byte`).
56
- */
57
- get unit(): string;
58
- /**
59
- * Sets the unit display style for the digital format.
60
- * Valid values are `short`, `long`, or `narrow`.
61
- * @param {string} value The unit display style to set.
62
- */
63
- set unitDisplay(value: string);
64
- /**
65
- * Returns the unit display style for the digital format.
66
- * Defaults to `short` if not set.
67
- * @returns {string} - The current unit display style.
68
- */
69
- get unitDisplay(): string;
70
- /**
71
- * Prepares the component before rendering.
72
- * Computes the formatted value based on the input value and unit.
73
- */
74
- beforeDraw(): void;
75
- formattedValue: string;
76
- /**
77
- * Renders the component and returns a document fragment.
78
- * The rendered structure includes a formatted value wrapped in a container
79
- * with slots for additional customization.
80
- * @returns {DocumentFragment} - The DOM structure for the component.
81
- */
82
- draw(): DocumentFragment;
83
- }
@@ -1,2 +0,0 @@
1
- import { default as Grid } from './grid.element.js';
2
- export default Grid;
@@ -1,26 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- /**
3
- * @summary The Grid class is a custom web component that extends WJElement. It is a simple grid that can hold other elements or components.
4
- * It provides a slot for adding child elements or components.
5
- * @documentation https://elements.webjet.sk/components/grid
6
- * @status stable
7
- * @augments WJElement
8
- * @slot - The slot for adding child elements or components.
9
- */
10
- export default class Grid extends WJElement {
11
- /**
12
- * Getter for the CSS stylesheet.
13
- * @returns {*}
14
- */
15
- static get cssStyleSheet(): any;
16
- /**
17
- * Getter for the observed attributes.
18
- * @returns {*[]}
19
- */
20
- static get observedAttributes(): any[];
21
- /**
22
- * Draws the Grid element.
23
- * @returns {DocumentFragment}
24
- */
25
- draw(): DocumentFragment;
26
- }
@@ -1,2 +0,0 @@
1
- import { default as Header } from './header.element.js';
2
- export default Header;
@@ -1,35 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- /**
3
- * @summary `Header` is a custom web component that represents a header. It extends from `WJElement`.
4
- * @documentation https://elements.webjet.sk/components/header
5
- * @status stable
6
- * @augments {WJElement}
7
- * @csspart native - The native part
8
- * @slot default - Default slot for the header content
9
- * @cssproperty [--wje-header-background=var(--wje-background)] - The background of the header element.
10
- * @cssproperty [--wje-header-border-color=var(--wje-border-color)] - The border color of the header element.
11
- * @cssproperty [--wje-header-border-width=0 0 1px 0] - The border width of the header element.
12
- * @cssproperty [--wje-header-border-style=solid] - The border styles of the header
13
- * @cssproperty [--wje-header-top=0] - The position top of the header
14
- * @cssproperty [--wje-header-height=60px] - The height of the header element.
15
- * @tag wje-header
16
- */
17
- export default class Header extends WJElement {
18
- /**
19
- * Returns the CSS styles for the component.
20
- * @static
21
- * @returns {CSSStyleSheet}
22
- */
23
- static get cssStyleSheet(): CSSStyleSheet;
24
- /**
25
- * Returns the list of attributes to observe for changes.
26
- * @static
27
- * @returns {Array<string>}
28
- */
29
- static get observedAttributes(): Array<string>;
30
- /**
31
- * Draws the component.
32
- * @returns {DocumentFragment}
33
- */
34
- draw(): DocumentFragment;
35
- }
@@ -1,2 +0,0 @@
1
- import { default as Icon } from './icon.element.js';
2
- export default Icon;
@@ -1,40 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- /**
3
- * @summary This element represents an icon. `IconElement` is a custom web component that represents an icon.
4
- * @documentation https://elements.webjet.sk/components/icon
5
- * @status stable
6
- * @augments WJElement
7
- * @csspart svg - The SVG part of the icon
8
- * @cssproperty [--wje-icon-size=1rem] - The size of the icon element
9
- * @cssproperty [--wje-icon-width=var(--wje-icon-size, 100%)] - The width of the icon element
10
- * @cssproperty [--wje-icon-height=var(--wje-icon-size, 100%)] - The height of the icon element
11
- * @tag wje-icon
12
- */
13
- export default class Icon extends WJElement {
14
- /**
15
- * Returns the CSS styles for the component.
16
- * @static
17
- * @returns {CSSStyleSheet}
18
- */
19
- static get cssStyleSheet(): CSSStyleSheet;
20
- /**
21
- * Returns the list of attributes to observe for changes.
22
- * @static
23
- * @returns {Array<string>}
24
- */
25
- static get observedAttributes(): Array<string>;
26
- /**
27
- * Draws the component.
28
- * @param {object} context The context for drawing.
29
- * @param {object} store The store for drawing.
30
- * @param {object} params The parameters for drawing.
31
- * @returns {DocumentFragment}
32
- */
33
- draw(context: object, store: object, params: object): DocumentFragment;
34
- url: string;
35
- native: HTMLDivElement;
36
- /**
37
- * Called after the component has been drawn.
38
- */
39
- afterDraw(): void;
40
- }
@@ -1,3 +0,0 @@
1
- export function getIconLibrary(name: any): any;
2
- export function registerIconLibrary(name: any, options: any): void;
3
- export function unregisterIconLibrary(name: any): void;
@@ -1,11 +0,0 @@
1
- export const iconContent: Map<any, any>;
2
- export function getSrc(src: string): string | null;
3
- export function isSrc(str: string): boolean;
4
- export function isSvgDataUrl(url: string): boolean;
5
- export function isEncodedDataUrl(url: string): boolean;
6
- export function isStr(val: any): boolean;
7
- export function validateContent(svgContent: string): string;
8
- export function isValid(elm: Element | Node): boolean;
9
- export function getSvgContent(url: string, sanitize?: boolean): Promise<void>;
10
- export function getUrl(i: HTMLElement): string | null;
11
- export function getName(iconName: string): string | null;
@@ -1,2 +0,0 @@
1
- import { default as IconPicker } from './icon-picker.element.js';
2
- export default IconPicker;
@@ -1,210 +0,0 @@
1
- import { default as WJElement } from '../wje-element/element.js';
2
- import { default as Input } from '../wje-input/input.js';
3
- import { default as InfiniteScroll } from '../wje-infinite-scroll/infinite-scroll.js';
4
- import { default as Tooltip } from '../wje-tooltip/tooltip.js';
5
- /**
6
- * @summary This element allows users to pick an icon from a set of available options.
7
- * `IconPicker` is a custom web component that represents an interactive icon picker. It features
8
- * search functionality, infinite scrolling, and popup-based selection. The component is highly customizable
9
- * and integrates seamlessly with other `WJElement` components.
10
- * @documentation https://elements.webjet.sk/components/icon-picker
11
- * @status stable
12
- * @augments {WJElement}
13
- * @attribute {string} icon - The selected icon's name.
14
- * @attribute {number} size - The number of icons displayed per page in infinite scroll. Default is 60.
15
- * @csspart native - The native part of the component.
16
- * @csspart anchor - The part representing the anchor button displaying the selected icon.
17
- * @csspart picker - The picker part containing the search and icon selection interface.
18
- * @csspart input - The input part for searching icons.
19
- * @cssproperty [--wje-color-picker-value=#ff0000] - The default color value.
20
- * @cssproperty [--wje-color-picker-area=transparent] - The background color of the color picker area.
21
- * @cssproperty [--wje-color-picker-swatch=transparent] - The background color of the swatch picker.
22
- * @cssproperty [--wje-color-picker-size=1rem] - The size of the icons in the picker.
23
- * @cssproperty [--wje-color-picker-radius=4px] - The border radius of the picker.
24
- * @tag wje-icon-picker
25
- */
26
- export default class IconPicker extends WJElement {
27
- /**
28
- * Returns the CSS styles for the component.
29
- * @static
30
- * @returns {CSSStyleSheet}
31
- */
32
- static get cssStyleSheet(): CSSStyleSheet;
33
- /**
34
- * Returns the list of attributes to observe for changes.
35
- * @static
36
- * @returns {Array<string>}
37
- */
38
- static get observedAttributes(): Array<string>;
39
- /**
40
- * Dependencies of the IconPicker component.
41
- * @property {object} dependencies
42
- */
43
- dependencies: {
44
- 'wje-input': typeof Input;
45
- 'wje-infinite-scroll': typeof InfiniteScroll;
46
- 'wje-tooltip': typeof Tooltip;
47
- };
48
- /**
49
- * Setter for the markerPosition property.
50
- * @param {any} value The value to set.
51
- */
52
- set size(value: any);
53
- /**
54
- * Getter for the markerPosition property.
55
- * @returns {any} size The value of the markerPosition property.
56
- */
57
- get size(): any;
58
- /**
59
- * Setter for the value property.
60
- * @param value
61
- */
62
- set icon(value: string);
63
- /**
64
- * Getter for the value property.
65
- * @returns {string}
66
- */
67
- get icon(): string;
68
- /**
69
- * Setter for the value property.
70
- * @param value
71
- */
72
- set type(value: string);
73
- /**
74
- * Getter for the value property.
75
- * @returns {string}
76
- */
77
- get type(): string;
78
- /**
79
- * Prepares data before the draw operation by fetching tags, transforming objects, and creating an index.
80
- * @returns {Promise<void>} Resolves when data preparation is complete.
81
- */
82
- beforeDraw(): Promise<void>;
83
- tags: any[];
84
- transformedObjects: any[];
85
- index: any[];
86
- /**
87
- * Draws and initializes the native color picker component on the DOM.
88
- * This method creates and appends the necessary elements, including input and infinite scroll components,
89
- * and sets their attributes and event listeners. It also provides custom data handling for infinite scrolling
90
- * and manages the way icons are displayed based on input.
91
- * @returns {DocumentFragment} A document fragment containing the fully constructed color picker component.
92
- */
93
- draw(): DocumentFragment;
94
- input: HTMLElement;
95
- picker: HTMLDivElement;
96
- infiniteScroll: InfiniteScroll;
97
- /**
98
- * Executes actions that occur after the component finishes its draw phase. Sets up event listeners for input clear
99
- * and infinite scroll item clicks, resets initialization state, and rebinds scroll-related events.
100
- * @returns {void} Does not return a value.
101
- */
102
- afterDraw(): void;
103
- init: boolean;
104
- /**
105
- * Handles the selection of an icon from a given input element and updates the relevant properties and events.
106
- * @function selectIcon
107
- * @param {HTMLElement} icon The icon element that was selected. It must have a 'name' attribute and may optionally have a 'filled' attribute.
108
- * The function performs the following actions:
109
- * - Retrieves the name of the selected icon from its 'name' attribute.
110
- * - Determines the style type ('filled' or 'outline') based on the presence of the 'filled' attribute.
111
- * - Searches for a matching object in the `transformedObjects` array based on name and style.
112
- * - Creates a new `wje-icon` element and assigns its attributes based on the selected icon's properties.
113
- * - Updates the selected object's properties and assigns it to the `value`, `icon`, and `type` properties of the class.
114
- * - Dispatches a custom event (`wje-icon-picker:select`) to signal a change in the selected icon.
115
- */
116
- selectIcon: (icon: HTMLElement) => void;
117
- value: any;
118
- /**
119
- * Initializes the component.
120
- */
121
- initial(): void;
122
- /**
123
- * Converts an object of tags into a transformed array of objects, separating `filled` and `outline` styles.
124
- * The function processes an input object containing tags, extracts its values,
125
- * and for each tag that has both `filled` and `outline` styles, splits them into
126
- * two separate objects. Tags without `filled` styles remain unchanged.
127
- * @param {object} tags The input object containing tags as properties. Each property is an object with a `styles` key.
128
- * @param {object} tags[].styles The styles object containing `filled` and/or `outline` styles.
129
- * @param {object} [tags[].styles.outline] The outline style object, if present.
130
- * @param {object} [tags[].styles.filled] The filled style object, if present.
131
- * @returns {Array<object>} An array of transformed objects. Objects with both `filled` and `outline` styles are split into separate objects, each containing only one style.
132
- * @example
133
- * const tags = {
134
- * hourglass: {
135
- * styles: {
136
- * outline: { ... },
137
- * filled: { ... },
138
- * }
139
- * },
140
- * clock: {
141
- * styles: {
142
- * outline: { ... },
143
- * }
144
- * }
145
- * };
146
- * const result = convertObject(tags);
147
- * console.log(result);
148
- * // [
149
- * // { styles: { outline: { ... } } },
150
- * // { styles: { filled: { ... } } },
151
- * // { styles: { outline: { ... } } }
152
- * // ]
153
- */
154
- convertObject: (tags?: {
155
- styles: {
156
- outline?: object;
157
- filled?: object;
158
- };
159
- }) => Array<object>;
160
- /**
161
- * Converts an icon data object into an HTML element structure.
162
- * This function creates a styled HTML element that represents an icon with a tooltip.
163
- * The tooltip displays the name of the icon, and the icon itself is styled based on
164
- * whether it uses the `filled` style.
165
- * @param {object} data The icon data object.
166
- * @returns {HTMLElement} A `div` element containing the icon wrapped in a `wje-tooltip`. The tooltip displays the icon name, and the `wje-icon` element represents the icon with attributes set according to the data.
167
- * @example
168
- * const iconData = {
169
- * name: "hourglass",
170
- * styles: {
171
- * filled: { ... }
172
- * }
173
- * };
174
- * const htmlElement = dataToHtml(iconData);
175
- * document.body.appendChild(htmlElement);
176
- *
177
- * // The resulting structure:
178
- * // <div class="icon-item">
179
- * // <wje-tooltip content="hourglass">
180
- * // <wje-icon name="hourglass" size="large" filled></wje-icon></wje-icon>
181
- * // </wje-tooltip>
182
- * // </div>
183
- */
184
- dataToHtml: (data: object) => HTMLElement;
185
- /**
186
- * Gets the tags.
187
- * @returns {Promise<Array>} The tags of the component.
188
- */
189
- getTags(): Promise<any[]>;
190
- /**
191
- * Searches icons based on user input.
192
- * This method handles the input event and filters the available icons based on the provided search string.
193
- * The filtering is performed on an index that combines icon names and their tags.
194
- * The results are then adjusted for infinite scrolling.
195
- * @param {Event} e The input event (e.g., `wje-input:input`) containing the search query details.
196
- */
197
- searchIcon: (e: Event) => void;
198
- /**
199
- * Clears the icons container.
200
- */
201
- clearIconsContainer(): void;
202
- /**
203
- * Creates a debounced version of the provided function that delays its execution
204
- * until after the specified delay has passed since the last time it was invoked.
205
- * @param {Function} fn The function to debounce.
206
- * @param {number} delay The delay duration in milliseconds.
207
- * @returns {Function} A new debounced function that delays the execution of the original function.
208
- */
209
- debounce(fn: Function, delay: number): Function;
210
- }
@@ -1,2 +0,0 @@
1
- import { default as Img } from './img.element.js';
2
- export default Img;