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,230 +0,0 @@
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(): object;
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
- * Sets the color attribute of the element.
51
- * @param {string} value The color value to be set. It should be a valid color string such as a named color, HEX, RGB, or HSL format.
52
- */
53
- set color(value: string);
54
- /**
55
- * Retrieves the color attribute of the element.
56
- * @returns {string | null} The current value of the 'color' attribute, or null if the attribute is not set.
57
- */
58
- get color(): string | null;
59
- /**
60
- * Setter for the marker position.
61
- * @param {object} value The new marker position.
62
- */
63
- set markerPosition(value: object);
64
- /**
65
- * Getter for the marker position.
66
- * @returns {object} The current marker position.
67
- */
68
- get markerPosition(): object;
69
- /**
70
- * Setter for the color swatches.
71
- * @param {string} value The new color swatches.
72
- */
73
- set swatches(value: string);
74
- /**
75
- * Getter for the color swatches.
76
- * @returns {Array} The current color swatches.
77
- */
78
- get swatches(): any[];
79
- /**
80
- * Sets or removes the 'no-color-area' attribute based on the provided value.
81
- * @param {boolean} value A boolean value indicating whether to set or remove the 'no-color-area' attribute. If true, the attribute is added; if false, the attribute is removed.
82
- */
83
- set noColorArea(value: boolean);
84
- /**
85
- * Getter method to check if the 'no-color-area' attribute is applied.
86
- * @returns {boolean} Returns true if the 'no-color-area' attribute is present; otherwise, false.
87
- */
88
- get noColorArea(): boolean;
89
- /**
90
- * Sets or removes the "no-controls" attribute.
91
- * @param {boolean} value If true, sets the "no-controls" attribute. If false, removes the "no-controls" attribute.
92
- */
93
- set noControls(value: boolean);
94
- /**
95
- * Checks if the 'no-controls' attribute is present on the element.
96
- * @returns {boolean} Returns true if the 'no-controls' attribute is present; otherwise, false.
97
- */
98
- get noControls(): boolean;
99
- /**
100
- * Sets or removes the 'no-swatches' attribute on the element.
101
- * If the value is truthy, the 'no-swatches' attribute is added.
102
- * If the value is falsy, the 'no-swatches' attribute is removed.
103
- * @param {boolean} value Determines whether the 'no-swatches' attribute is set (true) or removed (false).
104
- */
105
- set noSwatches(value: boolean);
106
- /**
107
- * Checks if the 'no-swatches' attribute is present on the element.
108
- * @returns {boolean} Returns true if the 'no-swatches' attribute is present; otherwise, false.
109
- */
110
- get noSwatches(): boolean;
111
- /**
112
- * Creates and returns a document fragment containing the structure and components of a custom color picker.
113
- * The method initializes DOM elements such as divs, sliders, and inputs, with specific classes and attributes,
114
- * and attaches various event listeners to handle user interactions.
115
- * @returns {DocumentFragment} A DocumentFragment containing the constructed and fully initialized DOM elements for the color picker.
116
- */
117
- draw(): DocumentFragment;
118
- anchor: HTMLDivElement;
119
- picker: HTMLDivElement;
120
- marker: HTMLDivElement;
121
- colorArea: HTMLDivElement;
122
- hueSlider: HTMLElement;
123
- alphaSlider: HTMLElement;
124
- colorPreview: HTMLDivElement;
125
- input: HTMLElement;
126
- /**
127
- * Executes after the component is drawn. Initializes some configurations if not already initialized,
128
- * including updating slider values, setting marker positions, and applying initial color settings.
129
- * This method ensures that all necessary visual elements and configurations are properly set up.
130
- * @returns {void} Does not return a value.
131
- */
132
- afterDraw(): void;
133
- colorAreaDimension: any;
134
- /**
135
- * Sets the hue.
136
- * @param node
137
- */
138
- createSwatches(node: any): void;
139
- /**
140
- * Sets the sliders to the given color.
141
- * @param color
142
- */
143
- setSliders(color: any): void;
144
- /**
145
- * Retrieves the dimensions and position of the color area element relative to the viewport.
146
- * @returns {object} An object containing the following properties:
147
- * width: The width of the element in pixels.
148
- * height: The height of the element in pixels.
149
- * x: The x-coordinate of the element's left edge relative to the viewport.
150
- * y: The y-coordinate of the element's top edge relative to the viewport.
151
- */
152
- dimension(): object;
153
- /**
154
- * Updates the position of the marker based on the pointer event.
155
- * This function calculates the position of the marker relative to the color area
156
- * dimensions based on the given event. It adjusts the marker position and updates
157
- * the color associated with the new position. It is intended to handle pointer movement
158
- * events such as mouse or touch interactions.
159
- * @param {Event} e The event triggering the marker movement, typically a mouse or touch event.
160
- */
161
- moveMarker: (e: Event) => void;
162
- /**
163
- * Gets the pointer position in client coordinates (viewport-relative).
164
- * @param e
165
- * @returns {{x: number, y: number}}
166
- */
167
- getPointerPosition(e: any): {
168
- x: number;
169
- y: number;
170
- };
171
- /**
172
- * Sets the position of the marker.
173
- * @param x
174
- * @param y
175
- */
176
- setMarkerPosition(x: any, y: any): void;
177
- /**
178
- * Sets the color at the given position.
179
- * @param x
180
- * @param y
181
- * @param alpha
182
- * @returns {*|tinycolor}
183
- */
184
- setColorAtPosition(x: any, y: any, alpha?: number): any | tinycolor;
185
- /**
186
- * Sets the marker position by color.
187
- * @param color
188
- * @returns {{x: number, y: number}}
189
- */
190
- setMarkerPositionByColor: (color?: string) => {
191
- x: number;
192
- y: number;
193
- };
194
- /**
195
- * Updates the color picker's current color and its associated UI elements.
196
- * @param {tinycolor.Instance|null} [color] The color value to set. If null, the current value from the input field is used.
197
- * @param {string} [type] The type of action determining which UI element to update. Possible values: "marker", "hue", "alpha", "swatch".
198
- */
199
- setColor: (color?: tinycolor.Instance | null, type?: string) => void;
200
- value: {
201
- hex8: any;
202
- hex: any;
203
- rgb: any;
204
- rgba: any;
205
- hsl: any;
206
- hsla: any;
207
- hsv: any;
208
- hsva: any;
209
- name: any;
210
- format: any;
211
- };
212
- /**
213
- * Sets the hue.
214
- * @param {object} e The event object.
215
- */
216
- setHue: (e: object) => void;
217
- /**
218
- * Sets the alpha.
219
- * @param {object} e The event object.
220
- */
221
- setAlpha: (e: object) => void;
222
- /**
223
- * Converts hue and alpha values into an HSVA color string.
224
- * @param {number} hue The hue value, typically between 0 and 360.
225
- * @param {number} alpha The alpha value, typically between 0 and 100, representing the opacity percentage.
226
- * @returns {string} - The HSVA color string in the format `hsva(h, 100%, 100%, a)`.
227
- */
228
- getHSVA: (hue: number, alpha: number) => string;
229
- #private;
230
- }
@@ -1 +0,0 @@
1
- export {};
@@ -1,2 +0,0 @@
1
- import { default as Container } from './container.element.js';
2
- export default Container;
@@ -1,31 +0,0 @@
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(): object;
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
- }
@@ -1,2 +0,0 @@
1
- import { default as CopyButton } from './copy-button.element.js';
2
- export default CopyButton;
@@ -1,89 +0,0 @@
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
- }
@@ -1,12 +0,0 @@
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>;
@@ -1,2 +0,0 @@
1
- import { default as Dialog } from './dialog.element.js';
2
- export default Dialog;
@@ -1,132 +0,0 @@
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 value of the 'headline' attribute.
36
- * @param {string} value The new value for the 'headline' attribute.
37
- */
38
- set headline(value: string);
39
- /**
40
- * Retrieves the value of the "headline" attribute from the element.
41
- * If the "headline" attribute is not present, returns an empty string.
42
- * @returns {string} The headline attribute value or an empty string if not set.
43
- */
44
- get headline(): string;
45
- /**
46
- * Sets the headline of the dialog.
47
- * @param value
48
- */
49
- set placement(value: string | string);
50
- /**
51
- * Gets the headline of the dialog.
52
- * @returns {string|string}
53
- */
54
- get placement(): string | string;
55
- /**
56
- * Sets the headline of the dialog.
57
- * @param value
58
- */
59
- set async(value: boolean);
60
- /**
61
- * Gets the headline of the dialog.
62
- * @returns {boolean}
63
- */
64
- get async(): boolean;
65
- /**
66
- * Sets the headline of the dialog.
67
- * @param value
68
- */
69
- set closeHidden(value: boolean);
70
- /**
71
- * Gets the headline of the dialog.
72
- * @returns {boolean}
73
- */
74
- get closeHidden(): boolean;
75
- set hiddenHeader(value: boolean);
76
- get hiddenHeader(): boolean;
77
- set hiddenFooter(value: boolean);
78
- get hiddenFooter(): boolean;
79
- /**
80
- * Draws the component.
81
- * @param {object} context The context for drawing.
82
- * @param {object} store The store for drawing.
83
- * @param {object} params The parameters for drawing.
84
- * @returns {DocumentFragment}
85
- */
86
- draw(context: object, store: object, params: object): DocumentFragment;
87
- dialog: HTMLDialogElement;
88
- /**
89
- * Creates the dialog body.
90
- * @param dialog
91
- */
92
- htmlDialogBody(dialog: any): void;
93
- /**
94
- * Closes the dialog.
95
- * @param e
96
- */
97
- close(e: any): void;
98
- /**
99
- * Before the dialog opens.
100
- */
101
- beforeOpen(dialog: any, trigger: any): void;
102
- /**
103
- * After the dialog opens.
104
- */
105
- afterOpen(dialog: any, trigger: any): void;
106
- /**
107
- * Before the dialog closes.
108
- */
109
- beforeClose(dialog: any, trigger: any): void;
110
- /**
111
- * After the dialog closes.
112
- */
113
- afterClose(dialog: any, trigger: any): void;
114
- /**
115
- * Opens the dialog.
116
- * @param e
117
- */
118
- onOpen: (e: any) => void;
119
- /**
120
- * Closes the dialog.
121
- * @param {object} e
122
- */
123
- onClose: (e: object) => void;
124
- /**
125
- * Registers an event listener on the provided button that triggers a blocking UI element
126
- * and executes a given promise when the button is clicked.
127
- * @param {HTMLElement} button The button element to attach the event listener to.
128
- * @param {Function} promise A function that returns a promise to be executed when the button is clicked.
129
- */
130
- registerBlockingEvent(button: HTMLElement, promise: Function): void;
131
- updateHasFooter(): void;
132
- }
@@ -1,2 +0,0 @@
1
- import { default as Divider } from './divider.element.js';
2
- export default Divider;
@@ -1,32 +0,0 @@
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
- }
@@ -1,2 +0,0 @@
1
- import { default as Dropdown } from './dropdown.element.js';
2
- export default Dropdown;
@@ -1,108 +0,0 @@
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 or removes the 'portaled' attribute on the element.
31
- * When the value is truthy, the attribute 'portaled' is added to the element.
32
- * When the value is falsy, the attribute 'portaled' is removed from the element.
33
- * @param {boolean} value Determines whether to add or remove the 'portaled' attribute.
34
- */
35
- set portaled(value: boolean);
36
- /**
37
- * Getter method for the `portaled` property.
38
- * Checks if the `portaled` attribute is present on the element.
39
- * @returns {boolean} Returns `true` if the `portaled` attribute exists, otherwise `false`.
40
- */
41
- get portaled(): boolean;
42
- /**
43
- * Checks whether the element has the 'portaled' attribute.
44
- * @returns {boolean} True if the element has the 'portaled' attribute, otherwise false.
45
- */
46
- get isPortaled(): boolean;
47
- /**
48
- * Sets the placement of the dropdown.
49
- * @param value
50
- */
51
- set trigger(value: string | string);
52
- /**
53
- * Gets the placement of the dropdown.
54
- * @returns {string|string}
55
- */
56
- get trigger(): string | string;
57
- /**
58
- * Callback function to handle other dropdowns being opened. Close the dropdown if it is not the target and collapse is enabled.
59
- * @param {Event} e The event object.
60
- */
61
- otherDropdownOpennedCallback: (e: Event) => void;
62
- /**
63
- * Removes the popup element.
64
- */
65
- beforeDraw(): void;
66
- popup: HTMLElement;
67
- /**
68
- * Draws the dropdown element and returns the created document fragment.
69
- * @returns {DocumentFragment}
70
- */
71
- draw(): DocumentFragment;
72
- anchorSlot: HTMLSlotElement;
73
- /**
74
- * Adds event listeners for the mouseenter and mouseleave events.
75
- */
76
- afterDraw(): void;
77
- popupHideCallback: (e: any) => void;
78
- /**
79
- * Handles delegated clicks from inside the popup and closes the dropdown when a leaf menu item is selected.
80
- * This works even when the menu is portaled, because we rely on the composed path.
81
- */
82
- onMenuItemClick: (e: any) => void;
83
- /**
84
- * @summary Toggles the dropdown element between active and inactive states.
85
- * Calls the `onOpen` method if the element is currently inactive,
86
- * and calls the `onClose` method if the element is currently active.
87
- * @param {Event} e The event object.
88
- */
89
- toggleCallback: (e: Event) => void;
90
- /**
91
- * @summary Returns the content to be displayed before showing the dropdown.
92
- * @returns {any} The content to be displayed.
93
- */
94
- beforeShow(): any;
95
- /**
96
- * This method is called after the dropdown is shown.
97
- */
98
- afterShow(): void;
99
- /**
100
- * Open the popup element.
101
- * @param {object} e
102
- */
103
- onOpen: (e: object) => void;
104
- beforeClose: () => void;
105
- afterClose: () => void;
106
- onClose: () => void;
107
- #private;
108
- }