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,187 @@
1
+ import { default as WJElement } from '../wje-element/element.js';
2
+ /**
3
+ * @summary ColorPicker is a custom web component that extends WJElement.
4
+ * It provides a color picker functionality with a color area, hue slider, alpha slider, and color swatches.
5
+ * The color picker allows users to select a color by moving a marker on the color area, adjusting the hue and alpha sliders, or clicking on a color swatch.
6
+ * @documentation https://elements.webjet.sk/components/color-picker
7
+ * @status stable
8
+ * @augments WJElement
9
+ * @slot - The card header main content.
10
+ * @csspart anchor - The anchor part of the color picker.
11
+ * @csspart picker - The main part of the color picker.
12
+ * @csspart marker - The marker part of the color picker.
13
+ * @csspart color-area - The color area part of the color picker.
14
+ * @csspart hue - The hue slider part of the color picker.
15
+ * @csspart alpha - The alpha slider part of the color picker.
16
+ * @csspart color-preview - The color preview part of the color picker.
17
+ * @csspart input - The input part of the color picker.
18
+ * @cssproperty [--wje-color-picker-area] - The color of the color area background.
19
+ * @cssproperty [--wje-color-picker-value] - The value of the color picker input.
20
+ * @cssproperty [--wje-color-picker-swatch] - The color of the color swatch button.
21
+ * @cssproperty [--wje-color-picker-size] - The color of the color marker.
22
+ * @cssproperty [--wje-color-picker-radius] - The color of the color anchor.
23
+ */
24
+ export default class ColorPicker extends WJElement {
25
+ /**
26
+ * Getter for the CSS stylesheet.
27
+ * @returns {object} The styles object.
28
+ * @static
29
+ */
30
+ static get cssStyleSheet(): any;
31
+ /**
32
+ * Getter for the observed attributes.
33
+ * @returns {Array} An empty array.
34
+ * @static
35
+ */
36
+ static get observedAttributes(): any[];
37
+ /**
38
+ * The position of the color marker.
39
+ * @type {object}
40
+ * @private
41
+ */
42
+ private _markerPosition;
43
+ /**
44
+ * The color swatches.
45
+ * @type {Array}
46
+ * @private
47
+ */
48
+ private _swatches;
49
+ /**
50
+ * Setter for the marker position.
51
+ * @param {object} value The new marker position.
52
+ */
53
+ set markerPosition(value: any);
54
+ /**
55
+ * Getter for the marker position.
56
+ * @returns {object} The current marker position.
57
+ */
58
+ get markerPosition(): any;
59
+ /**
60
+ * Setter for the color swatches.
61
+ * @param {string} value The new color swatches.
62
+ */
63
+ set swatches(value: any[]);
64
+ /**
65
+ * Getter for the color swatches.
66
+ * @returns {Array} The current color swatches.
67
+ */
68
+ get swatches(): any[];
69
+ /**
70
+ * Draws the ColorPicker element.
71
+ * @returns {DocumentFragment} The created document fragment.
72
+ */
73
+ draw(): DocumentFragment;
74
+ popup: HTMLElement;
75
+ anchor: HTMLDivElement;
76
+ picker: HTMLDivElement;
77
+ marker: HTMLDivElement;
78
+ colorArea: HTMLDivElement;
79
+ hueSlider: HTMLElement;
80
+ alphaSlider: HTMLElement;
81
+ colorPreview: HTMLDivElement;
82
+ input: HTMLElement;
83
+ /**
84
+ * Sets the hue.
85
+ * @param node
86
+ */
87
+ createSwatches(node: any): void;
88
+ /**
89
+ * Sets up the event listeners for the ColorPicker.
90
+ */
91
+ afterDraw(): void;
92
+ init: boolean;
93
+ colorAreaDimension: {
94
+ width: any;
95
+ x: any;
96
+ y: any;
97
+ height: any;
98
+ };
99
+ /**
100
+ * Sets the sliders to the given color.
101
+ * @param color
102
+ */
103
+ setSliders(color: any): void;
104
+ /**
105
+ * Gets the dimensions of the color area.
106
+ * @returns {{width: *, x: *, y: *, height: *}}
107
+ */
108
+ dimension(): {
109
+ width: any;
110
+ x: any;
111
+ y: any;
112
+ height: any;
113
+ };
114
+ /**
115
+ * Moves the marker to the given position.
116
+ * @param e
117
+ */
118
+ moveMarker: (e: any) => void;
119
+ /**
120
+ * Sets the hue.
121
+ * @param e
122
+ * @returns {{pageY: (*|number), pageX: (*|number)}}
123
+ */
124
+ getPointerPosition(e: any): {
125
+ pageY: (any | number);
126
+ pageX: (any | number);
127
+ };
128
+ /**
129
+ * Sets the position of the marker.
130
+ * @param x
131
+ * @param y
132
+ */
133
+ setMarkerPosition(x: any, y: any): void;
134
+ /**
135
+ * Sets the color at the given position.
136
+ * @param x
137
+ * @param y
138
+ * @param alpha
139
+ * @returns {*|tinycolor}
140
+ */
141
+ setColorAtPosition(x: any, y: any, alpha?: number): any | tinycolor;
142
+ /**
143
+ * Sets the marker position by color.
144
+ * @param color
145
+ * @returns {{x: number, y: number}}
146
+ */
147
+ setMarkerPositionByColor: (color?: string) => {
148
+ x: number;
149
+ y: number;
150
+ };
151
+ /**
152
+ * Updates the color picker's current color and its associated UI elements.
153
+ * @param {tinycolor.Instance|null} [color] The color value to set. If null, the current value from the input field is used.
154
+ * @param {string} [type] The type of action determining which UI element to update. Possible values: "marker", "hue", "alpha", "swatch".
155
+ */
156
+ setColor: (color?: tinycolor.Instance | null, type?: string) => void;
157
+ value: {
158
+ hex8: any;
159
+ hex: any;
160
+ rgb: any;
161
+ rgba: any;
162
+ hsl: any;
163
+ hsla: any;
164
+ hsv: any;
165
+ hsva: any;
166
+ name: any;
167
+ format: any;
168
+ };
169
+ /**
170
+ * Sets the hue.
171
+ * @param {object} e The event object.
172
+ */
173
+ setHue: (e: object) => void;
174
+ /**
175
+ * Sets the alpha.
176
+ * @param {object} e The event object.
177
+ */
178
+ setAlpha: (e: object) => void;
179
+ /**
180
+ * Converts hue and alpha values into an HSVA color string.
181
+ * @param {number} hue The hue value, typically between 0 and 360.
182
+ * @param {number} alpha The alpha value, typically between 0 and 100, representing the opacity percentage.
183
+ * @returns {string} - The HSVA color string in the format `hsva(h, 100%, 100%, a)`.
184
+ */
185
+ getH: any;
186
+ getHSVA: (hue: any, alpha: any) => string;
187
+ }
@@ -0,0 +1,2 @@
1
+ import { default as Container } from './container.element.js';
2
+ export default Container;
@@ -0,0 +1,31 @@
1
+ import { default as WJElement } from '../wje-element/element.js';
2
+ /**
3
+ * @summary The Container class is a custom web component that extends WJElement. It is a simple container that can hold other elements or components.
4
+ * It provides a slot for adding child elements or components. The Container class also supports indentation through the `indent` property.
5
+ * The indentation is applied as a CSS variable (`--wje-container-indent`) which can be used in the styles of child elements or components.
6
+ * @documentation https://elements.webjet.sk/components/card-header
7
+ * @status stable
8
+ * @augments WJElement
9
+ * @slot - The slot for adding child elements or components.
10
+ * @cssproperty [--wje-container-indent] - The indentation of the container.
11
+ * @tag wje-container
12
+ */
13
+ export default class Container extends WJElement {
14
+ /**
15
+ * Getter for the CSS stylesheet.
16
+ * @returns {object} The styles object.
17
+ * @static
18
+ */
19
+ static get cssStyleSheet(): any;
20
+ /**
21
+ * Getter for the observed attributes.
22
+ * @returns {Array} An empty array.
23
+ * @static
24
+ */
25
+ static get observedAttributes(): any[];
26
+ /**
27
+ * Draws the Container element.
28
+ * @returns {DocumentFragment} The created document fragment.
29
+ */
30
+ draw(): DocumentFragment;
31
+ }
@@ -0,0 +1,2 @@
1
+ import { default as CopyButton } from './copy-button.element.js';
2
+ export default CopyButton;
@@ -0,0 +1,89 @@
1
+ import { default as WJElement } from '../wje-element/element.js';
2
+ /**
3
+ * @summary CopyButton is a custom web component that extends WJElement.
4
+ * It provides a button that, when clicked, copies a specified text to the clipboard.
5
+ * The text to be copied can be specified through the `value` attribute.
6
+ * The CopyButton also supports keyboard interaction, copying the text when the space or enter key is pressed.
7
+ * @documentation https://elements.webjet.sk/components/copy-button
8
+ * @status stable
9
+ * @augments WJElement
10
+ * @attribute {string} for - The id of the element to copy content from.
11
+ * @attribute {string} value - The text to be copied.
12
+ * @slot - This is a default/unnamed slot.
13
+ * @csspart button - Styles the button element.
14
+ * @cssproperty --text-color - Controls the color of the text.
15
+ * @cssproperty --background-color - Controls the background color of the button.
16
+ * //@fires wje:copy-button - Dispatched when the button is clicked and the text is copied.
17
+ * @tag wje-copy-button
18
+ */
19
+ export default class CopyButton extends WJElement {
20
+ /**
21
+ * Getter for the cssStyleSheet property.
22
+ * @returns {string} The CSS styles.
23
+ */
24
+ static get cssStyleSheet(): string;
25
+ /**
26
+ * Getter for the observedAttributes property.
27
+ * @returns {Array} An empty array.
28
+ */
29
+ static get observedAttributes(): any[];
30
+ timeout: number;
31
+ /**
32
+ * Setter for the value property.
33
+ * @param {string} value The value to be set.
34
+ */
35
+ set value(value: string);
36
+ /**
37
+ * Getter for the value property.
38
+ * @returns {string} The value of the value property.
39
+ */
40
+ get value(): string;
41
+ /**
42
+ * Draws the ColorPicker element.
43
+ * @returns {DocumentFragment} The created document fragment.
44
+ */
45
+ draw(): DocumentFragment;
46
+ icon: HTMLElement;
47
+ tooltip: HTMLElement;
48
+ /**
49
+ * Adds event listeners for the click, focus, and blur events.
50
+ */
51
+ afterDraw(): void;
52
+ /**
53
+ * Handles the click event.
54
+ * @param {Event} e The event object.
55
+ */
56
+ clicked: (e: Event) => void;
57
+ /**
58
+ * Handles the keydown event.
59
+ * @param {Event} e The event object.
60
+ */
61
+ keydown: (e: Event) => void;
62
+ /**
63
+ * Handles the focus event.
64
+ * @param {Event} e The event object.
65
+ */
66
+ focused: (e: Event) => void;
67
+ /**
68
+ * Handles the blur event.
69
+ * @param {Event} e The event object.
70
+ */
71
+ blurred: (e: Event) => void;
72
+ /**
73
+ * Handles the copied event.
74
+ * You can override this method to customize the behavior when the text is copied.
75
+ * @param {Event} e The event object.
76
+ */
77
+ copied: (e: Event) => void;
78
+ /**
79
+ * Copies the specified text or node.
80
+ * @param {HTMLElement} button The button element.
81
+ */
82
+ copy(button: HTMLElement): Promise<void>;
83
+ /**
84
+ * Copies the target content.
85
+ * @param {HTMLElement} content The content to be copied.
86
+ * @returns {Promise} A promise that resolves when the content is copied.
87
+ */
88
+ copyTarget(content: HTMLElement): Promise<any>;
89
+ }
@@ -0,0 +1,12 @@
1
+ /**
2
+ * Copy the node to the clipboard.
3
+ * @param node
4
+ * @returns {Promise<never>|Promise<void>}
5
+ */
6
+ export function copyNode(node: any): Promise<never> | Promise<void>;
7
+ /**
8
+ * Copy the text to the clipboard.
9
+ * @param text
10
+ * @returns {Promise<never>|Promise<void>}
11
+ */
12
+ export function copyText(text: any): Promise<never> | Promise<void>;
@@ -0,0 +1,2 @@
1
+ import { default as Dialog } from './dialog.element.js';
2
+ export default Dialog;
@@ -0,0 +1,116 @@
1
+ import { default as WJElement } from '../wje-element/element.js';
2
+ /**
3
+ * `Dialog` is a custom web component that represents a dialog.
4
+ * @summary This element represents a dialog.
5
+ * @documentation https://elements.webjet.sk/components/dialog
6
+ * @status stable
7
+ * @augments {WJElement}
8
+ * @slot header - Slot for the header content.
9
+ * @slot body - Slot for the body content.
10
+ * @slot footer - Slot for the footer content.
11
+ * @csspart dialog - The dialog wrapper.
12
+ * @csspart header - The header of the dialog.
13
+ * @csspart body - The body of the dialog.
14
+ * @csspart footer - The footer of the dialog.
15
+ * @csspart close - The close button of the dialog.
16
+ * @cssproperty [--wje-dialog-background=var(--wje-background-color)] - Specifies the background color of the dialog.
17
+ * @cssproperty [--wje-dialog-color=var(--wje-text-color)] - Defines the text color within the dialog.
18
+ * @cssproperty [--wje-dialog-padding=1rem] - Controls the padding inside the dialog.
19
+ * @cssproperty [--wje-dialog-border-radius=0.5rem] - Sets the border radius for the dialog's corners.
20
+ * @cssproperty [--wje-dialog-box-shadow=0 2px 10px rgba(0, 0, 0, 0.1)] - Applies a shadow effect to the dialog.
21
+ * @tag wje-dialog
22
+ */
23
+ export default class Dialog extends WJElement {
24
+ /**
25
+ * Returns the CSS styles for the component.
26
+ * @returns {*}
27
+ */
28
+ static get cssStyleSheet(): any;
29
+ /**
30
+ * Returns the list of attributes to observe for changes.
31
+ * @returns {*[]}
32
+ */
33
+ static get observedAttributes(): any[];
34
+ /**
35
+ * Sets the headline of the dialog.
36
+ * @param value
37
+ */
38
+ set placement(value: string);
39
+ /**
40
+ * Gets the headline of the dialog.
41
+ * @returns {string|string}
42
+ */
43
+ get placement(): string;
44
+ /**
45
+ * Sets the headline of the dialog.
46
+ * @param value
47
+ */
48
+ set async(value: boolean);
49
+ /**
50
+ * Gets the headline of the dialog.
51
+ * @returns {boolean}
52
+ */
53
+ get async(): boolean;
54
+ /**
55
+ * Sets the headline of the dialog.
56
+ * @param value
57
+ */
58
+ set closeHidden(value: boolean);
59
+ /**
60
+ * Gets the headline of the dialog.
61
+ * @returns {boolean}
62
+ */
63
+ get closeHidden(): boolean;
64
+ /**
65
+ * Draws the component.
66
+ * @param {object} context The context for drawing.
67
+ * @param {object} store The store for drawing.
68
+ * @param {object} params The parameters for drawing.
69
+ * @returns {DocumentFragment}
70
+ */
71
+ draw(context: object, store: object, params: object): DocumentFragment;
72
+ dialog: HTMLDialogElement;
73
+ /**
74
+ * Creates the dialog body.
75
+ * @param dialog
76
+ */
77
+ htmlDialogBody(dialog: any): void;
78
+ /**
79
+ * Closes the dialog.
80
+ * @param e
81
+ */
82
+ close(e: any): void;
83
+ /**
84
+ * Before the dialog opens.
85
+ */
86
+ beforeOpen(): void;
87
+ /**
88
+ * After the dialog opens.
89
+ */
90
+ afterOpen(): void;
91
+ /**
92
+ * Before the dialog closes.
93
+ */
94
+ beforeClose(): void;
95
+ /**
96
+ * After the dialog closes.
97
+ */
98
+ afterClose(): void;
99
+ /**
100
+ * Opens the dialog.
101
+ * @param e
102
+ */
103
+ onOpen: (e: any) => void;
104
+ /**
105
+ * Closes the dialog.
106
+ * @param {object} e
107
+ */
108
+ onClose: (e: object) => void;
109
+ /**
110
+ * Registers an event listener on the provided button that triggers a blocking UI element
111
+ * and executes a given promise when the button is clicked.
112
+ * @param {HTMLElement} button The button element to attach the event listener to.
113
+ * @param {Function} promise A function that returns a promise to be executed when the button is clicked.
114
+ */
115
+ registerBlockingEvent(button: HTMLElement, promise: Function): void;
116
+ }
@@ -0,0 +1,2 @@
1
+ import { default as Divider } from './divider.element.js';
2
+ export default Divider;
@@ -0,0 +1,32 @@
1
+ import { default as WJElement } from '../wje-element/element.js';
2
+ /**
3
+ * @summary Divider is a custom web component that extends WJElement.
4
+ * It provides a simple divider line that can be used to separate content.
5
+ * @documentation https://elements.webjet.sk/components/divider
6
+ * @status stable
7
+ * @augments WJElement
8
+ * @slot - This is a default/unnamed slot.
9
+ * @cssproperty [--wje-border-width=1px] - The size of the border.
10
+ * @cssproperty [--wje-divider-border-color=var(--wje-border-color)] - The color of the divider borderline.
11
+ * @cssproperty [--wje-divider-border-width=var(--wje-border-width, 1px)] - The width of the divider borderline.
12
+ * @cssproperty [--wje-divider-spacing=0] - The spacing for the divider.
13
+ * @tag wje-divider
14
+ * @tag wje-divider
15
+ */
16
+ export default class Divider extends WJElement {
17
+ /**
18
+ * Getter for the CSS stylesheet.
19
+ * @returns {string} The CSS stylesheet.
20
+ */
21
+ static get cssStyleSheet(): string;
22
+ /**
23
+ * Getter for the observed attributes.
24
+ * @returns {Array} An empty array as there are no observed attributes.
25
+ */
26
+ static get observedAttributes(): any[];
27
+ /**
28
+ * Draws the Divider.
29
+ * @returns {DocumentFragment} The created document fragment.
30
+ */
31
+ draw(): DocumentFragment;
32
+ }
@@ -0,0 +1,2 @@
1
+ import { default as Dropdown } from './dropdown.element.js';
2
+ export default Dropdown;
@@ -0,0 +1,85 @@
1
+ import { default as WJElement } from '../wje-element/element.js';
2
+ import { default as Popup } from '../wje-popup/popup.element.js';
3
+ /**
4
+ * `Dropdown` is a custom element that displays a dropdown menu.
5
+ * @summary This element represents a dropdown menu.
6
+ * @documentation https://elements.webjet.sk/components/dropdown
7
+ * @status stable
8
+ * @augments {WJElement}
9
+ * @csspart native - The native part of the dropdown.
10
+ * @slot trigger - The slot for the trigger of the dropdown.
11
+ * @slot - The default slot for the dropdown.
12
+ * // @fires wje-dropdown:open - Event fired when the dropdown is opened.
13
+ * // @fires wje-dropdown:close - Event fired when the dropdown is closed.
14
+ * @tag wje-dropdown
15
+ */
16
+ export default class Dropdown extends WJElement {
17
+ /**
18
+ * Getter for the CSS stylesheet.
19
+ * @returns {string[]}
20
+ */
21
+ static get observedAttributes(): string[];
22
+ /**
23
+ * The placement of the dropdown.
24
+ * @type {{"wje-popup": Popup}}
25
+ */
26
+ dependencies: {
27
+ "wje-popup": Popup;
28
+ };
29
+ /**
30
+ * Sets the placement of the dropdown.
31
+ * @param value
32
+ */
33
+ set trigger(value: string);
34
+ /**
35
+ * Gets the placement of the dropdown.
36
+ * @returns {string|string}
37
+ */
38
+ get trigger(): string;
39
+ /**
40
+ * Callback function to handle other dropdowns being opened. Close the dropdown if it is not the target and collapse is enabled.
41
+ * @param {Event} e The event object.
42
+ */
43
+ otherDropdownOpennedCallback: (e: Event) => void;
44
+ /**
45
+ * Removes the popup element.
46
+ */
47
+ beforeDraw(): void;
48
+ popup: HTMLElement;
49
+ /**
50
+ * Draws the dropdown element and returns the created document fragment.
51
+ * @returns {DocumentFragment}
52
+ */
53
+ draw(): DocumentFragment;
54
+ anchorSlot: HTMLSlotElement;
55
+ /**
56
+ * Adds event listeners for the mouseenter and mouseleave events.
57
+ */
58
+ afterDraw(): void;
59
+ /**
60
+ * @summary Returns the content to be displayed before showing the dropdown.
61
+ * @returns {any} The content to be displayed.
62
+ */
63
+ beforeShow(): any;
64
+ /**
65
+ * This method is called after the dropdown is shown.
66
+ */
67
+ afterShow(): void;
68
+ /**
69
+ * @summary Toggles the dropdown element between active and inactive states.
70
+ * Calls the `onOpen` method if the element is currently inactive,
71
+ * and calls the `onClose` method if the element is currently active.
72
+ * @param {Event} e The event object.
73
+ */
74
+ toggleCallback: (e: Event) => void;
75
+ /**
76
+ * Open the popup element.
77
+ * @param {object} e
78
+ */
79
+ onOpen: (e: object) => void;
80
+ /**
81
+ * Close the popup element.
82
+ * @param {object} e
83
+ */
84
+ onClose: (e: object) => void;
85
+ }