atomicuilibrary 0.0.1
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/LICENSE +21 -0
- package/README.md +111 -0
- package/dist/cjs/category-section.cjs.entry.js +30 -0
- package/dist/cjs/component-size-DsYFUZcz.js +29 -0
- package/dist/cjs/dom-oP1E4Rd3.js +267 -0
- package/dist/cjs/event-bus-B6M2f8CQ.js +23 -0
- package/dist/cjs/exploration-project-tailwind.cjs.js +24 -0
- package/dist/cjs/focus-trap-i9T6oXLc.js +139 -0
- package/dist/cjs/index-ClkOYpT8.js +2275 -0
- package/dist/cjs/index.cjs.js +260 -0
- package/dist/cjs/layout-manager.cjs.entry.js +616 -0
- package/dist/cjs/library-card.cjs.entry.js +63 -0
- package/dist/cjs/lm-container_2.cjs.entry.js +79 -0
- package/dist/cjs/lm-panel_3.cjs.entry.js +108 -0
- package/dist/cjs/loader.cjs.js +12 -0
- package/dist/cjs/my-component.cjs.entry.js +33 -0
- package/dist/cjs/my-step.cjs.entry.js +29 -0
- package/dist/cjs/nav-bar.cjs.entry.js +247 -0
- package/dist/cjs/security-E1JcwxGc.js +1547 -0
- package/dist/cjs/smart-step.cjs.entry.js +47 -0
- package/dist/cjs/timeline-item.cjs.entry.js +29 -0
- package/dist/cjs/ui-accordion_10.cjs.entry.js +5733 -0
- package/dist/cjs/ui-advanced-data-table.cjs.entry.js +2684 -0
- package/dist/cjs/ui-anchor.cjs.entry.js +558 -0
- package/dist/cjs/ui-animate-on-scroll.cjs.entry.js +285 -0
- package/dist/cjs/ui-aside-panel.cjs.entry.js +638 -0
- package/dist/cjs/ui-avatar-group_3.cjs.entry.js +634 -0
- package/dist/cjs/ui-breadcrumb-item.cjs.entry.js +56 -0
- package/dist/cjs/ui-breadcrumb.cjs.entry.js +201 -0
- package/dist/cjs/ui-callout-banner.cjs.entry.js +291 -0
- package/dist/cjs/ui-card.cjs.entry.js +411 -0
- package/dist/cjs/ui-carousel.cjs.entry.js +547 -0
- package/dist/cjs/ui-checkbox-group.cjs.entry.js +330 -0
- package/dist/cjs/ui-checkbox.cjs.entry.js +260 -0
- package/dist/cjs/ui-code-editor.cjs.entry.js +961 -0
- package/dist/cjs/ui-code-preview.cjs.entry.js +315 -0
- package/dist/cjs/ui-color-controller.cjs.entry.js +150 -0
- package/dist/cjs/ui-color-picker.cjs.entry.js +658 -0
- package/dist/cjs/ui-command-palette.cjs.entry.js +178 -0
- package/dist/cjs/ui-dialog-box.cjs.entry.js +1808 -0
- package/dist/cjs/ui-dialog-content.cjs.entry.js +31 -0
- package/dist/cjs/ui-dialog-footer_2.cjs.entry.js +193 -0
- package/dist/cjs/ui-divider.cjs.entry.js +481 -0
- package/dist/cjs/ui-dock-host.cjs.entry.js +128 -0
- package/dist/cjs/ui-dock.cjs.entry.js +221 -0
- package/dist/cjs/ui-drag-drop.cjs.entry.js +172 -0
- package/dist/cjs/ui-dropdown_2.cjs.entry.js +1552 -0
- package/dist/cjs/ui-empty-state.cjs.entry.js +398 -0
- package/dist/cjs/ui-fab-item.cjs.entry.js +39 -0
- package/dist/cjs/ui-fab.cjs.entry.js +277 -0
- package/dist/cjs/ui-file-upload.cjs.entry.js +418 -0
- package/dist/cjs/ui-horizontal-nav.cjs.entry.js +135 -0
- package/dist/cjs/ui-image-button.cjs.entry.js +67 -0
- package/dist/cjs/ui-input-pair.cjs.entry.js +44 -0
- package/dist/cjs/ui-knob.cjs.entry.js +447 -0
- package/dist/cjs/ui-library.cjs.entry.js +134 -0
- package/dist/cjs/ui-list-group_2.cjs.entry.js +586 -0
- package/dist/cjs/ui-list.cjs.entry.js +732 -0
- package/dist/cjs/ui-masonry.cjs.entry.js +478 -0
- package/dist/cjs/ui-meter-group.cjs.entry.js +173 -0
- package/dist/cjs/ui-navigation-item.cjs.entry.js +104 -0
- package/dist/cjs/ui-number-input.cjs.entry.js +191 -0
- package/dist/cjs/ui-otp-input.cjs.entry.js +246 -0
- package/dist/cjs/ui-pagination_3.cjs.entry.js +1621 -0
- package/dist/cjs/ui-panel.cjs.entry.js +614 -0
- package/dist/cjs/ui-pattern-input.cjs.entry.js +278 -0
- package/dist/cjs/ui-popover.cjs.entry.js +517 -0
- package/dist/cjs/ui-progress.cjs.entry.js +516 -0
- package/dist/cjs/ui-radio-group.cjs.entry.js +205 -0
- package/dist/cjs/ui-radio.cjs.entry.js +206 -0
- package/dist/cjs/ui-range-slider.cjs.entry.js +637 -0
- package/dist/cjs/ui-resizable-panel.cjs.entry.js +484 -0
- package/dist/cjs/ui-scroll-top.cjs.entry.js +459 -0
- package/dist/cjs/ui-smart-context-menu.cjs.entry.js +376 -0
- package/dist/cjs/ui-smart-location-dropdown.cjs.entry.js +565 -0
- package/dist/cjs/ui-smart-stepper.cjs.entry.js +137 -0
- package/dist/cjs/ui-snackbar.cjs.entry.js +863 -0
- package/dist/cjs/ui-speed-dial.cjs.entry.js +520 -0
- package/dist/cjs/ui-speedometer.cjs.entry.js +428 -0
- package/dist/cjs/ui-splitter.cjs.entry.js +282 -0
- package/dist/cjs/ui-step.cjs.entry.js +30 -0
- package/dist/cjs/ui-stepper.cjs.entry.js +640 -0
- package/dist/cjs/ui-switch.cjs.entry.js +405 -0
- package/dist/cjs/ui-tabs.cjs.entry.js +703 -0
- package/dist/cjs/ui-tag.cjs.entry.js +299 -0
- package/dist/cjs/ui-timeline.cjs.entry.js +267 -0
- package/dist/cjs/ui-timer.cjs.entry.js +502 -0
- package/dist/cjs/ui-toolbar.cjs.entry.js +619 -0
- package/dist/cjs/ui-tooltip.cjs.entry.js +697 -0
- package/dist/cjs/ui-top-bar.cjs.entry.js +121 -0
- package/dist/cjs/ui-transfer-list.cjs.entry.js +592 -0
- package/dist/cjs/ui-tree.cjs.entry.js +874 -0
- package/dist/cjs/ui-workspace-manager.cjs.entry.js +1201 -0
- package/dist/cjs/utils-DVZ6gul6.js +26 -0
- package/dist/collection/assets/js/component-config.js +41 -0
- package/dist/collection/assets/js/demo-loader.js +147 -0
- package/dist/collection/assets/js/demo-nav.js +273 -0
- package/dist/collection/assets/js/demos/about-demo.js +60 -0
- package/dist/collection/assets/js/demos/accordion-demo.js +1954 -0
- package/dist/collection/assets/js/demos/advanced-data-table-demo.js +2952 -0
- package/dist/collection/assets/js/demos/anchor-demo.js +527 -0
- package/dist/collection/assets/js/demos/animate-on-scroll-demo.js +174 -0
- package/dist/collection/assets/js/demos/aside-panel-demo.js +1109 -0
- package/dist/collection/assets/js/demos/avatar-demo.js +508 -0
- package/dist/collection/assets/js/demos/badge-demo.js +620 -0
- package/dist/collection/assets/js/demos/breadcrumb-demo.js +365 -0
- package/dist/collection/assets/js/demos/button-demo.js +1223 -0
- package/dist/collection/assets/js/demos/button-toggle-demo.js +978 -0
- package/dist/collection/assets/js/demos/callout-banner-demo.js +366 -0
- package/dist/collection/assets/js/demos/card-demo.js +427 -0
- package/dist/collection/assets/js/demos/carousel-demo.js +360 -0
- package/dist/collection/assets/js/demos/checkbox-demo.js +489 -0
- package/dist/collection/assets/js/demos/code-preview-demo.js +216 -0
- package/dist/collection/assets/js/demos/color-picker-demo.js +117 -0
- package/dist/collection/assets/js/demos/command-palette-demo.js +105 -0
- package/dist/collection/assets/js/demos/complex-form-demo.js +45 -0
- package/dist/collection/assets/js/demos/context-menu-data.js +436 -0
- package/dist/collection/assets/js/demos/context-menu-demo.js +829 -0
- package/dist/collection/assets/js/demos/dashboard-demo.js +5 -0
- package/dist/collection/assets/js/demos/dialog-demo-temp.js +411 -0
- package/dist/collection/assets/js/demos/dialog-demo.js +2567 -0
- package/dist/collection/assets/js/demos/divider-demo.js +853 -0
- package/dist/collection/assets/js/demos/dock-demo.js +422 -0
- package/dist/collection/assets/js/demos/dock-host-init.js +117 -0
- package/dist/collection/assets/js/demos/dock-host-playground.js +59 -0
- package/dist/collection/assets/js/demos/documentation-demo.js +34 -0
- package/dist/collection/assets/js/demos/drag-drop-demo.js +132 -0
- package/dist/collection/assets/js/demos/dropdown-demo.js +1410 -0
- package/dist/collection/assets/js/demos/dropdown-subtitle-demo.js +18 -0
- package/dist/collection/assets/js/demos/empty-state-demo.js +580 -0
- package/dist/collection/assets/js/demos/fab-demo.js +374 -0
- package/dist/collection/assets/js/demos/file-upload-demo.js +171 -0
- package/dist/collection/assets/js/demos/home-components.js +750 -0
- package/dist/collection/assets/js/demos/home-demo.js +441 -0
- package/dist/collection/assets/js/demos/horizontal-nav-demo.js +277 -0
- package/dist/collection/assets/js/demos/icon-demo.js +380 -0
- package/dist/collection/assets/js/demos/input-demo.js +1932 -0
- package/dist/collection/assets/js/demos/knob-demo.js +570 -0
- package/dist/collection/assets/js/demos/layout-manager-demo.js +918 -0
- package/dist/collection/assets/js/demos/list-demo.js +1402 -0
- package/dist/collection/assets/js/demos/loader-demo.js +453 -0
- package/dist/collection/assets/js/demos/meter-group-demo.js +499 -0
- package/dist/collection/assets/js/demos/multi-level-context-menu-demo.js +924 -0
- package/dist/collection/assets/js/demos/my-profile-demo.js +237 -0
- package/dist/collection/assets/js/demos/nav-bar-demo.js +187 -0
- package/dist/collection/assets/js/demos/number-input-demo.js +242 -0
- package/dist/collection/assets/js/demos/overview-demo.js +11 -0
- package/dist/collection/assets/js/demos/pagination-demo.js +1042 -0
- package/dist/collection/assets/js/demos/panel-demo.js +789 -0
- package/dist/collection/assets/js/demos/pattern-input-demo.js +241 -0
- package/dist/collection/assets/js/demos/popover-demo.js +882 -0
- package/dist/collection/assets/js/demos/progress-demo.js +462 -0
- package/dist/collection/assets/js/demos/radio-demo.js +413 -0
- package/dist/collection/assets/js/demos/range-slider-demo.js +1217 -0
- package/dist/collection/assets/js/demos/rating-demo.js +383 -0
- package/dist/collection/assets/js/demos/scroll-top-demo.js +353 -0
- package/dist/collection/assets/js/demos/skeleton-demo.js +490 -0
- package/dist/collection/assets/js/demos/skeleton-performance-demo.js +26 -0
- package/dist/collection/assets/js/demos/smart-dialog-demo.js +552 -0
- package/dist/collection/assets/js/demos/smart-menu-demo.js +375 -0
- package/dist/collection/assets/js/demos/smart-stepper-demo.js +50 -0
- package/dist/collection/assets/js/demos/snackbar-demo.js +1040 -0
- package/dist/collection/assets/js/demos/speed-dial-demo.js +764 -0
- package/dist/collection/assets/js/demos/speedometer-demo.js +425 -0
- package/dist/collection/assets/js/demos/split-button-demo.js +201 -0
- package/dist/collection/assets/js/demos/stack-demo.js +228 -0
- package/dist/collection/assets/js/demos/stepper-demo.js +798 -0
- package/dist/collection/assets/js/demos/switch-demo.js +849 -0
- package/dist/collection/assets/js/demos/tabs-demo.js +1032 -0
- package/dist/collection/assets/js/demos/tag-demo.js +842 -0
- package/dist/collection/assets/js/demos/theme-selector-demo.js +466 -0
- package/dist/collection/assets/js/demos/timeline-demo.js +365 -0
- package/dist/collection/assets/js/demos/timeline-playground.js +59 -0
- package/dist/collection/assets/js/demos/timer-demo.js +313 -0
- package/dist/collection/assets/js/demos/toolbar-demo.js +643 -0
- package/dist/collection/assets/js/demos/tooltip-demo.js +730 -0
- package/dist/collection/assets/js/demos/top-bar-demo.js +417 -0
- package/dist/collection/assets/js/demos/transfer-list-demo.js +555 -0
- package/dist/collection/assets/js/demos/tree-demo.js +693 -0
- package/dist/collection/assets/js/demos/workspace-manager-demo.js +241 -0
- package/dist/collection/assets/js/index-boot.js +104 -0
- package/dist/collection/assets/js/nav-bar-demo.js +20 -0
- package/dist/collection/assets/js/nav-bar-init.js +119 -0
- package/dist/collection/assets/js/utils/layout-loader.js +80 -0
- package/dist/collection/collection-manifest.json +113 -0
- package/dist/collection/components/accordion/accordion.css +2090 -0
- package/dist/collection/components/accordion/accordion.js +2955 -0
- package/dist/collection/components/accordion/types.js +1 -0
- package/dist/collection/components/advanced-data-table/advanced-data-table.css +2606 -0
- package/dist/collection/components/advanced-data-table/advanced-data-table.js +5394 -0
- package/dist/collection/components/advanced-data-table/types.js +1 -0
- package/dist/collection/components/anchor/anchor.css +395 -0
- package/dist/collection/components/anchor/anchor.js +1404 -0
- package/dist/collection/components/anchor/types.js +1 -0
- package/dist/collection/components/animate-on-scroll/animate-on-scroll.css +804 -0
- package/dist/collection/components/animate-on-scroll/animate-on-scroll.js +696 -0
- package/dist/collection/components/aside-panel/aside-panel.css +472 -0
- package/dist/collection/components/aside-panel/aside-panel.js +1697 -0
- package/dist/collection/components/avatar/avatar.css +696 -0
- package/dist/collection/components/avatar/avatar.js +2007 -0
- package/dist/collection/components/avatar/types.js +1 -0
- package/dist/collection/components/avatar-group/avatar-group.css +253 -0
- package/dist/collection/components/avatar-group/avatar-group.js +405 -0
- package/dist/collection/components/avatar-group/types.js +1 -0
- package/dist/collection/components/badge/badge.css +580 -0
- package/dist/collection/components/badge/badge.js +723 -0
- package/dist/collection/components/badge/types.js +1 -0
- package/dist/collection/components/breadcrumb/breadcrumb-item.js +231 -0
- package/dist/collection/components/breadcrumb/breadcrumb.css +313 -0
- package/dist/collection/components/breadcrumb/breadcrumb.js +510 -0
- package/dist/collection/components/breadcrumb/types.js +1 -0
- package/dist/collection/components/button/button.css +1862 -0
- package/dist/collection/components/button/button.js +1380 -0
- package/dist/collection/components/button/types.js +1 -0
- package/dist/collection/components/button-toggle/button-toggle.css +97 -0
- package/dist/collection/components/button-toggle/button-toggle.js +620 -0
- package/dist/collection/components/button-toggle-group/button-toggle-group.css +401 -0
- package/dist/collection/components/button-toggle-group/button-toggle-group.js +1572 -0
- package/dist/collection/components/button-toggle-group/types.js +1 -0
- package/dist/collection/components/callout-banner/callout-banner.css +684 -0
- package/dist/collection/components/callout-banner/callout-banner.js +1076 -0
- package/dist/collection/components/callout-banner/types.js +1 -0
- package/dist/collection/components/card/card.css +663 -0
- package/dist/collection/components/card/card.js +1697 -0
- package/dist/collection/components/card/types.js +1 -0
- package/dist/collection/components/carousel/carousel.css +549 -0
- package/dist/collection/components/carousel/carousel.js +1512 -0
- package/dist/collection/components/carousel/types.js +1 -0
- package/dist/collection/components/checkbox/checkbox.css +863 -0
- package/dist/collection/components/checkbox/checkbox.js +1201 -0
- package/dist/collection/components/checkbox/types.js +1 -0
- package/dist/collection/components/checkbox-group/checkbox-group.css +223 -0
- package/dist/collection/components/checkbox-group/checkbox-group.js +1001 -0
- package/dist/collection/components/checkbox-group/types.js +1 -0
- package/dist/collection/components/code-editor/code-editor.css +1081 -0
- package/dist/collection/components/code-editor/code-editor.js +1211 -0
- package/dist/collection/components/code-editor/types.js +1 -0
- package/dist/collection/components/code-preview/types.js +1 -0
- package/dist/collection/components/code-preview/ui-code-preview.css +209 -0
- package/dist/collection/components/code-preview/ui-code-preview.js +548 -0
- package/dist/collection/components/color-controller/color-controller.css +108 -0
- package/dist/collection/components/color-controller/color-controller.js +224 -0
- package/dist/collection/components/color-picker/color-picker.css +323 -0
- package/dist/collection/components/color-picker/color-picker.js +1139 -0
- package/dist/collection/components/color-picker/types.js +1 -0
- package/dist/collection/components/command-palette/command-palette.css +260 -0
- package/dist/collection/components/command-palette/command-palette.js +429 -0
- package/dist/collection/components/command-palette/types.js +1 -0
- package/dist/collection/components/context-menu/context-menu.css +388 -0
- package/dist/collection/components/context-menu/context-menu.js +1412 -0
- package/dist/collection/components/context-menu/types.js +1 -0
- package/dist/collection/components/dialog-box/dialog-box.css +1261 -0
- package/dist/collection/components/dialog-box/dialog-box.js +4314 -0
- package/dist/collection/components/dialog-box/dialog-tray.css +268 -0
- package/dist/collection/components/dialog-box/types.js +1 -0
- package/dist/collection/components/dialog-content/dialog-content.css +83 -0
- package/dist/collection/components/dialog-content/dialog-content.js +96 -0
- package/dist/collection/components/dialog-footer/dialog-footer.css +89 -0
- package/dist/collection/components/dialog-footer/dialog-footer.js +94 -0
- package/dist/collection/components/dialog-footer/types.js +1 -0
- package/dist/collection/components/dialog-header/dialog-header.css +203 -0
- package/dist/collection/components/dialog-header/dialog-header.js +630 -0
- package/dist/collection/components/dialog-header/types.js +1 -0
- package/dist/collection/components/divider/divider.css +948 -0
- package/dist/collection/components/divider/divider.js +1612 -0
- package/dist/collection/components/divider/types.js +1 -0
- package/dist/collection/components/dock/dock.css +348 -0
- package/dist/collection/components/dock/dock.js +464 -0
- package/dist/collection/components/dock/types.js +1 -0
- package/dist/collection/components/dock-host/index.js +1 -0
- package/dist/collection/components/dock-host/types.js +1 -0
- package/dist/collection/components/dock-host/ui-dock-host.css +155 -0
- package/dist/collection/components/dock-host/ui-dock-host.js +226 -0
- package/dist/collection/components/drag-drop/drag-drop.css +103 -0
- package/dist/collection/components/drag-drop/drag-drop.js +385 -0
- package/dist/collection/components/drag-drop/types.js +1 -0
- package/dist/collection/components/dropdown/dropdown.css +1142 -0
- package/dist/collection/components/dropdown/dropdown.js +2033 -0
- package/dist/collection/components/dropdown/types.js +1 -0
- package/dist/collection/components/empty-state/empty-state.css +712 -0
- package/dist/collection/components/empty-state/empty-state.js +1256 -0
- package/dist/collection/components/empty-state/types.js +1 -0
- package/dist/collection/components/fab/fab.css +601 -0
- package/dist/collection/components/fab/fab.js +1124 -0
- package/dist/collection/components/fab-item/fab-item.css +107 -0
- package/dist/collection/components/fab-item/fab-item.js +177 -0
- package/dist/collection/components/fab-item/types.js +1 -0
- package/dist/collection/components/file-upload/file-upload.css +243 -0
- package/dist/collection/components/file-upload/file-upload.js +1022 -0
- package/dist/collection/components/file-upload/types.js +1 -0
- package/dist/collection/components/horizontal-nav/horizontal-nav.css +394 -0
- package/dist/collection/components/horizontal-nav/horizontal-nav.js +375 -0
- package/dist/collection/components/icon/icon.css +113 -0
- package/dist/collection/components/icon/icon.js +583 -0
- package/dist/collection/components/image-button/image-button.css +154 -0
- package/dist/collection/components/image-button/image-button.js +310 -0
- package/dist/collection/components/image-button/types.js +1 -0
- package/dist/collection/components/input/input.css +1544 -0
- package/dist/collection/components/input/input.js +3690 -0
- package/dist/collection/components/input/types.js +1 -0
- package/dist/collection/components/input-pair/input-pair.css +72 -0
- package/dist/collection/components/input-pair/input-pair.js +309 -0
- package/dist/collection/components/knob/knob.css +162 -0
- package/dist/collection/components/knob/knob.js +986 -0
- package/dist/collection/components/knob/types.js +1 -0
- package/dist/collection/components/layout-manager/layout-manager.css +41 -0
- package/dist/collection/components/layout-manager/layout-manager.js +525 -0
- package/dist/collection/components/layout-manager/lm-container/lm-container.css +117 -0
- package/dist/collection/components/layout-manager/lm-container/lm-container.js +110 -0
- package/dist/collection/components/layout-manager/lm-floating-window/lm-floating-window.css +0 -0
- package/dist/collection/components/layout-manager/lm-floating-window/lm-floating-window.js +49 -0
- package/dist/collection/components/layout-manager/lm-panel/lm-panel.css +97 -0
- package/dist/collection/components/layout-manager/lm-panel/lm-panel.js +58 -0
- package/dist/collection/components/layout-manager/lm-splitter/lm-splitter.css +57 -0
- package/dist/collection/components/layout-manager/lm-splitter/lm-splitter.js +120 -0
- package/dist/collection/components/layout-manager/lm-tabs/lm-tabs.css +149 -0
- package/dist/collection/components/layout-manager/lm-tabs/lm-tabs.js +130 -0
- package/dist/collection/components/layout-manager/types.js +1 -0
- package/dist/collection/components/library/category-section.css +147 -0
- package/dist/collection/components/library/category-section.js +139 -0
- package/dist/collection/components/library/data.js +74 -0
- package/dist/collection/components/library/library-card.css +181 -0
- package/dist/collection/components/library/library-card.js +203 -0
- package/dist/collection/components/library/library.css +358 -0
- package/dist/collection/components/library/library.js +91 -0
- package/dist/collection/components/list/list.css +1029 -0
- package/dist/collection/components/list/list.js +2167 -0
- package/dist/collection/components/list-group/list-group.css +275 -0
- package/dist/collection/components/list-group/list-group.js +356 -0
- package/dist/collection/components/list-item/list-item.css +1491 -0
- package/dist/collection/components/list-item/list-item.js +2184 -0
- package/dist/collection/components/masonry/masonry.css +414 -0
- package/dist/collection/components/masonry/masonry.js +1104 -0
- package/dist/collection/components/masonry/types.js +1 -0
- package/dist/collection/components/meter-group/meter-group.css +184 -0
- package/dist/collection/components/meter-group/meter-group.js +471 -0
- package/dist/collection/components/meter-group/types.js +1 -0
- package/dist/collection/components/my-component/my-component.css +27 -0
- package/dist/collection/components/my-component/my-component.js +95 -0
- package/dist/collection/components/my-step/my-step.css +25 -0
- package/dist/collection/components/my-step/my-step.js +237 -0
- package/dist/collection/components/nav-bar/nav-bar.css +448 -0
- package/dist/collection/components/nav-bar/nav-bar.js +608 -0
- package/dist/collection/components/number-input/number-input.css +200 -0
- package/dist/collection/components/number-input/number-input.js +695 -0
- package/dist/collection/components/otp-input/otp-input.css +243 -0
- package/dist/collection/components/otp-input/otp-input.js +761 -0
- package/dist/collection/components/otp-input/types.js +1 -0
- package/dist/collection/components/pagination/pagination.css +1399 -0
- package/dist/collection/components/pagination/pagination.js +2033 -0
- package/dist/collection/components/pagination/types.js +1 -0
- package/dist/collection/components/panel/panel.css +837 -0
- package/dist/collection/components/panel/panel.js +1842 -0
- package/dist/collection/components/panel/types.js +1 -0
- package/dist/collection/components/pattern-input/pattern-input.css +252 -0
- package/dist/collection/components/pattern-input/pattern-input.js +788 -0
- package/dist/collection/components/popover/popover.css +399 -0
- package/dist/collection/components/popover/popover.js +1449 -0
- package/dist/collection/components/popover/types.js +1 -0
- package/dist/collection/components/progress/progress.css +588 -0
- package/dist/collection/components/progress/progress.js +1414 -0
- package/dist/collection/components/progress/types.js +1 -0
- package/dist/collection/components/radio/radio.css +773 -0
- package/dist/collection/components/radio/radio.js +1059 -0
- package/dist/collection/components/radio/types.js +1 -0
- package/dist/collection/components/radio-group/radio-group.css +202 -0
- package/dist/collection/components/radio-group/radio-group.js +903 -0
- package/dist/collection/components/radio-group/types.js +1 -0
- package/dist/collection/components/range-slider/range-slider.css +602 -0
- package/dist/collection/components/range-slider/range-slider.js +1369 -0
- package/dist/collection/components/range-slider/types.js +1 -0
- package/dist/collection/components/rating/rating.css +768 -0
- package/dist/collection/components/rating/rating.js +1062 -0
- package/dist/collection/components/rating/types.js +1 -0
- package/dist/collection/components/resizable-panel/resizable-panel.css +247 -0
- package/dist/collection/components/resizable-panel/resizable-panel.js +874 -0
- package/dist/collection/components/resizable-panel/types.js +1 -0
- package/dist/collection/components/scroll-top/scroll-top.css +397 -0
- package/dist/collection/components/scroll-top/scroll-top.js +1178 -0
- package/dist/collection/components/scroll-top/types.js +1 -0
- package/dist/collection/components/skeleton/skeleton-loader.css +429 -0
- package/dist/collection/components/skeleton/skeleton-loader.js +1193 -0
- package/dist/collection/components/skeleton/types.js +1 -0
- package/dist/collection/components/smart-location-dropdown/smart-location-dropdown.css +357 -0
- package/dist/collection/components/smart-location-dropdown/smart-location-dropdown.js +1190 -0
- package/dist/collection/components/smart-location-dropdown/types.js +1 -0
- package/dist/collection/components/smart-menu/menu-item.interface.js +1 -0
- package/dist/collection/components/smart-menu/smart-menu.css +119 -0
- package/dist/collection/components/smart-menu/smart-menu.js +544 -0
- package/dist/collection/components/smart-stepper/smart-step.css +213 -0
- package/dist/collection/components/smart-stepper/smart-step.js +170 -0
- package/dist/collection/components/smart-stepper/smart-stepper.css +146 -0
- package/dist/collection/components/smart-stepper/smart-stepper.js +338 -0
- package/dist/collection/components/snackbar/snackbar.css +1480 -0
- package/dist/collection/components/snackbar/snackbar.js +1759 -0
- package/dist/collection/components/snackbar/types.js +1 -0
- package/dist/collection/components/speed-dial/speed-dial.css +478 -0
- package/dist/collection/components/speed-dial/speed-dial.js +1183 -0
- package/dist/collection/components/speed-dial/types.js +1 -0
- package/dist/collection/components/speedometer/speedometer.css +95 -0
- package/dist/collection/components/speedometer/speedometer.js +868 -0
- package/dist/collection/components/speedometer/types.js +1 -0
- package/dist/collection/components/splitter/splitter.css +269 -0
- package/dist/collection/components/splitter/splitter.js +713 -0
- package/dist/collection/components/splitter/types.js +1 -0
- package/dist/collection/components/stack/stack.css +269 -0
- package/dist/collection/components/stack/stack.js +297 -0
- package/dist/collection/components/stack/types.js +1 -0
- package/dist/collection/components/step/step.css +77 -0
- package/dist/collection/components/step/step.js +214 -0
- package/dist/collection/components/step/types.js +1 -0
- package/dist/collection/components/stepper/stepper.css +1079 -0
- package/dist/collection/components/stepper/stepper.js +1850 -0
- package/dist/collection/components/stepper/types.js +1 -0
- package/dist/collection/components/switch/switch.css +1099 -0
- package/dist/collection/components/switch/switch.js +1578 -0
- package/dist/collection/components/tabs/tabs.css +1355 -0
- package/dist/collection/components/tabs/tabs.js +1474 -0
- package/dist/collection/components/tabs/types.js +1 -0
- package/dist/collection/components/tag/tag.css +893 -0
- package/dist/collection/components/tag/tag.js +1119 -0
- package/dist/collection/components/tag/types.js +1 -0
- package/dist/collection/components/tag-group/tag-group.css +144 -0
- package/dist/collection/components/tag-group/tag-group.js +887 -0
- package/dist/collection/components/tag-group/types.js +1 -0
- package/dist/collection/components/timeline/timeline.css +1850 -0
- package/dist/collection/components/timeline/timeline.js +889 -0
- package/dist/collection/components/timeline/types.js +1 -0
- package/dist/collection/components/timeline/ui-timeline.stories.js +19 -0
- package/dist/collection/components/timeline-item/timeline-item.css +75 -0
- package/dist/collection/components/timeline-item/timeline-item.js +91 -0
- package/dist/collection/components/timer/timer.css +367 -0
- package/dist/collection/components/timer/timer.js +1292 -0
- package/dist/collection/components/timer/types.js +1 -0
- package/dist/collection/components/timer/ui-timer.stories.js +19 -0
- package/dist/collection/components/toggle-group/toggle-group.css +361 -0
- package/dist/collection/components/toggle-group/toggle-group.js +1212 -0
- package/dist/collection/components/toggle-group/types.js +1 -0
- package/dist/collection/components/toolbar/toolbar-types.js +1 -0
- package/dist/collection/components/toolbar/toolbar.css +1186 -0
- package/dist/collection/components/toolbar/toolbar.js +1635 -0
- package/dist/collection/components/tooltip/tooltip.css +609 -0
- package/dist/collection/components/tooltip/tooltip.js +1882 -0
- package/dist/collection/components/tooltip/types.js +1 -0
- package/dist/collection/components/top-bar/top-bar.css +274 -0
- package/dist/collection/components/top-bar/top-bar.js +383 -0
- package/dist/collection/components/transfer-list/transfer-list.css +520 -0
- package/dist/collection/components/transfer-list/transfer-list.js +1225 -0
- package/dist/collection/components/transfer-list/types.js +1 -0
- package/dist/collection/components/tree/tree.css +1197 -0
- package/dist/collection/components/tree/tree.js +2509 -0
- package/dist/collection/components/tree/types.js +1 -0
- package/dist/collection/components/ui-navigation-bar/navigation-bar/navigation-bar.css +830 -0
- package/dist/collection/components/ui-navigation-bar/navigation-bar/navigation-bar.js +1231 -0
- package/dist/collection/components/ui-navigation-bar/navigation-bar/navigation-types.js +1 -0
- package/dist/collection/components/ui-navigation-bar/navigation-item.css +679 -0
- package/dist/collection/components/ui-navigation-bar/navigation-item.js +385 -0
- package/dist/collection/components/ui-navigation-bar/navigation-types.js +1 -0
- package/dist/collection/components/workspace-manager/types.js +1 -0
- package/dist/collection/components/workspace-manager/workspace-manager.css +1094 -0
- package/dist/collection/components/workspace-manager/workspace-manager.js +1914 -0
- package/dist/collection/components.js +51 -0
- package/dist/collection/index.js +108 -0
- package/dist/collection/service/drag-manager.js +23 -0
- package/dist/collection/service/event-bus.js +19 -0
- package/dist/collection/service/serialization.js +8 -0
- package/dist/collection/service/state-engine.js +247 -0
- package/dist/collection/service/theme-switcher.js +146 -0
- package/dist/collection/stories/Button.stories.js +15 -0
- package/dist/collection/types/common.js +1 -0
- package/dist/collection/types/index.js +4 -0
- package/dist/collection/utils/aria-live.js +60 -0
- package/dist/collection/utils/component-size.js +25 -0
- package/dist/collection/utils/dom.js +260 -0
- package/dist/collection/utils/focus-trap.js +135 -0
- package/dist/collection/utils/security.js +10 -0
- package/dist/collection/utils/test/setup-component-test-env.js +92 -0
- package/dist/collection/utils/utils.js +21 -0
- package/dist/collection/utils/validation.js +74 -0
- package/dist/components/avatar-group.js +1 -0
- package/dist/components/avatar.js +1 -0
- package/dist/components/badge.js +1 -0
- package/dist/components/button-toggle.js +1 -0
- package/dist/components/category-section.d.ts +11 -0
- package/dist/components/category-section.js +1 -0
- package/dist/components/category-section2.js +1 -0
- package/dist/components/checkbox.js +1 -0
- package/dist/components/context-menu.js +1 -0
- package/dist/components/dialog-footer.js +1 -0
- package/dist/components/dialog-header.js +1 -0
- package/dist/components/dom.js +1 -0
- package/dist/components/dropdown.js +1 -0
- package/dist/components/event-bus.js +1 -0
- package/dist/components/focus-trap.js +1 -0
- package/dist/components/icon.js +2 -0
- package/dist/components/index.d.ts +35 -0
- package/dist/components/index.js +1 -0
- package/dist/components/input.js +1 -0
- package/dist/components/layout-manager.d.ts +11 -0
- package/dist/components/layout-manager.js +1 -0
- package/dist/components/library-card.d.ts +11 -0
- package/dist/components/library-card.js +1 -0
- package/dist/components/library-card2.js +1 -0
- package/dist/components/list-group.js +1 -0
- package/dist/components/list-item.js +1 -0
- package/dist/components/lm-container.d.ts +11 -0
- package/dist/components/lm-container.js +1 -0
- package/dist/components/lm-container2.js +1 -0
- package/dist/components/lm-floating-window.d.ts +11 -0
- package/dist/components/lm-floating-window.js +1 -0
- package/dist/components/lm-floating-window2.js +1 -0
- package/dist/components/lm-panel.d.ts +11 -0
- package/dist/components/lm-panel.js +1 -0
- package/dist/components/lm-panel2.js +1 -0
- package/dist/components/lm-splitter.d.ts +11 -0
- package/dist/components/lm-splitter.js +1 -0
- package/dist/components/lm-splitter2.js +1 -0
- package/dist/components/lm-tabs.d.ts +11 -0
- package/dist/components/lm-tabs.js +1 -0
- package/dist/components/lm-tabs2.js +1 -0
- package/dist/components/my-component.d.ts +11 -0
- package/dist/components/my-component.js +1 -0
- package/dist/components/my-step.d.ts +11 -0
- package/dist/components/my-step.js +1 -0
- package/dist/components/nav-bar.d.ts +11 -0
- package/dist/components/nav-bar.js +1 -0
- package/dist/components/pagination.js +1 -0
- package/dist/components/radio.js +1 -0
- package/dist/components/range-slider.js +1 -0
- package/dist/components/rating.js +1 -0
- package/dist/components/resizable-panel.js +1 -0
- package/dist/components/skeleton-loader.js +1 -0
- package/dist/components/smart-step.d.ts +11 -0
- package/dist/components/smart-step.js +1 -0
- package/dist/components/stack.js +1 -0
- package/dist/components/switch.js +1 -0
- package/dist/components/tag-group.js +1 -0
- package/dist/components/tag.js +1 -0
- package/dist/components/timeline-item.d.ts +11 -0
- package/dist/components/timeline-item.js +1 -0
- package/dist/components/toggle-group.js +1 -0
- package/dist/components/tooltip.js +1 -0
- package/dist/components/ui-accordion.d.ts +11 -0
- package/dist/components/ui-accordion.js +1 -0
- package/dist/components/ui-advanced-data-table.d.ts +11 -0
- package/dist/components/ui-advanced-data-table.js +1 -0
- package/dist/components/ui-anchor.d.ts +11 -0
- package/dist/components/ui-anchor.js +1 -0
- package/dist/components/ui-animate-on-scroll.d.ts +11 -0
- package/dist/components/ui-animate-on-scroll.js +1 -0
- package/dist/components/ui-aside-panel.d.ts +11 -0
- package/dist/components/ui-aside-panel.js +1 -0
- package/dist/components/ui-avatar-group.d.ts +11 -0
- package/dist/components/ui-avatar-group.js +1 -0
- package/dist/components/ui-avatar.d.ts +11 -0
- package/dist/components/ui-avatar.js +1 -0
- package/dist/components/ui-badge.d.ts +11 -0
- package/dist/components/ui-badge.js +1 -0
- package/dist/components/ui-breadcrumb-item.d.ts +11 -0
- package/dist/components/ui-breadcrumb-item.js +1 -0
- package/dist/components/ui-breadcrumb.d.ts +11 -0
- package/dist/components/ui-breadcrumb.js +1 -0
- package/dist/components/ui-button-toggle-group.d.ts +11 -0
- package/dist/components/ui-button-toggle-group.js +1 -0
- package/dist/components/ui-button-toggle.d.ts +11 -0
- package/dist/components/ui-button-toggle.js +1 -0
- package/dist/components/ui-button.d.ts +11 -0
- package/dist/components/ui-button.js +1 -0
- package/dist/components/ui-callout-banner.d.ts +11 -0
- package/dist/components/ui-callout-banner.js +1 -0
- package/dist/components/ui-card.d.ts +11 -0
- package/dist/components/ui-card.js +1 -0
- package/dist/components/ui-carousel.d.ts +11 -0
- package/dist/components/ui-carousel.js +1 -0
- package/dist/components/ui-checkbox-group.d.ts +11 -0
- package/dist/components/ui-checkbox-group.js +1 -0
- package/dist/components/ui-checkbox.d.ts +11 -0
- package/dist/components/ui-checkbox.js +1 -0
- package/dist/components/ui-code-editor.d.ts +11 -0
- package/dist/components/ui-code-editor.js +1 -0
- package/dist/components/ui-code-preview.d.ts +11 -0
- package/dist/components/ui-code-preview.js +1 -0
- package/dist/components/ui-color-controller.d.ts +11 -0
- package/dist/components/ui-color-controller.js +1 -0
- package/dist/components/ui-color-picker.d.ts +11 -0
- package/dist/components/ui-color-picker.js +1 -0
- package/dist/components/ui-command-palette.d.ts +11 -0
- package/dist/components/ui-command-palette.js +1 -0
- package/dist/components/ui-context-menu.d.ts +11 -0
- package/dist/components/ui-context-menu.js +1 -0
- package/dist/components/ui-dialog-box.d.ts +11 -0
- package/dist/components/ui-dialog-box.js +1 -0
- package/dist/components/ui-dialog-content.d.ts +11 -0
- package/dist/components/ui-dialog-content.js +1 -0
- package/dist/components/ui-dialog-footer.d.ts +11 -0
- package/dist/components/ui-dialog-footer.js +1 -0
- package/dist/components/ui-dialog-header.d.ts +11 -0
- package/dist/components/ui-dialog-header.js +1 -0
- package/dist/components/ui-divider.d.ts +11 -0
- package/dist/components/ui-divider.js +1 -0
- package/dist/components/ui-dock-host.d.ts +11 -0
- package/dist/components/ui-dock-host.js +1 -0
- package/dist/components/ui-dock.d.ts +11 -0
- package/dist/components/ui-dock.js +1 -0
- package/dist/components/ui-drag-drop.d.ts +11 -0
- package/dist/components/ui-drag-drop.js +1 -0
- package/dist/components/ui-dropdown.d.ts +11 -0
- package/dist/components/ui-dropdown.js +1 -0
- package/dist/components/ui-empty-state.d.ts +11 -0
- package/dist/components/ui-empty-state.js +1 -0
- package/dist/components/ui-fab-item.d.ts +11 -0
- package/dist/components/ui-fab-item.js +1 -0
- package/dist/components/ui-fab.d.ts +11 -0
- package/dist/components/ui-fab.js +1 -0
- package/dist/components/ui-file-upload.d.ts +11 -0
- package/dist/components/ui-file-upload.js +1 -0
- package/dist/components/ui-horizontal-nav.d.ts +11 -0
- package/dist/components/ui-horizontal-nav.js +1 -0
- package/dist/components/ui-icon.d.ts +11 -0
- package/dist/components/ui-icon.js +1 -0
- package/dist/components/ui-image-button.d.ts +11 -0
- package/dist/components/ui-image-button.js +1 -0
- package/dist/components/ui-input-pair.d.ts +11 -0
- package/dist/components/ui-input-pair.js +1 -0
- package/dist/components/ui-input.d.ts +11 -0
- package/dist/components/ui-input.js +1 -0
- package/dist/components/ui-knob.d.ts +11 -0
- package/dist/components/ui-knob.js +1 -0
- package/dist/components/ui-library.d.ts +11 -0
- package/dist/components/ui-library.js +1 -0
- package/dist/components/ui-list-group.d.ts +11 -0
- package/dist/components/ui-list-group.js +1 -0
- package/dist/components/ui-list-item.d.ts +11 -0
- package/dist/components/ui-list-item.js +1 -0
- package/dist/components/ui-list.d.ts +11 -0
- package/dist/components/ui-list.js +1 -0
- package/dist/components/ui-masonry.d.ts +11 -0
- package/dist/components/ui-masonry.js +1 -0
- package/dist/components/ui-meter-group.d.ts +11 -0
- package/dist/components/ui-meter-group.js +1 -0
- package/dist/components/ui-navigation-bar.d.ts +11 -0
- package/dist/components/ui-navigation-bar.js +1 -0
- package/dist/components/ui-navigation-item.d.ts +11 -0
- package/dist/components/ui-navigation-item.js +1 -0
- package/dist/components/ui-number-input.d.ts +11 -0
- package/dist/components/ui-number-input.js +1 -0
- package/dist/components/ui-otp-input.d.ts +11 -0
- package/dist/components/ui-otp-input.js +1 -0
- package/dist/components/ui-pagination.d.ts +11 -0
- package/dist/components/ui-pagination.js +1 -0
- package/dist/components/ui-panel.d.ts +11 -0
- package/dist/components/ui-panel.js +1 -0
- package/dist/components/ui-pattern-input.d.ts +11 -0
- package/dist/components/ui-pattern-input.js +1 -0
- package/dist/components/ui-popover.d.ts +11 -0
- package/dist/components/ui-popover.js +1 -0
- package/dist/components/ui-progress.d.ts +11 -0
- package/dist/components/ui-progress.js +1 -0
- package/dist/components/ui-radio-group.d.ts +11 -0
- package/dist/components/ui-radio-group.js +1 -0
- package/dist/components/ui-radio.d.ts +11 -0
- package/dist/components/ui-radio.js +1 -0
- package/dist/components/ui-range-slider.d.ts +11 -0
- package/dist/components/ui-range-slider.js +1 -0
- package/dist/components/ui-rating.d.ts +11 -0
- package/dist/components/ui-rating.js +1 -0
- package/dist/components/ui-resizable-panel.d.ts +11 -0
- package/dist/components/ui-resizable-panel.js +1 -0
- package/dist/components/ui-scroll-top.d.ts +11 -0
- package/dist/components/ui-scroll-top.js +1 -0
- package/dist/components/ui-skeleton.d.ts +11 -0
- package/dist/components/ui-skeleton.js +1 -0
- package/dist/components/ui-smart-context-menu.d.ts +11 -0
- package/dist/components/ui-smart-context-menu.js +1 -0
- package/dist/components/ui-smart-location-dropdown.d.ts +11 -0
- package/dist/components/ui-smart-location-dropdown.js +1 -0
- package/dist/components/ui-smart-stepper.d.ts +11 -0
- package/dist/components/ui-smart-stepper.js +1 -0
- package/dist/components/ui-snackbar.d.ts +11 -0
- package/dist/components/ui-snackbar.js +1 -0
- package/dist/components/ui-speed-dial.d.ts +11 -0
- package/dist/components/ui-speed-dial.js +1 -0
- package/dist/components/ui-speedometer.d.ts +11 -0
- package/dist/components/ui-speedometer.js +1 -0
- package/dist/components/ui-splitter.d.ts +11 -0
- package/dist/components/ui-splitter.js +1 -0
- package/dist/components/ui-stack.d.ts +11 -0
- package/dist/components/ui-stack.js +1 -0
- package/dist/components/ui-step.d.ts +11 -0
- package/dist/components/ui-step.js +1 -0
- package/dist/components/ui-stepper.d.ts +11 -0
- package/dist/components/ui-stepper.js +1 -0
- package/dist/components/ui-switch.d.ts +11 -0
- package/dist/components/ui-switch.js +1 -0
- package/dist/components/ui-tabs.d.ts +11 -0
- package/dist/components/ui-tabs.js +1 -0
- package/dist/components/ui-tag-group.d.ts +11 -0
- package/dist/components/ui-tag-group.js +1 -0
- package/dist/components/ui-tag.d.ts +11 -0
- package/dist/components/ui-tag.js +1 -0
- package/dist/components/ui-timeline.d.ts +11 -0
- package/dist/components/ui-timeline.js +1 -0
- package/dist/components/ui-timer.d.ts +11 -0
- package/dist/components/ui-timer.js +1 -0
- package/dist/components/ui-toggle-group.d.ts +11 -0
- package/dist/components/ui-toggle-group.js +1 -0
- package/dist/components/ui-toolbar.d.ts +11 -0
- package/dist/components/ui-toolbar.js +1 -0
- package/dist/components/ui-tooltip.d.ts +11 -0
- package/dist/components/ui-tooltip.js +1 -0
- package/dist/components/ui-top-bar.d.ts +11 -0
- package/dist/components/ui-top-bar.js +1 -0
- package/dist/components/ui-transfer-list.d.ts +11 -0
- package/dist/components/ui-transfer-list.js +1 -0
- package/dist/components/ui-tree.d.ts +11 -0
- package/dist/components/ui-tree.js +1 -0
- package/dist/components/ui-workspace-manager.d.ts +11 -0
- package/dist/components/ui-workspace-manager.js +1 -0
- package/dist/components/utils.js +1 -0
- package/dist/esm/category-section.entry.js +28 -0
- package/dist/esm/component-size-C7gf39HE.js +27 -0
- package/dist/esm/dom-BMFah5q3.js +262 -0
- package/dist/esm/event-bus-vwwmWKs9.js +21 -0
- package/dist/esm/exploration-project-tailwind.js +20 -0
- package/dist/esm/focus-trap-BSQ8klD4.js +137 -0
- package/dist/esm/index-DUsoYu9r.js +2264 -0
- package/dist/esm/index.js +256 -0
- package/dist/esm/layout-manager.entry.js +614 -0
- package/dist/esm/library-card.entry.js +61 -0
- package/dist/esm/lm-container_2.entry.js +76 -0
- package/dist/esm/lm-panel_3.entry.js +104 -0
- package/dist/esm/loader.js +10 -0
- package/dist/esm/my-component.entry.js +31 -0
- package/dist/esm/my-step.entry.js +27 -0
- package/dist/esm/nav-bar.entry.js +245 -0
- package/dist/esm/security-D2WzX6vR.js +1545 -0
- package/dist/esm/smart-step.entry.js +45 -0
- package/dist/esm/timeline-item.entry.js +27 -0
- package/dist/esm/ui-accordion_10.entry.js +5722 -0
- package/dist/esm/ui-advanced-data-table.entry.js +2682 -0
- package/dist/esm/ui-anchor.entry.js +556 -0
- package/dist/esm/ui-animate-on-scroll.entry.js +283 -0
- package/dist/esm/ui-aside-panel.entry.js +636 -0
- package/dist/esm/ui-avatar-group_3.entry.js +630 -0
- package/dist/esm/ui-breadcrumb-item.entry.js +54 -0
- package/dist/esm/ui-breadcrumb.entry.js +199 -0
- package/dist/esm/ui-callout-banner.entry.js +289 -0
- package/dist/esm/ui-card.entry.js +409 -0
- package/dist/esm/ui-carousel.entry.js +545 -0
- package/dist/esm/ui-checkbox-group.entry.js +328 -0
- package/dist/esm/ui-checkbox.entry.js +258 -0
- package/dist/esm/ui-code-editor.entry.js +959 -0
- package/dist/esm/ui-code-preview.entry.js +313 -0
- package/dist/esm/ui-color-controller.entry.js +148 -0
- package/dist/esm/ui-color-picker.entry.js +656 -0
- package/dist/esm/ui-command-palette.entry.js +176 -0
- package/dist/esm/ui-dialog-box.entry.js +1806 -0
- package/dist/esm/ui-dialog-content.entry.js +29 -0
- package/dist/esm/ui-dialog-footer_2.entry.js +190 -0
- package/dist/esm/ui-divider.entry.js +479 -0
- package/dist/esm/ui-dock-host.entry.js +126 -0
- package/dist/esm/ui-dock.entry.js +219 -0
- package/dist/esm/ui-drag-drop.entry.js +170 -0
- package/dist/esm/ui-dropdown_2.entry.js +1549 -0
- package/dist/esm/ui-empty-state.entry.js +396 -0
- package/dist/esm/ui-fab-item.entry.js +37 -0
- package/dist/esm/ui-fab.entry.js +275 -0
- package/dist/esm/ui-file-upload.entry.js +416 -0
- package/dist/esm/ui-horizontal-nav.entry.js +133 -0
- package/dist/esm/ui-image-button.entry.js +65 -0
- package/dist/esm/ui-input-pair.entry.js +42 -0
- package/dist/esm/ui-knob.entry.js +445 -0
- package/dist/esm/ui-library.entry.js +132 -0
- package/dist/esm/ui-list-group_2.entry.js +583 -0
- package/dist/esm/ui-list.entry.js +730 -0
- package/dist/esm/ui-masonry.entry.js +476 -0
- package/dist/esm/ui-meter-group.entry.js +171 -0
- package/dist/esm/ui-navigation-item.entry.js +102 -0
- package/dist/esm/ui-number-input.entry.js +189 -0
- package/dist/esm/ui-otp-input.entry.js +244 -0
- package/dist/esm/ui-pagination_3.entry.js +1617 -0
- package/dist/esm/ui-panel.entry.js +612 -0
- package/dist/esm/ui-pattern-input.entry.js +276 -0
- package/dist/esm/ui-popover.entry.js +515 -0
- package/dist/esm/ui-progress.entry.js +514 -0
- package/dist/esm/ui-radio-group.entry.js +203 -0
- package/dist/esm/ui-radio.entry.js +204 -0
- package/dist/esm/ui-range-slider.entry.js +635 -0
- package/dist/esm/ui-resizable-panel.entry.js +482 -0
- package/dist/esm/ui-scroll-top.entry.js +457 -0
- package/dist/esm/ui-smart-context-menu.entry.js +374 -0
- package/dist/esm/ui-smart-location-dropdown.entry.js +563 -0
- package/dist/esm/ui-smart-stepper.entry.js +135 -0
- package/dist/esm/ui-snackbar.entry.js +861 -0
- package/dist/esm/ui-speed-dial.entry.js +518 -0
- package/dist/esm/ui-speedometer.entry.js +426 -0
- package/dist/esm/ui-splitter.entry.js +280 -0
- package/dist/esm/ui-step.entry.js +28 -0
- package/dist/esm/ui-stepper.entry.js +638 -0
- package/dist/esm/ui-switch.entry.js +403 -0
- package/dist/esm/ui-tabs.entry.js +701 -0
- package/dist/esm/ui-tag.entry.js +297 -0
- package/dist/esm/ui-timeline.entry.js +265 -0
- package/dist/esm/ui-timer.entry.js +500 -0
- package/dist/esm/ui-toolbar.entry.js +617 -0
- package/dist/esm/ui-tooltip.entry.js +695 -0
- package/dist/esm/ui-top-bar.entry.js +119 -0
- package/dist/esm/ui-transfer-list.entry.js +590 -0
- package/dist/esm/ui-tree.entry.js +872 -0
- package/dist/esm/ui-workspace-manager.entry.js +1199 -0
- package/dist/esm/utils-Ck6jDuhz.js +23 -0
- package/dist/exploration-project-tailwind/exploration-project-tailwind.css +1 -0
- package/dist/exploration-project-tailwind/exploration-project-tailwind.esm.js +1 -0
- package/dist/exploration-project-tailwind/index.esm.js +1 -0
- package/dist/exploration-project-tailwind/p-01c7db7a.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-049744f9.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-06f0c679.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-0b004861.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-0d31c9e9.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-148e81df.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-200241f8.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-287dbf09.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-2d273118.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-2f1aebb3.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-2f961934.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-35296877.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-36861546.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-3d3d48fd.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-41cd6bf0.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-45482d86.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-46596a28.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-46efdea3.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-47e2a7ee.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-4d73c143.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-4de419d5.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-4f6bba75.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-5508874f.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-5ce0dbd8.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-5e3e80ae.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-61717490.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-62352ef2.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-64e3a484.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-6ab80ead.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-6e9694f2.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-6fa9dc15.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-70d82d79.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-717dad1f.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-7376ac95.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-73d29a4a.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-7515b1e3.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-77124686.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-77a21491.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-77cc333a.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-7f91d949.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-807c6555.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-81961fb1.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-85bf89fd.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-85e36111.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-875be805.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-898dd0fa.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-8d951aef.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-9d0c8760.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-9fa70359.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-9fc06ff0.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-BMFah5q3.js +1 -0
- package/dist/exploration-project-tailwind/p-BSQ8klD4.js +1 -0
- package/dist/exploration-project-tailwind/p-C7gf39HE.js +1 -0
- package/dist/exploration-project-tailwind/p-Ck6jDuhz.js +1 -0
- package/dist/exploration-project-tailwind/p-D2WzX6vR.js +2 -0
- package/dist/exploration-project-tailwind/p-DUsoYu9r.js +2 -0
- package/dist/exploration-project-tailwind/p-a1ad32a2.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-a3f465d9.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-a42fdc33.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-a4f52a76.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-aa85ff78.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-ab752761.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-ba21fed3.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-c174a372.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-c2ca71ac.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-c4ba7e52.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-c5ddc817.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-c69dd43e.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-c6fd72e1.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-c7e87fbb.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-c87aeab6.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-c90722ec.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-ccb5c737.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-ce1222a1.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-d16c9635.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-d2308a00.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-d30e24bd.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-d419eaf0.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-debede45.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-e5322e59.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-e8ba0c95.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-e90d5307.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-ea51c5d8.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-ecda1cc3.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-f0830120.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-f11e5cae.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-f5719913.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-ffb1754a.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-vwwmWKs9.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.js +1 -0
- package/dist/types/components/accordion/accordion.d.ts +352 -0
- package/dist/types/components/accordion/types.d.ts +69 -0
- package/dist/types/components/advanced-data-table/advanced-data-table.d.ts +697 -0
- package/dist/types/components/advanced-data-table/types.d.ts +120 -0
- package/dist/types/components/anchor/anchor.d.ts +133 -0
- package/dist/types/components/anchor/types.d.ts +17 -0
- package/dist/types/components/animate-on-scroll/animate-on-scroll.d.ts +101 -0
- package/dist/types/components/aside-panel/aside-panel.d.ts +249 -0
- package/dist/types/components/avatar/avatar.d.ts +201 -0
- package/dist/types/components/avatar/types.d.ts +132 -0
- package/dist/types/components/avatar-group/avatar-group.d.ts +52 -0
- package/dist/types/components/avatar-group/types.d.ts +31 -0
- package/dist/types/components/badge/badge.d.ts +109 -0
- package/dist/types/components/badge/types.d.ts +6 -0
- package/dist/types/components/breadcrumb/breadcrumb-item.d.ts +36 -0
- package/dist/types/components/breadcrumb/breadcrumb.d.ts +73 -0
- package/dist/types/components/breadcrumb/types.d.ts +5 -0
- package/dist/types/components/button/button.d.ts +133 -0
- package/dist/types/components/button/types.d.ts +1 -0
- package/dist/types/components/button-toggle/button-toggle.d.ts +64 -0
- package/dist/types/components/button-toggle-group/button-toggle-group.d.ts +141 -0
- package/dist/types/components/button-toggle-group/types.d.ts +7 -0
- package/dist/types/components/callout-banner/callout-banner.d.ts +115 -0
- package/dist/types/components/callout-banner/types.d.ts +7 -0
- package/dist/types/components/card/card.d.ts +160 -0
- package/dist/types/components/card/types.d.ts +13 -0
- package/dist/types/components/carousel/carousel.d.ts +150 -0
- package/dist/types/components/carousel/types.d.ts +8 -0
- package/dist/types/components/checkbox/checkbox.d.ts +92 -0
- package/dist/types/components/checkbox/types.d.ts +5 -0
- package/dist/types/components/checkbox-group/checkbox-group.d.ts +87 -0
- package/dist/types/components/checkbox-group/types.d.ts +8 -0
- package/dist/types/components/code-editor/code-editor.d.ts +147 -0
- package/dist/types/components/code-editor/types.d.ts +20 -0
- package/dist/types/components/code-preview/types.d.ts +5 -0
- package/dist/types/components/code-preview/ui-code-preview.d.ts +69 -0
- package/dist/types/components/color-controller/color-controller.d.ts +24 -0
- package/dist/types/components/color-picker/color-picker.d.ts +116 -0
- package/dist/types/components/color-picker/types.d.ts +24 -0
- package/dist/types/components/command-palette/command-palette.d.ts +41 -0
- package/dist/types/components/command-palette/types.d.ts +7 -0
- package/dist/types/components/context-menu/context-menu.d.ts +135 -0
- package/dist/types/components/context-menu/types.d.ts +20 -0
- package/dist/types/components/dialog-box/dialog-box.d.ts +648 -0
- package/dist/types/components/dialog-box/types.d.ts +1 -0
- package/dist/types/components/dialog-content/dialog-content.d.ts +9 -0
- package/dist/types/components/dialog-footer/dialog-footer.d.ts +9 -0
- package/dist/types/components/dialog-footer/types.d.ts +1 -0
- package/dist/types/components/dialog-header/dialog-header.d.ts +102 -0
- package/dist/types/components/dialog-header/types.d.ts +2 -0
- package/dist/types/components/divider/divider.d.ts +245 -0
- package/dist/types/components/divider/types.d.ts +14 -0
- package/dist/types/components/dock/dock.d.ts +37 -0
- package/dist/types/components/dock/types.d.ts +11 -0
- package/dist/types/components/dock-host/index.d.ts +1 -0
- package/dist/types/components/dock-host/types.d.ts +1 -0
- package/dist/types/components/dock-host/ui-dock-host.d.ts +23 -0
- package/dist/types/components/drag-drop/drag-drop.d.ts +52 -0
- package/dist/types/components/drag-drop/types.d.ts +9 -0
- package/dist/types/components/dropdown/dropdown.d.ts +264 -0
- package/dist/types/components/dropdown/types.d.ts +19 -0
- package/dist/types/components/empty-state/empty-state.d.ts +74 -0
- package/dist/types/components/empty-state/types.d.ts +13 -0
- package/dist/types/components/fab/fab.d.ts +73 -0
- package/dist/types/components/fab-item/fab-item.d.ts +14 -0
- package/dist/types/components/fab-item/types.d.ts +3 -0
- package/dist/types/components/file-upload/file-upload.d.ts +91 -0
- package/dist/types/components/file-upload/types.d.ts +15 -0
- package/dist/types/components/horizontal-nav/horizontal-nav.d.ts +68 -0
- package/dist/types/components/icon/icon.d.ts +66 -0
- package/dist/types/components/image-button/image-button.d.ts +31 -0
- package/dist/types/components/image-button/types.d.ts +1 -0
- package/dist/types/components/input/input.d.ts +217 -0
- package/dist/types/components/input/types.d.ts +6 -0
- package/dist/types/components/input-pair/input-pair.d.ts +28 -0
- package/dist/types/components/knob/knob.d.ts +147 -0
- package/dist/types/components/knob/types.d.ts +4 -0
- package/dist/types/components/layout-manager/layout-manager.d.ts +32 -0
- package/dist/types/components/layout-manager/lm-container/lm-container.d.ts +7 -0
- package/dist/types/components/layout-manager/lm-floating-window/lm-floating-window.d.ts +6 -0
- package/dist/types/components/layout-manager/lm-panel/lm-panel.d.ts +7 -0
- package/dist/types/components/layout-manager/lm-splitter/lm-splitter.d.ts +12 -0
- package/dist/types/components/layout-manager/lm-tabs/lm-tabs.d.ts +12 -0
- package/dist/types/components/layout-manager/types.d.ts +1 -0
- package/dist/types/components/library/category-section.d.ts +15 -0
- package/dist/types/components/library/data.d.ts +11 -0
- package/dist/types/components/library/library-card.d.ts +19 -0
- package/dist/types/components/library/library.d.ts +9 -0
- package/dist/types/components/list/list.d.ts +183 -0
- package/dist/types/components/list-group/list-group.d.ts +28 -0
- package/dist/types/components/list-item/list-item.d.ts +200 -0
- package/dist/types/components/masonry/masonry.d.ts +105 -0
- package/dist/types/components/masonry/types.d.ts +5 -0
- package/dist/types/components/meter-group/meter-group.d.ts +66 -0
- package/dist/types/components/meter-group/types.d.ts +12 -0
- package/dist/types/components/my-component/my-component.d.ts +16 -0
- package/dist/types/components/my-step/index.d.ts +12 -0
- package/dist/types/components/my-step/my-step.d.ts +13 -0
- package/dist/types/components/nav-bar/nav-bar.d.ts +119 -0
- package/dist/types/components/number-input/number-input.d.ts +72 -0
- package/dist/types/components/otp-input/otp-input.d.ts +64 -0
- package/dist/types/components/otp-input/types.d.ts +3 -0
- package/dist/types/components/pagination/pagination.d.ts +295 -0
- package/dist/types/components/pagination/types.d.ts +1 -0
- package/dist/types/components/panel/panel.d.ts +275 -0
- package/dist/types/components/panel/types.d.ts +7 -0
- package/dist/types/components/pattern-input/pattern-input.d.ts +88 -0
- package/dist/types/components/popover/popover.d.ts +161 -0
- package/dist/types/components/popover/types.d.ts +3 -0
- package/dist/types/components/progress/progress.d.ts +224 -0
- package/dist/types/components/progress/types.d.ts +6 -0
- package/dist/types/components/radio/radio.d.ts +87 -0
- package/dist/types/components/radio/types.d.ts +7 -0
- package/dist/types/components/radio-group/radio-group.d.ts +74 -0
- package/dist/types/components/radio-group/types.d.ts +2 -0
- package/dist/types/components/range-slider/range-slider.d.ts +201 -0
- package/dist/types/components/range-slider/types.d.ts +4 -0
- package/dist/types/components/rating/rating.d.ts +127 -0
- package/dist/types/components/rating/types.d.ts +1 -0
- package/dist/types/components/resizable-panel/resizable-panel.d.ts +59 -0
- package/dist/types/components/resizable-panel/types.d.ts +11 -0
- package/dist/types/components/scroll-top/scroll-top.d.ts +186 -0
- package/dist/types/components/scroll-top/types.d.ts +1 -0
- package/dist/types/components/skeleton/skeleton-loader.d.ts +149 -0
- package/dist/types/components/skeleton/types.d.ts +1 -0
- package/dist/types/components/smart-location-dropdown/smart-location-dropdown.d.ts +119 -0
- package/dist/types/components/smart-location-dropdown/types.d.ts +37 -0
- package/dist/types/components/smart-menu/menu-item.interface.d.ts +10 -0
- package/dist/types/components/smart-menu/smart-menu.d.ts +64 -0
- package/dist/types/components/smart-stepper/smart-step.d.ts +29 -0
- package/dist/types/components/smart-stepper/smart-stepper.d.ts +53 -0
- package/dist/types/components/snackbar/snackbar.d.ts +223 -0
- package/dist/types/components/snackbar/types.d.ts +104 -0
- package/dist/types/components/speed-dial/speed-dial.d.ts +171 -0
- package/dist/types/components/speed-dial/types.d.ts +11 -0
- package/dist/types/components/speedometer/speedometer.d.ts +125 -0
- package/dist/types/components/speedometer/types.d.ts +8 -0
- package/dist/types/components/splitter/splitter.d.ts +63 -0
- package/dist/types/components/splitter/types.d.ts +9 -0
- package/dist/types/components/stack/stack.d.ts +34 -0
- package/dist/types/components/stack/types.d.ts +3 -0
- package/dist/types/components/step/step.d.ts +16 -0
- package/dist/types/components/step/types.d.ts +1 -0
- package/dist/types/components/stepper/stepper.d.ts +218 -0
- package/dist/types/components/stepper/types.d.ts +39 -0
- package/dist/types/components/switch/switch.d.ts +162 -0
- package/dist/types/components/tabs/tabs.d.ts +182 -0
- package/dist/types/components/tabs/types.d.ts +17 -0
- package/dist/types/components/tag/tag.d.ts +172 -0
- package/dist/types/components/tag/types.d.ts +4 -0
- package/dist/types/components/tag-group/tag-group.d.ts +107 -0
- package/dist/types/components/tag-group/types.d.ts +2 -0
- package/dist/types/components/timeline/timeline.d.ts +73 -0
- package/dist/types/components/timeline/types.d.ts +28 -0
- package/dist/types/components/timeline/ui-timeline.stories.d.ts +9 -0
- package/dist/types/components/timeline-item/timeline-item.d.ts +15 -0
- package/dist/types/components/timer/timer.d.ts +123 -0
- package/dist/types/components/timer/types.d.ts +18 -0
- package/dist/types/components/timer/ui-timer.stories.d.ts +9 -0
- package/dist/types/components/toggle-group/toggle-group.d.ts +136 -0
- package/dist/types/components/toggle-group/types.d.ts +5 -0
- package/dist/types/components/toolbar/toolbar-types.d.ts +189 -0
- package/dist/types/components/toolbar/toolbar.d.ts +150 -0
- package/dist/types/components/tooltip/tooltip.d.ts +166 -0
- package/dist/types/components/tooltip/types.d.ts +3 -0
- package/dist/types/components/top-bar/top-bar.d.ts +76 -0
- package/dist/types/components/transfer-list/transfer-list.d.ts +137 -0
- package/dist/types/components/transfer-list/types.d.ts +13 -0
- package/dist/types/components/tree/tree.d.ts +180 -0
- package/dist/types/components/tree/types.d.ts +76 -0
- package/dist/types/components/ui-navigation-bar/navigation-bar/navigation-bar.d.ts +108 -0
- package/dist/types/components/ui-navigation-bar/navigation-bar/navigation-types.d.ts +17 -0
- package/dist/types/components/ui-navigation-bar/navigation-item.d.ts +26 -0
- package/dist/types/components/ui-navigation-bar/navigation-types.d.ts +19 -0
- package/dist/types/components/workspace-manager/types.d.ts +48 -0
- package/dist/types/components/workspace-manager/workspace-manager.d.ts +211 -0
- package/dist/types/components.d.ts +29634 -0
- package/dist/types/index.d.ts +21 -0
- package/dist/types/service/drag-manager.d.ts +8 -0
- package/dist/types/service/event-bus.d.ts +9 -0
- package/dist/types/service/serialization.d.ts +5 -0
- package/dist/types/service/state-engine.d.ts +25 -0
- package/dist/types/service/theme-switcher.d.ts +46 -0
- package/dist/types/stencil-public-runtime.d.ts +1860 -0
- package/dist/types/types/animation.type.d.ts +96 -0
- package/dist/types/types/common.d.ts +52 -0
- package/dist/types/types/common.type.d.ts +608 -0
- package/dist/types/types/index.d.ts +37 -0
- package/dist/types/types/text.type.d.ts +32 -0
- package/dist/types/utils/aria-live.d.ts +20 -0
- package/dist/types/utils/component-size.d.ts +2 -0
- package/dist/types/utils/dom.d.ts +58 -0
- package/dist/types/utils/focus-trap.d.ts +35 -0
- package/dist/types/utils/security.d.ts +5 -0
- package/dist/types/utils/test/setup-component-test-env.d.ts +14 -0
- package/dist/types/utils/utils.d.ts +7 -0
- package/dist/types/utils/validation.d.ts +43 -0
- package/loader/cdn.js +1 -0
- package/loader/index.cjs.js +1 -0
- package/loader/index.d.ts +24 -0
- package/loader/index.es2017.js +1 -0
- package/loader/index.js +2 -0
- package/package.json +77 -0
|
@@ -0,0 +1,1617 @@
|
|
|
1
|
+
import { r as registerInstance, c as createEvent, a as getElement, h } from './index-DUsoYu9r.js';
|
|
2
|
+
|
|
3
|
+
const paginationCss = () => `@charset "UTF-8";.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border-width:0 !important}.a11y-sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border-width:0 !important}:host{display:block;position:relative;z-index:0}:host(.has-open-dropdown){z-index:100}.ui-pagination{display:flex;align-items:center;gap:8px;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif}.ui-pagination.pagination-sm{font-size:12px}.ui-pagination.pagination-md{font-size:14px}.ui-pagination.pagination-lg{font-size:16px}.ui-pagination.pagination-default .pagination-btn{cursor:pointer;border-radius:8px}.ui-pagination.pagination-outlined .pagination-btn{cursor:pointer;border-radius:8px}.ui-pagination.pagination-filled .pagination-btn{cursor:pointer;border-radius:8px}.ui-pagination.pagination-floating{background:var(--bg-primary, #ffffff);padding:8px 16px;border-radius:50px;box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);border:1px solid var(--border-default, #e5e7eb);width:fit-content}.ui-pagination.pagination-glass{background:rgba(255, 255, 255, 0.1);backdrop-filter:blur(12px);padding:10px 20px;border-radius:16px;border:1px solid rgba(255, 255, 255, 0.2);box-shadow:0 8px 32px 0 rgba(31, 38, 135, 0.15);width:fit-content}.ui-pagination.pagination-soft{gap:12px}.ui-pagination.pagination-modern{background:var(--bg-primary, #ffffff);padding:12px 24px;border-radius:24px;box-shadow:0 20px 25px -5px rgba(0, 0, 0, 0.05), 0 10px 10px -5px rgba(0, 0, 0, 0.02);border:1px solid var(--border-default, #f3f4f6);gap:16px;width:fit-content}.ui-pagination.pagination-modern .pagination-btn.active{box-shadow:0 4px 12px rgba(var(--color-primary-rgb, 59, 130, 246), 0.3)}.ui-pagination.pagination-minimalist{gap:20px;padding:4px}.ui-pagination.pagination-minimalist .pagination-btn{position:relative}.ui-pagination.pagination-minimalist .pagination-btn:after{content:"";position:absolute;bottom:-4px;left:50%;transform:translateX(-50%);width:0;height:2px;background:var(--color-primary, #10b981);transition:width 0.3s ease}.ui-pagination.pagination-minimalist .pagination-btn.active:after{width:80%}.ui-pagination.pagination-premium{background:var(--bg-primary, #ffffff);padding:12px 28px;border-radius:40px;box-shadow:0 25px 50px -12px rgba(0, 0, 0, 0.1), 0 10px 15px -5px rgba(0, 0, 0, 0.04);border:none;gap:12px;width:fit-content}.ui-pagination.pagination-premium .pagination-btn.active{background:linear-gradient(135deg, var(--color-primary, #6366f1), var(--color-primary-hover, #4f46e5)) !important;color:white !important;box-shadow:0 10px 20px -5px rgba(var(--color-primary-rgb, 99, 102, 241), 0.5);transform:scale(1.1);transition:all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1)}.ui-pagination.pagination-premium .pagination-btn:hover:not(.active):not(.disabled){background:var(--bg-secondary, #f8fafc);transform:translateY(-2px)}.ui-pagination.pagination-underline{gap:12px}.ui-pagination.pagination-underline .pagination-btn.active{position:relative;color:var(--color-primary, #10b981) !important;background:transparent !important}.ui-pagination.pagination-underline .pagination-btn.active::after{content:"";position:absolute;bottom:2px;left:20%;right:20%;height:2px;background:var(--color-primary, #10b981);border-radius:2px;box-shadow:0 2px 4px rgba(var(--color-primary-rgb, 16, 185, 129), 0.3)}.pagination-main-content{display:flex;align-items:center;justify-content:center;flex:1}.ui-pagination.pagination-has-container{justify-content:center;margin-left:auto;margin-right:auto}.ui-pagination.pagination-segmented{gap:0;width:fit-content;border-radius:8px;overflow:hidden;border:1px solid var(--border-default, #e5e7eb);background:var(--bg-primary, #ffffff)}.ui-pagination.pagination-segmented.pagination-shape-pill{border-radius:30px}.ui-pagination.pagination-segmented.pagination-shape-pill .pagination-btn:first-child{border-top-left-radius:30px !important;border-bottom-left-radius:30px !important}.ui-pagination.pagination-segmented.pagination-shape-pill .pagination-btn:last-child{border-top-right-radius:30px !important;border-bottom-right-radius:30px !important}.ui-pagination.pagination-segmented .pagination-btn,.ui-pagination.pagination-segmented .pagination-label,.ui-pagination.pagination-segmented .pagination-pages{border-radius:0 !important;border:none !important;margin:0 !important;display:flex;align-items:center}.ui-pagination.pagination-segmented .pagination-pages{gap:0;border-left:1px solid var(--border-default, #e5e7eb) !important;border-right:1px solid var(--border-default, #e5e7eb) !important}.ui-pagination.pagination-segmented .pagination-label{padding:0 16px;font-weight:600;font-size:13px;color:var(--text-secondary, #374151);border-left:1px solid var(--border-default, #e5e7eb) !important;border-right:1px solid var(--border-default, #e5e7eb) !important;background:var(--bg-primary, #ffffff);height:100%;min-height:36px}.ui-pagination.pagination-segmented .pagination-btn:not(:last-child){border-right:1px solid var(--border-default, #e5e7eb) !important}.ui-pagination.pagination-arrows-joined .pagination-prev{border-top-right-radius:0 !important;border-bottom-right-radius:0 !important;border-right:none !important}.ui-pagination.pagination-arrows-joined .pagination-next{border-top-left-radius:0 !important;border-bottom-left-radius:0 !important}.pagination-joined{display:flex;gap:0}.ui-pagination.pagination-vertical{flex-direction:column;width:fit-content;height:auto;gap:12px}.ui-pagination.pagination-vertical .pagination-pages,.ui-pagination.pagination-vertical .pagination-indicators,.ui-pagination.pagination-vertical .pagination-input-container,.ui-pagination.pagination-vertical .pagination-dropdown-container,.ui-pagination.pagination-vertical .pagination-joined{flex-direction:column}.ui-pagination.pagination-vertical.pagination-segmented{border-radius:8px}.ui-pagination.pagination-vertical.pagination-segmented .pagination-btn,.ui-pagination.pagination-vertical.pagination-segmented .pagination-label,.ui-pagination.pagination-vertical.pagination-segmented .pagination-pages{width:100%;border-right:none !important;border-bottom:1px solid var(--border-default, #e5e7eb) !important}.ui-pagination.pagination-vertical.pagination-segmented .pagination-btn:last-child,.ui-pagination.pagination-vertical.pagination-segmented .pagination-label:last-child,.ui-pagination.pagination-vertical.pagination-segmented .pagination-pages:last-child{border-bottom:none !important}.ui-pagination.pagination-vertical.pagination-segmented.pagination-shape-pill{border-radius:20px}.ui-pagination.pagination-vertical.pagination-segmented.pagination-shape-pill .pagination-btn:first-child{border-radius:20px 20px 0 0 !important}.ui-pagination.pagination-vertical.pagination-segmented.pagination-shape-pill .pagination-btn:last-child{border-radius:0 0 20px 20px !important}.ui-pagination.pagination-vertical.pagination-arrows-joined .pagination-prev{border-bottom-left-radius:0 !important;border-bottom-right-radius:0 !important;border-bottom:none !important}.ui-pagination.pagination-vertical.pagination-arrows-joined .pagination-next{border-top-left-radius:0 !important;border-top-right-radius:0 !important}.ui-pagination.pagination-vertical.pagination-underline .pagination-btn.active::after{bottom:20%;top:20%;left:2px;right:auto;width:2px;height:auto}.pagination-btn.disabled{opacity:0.5;cursor:not-allowed;pointer-events:none}.pagination-btn:focus{outline:none;box-shadow:0 0 0 2px var(--bg-primary, #ffffff), 0 0 0 4px var(--color-primary, #10b981)}.pagination-btn svg{display:inline-flex;vertical-align:middle;width:16px;height:16px}.ui-pagination.pagination-sm .pagination-btn svg{width:14px;height:14px}.ui-pagination.pagination-lg .pagination-btn svg{width:18px;height:18px}.pagination-basic{display:flex;align-items:center;gap:4px}.pagination-pages{display:flex;align-items:center;gap:2px}.pagination-compact{display:flex;align-items:center;gap:12px}.pagination-info{font-weight:500;color:var(--text-secondary, #374151);white-space:nowrap}.pagination-detailed{display:flex;flex-direction:column;gap:16px;align-items:center}.pagination-details{display:flex;align-items:center;gap:16px;flex-wrap:wrap;justify-content:center}.pagination-total{color:var(--text-muted, #6b7280);font-size:0.875em;margin-left:auto}.pagination-size-selector{display:flex;align-items:center;gap:8px;font-size:0.875em;position:relative;z-index:1}.pagination-size-selector .pagination-size-label{color:var(--text-secondary, #374151);font-weight:500}.pagination-size-selector .pagination-size-suffix{color:var(--text-muted, #64748b)}.pg-dropdown{position:relative;display:inline-flex}.pg-dropdown-open-host{z-index:30}.pg-dropdown-trigger{display:inline-flex;align-items:center;gap:6px;background:var(--bg-primary, #ffffff);border:1.5px solid var(--border-default, #e2e8f0);border-radius:20px;padding:5px 10px 5px 12px;font-size:13px;font-weight:600;font-family:inherit;color:var(--text-primary, #1e293b);cursor:pointer;outline:none;transition:all 0.2s ease;white-space:nowrap}.pg-dropdown-trigger:hover{border-color:var(--color-primary, #3b82f6);box-shadow:0 2px 8px rgba(59, 130, 246, 0.12)}.pg-dropdown-trigger.pg-dropdown-open{border-color:var(--color-primary, #3b82f6);box-shadow:0 0 0 3px rgba(59, 130, 246, 0.12)}.pg-dropdown-trigger:disabled{opacity:0.5;cursor:not-allowed}.pg-dropdown-trigger-wide{min-width:110px;justify-content:space-between}.pg-dropdown-arrow{flex-shrink:0;transition:transform 0.2s ease;opacity:0.6}.pg-arrow-up{transform:rotate(180deg)}.pg-dropdown-panel{position:absolute;top:calc(100% + 6px);left:50%;transform:translateX(-50%);min-width:100%;width:max-content;background:var(--bg-primary, #ffffff);border:1px solid var(--border-default, #e2e8f0);border-radius:18px;box-shadow:0 12px 40px rgba(0, 0, 0, 0.18), 0 4px 12px rgba(0, 0, 0, 0.1);z-index:100;padding:6px;overflow:hidden;animation:pgDropdownIn 0.15s ease-out}.pg-dropdown-panel-scroll{max-height:220px;overflow-y:auto;scrollbar-width:thin}.pg-dropdown-panel-scroll::-webkit-scrollbar{width:4px}.pg-dropdown-panel-scroll::-webkit-scrollbar-track{background:transparent}.pg-dropdown-panel-scroll::-webkit-scrollbar-thumb{background:#cbd5e1;border-radius:4px}@keyframes pgDropdownIn{from{opacity:0;transform:translateX(-50%) translateY(-4px)}to{opacity:1;transform:translateX(-50%) translateY(0)}}.pg-dropdown-item{display:flex;flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:12px;padding:7px 12px;border-radius:12px;cursor:pointer;font-size:13px;font-weight:500;color:var(--text-primary, #1e293b);transition:background 0.15s ease;white-space:nowrap}.pg-dropdown-item:hover{background:var(--bg-secondary, #f1f5f9)}.pg-dropdown-item-selected{background:#ecfdf5 !important;color:#059669 !important;font-weight:700}.pg-dropdown-item-selected:hover{background:#d1fae5 !important}.pg-dropdown-check{flex-shrink:0;color:#059669}.pagination-size-premium{gap:12px}.pagination-jump{display:flex;align-items:center;gap:8px;font-size:0.875em}.pagination-jump label{color:var(--text-secondary, #374151)}.pagination-jump input{width:44px;padding:4px 8px;border:1px solid var(--border-strong, #d1d5db);border-radius:8px;text-align:center;transition:all 0.2s ease}.pagination-jump input:focus{outline:none;border-color:var(--color-primary, #10b981);box-shadow:0 0 0 2px var(--bg-primary, #ffffff), 0 0 0 4px var(--color-primary, #10b981)}.pagination-jump-btn{margin-left:4px}.pagination-minimal{display:flex;align-items:center;gap:8px}.pagination-input-group{display:flex;align-items:center;gap:8px}.pagination-page-input{min-width:0 !important;text-align:center;font-size:inherit}.pagination-separator{color:var(--text-muted, #6b7280);font-weight:500}.pagination-total-pages{font-weight:500;color:var(--text-secondary, #374151)}.pagination-advanced{display:flex;flex-direction:column;gap:16px;align-items:center}.pagination-controls{display:flex;align-items:center;gap:24px;flex-wrap:wrap;justify-content:space-between;width:100%}.pagination-summary{color:var(--text-muted, #6b7280);font-size:0.875em}.pagination-jump-section{display:flex;align-items:center;gap:8px;font-size:0.875em}.pagination-jump-section label{color:var(--text-secondary, #374151)}.pagination-jump-section input{width:44px;padding:4px 8px;border:1px solid var(--border-strong, #d1d5db);border-radius:8px;text-align:center}.pagination-infinite{display:flex;flex-direction:column;align-items:center;gap:12px}.pagination-loading{display:flex;align-items:center;justify-content:center}.pagination-infinite-info{color:var(--text-muted, #6b7280);font-size:0.875em}.pagination-spinner{width:24px;height:24px;border:2px solid var(--border-default, #e5e7eb);border-top:2px solid var(--color-primary, #10b981);border-radius:50%;animation:spin 1s linear infinite}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}@media (max-width: 640px){.ui-pagination{flex-wrap:wrap;justify-content:center}.pagination-detailed .pagination-details,.pagination-advanced .pagination-controls{flex-direction:column;gap:12px}.pagination-basic{flex-wrap:wrap}.pagination-pages{order:2;width:100%;justify-content:center}.pagination-first,.pagination-prev{order:1}.pagination-next,.pagination-last{order:3}}@media (prefers-color-scheme: dark){.ui-pagination.pagination-default .pagination-btn{background-color:var(--bg-primary, var(--text-primary, #1f2937));border-color:var(--border-default, #374151);color:var(--text-standard, #f9fafb)}.ui-pagination.pagination-default .pagination-btn:hover:not(.disabled):not(.active){background-color:var(--text-secondary, #374151);border-color:var(--border-strong, #4b5563)}.ui-pagination.pagination-outlined .pagination-btn{border-color:var(--border-default, #374151);color:var(--text-standard, #f9fafb)}.ui-pagination.pagination-outlined .pagination-btn:hover:not(.disabled):not(.active){border-color:var(--border-strong, #4b5563);background-color:var(--text-secondary, #374151)}.ui-pagination.pagination-filled .pagination-btn{background-color:var(--text-secondary, #374151);color:var(--text-standard, #f9fafb)}.ui-pagination.pagination-filled .pagination-btn:hover:not(.disabled):not(.active){background-color:var(--text-secondary, #4b5563)}.pagination-info,.pagination-total,.pagination-size-selector label,.pagination-jump label,.pagination-separator,.pagination-total-pages,.pagination-summary,.pagination-jump-section label,.pagination-infinite-info{color:var(--bg-secondary, #d1d5db)}.pagination-size-selector select,.pagination-jump input,.pagination-page-input,.pagination-jump-section input{background-color:var(--bg-primary, var(--text-primary, #1f2937));border-color:var(--border-default, #374151);color:var(--text-standard, #f9fafb);border-radius:8px}.ui-pagination.pagination-floating{background-color:var(--bg-primary, #111827);border-color:var(--border-default, #374151);box-shadow:0 10px 15px -3px rgba(0, 0, 0, 0.5), 0 4px 6px -2px rgba(0, 0, 0, 0.3)}.ui-pagination.pagination-glass{background-color:rgba(15, 23, 42, 0.4);border-color:rgba(255, 255, 255, 0.05);box-shadow:0 8px 32px 0 rgba(0, 0, 0, 0.6)}.ui-pagination.pagination-modern{background-color:var(--bg-primary, #111827);border-color:var(--border-default, #1f2937);box-shadow:0 20px 25px -5px rgba(0, 0, 0, 0.6)}.ui-pagination.pagination-premium{background-color:var(--bg-primary, #111827);box-shadow:0 25px 50px -12px rgba(0, 0, 0, 0.7)}.ui-pagination.pagination-premium .pagination-btn:hover:not(.active):not(.disabled){background:var(--bg-secondary, #1e293b)}.ui-pagination.pagination-segmented{background-color:var(--bg-primary, #111827);border-color:var(--border-default, #1f2937)}.ui-pagination.pagination-segmented .pagination-btn,.ui-pagination.pagination-segmented .pagination-label,.ui-pagination.pagination-segmented .pagination-pages{border-color:var(--border-default, #1f2937) !important}.ui-pagination.pagination-segmented .pagination-label{background-color:var(--bg-primary, #111827);color:var(--text-standard, #f9fafb)}.ui-pagination.pagination-underline .pagination-btn.active::after{background:var(--color-primary, #60a5fa);box-shadow:0 2px 8px rgba(96, 165, 250, 0.5)}}.pagination-dropdown-container{display:inline-flex;align-items:center;position:relative;isolation:isolate;overflow:visible;background:var(--bg-primary, #ffffff);padding:6px;border-radius:40px;box-shadow:0 10px 25px -5px rgba(0, 0, 0, 0.08), 0 8px 10px -6px rgba(0, 0, 0, 0.05);border:1px solid var(--border-default, rgba(226, 232, 240, 0.8));gap:8px;transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1)}.pagination-dropdown-container:hover{box-shadow:0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);border-color:var(--color-primary-light, rgba(59, 130, 246, 0.2));transform:translateY(-1px)}.pagination-dropdown-wrapper{position:relative;display:flex;align-items:center;min-width:130px;justify-content:center;z-index:2}.pagination-dropdown-wrapper ui-dropdown{width:100%;--dd-shadow:none;}.pagination-dropdown-wrapper-open{z-index:30}.pagination-total{padding:0 12px;color:var(--text-muted, #64748b);font-size:13px;font-weight:600;border-right:1px solid var(--border-default, #e2e8f0);height:24px;display:flex;align-items:center;letter-spacing:-0.01em}.pagination-dropdown-container .pagination-size-selector,.pagination-input-container .pagination-size-selector{padding:0 12px;border-right:1px solid var(--border-default, #e2e8f0);height:24px;font-size:12px;gap:6px}.pagination-dropdown-container .pagination-size-selector .pagination-size-label,.pagination-input-container .pagination-size-selector .pagination-size-label{color:var(--text-muted, #94a3b8);font-weight:700;text-transform:uppercase;font-size:10px;letter-spacing:0.05em}.pagination-dropdown-container .pagination-size-selector .pagination-size-suffix,.pagination-input-container .pagination-size-selector .pagination-size-suffix{display:none}.pagination-dropdown-container .pagination-size-selector ui-dropdown,.pagination-input-container .pagination-size-selector ui-dropdown{width:auto;min-width:50px;--dropdown-trigger-padding:0 8px;--dropdown-trigger-height:28px;--dropdown-trigger-bg:transparent;--dropdown-trigger-border:none;--dropdown-value-font-size:13px;--dropdown-value-font-weight:600}.pagination-input-container{display:inline-flex;align-items:center;position:relative;isolation:isolate;overflow:visible;background:var(--bg-primary, rgba(255, 255, 255, 0.95));backdrop-filter:blur(8px);padding:2px 6px;border-radius:40px;box-shadow:0 4px 12px rgba(0, 0, 0, 0.05);border:1.5px solid var(--border-default, #e2e8f0);gap:6px;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1)}.pagination-page-input{flex:none !important;width:auto;min-width:44px}.pagination-page-input ui-input{--input-text-align:center;--input-border-radius:20px;--input-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.02);--input-height:28px;--input-font-size:13px;--input-font-weight:700;--input-border-color:#e2e8f0;--input-padding-inline:4px}.pagination-input-label{font-size:13px;font-weight:500;color:var(--text-muted, #94a3b8);display:flex;gap:1rem;align-items:center}.pagination-input-label strong{color:var(--text-primary, #1e293b);font-weight:700;font-size:14px}.pagination-dropdown-container .pagination-btn,.pagination-input-container .pagination-btn{position:relative;z-index:1;width:32px;height:32px;border-radius:50% !important;display:flex;align-items:center;justify-content:center;transition:all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);background:transparent !important;border:none !important;color:var(--text-secondary, #475569) !important}.pagination-dropdown-container .pagination-btn:hover:not(.disabled),.pagination-input-container .pagination-btn:hover:not(.disabled){background:var(--bg-secondary, #f8fafc) !important;transform:scale(1.15);color:var(--color-primary, #2563eb) !important}.pagination-dropdown-container .pagination-btn:active:not(.disabled),.pagination-input-container .pagination-btn:active:not(.disabled){transform:scale(0.95)}.pagination-dropdown-container .pagination-btn svg,.pagination-input-container .pagination-btn svg{width:18px;height:18px}.ui-pagination.pagination-dropdown-open .pagination-dropdown-container .pagination-btn,.ui-pagination.pagination-dropdown-open .pagination-input-container .pagination-btn{z-index:1}@media (prefers-color-scheme: dark){.pagination-dropdown-container,.pagination-input-container{background:var(--bg-primary, #0f172a);border-color:rgba(255, 255, 255, 0.05);box-shadow:0 10px 40px -10px rgba(0, 0, 0, 0.5)}.pagination-total{border-color:rgba(255, 255, 255, 0.1);color:#94a3b8}.pagination-dropdown-container .pagination-size-selector,.pagination-input-container .pagination-size-selector{border-color:rgba(255, 255, 255, 0.1)}.pagination-dropdown-container .pagination-size-selector .pagination-size-label,.pagination-input-container .pagination-size-selector .pagination-size-label{color:#64748b}.pagination-input-label strong{color:#f1f5f9}.pagination-btn:hover:not(.disabled){background:rgba(255, 255, 255, 0.05) !important}}.pagination-page-input.has-error{border-color:var(--color-danger, #ef4444) !important;background-color:var(--color-danger-light, rgba(239, 68, 68, 0.05)) !important}.pagination-error-message{position:absolute;top:100%;left:50%;transform:translateX(-50%);background:var(--color-danger, #ef4444);color:white;padding:4px 10px;border-radius:4px;font-size:11px;margin-top:8px;white-space:nowrap;z-index:10;box-shadow:0 4px 6px -1px rgba(0, 0, 0, 0.1)}.pagination-error-message::before{content:"";position:absolute;top:-4px;left:50%;transform:translateX(-50%);border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid var(--color-danger, #ef4444)}.ui-pagination.pagination-sm .pagination-error-message{font-size:10px;padding:2px 8px}.pagination-indicator-container{display:flex;align-items:center;gap:16px}.pagination-indicators{display:flex;align-items:center;gap:8px}.pagination-indicator{position:relative;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:all 0.3s ease}.pagination-indicator-dot{width:8px;height:8px;border-radius:50%;background-color:var(--inactive-color, #cbd5e1);transition:all 0.3s ease}.pagination-indicator:hover .pagination-indicator-dot{background-color:var(--hover-color, #94a3b8);transform:scale(1.2)}.pagination-indicator-active .pagination-indicator-dot{background-color:var(--primary-color, var(--color-primary, #10b981));transform:scale(1.5)}.pagination-indicator-label{position:absolute;top:-30px;background-color:var(--primary-color, var(--color-primary, #10b981));color:var(--text-standard, #ffffff);padding:4px 10px;border-radius:12px;font-size:12px;font-weight:600;white-space:nowrap;animation:indicatorSlideIn 0.2s ease}.pagination-indicator-label::after{content:"";position:absolute;bottom:-4px;left:50%;transform:translateX(-50%);width:0;height:0;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid var(--primary-color, var(--color-primary, #10b981))}@keyframes indicatorSlideIn{from{opacity:0;transform:translateY(5px)}to{opacity:1;transform:translateY(0)}}.pagination-nav-btn:disabled{opacity:0.4;cursor:not-allowed}.pagination-nav-btn svg{width:16px;height:16px}.ui-pagination.pagination-sm .pagination-indicator-dot{width:6px;height:6px}.ui-pagination.pagination-sm .pagination-nav-btn{width:28px;height:28px}.ui-pagination.pagination-sm .pagination-indicator-label{font-size:10px;padding:2px 8px;top:-26px}.ui-pagination.pagination-lg .pagination-indicator-dot{width:10px;height:10px}.ui-pagination.pagination-lg .pagination-nav-btn{width:40px;height:40px}.ui-pagination.pagination-lg .pagination-nav-btn svg{width:20px;height:20px}.ui-pagination.pagination-lg .pagination-indicator-label{font-size:14px;padding:6px 12px;top:-36px}@media (prefers-color-scheme: dark){.pagination-indicator-dot{background-color:var(--inactive-color, #475569)}.pagination-indicator:hover .pagination-indicator-dot{background-color:var(--hover-color, var(--text-muted, #64748b))}.pagination-indicator-active .pagination-indicator-dot{background-color:var(--primary-color, #60a5fa)}.pagination-indicator-label{background-color:var(--primary-color, #60a5fa)}.pagination-indicator-label::after{border-top-color:var(--primary-color, #60a5fa)}.pagination-nav-btn{background-color:var(--bg-color, var(--bg-primary, var(--text-primary, #1f2937)));border-color:var(--border-color, var(--border-default, #374151));color:var(--text-color, #d1d5db)}.pagination-nav-btn:hover:not(:disabled){background-color:var(--hover-bg, var(--text-secondary, #374151));border-color:var(--primary-color, #60a5fa);color:var(--primary-color, #60a5fa)}}.sr-only{position:absolute;width:0px;height:0px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0;display:none}.ui-pagination.pagination-shape-rounded .pagination-btn{border-radius:12px !important}.ui-pagination.pagination-shape-pill .pagination-btn{border-radius:24px !important;padding-left:16px !important;padding-right:16px !important}.ui-pagination.pagination-shape-circle .pagination-btn{border-radius:50% !important;width:36px !important;height:36px !important;min-width:36px !important;padding:0 !important;display:inline-flex !important;align-items:center !important;justify-content:center !important}.pagination-rtl{direction:rtl}.pagination-rtl .pagination-pages{flex-direction:row-reverse}@media (max-width: 768px){.pagination-mobile .pagination-btn{min-width:36px;height:36px;padding:8px;font-size:14px}.pagination-mobile .pagination-pages{gap:4px}.pagination-mobile .pagination-total,.pagination-mobile .pagination-summary{font-size:12px}}.ui-pagination:focus{outline:none;box-shadow:0 0 0 2px var(--bg-primary, #ffffff), 0 0 0 4px var(--color-primary, #10b981);border-radius:8px}.ui-pagination:focus:not(:focus-visible){outline:none}.pagination-btn:focus-visible{outline:none;box-shadow:0 0 0 2px var(--bg-primary, #ffffff), 0 0 0 4px var(--color-primary, #10b981)}@media (prefers-reduced-motion: reduce){.pagination-btn,.pagination-indicator{transition:none}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0, 0, 0, 0);white-space:nowrap;border-width:0}.pagination-transitioning .pagination-btn.active{animation:pageTransition 0.3s ease}@keyframes pageTransition{0%{transform:scale(0.95);opacity:0.7}100%{transform:scale(1);opacity:1}}.pagination-sticky{position:sticky;z-index:100;background:var(--bg-primary, #ffffff);box-shadow:0 2px 8px rgba(0, 0, 0, 0.1);padding:12px 16px;border-radius:8px}.pagination-sticky-top{top:0}.pagination-sticky-bottom{bottom:0}.pagination-progress-bar{width:100%;height:3px;background:var(--bg-primary, #e5e7eb);border-radius:2px;overflow:hidden;margin-bottom:12px}.pagination-progress-fill{height:100%;background:linear-gradient(90deg, var(--color-primary, #10b981), var(--color-primary, #8b5cf6));transition:width 0.3s ease}.pagination-theme-primary .pagination-progress-fill{background:linear-gradient(90deg, var(--color-primary, #10b981), var(--color-primary, #60a5fa))}.pagination-theme-success .pagination-progress-fill{background:linear-gradient(90deg, var(--color-success, #10b981), var(--color-success, #34d399))}.pagination-theme-danger .pagination-progress-fill{background:linear-gradient(90deg, var(--color-danger, #ef4444), var(--color-danger, #f87171))}.pagination-theme-warning .pagination-progress-fill{background:linear-gradient(90deg, var(--color-warning, #f59e0b), var(--color-danger, #fbbf24))}.pagination-theme-info .pagination-progress-fill{background:linear-gradient(90deg, var(--color-info, #06b6d4), var(--color-primary, #22d3ee))}@media (max-width: 768px){.ui-pagination{touch-action:pan-y;user-select:none}}@media (prefers-reduced-motion: reduce){.pagination-transitioning .pagination-btn.active{animation:none}.pagination-progress-fill{transition:none}}.pagination-quick-jump{background:var(--bg-secondary, #f3f4f6) !important;border:1px solid var(--border-strong, #d1d5db) !important;color:var(--text-muted, #6b7280) !important;font-weight:600;font-size:0.875em;min-width:44px !important}.pagination-quick-jump:hover:not(:disabled){background:var(--bg-primary, #e5e7eb) !important;border-color:var(--color-primary, #9ca3af) !important;color:var(--text-secondary, #374151) !important}.pagination-quick-jump:active:not(:disabled){transform:scale(0.95)}.pagination-theme-primary .pagination-quick-jump:hover:not(:disabled){background:rgba(var(--color-primary-rgb, 59, 130, 246), 0.1) !important;border-color:var(--color-primary, #10b981) !important;color:var(--color-primary, #10b981) !important}.pagination-theme-success .pagination-quick-jump:hover:not(:disabled){background:rgba(var(--color-success-rgb, 16, 185, 129), 0.1) !important;border-color:var(--color-success, #10b981) !important;color:var(--color-success, #10b981) !important}.pagination-theme-danger .pagination-quick-jump:hover:not(:disabled){background:rgba(var(--color-danger-rgb, 239, 68, 68), 0.1) !important;border-color:var(--color-danger, #ef4444) !important;color:var(--color-danger, #ef4444) !important}`;
|
|
4
|
+
|
|
5
|
+
const Pagination = class {
|
|
6
|
+
constructor(hostRef) {
|
|
7
|
+
registerInstance(this, hostRef);
|
|
8
|
+
this.pageChange = createEvent(this, "pageChange");
|
|
9
|
+
this.itemsPerPageChange = createEvent(this, "itemsPerPageChange");
|
|
10
|
+
this.validationError = createEvent(this, "validationError");
|
|
11
|
+
}
|
|
12
|
+
get el() { return getElement(this); }
|
|
13
|
+
/**
|
|
14
|
+
* Hide navigation buttons (next, previous, first, last) in dropdown/input modes
|
|
15
|
+
*/
|
|
16
|
+
hideNavButtons = false;
|
|
17
|
+
/**
|
|
18
|
+
* Current active page (1-based)
|
|
19
|
+
*/
|
|
20
|
+
currentPage = 1;
|
|
21
|
+
/**
|
|
22
|
+
* Total number of items
|
|
23
|
+
*/
|
|
24
|
+
totalItems = 0;
|
|
25
|
+
/**
|
|
26
|
+
* Number of items per page
|
|
27
|
+
*/
|
|
28
|
+
itemsPerPage = 10;
|
|
29
|
+
/**
|
|
30
|
+
* Maximum number of page buttons to show
|
|
31
|
+
*/
|
|
32
|
+
maxVisiblePages = 5;
|
|
33
|
+
/**
|
|
34
|
+
* Type of pagination to display
|
|
35
|
+
*/
|
|
36
|
+
type = 'basic';
|
|
37
|
+
/**
|
|
38
|
+
* Size of the pagination component
|
|
39
|
+
*/
|
|
40
|
+
size = 'md';
|
|
41
|
+
/**
|
|
42
|
+
* Visual variant of the pagination
|
|
43
|
+
*/
|
|
44
|
+
variant = 'default';
|
|
45
|
+
/**
|
|
46
|
+
* Color theme
|
|
47
|
+
*/
|
|
48
|
+
theme = 'primary';
|
|
49
|
+
/**
|
|
50
|
+
* Whether to show first/last buttons
|
|
51
|
+
*/
|
|
52
|
+
showFirstLast = true;
|
|
53
|
+
/**
|
|
54
|
+
* Whether to show previous/next buttons
|
|
55
|
+
*/
|
|
56
|
+
showPrevNext = true;
|
|
57
|
+
/**
|
|
58
|
+
* Whether to show page size selector
|
|
59
|
+
*/
|
|
60
|
+
showPageSize = false;
|
|
61
|
+
/**
|
|
62
|
+
* Whether to show total count
|
|
63
|
+
*/
|
|
64
|
+
showTotal = false;
|
|
65
|
+
/**
|
|
66
|
+
* Whether to show jump to page input
|
|
67
|
+
*/
|
|
68
|
+
showJumpTo = false;
|
|
69
|
+
/**
|
|
70
|
+
* Custom text for previous button
|
|
71
|
+
*/
|
|
72
|
+
prevText = 'Previous';
|
|
73
|
+
/**
|
|
74
|
+
* Custom text for next button
|
|
75
|
+
*/
|
|
76
|
+
nextText = 'Next';
|
|
77
|
+
/**
|
|
78
|
+
* Custom text for first button
|
|
79
|
+
*/
|
|
80
|
+
firstText = 'First';
|
|
81
|
+
/**
|
|
82
|
+
* Custom text for last button
|
|
83
|
+
*/
|
|
84
|
+
lastText = 'Last';
|
|
85
|
+
/**
|
|
86
|
+
* Available page sizes for selector
|
|
87
|
+
*/
|
|
88
|
+
pageSizes = [10, 25, 50, 100];
|
|
89
|
+
/**
|
|
90
|
+
* Whether pagination is disabled
|
|
91
|
+
*/
|
|
92
|
+
disabled = false;
|
|
93
|
+
/**
|
|
94
|
+
* Whether to show only icons (no text labels)
|
|
95
|
+
*/
|
|
96
|
+
iconOnly = false;
|
|
97
|
+
/**
|
|
98
|
+
* Whether to use infinite scroll style (shows loading state)
|
|
99
|
+
*/
|
|
100
|
+
infinite = false;
|
|
101
|
+
/**
|
|
102
|
+
* Loading state for infinite scroll
|
|
103
|
+
*/
|
|
104
|
+
loading = false;
|
|
105
|
+
/**
|
|
106
|
+
* Whether to use compact mode (for dropdown and input types)
|
|
107
|
+
*/
|
|
108
|
+
compact = false;
|
|
109
|
+
/**
|
|
110
|
+
* Enable keyboard navigation
|
|
111
|
+
*/
|
|
112
|
+
keyboardNav = true;
|
|
113
|
+
shape = 'default';
|
|
114
|
+
/**
|
|
115
|
+
* Pill-shaped buttons (shorthand for shape="pill")
|
|
116
|
+
*/
|
|
117
|
+
pill = false;
|
|
118
|
+
/**
|
|
119
|
+
* Circle-shaped buttons (shorthand for shape="circle")
|
|
120
|
+
*/
|
|
121
|
+
circle = false;
|
|
122
|
+
/**
|
|
123
|
+
* Custom prev icon (emoji or SVG string)
|
|
124
|
+
*/
|
|
125
|
+
prevIcon = '';
|
|
126
|
+
/**
|
|
127
|
+
* Custom next icon (emoji or SVG string)
|
|
128
|
+
*/
|
|
129
|
+
nextIcon = '';
|
|
130
|
+
/**
|
|
131
|
+
* Custom first icon (emoji or SVG string)
|
|
132
|
+
*/
|
|
133
|
+
firstIcon = '';
|
|
134
|
+
/**
|
|
135
|
+
* Custom last icon (emoji or SVG string)
|
|
136
|
+
*/
|
|
137
|
+
lastIcon = '';
|
|
138
|
+
/**
|
|
139
|
+
* Mobile breakpoint (px)
|
|
140
|
+
*/
|
|
141
|
+
mobileBreakpoint = 768;
|
|
142
|
+
/**
|
|
143
|
+
* Auto-switch to compact mode on mobile
|
|
144
|
+
*/
|
|
145
|
+
responsiveMode = true;
|
|
146
|
+
/**
|
|
147
|
+
* RTL support
|
|
148
|
+
*/
|
|
149
|
+
rtl = false;
|
|
150
|
+
/**
|
|
151
|
+
* Show tooltip on ellipsis hover with hidden page numbers
|
|
152
|
+
*/
|
|
153
|
+
ellipsisTooltip = true;
|
|
154
|
+
/**
|
|
155
|
+
* Enable page transition animations
|
|
156
|
+
*/
|
|
157
|
+
pageTransition = true;
|
|
158
|
+
/**
|
|
159
|
+
* Sync current page with URL query parameter
|
|
160
|
+
*/
|
|
161
|
+
urlSync = false;
|
|
162
|
+
/**
|
|
163
|
+
* URL parameter name for page number
|
|
164
|
+
*/
|
|
165
|
+
urlParam = 'page';
|
|
166
|
+
autoHide = true;
|
|
167
|
+
getEffectiveShape() {
|
|
168
|
+
if (this.shape !== 'default')
|
|
169
|
+
return this.shape;
|
|
170
|
+
if (this.circle)
|
|
171
|
+
return 'circle';
|
|
172
|
+
if (this.pill)
|
|
173
|
+
return 'pill';
|
|
174
|
+
return 'default';
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* Enable quick jump buttons (+5, -5)
|
|
178
|
+
*/
|
|
179
|
+
quickJump = false;
|
|
180
|
+
/**
|
|
181
|
+
* Quick jump step size
|
|
182
|
+
*/
|
|
183
|
+
quickJumpStep = 5;
|
|
184
|
+
/**
|
|
185
|
+
* Make pagination sticky
|
|
186
|
+
*/
|
|
187
|
+
sticky = false;
|
|
188
|
+
/**
|
|
189
|
+
* Sticky position (top or bottom)
|
|
190
|
+
*/
|
|
191
|
+
stickyPosition = 'bottom';
|
|
192
|
+
/**
|
|
193
|
+
* Auto-switch to compact when pages exceed threshold
|
|
194
|
+
*/
|
|
195
|
+
smartCompact = false;
|
|
196
|
+
/**
|
|
197
|
+
* Page count threshold for smart compact mode
|
|
198
|
+
*/
|
|
199
|
+
smartCompactThreshold = 20;
|
|
200
|
+
/**
|
|
201
|
+
* Enable swipe gestures on mobile
|
|
202
|
+
*/
|
|
203
|
+
swipeGestures = true;
|
|
204
|
+
/**
|
|
205
|
+
* Show progress indicator
|
|
206
|
+
*/
|
|
207
|
+
showProgress = false;
|
|
208
|
+
/**
|
|
209
|
+
* If true, shows a checkmark (tick) next to selected items in internal dropdowns.
|
|
210
|
+
*/
|
|
211
|
+
showSelectedMarker = true;
|
|
212
|
+
/**
|
|
213
|
+
* Layout buttons without gaps, inside a single border-radius container
|
|
214
|
+
*/
|
|
215
|
+
segmented = false;
|
|
216
|
+
/**
|
|
217
|
+
* Hide page number buttons completely
|
|
218
|
+
*/
|
|
219
|
+
hideNumbers = false;
|
|
220
|
+
/**
|
|
221
|
+
* Show custom label (e.g. "3 OF 10") instead of or alongside numbers
|
|
222
|
+
*/
|
|
223
|
+
showLabel = false;
|
|
224
|
+
/**
|
|
225
|
+
* Template for the label when showLabel is true. Uses {current} and {total} placeholders.
|
|
226
|
+
*/
|
|
227
|
+
labelTemplate = '{current} OF {total}';
|
|
228
|
+
/**
|
|
229
|
+
* Only join navigation arrows (prev/next) together
|
|
230
|
+
*/
|
|
231
|
+
arrowsJoined = false;
|
|
232
|
+
/**
|
|
233
|
+
* Layout the pagination vertically
|
|
234
|
+
*/
|
|
235
|
+
vertical = false;
|
|
236
|
+
/**
|
|
237
|
+
* Persist page to localStorage
|
|
238
|
+
*/
|
|
239
|
+
persistPage = false;
|
|
240
|
+
/**
|
|
241
|
+
* LocalStorage key for persistence
|
|
242
|
+
*/
|
|
243
|
+
storageKey = 'pagination-page';
|
|
244
|
+
/**
|
|
245
|
+
* Emitted when page changes
|
|
246
|
+
*/
|
|
247
|
+
pageChange;
|
|
248
|
+
/**
|
|
249
|
+
* Emitted when items per page changes
|
|
250
|
+
*/
|
|
251
|
+
itemsPerPageChange;
|
|
252
|
+
/**
|
|
253
|
+
* Emitted when validation error occurs
|
|
254
|
+
*/
|
|
255
|
+
validationError;
|
|
256
|
+
jumpToPage = null;
|
|
257
|
+
inputError = '';
|
|
258
|
+
pageInputValue = '1';
|
|
259
|
+
showEllipsisTooltip = false;
|
|
260
|
+
ellipsisPages = [];
|
|
261
|
+
isTransitioning = false;
|
|
262
|
+
isMobile = false;
|
|
263
|
+
openDropdown = null;
|
|
264
|
+
handleTotalChange() {
|
|
265
|
+
if (this.currentPage > this.totalPages && this.totalPages > 0) {
|
|
266
|
+
this.currentPage = this.totalPages;
|
|
267
|
+
}
|
|
268
|
+
}
|
|
269
|
+
handleCurrentPageChange(newValue) {
|
|
270
|
+
this.syncPageInputState(newValue);
|
|
271
|
+
}
|
|
272
|
+
handleOpenDropdownChange(newValue) {
|
|
273
|
+
// Elevate host z-index in the light DOM so the panel stacks above
|
|
274
|
+
// sibling ui-pagination shadow hosts (shadow DOM z-index is isolated)
|
|
275
|
+
this.el.classList.toggle('has-open-dropdown', newValue !== null);
|
|
276
|
+
}
|
|
277
|
+
paginationRef;
|
|
278
|
+
touchStartX = 0;
|
|
279
|
+
touchEndX = 0;
|
|
280
|
+
handleOutsideClick = (e) => {
|
|
281
|
+
if (!this.openDropdown)
|
|
282
|
+
return;
|
|
283
|
+
const path = e.composedPath();
|
|
284
|
+
if (!path.includes(this.el)) {
|
|
285
|
+
this.openDropdown = null;
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
componentWillLoad() {
|
|
289
|
+
// Initial responsive check
|
|
290
|
+
if (this.responsiveMode && typeof window !== 'undefined') {
|
|
291
|
+
this.checkMobileView();
|
|
292
|
+
}
|
|
293
|
+
// URL sync - read from URL on load
|
|
294
|
+
if (this.urlSync && typeof window !== 'undefined') {
|
|
295
|
+
const urlPage = this.getPageFromURL();
|
|
296
|
+
if (urlPage && urlPage !== this.currentPage) {
|
|
297
|
+
this.currentPage = urlPage;
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
// LocalStorage persistence - read from storage on load
|
|
301
|
+
if (this.persistPage && typeof window !== 'undefined') {
|
|
302
|
+
const storedPage = this.getPageFromStorage();
|
|
303
|
+
if (storedPage && storedPage !== this.currentPage) {
|
|
304
|
+
this.currentPage = storedPage;
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
this.syncPageInputState(this.currentPage);
|
|
308
|
+
}
|
|
309
|
+
componentDidLoad() {
|
|
310
|
+
// Close dropdown on outside click
|
|
311
|
+
if (typeof window !== 'undefined') {
|
|
312
|
+
document.addEventListener('pointerdown', this.handleOutsideClick, true);
|
|
313
|
+
window.addEventListener('click', this.handleOutsideClick);
|
|
314
|
+
}
|
|
315
|
+
// Responsive mode - add listener
|
|
316
|
+
if (this.responsiveMode && typeof window !== 'undefined') {
|
|
317
|
+
window.addEventListener('resize', this.checkMobileView);
|
|
318
|
+
}
|
|
319
|
+
// Swipe gestures for mobile
|
|
320
|
+
if (this.swipeGestures && this.paginationRef) {
|
|
321
|
+
this.paginationRef.addEventListener('touchstart', this.handleTouchStart, { passive: true });
|
|
322
|
+
this.paginationRef.addEventListener('touchend', this.handleTouchEnd, { passive: true });
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
disconnectedCallback() {
|
|
326
|
+
if (typeof window !== 'undefined') {
|
|
327
|
+
window.removeEventListener('resize', this.checkMobileView);
|
|
328
|
+
window.removeEventListener('click', this.handleOutsideClick);
|
|
329
|
+
document.removeEventListener('pointerdown', this.handleOutsideClick, true);
|
|
330
|
+
}
|
|
331
|
+
if (this.swipeGestures && this.paginationRef) {
|
|
332
|
+
this.paginationRef.removeEventListener('touchstart', this.handleTouchStart);
|
|
333
|
+
this.paginationRef.removeEventListener('touchend', this.handleTouchEnd);
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
checkMobileView = () => {
|
|
337
|
+
if (typeof window !== 'undefined') {
|
|
338
|
+
this.isMobile = window.innerWidth < this.mobileBreakpoint;
|
|
339
|
+
}
|
|
340
|
+
};
|
|
341
|
+
handleKeyDown = (e) => {
|
|
342
|
+
if (!this.keyboardNav || this.disabled)
|
|
343
|
+
return;
|
|
344
|
+
switch (e.key) {
|
|
345
|
+
case 'ArrowLeft':
|
|
346
|
+
e.preventDefault();
|
|
347
|
+
if (this.rtl) {
|
|
348
|
+
this.handlePageChange(this.currentPage + 1);
|
|
349
|
+
}
|
|
350
|
+
else {
|
|
351
|
+
this.handlePageChange(this.currentPage - 1);
|
|
352
|
+
}
|
|
353
|
+
break;
|
|
354
|
+
case 'ArrowRight':
|
|
355
|
+
e.preventDefault();
|
|
356
|
+
if (this.rtl) {
|
|
357
|
+
this.handlePageChange(this.currentPage - 1);
|
|
358
|
+
}
|
|
359
|
+
else {
|
|
360
|
+
this.handlePageChange(this.currentPage + 1);
|
|
361
|
+
}
|
|
362
|
+
break;
|
|
363
|
+
case 'Home':
|
|
364
|
+
e.preventDefault();
|
|
365
|
+
this.handlePageChange(1);
|
|
366
|
+
break;
|
|
367
|
+
case 'End':
|
|
368
|
+
e.preventDefault();
|
|
369
|
+
this.handlePageChange(this.totalPages);
|
|
370
|
+
break;
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
// URL Sync helpers
|
|
374
|
+
getPageFromURL() {
|
|
375
|
+
if (typeof window === 'undefined')
|
|
376
|
+
return null;
|
|
377
|
+
const params = new URLSearchParams(window.location.search);
|
|
378
|
+
const page = params.get(this.urlParam);
|
|
379
|
+
return page ? parseInt(page, 10) : null;
|
|
380
|
+
}
|
|
381
|
+
updateURL(page) {
|
|
382
|
+
if (typeof window === 'undefined')
|
|
383
|
+
return;
|
|
384
|
+
const url = new URL(window.location.href);
|
|
385
|
+
url.searchParams.set(this.urlParam, page.toString());
|
|
386
|
+
window.history.pushState({}, '', url.toString());
|
|
387
|
+
}
|
|
388
|
+
// LocalStorage helpers
|
|
389
|
+
getPageFromStorage() {
|
|
390
|
+
if (typeof window === 'undefined')
|
|
391
|
+
return null;
|
|
392
|
+
const stored = localStorage.getItem(this.storageKey);
|
|
393
|
+
return stored ? parseInt(stored, 10) : null;
|
|
394
|
+
}
|
|
395
|
+
savePageToStorage(page) {
|
|
396
|
+
if (typeof window === 'undefined')
|
|
397
|
+
return;
|
|
398
|
+
localStorage.setItem(this.storageKey, page.toString());
|
|
399
|
+
}
|
|
400
|
+
// Swipe gesture handlers
|
|
401
|
+
handleTouchStart = (e) => {
|
|
402
|
+
this.touchStartX = e.changedTouches[0].screenX;
|
|
403
|
+
};
|
|
404
|
+
handleTouchEnd = (e) => {
|
|
405
|
+
this.touchEndX = e.changedTouches[0].screenX;
|
|
406
|
+
this.handleSwipe();
|
|
407
|
+
};
|
|
408
|
+
handleSwipe() {
|
|
409
|
+
const swipeThreshold = 50;
|
|
410
|
+
const diff = this.touchStartX - this.touchEndX;
|
|
411
|
+
if (Math.abs(diff) > swipeThreshold) {
|
|
412
|
+
if (diff > 0) {
|
|
413
|
+
this.handlePageChange(this.rtl ? this.currentPage - 1 : this.currentPage + 1);
|
|
414
|
+
}
|
|
415
|
+
else {
|
|
416
|
+
this.handlePageChange(this.rtl ? this.currentPage + 1 : this.currentPage - 1);
|
|
417
|
+
}
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
// Quick jump handler
|
|
421
|
+
handleQuickJump(direction) {
|
|
422
|
+
const step = this.quickJumpStep;
|
|
423
|
+
const newPage = direction === 'forward'
|
|
424
|
+
? Math.min(this.currentPage + step, this.totalPages)
|
|
425
|
+
: Math.max(this.currentPage - step, 1);
|
|
426
|
+
this.handlePageChange(newPage);
|
|
427
|
+
}
|
|
428
|
+
// Progress calculation
|
|
429
|
+
get progressPercentage() {
|
|
430
|
+
return (this.currentPage / this.totalPages) * 100;
|
|
431
|
+
}
|
|
432
|
+
get totalPages() {
|
|
433
|
+
return Math.ceil(this.totalItems / this.itemsPerPage);
|
|
434
|
+
}
|
|
435
|
+
get visiblePages() {
|
|
436
|
+
const totalPages = this.totalPages;
|
|
437
|
+
const current = this.currentPage;
|
|
438
|
+
const maxVisible = this.maxVisiblePages;
|
|
439
|
+
if (totalPages <= maxVisible) {
|
|
440
|
+
return Array.from({ length: totalPages }, (_, i) => i + 1);
|
|
441
|
+
}
|
|
442
|
+
const half = Math.floor(maxVisible / 2);
|
|
443
|
+
let start = Math.max(1, current - half);
|
|
444
|
+
let end = Math.min(totalPages, start + maxVisible - 1);
|
|
445
|
+
if (end - start + 1 < maxVisible) {
|
|
446
|
+
start = Math.max(1, end - maxVisible + 1);
|
|
447
|
+
}
|
|
448
|
+
return Array.from({ length: end - start + 1 }, (_, i) => start + i);
|
|
449
|
+
}
|
|
450
|
+
handlePageChange(page) {
|
|
451
|
+
this.openDropdown = null;
|
|
452
|
+
this.jumpToPage = null;
|
|
453
|
+
if (page < 1 || page > this.totalPages || page === this.currentPage || this.disabled) {
|
|
454
|
+
return;
|
|
455
|
+
}
|
|
456
|
+
// Page transition animation
|
|
457
|
+
if (this.pageTransition) {
|
|
458
|
+
this.isTransitioning = true;
|
|
459
|
+
setTimeout(() => this.isTransitioning = false, 300);
|
|
460
|
+
}
|
|
461
|
+
this.currentPage = page;
|
|
462
|
+
this.syncPageInputState(page);
|
|
463
|
+
// URL sync
|
|
464
|
+
if (this.urlSync) {
|
|
465
|
+
this.updateURL(page);
|
|
466
|
+
}
|
|
467
|
+
// LocalStorage persistence
|
|
468
|
+
if (this.persistPage) {
|
|
469
|
+
this.savePageToStorage(page);
|
|
470
|
+
}
|
|
471
|
+
this.pageChange.emit({ page, itemsPerPage: this.itemsPerPage });
|
|
472
|
+
}
|
|
473
|
+
handleItemsPerPageChange(itemsPerPage) {
|
|
474
|
+
this.openDropdown = null;
|
|
475
|
+
this.itemsPerPage = itemsPerPage;
|
|
476
|
+
this.currentPage = 1; // Reset to first page when changing page size
|
|
477
|
+
this.syncPageInputState(1);
|
|
478
|
+
this.itemsPerPageChange.emit(itemsPerPage);
|
|
479
|
+
this.pageChange.emit({ page: 1, itemsPerPage });
|
|
480
|
+
}
|
|
481
|
+
handleJumpToPage() {
|
|
482
|
+
this.openDropdown = null;
|
|
483
|
+
const rawValue = this.pageInputValue.trim();
|
|
484
|
+
// Validate input
|
|
485
|
+
if (!rawValue) {
|
|
486
|
+
this.jumpToPage = null;
|
|
487
|
+
this.inputError = 'Please enter a valid number';
|
|
488
|
+
this.validationError.emit('Please enter a valid number');
|
|
489
|
+
return;
|
|
490
|
+
}
|
|
491
|
+
const requestedPage = Number(rawValue);
|
|
492
|
+
if (isNaN(requestedPage)) {
|
|
493
|
+
this.inputError = 'Please enter a valid number';
|
|
494
|
+
this.validationError.emit('Please enter a valid number');
|
|
495
|
+
return;
|
|
496
|
+
}
|
|
497
|
+
if (requestedPage < 1) {
|
|
498
|
+
this.inputError = `Page number must be at least 1`;
|
|
499
|
+
this.validationError.emit(this.inputError);
|
|
500
|
+
return;
|
|
501
|
+
}
|
|
502
|
+
if (requestedPage > this.totalPages) {
|
|
503
|
+
this.inputError = `Page number cannot exceed ${this.totalPages}`;
|
|
504
|
+
this.validationError.emit(this.inputError);
|
|
505
|
+
return;
|
|
506
|
+
}
|
|
507
|
+
// Clear error and navigate
|
|
508
|
+
this.inputError = '';
|
|
509
|
+
this.jumpToPage = requestedPage;
|
|
510
|
+
const page = Math.max(1, Math.min(this.totalPages, requestedPage));
|
|
511
|
+
this.handlePageChange(page);
|
|
512
|
+
}
|
|
513
|
+
syncPageInputState(page) {
|
|
514
|
+
const normalizedPage = Number.isFinite(page) && page > 0 ? page : 1;
|
|
515
|
+
this.jumpToPage = normalizedPage;
|
|
516
|
+
this.pageInputValue = normalizedPage.toString();
|
|
517
|
+
}
|
|
518
|
+
getPageInputWidth() {
|
|
519
|
+
const totalPageDigits = Math.max(1, this.totalPages.toString().length);
|
|
520
|
+
const currentValueDigits = Math.max(0, this.pageInputValue.trim().length);
|
|
521
|
+
const digits = Math.max(2, totalPageDigits, currentValueDigits);
|
|
522
|
+
const padding = this.size === 'sm' ? '1.75rem' : this.size === 'lg' ? '2.5rem' : '2rem';
|
|
523
|
+
const maxVisibleDigits = this.size === 'sm' ? 4 : this.size === 'lg' ? 8 : 6;
|
|
524
|
+
const visibleDigits = Math.min(digits, maxVisibleDigits);
|
|
525
|
+
return `calc(${visibleDigits}ch + ${padding})`;
|
|
526
|
+
}
|
|
527
|
+
handleInputChange(e) {
|
|
528
|
+
const value = typeof e.detail === 'string' ? e.detail : `${e.detail ?? ''}`;
|
|
529
|
+
this.pageInputValue = value;
|
|
530
|
+
if (value === '') {
|
|
531
|
+
this.jumpToPage = null;
|
|
532
|
+
this.inputError = '';
|
|
533
|
+
return;
|
|
534
|
+
}
|
|
535
|
+
const numValue = Number(value);
|
|
536
|
+
if (isNaN(numValue)) {
|
|
537
|
+
this.inputError = 'Please enter a valid number';
|
|
538
|
+
this.validationError.emit(this.inputError);
|
|
539
|
+
return;
|
|
540
|
+
}
|
|
541
|
+
this.jumpToPage = numValue;
|
|
542
|
+
// Clear error if value is now valid
|
|
543
|
+
if (numValue >= 1 && numValue <= this.totalPages) {
|
|
544
|
+
this.inputError = '';
|
|
545
|
+
}
|
|
546
|
+
}
|
|
547
|
+
renderPageSizeSelector() {
|
|
548
|
+
if (!this.showPageSize)
|
|
549
|
+
return null;
|
|
550
|
+
const isPremium = ['glass', 'modern', 'premium'].includes(this.variant);
|
|
551
|
+
const isOpen = this.openDropdown === 'pageSize';
|
|
552
|
+
return (h("div", { class: {
|
|
553
|
+
'pagination-size-selector': true,
|
|
554
|
+
'pagination-size-premium': isPremium,
|
|
555
|
+
'pagination-size-selector-open': isOpen
|
|
556
|
+
}, onClick: (e) => e.stopPropagation() }, h("span", { class: "pagination-size-label" }, "Show:"), h("div", { class: { 'pg-dropdown': true, 'pg-dropdown-open-host': isOpen } }, h("button", { class: { 'pg-dropdown-trigger': true, 'pg-dropdown-open': isOpen }, onClick: () => { this.openDropdown = isOpen ? null : 'pageSize'; }, disabled: this.disabled, type: "button" }, h("span", null, this.itemsPerPage), h("svg", { class: { 'pg-dropdown-arrow': true, 'pg-arrow-up': isOpen }, width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "m6 9 6 6 6-6" }))), isOpen && (h("div", { class: "pg-dropdown-panel" }, this.pageSizes.map(size => (h("div", { class: { 'pg-dropdown-item': true, 'pg-dropdown-item-selected': size === this.itemsPerPage }, onClick: () => { this.handleItemsPerPageChange(size); this.openDropdown = null; } }, h("span", null, size), size === this.itemsPerPage && (h("svg", { class: "pg-dropdown-check", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "3", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M20 6 9 17l-5-5" })))))))))));
|
|
557
|
+
}
|
|
558
|
+
getPageLabel() {
|
|
559
|
+
return this.labelTemplate
|
|
560
|
+
.replace('{current}', this.currentPage.toString())
|
|
561
|
+
.replace('{total}', this.totalPages.toString());
|
|
562
|
+
}
|
|
563
|
+
getNavIcon(type) {
|
|
564
|
+
if (this.vertical) {
|
|
565
|
+
if (type === 'first')
|
|
566
|
+
return this.firstIcon || 'chevrons-up';
|
|
567
|
+
if (type === 'prev')
|
|
568
|
+
return this.prevIcon || 'chevron-up';
|
|
569
|
+
if (type === 'next')
|
|
570
|
+
return this.nextIcon || 'chevron-down';
|
|
571
|
+
if (type === 'last')
|
|
572
|
+
return this.lastIcon || 'chevrons-down';
|
|
573
|
+
}
|
|
574
|
+
if (type === 'first')
|
|
575
|
+
return this.firstIcon || 'chevrons-left';
|
|
576
|
+
if (type === 'prev')
|
|
577
|
+
return this.prevIcon || 'chevron-left';
|
|
578
|
+
if (type === 'next')
|
|
579
|
+
return this.nextIcon || 'chevron-right';
|
|
580
|
+
if (type === 'last')
|
|
581
|
+
return this.lastIcon || 'chevrons-right';
|
|
582
|
+
return '';
|
|
583
|
+
}
|
|
584
|
+
renderBasicPagination() {
|
|
585
|
+
const { currentPage, totalPages, visiblePages, showFirstLast, showPrevNext } = this;
|
|
586
|
+
const canGoPrev = currentPage > 1;
|
|
587
|
+
const canGoNext = currentPage < totalPages;
|
|
588
|
+
return (h("div", { class: "pagination-basic" }, showFirstLast && (h("ui-button", { variant: this.getButtonVariant(-1), size: this.size === 'sm' ? 'sm' : this.size === 'lg' ? 'lg' : 'md',
|
|
589
|
+
// class={`pagination-btn pagination-first ${!canGoPrev ? 'disabled' : ''}`}
|
|
590
|
+
onClick: () => this.handlePageChange(1), disabled: !canGoPrev || this.disabled, ariaLabel: "First page", icon: this.iconOnly ? "chevrons-left" : undefined, iconLibrary: "lucide", label: this.iconOnly ? undefined : this.firstText, shape: this.getEffectiveShape() })), showPrevNext && (h("ui-button", { variant: this.getButtonVariant(-1), size: this.size === 'sm' ? 'sm' : this.size === 'lg' ? 'lg' : 'md',
|
|
591
|
+
// class={{
|
|
592
|
+
// 'pagination-btn': true,
|
|
593
|
+
// 'pagination-prev': true,
|
|
594
|
+
// 'pagination-joined': this.arrowsJoined || this.segmented,
|
|
595
|
+
// 'disabled': !canGoPrev
|
|
596
|
+
// }}
|
|
597
|
+
onClick: () => this.handlePageChange(currentPage - 1), disabled: !canGoPrev || this.disabled, ariaLabel: "Previous page", icon: this.iconOnly || this.arrowsJoined ? this.getNavIcon('prev') : undefined, iconLibrary: "lucide", label: this.iconOnly || this.arrowsJoined ? undefined : this.prevText, shape: this.getEffectiveShape() })), this.showLabel && (h("div", { class: {
|
|
598
|
+
'pagination-label': true,
|
|
599
|
+
'pagination-joined': this.segmented
|
|
600
|
+
} }, this.getPageLabel())), !this.hideNumbers && (h("div", { class: {
|
|
601
|
+
'pagination-pages': true,
|
|
602
|
+
'pagination-joined': this.segmented
|
|
603
|
+
} }, visiblePages.map(page => (h("ui-button", { key: page, variant: this.getButtonVariant(page), size: this.size === 'sm' ? 'sm' : this.size === 'lg' ? 'lg' : 'md',
|
|
604
|
+
// class={{
|
|
605
|
+
// 'pagination-btn': true,
|
|
606
|
+
// 'pagination-page': true,
|
|
607
|
+
// 'active': page === currentPage
|
|
608
|
+
// }}
|
|
609
|
+
onClick: () => this.handlePageChange(page), disabled: this.disabled, label: `${page}`, shape: this.getEffectiveShape() }))))), showPrevNext && (h("ui-button", { variant: this.getButtonVariant(-1), size: this.size === 'sm' ? 'sm' : this.size === 'lg' ? 'lg' : 'md',
|
|
610
|
+
// class={{
|
|
611
|
+
// 'pagination-btn': true,
|
|
612
|
+
// 'pagination-next': true,
|
|
613
|
+
// 'pagination-joined': this.arrowsJoined || this.segmented,
|
|
614
|
+
// 'disabled': !canGoNext
|
|
615
|
+
// }}
|
|
616
|
+
onClick: () => this.handlePageChange(currentPage + 1), disabled: !canGoNext || this.disabled, ariaLabel: "Next page", icon: this.iconOnly || this.arrowsJoined ? this.getNavIcon('next') : undefined, iconLibrary: "lucide", label: this.iconOnly || this.arrowsJoined ? undefined : this.nextText, shape: this.getEffectiveShape() })), showFirstLast && (h("ui-button", { variant: this.getButtonVariant(-1), size: this.size === 'sm' ? 'sm' : this.size === 'lg' ? 'lg' : 'md',
|
|
617
|
+
//// class={`pagination-btn pagination-last ${!canGoNext ? 'disabled' : ''}`}
|
|
618
|
+
onClick: () => this.handlePageChange(totalPages), disabled: !canGoNext || this.disabled, ariaLabel: "Last page", icon: this.iconOnly ? "chevrons-right" : undefined, iconLibrary: "lucide", label: this.iconOnly ? undefined : this.lastText, shape: this.getEffectiveShape() })), this.quickJump && (h("ui-button", { variant: this.getButtonVariant(-1), size: this.size === 'sm' ? 'sm' : this.size === 'lg' ? 'lg' : 'md',
|
|
619
|
+
//// class={`pagination-btn pagination-quick-backward ${!canGoPrev ? 'disabled' : ''}`}
|
|
620
|
+
onClick: () => this.handleQuickJump('backward'), disabled: !canGoPrev || this.disabled, ariaLabel: `Jump back ${this.quickJumpStep} pages`, icon: "chevrons-left", iconLibrary: "lucide", shape: this.getEffectiveShape() })), this.quickJump && (h("ui-button", { variant: this.getButtonVariant(-1), size: this.size === 'sm' ? 'sm' : this.size === 'lg' ? 'lg' : 'md',
|
|
621
|
+
// class={`pagination-btn pagination-quick-forward ${!canGoNext ? 'disabled' : ''}`}
|
|
622
|
+
onClick: () => this.handleQuickJump('forward'), disabled: !canGoNext || this.disabled, ariaLabel: `Jump forward ${this.quickJumpStep} pages`, icon: "chevrons-right", iconLibrary: "lucide", shape: this.getEffectiveShape() }))));
|
|
623
|
+
}
|
|
624
|
+
renderCompactPagination() {
|
|
625
|
+
const { currentPage, totalPages } = this;
|
|
626
|
+
const canGoPrev = currentPage > 1;
|
|
627
|
+
const canGoNext = currentPage < totalPages;
|
|
628
|
+
return (h("div", { class: "pagination-compact" }, h("ui-button", { variant: "ghost", size: "sm", iconOnly: true, icon: "chevron-left", iconLibrary: "lucide", iconSize: "14px",
|
|
629
|
+
// class={`pagination-btn pagination-prev ${!canGoPrev ? 'disabled' : ''}`}
|
|
630
|
+
onClick: () => this.handlePageChange(currentPage - 1), disabled: !canGoPrev || this.disabled, ariaLabel: "Previous page", shape: this.getEffectiveShape() }), h("span", { class: "pagination-info" }, currentPage, " of ", totalPages), h("ui-button", { variant: "ghost", size: "sm", iconOnly: true, icon: "chevron-right", iconLibrary: "lucide", iconSize: "14px",
|
|
631
|
+
// class={`pagination-btn pagination-next ${!canGoNext ? 'disabled' : ''}`}
|
|
632
|
+
onClick: () => this.handlePageChange(currentPage + 1), disabled: !canGoNext || this.disabled, ariaLabel: "Next page", shape: this.getEffectiveShape() })));
|
|
633
|
+
}
|
|
634
|
+
renderDetailedPagination() {
|
|
635
|
+
const startItem = (this.currentPage - 1) * this.itemsPerPage + 1;
|
|
636
|
+
const endItem = Math.min(this.currentPage * this.itemsPerPage, this.totalItems);
|
|
637
|
+
return (h("div", { class: "pagination-detailed" }, this.renderBasicPagination(), h("div", { class: "pagination-details" }, this.showTotal && (h("span", { class: "pagination-total" }, "Showing ", startItem, "-", endItem, " of ", this.totalItems, " items")), this.renderPageSizeSelector(), this.showJumpTo && (h("div", { class: "pagination-jump" }, h("label", null, "Go to page:"), h("ui-input", { type: "number", min: 1, max: this.totalPages, value: this.jumpToPage, class: this.inputError ? 'has-error' : '', onInputChange: (e) => this.handleInputChange(e), onInputKeydown: (e) => e.detail.key === 'Enter' && this.handleJumpToPage(), disabled: this.disabled, size: "sm", variant: "plain", showTypeIcon: false, style: { width: this.getPageInputWidth() } }), h("ui-button", { variant: "primary", size: "sm",
|
|
638
|
+
//// pagination-jump-btn"
|
|
639
|
+
onClick: () => this.handleJumpToPage(), disabled: this.disabled, label: "Go", shape: this.getEffectiveShape() }))))));
|
|
640
|
+
}
|
|
641
|
+
renderMinimalPagination() {
|
|
642
|
+
const { currentPage, totalPages } = this;
|
|
643
|
+
const canGoPrev = currentPage > 1;
|
|
644
|
+
const canGoNext = currentPage < totalPages;
|
|
645
|
+
return (h("div", { class: "pagination-minimal" }, h("ui-button", { variant: "ghost", size: "sm", iconOnly: true, icon: "chevrons-left", iconLibrary: "lucide", iconSize: "14px",
|
|
646
|
+
// class={`pagination-btn pagination-prev ${!canGoPrev ? 'disabled' : ''}`}
|
|
647
|
+
onClick: () => this.handlePageChange(currentPage - 1), disabled: !canGoPrev || this.disabled, ariaLabel: "Previous page", shape: this.getEffectiveShape() }), h("div", { class: "pagination-input-group" }, h("ui-input", { type: "number", min: 1, max: totalPages, value: this.jumpToPage || this.currentPage, onInputChange: (e) => this.handleInputChange(e), onInputBlur: () => this.handleJumpToPage(), onInputKeydown: (e) => e.detail.key === 'Enter' && this.handleJumpToPage(), disabled: this.disabled, class: `pagination-page-input ${this.inputError ? 'has-error' : ''}`, size: "sm", variant: "plain", showTypeIcon: false, style: { width: this.getPageInputWidth() } }), h("span", { class: "pagination-separator" }, "of"), h("span", { class: "pagination-total-pages" }, totalPages)), h("ui-button", { variant: "ghost", size: "sm", iconOnly: true, icon: "chevrons-right", iconLibrary: "lucide", iconSize: "14px",
|
|
648
|
+
// class={`pagination-btn pagination-next ${!canGoNext ? 'disabled' : ''}`}
|
|
649
|
+
onClick: () => this.handlePageChange(currentPage + 1), disabled: !canGoNext || this.disabled, ariaLabel: "Next page", shape: this.getEffectiveShape() })));
|
|
650
|
+
}
|
|
651
|
+
renderAdvancedPagination() {
|
|
652
|
+
return (h("div", { class: "pagination-advanced" }, h("div", { class: "pagination-controls" }, this.renderPageSizeSelector(), this.showTotal && (h("div", { class: "pagination-summary" }, "Showing ", ((this.currentPage - 1) * this.itemsPerPage) + 1, " to ", Math.min(this.currentPage * this.itemsPerPage, this.totalItems), " of ", this.totalItems, " entries"))), this.renderBasicPagination(), this.showJumpTo && (h("div", { class: "pagination-jump-section" }, h("label", null, "Jump to page:"), h("ui-input", { type: "text", inputmode: "numeric", pattern: "[0-9]*", value: this.currentPage.toString(), size: this.size, onInputChange: (e) => this.handleInputChange(e), class: {
|
|
653
|
+
'pagination-page-input': true,
|
|
654
|
+
'has-error': this.inputError !== ''
|
|
655
|
+
}, style: { width: this.getPageInputWidth() }, error: this.inputError !== '', showError: false, disabled: this.disabled }), h("ui-button", { variant: "primary", size: "sm",
|
|
656
|
+
////class="pagination-btn"
|
|
657
|
+
onClick: () => this.handleJumpToPage(), disabled: this.disabled, label: "Go", shape: this.getEffectiveShape() })))));
|
|
658
|
+
}
|
|
659
|
+
renderInfinitePagination() {
|
|
660
|
+
return (h("div", { class: "pagination-infinite" }, h("div", { class: "pagination-loading" }, this.loading ? (h("ui-loader", { size: "xs", color: "currentColor" })) : (h("ui-button", { variant: "primary",
|
|
661
|
+
// pagination-load-more"
|
|
662
|
+
onClick: () => this.handlePageChange(this.currentPage + 1), disabled: this.currentPage >= this.totalPages || this.disabled, label: "Load More", shape: this.getEffectiveShape() }))), this.showTotal && (h("div", { class: "pagination-infinite-info" }, "Showing ", this.currentPage * this.itemsPerPage, " of ", this.totalItems, " items"))));
|
|
663
|
+
}
|
|
664
|
+
renderDropdownPagination() {
|
|
665
|
+
const pageOptions = [];
|
|
666
|
+
for (let i = 1; i <= this.totalPages; i++) {
|
|
667
|
+
pageOptions.push({
|
|
668
|
+
label: `Page ${i} of ${this.totalPages}`,
|
|
669
|
+
value: i.toString()
|
|
670
|
+
});
|
|
671
|
+
}
|
|
672
|
+
return (h("div", { class: "pagination-dropdown-container" }, this.showTotal && (h("div", { class: "pagination-total" }, this.totalItems, " Items")), this.renderPageSizeSelector(), !this.hideNavButtons && (h("ui-button", { variant: "ghost", iconOnly: true, icon: "chevron-left", iconLibrary: "lucide",
|
|
673
|
+
// pagination-prev"
|
|
674
|
+
onClick: () => this.handlePageChange(this.currentPage - 1), disabled: this.currentPage === 1 || this.disabled, ariaLabel: "Previous page", shape: "circle" })), h("div", { class: { 'pagination-dropdown-wrapper': true, 'pagination-dropdown-wrapper-open': this.openDropdown === 'page' }, onClick: (e) => e.stopPropagation() }, h("div", { class: { 'pg-dropdown': true, 'pg-dropdown-open-host': this.openDropdown === 'page' } }, h("button", { class: { 'pg-dropdown-trigger': true, 'pg-dropdown-trigger-wide': true, 'pg-dropdown-open': this.openDropdown === 'page' }, onClick: () => { this.openDropdown = this.openDropdown === 'page' ? null : 'page'; }, disabled: this.disabled, type: "button" }, h("span", null, "Page ", this.currentPage, " of ", this.totalPages), h("svg", { class: { 'pg-dropdown-arrow': true, 'pg-arrow-up': this.openDropdown === 'page' }, width: "12", height: "12", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "2.5", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "m6 9 6 6 6-6" }))), this.openDropdown === 'page' && (h("div", { class: "pg-dropdown-panel pg-dropdown-panel-scroll" }, pageOptions.map(opt => (h("div", { class: { 'pg-dropdown-item': true, 'pg-dropdown-item-selected': opt.value === this.currentPage.toString() }, onClick: () => { this.handlePageChange(parseInt(opt.value)); this.openDropdown = null; } }, h("span", null, opt.label), opt.value === this.currentPage.toString() && (h("svg", { class: "pg-dropdown-check", width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", "stroke-width": "3", "stroke-linecap": "round", "stroke-linejoin": "round" }, h("path", { d: "M20 6 9 17l-5-5" })))))))))), !this.hideNavButtons && (h("ui-button", { variant: "ghost", iconOnly: true, icon: "chevron-right", iconLibrary: "lucide",
|
|
675
|
+
// pagination-next"
|
|
676
|
+
onClick: () => this.handlePageChange(this.currentPage + 1), disabled: this.currentPage === this.totalPages || this.disabled, ariaLabel: "Next page", shape: "circle" }))));
|
|
677
|
+
}
|
|
678
|
+
renderInputPagination() {
|
|
679
|
+
return (h("div", { class: "pagination-input-container" }, this.showTotal && (h("div", { class: "pagination-total" }, this.totalItems, " Total")), this.renderPageSizeSelector(), !this.hideNavButtons && (h("ui-button", { variant: "ghost", iconOnly: true, icon: this.getNavIcon('first'), iconLibrary: "lucide",
|
|
680
|
+
// pagination-first"
|
|
681
|
+
onClick: () => this.handlePageChange(1), disabled: this.currentPage === 1 || this.disabled, ariaLabel: "First page", shape: "circle" })), !this.hideNavButtons && (h("ui-button", { variant: "ghost", iconOnly: true, icon: this.getNavIcon('prev'), iconLibrary: "lucide",
|
|
682
|
+
// pagination-prev"
|
|
683
|
+
onClick: () => this.handlePageChange(this.currentPage - 1), disabled: this.currentPage === 1 || this.disabled, ariaLabel: "Previous page", shape: "circle" })), h("ui-input", { type: "text", inputmode: "numeric", pattern: "[0-9]*", class: `pagination-page-input ${this.inputError ? 'has-error' : ''}`, value: this.pageInputValue, onInputChange: (e) => this.handleInputChange(e), onInputKeydown: (e) => e.detail.key === 'Enter' && this.handleJumpToPage(), onFocusInternal: () => { this.inputError = ''; }, disabled: this.disabled, size: this.size, variant: "plain", showTypeIcon: false, showError: false, style: { width: this.getPageInputWidth() } }), h("span", { class: "pagination-input-label" }, "of ", h("strong", null, this.totalPages)), !this.hideNavButtons && (h("ui-button", { variant: "ghost", iconOnly: true, icon: this.getNavIcon('next'), iconLibrary: "lucide",
|
|
684
|
+
// pagination-next"
|
|
685
|
+
onClick: () => this.handlePageChange(this.currentPage + 1), disabled: this.currentPage === this.totalPages || this.disabled, ariaLabel: "Next page", shape: "circle" })), !this.hideNavButtons && (h("ui-button", { variant: "ghost", iconOnly: true, icon: this.getNavIcon('last'), iconLibrary: "lucide",
|
|
686
|
+
// pagination-last"
|
|
687
|
+
onClick: () => this.handlePageChange(this.totalPages), disabled: this.currentPage === this.totalPages || this.disabled, shape: "circle" }))));
|
|
688
|
+
}
|
|
689
|
+
renderIndicatorPagination() {
|
|
690
|
+
const pages = Array.from({ length: this.totalPages }, (_, i) => i + 1);
|
|
691
|
+
return (h("div", { class: "pagination-indicator-container" }, this.showPrevNext && (h("ui-button", { variant: this.getButtonVariant(-1), iconOnly: true, icon: "chevron-left", iconLibrary: "lucide",
|
|
692
|
+
//class="pagination-nav-btn"
|
|
693
|
+
onClick: () => this.handlePageChange(this.currentPage - 1), disabled: this.currentPage === 1 || this.disabled, ariaLabel: "Previous page", shape: this.getEffectiveShape() })), h("div", { class: "pagination-indicators" }, pages.map(page => (h("div", { class: {
|
|
694
|
+
'pagination-indicator': true,
|
|
695
|
+
'pagination-indicator-active': page === this.currentPage
|
|
696
|
+
}, onClick: () => !this.disabled && this.handlePageChange(page), role: "button", tabindex: this.disabled ? -1 : 0, "aria-label": `Go to page ${page}`, "aria-current": page === this.currentPage ? 'page' : undefined }, h("div", { class: "pagination-indicator-dot" }), page === this.currentPage && (h("div", { class: "pagination-indicator-label" }, page)))))), this.showPrevNext && (h("ui-button", { variant: this.getButtonVariant(-1), iconOnly: true, icon: "chevron-right", iconLibrary: "lucide",
|
|
697
|
+
//class="pagination-nav-btn"
|
|
698
|
+
onClick: () => this.handlePageChange(this.currentPage + 1), disabled: this.currentPage === this.totalPages || this.disabled, ariaLabel: "Next page", shape: this.getEffectiveShape() })), this.showTotal && (h("div", { class: "pagination-total" }, this.currentPage, " / ", this.totalPages))));
|
|
699
|
+
}
|
|
700
|
+
getButtonVariant(page) {
|
|
701
|
+
if (page === this.currentPage) {
|
|
702
|
+
if (this.variant === 'soft')
|
|
703
|
+
return 'soft';
|
|
704
|
+
if (this.variant === 'glass')
|
|
705
|
+
return 'glass';
|
|
706
|
+
if (this.variant === 'modern')
|
|
707
|
+
return 'primary';
|
|
708
|
+
if (this.variant === 'premium')
|
|
709
|
+
return 'primary';
|
|
710
|
+
return this.theme;
|
|
711
|
+
}
|
|
712
|
+
if (this.variant === 'outlined')
|
|
713
|
+
return 'outline';
|
|
714
|
+
if (this.variant === 'floating')
|
|
715
|
+
return 'raised';
|
|
716
|
+
if (this.variant === 'glass')
|
|
717
|
+
return 'glass';
|
|
718
|
+
if (this.variant === 'soft')
|
|
719
|
+
return 'soft';
|
|
720
|
+
if (this.variant === 'modern')
|
|
721
|
+
return 'ghost';
|
|
722
|
+
if (this.variant === 'minimalist')
|
|
723
|
+
return 'plain';
|
|
724
|
+
if (this.variant === 'premium')
|
|
725
|
+
return 'ghost';
|
|
726
|
+
if (this.variant === 'underline')
|
|
727
|
+
return 'ghost';
|
|
728
|
+
return 'ghost';
|
|
729
|
+
}
|
|
730
|
+
render() {
|
|
731
|
+
// Auto-hide when only one page
|
|
732
|
+
if (this.autoHide && this.totalPages <= 1 && !this.infinite) {
|
|
733
|
+
return null;
|
|
734
|
+
}
|
|
735
|
+
// Smart compact mode - auto-switch based on page count
|
|
736
|
+
const effectiveType = this.smartCompact && this.totalPages > this.smartCompactThreshold
|
|
737
|
+
? 'compact'
|
|
738
|
+
: (this.responsiveMode && this.isMobile ? 'compact' : this.type);
|
|
739
|
+
const effectiveShape = this.shape !== 'default' ? this.shape : (this.circle ? 'circle' : (this.pill ? 'pill' : 'default'));
|
|
740
|
+
const classes = {
|
|
741
|
+
'ui-pagination': true,
|
|
742
|
+
[`pagination-${effectiveType}`]: true,
|
|
743
|
+
[`pagination-${this.size}`]: true,
|
|
744
|
+
[`pagination-${this.variant}`]: true,
|
|
745
|
+
[`pagination-theme-${this.theme}`]: this.theme !== 'default',
|
|
746
|
+
[`pagination-shape-${effectiveShape}`]: effectiveShape !== 'default',
|
|
747
|
+
'pagination-disabled': this.disabled,
|
|
748
|
+
'pagination-segmented': this.segmented,
|
|
749
|
+
'pagination-arrows-joined': this.arrowsJoined,
|
|
750
|
+
'pagination-vertical': this.vertical,
|
|
751
|
+
'pagination-rtl': this.rtl,
|
|
752
|
+
'pagination-mobile': this.isMobile,
|
|
753
|
+
'pagination-sticky': this.sticky,
|
|
754
|
+
[`pagination-sticky-${this.stickyPosition}`]: this.sticky,
|
|
755
|
+
'pagination-transitioning': this.isTransitioning,
|
|
756
|
+
'pagination-has-container': ['floating', 'glass', 'modern', 'premium'].includes(this.variant),
|
|
757
|
+
'pagination-dropdown-open': this.openDropdown !== null,
|
|
758
|
+
};
|
|
759
|
+
return (h("div", { class: classes, onKeyDown: this.handleKeyDown, tabindex: this.keyboardNav && !this.disabled ? 0 : -1, role: "navigation", "aria-label": "Pagination Navigation", ref: (el) => this.paginationRef = el }, h("div", { role: "status", "aria-live": "polite", "aria-atomic": "true", class: "sr-only" }, "Page ", this.currentPage, " of ", this.totalPages), this.showProgress && (h("div", { class: "pagination-progress-bar" }, h("div", { class: "pagination-progress-fill", style: { width: `${this.progressPercentage}%` } }))), h("div", { class: "pagination-main-content" }, this.infinite ? this.renderInfinitePagination() :
|
|
760
|
+
effectiveType === 'basic' ? this.renderBasicPagination() :
|
|
761
|
+
effectiveType === 'compact' ? this.renderCompactPagination() :
|
|
762
|
+
effectiveType === 'detailed' ? this.renderDetailedPagination() :
|
|
763
|
+
effectiveType === 'minimal' ? this.renderMinimalPagination() :
|
|
764
|
+
effectiveType === 'advanced' ? this.renderAdvancedPagination() :
|
|
765
|
+
effectiveType === 'dropdown' ? this.renderDropdownPagination() :
|
|
766
|
+
effectiveType === 'input' ? this.renderInputPagination() :
|
|
767
|
+
effectiveType === 'indicator' ? this.renderIndicatorPagination() :
|
|
768
|
+
this.renderBasicPagination()), this.showTotal && effectiveType !== 'detailed' && effectiveType !== 'advanced' && effectiveType !== 'dropdown' && (h("div", { class: "pagination-total" }, "Total ", this.totalItems, " items"))));
|
|
769
|
+
}
|
|
770
|
+
static get watchers() { return {
|
|
771
|
+
"totalItems": [{
|
|
772
|
+
"handleTotalChange": 0
|
|
773
|
+
}],
|
|
774
|
+
"itemsPerPage": [{
|
|
775
|
+
"handleTotalChange": 0
|
|
776
|
+
}],
|
|
777
|
+
"currentPage": [{
|
|
778
|
+
"handleCurrentPageChange": 0
|
|
779
|
+
}],
|
|
780
|
+
"openDropdown": [{
|
|
781
|
+
"handleOpenDropdownChange": 0
|
|
782
|
+
}]
|
|
783
|
+
}; }
|
|
784
|
+
};
|
|
785
|
+
Pagination.style = paginationCss();
|
|
786
|
+
|
|
787
|
+
const ratingCss = () => `.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border-width:0 !important}.a11y-sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border-width:0 !important}:host{display:inline-block;--rating-primary:var(--color-primary, #10b981);--rating-warning:var(--color-warning, #f59e0b);--rating-success:var(--color-success, #10b981);--rating-danger:var(--color-danger, #ef4444)}.rating-container{display:inline-flex;flex-direction:column;gap:12px;user-select:none;font-family:-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1)}.rating-container.rating-victory .rating-item-active:last-child{animation:rating-victory-pulse 0.8s cubic-bezier(0.4, 0, 0.2, 1)}.rating-container.rating-victory .rating-item-active .rating-icon-container::after{content:"";position:absolute;width:6px;height:6px;background:currentColor;border-radius:50%;filter:blur(2px);animation:rating-particle-burst 0.8s cubic-bezier(0.4, 0, 0.2, 1) forwards;box-shadow:10px -20px 0 0 currentColor, -15px -25px 0 0 currentColor, 20px -30px 0 0 currentColor}.rating-container.rating-glow .rating-item-active .rating-icon-fill{filter:drop-shadow(0 0 8px currentColor);animation:rating-shimmer 2s infinite linear}@keyframes rating-shimmer{0%{opacity:0.8}50%{opacity:1}100%{opacity:0.8}}.rating-items{display:flex;align-items:center;gap:8px}.rating-rtl .rating-items{flex-direction:row-reverse}.rating-item{background:none;border:none;padding:0;margin:0;cursor:pointer;outline:none;transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);display:flex;align-items:center;justify-content:center;position:relative}.rating-item:hover:not(:disabled){transform:scale(1.25);z-index:2}.rating-item.rating-item-active{transform:scale(1.15);z-index:5}.rating-item.rating-item-selected{transform:scale(1.3);z-index:10}.rating-item.rating-item-emoji{background:var(--bg-secondary, #f1f5f9);border-radius:50%;padding:10px;font-size:1.5em;filter:grayscale(1);opacity:0.5;transition:all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);line-height:1;display:flex;align-items:center;justify-content:center;box-shadow:inset 0 2px 4px rgba(0, 0, 0, 0.02)}.rating-item.rating-item-emoji.rating-item-active,.rating-item.rating-item-emoji.rating-item-selected{filter:grayscale(0);opacity:1;background:var(--bg-primary, #ffffff);transform:scale(1.3) !important;box-shadow:0 8px 16px rgba(0, 0, 0, 0.08), inset 0 2px 4px rgba(255, 255, 255, 0.8);z-index:20}.rating-item.rating-item-emoji .emoji-display{transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);display:inline-block}.rating-item:disabled{cursor:not-allowed;opacity:0.5}.rating-icon-container{position:relative;display:flex;align-items:center;justify-content:center;flex-shrink:0;width:34px;height:34px}.rating-size-xxxs .rating-icon-container{width:14px;height:14px}.rating-size-xxs .rating-icon-container{width:18px;height:18px}.rating-size-xs .rating-icon-container{width:22px;height:22px}.rating-size-sm .rating-icon-container{width:26px;height:26px}.rating-size-md .rating-icon-container{width:34px;height:34px}.rating-size-lg .rating-icon-container{width:44px;height:44px}.rating-size-xl .rating-icon-container{width:56px;height:56px}.rating-size-xxl .rating-icon-container{width:72px;height:72px}.rating-size-xxxl .rating-icon-container{width:96px;height:96px}.rating-icon-bg{color:var(--text-muted, #94a3b8);opacity:0.4 !important;transition:all 0.3s;display:block;width:100%;height:100%;position:absolute;top:0;left:0}.rating-glass .rating-icon-bg{color:rgba(255, 255, 255, 0.4);opacity:0.5}.rating-icon-bg.img,.rating-icon-bg img{filter:grayscale(100%);opacity:0.5}.rating-icon-fill{position:absolute;top:0;left:0;height:100%;width:0%;overflow:hidden;color:var(--rating-active-color, var(--color-warning, #f59e0b));transition:width 0.3s cubic-bezier(0.4, 0, 0.2, 1);pointer-events:none}.rating-icon-fill ui-icon,.rating-icon-fill img{display:block;position:absolute;top:0;left:0;width:34px;height:34px;flex-shrink:0}.rating-size-xxxs .rating-icon-fill ui-icon,.rating-size-xxxs .rating-icon-fill img{width:14px;height:14px}.rating-size-xxs .rating-icon-fill ui-icon,.rating-size-xxs .rating-icon-fill img{width:18px;height:18px}.rating-size-xs .rating-icon-fill ui-icon,.rating-size-xs .rating-icon-fill img{width:22px;height:22px}.rating-size-sm .rating-icon-fill ui-icon,.rating-size-sm .rating-icon-fill img{width:26px;height:26px}.rating-size-md .rating-icon-fill ui-icon,.rating-size-md .rating-icon-fill img{width:34px;height:34px}.rating-size-lg .rating-icon-fill ui-icon,.rating-size-lg .rating-icon-fill img{width:44px;height:44px}.rating-size-xl .rating-icon-fill ui-icon,.rating-size-xl .rating-icon-fill img{width:56px;height:56px}.rating-size-xxl .rating-icon-fill ui-icon,.rating-size-xxl .rating-icon-fill img{width:72px;height:72px}.rating-size-xxxl .rating-icon-fill ui-icon,.rating-size-xxxl .rating-icon-fill img{width:96px;height:96px}.rating-icon-fill img{filter:none;opacity:1;max-width:none}.rating-item-smiley{background:rgba(var(--text-standard-rgb, 128, 128, 128), 0.08);border:1px solid rgba(var(--text-standard-rgb, 128, 128, 128), 0.1);border-radius:50%;display:flex;align-items:center;justify-content:center;transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);position:relative;cursor:pointer}.rating-size-xxxs .rating-item-smiley{padding:4px}.rating-size-xxs .rating-item-smiley{padding:5px}.rating-size-xs .rating-item-smiley{padding:6px}.rating-size-sm .rating-item-smiley{padding:8px}.rating-size-md .rating-item-smiley{padding:10px}.rating-size-lg .rating-item-smiley{padding:12px}.rating-size-xl .rating-item-smiley{padding:16px}.rating-size-xxl .rating-item-smiley{padding:20px}.rating-size-xxxl .rating-item-smiley{padding:24px}.rating-item-smiley.rating-item-active,.rating-item-smiley.rating-item-selected{background:rgba(var(--primary-rgb, 139, 92, 246), 0.15);transform:scale(1.15);color:var(--rating-active-color);box-shadow:0 0 0 4px rgba(var(--primary-rgb, 139, 92, 246), 0.05), 0 4px 12px rgba(0, 0, 0, 0.05)}.rating-glass .rating-item-smiley{background:rgba(255, 255, 255, 0.05)}.rating-glass .rating-item-smiley.rating-item-selected{background:rgba(255, 255, 255, 0.15)}.rating-item-thumb{padding:10px;background:var(--bg-primary, #f8fafc);border:1px solid var(--border-subtle, #e2e8f0);border-radius:12px}.rating-item-thumb.rating-item-active{background:var(--bg-primary, #ffffff);box-shadow:0 4px 12px rgba(0, 0, 0, 0.05);border-color:var(--rating-active-color)}.rating-item-thumb.rating-item-thumb-up:hover:not(:disabled){color:var(--rating-success);border-color:var(--rating-success)}.rating-item-thumb.rating-item-thumb-down:hover:not(:disabled){color:var(--rating-danger);border-color:var(--rating-danger)}.smiley-item-wrapper{display:flex;flex-direction:column;align-items:center;gap:8px}.rating-size-lg .smiley-item-wrapper{gap:12px}.rating-size-xl .smiley-item-wrapper{gap:16px}.smiley-label{font-size:11px;font-weight:700;color:var(--rating-active-color, var(--color-success, #10b981));text-transform:capitalize;letter-spacing:-0.2px;white-space:nowrap}.rating-size-lg .smiley-label{font-size:13px}.rating-size-xl .smiley-label{font-size:15px}.rating-total-reviews{display:flex;align-items:center;justify-content:center;gap:4px;margin-top:4px;color:var(--color-primary, #94a3b8);font-size:11px;font-weight:500;font-style:italic}.rating-rtl .rating-total-reviews{flex-direction:row-reverse}.rating-total-reviews .review-dot{opacity:0.5}.rating-primary{--rating-active-color:var(--rating-primary)}.rating-warning{--rating-active-color:var(--rating-warning)}.rating-success{--rating-active-color:var(--rating-success)}.rating-danger{--rating-active-color:var(--rating-danger)}.rating-size-xxxs .rating-icon-container,.rating-size-xxxs .rating-item-smiley{width:14px;height:14px}.rating-size-xxxs ui-icon{--size:14px}.rating-size-xxxs img{width:14px;height:14px}.rating-size-xxs .rating-icon-container,.rating-size-xxs .rating-item-smiley{width:18px;height:18px}.rating-size-xxs ui-icon{--size:18px}.rating-size-xxs img{width:18px;height:18px}.rating-size-xs .rating-icon-container,.rating-size-xs .rating-item-smiley{width:22px;height:22px}.rating-size-xs ui-icon{--size:22px}.rating-size-xs img{width:22px;height:22px}.rating-size-sm .rating-icon-container,.rating-size-sm .rating-item-smiley{width:26px;height:26px}.rating-size-sm ui-icon{--size:26px}.rating-size-sm img{width:26px;height:26px}.rating-size-md .rating-icon-container,.rating-size-md .rating-item-smiley{width:34px;height:34px}.rating-size-md ui-icon{--size:34px}.rating-size-md img{width:34px;height:34px}.rating-size-lg .rating-icon-container,.rating-size-lg .rating-item-smiley{width:44px;height:44px}.rating-size-lg ui-icon{--size:44px}.rating-size-lg img{width:44px;height:44px}.rating-size-xl .rating-icon-container,.rating-size-xl .rating-item-smiley{width:56px;height:56px}.rating-size-xl ui-icon{--size:56px}.rating-size-xl img{width:56px;height:56px}.rating-size-xxl .rating-icon-container,.rating-size-xxl .rating-item-smiley{width:72px;height:72px}.rating-size-xxl ui-icon{--size:72px}.rating-size-xxl img{width:72px;height:72px}.rating-size-xxxl .rating-icon-container,.rating-size-xxxl .rating-item-smiley{width:96px;height:96px}.rating-size-xxxl ui-icon{--size:96px}.rating-size-xxxl img{width:96px;height:96px}.rating-glass{background:rgba(255, 255, 255, 0.05);backdrop-filter:blur(12px);padding:16px;border-radius:16px;border:1px solid rgba(255, 255, 255, 0.1);box-shadow:0 4px 20px rgba(0, 0, 0, 0.1)}.rating-raised{background:var(--bg-primary, #f8fafc);padding:20px;border-radius:20px;box-shadow:8px 8px 16px rgba(0, 0, 0, 0.05), -4px -4px 12px var(--bg-primary, #ffffff);border:1px solid rgba(0, 0, 0, 0.02)}@keyframes rating-particle-burst{0%{transform:scale(0);opacity:1}100%{transform:scale(1.5) translateY(-60px);opacity:0}}@keyframes skeleton-shimmer{0%{background-position:-200% 0}100%{background-position:200% 0}}@keyframes rating-victory-pulse{from{transform:scale(1.1);filter:drop-shadow(0 0 0px var(--rating-active-color))}to{transform:scale(1.4);filter:drop-shadow(0 0 12px var(--rating-active-color))}}.rating-items-container{display:flex;align-items:center;gap:24px}.rating-summary{display:flex;align-items:center;gap:16px}.rating-summary .summary-divider{width:1px;height:24px;background:var(--bg-primary, #e2e8f0)}.rating-size-lg .rating-summary .summary-divider,.rating-size-xl .rating-summary .summary-divider{height:32px}.rating-summary .summary-content{display:flex;flex-direction:column;justify-content:center;line-height:1.2}.rating-summary .summary-content .summary-label{font-size:14px;font-weight:800;color:var(--rating-active-color, #1e293b);margin:0}.rating-summary .summary-content .summary-value{font-size:12px;font-weight:600;color:var(--rating-active-color, var(--color-success, #10b981));opacity:0.6;margin:0}.rating-summary-bottom{margin-top:12px;justify-content:center}.rating-summary-bottom .summary-divider{display:none}.rating-summary-bottom .summary-content{flex-direction:row;align-items:center;gap:8px}.rating-value{display:flex;flex-direction:column;align-items:center;gap:2px}.rating-label{font-size:13px;font-weight:700;color:var(--rating-active-color);text-transform:uppercase;letter-spacing:0.5px}.rating-number{font-size:11px;font-weight:500;color:var(--color-primary, #94a3b8)}.rating-description{color:var(--color-primary, #94a3b8);font-size:10px;font-weight:400;line-height:1.4;opacity:0.8;max-width:200px}.rating-description-side{margin-inline-start:12px;padding-inline-start:12px;border-inline-start:1px solid rgba(0, 0, 0, 0.08);display:flex;align-items:center}.rating-description-bottom{margin-top:8px;text-align:center;width:100%}.rating-victory-particle{position:absolute;width:var(--size, 6px);height:var(--size, 6px);background:var(--clr, #fbbf24);border-radius:2px;pointer-events:none;z-index:50;animation:rating-particle-burst 1s cubic-bezier(0, 0, 0.2, 1) forwards}@keyframes rating-particle-burst{0%{transform:translate(0, 0) rotate(0deg) scale(0);opacity:1}15%{transform:translate(calc(var(--tx) * 0.2), calc(var(--ty) * 0.2)) rotate(45deg) scale(1.2)}100%{transform:translate(var(--tx), var(--ty)) rotate(var(--rot)) scale(0);opacity:0}}.rating-invalid .rating-icon-bg{color:var(--rating-danger, var(--color-danger, #ef4444));opacity:0.2}.rating-invalid .rating-icon-fill{color:var(--rating-danger, var(--color-danger, #ef4444))}.rating-invalid.rating-glow .rating-item-active{filter:drop-shadow(0 0 8px rgba(var(--color-danger-rgb, 239, 68, 68), 0.4))}.rating-helper{margin-top:8px;font-size:11px;color:var(--text-muted, #64748b);display:flex;align-items:center;gap:6px}.rating-helper.rating-error{color:var(--color-danger, #ef4444)}.rating-histogram{display:flex;flex-direction:column;gap:6px;margin-top:16px;padding-top:16px;border-top:1px solid var(--border-subtle, #e2e8f0);width:100%}.histogram-row{display:flex;align-items:center;gap:12px;font-size:11px}.histogram-label{display:flex;align-items:center;gap:4px;min-width:40px;font-weight:600;color:var(--text-standard, #475569)}.histogram-bar-container{flex:1;height:8px;background:var(--bg-secondary, #f1f5f9);border-radius:4px;overflow:hidden}.histogram-bar-fill{height:100%;border-radius:4px;transition:width 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275)}.histogram-count{min-width:30px;text-align:right;font-weight:500;color:var(--text-muted, #94a3b8)}.rating-container:focus{outline:none}.rating-container:focus .rating-items{box-shadow:0 0 0 3px var(--rating-active-color, #fbbf24) 44;border-radius:8px;padding:4px;margin:-4px}`;
|
|
788
|
+
|
|
789
|
+
const Rating = class {
|
|
790
|
+
constructor(hostRef) {
|
|
791
|
+
registerInstance(this, hostRef);
|
|
792
|
+
this.ratingChange = createEvent(this, "ratingChange");
|
|
793
|
+
}
|
|
794
|
+
get el() { return getElement(this); }
|
|
795
|
+
/**
|
|
796
|
+
* Type of rating
|
|
797
|
+
*/
|
|
798
|
+
type = 'star';
|
|
799
|
+
/**
|
|
800
|
+
* Current rating value
|
|
801
|
+
*/
|
|
802
|
+
value = 0;
|
|
803
|
+
/**
|
|
804
|
+
* Maximum rating value (for star and smiley types)
|
|
805
|
+
*/
|
|
806
|
+
max = 5;
|
|
807
|
+
/**
|
|
808
|
+
* Size of the rating icons
|
|
809
|
+
*/
|
|
810
|
+
size = 'md';
|
|
811
|
+
/**
|
|
812
|
+
* Color of active rating
|
|
813
|
+
*/
|
|
814
|
+
color = 'warning';
|
|
815
|
+
/**
|
|
816
|
+
* Custom active color (hex/css color)
|
|
817
|
+
*/
|
|
818
|
+
activeColor;
|
|
819
|
+
/**
|
|
820
|
+
* Custom active fill color (hex/css color)
|
|
821
|
+
*/
|
|
822
|
+
activeFillColor;
|
|
823
|
+
/**
|
|
824
|
+
* Read-only mode
|
|
825
|
+
*/
|
|
826
|
+
readonly = false;
|
|
827
|
+
/**
|
|
828
|
+
* Disabled state
|
|
829
|
+
*/
|
|
830
|
+
disabled = false;
|
|
831
|
+
/**
|
|
832
|
+
* Allow half ratings (only for star type)
|
|
833
|
+
*/
|
|
834
|
+
allowHalf = false;
|
|
835
|
+
/**
|
|
836
|
+
* Show rating value text
|
|
837
|
+
*/
|
|
838
|
+
showValue = false;
|
|
839
|
+
/**
|
|
840
|
+
/** High-Fidelity: Tactical side/bottom description */
|
|
841
|
+
description;
|
|
842
|
+
descriptionPosition = 'bottom';
|
|
843
|
+
/** Custom labels for ratings
|
|
844
|
+
*/
|
|
845
|
+
labels;
|
|
846
|
+
/** High-Fidelity: Atmospheric glow on active items */
|
|
847
|
+
glow = false;
|
|
848
|
+
/** High-Fidelity: Sensory vibration feedback */
|
|
849
|
+
haptic = false;
|
|
850
|
+
/** High-Fidelity: Victory pulse on max rating */
|
|
851
|
+
victoryGlow = false;
|
|
852
|
+
/** High-Fidelity: Visual variant */
|
|
853
|
+
variant = 'default';
|
|
854
|
+
/** High-Fidelity: Allow clearing the rating by clicking the same value */
|
|
855
|
+
clearable = false;
|
|
856
|
+
/** Custom Icon Name (Lucide) */
|
|
857
|
+
iconName = 'star';
|
|
858
|
+
/** Icon Library */
|
|
859
|
+
iconLibrary = 'lucide';
|
|
860
|
+
/** High-Fidelity: Image URL for the rating marker */
|
|
861
|
+
image;
|
|
862
|
+
/** High-Fidelity: Dynamic color mapping for individual items (JSON array) */
|
|
863
|
+
colorMap;
|
|
864
|
+
/** Validation: Error state */
|
|
865
|
+
invalid = false;
|
|
866
|
+
/** Validation: Error message */
|
|
867
|
+
errorMessage;
|
|
868
|
+
/** Show total review count */
|
|
869
|
+
showReviews = false;
|
|
870
|
+
/** Total review count value */
|
|
871
|
+
totalReviews = 0;
|
|
872
|
+
/** Validation: Helper text */
|
|
873
|
+
helperText;
|
|
874
|
+
/**
|
|
875
|
+
* Show a distribution histogram of total reviews
|
|
876
|
+
*/
|
|
877
|
+
showHistogram = false;
|
|
878
|
+
/**
|
|
879
|
+
* Data for the rating summary histogram (JSON array of counts from 5 to 1 stars)
|
|
880
|
+
*/
|
|
881
|
+
summaryData;
|
|
882
|
+
/**
|
|
883
|
+
* Use native emojis instead of icons for smiley rating
|
|
884
|
+
*/
|
|
885
|
+
useEmoji = false;
|
|
886
|
+
/**
|
|
887
|
+
* Show a visual summary of the current rating (label and value)
|
|
888
|
+
*/
|
|
889
|
+
showSummary = false;
|
|
890
|
+
/**
|
|
891
|
+
* Position of the summary
|
|
892
|
+
*/
|
|
893
|
+
summaryPosition = 'side';
|
|
894
|
+
/**
|
|
895
|
+
* RTL support
|
|
896
|
+
*/
|
|
897
|
+
rtl = false;
|
|
898
|
+
hoverValue = 0;
|
|
899
|
+
isVictory = false;
|
|
900
|
+
particles = [];
|
|
901
|
+
/**
|
|
902
|
+
* Emitted when rating changes
|
|
903
|
+
*/
|
|
904
|
+
ratingChange;
|
|
905
|
+
getLabels() {
|
|
906
|
+
if (this.labels) {
|
|
907
|
+
try {
|
|
908
|
+
return typeof this.labels === 'string' ? JSON.parse(this.labels) : this.labels;
|
|
909
|
+
}
|
|
910
|
+
catch {
|
|
911
|
+
return [];
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
return [];
|
|
915
|
+
}
|
|
916
|
+
handleClick = (rating) => {
|
|
917
|
+
if (this.readonly || this.disabled)
|
|
918
|
+
return;
|
|
919
|
+
if (this.type === 'thumb') {
|
|
920
|
+
// Thumb: toggle between 1 (up), -1 (down), 0 (none)
|
|
921
|
+
if (this.value === rating) {
|
|
922
|
+
this.value = 0;
|
|
923
|
+
}
|
|
924
|
+
else {
|
|
925
|
+
this.value = rating;
|
|
926
|
+
}
|
|
927
|
+
}
|
|
928
|
+
else {
|
|
929
|
+
if (this.clearable && this.value === rating) {
|
|
930
|
+
this.value = 0;
|
|
931
|
+
}
|
|
932
|
+
else {
|
|
933
|
+
this.value = rating;
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
if (this.haptic && 'vibrate' in navigator) {
|
|
937
|
+
navigator.vibrate(this.value === this.max ? [15, 30, 15] : 10);
|
|
938
|
+
}
|
|
939
|
+
if (this.value === this.max) {
|
|
940
|
+
this.triggerVictory();
|
|
941
|
+
}
|
|
942
|
+
this.ratingChange.emit(this.value);
|
|
943
|
+
};
|
|
944
|
+
handleKeyDown = (event) => {
|
|
945
|
+
if (this.readonly || this.disabled)
|
|
946
|
+
return;
|
|
947
|
+
let newValue = this.value;
|
|
948
|
+
const step = this.allowHalf ? 0.5 : 1;
|
|
949
|
+
const isRtl = this.rtl || this.el.dir === 'rtl' || !!this.el.closest('[dir="rtl"]');
|
|
950
|
+
switch (event.key) {
|
|
951
|
+
case 'ArrowRight':
|
|
952
|
+
case 'ArrowUp':
|
|
953
|
+
newValue = isRtl
|
|
954
|
+
? Math.max(0, this.value - step)
|
|
955
|
+
: Math.min(this.max, this.value + step);
|
|
956
|
+
event.preventDefault();
|
|
957
|
+
break;
|
|
958
|
+
case 'ArrowLeft':
|
|
959
|
+
case 'ArrowDown':
|
|
960
|
+
newValue = isRtl
|
|
961
|
+
? Math.min(this.max, this.value + step)
|
|
962
|
+
: Math.max(0, this.value - step);
|
|
963
|
+
event.preventDefault();
|
|
964
|
+
break;
|
|
965
|
+
case 'Home':
|
|
966
|
+
newValue = 0;
|
|
967
|
+
event.preventDefault();
|
|
968
|
+
break;
|
|
969
|
+
case 'End':
|
|
970
|
+
newValue = this.max;
|
|
971
|
+
event.preventDefault();
|
|
972
|
+
break;
|
|
973
|
+
default:
|
|
974
|
+
return;
|
|
975
|
+
}
|
|
976
|
+
if (newValue !== this.value) {
|
|
977
|
+
this.value = newValue;
|
|
978
|
+
this.ratingChange.emit(this.value);
|
|
979
|
+
if (this.value === this.max)
|
|
980
|
+
this.triggerVictory();
|
|
981
|
+
}
|
|
982
|
+
};
|
|
983
|
+
triggerVictory = () => {
|
|
984
|
+
if (!this.victoryGlow)
|
|
985
|
+
return;
|
|
986
|
+
this.isVictory = true;
|
|
987
|
+
// Create euphoria particles
|
|
988
|
+
const newParticles = Array.from({ length: 24 }).map((_, i) => ({
|
|
989
|
+
id: Date.now() + i,
|
|
990
|
+
tx: (Math.random() - 0.5) * 500,
|
|
991
|
+
ty: -(Math.random() * 300 + 100),
|
|
992
|
+
rot: Math.random() * 720,
|
|
993
|
+
clr: ['#fbbf24', '#f59e0b', '#3bf673', '#10b981', '#ef4444', '#6366f1'][i % 6],
|
|
994
|
+
size: Math.random() * 8 + 4
|
|
995
|
+
}));
|
|
996
|
+
this.particles = newParticles;
|
|
997
|
+
setTimeout(() => {
|
|
998
|
+
this.isVictory = false;
|
|
999
|
+
this.particles = [];
|
|
1000
|
+
}, 1500);
|
|
1001
|
+
};
|
|
1002
|
+
handleMouseEnter = (rating) => {
|
|
1003
|
+
if (this.readonly || this.disabled)
|
|
1004
|
+
return;
|
|
1005
|
+
this.hoverValue = rating;
|
|
1006
|
+
};
|
|
1007
|
+
handleMouseLeave = () => {
|
|
1008
|
+
if (this.readonly || this.disabled)
|
|
1009
|
+
return;
|
|
1010
|
+
this.hoverValue = 0;
|
|
1011
|
+
};
|
|
1012
|
+
renderStarRating() {
|
|
1013
|
+
const items = [];
|
|
1014
|
+
const currentValue = this.hoverValue || this.value;
|
|
1015
|
+
const colorMapArray = this.colorMap ? JSON.parse(this.colorMap) : null;
|
|
1016
|
+
for (let i = 1; i <= this.max; i++) {
|
|
1017
|
+
const isActive = currentValue >= i;
|
|
1018
|
+
const isHalf = this.allowHalf && currentValue >= i - 0.5 && currentValue < i;
|
|
1019
|
+
const isHovered = this.hoverValue >= i;
|
|
1020
|
+
const itemColor = colorMapArray && colorMapArray[i - 1] ? colorMapArray[i - 1] : (this.activeColor || this.color);
|
|
1021
|
+
const activeFill = this.activeFillColor || 'currentColor';
|
|
1022
|
+
items.push(h("button", { type: "button", class: {
|
|
1023
|
+
'rating-item': true,
|
|
1024
|
+
'rating-item-active': isActive || isHalf,
|
|
1025
|
+
'rating-item-half': isHalf,
|
|
1026
|
+
'rating-item-hover': isHovered,
|
|
1027
|
+
[`rating-color-${itemColor}`]: !!itemColor,
|
|
1028
|
+
}, onClick: () => this.handleClick(i), onMouseEnter: () => this.handleMouseEnter(i), onMouseLeave: this.handleMouseLeave, disabled: this.disabled || this.readonly, "aria-label": `Rate ${i} out of ${this.max}` }, h("div", { class: "rating-icon-container" }, this.image ? (h("img", { src: this.image, class: "rating-icon-bg", alt: "rating" })) : (h("ui-icon", { name: this.iconName, color: "currentColor", library: this.iconLibrary, size: this.size, class: "rating-icon-bg" })), h("div", { class: "rating-icon-fill", style: { width: isHalf ? '50%' : (isActive ? '100% ' : '0%') } }, this.image ? (h("img", { src: this.image, alt: "rating active" })) : (h("ui-icon", { name: this.iconName, color: "currentColor", library: this.iconLibrary, size: this.size, fill: activeFill }))))));
|
|
1029
|
+
}
|
|
1030
|
+
return items;
|
|
1031
|
+
}
|
|
1032
|
+
renderHistogram() {
|
|
1033
|
+
if (!this.summaryData)
|
|
1034
|
+
return null;
|
|
1035
|
+
try {
|
|
1036
|
+
const data = typeof this.summaryData === 'string' ? JSON.parse(this.summaryData) : this.summaryData;
|
|
1037
|
+
if (!Array.isArray(data))
|
|
1038
|
+
return null;
|
|
1039
|
+
const total = data.reduce((a, b) => a + b, 0);
|
|
1040
|
+
const activeColor = this.activeColor || `var(--rating-${this.color})`;
|
|
1041
|
+
return (h("div", { class: "rating-histogram" }, data.map((count, index) => {
|
|
1042
|
+
const stars = data.length - index;
|
|
1043
|
+
const percentage = total > 0 ? (count / total) * 100 : 0;
|
|
1044
|
+
return (h("div", { class: "histogram-row" }, h("span", { class: "histogram-label" }, stars, " ", h("ui-icon", { name: "star", library: "lucide", size: "10px" })), h("div", { class: "histogram-bar-container" }, h("div", { class: "histogram-bar-fill", style: { width: `${percentage}%`, backgroundColor: activeColor } })), h("span", { class: "histogram-count" }, count)));
|
|
1045
|
+
})));
|
|
1046
|
+
}
|
|
1047
|
+
catch {
|
|
1048
|
+
return null;
|
|
1049
|
+
}
|
|
1050
|
+
}
|
|
1051
|
+
renderSmileyRating() {
|
|
1052
|
+
const items = [];
|
|
1053
|
+
const labels = this.getLabels();
|
|
1054
|
+
const icons = ['frown', 'meh', 'smile', 'laugh', 'heart'];
|
|
1055
|
+
const emojis = ['😢', '😕', '😐', '🙂', '😄'];
|
|
1056
|
+
const currentValue = this.hoverValue || this.value;
|
|
1057
|
+
for (let i = 1; i <= this.max; i++) {
|
|
1058
|
+
const isHovered = this.hoverValue === i;
|
|
1059
|
+
const isSelected = this.value === i;
|
|
1060
|
+
const isActive = currentValue === i || (this.useEmoji && currentValue >= i);
|
|
1061
|
+
const icon = icons[i - 1] || 'smile';
|
|
1062
|
+
const emoji = emojis[i - 1] || '🙂';
|
|
1063
|
+
items.push(h("div", { class: "smiley-item-wrapper" }, h("button", { type: "button", class: {
|
|
1064
|
+
'rating-item': true,
|
|
1065
|
+
'rating-item-smiley': true,
|
|
1066
|
+
'rating-item-active': isActive,
|
|
1067
|
+
'rating-item-selected': isSelected,
|
|
1068
|
+
'rating-item-hover': isHovered,
|
|
1069
|
+
'rating-item-emoji': this.useEmoji,
|
|
1070
|
+
}, onClick: () => this.handleClick(i), onMouseEnter: () => this.handleMouseEnter(i), onMouseLeave: this.handleMouseLeave, disabled: this.disabled || this.readonly, "aria-label": labels[i - 1] || `Rate ${i} out of ${this.max}` }, this.useEmoji ? (h("span", { class: "emoji-display" }, currentValue >= i || isSelected ? emoji : '⚪')) : (h("div", { class: "rating-icon-container" }, h("ui-icon", { name: icon, color: "currentColor", library: "lucide", size: this.size, class: "rating-icon-bg" }), h("div", { class: "rating-icon-fill", style: { width: isActive ? '100%' : '0%' } }, h("ui-icon", { name: icon, color: "currentColor", library: "lucide", size: this.size }))))), labels[i - 1] && (h("span", { class: "smiley-label" }, labels[i - 1]))));
|
|
1071
|
+
}
|
|
1072
|
+
return items;
|
|
1073
|
+
}
|
|
1074
|
+
renderThumbRating() {
|
|
1075
|
+
const thumbUpActive = this.value === 1 || this.hoverValue === 1;
|
|
1076
|
+
const thumbDownActive = this.value === -1 || this.hoverValue === -1;
|
|
1077
|
+
return [
|
|
1078
|
+
h("button", { type: "button", class: {
|
|
1079
|
+
'rating-item': true,
|
|
1080
|
+
'rating-item-thumb': true,
|
|
1081
|
+
'rating-item-active': thumbUpActive,
|
|
1082
|
+
'rating-item-thumb-up': true,
|
|
1083
|
+
}, onClick: () => this.handleClick(1), onMouseEnter: () => this.handleMouseEnter(1), onMouseLeave: this.handleMouseLeave, disabled: this.disabled || this.readonly, "aria-label": "Thumbs up" }, h("div", { class: "rating-icon-container" }, h("ui-icon", { name: "thumbs-up", color: "currentColor", library: "lucide", class: "rating-icon-bg" }), h("div", { class: "rating-icon-fill", style: { width: thumbUpActive ? '100%' : '0%' } }, h("ui-icon", { name: "thumbs-up", color: "currentColor", library: "lucide" })))),
|
|
1084
|
+
h("button", { type: "button", class: {
|
|
1085
|
+
'rating-item': true,
|
|
1086
|
+
'rating-item-thumb': true,
|
|
1087
|
+
'rating-item-active': thumbDownActive,
|
|
1088
|
+
'rating-item-thumb-down': true,
|
|
1089
|
+
}, onClick: () => this.handleClick(-1), onMouseEnter: () => this.handleMouseEnter(-1), onMouseLeave: this.handleMouseLeave, disabled: this.disabled || this.readonly, "aria-label": "Thumbs down" }, h("div", { class: "rating-icon-container" }, h("ui-icon", { name: "thumbs-down", library: "lucide", class: "rating-icon-bg" }), h("div", { class: "rating-icon-fill", style: { width: thumbDownActive ? '100%' : '0%' } }, h("ui-icon", { name: "thumbs-down", library: "lucide" })))),
|
|
1090
|
+
];
|
|
1091
|
+
}
|
|
1092
|
+
render() {
|
|
1093
|
+
const isRtl = this.rtl || this.el.dir === 'rtl' || !!this.el.closest('[dir="rtl"]');
|
|
1094
|
+
const classes = {
|
|
1095
|
+
'rating-container': true,
|
|
1096
|
+
'rating-rtl': isRtl,
|
|
1097
|
+
[`rating-size-${this.size}`]: true,
|
|
1098
|
+
[`rating-variant-${this.variant}`]: true,
|
|
1099
|
+
'rating-readonly': this.readonly,
|
|
1100
|
+
'rating-disabled': this.disabled,
|
|
1101
|
+
'rating-glow': this.glow,
|
|
1102
|
+
'rating-victory': this.isVictory,
|
|
1103
|
+
'rating-invalid': this.invalid,
|
|
1104
|
+
};
|
|
1105
|
+
const labels = this.getLabels();
|
|
1106
|
+
const currentLabel = this.type === 'thumb'
|
|
1107
|
+
? (this.value === 1 ? 'Liked' : this.value === -1 ? 'Disliked' : '')
|
|
1108
|
+
: labels[(this.hoverValue || this.value) - 1];
|
|
1109
|
+
const descriptionElement = this.description && (h("div", { key: 'ddad90f4a42a3c07145f31156cdc6495f33b0bee', class: `rating-description rating-description-${this.descriptionPosition}` }, this.description));
|
|
1110
|
+
const helperElement = (this.invalid && this.errorMessage) ? (h("div", { class: "rating-helper rating-error" }, h("ui-icon", { name: "alert-circle", library: "lucide", size: "12px" }), h("span", null, this.errorMessage))) : this.helperText ? (h("div", { class: "rating-helper" }, this.helperText)) : null;
|
|
1111
|
+
const dynamicStyle = {
|
|
1112
|
+
'--rating-active-color': this.activeColor || `var(--rating-${this.color})`,
|
|
1113
|
+
'--rating-fill-color': this.activeFillColor || 'currentColor',
|
|
1114
|
+
};
|
|
1115
|
+
const summaryElement = (this.showSummary && currentLabel) ? (h("div", { class: `rating-summary rating-summary-${this.summaryPosition}` }, h("div", { class: "summary-divider" }), h("div", { class: "summary-content" }, h("p", { class: "summary-label" }, currentLabel), h("p", { class: "summary-value" }, (this.hoverValue || this.value).toFixed(0), " / ", this.max)))) : null;
|
|
1116
|
+
return (h("div", { key: '09946cb1ba974009053c5cdf39a92c904f485cc7', class: classes, style: dynamicStyle, tabindex: this.disabled ? -1 : 0, onKeyDown: this.handleKeyDown, role: "group", "aria-label": "Rating component" }, h("div", { key: '8c56d47b79ddd22a69fd58dee44f13182ebabc3f', class: "rating-items-container" }, h("div", { key: '6c9206ec1dc844689631a32799dd368bef1160b0', class: "rating-items" }, this.type === 'star' && this.renderStarRating(), this.type === 'smiley' && this.renderSmileyRating(), this.type === 'thumb' && this.renderThumbRating(), this.descriptionPosition === 'side' && descriptionElement), this.summaryPosition === 'side' && summaryElement), this.showValue && !this.showSummary && this.type !== 'thumb' && (h("div", { key: '2b733f67e6c01f31e789b79ea1f652a63edcde39', class: "rating-value" }, currentLabel && h("span", { key: 'd5ca42772c409783b2ef5dea7da47944df87eec9', class: "rating-label" }, currentLabel), h("span", { key: '860c841ed2d7b2e642ad132d91bcd731e1a974c2', class: "rating-number" }, (this.hoverValue || this.value).toFixed(this.allowHalf ? 1 : 0), " / ", this.max))), this.showReviews && this.totalReviews > 0 && (h("div", { key: 'd3f05521d7337580d120356ce44cc149211fe28f', class: "rating-total-reviews" }, h("span", { key: '4f3c9863f74bb3e2a5f2d46cb94bef7e053471a1', class: "review-dot" }, "\u2022"), h("span", { key: '9eb1794ad9f571667afd26857719bc38c68f5dbf', class: "review-count" }, "(", this.totalReviews, " reviews)"))), this.descriptionPosition === 'bottom' && descriptionElement, this.summaryPosition === 'bottom' && summaryElement, this.showHistogram && this.renderHistogram(), helperElement, this.particles.map(p => (h("div", { key: p.id, class: "rating-victory-particle", style: {
|
|
1117
|
+
'--tx': `${p.tx}px`,
|
|
1118
|
+
'--ty': `${p.ty}px`,
|
|
1119
|
+
'--rot': `${p.rot}deg`,
|
|
1120
|
+
'--clr': p.clr,
|
|
1121
|
+
'--size': `${p.size}px`,
|
|
1122
|
+
'left': '50%',
|
|
1123
|
+
'top': '50%'
|
|
1124
|
+
} })))));
|
|
1125
|
+
}
|
|
1126
|
+
};
|
|
1127
|
+
Rating.style = ratingCss();
|
|
1128
|
+
|
|
1129
|
+
const skeletonLoaderCss = () => `@charset "UTF-8";.sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border-width:0 !important}.a11y-sr-only{position:absolute !important;width:1px !important;height:1px !important;padding:0 !important;margin:-1px !important;overflow:hidden !important;clip:rect(0, 0, 0, 0) !important;white-space:nowrap !important;border-width:0 !important}:host{--skeleton-bg:var(--skeleton-loader-bg, var(--bg-tertiary, #e2e8f0));--skeleton-wave-bg:var(--skeleton-loader-wave-bg, var(--bg-secondary, #f3f4f6));--skeleton-border-radius:var(--skeleton-loader-border-radius, 4px);--skeleton-progress-bar-bg:var(--skeleton-loader-progress-bar-bg, var(--bg-primary, #ffffff));--skeleton-focus-ring:var(--skeleton-loader-focus-ring, var(--color-primary, #10b981));--skeleton-focus-shadow:var(--skeleton-loader-focus-shadow, #dbeafe)}:host-context([data-theme=dark]),:host-context([data-theme=blue]),:host-context([data-theme=violet]),:host-context([data-theme=green]),:host-context([data-theme=pink]),:host-context(.theme-dark),:host-context(.theme-blue),:host-context(.theme-violet),:host-context(.theme-green),:host-context(.theme-pink),:host(.theme-dark),:host([dark=dark]),:host-context(.skeleton-dark),.skeleton-dark{--skeleton-bg:var(--skeleton-loader-bg, var(--bg-secondary, #1e293b));--skeleton-wave-bg:var(--skeleton-loader-wave-bg, var(--bg-tertiary, #334155))}.skeleton-color-primary{--skeleton-bg:color-mix(in srgb, var(--color-primary, #10b981) 20%, transparent);--skeleton-wave-bg:color-mix(in srgb, var(--color-primary, #10b981) 40%, transparent)}.skeleton-color-secondary{--skeleton-bg:color-mix(in srgb, var(--color-secondary, #64748b) 20%, transparent);--skeleton-wave-bg:color-mix(in srgb, var(--color-secondary, #64748b) 40%, transparent)}.skeleton-color-success{--skeleton-bg:color-mix(in srgb, var(--color-success, #22c55e) 20%, transparent);--skeleton-wave-bg:color-mix(in srgb, var(--color-success, #22c55e) 40%, transparent)}.skeleton-color-danger{--skeleton-bg:color-mix(in srgb, var(--color-danger, #ef4444) 20%, transparent);--skeleton-wave-bg:color-mix(in srgb, var(--color-danger, #ef4444) 40%, transparent)}.skeleton-color-warning{--skeleton-bg:color-mix(in srgb, var(--color-warning, #f59e0b) 20%, transparent);--skeleton-wave-bg:color-mix(in srgb, var(--color-warning, #f59e0b) 40%, transparent)}.skeleton-color-info{--skeleton-bg:color-mix(in srgb, var(--color-info, #38bdf8) 20%, transparent);--skeleton-wave-bg:color-mix(in srgb, var(--color-info, #38bdf8) 40%, transparent)}.skeleton-replication-container ::slotted([slot=custom]:focus-visible){outline:2px solid var(--color-primary, #10b981);outline-offset:2px;border-radius:4px;box-shadow:0 0 0 2px var(--border-subtle, #dbeafe);transition:outline 0.2s, box-shadow 0.2s}.skeleton-rtl .skeleton{direction:rtl;--skeleton-wave-angle:-90deg;animation-direction:reverse}.skeleton-progress-bar{transition:width 0.3s cubic-bezier(0.4, 0, 0.2, 1);background:var(--skeleton-wave-bg, var(--bg-primary, #ffffff));height:4px;border-radius:2px;margin-top:4px}.skeleton-replication-container slot[name=custom]{display:block;margin-top:8px}:host{display:block}.skeleton{background:var(--skeleton-bg, #f0f0f0);position:relative;overflow:hidden}.skeleton-animated.skeleton-pulse{animation:skeleton-pulse var(--skeleton-wave-speed, 1.5s) ease-in-out infinite}.skeleton-animated.skeleton-wave{background:linear-gradient(var(--skeleton-wave-angle, 90deg), var(--skeleton-bg, #f0f0f0) 25%, var(--skeleton-wave-bg, #e0e0e0) 50%, var(--skeleton-bg, #f0f0f0) 75%);background-size:200% 100%;animation:skeleton-wave var(--skeleton-wave-speed, 1.5s) ease-in-out infinite;}.skeleton-dark .skeleton-animated.skeleton-wave{background:linear-gradient(var(--skeleton-wave-angle, 90deg), var(--skeleton-bg, #1e293b) 25%, var(--skeleton-wave-bg, #334155) 50%, var(--skeleton-bg, #1e293b) 75%);background-size:200% 100%}.skeleton-animated.skeleton-shimmer{background:linear-gradient(110deg, var(--skeleton-bg, #f0f0f0) 8%, var(--skeleton-wave-bg, #e0e0e0) 18%, var(--skeleton-bg, #f0f0f0) 33%);background-size:200% 100%;animation:skeleton-shimmer var(--skeleton-wave-speed, 1.5s) linear infinite}.skeleton-animated.skeleton-sheen::after{content:"";position:absolute;top:0;right:0;bottom:0;left:0;transform:translateX(-100%);background:linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);animation:skeleton-sheen var(--skeleton-wave-speed, 1.5s) infinite}.skeleton-animated.skeleton-glow{animation:skeleton-glow var(--skeleton-wave-speed, 1.5s) ease-in-out infinite alternate}.skeleton-animated.skeleton-flicker{animation:skeleton-flicker 0.2s infinite}.skeleton-circle{border-radius:50%}.skeleton-rounded{border-radius:var(--skeleton-border-radius, 4px)}.skeleton-text{border-radius:4px}.skeleton-avatar{border-radius:50%}.skeleton-button{border-radius:6px}.skeleton-card{border-radius:8px;padding:16px}.skeleton-list-item{border-radius:4px;padding:12px;display:flex;align-items:center;gap:12px}.skeleton-card-content{display:flex;flex-direction:column;gap:12px}.skeleton-card-header{display:flex;align-items:center;gap:12px}.skeleton-card-title{flex:1;display:flex;flex-direction:column;gap:6px}.skeleton-card-body{display:flex;flex-direction:column;gap:8px}.skeleton-list-content{display:flex;align-items:center;gap:12px;width:100%}.skeleton-list-text{flex:1;display:flex;flex-direction:column;gap:6px}.skeleton-card .skeleton-circle,.skeleton-card .skeleton-text,.skeleton-list-item .skeleton-circle,.skeleton-list-item .skeleton-text{background:var(--skeleton-bg, #f0f0f0);animation:inherit}.skeleton-image-icon{display:flex;align-items:center;justify-content:center;width:100%;height:100%}.skeleton-profile-template{display:flex;align-items:center;gap:16px}.skeleton-profile-template .skeleton-profile-lines{display:flex;flex-direction:column;gap:8px}.skeleton-media-object-template{display:flex;align-items:flex-start;gap:12px}.skeleton-media-object-template .skeleton-media-lines{display:flex;flex-direction:column;gap:6px}.skeleton-feed-template{width:100%;padding:16px;border:1px solid var(--ui-color-border, var(--border-default, #e5e7eb));border-radius:12px;background:var(--ui-color-surface, var(--bg-primary, #ffffff))}.skeleton-mask{width:fit-content;height:fit-content;min-width:20px;min-height:20px;display:inline-block}.skeleton-mask>*{visibility:hidden}.skeleton-mask.skeleton-ghost>*{visibility:visible !important;opacity:0.15 !important;filter:blur(2px) grayscale(1)}.skeleton-replication-container{width:100%;display:flex;gap:var(--skeleton-gap, 16px)}.skeleton-replication-container.skeleton-direction-row{flex-wrap:wrap;flex-direction:row !important}.skeleton-replication-container.skeleton-direction-column{flex-direction:column !important}.skeleton-elevated{box-shadow:var(--skeleton-elevation, none)}@keyframes skeleton-pulse{0%,100%{opacity:1}50%{opacity:0.6}}@keyframes skeleton-wave{0%{background-position:-200% 0}100%{background-position:200% 0}}@keyframes skeleton-shimmer{0%{background-position:-200% 0}100%{background-position:200% 0}}@keyframes skeleton-sheen{100%{transform:translateX(100%)}}@keyframes skeleton-glow{from{box-shadow:0 0 5px rgba(255, 255, 255, 0), inset 0 0 5px rgba(255, 255, 255, 0)}to{box-shadow:0 0 20px rgba(255, 255, 255, 0.2), inset 0 0 10px rgba(255, 255, 255, 0.1)}}@keyframes skeleton-flicker{0%{opacity:0.95}25%{opacity:1}50%{opacity:0.9}75%{opacity:1}100%{opacity:0.95}}:host{--skeleton-border-radius:4px}.skeleton-speed-slow.skeleton-pulse{animation-duration:3s}.skeleton-speed-slow.skeleton-wave{animation-duration:3s}.skeleton-speed-slow.skeleton-shimmer{animation-duration:3.5s}.skeleton-speed-slow.skeleton-sheen::after{animation-duration:3.5s}.skeleton-speed-slow.skeleton-glow{animation-duration:3s}.skeleton-speed-normal.skeleton-pulse{animation-duration:1.5s}.skeleton-speed-normal.skeleton-wave{animation-duration:1.5s}.skeleton-speed-normal.skeleton-shimmer{animation-duration:1.8s}.skeleton-speed-normal.skeleton-sheen::after{animation-duration:1.8s}.skeleton-speed-normal.skeleton-glow{animation-duration:1.5s}.skeleton-speed-fast.skeleton-pulse{animation-duration:0.8s}.skeleton-speed-fast.skeleton-wave{animation-duration:0.8s}.skeleton-speed-fast.skeleton-shimmer{animation-duration:1s}.skeleton-speed-fast.skeleton-sheen::after{animation-duration:1s}.skeleton-speed-fast.skeleton-glow{animation-duration:0.8s}`;
|
|
1130
|
+
|
|
1131
|
+
const SkeletonLoader = class {
|
|
1132
|
+
constructor(hostRef) {
|
|
1133
|
+
registerInstance(this, hostRef);
|
|
1134
|
+
this.skeletonShow = createEvent(this, "skeletonShow");
|
|
1135
|
+
this.skeletonHide = createEvent(this, "skeletonHide");
|
|
1136
|
+
}
|
|
1137
|
+
/** ARIA label for accessibility */
|
|
1138
|
+
ariaLabel;
|
|
1139
|
+
/** ARIA live region (off, polite, assertive) */
|
|
1140
|
+
ariaLive = 'off';
|
|
1141
|
+
/** ARIA role override (status, progressbar, etc.) */
|
|
1142
|
+
ariaRole;
|
|
1143
|
+
/** Progress value (0-100) for determinate skeletons */
|
|
1144
|
+
progress;
|
|
1145
|
+
/** Show in dark mode (auto, light, dark) */
|
|
1146
|
+
dark = 'auto';
|
|
1147
|
+
/** RTL shimmer direction */
|
|
1148
|
+
rtl = false;
|
|
1149
|
+
/** Fires when skeleton is shown */
|
|
1150
|
+
skeletonShow;
|
|
1151
|
+
/** Fires when skeleton is hidden */
|
|
1152
|
+
skeletonHide;
|
|
1153
|
+
/**
|
|
1154
|
+
* Layout template to use for automatic skeleton generation.
|
|
1155
|
+
* If set to something other than 'none', the `shape` prop is overridden for the template layout.
|
|
1156
|
+
*/
|
|
1157
|
+
template = 'none';
|
|
1158
|
+
/**
|
|
1159
|
+
* Number of items to replicate (useful for lists, cards, etc.)
|
|
1160
|
+
* Default: 1
|
|
1161
|
+
*/
|
|
1162
|
+
count = 1;
|
|
1163
|
+
/**
|
|
1164
|
+
* Layout direction for replicated items ('row' or 'column')
|
|
1165
|
+
*/
|
|
1166
|
+
direction = 'column';
|
|
1167
|
+
/**
|
|
1168
|
+
* If true, animations will automatically pause when the component is not in the viewport.
|
|
1169
|
+
* Dramatically improves performance and battery life for long lists.
|
|
1170
|
+
*/
|
|
1171
|
+
lazyAnimation = true;
|
|
1172
|
+
/**
|
|
1173
|
+
* Animation speed
|
|
1174
|
+
*/
|
|
1175
|
+
speed = 'normal';
|
|
1176
|
+
/**
|
|
1177
|
+
* Color variant or custom color (hex/rgba)
|
|
1178
|
+
*/
|
|
1179
|
+
color = 'neutral';
|
|
1180
|
+
radius;
|
|
1181
|
+
/**
|
|
1182
|
+
* Stagger delay in ms between replicated items
|
|
1183
|
+
* Makes the animation feel more organic as it flows down the page.
|
|
1184
|
+
*/
|
|
1185
|
+
stagger = 0;
|
|
1186
|
+
/**
|
|
1187
|
+
* Layout gap between replicated items (e.g. '12px', '1rem')
|
|
1188
|
+
*/
|
|
1189
|
+
gap = '16px';
|
|
1190
|
+
/**
|
|
1191
|
+
* Optional explicit highlight/shimmer color for the wave animation.
|
|
1192
|
+
* If not provided, it is auto-derived from `color` by lightening it.
|
|
1193
|
+
*/
|
|
1194
|
+
highlightColor;
|
|
1195
|
+
/**
|
|
1196
|
+
* Elevation / shadow intensity (0-4) to match the UI component it mimics
|
|
1197
|
+
*/
|
|
1198
|
+
elevation = 0;
|
|
1199
|
+
/**
|
|
1200
|
+
* Shape of the skeleton
|
|
1201
|
+
*/
|
|
1202
|
+
shape = 'rectangle';
|
|
1203
|
+
/**
|
|
1204
|
+
* If true, the skeleton acts as a mask over its children.
|
|
1205
|
+
* Useful for wrapping text or components to skeletonize them seamlessly.
|
|
1206
|
+
*/
|
|
1207
|
+
mask = false;
|
|
1208
|
+
/**
|
|
1209
|
+
* If true, keeps the children visible at low opacity and blurred behind the skeleton.
|
|
1210
|
+
* Only works when `mask` is true.
|
|
1211
|
+
*/
|
|
1212
|
+
ghost = false;
|
|
1213
|
+
/**
|
|
1214
|
+
* Predefined size of the skeleton (xs, sm, md, lg, xl, 2xl)
|
|
1215
|
+
*/
|
|
1216
|
+
size = 'md';
|
|
1217
|
+
/**
|
|
1218
|
+
* Width of the skeleton
|
|
1219
|
+
*/
|
|
1220
|
+
width = '100%';
|
|
1221
|
+
/**
|
|
1222
|
+
* Height of the skeleton
|
|
1223
|
+
*/
|
|
1224
|
+
height = '20px';
|
|
1225
|
+
/**
|
|
1226
|
+
* Border radius for rounded shapes
|
|
1227
|
+
*/
|
|
1228
|
+
borderRadius = '4px';
|
|
1229
|
+
/**
|
|
1230
|
+
* Whether to show animation
|
|
1231
|
+
*/
|
|
1232
|
+
animated = true;
|
|
1233
|
+
/**
|
|
1234
|
+
* Animation type: 'pulse' or 'wave'
|
|
1235
|
+
*/
|
|
1236
|
+
animationType = 'pulse';
|
|
1237
|
+
/**
|
|
1238
|
+
* Custom class for additional styling
|
|
1239
|
+
*/
|
|
1240
|
+
customClass = '';
|
|
1241
|
+
/**
|
|
1242
|
+
* Delay in milliseconds before showing the skeleton.
|
|
1243
|
+
* Prevents "flicker" for high-speed connections.
|
|
1244
|
+
*/
|
|
1245
|
+
delay = 0;
|
|
1246
|
+
/**
|
|
1247
|
+
* Angle of the wave animation (e.g. '45deg', '90deg').
|
|
1248
|
+
* Default: '90deg' (horizontal)
|
|
1249
|
+
*/
|
|
1250
|
+
waveAngle = '90deg';
|
|
1251
|
+
/**
|
|
1252
|
+
* Duration of the wave animation cycle (e.g. '1.5s', '3s').
|
|
1253
|
+
* Default: '1.5s'
|
|
1254
|
+
*/
|
|
1255
|
+
waveSpeed = '1.5s';
|
|
1256
|
+
/**
|
|
1257
|
+
* Number of rows (lines) to render when shape is 'text'
|
|
1258
|
+
*/
|
|
1259
|
+
rows = 1;
|
|
1260
|
+
/**
|
|
1261
|
+
* Width of the last row when multi-line text is used (e.g. '60%')
|
|
1262
|
+
*/
|
|
1263
|
+
lastRowWidth = '80%';
|
|
1264
|
+
isActuallyVisible = false;
|
|
1265
|
+
isInView = true;
|
|
1266
|
+
delayTimer;
|
|
1267
|
+
observer;
|
|
1268
|
+
componentDidLoad() {
|
|
1269
|
+
if (this.lazyAnimation) {
|
|
1270
|
+
this.setupObserver();
|
|
1271
|
+
}
|
|
1272
|
+
}
|
|
1273
|
+
setupObserver() {
|
|
1274
|
+
if (typeof globalThis.IntersectionObserver === 'undefined') {
|
|
1275
|
+
this.isInView = true;
|
|
1276
|
+
return;
|
|
1277
|
+
}
|
|
1278
|
+
this.observer = new IntersectionObserver((entries) => {
|
|
1279
|
+
entries.forEach(entry => {
|
|
1280
|
+
this.isInView = entry.isIntersecting;
|
|
1281
|
+
});
|
|
1282
|
+
}, { threshold: 0.1 });
|
|
1283
|
+
if (this.el) {
|
|
1284
|
+
this.observer.observe(this.el);
|
|
1285
|
+
}
|
|
1286
|
+
}
|
|
1287
|
+
handleDelayChange() {
|
|
1288
|
+
this.handleVisibility();
|
|
1289
|
+
}
|
|
1290
|
+
componentWillLoad() {
|
|
1291
|
+
this.handleVisibility();
|
|
1292
|
+
}
|
|
1293
|
+
get el() { return getElement(this); }
|
|
1294
|
+
handleVisibility() {
|
|
1295
|
+
if (this.delay <= 0) {
|
|
1296
|
+
if (!this.isActuallyVisible)
|
|
1297
|
+
this.skeletonShow?.emit();
|
|
1298
|
+
this.isActuallyVisible = true;
|
|
1299
|
+
return;
|
|
1300
|
+
}
|
|
1301
|
+
if (this.delayTimer)
|
|
1302
|
+
clearTimeout(this.delayTimer);
|
|
1303
|
+
if (this.isActuallyVisible)
|
|
1304
|
+
this.skeletonHide?.emit();
|
|
1305
|
+
this.isActuallyVisible = false;
|
|
1306
|
+
this.delayTimer = setTimeout(() => {
|
|
1307
|
+
this.isActuallyVisible = true;
|
|
1308
|
+
this.skeletonShow?.emit();
|
|
1309
|
+
}, this.delay);
|
|
1310
|
+
}
|
|
1311
|
+
disconnectedCallback() {
|
|
1312
|
+
if (this.delayTimer)
|
|
1313
|
+
clearTimeout(this.delayTimer);
|
|
1314
|
+
if (this.observer)
|
|
1315
|
+
this.observer.disconnect();
|
|
1316
|
+
}
|
|
1317
|
+
getSizeDimensions() {
|
|
1318
|
+
const sizeMap = {
|
|
1319
|
+
'3xs': { width: '12px', height: '12px' },
|
|
1320
|
+
'2xs': { width: '16px', height: '16px' },
|
|
1321
|
+
'xs': { width: '20px', height: '20px' },
|
|
1322
|
+
'sm': { width: '24px', height: '24px' },
|
|
1323
|
+
'md': { width: '32px', height: '32px' },
|
|
1324
|
+
'lg': { width: '48px', height: '48px' },
|
|
1325
|
+
'xl': { width: '64px', height: '64px' },
|
|
1326
|
+
'2xl': { width: '80px', height: '80px' },
|
|
1327
|
+
'3xl': { width: '120px', height: '120px' },
|
|
1328
|
+
'4xl': { width: '160px', height: '160px' },
|
|
1329
|
+
};
|
|
1330
|
+
return sizeMap[this.size] || sizeMap['md'];
|
|
1331
|
+
}
|
|
1332
|
+
getSkeletonStyles() {
|
|
1333
|
+
// Use size dimensions as defaults if width/height are not explicitly set
|
|
1334
|
+
const sizeDims = this.getSizeDimensions();
|
|
1335
|
+
const baseStyles = {
|
|
1336
|
+
width: this.width !== '100%' ? this.width : sizeDims.width,
|
|
1337
|
+
height: this.height !== '20px' ? this.height : sizeDims.height,
|
|
1338
|
+
};
|
|
1339
|
+
switch (this.shape) {
|
|
1340
|
+
case 'circle':
|
|
1341
|
+
baseStyles.borderRadius = '50%';
|
|
1342
|
+
// Ensure width and height are equal for circles
|
|
1343
|
+
const circleSize = Math.min(parseInt(this.width), parseInt(this.height) || parseInt(this.width));
|
|
1344
|
+
baseStyles.width = `${circleSize}px`;
|
|
1345
|
+
baseStyles.height = `${circleSize}px`;
|
|
1346
|
+
break;
|
|
1347
|
+
case 'square':
|
|
1348
|
+
// Ensure width and height are equal for squares
|
|
1349
|
+
const squareSize = Math.min(parseInt(this.width), parseInt(this.height) || parseInt(this.width));
|
|
1350
|
+
baseStyles.width = `${squareSize}px`;
|
|
1351
|
+
baseStyles.height = `${squareSize}px`;
|
|
1352
|
+
baseStyles.borderRadius = '0';
|
|
1353
|
+
break;
|
|
1354
|
+
case 'oval':
|
|
1355
|
+
baseStyles.borderRadius = '50%';
|
|
1356
|
+
// Oval allows different width and height (ellipse)
|
|
1357
|
+
break;
|
|
1358
|
+
case 'rounded-square':
|
|
1359
|
+
// Ensure width and height are equal for rounded squares
|
|
1360
|
+
const roundedSquareSize = Math.min(parseInt(this.width), parseInt(this.height) || parseInt(this.width));
|
|
1361
|
+
baseStyles.width = `${roundedSquareSize}px`;
|
|
1362
|
+
baseStyles.height = `${roundedSquareSize}px`;
|
|
1363
|
+
baseStyles.borderRadius = this.borderRadius;
|
|
1364
|
+
break;
|
|
1365
|
+
case 'rounded-rectangle':
|
|
1366
|
+
baseStyles.borderRadius = this.borderRadius;
|
|
1367
|
+
// Rounded rectangle allows different width and height
|
|
1368
|
+
break;
|
|
1369
|
+
case 'rounded':
|
|
1370
|
+
baseStyles.borderRadius = this.borderRadius;
|
|
1371
|
+
break;
|
|
1372
|
+
case 'text':
|
|
1373
|
+
baseStyles.borderRadius = '4px';
|
|
1374
|
+
// Text shapes use smer heights based on size
|
|
1375
|
+
const textSizeMap = {
|
|
1376
|
+
'3xs': '10px',
|
|
1377
|
+
'2xs': '12px',
|
|
1378
|
+
'xs': '14px',
|
|
1379
|
+
'sm': '16px',
|
|
1380
|
+
'md': '18px',
|
|
1381
|
+
'lg': '24px',
|
|
1382
|
+
'xl': '32px',
|
|
1383
|
+
'2xl': '40px',
|
|
1384
|
+
'3xl': '48px',
|
|
1385
|
+
'4xl': '64px',
|
|
1386
|
+
};
|
|
1387
|
+
baseStyles.height = textSizeMap[this.size] || '18px';
|
|
1388
|
+
break;
|
|
1389
|
+
case 'avatar':
|
|
1390
|
+
baseStyles.borderRadius = '50%';
|
|
1391
|
+
const avatarSize = this.getSizeDimensions();
|
|
1392
|
+
baseStyles.width = this.width !== '100%' ? this.width : avatarSize.width;
|
|
1393
|
+
baseStyles.height = this.height !== '20px' ? this.height : avatarSize.height;
|
|
1394
|
+
break;
|
|
1395
|
+
case 'button':
|
|
1396
|
+
baseStyles.borderRadius = '6px';
|
|
1397
|
+
const buttonHeightMap = {
|
|
1398
|
+
'xs': '24px',
|
|
1399
|
+
'sm': '28px',
|
|
1400
|
+
'md': '32px',
|
|
1401
|
+
'lg': '36px',
|
|
1402
|
+
'xl': '40px',
|
|
1403
|
+
'2xl': '44px',
|
|
1404
|
+
};
|
|
1405
|
+
baseStyles.height = this.height !== '20px' ? this.height : (buttonHeightMap[this.size] || '32px');
|
|
1406
|
+
break;
|
|
1407
|
+
case 'pill':
|
|
1408
|
+
baseStyles.borderRadius = '20px';
|
|
1409
|
+
const pillHeightMap = {
|
|
1410
|
+
'xs': '20px',
|
|
1411
|
+
'sm': '24px',
|
|
1412
|
+
'md': '28px',
|
|
1413
|
+
'lg': '32px',
|
|
1414
|
+
};
|
|
1415
|
+
baseStyles.height = this.height !== '20px' ? this.height : (pillHeightMap[this.size] || '28px');
|
|
1416
|
+
baseStyles.width = this.width !== '100%' ? this.width : '60px';
|
|
1417
|
+
break;
|
|
1418
|
+
case 'card':
|
|
1419
|
+
baseStyles.borderRadius = '8px';
|
|
1420
|
+
const cardHeightMap = {
|
|
1421
|
+
'xs': '80px',
|
|
1422
|
+
'sm': '100px',
|
|
1423
|
+
'md': '120px',
|
|
1424
|
+
'lg': '160px',
|
|
1425
|
+
'xl': '200px',
|
|
1426
|
+
'2xl': '240px',
|
|
1427
|
+
};
|
|
1428
|
+
baseStyles.minHeight = this.height !== '20px' ? this.height : (cardHeightMap[this.size] || '120px');
|
|
1429
|
+
break;
|
|
1430
|
+
case 'list-item':
|
|
1431
|
+
baseStyles.borderRadius = '4px';
|
|
1432
|
+
const listItemHeightMap = {
|
|
1433
|
+
'xs': '32px',
|
|
1434
|
+
'sm': '36px',
|
|
1435
|
+
'md': '40px',
|
|
1436
|
+
'lg': '48px',
|
|
1437
|
+
'xl': '56px',
|
|
1438
|
+
'2xl': '64px',
|
|
1439
|
+
};
|
|
1440
|
+
baseStyles.height = this.height !== '20px' ? this.height : (listItemHeightMap[this.size] || '40px');
|
|
1441
|
+
break;
|
|
1442
|
+
case 'image':
|
|
1443
|
+
baseStyles.borderRadius = '8px';
|
|
1444
|
+
const imageHeightMap = {
|
|
1445
|
+
'xs': '100px',
|
|
1446
|
+
'sm': '150px',
|
|
1447
|
+
'md': '200px',
|
|
1448
|
+
'lg': '250px',
|
|
1449
|
+
'xl': '300px',
|
|
1450
|
+
'2xl': '400px',
|
|
1451
|
+
};
|
|
1452
|
+
baseStyles.height = this.height !== '20px' ? this.height : (imageHeightMap[this.size] || '200px');
|
|
1453
|
+
baseStyles.display = 'flex';
|
|
1454
|
+
baseStyles.alignItems = 'center';
|
|
1455
|
+
baseStyles.justifyContent = 'center';
|
|
1456
|
+
break;
|
|
1457
|
+
case 'none':
|
|
1458
|
+
baseStyles.background = 'transparent';
|
|
1459
|
+
baseStyles.width = 'auto';
|
|
1460
|
+
baseStyles.height = 'auto';
|
|
1461
|
+
break;
|
|
1462
|
+
default: // rectangle
|
|
1463
|
+
baseStyles.borderRadius = '0';
|
|
1464
|
+
break;
|
|
1465
|
+
}
|
|
1466
|
+
return baseStyles;
|
|
1467
|
+
}
|
|
1468
|
+
/**
|
|
1469
|
+
* Resolves the actual color value based on variant or custom string
|
|
1470
|
+
*/
|
|
1471
|
+
// private getBaseColor(): string {
|
|
1472
|
+
// const colorMap: Record<string, string> = {
|
|
1473
|
+
// primary: '#3DCD58',
|
|
1474
|
+
// secondary: '#64748b',
|
|
1475
|
+
// success: '#22c55e',
|
|
1476
|
+
// danger: '#ef4444',
|
|
1477
|
+
// warning: '#f59e0b',
|
|
1478
|
+
// info: '#3bf673',
|
|
1479
|
+
// neutral: 'var(--skeleton-bg, #e2e8f0)',
|
|
1480
|
+
// };
|
|
1481
|
+
// const resolved = colorMap[this.color] || this.color;
|
|
1482
|
+
// // Handle theme-based defaults if empty or neutral
|
|
1483
|
+
// if (!this.color || this.color === 'neutral') {
|
|
1484
|
+
// return 'var(red, #e2e8f0)';
|
|
1485
|
+
// }
|
|
1486
|
+
// return resolved;
|
|
1487
|
+
// }
|
|
1488
|
+
// /**
|
|
1489
|
+
// * Derives a lighter shimmer color from the base color.
|
|
1490
|
+
// * Works for most hex colors; for others falls back to the theme wave variable.
|
|
1491
|
+
// */
|
|
1492
|
+
// private getHighlightColor(base: string): string {
|
|
1493
|
+
// // If user explicitly provided a highlight, use it
|
|
1494
|
+
// if (this.highlightColor) return this.highlightColor;
|
|
1495
|
+
// // Handle generic theme variables
|
|
1496
|
+
// if (base.includes('--skeleton-bg')) {
|
|
1497
|
+
// return 'var(--skeleton-wave-bg, #f3f4f6)';
|
|
1498
|
+
// }
|
|
1499
|
+
// // Try to parse hex and lighten
|
|
1500
|
+
// const hex = base.trim();
|
|
1501
|
+
// if (/^#([0-9a-fA-F]{3}|[0-9a-fA-F]{6})$/.test(hex)) {
|
|
1502
|
+
// let full = hex.slice(1);
|
|
1503
|
+
// if (full.length === 3) {
|
|
1504
|
+
// full = full.split('').map(c => c + c).join('');
|
|
1505
|
+
// }
|
|
1506
|
+
// const r = Math.min(255, parseInt(full.substring(0, 2), 16) + 30);
|
|
1507
|
+
// const g = Math.min(255, parseInt(full.substring(2, 4), 16) + 30);
|
|
1508
|
+
// const b = Math.min(255, parseInt(full.substring(4, 6), 16) + 30);
|
|
1509
|
+
// return `rgb(${r}, ${g}, ${b})`;
|
|
1510
|
+
// }
|
|
1511
|
+
// // For other types of strings, fallback to the theme wave variable if available
|
|
1512
|
+
// return 'var(--skeleton-wave-bg, #f3f4f6)';
|
|
1513
|
+
// }
|
|
1514
|
+
render() {
|
|
1515
|
+
if (!this.isActuallyVisible)
|
|
1516
|
+
return null;
|
|
1517
|
+
const countArr = Array.from({ length: Math.max(1, this.count) });
|
|
1518
|
+
// ARIA role logic
|
|
1519
|
+
const ariaRole = this.ariaRole || (typeof this.progress === 'number' ? 'progressbar' : 'status');
|
|
1520
|
+
const ariaProps = {
|
|
1521
|
+
role: ariaRole,
|
|
1522
|
+
'aria-busy': true,
|
|
1523
|
+
'aria-label': this.ariaLabel,
|
|
1524
|
+
'aria-live': this.ariaLive,
|
|
1525
|
+
};
|
|
1526
|
+
if (ariaRole === 'progressbar' && typeof this.progress === 'number') {
|
|
1527
|
+
ariaProps['aria-valuenow'] = this.progress;
|
|
1528
|
+
ariaProps['aria-valuemin'] = 0;
|
|
1529
|
+
ariaProps['aria-valuemax'] = 100;
|
|
1530
|
+
}
|
|
1531
|
+
// Dark mode/RTL
|
|
1532
|
+
const darkThemes = ['dark', 'blue', 'violet', 'green', 'pink'];
|
|
1533
|
+
const docTheme = document.documentElement.getAttribute('data-theme') || '';
|
|
1534
|
+
const isDarkAuto = this.dark === 'auto' && ((window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) ||
|
|
1535
|
+
darkThemes.some(t => document.documentElement.classList.contains('theme-' + t) || document.body.classList.contains('theme-' + t)) ||
|
|
1536
|
+
darkThemes.includes(docTheme) ||
|
|
1537
|
+
!!this.el.closest(darkThemes.map(t => `.theme-${t}, [data-theme="${t}"]`).join(', ')));
|
|
1538
|
+
const darkClass = this.dark === 'dark' || isDarkAuto ? 'skeleton-dark' : '';
|
|
1539
|
+
const rtlClass = this.rtl ? 'skeleton-rtl' : '';
|
|
1540
|
+
return (h("div", { class: `skeleton-replication-container skeleton-direction-${this.direction} ${darkClass} ${rtlClass}`, style: { display: 'flex', flexDirection: this.direction, gap: this.gap }, ...ariaProps }, countArr.map((_, index) => {
|
|
1541
|
+
// ...existing code...
|
|
1542
|
+
const staggerDelay = this.stagger > 0 ? `${index * this.stagger}ms` : '0ms';
|
|
1543
|
+
const isAnimating = this.animated && (!this.lazyAnimation || this.isInView);
|
|
1544
|
+
// ...existing code...
|
|
1545
|
+
const namedColors = ['neutral', 'primary', 'secondary', 'success', 'danger', 'warning', 'info'];
|
|
1546
|
+
const isCustomColor = !namedColors.includes(this.color);
|
|
1547
|
+
const skeletonClass = {
|
|
1548
|
+
'skeleton': true,
|
|
1549
|
+
'skeleton-animated': isAnimating,
|
|
1550
|
+
[`skeleton-${this.animationType}`]: isAnimating,
|
|
1551
|
+
[`skeleton-${this.shape}`]: true,
|
|
1552
|
+
[`skeleton-speed-${this.speed}`]: true,
|
|
1553
|
+
[`skeleton-color-${this.color}`]: !isCustomColor && this.color !== 'neutral',
|
|
1554
|
+
'skeleton-mask': this.mask,
|
|
1555
|
+
'skeleton-ghost': this.ghost && this.mask,
|
|
1556
|
+
'skeleton-elevated': this.elevation > 0,
|
|
1557
|
+
[this.customClass]: !!this.customClass,
|
|
1558
|
+
};
|
|
1559
|
+
const customStyles = {
|
|
1560
|
+
'--skeleton-stagger-delay': staggerDelay,
|
|
1561
|
+
'--skeleton-wave-angle': this.waveAngle,
|
|
1562
|
+
'--skeleton-wave-speed': this.waveSpeed,
|
|
1563
|
+
'--skeleton-gap': this.gap,
|
|
1564
|
+
'--skeleton-elevation': this.elevation > 0 ? `var(--ui-shadow-${this.elevation}, 0 2px 8px rgba(0,0,0,0.05))` : 'none',
|
|
1565
|
+
};
|
|
1566
|
+
// Custom hex/rgba colors: set as CSS vars so animations still work via gradients
|
|
1567
|
+
if (isCustomColor) {
|
|
1568
|
+
customStyles['--skeleton-bg'] = this.color;
|
|
1569
|
+
customStyles['--skeleton-wave-bg'] = this.highlightColor || this.color;
|
|
1570
|
+
}
|
|
1571
|
+
if (this.radius) {
|
|
1572
|
+
customStyles['--skeleton-border-radius'] = this.radius;
|
|
1573
|
+
}
|
|
1574
|
+
const isCircular = ['circle', 'avatar', 'oval'].includes(this.shape);
|
|
1575
|
+
const styles = {
|
|
1576
|
+
...this.getSkeletonStyles(),
|
|
1577
|
+
...customStyles,
|
|
1578
|
+
animationDelay: staggerDelay,
|
|
1579
|
+
...(isCircular ? {} : (this.radius || this.borderRadius !== '4px' ? { borderRadius: this.radius || this.borderRadius } : {}))
|
|
1580
|
+
};
|
|
1581
|
+
return (h("div", { class: skeletonClass, style: styles, key: index }, this.renderContent(), typeof this.progress === 'number' && (h("div", { class: "skeleton-progress-bar", style: { width: this.progress + '%', height: '4px', background: 'var(--skeleton-wave-bg, #fff)', borderRadius: '2px', marginTop: '4px' } }))));
|
|
1582
|
+
}), h("slot", { name: "custom" })));
|
|
1583
|
+
}
|
|
1584
|
+
renderContent() {
|
|
1585
|
+
const isText = this.shape === 'text';
|
|
1586
|
+
const hasRows = isText && this.rows > 1;
|
|
1587
|
+
return [
|
|
1588
|
+
(this.mask || this.shape === 'none') ? h("slot", null) : null,
|
|
1589
|
+
hasRows && !this.mask ? (h("div", { class: "skeleton-text-rows", style: { display: 'flex', flexDirection: 'column', gap: '8px', width: '100%' } }, Array.from({ length: this.rows }).map((_, i) => {
|
|
1590
|
+
const isLast = i === this.rows - 1;
|
|
1591
|
+
const rowWidth = isLast ? this.lastRowWidth : (i > 0 && i % 2 === 0 ? '92%' : '100%');
|
|
1592
|
+
return (h("div", { class: "skeleton-text-row", style: {
|
|
1593
|
+
height: '1em',
|
|
1594
|
+
width: rowWidth,
|
|
1595
|
+
backgroundColor: 'inherit',
|
|
1596
|
+
borderRadius: '4px',
|
|
1597
|
+
animation: 'inherit'
|
|
1598
|
+
} }));
|
|
1599
|
+
}))) : null,
|
|
1600
|
+
this.shape === 'card' && !this.mask ? (h("div", { class: "skeleton-card-content" }, h("div", { class: "skeleton-card-header" }, h("div", { class: "skeleton-circle", style: { width: '32px', height: '32px', borderRadius: '50%' } }), h("div", { class: "skeleton-card-title" }, h("div", { class: "skeleton-text", style: { width: '60%', height: '16px', borderRadius: '4px' } }), h("div", { class: "skeleton-text", style: { width: '40%', height: '12px', borderRadius: '4px' } }))), h("div", { class: "skeleton-card-body" }, h("div", { class: "skeleton-text", style: { width: '100%', height: '14px', borderRadius: '4px' } }), h("div", { class: "skeleton-text", style: { width: '80%', height: '14px', borderRadius: '4px' } }), h("div", { class: "skeleton-text", style: { width: '90%', height: '14px', borderRadius: '4px' } })))) : null,
|
|
1601
|
+
this.shape === 'list-item' && !this.mask ? (h("div", { class: "skeleton-list-content" }, h("div", { class: "skeleton-circle", style: { width: '32px', height: '32px', borderRadius: '50%' } }), h("div", { class: "skeleton-list-text" }, h("div", { class: "skeleton-text", style: { width: '70%', height: '14px', borderRadius: '4px' } }), h("div", { class: "skeleton-text", style: { width: '50%', height: '12px', borderRadius: '4px' } })))) : null,
|
|
1602
|
+
this.shape === 'image' && !this.mask ? (h("div", { class: "skeleton-image-icon" }, h("ui-icon", { name: "image", library: "lucide", size: "25%", style: { opacity: '0.2' } }))) : null,
|
|
1603
|
+
this.template === 'profile' ? (h("div", { class: "skeleton-profile-template" }, h("ui-skeleton-loader", { shape: "circle", size: this.size, color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("div", { class: "skeleton-profile-lines" }, h("ui-skeleton-loader", { shape: "text", size: this.size, width: "120px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("ui-skeleton-loader", { shape: "text", size: "xs", width: "80px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated })))) : null,
|
|
1604
|
+
this.template === 'media-object' ? (h("div", { class: "skeleton-media-object-template" }, h("ui-skeleton-loader", { shape: "rounded-rectangle", width: "48px", height: "48px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("div", { class: "skeleton-media-lines", style: { flex: '1' } }, h("ui-skeleton-loader", { shape: "text", size: "md", width: "70%", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("ui-skeleton-loader", { shape: "text", size: "xs", width: "40%", color: this.color, "highlight-color": this.highlightColor, animated: this.animated, style: { marginTop: '4px' } }), h("ui-skeleton-loader", { shape: "text", size: "xs", width: "90%", color: this.color, "highlight-color": this.highlightColor, animated: this.animated, style: { marginTop: '8px' } })))) : null,
|
|
1605
|
+
this.template === 'feed-item' ? (h("div", { class: "skeleton-feed-template" }, h("div", { class: "feed-header", style: { display: 'flex', gap: '12px', marginBottom: '16px' } }, h("ui-skeleton-loader", { shape: "circle", size: "md", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("div", { style: { flex: '1' } }, h("ui-skeleton-loader", { shape: "text", size: "xs", width: "100px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("ui-skeleton-loader", { shape: "text", size: "xs", width: "60px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated, style: { marginTop: '4px' } }))), h("ui-skeleton-loader", { shape: "rectangle", width: "100%", height: "200px", "border-radius": "8px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("div", { class: "feed-footer", style: { marginTop: '12px', display: 'flex', gap: '8px' } }, h("ui-skeleton-loader", { shape: "button", size: "sm", width: "60px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("ui-skeleton-loader", { shape: "button", size: "sm", width: "60px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated })))) : null,
|
|
1606
|
+
this.template === 'table-row' ? (h("div", { class: "skeleton-table-row-template", style: { display: 'flex', gap: '20px', alignItems: 'center', width: '100%', padding: '12px 0' } }, h("ui-skeleton-loader", { shape: "rectangle", width: "20px", height: "20px", "border-radius": "4px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("ui-skeleton-loader", { shape: "text", width: "15%", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("ui-skeleton-loader", { shape: "text", width: "35%", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("ui-skeleton-loader", { shape: "text", width: "20%", color: this.color, "highlight-color": this.highlightColor, animated: this.animated }), h("ui-skeleton-loader", { shape: "pill", width: "80px", color: this.color, "highlight-color": this.highlightColor, animated: this.animated, style: { marginLeft: 'auto' } }))) : null,
|
|
1607
|
+
];
|
|
1608
|
+
}
|
|
1609
|
+
static get watchers() { return {
|
|
1610
|
+
"delay": [{
|
|
1611
|
+
"handleDelayChange": 0
|
|
1612
|
+
}]
|
|
1613
|
+
}; }
|
|
1614
|
+
};
|
|
1615
|
+
SkeletonLoader.style = skeletonLoaderCss();
|
|
1616
|
+
|
|
1617
|
+
export { Pagination as ui_pagination, Rating as ui_rating, SkeletonLoader as ui_skeleton };
|