atomicuilibrary 0.1.0 → 0.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/category-section.cjs.entry.js +2 -2
- package/dist/cjs/dom-BvBb0kmW.js +267 -0
- package/dist/cjs/exploration-project-tailwind.cjs.js +2 -2
- package/dist/cjs/{index-ClkOYpT8.js → index-C32cWsm5.js} +1 -1
- package/dist/cjs/layout-manager.cjs.entry.js +3 -3
- package/dist/cjs/library-card.cjs.entry.js +2 -2
- package/dist/cjs/lm-container_2.cjs.entry.js +2 -2
- package/dist/cjs/lm-panel_3.cjs.entry.js +4 -4
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/my-component.cjs.entry.js +1 -1
- package/dist/cjs/my-step.cjs.entry.js +2 -2
- package/dist/cjs/nav-bar.cjs.entry.js +4 -4
- package/dist/cjs/smart-step.cjs.entry.js +3 -3
- package/dist/cjs/timeline-item.cjs.entry.js +2 -2
- package/dist/cjs/ui-accordion_11.cjs.entry.js +132 -50
- package/dist/cjs/ui-advanced-data-table.cjs.entry.js +2 -2
- package/dist/cjs/ui-anchor.cjs.entry.js +2 -2
- package/dist/cjs/ui-animate-on-scroll.cjs.entry.js +3 -3
- package/dist/cjs/ui-aside-panel.cjs.entry.js +10 -11
- package/dist/cjs/ui-avatar-group_5.cjs.entry.js +1694 -0
- package/dist/cjs/ui-breadcrumb-item.cjs.entry.js +3 -3
- package/dist/cjs/ui-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ui-callout-banner.cjs.entry.js +2 -2
- package/dist/cjs/ui-card.cjs.entry.js +4 -3
- package/dist/cjs/ui-carousel.cjs.entry.js +1 -1
- package/dist/cjs/ui-checkbox.cjs.entry.js +3 -3
- package/dist/cjs/ui-code-editor.cjs.entry.js +2 -2
- package/dist/cjs/ui-code-preview.cjs.entry.js +2 -2
- package/dist/cjs/ui-color-picker.cjs.entry.js +256 -22
- package/dist/cjs/ui-command-palette.cjs.entry.js +1 -1
- package/dist/cjs/ui-dialog-box.cjs.entry.js +85 -11
- package/dist/cjs/ui-dialog-content.cjs.entry.js +1 -1
- package/dist/cjs/ui-dialog-footer_2.cjs.entry.js +1 -1
- package/dist/cjs/ui-divider.cjs.entry.js +1 -1
- package/dist/cjs/ui-dock-host.cjs.entry.js +4 -4
- package/dist/cjs/ui-dock.cjs.entry.js +2 -2
- package/dist/cjs/ui-drag-drop.cjs.entry.js +2 -2
- package/dist/cjs/ui-dropdown_2.cjs.entry.js +104 -34
- package/dist/cjs/ui-empty-state.cjs.entry.js +2 -2
- package/dist/cjs/ui-fab-item.cjs.entry.js +2 -2
- package/dist/cjs/ui-fab.cjs.entry.js +4 -4
- package/dist/cjs/ui-file-upload.cjs.entry.js +143 -44
- package/dist/cjs/ui-horizontal-nav.cjs.entry.js +2 -2
- package/dist/cjs/ui-knob.cjs.entry.js +1 -1
- package/dist/cjs/ui-label.cjs.entry.js +473 -0
- package/dist/cjs/ui-library.cjs.entry.js +2 -2
- package/dist/cjs/ui-list-group_2.cjs.entry.js +349 -60
- package/dist/cjs/ui-list.cjs.entry.js +76 -42
- package/dist/cjs/ui-masonry.cjs.entry.js +1 -1
- package/dist/cjs/ui-meter-group.cjs.entry.js +5 -4
- package/dist/cjs/ui-navigation-item.cjs.entry.js +5 -5
- package/dist/cjs/ui-number-input.cjs.entry.js +7 -3
- package/dist/cjs/ui-otp-input.cjs.entry.js +5 -5
- package/dist/cjs/{ui-pagination_4.cjs.entry.js → ui-pagination_3.cjs.entry.js} +35 -506
- package/dist/cjs/ui-panel.cjs.entry.js +1 -1
- package/dist/cjs/ui-pattern-input.cjs.entry.js +46 -11
- package/dist/cjs/ui-progress.cjs.entry.js +66 -9
- package/dist/cjs/ui-range-slider.cjs.entry.js +2 -2
- package/dist/cjs/ui-resizable-panel.cjs.entry.js +2 -2
- package/dist/cjs/ui-scroll-top.cjs.entry.js +1 -1
- package/dist/cjs/ui-smart-context-menu.cjs.entry.js +1 -1
- package/dist/cjs/ui-smart-stepper.cjs.entry.js +2 -2
- package/dist/cjs/ui-snackbar.cjs.entry.js +1 -1
- package/dist/cjs/ui-speed-dial.cjs.entry.js +1 -1
- package/dist/cjs/ui-speedometer.cjs.entry.js +28 -17
- package/dist/cjs/ui-splitter.cjs.entry.js +1 -1
- package/dist/cjs/ui-step.cjs.entry.js +2 -2
- package/dist/cjs/ui-stepper.cjs.entry.js +1 -1
- package/dist/cjs/ui-switch.cjs.entry.js +14 -13
- package/dist/cjs/ui-tabs.cjs.entry.js +2 -2
- package/dist/cjs/ui-tag.cjs.entry.js +58 -13
- package/dist/cjs/ui-timeline.cjs.entry.js +10 -2
- package/dist/cjs/ui-timer.cjs.entry.js +2 -2
- package/dist/cjs/ui-toolbar.cjs.entry.js +2 -2
- package/dist/cjs/ui-tooltip.cjs.entry.js +4 -4
- package/dist/cjs/ui-top-bar.cjs.entry.js +1 -1
- package/dist/cjs/ui-transfer-list.cjs.entry.js +6 -6
- package/dist/cjs/ui-tree.cjs.entry.js +30 -15
- package/dist/cjs/ui-workspace-manager.cjs.entry.js +2 -2
- package/dist/collection/assets/js/component-config.js +1 -0
- package/dist/collection/assets/js/demo-loader.js +2 -0
- package/dist/collection/assets/js/demos/about-demo.js +13 -13
- package/dist/collection/assets/js/demos/accordion-demo.js +66 -66
- package/dist/collection/assets/js/demos/advanced-data-table-demo.js +102 -102
- package/dist/collection/assets/js/demos/anchor-demo.js +27 -28
- package/dist/collection/assets/js/demos/animate-on-scroll-demo.js +12 -12
- package/dist/collection/assets/js/demos/aside-panel-demo.js +51 -51
- package/dist/collection/assets/js/demos/avatar-demo.js +433 -95
- package/dist/collection/assets/js/demos/badge-demo.js +51 -52
- package/dist/collection/assets/js/demos/breadcrumb-demo.js +7 -7
- package/dist/collection/assets/js/demos/button-demo.js +117 -107
- package/dist/collection/assets/js/demos/button-toggle-demo.js +199 -96
- package/dist/collection/assets/js/demos/callout-banner-demo.js +23 -23
- package/dist/collection/assets/js/demos/card-demo.js +23 -22
- package/dist/collection/assets/js/demos/carousel-demo.js +632 -360
- package/dist/collection/assets/js/demos/checkbox-demo.js +124 -7
- package/dist/collection/assets/js/demos/color-picker-demo.js +394 -100
- package/dist/collection/assets/js/demos/command-palette-demo.js +182 -65
- package/dist/collection/assets/js/demos/complex-form-demo.js +5 -5
- package/dist/collection/assets/js/demos/context-menu-demo.js +43 -43
- package/dist/collection/assets/js/demos/dialog-demo-temp.js +3 -3
- package/dist/collection/assets/js/demos/dialog-demo.js +336 -230
- package/dist/collection/assets/js/demos/divider-demo.js +59 -62
- package/dist/collection/assets/js/demos/dock-demo.js +12 -12
- package/dist/collection/assets/js/demos/dock-host-init.js +31 -31
- package/dist/collection/assets/js/demos/documentation-demo.js +34 -34
- package/dist/collection/assets/js/demos/drag-drop-demo.js +2 -2
- package/dist/collection/assets/js/demos/dropdown-demo.js +140 -136
- package/dist/collection/assets/js/demos/dropdown-subtitle-demo.js +2 -2
- package/dist/collection/assets/js/demos/empty-state-demo.js +294 -78
- package/dist/collection/assets/js/demos/fab-demo.js +95 -11
- package/dist/collection/assets/js/demos/file-upload-demo.js +641 -171
- package/dist/collection/assets/js/demos/home-components.js +2 -2
- package/dist/collection/assets/js/demos/horizontal-nav-demo.js +6 -6
- package/dist/collection/assets/js/demos/icon-demo.js +17 -17
- package/dist/collection/assets/js/demos/input-demo.js +147 -143
- package/dist/collection/assets/js/demos/knob-demo.js +29 -30
- package/dist/collection/assets/js/demos/label-demo.js +697 -0
- package/dist/collection/assets/js/demos/layout-manager-demo.js +55 -55
- package/dist/collection/assets/js/demos/list-demo.js +185 -122
- package/dist/collection/assets/js/demos/loader-demo.js +48 -48
- package/dist/collection/assets/js/demos/masonry-demo.js +568 -140
- package/dist/collection/assets/js/demos/meter-group-demo.js +14 -16
- package/dist/collection/assets/js/demos/multi-level-context-menu-demo.js +25 -25
- package/dist/collection/assets/js/demos/my-profile-demo.js +27 -27
- package/dist/collection/assets/js/demos/nav-bar-demo.js +1 -1
- package/dist/collection/assets/js/demos/number-input-demo.js +262 -211
- package/dist/collection/assets/js/demos/pagination-demo.js +29 -29
- package/dist/collection/assets/js/demos/panel-demo.js +18 -25
- package/dist/collection/assets/js/demos/pattern-input-demo.js +278 -40
- package/dist/collection/assets/js/demos/popover-demo.js +240 -149
- package/dist/collection/assets/js/demos/progress-demo.js +170 -156
- package/dist/collection/assets/js/demos/radio-demo.js +73 -12
- package/dist/collection/assets/js/demos/range-slider-demo.js +33 -33
- package/dist/collection/assets/js/demos/rating-demo.js +19 -19
- package/dist/collection/assets/js/demos/scroll-top-demo.js +8 -9
- package/dist/collection/assets/js/demos/skeleton-demo.js +110 -52
- package/dist/collection/assets/js/demos/skeleton-performance-demo.js +2 -2
- package/dist/collection/assets/js/demos/smart-dialog-demo.js +12 -12
- package/dist/collection/assets/js/demos/smart-menu-demo.js +17 -17
- package/dist/collection/assets/js/demos/snackbar-demo.js +53 -53
- package/dist/collection/assets/js/demos/speed-dial-demo.js +14 -14
- package/dist/collection/assets/js/demos/speedometer-demo.js +40 -32
- package/dist/collection/assets/js/demos/split-button-demo.js +2 -2
- package/dist/collection/assets/js/demos/splitter-demo.js +14 -14
- package/dist/collection/assets/js/demos/stack-demo.js +27 -27
- package/dist/collection/assets/js/demos/stepper-demo.js +49 -49
- package/dist/collection/assets/js/demos/switch-demo.js +561 -125
- package/dist/collection/assets/js/demos/tabs-demo.js +22 -22
- package/dist/collection/assets/js/demos/tag-demo.js +62 -62
- package/dist/collection/assets/js/demos/theme-selector-demo.js +27 -27
- package/dist/collection/assets/js/demos/timeline-demo.js +10 -10
- package/dist/collection/assets/js/demos/timeline-playground.js +2 -2
- package/dist/collection/assets/js/demos/timer-demo.js +10 -10
- package/dist/collection/assets/js/demos/toolbar-demo.js +17 -17
- package/dist/collection/assets/js/demos/tooltip-demo.js +92 -90
- package/dist/collection/assets/js/demos/top-bar-demo.js +6 -6
- package/dist/collection/assets/js/demos/transfer-list-demo.js +20 -20
- package/dist/collection/assets/js/demos/tree-demo.js +50 -66
- package/dist/collection/assets/js/demos/workspace-manager-demo.js +20 -20
- package/dist/collection/collection-manifest.json +1 -2
- package/dist/collection/components/accordion/accordion.css +275 -9
- package/dist/collection/components/accordion/accordion.js +7 -6
- package/dist/collection/components/advanced-data-table/advanced-data-table.css +5 -5
- package/dist/collection/components/advanced-data-table/advanced-data-table.js +2 -2
- package/dist/collection/components/anchor/anchor.css +1 -0
- package/dist/collection/components/animate-on-scroll/animate-on-scroll.js +2 -2
- package/dist/collection/components/aside-panel/aside-panel.css +2 -2
- package/dist/collection/components/aside-panel/aside-panel.js +10 -11
- package/dist/collection/components/avatar/avatar.css +6 -6
- package/dist/collection/components/avatar/avatar.js +63 -11
- package/dist/collection/components/badge/badge.css +27 -17
- package/dist/collection/components/badge/badge.js +6 -3
- package/dist/collection/components/breadcrumb/breadcrumb-item.js +2 -2
- package/dist/collection/components/button/button.css +1 -0
- package/dist/collection/components/button/button.js +3 -3
- package/dist/collection/components/button-toggle/button-toggle.js +2 -2
- package/dist/collection/components/button-toggle-group/button-toggle-group.css +161 -14
- package/dist/collection/components/button-toggle-group/button-toggle-group.js +2 -2
- package/dist/collection/components/callout-banner/callout-banner.css +75 -0
- package/dist/collection/components/callout-banner/callout-banner.js +1 -1
- package/dist/collection/components/card/card.css +221 -9
- package/dist/collection/components/card/card.js +3 -2
- package/dist/collection/components/checkbox/checkbox.js +3 -3
- package/dist/collection/components/code-editor/code-editor.js +1 -1
- package/dist/collection/components/code-preview/ui-code-preview.js +1 -1
- package/dist/collection/components/color-picker/color-picker.css +110 -6
- package/dist/collection/components/color-picker/color-picker.js +302 -26
- package/dist/collection/components/context-menu/context-menu.css +9 -9
- package/dist/collection/components/dialog-box/dialog-box.js +116 -14
- package/dist/collection/components/dialog-header/dialog-header.js +1 -1
- package/dist/collection/components/dock/dock.css +116 -3
- package/dist/collection/components/dock-host/ui-dock-host.js +3 -3
- package/dist/collection/components/drag-drop/drag-drop.js +1 -1
- package/dist/collection/components/dropdown/dropdown.css +101 -8
- package/dist/collection/components/dropdown/dropdown.js +94 -28
- package/dist/collection/components/empty-state/empty-state.js +1 -1
- package/dist/collection/components/fab/fab.css +87 -15
- package/dist/collection/components/fab/fab.js +3 -3
- package/dist/collection/components/fab-item/fab-item.js +1 -1
- package/dist/collection/components/file-upload/file-upload.css +1362 -31
- package/dist/collection/components/file-upload/file-upload.js +171 -50
- package/dist/collection/components/horizontal-nav/horizontal-nav.css +9 -9
- package/dist/collection/components/horizontal-nav/horizontal-nav.js +2 -2
- package/dist/collection/components/icon/icon.js +1 -1
- package/dist/collection/components/input/input.css +9 -0
- package/dist/collection/components/input/input.js +20 -9
- package/dist/collection/components/label/label.css +583 -0
- package/dist/collection/components/label/label.js +1669 -0
- package/dist/collection/components/layout-manager/layout-manager.js +1 -1
- package/dist/collection/components/layout-manager/lm-floating-window/lm-floating-window.js +1 -1
- package/dist/collection/components/layout-manager/lm-panel/lm-panel.js +1 -1
- package/dist/collection/components/layout-manager/lm-splitter/lm-splitter.js +1 -1
- package/dist/collection/components/layout-manager/lm-tabs/lm-tabs.js +1 -1
- package/dist/collection/components/library/category-section.js +1 -1
- package/dist/collection/components/library/library-card.js +1 -1
- package/dist/collection/components/library/library.js +1 -1
- package/dist/collection/components/list/list.css +46 -5
- package/dist/collection/components/list/list.js +76 -42
- package/dist/collection/components/list-group/list-group.css +0 -2
- package/dist/collection/components/list-group/list-group.js +11 -5
- package/dist/collection/components/list-item/list-item.css +403 -131
- package/dist/collection/components/list-item/list-item.js +345 -61
- package/dist/collection/components/loader/loader.css +1 -1
- package/dist/collection/components/loader/loader.js +2 -2
- package/dist/collection/components/meter-group/meter-group.css +5 -0
- package/dist/collection/components/meter-group/meter-group.js +3 -2
- package/dist/collection/components/my-step/my-step.js +1 -1
- package/dist/collection/components/nav-bar/nav-bar.css +4 -4
- package/dist/collection/components/nav-bar/nav-bar.js +6 -6
- package/dist/collection/components/number-input/number-input.js +6 -2
- package/dist/collection/components/otp-input/otp-input.css +10 -0
- package/dist/collection/components/otp-input/otp-input.js +3 -3
- package/dist/collection/components/pagination/pagination.js +1 -1
- package/dist/collection/components/pattern-input/pattern-input.css +0 -1
- package/dist/collection/components/pattern-input/pattern-input.js +44 -9
- package/dist/collection/components/popover/popover.css +35 -7
- package/dist/collection/components/popover/popover.js +64 -9
- package/dist/collection/components/progress/progress.css +176 -32
- package/dist/collection/components/progress/progress.js +66 -8
- package/dist/collection/components/radio/radio.css +2 -0
- package/dist/collection/components/radio/radio.js +2 -2
- package/dist/collection/components/range-slider/range-slider.css +284 -31
- package/dist/collection/components/range-slider/range-slider.js +5 -5
- package/dist/collection/components/rating/rating.css +151 -65
- package/dist/collection/components/rating/rating.js +31 -13
- package/dist/collection/components/resizable-panel/resizable-panel.js +1 -1
- package/dist/collection/components/skeleton/skeleton-loader.css +144 -44
- package/dist/collection/components/skeleton/skeleton-loader.js +11 -7
- package/dist/collection/components/smart-stepper/smart-step.js +2 -2
- package/dist/collection/components/smart-stepper/smart-stepper.js +1 -1
- package/dist/collection/components/speedometer/speedometer.css +26 -6
- package/dist/collection/components/speedometer/speedometer.js +26 -15
- package/dist/collection/components/stack/stack.js +2 -2
- package/dist/collection/components/step/step.js +1 -1
- package/dist/collection/components/stepper/stepper.js +1 -1
- package/dist/collection/components/switch/switch.css +367 -8
- package/dist/collection/components/switch/switch.js +13 -12
- package/dist/collection/components/tag/tag.css +38 -12
- package/dist/collection/components/tag/tag.js +58 -13
- package/dist/collection/components/tag-group/tag-group.css +0 -1
- package/dist/collection/components/tag-group/tag-group.js +3 -3
- package/dist/collection/components/timeline/timeline.css +380 -317
- package/dist/collection/components/timeline/timeline.js +8 -0
- package/dist/collection/components/timeline-item/timeline-item.js +1 -1
- package/dist/collection/components/timer/timer.js +1 -1
- package/dist/collection/components/toggle-group/toggle-group.css +7 -3
- package/dist/collection/components/toggle-group/toggle-group.js +7 -3
- package/dist/collection/components/toolbar/toolbar.js +1 -1
- package/dist/collection/components/tooltip/tooltip.js +4 -4
- package/dist/collection/components/top-bar/top-bar.js +2 -2
- package/dist/collection/components/transfer-list/transfer-list.css +13 -13
- package/dist/collection/components/transfer-list/transfer-list.js +4 -4
- package/dist/collection/components/tree/tree.css +35 -21
- package/dist/collection/components/tree/tree.js +28 -13
- package/dist/collection/components/ui-navigation-bar/navigation-bar/navigation-bar.css +34 -16
- package/dist/collection/components/ui-navigation-bar/navigation-bar/navigation-bar.js +46 -11
- package/dist/collection/components/ui-navigation-bar/navigation-item.css +7 -7
- package/dist/collection/components/ui-navigation-bar/navigation-item.js +3 -3
- package/dist/collection/utils/dom.js +151 -151
- package/dist/components/avatar-group.js +1 -1
- package/dist/components/avatar.js +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/button-toggle.js +1 -1
- package/dist/components/button.js +1 -0
- package/dist/components/category-section2.js +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/context-menu.js +1 -1
- package/dist/components/dialog-header.js +1 -1
- package/dist/components/dom.js +1 -1
- package/dist/components/dropdown.js +1 -1
- package/dist/components/icon.js +2 -2
- package/dist/components/input.js +1 -1
- package/dist/components/layout-manager.js +1 -1
- package/dist/components/library-card2.js +1 -1
- package/dist/components/list-group.js +1 -1
- package/dist/components/list-item.js +1 -1
- package/dist/components/lm-container2.js +1 -1
- package/dist/components/lm-floating-window2.js +1 -1
- package/dist/components/lm-panel2.js +1 -1
- package/dist/components/lm-splitter2.js +1 -1
- package/dist/components/lm-tabs2.js +1 -1
- package/dist/components/loader.js +1 -1
- package/dist/components/my-step.js +1 -1
- package/dist/components/nav-bar.js +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/popover.js +1 -0
- package/dist/components/radio.js +1 -1
- package/dist/components/range-slider.js +1 -1
- package/dist/components/rating.js +1 -1
- package/dist/components/resizable-panel.js +1 -1
- package/dist/components/skeleton-loader.js +1 -1
- package/dist/components/smart-step.js +1 -1
- package/dist/components/stack.js +1 -1
- package/dist/components/switch.js +1 -1
- package/dist/components/tag-group.js +1 -1
- package/dist/components/tag.js +1 -1
- package/dist/components/timeline-item.js +1 -1
- package/dist/components/toggle-group.js +1 -1
- package/dist/components/tooltip.js +1 -1
- package/dist/components/ui-accordion.js +1 -1
- package/dist/components/ui-advanced-data-table.js +1 -1
- package/dist/components/ui-anchor.js +1 -1
- package/dist/components/ui-animate-on-scroll.js +1 -1
- package/dist/components/ui-aside-panel.js +1 -1
- package/dist/components/ui-badge.js +1 -1
- package/dist/components/ui-breadcrumb-item.js +1 -1
- package/dist/components/ui-breadcrumb.js +1 -1
- package/dist/components/ui-button-toggle-group.js +1 -1
- package/dist/components/ui-button.js +1 -1
- package/dist/components/ui-callout-banner.js +1 -1
- package/dist/components/ui-card.js +1 -1
- package/dist/components/ui-carousel.js +1 -1
- package/dist/components/ui-code-editor.js +1 -1
- package/dist/components/ui-code-preview.js +1 -1
- package/dist/components/ui-color-picker.js +1 -1
- package/dist/components/ui-command-palette.js +1 -1
- package/dist/components/ui-dialog-box.js +1 -1
- package/dist/components/ui-dock-host.js +1 -1
- package/dist/components/ui-dock.js +1 -1
- package/dist/components/ui-drag-drop.js +1 -1
- package/dist/components/ui-empty-state.js +1 -1
- package/dist/components/ui-fab-item.js +1 -1
- package/dist/components/ui-fab.js +1 -1
- package/dist/components/ui-file-upload.js +1 -1
- package/dist/components/ui-horizontal-nav.js +1 -1
- package/dist/components/ui-knob.js +1 -1
- package/dist/components/{ui-color-controller.d.ts → ui-label.d.ts} +4 -4
- package/dist/components/ui-label.js +1 -0
- package/dist/components/ui-library.js +1 -1
- package/dist/components/ui-list.js +1 -1
- package/dist/components/ui-masonry.js +1 -1
- package/dist/components/ui-meter-group.js +1 -1
- package/dist/components/ui-navigation-bar.js +1 -1
- package/dist/components/ui-navigation-item.js +1 -1
- package/dist/components/ui-number-input.js +1 -1
- package/dist/components/ui-otp-input.js +1 -1
- package/dist/components/ui-panel.js +1 -1
- package/dist/components/ui-pattern-input.js +1 -1
- package/dist/components/ui-popover.js +1 -1
- package/dist/components/ui-progress.js +1 -1
- package/dist/components/ui-scroll-top.js +1 -1
- package/dist/components/ui-smart-stepper.js +1 -1
- package/dist/components/ui-snackbar.js +1 -1
- package/dist/components/ui-speed-dial.js +1 -1
- package/dist/components/ui-speedometer.js +1 -1
- package/dist/components/ui-splitter.js +1 -1
- package/dist/components/ui-step.js +1 -1
- package/dist/components/ui-stepper.js +1 -1
- package/dist/components/ui-tabs.js +1 -1
- package/dist/components/ui-timeline.js +1 -1
- package/dist/components/ui-timer.js +1 -1
- package/dist/components/ui-toolbar.js +1 -1
- package/dist/components/ui-top-bar.js +1 -1
- package/dist/components/ui-transfer-list.js +1 -1
- package/dist/components/ui-tree.js +1 -1
- package/dist/components/ui-workspace-manager.js +1 -1
- package/dist/esm/category-section.entry.js +2 -2
- package/dist/esm/dom-DFBTWhGw.js +262 -0
- package/dist/esm/exploration-project-tailwind.js +3 -3
- package/dist/esm/{index-DUsoYu9r.js → index-Dqu2zaH1.js} +1 -1
- package/dist/esm/layout-manager.entry.js +3 -3
- package/dist/esm/library-card.entry.js +2 -2
- package/dist/esm/lm-container_2.entry.js +2 -2
- package/dist/esm/lm-panel_3.entry.js +4 -4
- package/dist/esm/loader.js +3 -3
- package/dist/esm/my-component.entry.js +1 -1
- package/dist/esm/my-step.entry.js +2 -2
- package/dist/esm/nav-bar.entry.js +4 -4
- package/dist/esm/smart-step.entry.js +3 -3
- package/dist/esm/timeline-item.entry.js +2 -2
- package/dist/esm/ui-accordion_11.entry.js +132 -50
- package/dist/esm/ui-advanced-data-table.entry.js +2 -2
- package/dist/esm/ui-anchor.entry.js +2 -2
- package/dist/esm/ui-animate-on-scroll.entry.js +3 -3
- package/dist/esm/ui-aside-panel.entry.js +10 -11
- package/dist/esm/ui-avatar-group_5.entry.js +1688 -0
- package/dist/esm/ui-breadcrumb-item.entry.js +3 -3
- package/dist/esm/ui-breadcrumb.entry.js +1 -1
- package/dist/esm/ui-callout-banner.entry.js +2 -2
- package/dist/esm/ui-card.entry.js +4 -3
- package/dist/esm/ui-carousel.entry.js +1 -1
- package/dist/esm/ui-checkbox.entry.js +3 -3
- package/dist/esm/ui-code-editor.entry.js +2 -2
- package/dist/esm/ui-code-preview.entry.js +2 -2
- package/dist/esm/ui-color-picker.entry.js +256 -22
- package/dist/esm/ui-command-palette.entry.js +1 -1
- package/dist/esm/ui-dialog-box.entry.js +85 -11
- package/dist/esm/ui-dialog-content.entry.js +1 -1
- package/dist/esm/ui-dialog-footer_2.entry.js +1 -1
- package/dist/esm/ui-divider.entry.js +1 -1
- package/dist/esm/ui-dock-host.entry.js +4 -4
- package/dist/esm/ui-dock.entry.js +2 -2
- package/dist/esm/ui-drag-drop.entry.js +2 -2
- package/dist/esm/ui-dropdown_2.entry.js +104 -34
- package/dist/esm/ui-empty-state.entry.js +2 -2
- package/dist/esm/ui-fab-item.entry.js +2 -2
- package/dist/esm/ui-fab.entry.js +4 -4
- package/dist/esm/ui-file-upload.entry.js +143 -44
- package/dist/esm/ui-horizontal-nav.entry.js +2 -2
- package/dist/esm/ui-knob.entry.js +1 -1
- package/dist/esm/ui-label.entry.js +471 -0
- package/dist/esm/ui-library.entry.js +2 -2
- package/dist/esm/ui-list-group_2.entry.js +349 -60
- package/dist/esm/ui-list.entry.js +76 -42
- package/dist/esm/ui-masonry.entry.js +1 -1
- package/dist/esm/ui-meter-group.entry.js +5 -4
- package/dist/esm/ui-navigation-item.entry.js +5 -5
- package/dist/esm/ui-number-input.entry.js +7 -3
- package/dist/esm/ui-otp-input.entry.js +5 -5
- package/dist/esm/{ui-pagination_4.entry.js → ui-pagination_3.entry.js} +36 -506
- package/dist/esm/ui-panel.entry.js +1 -1
- package/dist/esm/ui-pattern-input.entry.js +46 -11
- package/dist/esm/ui-progress.entry.js +66 -9
- package/dist/esm/ui-range-slider.entry.js +2 -2
- package/dist/esm/ui-resizable-panel.entry.js +2 -2
- package/dist/esm/ui-scroll-top.entry.js +1 -1
- package/dist/esm/ui-smart-context-menu.entry.js +1 -1
- package/dist/esm/ui-smart-stepper.entry.js +2 -2
- package/dist/esm/ui-snackbar.entry.js +1 -1
- package/dist/esm/ui-speed-dial.entry.js +1 -1
- package/dist/esm/ui-speedometer.entry.js +28 -17
- package/dist/esm/ui-splitter.entry.js +1 -1
- package/dist/esm/ui-step.entry.js +2 -2
- package/dist/esm/ui-stepper.entry.js +1 -1
- package/dist/esm/ui-switch.entry.js +14 -13
- package/dist/esm/ui-tabs.entry.js +2 -2
- package/dist/esm/ui-tag.entry.js +58 -13
- package/dist/esm/ui-timeline.entry.js +10 -2
- package/dist/esm/ui-timer.entry.js +2 -2
- package/dist/esm/ui-toolbar.entry.js +2 -2
- package/dist/esm/ui-tooltip.entry.js +4 -4
- package/dist/esm/ui-top-bar.entry.js +1 -1
- package/dist/esm/ui-transfer-list.entry.js +6 -6
- package/dist/esm/ui-tree.entry.js +30 -15
- package/dist/esm/ui-workspace-manager.entry.js +2 -2
- package/dist/exploration-project-tailwind/exploration-project-tailwind.css +1 -1
- package/dist/exploration-project-tailwind/exploration-project-tailwind.esm.js +1 -1
- package/dist/exploration-project-tailwind/{p-7ba2258a.entry.js → p-024a299a.entry.js} +1 -1
- package/dist/exploration-project-tailwind/p-0a71896a.entry.js +1 -0
- package/dist/exploration-project-tailwind/{p-35296877.entry.js → p-0cdeb8d8.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-a42fdc33.entry.js → p-139cefbc.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-036d2a44.entry.js → p-198c83e5.entry.js} +1 -1
- package/dist/exploration-project-tailwind/p-236f47b1.entry.js +1 -0
- package/dist/exploration-project-tailwind/{p-81ebba11.entry.js → p-25530d0d.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-41cd6bf0.entry.js → p-298f2057.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-85e36111.entry.js → p-2b5a8e3e.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-e8c6d395.entry.js → p-2b6aa7bc.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-70bacda8.entry.js → p-2cfba753.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-cbee2607.entry.js → p-2fe22958.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-20ecc116.entry.js → p-3012e780.entry.js} +1 -1
- package/dist/exploration-project-tailwind/p-321c3f46.entry.js +1 -0
- package/dist/exploration-project-tailwind/{p-8b57fe4e.entry.js → p-3ab43638.entry.js} +1 -1
- package/dist/exploration-project-tailwind/p-3ad7e47e.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-3b1ca826.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-3ee8ddae.entry.js +1 -0
- package/dist/exploration-project-tailwind/{p-e22317c1.entry.js → p-3efb44c8.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-36861546.entry.js → p-42e3bc28.entry.js} +1 -1
- package/dist/exploration-project-tailwind/p-4360331a.entry.js +1 -0
- package/dist/exploration-project-tailwind/{p-2f961934.entry.js → p-443de32b.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-898dd0fa.entry.js → p-44d15451.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-4288c158.entry.js → p-46071679.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-a3f465d9.entry.js → p-497d6182.entry.js} +1 -1
- package/dist/exploration-project-tailwind/p-4ad8c55c.entry.js +1 -0
- package/dist/exploration-project-tailwind/{p-4aaa8e40.entry.js → p-4c46ac0b.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-98e91da5.entry.js → p-5042ddaa.entry.js} +1 -1
- package/dist/exploration-project-tailwind/p-60190e0e.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-60530874.entry.js +1 -0
- package/dist/exploration-project-tailwind/{p-200241f8.entry.js → p-6108565d.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-fb4aca69.entry.js → p-62889cfe.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-c02284ea.entry.js → p-66f71613.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-7889bfc4.entry.js → p-67c440b2.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-c1c8ac28.entry.js → p-6f09503f.entry.js} +1 -1
- package/dist/exploration-project-tailwind/p-721bdbc3.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-747b02ea.entry.js +1 -0
- package/dist/exploration-project-tailwind/{p-c6fd72e1.entry.js → p-754cb046.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-97af03cc.entry.js → p-7ed3bba2.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-d59da767.entry.js → p-864cebb7.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-4d73c143.entry.js → p-96ee3196.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-54965530.entry.js → p-97086868.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-d114a347.entry.js → p-9c5ced88.entry.js} +1 -1
- package/dist/exploration-project-tailwind/p-9d3044d4.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-9e079be6.entry.js +1 -0
- package/dist/exploration-project-tailwind/{p-790556f0.entry.js → p-9e4c45f5.entry.js} +1 -1
- package/dist/exploration-project-tailwind/p-9eee7394.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-DFBTWhGw.js +1 -0
- package/dist/exploration-project-tailwind/p-Dqu2zaH1.js +2 -0
- package/dist/exploration-project-tailwind/p-a7bdedc2.entry.js +1 -0
- package/dist/exploration-project-tailwind/{p-c87aeab6.entry.js → p-a8ec29de.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-6ddbee42.entry.js → p-ae617f62.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-05a436d3.entry.js → p-aef76052.entry.js} +1 -1
- package/dist/exploration-project-tailwind/p-b5f043fa.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-b637b91b.entry.js +1 -0
- package/dist/exploration-project-tailwind/{p-d2e45c5e.entry.js → p-bc49a088.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-6b838549.entry.js → p-bd9a631f.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-e8ba0c95.entry.js → p-bf4b6767.entry.js} +1 -1
- package/dist/exploration-project-tailwind/p-c0fa400e.entry.js +1 -0
- package/dist/exploration-project-tailwind/{p-8578b616.entry.js → p-c4f3d990.entry.js} +1 -1
- package/dist/exploration-project-tailwind/p-c68ddb2f.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-c79574c4.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-c840098d.entry.js +1 -0
- package/dist/exploration-project-tailwind/{p-a1ad32a2.entry.js → p-c8663cbe.entry.js} +1 -1
- package/dist/exploration-project-tailwind/p-cb6e38a6.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-cb9f2df1.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-cfe8b696.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-d00e13ae.entry.js +1 -0
- package/dist/exploration-project-tailwind/{p-c4ba7e52.entry.js → p-d01ed934.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-aa85ff78.entry.js → p-d4e57d94.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-ccb5c737.entry.js → p-d5bd3a3f.entry.js} +1 -1
- package/dist/exploration-project-tailwind/{p-45482d86.entry.js → p-d987cebe.entry.js} +1 -1
- package/dist/exploration-project-tailwind/p-d9ae77c0.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-e9bae5c7.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-f516fabc.entry.js +1 -0
- package/dist/exploration-project-tailwind/p-f68e2794.entry.js +1 -0
- package/dist/exploration-project-tailwind/{p-d30e24bd.entry.js → p-fa034f69.entry.js} +1 -1
- package/dist/types/components/aside-panel/aside-panel.d.ts +0 -3
- package/dist/types/components/avatar/avatar.d.ts +3 -0
- package/dist/types/components/avatar/types.d.ts +2 -0
- package/dist/types/components/badge/badge.d.ts +1 -0
- package/dist/types/components/color-picker/color-picker.d.ts +35 -2
- package/dist/types/components/dialog-box/dialog-box.d.ts +10 -0
- package/dist/types/components/dropdown/dropdown.d.ts +5 -0
- package/dist/types/components/file-upload/file-upload.d.ts +23 -6
- package/dist/types/components/label/label.d.ts +290 -0
- package/dist/types/components/label/types.d.ts +39 -0
- package/dist/types/components/list/list.d.ts +2 -1
- package/dist/types/components/list-group/list-group.d.ts +1 -0
- package/dist/types/components/list-item/list-item.d.ts +45 -17
- package/dist/types/components/pattern-input/pattern-input.d.ts +6 -0
- package/dist/types/components/popover/popover.d.ts +3 -0
- package/dist/types/components/progress/progress.d.ts +7 -0
- package/dist/types/components/range-slider/range-slider.d.ts +2 -2
- package/dist/types/components/rating/rating.d.ts +1 -0
- package/dist/types/components/skeleton/skeleton-loader.d.ts +1 -1
- package/dist/types/components/speedometer/speedometer.d.ts +1 -0
- package/dist/types/components/tag/tag.d.ts +4 -0
- package/dist/types/components/tree/tree.d.ts +1 -0
- package/dist/types/components/ui-navigation-bar/navigation-bar/navigation-bar.d.ts +1 -1
- package/dist/types/components.d.ts +742 -425
- package/dist/types/types/common.d.ts +2 -2
- package/dist/types/types/common.type.d.ts +2 -0
- package/dist/types/utils/dom.d.ts +4 -4
- package/package.json +4 -5
- package/dist/cjs/dom-oP1E4Rd3.js +0 -267
- package/dist/cjs/ui-avatar-group_3.cjs.entry.js +0 -634
- package/dist/cjs/ui-color-controller.cjs.entry.js +0 -150
- package/dist/cjs/ui-popover.cjs.entry.js +0 -517
- package/dist/cjs/ui-smart-location-dropdown.cjs.entry.js +0 -565
- package/dist/collection/components/color-controller/color-controller.css +0 -108
- package/dist/collection/components/color-controller/color-controller.js +0 -224
- package/dist/collection/components/smart-location-dropdown/smart-location-dropdown.css +0 -357
- package/dist/collection/components/smart-location-dropdown/smart-location-dropdown.js +0 -1190
- package/dist/components/ui-color-controller.js +0 -1
- package/dist/components/ui-smart-location-dropdown.d.ts +0 -11
- package/dist/components/ui-smart-location-dropdown.js +0 -1
- package/dist/esm/dom-BMFah5q3.js +0 -262
- package/dist/esm/ui-avatar-group_3.entry.js +0 -630
- package/dist/esm/ui-color-controller.entry.js +0 -148
- package/dist/esm/ui-popover.entry.js +0 -515
- package/dist/esm/ui-smart-location-dropdown.entry.js +0 -563
- package/dist/exploration-project-tailwind/p-06f0c679.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-0d31c9e9.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-148e81df.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-16bdd162.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-2347d21b.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-3d381f75.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-4417a9d8.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-44742ddd.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-47e2a7ee.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-4bef8bed.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-4efd63ce.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-5c835d90.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-61717490.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-717dad1f.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-71d95bb1.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-9bd14f69.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-9fc06ff0.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-BMFah5q3.js +0 -1
- package/dist/exploration-project-tailwind/p-DUsoYu9r.js +0 -2
- package/dist/exploration-project-tailwind/p-a27f59d2.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-a7b07cf4.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-bd89d060.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-c63c522e.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-c69dd43e.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-d6ce9721.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-dc92a343.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-debede45.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-e76318c7.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-ea51c5d8.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-eab5ad36.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-f0bc5d7e.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-f1beee72.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-f543392f.entry.js +0 -1
- package/dist/exploration-project-tailwind/p-f61cfb7c.entry.js +0 -1
- package/dist/types/components/color-controller/color-controller.d.ts +0 -24
- package/dist/types/components/smart-location-dropdown/smart-location-dropdown.d.ts +0 -119
- package/dist/types/components/smart-location-dropdown/types.d.ts +0 -37
- /package/dist/collection/components/{smart-location-dropdown → label}/types.js +0 -0
|
@@ -1,171 +1,641 @@
|
|
|
1
|
-
export function initFileUploadDemo() {
|
|
2
|
-
const
|
|
3
|
-
if (!
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
</
|
|
12
|
-
|
|
13
|
-
<
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
<
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<
|
|
60
|
-
<
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
variant="
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
<div
|
|
116
|
-
<
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
1
|
+
export function initFileUploadDemo() {
|
|
2
|
+
const section = document.getElementById('file-upload');
|
|
3
|
+
if (!section) return;
|
|
4
|
+
|
|
5
|
+
section.innerHTML = `
|
|
6
|
+
<p style="margin-top: 0; opacity: 0.7; font-size: 14px; margin-bottom: 24px;">Enterprise-grade file uploader with multiple trigger variants, validation, preview, and upload orchestration.</p>
|
|
7
|
+
|
|
8
|
+
<div class="demo-controls" style="margin: 20px 0; display: flex; gap: 10px; flex-wrap: wrap;">
|
|
9
|
+
<ui-button data-demo="dropzone" variant="outline" status-color="primary">Dropzone</ui-button>
|
|
10
|
+
<ui-button data-demo="variants" variant="outline">Variants</ui-button>
|
|
11
|
+
<ui-button data-demo="upload-mode" variant="outline">Auto vs Manual</ui-button>
|
|
12
|
+
<ui-button data-demo="sideload" variant="outline">Sideload</ui-button>
|
|
13
|
+
<ui-button data-demo="validation" variant="outline">Validation</ui-button>
|
|
14
|
+
<ui-button data-demo="orchestration" variant="outline">Orchestration</ui-button>
|
|
15
|
+
<ui-button data-demo="events" variant="outline">Events</ui-button>
|
|
16
|
+
<ui-button data-demo="folder" variant="outline">Folder Upload</ui-button>
|
|
17
|
+
<ui-button data-demo="file-types" variant="outline">File Types</ui-button>
|
|
18
|
+
</div>
|
|
19
|
+
|
|
20
|
+
<div id="fileUploadContainer" style="margin-top: 20px;"></div>
|
|
21
|
+
`;
|
|
22
|
+
|
|
23
|
+
const container = section.querySelector('#fileUploadContainer');
|
|
24
|
+
|
|
25
|
+
/* ── Dropzone ─────────────────────────────────────────────────────── */
|
|
26
|
+
const showDropzone = () => {
|
|
27
|
+
container.innerHTML = `
|
|
28
|
+
<div class="demo-block">
|
|
29
|
+
<h3>Standard Dropzone</h3>
|
|
30
|
+
<p style="font-size:13px;color:var(--text-secondary,#64748b);margin-bottom:24px;">The default <code>variant="dropzone"</code> renders a full drag-and-drop target area.</p>
|
|
31
|
+
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(340px,1fr));gap:32px;">
|
|
32
|
+
<div>
|
|
33
|
+
<h4 style="margin:0 0 12px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:0.05em;">Single File</h4>
|
|
34
|
+
<ui-file-upload label="Upload Document" accept=".pdf,.doc,.docx" helper-text="PDF or Word, max 10 MB"></ui-file-upload>
|
|
35
|
+
</div>
|
|
36
|
+
<div>
|
|
37
|
+
<h4 style="margin:0 0 12px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:0.05em;">Multiple Files</h4>
|
|
38
|
+
<ui-file-upload label="Gallery Assets" accept="image/*" multiple="true" max-files="4" upload-icon="image" helper-text="Up to 4 images"></ui-file-upload>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
<div class="demo-block">
|
|
43
|
+
<h3>Custom Upload Icon</h3>
|
|
44
|
+
<p style="font-size:13px;color:var(--text-secondary,#64748b);margin-bottom:24px;">Pass any Lucide icon name to <code>upload-icon</code> to replace the default cloud icon.</p>
|
|
45
|
+
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:24px;">
|
|
46
|
+
<ui-file-upload label="Import Spreadsheet" accept=".csv,.xlsx" upload-icon="file-spreadsheet" helper-text="CSV or Excel files"></ui-file-upload>
|
|
47
|
+
<ui-file-upload label="Upload Audio" accept="audio/*" upload-icon="music" helper-text="MP3, WAV, FLAC"></ui-file-upload>
|
|
48
|
+
<ui-file-upload label="Source Code" accept=".js,.ts,.py" upload-icon="file-code" helper-text="Script files only"></ui-file-upload>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
`;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/* ── Variants ─────────────────────────────────────────────────────── */
|
|
55
|
+
const showVariants = () => {
|
|
56
|
+
container.innerHTML = `
|
|
57
|
+
<div class="demo-block">
|
|
58
|
+
<h3>Trigger Variants</h3>
|
|
59
|
+
<p style="font-size:13px;color:var(--text-secondary,#64748b);margin-bottom:24px;">Five trigger styles: <code>dropzone</code>, <code>button</code>, <code>compact</code>, <code>inline</code>, and <code>sideload</code>.</p>
|
|
60
|
+
<div style="display:flex;flex-direction:column;gap:32px;">
|
|
61
|
+
|
|
62
|
+
<div>
|
|
63
|
+
<h4 style="margin:0 0 8px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:0.05em;">Button Variant</h4>
|
|
64
|
+
<p style="margin:0 0 16px;font-size:13px;color:var(--text-secondary,#64748b);">A standard filled action button — ideal in forms and toolbars.</p>
|
|
65
|
+
<ui-file-upload variant="button" label="Attach File" upload-icon="paperclip" multiple="true"></ui-file-upload>
|
|
66
|
+
</div>
|
|
67
|
+
|
|
68
|
+
<div>
|
|
69
|
+
<h4 style="margin:0 0 8px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:0.05em;">
|
|
70
|
+
Inline Variant
|
|
71
|
+
<span style="background:rgba(16,185,129,0.1);color:#047857;padding:2px 8px;border-radius:20px;font-size:11px;font-weight:700;border:1px solid rgba(16,185,129,0.25);margin-left:6px;">New</span>
|
|
72
|
+
</h4>
|
|
73
|
+
<p style="margin:0 0 16px;font-size:13px;color:var(--text-secondary,#64748b);">A minimal icon + text button — perfect for comment boxes, email composers, or any dense layout where a full button is too heavy.</p>
|
|
74
|
+
<div style="display:flex;flex-wrap:wrap;align-items:center;gap:16px;padding:20px;background:var(--bg-secondary,#f8fafc);border-radius:12px;border:1px solid var(--border-default,#e5e7eb);">
|
|
75
|
+
<ui-file-upload variant="inline" label="Attach files" multiple="true" max-files="5"></ui-file-upload>
|
|
76
|
+
<ui-file-upload variant="inline" label="Upload image" accept="image/*" upload-icon="image"></ui-file-upload>
|
|
77
|
+
<ui-file-upload variant="inline" label="Add document" accept=".pdf,.docx" upload-icon="file-text"></ui-file-upload>
|
|
78
|
+
<ui-file-upload variant="inline" label="Import CSV" accept=".csv,.xlsx" upload-icon="file-spreadsheet" auto-upload="false"></ui-file-upload>
|
|
79
|
+
</div>
|
|
80
|
+
<p style="margin:12px 0 0;font-size:12px;color:var(--text-muted,#9ca3af);">The green badge shows queued count — click it to open the queue dialog.</p>
|
|
81
|
+
</div>
|
|
82
|
+
|
|
83
|
+
<div>
|
|
84
|
+
<h4 style="margin:0 0 8px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:0.05em;">Inline — comment box context</h4>
|
|
85
|
+
<div style="padding:20px;background:var(--bg-primary,#fff);border-radius:12px;border:1px solid var(--border-default,#e5e7eb);max-width:540px;">
|
|
86
|
+
<textarea style="width:100%;box-sizing:border-box;min-height:80px;padding:10px 12px;border-radius:8px;border:1px solid var(--border-default,#e5e7eb);font-family:inherit;font-size:14px;resize:vertical;background:var(--bg-primary,#fff);color:var(--text-primary,#111827);" placeholder="Write a comment..."></textarea>
|
|
87
|
+
<div style="display:flex;align-items:center;justify-content:space-between;margin-top:10px;">
|
|
88
|
+
<ui-file-upload variant="inline" label="Attach" upload-icon="paperclip" multiple="true" max-files="3" auto-upload="false"></ui-file-upload>
|
|
89
|
+
<ui-button variant="primary" size="sm" label="Send"></ui-button>
|
|
90
|
+
</div>
|
|
91
|
+
</div>
|
|
92
|
+
</div>
|
|
93
|
+
|
|
94
|
+
<div>
|
|
95
|
+
<h4 style="margin:0 0 8px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:0.05em;">Compact Variant</h4>
|
|
96
|
+
<p style="margin:0 0 16px;font-size:13px;color:var(--text-secondary,#64748b);">Low-footprint trigger for dense table rows or settings panels.</p>
|
|
97
|
+
<ui-file-upload variant="compact" label="Quick add" multiple="true"></ui-file-upload>
|
|
98
|
+
</div>
|
|
99
|
+
|
|
100
|
+
</div>
|
|
101
|
+
</div>
|
|
102
|
+
`;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/* ── Auto vs Manual ───────────────────────────────────────────────── */
|
|
106
|
+
const showUploadMode = () => {
|
|
107
|
+
container.innerHTML = `
|
|
108
|
+
<div class="demo-block">
|
|
109
|
+
<h3>Auto Upload <code>auto-upload="true"</code> (default)</h3>
|
|
110
|
+
<p style="font-size:13px;color:var(--text-secondary,#64748b);margin-bottom:16px;">
|
|
111
|
+
Files begin uploading <strong>immediately</strong> after selection — no extra click required.
|
|
112
|
+
The queue dialog opens automatically and shows live progress.
|
|
113
|
+
</p>
|
|
114
|
+
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:28px;">
|
|
115
|
+
<div>
|
|
116
|
+
<h4 style="margin:0 0 12px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:0.05em;">Dropzone — Auto</h4>
|
|
117
|
+
<ui-file-upload
|
|
118
|
+
label="Auto-upload Dropzone"
|
|
119
|
+
multiple="true"
|
|
120
|
+
max-files="5"
|
|
121
|
+
helper-text="Files upload automatically on select"
|
|
122
|
+
></ui-file-upload>
|
|
123
|
+
</div>
|
|
124
|
+
<div>
|
|
125
|
+
<h4 style="margin:0 0 12px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:0.05em;">Button — Auto</h4>
|
|
126
|
+
<ui-file-upload
|
|
127
|
+
variant="button"
|
|
128
|
+
label="Attach & Upload"
|
|
129
|
+
multiple="true"
|
|
130
|
+
helper-text="Click, pick files, watch them upload"
|
|
131
|
+
></ui-file-upload>
|
|
132
|
+
</div>
|
|
133
|
+
</div>
|
|
134
|
+
</div>
|
|
135
|
+
|
|
136
|
+
<div class="demo-block" style="margin-top:32px;">
|
|
137
|
+
<h3>Manual Upload <code>auto-upload="false"</code></h3>
|
|
138
|
+
<p style="font-size:13px;color:var(--text-secondary,#64748b);margin-bottom:16px;">
|
|
139
|
+
Files queue as <strong>Ready</strong> after selection. An <strong>Upload N files</strong> button
|
|
140
|
+
appears in the queue dialog footer — upload only starts when the user clicks it.
|
|
141
|
+
</p>
|
|
142
|
+
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:28px;">
|
|
143
|
+
<div>
|
|
144
|
+
<h4 style="margin:0 0 12px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:0.05em;">Dropzone — Manual</h4>
|
|
145
|
+
<ui-file-upload
|
|
146
|
+
label="Review then Upload"
|
|
147
|
+
multiple="true"
|
|
148
|
+
max-files="5"
|
|
149
|
+
auto-upload="false"
|
|
150
|
+
helper-text="Select, review in dialog, then click Upload"
|
|
151
|
+
></ui-file-upload>
|
|
152
|
+
</div>
|
|
153
|
+
<div>
|
|
154
|
+
<h4 style="margin:0 0 12px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:0.05em;">Button — Manual + Validate</h4>
|
|
155
|
+
<ui-file-upload
|
|
156
|
+
variant="button"
|
|
157
|
+
label="Select Files"
|
|
158
|
+
multiple="true"
|
|
159
|
+
accept=".pdf,.docx,.xlsx,.csv"
|
|
160
|
+
auto-upload="false"
|
|
161
|
+
show-validate-button="true"
|
|
162
|
+
helper-text="Validate first, then upload manually"
|
|
163
|
+
></ui-file-upload>
|
|
164
|
+
</div>
|
|
165
|
+
</div>
|
|
166
|
+
|
|
167
|
+
<div style="margin-top:32px;padding:16px 20px;background:var(--bg-secondary,#f8fafc);border-radius:12px;border:1px solid var(--border-default,#e5e7eb);">
|
|
168
|
+
<h4 style="margin:0 0 12px;font-size:13px;font-weight:700;color:var(--text-primary,#111827);">Prop reference</h4>
|
|
169
|
+
<table style="width:100%;border-collapse:collapse;font-size:12px;">
|
|
170
|
+
<thead>
|
|
171
|
+
<tr style="border-bottom:1px solid var(--border-default,#e5e7eb);">
|
|
172
|
+
<th style="text-align:left;padding:6px 12px;color:var(--text-secondary,#6b7280);font-weight:600;">Prop</th>
|
|
173
|
+
<th style="text-align:left;padding:6px 12px;color:var(--text-secondary,#6b7280);font-weight:600;">Default</th>
|
|
174
|
+
<th style="text-align:left;padding:6px 12px;color:var(--text-secondary,#6b7280);font-weight:600;">Description</th>
|
|
175
|
+
</tr>
|
|
176
|
+
</thead>
|
|
177
|
+
<tbody>
|
|
178
|
+
<tr style="border-bottom:1px solid var(--border-default,#e5e7eb);">
|
|
179
|
+
<td style="padding:8px 12px;"><code>auto-upload</code></td>
|
|
180
|
+
<td style="padding:8px 12px;"><code>true</code></td>
|
|
181
|
+
<td style="padding:8px 12px;color:var(--text-secondary,#6b7280);">When <code>true</code>, upload begins immediately. When <code>false</code>, files queue as Ready until the user clicks Upload.</td>
|
|
182
|
+
</tr>
|
|
183
|
+
<tr style="border-bottom:1px solid var(--border-default,#e5e7eb);">
|
|
184
|
+
<td style="padding:8px 12px;"><code>show-upload-button</code></td>
|
|
185
|
+
<td style="padding:8px 12px;"><code>false</code></td>
|
|
186
|
+
<td style="padding:8px 12px;color:var(--text-secondary,#6b7280);">Force-show the Upload button even when <code>auto-upload="true"</code> — useful for re-upload failed flows.</td>
|
|
187
|
+
</tr>
|
|
188
|
+
<tr>
|
|
189
|
+
<td style="padding:8px 12px;"><code>show-validate-button</code></td>
|
|
190
|
+
<td style="padding:8px 12px;"><code>false</code></td>
|
|
191
|
+
<td style="padding:8px 12px;color:var(--text-secondary,#6b7280);">Adds a Validate button so users can verify files before committing to upload.</td>
|
|
192
|
+
</tr>
|
|
193
|
+
</tbody>
|
|
194
|
+
</table>
|
|
195
|
+
</div>
|
|
196
|
+
</div>
|
|
197
|
+
`;
|
|
198
|
+
};
|
|
199
|
+
|
|
200
|
+
/* ── Sideload ─────────────────────────────────────────────────────── */
|
|
201
|
+
const showSideload = () => {
|
|
202
|
+
container.innerHTML = `
|
|
203
|
+
<div class="demo-block">
|
|
204
|
+
<h3>Sideload Variant</h3>
|
|
205
|
+
<p style="font-size:13px;color:var(--text-secondary,#64748b);margin-bottom:24px;">
|
|
206
|
+
<code>variant="sideload"</code> renders as an inline panel — no modal dialog — designed for
|
|
207
|
+
firmware and binary file uploads with duplicate detection and in-place error actions.
|
|
208
|
+
</p>
|
|
209
|
+
<div style="display:flex;flex-direction:column;gap:32px;">
|
|
210
|
+
<div>
|
|
211
|
+
<h4 style="margin:0 0 12px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:0.05em;">Firmware Sideload</h4>
|
|
212
|
+
<div style="background:var(--bg-secondary,#f3f4f6);padding:40px;border-radius:24px;border:1px solid var(--border-default,#e5e7eb);">
|
|
213
|
+
<ui-file-upload variant="sideload" header-title="Sideload Firmware" accept=".ldx,.dat,.sedp" multiple="true" auto-upload="false"></ui-file-upload>
|
|
214
|
+
</div>
|
|
215
|
+
</div>
|
|
216
|
+
<div>
|
|
217
|
+
<h4 style="margin:0 0 12px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:0.05em;">Document Sideload — Manual Validate + Upload</h4>
|
|
218
|
+
<div style="background:var(--bg-secondary,#f3f4f6);padding:40px;border-radius:24px;border:1px solid var(--border-default,#e5e7eb);">
|
|
219
|
+
<ui-file-upload variant="sideload" header-title="Upload Reports" accept=".pdf,.docx,.xlsx" multiple="true" auto-upload="false" show-validate-button="true"></ui-file-upload>
|
|
220
|
+
</div>
|
|
221
|
+
</div>
|
|
222
|
+
</div>
|
|
223
|
+
</div>
|
|
224
|
+
`;
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
/* ── Validation ───────────────────────────────────────────────────── */
|
|
228
|
+
const showValidation = () => {
|
|
229
|
+
container.innerHTML = `
|
|
230
|
+
<div class="demo-block">
|
|
231
|
+
<h3>File Validation</h3>
|
|
232
|
+
<p style="font-size:13px;color:var(--text-secondary,#64748b);margin-bottom:24px;">
|
|
233
|
+
Built-in constraints via <code>accept</code>, <code>max-size</code>, <code>min-size</code>, and <code>max-files</code>.
|
|
234
|
+
Rejected files show an error badge and the queue shows a dismissible error list.
|
|
235
|
+
</p>
|
|
236
|
+
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(300px,1fr));gap:24px;">
|
|
237
|
+
<div>
|
|
238
|
+
<h4 style="margin:0 0 8px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:0.05em;">Max 2 Files</h4>
|
|
239
|
+
<ui-file-upload label="Cover Images" accept="image/jpeg,image/png" multiple="true" max-files="2" helper-text="JPEG or PNG, up to 2 files"></ui-file-upload>
|
|
240
|
+
</div>
|
|
241
|
+
<div>
|
|
242
|
+
<h4 style="margin:0 0 8px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:0.05em;">Max Size 2 MB</h4>
|
|
243
|
+
<ui-file-upload label="Small Attachments" max-size="2097152" helper-text="Files must be under 2 MB"></ui-file-upload>
|
|
244
|
+
</div>
|
|
245
|
+
<div>
|
|
246
|
+
<h4 style="margin:0 0 8px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:0.05em;">Disabled</h4>
|
|
247
|
+
<ui-file-upload label="Locked Zone" disabled="true" helper-text="Upload disabled by admin"></ui-file-upload>
|
|
248
|
+
</div>
|
|
249
|
+
</div>
|
|
250
|
+
</div>
|
|
251
|
+
<div class="demo-block">
|
|
252
|
+
<h3>Validate then Upload</h3>
|
|
253
|
+
<p style="font-size:13px;color:var(--text-secondary,#64748b);margin-bottom:24px;">
|
|
254
|
+
Enable <code>show-validate-button</code> + <code>auto-upload="false"</code> for a multi-step
|
|
255
|
+
workflow — validate first, then commit. Removing a rejected file immediately clears its error.
|
|
256
|
+
</p>
|
|
257
|
+
<ui-file-upload
|
|
258
|
+
label="Security Documents"
|
|
259
|
+
accept=".pdf,.doc,.docx"
|
|
260
|
+
multiple="true"
|
|
261
|
+
auto-upload="false"
|
|
262
|
+
show-validate-button="true"
|
|
263
|
+
show-upload-button="true"
|
|
264
|
+
helper-text="Validate first, then upload"
|
|
265
|
+
></ui-file-upload>
|
|
266
|
+
</div>
|
|
267
|
+
`;
|
|
268
|
+
};
|
|
269
|
+
|
|
270
|
+
/* ── Orchestration ────────────────────────────────────────────────── */
|
|
271
|
+
const showOrchestration = () => {
|
|
272
|
+
container.innerHTML = `
|
|
273
|
+
<div class="demo-block">
|
|
274
|
+
<h3>Programmatic Control</h3>
|
|
275
|
+
<p style="font-size:13px;color:var(--text-secondary,#64748b);margin-bottom:24px;">
|
|
276
|
+
Call <code>.upload()</code>, <code>.validate()</code>, and <code>.clear()</code> from JavaScript
|
|
277
|
+
to drive the uploader from outside — useful for form submissions and wizard flows.
|
|
278
|
+
</p>
|
|
279
|
+
<div style="display:grid;grid-template-columns:1fr auto;gap:24px;align-items:start;">
|
|
280
|
+
<ui-file-upload
|
|
281
|
+
id="fu-orch"
|
|
282
|
+
label="Controlled Uploader"
|
|
283
|
+
multiple="true"
|
|
284
|
+
max-files="4"
|
|
285
|
+
accept=".pdf,.docx,.csv"
|
|
286
|
+
auto-upload="false"
|
|
287
|
+
helper-text="Use the buttons on the right to drive this uploader"
|
|
288
|
+
></ui-file-upload>
|
|
289
|
+
<div style="display:flex;flex-direction:column;gap:10px;padding-top:32px;">
|
|
290
|
+
<ui-button id="fu-orch-validate" variant="outline" icon="shield-check" icon-library="lucide" label="Validate"></ui-button>
|
|
291
|
+
<ui-button id="fu-orch-upload" variant="primary" icon="upload-cloud" icon-library="lucide" label="Upload"></ui-button>
|
|
292
|
+
<ui-button id="fu-orch-clear" variant="ghost" icon="trash-2" icon-library="lucide" label="Clear"></ui-button>
|
|
293
|
+
</div>
|
|
294
|
+
</div>
|
|
295
|
+
<div id="fu-orch-feedback" style="margin-top:12px;font-size:12px;color:var(--color-primary,#10b981);font-weight:600;min-height:18px;"></div>
|
|
296
|
+
</div>
|
|
297
|
+
`;
|
|
298
|
+
|
|
299
|
+
const uploader = container.querySelector('#fu-orch');
|
|
300
|
+
const feedback = container.querySelector('#fu-orch-feedback');
|
|
301
|
+
const flash = msg => { feedback.textContent = msg; setTimeout(() => { feedback.textContent = ''; }, 2500); };
|
|
302
|
+
|
|
303
|
+
container.querySelector('#fu-orch-validate')?.addEventListener('click', () => { uploader?.validate(); flash('Validation run.'); });
|
|
304
|
+
container.querySelector('#fu-orch-upload') ?.addEventListener('click', () => { uploader?.upload(); flash('Upload triggered.'); });
|
|
305
|
+
container.querySelector('#fu-orch-clear') ?.addEventListener('click', () => { uploader?.clear(); flash('Queue cleared.'); });
|
|
306
|
+
};
|
|
307
|
+
|
|
308
|
+
/* ── Events ───────────────────────────────────────────────────────── */
|
|
309
|
+
const showEvents = () => {
|
|
310
|
+
container.innerHTML = `
|
|
311
|
+
<div class="demo-block">
|
|
312
|
+
<h3>Event Stream</h3>
|
|
313
|
+
<p style="font-size:13px;color:var(--text-secondary,#64748b);margin-bottom:24px;">
|
|
314
|
+
Listen to lifecycle events: <code>fileSelect</code>, <code>uploadSuccess</code>,
|
|
315
|
+
<code>fileRemove</code>, and <code>allUploadsComplete</code>.
|
|
316
|
+
</p>
|
|
317
|
+
<div style="display:grid;grid-template-columns:1fr 1fr;gap:32px;align-items:start;">
|
|
318
|
+
<ui-file-upload id="fu-events" label="Trigger Events" multiple="true" auto-upload="true"></ui-file-upload>
|
|
319
|
+
<div>
|
|
320
|
+
<div style="display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;">
|
|
321
|
+
<h4 style="margin:0;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:0.05em;">System Log</h4>
|
|
322
|
+
<ui-button id="fu-clear-log" size="xs" variant="ghost" label="Clear" icon="trash-2" icon-library="lucide"></ui-button>
|
|
323
|
+
</div>
|
|
324
|
+
<div id="fu-log" style="padding:16px;background:var(--bg-secondary,#f8fafc);border-radius:12px;font-family:monospace;font-size:12px;height:240px;overflow-y:auto;border:1px solid var(--border-default,#e2e8f0);">
|
|
325
|
+
<div style="color:var(--text-secondary,#64748b);font-style:italic;">Awaiting events...</div>
|
|
326
|
+
</div>
|
|
327
|
+
</div>
|
|
328
|
+
</div>
|
|
329
|
+
</div>
|
|
330
|
+
`;
|
|
331
|
+
|
|
332
|
+
const evtUploader = container.querySelector('#fu-events');
|
|
333
|
+
const log = container.querySelector('#fu-log');
|
|
334
|
+
const clearBtn = container.querySelector('#fu-clear-log');
|
|
335
|
+
|
|
336
|
+
const addLog = (msg, type = 'info') => {
|
|
337
|
+
const colors = { info: '#94a3b8', success: '#10b981', error: '#f43f5e', complete: '#8b5cf6' };
|
|
338
|
+
const entry = document.createElement('div');
|
|
339
|
+
entry.style.cssText = 'padding:4px 0;border-bottom:1px solid var(--border-subtle,rgba(0,0,0,0.04));';
|
|
340
|
+
entry.innerHTML = `<span style="color:${colors[type]};font-weight:700;">[${type.toUpperCase()}]</span> ${msg}`;
|
|
341
|
+
const emptyMsg = log.querySelector('div[style*="italic"]');
|
|
342
|
+
if (emptyMsg) emptyMsg.remove();
|
|
343
|
+
log.prepend(entry);
|
|
344
|
+
};
|
|
345
|
+
|
|
346
|
+
if (evtUploader && log) {
|
|
347
|
+
evtUploader.addEventListener('fileSelect', e => addLog(`Selected ${e.detail?.length ?? 1} file(s)`, 'info'));
|
|
348
|
+
evtUploader.addEventListener('uploadSuccess', e => addLog(`Uploaded: ${e.detail?.name ?? 'file'}`, 'success'));
|
|
349
|
+
evtUploader.addEventListener('fileRemove', e => addLog(`Removed: ${e.detail ?? 'file'}`, 'error'));
|
|
350
|
+
evtUploader.addEventListener('allUploadsComplete', () => addLog('All uploads complete!', 'complete'));
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
clearBtn?.addEventListener('click', () => {
|
|
354
|
+
if (log) log.innerHTML = '<div style="color:var(--text-secondary,#64748b);font-style:italic;">Awaiting events...</div>';
|
|
355
|
+
});
|
|
356
|
+
};
|
|
357
|
+
|
|
358
|
+
/* ── Folder Upload ──────────────────────────────────────────────────── */
|
|
359
|
+
const showFolderUpload = () => {
|
|
360
|
+
container.innerHTML = `
|
|
361
|
+
<div class="demo-block">
|
|
362
|
+
<h3>Folder Upload <span style="background:rgba(16,185,129,0.1);color:#047857;padding:2px 10px;border-radius:20px;font-size:12px;font-weight:700;border:1px solid rgba(16,185,129,0.25);margin-left:8px;">directory</span></h3>
|
|
363
|
+
<p style="font-size:13px;color:var(--text-secondary,#64748b);margin-bottom:24px;">
|
|
364
|
+
Set <code>directory="true"</code> to open a <strong>folder picker</strong> instead of a file picker.
|
|
365
|
+
The browser recursively collects every file inside — all your existing
|
|
366
|
+
<code>accept</code>, <code>max-size</code>, and <code>max-files</code> rules still apply.
|
|
367
|
+
</p>
|
|
368
|
+
|
|
369
|
+
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:28px;">
|
|
370
|
+
|
|
371
|
+
<div>
|
|
372
|
+
<h4 style="margin:0 0 8px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:.05em;">Any Files in Folder</h4>
|
|
373
|
+
<p style="margin:0 0 14px;font-size:13px;color:var(--text-secondary,#64748b);">No type filter — uploads everything inside the chosen folder.</p>
|
|
374
|
+
<ui-file-upload
|
|
375
|
+
directory="true"
|
|
376
|
+
label="Upload Folder"
|
|
377
|
+
helper-text="Click or drop a folder here"
|
|
378
|
+
max-files="50"
|
|
379
|
+
auto-upload="false"
|
|
380
|
+
></ui-file-upload>
|
|
381
|
+
</div>
|
|
382
|
+
|
|
383
|
+
<div>
|
|
384
|
+
<h4 style="margin:0 0 8px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:.05em;">Images Only</h4>
|
|
385
|
+
<p style="margin:0 0 14px;font-size:13px;color:var(--text-secondary,#64748b);">Combines <code>directory</code> + <code>accept="image/*"</code> — non-image files in the folder are rejected.</p>
|
|
386
|
+
<ui-file-upload
|
|
387
|
+
directory="true"
|
|
388
|
+
accept="image/*"
|
|
389
|
+
upload-icon="image"
|
|
390
|
+
label="Upload Image Folder"
|
|
391
|
+
helper-text="Only images will be accepted"
|
|
392
|
+
max-files="100"
|
|
393
|
+
auto-upload="false"
|
|
394
|
+
></ui-file-upload>
|
|
395
|
+
</div>
|
|
396
|
+
|
|
397
|
+
<div>
|
|
398
|
+
<h4 style="margin:0 0 8px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:.05em;">Button Variant</h4>
|
|
399
|
+
<p style="margin:0 0 14px;font-size:13px;color:var(--text-secondary,#64748b);">Any trigger variant works — <code>directory</code> is independent of <code>variant</code>.</p>
|
|
400
|
+
<ui-file-upload
|
|
401
|
+
variant="button"
|
|
402
|
+
directory="true"
|
|
403
|
+
upload-icon="folder-open"
|
|
404
|
+
label="Select Project Folder"
|
|
405
|
+
max-files="200"
|
|
406
|
+
auto-upload="false"
|
|
407
|
+
show-validate-button="true"
|
|
408
|
+
helper-text="Review files before uploading"
|
|
409
|
+
></ui-file-upload>
|
|
410
|
+
</div>
|
|
411
|
+
|
|
412
|
+
<div>
|
|
413
|
+
<h4 style="margin:0 0 8px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:.05em;">Inline Variant</h4>
|
|
414
|
+
<p style="margin:0 0 14px;font-size:13px;color:var(--text-secondary,#64748b);">Compact trigger for toolbars — badge shows how many files were found in the folder.</p>
|
|
415
|
+
<ui-file-upload
|
|
416
|
+
variant="inline"
|
|
417
|
+
directory="true"
|
|
418
|
+
upload-icon="folder"
|
|
419
|
+
label="Attach folder"
|
|
420
|
+
max-files="100"
|
|
421
|
+
auto-upload="false"
|
|
422
|
+
></ui-file-upload>
|
|
423
|
+
</div>
|
|
424
|
+
|
|
425
|
+
</div>
|
|
426
|
+
|
|
427
|
+
<!-- Prop reference -->
|
|
428
|
+
<div style="margin-top:32px;padding:16px 20px;background:var(--bg-secondary,#f8fafc);border-radius:12px;border:1px solid var(--border-default,#e5e7eb);">
|
|
429
|
+
<h4 style="margin:0 0 12px;font-size:13px;font-weight:700;color:var(--text-primary,#111827);">How it works</h4>
|
|
430
|
+
<table style="width:100%;border-collapse:collapse;font-size:12px;">
|
|
431
|
+
<thead>
|
|
432
|
+
<tr style="border-bottom:1px solid var(--border-default,#e5e7eb);">
|
|
433
|
+
<th style="text-align:left;padding:6px 12px;color:var(--text-secondary,#6b7280);font-weight:600;">Prop</th>
|
|
434
|
+
<th style="text-align:left;padding:6px 12px;color:var(--text-secondary,#6b7280);font-weight:600;">Default</th>
|
|
435
|
+
<th style="text-align:left;padding:6px 12px;color:var(--text-secondary,#6b7280);font-weight:600;">Description</th>
|
|
436
|
+
</tr>
|
|
437
|
+
</thead>
|
|
438
|
+
<tbody>
|
|
439
|
+
<tr style="border-bottom:1px solid var(--border-default,#e5e7eb);">
|
|
440
|
+
<td style="padding:8px 12px;"><code>directory</code></td>
|
|
441
|
+
<td style="padding:8px 12px;"><code>false</code></td>
|
|
442
|
+
<td style="padding:8px 12px;color:var(--text-secondary,#6b7280);">Opens a folder picker. Sets <code>webkitdirectory</code> on the hidden input. Implicitly enables <code>multiple</code>.</td>
|
|
443
|
+
</tr>
|
|
444
|
+
<tr style="border-bottom:1px solid var(--border-default,#e5e7eb);">
|
|
445
|
+
<td style="padding:8px 12px;"><code>accept</code></td>
|
|
446
|
+
<td style="padding:8px 12px;"><em>all</em></td>
|
|
447
|
+
<td style="padding:8px 12px;color:var(--text-secondary,#6b7280);">Works as normal — files inside the folder that don't match are rejected with an error.</td>
|
|
448
|
+
</tr>
|
|
449
|
+
<tr style="border-bottom:1px solid var(--border-default,#e5e7eb);">
|
|
450
|
+
<td style="padding:8px 12px;"><code>max-files</code></td>
|
|
451
|
+
<td style="padding:8px 12px;"><code>5</code></td>
|
|
452
|
+
<td style="padding:8px 12px;color:var(--text-secondary,#6b7280);">Consider raising this when targeting whole folders — a typical project folder has many more than 5 files.</td>
|
|
453
|
+
</tr>
|
|
454
|
+
<tr>
|
|
455
|
+
<td style="padding:8px 12px;">Browser support</td>
|
|
456
|
+
<td style="padding:8px 12px;">All modern</td>
|
|
457
|
+
<td style="padding:8px 12px;color:var(--text-secondary,#6b7280);">Chrome, Edge, Firefox 50+, Safari 11.1+. Falls back to normal file picker in unsupported browsers.</td>
|
|
458
|
+
</tr>
|
|
459
|
+
</tbody>
|
|
460
|
+
</table>
|
|
461
|
+
</div>
|
|
462
|
+
</div>
|
|
463
|
+
`;
|
|
464
|
+
};
|
|
465
|
+
|
|
466
|
+
/* ── File Types ─────────────────────────────────────────────────────── */
|
|
467
|
+
const showFileTypes = () => {
|
|
468
|
+
container.innerHTML = `
|
|
469
|
+
<div class="demo-block">
|
|
470
|
+
<h3>Custom File Types via <code>accept</code></h3>
|
|
471
|
+
<p style="font-size:13px;color:var(--text-secondary,#64748b);margin-bottom:24px;">
|
|
472
|
+
The <code>accept</code> prop is passed directly to the native file picker — the OS dialog
|
|
473
|
+
will only show matching files. Three syntax forms are supported and can be mixed.
|
|
474
|
+
</p>
|
|
475
|
+
|
|
476
|
+
<!-- Syntax reference -->
|
|
477
|
+
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:12px;margin-bottom:32px;">
|
|
478
|
+
<div style="padding:14px 16px;background:rgba(59,130,246,0.06);border:1px solid rgba(59,130,246,0.18);border-radius:10px;">
|
|
479
|
+
<div style="font-size:11px;font-weight:800;color:#2563eb;text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px;">Extension</div>
|
|
480
|
+
<code style="font-size:13px;color:var(--text-primary,#111827);">.pdf, .docx, .xlsx</code>
|
|
481
|
+
<p style="margin:6px 0 0;font-size:12px;color:var(--text-secondary,#64748b);">Exact file extension — most reliable across all OS.</p>
|
|
482
|
+
</div>
|
|
483
|
+
<div style="padding:14px 16px;background:rgba(16,185,129,0.06);border:1px solid rgba(16,185,129,0.18);border-radius:10px;">
|
|
484
|
+
<div style="font-size:11px;font-weight:800;color:#047857;text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px;">MIME Wildcard</div>
|
|
485
|
+
<code style="font-size:13px;color:var(--text-primary,#111827);">image/*, video/*, audio/*</code>
|
|
486
|
+
<p style="margin:6px 0 0;font-size:12px;color:var(--text-secondary,#64748b);">All subtypes of a MIME category.</p>
|
|
487
|
+
</div>
|
|
488
|
+
<div style="padding:14px 16px;background:rgba(139,92,246,0.06);border:1px solid rgba(139,92,246,0.18);border-radius:10px;">
|
|
489
|
+
<div style="font-size:11px;font-weight:800;color:#6d28d9;text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px;">Exact MIME</div>
|
|
490
|
+
<code style="font-size:13px;color:var(--text-primary,#111827);">image/png, application/pdf</code>
|
|
491
|
+
<p style="margin:6px 0 0;font-size:12px;color:var(--text-secondary,#64748b);">Specific MIME type only.</p>
|
|
492
|
+
</div>
|
|
493
|
+
<div style="padding:14px 16px;background:rgba(245,158,11,0.06);border:1px solid rgba(245,158,11,0.18);border-radius:10px;">
|
|
494
|
+
<div style="font-size:11px;font-weight:800;color:#b45309;text-transform:uppercase;letter-spacing:.06em;margin-bottom:6px;">Mixed</div>
|
|
495
|
+
<code style="font-size:13px;color:var(--text-primary,#111827);">image/*,.pdf,.docx</code>
|
|
496
|
+
<p style="margin:6px 0 0;font-size:12px;color:var(--text-secondary,#64748b);">Comma-separate any combination of the above.</p>
|
|
497
|
+
</div>
|
|
498
|
+
</div>
|
|
499
|
+
|
|
500
|
+
<!-- Live examples -->
|
|
501
|
+
<h4 style="margin:0 0 16px;font-size:12px;font-weight:700;color:var(--text-secondary,#64748b);text-transform:uppercase;letter-spacing:.05em;">Live Examples — each opens its own filtered picker</h4>
|
|
502
|
+
<div style="display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:20px;">
|
|
503
|
+
|
|
504
|
+
<div>
|
|
505
|
+
<div style="display:flex;align-items:center;gap:8px;margin-bottom:10px;">
|
|
506
|
+
<span style="font-size:12px;font-weight:700;color:var(--text-primary,#111827);">Images only</span>
|
|
507
|
+
<code style="font-size:11px;background:var(--bg-secondary,#f1f5f9);padding:2px 7px;border-radius:5px;color:#6d28d9;">image/*</code>
|
|
508
|
+
</div>
|
|
509
|
+
<ui-file-upload accept="image/*" upload-icon="image" multiple="true" label="Upload Images" helper-text="JPG, PNG, GIF, WEBP, SVG…"></ui-file-upload>
|
|
510
|
+
</div>
|
|
511
|
+
|
|
512
|
+
<div>
|
|
513
|
+
<div style="display:flex;align-items:center;gap:8px;margin-bottom:10px;">
|
|
514
|
+
<span style="font-size:12px;font-weight:700;color:var(--text-primary,#111827);">PDF only</span>
|
|
515
|
+
<code style="font-size:11px;background:var(--bg-secondary,#f1f5f9);padding:2px 7px;border-radius:5px;color:#6d28d9;">application/pdf</code>
|
|
516
|
+
</div>
|
|
517
|
+
<ui-file-upload accept="application/pdf" upload-icon="file-text" label="Upload PDF" helper-text="Strict PDF — other documents rejected"></ui-file-upload>
|
|
518
|
+
</div>
|
|
519
|
+
|
|
520
|
+
<div>
|
|
521
|
+
<div style="display:flex;align-items:center;gap:8px;margin-bottom:10px;">
|
|
522
|
+
<span style="font-size:12px;font-weight:700;color:var(--text-primary,#111827);">Office documents</span>
|
|
523
|
+
<code style="font-size:11px;background:var(--bg-secondary,#f1f5f9);padding:2px 7px;border-radius:5px;color:#6d28d9;">.pdf,.doc,.docx,.pptx,.xlsx</code>
|
|
524
|
+
</div>
|
|
525
|
+
<ui-file-upload accept=".pdf,.doc,.docx,.pptx,.xlsx" upload-icon="file" multiple="true" max-files="10" label="Upload Documents" helper-text="PDF, Word, PowerPoint, Excel"></ui-file-upload>
|
|
526
|
+
</div>
|
|
527
|
+
|
|
528
|
+
<div>
|
|
529
|
+
<div style="display:flex;align-items:center;gap:8px;margin-bottom:10px;">
|
|
530
|
+
<span style="font-size:12px;font-weight:700;color:var(--text-primary,#111827);">Video</span>
|
|
531
|
+
<code style="font-size:11px;background:var(--bg-secondary,#f1f5f9);padding:2px 7px;border-radius:5px;color:#6d28d9;">video/*</code>
|
|
532
|
+
</div>
|
|
533
|
+
<ui-file-upload accept="video/*" upload-icon="video" max-size="524288000" label="Upload Video" helper-text="MP4, MOV, AVI, WEBM… max 500 MB"></ui-file-upload>
|
|
534
|
+
</div>
|
|
535
|
+
|
|
536
|
+
<div>
|
|
537
|
+
<div style="display:flex;align-items:center;gap:8px;margin-bottom:10px;">
|
|
538
|
+
<span style="font-size:12px;font-weight:700;color:var(--text-primary,#111827);">Audio</span>
|
|
539
|
+
<code style="font-size:11px;background:var(--bg-secondary,#f1f5f9);padding:2px 7px;border-radius:5px;color:#6d28d9;">audio/*</code>
|
|
540
|
+
</div>
|
|
541
|
+
<ui-file-upload accept="audio/*" upload-icon="music" multiple="true" label="Upload Audio" helper-text="MP3, WAV, FLAC, AAC…"></ui-file-upload>
|
|
542
|
+
</div>
|
|
543
|
+
|
|
544
|
+
<div>
|
|
545
|
+
<div style="display:flex;align-items:center;gap:8px;margin-bottom:10px;">
|
|
546
|
+
<span style="font-size:12px;font-weight:700;color:var(--text-primary,#111827);">Spreadsheets</span>
|
|
547
|
+
<code style="font-size:11px;background:var(--bg-secondary,#f1f5f9);padding:2px 7px;border-radius:5px;color:#6d28d9;">.csv,.xls,.xlsx,.ods</code>
|
|
548
|
+
</div>
|
|
549
|
+
<ui-file-upload accept=".csv,.xls,.xlsx,.ods" upload-icon="file-spreadsheet" multiple="true" label="Upload Spreadsheet" helper-text="CSV, Excel, OpenDocument"></ui-file-upload>
|
|
550
|
+
</div>
|
|
551
|
+
|
|
552
|
+
<div>
|
|
553
|
+
<div style="display:flex;align-items:center;gap:8px;margin-bottom:10px;">
|
|
554
|
+
<span style="font-size:12px;font-weight:700;color:var(--text-primary,#111827);">Archives</span>
|
|
555
|
+
<code style="font-size:11px;background:var(--bg-secondary,#f1f5f9);padding:2px 7px;border-radius:5px;color:#6d28d9;">.zip,.tar,.gz,.7z,.rar</code>
|
|
556
|
+
</div>
|
|
557
|
+
<ui-file-upload accept=".zip,.tar,.gz,.7z,.rar" upload-icon="archive" max-size="104857600" label="Upload Archive" helper-text="ZIP, TAR, GZ, 7Z, RAR — max 100 MB"></ui-file-upload>
|
|
558
|
+
</div>
|
|
559
|
+
|
|
560
|
+
<div>
|
|
561
|
+
<div style="display:flex;align-items:center;gap:8px;margin-bottom:10px;">
|
|
562
|
+
<span style="font-size:12px;font-weight:700;color:var(--text-primary,#111827);">Mixed: images or PDF</span>
|
|
563
|
+
<code style="font-size:11px;background:var(--bg-secondary,#f1f5f9);padding:2px 7px;border-radius:5px;color:#6d28d9;">image/*,.pdf</code>
|
|
564
|
+
</div>
|
|
565
|
+
<ui-file-upload accept="image/*,.pdf" upload-icon="file-image" multiple="true" max-files="8" label="Upload Media or PDF" helper-text="Any image format or PDF"></ui-file-upload>
|
|
566
|
+
</div>
|
|
567
|
+
|
|
568
|
+
<div>
|
|
569
|
+
<div style="display:flex;align-items:center;gap:8px;margin-bottom:10px;">
|
|
570
|
+
<span style="font-size:12px;font-weight:700;color:var(--text-primary,#111827);">No restriction</span>
|
|
571
|
+
<code style="font-size:11px;background:var(--bg-secondary,#f1f5f9);padding:2px 7px;border-radius:5px;color:#6d28d9;">(omit accept)</code>
|
|
572
|
+
</div>
|
|
573
|
+
<ui-file-upload multiple="true" max-files="10" label="Any File" helper-text="All file types accepted"></ui-file-upload>
|
|
574
|
+
</div>
|
|
575
|
+
|
|
576
|
+
</div>
|
|
577
|
+
|
|
578
|
+
<!-- Common accept values reference -->
|
|
579
|
+
<div style="margin-top:32px;padding:16px 20px;background:var(--bg-secondary,#f8fafc);border-radius:12px;border:1px solid var(--border-default,#e5e7eb);">
|
|
580
|
+
<h4 style="margin:0 0 12px;font-size:13px;font-weight:700;color:var(--text-primary,#111827);">Common <code>accept</code> values</h4>
|
|
581
|
+
<table style="width:100%;border-collapse:collapse;font-size:12px;">
|
|
582
|
+
<thead>
|
|
583
|
+
<tr style="border-bottom:2px solid var(--border-default,#e5e7eb);">
|
|
584
|
+
<th style="text-align:left;padding:6px 12px;color:var(--text-secondary,#6b7280);font-weight:600;">Use case</th>
|
|
585
|
+
<th style="text-align:left;padding:6px 12px;color:var(--text-secondary,#6b7280);font-weight:600;">accept value</th>
|
|
586
|
+
</tr>
|
|
587
|
+
</thead>
|
|
588
|
+
<tbody>
|
|
589
|
+
<tr style="border-bottom:1px solid var(--border-default,#e5e7eb);"><td style="padding:7px 12px;">Any image</td><td style="padding:7px 12px;"><code>image/*</code></td></tr>
|
|
590
|
+
<tr style="border-bottom:1px solid var(--border-default,#e5e7eb);"><td style="padding:7px 12px;">JPEG & PNG only</td><td style="padding:7px 12px;"><code>image/jpeg,image/png</code></td></tr>
|
|
591
|
+
<tr style="border-bottom:1px solid var(--border-default,#e5e7eb);"><td style="padding:7px 12px;">PDF</td><td style="padding:7px 12px;"><code>application/pdf</code> or <code>.pdf</code></td></tr>
|
|
592
|
+
<tr style="border-bottom:1px solid var(--border-default,#e5e7eb);"><td style="padding:7px 12px;">Word documents</td><td style="padding:7px 12px;"><code>.doc,.docx</code></td></tr>
|
|
593
|
+
<tr style="border-bottom:1px solid var(--border-default,#e5e7eb);"><td style="padding:7px 12px;">Excel / CSV</td><td style="padding:7px 12px;"><code>.csv,.xls,.xlsx</code></td></tr>
|
|
594
|
+
<tr style="border-bottom:1px solid var(--border-default,#e5e7eb);"><td style="padding:7px 12px;">Any video</td><td style="padding:7px 12px;"><code>video/*</code></td></tr>
|
|
595
|
+
<tr style="border-bottom:1px solid var(--border-default,#e5e7eb);"><td style="padding:7px 12px;">Any audio</td><td style="padding:7px 12px;"><code>audio/*</code></td></tr>
|
|
596
|
+
<tr style="border-bottom:1px solid var(--border-default,#e5e7eb);"><td style="padding:7px 12px;">JSON / XML</td><td style="padding:7px 12px;"><code>.json,.xml</code></td></tr>
|
|
597
|
+
<tr style="border-bottom:1px solid var(--border-default,#e5e7eb);"><td style="padding:7px 12px;">Source code</td><td style="padding:7px 12px;"><code>.js,.ts,.py,.java,.cpp</code></td></tr>
|
|
598
|
+
<tr><td style="padding:7px 12px;">Any file</td><td style="padding:7px 12px;"><em>omit the prop</em></td></tr>
|
|
599
|
+
</tbody>
|
|
600
|
+
</table>
|
|
601
|
+
<p style="margin:12px 0 0;font-size:12px;color:var(--text-muted,#9ca3af);">The <code>accept</code> filter runs both in the OS picker <em>and</em> as client-side validation after drop, so files dragged outside the picker are still rejected.</p>
|
|
602
|
+
</div>
|
|
603
|
+
</div>
|
|
604
|
+
`;
|
|
605
|
+
};
|
|
606
|
+
|
|
607
|
+
/* ── Router ───────────────────────────────────────────────────────── */
|
|
608
|
+
const demoMap = {
|
|
609
|
+
dropzone: showDropzone,
|
|
610
|
+
variants: showVariants,
|
|
611
|
+
'upload-mode': showUploadMode,
|
|
612
|
+
sideload: showSideload,
|
|
613
|
+
validation: showValidation,
|
|
614
|
+
orchestration: showOrchestration,
|
|
615
|
+
events: showEvents,
|
|
616
|
+
folder: showFolderUpload,
|
|
617
|
+
'file-types': showFileTypes,
|
|
618
|
+
};
|
|
619
|
+
|
|
620
|
+
const nav = section.querySelector('.demo-controls');
|
|
621
|
+
if (nav) {
|
|
622
|
+
nav.querySelectorAll('ui-button').forEach(btn => {
|
|
623
|
+
btn.addEventListener('click', () => {
|
|
624
|
+
const demo = btn.getAttribute('data-demo');
|
|
625
|
+
if (demoMap[demo]) demoMap[demo]();
|
|
626
|
+
nav.querySelectorAll('ui-button').forEach(b => {
|
|
627
|
+
b.variant = b.getAttribute('data-demo') === demo ? 'solid' : 'outline';
|
|
628
|
+
b.color = b.getAttribute('data-demo') === demo ? 'primary' : 'none';
|
|
629
|
+
});
|
|
630
|
+
});
|
|
631
|
+
});
|
|
632
|
+
}
|
|
633
|
+
|
|
634
|
+
setTimeout(() => {
|
|
635
|
+
showDropzone();
|
|
636
|
+
nav?.querySelectorAll('ui-button').forEach(b => {
|
|
637
|
+
b.variant = b.getAttribute('data-demo') === 'dropzone' ? 'solid' : 'outline';
|
|
638
|
+
b.color = b.getAttribute('data-demo') === 'dropzone' ? 'primary' : 'none';
|
|
639
|
+
});
|
|
640
|
+
}, 50);
|
|
641
|
+
}
|