@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
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
import * as template_u1 from '@esportsplus/template';
|
|
2
|
+
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
3
|
+
import { effect, onCleanup, untrack } from '@esportsplus/reactivity';
|
|
4
|
+
import './scss/index.scss';
|
|
5
|
+
const template_1mccfik2 = template_u1.template(`<div class='shortcut-recorder'><div class='shortcut-recorder-label'><!--$--><div class='shortcut-recorder-status' role='status'></div></div><button class='shortcut-recorder-field' type='button'><!--$-->`);
|
|
6
|
+
const template_1mccfik9 = template_u1.template(`<span class='shortcut-recorder-error'>`);
|
|
7
|
+
const template_1mccfikc = template_u1.template(`<kbd class='shortcut-recorder-key '>`);
|
|
8
|
+
const template_1mccfikf = template_u1.template(`<span class='shortcut-recorder-placeholder '>`);
|
|
9
|
+
const template_1mccfikh = template_u1.template(`<span class='shortcut-recorder-dot' aria-hidden='true'></span>Press keys`);
|
|
10
|
+
class ReactiveObject_1mccfik0 extends reactivity_u0.ReactiveObject {
|
|
11
|
+
#error = this[reactivity_u0.SIGNAL]('');
|
|
12
|
+
#recording = this[reactivity_u0.SIGNAL](false);
|
|
13
|
+
#shake = this[reactivity_u0.SIGNAL](0);
|
|
14
|
+
constructor() {
|
|
15
|
+
super(null);
|
|
16
|
+
}
|
|
17
|
+
get error() {
|
|
18
|
+
return reactivity_u0.read(this.#error);
|
|
19
|
+
}
|
|
20
|
+
set error(_v0) {
|
|
21
|
+
reactivity_u0.write(this.#error, _v0);
|
|
22
|
+
}
|
|
23
|
+
get recording() {
|
|
24
|
+
return reactivity_u0.read(this.#recording);
|
|
25
|
+
}
|
|
26
|
+
set recording(_v1) {
|
|
27
|
+
reactivity_u0.write(this.#recording, _v1);
|
|
28
|
+
}
|
|
29
|
+
get shake() {
|
|
30
|
+
return reactivity_u0.read(this.#shake);
|
|
31
|
+
}
|
|
32
|
+
set shake(_v2) {
|
|
33
|
+
reactivity_u0.write(this.#shake, _v2);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
const ARROWS = {
|
|
37
|
+
ArrowDown: '↓',
|
|
38
|
+
ArrowLeft: '←',
|
|
39
|
+
ArrowRight: '→',
|
|
40
|
+
ArrowUp: '↑'
|
|
41
|
+
};
|
|
42
|
+
const ERROR_DURATION = 2200;
|
|
43
|
+
const FUNCTION_KEY = /^F\d{1,2}$/;
|
|
44
|
+
const MODIFIER_KEYS = new Set(['Alt', 'Control', 'Meta', 'OS', 'Shift']);
|
|
45
|
+
const SEPARATOR = /\+(?=.)/;
|
|
46
|
+
function glyph(token, mac) {
|
|
47
|
+
if (token === 'Alt') {
|
|
48
|
+
return mac ? '⌥' : 'Alt';
|
|
49
|
+
}
|
|
50
|
+
if (token === 'Ctrl') {
|
|
51
|
+
return '⌃';
|
|
52
|
+
}
|
|
53
|
+
if (token === 'Mod') {
|
|
54
|
+
return mac ? '⌘' : 'Ctrl';
|
|
55
|
+
}
|
|
56
|
+
if (token === 'Shift') {
|
|
57
|
+
return mac ? '⇧' : 'Shift';
|
|
58
|
+
}
|
|
59
|
+
return token;
|
|
60
|
+
}
|
|
61
|
+
function keyName(e) {
|
|
62
|
+
if (e.code.startsWith('Key')) {
|
|
63
|
+
return e.code.slice(3);
|
|
64
|
+
}
|
|
65
|
+
if (e.code.startsWith('Digit')) {
|
|
66
|
+
return e.code.slice(5);
|
|
67
|
+
}
|
|
68
|
+
if (e.key in ARROWS) {
|
|
69
|
+
return ARROWS[e.key];
|
|
70
|
+
}
|
|
71
|
+
if (e.key === ' ') {
|
|
72
|
+
return 'Space';
|
|
73
|
+
}
|
|
74
|
+
if (e.key === 'Enter') {
|
|
75
|
+
return '↵';
|
|
76
|
+
}
|
|
77
|
+
if (e.key.length === 1) {
|
|
78
|
+
return e.key.toUpperCase();
|
|
79
|
+
}
|
|
80
|
+
return e.key;
|
|
81
|
+
}
|
|
82
|
+
function modifiers(e, mac) {
|
|
83
|
+
let tokens = mac
|
|
84
|
+
? [e.ctrlKey && 'Ctrl', e.altKey && 'Alt', e.shiftKey && 'Shift', e.metaKey && 'Mod']
|
|
85
|
+
: [e.ctrlKey && 'Mod', e.altKey && 'Alt', e.shiftKey && 'Shift'];
|
|
86
|
+
return tokens.filter((token) => !!token);
|
|
87
|
+
}
|
|
88
|
+
function parse(value) {
|
|
89
|
+
return value ? value.split(SEPARATOR) : [];
|
|
90
|
+
}
|
|
91
|
+
export default ({ label, taken, value = '', state = reactivity_u0.reactive({ value }), ...attributes }) => {
|
|
92
|
+
let connected = false, field, keys = new reactivity_u0.ReactiveArray(), listeners, mac = /Mac|iPhone|iPad/.test(navigator.platform), status = new ReactiveObject_1mccfik0(), sync = effect(() => {
|
|
93
|
+
let tokens = status.recording ? [] : parse(state.value);
|
|
94
|
+
untrack(() => show(tokens, connected ? 'settle' : ''));
|
|
95
|
+
}), timer;
|
|
96
|
+
function fail(text) {
|
|
97
|
+
clearTimeout(timer);
|
|
98
|
+
status.error = text;
|
|
99
|
+
status.shake = status.shake === 1 ? 2 : 1;
|
|
100
|
+
timer = setTimeout(() => status.error = '', ERROR_DURATION);
|
|
101
|
+
}
|
|
102
|
+
function onaway(e) {
|
|
103
|
+
if (e.type === 'blur' || !field?.contains(e.target)) {
|
|
104
|
+
stop();
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
function onkeydown(e) {
|
|
108
|
+
e.preventDefault();
|
|
109
|
+
e.stopImmediatePropagation();
|
|
110
|
+
let held = modifiers(e, mac);
|
|
111
|
+
if (MODIFIER_KEYS.has(e.key)) {
|
|
112
|
+
show(held, 'enter');
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
if (!held.length && e.key === 'Escape') {
|
|
116
|
+
stop();
|
|
117
|
+
return;
|
|
118
|
+
}
|
|
119
|
+
if (!held.length && (e.key === 'Backspace' || e.key === 'Delete')) {
|
|
120
|
+
state.value = '';
|
|
121
|
+
stop();
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
let key = keyName(e);
|
|
125
|
+
if (!held.length && !FUNCTION_KEY.test(key)) {
|
|
126
|
+
fail(`Add ${mac ? '⌘, ⌥ or ⇧' : 'Ctrl, Alt or Shift'}`);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
let shortcut = [...held, key].join('+'), owner = shortcut === state.value ? null : taken?.(shortcut);
|
|
130
|
+
if (owner) {
|
|
131
|
+
fail(`Used by ${owner}`);
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
state.value = shortcut;
|
|
135
|
+
stop();
|
|
136
|
+
}
|
|
137
|
+
function onkeyup(e) {
|
|
138
|
+
e.stopImmediatePropagation();
|
|
139
|
+
show(modifiers(e, mac), 'enter');
|
|
140
|
+
}
|
|
141
|
+
function show(tokens, animation) {
|
|
142
|
+
if (animation !== 'enter') {
|
|
143
|
+
keys.splice(0, keys.$length, ...tokens.map((token, index) => ({ animation, index, token })));
|
|
144
|
+
return;
|
|
145
|
+
}
|
|
146
|
+
for (let i = keys.$length - 1; i >= 0; i--) {
|
|
147
|
+
if (!tokens.includes(keys[i].token)) {
|
|
148
|
+
keys.splice(i, 1);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
for (let i = 0, n = tokens.length; i < n; i++) {
|
|
152
|
+
if (keys[i]?.token !== tokens[i]) {
|
|
153
|
+
keys.splice(i, 0, { animation, index: i, token: tokens[i] });
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
if (keys.$length > tokens.length) {
|
|
157
|
+
keys.splice(tokens.length);
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
function start() {
|
|
161
|
+
clearTimeout(timer);
|
|
162
|
+
status.error = '';
|
|
163
|
+
status.recording = true;
|
|
164
|
+
listeners?.abort();
|
|
165
|
+
listeners = new AbortController();
|
|
166
|
+
let signal = listeners.signal;
|
|
167
|
+
document.addEventListener('pointerdown', onaway, { signal });
|
|
168
|
+
window.addEventListener('blur', onaway, { signal });
|
|
169
|
+
window.addEventListener('keydown', onkeydown, { capture: true, signal });
|
|
170
|
+
window.addEventListener('keyup', onkeyup, { capture: true, signal });
|
|
171
|
+
}
|
|
172
|
+
function stop() {
|
|
173
|
+
clearTimeout(timer);
|
|
174
|
+
listeners?.abort();
|
|
175
|
+
status.error = '';
|
|
176
|
+
status.recording = false;
|
|
177
|
+
}
|
|
178
|
+
onCleanup(() => {
|
|
179
|
+
clearTimeout(timer);
|
|
180
|
+
listeners?.abort();
|
|
181
|
+
sync();
|
|
182
|
+
});
|
|
183
|
+
return (() => {
|
|
184
|
+
let root_1mccfik1 = template_1mccfik2(), element_1mccfik3 = root_1mccfik1.firstChild, element_1mccfik4 = element_1mccfik3.firstElementChild.firstChild, element_1mccfik5 = element_1mccfik3.firstElementChild.firstElementChild, element_1mccfik6 = element_1mccfik3.firstElementChild.nextElementSibling, element_1mccfik7 = element_1mccfik6.firstChild;
|
|
185
|
+
template_u1.setProperties(element_1mccfik3, attributes);
|
|
186
|
+
template_u1.slot(element_1mccfik4, label);
|
|
187
|
+
new template_u1.EffectSlot(element_1mccfik5, () => status.error && (() => {
|
|
188
|
+
let root_1mccfik8 = template_1mccfik9(), element_1mccfika = root_1mccfik8.firstChild;
|
|
189
|
+
template_u1.slot(element_1mccfika, status.error, 1);
|
|
190
|
+
return root_1mccfik8;
|
|
191
|
+
})(), 1);
|
|
192
|
+
template_u1.setProperty(element_1mccfik6, 'aria-label', () => `${label} shortcut: ${state.value ? parse(state.value).map((token) => glyph(token, mac)).join(' ') : 'none'}. ${status.recording ? 'Recording, press the new keys, Escape to cancel, Backspace to clear.' : 'Press to change.'}`);
|
|
193
|
+
template_u1.setProperty(element_1mccfik6, 'aria-pressed', () => status.recording ? 'true' : 'false');
|
|
194
|
+
template_u1.setProperty(element_1mccfik6, 'data-shake', () => status.shake);
|
|
195
|
+
template_u1.setList(element_1mccfik6, 'class', () => status.recording && '--active');
|
|
196
|
+
template_u1.delegate(element_1mccfik6, 'click', function () {
|
|
197
|
+
field = this;
|
|
198
|
+
if (status.recording) {
|
|
199
|
+
stop();
|
|
200
|
+
}
|
|
201
|
+
else {
|
|
202
|
+
start();
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
template_u1.onconnect(element_1mccfik6, () => {
|
|
206
|
+
connected = true;
|
|
207
|
+
});
|
|
208
|
+
element_1mccfik7.parentNode.insertBefore(new template_u1.ArraySlot(keys, (key) => {
|
|
209
|
+
let root_1mccfikb = template_1mccfikc(), element_1mccfikd = root_1mccfikb.firstChild;
|
|
210
|
+
template_u1.setList(element_1mccfikd, 'class', key.animation && `shortcut-recorder-key--${key.animation}`);
|
|
211
|
+
template_u1.setList(element_1mccfikd, 'style', template_u1.interpolate(["--index: ", (key.index)]));
|
|
212
|
+
template_u1.slot(element_1mccfikd, glyph(key.token, mac), 1);
|
|
213
|
+
return root_1mccfikb;
|
|
214
|
+
}).fragment, element_1mccfik7);
|
|
215
|
+
new template_u1.EffectSlot(element_1mccfik6, () => {
|
|
216
|
+
if (keys.$length) {
|
|
217
|
+
return '';
|
|
218
|
+
}
|
|
219
|
+
return (() => {
|
|
220
|
+
let root_1mccfike = template_1mccfikf(), element_1mccfikg = root_1mccfike.firstChild;
|
|
221
|
+
template_u1.setList(element_1mccfikg, 'class', connected && 'shortcut-recorder-placeholder--fade');
|
|
222
|
+
template_u1.slot(element_1mccfikg, status.recording
|
|
223
|
+
? template_1mccfikh()
|
|
224
|
+
: 'None', 1);
|
|
225
|
+
return root_1mccfike;
|
|
226
|
+
})();
|
|
227
|
+
}, 2);
|
|
228
|
+
return root_1mccfik1;
|
|
229
|
+
})();
|
|
230
|
+
};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer components {.shortcut-recorder{--color:var(--color-text-500);--color-error:var(--color-red-400);--color-muted:var(--color-text-300);--font-size:var(--font-size-400);--font-size-small:var(--font-size-300);--gap:var(--size-400);--timing-function-out:cubic-bezier(.23, 1, .32, 1);--timing-function-spring:cubic-bezier(.34, 1.56, .64, 1)}.shortcut-recorder-field{--background:var(--background-default);--background-active:var(--color-white-300);--background-default:var(--color-grey-400);--background-hover:var(--color-white-300);--border-color:var(--border-color-default);--border-color-active:var(--color-text-500);--border-color-default:var(--color-border-400);--border-color-hover:var(--border-color-default);--border-radius:var(--border-radius-500);--border-width:var(--border-width-default);--border-width-active:1.5px;--border-width-default:1px;--focus-color:var(--color-text-500);--focus-offset:2px;--focus-width:2px;--gap:4px;--height:36px;--min-width:96px;--padding-horizontal:6px;--transition-duration:.15s}.shortcut-recorder-field:not(.--active):hover{--background:var(--background-hover);--border-color:var(--border-color-hover)}.shortcut-recorder-field.--active{--background:var(--background-active);--border-color:var(--border-color-active);--border-width:var(--border-width-active)}.shortcut-recorder-key{--background:var(--color-white-300);--border-color:var(--color-border-400);--border-radius:var(--border-radius-300);--padding-horizontal:6px;--size:24px}.shortcut-recorder{color:var(--color);font-size:var(--font-size);align-items:center;gap:var(--gap);justify-content:space-between;display:flex}.shortcut-recorder-dot{background:var(--color-error);border-radius:50%;width:6px;height:6px;animation:1.1s ease-in-out infinite shortcut-recorder-blink}.shortcut-recorder-error{animation:shortcut-recorder-reveal .18s var(--timing-function-out);color:var(--color-error);font-size:var(--font-size-small);text-overflow:ellipsis;white-space:nowrap;display:block;overflow:hidden}.shortcut-recorder-field{background:var(--background);border-radius:var(--border-radius);box-shadow:inset 0 0 0 var(--border-width) var(--border-color);color:inherit;cursor:pointer;font:inherit;align-items:center;gap:var(--gap);height:var(--height);min-width:var(--min-width);padding:0 var(--padding-horizontal);transition:background var(--transition-duration) var(--timing-function-out), box-shadow var(--transition-duration) var(--timing-function-out);border:0;outline:none;flex-shrink:0;justify-content:flex-end;display:flex}.shortcut-recorder-field:not(.--active):focus-visible{outline:var(--focus-width) solid var(--focus-color);outline-offset:var(--focus-offset)}.shortcut-recorder-field[data-shake="1"]{animation:.32s ease-out shortcut-recorder-shake-1}.shortcut-recorder-field[data-shake="2"]{animation:.32s ease-out shortcut-recorder-shake-2}.shortcut-recorder-key{background:var(--background);border-radius:var(--border-radius);box-shadow:inset 0 0 0 1px var(--border-color), 0 1px 0 var(--border-color);font-family:inherit;font-size:var(--font-size-small);font-weight:var(--font-weight-500);height:var(--size);min-width:var(--size);padding:0 var(--padding-horizontal);place-items:center;display:grid}.shortcut-recorder-key--enter{animation:shortcut-recorder-enter .3s var(--timing-function-spring) backwards}.shortcut-recorder-key--settle{animation:shortcut-recorder-settle .3s var(--timing-function-spring) calc(var(--index) * 30ms) backwards}.shortcut-recorder-label{flex:auto;min-width:0;position:relative}.shortcut-recorder-placeholder{color:var(--color-muted);font-size:var(--font-size-small);align-items:center;gap:6px;padding:0 6px;display:flex}.shortcut-recorder-placeholder--fade{animation:shortcut-recorder-fade .18s var(--timing-function-out)}.shortcut-recorder-status{padding-top:2px;position:absolute;inset:100% 0 auto}@media (prefers-reduced-motion:reduce){.shortcut-recorder-dot,.shortcut-recorder-error,.shortcut-recorder-field,.shortcut-recorder-key,.shortcut-recorder-placeholder{transition:none;animation:none}}@keyframes shortcut-recorder-blink{50%{opacity:.25}}@keyframes shortcut-recorder-enter{0%{filter:blur(3px);opacity:0;scale:.8}}@keyframes shortcut-recorder-fade{0%{opacity:0}}@keyframes shortcut-recorder-reveal{0%{filter:blur(3px);opacity:0;translate:0 -2px}}@keyframes shortcut-recorder-settle{0%{opacity:.6;translate:0 -3px;scale:1.08}}@keyframes shortcut-recorder-shake-1{20%{translate:-4px}40%{translate:4px}60%{translate:-3px}80%{translate:3px}}@keyframes shortcut-recorder-shake-2{20%{translate:-4px}40%{translate:4px}60%{translate:-3px}80%{translate:3px}}}
|
|
2
|
+
/*$vite$:1*/
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { type Attributes } from '@esportsplus/template';
|
|
2
|
+
import './scss/index.scss';
|
|
3
|
+
type A = Attributes & {
|
|
4
|
+
[SHORTCUT_SHEET_DIALOG]?: Dialog;
|
|
5
|
+
[SHORTCUT_SHEET_INPUT]?: Field;
|
|
6
|
+
[SHORTCUT_SHEET_ROW]?: Attributes;
|
|
7
|
+
[SHORTCUT_SHEET_TRIGGER]?: Attributes;
|
|
8
|
+
label?: string;
|
|
9
|
+
shortcuts: Shortcut[];
|
|
10
|
+
state?: State;
|
|
11
|
+
};
|
|
12
|
+
type Dialog = Attributes<HTMLDialogElement> & {
|
|
13
|
+
oncancel?: never;
|
|
14
|
+
onclick?: never;
|
|
15
|
+
onclose?: never;
|
|
16
|
+
onconnect?: never;
|
|
17
|
+
ondisconnect?: never;
|
|
18
|
+
};
|
|
19
|
+
type Field = Attributes & {
|
|
20
|
+
onfocusin?: never;
|
|
21
|
+
onfocusout?: never;
|
|
22
|
+
onrender?: never;
|
|
23
|
+
};
|
|
24
|
+
type Shortcut = {
|
|
25
|
+
group: string;
|
|
26
|
+
id: string;
|
|
27
|
+
keys: string[];
|
|
28
|
+
label: string;
|
|
29
|
+
};
|
|
30
|
+
type State = {
|
|
31
|
+
active: boolean;
|
|
32
|
+
flash: string;
|
|
33
|
+
query: string;
|
|
34
|
+
};
|
|
35
|
+
declare const SHORTCUT_SHEET_DIALOG: unique symbol;
|
|
36
|
+
declare const SHORTCUT_SHEET_INPUT: unique symbol;
|
|
37
|
+
declare const SHORTCUT_SHEET_ROW: unique symbol;
|
|
38
|
+
declare const SHORTCUT_SHEET_TRIGGER: unique symbol;
|
|
39
|
+
declare const _default: ((this: {
|
|
40
|
+
attributes?: A;
|
|
41
|
+
} | void, { label, shortcuts, state, ...attributes }: A) => DocumentFragment | Text) & {
|
|
42
|
+
readonly dialog: typeof SHORTCUT_SHEET_DIALOG;
|
|
43
|
+
readonly input: typeof SHORTCUT_SHEET_INPUT;
|
|
44
|
+
readonly row: typeof SHORTCUT_SHEET_ROW;
|
|
45
|
+
readonly trigger: typeof SHORTCUT_SHEET_TRIGGER;
|
|
46
|
+
};
|
|
47
|
+
export default _default;
|
|
48
|
+
export type { Shortcut, State };
|
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
2
|
+
import { effect } from '@esportsplus/reactivity';
|
|
3
|
+
import * as template_u1 from '@esportsplus/template';
|
|
4
|
+
import input from '../input/index.js';
|
|
5
|
+
import modal from '../modal/index.js';
|
|
6
|
+
import './scss/index.scss';
|
|
7
|
+
const template_0xyou7j1 = template_u1.template(`<svg aria-hidden='true' class='shortcut-sheet-search-icon' fill='none' stroke='currentColor' stroke-linecap='round' stroke-width='1.5' viewBox='0 0 16 16'><circle cx='7' cy='7' r='4.25' /><path d='m10.25 10.25 3 3' />`);
|
|
8
|
+
const template_0xyou7j3 = template_u1.template(`<div class='shortcut-sheet'><button aria-haspopup='dialog' aria-keyshortcuts='?' class='shortcut-sheet-trigger' type='button'><!--$--><kbd class='shortcut-sheet-kbd'>?`);
|
|
9
|
+
const template_0xyou7j8 = template_u1.template(`<div class='shortcut-sheet-panel'><div class='shortcut-sheet-header'><h2 class='shortcut-sheet-title'></h2><button aria-label='Close' class='shortcut-sheet-close' type='button'><svg aria-hidden='true' fill='none' stroke='currentColor' stroke-linecap='round' stroke-width='1.5' viewBox='0 0 16 16'><path d='m4.5 4.5 7 7M11.5 4.5l-7 7' /></svg></button></div><div class='shortcut-sheet-search'><!--$--></div><p aria-live='polite' class='shortcut-sheet-sr'></p><div aria-label='Shortcuts' class='shortcut-sheet-list' role='region' tabindex='0'><!--$-->`);
|
|
10
|
+
const template_0xyou7ji = template_u1.template(`<section class='shortcut-sheet-group'><h3 class='shortcut-sheet-group-label'></h3><ul class='shortcut-sheet-rows'>`);
|
|
11
|
+
const template_0xyou7jn = template_u1.template(`<li class='shortcut-sheet-row '><span class='shortcut-sheet-label'></span><span class='shortcut-sheet-sr'></span><span aria-hidden='true' class='shortcut-sheet-keys'>`);
|
|
12
|
+
const template_0xyou7jt = template_u1.template(`<kbd class='shortcut-sheet-kbd'>`);
|
|
13
|
+
const template_0xyou7jw = template_u1.template(`<p class='shortcut-sheet-empty'>No shortcuts match “<!--$-->”`);
|
|
14
|
+
class ReactiveObject_0xyou7j0 extends reactivity_u0.ReactiveObject {
|
|
15
|
+
#active = this[reactivity_u0.SIGNAL](false);
|
|
16
|
+
#flash = this[reactivity_u0.SIGNAL]('');
|
|
17
|
+
#query = this[reactivity_u0.SIGNAL]('');
|
|
18
|
+
constructor() {
|
|
19
|
+
super(null);
|
|
20
|
+
}
|
|
21
|
+
get active() {
|
|
22
|
+
return reactivity_u0.read(this.#active);
|
|
23
|
+
}
|
|
24
|
+
set active(_v0) {
|
|
25
|
+
reactivity_u0.write(this.#active, _v0);
|
|
26
|
+
}
|
|
27
|
+
get flash() {
|
|
28
|
+
return reactivity_u0.read(this.#flash);
|
|
29
|
+
}
|
|
30
|
+
set flash(_v1) {
|
|
31
|
+
reactivity_u0.write(this.#flash, _v1);
|
|
32
|
+
}
|
|
33
|
+
get query() {
|
|
34
|
+
return reactivity_u0.read(this.#query);
|
|
35
|
+
}
|
|
36
|
+
set query(_v2) {
|
|
37
|
+
reactivity_u0.write(this.#query, _v2);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const FLASH = 600;
|
|
41
|
+
const FOCUSABLE = 'a[href], button:not([disabled]), input:not([disabled]), [tabindex]:not([tabindex="-1"])';
|
|
42
|
+
const GLYPHS = {
|
|
43
|
+
Alt: '⌥',
|
|
44
|
+
Mod: '⌘',
|
|
45
|
+
Shift: '⇧'
|
|
46
|
+
};
|
|
47
|
+
const SHORTCUT_SHEET_DIALOG = Symbol.for('@esportsplus/ui/shortcut-sheet.dialog');
|
|
48
|
+
const SHORTCUT_SHEET_INPUT = Symbol.for('@esportsplus/ui/shortcut-sheet.input');
|
|
49
|
+
const SHORTCUT_SHEET_ROW = Symbol.for('@esportsplus/ui/shortcut-sheet.row');
|
|
50
|
+
const SHORTCUT_SHEET_TRIGGER = Symbol.for('@esportsplus/ui/shortcut-sheet.trigger');
|
|
51
|
+
const SPOKEN = {
|
|
52
|
+
'-': 'minus',
|
|
53
|
+
'=': 'equals',
|
|
54
|
+
'?': 'question mark',
|
|
55
|
+
'[': 'left bracket',
|
|
56
|
+
']': 'right bracket'
|
|
57
|
+
};
|
|
58
|
+
let uid = 0;
|
|
59
|
+
function editable(target) {
|
|
60
|
+
return target instanceof HTMLElement && (target.isContentEditable || target.closest('input, textarea, select, [contenteditable]') !== null);
|
|
61
|
+
}
|
|
62
|
+
function filter(shortcuts, query) {
|
|
63
|
+
let count = 0, groups = [], keys = new Map(), q = query.trim().toLowerCase();
|
|
64
|
+
for (let i = 0, n = shortcuts.length; i < n; i++) {
|
|
65
|
+
let shortcut = shortcuts[i];
|
|
66
|
+
if (q && !shortcut.label.toLowerCase().includes(q) && !shortcut.group.toLowerCase().includes(q)) {
|
|
67
|
+
continue;
|
|
68
|
+
}
|
|
69
|
+
let group = keys.get(shortcut.group);
|
|
70
|
+
if (!group) {
|
|
71
|
+
group = { group: shortcut.group, items: [] };
|
|
72
|
+
groups.push(group);
|
|
73
|
+
keys.set(shortcut.group, group);
|
|
74
|
+
}
|
|
75
|
+
group.items.push(shortcut);
|
|
76
|
+
count++;
|
|
77
|
+
}
|
|
78
|
+
return { count, groups };
|
|
79
|
+
}
|
|
80
|
+
function glyph(key, mac) {
|
|
81
|
+
if (key === 'Mod') {
|
|
82
|
+
return mac ? '⌘' : 'Ctrl';
|
|
83
|
+
}
|
|
84
|
+
return (mac && GLYPHS[key]) || key;
|
|
85
|
+
}
|
|
86
|
+
function matches(e, keys, mac) {
|
|
87
|
+
let key = keys[keys.length - 1], mod = mac ? e.metaKey : e.ctrlKey, other = mac ? e.ctrlKey : e.metaKey;
|
|
88
|
+
if (other || mod !== keys.includes('Mod') || e.altKey !== keys.includes('Alt')) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
if (key === '?') {
|
|
92
|
+
return e.key === '?';
|
|
93
|
+
}
|
|
94
|
+
if (e.shiftKey !== keys.includes('Shift')) {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
return e.key.toLowerCase() === key.toLowerCase();
|
|
98
|
+
}
|
|
99
|
+
function restore(e) {
|
|
100
|
+
e.currentTarget.classList.remove('--leaving');
|
|
101
|
+
}
|
|
102
|
+
function search() {
|
|
103
|
+
return template_0xyou7j1();
|
|
104
|
+
}
|
|
105
|
+
function spoken(keys, mac) {
|
|
106
|
+
let words = [];
|
|
107
|
+
for (let i = 0, n = keys.length; i < n; i++) {
|
|
108
|
+
let key = keys[i];
|
|
109
|
+
words.push(key === 'Mod' ? (mac ? 'Command' : 'Control') : (SPOKEN[key] ?? key));
|
|
110
|
+
}
|
|
111
|
+
return words.join(' ');
|
|
112
|
+
}
|
|
113
|
+
export default Object.assign(function ({ label = 'Keyboard shortcuts', shortcuts, state = new ReactiveObject_0xyou7j0(), ...attributes }) {
|
|
114
|
+
let id = `shortcut-sheet-${++uid}`, mac = /Mac|iPhone|iPad/.test(navigator.platform), overflow = '', padding = '', release, results = reactivity_u0.computed(() => filter(shortcuts, state.query)), stop, timer, trigger;
|
|
115
|
+
function lock() {
|
|
116
|
+
let body = document.body, gap = innerWidth - document.documentElement.clientWidth;
|
|
117
|
+
overflow = body.style.overflow;
|
|
118
|
+
padding = body.style.paddingRight;
|
|
119
|
+
if (gap > 0) {
|
|
120
|
+
body.style.paddingRight = `${(parseFloat(getComputedStyle(body).paddingRight) || 0) + gap}px`;
|
|
121
|
+
}
|
|
122
|
+
body.style.overflow = 'hidden';
|
|
123
|
+
}
|
|
124
|
+
function onkeydown(e) {
|
|
125
|
+
if (e.defaultPrevented) {
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
let typing = editable(e.target);
|
|
129
|
+
if (!state.active) {
|
|
130
|
+
if (e.key !== '?' || e.metaKey || e.ctrlKey || e.altKey || e.repeat || typing || !trigger?.isConnected || trigger.closest('[inert]')) {
|
|
131
|
+
return;
|
|
132
|
+
}
|
|
133
|
+
e.preventDefault();
|
|
134
|
+
show();
|
|
135
|
+
return;
|
|
136
|
+
}
|
|
137
|
+
if (e.key === '?' && !typing && !e.metaKey && !e.ctrlKey) {
|
|
138
|
+
e.preventDefault();
|
|
139
|
+
state.active = false;
|
|
140
|
+
return;
|
|
141
|
+
}
|
|
142
|
+
let hit, groups = reactivity_u0.read(results).groups;
|
|
143
|
+
for (let i = 0, n = groups.length; i < n && !hit; i++) {
|
|
144
|
+
hit = groups[i].items.find((s) => matches(e, s.keys, mac));
|
|
145
|
+
}
|
|
146
|
+
if (!hit || (typing && !hit.keys.includes('Mod'))) {
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
if (!(typing && /^[zZ]$/.test(e.key))) {
|
|
150
|
+
e.preventDefault();
|
|
151
|
+
}
|
|
152
|
+
e.stopPropagation();
|
|
153
|
+
clearTimeout(timer);
|
|
154
|
+
state.flash = hit.id;
|
|
155
|
+
timer = setTimeout(() => {
|
|
156
|
+
state.flash = '';
|
|
157
|
+
}, FLASH);
|
|
158
|
+
document.getElementById(`${id}-${hit.id}`)?.scrollIntoView({ block: 'nearest' });
|
|
159
|
+
}
|
|
160
|
+
function show() {
|
|
161
|
+
state.flash = '';
|
|
162
|
+
state.query = '';
|
|
163
|
+
state.active = true;
|
|
164
|
+
}
|
|
165
|
+
function unlock() {
|
|
166
|
+
document.body.style.overflow = overflow;
|
|
167
|
+
document.body.style.paddingRight = padding;
|
|
168
|
+
}
|
|
169
|
+
return (() => {
|
|
170
|
+
let root_0xyou7j2 = template_0xyou7j3(), element_0xyou7j4 = root_0xyou7j2.firstChild, element_0xyou7j5 = element_0xyou7j4.firstElementChild, element_0xyou7j6 = element_0xyou7j5.firstChild;
|
|
171
|
+
template_u1.setProperties(element_0xyou7j4, this?.attributes);
|
|
172
|
+
template_u1.setProperties(element_0xyou7j4, attributes);
|
|
173
|
+
template_u1.setProperties(element_0xyou7j5, this?.attributes?.[SHORTCUT_SHEET_TRIGGER]);
|
|
174
|
+
template_u1.setProperties(element_0xyou7j5, attributes[SHORTCUT_SHEET_TRIGGER]);
|
|
175
|
+
template_u1.setProperty(element_0xyou7j5, 'aria-expanded', () => state.active ? 'true' : 'false');
|
|
176
|
+
template_u1.delegate(element_0xyou7j5, 'click', show);
|
|
177
|
+
template_u1.onconnect(element_0xyou7j5, (element) => {
|
|
178
|
+
let locked = false;
|
|
179
|
+
trigger = element;
|
|
180
|
+
addEventListener('keydown', onkeydown, true);
|
|
181
|
+
stop = effect(() => {
|
|
182
|
+
if (state.active === locked) {
|
|
183
|
+
return;
|
|
184
|
+
}
|
|
185
|
+
locked = state.active;
|
|
186
|
+
if (locked) {
|
|
187
|
+
lock();
|
|
188
|
+
}
|
|
189
|
+
else {
|
|
190
|
+
clearTimeout(timer);
|
|
191
|
+
unlock();
|
|
192
|
+
}
|
|
193
|
+
});
|
|
194
|
+
});
|
|
195
|
+
template_u1.ondisconnect(element_0xyou7j5, () => {
|
|
196
|
+
clearTimeout(timer);
|
|
197
|
+
removeEventListener('keydown', onkeydown, true);
|
|
198
|
+
stop?.();
|
|
199
|
+
if (state.active) {
|
|
200
|
+
unlock();
|
|
201
|
+
}
|
|
202
|
+
});
|
|
203
|
+
template_u1.slot(element_0xyou7j6, label);
|
|
204
|
+
template_u1.slot(element_0xyou7j4, modal({
|
|
205
|
+
'aria-labelledby': `${id}-title`,
|
|
206
|
+
state,
|
|
207
|
+
...this?.attributes?.[SHORTCUT_SHEET_DIALOG],
|
|
208
|
+
...attributes[SHORTCUT_SHEET_DIALOG],
|
|
209
|
+
class: ['shortcut-sheet-dialog', this?.attributes?.[SHORTCUT_SHEET_DIALOG]?.class, attributes[SHORTCUT_SHEET_DIALOG]?.class].flat()
|
|
210
|
+
}, (() => {
|
|
211
|
+
let root_0xyou7j7 = template_0xyou7j8(), element_0xyou7j9 = root_0xyou7j7.firstChild, element_0xyou7ja = element_0xyou7j9.firstElementChild.firstElementChild, element_0xyou7jb = element_0xyou7ja.nextElementSibling, element_0xyou7jc = element_0xyou7j9.firstElementChild.nextElementSibling.firstChild, element_0xyou7jd = element_0xyou7j9.firstElementChild.nextElementSibling, element_0xyou7je = element_0xyou7jd.nextElementSibling, element_0xyou7jf = element_0xyou7je.nextElementSibling, element_0xyou7jg = element_0xyou7jf.firstChild;
|
|
212
|
+
template_u1.onconnect(element_0xyou7j9, (element) => {
|
|
213
|
+
let dialog = element.parentElement, stop = effect(() => {
|
|
214
|
+
if (!state.active && dialog.hasAttribute('open')) {
|
|
215
|
+
dialog.classList.add('--leaving');
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
dialog.addEventListener('close', restore);
|
|
219
|
+
release = () => {
|
|
220
|
+
dialog.removeEventListener('close', restore);
|
|
221
|
+
stop();
|
|
222
|
+
};
|
|
223
|
+
});
|
|
224
|
+
template_u1.ondisconnect(element_0xyou7j9, () => {
|
|
225
|
+
release?.();
|
|
226
|
+
});
|
|
227
|
+
template_u1.delegate(element_0xyou7j9, 'keydown', (e) => {
|
|
228
|
+
if (e.key !== 'Tab') {
|
|
229
|
+
return;
|
|
230
|
+
}
|
|
231
|
+
let items = Array.from(e.currentTarget.querySelectorAll(FOCUSABLE))
|
|
232
|
+
.filter((element) => element.getClientRects().length > 0);
|
|
233
|
+
if (!items.length) {
|
|
234
|
+
return;
|
|
235
|
+
}
|
|
236
|
+
let first = items[0], last = items[items.length - 1];
|
|
237
|
+
if (e.shiftKey && document.activeElement === first) {
|
|
238
|
+
e.preventDefault();
|
|
239
|
+
last.focus();
|
|
240
|
+
}
|
|
241
|
+
else if (!e.shiftKey && document.activeElement === last) {
|
|
242
|
+
e.preventDefault();
|
|
243
|
+
first.focus();
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
template_u1.setProperty(element_0xyou7ja, 'id', template_u1.interpolate([(id), "-title"]));
|
|
247
|
+
template_u1.slot(element_0xyou7ja, label, 1);
|
|
248
|
+
template_u1.delegate(element_0xyou7jb, 'click', () => state.active = false);
|
|
249
|
+
template_u1.slot(element_0xyou7jc, search());
|
|
250
|
+
template_u1.slot(element_0xyou7jd, input({
|
|
251
|
+
'aria-controls': `${id}-list`,
|
|
252
|
+
'aria-label': 'Search shortcuts',
|
|
253
|
+
autocomplete: 'off',
|
|
254
|
+
autofocus: true,
|
|
255
|
+
class: 'shortcut-sheet-input',
|
|
256
|
+
oninput: (e) => {
|
|
257
|
+
state.query = e.target.value;
|
|
258
|
+
},
|
|
259
|
+
placeholder: 'Search shortcuts',
|
|
260
|
+
spellcheck: false,
|
|
261
|
+
type: 'search',
|
|
262
|
+
value: () => state.query,
|
|
263
|
+
...this?.attributes?.[SHORTCUT_SHEET_INPUT],
|
|
264
|
+
...attributes[SHORTCUT_SHEET_INPUT]
|
|
265
|
+
}), 2);
|
|
266
|
+
new template_u1.EffectSlot(element_0xyou7je, () => state.query ? `${reactivity_u0.read(results).count} ${reactivity_u0.read(results).count === 1 ? 'shortcut' : 'shortcuts'}` : '', 1);
|
|
267
|
+
template_u1.setProperty(element_0xyou7jf, 'id', template_u1.interpolate([(id), "-list"]));
|
|
268
|
+
new template_u1.EffectSlot(element_0xyou7jg, () => reactivity_u0.read(results).groups.map(({ group, items }, g) => {
|
|
269
|
+
let root_0xyou7jh = template_0xyou7ji(), element_0xyou7jj = root_0xyou7jh.firstChild, element_0xyou7jk = element_0xyou7jj.firstElementChild, element_0xyou7jl = element_0xyou7jk.nextElementSibling;
|
|
270
|
+
template_u1.setProperty(element_0xyou7jj, 'aria-labelledby', template_u1.interpolate([(id), "-group-", (g)]));
|
|
271
|
+
template_u1.setProperty(element_0xyou7jk, 'id', template_u1.interpolate([(id), "-group-", (g)]));
|
|
272
|
+
template_u1.slot(element_0xyou7jk, group, 1);
|
|
273
|
+
template_u1.slot(element_0xyou7jl, items.map((shortcut) => {
|
|
274
|
+
let root_0xyou7jm = template_0xyou7jn(), element_0xyou7jo = root_0xyou7jm.firstChild, element_0xyou7jp = element_0xyou7jo.firstElementChild, element_0xyou7jq = element_0xyou7jp.nextElementSibling, element_0xyou7jr = element_0xyou7jq.nextElementSibling;
|
|
275
|
+
template_u1.setList(element_0xyou7jo, 'class', () => state.flash === shortcut.id && '--active');
|
|
276
|
+
template_u1.setProperty(element_0xyou7jo, 'id', template_u1.interpolate([(id), "-", (shortcut.id)]));
|
|
277
|
+
template_u1.setProperties(element_0xyou7jo, this?.attributes?.[SHORTCUT_SHEET_ROW]);
|
|
278
|
+
template_u1.setProperties(element_0xyou7jo, attributes[SHORTCUT_SHEET_ROW]);
|
|
279
|
+
template_u1.slot(element_0xyou7jp, shortcut.label, 1);
|
|
280
|
+
template_u1.slot(element_0xyou7jq, spoken(shortcut.keys, mac), 1);
|
|
281
|
+
template_u1.slot(element_0xyou7jr, shortcut.keys.map((key) => {
|
|
282
|
+
let root_0xyou7js = template_0xyou7jt(), element_0xyou7ju = root_0xyou7js.firstChild;
|
|
283
|
+
template_u1.slot(element_0xyou7ju, glyph(key, mac), 1);
|
|
284
|
+
return root_0xyou7js;
|
|
285
|
+
}), 1);
|
|
286
|
+
return root_0xyou7jm;
|
|
287
|
+
}), 1);
|
|
288
|
+
return root_0xyou7jh;
|
|
289
|
+
}));
|
|
290
|
+
new template_u1.EffectSlot(element_0xyou7jf, () => !reactivity_u0.read(results).count && (() => {
|
|
291
|
+
let root_0xyou7jv = template_0xyou7jw(), element_0xyou7jx = root_0xyou7jv.firstChild.firstChild.nextSibling;
|
|
292
|
+
template_u1.slot(element_0xyou7jx, state.query.trim());
|
|
293
|
+
return root_0xyou7jv;
|
|
294
|
+
})(), 2);
|
|
295
|
+
return root_0xyou7j7;
|
|
296
|
+
})()), 2);
|
|
297
|
+
return root_0xyou7j2;
|
|
298
|
+
})();
|
|
299
|
+
}, {
|
|
300
|
+
dialog: SHORTCUT_SHEET_DIALOG,
|
|
301
|
+
input: SHORTCUT_SHEET_INPUT,
|
|
302
|
+
row: SHORTCUT_SHEET_ROW,
|
|
303
|
+
trigger: SHORTCUT_SHEET_TRIGGER
|
|
304
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer components {.shortcut-sheet{--close-duration:.1s;--color:var(--color-text-500);--color-muted:var(--color-text-300);--dialog-backdrop:color-mix(in srgb, var(--color-text-500) 10%, transparent);--dialog-background:var(--color-white-300);--dialog-height:min(480px, calc(100dvh - (var(--size-400) * 2)));--dialog-radius:var(--size-500);--dialog-scale:.98;--dialog-width:520px;--flash-duration:.5s;--font-size:calc(var(--font-size-400) * .875);--input-font-size:calc(var(--font-size-400) * .9375);--kbd-background:var(--color-white-300);--kbd-border-color:var(--color-border-300);--kbd-duration:.3s;--kbd-font-size:calc(var(--font-size-300) * .95);--kbd-pressed-background:var(--color-text-500);--kbd-pressed-color:var(--color-white-300);--kbd-size:24px;--open-duration:.15s;--raised:0 0 0 1px 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);--row-background:var(--color-grey-400);--row-height:40px;--surface:var(--color-grey-400);--timing-function:cubic-bezier(.23, 1, .32, 1);--title-font-size:calc(var(--font-size-400) * .9375)}.shortcut-sheet--blur{--dialog-backdrop:color-mix(in srgb, var(--color-black-500) 24%, transparent)}.shortcut-sheet{display:contents}.shortcut-sheet--blur .shortcut-sheet-dialog.modal::backdrop{-webkit-backdrop-filter:blur(var(--size-100));backdrop-filter:blur(var(--size-100))}.shortcut-sheet-close{color:var(--color-muted);cursor:pointer;touch-action:manipulation;height:36px;transition:background-color var(--open-duration) ease-out, color var(--open-duration) ease-out, scale var(--open-duration) ease-out;background:0 0;border:0;border-radius:50%;outline:none;flex-shrink:0;justify-content:center;align-items:center;width:36px;display:flex}.shortcut-sheet-close:active{scale:.96}.shortcut-sheet-close:focus-visible{outline:var(--border-width-500) solid var(--color)}.shortcut-sheet-close:hover{background:var(--surface);color:var(--color)}.shortcut-sheet-close svg{height:var(--size-400);width:var(--size-400)}.shortcut-sheet-dialog.modal{--backdrop:var(--dialog-backdrop);--margin-horizontal:var(--size-400);--max-width:var(--dialog-width);--scale:var(--dialog-scale);--transition-duration:var(--open-duration);--transition-timing-function:var(--timing-function);--translateY:0px;background:var(--dialog-background);border-radius:var(--dialog-radius);box-shadow:var(--raised);color:var(--color);overflow:hidden}.shortcut-sheet-dialog.modal:not(.--active){--transition-duration:var(--close-duration)}.shortcut-sheet-dialog.modal.--leaving{--scale:1}.shortcut-sheet-empty{color:var(--color-muted);font-size:var(--font-size);padding:var(--size-600) var(--size-100);text-align:center}.shortcut-sheet-group{width:100%;display:block}.shortcut-sheet-group-label{--font-size:var(--font-size-300);color:var(--color-muted);font-weight:var(--font-weight-500);padding:var(--size-400) var(--size-100) calc(var(--size-100) / 2)}.shortcut-sheet-header{height:56px;padding-inline:var(--size-500) 10px;flex-shrink:0;justify-content:space-between;align-items:center;display:flex}.shortcut-sheet-input.input{--background-default:var(--surface);--border-radius:var(--border-radius-400);--color-default:var(--color);--font-size:var(--input-font-size);--padding-horizontal:var(--size-300);--padding-vertical:0px;--size:40px;outline:none;height:40px;padding-inline-start:36px}.shortcut-sheet-input.input:focus-visible{outline:var(--border-width-500) solid var(--color)}.shortcut-sheet-input.input::placeholder{color:var(--color-muted)}.shortcut-sheet-input.input::-webkit-search-cancel-button{display:none}.shortcut-sheet-kbd{background:var(--kbd-background);border-radius:var(--border-radius-300);box-shadow:0 0 0 var(--border-width-400) var(--kbd-border-color), inset 0 calc(var(--border-width-400) * -1) 0 var(--kbd-border-color);color:var(--color-muted);font-family:inherit;font-size:var(--kbd-font-size);height:var(--kbd-size);min-width:var(--kbd-size);transition:background-color var(--kbd-duration) ease-out, box-shadow var(--kbd-duration) ease-out, color var(--kbd-duration) ease-out, translate var(--kbd-duration) ease-out;justify-content:center;align-items:center;padding-inline:6px;line-height:1;display:flex}.--active>*>.shortcut-sheet-kbd{background:var(--kbd-pressed-background);box-shadow:none;color:var(--kbd-pressed-color);transition-duration:0s;translate:0 1px}.shortcut-sheet-keys{gap:calc(var(--size-100) / 2);flex-shrink:0;display:flex}.shortcut-sheet-label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.shortcut-sheet-list{border-radius:0 0 var(--dialog-radius) var(--dialog-radius);overscroll-behavior:contain;min-height:0;padding:0 var(--size-300) var(--size-300);outline:none;flex:auto;overflow-y:auto}.shortcut-sheet-list:focus-visible{outline:var(--border-width-500) solid var(--color);outline-offset:calc(var(--border-width-500) * -1)}.shortcut-sheet-panel{height:var(--dialog-height);flex-direction:column;display:flex}.shortcut-sheet-row{border-radius:var(--border-radius-400);color:var(--color);font-size:var(--font-size);align-items:center;gap:var(--size-400);height:var(--row-height);padding-inline:var(--size-100);transition:background-color var(--flash-duration) ease-out;justify-content:space-between;display:flex}.shortcut-sheet-row.--active{background:var(--row-background);transition-duration:0s}.shortcut-sheet-rows{margin:0;padding:0;list-style:none}.shortcut-sheet-search{color:var(--color-muted);margin-inline:var(--size-300);flex-shrink:0;position:relative}.shortcut-sheet-search-icon{height:var(--size-400);left:var(--size-300);pointer-events:none;width:var(--size-400);z-index:1;position:absolute;top:50%;translate:0 -50%}.shortcut-sheet-sr{clip-path:inset(50%);white-space:nowrap;width:1px;height:1px;position:absolute;overflow:hidden}.shortcut-sheet-title{--font-size:var(--title-font-size);color:var(--color);font-weight:var(--font-weight-600,var(--font-weight-500));width:auto}.shortcut-sheet-trigger{background:var(--surface);box-shadow:var(--raised);color:var(--color);cursor:pointer;font:inherit;font-size:var(--font-size);font-weight:var(--font-weight-500);height:40px;padding-inline:var(--size-400) var(--size-100);touch-action:manipulation;transition:scale var(--open-duration) ease-out;-webkit-user-select:none;user-select:none;border:0;border-radius:999px;outline:none;align-items:center;gap:10px;display:flex}.shortcut-sheet-trigger:active{scale:.96}.shortcut-sheet-trigger:focus-visible{outline:var(--border-width-500) solid var(--color);outline-offset:var(--border-width-500)}@media (prefers-reduced-motion:reduce){.shortcut-sheet-close:active,.shortcut-sheet-trigger:active{scale:1}.shortcut-sheet-dialog.modal{--scale:1;transition:opacity var(--transition-duration) var(--transition-timing-function)}.shortcut-sheet-dialog.modal::backdrop{transition:opacity var(--transition-duration) var(--transition-timing-function)}.shortcut-sheet-kbd{transition:background-color var(--kbd-duration) ease-out, color var(--kbd-duration) ease-out}.--active>*>.shortcut-sheet-kbd{translate:none}}}
|
|
2
|
+
/*$vite$:1*/
|
|
@@ -1,4 +1,13 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_u1 from '@esportsplus/template';
|
|
2
2
|
import './scss/index.scss';
|
|
3
|
-
declare const _default:
|
|
3
|
+
declare const _default: {
|
|
4
|
+
(): template_u1.Renderable<any>;
|
|
5
|
+
<T extends template_u1.Attributes>(attributes: T): template_u1.Renderable<any>;
|
|
6
|
+
<T extends template_u1.Renderable<any>>(content: T): template_u1.Renderable<any>;
|
|
7
|
+
(attributes: template_u1.Attributes, content?: template_u1.Renderable<any>): template_u1.Renderable<any>;
|
|
8
|
+
bind(context: {
|
|
9
|
+
attributes?: Partial<template_u1.Attributes> | undefined;
|
|
10
|
+
content?: template_u1.Renderable<any>;
|
|
11
|
+
}): any;
|
|
12
|
+
};
|
|
4
13
|
export default _default;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_u1 from '@esportsplus/template';
|
|
2
2
|
import { component } from '@esportsplus/template';
|
|
3
3
|
import './scss/index.scss';
|
|
4
|
-
const
|
|
4
|
+
const template_1dvlyft1 = template_u1.template(`<div class='sidebar --flex-column --scrollbar'>`);
|
|
5
5
|
export default component(function (attributes, content) {
|
|
6
6
|
return (() => {
|
|
7
|
-
let
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
return
|
|
7
|
+
let root_1dvlyft0 = template_1dvlyft1(), element_1dvlyft2 = root_1dvlyft0.firstChild;
|
|
8
|
+
template_u1.setProperties(element_1dvlyft2, this?.attributes);
|
|
9
|
+
template_u1.setProperties(element_1dvlyft2, attributes);
|
|
10
|
+
template_u1.slot(element_1dvlyft2, content, 1);
|
|
11
|
+
return root_1dvlyft0;
|
|
12
12
|
})();
|
|
13
13
|
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@layer components {.sidebar{--margin-horizontal:0px;--margin-vertical:0px;--width:var(--width-default);--width-closed:var(--width-default);--width-default:320px}.sidebar:not(.--active):not(:hover){--width:var(--width-closed)}.sidebar--floating{--margin-horizontal:var(--size-100);--margin-vertical:var(--size-100)}.sidebar{top:var(--margin-vertical);bottom:var(--margin-vertical);cursor:default;height:calc(100% - var(--margin-vertical) * 2);transition:max-width var(--transition-duration) var(--transition-timing-function), opacity var(--transition-duration) var(--transition-timing-function),
|
|
1
|
+
@layer components {.sidebar{--margin-horizontal:0px;--margin-vertical:0px;--width:var(--width-default);--width-closed:var(--width-default);--width-default:320px}.sidebar:not(.--active):not(:hover){--width:var(--width-closed)}.sidebar--floating{--margin-horizontal:var(--size-100);--margin-vertical:var(--size-100)}.sidebar{top:var(--margin-vertical);bottom:var(--margin-vertical);cursor:default;height:calc(100% - var(--margin-vertical) * 2);transition:max-width var(--transition-duration) var(--transition-timing-function), opacity var(--transition-duration) var(--transition-timing-function), translate var(--transition-duration) var(--transition-timing-function);width:min(var(--width), 100% - var(--margin-horizontal) * 2);z-index:9;position:absolute}.sidebar:not(.--active) input[type=password]{display:none}.sidebar--e{right:var(--margin-horizontal)}.sidebar--e.sidebar--offscreen:not(.--active){translate:var(--width)}.sidebar--w{left:var(--margin-horizontal)}.sidebar--w.sidebar--offscreen:not(.--active){translate:calc(var(--width) * -1)}.sidebar-content{flex:0 0 var(--width-default);width:var(--width-default)}}
|
|
2
2
|
/*$vite$:1*/
|