wj-elements 0.1.136 → 0.1.138
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.
- package/dist/dark.css +223 -0
- package/dist/infinite-scroll.element-XVJukzjy.js +272 -0
- package/dist/infinite-scroll.element-XVJukzjy.js.map +1 -0
- package/dist/light.css +534 -0
- package/dist/list.element-Ce1vIm1O.js +50 -0
- package/dist/list.element-Ce1vIm1O.js.map +1 -0
- package/dist/localize.js +70 -0
- package/dist/localize.js.map +1 -0
- package/dist/packages/index.d.ts +102 -0
- package/dist/packages/localize/localize.d.ts +17 -0
- package/dist/packages/translations/en-gb.d.ts +13 -0
- package/dist/packages/translations/sk-sk.d.ts +13 -0
- package/dist/packages/utils/animations.d.ts +2 -0
- package/dist/packages/utils/date.d.ts +1 -0
- package/dist/packages/utils/element-utils.d.ts +46 -0
- package/dist/packages/utils/event.d.ts +67 -0
- package/dist/packages/utils/localize.d.ts +4 -0
- package/dist/packages/utils/permissions-api.d.ts +34 -0
- package/dist/packages/utils/utils.d.ts +1 -0
- package/dist/packages/utils/wje-import-firefox.d.ts +0 -0
- package/dist/packages/utils/wje-import.d.ts +0 -0
- package/dist/packages/wje-accordion/accordion.d.ts +2 -0
- package/dist/packages/wje-accordion/accordion.element.d.ts +72 -0
- package/dist/packages/wje-accordion-item/accordion-item.d.ts +2 -0
- package/dist/packages/wje-accordion-item/accordion-item.element.d.ts +40 -0
- package/dist/packages/wje-animation/animation.d.ts +2 -0
- package/dist/packages/wje-animation/animation.element.d.ts +153 -0
- package/dist/packages/wje-animation/animation.test.d.ts +1 -0
- package/dist/packages/wje-aside/aside.d.ts +2 -0
- package/dist/packages/wje-aside/aside.element.d.ts +31 -0
- package/dist/packages/wje-avatar/avatar.d.ts +2 -0
- package/dist/packages/wje-avatar/avatar.element.d.ts +37 -0
- package/dist/packages/wje-avatar/service/service.d.ts +40 -0
- package/dist/packages/wje-badge/badge.d.ts +2 -0
- package/dist/packages/wje-badge/badge.element.d.ts +35 -0
- package/dist/packages/wje-badge/badge.test.d.ts +1 -0
- package/dist/packages/wje-breadcrumb/breadcrumb.d.ts +2 -0
- package/dist/packages/wje-breadcrumb/breadcrumb.element.d.ts +80 -0
- package/dist/packages/wje-breadcrumbs/breadcrumbs.d.ts +2 -0
- package/dist/packages/wje-breadcrumbs/breadcrumbs.element.d.ts +97 -0
- package/dist/packages/wje-breadcrumbs/breadcrumbs.test.d.ts +1 -0
- package/dist/packages/wje-button/button.d.ts +2 -0
- package/dist/packages/wje-button/button.element.d.ts +173 -0
- package/dist/packages/wje-button/button.test.d.ts +1 -0
- package/dist/packages/wje-button-group/button-group.d.ts +2 -0
- package/dist/packages/wje-button-group/button-group.element.d.ts +39 -0
- package/dist/packages/wje-card/card.d.ts +2 -0
- package/dist/packages/wje-card/card.element.d.ts +29 -0
- package/dist/packages/wje-card-content/card-content.d.ts +2 -0
- package/dist/packages/wje-card-content/card-content.element.d.ts +22 -0
- package/dist/packages/wje-card-controls/card-controls.d.ts +2 -0
- package/dist/packages/wje-card-controls/card-controls.element.d.ts +23 -0
- package/dist/packages/wje-card-header/card-header.d.ts +2 -0
- package/dist/packages/wje-card-header/card-header.element.d.ts +22 -0
- package/dist/packages/wje-card-subtitle/card-subtitle.d.ts +2 -0
- package/dist/packages/wje-card-subtitle/card-subtitle.element.d.ts +30 -0
- package/dist/packages/wje-card-title/card-title.d.ts +2 -0
- package/dist/packages/wje-card-title/card-title.element.d.ts +32 -0
- package/dist/packages/wje-carousel/carousel.d.ts +2 -0
- package/dist/packages/wje-carousel/carousel.element.d.ts +146 -0
- package/dist/packages/wje-carousel-item/carousel-item.d.ts +2 -0
- package/dist/packages/wje-carousel-item/carousel-item.element.d.ts +38 -0
- package/dist/packages/wje-checkbox/checkbox.d.ts +2 -0
- package/dist/packages/wje-checkbox/checkbox.element.d.ts +171 -0
- package/dist/packages/wje-chip/chip.d.ts +2 -0
- package/dist/packages/wje-chip/chip.element.d.ts +29 -0
- package/dist/packages/wje-col/col.d.ts +2 -0
- package/dist/packages/wje-col/col.element.d.ts +16 -0
- package/dist/packages/wje-color-picker/color-picker.d.ts +2 -0
- package/dist/packages/wje-color-picker/color-picker.element.d.ts +187 -0
- package/dist/packages/wje-container/container.d.ts +2 -0
- package/dist/packages/wje-container/container.element.d.ts +31 -0
- package/dist/packages/wje-copy-button/copy-button.d.ts +2 -0
- package/dist/packages/wje-copy-button/copy-button.element.d.ts +89 -0
- package/dist/packages/wje-copy-button/service/service.d.ts +12 -0
- package/dist/packages/wje-dialog/dialog.d.ts +2 -0
- package/dist/packages/wje-dialog/dialog.element.d.ts +116 -0
- package/dist/packages/wje-divider/divider.d.ts +2 -0
- package/dist/packages/wje-divider/divider.element.d.ts +32 -0
- package/dist/packages/wje-dropdown/dropdown.d.ts +2 -0
- package/dist/packages/wje-dropdown/dropdown.element.d.ts +85 -0
- package/dist/packages/wje-element/element.d.ts +313 -0
- package/dist/packages/wje-element/service/universal-service.d.ts +18 -0
- package/dist/packages/wje-file-upload/file-upload.d.ts +2 -0
- package/dist/packages/wje-file-upload/file-upload.element.d.ts +191 -0
- package/dist/packages/wje-file-upload/service/service.d.ts +70 -0
- package/dist/packages/wje-file-upload-item/file-upload-item.d.ts +2 -0
- package/dist/packages/wje-file-upload-item/file-upload-item.element.d.ts +64 -0
- package/dist/packages/wje-footer/footer.d.ts +2 -0
- package/dist/packages/wje-footer/footer.element.d.ts +28 -0
- package/dist/packages/wje-form/form.d.ts +2 -0
- package/dist/packages/wje-form/form.element.d.ts +28 -0
- package/dist/packages/wje-format-digital/format-digital.d.ts +2 -0
- package/dist/packages/wje-format-digital/format-digital.element.d.ts +87 -0
- package/dist/packages/wje-format-digital/format-digital.test.d.ts +1 -0
- package/dist/packages/wje-grid/grid.d.ts +2 -0
- package/dist/packages/wje-grid/grid.element.d.ts +26 -0
- package/dist/packages/wje-header/header.d.ts +2 -0
- package/dist/packages/wje-header/header.element.d.ts +35 -0
- package/dist/packages/wje-icon/icon.d.ts +2 -0
- package/dist/packages/wje-icon/icon.element.d.ts +40 -0
- package/dist/packages/wje-icon/service/service.d.ts +11 -0
- package/dist/packages/wje-icon-picker/icon-picker.d.ts +2 -0
- package/dist/packages/wje-icon-picker/icon-picker.element.d.ts +197 -0
- package/dist/packages/wje-img/img.d.ts +2 -0
- package/dist/packages/wje-img/img.element.d.ts +36 -0
- package/dist/packages/wje-img-comparer/img-comparer.d.ts +2 -0
- package/dist/packages/wje-img-comparer/img-comparer.element.d.ts +60 -0
- package/dist/packages/wje-img-comparer/service/service.d.ts +1 -0
- package/dist/packages/wje-infinite-scroll/infinite-scroll.d.ts +2 -0
- package/dist/packages/wje-infinite-scroll/infinite-scroll.element.d.ts +134 -0
- package/dist/packages/wje-input/input.d.ts +2 -0
- package/dist/packages/wje-input/input.element.d.ts +204 -0
- package/dist/packages/wje-input-file/input-file.d.ts +2 -0
- package/dist/packages/wje-input-file/input-file.element.d.ts +50 -0
- package/dist/packages/wje-item/item.d.ts +2 -0
- package/dist/packages/wje-item/item.element.d.ts +68 -0
- package/dist/packages/wje-kanban/kanban.d.ts +2 -0
- package/dist/packages/wje-kanban/kanban.element.d.ts +183 -0
- package/dist/packages/wje-label/label.d.ts +2 -0
- package/dist/packages/wje-label/label.element.d.ts +34 -0
- package/dist/packages/wje-list/list.d.ts +2 -0
- package/dist/packages/wje-list/list.element.d.ts +31 -0
- package/dist/packages/wje-main/main.d.ts +2 -0
- package/dist/packages/wje-main/main.element.d.ts +30 -0
- package/dist/packages/wje-masonry/masonry.d.ts +2 -0
- package/dist/packages/wje-masonry/masonry.element.d.ts +114 -0
- package/dist/packages/wje-masonry/service/service.d.ts +32 -0
- package/dist/packages/wje-menu/menu.d.ts +2 -0
- package/dist/packages/wje-menu/menu.element.d.ts +47 -0
- package/dist/packages/wje-menu-button/menu-button.d.ts +2 -0
- package/dist/packages/wje-menu-button/menu-button.element.d.ts +34 -0
- package/dist/packages/wje-menu-item/menu-item.d.ts +2 -0
- package/dist/packages/wje-menu-item/menu-item.element.d.ts +139 -0
- package/dist/packages/wje-menu-label/menu-label.d.ts +2 -0
- package/dist/packages/wje-menu-label/menu-label.element.d.ts +39 -0
- package/dist/packages/wje-option/option.d.ts +2 -0
- package/dist/packages/wje-option/option.element.d.ts +59 -0
- package/dist/packages/wje-options/options.d.ts +2 -0
- package/dist/packages/wje-options/options.element.d.ts +183 -0
- package/dist/packages/wje-orgchart/orgchart.d.ts +2 -0
- package/dist/packages/wje-orgchart/orgchart.element.d.ts +24 -0
- package/dist/packages/wje-orgchart-group/orgchart-group.d.ts +2 -0
- package/dist/packages/wje-orgchart-group/orgchart-group.element.d.ts +28 -0
- package/dist/packages/wje-orgchart-item/orgchart-item.d.ts +2 -0
- package/dist/packages/wje-orgchart-item/orgchart-item.element.d.ts +49 -0
- package/dist/packages/wje-panel/panel.d.ts +2 -0
- package/dist/packages/wje-panel/panel.element.d.ts +34 -0
- package/dist/packages/wje-popup/popup.d.ts +2 -0
- package/dist/packages/wje-popup/popup.element.d.ts +93 -0
- package/dist/packages/wje-progress-bar/progress-bar.d.ts +2 -0
- package/dist/packages/wje-progress-bar/progress-bar.element.d.ts +96 -0
- package/dist/packages/wje-qr-code/qr-code.d.ts +2 -0
- package/dist/packages/wje-qr-code/qr-code.element.d.ts +33 -0
- package/dist/packages/wje-radio/radio.d.ts +2 -0
- package/dist/packages/wje-radio/radio.element.d.ts +53 -0
- package/dist/packages/wje-radio-group/radio-group.d.ts +2 -0
- package/dist/packages/wje-radio-group/radio-group.element.d.ts +137 -0
- package/dist/packages/wje-rate/rate.d.ts +2 -0
- package/dist/packages/wje-rate/rate.element.d.ts +156 -0
- package/dist/packages/wje-relative-time/relative-time.d.ts +2 -0
- package/dist/packages/wje-relative-time/relative-time.element.d.ts +55 -0
- package/dist/packages/wje-relative-time/relative-time.test.d.ts +1 -0
- package/dist/packages/wje-reorder/reorder.d.ts +2 -0
- package/dist/packages/wje-reorder/reorder.element.d.ts +119 -0
- package/dist/packages/wje-reorder-dropzone/reorder-dropzone.d.ts +2 -0
- package/dist/packages/wje-reorder-dropzone/reorder-dropzone.element.d.ts +23 -0
- package/dist/packages/wje-reorder-handle/reorder-handle.d.ts +2 -0
- package/dist/packages/wje-reorder-handle/reorder-handle.element.d.ts +75 -0
- package/dist/packages/wje-reorder-item/reorder-item.d.ts +2 -0
- package/dist/packages/wje-reorder-item/reorder-item.element.d.ts +24 -0
- package/dist/packages/wje-route/route.d.ts +2 -0
- package/dist/packages/wje-route/route.element.d.ts +22 -0
- package/dist/packages/wje-router/router.d.ts +2 -0
- package/dist/packages/wje-router/router.element.d.ts +39 -0
- package/dist/packages/wje-router-link/router-link.d.ts +2 -0
- package/dist/packages/wje-router-link/router-link.element.d.ts +31 -0
- package/dist/packages/wje-router-outlet/router-outlet.d.ts +2 -0
- package/dist/packages/wje-router-outlet/router-outlet.element.d.ts +15 -0
- package/dist/packages/wje-row/row.d.ts +2 -0
- package/dist/packages/wje-row/row.element.d.ts +23 -0
- package/dist/packages/wje-select/select.d.ts +2 -0
- package/dist/packages/wje-select/select.element.d.ts +315 -0
- package/dist/packages/wje-slider/slider.d.ts +2 -0
- package/dist/packages/wje-slider/slider.element.d.ts +103 -0
- package/dist/packages/wje-split-view/service/service.d.ts +1 -0
- package/dist/packages/wje-split-view/split-view.d.ts +2 -0
- package/dist/packages/wje-split-view/split-view.element.d.ts +66 -0
- package/dist/packages/wje-status/status.d.ts +2 -0
- package/dist/packages/wje-status/status.element.d.ts +26 -0
- package/dist/packages/wje-step/step.d.ts +2 -0
- package/dist/packages/wje-step/step.element.d.ts +23 -0
- package/dist/packages/wje-stepper/stepper.d.ts +2 -0
- package/dist/packages/wje-stepper/stepper.element.d.ts +78 -0
- package/dist/packages/wje-store/default-store-actions.d.ts +25 -0
- package/dist/packages/wje-store/pubsub.d.ts +21 -0
- package/dist/packages/wje-store/store.d.ts +153 -0
- package/dist/packages/wje-tab/tab.d.ts +2 -0
- package/dist/packages/wje-tab/tab.element.d.ts +41 -0
- package/dist/packages/wje-tab-group/tab-group.d.ts +2 -0
- package/dist/packages/wje-tab-group/tab-group.element.d.ts +67 -0
- package/dist/packages/wje-tab-panel/tab-panel.d.ts +2 -0
- package/dist/packages/wje-tab-panel/tab-panel.element.d.ts +23 -0
- package/dist/packages/wje-textarea/textarea.d.ts +2 -0
- package/dist/packages/wje-textarea/textarea.element.d.ts +176 -0
- package/dist/packages/wje-thumbnail/thumbnail.d.ts +2 -0
- package/dist/packages/wje-thumbnail/thumbnail.element.d.ts +31 -0
- package/dist/packages/wje-timeline/timeline.d.ts +2 -0
- package/dist/packages/wje-timeline/timeline.element.d.ts +25 -0
- package/dist/packages/wje-timeline-item/timeline-item.d.ts +2 -0
- package/dist/packages/wje-timeline-item/timeline-item.element.d.ts +27 -0
- package/dist/packages/wje-toast/toast.d.ts +2 -0
- package/dist/packages/wje-toast/toast.element.d.ts +173 -0
- package/dist/packages/wje-toast/toast.test.d.ts +1 -0
- package/dist/packages/wje-toggle/toggle.d.ts +2 -0
- package/dist/packages/wje-toggle/toggle.element.d.ts +65 -0
- package/dist/packages/wje-toolbar/toolbar.d.ts +2 -0
- package/dist/packages/wje-toolbar/toolbar.element.d.ts +39 -0
- package/dist/packages/wje-toolbar-action/toolbar-action.d.ts +2 -0
- package/dist/packages/wje-toolbar-action/toolbar-action.element.d.ts +35 -0
- package/dist/packages/wje-tooltip/tooltip.d.ts +2 -0
- package/dist/packages/wje-tooltip/tooltip.element.d.ts +71 -0
- package/dist/packages/wje-tree/tree.d.ts +2 -0
- package/dist/packages/wje-tree/tree.element.d.ts +48 -0
- package/dist/packages/wje-tree-item/tree-item.d.ts +2 -0
- package/dist/packages/wje-tree-item/tree-item.element.d.ts +48 -0
- package/dist/packages/wje-visually-hidden/visually-hidden.d.ts +2 -0
- package/dist/packages/wje-visually-hidden/visually-hidden.element.d.ts +29 -0
- package/dist/popup.element-tyYxow0p.js +1623 -0
- package/dist/popup.element-tyYxow0p.js.map +1 -0
- package/dist/router-links-CJnOdbas.js +150 -0
- package/dist/router-links-CJnOdbas.js.map +1 -0
- package/dist/styles.css +849 -0
- package/dist/wje-accordion-item.js +113 -0
- package/dist/wje-accordion-item.js.map +1 -0
- package/dist/wje-accordion.js +122 -0
- package/dist/wje-accordion.js.map +1 -0
- package/dist/wje-animation.js +4324 -0
- package/dist/wje-animation.js.map +1 -0
- package/dist/wje-aside.js +55 -0
- package/dist/wje-aside.js.map +1 -0
- package/dist/wje-avatar.js +90 -0
- package/dist/wje-avatar.js.map +1 -0
- package/dist/wje-badge.js +71 -0
- package/dist/wje-badge.js.map +1 -0
- package/dist/wje-breadcrumb.js +195 -0
- package/dist/wje-breadcrumb.js.map +1 -0
- package/dist/wje-breadcrumbs.js +140 -0
- package/dist/wje-breadcrumbs.js.map +1 -0
- package/dist/wje-button-group.js +85 -0
- package/dist/wje-button-group.js.map +1 -0
- package/dist/wje-button.js +352 -0
- package/dist/wje-button.js.map +1 -0
- package/dist/wje-card-content.js +48 -0
- package/dist/wje-card-content.js.map +1 -0
- package/dist/wje-card-controls.js +48 -0
- package/dist/wje-card-controls.js.map +1 -0
- package/dist/wje-card-header.js +48 -0
- package/dist/wje-card-header.js.map +1 -0
- package/dist/wje-card-subtitle.js +55 -0
- package/dist/wje-card-subtitle.js.map +1 -0
- package/dist/wje-card-title.js +55 -0
- package/dist/wje-card-title.js.map +1 -0
- package/dist/wje-card.js +56 -0
- package/dist/wje-card.js.map +1 -0
- package/dist/wje-carousel-item.js +63 -0
- package/dist/wje-carousel-item.js.map +1 -0
- package/dist/wje-carousel.js +380 -0
- package/dist/wje-carousel.js.map +1 -0
- package/dist/wje-checkbox.js +540 -0
- package/dist/wje-checkbox.js.map +1 -0
- package/dist/wje-chip.js +76 -0
- package/dist/wje-chip.js.map +1 -0
- package/dist/wje-col.js +38 -0
- package/dist/wje-col.js.map +1 -0
- package/dist/wje-color-picker.js +1339 -0
- package/dist/wje-color-picker.js.map +1 -0
- package/dist/wje-container.js +56 -0
- package/dist/wje-container.js.map +1 -0
- package/dist/wje-copy-button.js +218 -0
- package/dist/wje-copy-button.js.map +1 -0
- package/dist/wje-dialog.js +249 -0
- package/dist/wje-dialog.js.map +1 -0
- package/dist/wje-divider.js +55 -0
- package/dist/wje-divider.js.map +1 -0
- package/dist/wje-dropdown.js +194 -0
- package/dist/wje-dropdown.js.map +1 -0
- package/dist/wje-element.js +967 -0
- package/dist/wje-element.js.map +1 -0
- package/dist/wje-fetchAndParseCSS.js +60 -0
- package/dist/wje-fetchAndParseCSS.js.map +1 -0
- package/dist/wje-file-upload-item.js +140 -0
- package/dist/wje-file-upload-item.js.map +1 -0
- package/dist/wje-file-upload.js +552 -0
- package/dist/wje-file-upload.js.map +1 -0
- package/dist/wje-footer.js +52 -0
- package/dist/wje-footer.js.map +1 -0
- package/dist/wje-form.js +53 -0
- package/dist/wje-form.js.map +1 -0
- package/dist/wje-format-digital.js +146 -0
- package/dist/wje-format-digital.js.map +1 -0
- package/dist/wje-grid.js +54 -0
- package/dist/wje-grid.js.map +1 -0
- package/dist/wje-header.js +56 -0
- package/dist/wje-header.js.map +1 -0
- package/dist/wje-icon-picker.js +349 -0
- package/dist/wje-icon-picker.js.map +1 -0
- package/dist/wje-icon.js +191 -0
- package/dist/wje-icon.js.map +1 -0
- package/dist/wje-img-comparer.js +131 -0
- package/dist/wje-img-comparer.js.map +1 -0
- package/dist/wje-img.js +80 -0
- package/dist/wje-img.js.map +1 -0
- package/dist/wje-infinite-scroll.js +6 -0
- package/dist/wje-infinite-scroll.js.map +1 -0
- package/dist/wje-input-file.js +111 -0
- package/dist/wje-input-file.js.map +1 -0
- package/dist/wje-input.js +452 -0
- package/dist/wje-input.js.map +1 -0
- package/dist/wje-item.js +88 -0
- package/dist/wje-item.js.map +1 -0
- package/dist/wje-kanban.js +462 -0
- package/dist/wje-kanban.js.map +1 -0
- package/dist/wje-label.js +53 -0
- package/dist/wje-label.js.map +1 -0
- package/dist/wje-list.js +6 -0
- package/dist/wje-list.js.map +1 -0
- package/dist/wje-main.js +52 -0
- package/dist/wje-main.js.map +1 -0
- package/dist/wje-masonry.js +267 -0
- package/dist/wje-masonry.js.map +1 -0
- package/dist/wje-master.js +622 -0
- package/dist/wje-master.js.map +1 -0
- package/dist/wje-menu-button.js +60 -0
- package/dist/wje-menu-button.js.map +1 -0
- package/dist/wje-menu-item.js +545 -0
- package/dist/wje-menu-item.js.map +1 -0
- package/dist/wje-menu-label.js +55 -0
- package/dist/wje-menu-label.js.map +1 -0
- package/dist/wje-menu.js +72 -0
- package/dist/wje-menu.js.map +1 -0
- package/dist/wje-option.js +112 -0
- package/dist/wje-option.js.map +1 -0
- package/dist/wje-options.js +355 -0
- package/dist/wje-options.js.map +1 -0
- package/dist/wje-orgchart-group.js +72 -0
- package/dist/wje-orgchart-group.js.map +1 -0
- package/dist/wje-orgchart-item.js +98 -0
- package/dist/wje-orgchart-item.js.map +1 -0
- package/dist/wje-orgchart.js +49 -0
- package/dist/wje-orgchart.js.map +1 -0
- package/dist/wje-popup.js +6 -0
- package/dist/wje-popup.js.map +1 -0
- package/dist/wje-progress-bar.js +213 -0
- package/dist/wje-progress-bar.js.map +1 -0
- package/dist/wje-qr-code.js +2892 -0
- package/dist/wje-qr-code.js.map +1 -0
- package/dist/wje-radio-group.js +228 -0
- package/dist/wje-radio-group.js.map +1 -0
- package/dist/wje-radio.js +106 -0
- package/dist/wje-radio.js.map +1 -0
- package/dist/wje-rate.js +300 -0
- package/dist/wje-rate.js.map +1 -0
- package/dist/wje-relative-time.js +115 -0
- package/dist/wje-relative-time.js.map +1 -0
- package/dist/wje-reorder-dropzone.js +49 -0
- package/dist/wje-reorder-dropzone.js.map +1 -0
- package/dist/wje-reorder-handle.js +218 -0
- package/dist/wje-reorder-handle.js.map +1 -0
- package/dist/wje-reorder-item.js +61 -0
- package/dist/wje-reorder-item.js.map +1 -0
- package/dist/wje-reorder.js +281 -0
- package/dist/wje-reorder.js.map +1 -0
- package/dist/wje-route.js +43 -0
- package/dist/wje-route.js.map +1 -0
- package/dist/wje-router-link.js +64 -0
- package/dist/wje-router-link.js.map +1 -0
- package/dist/wje-router-outlet.js +192 -0
- package/dist/wje-router-outlet.js.map +1 -0
- package/dist/wje-routerx.js +1437 -0
- package/dist/wje-routerx.js.map +1 -0
- package/dist/wje-row.js +49 -0
- package/dist/wje-row.js.map +1 -0
- package/dist/wje-select.js +630 -0
- package/dist/wje-select.js.map +1 -0
- package/dist/wje-slider.js +221 -0
- package/dist/wje-slider.js.map +1 -0
- package/dist/wje-sliding-container.js +474 -0
- package/dist/wje-sliding-container.js.map +1 -0
- package/dist/wje-split-view.js +153 -0
- package/dist/wje-split-view.js.map +1 -0
- package/dist/wje-status.js +61 -0
- package/dist/wje-status.js.map +1 -0
- package/dist/wje-step.js +50 -0
- package/dist/wje-step.js.map +1 -0
- package/dist/wje-stepper.js +231 -0
- package/dist/wje-stepper.js.map +1 -0
- package/dist/wje-store.js +401 -0
- package/dist/wje-store.js.map +1 -0
- package/dist/wje-tab-group.js +137 -0
- package/dist/wje-tab-group.js.map +1 -0
- package/dist/wje-tab-panel.js +46 -0
- package/dist/wje-tab-panel.js.map +1 -0
- package/dist/wje-tab.js +59 -0
- package/dist/wje-tab.js.map +1 -0
- package/dist/wje-textarea.js +376 -0
- package/dist/wje-textarea.js.map +1 -0
- package/dist/wje-thumbnail.js +54 -0
- package/dist/wje-thumbnail.js.map +1 -0
- package/dist/wje-toast.js +334 -0
- package/dist/wje-toast.js.map +1 -0
- package/dist/wje-toggle.js +125 -0
- package/dist/wje-toggle.js.map +1 -0
- package/dist/wje-toolbar-action.js +72 -0
- package/dist/wje-toolbar-action.js.map +1 -0
- package/dist/wje-toolbar.js +63 -0
- package/dist/wje-toolbar.js.map +1 -0
- package/dist/wje-tooltip.js +166 -0
- package/dist/wje-tooltip.js.map +1 -0
- package/dist/wje-visually-hidden.js +55 -0
- package/dist/wje-visually-hidden.js.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,106 @@
|
|
|
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 Radio ]\n*/\n\n:host {\n --wje-radio-margin-top: 0;\n --wje-radio-margin-bottom: 0.5rem;\n --wje-radio-margin-inline: 0;\n\n display: block;\n margin-top: var(--wje-radio-margin-top);\n margin-bottom: var(--wje-radio-margin-bottom);\n margin-inline: var(--wje-radio-margin-inline);\n line-height: 100%;\n padding-left: 0;\n\n label {\n display: flex;\n cursor: pointer;\n position: relative;\n padding-left: 1.5rem;\n min-width: 16px;\n min-height: 16px;\n margin-bottom: 0;\n -webkit-touch-callout: none; /* iOS Safari */\n -webkit-user-select: none; /* Safari */\n -moz-user-select: none; /* Old versions of Firefox */\n -ms-user-select: none; /* Internet Explorer/Edge */\n user-select: none; /* Non-prefixed version, currently supported by Chrome, Opera and Firefox */\n align-items: center;\n &:before {\n content: '';\n position: absolute;\n width: 16px;\n height: 16px;\n left: 0;\n box-sizing: border-box;\n background-color: var(--wje-color-contrast-1);\n border: 1px solid var(--wje-color-contrast-4);\n }\n }\n}\n\n.native-radio {\n input[type='radio'] + label {\n &:before {\n border-radius: var(--wje-border-radius-circle);\n transition: border 0.3s 0s cubic-bezier(0.455, 0.03, 0.215, 1.33);\n }\n }\n input[type='radio']:checked {\n & + label {\n &:before {\n border-color: var(--wje-color-contrast-6);\n border-width: 5px;\n }\n }\n }\n input[type='radio']:focus {\n & + label {\n color: var(--wje-color);\n &:before {\n outline: none !important;\n box-shadow: 0 0 0 0 #78c8fe;\n }\n }\n }\n\n input[type='radio'] {\n opacity: 0;\n position: absolute;\n top: 3px;\n width: 16px;\n height: 16px;\n }\n\n input[type='radio'][disabled] {\n & + label {\n cursor: not-allowed !important;\n color: var(--wje-color-contrast-9);\n opacity: 0.5;\n &:before {\n cursor: not-allowed !important;\n }\n }\n }\n}\n\n:host([placement='end']) {\n label {\n padding-left: 0;\n padding-right: 26px;\n\n &:before {\n right: 0;\n left: auto;\n }\n }\n\n input[type='checkbox']:checked {\n & + label {\n position: relative;\n\n &::after {\n position: absolute;\n right: 0;\n left: auto;\n }\n }\n }\n}\n\n/* Colors */\n\n:host([color='primary']) input[type='radio']:checked + label:before {\n border-color: var(--wje-color-primary-9);\n}\n\n:host([color='complete']) input[type='radio']:checked + label:before {\n border-color: var(--wje-color-complete-9);\n}\n\n:host([color='success']) input[type='radio']:checked + label:before {\n border-color: var(--wje-color-success-9);\n}\n\n:host([color='warning']) input[type='radio']:checked + label:before {\n border-color: var(--wje-color-warning-9);\n}\n\n:host([color='danger']) input[type='radio']:checked + label:before {\n border-color: var(--wje-color-danger-9);\n}\n\n:host([color='info']) input[type='radio']:checked + label:before {\n border-color: var(--wje-color-info-9);\n}\n";
|
|
6
|
+
class Radio extends WJElement {
|
|
7
|
+
/**
|
|
8
|
+
* Creates an instance of Radio.
|
|
9
|
+
*/
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
/**
|
|
13
|
+
* Sets the color of the radio button.
|
|
14
|
+
* @type {string}
|
|
15
|
+
*/
|
|
16
|
+
__publicField(this, "className", "Radio");
|
|
17
|
+
/**
|
|
18
|
+
* Called when an attribute changes.
|
|
19
|
+
* @param {object} e
|
|
20
|
+
*/
|
|
21
|
+
__publicField(this, "inputEvent", (e) => {
|
|
22
|
+
this.checked = e.target.checked;
|
|
23
|
+
});
|
|
24
|
+
this._checked = false;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Sets the name of the radio button.
|
|
28
|
+
* @param value
|
|
29
|
+
*/
|
|
30
|
+
set checked(value) {
|
|
31
|
+
this._checked = value;
|
|
32
|
+
if (value) this.setAttribute("checked", "");
|
|
33
|
+
else this.removeAttribute("checked");
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Gets the checked property of the radio button.
|
|
37
|
+
* @returns {boolean}
|
|
38
|
+
*/
|
|
39
|
+
get checked() {
|
|
40
|
+
return this._checked;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Returns the CSS styles for the component.
|
|
44
|
+
* @returns {CSSStyleSheet}
|
|
45
|
+
*/
|
|
46
|
+
static get cssStyleSheet() {
|
|
47
|
+
return styles;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Returns the list of attributes to observe for changes.
|
|
51
|
+
* @static
|
|
52
|
+
* @returns {Array<string>}
|
|
53
|
+
*/
|
|
54
|
+
static get observedAttributes() {
|
|
55
|
+
return ["checked"];
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Sets up the attributes for the component.
|
|
59
|
+
*/
|
|
60
|
+
setupAttributes() {
|
|
61
|
+
this.isShadowRoot = "open";
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Draws the radio button.
|
|
65
|
+
* @returns {DocumentFragment}
|
|
66
|
+
*/
|
|
67
|
+
draw() {
|
|
68
|
+
let fragment = document.createDocumentFragment();
|
|
69
|
+
let native = document.createElement("div");
|
|
70
|
+
native.classList.add("native-radio");
|
|
71
|
+
if (this.color) native.classList.add(this.color);
|
|
72
|
+
this.input = document.createElement("input");
|
|
73
|
+
this.input.type = "radio";
|
|
74
|
+
this.input.id = "radio";
|
|
75
|
+
this.input.name = this.name + "-radio";
|
|
76
|
+
this.input.checked = this.hasAttribute("checked");
|
|
77
|
+
this.input.disabled = this.hasAttribute("disabled");
|
|
78
|
+
let label = document.createElement("label");
|
|
79
|
+
label.htmlFor = "radio";
|
|
80
|
+
label.innerHTML = "<slot></slot>";
|
|
81
|
+
native.appendChild(this.input);
|
|
82
|
+
native.appendChild(label);
|
|
83
|
+
fragment.appendChild(native);
|
|
84
|
+
return fragment;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Sets up the event listeners for the component.
|
|
88
|
+
*/
|
|
89
|
+
afterDraw() {
|
|
90
|
+
if (!this.hasAttribute("disabled")) {
|
|
91
|
+
event.addListener(this, "click", "wje-radio:change");
|
|
92
|
+
event.addListener(this, "click", "wje-radio:input");
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
/**
|
|
96
|
+
* Toggles the radio button.
|
|
97
|
+
*/
|
|
98
|
+
beforeDisconnect() {
|
|
99
|
+
event.removeElement(this);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
Radio.define("wje-radio", Radio);
|
|
103
|
+
export {
|
|
104
|
+
Radio as default
|
|
105
|
+
};
|
|
106
|
+
//# sourceMappingURL=wje-radio.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wje-radio.js","sources":["../packages/wje-radio/radio.element.js","../packages/wje-radio/radio.js"],"sourcesContent":["import { default as WJElement, event } from '../wje-element/element.js';\nimport styles from './styles/styles.css?inline';\n\n/**\n * @summary This class represents a Radio button element, extending the WJElement class.\n * @documentation https://elements.webjet.sk/components/radio\n * @status stable\n * @augments WJElement\n * @slot - Default slot for the radio button label content.\n * @csspart native-radio - The native wrapper for the radio button.\n * @cssproperty [--wje-radio-margin-inline=0] - Specifies the horizontal (left and right) margin for the radio button. Accepts any valid CSS length unit (e.g., `px`, `rem`, `%`) to control spacing on both sides of the component.\n * @cssproperty [--wje-radio-margin-top=0] - Defines the top margin for the radio button. Accepts any valid CSS length value to adjust vertical spacing above the component.\n * @cssproperty [--wje-radio-margin-bottom=0] - Sets the bottom margin for the radio button. Accepts any valid CSS length value to adjust vertical spacing below the component.\n * // @fires wje-radio:change - Dispatched when the radio button's state changes.\n * // @fires wje-radio:input - Dispatched when the radio button is interacted with.\n */\n\nexport default class Radio extends WJElement {\n /**\n * Creates an instance of Radio.\n */\n constructor() {\n super();\n\n this._checked = false;\n }\n\n /**\n * Sets the name of the radio button.\n * @param value\n */\n set checked(value) {\n this._checked = value;\n\n if (value) this.setAttribute('checked', '');\n else this.removeAttribute('checked');\n }\n\n /**\n * Gets the checked property of the radio button.\n * @returns {boolean}\n */\n get checked() {\n return this._checked;\n }\n\n /**\n * Sets the color of the radio button.\n * @type {string}\n */\n className = 'Radio';\n\n /**\n * Returns the CSS styles for the component.\n * @returns {CSSStyleSheet}\n */\n static get cssStyleSheet() {\n return styles;\n }\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 ['checked'];\n }\n\n /**\n * Sets up the attributes for the component.\n */\n setupAttributes() {\n this.isShadowRoot = 'open';\n }\n\n /**\n * Draws the radio button.\n * @returns {DocumentFragment}\n */\n draw() {\n let fragment = document.createDocumentFragment();\n\n let native = document.createElement('div');\n native.classList.add('native-radio');\n\n if (this.color) native.classList.add(this.color);\n\n this.input = document.createElement('input');\n this.input.type = 'radio';\n this.input.id = 'radio';\n this.input.name = this.name + '-radio';\n this.input.checked = this.hasAttribute('checked');\n this.input.disabled = this.hasAttribute('disabled');\n\n let label = document.createElement('label');\n label.htmlFor = 'radio';\n label.innerHTML = '<slot></slot>';\n\n native.appendChild(this.input);\n native.appendChild(label);\n\n fragment.appendChild(native);\n\n return fragment;\n }\n\n /**\n * Sets up the event listeners for the component.\n */\n afterDraw() {\n if (!this.hasAttribute('disabled')) {\n event.addListener(this, 'click', 'wje-radio:change');\n event.addListener(this, 'click', 'wje-radio:input');\n }\n }\n\n /**\n * Called when an attribute changes.\n * @param {object} e\n */\n inputEvent = (e) => {\n this.checked = e.target.checked;\n };\n\n /**\n * Toggles the radio button.\n */\n beforeDisconnect() {\n event.removeElement(this);\n }\n}\n","import Radio from './radio.element.js';\n\nexport default Radio;\n\nRadio.define('wje-radio', Radio);\n"],"names":[],"mappings":";;;;;AAiBe,MAAM,cAAc,UAAU;AAAA;AAAA;AAAA;AAAA,EAIzC,cAAc;AACV,UAAO;AA4BX;AAAA;AAAA;AAAA;AAAA,qCAAY;AAuEZ;AAAA;AAAA;AAA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AAG;AAChC,YAAM,YAAY,MAAM,SAAS,kBAAkB;AACnD,YAAM,YAAY,MAAM,SAAS,iBAAiB;AAAA,IAC9D;AAAA,EACA;AAAA;AAAA;AAAA;AAAA,EAaI,mBAAmB;AACf,UAAM,cAAc,IAAI;AAAA,EAChC;AACA;AC/HA,MAAM,OAAO,aAAa,KAAK;"}
|
package/dist/wje-rate.js
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
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 Rate ]\n*/\n\n:host {\n display: flex;\n color: var(--wje-rate-color);\n}\n\n:host([readonly]) .wje-rate-icon {\n cursor: default;\n}\n\n.native-rate {\n position: relative;\n display: flex;\n gap: var(--wje-rate-gap);\n}\n\n.wje-rate-icon {\n position: relative;\n cursor: pointer;\n}\n\n.selected {\n color: var(--wje-rate-selected-color);\n}\n\n:host(:not([readonly])) .wje-rate-icon:hover {\n transform: scale(1.2);\n}\n\nwje-icon:first-child {\n color: var(--wje-rate-color);\n}\n\nwje-icon:last-child {\n color: currentColor;\n position: absolute;\n top: 0;\n left: 0;\n}\n\n:host([disabled]) .native-rate {\n pointer-events: none;\n opacity: 0.5;\n}\n";
|
|
6
|
+
class Rate extends WJElement {
|
|
7
|
+
/**
|
|
8
|
+
* Creates an instance of Rate.
|
|
9
|
+
* @class
|
|
10
|
+
*/
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
/**
|
|
14
|
+
* Sets the hover value of the rating component.
|
|
15
|
+
* @type {string}
|
|
16
|
+
*/
|
|
17
|
+
__publicField(this, "className", "Rate");
|
|
18
|
+
/**
|
|
19
|
+
* Event handler for the mouse enter event.
|
|
20
|
+
* @param {Event} e The event.
|
|
21
|
+
*/
|
|
22
|
+
__publicField(this, "onMouseEnter", (e) => {
|
|
23
|
+
e.preventDefault();
|
|
24
|
+
this.hoverValue = this.getValueFromXPosition(e.clientX);
|
|
25
|
+
this.changeRate();
|
|
26
|
+
});
|
|
27
|
+
/**
|
|
28
|
+
* Event handler for the mouse leave event.
|
|
29
|
+
* @param {Event} e The event.
|
|
30
|
+
*/
|
|
31
|
+
__publicField(this, "onMouseLeave", (e) => {
|
|
32
|
+
e.preventDefault();
|
|
33
|
+
this.hoverValue = 0;
|
|
34
|
+
this.changeRate();
|
|
35
|
+
});
|
|
36
|
+
/**
|
|
37
|
+
* Event handler for the mouse move event.
|
|
38
|
+
* @param {Event} e The event.
|
|
39
|
+
*/
|
|
40
|
+
__publicField(this, "onMouseMove", (e) => {
|
|
41
|
+
e.preventDefault();
|
|
42
|
+
let newValue = +this.getValueFromXPosition(e.clientX);
|
|
43
|
+
if (newValue !== +this.hoverValue) {
|
|
44
|
+
this.hoverValue = newValue;
|
|
45
|
+
this.changeRate();
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
/**
|
|
49
|
+
* Event handler for the touch start event.
|
|
50
|
+
* @param {Event} e The event.
|
|
51
|
+
*/
|
|
52
|
+
__publicField(this, "onTouchStart", (e) => {
|
|
53
|
+
e.preventDefault();
|
|
54
|
+
this.hoverValue = this.getValueFromXPosition(e.touches[0].clientX);
|
|
55
|
+
this.changeRate();
|
|
56
|
+
});
|
|
57
|
+
/**
|
|
58
|
+
* Event handler for the touch end event.
|
|
59
|
+
* @param {Event} e The event.
|
|
60
|
+
*/
|
|
61
|
+
__publicField(this, "onTouchEnd", (e) => {
|
|
62
|
+
e.preventDefault();
|
|
63
|
+
this.hoverValue = 0;
|
|
64
|
+
this.changeRate();
|
|
65
|
+
});
|
|
66
|
+
/**
|
|
67
|
+
* Event handler for the touch move event.
|
|
68
|
+
* @param {Event} e The event.
|
|
69
|
+
*/
|
|
70
|
+
__publicField(this, "onTouchMove", (e) => {
|
|
71
|
+
e.preventDefault();
|
|
72
|
+
this.hoverValue = this.getValueFromXPosition(e.touches[0].clientX);
|
|
73
|
+
this.changeRate();
|
|
74
|
+
});
|
|
75
|
+
/**
|
|
76
|
+
* Event handler for the click event.
|
|
77
|
+
* @param {Event} e The event.
|
|
78
|
+
*/
|
|
79
|
+
__publicField(this, "onClick", (e) => {
|
|
80
|
+
e.preventDefault();
|
|
81
|
+
this.value = +this.hoverValue;
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Sets the precision of the rating component.
|
|
86
|
+
* @param {number} value The value to set.
|
|
87
|
+
*/
|
|
88
|
+
set precision(value) {
|
|
89
|
+
this.setAttribute("precision", value);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Gets the precision of the rating component.
|
|
93
|
+
* @returns {number} The value of the precision.
|
|
94
|
+
*/
|
|
95
|
+
get precision() {
|
|
96
|
+
return this.hasAttribute("precision") ? +this.getAttribute("precision") : 1;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Sets the maximum value of the rating component.
|
|
100
|
+
* @param {number} value The value to set.
|
|
101
|
+
*/
|
|
102
|
+
set max(value) {
|
|
103
|
+
this.setAttribute("max", value);
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Gets the maximum value of the rating component.
|
|
107
|
+
* @returns {number} The value of the maximum value.
|
|
108
|
+
*/
|
|
109
|
+
get max() {
|
|
110
|
+
return this.hasAttribute("icons") ? this.icons.length : +this.getAttribute("max");
|
|
111
|
+
}
|
|
112
|
+
/**
|
|
113
|
+
* Sets the icons of the rating component.
|
|
114
|
+
* @param {Array<string>} value The value to set.
|
|
115
|
+
*/
|
|
116
|
+
set icons(value) {
|
|
117
|
+
return value;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Gets the icons of the rating component.
|
|
121
|
+
* @returns {Array<string>} The value of the icons.
|
|
122
|
+
*/
|
|
123
|
+
get icons() {
|
|
124
|
+
return this.hasAttribute("icons") ? JSON.parse(this.getAttribute("icons").replace(/'/g, '"')) : ["star"];
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Sets the value of the rating component.
|
|
128
|
+
* @param {number} value The value to set.
|
|
129
|
+
*/
|
|
130
|
+
set value(value) {
|
|
131
|
+
this.setAttribute("value", value);
|
|
132
|
+
}
|
|
133
|
+
/**
|
|
134
|
+
* Gets the value of the rating component.
|
|
135
|
+
* @returns {number} The value of the rating component.
|
|
136
|
+
*/
|
|
137
|
+
get value() {
|
|
138
|
+
return this.hasAttribute("value") ? +this.getAttribute("value") : 0;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Returns the CSS styles for the component.
|
|
142
|
+
* @static
|
|
143
|
+
* @returns {CSSStyleSheet}
|
|
144
|
+
*/
|
|
145
|
+
static get cssStyleSheet() {
|
|
146
|
+
return styles;
|
|
147
|
+
}
|
|
148
|
+
/**
|
|
149
|
+
* Returns the list of attributes to observe for changes.
|
|
150
|
+
* @static
|
|
151
|
+
* @returns {Array<string>}
|
|
152
|
+
*/
|
|
153
|
+
static get observedAttributes() {
|
|
154
|
+
return ["is-hover"];
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* Called when an attribute changes.
|
|
158
|
+
* @param {string} name The name of the attribute that changed.
|
|
159
|
+
* @param {string} old The old value of the attribute.
|
|
160
|
+
* @param {string} newName The new value of the attribute.
|
|
161
|
+
*/
|
|
162
|
+
attributeChangedCallback(name, old, newName) {
|
|
163
|
+
}
|
|
164
|
+
/**
|
|
165
|
+
* Sets up the attributes for the component.
|
|
166
|
+
*/
|
|
167
|
+
setupAttributes() {
|
|
168
|
+
this.isShadowRoot = "open";
|
|
169
|
+
}
|
|
170
|
+
/**
|
|
171
|
+
* Draws the component for the rating component.
|
|
172
|
+
* @returns {DocumentFragment}
|
|
173
|
+
*/
|
|
174
|
+
draw() {
|
|
175
|
+
let fragment = document.createDocumentFragment();
|
|
176
|
+
let native = document.createElement("div");
|
|
177
|
+
native.setAttribute("part", "native");
|
|
178
|
+
native.classList.add("native-rate");
|
|
179
|
+
this.native = native;
|
|
180
|
+
if (this.hasAttribute("icons")) {
|
|
181
|
+
let icons = this.icons;
|
|
182
|
+
for (let i = 0; i < icons.length; i++) {
|
|
183
|
+
native.appendChild(this.createIcons(i));
|
|
184
|
+
}
|
|
185
|
+
} else {
|
|
186
|
+
for (let i = 0; i < this.max; i++) {
|
|
187
|
+
native.appendChild(this.createIcons(i));
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
this.changeRate();
|
|
191
|
+
fragment.appendChild(native);
|
|
192
|
+
return fragment;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Adds event listeners after the component is drawn.
|
|
196
|
+
*/
|
|
197
|
+
afterDraw() {
|
|
198
|
+
if (this.hasAttribute("disabled") || this.hasAttribute("readonly")) {
|
|
199
|
+
return;
|
|
200
|
+
}
|
|
201
|
+
this.addEventListener("mouseenter", this.onMouseEnter);
|
|
202
|
+
this.addEventListener("mouseleave", this.onMouseLeave);
|
|
203
|
+
this.addEventListener("mousemove", this.onMouseMove);
|
|
204
|
+
this.addEventListener("touchstart", this.onTouchStart);
|
|
205
|
+
this.addEventListener("touchend", this.onTouchEnd);
|
|
206
|
+
this.addEventListener("touchmove", this.onTouchMove);
|
|
207
|
+
this.addEventListener("click", this.onClick);
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Creates the icons for the rating component.
|
|
211
|
+
* @param {number} i The index of the icon.
|
|
212
|
+
* @returns {Element} The icon element.
|
|
213
|
+
*/
|
|
214
|
+
createIcons(i) {
|
|
215
|
+
let div = document.createElement("div");
|
|
216
|
+
div.classList.add("wje-rate-icon");
|
|
217
|
+
let icon = this.getIcons(i);
|
|
218
|
+
let clone = icon.cloneNode(true);
|
|
219
|
+
div.appendChild(icon);
|
|
220
|
+
div.appendChild(clone);
|
|
221
|
+
return div;
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Changes the rate of the rating component.
|
|
225
|
+
*/
|
|
226
|
+
changeRate() {
|
|
227
|
+
const icons = this.native.children;
|
|
228
|
+
const rateValue = this.value !== this.hoverValue && this.hoverValue !== 0 && this.hoverValue !== void 0 ? this.hoverValue : this.value;
|
|
229
|
+
for (let i = 0; i < icons.length; i++) {
|
|
230
|
+
const icon = icons[i];
|
|
231
|
+
const firstIcon = icon.querySelector("wje-icon:first-child");
|
|
232
|
+
const lastIcon = icon.querySelector("wje-icon:last-child");
|
|
233
|
+
const isSelected = i < rateValue;
|
|
234
|
+
const isPartial = rateValue > i && rateValue < i + 1;
|
|
235
|
+
if (isSelected) {
|
|
236
|
+
icon.classList.add("selected");
|
|
237
|
+
if (this.hasAttribute("selected") && this.getAttribute("selected") === "filled") {
|
|
238
|
+
lastIcon.setAttribute("filled", "");
|
|
239
|
+
}
|
|
240
|
+
} else {
|
|
241
|
+
icon.classList.remove("selected");
|
|
242
|
+
lastIcon.removeAttribute("filled");
|
|
243
|
+
}
|
|
244
|
+
if (isPartial) {
|
|
245
|
+
const percent = ((rateValue - i) * 100).toFixed(2);
|
|
246
|
+
icon.classList.add("half");
|
|
247
|
+
firstIcon.style.clipPath = `inset(0 0 0 ${percent}%)`;
|
|
248
|
+
lastIcon.style.clipPath = `inset(0 ${100 - percent}% 0 0)`;
|
|
249
|
+
lastIcon.removeAttribute("hidden");
|
|
250
|
+
} else {
|
|
251
|
+
icon.classList.remove("half");
|
|
252
|
+
firstIcon.style.clipPath = ``;
|
|
253
|
+
lastIcon.style.clipPath = ``;
|
|
254
|
+
lastIcon.setAttribute("hidden", "");
|
|
255
|
+
}
|
|
256
|
+
icon.setAttribute("data-index", i);
|
|
257
|
+
icon.setAttribute("data-rate", rateValue);
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
/**
|
|
261
|
+
* Returns the icons for the rating component.
|
|
262
|
+
* @param {number} index The index of the icon.
|
|
263
|
+
* @returns {Element} The icon element.
|
|
264
|
+
*/
|
|
265
|
+
getIcons(index) {
|
|
266
|
+
let icon = document.createElement("wje-icon");
|
|
267
|
+
icon.setAttribute("name", this.max ? this.icons[0] : this.icons[index]);
|
|
268
|
+
if (this.hasAttribute("filled")) icon.setAttribute("filled", "");
|
|
269
|
+
return icon;
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Returns the value from the x position.
|
|
273
|
+
* @param {number} coordinate The x coordinate.
|
|
274
|
+
* @returns {number} The value from the x position.
|
|
275
|
+
*/
|
|
276
|
+
getValueFromXPosition(coordinate) {
|
|
277
|
+
const { left, right, width } = this.native.getBoundingClientRect();
|
|
278
|
+
const value = this.roundToPrecision((coordinate - left) / width * this.max, this.precision);
|
|
279
|
+
return Math.min(Math.max(value, 0), this.max);
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* Rounds a given number to the nearest specified precision.
|
|
283
|
+
* @param {number} numberToRound The number to be rounded.
|
|
284
|
+
* @param {number} [precision] The precision to which the number should be rounded.
|
|
285
|
+
* @returns {number} - The rounded number.
|
|
286
|
+
* @example
|
|
287
|
+
* roundToPrecision(2.3); // Returns 2.5
|
|
288
|
+
* roundToPrecision(2.3, 0.1); // Returns 2.3
|
|
289
|
+
* roundToPrecision(2.6, 1); // Returns 3
|
|
290
|
+
*/
|
|
291
|
+
roundToPrecision(numberToRound, precision = 0.5) {
|
|
292
|
+
const multiplier = 1 / precision;
|
|
293
|
+
return Math.ceil(numberToRound * multiplier) / multiplier;
|
|
294
|
+
}
|
|
295
|
+
}
|
|
296
|
+
Rate.define("wje-rate", Rate);
|
|
297
|
+
export {
|
|
298
|
+
Rate as default
|
|
299
|
+
};
|
|
300
|
+
//# sourceMappingURL=wje-rate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wje-rate.js","sources":["../packages/wje-rate/rate.element.js","../packages/wje-rate/rate.js"],"sourcesContent":["import { default as WJElement } from '../wje-element/element.js';\nimport styles from './styles/styles.css?inline';\n\n/**\n * `Rate` is a custom web component that represents a rating component.\n * @summary This element represents a rating component.\n * @documentation https://elements.webjet.sk/components/rate\n * @status stable\n * @augments {WJElement}\n * @attribute {number} precision - The precision of the rating component.\n * @attribute {number} max - The maximum value of the rating component.\n * @attribute {Array<string>} icons - The icons of the rating component.\n * @csspart native - The native part of the rating component.\n * @cssproperty [--wje-rate-gap=.25rem] - Defines the spacing (gap) between individual items in the rating component. Accepts any valid CSS length unit (e.g., `px`, `rem`, `em`) to adjust the distance between rating elements.\n * @cssproperty [--wje-rate-color=var(--wje-color-contrast-11)] - Specifies the default color of the rating items. Accepts any valid CSS color value, including named colors, hex values, RGB, or CSS variables.\n * @cssproperty [--wje-rate-selected-color=var(--wje-color-danger-9)] - Sets the color for selected or highlighted rating items. This property helps visually distinguish selected ratings. Accepts any valid CSS color value.\n * @tag wje-rate\n */\n\nexport default class Rate extends WJElement {\n /**\n * Creates an instance of Rate.\n * @class\n */\n constructor() {\n super();\n }\n\n /**\n * Sets the precision of the rating component.\n * @param {number} value The value to set.\n */\n set precision(value) {\n this.setAttribute('precision', value);\n }\n\n /**\n * Gets the precision of the rating component.\n * @returns {number} The value of the precision.\n */\n get precision() {\n return this.hasAttribute('precision') ? +this.getAttribute('precision') : 1;\n }\n\n /**\n * Sets the maximum value of the rating component.\n * @param {number} value The value to set.\n */\n set max(value) {\n this.setAttribute('max', value);\n }\n\n /**\n * Gets the maximum value of the rating component.\n * @returns {number} The value of the maximum value.\n */\n get max() {\n return this.hasAttribute('icons') ? this.icons.length : +this.getAttribute('max');\n }\n\n /**\n * Sets the icons of the rating component.\n * @param {Array<string>} value The value to set.\n */\n set icons(value) {\n return value;\n }\n\n /**\n * Gets the icons of the rating component.\n * @returns {Array<string>} The value of the icons.\n */\n get icons() {\n return this.hasAttribute('icons') ? JSON.parse(this.getAttribute('icons').replace(/'/g, '\"')) : ['star'];\n }\n\n /**\n * Sets the value of the rating component.\n * @param {number} value The value to set.\n */\n set value(value) {\n this.setAttribute('value', value);\n }\n\n /**\n * Gets the value of the rating component.\n * @returns {number} The value of the rating component.\n */\n get value() {\n return this.hasAttribute('value') ? +this.getAttribute('value') : 0;\n }\n\n /**\n * Sets the hover value of the rating component.\n * @type {string}\n */\n className = 'Rate';\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 * Returns the list of attributes to observe for changes.\n * @static\n * @returns {Array<string>}\n */\n static get observedAttributes() {\n return ['is-hover'];\n }\n\n /**\n * Called when an attribute changes.\n * @param {string} name The name of the attribute that changed.\n * @param {string} old The old value of the attribute.\n * @param {string} newName The new value of the attribute.\n */\n attributeChangedCallback(name, old, newName) {\n if (name === 'is-hover') {\n // this.draw();\n }\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 rating component.\n * @returns {DocumentFragment}\n */\n draw() {\n let fragment = document.createDocumentFragment();\n\n let native = document.createElement('div');\n native.setAttribute('part', 'native');\n native.classList.add('native-rate');\n\n this.native = native;\n\n if (this.hasAttribute('icons')) {\n let icons = this.icons;\n for (let i = 0; i < icons.length; i++) {\n native.appendChild(this.createIcons(i));\n }\n } else {\n for (let i = 0; i < this.max; i++) {\n native.appendChild(this.createIcons(i));\n }\n }\n\n this.changeRate();\n\n fragment.appendChild(native);\n\n return fragment;\n }\n\n /**\n * Adds event listeners after the component is drawn.\n */\n afterDraw() {\n if (this.hasAttribute('disabled') || this.hasAttribute('readonly')) {\n return;\n }\n\n this.addEventListener('mouseenter', this.onMouseEnter);\n this.addEventListener('mouseleave', this.onMouseLeave);\n this.addEventListener('mousemove', this.onMouseMove);\n this.addEventListener('touchstart', this.onTouchStart);\n this.addEventListener('touchend', this.onTouchEnd);\n this.addEventListener('touchmove', this.onTouchMove);\n this.addEventListener('click', this.onClick);\n }\n\n /**\n * Creates the icons for the rating component.\n * @param {number} i The index of the icon.\n * @returns {Element} The icon element.\n */\n createIcons(i) {\n let div = document.createElement('div');\n div.classList.add('wje-rate-icon');\n\n let icon = this.getIcons(i);\n let clone = icon.cloneNode(true);\n\n div.appendChild(icon);\n div.appendChild(clone);\n\n return div;\n }\n\n /**\n * Changes the rate of the rating component.\n */\n changeRate() {\n const icons = this.native.children;\n const rateValue =\n this.value !== this.hoverValue && this.hoverValue !== 0 && this.hoverValue !== undefined\n ? this.hoverValue\n : this.value;\n\n for (let i = 0; i < icons.length; i++) {\n const icon = icons[i];\n const firstIcon = icon.querySelector('wje-icon:first-child');\n const lastIcon = icon.querySelector('wje-icon:last-child');\n\n const isSelected = i < rateValue;\n const isPartial = rateValue > i && rateValue < i + 1;\n\n if (isSelected) {\n icon.classList.add('selected');\n if (this.hasAttribute('selected') && this.getAttribute('selected') === 'filled') {\n lastIcon.setAttribute('filled', '');\n }\n } else {\n icon.classList.remove('selected');\n lastIcon.removeAttribute('filled');\n }\n\n if (isPartial) {\n const percent = ((rateValue - i) * 100).toFixed(2);\n icon.classList.add('half');\n\n firstIcon.style.clipPath = `inset(0 0 0 ${percent}%)`;\n lastIcon.style.clipPath = `inset(0 ${100 - percent}% 0 0)`;\n\n lastIcon.removeAttribute('hidden');\n } else {\n icon.classList.remove('half');\n firstIcon.style.clipPath = ``;\n lastIcon.style.clipPath = ``;\n lastIcon.setAttribute('hidden', '');\n }\n\n icon.setAttribute('data-index', i);\n icon.setAttribute('data-rate', rateValue);\n }\n }\n\n /**\n * Event handler for the mouse enter event.\n * @param {Event} e The event.\n */\n onMouseEnter = (e) => {\n e.preventDefault();\n\n this.hoverValue = this.getValueFromXPosition(e.clientX);\n this.changeRate();\n };\n\n /**\n * Event handler for the mouse leave event.\n * @param {Event} e The event.\n */\n onMouseLeave = (e) => {\n e.preventDefault();\n\n this.hoverValue = 0;\n this.changeRate();\n };\n\n /**\n * Event handler for the mouse move event.\n * @param {Event} e The event.\n */\n onMouseMove = (e) => {\n e.preventDefault();\n\n let newValue = +this.getValueFromXPosition(e.clientX);\n if (newValue !== +this.hoverValue) {\n this.hoverValue = newValue;\n this.changeRate();\n }\n };\n\n /**\n * Event handler for the touch start event.\n * @param {Event} e The event.\n */\n onTouchStart = (e) => {\n e.preventDefault();\n\n this.hoverValue = this.getValueFromXPosition(e.touches[0].clientX);\n this.changeRate();\n };\n\n /**\n * Event handler for the touch end event.\n * @param {Event} e The event.\n */\n onTouchEnd = (e) => {\n e.preventDefault();\n\n this.hoverValue = 0;\n this.changeRate();\n };\n\n /**\n * Event handler for the touch move event.\n * @param {Event} e The event.\n */\n onTouchMove = (e) => {\n e.preventDefault();\n\n this.hoverValue = this.getValueFromXPosition(e.touches[0].clientX);\n this.changeRate();\n };\n\n /**\n * Event handler for the click event.\n * @param {Event} e The event.\n */\n onClick = (e) => {\n e.preventDefault();\n\n this.value = +this.hoverValue;\n };\n\n /**\n * Returns the icons for the rating component.\n * @param {number} index The index of the icon.\n * @returns {Element} The icon element.\n */\n getIcons(index) {\n let icon = document.createElement('wje-icon');\n icon.setAttribute('name', this.max ? this.icons[0] : this.icons[index]);\n\n if (this.hasAttribute('filled')) icon.setAttribute('filled', '');\n\n return icon;\n }\n\n /**\n * Returns the value from the x position.\n * @param {number} coordinate The x coordinate.\n * @returns {number} The value from the x position.\n */\n getValueFromXPosition(coordinate) {\n const { left, right, width } = this.native.getBoundingClientRect();\n const value = this.roundToPrecision(((coordinate - left) / width) * this.max, this.precision);\n\n return Math.min(Math.max(value, 0), this.max);\n }\n\n /**\n * Rounds a given number to the nearest specified precision.\n * @param {number} numberToRound The number to be rounded.\n * @param {number} [precision] The precision to which the number should be rounded.\n * @returns {number} - The rounded number.\n * @example\n * roundToPrecision(2.3); // Returns 2.5\n * roundToPrecision(2.3, 0.1); // Returns 2.3\n * roundToPrecision(2.6, 1); // Returns 3\n */\n roundToPrecision(numberToRound, precision = 0.5) {\n const multiplier = 1 / precision;\n return Math.ceil(numberToRound * multiplier) / multiplier;\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KAAK,MAAM,CAAC,IAAI,KAAK,MAAM,KAAK,CAAC;AAEtE,QAAI,KAAK,aAAa,QAAQ,EAAG,MAAK,aAAa,UAAU,EAAE;AAE/D,WAAO;AAAA,EACf;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAOI,sBAAsB,YAAY;AAC9B,UAAM,EAAE,MAAM,OAAO,MAAO,IAAG,KAAK,OAAO,sBAAuB;AAClE,UAAM,QAAQ,KAAK,kBAAmB,aAAa,QAAQ,QAAS,KAAK,KAAK,KAAK,SAAS;AAE5F,WAAO,KAAK,IAAI,KAAK,IAAI,OAAO,CAAC,GAAG,KAAK,GAAG;AAAA,EACpD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAYI,iBAAiB,eAAe,YAAY,KAAK;AAC7C,UAAM,aAAa,IAAI;AACvB,WAAO,KAAK,KAAK,gBAAgB,UAAU,IAAI;AAAA,EACvD;AACA;AC5WA,KAAK,OAAO,YAAY,IAAI;"}
|
|
@@ -0,0 +1,115 @@
|
|
|
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 { Localizer } from "./localize.js";
|
|
5
|
+
import WJElement from "./wje-element.js";
|
|
6
|
+
class RelativeTime extends WJElement {
|
|
7
|
+
/**
|
|
8
|
+
* Creates an instance of RelativeTime.
|
|
9
|
+
* @class
|
|
10
|
+
*/
|
|
11
|
+
constructor() {
|
|
12
|
+
super();
|
|
13
|
+
/**
|
|
14
|
+
* Sets the lang of the relative time component.
|
|
15
|
+
* @type {string}
|
|
16
|
+
*/
|
|
17
|
+
__publicField(this, "className", "RelativeTime");
|
|
18
|
+
this.localizer = new Localizer(this);
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Sets the date of the relative time component.
|
|
22
|
+
* @param value
|
|
23
|
+
*/
|
|
24
|
+
set date(value) {
|
|
25
|
+
this.setAttribute("date", value);
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Gets the date of the relative time component.
|
|
29
|
+
* @returns {string}
|
|
30
|
+
*/
|
|
31
|
+
get date() {
|
|
32
|
+
return this.getAttribute("date");
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Sets the object date of the relative time component.
|
|
36
|
+
* @param value
|
|
37
|
+
*/
|
|
38
|
+
set objectDate(value) {
|
|
39
|
+
this.setAttribute("object-date", value);
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Gets the object date of the relative time component.
|
|
43
|
+
* @returns {Date}
|
|
44
|
+
*/
|
|
45
|
+
get objectDate() {
|
|
46
|
+
let date = /* @__PURE__ */ new Date();
|
|
47
|
+
let inputDate = this.date;
|
|
48
|
+
if (!!inputDate && inputDate !== "") {
|
|
49
|
+
inputDate = this.isISODate(inputDate) ? inputDate : +inputDate * 1e3;
|
|
50
|
+
date = new Date(inputDate);
|
|
51
|
+
}
|
|
52
|
+
return date;
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Returns the list of attributes to observe for changes.
|
|
56
|
+
* @static
|
|
57
|
+
* @returns {Array<string>}
|
|
58
|
+
*/
|
|
59
|
+
static get observedAttributes() {
|
|
60
|
+
return [];
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Sets up the attributes for the component.
|
|
64
|
+
*/
|
|
65
|
+
setupAttributes() {
|
|
66
|
+
this.isShadowRoot = "open";
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Draws the component for the relative time.
|
|
70
|
+
* @returns {DocumentFragment}
|
|
71
|
+
*/
|
|
72
|
+
draw() {
|
|
73
|
+
let fragment = document.createDocumentFragment();
|
|
74
|
+
let element = document.createElement("div");
|
|
75
|
+
element.setAttribute("part", "native");
|
|
76
|
+
element.classList.add("native-relative-time");
|
|
77
|
+
element.innerText = this.getRelativeTimeString();
|
|
78
|
+
fragment.appendChild(element);
|
|
79
|
+
return fragment;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Returns the relative time string for the given date.
|
|
83
|
+
*/
|
|
84
|
+
getRelativeTimeString(lang = navigator.language) {
|
|
85
|
+
if (this.objectDate.toString() === "Invalid Date" || this.objectDate.toString() === "NaN") {
|
|
86
|
+
return "";
|
|
87
|
+
}
|
|
88
|
+
const timeMs = this.objectDate.getTime();
|
|
89
|
+
const deltaSeconds = Math.round((timeMs - Date.now()) / 1e3);
|
|
90
|
+
const cutoffs = [60, 3600, 86400, 86400 * 7, 86400 * 30, 86400 * 365, Infinity];
|
|
91
|
+
const units = ["second", "minute", "hour", "day", "week", "month", "year"];
|
|
92
|
+
const unitIndex = cutoffs.findIndex((cutoff) => cutoff > Math.abs(deltaSeconds));
|
|
93
|
+
const divisor = unitIndex ? cutoffs[unitIndex - 1] : 1;
|
|
94
|
+
return this.localizer.relativeTime(
|
|
95
|
+
this.getAttribute("lang"),
|
|
96
|
+
Math.floor(deltaSeconds / divisor),
|
|
97
|
+
units[unitIndex],
|
|
98
|
+
{ numeric: "auto" }
|
|
99
|
+
);
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Checks if the given string is an ISO date.
|
|
103
|
+
* @param {string} str The string to check.
|
|
104
|
+
* @returns {boolean} True if the string is an ISO date, false otherwise.
|
|
105
|
+
*/
|
|
106
|
+
isISODate(str) {
|
|
107
|
+
const date = new Date(str);
|
|
108
|
+
return !isNaN(date.getTime());
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
RelativeTime.define("wje-relative-time", RelativeTime);
|
|
112
|
+
export {
|
|
113
|
+
RelativeTime as default
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=wje-relative-time.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wje-relative-time.js","sources":["../packages/wje-relative-time/relative-time.element.js","../packages/wje-relative-time/relative-time.js"],"sourcesContent":["import { Localizer } from '../utils/localize.js';\nimport { default as WJElement } from '../wje-element/element.js';\n\n/**\n * `RelativeTime` is a custom web component that represents a relative time component.\n * @summary This element represents a relative time component.\n * @documentation https://elements.webjet.sk/components/relative-time\n * @status stable\n * @augments WJElement\n * @csspart native - The native part of the relative time component.\n * @tag wje-relative-time\n */\n\nexport default class RelativeTime extends WJElement {\n /**\n * Creates an instance of RelativeTime.\n * @class\n */\n constructor() {\n super();\n this.localizer = new Localizer(this);\n }\n\n /**\n * Sets the date of the relative time component.\n * @param value\n */\n set date(value) {\n this.setAttribute('date', value);\n }\n\n /**\n * Gets the date of the relative time component.\n * @returns {string}\n */\n get date() {\n return this.getAttribute('date');\n }\n\n /**\n * Sets the object date of the relative time component.\n * @param value\n */\n set objectDate(value) {\n this.setAttribute('object-date', value);\n }\n\n /**\n * Gets the object date of the relative time component.\n * @returns {Date}\n */\n get objectDate() {\n let date = new Date();\n let inputDate = this.date;\n\n if (!!inputDate && inputDate !== '') {\n inputDate = this.isISODate(inputDate) ? inputDate : +inputDate * 1000;\n\n date = new Date(inputDate);\n }\n\n return date;\n }\n\n /**\n * Sets the lang of the relative time component.\n * @type {string}\n */\n className = 'RelativeTime';\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 /**\n * Sets up the attributes for the component.\n */\n setupAttributes() {\n this.isShadowRoot = 'open';\n }\n\n /**\n * Draws the component for the relative time.\n * @returns {DocumentFragment}\n */\n draw() {\n let fragment = document.createDocumentFragment();\n\n let element = document.createElement('div');\n element.setAttribute('part', 'native');\n element.classList.add('native-relative-time');\n element.innerText = this.getRelativeTimeString();\n\n fragment.appendChild(element);\n\n return fragment;\n }\n\n /**\n * Returns the relative time string for the given date.\n */\n getRelativeTimeString(lang = navigator.language) {\n if (this.objectDate.toString() === 'Invalid Date' || this.objectDate.toString() === 'NaN') {\n return '';\n }\n\n const timeMs = this.objectDate.getTime();\n\n const deltaSeconds = Math.round((timeMs - Date.now()) / 1000);\n\n const cutoffs = [60, 3600, 86400, 86400 * 7, 86400 * 30, 86400 * 365, Infinity];\n\n const units = ['second', 'minute', 'hour', 'day', 'week', 'month', 'year'];\n const unitIndex = cutoffs.findIndex((cutoff) => cutoff > Math.abs(deltaSeconds));\n const divisor = unitIndex ? cutoffs[unitIndex - 1] : 1;\n\n return this.localizer.relativeTime(\n this.getAttribute('lang'),\n Math.floor(deltaSeconds / divisor),\n units[unitIndex],\n { numeric: 'auto' }\n );\n }\n\n /**\n * Checks if the given string is an ISO date.\n * @param {string} str The string to check.\n * @returns {boolean} True if the string is an ISO date, false otherwise.\n */\n isISODate(str) {\n const date = new Date(str);\n return !isNaN(date.getTime());\n }\n}\n","import RelativeTime from './relative-time.element.js';\n\nexport default RelativeTime;\n\nRelativeTime.define('wje-relative-time', RelativeTime);\n"],"names":[],"mappings":";;;;;AAae,MAAM,qBAAqB,UAAU;AAAA;AAAA;AAAA;AAAA;AAAA,EAKhD,cAAc;AACV,UAAO;AAiDX;AAAA;AAAA;AAAA;AAAA,qCAAY;AAhDR,SAAK,YAAY,IAAI,UAAU,IAAI;AAAA,EAC3C;AAAA;AAAA;AAAA;AAAA;AAAA,EAMI,IAAI,KAAK,OAAO;AACZ,SAAK,aAAa,QAAQ,KAAK;AAAA,EACvC;AAAA;AAAA;AAAA;AAAA;AAAA,EAMI,IAAI,OAAO;AACP,WAAO,KAAK,aAAa,MAAM;AAAA,EACvC;AAAA;AAAA;AAAA;AAAA;AAAA,EAMI,IAAI,WAAW,OAAO;AAClB,SAAK,aAAa,eAAe,KAAK;AAAA,EAC9C;AAAA;AAAA;AAAA;AAAA;AAAA,EAMI,IAAI,aAAa;AACb,QAAI,OAAO,oBAAI,KAAM;AACrB,QAAI,YAAY,KAAK;AAErB,QAAI,CAAC,CAAC,aAAa,cAAc,IAAI;AACjC,kBAAY,KAA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AAA;AAAA;AAAA;AAAA;AAAA,EAOI,UAAU,KAAK;AACX,UAAM,OAAO,IAAI,KAAK,GAAG;AACzB,WAAO,CAAC,MAAM,KAAK,SAAS;AAAA,EACpC;AACA;ACtIA,aAAa,OAAO,qBAAqB,YAAY;"}
|
|
@@ -0,0 +1,49 @@
|
|
|
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 = ".dropzone {\n border: 1px dashed lightgrey;\n border-radius: var(--wje-border-radius-small);\n margin: 0.5rem;\n display: flex;\n flex-direction: column;\n align-items: center;\n overflow: hidden;\n justify-content: center;\n min-height: 250px;\n width: 200px;\n}\n";
|
|
6
|
+
class ReorderDropzone extends WJElement {
|
|
7
|
+
/**
|
|
8
|
+
* Creates an instance of ReorderDropzone.
|
|
9
|
+
*/
|
|
10
|
+
constructor() {
|
|
11
|
+
super();
|
|
12
|
+
/**
|
|
13
|
+
* The class name for the component.
|
|
14
|
+
* @type {string}
|
|
15
|
+
*/
|
|
16
|
+
__publicField(this, "className", "ReorderDropzone");
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Returns the CSS stylesheet for the component.
|
|
20
|
+
* @returns {CSSStyleSheet} The CSS stylesheet.
|
|
21
|
+
*/
|
|
22
|
+
static get cssStyleSheet() {
|
|
23
|
+
return styles;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Sets up the attributes for the component.
|
|
27
|
+
*/
|
|
28
|
+
setupAttributes() {
|
|
29
|
+
this.isShadowRoot = "open";
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Returns the list of observed attributes.
|
|
33
|
+
* @returns {DocumentFragment}
|
|
34
|
+
*/
|
|
35
|
+
draw() {
|
|
36
|
+
let fragment = document.createDocumentFragment();
|
|
37
|
+
let dropzone = document.createElement("div");
|
|
38
|
+
dropzone.classList.add("dropzone");
|
|
39
|
+
let slot = document.createElement("slot");
|
|
40
|
+
dropzone.appendChild(slot);
|
|
41
|
+
fragment.appendChild(dropzone);
|
|
42
|
+
return fragment;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
ReorderDropzone.define("wje-reorder-dropzone", ReorderDropzone);
|
|
46
|
+
export {
|
|
47
|
+
ReorderDropzone as default
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=wje-reorder-dropzone.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wje-reorder-dropzone.js","sources":["../packages/wje-reorder-dropzone/reorder-dropzone.element.js","../packages/wje-reorder-dropzone/reorder-dropzone.js"],"sourcesContent":["import { default as WJElement } from '../wje-element/element.js';\nimport styles from './styles/styles.css?inline';\n\n/**\n * `ReorderDropzone` is a custom web component that represents a reorder dropzone.\n * @summary This element represents a reorder dropzone.\n * @documentation https://elements.webjet.sk/components/reorder-dropzone\n * @status stable\n * @augments WJElement\n * @csspart native - The native part of the reorder dropzone.\n * @slot - The default slot for the reorder dropzone.\n * @tag wje-reorder-dropzone\n */\nexport default class ReorderDropzone extends WJElement {\n /**\n * Creates an instance of ReorderDropzone.\n */\n constructor() {\n super();\n }\n\n /**\n * The class name for the component.\n * @type {string}\n */\n className = 'ReorderDropzone';\n\n /**\n * Returns the CSS stylesheet for the component.\n * @returns {CSSStyleSheet} The CSS stylesheet.\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 * Returns the list of observed attributes.\n * @returns {DocumentFragment}\n */\n draw() {\n let fragment = document.createDocumentFragment();\n\n let dropzone = document.createElement('div');\n dropzone.classList.add('dropzone');\n\n let slot = document.createElement('slot');\n\n dropzone.appendChild(slot);\n\n fragment.appendChild(dropzone);\n\n return fragment;\n }\n}\n","import ReorderDropzone from './reorder-dropzone.element';\n\nexport default ReorderDropzone;\n\nReorderDropzone.define('wje-reorder-dropzone', ReorderDropzone);\n"],"names":[],"mappings":";;;;;AAae,MAAM,wBAAwB,UAAU;AAAA;AAAA;AAAA;AAAA,EAInD,cAAc;AACV,UAAO;AAOX;AAAA;AAAA;AAAA;AAAA,qCAAY;AAAA,EANhB;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,WAAW,SAAS,cAAc,KAAK;AAC3C,aAAS,UAAU,IAAI,UAAU;AAEjC,QAAI,OAAO,SAAS,cAAc,MAAM;AAExC,aAAS,YAAY,IAAI;AAEzB,aAAS,YAAY,QAAQ;AAE7B,WAAO;AAAA,EACf;AACA;ACxDA,gBAAgB,OAAO,wBAAwB,eAAe;"}
|