@esportsplus/ui 0.54.0 → 0.56.2
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/README.md +144 -4
- package/build/components/accordion/index.d.ts +2157 -8
- package/build/components/accordion/index.js +25 -11
- package/build/components/accordion/more.d.ts +20 -0
- package/build/components/accordion/more.js +76 -0
- package/build/components/accordion/scss/index.scss +1 -1
- package/build/components/anchor/scss/index.scss +1 -1
- package/build/components/announcement-banner/index.d.ts +33 -0
- package/build/components/announcement-banner/index.js +61 -0
- package/build/components/announcement-banner/scss/index.scss +2 -0
- package/build/components/autosave/index.d.ts +12 -0
- package/build/components/autosave/index.js +140 -0
- package/build/components/autosave/scss/index.scss +2 -0
- package/build/components/back-to-top/index.d.ts +16 -0
- package/build/components/back-to-top/index.js +182 -0
- package/build/components/back-to-top/scss/index.scss +2 -0
- package/build/components/bento-grid/index.d.ts +25 -0
- package/build/components/bento-grid/index.js +38 -0
- package/build/components/bento-grid/scss/index.scss +2 -0
- package/build/components/bento-grid-spotlight/index.d.ts +35 -0
- package/build/components/bento-grid-spotlight/index.js +108 -0
- package/build/components/bento-grid-spotlight/scss/index.scss +2 -0
- package/build/components/bookmark-button/index.d.ts +23 -0
- package/build/components/bookmark-button/index.js +120 -0
- package/build/components/bookmark-button/scss/index.scss +2 -0
- package/build/components/breadcrumb/ellipsis.d.ts +12 -0
- package/build/components/breadcrumb/ellipsis.js +11 -0
- package/build/components/breadcrumb/index.d.ts +29 -0
- package/build/components/breadcrumb/index.js +19 -0
- package/build/components/breadcrumb/item.d.ts +12 -0
- package/build/components/breadcrumb/item.js +9 -0
- package/build/components/breadcrumb/link.d.ts +15 -0
- package/build/components/breadcrumb/link.js +14 -0
- package/build/components/breadcrumb/list.d.ts +12 -0
- package/build/components/breadcrumb/list.js +9 -0
- package/build/components/breadcrumb/menu.d.ts +13 -0
- package/build/components/breadcrumb/menu.js +16 -0
- package/build/components/breadcrumb/page.d.ts +12 -0
- package/build/components/breadcrumb/page.js +9 -0
- package/build/components/breadcrumb/scss/index.scss +2 -0
- package/build/components/breadcrumb/separator.d.ts +12 -0
- package/build/components/breadcrumb/separator.js +11 -0
- package/build/components/breadcrumb/svg/caret.svg +1 -0
- package/build/components/breadcrumb/svg/chevron.svg +1 -0
- package/build/components/breadcrumb/svg/more.svg +1 -0
- package/build/components/breadcrumbs/index.d.ts +27 -0
- package/build/components/breadcrumbs/index.js +324 -0
- package/build/components/breadcrumbs/scss/index.scss +2 -0
- package/build/components/button/copy.d.ts +21 -0
- package/build/components/button/copy.js +48 -0
- package/build/components/button/faces.d.ts +10 -0
- package/build/components/button/faces.js +16 -0
- package/build/components/button/fan.d.ts +24 -0
- package/build/components/button/fan.js +117 -0
- package/build/components/button/hold.d.ts +31 -0
- package/build/components/button/hold.js +117 -0
- package/build/components/button/icons.d.ts +6 -0
- package/build/components/button/icons.js +12 -0
- package/build/components/button/index.d.ts +14 -0
- package/build/components/button/index.js +8 -0
- package/build/components/button/kbd.d.ts +15 -0
- package/build/components/button/kbd.js +106 -0
- package/build/components/button/loading.d.ts +22 -0
- package/build/components/button/loading.js +60 -0
- package/build/components/button/scss/index.scss +1 -1
- package/build/components/button/svg/plus.svg +1 -0
- package/build/components/card/scss/index.scss +1 -1
- package/build/components/card-input/index.d.ts +31 -0
- package/build/components/card-input/index.js +562 -0
- package/build/components/card-input/scss/index.scss +2 -0
- package/build/components/carousel-3d/index.d.ts +27 -0
- package/build/components/carousel-3d/index.js +248 -0
- package/build/components/carousel-3d/scss/index.scss +2 -0
- package/build/components/checkbox/index.d.ts +1447 -11
- package/build/components/checkbox/index.js +50 -66
- package/build/components/checkbox/scss/index.scss +1 -1
- package/build/components/checkbox-group/index.d.ts +30 -0
- package/build/components/checkbox-group/index.js +101 -0
- package/build/components/checkbox-group/scss/index.scss +2 -0
- package/build/components/clipboard/copy.d.ts +21 -5
- package/build/components/clipboard/copy.js +28 -29
- package/build/components/clipboard/index.d.ts +2165 -1435
- package/build/components/clipboard/index.js +2 -3
- package/build/components/code-morph/index.d.ts +25 -0
- package/build/components/code-morph/index.js +401 -0
- package/build/components/code-morph/scss/index.scss +2 -0
- package/build/components/collapsible-sidebar/index.d.ts +41 -0
- package/build/components/collapsible-sidebar/index.js +105 -0
- package/build/components/collapsible-sidebar/scss/index.scss +2 -0
- package/build/components/color-picker/index.d.ts +19 -0
- package/build/components/color-picker/index.js +569 -0
- package/build/components/color-picker/scss/index.scss +2 -0
- package/build/components/command/constants.d.ts +3 -0
- package/build/components/command/constants.js +3 -0
- package/build/components/command/index.d.ts +30 -0
- package/build/components/command/index.js +188 -0
- package/build/components/command/scss/index.scss +2 -0
- package/build/components/command-palette/index.d.ts +51 -0
- package/build/components/command-palette/index.js +319 -0
- package/build/components/command-palette/scss/index.scss +2 -0
- package/build/components/composer/index.d.ts +29 -0
- package/build/components/composer/index.js +79 -0
- package/build/components/composer/scss/index.scss +2 -0
- package/build/components/composer/svg/arrow-up.svg +1 -0
- package/build/components/container/scss/index.scss +1 -1
- package/build/components/contribution-heatmap/index.d.ts +30 -0
- package/build/components/contribution-heatmap/index.js +236 -0
- package/build/components/contribution-heatmap/scss/index.scss +2 -0
- package/build/components/counter/index.d.ts +3 -1
- package/build/components/counter/index.js +54 -31
- package/build/components/counter/scss/index.scss +1 -1
- package/build/components/datalist/index.d.ts +37 -0
- package/build/components/datalist/index.js +159 -0
- package/build/components/datalist/scss/index.scss +2 -0
- package/build/components/date-range-picker/index.d.ts +28 -0
- package/build/components/date-range-picker/index.js +443 -0
- package/build/components/date-range-picker/scss/index.scss +2 -0
- package/build/components/dock/index.d.ts +24 -0
- package/build/components/dock/index.js +200 -0
- package/build/components/dock/scss/index.scss +2 -0
- package/build/components/dynamic-island/index.d.ts +23 -0
- package/build/components/dynamic-island/index.js +179 -0
- package/build/components/dynamic-island/scss/index.scss +2 -0
- package/build/components/email-typo-fix/index.d.ts +28 -0
- package/build/components/email-typo-fix/index.js +416 -0
- package/build/components/email-typo-fix/scss/index.scss +2 -0
- package/build/components/expanding-card/index.d.ts +26 -0
- package/build/components/expanding-card/index.js +265 -0
- package/build/components/expanding-card/scss/index.scss +2 -0
- package/build/components/feature-spotlight/index.d.ts +37 -0
- package/build/components/feature-spotlight/index.js +248 -0
- package/build/components/feature-spotlight/scss/index.scss +2 -0
- package/build/components/file-tree/index.d.ts +31 -0
- package/build/components/file-tree/index.js +208 -0
- package/build/components/file-tree/scss/index.scss +2 -0
- package/build/components/filter-grid/index.d.ts +23 -0
- package/build/components/filter-grid/index.js +240 -0
- package/build/components/filter-grid/scss/index.scss +2 -0
- package/build/components/form/action.d.ts +1 -1
- package/build/components/form/action.js +9 -12
- package/build/components/form/index.d.ts +1 -1
- package/build/components/form/scss/index.scss +1 -1
- package/build/components/gradient-text/index.d.ts +19 -0
- package/build/components/gradient-text/index.js +14 -0
- package/build/components/gradient-text/scss/index.scss +2 -0
- package/build/components/grid/scss/index.scss +1 -1
- package/build/components/header/index.d.ts +41 -0
- package/build/components/header/index.js +281 -0
- package/build/components/header/scss/index.scss +2 -0
- package/build/components/highlight/index.d.ts +25 -0
- package/build/components/highlight/index.js +218 -0
- package/build/components/highlight/scss/index.scss +2 -0
- package/build/components/hover-card/index.d.ts +47 -0
- package/build/components/hover-card/index.js +197 -0
- package/build/components/hover-card/scss/index.scss +2 -0
- package/build/components/icon/index.d.ts +11 -2
- package/build/components/icon/index.js +6 -6
- package/build/components/image/index.d.ts +14 -0
- package/build/components/image/index.js +62 -0
- package/build/components/image/scss/index.scss +2 -0
- package/build/components/index.d.ts +96 -1
- package/build/components/index.js +96 -1
- package/build/components/inline-edit/index.d.ts +30 -0
- package/build/components/inline-edit/index.js +108 -0
- package/build/components/inline-edit/scss/index.scss +2 -0
- package/build/components/input/index.d.ts +8 -2
- package/build/components/input/index.js +12 -13
- package/build/components/input/scss/index.scss +1 -1
- package/build/components/kanban-board/index.d.ts +23 -0
- package/build/components/kanban-board/index.js +235 -0
- package/build/components/kanban-board/scss/index.scss +2 -0
- package/build/components/lightbox/index.d.ts +32 -0
- package/build/components/lightbox/index.js +396 -0
- package/build/components/lightbox/scss/index.scss +2 -0
- package/build/components/lightbox/spring.d.ts +16 -0
- package/build/components/lightbox/spring.js +71 -0
- package/build/components/line-shadow-text/index.d.ts +17 -0
- package/build/components/line-shadow-text/index.js +15 -0
- package/build/components/line-shadow-text/scss/index.scss +2 -0
- package/build/components/link/scss/index.scss +1 -1
- package/build/components/loading/index.js +5 -7
- package/build/components/loading/scss/index.scss +1 -1
- package/build/components/log/index.d.ts +20 -0
- package/build/components/log/index.js +125 -0
- package/build/components/log/scss/index.scss +2 -0
- package/build/components/long-press/bind.d.ts +21 -0
- package/build/components/long-press/bind.js +136 -0
- package/build/components/long-press/button.d.ts +21 -0
- package/build/components/long-press/button.js +25 -0
- package/build/components/long-press/index.d.ts +2181 -0
- package/build/components/long-press/index.js +4 -0
- package/build/components/long-press/scss/index.scss +2 -0
- package/build/components/marquee/index.d.ts +20 -0
- package/build/components/marquee/index.js +236 -0
- package/build/components/marquee/scss/index.scss +2 -0
- package/build/components/modal/index.d.ts +24 -0
- package/build/components/modal/index.js +75 -0
- package/build/components/modal/scss/index.scss +1 -1
- package/build/components/morphing-button/index.d.ts +24 -0
- package/build/components/morphing-button/index.js +127 -0
- package/build/components/morphing-button/scss/index.scss +2 -0
- package/build/components/morphing-nav/index.d.ts +38 -0
- package/build/components/morphing-nav/index.js +342 -0
- package/build/components/morphing-nav/scss/index.scss +2 -0
- package/build/components/multi-step-form/index.d.ts +32 -0
- package/build/components/multi-step-form/index.js +305 -0
- package/build/components/multi-step-form/scss/index.scss +2 -0
- package/build/components/nested-menu/index.d.ts +27 -0
- package/build/components/nested-menu/index.js +374 -0
- package/build/components/nested-menu/scss/index.scss +2 -0
- package/build/components/notification-bell/index.d.ts +13 -0
- package/build/components/notification-bell/index.js +87 -0
- package/build/components/notification-bell/scss/index.scss +2 -0
- package/build/components/notification-bell/svg/bell.svg +1 -0
- package/build/components/onboarding-checklist/index.d.ts +29 -0
- package/build/components/onboarding-checklist/index.js +196 -0
- package/build/components/onboarding-checklist/scss/index.scss +2 -0
- package/build/components/overlay/index.d.ts +11 -2
- package/build/components/overlay/index.js +7 -7
- package/build/components/page-dots/index.d.ts +24 -0
- package/build/components/page-dots/index.js +116 -0
- package/build/components/page-dots/scss/index.scss +2 -0
- package/build/components/pagination/index.d.ts +11 -0
- package/build/components/pagination/index.js +109 -0
- package/build/components/pagination/scss/index.scss +2 -0
- package/build/components/pagination/svg/arrow-left.svg +1 -0
- package/build/components/pagination/svg/arrow-right.svg +1 -0
- package/build/components/password/constants.d.ts +2 -0
- package/build/components/password/constants.js +2 -0
- package/build/components/password/index.d.ts +22 -0
- package/build/components/password/index.js +74 -0
- package/build/components/password/scss/index.scss +2 -0
- package/build/components/progress/index.d.ts +15 -0
- package/build/components/progress/index.js +37 -0
- package/build/components/progress/scss/index.scss +2 -0
- package/build/components/pull-to-refresh/index.d.ts +26 -0
- package/build/components/pull-to-refresh/index.js +260 -0
- package/build/components/pull-to-refresh/scss/index.scss +2 -0
- package/build/components/radio/index.d.ts +3 -1442
- package/build/components/radio/index.js +2 -1
- package/build/components/radio-cards/index.d.ts +36 -0
- package/build/components/radio-cards/index.js +106 -0
- package/build/components/radio-cards/scss/index.scss +2 -0
- package/build/components/range/index.js +13 -13
- package/build/components/range/scss/index.scss +1 -1
- package/build/components/range-filter/index.d.ts +20 -0
- package/build/components/range-filter/index.js +216 -0
- package/build/components/range-filter/scss/index.scss +2 -0
- package/build/components/range-slider/index.d.ts +30 -0
- package/build/components/range-slider/index.js +287 -0
- package/build/components/range-slider/scss/index.scss +2 -0
- package/build/components/reading-progress/index.d.ts +13 -0
- package/build/components/reading-progress/index.js +106 -0
- package/build/components/reading-progress/scss/index.scss +2 -0
- package/build/components/relative-time/index.d.ts +25 -0
- package/build/components/relative-time/index.js +283 -0
- package/build/components/relative-time/scss/index.scss +2 -0
- package/build/components/root/scss/index.scss +1 -1
- package/build/components/scroll-fade/index.d.ts +39 -0
- package/build/components/scroll-fade/index.js +104 -0
- package/build/components/scroll-fade/scss/index.scss +2 -0
- package/build/components/scroll-spine/index.d.ts +26 -0
- package/build/components/scroll-spine/index.js +204 -0
- package/build/components/scroll-spine/scss/index.scss +2 -0
- package/build/components/scroll-velocity/index.d.ts +22 -0
- package/build/components/scroll-velocity/index.js +160 -0
- package/build/components/scroll-velocity/scss/index.scss +2 -0
- package/build/components/scrub-input/index.d.ts +39 -0
- package/build/components/scrub-input/index.js +221 -0
- package/build/components/scrub-input/scss/index.scss +2 -0
- package/build/components/select/index.d.ts +16 -8
- package/build/components/select/index.js +66 -81
- package/build/components/select/scss/index.scss +1 -1
- package/build/components/select-menu/index.d.ts +34 -0
- package/build/components/select-menu/index.js +329 -0
- package/build/components/select-menu/scss/index.scss +2 -0
- package/build/components/selection-toolbar/index.d.ts +36 -0
- package/build/components/selection-toolbar/index.js +442 -0
- package/build/components/selection-toolbar/scss/index.scss +2 -0
- package/build/components/settings/index.d.ts +43 -0
- package/build/components/settings/index.js +147 -0
- package/build/components/settings/scss/index.scss +2 -0
- package/build/components/settings/svg/close.svg +1 -0
- package/build/components/settings/svg/saved.svg +1 -0
- package/build/components/share-button/index.d.ts +29 -0
- package/build/components/share-button/index.js +191 -0
- package/build/components/share-button/scss/index.scss +2 -0
- package/build/components/sheet/index.d.ts +33 -0
- package/build/components/sheet/index.js +110 -0
- package/build/components/sheet/scss/index.scss +2 -0
- package/build/components/shiny-text/index.d.ts +17 -0
- package/build/components/shiny-text/index.js +14 -0
- package/build/components/shiny-text/scss/index.scss +2 -0
- package/build/components/shortcut-recorder/index.d.ts +12 -0
- package/build/components/shortcut-recorder/index.js +230 -0
- package/build/components/shortcut-recorder/scss/index.scss +2 -0
- package/build/components/shortcut-sheet/index.d.ts +48 -0
- package/build/components/shortcut-sheet/index.js +304 -0
- package/build/components/shortcut-sheet/scss/index.scss +2 -0
- package/build/components/sidebar/index.d.ts +11 -2
- package/build/components/sidebar/index.js +7 -7
- package/build/components/sidebar/scss/index.scss +1 -1
- package/build/components/slider/index.d.ts +25 -0
- package/build/components/slider/index.js +188 -0
- package/build/components/slider/scss/index.scss +2 -0
- package/build/components/sliding-tabs/index.d.ts +28 -0
- package/build/components/sliding-tabs/index.js +188 -0
- package/build/components/sliding-tabs/scss/index.scss +2 -0
- package/build/components/snap-carousel/index.d.ts +30 -0
- package/build/components/snap-carousel/index.js +233 -0
- package/build/components/snap-carousel/scss/index.scss +2 -0
- package/build/components/sortable/index.d.ts +9 -0
- package/build/components/sortable/index.js +302 -0
- package/build/components/sortable/scss/index.scss +2 -0
- package/build/components/sparkline/index.d.ts +26 -0
- package/build/components/sparkline/index.js +173 -0
- package/build/components/sparkline/scss/index.scss +2 -0
- package/build/components/stacked-drawer/index.d.ts +24 -0
- package/build/components/stacked-drawer/index.js +211 -0
- package/build/components/stacked-drawer/scss/index.scss +2 -0
- package/build/components/stat-counter/index.d.ts +32 -0
- package/build/components/stat-counter/index.js +216 -0
- package/build/components/stat-counter/scss/index.scss +2 -0
- package/build/components/status-picker/index.d.ts +32 -0
- package/build/components/status-picker/index.js +198 -0
- package/build/components/status-picker/scss/index.scss +2 -0
- package/build/components/sticky-header/index.d.ts +2159 -0
- package/build/components/sticky-header/index.js +98 -0
- package/build/components/sticky-header/scss/index.scss +2 -0
- package/build/components/sticky-stack/index.d.ts +33 -0
- package/build/components/sticky-stack/index.js +184 -0
- package/build/components/sticky-stack/scss/index.scss +2 -0
- package/build/components/story-progress/index.d.ts +26 -0
- package/build/components/story-progress/index.js +196 -0
- package/build/components/story-progress/scss/index.scss +2 -0
- package/build/components/swipe-deck/index.d.ts +19 -0
- package/build/components/swipe-deck/index.js +300 -0
- package/build/components/swipe-deck/scss/index.scss +2 -0
- package/build/components/switch/index.d.ts +3 -1442
- package/build/components/switch/index.js +2 -1
- package/build/components/tabs/scss/index.scss +1 -1
- package/build/components/tag-input/index.d.ts +27 -0
- package/build/components/tag-input/index.js +309 -0
- package/build/components/tag-input/scss/index.scss +2 -0
- package/build/components/task-list/index.d.ts +28 -0
- package/build/components/task-list/index.js +107 -0
- package/build/components/task-list/scss/index.scss +2 -0
- package/build/components/tasklist/constants.d.ts +2 -0
- package/build/components/tasklist/constants.js +2 -0
- package/build/components/tasklist/index.d.ts +730 -0
- package/build/components/tasklist/index.js +116 -0
- package/build/components/tasklist/scss/index.scss +2 -0
- package/build/components/text-animate/index.d.ts +30 -0
- package/build/components/text-animate/index.js +97 -0
- package/build/components/text-animate/scss/index.scss +2 -0
- package/build/components/text-progress/index.d.ts +13 -0
- package/build/components/text-progress/index.js +114 -0
- package/build/components/text-progress/scss/index.scss +2 -0
- package/build/components/textarea/index.d.ts +2159 -715
- package/build/components/textarea/index.js +16 -18
- package/build/components/textarea/scss/index.scss +1 -1
- package/build/components/thumbnail/scss/index.scss +1 -1
- package/build/components/toast/index.js +53 -43
- package/build/components/toast/manager.d.ts +4 -0
- package/build/components/toast/manager.js +19 -1
- package/build/components/toast/scss/index.scss +1 -1
- package/build/components/tooltip/context.d.ts +22 -0
- package/build/components/tooltip/context.js +66 -0
- package/build/components/tooltip/group.d.ts +29 -0
- package/build/components/tooltip/group.js +128 -0
- package/build/components/tooltip/index.d.ts +12 -2153
- package/build/components/tooltip/index.js +4 -1
- package/build/components/tooltip/menu.d.ts +23 -10
- package/build/components/tooltip/menu.js +16 -36
- package/build/components/tooltip/onclick.d.ts +22 -713
- package/build/components/tooltip/onclick.js +32 -18
- package/build/components/tooltip/onhover.d.ts +24 -711
- package/build/components/tooltip/onhover.js +85 -14
- package/build/components/tooltip/options.d.ts +7 -0
- package/build/components/tooltip/options.js +21 -0
- package/build/components/tooltip/scss/index.scss +1 -1
- package/build/components/tooltip/utilities.d.ts +4 -0
- package/build/components/tooltip/utilities.js +58 -0
- package/build/components/tree/index.d.ts +28 -0
- package/build/components/tree/index.js +182 -0
- package/build/components/tree/scss/index.scss +2 -0
- package/build/components/tree-view/index.d.ts +25 -0
- package/build/components/tree-view/index.js +205 -0
- package/build/components/tree-view/scss/index.scss +2 -0
- package/build/components/typewriter/index.d.ts +11 -2
- package/build/components/typewriter/index.js +16 -12
- package/build/components/typewriter/scss/index.scss +1 -1
- package/build/components/typewriter-retype/index.d.ts +8 -0
- package/build/components/typewriter-retype/index.js +122 -0
- package/build/components/typewriter-retype/scss/index.scss +2 -0
- package/build/components/undo-toast/index.d.ts +30 -0
- package/build/components/undo-toast/index.js +262 -0
- package/build/components/undo-toast/scss/index.scss +2 -0
- package/build/components/uptime/index.d.ts +21 -0
- package/build/components/uptime/index.js +210 -0
- package/build/components/uptime/scss/index.scss +2 -0
- package/build/components/usage-meter/index.d.ts +2159 -0
- package/build/components/usage-meter/index.js +30 -0
- package/build/components/usage-meter/scss/index.scss +2 -0
- package/build/components/value-flash/index.d.ts +12 -0
- package/build/components/value-flash/index.js +106 -0
- package/build/components/value-flash/scss/index.scss +2 -0
- package/build/components/waitlist-join/index.d.ts +34 -0
- package/build/components/waitlist-join/index.js +402 -0
- package/build/components/waitlist-join/scss/index.scss +2 -0
- package/build/components/web-search/brands.d.ts +121 -0
- package/build/components/web-search/brands.js +138 -0
- package/build/components/web-search/index.d.ts +31 -0
- package/build/components/web-search/index.js +245 -0
- package/build/components/web-search/scss/index.scss +2 -0
- package/build/components/word-rotator/index.d.ts +14 -0
- package/build/components/word-rotator/index.js +196 -0
- package/build/components/word-rotator/scss/index.scss +2 -0
- package/build/css-utilities/absolute/scss/index.scss +1 -1
- package/build/css-utilities/index.scss +1 -1
- package/build/css-utilities/scrollbar/scss/index.scss +1 -1
- package/build/themes/dark/input.d.ts +496 -492
- package/build/themes/dark/select.d.ts +3 -735
- package/build/themes/dark/select.js +4 -3
- package/build/themes/dark/textarea.d.ts +2172 -718
- package/package.json +6 -6
- package/pnpm-workspace.yaml +5 -5
- package/src/components/accordion/index.ts +13 -14
- package/src/components/accordion/more.ts +97 -0
- package/src/components/accordion/scss/index.scss +144 -1
- package/src/components/anchor/scss/index.scss +2 -2
- package/src/components/announcement-banner/index.ts +81 -0
- package/src/components/announcement-banner/scss/index.scss +183 -0
- package/src/components/announcement-banner/scss/variables.scss +18 -0
- package/src/components/autosave/index.ts +113 -0
- package/src/components/autosave/scss/index.scss +155 -0
- package/src/components/autosave/scss/variables.scss +22 -0
- package/src/components/back-to-top/index.ts +293 -0
- package/src/components/back-to-top/scss/index.scss +111 -0
- package/src/components/back-to-top/scss/variables.scss +30 -0
- package/src/components/banner/scss/variables.scss +1 -1
- package/src/components/bento-grid/index.ts +63 -0
- package/src/components/bento-grid/scss/index.scss +174 -0
- package/src/components/bento-grid/scss/variables.scss +19 -0
- package/src/components/bento-grid-spotlight/index.ts +133 -0
- package/src/components/bento-grid-spotlight/scss/index.scss +226 -0
- package/src/components/bento-grid-spotlight/scss/variables.scss +36 -0
- package/src/components/bookmark-button/index.ts +174 -0
- package/src/components/bookmark-button/scss/index.scss +162 -0
- package/src/components/bookmark-button/scss/variables.scss +28 -0
- package/src/components/breadcrumb/ellipsis.ts +17 -0
- package/src/components/breadcrumb/index.ts +32 -0
- package/src/components/breadcrumb/item.ts +10 -0
- package/src/components/breadcrumb/link.ts +21 -0
- package/src/components/breadcrumb/list.ts +10 -0
- package/src/components/breadcrumb/menu.ts +20 -0
- package/src/components/breadcrumb/page.ts +16 -0
- package/src/components/breadcrumb/scss/index.scss +74 -0
- package/src/components/breadcrumb/scss/variables.scss +17 -0
- package/src/components/breadcrumb/separator.ts +17 -0
- package/src/components/breadcrumb/svg/caret.svg +1 -0
- package/src/components/breadcrumb/svg/chevron.svg +1 -0
- package/src/components/breadcrumb/svg/more.svg +1 -0
- package/src/components/breadcrumbs/index.ts +479 -0
- package/src/components/breadcrumbs/scss/index.scss +235 -0
- package/src/components/breadcrumbs/scss/variables.scss +30 -0
- package/src/components/button/copy.ts +59 -0
- package/src/components/button/faces.ts +29 -0
- package/src/components/button/fan.ts +173 -0
- package/src/components/button/hold.ts +154 -0
- package/src/components/button/icons.ts +38 -0
- package/src/components/button/index.ts +12 -0
- package/src/components/button/kbd.ts +156 -0
- package/src/components/button/loading.ts +77 -0
- package/src/components/button/scss/_fan.scss +125 -0
- package/src/components/button/scss/_kbd.scss +10 -0
- package/src/components/button/scss/index.scss +117 -5
- package/src/components/button/scss/variables.scss +81 -0
- package/src/components/button/svg/plus.svg +1 -0
- package/src/components/card/scss/index.scss +2 -3
- package/src/components/card-input/index.ts +594 -0
- package/src/components/card-input/scss/index.scss +512 -0
- package/src/components/card-input/scss/variables.scss +29 -0
- package/src/components/carousel-3d/index.ts +405 -0
- package/src/components/carousel-3d/scss/index.scss +155 -0
- package/src/components/carousel-3d/scss/variables.scss +25 -0
- package/src/components/checkbox/index.ts +17 -25
- package/src/components/checkbox/scss/index.scss +6 -3
- package/src/components/checkbox-group/index.ts +171 -0
- package/src/components/checkbox-group/scss/index.scss +229 -0
- package/src/components/checkbox-group/scss/variables.scss +28 -0
- package/src/components/clipboard/copy.ts +24 -35
- package/src/components/clipboard/index.ts +2 -3
- package/src/components/code-morph/index.ts +459 -0
- package/src/components/code-morph/scss/index.scss +384 -0
- package/src/components/code-morph/scss/variables.scss +33 -0
- package/src/components/collapsible-sidebar/index.ts +193 -0
- package/src/components/collapsible-sidebar/scss/index.scss +220 -0
- package/src/components/collapsible-sidebar/scss/variables.scss +42 -0
- package/src/components/color-picker/index.ts +650 -0
- package/src/components/color-picker/scss/index.scss +345 -0
- package/src/components/color-picker/scss/variables.scss +33 -0
- package/src/components/command/constants.ts +6 -0
- package/src/components/command/index.ts +282 -0
- package/src/components/command/scss/index.scss +213 -0
- package/src/components/command/scss/variables.scss +35 -0
- package/src/components/command-palette/index.ts +456 -0
- package/src/components/command-palette/scss/index.scss +235 -0
- package/src/components/command-palette/scss/variables.scss +42 -0
- package/src/components/composer/index.ts +117 -0
- package/src/components/composer/scss/index.scss +105 -0
- package/src/components/composer/scss/variables.scss +82 -0
- package/src/components/composer/svg/arrow-up.svg +1 -0
- package/src/components/container/scss/index.scss +2 -1
- package/src/components/contribution-heatmap/index.ts +348 -0
- package/src/components/contribution-heatmap/scss/index.scss +151 -0
- package/src/components/contribution-heatmap/scss/variables.scss +39 -0
- package/src/components/counter/index.ts +58 -20
- package/src/components/counter/scss/index.scss +56 -2
- package/src/components/counter/scss/variables.scss +38 -2
- package/src/components/datalist/index.ts +236 -0
- package/src/components/datalist/scss/index.scss +84 -0
- package/src/components/datalist/scss/variables.scss +26 -0
- package/src/components/date-range-picker/index.ts +641 -0
- package/src/components/date-range-picker/scss/index.scss +380 -0
- package/src/components/date-range-picker/scss/variables.scss +22 -0
- package/src/components/dock/index.ts +265 -0
- package/src/components/dock/scss/index.scss +102 -0
- package/src/components/dock/scss/variables.scss +30 -0
- package/src/components/dynamic-island/index.ts +161 -0
- package/src/components/dynamic-island/scss/index.scss +278 -0
- package/src/components/dynamic-island/scss/variables.scss +39 -0
- package/src/components/email-typo-fix/index.ts +615 -0
- package/src/components/email-typo-fix/scss/index.scss +213 -0
- package/src/components/email-typo-fix/scss/variables.scss +18 -0
- package/src/components/expanding-card/index.ts +377 -0
- package/src/components/expanding-card/scss/index.scss +232 -0
- package/src/components/expanding-card/scss/variables.scss +22 -0
- package/src/components/feature-spotlight/index.ts +437 -0
- package/src/components/feature-spotlight/scss/index.scss +254 -0
- package/src/components/feature-spotlight/scss/variables.scss +36 -0
- package/src/components/file-tree/index.ts +319 -0
- package/src/components/file-tree/scss/index.scss +138 -0
- package/src/components/file-tree/scss/variables.scss +18 -0
- package/src/components/filter-grid/index.ts +344 -0
- package/src/components/filter-grid/scss/index.scss +142 -0
- package/src/components/filter-grid/scss/variables.scss +41 -0
- package/src/components/form/action.ts +2 -8
- package/src/components/form/scss/index.scss +2 -1
- package/src/components/gradient-text/index.ts +26 -0
- package/src/components/gradient-text/scss/index.scss +20 -0
- package/src/components/gradient-text/scss/variables.scss +6 -0
- package/src/components/grid/scss/index.scss +1 -1
- package/src/components/header/index.ts +318 -0
- package/src/components/header/scss/index.scss +508 -0
- package/src/components/header/scss/variables.scss +21 -0
- package/src/components/highlight/index.ts +239 -0
- package/src/components/highlight/scss/index.scss +48 -0
- package/src/components/highlight/scss/variables.scss +26 -0
- package/src/components/hover-card/index.ts +319 -0
- package/src/components/hover-card/scss/index.scss +117 -0
- package/src/components/hover-card/scss/variables.scss +25 -0
- package/src/components/image/index.ts +79 -0
- package/src/components/image/scss/index.scss +82 -0
- package/src/components/image/scss/variables.scss +15 -0
- package/src/components/index.ts +96 -1
- package/src/components/inline-edit/index.ts +177 -0
- package/src/components/inline-edit/scss/index.scss +152 -0
- package/src/components/inline-edit/scss/variables.scss +17 -0
- package/src/components/input/index.ts +15 -6
- package/src/components/input/scss/index.scss +2 -3
- package/src/components/kanban-board/index.ts +326 -0
- package/src/components/kanban-board/scss/index.scss +126 -0
- package/src/components/kanban-board/scss/variables.scss +39 -0
- package/src/components/lightbox/index.ts +594 -0
- package/src/components/lightbox/scss/index.scss +194 -0
- package/src/components/lightbox/scss/variables.scss +24 -0
- package/src/components/lightbox/spring.ts +118 -0
- package/src/components/line-shadow-text/index.ts +24 -0
- package/src/components/line-shadow-text/scss/index.scss +45 -0
- package/src/components/line-shadow-text/scss/variables.scss +6 -0
- package/src/components/link/scss/index.scss +2 -3
- package/src/components/loading/index.ts +3 -10
- package/src/components/loading/scss/index.scss +55 -4
- package/src/components/loading/scss/variables.scss +15 -1
- package/src/components/log/index.ts +156 -0
- package/src/components/log/scss/index.scss +269 -0
- package/src/components/log/scss/variables.scss +19 -0
- package/src/components/long-press/bind.ts +159 -0
- package/src/components/long-press/button.ts +46 -0
- package/src/components/long-press/index.ts +6 -0
- package/src/components/long-press/scss/index.scss +60 -0
- package/src/components/long-press/scss/variables.scss +9 -0
- package/src/components/marquee/index.ts +300 -0
- package/src/components/marquee/scss/index.scss +109 -0
- package/src/components/marquee/scss/variables.scss +18 -0
- package/src/components/modal/index.ts +91 -0
- package/src/components/modal/scss/index.scss +51 -4
- package/src/components/modal/scss/variables.scss +36 -0
- package/src/components/morphing-button/index.ts +188 -0
- package/src/components/morphing-button/scss/index.scss +154 -0
- package/src/components/morphing-button/scss/variables.scss +21 -0
- package/src/components/morphing-nav/index.ts +496 -0
- package/src/components/morphing-nav/scss/index.scss +284 -0
- package/src/components/morphing-nav/scss/variables.scss +36 -0
- package/src/components/multi-step-form/index.ts +368 -0
- package/src/components/multi-step-form/scss/index.scss +397 -0
- package/src/components/multi-step-form/scss/variables.scss +22 -0
- package/src/components/nested-menu/index.ts +446 -0
- package/src/components/nested-menu/scss/index.scss +219 -0
- package/src/components/nested-menu/scss/variables.scss +26 -0
- package/src/components/notification-bell/index.ts +102 -0
- package/src/components/notification-bell/scss/index.scss +132 -0
- package/src/components/notification-bell/scss/variables.scss +41 -0
- package/src/components/notification-bell/svg/bell.svg +1 -0
- package/src/components/onboarding-checklist/index.ts +252 -0
- package/src/components/onboarding-checklist/scss/index.scss +414 -0
- package/src/components/onboarding-checklist/scss/variables.scss +17 -0
- package/src/components/page-dots/index.ts +137 -0
- package/src/components/page-dots/scss/index.scss +95 -0
- package/src/components/page-dots/scss/variables.scss +26 -0
- package/src/components/pagination/index.ts +129 -0
- package/src/components/pagination/scss/index.scss +46 -0
- package/src/components/pagination/scss/variables.scss +40 -0
- package/src/components/pagination/svg/arrow-left.svg +1 -0
- package/src/components/pagination/svg/arrow-right.svg +1 -0
- package/src/components/password/constants.ts +4 -0
- package/src/components/password/index.ts +97 -0
- package/src/components/password/scss/index.scss +188 -0
- package/src/components/password/scss/variables.scss +50 -0
- package/src/components/progress/index.ts +57 -0
- package/src/components/progress/scss/index.scss +49 -0
- package/src/components/progress/scss/variables.scss +11 -0
- package/src/components/pull-to-refresh/index.ts +438 -0
- package/src/components/pull-to-refresh/scss/index.scss +91 -0
- package/src/components/pull-to-refresh/scss/variables.scss +10 -0
- package/src/components/radio/index.ts +5 -2
- package/src/components/radio-cards/index.ts +145 -0
- package/src/components/radio-cards/scss/index.scss +232 -0
- package/src/components/radio-cards/scss/variables.scss +32 -0
- package/src/components/range/scss/index.scss +2 -1
- package/src/components/range-filter/index.ts +295 -0
- package/src/components/range-filter/scss/index.scss +257 -0
- package/src/components/range-filter/scss/variables.scss +20 -0
- package/src/components/range-slider/index.ts +277 -0
- package/src/components/range-slider/scss/index.scss +234 -0
- package/src/components/range-slider/scss/variables.scss +26 -0
- package/src/components/reading-progress/index.ts +160 -0
- package/src/components/reading-progress/scss/index.scss +115 -0
- package/src/components/reading-progress/scss/variables.scss +31 -0
- package/src/components/relative-time/index.ts +410 -0
- package/src/components/relative-time/scss/index.scss +88 -0
- package/src/components/relative-time/scss/variables.scss +19 -0
- package/src/components/root/scss/index.scss +2 -2
- package/src/components/scroll-fade/index.ts +131 -0
- package/src/components/scroll-fade/scss/index.scss +104 -0
- package/src/components/scroll-fade/scss/variables.scss +10 -0
- package/src/components/scroll-spine/index.ts +355 -0
- package/src/components/scroll-spine/scss/index.scss +209 -0
- package/src/components/scroll-spine/scss/variables.scss +22 -0
- package/src/components/scroll-velocity/index.ts +269 -0
- package/src/components/scroll-velocity/scss/index.scss +29 -0
- package/src/components/scroll-velocity/scss/variables.scss +3 -0
- package/src/components/scrub-input/index.ts +339 -0
- package/src/components/scrub-input/scss/index.scss +105 -0
- package/src/components/scrub-input/scss/variables.scss +23 -0
- package/src/components/select/index.ts +54 -51
- package/src/components/select/scss/index.scss +15 -10
- package/src/components/select-menu/index.ts +499 -0
- package/src/components/select-menu/scss/index.scss +192 -0
- package/src/components/select-menu/scss/variables.scss +41 -0
- package/src/components/selection-toolbar/index.ts +510 -0
- package/src/components/selection-toolbar/scss/index.scss +221 -0
- package/src/components/selection-toolbar/scss/variables.scss +24 -0
- package/src/components/settings/index.ts +184 -0
- package/src/components/settings/scss/index.scss +327 -0
- package/src/components/settings/scss/variables.scss +50 -0
- package/src/components/settings/svg/close.svg +1 -0
- package/src/components/settings/svg/saved.svg +1 -0
- package/src/components/share-button/index.ts +328 -0
- package/src/components/share-button/scss/index.scss +191 -0
- package/src/components/share-button/scss/variables.scss +24 -0
- package/src/components/sheet/index.ts +170 -0
- package/src/components/sheet/scss/index.scss +65 -0
- package/src/components/sheet/scss/variables.scss +27 -0
- package/src/components/shiny-text/index.ts +19 -0
- package/src/components/shiny-text/scss/index.scss +32 -0
- package/src/components/shiny-text/scss/variables.scss +7 -0
- package/src/components/shortcut-recorder/index.ts +284 -0
- package/src/components/shortcut-recorder/scss/index.scss +198 -0
- package/src/components/shortcut-recorder/scss/variables.scss +54 -0
- package/src/components/shortcut-sheet/index.ts +454 -0
- package/src/components/shortcut-sheet/scss/index.scss +306 -0
- package/src/components/shortcut-sheet/scss/variables.scss +36 -0
- package/src/components/sidebar/scss/index.scss +3 -3
- package/src/components/slider/index.ts +232 -0
- package/src/components/slider/scss/index.scss +182 -0
- package/src/components/slider/scss/variables.scss +15 -0
- package/src/components/sliding-tabs/index.ts +291 -0
- package/src/components/sliding-tabs/scss/index.scss +174 -0
- package/src/components/sliding-tabs/scss/variables.scss +34 -0
- package/src/components/snap-carousel/index.ts +324 -0
- package/src/components/snap-carousel/scss/index.scss +174 -0
- package/src/components/snap-carousel/scss/variables.scss +31 -0
- package/src/components/sortable/index.ts +483 -0
- package/src/components/sortable/scss/index.scss +282 -0
- package/src/components/sortable/scss/variables.scss +59 -0
- package/src/components/sparkline/index.ts +234 -0
- package/src/components/sparkline/scss/index.scss +169 -0
- package/src/components/sparkline/scss/variables.scss +30 -0
- package/src/components/stacked-drawer/index.ts +272 -0
- package/src/components/stacked-drawer/scss/index.scss +122 -0
- package/src/components/stacked-drawer/scss/variables.scss +20 -0
- package/src/components/stat-counter/index.ts +337 -0
- package/src/components/stat-counter/scss/index.scss +246 -0
- package/src/components/stat-counter/scss/variables.scss +24 -0
- package/src/components/status-picker/index.ts +323 -0
- package/src/components/status-picker/scss/index.scss +290 -0
- package/src/components/status-picker/scss/variables.scss +29 -0
- package/src/components/sticky-header/index.ts +127 -0
- package/src/components/sticky-header/scss/index.scss +149 -0
- package/src/components/sticky-header/scss/variables.scss +22 -0
- package/src/components/sticky-stack/index.ts +313 -0
- package/src/components/sticky-stack/scss/index.scss +167 -0
- package/src/components/sticky-stack/scss/variables.scss +50 -0
- package/src/components/story-progress/index.ts +247 -0
- package/src/components/story-progress/scss/index.scss +205 -0
- package/src/components/story-progress/scss/variables.scss +21 -0
- package/src/components/swipe-deck/index.ts +438 -0
- package/src/components/swipe-deck/scss/index.scss +275 -0
- package/src/components/swipe-deck/scss/variables.scss +24 -0
- package/src/components/switch/index.ts +5 -2
- package/src/components/tabs/scss/index.scss +3 -3
- package/src/components/tag-input/index.ts +415 -0
- package/src/components/tag-input/scss/index.scss +186 -0
- package/src/components/tag-input/scss/variables.scss +30 -0
- package/src/components/task-list/index.ts +137 -0
- package/src/components/task-list/scss/index.scss +171 -0
- package/src/components/task-list/scss/variables.scss +8 -0
- package/src/components/tasklist/constants.ts +4 -0
- package/src/components/tasklist/index.ts +174 -0
- package/src/components/tasklist/scss/index.scss +184 -0
- package/src/components/tasklist/scss/variables.scss +83 -0
- package/src/components/text-animate/index.ts +142 -0
- package/src/components/text-animate/scss/index.scss +106 -0
- package/src/components/text-animate/scss/variables.scss +17 -0
- package/src/components/text-progress/index.ts +170 -0
- package/src/components/text-progress/scss/index.scss +148 -0
- package/src/components/text-progress/scss/variables.scss +26 -0
- package/src/components/textarea/index.ts +18 -16
- package/src/components/textarea/scss/index.scss +2 -3
- package/src/components/thumbnail/scss/index.scss +51 -0
- package/src/components/thumbnail/scss/variables.scss +12 -0
- package/src/components/toast/index.ts +11 -1
- package/src/components/toast/manager.ts +31 -1
- package/src/components/toast/scss/index.scss +66 -18
- package/src/components/toast/scss/variables.scss +2 -0
- package/src/components/tooltip/context.ts +96 -0
- package/src/components/tooltip/group.ts +162 -0
- package/src/components/tooltip/index.ts +6 -1
- package/src/components/tooltip/menu.ts +31 -48
- package/src/components/tooltip/onclick.ts +42 -15
- package/src/components/tooltip/onhover.ts +130 -11
- package/src/components/tooltip/options.ts +33 -0
- package/src/components/tooltip/scss/_center.scss +1 -5
- package/src/components/tooltip/scss/_east.scss +5 -5
- package/src/components/tooltip/scss/_group.scss +164 -0
- package/src/components/tooltip/scss/_north.scss +5 -5
- package/src/components/tooltip/scss/_south.scss +5 -5
- package/src/components/tooltip/scss/_west.scss +5 -5
- package/src/components/tooltip/scss/index.scss +230 -17
- package/src/components/tooltip/scss/variables.scss +105 -0
- package/src/components/tooltip/utilities.ts +103 -0
- package/src/components/tree/index.ts +259 -0
- package/src/components/tree/scss/index.scss +105 -0
- package/src/components/tree/scss/variables.scss +48 -0
- package/src/components/tree-view/index.ts +285 -0
- package/src/components/tree-view/scss/index.scss +169 -0
- package/src/components/tree-view/scss/variables.scss +18 -0
- package/src/components/typewriter/index.ts +10 -6
- package/src/components/typewriter/scss/index.scss +30 -11
- package/src/components/typewriter/scss/variables.scss +24 -0
- package/src/components/typewriter-retype/index.ts +164 -0
- package/src/components/typewriter-retype/scss/index.scss +142 -0
- package/src/components/typewriter-retype/scss/variables.scss +46 -0
- package/src/components/undo-toast/index.ts +359 -0
- package/src/components/undo-toast/scss/index.scss +216 -0
- package/src/components/undo-toast/scss/variables.scss +20 -0
- package/src/components/uptime/index.ts +271 -0
- package/src/components/uptime/scss/index.scss +163 -0
- package/src/components/uptime/scss/variables.scss +56 -0
- package/src/components/usage-meter/index.ts +63 -0
- package/src/components/usage-meter/scss/index.scss +94 -0
- package/src/components/usage-meter/scss/variables.scss +43 -0
- package/src/components/value-flash/index.ts +121 -0
- package/src/components/value-flash/scss/index.scss +193 -0
- package/src/components/value-flash/scss/variables.scss +47 -0
- package/src/components/waitlist-join/index.ts +545 -0
- package/src/components/waitlist-join/scss/index.scss +401 -0
- package/src/components/waitlist-join/scss/variables.scss +23 -0
- package/src/components/web-search/brands.ts +155 -0
- package/src/components/web-search/index.ts +316 -0
- package/src/components/web-search/scss/index.scss +270 -0
- package/src/components/web-search/scss/variables.scss +8 -0
- package/src/components/word-rotator/index.ts +296 -0
- package/src/components/word-rotator/scss/index.scss +33 -0
- package/src/components/word-rotator/scss/variables.scss +7 -0
- package/src/css-utilities/scrollbar/scss/index.scss +6 -1
- package/src/lib/scss/position.scss +3 -3
- package/src/themes/dark/select.ts +7 -4
- package/storage/svg/settings/add-line.svg +1 -0
- package/storage/svg/settings/arrow-down-s-line.svg +1 -0
- package/storage/svg/settings/arrow-left-s-line.svg +1 -0
- package/storage/svg/settings/arrow-right-s-line.svg +1 -0
- package/storage/svg/settings/bank-card-line.svg +1 -0
- package/storage/svg/settings/book-open-line.svg +1 -0
- package/storage/svg/settings/calendar-line.svg +1 -0
- package/storage/svg/settings/code-block.svg +1 -0
- package/storage/svg/settings/database-2-line.svg +1 -0
- package/storage/svg/settings/delete-bin-6-line.svg +1 -0
- package/storage/svg/settings/download-2-line.svg +1 -0
- package/storage/svg/settings/edit-line.svg +1 -0
- package/storage/svg/settings/expand-up-down-line.svg +1 -0
- package/storage/svg/settings/external-link-line.svg +1 -0
- package/storage/svg/settings/file-copy-line.svg +1 -0
- package/storage/svg/settings/file-excel-2-fill.svg +1 -0
- package/storage/svg/settings/file-text-fill.svg +1 -0
- package/storage/svg/settings/film-fill.svg +1 -0
- package/storage/svg/settings/git-merge-line.svg +1 -0
- package/storage/svg/settings/logout-circle-line.svg +1 -0
- package/storage/svg/settings/mail-line.svg +1 -0
- package/storage/svg/settings/more-2-fill.svg +1 -0
- package/storage/svg/settings/more-fill.svg +1 -0
- package/storage/svg/settings/organization-chart.svg +1 -0
- package/storage/svg/settings/palette-line.svg +1 -0
- package/storage/svg/settings/plug-line.svg +1 -0
- package/storage/svg/settings/school-line.svg +1 -0
- package/storage/svg/settings/search-line.svg +1 -0
- package/storage/svg/settings/settings-6-line.svg +1 -0
- package/storage/svg/settings/settings-line.svg +1 -0
- package/storage/svg/settings/tools-fill.svg +1 -0
- package/storage/svg/settings/upload-cloud-2-line.svg +1 -0
- package/build/components/border/scss/index.scss +0 -2
- package/build/components/clipboard/onclick.d.ts +0 -10
- package/build/components/clipboard/onclick.js +0 -38
- package/src/components/border/scss/index.scss +0 -17
- package/src/components/border/scss/variables.scss +0 -6
- package/src/components/clipboard/onclick.ts +0 -40
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
import * as template_u1 from '@esportsplus/template';
|
|
2
|
+
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
3
|
+
import './scss/index.scss';
|
|
4
|
+
const template_0qdl3e23 = template_u1.template(`<button class='snap-carousel-arrow ' type='button'><svg aria-hidden='true' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' viewBox='0 0 16 16'><path />`);
|
|
5
|
+
const template_0qdl3e27 = template_u1.template(`<div class='snap-carousel '><div class='snap-carousel-viewport'><div aria-roledescription='carousel' class='snap-carousel-track' role='region' tabindex='0'></div></div><div class='snap-carousel-controls'><!--$-->`);
|
|
6
|
+
const template_0qdl3e2d = template_u1.template(`<div aria-roledescription='slide' class='snap-carousel-slide ' role='group'><div class='snap-carousel-card'><!--$--><p class='snap-carousel-title'></p><p class='snap-carousel-text'>`);
|
|
7
|
+
const template_0qdl3e2k = template_u1.template(`<div aria-hidden='true' class='snap-carousel-visual'>`);
|
|
8
|
+
class ReactiveObject_0qdl3e20 extends reactivity_u0.ReactiveObject {
|
|
9
|
+
#active = this[reactivity_u0.SIGNAL](0);
|
|
10
|
+
#end = this[reactivity_u0.SIGNAL](false);
|
|
11
|
+
#start = this[reactivity_u0.SIGNAL](true);
|
|
12
|
+
constructor() {
|
|
13
|
+
super(null);
|
|
14
|
+
}
|
|
15
|
+
get active() {
|
|
16
|
+
return reactivity_u0.read(this.#active);
|
|
17
|
+
}
|
|
18
|
+
set active(_v0) {
|
|
19
|
+
reactivity_u0.write(this.#active, _v0);
|
|
20
|
+
}
|
|
21
|
+
get end() {
|
|
22
|
+
return reactivity_u0.read(this.#end);
|
|
23
|
+
}
|
|
24
|
+
set end(_v1) {
|
|
25
|
+
reactivity_u0.write(this.#end, _v1);
|
|
26
|
+
}
|
|
27
|
+
get start() {
|
|
28
|
+
return reactivity_u0.read(this.#start);
|
|
29
|
+
}
|
|
30
|
+
set start(_v2) {
|
|
31
|
+
reactivity_u0.write(this.#start, _v2);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
class ReactiveObject_0qdl3e21 extends reactivity_u0.ReactiveObject {
|
|
35
|
+
#visible = this[reactivity_u0.SIGNAL](false);
|
|
36
|
+
constructor() {
|
|
37
|
+
super(null);
|
|
38
|
+
}
|
|
39
|
+
get visible() {
|
|
40
|
+
return reactivity_u0.read(this.#visible);
|
|
41
|
+
}
|
|
42
|
+
set visible(_v0) {
|
|
43
|
+
reactivity_u0.write(this.#visible, _v0);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
const SNAP_CAROUSEL_ARROW = Symbol.for('@esportsplus/ui/snap-carousel.arrow');
|
|
47
|
+
const SNAP_CAROUSEL_CARD = Symbol.for('@esportsplus/ui/snap-carousel.card');
|
|
48
|
+
const COAST = 280;
|
|
49
|
+
const FLICK = 0.3;
|
|
50
|
+
const NEXT = 'M6 3.5 10.5 8 6 12.5';
|
|
51
|
+
const PREVIOUS = 'M10 3.5 5.5 8l4.5 4.5';
|
|
52
|
+
const SAMPLES = 80;
|
|
53
|
+
const SETTLE = 700;
|
|
54
|
+
const SLOP = 4;
|
|
55
|
+
function behavior() {
|
|
56
|
+
return matchMedia('(prefers-reduced-motion: reduce)').matches ? 'instant' : 'smooth';
|
|
57
|
+
}
|
|
58
|
+
function nearest(targets, position) {
|
|
59
|
+
let best = 0;
|
|
60
|
+
for (let i = 1, n = targets.length; i < n; i++) {
|
|
61
|
+
if (Math.abs(targets[i] - position) < Math.abs(targets[best] - position)) {
|
|
62
|
+
best = i;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return best;
|
|
66
|
+
}
|
|
67
|
+
function targets(track) {
|
|
68
|
+
let max = track.scrollWidth - track.clientWidth;
|
|
69
|
+
return Array.from(track.children, (slide) => Math.min(max, Math.max(0, slide.offsetLeft + slide.offsetWidth / 2 - track.clientWidth / 2)));
|
|
70
|
+
}
|
|
71
|
+
function template({ label = 'Carousel', slides, state = new ReactiveObject_0qdl3e20(), ...attributes }) {
|
|
72
|
+
let bound = this?.attributes, centered, drag = null, onscreen, resize, settle = null, suppress = false, track = null, view = new ReactiveObject_0qdl3e21();
|
|
73
|
+
function arrow(direction) {
|
|
74
|
+
let disabled = () => direction === -1 ? state.start : state.end;
|
|
75
|
+
return (() => {
|
|
76
|
+
let root_0qdl3e22 = template_0qdl3e23(), element_0qdl3e24 = root_0qdl3e22.firstChild, element_0qdl3e25 = element_0qdl3e24.firstElementChild.firstElementChild;
|
|
77
|
+
template_u1.setProperty(element_0qdl3e24, 'aria-disabled', () => String(disabled()));
|
|
78
|
+
template_u1.setProperty(element_0qdl3e24, 'aria-label', direction === -1 ? 'Previous card' : 'Next card');
|
|
79
|
+
template_u1.setList(element_0qdl3e24, 'class', () => disabled() && '--disabled');
|
|
80
|
+
template_u1.setProperties(element_0qdl3e24, bound?.[SNAP_CAROUSEL_ARROW]);
|
|
81
|
+
template_u1.setProperties(element_0qdl3e24, attributes[SNAP_CAROUSEL_ARROW]);
|
|
82
|
+
template_u1.delegate(element_0qdl3e24, 'click', () => {
|
|
83
|
+
if (!disabled()) {
|
|
84
|
+
step(direction);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
template_u1.setProperty(element_0qdl3e25, 'd', direction === -1 ? PREVIOUS : NEXT);
|
|
88
|
+
return root_0qdl3e22;
|
|
89
|
+
})();
|
|
90
|
+
}
|
|
91
|
+
function release(e) {
|
|
92
|
+
if (!drag || drag.id !== e.pointerId || !track) {
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
let { samples, startScroll } = drag, element = track, first = samples[0], last = samples[samples.length - 1], velocity = e.type === 'pointerup' && e.timeStamp - last.t < SAMPLES && last.t > first.t
|
|
96
|
+
? -(last.x - first.x) / (last.t - first.t)
|
|
97
|
+
: 0;
|
|
98
|
+
drag = null;
|
|
99
|
+
element.classList.remove('--dragging');
|
|
100
|
+
let points = targets(element), from = nearest(points, startScroll), index = nearest(points, element.scrollLeft + velocity * COAST);
|
|
101
|
+
if (index === from && Math.abs(velocity) > FLICK) {
|
|
102
|
+
index = Math.min(points.length - 1, Math.max(0, from + Math.sign(velocity)));
|
|
103
|
+
}
|
|
104
|
+
element.scrollTo({ behavior: behavior(), left: points[index] });
|
|
105
|
+
let fallback = setTimeout(restore, SETTLE);
|
|
106
|
+
function restore() {
|
|
107
|
+
settle = null;
|
|
108
|
+
clearTimeout(fallback);
|
|
109
|
+
element.removeEventListener('scrollend', restore);
|
|
110
|
+
element.style.scrollBehavior = '';
|
|
111
|
+
element.style.scrollSnapType = '';
|
|
112
|
+
}
|
|
113
|
+
element.addEventListener('scrollend', restore);
|
|
114
|
+
settle = restore;
|
|
115
|
+
}
|
|
116
|
+
function step(direction) {
|
|
117
|
+
if (!track || !track.firstElementChild) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
120
|
+
track.scrollBy({
|
|
121
|
+
behavior: behavior(),
|
|
122
|
+
left: direction * (track.firstElementChild.offsetWidth + parseFloat(getComputedStyle(track).columnGap || '0'))
|
|
123
|
+
});
|
|
124
|
+
}
|
|
125
|
+
function sync() {
|
|
126
|
+
if (!track) {
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
state.end = track.scrollLeft >= track.scrollWidth - track.clientWidth - 1;
|
|
130
|
+
state.start = track.scrollLeft <= 1;
|
|
131
|
+
}
|
|
132
|
+
return (() => {
|
|
133
|
+
let root_0qdl3e26 = template_0qdl3e27(), element_0qdl3e28 = root_0qdl3e26.firstChild, element_0qdl3e29 = element_0qdl3e28.firstElementChild.firstElementChild, element_0qdl3e2a = element_0qdl3e28.firstElementChild.nextElementSibling.firstChild, element_0qdl3e2b = element_0qdl3e28.firstElementChild.nextElementSibling;
|
|
134
|
+
template_u1.setList(element_0qdl3e28, 'class', () => view.visible && '--visible');
|
|
135
|
+
template_u1.setProperties(element_0qdl3e28, bound);
|
|
136
|
+
template_u1.setProperties(element_0qdl3e28, attributes);
|
|
137
|
+
template_u1.onconnect(element_0qdl3e28, (element) => {
|
|
138
|
+
centered = new IntersectionObserver((entries) => {
|
|
139
|
+
for (let entry of entries) {
|
|
140
|
+
let index = Array.prototype.indexOf.call(track.children, entry.target);
|
|
141
|
+
if (entry.intersectionRatio >= 0.9) {
|
|
142
|
+
state.active = index;
|
|
143
|
+
}
|
|
144
|
+
else if (state.active === index) {
|
|
145
|
+
state.active = -1;
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
}, { root: track, threshold: [0, 0.9] });
|
|
149
|
+
onscreen = new IntersectionObserver((entries) => {
|
|
150
|
+
view.visible = entries[entries.length - 1].isIntersecting;
|
|
151
|
+
});
|
|
152
|
+
resize = new ResizeObserver(sync);
|
|
153
|
+
for (let slide of track.children) {
|
|
154
|
+
centered.observe(slide);
|
|
155
|
+
}
|
|
156
|
+
onscreen.observe(element);
|
|
157
|
+
resize.observe(track);
|
|
158
|
+
});
|
|
159
|
+
template_u1.ondisconnect(element_0qdl3e28, () => {
|
|
160
|
+
centered?.disconnect();
|
|
161
|
+
onscreen?.disconnect();
|
|
162
|
+
resize?.disconnect();
|
|
163
|
+
settle?.();
|
|
164
|
+
});
|
|
165
|
+
template_u1.setProperty(element_0qdl3e29, 'aria-label', label);
|
|
166
|
+
template_u1.delegate(element_0qdl3e29, 'click', (e) => {
|
|
167
|
+
if (!suppress) {
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
suppress = false;
|
|
171
|
+
e.preventDefault();
|
|
172
|
+
});
|
|
173
|
+
template_u1.delegate(element_0qdl3e29, 'dragstart', (e) => {
|
|
174
|
+
e.preventDefault();
|
|
175
|
+
});
|
|
176
|
+
template_u1.delegate(element_0qdl3e29, 'pointercancel', release);
|
|
177
|
+
template_u1.delegate(element_0qdl3e29, 'pointerdown', (e) => {
|
|
178
|
+
if (e.pointerType !== 'mouse' || e.button !== 0 || !track) {
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
settle?.();
|
|
182
|
+
track.setPointerCapture(e.pointerId);
|
|
183
|
+
track.style.scrollBehavior = 'auto';
|
|
184
|
+
track.style.scrollSnapType = 'none';
|
|
185
|
+
track.classList.add('--dragging');
|
|
186
|
+
drag = {
|
|
187
|
+
id: e.pointerId,
|
|
188
|
+
samples: [{ t: e.timeStamp, x: e.clientX }],
|
|
189
|
+
startScroll: track.scrollLeft,
|
|
190
|
+
startX: e.clientX
|
|
191
|
+
};
|
|
192
|
+
suppress = false;
|
|
193
|
+
});
|
|
194
|
+
template_u1.delegate(element_0qdl3e29, 'pointermove', (e) => {
|
|
195
|
+
if (!drag || drag.id !== e.pointerId || !track) {
|
|
196
|
+
return;
|
|
197
|
+
}
|
|
198
|
+
let dx = e.clientX - drag.startX;
|
|
199
|
+
if (Math.abs(dx) > SLOP) {
|
|
200
|
+
suppress = true;
|
|
201
|
+
}
|
|
202
|
+
track.scrollLeft = drag.startScroll - dx;
|
|
203
|
+
drag.samples.push({ t: e.timeStamp, x: e.clientX });
|
|
204
|
+
while (drag.samples.length > 2 && e.timeStamp - drag.samples[0].t > SAMPLES) {
|
|
205
|
+
drag.samples.shift();
|
|
206
|
+
}
|
|
207
|
+
});
|
|
208
|
+
template_u1.delegate(element_0qdl3e29, 'pointerup', release);
|
|
209
|
+
template_u1.onrender(element_0qdl3e29, (element) => {
|
|
210
|
+
track = element;
|
|
211
|
+
});
|
|
212
|
+
template_u1.on(element_0qdl3e29, 'scroll', sync);
|
|
213
|
+
template_u1.slot(element_0qdl3e29, slides.map((slide, i) => {
|
|
214
|
+
let root_0qdl3e2c = template_0qdl3e2d(), element_0qdl3e2e = root_0qdl3e2c.firstChild, element_0qdl3e2f = element_0qdl3e2e.firstElementChild, element_0qdl3e2g = element_0qdl3e2f.firstChild, element_0qdl3e2h = element_0qdl3e2f.firstElementChild, element_0qdl3e2i = element_0qdl3e2h.nextElementSibling;
|
|
215
|
+
template_u1.setProperty(element_0qdl3e2e, 'aria-label', `${i + 1} of ${slides.length}`);
|
|
216
|
+
template_u1.setList(element_0qdl3e2e, 'class', () => state.active === i && '--active');
|
|
217
|
+
template_u1.setProperties(element_0qdl3e2f, bound?.[SNAP_CAROUSEL_CARD]);
|
|
218
|
+
template_u1.setProperties(element_0qdl3e2f, attributes[SNAP_CAROUSEL_CARD]);
|
|
219
|
+
template_u1.slot(element_0qdl3e2g, slide.visual ? (() => {
|
|
220
|
+
let root_0qdl3e2j = template_0qdl3e2k(), element_0qdl3e2l = root_0qdl3e2j.firstChild;
|
|
221
|
+
template_u1.slot(element_0qdl3e2l, slide.visual, 1);
|
|
222
|
+
return root_0qdl3e2j;
|
|
223
|
+
})() : '');
|
|
224
|
+
template_u1.slot(element_0qdl3e2h, slide.title, 1);
|
|
225
|
+
template_u1.slot(element_0qdl3e2i, slide.text, 1);
|
|
226
|
+
return root_0qdl3e2c;
|
|
227
|
+
}), 1);
|
|
228
|
+
template_u1.slot(element_0qdl3e2a, arrow(-1));
|
|
229
|
+
template_u1.slot(element_0qdl3e2b, arrow(1), 2);
|
|
230
|
+
return root_0qdl3e26;
|
|
231
|
+
})();
|
|
232
|
+
}
|
|
233
|
+
export default Object.assign(template, { arrow: SNAP_CAROUSEL_ARROW, card: SNAP_CAROUSEL_CARD });
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer components {.snap-carousel{--arrow-background:var(--color-grey-400);--arrow-box-shadow:var(--shadow-raised);--arrow-color:var(--color-text-500);--arrow-disabled-opacity:.4;--arrow-pressed-scale:.96;--arrow-size:40px;--card-background:var(--color-grey-400);--card-border-radius:24px;--card-box-shadow:var(--shadow-raised);--card-gap:var(--size-400);--card-height:200px;--card-padding:24px;--card-width:280px;--fade:32px;--focus-opacity:.5;--focus-ring-color:oklch(from var(--color-text-500) l c h / .38);--focus-scale:.9;--max-width:520px;--shadow-raised:0 0 0 var(--border-width-400) oklch(from var(--color-black-500) l c h / .06), 0 1px 2px oklch(from var(--color-black-500) l c h / .06), 0 6px 16px -6px oklch(from var(--color-black-500) l c h / .12);--text-color:var(--color-text-300);--text-font-size:14px;--title-color:var(--color-text-500);--title-font-size:15px;--title-font-weight:500;--visual-height:68px;max-width:100%;width:var(--max-width);flex-direction:column;align-items:center;gap:12px;display:flex}.snap-carousel-arrow{background:var(--arrow-background);box-shadow:var(--arrow-box-shadow);color:var(--arrow-color);cursor:pointer;height:var(--arrow-size);touch-action:manipulation;-webkit-user-select:none;user-select:none;width:var(--arrow-size);border:0;border-radius:999px;outline:none;justify-content:center;align-items:center;padding:0;transition:opacity .15s ease-out,scale .15s ease-out;display:flex}.snap-carousel-arrow svg{width:20px;height:20px}.snap-carousel-arrow:focus-visible{outline:2px solid var(--focus-ring-color);outline-offset:2px}.snap-carousel-arrow:not(.--disabled):active{scale:var(--arrow-pressed-scale)}.snap-carousel-arrow.--disabled{cursor:default;opacity:var(--arrow-disabled-opacity)}.snap-carousel-card{background:var(--card-background);border-radius:var(--card-border-radius);box-shadow:var(--card-box-shadow);box-sizing:border-box;height:var(--card-height);padding:var(--card-padding);width:var(--card-width);flex-direction:column;justify-content:flex-end;gap:6px;display:flex}.snap-carousel-controls{gap:12px;display:flex}.snap-carousel-slide{scroll-snap-align:center;flex-shrink:0}.snap-carousel-text{color:var(--text-color);font-size:var(--text-font-size);text-wrap:pretty;margin:0;line-height:22px}.snap-carousel-title{color:var(--title-color);font-size:var(--title-font-size);font-weight:var(--title-font-weight);margin:0}.snap-carousel-track{cursor:grab;gap:var(--card-gap);-webkit-mask-image:linear-gradient(to right, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);-webkit-mask-image:linear-gradient(to right, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);mask-image:linear-gradient(to right, transparent, #000 var(--fade), #000 calc(100% - var(--fade)), transparent);overscroll-behavior-x:contain;padding:var(--size-400) calc((100% - var(--card-width)) / 2);scroll-snap-type:x mandatory;scrollbar-width:none;outline:none;display:flex;position:relative;overflow-x:auto}.snap-carousel-track::-webkit-scrollbar{display:none}.snap-carousel-track.--dragging{cursor:grabbing;-webkit-user-select:none;user-select:none}.snap-carousel-viewport{border-radius:var(--card-border-radius);width:100%}.snap-carousel-viewport:has(:focus-visible){outline:2px solid var(--focus-ring-color);outline-offset:2px}.snap-carousel-visual{height:var(--visual-height);width:100%;margin-bottom:auto;position:relative}.snap-carousel-visual *{animation-play-state:paused}.snap-carousel.--visible .snap-carousel-slide.--active .snap-carousel-visual *{animation-play-state:running}@supports (animation-timeline:view()){.snap-carousel-card{animation:linear both snap-carousel-focus;animation-timeline:view(inline)}}@media (prefers-reduced-motion:reduce){.snap-carousel{--focus-scale:1}.snap-carousel-arrow{transition:opacity .15s ease-out}.snap-carousel-visual *{animation:none!important}}@keyframes snap-carousel-focus{0%,to{opacity:var(--focus-opacity);scale:var(--focus-scale)}50%{opacity:1;scale:1}}}
|
|
2
|
+
/*$vite$:1*/
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { Attributes } from '@esportsplus/template';
|
|
2
|
+
import './scss/index.scss';
|
|
3
|
+
type Options = {
|
|
4
|
+
group?: string;
|
|
5
|
+
handle?: string;
|
|
6
|
+
onsort?: (item: HTMLElement, from: number, to: number, source: HTMLElement, target: HTMLElement) => void;
|
|
7
|
+
};
|
|
8
|
+
export default _default;
|
|
9
|
+
declare function _default({ group, handle, onsort }?: Options): Attributes;
|
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import './scss/index.scss';
|
|
2
|
+
const DELAY = 180;
|
|
3
|
+
const DROP = { duration: 260, easing: 'cubic-bezier(0.34, 1.3, 0.64, 1)', fill: 'forwards' };
|
|
4
|
+
const ENTER = 0.15;
|
|
5
|
+
const HANG = 0.5;
|
|
6
|
+
const SHIFT = { composite: 'add', duration: 220, easing: 'cubic-bezier(0.2, 0, 0, 1)' };
|
|
7
|
+
const SMOOTHING = 0.04;
|
|
8
|
+
const THRESHOLD = 4;
|
|
9
|
+
function child(container, node) {
|
|
10
|
+
while (node && node.parentNode !== container) {
|
|
11
|
+
node = node.parentNode;
|
|
12
|
+
}
|
|
13
|
+
return node instanceof HTMLElement ? node : null;
|
|
14
|
+
}
|
|
15
|
+
function drag(container, item, e, { group, onsort }) {
|
|
16
|
+
let animations = new Map(), baseLeft = 0, baseTop = 0, containers = group
|
|
17
|
+
? Array.from(document.querySelectorAll(`.sortable[data-sortable-group="${CSS.escape(group)}"]`))
|
|
18
|
+
: [container], cssText = '', frame = 0, from = index(item), layout = new Map(), originX = e.clientX, originY = e.clientY, placeholder = null, pointer = e.pointerId, previousX = e.clientX, previousY = e.clientY, reduced = matchMedia('(prefers-reduced-motion: reduce)').matches, swing = null, time = 0, touch = e.pointerType === 'touch', timer = touch ? setTimeout(activate, DELAY) : undefined, x = e.clientX, y = e.clientY;
|
|
19
|
+
function activate() {
|
|
20
|
+
clearTimeout(timer);
|
|
21
|
+
let rect = item.getBoundingClientRect(), computed = getComputedStyle(item), style = item.style;
|
|
22
|
+
placeholder = document.createElement('div');
|
|
23
|
+
placeholder.className = 'sortable-placeholder';
|
|
24
|
+
placeholder.style.cssText = `
|
|
25
|
+
--radius: ${computed.borderRadius};
|
|
26
|
+
grid-column: ${computed.gridColumn};
|
|
27
|
+
grid-row: ${computed.gridRow};
|
|
28
|
+
height: ${rect.height}px;
|
|
29
|
+
margin: ${computed.margin};
|
|
30
|
+
width: ${rect.width}px;
|
|
31
|
+
`;
|
|
32
|
+
baseLeft = rect.left;
|
|
33
|
+
baseTop = rect.top;
|
|
34
|
+
cssText = style.cssText;
|
|
35
|
+
swing = reduced ? null : inertia(computed, rect, originX - rect.left, originY - rect.top);
|
|
36
|
+
reflow(() => {
|
|
37
|
+
item.before(placeholder);
|
|
38
|
+
style.boxSizing = 'border-box';
|
|
39
|
+
style.height = `${rect.height}px`;
|
|
40
|
+
style.left = `${rect.left}px`;
|
|
41
|
+
style.margin = '0';
|
|
42
|
+
style.position = 'fixed';
|
|
43
|
+
style.top = `${rect.top}px`;
|
|
44
|
+
style.transformOrigin = `${originX - rect.left}px ${originY - rect.top}px`;
|
|
45
|
+
style.width = `${rect.width}px`;
|
|
46
|
+
let moved = item.getBoundingClientRect();
|
|
47
|
+
style.left = `${rect.left * 2 - moved.left}px`;
|
|
48
|
+
style.top = `${rect.top * 2 - moved.top}px`;
|
|
49
|
+
for (let i = 0, n = containers.length; i < n; i++) {
|
|
50
|
+
containers[i].classList.add('--active');
|
|
51
|
+
}
|
|
52
|
+
item.classList.add('--dragging');
|
|
53
|
+
});
|
|
54
|
+
getSelection()?.removeAllRanges();
|
|
55
|
+
frame = requestAnimationFrame(tick);
|
|
56
|
+
}
|
|
57
|
+
function cleanup() {
|
|
58
|
+
cancelAnimationFrame(frame);
|
|
59
|
+
clearTimeout(timer);
|
|
60
|
+
document.removeEventListener('contextmenu', prevent);
|
|
61
|
+
document.removeEventListener('dragstart', prevent);
|
|
62
|
+
document.removeEventListener('pointercancel', release);
|
|
63
|
+
document.removeEventListener('pointermove', move);
|
|
64
|
+
document.removeEventListener('pointerup', release);
|
|
65
|
+
document.removeEventListener('selectstart', prevent);
|
|
66
|
+
document.removeEventListener('touchmove', scroll);
|
|
67
|
+
}
|
|
68
|
+
function drop() {
|
|
69
|
+
let slot = placeholder, style = item.style;
|
|
70
|
+
cleanup();
|
|
71
|
+
animations.get(slot)?.finish();
|
|
72
|
+
let { rotate, scale, translate } = getComputedStyle(item), target = slot.getBoundingClientRect();
|
|
73
|
+
item.classList.add('--dropping');
|
|
74
|
+
let animation = item.animate([
|
|
75
|
+
{ rotate, scale, transform: style.transform, translate },
|
|
76
|
+
{ rotate: '0deg', scale: '1', transform: `translate3d(${target.left - baseLeft}px, ${target.top - baseTop}px, 0)`, translate: '0px 0px' }
|
|
77
|
+
], DROP);
|
|
78
|
+
animation.onfinish = () => {
|
|
79
|
+
style.cssText = cssText;
|
|
80
|
+
slot.replaceWith(item);
|
|
81
|
+
item.classList.remove('--dragging', '--dropping');
|
|
82
|
+
animation.cancel();
|
|
83
|
+
for (let i = 0, n = containers.length; i < n; i++) {
|
|
84
|
+
containers[i].classList.remove('--active');
|
|
85
|
+
}
|
|
86
|
+
let target = item.parentElement, to = index(item);
|
|
87
|
+
if (onsort && (to !== from || target !== container)) {
|
|
88
|
+
onsort(item, from, to, container, target);
|
|
89
|
+
}
|
|
90
|
+
};
|
|
91
|
+
addEventListener('click', swallow, true);
|
|
92
|
+
setTimeout(() => removeEventListener('click', swallow, true));
|
|
93
|
+
}
|
|
94
|
+
function enter(target) {
|
|
95
|
+
let distance = Infinity, nearest = null;
|
|
96
|
+
for (let element of target.children) {
|
|
97
|
+
if (element === item || element === placeholder) {
|
|
98
|
+
continue;
|
|
99
|
+
}
|
|
100
|
+
let rect = element.getBoundingClientRect(), d = Math.hypot(Math.max(rect.left - x, 0, x - rect.right), Math.max(rect.top - y, 0, y - rect.bottom));
|
|
101
|
+
if (d < distance) {
|
|
102
|
+
distance = d;
|
|
103
|
+
nearest = element;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
if (!nearest) {
|
|
107
|
+
target.append(placeholder);
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
let rect = nearest.getBoundingClientRect(), row = false;
|
|
111
|
+
for (let element of target.children) {
|
|
112
|
+
if (element === item || element === nearest || element === placeholder) {
|
|
113
|
+
continue;
|
|
114
|
+
}
|
|
115
|
+
let other = element.getBoundingClientRect();
|
|
116
|
+
if (other.top < rect.bottom && other.bottom > rect.top) {
|
|
117
|
+
row = true;
|
|
118
|
+
break;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
if (row ? x > rect.left + rect.width / 2 : y > rect.top + rect.height / 2) {
|
|
122
|
+
nearest.after(placeholder);
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
nearest.before(placeholder);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
function move(e) {
|
|
129
|
+
if (e.pointerId !== pointer) {
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
x = e.clientX;
|
|
133
|
+
y = e.clientY;
|
|
134
|
+
if (placeholder || Math.hypot(x - originX, y - originY) < THRESHOLD) {
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (touch) {
|
|
138
|
+
cleanup();
|
|
139
|
+
}
|
|
140
|
+
else {
|
|
141
|
+
activate();
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
function over() {
|
|
145
|
+
if (containers.length === 1) {
|
|
146
|
+
return container;
|
|
147
|
+
}
|
|
148
|
+
for (let i = 0, n = containers.length; i < n; i++) {
|
|
149
|
+
let rect = containers[i].getBoundingClientRect();
|
|
150
|
+
if (x >= rect.left && x <= rect.right && y >= rect.top && y <= rect.bottom) {
|
|
151
|
+
return containers[i];
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
return null;
|
|
155
|
+
}
|
|
156
|
+
function reflow(mutate) {
|
|
157
|
+
let first = new Map();
|
|
158
|
+
for (let i = 0, n = containers.length; i < n; i++) {
|
|
159
|
+
for (let element of containers[i].children) {
|
|
160
|
+
if (element !== item) {
|
|
161
|
+
first.set(element, element.getBoundingClientRect());
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
mutate();
|
|
166
|
+
for (let animation of animations.values()) {
|
|
167
|
+
animation.cancel();
|
|
168
|
+
}
|
|
169
|
+
animations.clear();
|
|
170
|
+
layout.clear();
|
|
171
|
+
for (let i = 0, n = containers.length; i < n; i++) {
|
|
172
|
+
let parent = containers[i], bounds = parent.getBoundingClientRect(), left = bounds.left - parent.scrollLeft, top = bounds.top - parent.scrollTop;
|
|
173
|
+
for (let element of parent.children) {
|
|
174
|
+
if (element === item || !(element instanceof HTMLElement)) {
|
|
175
|
+
continue;
|
|
176
|
+
}
|
|
177
|
+
let rect = element.getBoundingClientRect(), start = first.get(element);
|
|
178
|
+
layout.set(element, {
|
|
179
|
+
bottom: rect.bottom - top,
|
|
180
|
+
container: parent,
|
|
181
|
+
left: rect.left - left,
|
|
182
|
+
right: rect.right - left,
|
|
183
|
+
top: rect.top - top
|
|
184
|
+
});
|
|
185
|
+
if (!start || reduced || (start.left === rect.left && start.top === rect.top)) {
|
|
186
|
+
continue;
|
|
187
|
+
}
|
|
188
|
+
animations.set(element, element.animate([
|
|
189
|
+
{ translate: `${start.left - rect.left}px ${start.top - rect.top}px` },
|
|
190
|
+
{ translate: '0px 0px' }
|
|
191
|
+
], SHIFT));
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
function release(e) {
|
|
196
|
+
if (e.pointerId !== pointer) {
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
if (placeholder) {
|
|
200
|
+
drop();
|
|
201
|
+
}
|
|
202
|
+
else {
|
|
203
|
+
cleanup();
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
function scroll(e) {
|
|
207
|
+
if (placeholder) {
|
|
208
|
+
e.preventDefault();
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
function sort() {
|
|
212
|
+
let slot = layout.get(placeholder), target = over();
|
|
213
|
+
if (!slot || !target) {
|
|
214
|
+
return;
|
|
215
|
+
}
|
|
216
|
+
if (target !== slot.container) {
|
|
217
|
+
reflow(() => enter(target));
|
|
218
|
+
return;
|
|
219
|
+
}
|
|
220
|
+
let bounds = target.getBoundingClientRect(), left = x - bounds.left + target.scrollLeft, top = y - bounds.top + target.scrollTop;
|
|
221
|
+
for (let [element, rect] of layout) {
|
|
222
|
+
if (element === placeholder ||
|
|
223
|
+
rect.container !== target ||
|
|
224
|
+
left < rect.left ||
|
|
225
|
+
left > rect.right ||
|
|
226
|
+
top < rect.top ||
|
|
227
|
+
top > rect.bottom) {
|
|
228
|
+
continue;
|
|
229
|
+
}
|
|
230
|
+
let row = rect.top < slot.bottom && rect.bottom > slot.top, depth = row
|
|
231
|
+
? (rect.left > slot.left ? left - rect.left : rect.right - left)
|
|
232
|
+
: (rect.top > slot.top ? top - rect.top : rect.bottom - top), size = row ? rect.right - rect.left : rect.bottom - rect.top;
|
|
233
|
+
if (depth > Math.max(0, (size - (row ? slot.right - slot.left : slot.bottom - slot.top)) / 2) + size * ENTER) {
|
|
234
|
+
reflow(() => {
|
|
235
|
+
if (placeholder.compareDocumentPosition(element) & Node.DOCUMENT_POSITION_FOLLOWING) {
|
|
236
|
+
element.after(placeholder);
|
|
237
|
+
}
|
|
238
|
+
else {
|
|
239
|
+
element.before(placeholder);
|
|
240
|
+
}
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
function tick(now) {
|
|
247
|
+
frame = requestAnimationFrame(tick);
|
|
248
|
+
let dt = time ? Math.min((now - time) / 1000, 1 / 30) : 0, angle = swing ? swing(x - previousX, y - previousY, dt) : 0;
|
|
249
|
+
previousX = x;
|
|
250
|
+
previousY = y;
|
|
251
|
+
time = now;
|
|
252
|
+
item.style.transform = `translate3d(${x - originX}px, ${y - originY}px, 0) rotate(${angle}deg)`;
|
|
253
|
+
sort();
|
|
254
|
+
}
|
|
255
|
+
document.addEventListener('contextmenu', prevent);
|
|
256
|
+
document.addEventListener('dragstart', prevent);
|
|
257
|
+
document.addEventListener('pointercancel', release);
|
|
258
|
+
document.addEventListener('pointermove', move);
|
|
259
|
+
document.addEventListener('pointerup', release);
|
|
260
|
+
document.addEventListener('selectstart', prevent);
|
|
261
|
+
document.addEventListener('touchmove', scroll, { passive: false });
|
|
262
|
+
}
|
|
263
|
+
function index(element) {
|
|
264
|
+
return Array.prototype.indexOf.call(element.parentElement.children, element);
|
|
265
|
+
}
|
|
266
|
+
function inertia(computed, rect, grabX, grabY) {
|
|
267
|
+
let angle = 0, damping = parseFloat(computed.getPropertyValue('--swing-damping')), max = parseFloat(computed.getPropertyValue('--swing-angle')), size = Math.max(rect.width, rect.height), leverX = (rect.width / 2 - grabX) / size, leverY = (rect.height / 2 - grabY) / size + HANG, spin = 0, stiffness = parseFloat(computed.getPropertyValue('--swing-stiffness')), strength = parseFloat(computed.getPropertyValue('--swing-strength')), vx = 0, vy = 0;
|
|
268
|
+
return (dx, dy, dt) => {
|
|
269
|
+
if (dt <= 0) {
|
|
270
|
+
return angle;
|
|
271
|
+
}
|
|
272
|
+
let smoothing = 1 - Math.exp(-dt / SMOOTHING);
|
|
273
|
+
vx += (dx / dt - vx) * smoothing;
|
|
274
|
+
vy += (dy / dt - vy) * smoothing;
|
|
275
|
+
let lean = Math.max(-max, Math.min(max, (leverY * vx - leverX * vy) * strength));
|
|
276
|
+
spin += (stiffness * (lean - angle) - damping * spin) * dt;
|
|
277
|
+
angle += spin * dt;
|
|
278
|
+
return angle;
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
function prevent(e) {
|
|
282
|
+
e.preventDefault();
|
|
283
|
+
}
|
|
284
|
+
function swallow(e) {
|
|
285
|
+
e.preventDefault();
|
|
286
|
+
e.stopPropagation();
|
|
287
|
+
}
|
|
288
|
+
export default ({ group, handle, onsort } = {}) => ({
|
|
289
|
+
class: 'sortable',
|
|
290
|
+
...(group && { 'data-sortable-group': group }),
|
|
291
|
+
onpointerdown: (e) => {
|
|
292
|
+
let container = e.currentTarget;
|
|
293
|
+
if (e.button !== 0 || !e.isPrimary || container.classList.contains('--active')) {
|
|
294
|
+
return;
|
|
295
|
+
}
|
|
296
|
+
let item = child(container, e.target);
|
|
297
|
+
if (!item || (handle && !item.contains(e.target.closest(handle)))) {
|
|
298
|
+
return;
|
|
299
|
+
}
|
|
300
|
+
drag(container, item, e, { group, onsort });
|
|
301
|
+
}
|
|
302
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer components {.sortable{--drag-animation:none;--drag-box-shadow:var(--box-shadow-400);--drag-scale:1.06;--drag-z-index:9999;--overlay-transition-duration:.16s;--placeholder-background:transparent;--placeholder-border-color:var(--color-border-500);--placeholder-border-width:var(--border-width-400);--swing-angle:8deg;--swing-damping:11;--swing-stiffness:260;--swing-strength:.006}.sortable--bouncy{--swing-angle:10deg;--swing-damping:6;--swing-stiffness:300;--swing-strength:.007}.sortable--damped{--swing-angle:6deg;--swing-damping:32;--swing-stiffness:260;--swing-strength:.006}.sortable--floppy{--swing-angle:14deg;--swing-damping:4;--swing-stiffness:120;--swing-strength:.01}.sortable--heavy{--swing-angle:10deg;--swing-damping:7;--swing-stiffness:90;--swing-strength:.007}.sortable--rigid{--swing-angle:0deg;--swing-damping:11;--swing-stiffness:260;--swing-strength:0}.sortable--snappy{--swing-angle:6deg;--swing-damping:18;--swing-stiffness:600;--swing-strength:.005}.sortable--subtle{--swing-angle:4deg;--swing-damping:16;--swing-stiffness:300;--swing-strength:.003}.sortable--wobbly{--swing-angle:8deg;--swing-damping:5;--swing-stiffness:700;--swing-strength:.006}.sortable--breathe{--drag-animation:sortable-breathe 1.8s ease-in-out infinite alternate}.sortable--drift{--drag-animation:sortable-sway 1.9s ease-in-out infinite alternate, sortable-float 1.3s ease-in-out infinite alternate}.sortable--float{--drag-animation:sortable-float 1.6s ease-in-out infinite alternate}.sortable--heartbeat{--drag-animation:sortable-heartbeat 1.4s ease-in-out infinite}.sortable--jelly{--drag-animation:sortable-jelly .5s ease-in-out infinite alternate}.sortable--jiggle{--drag-animation:sortable-jiggle .28s linear infinite}.sortable--orbit{--drag-animation:sortable-orbit 1.6s linear infinite}.sortable--pop{--drag-animation:sortable-pop .45s cubic-bezier(.3, 0, .3, 1)}.sortable--settle{--drag-animation:sortable-settle .9s ease-out}.sortable--shimmy{--drag-animation:sortable-shimmy 90ms linear infinite alternate}.sortable--sway{--drag-animation:sortable-sway 1.4s ease-in-out infinite alternate}.sortable--tremble{--drag-animation:sortable-tremble .4s linear infinite}.sortable--wiggle{--drag-animation:sortable-wiggle .16s ease-in-out infinite alternate}.sortable>*{-webkit-touch-callout:none}.sortable>.--dragging{cursor:grabbing;transition:box-shadow var(--transition-duration) var(--transition-timing-function), scale var(--transition-duration) var(--transition-timing-function);will-change:transform;z-index:var(--drag-z-index)}.sortable>.--dragging:not(.--dropping){animation:var(--drag-animation);box-shadow:var(--drag-box-shadow);scale:var(--drag-scale)}.sortable.--active{-webkit-user-select:none;user-select:none}.sortable-overlay{background:inherit;border-radius:inherit;opacity:0;pointer-events:none;transition:display var(--overlay-transition-duration) allow-discrete, opacity var(--overlay-transition-duration) var(--transition-timing-function);z-index:1;justify-content:center;align-items:center;display:none;position:absolute;inset:0}.sortable>.--dragging .sortable-overlay{opacity:1;display:flex}@starting-style{.sortable>.--dragging .sortable-overlay{opacity:0}}.sortable>.--dropping .sortable-overlay{opacity:0}.sortable-placeholder{background:var(--placeholder-background);border:var(--placeholder-border-width) dashed var(--placeholder-border-color);border-radius:var(--radius);box-sizing:border-box;pointer-events:none;transition:opacity var(--transition-duration) var(--transition-timing-function), scale var(--transition-duration) var(--transition-timing-function);flex:none}@starting-style{.sortable-placeholder{opacity:0;scale:.9}}@keyframes sortable-breathe{0%{scale:var(--drag-scale)}to{scale:calc(var(--drag-scale) * 1.025)}}@keyframes sortable-float{0%{translate:0}to{translate:0 -2px}}@keyframes sortable-heartbeat{0%,28%,70%,to{scale:var(--drag-scale)}14%,42%{scale:calc(var(--drag-scale) * 1.03)}}@keyframes sortable-jelly{0%{scale:calc(var(--drag-scale) * 1.02) calc(var(--drag-scale) * .98)}to{scale:calc(var(--drag-scale) * .98) calc(var(--drag-scale) * 1.02)}}@keyframes sortable-jiggle{0%,to{translate:0 .3px;rotate:-.7deg}25%{translate:.3px;rotate:.5deg}50%{translate:0 -.3px;rotate:.7deg}75%{translate:-.3px;rotate:-.5deg}}@keyframes sortable-orbit{0%,to{translate:1.2px}12.5%{translate:.85px .85px}25%{translate:0 1.2px}37.5%{translate:-.85px .85px}50%{translate:-1.2px}62.5%{translate:-.85px -.85px}75%{translate:0 -1.2px}87.5%{translate:.85px -.85px}}@keyframes sortable-pop{0%{scale:1}45%{scale:calc(var(--drag-scale) * 1.06)}75%{scale:calc(var(--drag-scale) * .98)}to{scale:var(--drag-scale)}}@keyframes sortable-settle{0%,to{rotate:0deg}15%{rotate:3deg}30%{rotate:-2deg}45%{rotate:1.2deg}60%{rotate:-.6deg}75%{rotate:.25deg}}@keyframes sortable-shimmy{0%{translate:-.6px}to{translate:.6px}}@keyframes sortable-sway{0%{rotate:-1.2deg}to{rotate:1.2deg}}@keyframes sortable-tremble{0%,to{translate:0;rotate:0deg}20%{translate:-.4px .3px;rotate:-.3deg}40%{translate:.5px -.2px;rotate:.2deg}60%{translate:-.2px -.4px;rotate:-.1deg}80%{translate:.3px .4px;rotate:.3deg}}@keyframes sortable-wiggle{0%{rotate:-.6deg}to{rotate:.6deg}}@media (prefers-reduced-motion:reduce){.sortable>.--dragging:not(.--dropping){animation:none}}}
|
|
2
|
+
/*$vite$:1*/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type Attributes } from '@esportsplus/template';
|
|
2
|
+
import './scss/index.scss';
|
|
3
|
+
type A = Attributes & {
|
|
4
|
+
[SPARKLINE_PLOT]?: Attributes;
|
|
5
|
+
data: Point[];
|
|
6
|
+
format?: (value: number) => string;
|
|
7
|
+
state?: State;
|
|
8
|
+
title: string;
|
|
9
|
+
};
|
|
10
|
+
type Point = {
|
|
11
|
+
label: string;
|
|
12
|
+
value: number;
|
|
13
|
+
};
|
|
14
|
+
type State = {
|
|
15
|
+
active: boolean;
|
|
16
|
+
index: number;
|
|
17
|
+
};
|
|
18
|
+
declare const SPARKLINE_PLOT: unique symbol;
|
|
19
|
+
declare function template(this: {
|
|
20
|
+
attributes?: Partial<A>;
|
|
21
|
+
} | void, { data, format, state, title, ...attributes }: A): DocumentFragment | Text;
|
|
22
|
+
declare const _default: typeof template & {
|
|
23
|
+
readonly plot: typeof SPARKLINE_PLOT;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|
|
26
|
+
export type { Point as SparklinePoint, State as SparklineState };
|