wj-elements 0.1.135 → 0.1.136

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 (418) hide show
  1. package/package.json +1 -1
  2. package/dist/dark.css +0 -223
  3. package/dist/infinite-scroll.element-XVJukzjy.js +0 -272
  4. package/dist/infinite-scroll.element-XVJukzjy.js.map +0 -1
  5. package/dist/light.css +0 -530
  6. package/dist/list.element-Ce1vIm1O.js +0 -50
  7. package/dist/list.element-Ce1vIm1O.js.map +0 -1
  8. package/dist/localize.js +0 -70
  9. package/dist/localize.js.map +0 -1
  10. package/dist/packages/index.d.ts +0 -100
  11. package/dist/packages/localize/localize.d.ts +0 -17
  12. package/dist/packages/translations/en-gb.d.ts +0 -13
  13. package/dist/packages/translations/sk-sk.d.ts +0 -13
  14. package/dist/packages/utils/animations.d.ts +0 -2
  15. package/dist/packages/utils/date.d.ts +0 -1
  16. package/dist/packages/utils/element-utils.d.ts +0 -46
  17. package/dist/packages/utils/event.d.ts +0 -67
  18. package/dist/packages/utils/localize.d.ts +0 -4
  19. package/dist/packages/utils/permissions-api.d.ts +0 -34
  20. package/dist/packages/utils/utils.d.ts +0 -1
  21. package/dist/packages/utils/wje-import-firefox.d.ts +0 -0
  22. package/dist/packages/utils/wje-import.d.ts +0 -0
  23. package/dist/packages/wje-accordion/accordion.d.ts +0 -2
  24. package/dist/packages/wje-accordion/accordion.element.d.ts +0 -72
  25. package/dist/packages/wje-accordion-item/accordion-item.d.ts +0 -2
  26. package/dist/packages/wje-accordion-item/accordion-item.element.d.ts +0 -40
  27. package/dist/packages/wje-animation/animation.d.ts +0 -2
  28. package/dist/packages/wje-animation/animation.element.d.ts +0 -153
  29. package/dist/packages/wje-animation/animation.test.d.ts +0 -1
  30. package/dist/packages/wje-aside/aside.d.ts +0 -2
  31. package/dist/packages/wje-aside/aside.element.d.ts +0 -31
  32. package/dist/packages/wje-avatar/avatar.d.ts +0 -2
  33. package/dist/packages/wje-avatar/avatar.element.d.ts +0 -37
  34. package/dist/packages/wje-avatar/service/service.d.ts +0 -40
  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 -80
  40. package/dist/packages/wje-breadcrumbs/breadcrumbs.d.ts +0 -2
  41. package/dist/packages/wje-breadcrumbs/breadcrumbs.element.d.ts +0 -97
  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 -173
  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 -39
  48. package/dist/packages/wje-card/card.d.ts +0 -2
  49. package/dist/packages/wje-card/card.element.d.ts +0 -29
  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 -146
  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 -171
  66. package/dist/packages/wje-chip/chip.d.ts +0 -2
  67. package/dist/packages/wje-chip/chip.element.d.ts +0 -29
  68. package/dist/packages/wje-col/col.d.ts +0 -2
  69. package/dist/packages/wje-col/col.element.d.ts +0 -16
  70. package/dist/packages/wje-color-picker/color-picker.d.ts +0 -2
  71. package/dist/packages/wje-color-picker/color-picker.element.d.ts +0 -187
  72. package/dist/packages/wje-container/container.d.ts +0 -2
  73. package/dist/packages/wje-container/container.element.d.ts +0 -31
  74. package/dist/packages/wje-copy-button/copy-button.d.ts +0 -2
  75. package/dist/packages/wje-copy-button/copy-button.element.d.ts +0 -89
  76. package/dist/packages/wje-copy-button/service/service.d.ts +0 -12
  77. package/dist/packages/wje-dialog/dialog.d.ts +0 -2
  78. package/dist/packages/wje-dialog/dialog.element.d.ts +0 -116
  79. package/dist/packages/wje-divider/divider.d.ts +0 -2
  80. package/dist/packages/wje-divider/divider.element.d.ts +0 -32
  81. package/dist/packages/wje-dropdown/dropdown.d.ts +0 -2
  82. package/dist/packages/wje-dropdown/dropdown.element.d.ts +0 -85
  83. package/dist/packages/wje-element/element.d.ts +0 -313
  84. package/dist/packages/wje-element/service/universal-service.d.ts +0 -18
  85. package/dist/packages/wje-file-upload/file-upload.d.ts +0 -2
  86. package/dist/packages/wje-file-upload/file-upload.element.d.ts +0 -191
  87. package/dist/packages/wje-file-upload/service/service.d.ts +0 -70
  88. package/dist/packages/wje-file-upload-item/file-upload-item.d.ts +0 -2
  89. package/dist/packages/wje-file-upload-item/file-upload-item.element.d.ts +0 -64
  90. package/dist/packages/wje-footer/footer.d.ts +0 -2
  91. package/dist/packages/wje-footer/footer.element.d.ts +0 -28
  92. package/dist/packages/wje-form/form.d.ts +0 -2
  93. package/dist/packages/wje-form/form.element.d.ts +0 -28
  94. package/dist/packages/wje-format-digital/format-digital.d.ts +0 -2
  95. package/dist/packages/wje-format-digital/format-digital.element.d.ts +0 -87
  96. package/dist/packages/wje-format-digital/format-digital.test.d.ts +0 -1
  97. package/dist/packages/wje-grid/grid.d.ts +0 -2
  98. package/dist/packages/wje-grid/grid.element.d.ts +0 -26
  99. package/dist/packages/wje-header/header.d.ts +0 -2
  100. package/dist/packages/wje-header/header.element.d.ts +0 -35
  101. package/dist/packages/wje-icon/icon.d.ts +0 -2
  102. package/dist/packages/wje-icon/icon.element.d.ts +0 -40
  103. package/dist/packages/wje-icon/service/service.d.ts +0 -11
  104. package/dist/packages/wje-icon-picker/icon-picker.d.ts +0 -2
  105. package/dist/packages/wje-icon-picker/icon-picker.element.d.ts +0 -197
  106. package/dist/packages/wje-img/img.d.ts +0 -2
  107. package/dist/packages/wje-img/img.element.d.ts +0 -30
  108. package/dist/packages/wje-img-comparer/img-comparer.d.ts +0 -2
  109. package/dist/packages/wje-img-comparer/img-comparer.element.d.ts +0 -60
  110. package/dist/packages/wje-img-comparer/service/service.d.ts +0 -1
  111. package/dist/packages/wje-infinite-scroll/infinite-scroll.d.ts +0 -2
  112. package/dist/packages/wje-infinite-scroll/infinite-scroll.element.d.ts +0 -134
  113. package/dist/packages/wje-input/input.d.ts +0 -2
  114. package/dist/packages/wje-input/input.element.d.ts +0 -204
  115. package/dist/packages/wje-input-file/input-file.d.ts +0 -2
  116. package/dist/packages/wje-input-file/input-file.element.d.ts +0 -50
  117. package/dist/packages/wje-item/item.d.ts +0 -2
  118. package/dist/packages/wje-item/item.element.d.ts +0 -68
  119. package/dist/packages/wje-kanban/kanban.d.ts +0 -2
  120. package/dist/packages/wje-kanban/kanban.element.d.ts +0 -183
  121. package/dist/packages/wje-label/label.d.ts +0 -2
  122. package/dist/packages/wje-label/label.element.d.ts +0 -34
  123. package/dist/packages/wje-list/list.d.ts +0 -2
  124. package/dist/packages/wje-list/list.element.d.ts +0 -31
  125. package/dist/packages/wje-main/main.d.ts +0 -2
  126. package/dist/packages/wje-main/main.element.d.ts +0 -30
  127. package/dist/packages/wje-masonry/masonry.d.ts +0 -2
  128. package/dist/packages/wje-masonry/masonry.element.d.ts +0 -114
  129. package/dist/packages/wje-masonry/service/service.d.ts +0 -32
  130. package/dist/packages/wje-menu/menu.d.ts +0 -2
  131. package/dist/packages/wje-menu/menu.element.d.ts +0 -47
  132. package/dist/packages/wje-menu-button/menu-button.d.ts +0 -2
  133. package/dist/packages/wje-menu-button/menu-button.element.d.ts +0 -34
  134. package/dist/packages/wje-menu-item/menu-item.d.ts +0 -2
  135. package/dist/packages/wje-menu-item/menu-item.element.d.ts +0 -139
  136. package/dist/packages/wje-menu-label/menu-label.d.ts +0 -2
  137. package/dist/packages/wje-menu-label/menu-label.element.d.ts +0 -39
  138. package/dist/packages/wje-option/option.d.ts +0 -2
  139. package/dist/packages/wje-option/option.element.d.ts +0 -59
  140. package/dist/packages/wje-options/options.d.ts +0 -2
  141. package/dist/packages/wje-options/options.element.d.ts +0 -183
  142. package/dist/packages/wje-orgchart/orgchart.d.ts +0 -2
  143. package/dist/packages/wje-orgchart/orgchart.element.d.ts +0 -24
  144. package/dist/packages/wje-orgchart-group/orgchart-group.d.ts +0 -2
  145. package/dist/packages/wje-orgchart-group/orgchart-group.element.d.ts +0 -28
  146. package/dist/packages/wje-orgchart-item/orgchart-item.d.ts +0 -2
  147. package/dist/packages/wje-orgchart-item/orgchart-item.element.d.ts +0 -49
  148. package/dist/packages/wje-panel/panel.d.ts +0 -2
  149. package/dist/packages/wje-panel/panel.element.d.ts +0 -34
  150. package/dist/packages/wje-popup/popup.d.ts +0 -2
  151. package/dist/packages/wje-popup/popup.element.d.ts +0 -93
  152. package/dist/packages/wje-progress-bar/progress-bar.d.ts +0 -2
  153. package/dist/packages/wje-progress-bar/progress-bar.element.d.ts +0 -96
  154. package/dist/packages/wje-qr-code/qr-code.d.ts +0 -2
  155. package/dist/packages/wje-qr-code/qr-code.element.d.ts +0 -33
  156. package/dist/packages/wje-radio/radio.d.ts +0 -2
  157. package/dist/packages/wje-radio/radio.element.d.ts +0 -53
  158. package/dist/packages/wje-radio-group/radio-group.d.ts +0 -2
  159. package/dist/packages/wje-radio-group/radio-group.element.d.ts +0 -137
  160. package/dist/packages/wje-rate/rate.d.ts +0 -2
  161. package/dist/packages/wje-rate/rate.element.d.ts +0 -156
  162. package/dist/packages/wje-relative-time/relative-time.d.ts +0 -2
  163. package/dist/packages/wje-relative-time/relative-time.element.d.ts +0 -55
  164. package/dist/packages/wje-relative-time/relative-time.test.d.ts +0 -1
  165. package/dist/packages/wje-reorder/reorder.d.ts +0 -2
  166. package/dist/packages/wje-reorder/reorder.element.d.ts +0 -119
  167. package/dist/packages/wje-reorder-dropzone/reorder-dropzone.d.ts +0 -2
  168. package/dist/packages/wje-reorder-dropzone/reorder-dropzone.element.d.ts +0 -23
  169. package/dist/packages/wje-reorder-handle/reorder-handle.d.ts +0 -2
  170. package/dist/packages/wje-reorder-handle/reorder-handle.element.d.ts +0 -75
  171. package/dist/packages/wje-reorder-item/reorder-item.d.ts +0 -2
  172. package/dist/packages/wje-reorder-item/reorder-item.element.d.ts +0 -24
  173. package/dist/packages/wje-route/route.d.ts +0 -2
  174. package/dist/packages/wje-route/route.element.d.ts +0 -22
  175. package/dist/packages/wje-router/router.d.ts +0 -2
  176. package/dist/packages/wje-router/router.element.d.ts +0 -39
  177. package/dist/packages/wje-router-link/router-link.d.ts +0 -2
  178. package/dist/packages/wje-router-link/router-link.element.d.ts +0 -31
  179. package/dist/packages/wje-router-outlet/router-outlet.d.ts +0 -2
  180. package/dist/packages/wje-router-outlet/router-outlet.element.d.ts +0 -15
  181. package/dist/packages/wje-row/row.d.ts +0 -2
  182. package/dist/packages/wje-row/row.element.d.ts +0 -23
  183. package/dist/packages/wje-select/select.d.ts +0 -2
  184. package/dist/packages/wje-select/select.element.d.ts +0 -315
  185. package/dist/packages/wje-slider/slider.d.ts +0 -2
  186. package/dist/packages/wje-slider/slider.element.d.ts +0 -103
  187. package/dist/packages/wje-split-view/service/service.d.ts +0 -1
  188. package/dist/packages/wje-split-view/split-view.d.ts +0 -2
  189. package/dist/packages/wje-split-view/split-view.element.d.ts +0 -66
  190. package/dist/packages/wje-status/status.d.ts +0 -2
  191. package/dist/packages/wje-status/status.element.d.ts +0 -26
  192. package/dist/packages/wje-step/step.d.ts +0 -2
  193. package/dist/packages/wje-step/step.element.d.ts +0 -23
  194. package/dist/packages/wje-stepper/stepper.d.ts +0 -2
  195. package/dist/packages/wje-stepper/stepper.element.d.ts +0 -78
  196. package/dist/packages/wje-store/default-store-actions.d.ts +0 -25
  197. package/dist/packages/wje-store/pubsub.d.ts +0 -21
  198. package/dist/packages/wje-store/store.d.ts +0 -153
  199. package/dist/packages/wje-tab/tab.d.ts +0 -2
  200. package/dist/packages/wje-tab/tab.element.d.ts +0 -41
  201. package/dist/packages/wje-tab-group/tab-group.d.ts +0 -2
  202. package/dist/packages/wje-tab-group/tab-group.element.d.ts +0 -67
  203. package/dist/packages/wje-tab-panel/tab-panel.d.ts +0 -2
  204. package/dist/packages/wje-tab-panel/tab-panel.element.d.ts +0 -23
  205. package/dist/packages/wje-textarea/textarea.d.ts +0 -2
  206. package/dist/packages/wje-textarea/textarea.element.d.ts +0 -176
  207. package/dist/packages/wje-thumbnail/thumbnail.d.ts +0 -2
  208. package/dist/packages/wje-thumbnail/thumbnail.element.d.ts +0 -31
  209. package/dist/packages/wje-timeline/timeline.d.ts +0 -2
  210. package/dist/packages/wje-timeline/timeline.element.d.ts +0 -25
  211. package/dist/packages/wje-timeline-item/timeline-item.d.ts +0 -2
  212. package/dist/packages/wje-timeline-item/timeline-item.element.d.ts +0 -27
  213. package/dist/packages/wje-toast/toast.d.ts +0 -2
  214. package/dist/packages/wje-toast/toast.element.d.ts +0 -173
  215. package/dist/packages/wje-toast/toast.test.d.ts +0 -1
  216. package/dist/packages/wje-toggle/toggle.d.ts +0 -2
  217. package/dist/packages/wje-toggle/toggle.element.d.ts +0 -65
  218. package/dist/packages/wje-toolbar/toolbar.d.ts +0 -2
  219. package/dist/packages/wje-toolbar/toolbar.element.d.ts +0 -39
  220. package/dist/packages/wje-toolbar-action/toolbar-action.d.ts +0 -2
  221. package/dist/packages/wje-toolbar-action/toolbar-action.element.d.ts +0 -35
  222. package/dist/packages/wje-tooltip/tooltip.d.ts +0 -2
  223. package/dist/packages/wje-tooltip/tooltip.element.d.ts +0 -71
  224. package/dist/packages/wje-visually-hidden/visually-hidden.d.ts +0 -2
  225. package/dist/packages/wje-visually-hidden/visually-hidden.element.d.ts +0 -29
  226. package/dist/popup.element-tyYxow0p.js +0 -1623
  227. package/dist/popup.element-tyYxow0p.js.map +0 -1
  228. package/dist/router-links-CJnOdbas.js +0 -150
  229. package/dist/router-links-CJnOdbas.js.map +0 -1
  230. package/dist/styles.css +0 -849
  231. package/dist/wje-accordion-item.js +0 -113
  232. package/dist/wje-accordion-item.js.map +0 -1
  233. package/dist/wje-accordion.js +0 -122
  234. package/dist/wje-accordion.js.map +0 -1
  235. package/dist/wje-animation.js +0 -4324
  236. package/dist/wje-animation.js.map +0 -1
  237. package/dist/wje-aside.js +0 -55
  238. package/dist/wje-aside.js.map +0 -1
  239. package/dist/wje-avatar.js +0 -90
  240. package/dist/wje-avatar.js.map +0 -1
  241. package/dist/wje-badge.js +0 -71
  242. package/dist/wje-badge.js.map +0 -1
  243. package/dist/wje-breadcrumb.js +0 -195
  244. package/dist/wje-breadcrumb.js.map +0 -1
  245. package/dist/wje-breadcrumbs.js +0 -140
  246. package/dist/wje-breadcrumbs.js.map +0 -1
  247. package/dist/wje-button-group.js +0 -85
  248. package/dist/wje-button-group.js.map +0 -1
  249. package/dist/wje-button.js +0 -352
  250. package/dist/wje-button.js.map +0 -1
  251. package/dist/wje-card-content.js +0 -48
  252. package/dist/wje-card-content.js.map +0 -1
  253. package/dist/wje-card-controls.js +0 -48
  254. package/dist/wje-card-controls.js.map +0 -1
  255. package/dist/wje-card-header.js +0 -48
  256. package/dist/wje-card-header.js.map +0 -1
  257. package/dist/wje-card-subtitle.js +0 -55
  258. package/dist/wje-card-subtitle.js.map +0 -1
  259. package/dist/wje-card-title.js +0 -55
  260. package/dist/wje-card-title.js.map +0 -1
  261. package/dist/wje-card.js +0 -56
  262. package/dist/wje-card.js.map +0 -1
  263. package/dist/wje-carousel-item.js +0 -63
  264. package/dist/wje-carousel-item.js.map +0 -1
  265. package/dist/wje-carousel.js +0 -380
  266. package/dist/wje-carousel.js.map +0 -1
  267. package/dist/wje-checkbox.js +0 -540
  268. package/dist/wje-checkbox.js.map +0 -1
  269. package/dist/wje-chip.js +0 -76
  270. package/dist/wje-chip.js.map +0 -1
  271. package/dist/wje-col.js +0 -38
  272. package/dist/wje-col.js.map +0 -1
  273. package/dist/wje-color-picker.js +0 -1339
  274. package/dist/wje-color-picker.js.map +0 -1
  275. package/dist/wje-container.js +0 -56
  276. package/dist/wje-container.js.map +0 -1
  277. package/dist/wje-copy-button.js +0 -218
  278. package/dist/wje-copy-button.js.map +0 -1
  279. package/dist/wje-dialog.js +0 -249
  280. package/dist/wje-dialog.js.map +0 -1
  281. package/dist/wje-divider.js +0 -55
  282. package/dist/wje-divider.js.map +0 -1
  283. package/dist/wje-dropdown.js +0 -194
  284. package/dist/wje-dropdown.js.map +0 -1
  285. package/dist/wje-element.js +0 -967
  286. package/dist/wje-element.js.map +0 -1
  287. package/dist/wje-fetchAndParseCSS.js +0 -60
  288. package/dist/wje-fetchAndParseCSS.js.map +0 -1
  289. package/dist/wje-file-upload-item.js +0 -142
  290. package/dist/wje-file-upload-item.js.map +0 -1
  291. package/dist/wje-file-upload.js +0 -551
  292. package/dist/wje-file-upload.js.map +0 -1
  293. package/dist/wje-footer.js +0 -52
  294. package/dist/wje-footer.js.map +0 -1
  295. package/dist/wje-form.js +0 -53
  296. package/dist/wje-form.js.map +0 -1
  297. package/dist/wje-format-digital.js +0 -146
  298. package/dist/wje-format-digital.js.map +0 -1
  299. package/dist/wje-grid.js +0 -54
  300. package/dist/wje-grid.js.map +0 -1
  301. package/dist/wje-header.js +0 -56
  302. package/dist/wje-header.js.map +0 -1
  303. package/dist/wje-icon-picker.js +0 -349
  304. package/dist/wje-icon-picker.js.map +0 -1
  305. package/dist/wje-icon.js +0 -191
  306. package/dist/wje-icon.js.map +0 -1
  307. package/dist/wje-img-comparer.js +0 -131
  308. package/dist/wje-img-comparer.js.map +0 -1
  309. package/dist/wje-img.js +0 -72
  310. package/dist/wje-img.js.map +0 -1
  311. package/dist/wje-infinite-scroll.js +0 -6
  312. package/dist/wje-infinite-scroll.js.map +0 -1
  313. package/dist/wje-input-file.js +0 -111
  314. package/dist/wje-input-file.js.map +0 -1
  315. package/dist/wje-input.js +0 -452
  316. package/dist/wje-input.js.map +0 -1
  317. package/dist/wje-item.js +0 -88
  318. package/dist/wje-item.js.map +0 -1
  319. package/dist/wje-kanban.js +0 -462
  320. package/dist/wje-kanban.js.map +0 -1
  321. package/dist/wje-label.js +0 -53
  322. package/dist/wje-label.js.map +0 -1
  323. package/dist/wje-list.js +0 -6
  324. package/dist/wje-list.js.map +0 -1
  325. package/dist/wje-main.js +0 -52
  326. package/dist/wje-main.js.map +0 -1
  327. package/dist/wje-masonry.js +0 -267
  328. package/dist/wje-masonry.js.map +0 -1
  329. package/dist/wje-master.js +0 -373
  330. package/dist/wje-master.js.map +0 -1
  331. package/dist/wje-menu-button.js +0 -60
  332. package/dist/wje-menu-button.js.map +0 -1
  333. package/dist/wje-menu-item.js +0 -545
  334. package/dist/wje-menu-item.js.map +0 -1
  335. package/dist/wje-menu-label.js +0 -55
  336. package/dist/wje-menu-label.js.map +0 -1
  337. package/dist/wje-menu.js +0 -72
  338. package/dist/wje-menu.js.map +0 -1
  339. package/dist/wje-option.js +0 -112
  340. package/dist/wje-option.js.map +0 -1
  341. package/dist/wje-options.js +0 -355
  342. package/dist/wje-options.js.map +0 -1
  343. package/dist/wje-orgchart-group.js +0 -72
  344. package/dist/wje-orgchart-group.js.map +0 -1
  345. package/dist/wje-orgchart-item.js +0 -98
  346. package/dist/wje-orgchart-item.js.map +0 -1
  347. package/dist/wje-orgchart.js +0 -49
  348. package/dist/wje-orgchart.js.map +0 -1
  349. package/dist/wje-popup.js +0 -6
  350. package/dist/wje-popup.js.map +0 -1
  351. package/dist/wje-progress-bar.js +0 -213
  352. package/dist/wje-progress-bar.js.map +0 -1
  353. package/dist/wje-qr-code.js +0 -2892
  354. package/dist/wje-qr-code.js.map +0 -1
  355. package/dist/wje-radio-group.js +0 -228
  356. package/dist/wje-radio-group.js.map +0 -1
  357. package/dist/wje-radio.js +0 -106
  358. package/dist/wje-radio.js.map +0 -1
  359. package/dist/wje-rate.js +0 -300
  360. package/dist/wje-rate.js.map +0 -1
  361. package/dist/wje-relative-time.js +0 -115
  362. package/dist/wje-relative-time.js.map +0 -1
  363. package/dist/wje-reorder-dropzone.js +0 -49
  364. package/dist/wje-reorder-dropzone.js.map +0 -1
  365. package/dist/wje-reorder-handle.js +0 -218
  366. package/dist/wje-reorder-handle.js.map +0 -1
  367. package/dist/wje-reorder-item.js +0 -61
  368. package/dist/wje-reorder-item.js.map +0 -1
  369. package/dist/wje-reorder.js +0 -281
  370. package/dist/wje-reorder.js.map +0 -1
  371. package/dist/wje-route.js +0 -43
  372. package/dist/wje-route.js.map +0 -1
  373. package/dist/wje-router-link.js +0 -64
  374. package/dist/wje-router-link.js.map +0 -1
  375. package/dist/wje-router-outlet.js +0 -192
  376. package/dist/wje-router-outlet.js.map +0 -1
  377. package/dist/wje-routerx.js +0 -1437
  378. package/dist/wje-routerx.js.map +0 -1
  379. package/dist/wje-row.js +0 -49
  380. package/dist/wje-row.js.map +0 -1
  381. package/dist/wje-select.js +0 -630
  382. package/dist/wje-select.js.map +0 -1
  383. package/dist/wje-slider.js +0 -221
  384. package/dist/wje-slider.js.map +0 -1
  385. package/dist/wje-sliding-container.js +0 -478
  386. package/dist/wje-sliding-container.js.map +0 -1
  387. package/dist/wje-split-view.js +0 -153
  388. package/dist/wje-split-view.js.map +0 -1
  389. package/dist/wje-status.js +0 -61
  390. package/dist/wje-status.js.map +0 -1
  391. package/dist/wje-step.js +0 -50
  392. package/dist/wje-step.js.map +0 -1
  393. package/dist/wje-stepper.js +0 -231
  394. package/dist/wje-stepper.js.map +0 -1
  395. package/dist/wje-store.js +0 -401
  396. package/dist/wje-store.js.map +0 -1
  397. package/dist/wje-tab-group.js +0 -137
  398. package/dist/wje-tab-group.js.map +0 -1
  399. package/dist/wje-tab-panel.js +0 -46
  400. package/dist/wje-tab-panel.js.map +0 -1
  401. package/dist/wje-tab.js +0 -59
  402. package/dist/wje-tab.js.map +0 -1
  403. package/dist/wje-textarea.js +0 -373
  404. package/dist/wje-textarea.js.map +0 -1
  405. package/dist/wje-thumbnail.js +0 -54
  406. package/dist/wje-thumbnail.js.map +0 -1
  407. package/dist/wje-toast.js +0 -334
  408. package/dist/wje-toast.js.map +0 -1
  409. package/dist/wje-toggle.js +0 -125
  410. package/dist/wje-toggle.js.map +0 -1
  411. package/dist/wje-toolbar-action.js +0 -72
  412. package/dist/wje-toolbar-action.js.map +0 -1
  413. package/dist/wje-toolbar.js +0 -63
  414. package/dist/wje-toolbar.js.map +0 -1
  415. package/dist/wje-tooltip.js +0 -166
  416. package/dist/wje-tooltip.js.map +0 -1
  417. package/dist/wje-visually-hidden.js +0 -55
  418. package/dist/wje-visually-hidden.js.map +0 -1
package/dist/wje-tab.js DELETED
@@ -1,59 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import WJElement, { event } from "./wje-element.js";
5
- const styles = "/*\n[ WJ Tab ]\n*/\n\n:host {\n display: block;\n position: relative;\n .native-tab {\n display: flex;\n align-items: center;\n white-space: nowrap;\n font-family: var(--wje-tab-font-family);\n font-size: var(--wje-tab-font-size);\n letter-spacing: var(--wje-tab-letter-spacing);\n text-transform: var(--wje-tab-text-transfrom);\n font-weight: var(--wje-tab-font-weight);\n text-decoration: none;\n padding-inline: var(--wje-tab-padding-inline);\n padding-top: var(--wje-tab-padding-top);\n padding-bottom: var(--wje-tab-padding-bottom);\n border-radius: var(--wje-tab-border-radius);\n color: var(--wje-color);\n line-height: var(--wje-tab-line-height);\n & > svg {\n inline-size: 1.5em;\n pointer-events: none;\n }\n\n &:hover {\n background: var(--wje-tab-color-hover);\n &:after {\n display: block;\n }\n }\n\n &:after {\n content: ' ';\n display: none;\n block-size: 0.15rem;\n writing-mode: var(--wje-tab-writing-mode);\n background: var(--wje-tab-color-active);\n position: absolute;\n bottom: var(--wje-tab-bottom);\n left: var(--wje-tab-start);\n right: var(--wje-tab-end);\n top: var(--wje-tab-top);\n }\n }\n}\n\n:host([disabled]) a {\n opacity: 0.5;\n cursor: not-allowed;\n background: inherit;\n &:after {\n display: none;\n }\n}\n\n:host([active]) a:after {\n display: block;\n}\n";
6
- class Tab extends WJElement {
7
- /**
8
- * Creates an instance of Tab.
9
- */
10
- constructor() {
11
- super();
12
- /**
13
- * The class name for the component.
14
- */
15
- __publicField(this, "className", "Tab");
16
- this.last = false;
17
- }
18
- /**
19
- * Returns the CSS styles for the component.
20
- * @static
21
- * @returns {CSSStyleSheet}
22
- */
23
- static get cssStyleSheet() {
24
- return styles;
25
- }
26
- /**
27
- * Sets up the attributes for the component.
28
- */
29
- setupAttributes() {
30
- this.isShadowRoot = "open";
31
- }
32
- /**
33
- * Draws the component for the tab.
34
- * @returns {DocumentFragment}
35
- */
36
- draw() {
37
- let fragment = document.createDocumentFragment();
38
- let slot = document.createElement("slot");
39
- let a = document.createElement("a");
40
- a.setAttribute("href", "#" + this.panel);
41
- a.setAttribute("part", "native");
42
- a.classList.add("native-tab");
43
- a.appendChild(slot);
44
- fragment.appendChild(a);
45
- return fragment;
46
- }
47
- /**
48
- * Sets up event listeners after the component is rendered.
49
- * // @fires wje-tab:change - Dispatched when the component is clicked, indicating a tab change.
50
- */
51
- afterDraw() {
52
- event.addListener(this, "click", "wje-tab:change");
53
- }
54
- }
55
- Tab.define("wje-tab", Tab);
56
- export {
57
- Tab as default
58
- };
59
- //# sourceMappingURL=wje-tab.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wje-tab.js","sources":["../packages/wje-tab/tab.element.js","../packages/wje-tab/tab.js"],"sourcesContent":["import { default as WJElement, event } from '../wje-element/element.js';\nimport styles from './styles/styles.css?inline';\n\n/**\n * `Tab` is a custom web component that represents a tab.\n * @summary This element represents a tab.\n * @documentation https://elements.webjet.sk/components/tab\n * @status stable\n * @augments {WJElement}\n * @cssproperty [--wje-tab-text-transform=uppercase] - The text transformation for the tab (e.g., uppercase, lowercase).\n * @cssproperty [--wje-tab-font-weight=500] - The font weight of the tab text.\n * @cssproperty [--wje-tab-letter-spacing=0.06em] - The letter spacing of the tab text.\n * @cssproperty [--wje-tab-padding-inline=1rem] - The horizontal padding of the tab.\n * @cssproperty [--wje-tab-padding-top=.75rem] - The top padding of the tab text.\n * @cssproperty [--wje-tab-padding-bottom=.75rem] - The bottom padding of the tab text.\n * @cssproperty [--wje-tab-color-active=var(--wje-color-primary-11)] - The text color of the active tab.\n * @cssproperty [--wje-tab-color-hover=var(--wje-color-primary-1)] - The text color of the tab when hovered.\n * //@fires wje-tab:change - Dispatched when the tab is changed.\n * @tag wje-tab\n */\nexport default class Tab extends WJElement {\n /**\n * Creates an instance of Tab.\n */\n constructor() {\n super();\n\n /**\n * Indicates whether this is the last tab.\n * @type {boolean}\n */\n this.last = false;\n }\n\n /**\n * The class name for the component.\n */\n className = 'Tab';\n\n /**\n * Returns the CSS styles for the component.\n * @static\n * @returns {CSSStyleSheet}\n */\n static get cssStyleSheet() {\n return styles;\n }\n\n /**\n * Sets up the attributes for the component.\n */\n setupAttributes() {\n this.isShadowRoot = 'open';\n }\n\n /**\n * Draws the component for the tab.\n * @returns {DocumentFragment}\n */\n draw() {\n let fragment = document.createDocumentFragment();\n\n let slot = document.createElement('slot');\n\n let a = document.createElement('a');\n a.setAttribute('href', '#' + this.panel);\n a.setAttribute('part', 'native');\n a.classList.add('native-tab');\n a.appendChild(slot);\n\n fragment.appendChild(a);\n\n return fragment;\n }\n\n /**\n * Sets up event listeners after the component is rendered.\n * // @fires wje-tab:change - Dispatched when the component is clicked, indicating a tab change.\n */\n afterDraw() {\n event.addListener(this, 'click', 'wje-tab:change');\n }\n}\n","import Tab from './tab.element.js';\n\nexport default Tab;\n\nTab.define('wje-tab', Tab);\n"],"names":[],"mappings":";;;;;AAoBe,MAAM,YAAY,UAAU;AAAA;AAAA;AAAA;AAAA,EAIvC,cAAc;AACV,UAAO;AAYX;AAAA;AAAA;AAAA,qCAAY;AANR,SAAK,OAAO;AAAA,EACpB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYI,WAAW,gBAAgB;AACvB,WAAO;AAAA,EACf;AAAA;AAAA;AAAA;AAAA,EAKI,kBAAkB;AACd,SAAK,eAAe;AAAA,EAC5B;AAAA;AAAA;AAAA;AAAA;AAAA,EAMI,OAAO;AACH,QAAI,WAAW,SAAS,uBAAwB;AAEhD,QAAI,OAAO,SAAS,cAAc,MAAM;AAExC,QAAI,IAAI,SAAS,cAAc,GAAG;AAClC,MAAE,aAAa,QAAQ,MAAM,KAAK,KAAK;AACvC,MAAE,aAAa,QAAQ,QAAQ;AAC/B,MAAE,UAAU,IAAI,YAAY;AAC5B,MAAE,YAAY,IAAI;AAElB,aAAS,YAAY,CAAC;AAEtB,WAAO;AAAA,EACf;AAAA;AAAA;AAAA;AAAA;AAAA,EAMI,YAAY;AACR,UAAM,YAAY,MAAM,SAAS,gBAAgB;AAAA,EACzD;AACA;AC9EA,IAAI,OAAO,WAAW,GAAG;"}
@@ -1,373 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import WJElement, { event } from "./wje-element.js";
5
- const styles = "/*\n[ WJ Textarea ]\n*/\n\n:host {\n width: 100%;\n margin-bottom: var(--wje-textarea-margin-bottom);\n display: block;\n .wrapper {\n display: flex;\n width: 100%;\n border-width: var(--wje-textarea-border-width);\n border-style: var(--wje-textarea-border-style);\n border-color: var(--wje-textarea-border-color);\n border-radius: var(--wje-textarea-border-radius);\n box-sizing: border-box;\n }\n textarea {\n font-family: var(--wje-textarea-font-family);\n color: var(--wje-textarea-color);\n font-size: 14px;\n border: 0 none;\n padding: 0 var(--wje-textarea-padding);\n &:focus {\n outline: none;\n }\n }\n}\n\n:host([invalid]) {\n .error-message {\n display: block;\n }\n .default {\n label {\n opacity: 1 !important;\n color: var(--wje-input-color-invalid) !important;\n animation-name: shake;\n animation-duration: 0.4s;\n animation-iteration-count: 1;\n }\n }\n}\n\n:host([required]) .input-wrapper::after {\n color: var(--wje-input-color-invalid);\n content: '*';\n font-family: var(--wje-force-mac-font-family);\n font-size: 20px;\n position: absolute;\n right: 0;\n top: 0;\n}\n\n:host([required]) .standard .input-wrapper::after {\n top: 0;\n}\n\n:host([resize='auto']) textarea,\n:host([resize='none']) textarea {\n resize: none;\n}\n\n.native-textarea {\n .input-wrapper {\n width: 100%;\n line-height: normal;\n }\n &.default {\n background-color: var(--wje-textarea-background-color);\n font-family: var(--wje-textarea-font-family);\n position: relative;\n padding-inline: 0;\n padding-top: 0;\n transition: background-color 0.2s ease;\n cursor: text;\n &.focused {\n .wrapper {\n border-color: var(--wje-textarea-border-color-focus) !important;\n }\n label {\n opacity: 0.67;\n font-size: 12px;\n letter-spacing: normal;\n }\n }\n textarea {\n border: none;\n padding-top: 0;\n background: none;\n box-shadow: none;\n width: calc(100% - var(--wje-textarea-padding) * 2);\n max-width: calc(100% - var(--wje-textarea-padding) * 2);\n min-width: calc(100% - var(--wje-textarea-padding) * 2);\n }\n label {\n padding: 0 var(--wje-textarea-padding);\n display: block;\n opacity: 1;\n cursor: text;\n transition: opacity 0.2s ease;\n line-height: var(--wje-textarea-line-height);\n padding-top: 0.25rem;\n &.fade {\n opacity: 0.5;\n font-size: 12px;\n letter-spacing: normal;\n }\n }\n ::slotted([slot='start']) {\n border-left: none;\n border-top: none;\n border-bottom: none;\n }\n\n ::slotted([slot='end']) {\n border-right: none;\n border-top: none;\n border-bottom: none;\n }\n }\n &.standard {\n font-family: var(--wje-textarea-font-family);\n position: relative;\n border-radius: var(--wje-textarea-border-radius);\n padding: 0;\n transition: background-color 0.2s ease;\n cursor: text;\n &.focused {\n .wrapper {\n border-color: var(--wje-textarea-border-color-focus) !important;\n }\n }\n textarea {\n background-color: var(--wje-textarea-background-color);\n display: block;\n min-height: 32px;\n box-shadow: none;\n width: 100%;\n box-sizing: border-box;\n border-radius: var(--wje-textarea-border-radius);\n }\n label {\n margin: 0;\n display: inline-block;\n opacity: 1;\n cursor: text;\n transition: opacity 0.2s ease;\n line-height: var(--wje-textarea-line-height);\n }\n ::slotted([slot='start']) {\n border-right: none;\n border-radius: var(--wje-textarea-border-radius) 0 0 var(--wje-textarea-border-radius);\n }\n\n ::slotted([slot='end']) {\n border-left: none;\n border-radius: 0 var(--wje-textarea-border-radius) var(--wje-textarea-border-radius) 0;\n }\n\n &.has-start textarea {\n border-top-left-radius: 0;\n border-bottom-left-radius: 0;\n }\n\n &.has-end textarea {\n border-top-right-radius: 0;\n border-bottom-right-radius: 0;\n }\n .error-message {\n position: static;\n background: transparent;\n padding: 0.25rem 0;\n left: auto;\n transform: none;\n color: var(--wje-textarea-color-invalid);\n font-size: 12px;\n line-height: normal;\n }\n }\n}\n\n.counter {\n float: right;\n}\n\n@keyframes shake {\n 8%,\n 41% {\n transform: translateX(-4px);\n }\n 25%,\n 58% {\n transform: translateX(4px);\n }\n 75% {\n transform: translateX(-2px);\n }\n 92% {\n transform: translateX(2px);\n }\n 0%,\n 100% {\n transform: translateX(0);\n }\n}\n";
6
- class Textarea extends WJElement {
7
- /**
8
- * Creates an instance of Textarea.
9
- * @class
10
- */
11
- constructor() {
12
- super();
13
- __publicField(this, "observeFunction", (mutations) => {
14
- mutations.forEach((mutation) => {
15
- if (mutation.type === "attributes") {
16
- const attributeName = mutation.attributeName;
17
- const oldValue = mutation.oldValue;
18
- const newValue = this.getAttribute(attributeName);
19
- console.log(`Attribute ${attributeName} changed from ${oldValue} to ${newValue}`);
20
- }
21
- });
22
- this.refresh();
23
- });
24
- __publicField(this, "className", "Textarea");
25
- /**
26
- * Sets the height of the textarea.
27
- */
28
- __publicField(this, "setTextareaHeight", () => {
29
- if (this.getAttribute("resize") === "auto") {
30
- this.input.style.height = "auto";
31
- this.input.style.height = this.input.scrollHeight + "px";
32
- }
33
- });
34
- /**
35
- * Updates the counter for the textarea.
36
- * @param {Event} e The event object.
37
- */
38
- __publicField(this, "counterFn", (e) => {
39
- this.counterElement.innerText = e.target.value.length + "/" + this.input.maxLength;
40
- });
41
- this.invalid = false;
42
- this.pristine = true;
43
- this.internals = this.attachInternals();
44
- this.observer = new MutationObserver(this.observeFunction);
45
- }
46
- /**
47
- * Setter for the value attribute.
48
- * @param {string} value The value to set.
49
- */
50
- set value(value) {
51
- this.internals.setFormValue(value);
52
- if (this.input) this.input.value = value;
53
- this.pristine = false;
54
- this._value = value;
55
- }
56
- /**
57
- * Getter for the value attribute.
58
- * @returns {string} The value of the attribute.
59
- */
60
- get value() {
61
- var _a;
62
- return ((_a = this.input) == null ? void 0 : _a.value) ?? this._value ?? "";
63
- }
64
- /**
65
- * Getter for the invalid attribute.
66
- * @returns {boolean} Whether the attribute is present.
67
- */
68
- get invalid() {
69
- return this.hasAttribute("invalid");
70
- }
71
- /**
72
- * Setter for the invalid attribute.
73
- * @param {boolean} isInvalid Whether the input is invalid.
74
- */
75
- set invalid(isInvalid) {
76
- if (isInvalid) this.setAttribute("invalid", "");
77
- else this.removeAttribute("invalid");
78
- }
79
- /**
80
- * Getter for the form attribute.
81
- * @returns {HTMLFormElement} The form the input is associated with.
82
- */
83
- get form() {
84
- return this.internals.form;
85
- }
86
- /**
87
- * Getter for the name attribute.
88
- * @returns {string} The name of the input.
89
- */
90
- get name() {
91
- return this.getAttribute("name");
92
- }
93
- /**
94
- * Getter for the type attribute.
95
- * @returns {string} The type of the input.
96
- */
97
- get type() {
98
- return this.localName;
99
- }
100
- /**
101
- * Getter for the validity attribute.
102
- * @returns {ValidityState} The validity state of the input.
103
- */
104
- get validity() {
105
- return this.internals.validity;
106
- }
107
- /**
108
- * Getter for the validationMessage attribute.
109
- * @returns {string} The validation message of the input.
110
- */
111
- get validationMessage() {
112
- return this.internals.validationMessage;
113
- }
114
- /**
115
- * Getter for the willValidate attribute.
116
- * @returns {boolean} Whether the input will be validated.
117
- */
118
- get willValidate() {
119
- return this.internals.willValidate;
120
- }
121
- /**
122
- * Returns the CSS styles for the component.
123
- * @static
124
- * @returns {CSSStyleSheet} The CSS stylesheet
125
- */
126
- static get cssStyleSheet() {
127
- return styles;
128
- }
129
- /**
130
- * Returns the list of attributes to observe for changes.
131
- * @static
132
- * @returns {Array<string>}
133
- */
134
- static get observedAttributes() {
135
- return [];
136
- }
137
- set placeholder(value) {
138
- this.setAttribute("placeholder", value);
139
- }
140
- get placeholder() {
141
- return this.getAttribute("placeholder");
142
- }
143
- /**
144
- * Sets up the attributes for the component.
145
- */
146
- setupAttributes() {
147
- this.isShadowRoot = "open";
148
- if (this.pristine) {
149
- this.value = this.innerHTML;
150
- this.pristine = false;
151
- }
152
- }
153
- beforeDraw() {
154
- this.observer.disconnect();
155
- }
156
- /**
157
- * Draws the component for the textarea.
158
- * @returns {DocumentFragment}
159
- */
160
- draw() {
161
- let fragment = document.createDocumentFragment();
162
- let native = document.createElement("div");
163
- native.classList.add("native-textarea", this.variant || "default");
164
- native.setAttribute("part", "native");
165
- if (this.hasAttribute("invalid")) native.classList.add("has-error");
166
- let wrapper = document.createElement("div");
167
- wrapper.setAttribute("part", "wrapper");
168
- wrapper.classList.add("wrapper");
169
- let inputWrapper = document.createElement("div");
170
- inputWrapper.classList.add("input-wrapper");
171
- let label = document.createElement("label");
172
- label.htmlFor = "textarea";
173
- label.innerHTML = this.label || "";
174
- let input = document.createElement("textarea");
175
- input.id = "textarea";
176
- input.name = this.name;
177
- input.disabled = this.hasAttribute("disabled");
178
- input.innerText = this.value;
179
- input.placeholder = this.placeholder || "";
180
- input.classList.add("form-control");
181
- input.setAttribute("part", "input");
182
- input.setAttribute("rows", this.rows || 3);
183
- input.setAttribute("spellcheck", false);
184
- const attributes = Array.from(this.attributes).map((attr) => attr.name);
185
- attributes.forEach((attr) => {
186
- if (this.hasAttribute(attr)) {
187
- input.setAttribute(attr, this[attr] || "");
188
- }
189
- });
190
- if (this.resize === "auto") input.addEventListener("input", this.setTextareaHeight);
191
- if (this.variant === "standard") {
192
- if (this.label) native.appendChild(label);
193
- } else {
194
- inputWrapper.appendChild(label);
195
- }
196
- inputWrapper.appendChild(input);
197
- wrapper.appendChild(inputWrapper);
198
- native.appendChild(wrapper);
199
- fragment.appendChild(native);
200
- if (this.hasAttribute("counter")) {
201
- input.maxLength = this.maxLength || 1e3;
202
- input.addEventListener("input", this.counterFn);
203
- let counter = document.createElement("div");
204
- counter.classList.add("counter");
205
- counter.innerText = `${input.value.length}/${input.maxLength}`;
206
- this.counterElement = counter;
207
- fragment.appendChild(counter);
208
- }
209
- this.native = native;
210
- this.labelElement = label;
211
- this.input = input;
212
- return fragment;
213
- }
214
- /**
215
- * Sets up the event listeners after the component is drawn.
216
- */
217
- afterDraw() {
218
- this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight);
219
- if (!this.hasAttribute("disabled")) {
220
- event.addListener(this, "click", "wje:textarea:change");
221
- event.addListener(this, "click", "wje:textarea:input");
222
- }
223
- this.input.addEventListener("focus", (e) => {
224
- this.labelElement.classList.add("fade");
225
- this.native.classList.add("focused");
226
- });
227
- this.input.addEventListener("blur", (e) => {
228
- this.native.classList.remove("focused");
229
- if (!e.target.value) this.labelElement.classList.remove("fade");
230
- });
231
- this.addEventListener("invalid", (e) => {
232
- this.invalid = true;
233
- this.pristine = false;
234
- this.showInvalidMessage();
235
- if (this.customErrorDisplay) {
236
- e.preventDefault();
237
- }
238
- });
239
- this.input.addEventListener("input", (e) => {
240
- this.validateInput();
241
- if (this.validateOnChange) {
242
- this.pristine = false;
243
- this.propagateValidation();
244
- }
245
- this.input.classList.remove("pristine");
246
- this.labelElement.classList.add("fade");
247
- const clone = new e.constructor(e.type, e);
248
- this.dispatchEvent(clone);
249
- event.dispatchCustomEvent(this, "wje-textarea:input", {
250
- value: this.input.value
251
- });
252
- this.value = this.input.value;
253
- });
254
- this.validateInput();
255
- this.observer.observe(this, {
256
- attributes: true,
257
- // Watch for attribute changes
258
- attributeOldValue: true
259
- // Keep track of the old value of attributes
260
- });
261
- }
262
- componentCleanup() {
263
- this.observer.disconnect();
264
- }
265
- /**
266
- * Disconnects the component.
267
- */
268
- beforeDisconnect() {
269
- this.resizeObserver.unobserve(this.input);
270
- }
271
- /**
272
- * @summary Validates the input.
273
- * This method checks the validity state of the input. If the input is not valid, it iterates over the validity state object.
274
- * For each invalid state, it constructs an attribute name and checks if the input has this attribute.
275
- * If the input has the attribute, it sets the validation error to the state and the error message to the attribute value.
276
- * If the input does not have the attribute, it sets the error message to the default validation message of the input.
277
- * It then sets the validity in the form internals to an object with the validation error as key and true as value, and the error message.
278
- * If the input is valid, it sets the validity in the form internals to an empty object.
279
- */
280
- validateInput() {
281
- const validState = this.input.validity;
282
- if (!validState.valid) {
283
- for (let state in validState) {
284
- const attr = `message-${state.toString()}`;
285
- if (validState[state]) {
286
- this.validationError = state.toString();
287
- let errorMessage = this.message;
288
- if (!this.hasAttribute("message"))
289
- errorMessage = this.hasAttribute(attr) ? this.getAttribute(attr) : this.input.validationMessage;
290
- this.internals.setValidity({ [this.validationError]: true }, errorMessage);
291
- }
292
- }
293
- } else {
294
- this.internals.setValidity({});
295
- }
296
- }
297
- /**
298
- * @summary Propagates the validation state of the input.
299
- * This method sets the 'invalid' property of the input based on its 'pristine' state and its internal validity state.
300
- * If the input is invalid and the 'customErrorDisplay' property is true, it dispatches an 'invalid' event.
301
- */
302
- propagateValidation() {
303
- this.invalid = !this.pristine && !this.internals.validity.valid;
304
- if (this.invalid && this.customErrorDisplay) {
305
- this.dispatchEvent(new Event("invalid"));
306
- }
307
- }
308
- /**
309
- * @summary Callback function that is called when the custom element is associated with a form.
310
- * This function adds an event listener to the form's submit event, which validates the input and propagates the validation.
311
- * @param {HTMLFormElement} form The form the custom element is associated with.
312
- */
313
- formAssociatedCallback(form) {
314
- this.internals.setFormValue(this.value);
315
- form == null ? void 0 : form.addEventListener("submit", () => {
316
- this.validateInput();
317
- this.propagateValidation();
318
- });
319
- }
320
- /**
321
- * The formResetCallback method is a built-in lifecycle callback that gets called when a form gets reset.
322
- * This method is responsible for resetting the value of the custom input element to its default value.
323
- * It also resets the form value and validity state in the form internals.
324
- * @function
325
- */
326
- formResetCallback() {
327
- this.value = this.defaultValue;
328
- this.internals.setFormValue(this.defaultValue);
329
- this.internals.setValidity({});
330
- }
331
- /**
332
- * The formStateRestoreCallback method is a built-in lifecycle callback that gets called when the state of a form-associated custom element is restored.
333
- * This method is responsible for restoring the value of the custom input element to its saved state.
334
- * It also restores the form value and validity state in the form internals to their saved states.
335
- * @param {object} state The saved state of the custom input element.
336
- * @function
337
- */
338
- formStateRestoreCallback(state) {
339
- this.value = state.value;
340
- this.internals.setFormValue(state.value);
341
- this.internals.setValidity({});
342
- }
343
- /**
344
- * The formStateSaveCallback method is a built-in lifecycle callback that gets called when the state of a form-associated custom element is saved.
345
- * This method is responsible for saving the value of the custom input element.
346
- * @returns {object} The saved state of the custom input element.
347
- * @function
348
- */
349
- formStateSaveCallback() {
350
- return {
351
- value: this.value
352
- };
353
- }
354
- /**
355
- * The formDisabledCallback method is a built-in lifecycle callback that gets called when the disabled state of a form-associated custom element changes.
356
- * This method is not implemented yet.
357
- * @param {boolean} disabled The new disabled state of the custom input element.
358
- * @function
359
- */
360
- formDisabledCallback(disabled) {
361
- console.warn("formDisabledCallback not implemented yet");
362
- }
363
- }
364
- /**
365
- * Whether the input is associated with a form.
366
- * @type {boolean}
367
- */
368
- __publicField(Textarea, "formAssociated", true);
369
- Textarea.define("wje-textarea", Textarea);
370
- export {
371
- Textarea as default
372
- };
373
- //# sourceMappingURL=wje-textarea.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wje-textarea.js","sources":["../packages/wje-textarea/textarea.element.js","../packages/wje-textarea/textarea.js"],"sourcesContent":["import { default as WJElement, event } from '../wje-element/element.js';\nimport styles from './styles/styles.css?inline';\n\n/**\n * `Textarea` is a custom web component that represents a textarea input.\n * @summary This element represents a textarea input.\n * @documentation https://elements.webjet.sk/components/textarea\n * @status stable\n * @augments WJElement\n * @csspart native - The native textarea wrapper.\n * @csspart input - The textarea input.\n * @csspart wrapper - The textarea wrapper.\n * @cssproperty [--wje-textarea-font-family=var(--wje-font-family)] - Specifies the font family used for the textarea. Accepts any valid CSS font-family value.\n * @cssproperty [--wje-textarea-background-color=var(--wje-background)] - Sets the background color of the textarea. Accepts any valid CSS color value.\n * @cssproperty [--wje-textarea-color=var(--wje-color)] - Defines the text color within the textarea. Accepts any valid CSS color value.\n * @cssproperty [--wje-textarea-color-invalid=var(--wje-color-danger)] - Changes the text color of the textarea when it is invalid. Useful for highlighting validation errors.\n * @cssproperty [--wje-textarea-border-width=1px] - Specifies the width of the textarea's border. Accepts any valid CSS length unit.\n * @cssproperty [--wje-textarea-border-style=solid] - Sets the style of the textarea's border. Accepts standard CSS border styles such as `solid`, `dashed`, or `dotted`.\n * @cssproperty [--wje-textarea-border-color=var(--wje-border-color)] - Defines the border color of the textarea. Accepts any valid CSS color value.\n * @cssproperty [--wje-textarea-border-color-focus=var(--wje-color-primary)] - Specifies the border color of the textarea when it is focused. Enhances the user experience by providing visual feedback.\n * @cssproperty [--wje-textarea-border-radius=4px] - Determines the border radius of the textarea, defining how rounded its corners are. Accepts any valid CSS length unit.\n * @cssproperty [--wje-textarea-margin-bottom=.5rem] - Sets the bottom margin of the textarea. Ensures spacing between the textarea and other elements.\n * @cssproperty [--wje-textarea-line-height=20px] - Specifies the line height of the text within the textarea. Helps control the vertical spacing of the text.\n * @cssproperty [--wje-textarea-padding=0.5rem] - Defines the padding inside the textarea. Controls the spacing between the content and the border.\n * @tag wje-textarea\n */\n\nexport default class Textarea extends WJElement {\n /**\n * Creates an instance of Textarea.\n * @class\n */\n constructor() {\n super();\n\n this.invalid = false;\n this.pristine = true;\n this.internals = this.attachInternals();\n this.observer = new MutationObserver(this.observeFunction);\n }\n\n observeFunction = (mutations) => {\n mutations.forEach((mutation) => {\n if (mutation.type === 'attributes') {\n const attributeName = mutation.attributeName;\n const oldValue = mutation.oldValue;\n const newValue = this.getAttribute(attributeName);\n\n console.log(`Attribute ${attributeName} changed from ${oldValue} to ${newValue}`);\n }\n });\n\n this.refresh();\n };\n\n /**\n * Setter for the value attribute.\n * @param {string} value The value to set.\n */\n set value(value) {\n this.internals.setFormValue(value);\n\n if (this.input) this.input.value = value;\n\n this.pristine = false;\n this._value = value;\n }\n\n /**\n * Getter for the value attribute.\n * @returns {string} The value of the attribute.\n */\n get value() {\n return this.input?.value ?? this._value ?? '';\n }\n\n /**\n * Getter for the invalid attribute.\n * @returns {boolean} Whether the attribute is present.\n */\n get invalid() {\n return this.hasAttribute('invalid');\n }\n\n /**\n * Setter for the invalid attribute.\n * @param {boolean} isInvalid Whether the input is invalid.\n */\n set invalid(isInvalid) {\n if (isInvalid) this.setAttribute('invalid', '');\n else this.removeAttribute('invalid');\n }\n\n /**\n * Getter for the form attribute.\n * @returns {HTMLFormElement} The form the input is associated with.\n */\n get form() {\n return this.internals.form;\n }\n\n /**\n * Getter for the name attribute.\n * @returns {string} The name of the input.\n */\n get name() {\n return this.getAttribute('name');\n }\n\n /**\n * Getter for the type attribute.\n * @returns {string} The type of the input.\n */\n get type() {\n return this.localName;\n }\n\n /**\n * Getter for the validity attribute.\n * @returns {ValidityState} The validity state of the input.\n */\n get validity() {\n return this.internals.validity;\n }\n\n /**\n * Getter for the validationMessage attribute.\n * @returns {string} The validation message of the input.\n */\n get validationMessage() {\n return this.internals.validationMessage;\n }\n\n /**\n * Getter for the willValidate attribute.\n * @returns {boolean} Whether the input will be validated.\n */\n get willValidate() {\n return this.internals.willValidate;\n }\n\n className = 'Textarea';\n\n /**\n * Returns the CSS styles for the component.\n * @static\n * @returns {CSSStyleSheet} The CSS stylesheet\n */\n static get cssStyleSheet() {\n return styles;\n }\n\n /**\n * Whether the input is associated with a form.\n * @type {boolean}\n */\n static formAssociated = true;\n\n /**\n * Returns the list of attributes to observe for changes.\n * @static\n * @returns {Array<string>}\n */\n static get observedAttributes() {\n return [];\n }\n\n set placeholder(value) {\n this.setAttribute('placeholder', value);\n }\n\n get placeholder() {\n return this.getAttribute('placeholder');\n }\n\n /**\n * Sets up the attributes for the component.\n */\n setupAttributes() {\n this.isShadowRoot = 'open';\n\n // if some value was set via value setter then don't use default value\n if (this.pristine) {\n this.value = this.innerHTML;\n this.pristine = false;\n }\n }\n\n beforeDraw() {\n this.observer.disconnect();\n }\n\n /**\n * Draws the component for the textarea.\n * @returns {DocumentFragment}\n */\n draw() {\n let fragment = document.createDocumentFragment();\n\n let native = document.createElement('div');\n native.classList.add('native-textarea', this.variant || 'default');\n native.setAttribute('part', 'native');\n\n if (this.hasAttribute('invalid')) native.classList.add('has-error');\n\n let wrapper = document.createElement('div');\n wrapper.setAttribute('part', 'wrapper');\n wrapper.classList.add('wrapper');\n\n let inputWrapper = document.createElement('div');\n inputWrapper.classList.add('input-wrapper');\n\n let label = document.createElement('label');\n label.htmlFor = 'textarea';\n label.innerHTML = this.label || '';\n\n let input = document.createElement('textarea');\n input.id = 'textarea';\n input.name = this.name;\n input.disabled = this.hasAttribute('disabled');\n input.innerText = this.value;\n input.placeholder = this.placeholder || '';\n input.classList.add('form-control');\n input.setAttribute('part', 'input');\n input.setAttribute('rows', this.rows || 3);\n input.setAttribute('spellcheck', false);\n\n const attributes = Array.from(this.attributes).map((attr) => attr.name);\n\n attributes.forEach((attr) => {\n if (this.hasAttribute(attr)) {\n input.setAttribute(attr, this[attr] || '');\n }\n });\n\n if (this.resize === 'auto') input.addEventListener('input', this.setTextareaHeight);\n\n if (this.variant === 'standard') {\n if (this.label) native.appendChild(label);\n } else {\n inputWrapper.appendChild(label);\n }\n\n inputWrapper.appendChild(input);\n\n wrapper.appendChild(inputWrapper);\n\n native.appendChild(wrapper);\n\n fragment.appendChild(native);\n\n if (this.hasAttribute('counter')) {\n input.maxLength = this.maxLength || 1000;\n input.addEventListener('input', this.counterFn);\n\n let counter = document.createElement('div');\n counter.classList.add('counter');\n counter.innerText = `${input.value.length}/${input.maxLength}`;\n\n this.counterElement = counter;\n fragment.appendChild(counter);\n }\n\n this.native = native;\n this.labelElement = label;\n this.input = input;\n\n return fragment;\n }\n\n /**\n * Sets up the event listeners after the component is drawn.\n */\n afterDraw() {\n this.resizeObserver = new ResizeObserver(() => this.setTextareaHeight);\n\n if (!this.hasAttribute('disabled')) {\n event.addListener(this, 'click', 'wje:textarea:change');\n event.addListener(this, 'click', 'wje:textarea:input');\n }\n\n this.input.addEventListener('focus', (e) => {\n this.labelElement.classList.add('fade');\n this.native.classList.add('focused');\n });\n\n this.input.addEventListener('blur', (e) => {\n this.native.classList.remove('focused');\n if (!e.target.value) this.labelElement.classList.remove('fade');\n });\n\n this.addEventListener('invalid', (e) => {\n this.invalid = true;\n this.pristine = false;\n\n this.showInvalidMessage();\n\n if (this.customErrorDisplay) {\n e.preventDefault();\n }\n });\n\n this.input.addEventListener('input', (e) => {\n this.validateInput();\n\n if (this.validateOnChange) {\n this.pristine = false;\n this.propagateValidation();\n }\n\n this.input.classList.remove('pristine');\n this.labelElement.classList.add('fade');\n\n const clone = new e.constructor(e.type, e);\n this.dispatchEvent(clone);\n\n event.dispatchCustomEvent(this, 'wje-textarea:input', {\n value: this.input.value,\n });\n\n this.value = this.input.value;\n });\n\n this.validateInput();\n\n this.observer.observe(this, {\n attributes: true, // Watch for attribute changes\n attributeOldValue: true, // Keep track of the old value of attributes\n });\n }\n\n componentCleanup() {\n this.observer.disconnect();\n }\n\n /**\n * Disconnects the component.\n */\n beforeDisconnect() {\n this.resizeObserver.unobserve(this.input);\n }\n\n /**\n * Sets the height of the textarea.\n */\n setTextareaHeight = () => {\n if (this.getAttribute('resize') === 'auto') {\n this.input.style.height = 'auto';\n this.input.style.height = this.input.scrollHeight + 'px';\n }\n };\n\n /**\n * Updates the counter for the textarea.\n * @param {Event} e The event object.\n */\n counterFn = (e) => {\n this.counterElement.innerText = e.target.value.length + '/' + this.input.maxLength;\n };\n\n /**\n * @summary Validates the input.\n * This method checks the validity state of the input. If the input is not valid, it iterates over the validity state object.\n * For each invalid state, it constructs an attribute name and checks if the input has this attribute.\n * If the input has the attribute, it sets the validation error to the state and the error message to the attribute value.\n * If the input does not have the attribute, it sets the error message to the default validation message of the input.\n * It then sets the validity in the form internals to an object with the validation error as key and true as value, and the error message.\n * If the input is valid, it sets the validity in the form internals to an empty object.\n */\n validateInput() {\n const validState = this.input.validity;\n\n if (!validState.valid) {\n for (let state in validState) {\n const attr = `message-${state.toString()}`;\n\n if (validState[state]) {\n this.validationError = state.toString();\n let errorMessage = this.message;\n\n // TODO this take error messages based on lang from operating system of user should we implement custom translations based on app language ?\n if (!this.hasAttribute('message'))\n errorMessage = this.hasAttribute(attr) ? this.getAttribute(attr) : this.input.validationMessage;\n\n this.internals.setValidity({ [this.validationError]: true }, errorMessage);\n }\n }\n } else {\n this.internals.setValidity({});\n }\n }\n\n /**\n * @summary Propagates the validation state of the input.\n * This method sets the 'invalid' property of the input based on its 'pristine' state and its internal validity state.\n * If the input is invalid and the 'customErrorDisplay' property is true, it dispatches an 'invalid' event.\n */\n propagateValidation() {\n this.invalid = !this.pristine && !this.internals.validity.valid;\n\n if (this.invalid && this.customErrorDisplay) {\n this.dispatchEvent(new Event('invalid'));\n }\n }\n\n /**\n * @summary Callback function that is called when the custom element is associated with a form.\n * This function adds an event listener to the form's submit event, which validates the input and propagates the validation.\n * @param {HTMLFormElement} form The form the custom element is associated with.\n */\n formAssociatedCallback(form) {\n this.internals.setFormValue(this.value);\n form?.addEventListener('submit', () => {\n this.validateInput();\n this.propagateValidation();\n });\n }\n\n /**\n * The formResetCallback method is a built-in lifecycle callback that gets called when a form gets reset.\n * This method is responsible for resetting the value of the custom input element to its default value.\n * It also resets the form value and validity state in the form internals.\n * @function\n */\n formResetCallback() {\n // Set the value of the custom input element to its default value\n this.value = this.defaultValue;\n // Reset the form value in the form internals to the default value\n this.internals.setFormValue(this.defaultValue);\n // Reset the validity state in the form internals\n this.internals.setValidity({});\n }\n\n /**\n * The formStateRestoreCallback method is a built-in lifecycle callback that gets called when the state of a form-associated custom element is restored.\n * This method is responsible for restoring the value of the custom input element to its saved state.\n * It also restores the form value and validity state in the form internals to their saved states.\n * @param {object} state The saved state of the custom input element.\n * @function\n */\n formStateRestoreCallback(state) {\n // Set the value of the custom input element to its saved value\n this.value = state.value;\n // Restore the form value in the form internals to the saved value\n this.internals.setFormValue(state.value);\n // Restore the validity state in the form internals to the saved state\n this.internals.setValidity({});\n }\n\n /**\n * The formStateSaveCallback method is a built-in lifecycle callback that gets called when the state of a form-associated custom element is saved.\n * This method is responsible for saving the value of the custom input element.\n * @returns {object} The saved state of the custom input element.\n * @function\n */\n formStateSaveCallback() {\n return {\n value: this.value,\n };\n }\n\n /**\n * The formDisabledCallback method is a built-in lifecycle callback that gets called when the disabled state of a form-associated custom element changes.\n * This method is not implemented yet.\n * @param {boolean} disabled The new disabled state of the custom input element.\n * @function\n */\n formDisabledCallback(disabled) {\n console.warn('formDisabledCallback not implemented yet');\n }\n}\n","import Textarea from './textarea.element.js';\n\nexport default Textarea;\n\nTextarea.define('wje-textarea', Textarea);\n"],"names":[],"mappings":";;;;;AA2Be,MAAM,iBAAiB,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,EAK5C,cAAc;AACV,UAAO;AAQX,2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AAA,IACnD;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOI,uBAAuB,MAAM;AACzB,SAAK,UAAU,aAAa,KAAK,KAAK;AACtC,iCAAM,iBAAiB,UAAU,MAAM;AACnC,WAAK,cAAe;AACpB,WAAK,oBAAqB;AAAA,IACtC;AAAA,EACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQI,oBAAoB;AAEhB,SAAK,QAAQ,KAAK;AAElB,SAAK,UAAU,aAAa,KAAK,YAAY;AAE7C,SAAK,UAAU,YAAY,EAAE;AAAA,EACrC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASI,yBAAyB,OAAO;AAE5B,SAAK,QAAQ,MAAM;AAEnB,SAAK,UAAU,aAAa,MAAM,KAAK;AAEvC,SAAK,UAAU,YAAY,EAAE;AAAA,EACrC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQI,wBAAwB;AACpB,WAAO;AAAA,MACH,OAAO,KAAK;AAAA,IACf;AAAA,EACT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQI,qBAAqB,UAAU;AAC3B,YAAQ,KAAK,0CAA0C;AAAA,EAC/D;AACA;AAAA;AAAA;AAAA;AAAA;AA1TI,cAjIiB,UAiIV,kBAAiB;ACxJ5B,SAAS,OAAO,gBAAgB,QAAQ;"}
@@ -1,54 +0,0 @@
1
- var __defProp = Object.defineProperty;
2
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
- var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
- import WJElement from "./wje-element.js";
5
- const styles = "/*\n[ WJ Thumbnail ]\n*/\n\n:host {\n width: var(--wje-thumbnail-width);\n height: var(--wje-thumbnail-height);\n display: block;\n border-radius: var(--wje-border-radius);\n}\n\n:host([circle]) ::slotted(img) {\n border-radius: 50%;\n}\n::slotted(wje-img),\n::slotted(img) {\n border-radius: var(--wje-thumbnail-border-radius);\n width: 100%;\n height: 100%;\n object-fit: cover;\n overflow: hidden;\n}\n";
6
- class Thumbnail extends WJElement {
7
- /**
8
- * Creates an instance of Thumbnail.
9
- */
10
- constructor() {
11
- super();
12
- /**
13
- * The class name for the component
14
- */
15
- __publicField(this, "className", "Thumbnail");
16
- }
17
- /**
18
- * Returns the CSS stylesheet for the component.
19
- * @static
20
- * @returns {CSSStyleSheet} The CSS stylesheet
21
- */
22
- static get cssStyleSheet() {
23
- return styles;
24
- }
25
- /**
26
- * Returns the list of observed attributes.
27
- * @static
28
- * @returns {Array} An empty array
29
- */
30
- static get observedAttributes() {
31
- return [];
32
- }
33
- /**
34
- * Sets up the attributes for the component.
35
- */
36
- setupAttributes() {
37
- this.isShadowRoot = "open";
38
- }
39
- /**
40
- * Draws the component for the thumbnail.
41
- * @returns {object} Document fragment
42
- */
43
- draw() {
44
- let fragment = document.createDocumentFragment();
45
- let element = document.createElement("slot");
46
- fragment.appendChild(element);
47
- return fragment;
48
- }
49
- }
50
- Thumbnail.define("wje-thumbnail", Thumbnail);
51
- export {
52
- Thumbnail as default
53
- };
54
- //# sourceMappingURL=wje-thumbnail.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wje-thumbnail.js","sources":["../packages/wje-thumbnail/thumbnail.element.js","../packages/wje-thumbnail/thumbnail.js"],"sourcesContent":["import { default as WJElement } from '../wje-element/element.js';\nimport styles from './styles/styles.css?inline';\n\n/**\n * @summary Thumbnail class\n * @documentation https://elements.webjet.sk/components/thumbnail\n * @status stable\n * @augments WJElement\n * @slot thumbnail-slot - The slot for the thumbnail content.\n * @cssproperty [--wje-thumbnail-width=48px] - Defines the width of the thumbnail. Accepts any valid CSS length unit such as `px`, `rem`, or `%`.\n * @cssproperty [--wje-thumbnail-height=48px] - Specifies the height of the thumbnail. Accepts any valid CSS length unit.\n * @cssproperty [--wje-thumbnail-border-radius=var(--wje-border-radius-medium)] - Sets the border radius of the thumbnail, determining how rounded its corners appear. Accepts any valid CSS length unit or CSS variable.\n * @tag thumbnail-element\n */\n\nexport default class Thumbnail extends WJElement {\n /**\n * Creates an instance of Thumbnail.\n */\n constructor() {\n super();\n }\n\n /**\n * The class name for the component\n */\n className = 'Thumbnail';\n\n /**\n * Returns the CSS stylesheet for the component.\n * @static\n * @returns {CSSStyleSheet} The CSS stylesheet\n */\n static get cssStyleSheet() {\n return styles;\n }\n\n /**\n * Returns the list of observed attributes.\n * @static\n * @returns {Array} An empty array\n */\n static get observedAttributes() {\n return [];\n }\n\n /**\n * Sets up the attributes for the component.\n */\n setupAttributes() {\n this.isShadowRoot = 'open';\n }\n\n /**\n * Draws the component for the thumbnail.\n * @returns {object} Document fragment\n */\n draw() {\n let fragment = document.createDocumentFragment();\n\n let element = document.createElement('slot');\n\n fragment.appendChild(element);\n\n return fragment;\n }\n}\n","import Thumbnail from './thumbnail.element.js';\n\nexport default Thumbnail;\n\nThumbnail.define('wje-thumbnail', Thumbnail);\n"],"names":[],"mappings":";;;;;AAee,MAAM,kBAAkB,UAAU;AAAA;AAAA;AAAA;AAAA,EAI7C,cAAc;AACV,UAAO;AAMX;AAAA;AAAA;AAAA,qCAAY;AAAA,EALhB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYI,WAAW,gBAAgB;AACvB,WAAO;AAAA,EACf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOI,WAAW,qBAAqB;AAC5B,WAAO,CAAE;AAAA,EACjB;AAAA;AAAA;AAAA;AAAA,EAKI,kBAAkB;AACd,SAAK,eAAe;AAAA,EAC5B;AAAA;AAAA;AAAA;AAAA;AAAA,EAMI,OAAO;AACH,QAAI,WAAW,SAAS,uBAAwB;AAEhD,QAAI,UAAU,SAAS,cAAc,MAAM;AAE3C,aAAS,YAAY,OAAO;AAE5B,WAAO;AAAA,EACf;AACA;AC9DA,UAAU,OAAO,iBAAiB,SAAS;"}