wj-elements 0.1.151 → 0.1.152

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 (232) hide show
  1. package/dist/packages/index.d.ts +104 -0
  2. package/dist/packages/localize/localize.d.ts +17 -0
  3. package/dist/packages/translations/en-gb.d.ts +18 -0
  4. package/dist/packages/translations/sk-sk.d.ts +13 -0
  5. package/dist/packages/utils/animations.d.ts +2 -0
  6. package/dist/packages/utils/date.d.ts +1 -0
  7. package/dist/packages/utils/element-utils.d.ts +46 -0
  8. package/dist/packages/utils/event.d.ts +67 -0
  9. package/dist/packages/utils/localize.d.ts +4 -0
  10. package/dist/packages/utils/permissions-api.d.ts +34 -0
  11. package/dist/packages/utils/utils.d.ts +1 -0
  12. package/dist/packages/utils/wje-import-firefox.d.ts +0 -0
  13. package/dist/packages/utils/wje-import.d.ts +0 -0
  14. package/dist/packages/wje-accordion/accordion.d.ts +2 -0
  15. package/dist/packages/wje-accordion/accordion.element.d.ts +72 -0
  16. package/dist/packages/wje-accordion/accordion.test.d.ts +0 -0
  17. package/dist/packages/wje-accordion-item/accordion-item.d.ts +2 -0
  18. package/dist/packages/wje-accordion-item/accordion-item.element.d.ts +40 -0
  19. package/dist/packages/wje-animation/animation.d.ts +2 -0
  20. package/dist/packages/wje-animation/animation.element.d.ts +158 -0
  21. package/dist/packages/wje-animation/animation.test.d.ts +1 -0
  22. package/dist/packages/wje-aside/aside.d.ts +2 -0
  23. package/dist/packages/wje-aside/aside.element.d.ts +31 -0
  24. package/dist/packages/wje-avatar/avatar.d.ts +2 -0
  25. package/dist/packages/wje-avatar/avatar.element.d.ts +76 -0
  26. package/dist/packages/wje-avatar/avatar.test.d.ts +1 -0
  27. package/dist/packages/wje-avatar/service/service.d.ts +40 -0
  28. package/dist/packages/wje-badge/badge.d.ts +2 -0
  29. package/dist/packages/wje-badge/badge.element.d.ts +35 -0
  30. package/dist/packages/wje-badge/badge.test.d.ts +1 -0
  31. package/dist/packages/wje-breadcrumb/breadcrumb.d.ts +2 -0
  32. package/dist/packages/wje-breadcrumb/breadcrumb.element.d.ts +80 -0
  33. package/dist/packages/wje-breadcrumbs/breadcrumbs.d.ts +2 -0
  34. package/dist/packages/wje-breadcrumbs/breadcrumbs.element.d.ts +97 -0
  35. package/dist/packages/wje-breadcrumbs/breadcrumbs.test.d.ts +1 -0
  36. package/dist/packages/wje-button/button.d.ts +2 -0
  37. package/dist/packages/wje-button/button.element.d.ts +173 -0
  38. package/dist/packages/wje-button/button.test.d.ts +1 -0
  39. package/dist/packages/wje-button-group/button-group.d.ts +2 -0
  40. package/dist/packages/wje-button-group/button-group.element.d.ts +39 -0
  41. package/dist/packages/wje-card/card.d.ts +2 -0
  42. package/dist/packages/wje-card/card.element.d.ts +29 -0
  43. package/dist/packages/wje-card-content/card-content.d.ts +2 -0
  44. package/dist/packages/wje-card-content/card-content.element.d.ts +22 -0
  45. package/dist/packages/wje-card-controls/card-controls.d.ts +2 -0
  46. package/dist/packages/wje-card-controls/card-controls.element.d.ts +23 -0
  47. package/dist/packages/wje-card-header/card-header.d.ts +2 -0
  48. package/dist/packages/wje-card-header/card-header.element.d.ts +22 -0
  49. package/dist/packages/wje-card-subtitle/card-subtitle.d.ts +2 -0
  50. package/dist/packages/wje-card-subtitle/card-subtitle.element.d.ts +30 -0
  51. package/dist/packages/wje-card-title/card-title.d.ts +2 -0
  52. package/dist/packages/wje-card-title/card-title.element.d.ts +32 -0
  53. package/dist/packages/wje-carousel/carousel.d.ts +2 -0
  54. package/dist/packages/wje-carousel/carousel.element.d.ts +146 -0
  55. package/dist/packages/wje-carousel-item/carousel-item.d.ts +2 -0
  56. package/dist/packages/wje-carousel-item/carousel-item.element.d.ts +38 -0
  57. package/dist/packages/wje-checkbox/checkbox.d.ts +2 -0
  58. package/dist/packages/wje-checkbox/checkbox.element.d.ts +171 -0
  59. package/dist/packages/wje-chip/chip.d.ts +2 -0
  60. package/dist/packages/wje-chip/chip.element.d.ts +30 -0
  61. package/dist/packages/wje-col/col.d.ts +2 -0
  62. package/dist/packages/wje-col/col.element.d.ts +16 -0
  63. package/dist/packages/wje-color-picker/color-picker.d.ts +2 -0
  64. package/dist/packages/wje-color-picker/color-picker.element.d.ts +187 -0
  65. package/dist/packages/wje-color-picker/color-picker.test.d.ts +1 -0
  66. package/dist/packages/wje-container/container.d.ts +2 -0
  67. package/dist/packages/wje-container/container.element.d.ts +31 -0
  68. package/dist/packages/wje-copy-button/copy-button.d.ts +2 -0
  69. package/dist/packages/wje-copy-button/copy-button.element.d.ts +89 -0
  70. package/dist/packages/wje-copy-button/service/service.d.ts +12 -0
  71. package/dist/packages/wje-dialog/dialog.d.ts +2 -0
  72. package/dist/packages/wje-dialog/dialog.element.d.ts +116 -0
  73. package/dist/packages/wje-divider/divider.d.ts +2 -0
  74. package/dist/packages/wje-divider/divider.element.d.ts +32 -0
  75. package/dist/packages/wje-dropdown/dropdown.d.ts +2 -0
  76. package/dist/packages/wje-dropdown/dropdown.element.d.ts +85 -0
  77. package/dist/packages/wje-element/element.d.ts +316 -0
  78. package/dist/packages/wje-element/service/universal-service.d.ts +18 -0
  79. package/dist/packages/wje-file-upload/file-upload.d.ts +2 -0
  80. package/dist/packages/wje-file-upload/file-upload.element.d.ts +191 -0
  81. package/dist/packages/wje-file-upload/service/service.d.ts +70 -0
  82. package/dist/packages/wje-file-upload-item/file-upload-item.d.ts +2 -0
  83. package/dist/packages/wje-file-upload-item/file-upload-item.element.d.ts +66 -0
  84. package/dist/packages/wje-footer/footer.d.ts +2 -0
  85. package/dist/packages/wje-footer/footer.element.d.ts +28 -0
  86. package/dist/packages/wje-form/form.d.ts +2 -0
  87. package/dist/packages/wje-form/form.element.d.ts +28 -0
  88. package/dist/packages/wje-format-digital/format-digital.d.ts +2 -0
  89. package/dist/packages/wje-format-digital/format-digital.element.d.ts +87 -0
  90. package/dist/packages/wje-format-digital/format-digital.test.d.ts +1 -0
  91. package/dist/packages/wje-grid/grid.d.ts +2 -0
  92. package/dist/packages/wje-grid/grid.element.d.ts +26 -0
  93. package/dist/packages/wje-header/header.d.ts +2 -0
  94. package/dist/packages/wje-header/header.element.d.ts +35 -0
  95. package/dist/packages/wje-icon/icon.d.ts +2 -0
  96. package/dist/packages/wje-icon/icon.element.d.ts +40 -0
  97. package/dist/packages/wje-icon/service/service.d.ts +11 -0
  98. package/dist/packages/wje-icon-picker/icon-picker.d.ts +2 -0
  99. package/dist/packages/wje-icon-picker/icon-picker.element.d.ts +197 -0
  100. package/dist/packages/wje-img/img.d.ts +2 -0
  101. package/dist/packages/wje-img/img.element.d.ts +117 -0
  102. package/dist/packages/wje-img-comparer/img-comparer.d.ts +2 -0
  103. package/dist/packages/wje-img-comparer/img-comparer.element.d.ts +60 -0
  104. package/dist/packages/wje-img-comparer/service/service.d.ts +1 -0
  105. package/dist/packages/wje-infinite-scroll/infinite-scroll.d.ts +2 -0
  106. package/dist/packages/wje-infinite-scroll/infinite-scroll.element.d.ts +173 -0
  107. package/dist/packages/wje-input/input.d.ts +2 -0
  108. package/dist/packages/wje-input/input.element.d.ts +204 -0
  109. package/dist/packages/wje-input-file/input-file.d.ts +2 -0
  110. package/dist/packages/wje-input-file/input-file.element.d.ts +50 -0
  111. package/dist/packages/wje-item/item.d.ts +2 -0
  112. package/dist/packages/wje-item/item.element.d.ts +68 -0
  113. package/dist/packages/wje-kanban/kanban.d.ts +2 -0
  114. package/dist/packages/wje-kanban/kanban.element.d.ts +183 -0
  115. package/dist/packages/wje-label/label.d.ts +2 -0
  116. package/dist/packages/wje-label/label.element.d.ts +34 -0
  117. package/dist/packages/wje-level-indicator/level-indicator.d.ts +2 -0
  118. package/dist/packages/wje-level-indicator/level-indicator.element.d.ts +91 -0
  119. package/dist/packages/wje-list/list.d.ts +2 -0
  120. package/dist/packages/wje-list/list.element.d.ts +31 -0
  121. package/dist/packages/wje-main/main.d.ts +2 -0
  122. package/dist/packages/wje-main/main.element.d.ts +30 -0
  123. package/dist/packages/wje-masonry/masonry.d.ts +2 -0
  124. package/dist/packages/wje-masonry/masonry.element.d.ts +114 -0
  125. package/dist/packages/wje-masonry/service/service.d.ts +32 -0
  126. package/dist/packages/wje-menu/menu.d.ts +2 -0
  127. package/dist/packages/wje-menu/menu.element.d.ts +47 -0
  128. package/dist/packages/wje-menu-button/menu-button.d.ts +2 -0
  129. package/dist/packages/wje-menu-button/menu-button.element.d.ts +34 -0
  130. package/dist/packages/wje-menu-item/menu-item.d.ts +2 -0
  131. package/dist/packages/wje-menu-item/menu-item.element.d.ts +139 -0
  132. package/dist/packages/wje-menu-label/menu-label.d.ts +2 -0
  133. package/dist/packages/wje-menu-label/menu-label.element.d.ts +39 -0
  134. package/dist/packages/wje-option/option.d.ts +2 -0
  135. package/dist/packages/wje-option/option.element.d.ts +59 -0
  136. package/dist/packages/wje-options/options.d.ts +2 -0
  137. package/dist/packages/wje-options/options.element.d.ts +183 -0
  138. package/dist/packages/wje-orgchart/orgchart.d.ts +2 -0
  139. package/dist/packages/wje-orgchart/orgchart.element.d.ts +24 -0
  140. package/dist/packages/wje-orgchart-group/orgchart-group.d.ts +2 -0
  141. package/dist/packages/wje-orgchart-group/orgchart-group.element.d.ts +28 -0
  142. package/dist/packages/wje-orgchart-item/orgchart-item.d.ts +2 -0
  143. package/dist/packages/wje-orgchart-item/orgchart-item.element.d.ts +49 -0
  144. package/dist/packages/wje-pagination/pagination.d.ts +2 -0
  145. package/dist/packages/wje-pagination/pagination.element.d.ts +166 -0
  146. package/dist/packages/wje-pagination/pagination.test.d.ts +1 -0
  147. package/dist/packages/wje-pagination/service/service.d.ts +9 -0
  148. package/dist/packages/wje-panel/panel.d.ts +2 -0
  149. package/dist/packages/wje-panel/panel.element.d.ts +34 -0
  150. package/dist/packages/wje-popup/popup.d.ts +2 -0
  151. package/dist/packages/wje-popup/popup.element.d.ts +93 -0
  152. package/dist/packages/wje-progress-bar/progress-bar.d.ts +2 -0
  153. package/dist/packages/wje-progress-bar/progress-bar.element.d.ts +96 -0
  154. package/dist/packages/wje-qr-code/qr-code.d.ts +2 -0
  155. package/dist/packages/wje-qr-code/qr-code.element.d.ts +33 -0
  156. package/dist/packages/wje-radio/radio.d.ts +2 -0
  157. package/dist/packages/wje-radio/radio.element.d.ts +53 -0
  158. package/dist/packages/wje-radio-group/radio-group.d.ts +2 -0
  159. package/dist/packages/wje-radio-group/radio-group.element.d.ts +137 -0
  160. package/dist/packages/wje-rate/rate.d.ts +2 -0
  161. package/dist/packages/wje-rate/rate.element.d.ts +156 -0
  162. package/dist/packages/wje-relative-time/relative-time.d.ts +2 -0
  163. package/dist/packages/wje-relative-time/relative-time.element.d.ts +55 -0
  164. package/dist/packages/wje-relative-time/relative-time.test.d.ts +1 -0
  165. package/dist/packages/wje-reorder/reorder.d.ts +2 -0
  166. package/dist/packages/wje-reorder/reorder.element.d.ts +119 -0
  167. package/dist/packages/wje-reorder-dropzone/reorder-dropzone.d.ts +2 -0
  168. package/dist/packages/wje-reorder-dropzone/reorder-dropzone.element.d.ts +23 -0
  169. package/dist/packages/wje-reorder-handle/reorder-handle.d.ts +2 -0
  170. package/dist/packages/wje-reorder-handle/reorder-handle.element.d.ts +75 -0
  171. package/dist/packages/wje-reorder-item/reorder-item.d.ts +2 -0
  172. package/dist/packages/wje-reorder-item/reorder-item.element.d.ts +24 -0
  173. package/dist/packages/wje-route/route.d.ts +2 -0
  174. package/dist/packages/wje-route/route.element.d.ts +22 -0
  175. package/dist/packages/wje-router/router.d.ts +2 -0
  176. package/dist/packages/wje-router/router.element.d.ts +39 -0
  177. package/dist/packages/wje-router-link/router-link.d.ts +2 -0
  178. package/dist/packages/wje-router-link/router-link.element.d.ts +31 -0
  179. package/dist/packages/wje-router-outlet/router-outlet.d.ts +2 -0
  180. package/dist/packages/wje-router-outlet/router-outlet.element.d.ts +15 -0
  181. package/dist/packages/wje-row/row.d.ts +2 -0
  182. package/dist/packages/wje-row/row.element.d.ts +23 -0
  183. package/dist/packages/wje-select/select.d.ts +2 -0
  184. package/dist/packages/wje-select/select.element.d.ts +315 -0
  185. package/dist/packages/wje-slider/slider.d.ts +2 -0
  186. package/dist/packages/wje-slider/slider.element.d.ts +103 -0
  187. package/dist/packages/wje-split-view/service/service.d.ts +1 -0
  188. package/dist/packages/wje-split-view/split-view.d.ts +2 -0
  189. package/dist/packages/wje-split-view/split-view.element.d.ts +66 -0
  190. package/dist/packages/wje-status/status.d.ts +2 -0
  191. package/dist/packages/wje-status/status.element.d.ts +26 -0
  192. package/dist/packages/wje-step/step.d.ts +2 -0
  193. package/dist/packages/wje-step/step.element.d.ts +23 -0
  194. package/dist/packages/wje-stepper/stepper.d.ts +2 -0
  195. package/dist/packages/wje-stepper/stepper.element.d.ts +78 -0
  196. package/dist/packages/wje-store/default-store-actions.d.ts +25 -0
  197. package/dist/packages/wje-store/pubsub.d.ts +21 -0
  198. package/dist/packages/wje-store/store.d.ts +153 -0
  199. package/dist/packages/wje-tab/tab.d.ts +2 -0
  200. package/dist/packages/wje-tab/tab.element.d.ts +41 -0
  201. package/dist/packages/wje-tab-group/tab-group.d.ts +2 -0
  202. package/dist/packages/wje-tab-group/tab-group.element.d.ts +67 -0
  203. package/dist/packages/wje-tab-panel/tab-panel.d.ts +2 -0
  204. package/dist/packages/wje-tab-panel/tab-panel.element.d.ts +23 -0
  205. package/dist/packages/wje-textarea/textarea.d.ts +2 -0
  206. package/dist/packages/wje-textarea/textarea.element.d.ts +176 -0
  207. package/dist/packages/wje-thumbnail/thumbnail.d.ts +2 -0
  208. package/dist/packages/wje-thumbnail/thumbnail.element.d.ts +31 -0
  209. package/dist/packages/wje-timeline/timeline.d.ts +2 -0
  210. package/dist/packages/wje-timeline/timeline.element.d.ts +25 -0
  211. package/dist/packages/wje-timeline-item/timeline-item.d.ts +2 -0
  212. package/dist/packages/wje-timeline-item/timeline-item.element.d.ts +27 -0
  213. package/dist/packages/wje-toast/toast.d.ts +2 -0
  214. package/dist/packages/wje-toast/toast.element.d.ts +173 -0
  215. package/dist/packages/wje-toast/toast.test.d.ts +1 -0
  216. package/dist/packages/wje-toggle/toggle.d.ts +2 -0
  217. package/dist/packages/wje-toggle/toggle.element.d.ts +65 -0
  218. package/dist/packages/wje-toolbar/toolbar.d.ts +2 -0
  219. package/dist/packages/wje-toolbar/toolbar.element.d.ts +39 -0
  220. package/dist/packages/wje-toolbar-action/toolbar-action.d.ts +2 -0
  221. package/dist/packages/wje-toolbar-action/toolbar-action.element.d.ts +35 -0
  222. package/dist/packages/wje-tooltip/tooltip.d.ts +2 -0
  223. package/dist/packages/wje-tooltip/tooltip.element.d.ts +71 -0
  224. package/dist/packages/wje-tree/tree.d.ts +2 -0
  225. package/dist/packages/wje-tree/tree.element.d.ts +104 -0
  226. package/dist/packages/wje-tree/tree.test.d.ts +1 -0
  227. package/dist/packages/wje-tree-item/tree-item.d.ts +2 -0
  228. package/dist/packages/wje-tree-item/tree-item.element.d.ts +155 -0
  229. package/dist/packages/wje-tree-item/tree-item.test.d.ts +1 -0
  230. package/dist/packages/wje-visually-hidden/visually-hidden.d.ts +2 -0
  231. package/dist/packages/wje-visually-hidden/visually-hidden.element.d.ts +29 -0
  232. package/package.json +1 -1
@@ -0,0 +1,173 @@
1
+ import { default as WJElement } from '../wje-element/element.js';
2
+ /**
3
+ * `Toast` is a custom web component that represents a toast notification.
4
+ * @summary This element represents a toast notification.
5
+ * @documentation https://elements.webjet.sk/components/toast
6
+ * @status stable
7
+ * @augments {WJElement}
8
+ * @csspart native - The native part
9
+ * @cssproperty {string} headline - Specifies the headline text of the toast. Represents the main title or heading displayed in the toast.
10
+ * @cssproperty {boolean} open - Indicates whether the toast is currently open (visible). A value of `true` shows the toast, while `false` hides it.
11
+ * @cssproperty {number} duration - Determines the duration (in milliseconds) for which the toast is displayed. After this time, the toast will automatically close unless it is manually closed.
12
+ * @cssproperty {boolean} closable - Specifies whether the toast can be manually closed by the user. If `true`, the toast will include a close button or mechanism.
13
+ * @cssproperty {string} color - Defines the color of the toast. Accepts any valid CSS color value such as `hex`, `RGB`, or named colors.
14
+ * @cssproperty {boolean} countdown - Indicates whether a countdown is displayed in the toast. When `true`, a visual countdown timer is shown to indicate the remaining time before the toast closes.
15
+ * @slot - The content of the toast.
16
+ * @slot media - The media of the toast.
17
+ * // @fires wje-toast:after-show - Fired after the toast is shown.
18
+ * // @fires wje-toast:after-hide - Fired after the toast is hidden.
19
+ */
20
+ export default class Toast extends WJElement {
21
+ /**
22
+ * Returns the CSS stylesheet for the component.
23
+ * @static
24
+ * @returns {CSSStyleSheet} The CSS stylesheet
25
+ */
26
+ static get cssStyleSheet(): CSSStyleSheet;
27
+ toastStack: HTMLDivElement & {
28
+ className: string;
29
+ };
30
+ /**
31
+ * Set headline value of the toast.
32
+ * @param value
33
+ */
34
+ set headline(value: string);
35
+ /**
36
+ * Get headline value of the toast.
37
+ * @returns {string}
38
+ */
39
+ get headline(): string;
40
+ /**
41
+ * Set open value of the toast.
42
+ * @param value
43
+ */
44
+ set open(value: boolean);
45
+ /**
46
+ * Get open value of the toast.
47
+ * @returns {boolean}
48
+ */
49
+ get open(): boolean;
50
+ /**
51
+ * Set duration value of the toast.
52
+ * @param value
53
+ */
54
+ set duration(value: number);
55
+ /**
56
+ * Get duration value of the toast.
57
+ * @returns {number}
58
+ */
59
+ get duration(): number;
60
+ /**
61
+ * Set closable value of the toast.
62
+ * @param value
63
+ */
64
+ set closable(value: boolean);
65
+ /**
66
+ * Get closable value of the toast.
67
+ * @returns {boolean}
68
+ */
69
+ get closable(): boolean;
70
+ /**
71
+ * Set color value of the toast.
72
+ * @param value
73
+ */
74
+ set color(value: string);
75
+ /**
76
+ * Get color value of the toast.
77
+ * @returns {string}
78
+ */
79
+ get color(): string;
80
+ /**
81
+ * Set countdown value of the toast.
82
+ * @param value
83
+ */
84
+ set countdown(value: boolean);
85
+ /**
86
+ * Get countdown value of the toast.
87
+ * @returns {boolean}
88
+ */
89
+ get countdown(): boolean;
90
+ /**
91
+ * Set icon value of the toast.
92
+ * @param value
93
+ */
94
+ set icon(value: string);
95
+ /**
96
+ * Get icon value of the toast.
97
+ * @returns {string}
98
+ */
99
+ get icon(): string;
100
+ /**
101
+ * Draw method for the toast notification.
102
+ * @returns {object} Document fragment
103
+ */
104
+ draw(): object;
105
+ closeBtn: HTMLElement;
106
+ countdownBar: HTMLDivElement;
107
+ /**
108
+ * After draw method for the toast notification.
109
+ */
110
+ afterDraw(): void;
111
+ countdownAnimation: Animation;
112
+ remainingTime: number;
113
+ /**
114
+ * Starts the timer.
115
+ * This method sets the `startTime` property to the current time and sets
116
+ * the `timeoutID` property to the ID of the timeout. The method also
117
+ * dispatches the `wje-toast:after-hide` custom event when the timeout
118
+ * expires.
119
+ */
120
+ startTimer(): void;
121
+ startTime: number;
122
+ timeoutID: number;
123
+ /**
124
+ * Stops the timer.
125
+ * This method clears the timeout and calculates the remaining time.
126
+ * The method is called when the toast notification is paused.
127
+ */
128
+ stopTimer(): void;
129
+ /**
130
+ * Resumes the timer.
131
+ * This method resumes the timer if the remaining time is greater
132
+ * than zero. The method is called when the toast notification is resumed.
133
+ */
134
+ resumeTimer(): void;
135
+ /**
136
+ * Asynchronously shows the toast notification.
137
+ * This method sets the `open` property to `true` and dispatches the
138
+ * `wje-toast:after-show` custom event. If the toast is already open,
139
+ * the method returns `undefined`.
140
+ */
141
+ show: () => void;
142
+ /**
143
+ * Asynchronously hides the toast notification.
144
+ * This method sets the `open` property to `false` and dispatches the
145
+ * `wje-toast:after-hide` custom event. If the toast is already hidden,
146
+ * the method returns `undefined`.
147
+ */
148
+ hide: () => void;
149
+ /**
150
+ * Pauses the countdown animation and stops the timer.
151
+ */
152
+ pause: () => void;
153
+ /**
154
+ * Resumes the countdown animation and resumes the timer.
155
+ */
156
+ resume: () => void;
157
+ /**
158
+ * Removes the toast notification and the toast stack.
159
+ *
160
+ * This method removes the toast notification from the toast stack and
161
+ * removes the toast stack from the document body if the toast stack is
162
+ * empty.
163
+ */
164
+ removeChildAndStack(): void;
165
+ /**
166
+ * Asynchronously starts the toast notification.
167
+ * This method appends the toast notification to the document body and
168
+ * shows the toast notification. The method returns a promise that
169
+ * resolves when the toast notification is shown.
170
+ * @returns {Promise<unknown>}
171
+ */
172
+ start: () => Promise<unknown>;
173
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { default as Toggle } from './toggle.element.js';
2
+ export default Toggle;
@@ -0,0 +1,65 @@
1
+ import { default as WJElement } from '../wje-element/element.js';
2
+ /**
3
+ * `Toggle` is a custom web component that represents a toggle input.
4
+ * @summary This element represents a toggle input.
5
+ * @documentation https://elements.webjet.sk/components/toggle
6
+ * @status stable
7
+ * @augments {WJElement}
8
+ * @csspart native - The native toggle wrapper.
9
+ * @csspart input - The toggle input.
10
+ * @csspart toggle - The toggle part.
11
+ * @slot - The default slot for the toggle.
12
+ * @cssproperty [--wje-toggle-color-base=var(--wje-color-contrast-3)] - The base background color of the toggle. Defines the default background color when the toggle is in an unselected state.
13
+ * @cssproperty [--wje-toggle-width=30px] - The overall width of the toggle switch. Determines how wide the toggle component appears.
14
+ * @cssproperty [--wje-toggle-height=18px] - The overall height of the toggle switch. Specifies how tall the toggle component appears.
15
+ * @cssproperty [--wje-toggle-border-radius=50px] - The border radius of the toggle. Controls how rounded the corners of the toggle are.
16
+ * @cssproperty [--wje-toggle-handle-width=14px] - The width of the toggle handle (knob). Determines the size of the handle for user interaction.
17
+ * @cssproperty [--wje-toggle-handle-height=14px] - The height of the toggle handle (knob). Specifies the vertical size of the handle.
18
+ * @cssproperty [--wje-toggle-handle-border-radius=9px] - The border radius of the toggle handle. Controls how rounded the handle is.
19
+ * @cssproperty [--wje-toggle-handle-color=#fff] - The color of the toggle handle. Accepts any valid CSS color, such as `hex`, `rgb`, or `css variable`.
20
+ * @cssproperty [--wje-toggle-handle-shadow=1px 0 1px 0.5px rgba(0,0,0,0.12), 2px 4px 6px rgba(0,0,0,0.2)] - The shadow applied to the toggle handle. Adds a subtle shadow effect for better visual clarity.
21
+ * @cssproperty [--wje-toggle-handle-shadow-checked=1px 1px 0 rgba(0,0,0,0.08), -3px 3px 6px rgba(0,0,0,0.3)] - The shadow applied to the toggle handle when it is in the checked (on) state. Provides visual feedback to indicate the toggle state.
22
+ * @cssproperty [--wje-toggle-duration=250ms] - The duration of the toggle animation in milliseconds. Controls how long the toggle animation lasts during state changes.
23
+ * @cssproperty [--wje-toggle-curve=cubic-bezier(.4,0,.2,1)] - The easing curve used for the toggle animation. Defines the speed curve for the animation, enhancing the user experience with smooth transitions.
24
+ * @tag wje-toggle
25
+ */
26
+ export default class Toggle extends WJElement {
27
+ /**
28
+ * Get CSS stylesheet for the Button element.
29
+ * @static
30
+ * @returns {CSSStyleSheet} styles - The CSS stylesheet for the Button element.
31
+ */
32
+ static get cssStyleSheet(): CSSStyleSheet;
33
+ /**
34
+ * Get observed attributes for the toggle element.
35
+ * @returns {string[]}
36
+ */
37
+ static get observedAttributes(): string[];
38
+ /**
39
+ * Set checked attribute for the toggle element.
40
+ */
41
+ set disabled(value: boolean);
42
+ /**
43
+ * Get checked attribute for the toggle element.
44
+ * @returns {boolean} true if the toggle is disabled, false otherwise
45
+ */
46
+ get disabled(): boolean;
47
+ /**
48
+ * Set checked attribute for the toggle element.
49
+ */
50
+ set checked(value: boolean);
51
+ /**
52
+ * Get checked attribute for the toggle element.
53
+ * @returns {boolean} true if the toggle is checked, false otherwise
54
+ */
55
+ get checked(): boolean;
56
+ /**
57
+ * Draw the toggle element for the component.
58
+ */
59
+ draw(): DocumentFragment;
60
+ input: HTMLInputElement;
61
+ /**
62
+ * After draw method for the toggle element to add event listeners for the input element after the element is drawn.
63
+ */
64
+ afterDraw(): void;
65
+ }
@@ -0,0 +1,2 @@
1
+ import { default as Toolbar } from './toolbar.element.js';
2
+ export default Toolbar;
@@ -0,0 +1,39 @@
1
+ import { default as WJElement } from '../wje-element/element.js';
2
+ /**
3
+ * `Toolbar` is a custom web component that represents a toolbar.
4
+ * @summary This element represents a toolbar.
5
+ * @documentation https://elements.webjet.sk/components/toolbar
6
+ * @status stable
7
+ * @augments {WJElement}
8
+ * @csspart native - The native toolbar wrapper.
9
+ * @slot start - The start slot for the toolbar.
10
+ * @slot end - The end slot for the toolbar.
11
+ * @cssproperty [--wje-toolbar-background=var(--wje-background)] - Specifies the background color of the toolbar. Accepts any valid CSS color value, such as `hex`, `rgb`, or `CSS variable`.
12
+ * @cssproperty [--wje-toolbar-height=auto] - Defines the height of the toolbar. If set to `auto`, the height adjusts based on the content.
13
+ * @cssproperty [--wje-toolbar-min-height=70px] - Sets the minimum height of the toolbar. Ensures the toolbar maintains a consistent minimum size.
14
+ * @cssproperty [--wje-toolbar-padding-top=1rem] - Specifies the padding at the top of the toolbar. Accepts any valid CSS length unit.
15
+ * @cssproperty [--wje-toolbar-padding-bottom=1rem] - Specifies the padding at the bottom of the toolbar. Helps create spacing between the content and the bottom edge.
16
+ * @cssproperty [--wje-toolbar-padding-inline=1.5rem] - Defines the horizontal padding (left and right) of the toolbar. Creates consistent spacing on both sides.
17
+ * @cssproperty [--wje-toolbar-border-color=var(--wje-border-color)] - Sets the color of the toolbar's border. Accepts any valid CSS color value.
18
+ * @cssproperty [--wje-toolbar-top=0] - Specifies the vertical position of the toolbar relative to its container. Useful for fixed or sticky toolbars.
19
+ * @tag wje-toolbar
20
+ */
21
+ export default class Toolbar extends WJElement {
22
+ /**
23
+ * Returns the CSS stylesheet for the component.
24
+ * @static
25
+ * @returns {CSSStyleSheet} The CSS stylesheet
26
+ */
27
+ static get cssStyleSheet(): CSSStyleSheet;
28
+ /**
29
+ * Returns the list of observed attributes.
30
+ * @static
31
+ * @returns {Array} An empty array
32
+ */
33
+ static get observedAttributes(): any[];
34
+ /**
35
+ * Draws the component for the toolbar.
36
+ * @returns {object} Document fragment
37
+ */
38
+ draw(): object;
39
+ }
@@ -0,0 +1,2 @@
1
+ import { default as ToolbarAction } from './toolbar-action.element.js';
2
+ export default ToolbarAction;
@@ -0,0 +1,35 @@
1
+ import { default as WJElement } from '../wje-element/element.js';
2
+ /**
3
+ * `ToolbarAction` is a custom web component that represents a toolbar action.
4
+ * @summary This element represents a toolbar action.
5
+ * @documentation https://elements.webjet.sk/components/toolbar-action
6
+ * @status stable
7
+ * @augments {WJElement}
8
+ * @csspart native - The native toolbar action wrapper.
9
+ * @slot - The default slot for the toolbar action.
10
+ * @tag wje-toolbar-action
11
+ */
12
+ export default class ToolbarAction extends WJElement {
13
+ /**
14
+ * Returns the CSS stylesheet for the component.
15
+ * @static
16
+ * @returns {CSSStyleSheet} The CSS stylesheet
17
+ */
18
+ static get cssStyleSheet(): CSSStyleSheet;
19
+ /**
20
+ * Returns the list of observed attributes.
21
+ * @static
22
+ * @returns {Array} An empty array
23
+ */
24
+ static get observedAttributes(): any[];
25
+ /**
26
+ * Draws the component for the toolbar action.
27
+ * @returns {object} Document fragment
28
+ */
29
+ draw(): object;
30
+ /**
31
+ * Returns the actions for the toolbar action.
32
+ * @returns {Array} An array of wje-button elements
33
+ */
34
+ getActions(): any[];
35
+ }
@@ -0,0 +1,2 @@
1
+ import { default as Tooltip } from './tooltip.element.js';
2
+ export default Tooltip;
@@ -0,0 +1,71 @@
1
+ import { default as WJElement } from '../wje-element/element.js';
2
+ /**
3
+ * `Tooltip` is a custom web component that represents a tooltip.
4
+ * @summary This element represents a tooltip.
5
+ * @documentation https://elements.webjet.sk/components/tooltip
6
+ * @status stable
7
+ * @augments {WJElement}
8
+ * @attribute {string} content - The content of the tooltip element. Accepts any valid string value.
9
+ * @slot arrow - The arrow slot for the tooltip.
10
+ * @slot anchor - The anchor slot for the tooltip.
11
+ * @csspart native - The native tooltip wrapper.
12
+ * @cssproperty [--wje-tooltip-arrow-color=var(--wje-color-contrast-11)] - Specifies the color of the tooltip's arrow. This property determines the visual color of the arrow that points to the element the tooltip is attached to. Accepts any valid CSS color value such as `hex`, `rgb`, or `CSS variable`.
13
+ * @tag wje-tooltip
14
+ */
15
+ export default class Tooltip extends WJElement {
16
+ /**
17
+ * Returns the CSS stylesheet for the component.
18
+ * @static
19
+ * @returns {CSSStyleSheet} The CSS stylesheet
20
+ */
21
+ static get cssStyleSheet(): CSSStyleSheet;
22
+ /**
23
+ * Returns the list of observed attributes.
24
+ * @static
25
+ * @returns {Array} An array of observed attributes
26
+ */
27
+ static get observedAttributes(): any[];
28
+ /**
29
+ * Set active attribute for the tooltip element.
30
+ * @param value
31
+ */
32
+ set content(value: string);
33
+ /**
34
+ * Get active attribute for the tooltip element.
35
+ * @returns {string}
36
+ */
37
+ get content(): string;
38
+ /**
39
+ * Draws the component for the tooltip.
40
+ * @returns {object} Document fragment
41
+ */
42
+ draw(): object;
43
+ mySlot: HTMLSlotElement;
44
+ popup: HTMLElement;
45
+ native: HTMLDivElement;
46
+ /**
47
+ * Draws the component for the tooltip.
48
+ */
49
+ afterDraw(): void;
50
+ dispatch(customEvent: any): Promise<any>;
51
+ beforeShow(): string;
52
+ afterShow(): boolean;
53
+ /**
54
+ * Handles the logic for showing the component's popup or tooltip.
55
+ * Adds the `active` class, invokes lifecycle hooks, and manages the popup visibility.
56
+ * @throws {Error} If the `beforeShow` method returns a non-string value or `false`.
57
+ */
58
+ onShow: () => void;
59
+ /**
60
+ * Hides the component's popup or tooltip.
61
+ * Removes the `active` class from the component and hides the popup element.
62
+ */
63
+ onHide: () => void;
64
+ /**
65
+ * Validates if the specified selector exists within the provided element.
66
+ * Logs an error if the selector is not found and returns the found element or `null`.
67
+ * @param {HTMLElement} anchorEl The root element to search within.
68
+ * @returns {HTMLElement|null} The first element matching the selector, or `null` if not found.
69
+ */
70
+ checkSelector(anchorEl: HTMLElement): HTMLElement | null;
71
+ }
@@ -0,0 +1,2 @@
1
+ import { default as Tree } from './tree.element.js';
2
+ export default Tree;
@@ -0,0 +1,104 @@
1
+ import { default as WJElement } from '../wje-element/element.js';
2
+ /**
3
+ * `Tree` is a custom web component that represents a hierarchical tree structure.
4
+ * It extends from `WJElement`.
5
+ * @summary This element visually represents a tree structure, supporting single or multiple selection modes and hierarchy management.
6
+ * @documentation https://elements.webjet.sk/components/tree
7
+ * @status stable
8
+ * @augments {WJElement}
9
+ * @csspart native - The native container part of the tree.
10
+ * @slot - The default slot to place `wje-tree-item` child components.
11
+ * @tag wje-tree
12
+ */
13
+ export default class Tree extends WJElement {
14
+ /**
15
+ * Returns the CSS stylesheet for the component.
16
+ * @static
17
+ * @returns {CSSStyleSheet} The CSS stylesheet
18
+ */
19
+ static get cssStyleSheet(): CSSStyleSheet;
20
+ /**
21
+ * Sets the selection attribute for the element.
22
+ * @param {string} value The value to set as the selection attribute.
23
+ */
24
+ set selection(value: string);
25
+ /**
26
+ * Gets the current selection mode for the element.
27
+ * If no selection is explicitly set, it defaults to 'single'.
28
+ * @returns {string} The current selection mode, either set by the element's attribute or the default value 'single'.
29
+ */
30
+ get selection(): string;
31
+ /**
32
+ * A method called before the drawing or rendering process of tree items.
33
+ * It iterates through all `wje-tree-item` elements, updating their selection state
34
+ * and managing their expand/collapse icons accordingly.
35
+ * @returns {void} This method does not return a value.
36
+ */
37
+ beforeDraw(): void;
38
+ /**
39
+ * Draw method for the toast notification.
40
+ * @returns {object} Document fragment
41
+ */
42
+ draw(): object;
43
+ /**
44
+ * Called after the draw process of the component is completed.
45
+ * Typically used to add event listeners or perform operations
46
+ * that are dependent on the component's drawn state.
47
+ * @returns {void} This method does not return a value.
48
+ */
49
+ afterDraw(): void;
50
+ /**
51
+ * Handles the click event triggered by the user interaction.
52
+ * Identifies the closest tree item element to the event target and sets it
53
+ * as the selected item. Ensures that only one item is selected at a time, resetting
54
+ * the selection state for all other items.
55
+ * @param {Event} e The click event object.
56
+ */
57
+ handleClick: (e: Event) => void;
58
+ /**
59
+ * Retrieves all items that match the selector 'wje-tree-item' within the current context.
60
+ * @returns {Array<Element>} An array of all matching DOM elements.
61
+ */
62
+ getAllItems(): Array<Element>;
63
+ /**
64
+ * Retrieves and appends an expand/collapse icon to a given item based on the provided status.
65
+ * @param {HTMLElement} item The DOM element to which the icon will be appended.
66
+ * @param {string} status The status indicating which icon to retrieve (e.g., "expand" or "collapse").
67
+ * @returns {void} This method does not return a value. If the icon matching the given status is not found, a warning is logged.
68
+ */
69
+ getExpandCollapseIcon(item: HTMLElement, status: string): void;
70
+ /**
71
+ * Updates the state of a checkbox, syncing the state both upwards to parent elements
72
+ * and downwards to child elements as necessary.
73
+ * @param {object} changedItem The specific item whose checkbox state has changed.
74
+ * @param {boolean} [isInitialSync] Indicates whether the state update is part of the initial synchronization process.
75
+ * @returns {void} This method does not return a value.
76
+ */
77
+ updateCheckboxState(changedItem: object, isInitialSync?: boolean): void;
78
+ isInitialSync: boolean;
79
+ /**
80
+ * Updates the state of the parent item based on the state of its child items.
81
+ * Recursively propagates changes up to all parent items to reflect the selection
82
+ * or indeterminate state accurately.
83
+ * @param {object} item The current tree item whose parent state needs to be updated.
84
+ * It is expected to have properties `selected`, `indeterminate`,
85
+ * and a method `getChildrenItems({ includeDisabled: boolean })`.
86
+ * @returns {void} This method does not return a value.
87
+ */
88
+ updateParentState(item: object): void;
89
+ /**
90
+ * Propagates the state changes of an item upwards through its ancestors in the hierarchy.
91
+ * Calls the `updateParentState` method for each parent element until no parent exists.
92
+ * @param {HTMLElement} item The current item whose state to propagate to its parent.
93
+ * @returns {void} This method does not return a value.
94
+ */
95
+ propagateStateUpwards(item: HTMLElement): void;
96
+ /**
97
+ * Propagates the selected state of an item to its children recursively. Depending on the `isInitialSync` flag,
98
+ * it also determines how the state should be applied to the child items and updates the parent state if needed.
99
+ * @param {object} item The item whose state is being propagated to its child items. The item must have properties
100
+ * such as `selected` and methods like `getChildrenItems` to retrieve its child elements.
101
+ * @returns {void} This method does not return a value.
102
+ */
103
+ propagateStateDownwards(item: object): void;
104
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,2 @@
1
+ import { default as TreeItem } from './tree-item.element.js';
2
+ export default TreeItem;
@@ -0,0 +1,155 @@
1
+ /**
2
+ * `wje-tree-item` is a custom web component used as a child of the `wje-tree`.
3
+ * It represents a node within a tree structure, capable of nesting other items.
4
+ * @summary Represents a single item in a tree structure.
5
+ * @documentation https://elements.webjet.sk/components/tree-item
6
+ * @status stable
7
+ * @augments {HTMLElement}
8
+ * @slot - Default slot for rendering the tree item's content (e.g., text or custom elements).
9
+ * @csspart native - The native container of the tree item.
10
+ * @cssproperty [--wje-tree-item-indent=var(--wje-spacing-large)] - Defines the indentation for nested tree items.
11
+ * @cssproperty [--wje-tree-item-indent-guid-width=0px] - Specifies the width of the guide element shown next to a tree item.
12
+ * @cssproperty [--wje-tree-item-border-radius=var(--wje-border-radius-medium)] - Sets the border radius of the tree item’s container.
13
+ * @tag wje-tree-item
14
+ */
15
+ export default class TreeItem extends HTMLElement {
16
+ /**
17
+ * Returns the CSS stylesheet for the component.
18
+ * @static
19
+ * @returns {CSSStyleSheet} The CSS stylesheet
20
+ */
21
+ static get cssStyleSheet(): CSSStyleSheet;
22
+ /**
23
+ * Returns the list of attributes to observe for changes.
24
+ * @static
25
+ * @returns {Array<string>}
26
+ */
27
+ static get observedAttributes(): string[];
28
+ _selection: string;
29
+ /**
30
+ * Sets the expanded state of the element. When set to a truthy value,
31
+ * the 'expanded' attribute will be added to the element. When set to a falsy
32
+ * value, the 'expanded' attribute will be removed.
33
+ * @param {boolean} value A boolean value indicating whether the
34
+ * element should be expanded (true) or collapsed (false).
35
+ */
36
+ set expanded(value: boolean);
37
+ /**
38
+ * Retrieves the value of the 'expanded' state for the current element.
39
+ * This getter checks whether the 'expanded' attribute is present on the element.
40
+ * If the attribute exists, it returns true, representing that the element is expanded.
41
+ * Otherwise, it returns false, indicating that the element is not expanded.
42
+ * @returns {boolean} True if the 'expanded' attribute is present, false otherwise.
43
+ */
44
+ get expanded(): boolean;
45
+ /**
46
+ * Sets the 'selected' attribute of the element. Removes the attribute if the provided value is falsy; otherwise, sets it.
47
+ * @param {boolean} value The value indicating whether the element should have the 'selected' attribute.
48
+ */
49
+ set selected(value: boolean);
50
+ /**
51
+ * Getter method for determining if the 'selected' attribute is present on the element.
52
+ * @returns {boolean} Returns true if the 'selected' attribute is present, otherwise false.
53
+ */
54
+ get selected(): boolean;
55
+ /**
56
+ * Sets the selection mode for the component.
57
+ * @param {string} value The selection mode to apply. Defaults to 'single'
58
+ * if no value is provided. Possible options may be
59
+ * specific to the implementation of the component
60
+ * (e.g., 'single', 'multiple').
61
+ */
62
+ set selection(value: any);
63
+ /**
64
+ * Retrieves the current selection.
65
+ * @returns {*} The value of the current selection.
66
+ */
67
+ get selection(): any;
68
+ /**
69
+ * Sets or removes the 'indeterminate' attribute based on the provided value.
70
+ * This can be used to visually indicate an indeterminate state for elements like checkboxes.
71
+ * @param {boolean} value A boolean indicating whether to set the element to an indeterminate state.
72
+ * If true, the 'indeterminate' attribute is added to the element; if false, the attribute is removed.
73
+ */
74
+ set indeterminate(value: boolean);
75
+ /**
76
+ * Retrieves the state of the indeterminate attribute.
77
+ * @returns {boolean} True if the indeterminate attribute is present, otherwise false.
78
+ */
79
+ get indeterminate(): boolean;
80
+ /**
81
+ * Setup attributes for the Button element.
82
+ */
83
+ setupAttributes(): void;
84
+ isShadowRoot: string;
85
+ /**
86
+ * Handles updates when observed attributes of the element are changed.
87
+ * Updates the checkbox state based on changes to the "selected" or "indeterminate" attributes.
88
+ * @param {string} name The name of the attribute that was changed.
89
+ * @param {string|null} oldValue The previous value of the attribute before the change.
90
+ * @param {string|null} newValue The new value of the attribute after the change.
91
+ * @returns {void}
92
+ */
93
+ attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void;
94
+ /**
95
+ * Custom logic executed before the draw process begins.
96
+ * Determines and sets the appropriate slot if the current item is nested.
97
+ * @returns {void} No return value.
98
+ */
99
+ beforeDraw(): void;
100
+ /**
101
+ * Creates and returns a document fragment representing the structure of a tree item component.
102
+ * The method constructs the DOM elements including the native container, indentation, toggle button,
103
+ * selection checkbox, label, and children container, along with their respective slots and attributes.
104
+ * It dynamically handles the creation of expand and collapse icons, as well as appending slots for
105
+ * child components.
106
+ * @returns {DocumentFragment} A fragment containing the complete tree item structure to be rendered.
107
+ */
108
+ draw(): DocumentFragment;
109
+ checkbox: HTMLElement;
110
+ native: HTMLDivElement;
111
+ button: HTMLDivElement;
112
+ childrenElement: HTMLDivElement;
113
+ childrenSlot: HTMLSlotElement;
114
+ /**
115
+ * Executes operations to be performed after the draw action is completed.
116
+ * If the state indicates it is expanded, toggles its children.
117
+ * Additionally, sets up an event listener on the button element to handle toggling children upon click.
118
+ * @returns {void} Does not return a value.
119
+ */
120
+ afterDraw(): void;
121
+ /**
122
+ * Determines if the current item is a nested item within a tree structure.
123
+ * Checks if the item's parent element exists and is also a tree item.
124
+ * @returns {boolean} Returns true if the current item is a nested tree item; otherwise, false.
125
+ */
126
+ isNestedItem(): boolean;
127
+ /**
128
+ * Checks whether the given node is a tree item.
129
+ * @param {object} node The node to check.
130
+ * @returns {boolean} Returns true if the node is an Element and has a class name of 'TreeItem', otherwise false.
131
+ */
132
+ isTreeItem(node: object): boolean;
133
+ /**
134
+ * Toggles the visibility state of the children element and updates the class of the parent element.
135
+ * The method toggles the 'open' class on the children elements and the 'expanded' class on the parent element,
136
+ * effectively showing or hiding the children and indicating the expanded state.
137
+ * @returns {void} Does not return a value.
138
+ */
139
+ toggleChildren(): void;
140
+ /**
141
+ * Retrieves the child items from the `childrenSlot` that match specific criteria.
142
+ * @param {object} [options] Configuration options.
143
+ * @param {boolean} [options.includeDisabled] Determines whether disabled items should be included in the result. Defaults to true.
144
+ * @returns {Array} An array of child items that are valid tree items and meet the criteria specified in the options.
145
+ */
146
+ getChildrenItems(options?: {
147
+ includeDisabled?: boolean;
148
+ }): any[];
149
+ /**
150
+ * Retrieves all descendant children of the current object in a flattened array structure.
151
+ * @param {object} [options] An optional object specifying filters or configurations for retrieving children.
152
+ * @returns {Array} An array containing all children and their descendants in a flat structure.
153
+ */
154
+ getAllChildrenFlat(options?: object): any[];
155
+ }