@esportsplus/ui 0.55.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 +2158 -717
- package/build/components/accordion/index.js +12 -9
- 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 +1441 -11
- package/build/components/checkbox/index.js +50 -52
- 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 +19 -25
- 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 +53 -26
- 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.js +8 -8
- 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 +11 -11
- 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-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 +7 -5
- package/build/components/select/index.js +40 -38
- 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/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 +14 -13
- 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 +4 -0
- package/build/components/tooltip/index.js +3 -1
- package/build/components/tooltip/menu.d.ts +17 -8
- package/build/components/tooltip/menu.js +14 -31
- package/build/components/tooltip/onclick.d.ts +22 -713
- package/build/components/tooltip/onclick.js +38 -18
- package/build/components/tooltip/onhover.d.ts +23 -713
- package/build/components/tooltip/onhover.js +89 -13
- 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 +6 -2
- package/build/themes/dark/select.js +2 -2
- 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 +7 -1
- package/src/components/accordion/more.ts +97 -0
- package/src/components/accordion/scss/index.scss +141 -0
- 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 +16 -13
- 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 +19 -25
- 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 +56 -9
- 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/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 +9 -2
- 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-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 +12 -5
- 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/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 +6 -3
- 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 +3 -1
- package/src/components/tooltip/menu.ts +25 -31
- package/src/components/tooltip/onclick.ts +62 -24
- package/src/components/tooltip/onhover.ts +148 -18
- 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 +2 -2
- 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/checkbox/constants.d.ts +0 -2
- package/build/components/checkbox/constants.js +0 -2
- package/build/components/clipboard/onclick.d.ts +0 -10
- package/build/components/clipboard/onclick.js +0 -36
- package/build/components/select/constants.d.ts +0 -4
- package/build/components/select/constants.js +0 -4
- package/build/components/tooltip/constants.d.ts +0 -3
- package/build/components/tooltip/constants.js +0 -3
- package/src/components/border/scss/index.scss +0 -17
- package/src/components/border/scss/variables.scss +0 -6
- package/src/components/checkbox/constants.ts +0 -4
- package/src/components/clipboard/onclick.ts +0 -35
- package/src/components/select/constants.ts +0 -8
- package/src/components/tooltip/constants.ts +0 -6
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
2
|
-
import * as
|
|
2
|
+
import * as template_u1 from '@esportsplus/template';
|
|
3
3
|
import { component } from '@esportsplus/template';
|
|
4
|
+
import more from './more.js';
|
|
4
5
|
import './scss/index.scss';
|
|
5
|
-
const
|
|
6
|
+
const template_04mlrpv2 = template_u1.template(`<div class='accordion'><div class='accordion-content'>`);
|
|
6
7
|
class ReactiveObject_04mlrpv0 extends reactivity_u0.ReactiveObject {
|
|
7
8
|
#active = this[reactivity_u0.SIGNAL](false);
|
|
8
9
|
constructor() {
|
|
@@ -15,13 +16,15 @@ class ReactiveObject_04mlrpv0 extends reactivity_u0.ReactiveObject {
|
|
|
15
16
|
reactivity_u0.write(this.#active, _v0);
|
|
16
17
|
}
|
|
17
18
|
}
|
|
18
|
-
|
|
19
|
+
const base = component(function ({ state = new ReactiveObject_04mlrpv0(), ...attributes }, content) {
|
|
19
20
|
return (() => {
|
|
20
|
-
let
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
return
|
|
21
|
+
let root_04mlrpv1 = template_04mlrpv2(), element_04mlrpv3 = root_04mlrpv1.firstChild, element_04mlrpv4 = element_04mlrpv3.firstElementChild;
|
|
22
|
+
template_u1.setProperties(element_04mlrpv3, attributes);
|
|
23
|
+
template_u1.setList(element_04mlrpv3, 'class', () => state.active && '--active');
|
|
24
|
+
template_u1.setProperty(element_04mlrpv3, 'inert', () => !state.active);
|
|
25
|
+
template_u1.slot(element_04mlrpv4, content, 1);
|
|
26
|
+
return root_04mlrpv1;
|
|
26
27
|
})();
|
|
27
28
|
});
|
|
29
|
+
const accordion = Object.assign(base, { more });
|
|
30
|
+
export default accordion;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import * as template_u1 from '@esportsplus/template';
|
|
2
|
+
import { type Attributes, type Renderable } from '@esportsplus/template';
|
|
3
|
+
declare const MORE_TRIGGER: unique symbol;
|
|
4
|
+
type A = Attributes & {
|
|
5
|
+
[MORE_TRIGGER]?: Attributes;
|
|
6
|
+
label?: string;
|
|
7
|
+
less?: Renderable<unknown>;
|
|
8
|
+
lines?: number;
|
|
9
|
+
maxHeight?: number;
|
|
10
|
+
more?: Renderable<unknown>;
|
|
11
|
+
onconnect?: never;
|
|
12
|
+
ondisconnect?: never;
|
|
13
|
+
state?: {
|
|
14
|
+
active: boolean;
|
|
15
|
+
};
|
|
16
|
+
};
|
|
17
|
+
declare const _default: template_u1.Factory<A, Renderable<any>, Renderable<any>, {
|
|
18
|
+
readonly trigger: typeof MORE_TRIGGER;
|
|
19
|
+
}>;
|
|
20
|
+
export default _default;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
2
|
+
import * as template_u1 from '@esportsplus/template';
|
|
3
|
+
import { component } from '@esportsplus/template';
|
|
4
|
+
const template_1u70dx03 = template_u1.template(`<div class='accordion-more '><div class='accordion-more-content'><div class='accordion-more-body'></div></div><button class='accordion-more-trigger' type='button'><span class='accordion-more-trigger-label'><span></span><span></span></span><svg class='accordion-more-trigger-icon' aria-hidden='true' viewBox='0 0 12 12'><path d='M3 4.5 6 7.5 9 4.5' />`);
|
|
5
|
+
class ReactiveObject_1u70dx00 extends reactivity_u0.ReactiveObject {
|
|
6
|
+
#active = this[reactivity_u0.SIGNAL](false);
|
|
7
|
+
constructor() {
|
|
8
|
+
super(null);
|
|
9
|
+
}
|
|
10
|
+
get active() {
|
|
11
|
+
return reactivity_u0.read(this.#active);
|
|
12
|
+
}
|
|
13
|
+
set active(_v0) {
|
|
14
|
+
reactivity_u0.write(this.#active, _v0);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
class ReactiveObject_1u70dx01 extends reactivity_u0.ReactiveObject {
|
|
18
|
+
#clamped = this[reactivity_u0.SIGNAL](false);
|
|
19
|
+
#height = this[reactivity_u0.SIGNAL](0);
|
|
20
|
+
constructor() {
|
|
21
|
+
super(null);
|
|
22
|
+
}
|
|
23
|
+
get clamped() {
|
|
24
|
+
return reactivity_u0.read(this.#clamped);
|
|
25
|
+
}
|
|
26
|
+
set clamped(_v0) {
|
|
27
|
+
reactivity_u0.write(this.#clamped, _v0);
|
|
28
|
+
}
|
|
29
|
+
get height() {
|
|
30
|
+
return reactivity_u0.read(this.#height);
|
|
31
|
+
}
|
|
32
|
+
set height(_v1) {
|
|
33
|
+
reactivity_u0.write(this.#height, _v1);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const MORE_TRIGGER = Symbol.for('@esportsplus/ui/accordion.more.trigger');
|
|
37
|
+
export default component(({ label = 'Expanded content', less = 'Show less', lines = 3, maxHeight = 320, more = 'Show more', state = new ReactiveObject_1u70dx00(), ...attributes }, content) => {
|
|
38
|
+
let id = `accordion-more-${crypto.randomUUID()}`, measured = new ReactiveObject_1u70dx01(), observer, scrollable = () => state.active && measured.height > maxHeight;
|
|
39
|
+
return (() => {
|
|
40
|
+
let root_1u70dx02 = template_1u70dx03(), element_1u70dx04 = root_1u70dx02.firstChild, element_1u70dx05 = element_1u70dx04.firstElementChild, element_1u70dx06 = element_1u70dx05.firstElementChild, element_1u70dx07 = element_1u70dx05.nextElementSibling, element_1u70dx08 = element_1u70dx07.firstElementChild.firstElementChild, element_1u70dx09 = element_1u70dx08.nextElementSibling;
|
|
41
|
+
template_u1.setList(element_1u70dx04, 'class', () => state.active && '--active');
|
|
42
|
+
template_u1.setList(element_1u70dx04, 'class', () => measured.clamped && '--clamped');
|
|
43
|
+
template_u1.setList(element_1u70dx04, 'class', () => scrollable() && '--scrollable');
|
|
44
|
+
template_u1.setProperties(element_1u70dx04, attributes);
|
|
45
|
+
template_u1.onconnect(element_1u70dx04, (element) => {
|
|
46
|
+
let body = element.querySelector('.accordion-more-body');
|
|
47
|
+
observer = new ResizeObserver(() => {
|
|
48
|
+
let computed = getComputedStyle(body), height = body.offsetHeight, line = parseFloat(computed.lineHeight) || parseFloat(computed.fontSize) * 1.2;
|
|
49
|
+
measured.clamped = height > Math.ceil(line * lines);
|
|
50
|
+
measured.height = height;
|
|
51
|
+
});
|
|
52
|
+
observer.observe(body);
|
|
53
|
+
});
|
|
54
|
+
template_u1.ondisconnect(element_1u70dx04, () => {
|
|
55
|
+
observer?.disconnect();
|
|
56
|
+
});
|
|
57
|
+
template_u1.setList(element_1u70dx04, 'style', () => `${measured.height ? `--height: ${measured.height}px; ` : ''}--lines: ${lines}; --max-height: ${maxHeight}px;`);
|
|
58
|
+
template_u1.setProperty(element_1u70dx05, 'id', id);
|
|
59
|
+
template_u1.setProperty(element_1u70dx05, 'aria-label', () => scrollable() && label);
|
|
60
|
+
template_u1.setProperty(element_1u70dx05, 'role', () => scrollable() && 'region');
|
|
61
|
+
template_u1.setProperty(element_1u70dx05, 'tabindex', () => scrollable() && '0');
|
|
62
|
+
template_u1.slot(element_1u70dx06, content, 1);
|
|
63
|
+
template_u1.setProperty(element_1u70dx07, 'aria-controls', id);
|
|
64
|
+
template_u1.setProperties(element_1u70dx07, attributes[MORE_TRIGGER]);
|
|
65
|
+
template_u1.setProperty(element_1u70dx07, 'aria-expanded', () => state.active ? 'true' : 'false');
|
|
66
|
+
template_u1.setProperty(element_1u70dx07, 'disabled', () => !measured.clamped);
|
|
67
|
+
template_u1.delegate(element_1u70dx07, 'click', () => {
|
|
68
|
+
state.active = !state.active;
|
|
69
|
+
});
|
|
70
|
+
template_u1.setProperty(element_1u70dx08, 'aria-hidden', () => state.active && 'true');
|
|
71
|
+
template_u1.slot(element_1u70dx08, more, 1);
|
|
72
|
+
template_u1.setProperty(element_1u70dx09, 'aria-hidden', () => !state.active && 'true');
|
|
73
|
+
template_u1.slot(element_1u70dx09, less, 1);
|
|
74
|
+
return root_1u70dx02;
|
|
75
|
+
})();
|
|
76
|
+
}, { trigger: MORE_TRIGGER });
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@layer components {.accordion{grid-template-rows:1fr;transition:grid-template-rows .3s;display:grid}.accordion:not(.--active){grid-template-rows:0fr}.accordion-content{min-height:0;overflow:hidden}}
|
|
1
|
+
@layer components {@property --accordion-more-fade{syntax:"<length>";inherits:false;initial-value:0}.accordion{grid-template-rows:1fr;transition:grid-template-rows .3s;display:grid}.accordion:not(.--active){grid-template-rows:0fr}.accordion-content{min-height:0;overflow:hidden}.accordion-more{--fade-size:2lh;--focus-color:var(--color-blue-400);--transition-duration:.48s;--transition-timing-function:cubic-bezier(.22, 1, .36, 1);--trigger-transition-timing-function:cubic-bezier(.34, 1.56, .64, 1);gap:var(--size-300);flex-direction:column;display:flex}.accordion-more-content{--accordion-more-fade:0px;height:min(var(--height,100vh), var(--lines) * 1lh);-webkit-mask-image:linear-gradient(to bottom, #000 calc(100% - var(--accordion-more-fade)), transparent);-webkit-mask-image:linear-gradient(to bottom, #000 calc(100% - var(--accordion-more-fade)), transparent);-webkit-mask-image:linear-gradient(to bottom, #000 calc(100% - var(--accordion-more-fade)), transparent);mask-image:linear-gradient(to bottom, #000 calc(100% - var(--accordion-more-fade)), transparent);transition:--accordion-more-fade calc(var(--transition-duration) / 2) var(--transition-timing-function), height var(--transition-duration) var(--transition-timing-function);overflow:hidden}.accordion-more-content:focus-visible{border-radius:var(--border-radius-300);outline:var(--border-width-400) solid var(--focus-color);outline-offset:var(--size-100)}.accordion-more.--clamped:not(.--active) .accordion-more-content{--accordion-more-fade:var(--fade-size)}.accordion-more.--active .accordion-more-content{height:min(var(--height,var(--max-height)), var(--max-height))}.accordion-more.--scrollable .accordion-more-content{overscroll-behavior:contain;overflow-y:auto}.accordion-more-trigger{border:var(--border-width-400) solid color-mix(in srgb, currentColor 16%, transparent);color:inherit;cursor:pointer;font:inherit;font-size:var(--font-size-300);align-self:flex-start;align-items:center;gap:var(--size-200);padding:var(--size-100) var(--size-300) var(--size-100) var(--size-400);background:0 0;border-radius:999px;transition:background-color .16s,border-color .16s,opacity .16s;display:inline-flex}.accordion-more-trigger:hover{background:color-mix(in srgb, currentColor 6%, transparent);border-color:color-mix(in srgb, currentColor 28%, transparent)}.accordion-more-trigger:focus-visible{outline:var(--border-width-400) solid var(--focus-color);outline-offset:var(--size-100)}.accordion-more-trigger:disabled{opacity:0;pointer-events:none;visibility:hidden}.accordion-more-trigger-icon{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.5px;height:12px;transition:rotate .4s var(--trigger-transition-timing-function);width:12px}.accordion-more-trigger-label{display:grid}.accordion-more-trigger-label>span{transition:opacity .2s, translate .32s var(--trigger-transition-timing-function);grid-area:1/1}.accordion-more-trigger-label>span:last-child{opacity:0;translate:0 50%}.accordion-more.--active .accordion-more-trigger-icon{rotate:180deg}.accordion-more.--active .accordion-more-trigger-label>span:first-child{opacity:0;translate:0 -50%}.accordion-more.--active .accordion-more-trigger-label>span:last-child{opacity:1;translate:0}@media (prefers-reduced-motion:reduce){.accordion,.accordion-more-content,.accordion-more-trigger-icon,.accordion-more-trigger-label>span{transition:none}}}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@layer components {.anchor{--margin-horizontal:var(--size-400);--margin-vertical:var(--size-400);max-height:calc(var(--max-height,100%) - var(--margin-vertical) * 2);max-width:calc(var(--max-width,100%) - var(--margin-horizontal) * 2);transition:opacity var(--transition-duration) var(--transition-timing-function),
|
|
1
|
+
@layer components {.anchor{--margin-horizontal:var(--size-400);--margin-vertical:var(--size-400);max-height:calc(var(--max-height,100%) - var(--margin-vertical) * 2);max-width:calc(var(--max-width,100%) - var(--margin-horizontal) * 2);transition:opacity var(--transition-duration) var(--transition-timing-function), translate var(--transition-duration) var(--transition-timing-function);z-index:9;position:absolute}.anchor:not(.--active){opacity:0}.anchor:not(.--active),.anchor:not(.--active) *{pointer-events:none}.anchor--n,.anchor--s{right:50%;translate:50%}.anchor--ne,.anchor--nw{top:var(--margin-vertical)}.anchor--se,.anchor--sw{bottom:var(--margin-vertical)}.anchor--ne,.anchor--se{right:var(--margin-horizontal)}.anchor--nw,.anchor--sw{left:var(--margin-horizontal)}.anchor--n{top:var(--margin-vertical)}.anchor--s{bottom:var(--margin-vertical)}}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { type Attributes, type Renderable } from '@esportsplus/template';
|
|
2
|
+
import './scss/index.scss';
|
|
3
|
+
type A = Attributes & {
|
|
4
|
+
[ANNOUNCEMENT_BANNER_CONTENT]?: Attributes;
|
|
5
|
+
[ANNOUNCEMENT_BANNER_DISMISS]?: Attributes;
|
|
6
|
+
icon?: Renderable<unknown>;
|
|
7
|
+
label?: string;
|
|
8
|
+
link?: {
|
|
9
|
+
href: string;
|
|
10
|
+
label: string;
|
|
11
|
+
};
|
|
12
|
+
ondismiss?: () => void;
|
|
13
|
+
state?: State;
|
|
14
|
+
};
|
|
15
|
+
type State = {
|
|
16
|
+
open: boolean;
|
|
17
|
+
};
|
|
18
|
+
declare const ANNOUNCEMENT_BANNER_CONTENT: unique symbol;
|
|
19
|
+
declare const ANNOUNCEMENT_BANNER_DISMISS: unique symbol;
|
|
20
|
+
declare const _default: {
|
|
21
|
+
(): Renderable<any>;
|
|
22
|
+
<T extends A>(attributes: T): Renderable<any>;
|
|
23
|
+
<T extends Renderable<any>>(content: T): Renderable<any>;
|
|
24
|
+
(attributes: A, content?: Renderable<any>): Renderable<any>;
|
|
25
|
+
bind(context: {
|
|
26
|
+
attributes?: Partial<A> | undefined;
|
|
27
|
+
content?: Renderable<any>;
|
|
28
|
+
}): any;
|
|
29
|
+
} & {
|
|
30
|
+
readonly content: typeof ANNOUNCEMENT_BANNER_CONTENT;
|
|
31
|
+
readonly dismiss: typeof ANNOUNCEMENT_BANNER_DISMISS;
|
|
32
|
+
};
|
|
33
|
+
export default _default;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import * as template_u1 from '@esportsplus/template';
|
|
2
|
+
import { component } from '@esportsplus/template';
|
|
3
|
+
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
4
|
+
import './scss/index.scss';
|
|
5
|
+
const template_0ei75f92 = template_u1.template(`<div class='announcement-banner'><div class='announcement-banner-clip'><section class='announcement-banner-content' tabindex='-1'><!--$--><p class='announcement-banner-text'></p><!--$--><button aria-label='Dismiss announcement' class='button announcement-banner-dismiss' type='button'><svg viewBox='0 0 16 16'><path d='m4.5 4.5 7 7M11.5 4.5l-7 7' />`);
|
|
6
|
+
const template_0ei75f9a = template_u1.template(`<span aria-hidden='true' class='announcement-banner-icon'>`);
|
|
7
|
+
const template_0ei75f9d = template_u1.template(`<a class='announcement-banner-link'>`);
|
|
8
|
+
class ReactiveObject_0ei75f90 extends reactivity_u0.ReactiveObject {
|
|
9
|
+
#open = this[reactivity_u0.SIGNAL](true);
|
|
10
|
+
constructor() {
|
|
11
|
+
super(null);
|
|
12
|
+
}
|
|
13
|
+
get open() {
|
|
14
|
+
return reactivity_u0.read(this.#open);
|
|
15
|
+
}
|
|
16
|
+
set open(_v0) {
|
|
17
|
+
reactivity_u0.write(this.#open, _v0);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const ANNOUNCEMENT_BANNER_CONTENT = Symbol.for('@esportsplus/ui/announcement-banner.content');
|
|
21
|
+
const ANNOUNCEMENT_BANNER_DISMISS = Symbol.for('@esportsplus/ui/announcement-banner.dismiss');
|
|
22
|
+
export default Object.assign(component(function ({ icon, label = 'Announcement', link, ondismiss, state = new ReactiveObject_0ei75f90(), ...attributes }, content) {
|
|
23
|
+
let opened = false, returning = false;
|
|
24
|
+
return (() => {
|
|
25
|
+
let root_0ei75f91 = template_0ei75f92(), element_0ei75f93 = root_0ei75f91.firstChild, element_0ei75f94 = element_0ei75f93.firstElementChild.firstElementChild, element_0ei75f95 = element_0ei75f94.firstChild, element_0ei75f96 = element_0ei75f94.firstElementChild, element_0ei75f97 = element_0ei75f95.nextSibling.nextSibling, element_0ei75f98 = element_0ei75f96.nextElementSibling;
|
|
26
|
+
template_u1.setProperties(element_0ei75f93, this?.attributes);
|
|
27
|
+
template_u1.setProperties(element_0ei75f93, attributes);
|
|
28
|
+
template_u1.setList(element_0ei75f93, 'class', () => {
|
|
29
|
+
if (state.open) {
|
|
30
|
+
opened = true;
|
|
31
|
+
}
|
|
32
|
+
else if (opened) {
|
|
33
|
+
returning = true;
|
|
34
|
+
}
|
|
35
|
+
return `${state.open ? '--active' : ''} ${returning ? 'announcement-banner--returning' : ''}`;
|
|
36
|
+
});
|
|
37
|
+
template_u1.setProperty(element_0ei75f94, 'aria-label', label);
|
|
38
|
+
template_u1.setProperty(element_0ei75f94, 'inert', () => !state.open);
|
|
39
|
+
template_u1.setProperties(element_0ei75f94, this?.attributes?.[ANNOUNCEMENT_BANNER_CONTENT]);
|
|
40
|
+
template_u1.setProperties(element_0ei75f94, attributes[ANNOUNCEMENT_BANNER_CONTENT]);
|
|
41
|
+
template_u1.slot(element_0ei75f95, icon && (() => {
|
|
42
|
+
let root_0ei75f99 = template_0ei75f9a(), element_0ei75f9b = root_0ei75f99.firstChild;
|
|
43
|
+
template_u1.slot(element_0ei75f9b, icon, 1);
|
|
44
|
+
return root_0ei75f99;
|
|
45
|
+
})());
|
|
46
|
+
template_u1.slot(element_0ei75f96, content, 1);
|
|
47
|
+
template_u1.slot(element_0ei75f97, link && (() => {
|
|
48
|
+
let root_0ei75f9c = template_0ei75f9d(), element_0ei75f9e = root_0ei75f9c.firstChild;
|
|
49
|
+
template_u1.setProperty(element_0ei75f9e, 'href', link.href);
|
|
50
|
+
template_u1.slot(element_0ei75f9e, link.label, 1);
|
|
51
|
+
return root_0ei75f9c;
|
|
52
|
+
})());
|
|
53
|
+
template_u1.delegate(element_0ei75f98, 'click', () => {
|
|
54
|
+
state.open = false;
|
|
55
|
+
ondismiss?.();
|
|
56
|
+
});
|
|
57
|
+
template_u1.setProperties(element_0ei75f98, this?.attributes?.[ANNOUNCEMENT_BANNER_DISMISS]);
|
|
58
|
+
template_u1.setProperties(element_0ei75f98, attributes[ANNOUNCEMENT_BANNER_DISMISS]);
|
|
59
|
+
return root_0ei75f91;
|
|
60
|
+
})();
|
|
61
|
+
}), { content: ANNOUNCEMENT_BANNER_CONTENT, dismiss: ANNOUNCEMENT_BANNER_DISMISS });
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer components {.announcement-banner{--announcement-banner-background:var(--color-text-500);--announcement-banner-color:var(--color-white-300);--announcement-banner-drawer:cubic-bezier(.32, .72, 0, 1);--announcement-banner-ease:cubic-bezier(.23, 1, .32, 1);--announcement-banner-font-size:14px;--announcement-banner-height:44px;--announcement-banner-icon-size:16px}.announcement-banner--blue{--announcement-banner-background:var(--color-blue-400)}.announcement-banner--purple{--announcement-banner-background:var(--color-purple-400)}.announcement-banner{transition:grid-template-rows .24s var(--announcement-banner-drawer) 80ms;grid-template-rows:0fr;display:grid}.announcement-banner-clip{min-height:0;overflow:hidden}.announcement-banner-content{background:var(--announcement-banner-background);color:var(--announcement-banner-color);filter:blur(2px);font-size:var(--announcement-banner-font-size);height:var(--announcement-banner-height);opacity:0;transition:filter .12s var(--announcement-banner-ease), opacity .12s var(--announcement-banner-ease);outline:none;flex-wrap:nowrap;align-items:center;gap:10px;padding-inline:16px 6px;display:flex;translate:0 -100%}.announcement-banner-dismiss.button{--background-default:transparent;--background-hover:color-mix(in oklab, var(--announcement-banner-color) 15%, transparent);--border-radius:999px;--color-default:color-mix(in oklab, var(--announcement-banner-color) 70%, transparent);--color-hover:var(--announcement-banner-color);--padding-horizontal:0px;--padding-vertical:0px;touch-action:manipulation;-webkit-user-select:none;user-select:none;border:0;outline:none;flex-shrink:0;width:32px;height:32px;margin-inline-start:auto;transition:background-color .15s ease-out,color .15s ease-out,scale .15s ease-out}.announcement-banner-dismiss.button:before{content:"";border-radius:999px;position:absolute;inset:-4px}.announcement-banner-dismiss.button:active{scale:.96}.announcement-banner-dismiss.button:focus-visible{outline:2px solid var(--announcement-banner-color)}.announcement-banner-dismiss.button svg{fill:none;height:var(--announcement-banner-icon-size);stroke:currentColor;stroke-linecap:round;stroke-width:1.5px;width:var(--announcement-banner-icon-size)}.announcement-banner-icon{flex-shrink:0;display:flex}.announcement-banner-icon svg{fill:none;height:var(--announcement-banner-icon-size);stroke:currentColor;stroke-linejoin:round;stroke-width:1.5px;width:var(--announcement-banner-icon-size)}.announcement-banner-link{border-radius:var(--border-radius-100);color:inherit;font-weight:var(--font-weight-500);text-decoration:underline;-webkit-text-decoration-color:color-mix(in oklab, var(--announcement-banner-color) 40%, transparent);-webkit-text-decoration-color:color-mix(in oklab, var(--announcement-banner-color) 40%, transparent);text-decoration-color:color-mix(in oklab, var(--announcement-banner-color) 40%, transparent);text-underline-offset:3px;outline:none;flex-shrink:0;transition:text-decoration-color .15s ease-out}.announcement-banner-link:hover{-webkit-text-decoration-color:var(--announcement-banner-color);-webkit-text-decoration-color:var(--announcement-banner-color);text-decoration-color:var(--announcement-banner-color)}.announcement-banner-link:focus-visible{outline:2px solid var(--announcement-banner-color);outline-offset:2px}.announcement-banner-text{text-overflow:ellipsis;white-space:nowrap;flex:0 auto;width:auto;min-width:0;margin:0;overflow:hidden}.announcement-banner--returning .announcement-banner-content{translate:0}.announcement-banner.--active{transition:grid-template-rows .28s var(--announcement-banner-drawer);grid-template-rows:1fr}.announcement-banner.--active .announcement-banner-content{filter:blur();opacity:1;transition:filter .2s var(--announcement-banner-ease), opacity .2s var(--announcement-banner-ease), translate .28s var(--announcement-banner-drawer);translate:0}.announcement-banner.--active.announcement-banner--returning .announcement-banner-content{transition:filter .2s var(--announcement-banner-ease) .12s, opacity .2s var(--announcement-banner-ease) .12s}@media (prefers-reduced-motion:reduce){.announcement-banner,.announcement-banner.--active{transition:none}.announcement-banner .announcement-banner-content,.announcement-banner.--active .announcement-banner-content,.announcement-banner.--active.announcement-banner--returning .announcement-banner-content{filter:none;transition:opacity .2s var(--announcement-banner-ease);translate:0}.announcement-banner-dismiss.button{transition:background-color .15s ease-out,color .15s ease-out}.announcement-banner-dismiss.button:active{scale:1}}}
|
|
2
|
+
/*$vite$:1*/
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { type Attributes } from '@esportsplus/template';
|
|
2
|
+
import './scss/index.scss';
|
|
3
|
+
type State = {
|
|
4
|
+
savedAt: number | null;
|
|
5
|
+
status: Status;
|
|
6
|
+
};
|
|
7
|
+
type Status = 'saved' | 'saving' | 'unsaved';
|
|
8
|
+
export default _default;
|
|
9
|
+
declare function _default({ state, ...attributes }: Attributes & {
|
|
10
|
+
state?: State;
|
|
11
|
+
}): DocumentFragment | Text;
|
|
12
|
+
export type { State, Status };
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
import * as template_u1 from '@esportsplus/template';
|
|
2
|
+
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
3
|
+
import { effect, onCleanup } from '@esportsplus/reactivity';
|
|
4
|
+
import './scss/index.scss';
|
|
5
|
+
const template_1lhdjr55 = template_u1.template(`<div class='autosave'><span aria-hidden='true' class='autosave-icon'><span class='autosave-dot' style='--i: 0;'></span><span class='autosave-dot' style='--i: 1;'></span><span class='autosave-dot' style='--i: 2;'></span><svg class='autosave-check' viewBox='0 0 16 16'><path d='M3.75 8.25l2.75 2.75 5.75-6' pathLength='1' /></svg></span><span class='autosave-label'></span><span aria-live='polite' class='autosave-announcement'>`);
|
|
6
|
+
const template_1lhdjr5a = template_u1.template(`<span>`);
|
|
7
|
+
class ReactiveObject_1lhdjr50 extends reactivity_u0.ReactiveObject {
|
|
8
|
+
#savedAt;
|
|
9
|
+
#status;
|
|
10
|
+
constructor(_p0, _p1) {
|
|
11
|
+
super(null);
|
|
12
|
+
this.#savedAt = this[reactivity_u0.SIGNAL](_p0);
|
|
13
|
+
this.#status = this[reactivity_u0.SIGNAL](_p1);
|
|
14
|
+
}
|
|
15
|
+
get savedAt() {
|
|
16
|
+
return reactivity_u0.read(this.#savedAt);
|
|
17
|
+
}
|
|
18
|
+
set savedAt(_v0) {
|
|
19
|
+
reactivity_u0.write(this.#savedAt, _v0);
|
|
20
|
+
}
|
|
21
|
+
get status() {
|
|
22
|
+
return reactivity_u0.read(this.#status);
|
|
23
|
+
}
|
|
24
|
+
set status(_v1) {
|
|
25
|
+
reactivity_u0.write(this.#status, _v1);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
class ReactiveObject_1lhdjr51 extends reactivity_u0.ReactiveObject {
|
|
29
|
+
#now;
|
|
30
|
+
constructor(_p0) {
|
|
31
|
+
super(null);
|
|
32
|
+
this.#now = this[reactivity_u0.SIGNAL](_p0);
|
|
33
|
+
}
|
|
34
|
+
get now() {
|
|
35
|
+
return reactivity_u0.read(this.#now);
|
|
36
|
+
}
|
|
37
|
+
set now(_v0) {
|
|
38
|
+
reactivity_u0.write(this.#now, _v0);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
class ReactiveObject_1lhdjr52 extends reactivity_u0.ReactiveObject {
|
|
42
|
+
#phase = this[reactivity_u0.SIGNAL]('');
|
|
43
|
+
#text = this[reactivity_u0.SIGNAL]('');
|
|
44
|
+
constructor() {
|
|
45
|
+
super(null);
|
|
46
|
+
}
|
|
47
|
+
get phase() {
|
|
48
|
+
return reactivity_u0.read(this.#phase);
|
|
49
|
+
}
|
|
50
|
+
set phase(_v0) {
|
|
51
|
+
reactivity_u0.write(this.#phase, _v0);
|
|
52
|
+
}
|
|
53
|
+
get text() {
|
|
54
|
+
return reactivity_u0.read(this.#text);
|
|
55
|
+
}
|
|
56
|
+
set text(_v1) {
|
|
57
|
+
reactivity_u0.write(this.#text, _v1);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
class ReactiveObject_1lhdjr53 extends reactivity_u0.ReactiveObject {
|
|
61
|
+
#phase = this[reactivity_u0.SIGNAL]('');
|
|
62
|
+
#text = this[reactivity_u0.SIGNAL]('');
|
|
63
|
+
constructor() {
|
|
64
|
+
super(null);
|
|
65
|
+
}
|
|
66
|
+
get phase() {
|
|
67
|
+
return reactivity_u0.read(this.#phase);
|
|
68
|
+
}
|
|
69
|
+
set phase(_v0) {
|
|
70
|
+
reactivity_u0.write(this.#phase, _v0);
|
|
71
|
+
}
|
|
72
|
+
get text() {
|
|
73
|
+
return reactivity_u0.read(this.#text);
|
|
74
|
+
}
|
|
75
|
+
set text(_v1) {
|
|
76
|
+
reactivity_u0.write(this.#text, _v1);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
const MINUTE = 60_000;
|
|
80
|
+
function text({ savedAt, status }, now) {
|
|
81
|
+
if (status === 'saving') {
|
|
82
|
+
return 'Saving';
|
|
83
|
+
}
|
|
84
|
+
if (status === 'unsaved') {
|
|
85
|
+
return 'Unsaved changes';
|
|
86
|
+
}
|
|
87
|
+
if (savedAt === null) {
|
|
88
|
+
return 'Saved';
|
|
89
|
+
}
|
|
90
|
+
let ago = now - savedAt;
|
|
91
|
+
if (ago < 45_000) {
|
|
92
|
+
return 'Saved just now';
|
|
93
|
+
}
|
|
94
|
+
if (ago < 60 * MINUTE) {
|
|
95
|
+
return `Saved ${Math.max(1, Math.floor(ago / MINUTE))} min ago`;
|
|
96
|
+
}
|
|
97
|
+
return `Saved at ${new Date(savedAt).toLocaleTimeString([], { hour: 'numeric', minute: '2-digit' })}`;
|
|
98
|
+
}
|
|
99
|
+
export default ({ state = new ReactiveObject_1lhdjr50(null, 'saved'), ...attributes }) => {
|
|
100
|
+
let clock = new ReactiveObject_1lhdjr51(Date.now()), current = 0, slots = [
|
|
101
|
+
new ReactiveObject_1lhdjr52(),
|
|
102
|
+
new ReactiveObject_1lhdjr53()
|
|
103
|
+
], stopLabel = effect(() => text(state, clock.now), (value, previous) => {
|
|
104
|
+
if (previous === undefined) {
|
|
105
|
+
slots[current].text = value;
|
|
106
|
+
return;
|
|
107
|
+
}
|
|
108
|
+
if (value === previous) {
|
|
109
|
+
return;
|
|
110
|
+
}
|
|
111
|
+
slots[current].phase = 'exit';
|
|
112
|
+
current = current === 0 ? 1 : 0;
|
|
113
|
+
slots[current].phase = 'enter';
|
|
114
|
+
slots[current].text = value;
|
|
115
|
+
}), stopTick = effect(() => {
|
|
116
|
+
if (state.status !== 'saved' || state.savedAt === null) {
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
let timer = setInterval(() => clock.now = Date.now(), MINUTE / 2);
|
|
120
|
+
onCleanup(() => clearInterval(timer));
|
|
121
|
+
});
|
|
122
|
+
onCleanup(() => {
|
|
123
|
+
stopLabel();
|
|
124
|
+
stopTick();
|
|
125
|
+
});
|
|
126
|
+
return (() => {
|
|
127
|
+
let root_1lhdjr54 = template_1lhdjr55(), element_1lhdjr56 = root_1lhdjr54.firstChild, element_1lhdjr57 = element_1lhdjr56.firstElementChild.nextElementSibling, element_1lhdjr58 = element_1lhdjr57.nextElementSibling;
|
|
128
|
+
template_u1.setProperties(element_1lhdjr56, attributes);
|
|
129
|
+
template_u1.setProperty(element_1lhdjr56, 'data-status', () => state.status);
|
|
130
|
+
template_u1.slot(element_1lhdjr57, slots.map((slot) => {
|
|
131
|
+
let root_1lhdjr59 = template_1lhdjr5a(), element_1lhdjr5b = root_1lhdjr59.firstChild;
|
|
132
|
+
template_u1.setProperty(element_1lhdjr5b, 'aria-hidden', () => slot.phase === 'exit' ? 'true' : 'false');
|
|
133
|
+
template_u1.setProperty(element_1lhdjr5b, 'data-phase', () => slot.phase);
|
|
134
|
+
new template_u1.EffectSlot(element_1lhdjr5b, () => slot.text, 1);
|
|
135
|
+
return root_1lhdjr59;
|
|
136
|
+
}), 1);
|
|
137
|
+
new template_u1.EffectSlot(element_1lhdjr58, () => state.status === 'saved' && state.savedAt !== null ? 'All changes saved' : '', 1);
|
|
138
|
+
return root_1lhdjr54;
|
|
139
|
+
})();
|
|
140
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer components {.autosave{--blur:3px;--check-color:var(--color-text-500);--check-delay:.12s;--check-duration:.35s;--check-stroke-width:1.6;--color:var(--color-text-300);--dot-gap:calc(var(--icon-size) * .3125);--dot-size:calc(var(--icon-size) / 4);--enter-duration:.22s;--exit-duration:.12s;--font-size:var(--font-size-300);--gap:.5rem;--icon-size:1.25em;--move-duration:.4s;--pulse-duration:1s;--pulse-stagger:.16s;--shift:3px;--timing-function:cubic-bezier(.23, 1, .32, 1);--width:11em;color:var(--color);font-size:var(--font-size);align-items:center;gap:var(--gap);white-space:nowrap;width:var(--width);flex-shrink:0;display:flex}.autosave-announcement{clip-path:inset(50%);width:1px;height:1px;position:absolute;overflow:hidden}.autosave-check{fill:none;opacity:0;height:100%;stroke:var(--check-color);stroke-dasharray:1;stroke-dashoffset:1px;stroke-linecap:round;stroke-linejoin:round;stroke-width:var(--check-stroke-width);transition:opacity var(--exit-duration) var(--timing-function), stroke-dashoffset var(--exit-duration) var(--timing-function);width:100%;position:absolute;inset:0}.autosave-dot{height:var(--dot-size);opacity:0;transition:opacity var(--move-duration) var(--timing-function), scale var(--move-duration) var(--timing-function), translate var(--move-duration) var(--timing-function);width:var(--dot-size);position:absolute;scale:.5}.autosave-dot:before{content:"";background:currentColor;border-radius:100%;width:100%;height:100%;display:block}.autosave-icon{height:var(--icon-size);width:var(--icon-size);flex-shrink:0;place-items:center;display:grid;position:relative}.autosave-label{flex:1;min-width:0;display:grid}.autosave-label [data-phase=enter]{animation:autosave-enter var(--enter-duration) var(--timing-function) both}.autosave-label [data-phase=exit]{animation:autosave-exit var(--exit-duration) var(--timing-function) both;opacity:0}.autosave-label span{grid-area:1/1}.autosave[data-status=saved] .autosave-check{opacity:1;stroke-dashoffset:0;transition:opacity var(--check-duration) var(--timing-function) var(--check-delay), stroke-dashoffset var(--check-duration) var(--timing-function) var(--check-delay)}.autosave[data-status=saving] .autosave-dot{opacity:1;scale:1;translate:calc((var(--i) - 1) * var(--dot-gap))}.autosave[data-status=saving] .autosave-dot:before{animation:autosave-pulse var(--pulse-duration) ease-in-out calc(var(--i) * var(--pulse-stagger)) infinite}.autosave[data-status=unsaved] .autosave-dot:nth-child(2){opacity:1;scale:1.5}@media (prefers-reduced-motion:reduce){.autosave-check,.autosave-dot,.autosave[data-status=saved] .autosave-check{transition:none}.autosave-label [data-phase],.autosave[data-status=saving] .autosave-dot:before{animation:none}}@keyframes autosave-enter{0%{filter:blur(var(--blur));opacity:0;translate:0 var(--shift)}}@keyframes autosave-exit{0%{opacity:1}to{filter:blur(var(--blur));opacity:0;translate:0 calc(var(--shift) * -1)}}@keyframes autosave-pulse{0%,to{opacity:.25}40%{opacity:1}}}
|
|
2
|
+
/*$vite$:1*/
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type Attributes } from '@esportsplus/template';
|
|
2
|
+
import './scss/index.scss';
|
|
3
|
+
type A = Attributes & {
|
|
4
|
+
showAfter?: number;
|
|
5
|
+
state?: State;
|
|
6
|
+
target?: HTMLElement | (() => HTMLElement | null | undefined);
|
|
7
|
+
};
|
|
8
|
+
type State = {
|
|
9
|
+
jump: number;
|
|
10
|
+
visible: boolean;
|
|
11
|
+
};
|
|
12
|
+
declare function template(this: {
|
|
13
|
+
attributes?: Partial<A>;
|
|
14
|
+
} | void, { showAfter, state, target, ...attributes }: A): DocumentFragment | Text;
|
|
15
|
+
export default template;
|
|
16
|
+
export type { State };
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import * as template_u1 from '@esportsplus/template';
|
|
2
|
+
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
3
|
+
import { effect, onCleanup } from '@esportsplus/reactivity';
|
|
4
|
+
import './scss/index.scss';
|
|
5
|
+
const template_04ywhwe2 = template_u1.template(`<button aria-label='Back to top' class='back-to-top ' type='button'><svg aria-hidden='true' class='back-to-top-ring' fill='none' viewBox='0 0 44 44'><circle class='back-to-top-track' cx='22' cy='22' r='20.5' /><circle class='back-to-top-progress' cx='22' cy='22' pathLength='1' r='20.5' /></svg><svg aria-hidden='true' class='back-to-top-arrow' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.7' viewBox='0 0 16 16'><path d='M8 12.5v-9M4 7l4-4 4 4' />`);
|
|
6
|
+
class ReactiveObject_04ywhwe0 extends reactivity_u0.ReactiveObject {
|
|
7
|
+
#jump = this[reactivity_u0.SIGNAL](0);
|
|
8
|
+
#visible = this[reactivity_u0.SIGNAL](false);
|
|
9
|
+
constructor() {
|
|
10
|
+
super(null);
|
|
11
|
+
}
|
|
12
|
+
get jump() {
|
|
13
|
+
return reactivity_u0.read(this.#jump);
|
|
14
|
+
}
|
|
15
|
+
set jump(_v0) {
|
|
16
|
+
reactivity_u0.write(this.#jump, _v0);
|
|
17
|
+
}
|
|
18
|
+
get visible() {
|
|
19
|
+
return reactivity_u0.read(this.#visible);
|
|
20
|
+
}
|
|
21
|
+
set visible(_v1) {
|
|
22
|
+
reactivity_u0.write(this.#visible, _v1);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const ARRIVE = { duration: 300, easing: 'cubic-bezier(0.23, 1, 0.32, 1)' };
|
|
26
|
+
const LIFT = { duration: 400, easing: 'cubic-bezier(0.4, 0, 0.6, 1)', fill: 'forwards' };
|
|
27
|
+
const TRIP = { x1: 0.65, x2: 0.35, y1: 0, y2: 1 };
|
|
28
|
+
const EASE = bezier(TRIP);
|
|
29
|
+
function bezier({ x1, x2, y1, y2 }) {
|
|
30
|
+
let ax = 1 - 3 * x2 + 3 * x1, ay = 1 - 3 * y2 + 3 * y1, bx = 3 * x2 - 6 * x1, by = 3 * y2 - 6 * y1, cx = 3 * x1, cy = 3 * y1;
|
|
31
|
+
return (x) => {
|
|
32
|
+
let high = 1, low = 0, t = x;
|
|
33
|
+
for (let i = 0; i < 20; i++) {
|
|
34
|
+
let current = ((ax * t + bx) * t + cx) * t;
|
|
35
|
+
if (Math.abs(current - x) < 1e-5) {
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
if (current < x) {
|
|
39
|
+
low = t;
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
high = t;
|
|
43
|
+
}
|
|
44
|
+
t = (low + high) / 2;
|
|
45
|
+
}
|
|
46
|
+
return ((ay * t + by) * t + cy) * t;
|
|
47
|
+
};
|
|
48
|
+
}
|
|
49
|
+
function reduced() {
|
|
50
|
+
return matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
51
|
+
}
|
|
52
|
+
function template({ showAfter = 0.12, state = new ReactiveObject_04ywhwe0(), target, ...attributes }) {
|
|
53
|
+
let arrow, cleanup, frame = 0, jump = state.jump, launched = false, lift, pending, ring, returning = false, scroller, timeline, trip = 0;
|
|
54
|
+
function go() {
|
|
55
|
+
let from = top();
|
|
56
|
+
launch();
|
|
57
|
+
stop();
|
|
58
|
+
if (reduced()) {
|
|
59
|
+
write(0);
|
|
60
|
+
return;
|
|
61
|
+
}
|
|
62
|
+
let duration = Math.min(900, 450 + from / 4), source = scroller ?? window, start = performance.now();
|
|
63
|
+
function abort() {
|
|
64
|
+
stop();
|
|
65
|
+
returning = false;
|
|
66
|
+
land(true);
|
|
67
|
+
}
|
|
68
|
+
function step(now) {
|
|
69
|
+
let t = Math.min((now - start) / duration, 1);
|
|
70
|
+
write(from * (1 - EASE(t)));
|
|
71
|
+
if (t < 1) {
|
|
72
|
+
trip = requestAnimationFrame(step);
|
|
73
|
+
}
|
|
74
|
+
else {
|
|
75
|
+
stop();
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
pending = { abort, source };
|
|
79
|
+
returning = true;
|
|
80
|
+
source.addEventListener('touchstart', abort, { once: true, passive: true });
|
|
81
|
+
source.addEventListener('wheel', abort, { once: true, passive: true });
|
|
82
|
+
trip = requestAnimationFrame(step);
|
|
83
|
+
}
|
|
84
|
+
function land(animate) {
|
|
85
|
+
if (!launched || !arrow) {
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
launched = false;
|
|
89
|
+
lift?.cancel();
|
|
90
|
+
lift = undefined;
|
|
91
|
+
if (animate && !reduced()) {
|
|
92
|
+
arrow.animate([
|
|
93
|
+
{ filter: 'blur(2px)', opacity: 0, transform: 'translateY(10px)' },
|
|
94
|
+
{ filter: 'blur(0px)', opacity: 1, transform: 'translateY(0px)' }
|
|
95
|
+
], ARRIVE);
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
function launch() {
|
|
99
|
+
if (launched || !arrow) {
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
launched = true;
|
|
103
|
+
lift = arrow.animate([
|
|
104
|
+
{ filter: 'blur(0px)', opacity: 1, transform: 'translateY(0px)' },
|
|
105
|
+
{ filter: 'blur(2px)', opacity: 0, transform: 'translateY(-20px)' }
|
|
106
|
+
], reduced() ? { ...LIFT, duration: 0 } : LIFT);
|
|
107
|
+
}
|
|
108
|
+
function onscroll() {
|
|
109
|
+
if (!frame) {
|
|
110
|
+
frame = requestAnimationFrame(read);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
function read() {
|
|
114
|
+
frame = 0;
|
|
115
|
+
let room = scroller
|
|
116
|
+
? scroller.scrollHeight - scroller.clientHeight
|
|
117
|
+
: document.documentElement.scrollHeight - innerHeight, p = room > 0 ? Math.min(1, Math.max(0, top() / room)) : 0;
|
|
118
|
+
if (!timeline) {
|
|
119
|
+
ring?.style.setProperty('stroke-dashoffset', String(1 - p));
|
|
120
|
+
}
|
|
121
|
+
if (returning) {
|
|
122
|
+
if (p > 0) {
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
returning = false;
|
|
126
|
+
}
|
|
127
|
+
state.visible = p > showAfter;
|
|
128
|
+
if (p <= showAfter) {
|
|
129
|
+
land(false);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
function stop() {
|
|
133
|
+
cancelAnimationFrame(trip);
|
|
134
|
+
trip = 0;
|
|
135
|
+
if (!pending) {
|
|
136
|
+
return;
|
|
137
|
+
}
|
|
138
|
+
pending.source.removeEventListener('touchstart', pending.abort);
|
|
139
|
+
pending.source.removeEventListener('wheel', pending.abort);
|
|
140
|
+
pending = undefined;
|
|
141
|
+
}
|
|
142
|
+
function top() {
|
|
143
|
+
return scroller ? scroller.scrollTop : scrollY;
|
|
144
|
+
}
|
|
145
|
+
function write(value) {
|
|
146
|
+
(scroller ?? window).scrollTo({ behavior: 'instant', top: value });
|
|
147
|
+
}
|
|
148
|
+
onCleanup(effect(() => {
|
|
149
|
+
if (state.jump === jump) {
|
|
150
|
+
return;
|
|
151
|
+
}
|
|
152
|
+
jump = state.jump;
|
|
153
|
+
go();
|
|
154
|
+
}));
|
|
155
|
+
return (() => {
|
|
156
|
+
let root_04ywhwe1 = template_04ywhwe2(), element_04ywhwe3 = root_04ywhwe1.firstChild;
|
|
157
|
+
template_u1.setList(element_04ywhwe3, 'class', () => state.visible && '--active');
|
|
158
|
+
template_u1.setProperties(element_04ywhwe3, this?.attributes);
|
|
159
|
+
template_u1.setProperties(element_04ywhwe3, attributes);
|
|
160
|
+
template_u1.delegate(element_04ywhwe3, 'click', go);
|
|
161
|
+
template_u1.onconnect(element_04ywhwe3, (el) => {
|
|
162
|
+
let source = typeof target === 'function' ? target() : target;
|
|
163
|
+
arrow = el.querySelector('.back-to-top-arrow') ?? undefined;
|
|
164
|
+
ring = el.querySelector('.back-to-top-progress') ?? undefined;
|
|
165
|
+
scroller = source ?? undefined;
|
|
166
|
+
if (ring && typeof ScrollTimeline === 'function') {
|
|
167
|
+
timeline = ring.animate([{ strokeDashoffset: 1 }, { strokeDashoffset: 0 }], { fill: 'both', timeline: new ScrollTimeline({ axis: 'block', source: scroller ?? document.documentElement }) });
|
|
168
|
+
}
|
|
169
|
+
(scroller ?? window).addEventListener('scroll', onscroll, { passive: true });
|
|
170
|
+
cleanup = () => (scroller ?? window).removeEventListener('scroll', onscroll);
|
|
171
|
+
read();
|
|
172
|
+
});
|
|
173
|
+
template_u1.ondisconnect(element_04ywhwe3, () => {
|
|
174
|
+
cancelAnimationFrame(frame);
|
|
175
|
+
cleanup?.();
|
|
176
|
+
stop();
|
|
177
|
+
timeline?.cancel();
|
|
178
|
+
});
|
|
179
|
+
return root_04ywhwe1;
|
|
180
|
+
})();
|
|
181
|
+
}
|
|
182
|
+
export default template;
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer components {.back-to-top{--background:var(--color-white-300);--box-shadow:0 0 0 var(--border-width-400) oklch(from var(--color-black-300) l c h / .06), 0 1px 2px oklch(from var(--color-black-300) l c h / .06), 0 6px 16px -6px oklch(from var(--color-black-300) l c h / .12);--color:var(--color-text-500);--enter-duration:.25s;--enter-timing-function:cubic-bezier(.23, 1, .32, 1);--exit-duration:.15s;--focus-color:var(--color);--hidden-blur:4px;--hidden-scale:.85;--hover-lift:-2px;--offset:var(--size-500);--pressed-scale:.96;--ring-color:var(--color);--ring-width:1.5;--size:44px;--track-color:var(--color-border-300);--transition-duration:.15s;--transition-timing-function:ease-out;--z-index:10}.back-to-top--dark{--background:var(--color-text-500);--color:var(--color-white-300);--track-color:oklch(from var(--color-white-300) l c h / .2)}.back-to-top{background:var(--background);box-shadow:var(--box-shadow);color:var(--color);cursor:pointer;filter:blur(var(--hidden-blur));height:var(--size);opacity:0;transform:scale(var(--hidden-scale));transition:filter var(--exit-duration) var(--enter-timing-function), opacity var(--exit-duration) var(--enter-timing-function), scale var(--transition-duration) var(--transition-timing-function), transform var(--exit-duration) var(--enter-timing-function), visibility 0s linear var(--exit-duration);visibility:hidden;width:var(--size);border:0;border-radius:999px;outline:none;place-items:center;padding:0;display:grid;position:relative;overflow:hidden}.back-to-top.--active{filter:blur();opacity:1;transition:filter var(--enter-duration) var(--enter-timing-function), opacity var(--enter-duration) var(--enter-timing-function), scale var(--transition-duration) var(--transition-timing-function), transform var(--enter-duration) var(--enter-timing-function), visibility 0s;visibility:visible;transform:none}.back-to-top:active{scale:var(--pressed-scale)}.back-to-top:focus-visible{outline:var(--border-width-500) solid var(--focus-color);outline-offset:2px}.back-to-top-arrow{height:16px;transition:translate var(--transition-duration) var(--transition-timing-function);grid-area:1/1;width:16px}.back-to-top-progress,.back-to-top-track{stroke-width:var(--ring-width)}.back-to-top-progress{stroke:var(--ring-color);stroke-dasharray:1;stroke-dashoffset:1px;stroke-linecap:round}.back-to-top-ring{pointer-events:none;width:100%;height:100%;position:absolute;inset:0;rotate:-90deg}.back-to-top-track{stroke:var(--track-color)}.back-to-top--fixed{bottom:var(--offset);right:var(--offset);z-index:var(--z-index);position:fixed}@media (hover:hover){.back-to-top:hover .back-to-top-arrow{translate:0 var(--hover-lift)}}@media (prefers-reduced-motion:reduce){.back-to-top,.back-to-top.--active{transition:none}.back-to-top:active{scale:none}.back-to-top-arrow{transition:none}}}
|
|
2
|
+
/*$vite$:1*/
|