@esportsplus/ui 0.54.0 → 0.56.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +144 -4
- package/build/components/accordion/index.d.ts +2157 -8
- package/build/components/accordion/index.js +25 -11
- package/build/components/accordion/more.d.ts +20 -0
- package/build/components/accordion/more.js +76 -0
- package/build/components/accordion/scss/index.scss +1 -1
- package/build/components/anchor/scss/index.scss +1 -1
- package/build/components/announcement-banner/index.d.ts +33 -0
- package/build/components/announcement-banner/index.js +61 -0
- package/build/components/announcement-banner/scss/index.scss +2 -0
- package/build/components/autosave/index.d.ts +12 -0
- package/build/components/autosave/index.js +140 -0
- package/build/components/autosave/scss/index.scss +2 -0
- package/build/components/back-to-top/index.d.ts +16 -0
- package/build/components/back-to-top/index.js +182 -0
- package/build/components/back-to-top/scss/index.scss +2 -0
- package/build/components/bento-grid/index.d.ts +25 -0
- package/build/components/bento-grid/index.js +38 -0
- package/build/components/bento-grid/scss/index.scss +2 -0
- package/build/components/bento-grid-spotlight/index.d.ts +35 -0
- package/build/components/bento-grid-spotlight/index.js +108 -0
- package/build/components/bento-grid-spotlight/scss/index.scss +2 -0
- package/build/components/bookmark-button/index.d.ts +23 -0
- package/build/components/bookmark-button/index.js +120 -0
- package/build/components/bookmark-button/scss/index.scss +2 -0
- package/build/components/breadcrumb/ellipsis.d.ts +12 -0
- package/build/components/breadcrumb/ellipsis.js +11 -0
- package/build/components/breadcrumb/index.d.ts +29 -0
- package/build/components/breadcrumb/index.js +19 -0
- package/build/components/breadcrumb/item.d.ts +12 -0
- package/build/components/breadcrumb/item.js +9 -0
- package/build/components/breadcrumb/link.d.ts +15 -0
- package/build/components/breadcrumb/link.js +14 -0
- package/build/components/breadcrumb/list.d.ts +12 -0
- package/build/components/breadcrumb/list.js +9 -0
- package/build/components/breadcrumb/menu.d.ts +13 -0
- package/build/components/breadcrumb/menu.js +16 -0
- package/build/components/breadcrumb/page.d.ts +12 -0
- package/build/components/breadcrumb/page.js +9 -0
- package/build/components/breadcrumb/scss/index.scss +2 -0
- package/build/components/breadcrumb/separator.d.ts +12 -0
- package/build/components/breadcrumb/separator.js +11 -0
- package/build/components/breadcrumb/svg/caret.svg +1 -0
- package/build/components/breadcrumb/svg/chevron.svg +1 -0
- package/build/components/breadcrumb/svg/more.svg +1 -0
- package/build/components/breadcrumbs/index.d.ts +27 -0
- package/build/components/breadcrumbs/index.js +324 -0
- package/build/components/breadcrumbs/scss/index.scss +2 -0
- package/build/components/button/copy.d.ts +21 -0
- package/build/components/button/copy.js +48 -0
- package/build/components/button/faces.d.ts +10 -0
- package/build/components/button/faces.js +16 -0
- package/build/components/button/fan.d.ts +24 -0
- package/build/components/button/fan.js +117 -0
- package/build/components/button/hold.d.ts +31 -0
- package/build/components/button/hold.js +117 -0
- package/build/components/button/icons.d.ts +6 -0
- package/build/components/button/icons.js +12 -0
- package/build/components/button/index.d.ts +14 -0
- package/build/components/button/index.js +8 -0
- package/build/components/button/kbd.d.ts +15 -0
- package/build/components/button/kbd.js +106 -0
- package/build/components/button/loading.d.ts +22 -0
- package/build/components/button/loading.js +60 -0
- package/build/components/button/scss/index.scss +1 -1
- package/build/components/button/svg/plus.svg +1 -0
- package/build/components/card/scss/index.scss +1 -1
- package/build/components/card-input/index.d.ts +31 -0
- package/build/components/card-input/index.js +562 -0
- package/build/components/card-input/scss/index.scss +2 -0
- package/build/components/carousel-3d/index.d.ts +27 -0
- package/build/components/carousel-3d/index.js +248 -0
- package/build/components/carousel-3d/scss/index.scss +2 -0
- package/build/components/checkbox/index.d.ts +1447 -11
- package/build/components/checkbox/index.js +50 -66
- package/build/components/checkbox/scss/index.scss +1 -1
- package/build/components/checkbox-group/index.d.ts +30 -0
- package/build/components/checkbox-group/index.js +101 -0
- package/build/components/checkbox-group/scss/index.scss +2 -0
- package/build/components/clipboard/copy.d.ts +21 -5
- package/build/components/clipboard/copy.js +28 -29
- package/build/components/clipboard/index.d.ts +2165 -1435
- package/build/components/clipboard/index.js +2 -3
- package/build/components/code-morph/index.d.ts +25 -0
- package/build/components/code-morph/index.js +401 -0
- package/build/components/code-morph/scss/index.scss +2 -0
- package/build/components/collapsible-sidebar/index.d.ts +41 -0
- package/build/components/collapsible-sidebar/index.js +105 -0
- package/build/components/collapsible-sidebar/scss/index.scss +2 -0
- package/build/components/color-picker/index.d.ts +19 -0
- package/build/components/color-picker/index.js +569 -0
- package/build/components/color-picker/scss/index.scss +2 -0
- package/build/components/command/constants.d.ts +3 -0
- package/build/components/command/constants.js +3 -0
- package/build/components/command/index.d.ts +30 -0
- package/build/components/command/index.js +188 -0
- package/build/components/command/scss/index.scss +2 -0
- package/build/components/command-palette/index.d.ts +51 -0
- package/build/components/command-palette/index.js +319 -0
- package/build/components/command-palette/scss/index.scss +2 -0
- package/build/components/composer/index.d.ts +29 -0
- package/build/components/composer/index.js +79 -0
- package/build/components/composer/scss/index.scss +2 -0
- package/build/components/composer/svg/arrow-up.svg +1 -0
- package/build/components/container/scss/index.scss +1 -1
- package/build/components/contribution-heatmap/index.d.ts +30 -0
- package/build/components/contribution-heatmap/index.js +236 -0
- package/build/components/contribution-heatmap/scss/index.scss +2 -0
- package/build/components/counter/index.d.ts +3 -1
- package/build/components/counter/index.js +54 -31
- package/build/components/counter/scss/index.scss +1 -1
- package/build/components/datalist/index.d.ts +37 -0
- package/build/components/datalist/index.js +159 -0
- package/build/components/datalist/scss/index.scss +2 -0
- package/build/components/date-range-picker/index.d.ts +28 -0
- package/build/components/date-range-picker/index.js +443 -0
- package/build/components/date-range-picker/scss/index.scss +2 -0
- package/build/components/dock/index.d.ts +24 -0
- package/build/components/dock/index.js +200 -0
- package/build/components/dock/scss/index.scss +2 -0
- package/build/components/dynamic-island/index.d.ts +23 -0
- package/build/components/dynamic-island/index.js +179 -0
- package/build/components/dynamic-island/scss/index.scss +2 -0
- package/build/components/email-typo-fix/index.d.ts +28 -0
- package/build/components/email-typo-fix/index.js +416 -0
- package/build/components/email-typo-fix/scss/index.scss +2 -0
- package/build/components/expanding-card/index.d.ts +26 -0
- package/build/components/expanding-card/index.js +265 -0
- package/build/components/expanding-card/scss/index.scss +2 -0
- package/build/components/feature-spotlight/index.d.ts +37 -0
- package/build/components/feature-spotlight/index.js +248 -0
- package/build/components/feature-spotlight/scss/index.scss +2 -0
- package/build/components/file-tree/index.d.ts +31 -0
- package/build/components/file-tree/index.js +208 -0
- package/build/components/file-tree/scss/index.scss +2 -0
- package/build/components/filter-grid/index.d.ts +23 -0
- package/build/components/filter-grid/index.js +240 -0
- package/build/components/filter-grid/scss/index.scss +2 -0
- package/build/components/form/action.d.ts +1 -1
- package/build/components/form/action.js +9 -12
- package/build/components/form/index.d.ts +1 -1
- package/build/components/form/scss/index.scss +1 -1
- package/build/components/gradient-text/index.d.ts +19 -0
- package/build/components/gradient-text/index.js +14 -0
- package/build/components/gradient-text/scss/index.scss +2 -0
- package/build/components/grid/scss/index.scss +1 -1
- package/build/components/header/index.d.ts +41 -0
- package/build/components/header/index.js +281 -0
- package/build/components/header/scss/index.scss +2 -0
- package/build/components/highlight/index.d.ts +25 -0
- package/build/components/highlight/index.js +218 -0
- package/build/components/highlight/scss/index.scss +2 -0
- package/build/components/hover-card/index.d.ts +47 -0
- package/build/components/hover-card/index.js +197 -0
- package/build/components/hover-card/scss/index.scss +2 -0
- package/build/components/icon/index.d.ts +11 -2
- package/build/components/icon/index.js +6 -6
- package/build/components/image/index.d.ts +14 -0
- package/build/components/image/index.js +62 -0
- package/build/components/image/scss/index.scss +2 -0
- package/build/components/index.d.ts +96 -1
- package/build/components/index.js +96 -1
- package/build/components/inline-edit/index.d.ts +30 -0
- package/build/components/inline-edit/index.js +108 -0
- package/build/components/inline-edit/scss/index.scss +2 -0
- package/build/components/input/index.d.ts +8 -2
- package/build/components/input/index.js +12 -13
- package/build/components/input/scss/index.scss +1 -1
- package/build/components/kanban-board/index.d.ts +23 -0
- package/build/components/kanban-board/index.js +235 -0
- package/build/components/kanban-board/scss/index.scss +2 -0
- package/build/components/lightbox/index.d.ts +32 -0
- package/build/components/lightbox/index.js +396 -0
- package/build/components/lightbox/scss/index.scss +2 -0
- package/build/components/lightbox/spring.d.ts +16 -0
- package/build/components/lightbox/spring.js +71 -0
- package/build/components/line-shadow-text/index.d.ts +17 -0
- package/build/components/line-shadow-text/index.js +15 -0
- package/build/components/line-shadow-text/scss/index.scss +2 -0
- package/build/components/link/scss/index.scss +1 -1
- package/build/components/loading/index.js +5 -7
- package/build/components/loading/scss/index.scss +1 -1
- package/build/components/log/index.d.ts +20 -0
- package/build/components/log/index.js +125 -0
- package/build/components/log/scss/index.scss +2 -0
- package/build/components/long-press/bind.d.ts +21 -0
- package/build/components/long-press/bind.js +136 -0
- package/build/components/long-press/button.d.ts +21 -0
- package/build/components/long-press/button.js +25 -0
- package/build/components/long-press/index.d.ts +2181 -0
- package/build/components/long-press/index.js +4 -0
- package/build/components/long-press/scss/index.scss +2 -0
- package/build/components/marquee/index.d.ts +20 -0
- package/build/components/marquee/index.js +236 -0
- package/build/components/marquee/scss/index.scss +2 -0
- package/build/components/modal/index.d.ts +24 -0
- package/build/components/modal/index.js +75 -0
- package/build/components/modal/scss/index.scss +1 -1
- package/build/components/morphing-button/index.d.ts +24 -0
- package/build/components/morphing-button/index.js +127 -0
- package/build/components/morphing-button/scss/index.scss +2 -0
- package/build/components/morphing-nav/index.d.ts +38 -0
- package/build/components/morphing-nav/index.js +342 -0
- package/build/components/morphing-nav/scss/index.scss +2 -0
- package/build/components/multi-step-form/index.d.ts +32 -0
- package/build/components/multi-step-form/index.js +305 -0
- package/build/components/multi-step-form/scss/index.scss +2 -0
- package/build/components/nested-menu/index.d.ts +27 -0
- package/build/components/nested-menu/index.js +374 -0
- package/build/components/nested-menu/scss/index.scss +2 -0
- package/build/components/notification-bell/index.d.ts +13 -0
- package/build/components/notification-bell/index.js +87 -0
- package/build/components/notification-bell/scss/index.scss +2 -0
- package/build/components/notification-bell/svg/bell.svg +1 -0
- package/build/components/onboarding-checklist/index.d.ts +29 -0
- package/build/components/onboarding-checklist/index.js +196 -0
- package/build/components/onboarding-checklist/scss/index.scss +2 -0
- package/build/components/overlay/index.d.ts +11 -2
- package/build/components/overlay/index.js +7 -7
- package/build/components/page-dots/index.d.ts +24 -0
- package/build/components/page-dots/index.js +116 -0
- package/build/components/page-dots/scss/index.scss +2 -0
- package/build/components/pagination/index.d.ts +11 -0
- package/build/components/pagination/index.js +109 -0
- package/build/components/pagination/scss/index.scss +2 -0
- package/build/components/pagination/svg/arrow-left.svg +1 -0
- package/build/components/pagination/svg/arrow-right.svg +1 -0
- package/build/components/password/constants.d.ts +2 -0
- package/build/components/password/constants.js +2 -0
- package/build/components/password/index.d.ts +22 -0
- package/build/components/password/index.js +74 -0
- package/build/components/password/scss/index.scss +2 -0
- package/build/components/progress/index.d.ts +15 -0
- package/build/components/progress/index.js +37 -0
- package/build/components/progress/scss/index.scss +2 -0
- package/build/components/pull-to-refresh/index.d.ts +26 -0
- package/build/components/pull-to-refresh/index.js +260 -0
- package/build/components/pull-to-refresh/scss/index.scss +2 -0
- package/build/components/radio/index.d.ts +3 -1442
- package/build/components/radio/index.js +2 -1
- package/build/components/radio-cards/index.d.ts +36 -0
- package/build/components/radio-cards/index.js +106 -0
- package/build/components/radio-cards/scss/index.scss +2 -0
- package/build/components/range/index.js +13 -13
- package/build/components/range/scss/index.scss +1 -1
- package/build/components/range-filter/index.d.ts +20 -0
- package/build/components/range-filter/index.js +216 -0
- package/build/components/range-filter/scss/index.scss +2 -0
- package/build/components/range-slider/index.d.ts +30 -0
- package/build/components/range-slider/index.js +287 -0
- package/build/components/range-slider/scss/index.scss +2 -0
- package/build/components/reading-progress/index.d.ts +13 -0
- package/build/components/reading-progress/index.js +106 -0
- package/build/components/reading-progress/scss/index.scss +2 -0
- package/build/components/relative-time/index.d.ts +25 -0
- package/build/components/relative-time/index.js +283 -0
- package/build/components/relative-time/scss/index.scss +2 -0
- package/build/components/root/scss/index.scss +1 -1
- package/build/components/scroll-fade/index.d.ts +39 -0
- package/build/components/scroll-fade/index.js +104 -0
- package/build/components/scroll-fade/scss/index.scss +2 -0
- package/build/components/scroll-spine/index.d.ts +26 -0
- package/build/components/scroll-spine/index.js +204 -0
- package/build/components/scroll-spine/scss/index.scss +2 -0
- package/build/components/scroll-velocity/index.d.ts +22 -0
- package/build/components/scroll-velocity/index.js +160 -0
- package/build/components/scroll-velocity/scss/index.scss +2 -0
- package/build/components/scrub-input/index.d.ts +39 -0
- package/build/components/scrub-input/index.js +221 -0
- package/build/components/scrub-input/scss/index.scss +2 -0
- package/build/components/select/index.d.ts +16 -8
- package/build/components/select/index.js +66 -81
- package/build/components/select/scss/index.scss +1 -1
- package/build/components/select-menu/index.d.ts +34 -0
- package/build/components/select-menu/index.js +329 -0
- package/build/components/select-menu/scss/index.scss +2 -0
- package/build/components/selection-toolbar/index.d.ts +36 -0
- package/build/components/selection-toolbar/index.js +442 -0
- package/build/components/selection-toolbar/scss/index.scss +2 -0
- package/build/components/settings/index.d.ts +43 -0
- package/build/components/settings/index.js +147 -0
- package/build/components/settings/scss/index.scss +2 -0
- package/build/components/settings/svg/close.svg +1 -0
- package/build/components/settings/svg/saved.svg +1 -0
- package/build/components/share-button/index.d.ts +29 -0
- package/build/components/share-button/index.js +191 -0
- package/build/components/share-button/scss/index.scss +2 -0
- package/build/components/sheet/index.d.ts +33 -0
- package/build/components/sheet/index.js +110 -0
- package/build/components/sheet/scss/index.scss +2 -0
- package/build/components/shiny-text/index.d.ts +17 -0
- package/build/components/shiny-text/index.js +14 -0
- package/build/components/shiny-text/scss/index.scss +2 -0
- package/build/components/shortcut-recorder/index.d.ts +12 -0
- package/build/components/shortcut-recorder/index.js +230 -0
- package/build/components/shortcut-recorder/scss/index.scss +2 -0
- package/build/components/shortcut-sheet/index.d.ts +48 -0
- package/build/components/shortcut-sheet/index.js +304 -0
- package/build/components/shortcut-sheet/scss/index.scss +2 -0
- package/build/components/sidebar/index.d.ts +11 -2
- package/build/components/sidebar/index.js +7 -7
- package/build/components/sidebar/scss/index.scss +1 -1
- package/build/components/slider/index.d.ts +25 -0
- package/build/components/slider/index.js +188 -0
- package/build/components/slider/scss/index.scss +2 -0
- package/build/components/sliding-tabs/index.d.ts +28 -0
- package/build/components/sliding-tabs/index.js +188 -0
- package/build/components/sliding-tabs/scss/index.scss +2 -0
- package/build/components/snap-carousel/index.d.ts +30 -0
- package/build/components/snap-carousel/index.js +233 -0
- package/build/components/snap-carousel/scss/index.scss +2 -0
- package/build/components/sortable/index.d.ts +9 -0
- package/build/components/sortable/index.js +302 -0
- package/build/components/sortable/scss/index.scss +2 -0
- package/build/components/sparkline/index.d.ts +26 -0
- package/build/components/sparkline/index.js +173 -0
- package/build/components/sparkline/scss/index.scss +2 -0
- package/build/components/stacked-drawer/index.d.ts +24 -0
- package/build/components/stacked-drawer/index.js +211 -0
- package/build/components/stacked-drawer/scss/index.scss +2 -0
- package/build/components/stat-counter/index.d.ts +32 -0
- package/build/components/stat-counter/index.js +216 -0
- package/build/components/stat-counter/scss/index.scss +2 -0
- package/build/components/status-picker/index.d.ts +32 -0
- package/build/components/status-picker/index.js +198 -0
- package/build/components/status-picker/scss/index.scss +2 -0
- package/build/components/sticky-header/index.d.ts +2159 -0
- package/build/components/sticky-header/index.js +98 -0
- package/build/components/sticky-header/scss/index.scss +2 -0
- package/build/components/sticky-stack/index.d.ts +33 -0
- package/build/components/sticky-stack/index.js +184 -0
- package/build/components/sticky-stack/scss/index.scss +2 -0
- package/build/components/story-progress/index.d.ts +26 -0
- package/build/components/story-progress/index.js +196 -0
- package/build/components/story-progress/scss/index.scss +2 -0
- package/build/components/swipe-deck/index.d.ts +19 -0
- package/build/components/swipe-deck/index.js +300 -0
- package/build/components/swipe-deck/scss/index.scss +2 -0
- package/build/components/switch/index.d.ts +3 -1442
- package/build/components/switch/index.js +2 -1
- package/build/components/tabs/scss/index.scss +1 -1
- package/build/components/tag-input/index.d.ts +27 -0
- package/build/components/tag-input/index.js +309 -0
- package/build/components/tag-input/scss/index.scss +2 -0
- package/build/components/task-list/index.d.ts +28 -0
- package/build/components/task-list/index.js +107 -0
- package/build/components/task-list/scss/index.scss +2 -0
- package/build/components/tasklist/constants.d.ts +2 -0
- package/build/components/tasklist/constants.js +2 -0
- package/build/components/tasklist/index.d.ts +730 -0
- package/build/components/tasklist/index.js +116 -0
- package/build/components/tasklist/scss/index.scss +2 -0
- package/build/components/text-animate/index.d.ts +30 -0
- package/build/components/text-animate/index.js +97 -0
- package/build/components/text-animate/scss/index.scss +2 -0
- package/build/components/text-progress/index.d.ts +13 -0
- package/build/components/text-progress/index.js +114 -0
- package/build/components/text-progress/scss/index.scss +2 -0
- package/build/components/textarea/index.d.ts +2159 -715
- package/build/components/textarea/index.js +16 -18
- package/build/components/textarea/scss/index.scss +1 -1
- package/build/components/thumbnail/scss/index.scss +1 -1
- package/build/components/toast/index.js +53 -43
- package/build/components/toast/manager.d.ts +4 -0
- package/build/components/toast/manager.js +19 -1
- package/build/components/toast/scss/index.scss +1 -1
- package/build/components/tooltip/context.d.ts +22 -0
- package/build/components/tooltip/context.js +66 -0
- package/build/components/tooltip/group.d.ts +29 -0
- package/build/components/tooltip/group.js +128 -0
- package/build/components/tooltip/index.d.ts +12 -2153
- package/build/components/tooltip/index.js +4 -1
- package/build/components/tooltip/menu.d.ts +23 -10
- package/build/components/tooltip/menu.js +16 -36
- package/build/components/tooltip/onclick.d.ts +22 -713
- package/build/components/tooltip/onclick.js +32 -18
- package/build/components/tooltip/onhover.d.ts +24 -711
- package/build/components/tooltip/onhover.js +85 -14
- package/build/components/tooltip/options.d.ts +7 -0
- package/build/components/tooltip/options.js +21 -0
- package/build/components/tooltip/scss/index.scss +1 -1
- package/build/components/tooltip/utilities.d.ts +4 -0
- package/build/components/tooltip/utilities.js +58 -0
- package/build/components/tree/index.d.ts +28 -0
- package/build/components/tree/index.js +182 -0
- package/build/components/tree/scss/index.scss +2 -0
- package/build/components/tree-view/index.d.ts +25 -0
- package/build/components/tree-view/index.js +205 -0
- package/build/components/tree-view/scss/index.scss +2 -0
- package/build/components/typewriter/index.d.ts +11 -2
- package/build/components/typewriter/index.js +16 -12
- package/build/components/typewriter/scss/index.scss +1 -1
- package/build/components/typewriter-retype/index.d.ts +8 -0
- package/build/components/typewriter-retype/index.js +122 -0
- package/build/components/typewriter-retype/scss/index.scss +2 -0
- package/build/components/undo-toast/index.d.ts +30 -0
- package/build/components/undo-toast/index.js +262 -0
- package/build/components/undo-toast/scss/index.scss +2 -0
- package/build/components/uptime/index.d.ts +21 -0
- package/build/components/uptime/index.js +210 -0
- package/build/components/uptime/scss/index.scss +2 -0
- package/build/components/usage-meter/index.d.ts +2159 -0
- package/build/components/usage-meter/index.js +30 -0
- package/build/components/usage-meter/scss/index.scss +2 -0
- package/build/components/value-flash/index.d.ts +12 -0
- package/build/components/value-flash/index.js +106 -0
- package/build/components/value-flash/scss/index.scss +2 -0
- package/build/components/waitlist-join/index.d.ts +34 -0
- package/build/components/waitlist-join/index.js +402 -0
- package/build/components/waitlist-join/scss/index.scss +2 -0
- package/build/components/web-search/brands.d.ts +121 -0
- package/build/components/web-search/brands.js +138 -0
- package/build/components/web-search/index.d.ts +31 -0
- package/build/components/web-search/index.js +245 -0
- package/build/components/web-search/scss/index.scss +2 -0
- package/build/components/word-rotator/index.d.ts +14 -0
- package/build/components/word-rotator/index.js +196 -0
- package/build/components/word-rotator/scss/index.scss +2 -0
- package/build/css-utilities/absolute/scss/index.scss +1 -1
- package/build/css-utilities/index.scss +1 -1
- package/build/css-utilities/scrollbar/scss/index.scss +1 -1
- package/build/themes/dark/input.d.ts +496 -492
- package/build/themes/dark/select.d.ts +3 -735
- package/build/themes/dark/select.js +4 -3
- package/build/themes/dark/textarea.d.ts +2172 -718
- package/package.json +6 -6
- package/pnpm-workspace.yaml +5 -5
- package/src/components/accordion/index.ts +13 -14
- package/src/components/accordion/more.ts +97 -0
- package/src/components/accordion/scss/index.scss +144 -1
- package/src/components/anchor/scss/index.scss +2 -2
- package/src/components/announcement-banner/index.ts +81 -0
- package/src/components/announcement-banner/scss/index.scss +183 -0
- package/src/components/announcement-banner/scss/variables.scss +18 -0
- package/src/components/autosave/index.ts +113 -0
- package/src/components/autosave/scss/index.scss +155 -0
- package/src/components/autosave/scss/variables.scss +22 -0
- package/src/components/back-to-top/index.ts +293 -0
- package/src/components/back-to-top/scss/index.scss +111 -0
- package/src/components/back-to-top/scss/variables.scss +30 -0
- package/src/components/banner/scss/variables.scss +1 -1
- package/src/components/bento-grid/index.ts +63 -0
- package/src/components/bento-grid/scss/index.scss +174 -0
- package/src/components/bento-grid/scss/variables.scss +19 -0
- package/src/components/bento-grid-spotlight/index.ts +133 -0
- package/src/components/bento-grid-spotlight/scss/index.scss +226 -0
- package/src/components/bento-grid-spotlight/scss/variables.scss +36 -0
- package/src/components/bookmark-button/index.ts +174 -0
- package/src/components/bookmark-button/scss/index.scss +162 -0
- package/src/components/bookmark-button/scss/variables.scss +28 -0
- package/src/components/breadcrumb/ellipsis.ts +17 -0
- package/src/components/breadcrumb/index.ts +32 -0
- package/src/components/breadcrumb/item.ts +10 -0
- package/src/components/breadcrumb/link.ts +21 -0
- package/src/components/breadcrumb/list.ts +10 -0
- package/src/components/breadcrumb/menu.ts +20 -0
- package/src/components/breadcrumb/page.ts +16 -0
- package/src/components/breadcrumb/scss/index.scss +74 -0
- package/src/components/breadcrumb/scss/variables.scss +17 -0
- package/src/components/breadcrumb/separator.ts +17 -0
- package/src/components/breadcrumb/svg/caret.svg +1 -0
- package/src/components/breadcrumb/svg/chevron.svg +1 -0
- package/src/components/breadcrumb/svg/more.svg +1 -0
- package/src/components/breadcrumbs/index.ts +479 -0
- package/src/components/breadcrumbs/scss/index.scss +235 -0
- package/src/components/breadcrumbs/scss/variables.scss +30 -0
- package/src/components/button/copy.ts +59 -0
- package/src/components/button/faces.ts +29 -0
- package/src/components/button/fan.ts +173 -0
- package/src/components/button/hold.ts +154 -0
- package/src/components/button/icons.ts +38 -0
- package/src/components/button/index.ts +12 -0
- package/src/components/button/kbd.ts +156 -0
- package/src/components/button/loading.ts +77 -0
- package/src/components/button/scss/_fan.scss +125 -0
- package/src/components/button/scss/_kbd.scss +10 -0
- package/src/components/button/scss/index.scss +117 -5
- package/src/components/button/scss/variables.scss +81 -0
- package/src/components/button/svg/plus.svg +1 -0
- package/src/components/card/scss/index.scss +2 -3
- package/src/components/card-input/index.ts +594 -0
- package/src/components/card-input/scss/index.scss +512 -0
- package/src/components/card-input/scss/variables.scss +29 -0
- package/src/components/carousel-3d/index.ts +405 -0
- package/src/components/carousel-3d/scss/index.scss +155 -0
- package/src/components/carousel-3d/scss/variables.scss +25 -0
- package/src/components/checkbox/index.ts +17 -25
- package/src/components/checkbox/scss/index.scss +6 -3
- package/src/components/checkbox-group/index.ts +171 -0
- package/src/components/checkbox-group/scss/index.scss +229 -0
- package/src/components/checkbox-group/scss/variables.scss +28 -0
- package/src/components/clipboard/copy.ts +24 -35
- package/src/components/clipboard/index.ts +2 -3
- package/src/components/code-morph/index.ts +459 -0
- package/src/components/code-morph/scss/index.scss +384 -0
- package/src/components/code-morph/scss/variables.scss +33 -0
- package/src/components/collapsible-sidebar/index.ts +193 -0
- package/src/components/collapsible-sidebar/scss/index.scss +220 -0
- package/src/components/collapsible-sidebar/scss/variables.scss +42 -0
- package/src/components/color-picker/index.ts +650 -0
- package/src/components/color-picker/scss/index.scss +345 -0
- package/src/components/color-picker/scss/variables.scss +33 -0
- package/src/components/command/constants.ts +6 -0
- package/src/components/command/index.ts +282 -0
- package/src/components/command/scss/index.scss +213 -0
- package/src/components/command/scss/variables.scss +35 -0
- package/src/components/command-palette/index.ts +456 -0
- package/src/components/command-palette/scss/index.scss +235 -0
- package/src/components/command-palette/scss/variables.scss +42 -0
- package/src/components/composer/index.ts +117 -0
- package/src/components/composer/scss/index.scss +105 -0
- package/src/components/composer/scss/variables.scss +82 -0
- package/src/components/composer/svg/arrow-up.svg +1 -0
- package/src/components/container/scss/index.scss +2 -1
- package/src/components/contribution-heatmap/index.ts +348 -0
- package/src/components/contribution-heatmap/scss/index.scss +151 -0
- package/src/components/contribution-heatmap/scss/variables.scss +39 -0
- package/src/components/counter/index.ts +58 -20
- package/src/components/counter/scss/index.scss +56 -2
- package/src/components/counter/scss/variables.scss +38 -2
- package/src/components/datalist/index.ts +236 -0
- package/src/components/datalist/scss/index.scss +84 -0
- package/src/components/datalist/scss/variables.scss +26 -0
- package/src/components/date-range-picker/index.ts +641 -0
- package/src/components/date-range-picker/scss/index.scss +380 -0
- package/src/components/date-range-picker/scss/variables.scss +22 -0
- package/src/components/dock/index.ts +265 -0
- package/src/components/dock/scss/index.scss +102 -0
- package/src/components/dock/scss/variables.scss +30 -0
- package/src/components/dynamic-island/index.ts +161 -0
- package/src/components/dynamic-island/scss/index.scss +278 -0
- package/src/components/dynamic-island/scss/variables.scss +39 -0
- package/src/components/email-typo-fix/index.ts +615 -0
- package/src/components/email-typo-fix/scss/index.scss +213 -0
- package/src/components/email-typo-fix/scss/variables.scss +18 -0
- package/src/components/expanding-card/index.ts +377 -0
- package/src/components/expanding-card/scss/index.scss +232 -0
- package/src/components/expanding-card/scss/variables.scss +22 -0
- package/src/components/feature-spotlight/index.ts +437 -0
- package/src/components/feature-spotlight/scss/index.scss +254 -0
- package/src/components/feature-spotlight/scss/variables.scss +36 -0
- package/src/components/file-tree/index.ts +319 -0
- package/src/components/file-tree/scss/index.scss +138 -0
- package/src/components/file-tree/scss/variables.scss +18 -0
- package/src/components/filter-grid/index.ts +344 -0
- package/src/components/filter-grid/scss/index.scss +142 -0
- package/src/components/filter-grid/scss/variables.scss +41 -0
- package/src/components/form/action.ts +2 -8
- package/src/components/form/scss/index.scss +2 -1
- package/src/components/gradient-text/index.ts +26 -0
- package/src/components/gradient-text/scss/index.scss +20 -0
- package/src/components/gradient-text/scss/variables.scss +6 -0
- package/src/components/grid/scss/index.scss +1 -1
- package/src/components/header/index.ts +318 -0
- package/src/components/header/scss/index.scss +508 -0
- package/src/components/header/scss/variables.scss +21 -0
- package/src/components/highlight/index.ts +239 -0
- package/src/components/highlight/scss/index.scss +48 -0
- package/src/components/highlight/scss/variables.scss +26 -0
- package/src/components/hover-card/index.ts +319 -0
- package/src/components/hover-card/scss/index.scss +117 -0
- package/src/components/hover-card/scss/variables.scss +25 -0
- package/src/components/image/index.ts +79 -0
- package/src/components/image/scss/index.scss +82 -0
- package/src/components/image/scss/variables.scss +15 -0
- package/src/components/index.ts +96 -1
- package/src/components/inline-edit/index.ts +177 -0
- package/src/components/inline-edit/scss/index.scss +152 -0
- package/src/components/inline-edit/scss/variables.scss +17 -0
- package/src/components/input/index.ts +15 -6
- package/src/components/input/scss/index.scss +2 -3
- package/src/components/kanban-board/index.ts +326 -0
- package/src/components/kanban-board/scss/index.scss +126 -0
- package/src/components/kanban-board/scss/variables.scss +39 -0
- package/src/components/lightbox/index.ts +594 -0
- package/src/components/lightbox/scss/index.scss +194 -0
- package/src/components/lightbox/scss/variables.scss +24 -0
- package/src/components/lightbox/spring.ts +118 -0
- package/src/components/line-shadow-text/index.ts +24 -0
- package/src/components/line-shadow-text/scss/index.scss +45 -0
- package/src/components/line-shadow-text/scss/variables.scss +6 -0
- package/src/components/link/scss/index.scss +2 -3
- package/src/components/loading/index.ts +3 -10
- package/src/components/loading/scss/index.scss +55 -4
- package/src/components/loading/scss/variables.scss +15 -1
- package/src/components/log/index.ts +156 -0
- package/src/components/log/scss/index.scss +269 -0
- package/src/components/log/scss/variables.scss +19 -0
- package/src/components/long-press/bind.ts +159 -0
- package/src/components/long-press/button.ts +46 -0
- package/src/components/long-press/index.ts +6 -0
- package/src/components/long-press/scss/index.scss +60 -0
- package/src/components/long-press/scss/variables.scss +9 -0
- package/src/components/marquee/index.ts +300 -0
- package/src/components/marquee/scss/index.scss +109 -0
- package/src/components/marquee/scss/variables.scss +18 -0
- package/src/components/modal/index.ts +91 -0
- package/src/components/modal/scss/index.scss +51 -4
- package/src/components/modal/scss/variables.scss +36 -0
- package/src/components/morphing-button/index.ts +188 -0
- package/src/components/morphing-button/scss/index.scss +154 -0
- package/src/components/morphing-button/scss/variables.scss +21 -0
- package/src/components/morphing-nav/index.ts +496 -0
- package/src/components/morphing-nav/scss/index.scss +284 -0
- package/src/components/morphing-nav/scss/variables.scss +36 -0
- package/src/components/multi-step-form/index.ts +368 -0
- package/src/components/multi-step-form/scss/index.scss +397 -0
- package/src/components/multi-step-form/scss/variables.scss +22 -0
- package/src/components/nested-menu/index.ts +446 -0
- package/src/components/nested-menu/scss/index.scss +219 -0
- package/src/components/nested-menu/scss/variables.scss +26 -0
- package/src/components/notification-bell/index.ts +102 -0
- package/src/components/notification-bell/scss/index.scss +132 -0
- package/src/components/notification-bell/scss/variables.scss +41 -0
- package/src/components/notification-bell/svg/bell.svg +1 -0
- package/src/components/onboarding-checklist/index.ts +252 -0
- package/src/components/onboarding-checklist/scss/index.scss +414 -0
- package/src/components/onboarding-checklist/scss/variables.scss +17 -0
- package/src/components/page-dots/index.ts +137 -0
- package/src/components/page-dots/scss/index.scss +95 -0
- package/src/components/page-dots/scss/variables.scss +26 -0
- package/src/components/pagination/index.ts +129 -0
- package/src/components/pagination/scss/index.scss +46 -0
- package/src/components/pagination/scss/variables.scss +40 -0
- package/src/components/pagination/svg/arrow-left.svg +1 -0
- package/src/components/pagination/svg/arrow-right.svg +1 -0
- package/src/components/password/constants.ts +4 -0
- package/src/components/password/index.ts +97 -0
- package/src/components/password/scss/index.scss +188 -0
- package/src/components/password/scss/variables.scss +50 -0
- package/src/components/progress/index.ts +57 -0
- package/src/components/progress/scss/index.scss +49 -0
- package/src/components/progress/scss/variables.scss +11 -0
- package/src/components/pull-to-refresh/index.ts +438 -0
- package/src/components/pull-to-refresh/scss/index.scss +91 -0
- package/src/components/pull-to-refresh/scss/variables.scss +10 -0
- package/src/components/radio/index.ts +5 -2
- package/src/components/radio-cards/index.ts +145 -0
- package/src/components/radio-cards/scss/index.scss +232 -0
- package/src/components/radio-cards/scss/variables.scss +32 -0
- package/src/components/range/scss/index.scss +2 -1
- package/src/components/range-filter/index.ts +295 -0
- package/src/components/range-filter/scss/index.scss +257 -0
- package/src/components/range-filter/scss/variables.scss +20 -0
- package/src/components/range-slider/index.ts +277 -0
- package/src/components/range-slider/scss/index.scss +234 -0
- package/src/components/range-slider/scss/variables.scss +26 -0
- package/src/components/reading-progress/index.ts +160 -0
- package/src/components/reading-progress/scss/index.scss +115 -0
- package/src/components/reading-progress/scss/variables.scss +31 -0
- package/src/components/relative-time/index.ts +410 -0
- package/src/components/relative-time/scss/index.scss +88 -0
- package/src/components/relative-time/scss/variables.scss +19 -0
- package/src/components/root/scss/index.scss +2 -2
- package/src/components/scroll-fade/index.ts +131 -0
- package/src/components/scroll-fade/scss/index.scss +104 -0
- package/src/components/scroll-fade/scss/variables.scss +10 -0
- package/src/components/scroll-spine/index.ts +355 -0
- package/src/components/scroll-spine/scss/index.scss +209 -0
- package/src/components/scroll-spine/scss/variables.scss +22 -0
- package/src/components/scroll-velocity/index.ts +269 -0
- package/src/components/scroll-velocity/scss/index.scss +29 -0
- package/src/components/scroll-velocity/scss/variables.scss +3 -0
- package/src/components/scrub-input/index.ts +339 -0
- package/src/components/scrub-input/scss/index.scss +105 -0
- package/src/components/scrub-input/scss/variables.scss +23 -0
- package/src/components/select/index.ts +54 -51
- package/src/components/select/scss/index.scss +15 -10
- package/src/components/select-menu/index.ts +499 -0
- package/src/components/select-menu/scss/index.scss +192 -0
- package/src/components/select-menu/scss/variables.scss +41 -0
- package/src/components/selection-toolbar/index.ts +510 -0
- package/src/components/selection-toolbar/scss/index.scss +221 -0
- package/src/components/selection-toolbar/scss/variables.scss +24 -0
- package/src/components/settings/index.ts +184 -0
- package/src/components/settings/scss/index.scss +327 -0
- package/src/components/settings/scss/variables.scss +50 -0
- package/src/components/settings/svg/close.svg +1 -0
- package/src/components/settings/svg/saved.svg +1 -0
- package/src/components/share-button/index.ts +328 -0
- package/src/components/share-button/scss/index.scss +191 -0
- package/src/components/share-button/scss/variables.scss +24 -0
- package/src/components/sheet/index.ts +170 -0
- package/src/components/sheet/scss/index.scss +65 -0
- package/src/components/sheet/scss/variables.scss +27 -0
- package/src/components/shiny-text/index.ts +19 -0
- package/src/components/shiny-text/scss/index.scss +32 -0
- package/src/components/shiny-text/scss/variables.scss +7 -0
- package/src/components/shortcut-recorder/index.ts +284 -0
- package/src/components/shortcut-recorder/scss/index.scss +198 -0
- package/src/components/shortcut-recorder/scss/variables.scss +54 -0
- package/src/components/shortcut-sheet/index.ts +454 -0
- package/src/components/shortcut-sheet/scss/index.scss +306 -0
- package/src/components/shortcut-sheet/scss/variables.scss +36 -0
- package/src/components/sidebar/scss/index.scss +3 -3
- package/src/components/slider/index.ts +232 -0
- package/src/components/slider/scss/index.scss +182 -0
- package/src/components/slider/scss/variables.scss +15 -0
- package/src/components/sliding-tabs/index.ts +291 -0
- package/src/components/sliding-tabs/scss/index.scss +174 -0
- package/src/components/sliding-tabs/scss/variables.scss +34 -0
- package/src/components/snap-carousel/index.ts +324 -0
- package/src/components/snap-carousel/scss/index.scss +174 -0
- package/src/components/snap-carousel/scss/variables.scss +31 -0
- package/src/components/sortable/index.ts +483 -0
- package/src/components/sortable/scss/index.scss +282 -0
- package/src/components/sortable/scss/variables.scss +59 -0
- package/src/components/sparkline/index.ts +234 -0
- package/src/components/sparkline/scss/index.scss +169 -0
- package/src/components/sparkline/scss/variables.scss +30 -0
- package/src/components/stacked-drawer/index.ts +272 -0
- package/src/components/stacked-drawer/scss/index.scss +122 -0
- package/src/components/stacked-drawer/scss/variables.scss +20 -0
- package/src/components/stat-counter/index.ts +337 -0
- package/src/components/stat-counter/scss/index.scss +246 -0
- package/src/components/stat-counter/scss/variables.scss +24 -0
- package/src/components/status-picker/index.ts +323 -0
- package/src/components/status-picker/scss/index.scss +290 -0
- package/src/components/status-picker/scss/variables.scss +29 -0
- package/src/components/sticky-header/index.ts +127 -0
- package/src/components/sticky-header/scss/index.scss +149 -0
- package/src/components/sticky-header/scss/variables.scss +22 -0
- package/src/components/sticky-stack/index.ts +313 -0
- package/src/components/sticky-stack/scss/index.scss +167 -0
- package/src/components/sticky-stack/scss/variables.scss +50 -0
- package/src/components/story-progress/index.ts +247 -0
- package/src/components/story-progress/scss/index.scss +205 -0
- package/src/components/story-progress/scss/variables.scss +21 -0
- package/src/components/swipe-deck/index.ts +438 -0
- package/src/components/swipe-deck/scss/index.scss +275 -0
- package/src/components/swipe-deck/scss/variables.scss +24 -0
- package/src/components/switch/index.ts +5 -2
- package/src/components/tabs/scss/index.scss +3 -3
- package/src/components/tag-input/index.ts +415 -0
- package/src/components/tag-input/scss/index.scss +186 -0
- package/src/components/tag-input/scss/variables.scss +30 -0
- package/src/components/task-list/index.ts +137 -0
- package/src/components/task-list/scss/index.scss +171 -0
- package/src/components/task-list/scss/variables.scss +8 -0
- package/src/components/tasklist/constants.ts +4 -0
- package/src/components/tasklist/index.ts +174 -0
- package/src/components/tasklist/scss/index.scss +184 -0
- package/src/components/tasklist/scss/variables.scss +83 -0
- package/src/components/text-animate/index.ts +142 -0
- package/src/components/text-animate/scss/index.scss +106 -0
- package/src/components/text-animate/scss/variables.scss +17 -0
- package/src/components/text-progress/index.ts +170 -0
- package/src/components/text-progress/scss/index.scss +148 -0
- package/src/components/text-progress/scss/variables.scss +26 -0
- package/src/components/textarea/index.ts +18 -16
- package/src/components/textarea/scss/index.scss +2 -3
- package/src/components/thumbnail/scss/index.scss +51 -0
- package/src/components/thumbnail/scss/variables.scss +12 -0
- package/src/components/toast/index.ts +11 -1
- package/src/components/toast/manager.ts +31 -1
- package/src/components/toast/scss/index.scss +66 -18
- package/src/components/toast/scss/variables.scss +2 -0
- package/src/components/tooltip/context.ts +96 -0
- package/src/components/tooltip/group.ts +162 -0
- package/src/components/tooltip/index.ts +6 -1
- package/src/components/tooltip/menu.ts +31 -48
- package/src/components/tooltip/onclick.ts +42 -15
- package/src/components/tooltip/onhover.ts +130 -11
- package/src/components/tooltip/options.ts +33 -0
- package/src/components/tooltip/scss/_center.scss +1 -5
- package/src/components/tooltip/scss/_east.scss +5 -5
- package/src/components/tooltip/scss/_group.scss +164 -0
- package/src/components/tooltip/scss/_north.scss +5 -5
- package/src/components/tooltip/scss/_south.scss +5 -5
- package/src/components/tooltip/scss/_west.scss +5 -5
- package/src/components/tooltip/scss/index.scss +230 -17
- package/src/components/tooltip/scss/variables.scss +105 -0
- package/src/components/tooltip/utilities.ts +103 -0
- package/src/components/tree/index.ts +259 -0
- package/src/components/tree/scss/index.scss +105 -0
- package/src/components/tree/scss/variables.scss +48 -0
- package/src/components/tree-view/index.ts +285 -0
- package/src/components/tree-view/scss/index.scss +169 -0
- package/src/components/tree-view/scss/variables.scss +18 -0
- package/src/components/typewriter/index.ts +10 -6
- package/src/components/typewriter/scss/index.scss +30 -11
- package/src/components/typewriter/scss/variables.scss +24 -0
- package/src/components/typewriter-retype/index.ts +164 -0
- package/src/components/typewriter-retype/scss/index.scss +142 -0
- package/src/components/typewriter-retype/scss/variables.scss +46 -0
- package/src/components/undo-toast/index.ts +359 -0
- package/src/components/undo-toast/scss/index.scss +216 -0
- package/src/components/undo-toast/scss/variables.scss +20 -0
- package/src/components/uptime/index.ts +271 -0
- package/src/components/uptime/scss/index.scss +163 -0
- package/src/components/uptime/scss/variables.scss +56 -0
- package/src/components/usage-meter/index.ts +63 -0
- package/src/components/usage-meter/scss/index.scss +94 -0
- package/src/components/usage-meter/scss/variables.scss +43 -0
- package/src/components/value-flash/index.ts +121 -0
- package/src/components/value-flash/scss/index.scss +193 -0
- package/src/components/value-flash/scss/variables.scss +47 -0
- package/src/components/waitlist-join/index.ts +545 -0
- package/src/components/waitlist-join/scss/index.scss +401 -0
- package/src/components/waitlist-join/scss/variables.scss +23 -0
- package/src/components/web-search/brands.ts +155 -0
- package/src/components/web-search/index.ts +316 -0
- package/src/components/web-search/scss/index.scss +270 -0
- package/src/components/web-search/scss/variables.scss +8 -0
- package/src/components/word-rotator/index.ts +296 -0
- package/src/components/word-rotator/scss/index.scss +33 -0
- package/src/components/word-rotator/scss/variables.scss +7 -0
- package/src/css-utilities/scrollbar/scss/index.scss +6 -1
- package/src/lib/scss/position.scss +3 -3
- package/src/themes/dark/select.ts +7 -4
- package/storage/svg/settings/add-line.svg +1 -0
- package/storage/svg/settings/arrow-down-s-line.svg +1 -0
- package/storage/svg/settings/arrow-left-s-line.svg +1 -0
- package/storage/svg/settings/arrow-right-s-line.svg +1 -0
- package/storage/svg/settings/bank-card-line.svg +1 -0
- package/storage/svg/settings/book-open-line.svg +1 -0
- package/storage/svg/settings/calendar-line.svg +1 -0
- package/storage/svg/settings/code-block.svg +1 -0
- package/storage/svg/settings/database-2-line.svg +1 -0
- package/storage/svg/settings/delete-bin-6-line.svg +1 -0
- package/storage/svg/settings/download-2-line.svg +1 -0
- package/storage/svg/settings/edit-line.svg +1 -0
- package/storage/svg/settings/expand-up-down-line.svg +1 -0
- package/storage/svg/settings/external-link-line.svg +1 -0
- package/storage/svg/settings/file-copy-line.svg +1 -0
- package/storage/svg/settings/file-excel-2-fill.svg +1 -0
- package/storage/svg/settings/file-text-fill.svg +1 -0
- package/storage/svg/settings/film-fill.svg +1 -0
- package/storage/svg/settings/git-merge-line.svg +1 -0
- package/storage/svg/settings/logout-circle-line.svg +1 -0
- package/storage/svg/settings/mail-line.svg +1 -0
- package/storage/svg/settings/more-2-fill.svg +1 -0
- package/storage/svg/settings/more-fill.svg +1 -0
- package/storage/svg/settings/organization-chart.svg +1 -0
- package/storage/svg/settings/palette-line.svg +1 -0
- package/storage/svg/settings/plug-line.svg +1 -0
- package/storage/svg/settings/school-line.svg +1 -0
- package/storage/svg/settings/search-line.svg +1 -0
- package/storage/svg/settings/settings-6-line.svg +1 -0
- package/storage/svg/settings/settings-line.svg +1 -0
- package/storage/svg/settings/tools-fill.svg +1 -0
- package/storage/svg/settings/upload-cloud-2-line.svg +1 -0
- package/build/components/border/scss/index.scss +0 -2
- package/build/components/clipboard/onclick.d.ts +0 -10
- package/build/components/clipboard/onclick.js +0 -38
- package/src/components/border/scss/index.scss +0 -17
- package/src/components/border/scss/variables.scss +0 -6
- package/src/components/clipboard/onclick.ts +0 -40
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as
|
|
1
|
+
import * as template_u1 from '@esportsplus/template';
|
|
2
2
|
import { component } from '@esportsplus/template';
|
|
3
3
|
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
4
|
+
import { content, morph, morphing } from './utilities.js';
|
|
5
|
+
const template_0bwku672 = template_u1.template(`<div class='tooltip'>`);
|
|
6
6
|
class ReactiveObject_0bwku670 extends reactivity_u0.ReactiveObject {
|
|
7
7
|
#active = this[reactivity_u0.SIGNAL](false);
|
|
8
8
|
constructor() {
|
|
@@ -15,20 +15,91 @@ class ReactiveObject_0bwku670 extends reactivity_u0.ReactiveObject {
|
|
|
15
15
|
reactivity_u0.write(this.#active, _v0);
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
function cross(o, a, b) {
|
|
19
|
+
return (a[0] - o[0]) * (b[1] - o[1]) - (a[1] - o[1]) * (b[0] - o[0]);
|
|
20
|
+
}
|
|
21
|
+
function hull(points) {
|
|
22
|
+
let lower = [], upper = [];
|
|
23
|
+
points.sort((a, b) => a[0] - b[0] || a[1] - b[1]);
|
|
24
|
+
for (let i = 0, n = points.length; i < n; i++) {
|
|
25
|
+
while (lower.length >= 2 && cross(lower[lower.length - 2], lower[lower.length - 1], points[i]) <= 0) {
|
|
26
|
+
lower.pop();
|
|
27
|
+
}
|
|
28
|
+
lower.push(points[i]);
|
|
29
|
+
}
|
|
30
|
+
for (let i = points.length - 1; i >= 0; i--) {
|
|
31
|
+
while (upper.length >= 2 && cross(upper[upper.length - 2], upper[upper.length - 1], points[i]) <= 0) {
|
|
32
|
+
upper.pop();
|
|
33
|
+
}
|
|
34
|
+
upper.push(points[i]);
|
|
35
|
+
}
|
|
36
|
+
lower.pop();
|
|
37
|
+
upper.pop();
|
|
38
|
+
return lower.concat(upper);
|
|
39
|
+
}
|
|
40
|
+
function safe(element, x, y) {
|
|
41
|
+
let rect = element.getBoundingClientRect();
|
|
42
|
+
if (x < rect.left || x > rect.right || y < rect.top || y > rect.bottom) {
|
|
43
|
+
return;
|
|
44
|
+
}
|
|
45
|
+
let tooltip = content(element);
|
|
46
|
+
if (!tooltip) {
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
let box = tooltip.getBoundingClientRect(), left = Math.min(x, box.left), points = hull([[x, y], [box.left, box.top], [box.right, box.top], [box.right, box.bottom], [box.left, box.bottom]]), polygon = '', style = element.style, top = Math.min(y, box.top);
|
|
50
|
+
for (let i = 0, n = points.length; i < n; i++) {
|
|
51
|
+
polygon += `${i ? ', ' : ''}${points[i][0] - left}px ${points[i][1] - top}px`;
|
|
52
|
+
}
|
|
53
|
+
style.setProperty('--safe-area', `polygon(${polygon})`);
|
|
54
|
+
style.setProperty('--safe-height', `${Math.max(y, box.bottom) - top}px`);
|
|
55
|
+
style.setProperty('--safe-left', `${left - rect.left - element.clientLeft}px`);
|
|
56
|
+
style.setProperty('--safe-top', `${top - rect.top - element.clientTop}px`);
|
|
57
|
+
style.setProperty('--safe-width', `${Math.max(x, box.right) - left}px`);
|
|
58
|
+
}
|
|
59
|
+
export default component(({ state = new ReactiveObject_0bwku670(), ...attributes }, content) => {
|
|
60
|
+
let cancel, settled = morphing(false), x = 0, y = 0;
|
|
21
61
|
return (() => {
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
62
|
+
let root_0bwku671 = template_0bwku672(), element_0bwku673 = root_0bwku671.firstChild;
|
|
63
|
+
template_u1.setProperties(element_0bwku673, attributes);
|
|
64
|
+
template_u1.setList(element_0bwku673, 'class', () => state.active && '--active');
|
|
65
|
+
template_u1.delegate(element_0bwku673, 'animationcancel', settled);
|
|
66
|
+
template_u1.delegate(element_0bwku673, 'animationend', settled);
|
|
67
|
+
template_u1.delegate(element_0bwku673, 'animationstart', morphing(true));
|
|
68
|
+
template_u1.delegate(element_0bwku673, 'mouseover', (e) => {
|
|
69
|
+
let element = e.currentTarget;
|
|
70
|
+
if (state.active || cancel || element.contains(e.relatedTarget)) {
|
|
71
|
+
return;
|
|
72
|
+
}
|
|
73
|
+
cancel = morph(element, () => {
|
|
74
|
+
cancel = undefined;
|
|
75
|
+
state.active = true;
|
|
76
|
+
});
|
|
27
77
|
});
|
|
28
|
-
|
|
78
|
+
template_u1.delegate(element_0bwku673, 'mouseout', (e) => {
|
|
79
|
+
if (e.currentTarget.contains(e.relatedTarget)) {
|
|
80
|
+
return;
|
|
81
|
+
}
|
|
82
|
+
cancel?.();
|
|
83
|
+
cancel = undefined;
|
|
29
84
|
state.active = false;
|
|
30
85
|
});
|
|
31
|
-
|
|
32
|
-
|
|
86
|
+
template_u1.delegate(element_0bwku673, 'pointermove', (e) => {
|
|
87
|
+
let element = e.currentTarget;
|
|
88
|
+
x = e.clientX;
|
|
89
|
+
y = e.clientY;
|
|
90
|
+
if (state.active) {
|
|
91
|
+
safe(element, x, y);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
template_u1.delegate(element_0bwku673, 'transitioncancel', settled);
|
|
95
|
+
template_u1.delegate(element_0bwku673, 'transitionend', (e) => {
|
|
96
|
+
settled(e);
|
|
97
|
+
if (state.active) {
|
|
98
|
+
safe(e.currentTarget, x, y);
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
template_u1.delegate(element_0bwku673, 'transitionrun', morphing(true));
|
|
102
|
+
template_u1.slot(element_0bwku673, content, 1);
|
|
103
|
+
return root_0bwku671;
|
|
33
104
|
})();
|
|
34
105
|
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { type Attributes, type Renderable } from '@esportsplus/template';
|
|
2
|
+
type Option = Attributes & {
|
|
3
|
+
content: Renderable<unknown>;
|
|
4
|
+
};
|
|
5
|
+
export default _default;
|
|
6
|
+
declare function _default(options: Option[], attributes?: Attributes): (DocumentFragment | Text)[];
|
|
7
|
+
export type { Option };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import * as template_u1 from '@esportsplus/template';
|
|
2
|
+
const template_0bwbcae1 = template_u1.template(`<a class='link --width-full' target='_blank'>`);
|
|
3
|
+
const template_0bwbcae4 = template_u1.template(`<div class='link --width-full'>`);
|
|
4
|
+
export default (options, attributes) => options.map(({ content, ...o }) => {
|
|
5
|
+
if (o.href) {
|
|
6
|
+
return (() => {
|
|
7
|
+
let root_0bwbcae0 = template_0bwbcae1(), element_0bwbcae2 = root_0bwbcae0.firstChild;
|
|
8
|
+
template_u1.setProperties(element_0bwbcae2, o);
|
|
9
|
+
template_u1.setProperties(element_0bwbcae2, attributes);
|
|
10
|
+
template_u1.slot(element_0bwbcae2, content, 1);
|
|
11
|
+
return root_0bwbcae0;
|
|
12
|
+
})();
|
|
13
|
+
}
|
|
14
|
+
return (() => {
|
|
15
|
+
let root_0bwbcae3 = template_0bwbcae4(), element_0bwbcae5 = root_0bwbcae3.firstChild;
|
|
16
|
+
template_u1.setProperties(element_0bwbcae5, o);
|
|
17
|
+
template_u1.setProperties(element_0bwbcae5, attributes);
|
|
18
|
+
template_u1.slot(element_0bwbcae5, content, 1);
|
|
19
|
+
return root_0bwbcae3;
|
|
20
|
+
})();
|
|
21
|
+
});
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@layer components {.tooltip-content,.tooltip-message{--background:var(--background-default);--background-default:transparent;--border-radius:var(--border-radius-400);--box-shadow:var(--box-shadow-400);--max-width:calc(90vw - (var(--size-700) * 2));--min-width:auto;--spacer:var(--size-300);--width:auto}.tooltip-arrow{--rotate:0deg}.tooltip-message{--background-default:var(--color-black-400);--color:var(--color-white-400);--font-size:var(--font-size-300);--font-weight:var(--font-weight-400);--padding-horizontal:var(--size-300);--padding-vertical:var(--size-300)}.tooltip{cursor:pointer;z-index:0;position:relative}.tooltip.--active.tooltip--box:before{content:"";height:calc(100% + var(--spacer) * 3);width:calc(100% + var(--spacer) * 3);z-index:-1;position:absolute;bottom:50%;right:50%;transform:translate(50%,50%)}.tooltip.--active :not(.tooltip) .tooltip-arrow,.tooltip.--active>.tooltip-arrow{transform:rotate(var(--rotate)) scaleX(-1)}.tooltip.--active,.tooltip:not(.--active):hover{z-index:9}.tooltip-arrow{transform:rotate(var(--rotate));margin:0 -1px}.tooltip-content,.tooltip-message{background:var(--background);border-radius:var(--border-radius);box-shadow:var(--box-shadow);max-width:var(--max-width);min-width:var(--min-width);opacity:0;transition:opacity var(--transition-duration) var(--transition-timing-function), transform var(--transition-duration) var(--transition-timing-function);width:var(--width);z-index:9;overflow:hidden}.tooltip.--active>.tooltip-content,.tooltip.--active :not(.tooltip)>.tooltip-content,.tooltip.--active>.tooltip-message,.tooltip.--active :not(.tooltip)>.tooltip-message{opacity:1}.tooltip:not(.--active)>.tooltip-content,.tooltip:not(.--active)>.tooltip-content *,.tooltip:not(.--active) :not(.tooltip)>.tooltip-content,.tooltip:not(.--active) :not(.tooltip)>.tooltip-content *,.tooltip:not(.--active)>.tooltip-message,.tooltip:not(.--active)>.tooltip-message *,.tooltip:not(.--active) :not(.tooltip)>.tooltip-message,.tooltip:not(.--active) :not(.tooltip)>.tooltip-message *{pointer-events:none}.tooltip-content--c,.tooltip-message--c{transform-origin:50%;position:absolute;bottom:50%;right:50%;transform:translate(50%,50%)}.tooltip.--active>.tooltip-content--c,.tooltip.--active :not(.tooltip)>.tooltip-content--c,.tooltip.--active>.tooltip-message--c,.tooltip.--active :not(.tooltip)>.tooltip-message--c{transform:translate(50%,50%)}.tooltip-content--en,.tooltip-content--es,.tooltip-message--en,.tooltip-message--es{left:calc(100% - var(--spacer));position:absolute}.tooltip.--active>.tooltip-content--en,.tooltip.--active :not(.tooltip)>.tooltip-content--en,.tooltip.--active>.tooltip-content--es,.tooltip.--active :not(.tooltip)>.tooltip-content--es,.tooltip.--active>.tooltip-message--en,.tooltip.--active :not(.tooltip)>.tooltip-message--en,.tooltip.--active>.tooltip-message--es,.tooltip.--active :not(.tooltip)>.tooltip-message--es{transform:translateX(calc(var(--spacer) * 2))}.tooltip-content--e,.tooltip-message--e{bottom:50%;left:calc(100% - var(--spacer));transform-origin:0;position:absolute;transform:translateY(50%)}.tooltip.--active>.tooltip-content--e,.tooltip.--active :not(.tooltip)>.tooltip-content--e,.tooltip.--active>.tooltip-message--e,.tooltip.--active :not(.tooltip)>.tooltip-message--e{transform:translate(calc(var(--spacer) * 2), 50%)}.tooltip-content--en,.tooltip-message--en{transform-origin:0 0;top:0}.tooltip-content--es,.tooltip-message--es{transform-origin:0 100%;bottom:0}.tooltip-content--ne,.tooltip-content--nw,.tooltip-message--ne,.tooltip-message--nw{bottom:calc(100% - var(--spacer));position:absolute}.tooltip.--active>.tooltip-content--ne,.tooltip.--active :not(.tooltip)>.tooltip-content--ne,.tooltip.--active>.tooltip-content--nw,.tooltip.--active :not(.tooltip)>.tooltip-content--nw,.tooltip.--active>.tooltip-message--ne,.tooltip.--active :not(.tooltip)>.tooltip-message--ne,.tooltip.--active>.tooltip-message--nw,.tooltip.--active :not(.tooltip)>.tooltip-message--nw{transform:translateY(calc(var(--spacer) * -2))}.tooltip-content--n,.tooltip-message--n{bottom:calc(100% - var(--spacer));transform-origin:bottom;position:absolute;right:50%;transform:translate(50%)}.tooltip.--active>.tooltip-content--n,.tooltip.--active :not(.tooltip)>.tooltip-content--n,.tooltip.--active>.tooltip-message--n,.tooltip.--active :not(.tooltip)>.tooltip-message--n{transform:translate(50%, calc(var(--spacer) * -2)) scale(1)}.tooltip-content--ne,.tooltip-message--ne{transform-origin:100% 100%;right:0}.tooltip-content--nw,.tooltip-message--nw{transform-origin:0 100%;left:0}.tooltip-content--se,.tooltip-content--sw,.tooltip-message--se,.tooltip-message--sw{top:calc(100% - var(--spacer));position:absolute}.tooltip.--active>.tooltip-content--se,.tooltip.--active :not(.tooltip)>.tooltip-content--se,.tooltip.--active>.tooltip-content--sw,.tooltip.--active :not(.tooltip)>.tooltip-content--sw,.tooltip.--active>.tooltip-message--se,.tooltip.--active :not(.tooltip)>.tooltip-message--se,.tooltip.--active>.tooltip-message--sw,.tooltip.--active :not(.tooltip)>.tooltip-message--sw{transform:translateY(calc(var(--spacer) * 2))}.tooltip-content--s,.tooltip-message--s{right:50%;top:calc(100% - var(--spacer));transform-origin:top;position:absolute;transform:translate(50%)}.tooltip.--active>.tooltip-content--s,.tooltip.--active :not(.tooltip)>.tooltip-content--s,.tooltip.--active>.tooltip-message--s,.tooltip.--active :not(.tooltip)>.tooltip-message--s{transform:translate(50%, calc(var(--spacer) * 2))}.tooltip-content--se,.tooltip-message--se{transform-origin:100% 0;right:0}.tooltip-content--sw,.tooltip-message--sw{transform-origin:0 0;left:0}.tooltip-content--wn,.tooltip-content--ws,.tooltip-message--wn,.tooltip-message--ws{right:calc(100% - var(--spacer));position:absolute}.tooltip.--active>.tooltip-content--wn,.tooltip.--active :not(.tooltip)>.tooltip-content--wn,.tooltip.--active>.tooltip-content--ws,.tooltip.--active :not(.tooltip)>.tooltip-content--ws,.tooltip.--active>.tooltip-message--wn,.tooltip.--active :not(.tooltip)>.tooltip-message--wn,.tooltip.--active>.tooltip-message--ws,.tooltip.--active :not(.tooltip)>.tooltip-message--ws{transform:translateX(calc(var(--spacer) * -2))}.tooltip-content--w,.tooltip-message--w{bottom:50%;right:calc(100% - var(--spacer));transform-origin:100%;position:absolute;transform:translateY(50%)}.tooltip.--active>.tooltip-content--w,.tooltip.--active :not(.tooltip)>.tooltip-content--w,.tooltip.--active>.tooltip-message--w,.tooltip.--active :not(.tooltip)>.tooltip-message--w{transform:translate(calc(var(--spacer) * -2), 50%) scale(1)}.tooltip-content--wn,.tooltip-message--wn{transform-origin:100% 0;top:0}.tooltip-content--ws,.tooltip-message--ws{transform-origin:100% 100%;bottom:0}.tooltip-message{background:var(--background);color:var(--color);cursor:auto;font-size:var(--font-size);font-weight:var(--font-weight);padding:var(--padding-vertical) var(--padding-horizontal);pointer-events:none;white-space:nowrap}}
|
|
1
|
+
@layer components {.tooltip-group{z-index:0;display:inline-flex;position:relative}.tooltip-group.--active{z-index:9}.tooltip-group.--active>.tooltip-group-content>.tooltip-group-box{filter:blur();opacity:1;transition:filter var(--group-open-duration) var(--group-timing-function) var(--group-delay), opacity var(--group-open-duration) var(--group-timing-function) var(--group-delay), scale var(--group-open-duration) var(--group-timing-function) var(--group-delay), translate var(--group-open-duration) var(--group-timing-function) var(--group-delay);translate:0;scale:1}.tooltip-group.--gliding>.tooltip-group-content{transition:height var(--group-glide-duration) var(--group-glide-timing-function), translate var(--group-glide-duration) var(--group-glide-timing-function), width var(--group-glide-duration) var(--group-glide-timing-function)}.tooltip-group.--gliding .tooltip-group-layer{transition:filter var(--group-swap-duration) var(--group-timing-function), opacity var(--group-swap-duration) var(--group-timing-function), translate var(--group-swap-duration) var(--group-timing-function)}.tooltip-group-box{background:var(--background);border-radius:var(--border-radius);box-shadow:var(--box-shadow);color:var(--color);filter:blur(var(--group-blur));font-size:var(--font-size);font-weight:var(--font-weight);opacity:0;scale:var(--group-scale);transition:filter var(--group-close-duration) var(--group-timing-function), opacity var(--group-close-duration) var(--group-timing-function), scale var(--group-close-duration) var(--group-timing-function), translate var(--group-close-duration) var(--group-timing-function);position:absolute;inset:0;overflow:hidden}.tooltip-group-content{height:var(--group-height);pointer-events:none;width:var(--group-width);z-index:9;transition:none;position:absolute}.tooltip-group-content--e,.tooltip-group-content--w{--group-axis-x:0;--group-axis-y:1;translate:0 calc(var(--group-y) - 50%);top:0}.tooltip-group-content--n,.tooltip-group-content--s{--group-axis-x:1;--group-axis-y:0;translate:calc(var(--group-x) - 50%) 0;left:0}.tooltip-group-content--e{left:calc(100% + var(--spacer))}.tooltip-group-content--e>.tooltip-group-box{transform-origin:0;translate:calc(var(--group-rise) * -1) 0}.tooltip-group-content--n{bottom:calc(100% + var(--spacer))}.tooltip-group-content--n>.tooltip-group-box{transform-origin:bottom;translate:0 var(--group-rise)}.tooltip-group-content--s{top:calc(100% + var(--spacer))}.tooltip-group-content--s>.tooltip-group-box{transform-origin:top;translate:0 calc(var(--group-rise) * -1)}.tooltip-group-content--w{right:calc(100% + var(--spacer))}.tooltip-group-content--w>.tooltip-group-box{transform-origin:100%;translate:var(--group-rise) 0}.tooltip-group-layer{--group-shift:var(--group-swap-shift);filter:blur(var(--group-swap-blur));max-width:var(--max-width);opacity:0;padding-block:var(--padding-vertical);padding-inline:var(--padding-horizontal);translate:calc(-50% + var(--group-shift) * var(--group-axis-x)) calc(-50% + var(--group-shift) * var(--group-axis-y));white-space:nowrap;width:max-content;transition:none;position:absolute;top:50%;left:50%}.tooltip-group-layer.--active{--group-shift:0px;filter:blur();opacity:1}.tooltip-group-layer.--before{--group-shift:calc(var(--group-swap-shift) * -1)}@media (prefers-reduced-motion:reduce){.tooltip-group>.tooltip-group-content{--group-blur:0px;--group-glide-duration:0s;--group-rise:0px;--group-scale:1;--group-swap-blur:0px;--group-swap-shift:0px}}.tooltip{--safe-color:transparent}.tooltip-content,.tooltip-message{--background:var(--background-default);--background-default:transparent;--border-radius:var(--border-radius-400);--box-shadow:var(--box-shadow-400);--max-width:calc(90vw - (var(--size-700) * 2));--min-width:auto;--offset:calc(var(--spacer) * 2);--scale:1;--spacer:var(--size-300);--width:auto}.tooltip-content--corner,.tooltip-message--corner{--corner-bleed:24px;--corner-clip-timing-function:cubic-bezier(.16, 1, .3, 1);--corner-close-duration:.26s;--corner-open-clip-duration:.32s;--corner-open-duration:.36s;--offset:0px;--scale:.96;--transition-timing-function:cubic-bezier(.2, .8, .2, 1)}.tooltip-content--grow,.tooltip-message--grow{--offset:0px;--scale:1 0;--transition-duration:.24s;--transition-timing-function:cubic-bezier(.34, 1.4, .64, 1)}.tooltip-content--morph,.tooltip-message--morph{--morph-blur:4px;--morph-close-duration:.16s;--morph-focus-timing-function:cubic-bezier(.25, .1, .25, 1);--morph-land:2px;--morph-open-duration:.12s;--morph-timing-function:cubic-bezier(.2, 0, 0, 1);--offset:0px;--scale:1}.tooltip-content--scale,.tooltip-message--scale{--offset:var(--spacer);--scale:.88}.tooltip-content--scale-spring,.tooltip-message--scale-spring{--offset:var(--spacer);--scale:.88;--transition-duration:.24s;--transition-timing-function:cubic-bezier(.34, 1.56, .64, 1)}.tooltip-content--spring,.tooltip-message--spring{--offset:calc(var(--spacer) * 3);--scale:.96;--transition-duration:.24s;--transition-timing-function:cubic-bezier(.34, 1.56, .64, 1)}.tooltip-content--stagger,.tooltip-message--stagger{--offset:4px;--scale:.98;--stagger-delay:25ms;--stagger-offset:6px;--transition-duration:.15s;--transition-timing-function:cubic-bezier(.16, 1, .3, 1)}.tooltip-content--zoom,.tooltip-message--zoom{--offset:8px;--scale:.95;--transition-duration:.15s;--transition-timing-function:cubic-bezier(.16, 1, .3, 1)}.tooltip-arrow{--rotate:0deg}.tooltip-message{--background-default:var(--color-black-400);--color:var(--color-white-400);--font-size:var(--font-size-300);--font-weight:var(--font-weight-400);--padding-horizontal:var(--size-300);--padding-vertical:var(--size-300)}.tooltip-group-content{--background:var(--color-black-400);--border-radius:var(--border-radius-400);--box-shadow:var(--box-shadow-400);--color:var(--color-white-400);--font-size:var(--font-size-300);--font-weight:var(--font-weight-400);--group-blur:7px;--group-close-duration:.128s;--group-delay:0s;--group-glide-duration:.4s;--group-glide-timing-function:cubic-bezier(.22, 1.12, .36, 1);--group-open-duration:.16s;--group-rise:4px;--group-scale:.94;--group-swap-blur:3px;--group-swap-duration:.14s;--group-swap-shift:10px;--group-timing-function:cubic-bezier(.23, 1, .32, 1);--max-width:calc(90vw - (var(--size-700) * 2));--padding-horizontal:var(--size-300);--padding-vertical:var(--size-300);--spacer:var(--size-300)}.tooltip{cursor:pointer;z-index:0;position:relative}.tooltip.--active:before{background:var(--safe-color);clip-path:var(--safe-area);content:"";height:var(--safe-height);left:var(--safe-left);top:var(--safe-top);width:var(--safe-width);z-index:-3;position:absolute}.tooltip.--active :not(.tooltip) .tooltip-arrow,.tooltip.--active>.tooltip-arrow{scale:-1 1}.tooltip.--active,.tooltip:not(.--active):hover{z-index:9}.tooltip--context{cursor:inherit}.tooltip.--morphing{filter:url(#tooltip-morph-goo)}.tooltip:has(>.tooltip-content--morph,>.tooltip-message--morph,>:not(.tooltip)>.tooltip-content--morph,>:not(.tooltip)>.tooltip-message--morph):after{background:inherit;border-radius:inherit;content:"";pointer-events:none;z-index:-1;display:block;position:absolute;inset:0}.tooltip-arrow{rotate:var(--rotate);margin-inline:-1px}.tooltip-content,.tooltip-message{background:var(--background);border-radius:var(--border-radius);box-shadow:var(--box-shadow);max-width:var(--max-width);min-width:var(--min-width);opacity:0;scale:var(--scale);transition:opacity var(--transition-duration) var(--transition-timing-function), scale var(--transition-duration) var(--transition-timing-function), translate var(--transition-duration) var(--transition-timing-function);width:var(--width);z-index:9;overflow:hidden}.tooltip.--active>.tooltip-content,.tooltip.--active :not(.tooltip)>.tooltip-content,.tooltip.--active>.tooltip-message,.tooltip.--active :not(.tooltip)>.tooltip-message{opacity:1;scale:1}.tooltip:not(.--active)>.tooltip-content,.tooltip:not(.--active)>.tooltip-content *,.tooltip:not(.--active) :not(.tooltip)>.tooltip-content,.tooltip:not(.--active) :not(.tooltip)>.tooltip-content *,.tooltip:not(.--active)>.tooltip-message,.tooltip:not(.--active)>.tooltip-message *,.tooltip:not(.--active) :not(.tooltip)>.tooltip-message,.tooltip:not(.--active) :not(.tooltip)>.tooltip-message *{pointer-events:none}.tooltip-content--context,.tooltip-message--context{position:absolute}.tooltip-content--c,.tooltip-message--c{transform-origin:50%;position:absolute;bottom:50%;right:50%;translate:50% 50%}.tooltip-content--en,.tooltip-content--es,.tooltip-message--en,.tooltip-message--es{left:calc(100% + var(--spacer) - var(--offset));position:absolute}.tooltip.--active>.tooltip-content--en,.tooltip.--active :not(.tooltip)>.tooltip-content--en,.tooltip.--active>.tooltip-content--es,.tooltip.--active :not(.tooltip)>.tooltip-content--es,.tooltip.--active>.tooltip-message--en,.tooltip.--active :not(.tooltip)>.tooltip-message--en,.tooltip.--active>.tooltip-message--es,.tooltip.--active :not(.tooltip)>.tooltip-message--es{translate:var(--offset)}.tooltip-content--e,.tooltip-message--e{bottom:50%;left:calc(100% + var(--spacer) - var(--offset));transform-origin:0;position:absolute;translate:0 50%}.tooltip.--active>.tooltip-content--e,.tooltip.--active :not(.tooltip)>.tooltip-content--e,.tooltip.--active>.tooltip-message--e,.tooltip.--active :not(.tooltip)>.tooltip-message--e{translate:var(--offset) 50%}.tooltip-content--en,.tooltip-message--en{transform-origin:0 0;top:0}.tooltip-content--es,.tooltip-message--es{transform-origin:0 100%;bottom:0}.tooltip-content--ne,.tooltip-content--nw,.tooltip-message--ne,.tooltip-message--nw{bottom:calc(100% + var(--spacer) - var(--offset));position:absolute}.tooltip.--active>.tooltip-content--ne,.tooltip.--active :not(.tooltip)>.tooltip-content--ne,.tooltip.--active>.tooltip-content--nw,.tooltip.--active :not(.tooltip)>.tooltip-content--nw,.tooltip.--active>.tooltip-message--ne,.tooltip.--active :not(.tooltip)>.tooltip-message--ne,.tooltip.--active>.tooltip-message--nw,.tooltip.--active :not(.tooltip)>.tooltip-message--nw{translate:0 calc(var(--offset) * -1)}.tooltip-content--n,.tooltip-message--n{bottom:calc(100% + var(--spacer) - var(--offset));transform-origin:bottom;position:absolute;right:50%;translate:50%}.tooltip.--active>.tooltip-content--n,.tooltip.--active :not(.tooltip)>.tooltip-content--n,.tooltip.--active>.tooltip-message--n,.tooltip.--active :not(.tooltip)>.tooltip-message--n{translate:50% calc(var(--offset) * -1)}.tooltip-content--ne,.tooltip-message--ne{transform-origin:100% 100%;right:0}.tooltip-content--nw,.tooltip-message--nw{transform-origin:0 100%;left:0}.tooltip-content--se,.tooltip-content--sw,.tooltip-message--se,.tooltip-message--sw{top:calc(100% + var(--spacer) - var(--offset));position:absolute}.tooltip.--active>.tooltip-content--se,.tooltip.--active :not(.tooltip)>.tooltip-content--se,.tooltip.--active>.tooltip-content--sw,.tooltip.--active :not(.tooltip)>.tooltip-content--sw,.tooltip.--active>.tooltip-message--se,.tooltip.--active :not(.tooltip)>.tooltip-message--se,.tooltip.--active>.tooltip-message--sw,.tooltip.--active :not(.tooltip)>.tooltip-message--sw{translate:0 var(--offset)}.tooltip-content--s,.tooltip-message--s{right:50%;top:calc(100% + var(--spacer) - var(--offset));transform-origin:top;position:absolute;translate:50%}.tooltip.--active>.tooltip-content--s,.tooltip.--active :not(.tooltip)>.tooltip-content--s,.tooltip.--active>.tooltip-message--s,.tooltip.--active :not(.tooltip)>.tooltip-message--s{translate:50% var(--offset)}.tooltip-content--se,.tooltip-message--se{transform-origin:100% 0;right:0}.tooltip-content--sw,.tooltip-message--sw{transform-origin:0 0;left:0}.tooltip-content--wn,.tooltip-content--ws,.tooltip-message--wn,.tooltip-message--ws{right:calc(100% + var(--spacer) - var(--offset));position:absolute}.tooltip.--active>.tooltip-content--wn,.tooltip.--active :not(.tooltip)>.tooltip-content--wn,.tooltip.--active>.tooltip-content--ws,.tooltip.--active :not(.tooltip)>.tooltip-content--ws,.tooltip.--active>.tooltip-message--wn,.tooltip.--active :not(.tooltip)>.tooltip-message--wn,.tooltip.--active>.tooltip-message--ws,.tooltip.--active :not(.tooltip)>.tooltip-message--ws{translate:calc(var(--offset) * -1)}.tooltip-content--w,.tooltip-message--w{bottom:50%;right:calc(100% + var(--spacer) - var(--offset));transform-origin:100%;position:absolute;translate:0 50%}.tooltip.--active>.tooltip-content--w,.tooltip.--active :not(.tooltip)>.tooltip-content--w,.tooltip.--active>.tooltip-message--w,.tooltip.--active :not(.tooltip)>.tooltip-message--w{translate:calc(var(--offset) * -1) 50%}.tooltip-content--wn,.tooltip-message--wn{transform-origin:100% 0;top:0}.tooltip-content--ws,.tooltip-message--ws{transform-origin:100% 100%;bottom:0}.tooltip-content--corner,.tooltip-message--corner{--corner-clip-duration:var(--corner-close-duration);--corner-duration:var(--corner-close-duration);clip-path:inset(var(--corner-inset) round var(--border-radius));transition:clip-path var(--corner-clip-duration) var(--corner-clip-timing-function), opacity var(--corner-duration) var(--transition-timing-function), scale var(--corner-duration) var(--transition-timing-function), translate var(--corner-duration) var(--transition-timing-function)}.tooltip.--active>.tooltip-content--corner,.tooltip.--active :not(.tooltip)>.tooltip-content--corner,.tooltip.--active>.tooltip-message--corner,.tooltip.--active :not(.tooltip)>.tooltip-message--corner{--corner-clip-duration:var(--corner-open-clip-duration);--corner-duration:var(--corner-open-duration);clip-path:inset(calc(var(--corner-bleed) * -1) round calc(var(--border-radius) + var(--corner-bleed)))}.tooltip-content--stagger>*,.tooltip-message--stagger>*{opacity:0;transition:opacity var(--transition-duration) var(--transition-timing-function), translate var(--transition-duration) var(--transition-timing-function);translate:0 calc(var(--stagger-offset) * -1)}.tooltip.--active>.tooltip-content--stagger>*,.tooltip.--active :not(.tooltip)>.tooltip-content--stagger>*,.tooltip.--active>.tooltip-message--stagger>*,.tooltip.--active :not(.tooltip)>.tooltip-message--stagger>*{opacity:1;transition-delay:calc(var(--stagger-index,0) * var(--stagger-delay));translate:0}.tooltip-content--stagger>:first-child,.tooltip-message--stagger>:first-child{--stagger-index:0}.tooltip-content--stagger>:nth-child(2),.tooltip-message--stagger>:nth-child(2){--stagger-index:1}.tooltip-content--stagger>:nth-child(3),.tooltip-message--stagger>:nth-child(3){--stagger-index:2}.tooltip-content--stagger>:nth-child(4),.tooltip-message--stagger>:nth-child(4){--stagger-index:3}.tooltip-content--stagger>:nth-child(5),.tooltip-message--stagger>:nth-child(5){--stagger-index:4}.tooltip-content--stagger>:nth-child(6),.tooltip-message--stagger>:nth-child(6){--stagger-index:5}.tooltip-content--stagger>:nth-child(7),.tooltip-message--stagger>:nth-child(7){--stagger-index:6}.tooltip-content--stagger>:nth-child(8),.tooltip-message--stagger>:nth-child(8){--stagger-index:7}.tooltip-content--stagger>:nth-child(9),.tooltip-message--stagger>:nth-child(9){--stagger-index:8}.tooltip-content--stagger>:nth-child(10),.tooltip-message--stagger>:nth-child(10){--stagger-index:9}.tooltip-content--stagger>:nth-child(11),.tooltip-message--stagger>:nth-child(11){--stagger-index:10}.tooltip-content--stagger>:nth-child(12),.tooltip-message--stagger>:nth-child(12){--stagger-index:11}@media (prefers-reduced-motion:reduce){.tooltip-content--corner,.tooltip-content--grow,.tooltip-content--stagger,.tooltip-content--stagger>*,.tooltip-content--zoom,.tooltip-message--corner,.tooltip-message--grow,.tooltip-message--stagger,.tooltip-message--stagger>*,.tooltip-message--zoom{transition-duration:0s}}.tooltip-content--morph,.tooltip-message--morph{animation:tooltip-morph-close var(--morph-close-duration) linear;box-shadow:none;clip-path:inset(var(--morph-top) var(--morph-right) var(--morph-bottom) var(--morph-left) round var(--morph-radius));filter:blur(var(--morph-blur));opacity:1;transition:filter var(--morph-close-duration) cubic-bezier(.16, 1, .3, 1), visibility 0s linear var(--morph-close-duration);visibility:hidden;z-index:-2;background:0 0;overflow:visible}.tooltip-content--morph:before,.tooltip-message--morph:before{background:var(--background);content:"";inset:min(var(--morph-blur) * -3, var(--morph-top) - var(--morph-land)) min(var(--morph-blur) * -3, var(--morph-right) - var(--morph-land)) min(var(--morph-blur) * -3, var(--morph-bottom) - var(--morph-land)) min(var(--morph-blur) * -3, var(--morph-left) - var(--morph-land));z-index:-1;position:absolute}.tooltip.--active>.tooltip-content--morph,.tooltip.--active :not(.tooltip)>.tooltip-content--morph,.tooltip.--active>.tooltip-message--morph,.tooltip.--active :not(.tooltip)>.tooltip-message--morph{clip-path:inset(0 round var(--border-radius));filter:none;transition:clip-path var(--morph-open-duration) var(--morph-timing-function), filter var(--morph-open-duration) var(--morph-focus-timing-function);visibility:visible;animation:none}.tooltip-content--corner.tooltip-content--c{--corner-inset:46%}.tooltip-content--corner.tooltip-content--e{--corner-inset:46% 92% 46% 0}.tooltip-content--corner.tooltip-content--en{--corner-inset:0 92% 92% 0}.tooltip-content--corner.tooltip-content--es{--corner-inset:92% 92% 0 0}.tooltip-content--corner.tooltip-content--n{--corner-inset:92% 46% 0 46%}.tooltip-content--corner.tooltip-content--ne{--corner-inset:92% 0 0 92%}.tooltip-content--corner.tooltip-content--nw{--corner-inset:92% 92% 0 0}.tooltip-content--corner.tooltip-content--s{--corner-inset:0 46% 92% 46%}.tooltip-content--corner.tooltip-content--se{--corner-inset:0 0 92% 92%}.tooltip-content--corner.tooltip-content--sw{--corner-inset:0 92% 92% 0}.tooltip-content--corner.tooltip-content--w{--corner-inset:46% 0 46% 92%}.tooltip-content--corner.tooltip-content--wn{--corner-inset:0 0 92% 92%}.tooltip-content--corner.tooltip-content--ws{--corner-inset:92% 0 0 92%}.tooltip-content--grow:is(.tooltip-content--e,.tooltip-content--en,.tooltip-content--es,.tooltip-content--w,.tooltip-content--wn,.tooltip-content--ws){--scale:0 1}.tooltip-message--corner.tooltip-message--c{--corner-inset:46%}.tooltip-message--corner.tooltip-message--e{--corner-inset:46% 92% 46% 0}.tooltip-message--corner.tooltip-message--en{--corner-inset:0 92% 92% 0}.tooltip-message--corner.tooltip-message--es{--corner-inset:92% 92% 0 0}.tooltip-message--corner.tooltip-message--n{--corner-inset:92% 46% 0 46%}.tooltip-message--corner.tooltip-message--ne{--corner-inset:92% 0 0 92%}.tooltip-message--corner.tooltip-message--nw{--corner-inset:92% 92% 0 0}.tooltip-message--corner.tooltip-message--s{--corner-inset:0 46% 92% 46%}.tooltip-message--corner.tooltip-message--se{--corner-inset:0 0 92% 92%}.tooltip-message--corner.tooltip-message--sw{--corner-inset:0 92% 92% 0}.tooltip-message--corner.tooltip-message--w{--corner-inset:46% 0 46% 92%}.tooltip-message--corner.tooltip-message--wn{--corner-inset:0 0 92% 92%}.tooltip-message--corner.tooltip-message--ws{--corner-inset:92% 0 0 92%}.tooltip-message--grow:is(.tooltip-message--e,.tooltip-message--en,.tooltip-message--es,.tooltip-message--w,.tooltip-message--wn,.tooltip-message--ws){--scale:0 1}.tooltip-message{background:var(--background);color:var(--color);cursor:auto;font-size:var(--font-size);font-weight:var(--font-weight);padding-block:var(--padding-vertical);padding-inline:var(--padding-horizontal);pointer-events:none;white-space:nowrap}@keyframes tooltip-morph-close{0%{clip-path:inset(0 round var(--border-radius));animation-timing-function:cubic-bezier(.3,0,.2,1)}55%{clip-path:inset(calc(var(--morph-top) - var(--morph-land)) calc(var(--morph-right) - var(--morph-land)) calc(var(--morph-bottom) - var(--morph-land)) calc(var(--morph-left) - var(--morph-land)) round calc(var(--morph-radius) + var(--morph-land)))}80%{clip-path:inset(calc(var(--morph-top) - var(--morph-land)) calc(var(--morph-right) - var(--morph-land)) calc(var(--morph-bottom) - var(--morph-land)) calc(var(--morph-left) - var(--morph-land)) round calc(var(--morph-radius) + var(--morph-land)));animation-timing-function:cubic-bezier(.4,0,.2,1)}to{clip-path:inset(var(--morph-top) var(--morph-right) var(--morph-bottom) var(--morph-left) round var(--morph-radius))}}}
|
|
2
2
|
/*$vite$:1*/
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
declare function content(element: HTMLElement): HTMLElement | undefined;
|
|
2
|
+
declare function morph(element: HTMLElement, open: VoidFunction): (() => void) | undefined;
|
|
3
|
+
declare function morphing(active: boolean): (e: AnimationEvent | TransitionEvent) => void;
|
|
4
|
+
export { content, morph, morphing };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
const GOO = 'tooltip-morph-goo';
|
|
2
|
+
function content(element) {
|
|
3
|
+
let candidates = element.querySelectorAll('.tooltip-content, .tooltip-message');
|
|
4
|
+
for (let i = 0, n = candidates.length; i < n; i++) {
|
|
5
|
+
if (candidates[i].closest('.tooltip') === element) {
|
|
6
|
+
return candidates[i];
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
function goo() {
|
|
11
|
+
if (document.getElementById(GOO)) {
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
document.body.insertAdjacentHTML('beforeend', `<svg aria-hidden='true' height='0' style='position: absolute;' width='0'>
|
|
15
|
+
<filter color-interpolation-filters='sRGB' filterUnits='userSpaceOnUse' height='4000' id='${GOO}' width='4000' x='-2000' y='-2000'>
|
|
16
|
+
<feGaussianBlur in='SourceGraphic' result='blur' stdDeviation='8' />
|
|
17
|
+
<feColorMatrix in='blur' result='goo' type='matrix' values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 24 -12' />
|
|
18
|
+
<feComposite in='SourceGraphic' in2='goo' operator='over' />
|
|
19
|
+
</filter>
|
|
20
|
+
</svg>`);
|
|
21
|
+
}
|
|
22
|
+
function morph(element, open) {
|
|
23
|
+
let tooltip = content(element);
|
|
24
|
+
if (!tooltip || !(tooltip.classList.contains('tooltip-content--morph') || tooltip.classList.contains('tooltip-message--morph'))) {
|
|
25
|
+
open();
|
|
26
|
+
return;
|
|
27
|
+
}
|
|
28
|
+
goo();
|
|
29
|
+
let box = tooltip.getBoundingClientRect(), rect = element.getBoundingClientRect(), style = tooltip.style;
|
|
30
|
+
style.transition = 'none';
|
|
31
|
+
style.setProperty('--morph-bottom', `${box.bottom - rect.bottom}px`);
|
|
32
|
+
style.setProperty('--morph-left', `${rect.left - box.left}px`);
|
|
33
|
+
style.setProperty('--morph-radius', getComputedStyle(element).borderTopLeftRadius);
|
|
34
|
+
style.setProperty('--morph-right', `${box.right - rect.right}px`);
|
|
35
|
+
style.setProperty('--morph-top', `${rect.top - box.top}px`);
|
|
36
|
+
tooltip.getBoundingClientRect();
|
|
37
|
+
let frame = requestAnimationFrame(() => {
|
|
38
|
+
style.removeProperty('transition');
|
|
39
|
+
open();
|
|
40
|
+
});
|
|
41
|
+
return () => {
|
|
42
|
+
cancelAnimationFrame(frame);
|
|
43
|
+
style.removeProperty('transition');
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
function morphing(active) {
|
|
47
|
+
return (e) => {
|
|
48
|
+
let element = e.currentTarget, tooltip = e.target;
|
|
49
|
+
if (tooltip.closest('.tooltip') !== element ||
|
|
50
|
+
!(tooltip.classList.contains('tooltip-content--morph') || tooltip.classList.contains('tooltip-message--morph'))) {
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if ('propertyName' in e ? e.propertyName === 'clip-path' : e.animationName === 'tooltip-morph-close') {
|
|
54
|
+
element.classList.toggle('--morphing', active);
|
|
55
|
+
}
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export { content, morph, morphing };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { type Attributes, type Renderable } from '@esportsplus/template';
|
|
2
|
+
import './scss/index.scss';
|
|
3
|
+
type A = Attributes & {
|
|
4
|
+
expanded?: string[];
|
|
5
|
+
label: string;
|
|
6
|
+
nodes: Node[];
|
|
7
|
+
select?: (id: string) => void;
|
|
8
|
+
selected?: string;
|
|
9
|
+
toggle?: (id: string, expanded: boolean) => void;
|
|
10
|
+
};
|
|
11
|
+
type Node = {
|
|
12
|
+
children?: Node[];
|
|
13
|
+
id: string;
|
|
14
|
+
label: string;
|
|
15
|
+
meta?: Renderable<unknown>;
|
|
16
|
+
};
|
|
17
|
+
declare const _default: {
|
|
18
|
+
(): Renderable<any>;
|
|
19
|
+
<T extends A>(attributes: T): Renderable<any>;
|
|
20
|
+
<T extends Renderable<any>>(content: T): Renderable<any>;
|
|
21
|
+
(attributes: A, content?: Renderable<any>): Renderable<any>;
|
|
22
|
+
bind(context: {
|
|
23
|
+
attributes?: Partial<A> | undefined;
|
|
24
|
+
content?: Renderable<any>;
|
|
25
|
+
}): any;
|
|
26
|
+
};
|
|
27
|
+
export default _default;
|
|
28
|
+
export type { Node };
|
|
@@ -0,0 +1,182 @@
|
|
|
1
|
+
import * as reactivity_u0 from '@esportsplus/reactivity';
|
|
2
|
+
import * as template_u1 from '@esportsplus/template';
|
|
3
|
+
import { component } from '@esportsplus/template';
|
|
4
|
+
import './scss/index.scss';
|
|
5
|
+
const template_1n2ul8n1 = template_u1.template(`<div class='tree-item' role='none'><div class='tree-row ' role='treeitem'><!--$--><span class='tree-label'>`);
|
|
6
|
+
const template_1n2ul8n7 = template_u1.template(`<span class='tree-caret ' aria-hidden='true'><svg viewBox='0 0 10 10'><path d='M3.5 2 6.5 5 3.5 8' />`);
|
|
7
|
+
const template_1n2ul8n9 = template_u1.template(`<span class='tree-caret' aria-hidden='true'>`);
|
|
8
|
+
const template_1n2ul8nb = template_u1.template(`<span class='tree-meta'>`);
|
|
9
|
+
const template_1n2ul8ne = template_u1.template(`<div class='tree-group ' role='group'><div class='tree-group-content'>`);
|
|
10
|
+
const template_1n2ul8ni = template_u1.template(`<div class='tree' role='tree'>`);
|
|
11
|
+
function flatten(nodes, parent, index) {
|
|
12
|
+
for (let i = 0, n = nodes.length; i < n; i++) {
|
|
13
|
+
let node = nodes[i];
|
|
14
|
+
index.set(node.id, { node, parent });
|
|
15
|
+
if (node.children) {
|
|
16
|
+
flatten(node.children, node, index);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
return index;
|
|
20
|
+
}
|
|
21
|
+
function visible(nodes, expanded, out = []) {
|
|
22
|
+
for (let i = 0, n = nodes.length; i < n; i++) {
|
|
23
|
+
let node = nodes[i];
|
|
24
|
+
out.push(node);
|
|
25
|
+
if (node.children?.length && expanded[node.id]) {
|
|
26
|
+
visible(node.children, expanded, out);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
return out;
|
|
30
|
+
}
|
|
31
|
+
export default component(function ({ expanded: open = [], label, nodes, select, selected: initial, toggle, ...attributes }) {
|
|
32
|
+
let index = flatten(nodes, null, new Map()), ids = [...index.keys()], expanded = reactivity_u0.reactive(Object.fromEntries(ids.map((id) => [id, open.includes(id)]))), selected = reactivity_u0.reactive(Object.fromEntries(ids.map((id) => [id, id === initial]))), state = {
|
|
33
|
+
focused: visible(nodes, expanded).some((node) => node.id === initial) ? initial : (nodes[0]?.id ?? ''),
|
|
34
|
+
selected: initial ?? ''
|
|
35
|
+
}, tabbable = reactivity_u0.reactive(Object.fromEntries(ids.map((id) => [id, id === state.focused])));
|
|
36
|
+
function activate(id) {
|
|
37
|
+
let entry = index.get(id);
|
|
38
|
+
if (state.selected !== id) {
|
|
39
|
+
if (state.selected) {
|
|
40
|
+
selected[state.selected] = false;
|
|
41
|
+
}
|
|
42
|
+
selected[id] = true;
|
|
43
|
+
state.selected = id;
|
|
44
|
+
select?.(id);
|
|
45
|
+
}
|
|
46
|
+
if (entry.node.children?.length) {
|
|
47
|
+
set(id, !expanded[id]);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
function focus(root, id) {
|
|
51
|
+
root.querySelector(`.tree-row[data-id="${CSS.escape(id)}"]`)?.focus();
|
|
52
|
+
}
|
|
53
|
+
function set(id, value) {
|
|
54
|
+
if (expanded[id] === value) {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
expanded[id] = value;
|
|
58
|
+
toggle?.(id, value);
|
|
59
|
+
}
|
|
60
|
+
function render(nodes, depth) {
|
|
61
|
+
return nodes.map((node, i) => {
|
|
62
|
+
let branch = !!node.children?.length, id = node.id;
|
|
63
|
+
return (() => {
|
|
64
|
+
let root_1n2ul8n0 = template_1n2ul8n1(), element_1n2ul8n2 = root_1n2ul8n0.firstChild.firstElementChild, element_1n2ul8n3 = element_1n2ul8n2.firstChild, element_1n2ul8n4 = element_1n2ul8n2.firstElementChild, element_1n2ul8n5 = root_1n2ul8n0.firstChild;
|
|
65
|
+
template_u1.setList(element_1n2ul8n2, 'class', () => selected[id] && '--active');
|
|
66
|
+
template_u1.setProperty(element_1n2ul8n2, 'aria-level', depth);
|
|
67
|
+
template_u1.setProperty(element_1n2ul8n2, 'aria-posinset', i + 1);
|
|
68
|
+
template_u1.setProperty(element_1n2ul8n2, 'aria-setsize', nodes.length);
|
|
69
|
+
template_u1.setProperty(element_1n2ul8n2, 'data-id', id);
|
|
70
|
+
template_u1.setProperties(element_1n2ul8n2, branch ? { 'aria-expanded': () => expanded[id] ? 'true' : 'false' } : undefined);
|
|
71
|
+
template_u1.setProperty(element_1n2ul8n2, 'aria-selected', () => selected[id] ? 'true' : 'false');
|
|
72
|
+
template_u1.setProperty(element_1n2ul8n2, 'tabindex', () => tabbable[id] ? 0 : -1);
|
|
73
|
+
element_1n2ul8n3.parentNode.insertBefore(branch
|
|
74
|
+
? (() => {
|
|
75
|
+
let root_1n2ul8n6 = template_1n2ul8n7(), element_1n2ul8n8 = root_1n2ul8n6.firstChild;
|
|
76
|
+
template_u1.setList(element_1n2ul8n8, 'class', () => expanded[id] && '--active');
|
|
77
|
+
return root_1n2ul8n6;
|
|
78
|
+
})()
|
|
79
|
+
: template_1n2ul8n9(), element_1n2ul8n3);
|
|
80
|
+
template_u1.slot(element_1n2ul8n4, node.label, 1);
|
|
81
|
+
template_u1.slot(element_1n2ul8n2, node.meta !== undefined && (() => {
|
|
82
|
+
let root_1n2ul8na = template_1n2ul8nb(), element_1n2ul8nc = root_1n2ul8na.firstChild;
|
|
83
|
+
template_u1.slot(element_1n2ul8nc, node.meta, 1);
|
|
84
|
+
return root_1n2ul8na;
|
|
85
|
+
})(), 2);
|
|
86
|
+
template_u1.slot(element_1n2ul8n5, branch && (() => {
|
|
87
|
+
let root_1n2ul8nd = template_1n2ul8ne(), element_1n2ul8nf = root_1n2ul8nd.firstChild, element_1n2ul8ng = element_1n2ul8nf.firstElementChild;
|
|
88
|
+
template_u1.setList(element_1n2ul8nf, 'class', () => expanded[id] && '--active');
|
|
89
|
+
template_u1.setProperty(element_1n2ul8nf, 'inert', () => !expanded[id]);
|
|
90
|
+
template_u1.slot(element_1n2ul8ng, render(node.children, depth + 1), 1);
|
|
91
|
+
return root_1n2ul8nd;
|
|
92
|
+
})(), 2);
|
|
93
|
+
return root_1n2ul8n0;
|
|
94
|
+
})();
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
return (() => {
|
|
98
|
+
let root_1n2ul8nh = template_1n2ul8ni(), element_1n2ul8nj = root_1n2ul8nh.firstChild;
|
|
99
|
+
template_u1.setProperty(element_1n2ul8nj, 'aria-label', label);
|
|
100
|
+
template_u1.setProperties(element_1n2ul8nj, attributes);
|
|
101
|
+
template_u1.delegate(element_1n2ul8nj, 'click', (event) => {
|
|
102
|
+
let row = event.target.closest('.tree-row'), root = row?.closest('.tree');
|
|
103
|
+
if (!row || !root) {
|
|
104
|
+
return;
|
|
105
|
+
}
|
|
106
|
+
focus(root, row.dataset.id);
|
|
107
|
+
activate(row.dataset.id);
|
|
108
|
+
});
|
|
109
|
+
template_u1.on(element_1n2ul8nj, 'focusin', (event) => {
|
|
110
|
+
let id = event.target.closest('.tree-row')?.dataset.id;
|
|
111
|
+
if (id === undefined || id === state.focused) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
tabbable[state.focused] = false;
|
|
115
|
+
tabbable[id] = true;
|
|
116
|
+
state.focused = id;
|
|
117
|
+
});
|
|
118
|
+
template_u1.delegate(element_1n2ul8nj, 'keydown', (event) => {
|
|
119
|
+
let root = event.target.closest('.tree');
|
|
120
|
+
if (!root || !index.has(state.focused)) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
123
|
+
let entry = index.get(state.focused), id = state.focused, rows = visible(nodes, expanded), position = rows.indexOf(entry.node), target;
|
|
124
|
+
switch (event.key) {
|
|
125
|
+
case 'ArrowDown':
|
|
126
|
+
target = rows[position + 1]?.id;
|
|
127
|
+
break;
|
|
128
|
+
case 'ArrowUp':
|
|
129
|
+
target = rows[position - 1]?.id;
|
|
130
|
+
break;
|
|
131
|
+
case 'ArrowRight':
|
|
132
|
+
if (!entry.node.children?.length) {
|
|
133
|
+
break;
|
|
134
|
+
}
|
|
135
|
+
if (expanded[id]) {
|
|
136
|
+
target = entry.node.children[0].id;
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
set(id, true);
|
|
140
|
+
}
|
|
141
|
+
break;
|
|
142
|
+
case 'ArrowLeft':
|
|
143
|
+
if (entry.node.children?.length && expanded[id]) {
|
|
144
|
+
set(id, false);
|
|
145
|
+
}
|
|
146
|
+
else {
|
|
147
|
+
target = entry.parent?.id;
|
|
148
|
+
}
|
|
149
|
+
break;
|
|
150
|
+
case 'End':
|
|
151
|
+
target = rows[rows.length - 1]?.id;
|
|
152
|
+
break;
|
|
153
|
+
case 'Enter':
|
|
154
|
+
case ' ':
|
|
155
|
+
activate(id);
|
|
156
|
+
break;
|
|
157
|
+
case 'Home':
|
|
158
|
+
target = rows[0]?.id;
|
|
159
|
+
break;
|
|
160
|
+
default: {
|
|
161
|
+
if (event.key.length !== 1 || event.altKey || event.ctrlKey || event.metaKey) {
|
|
162
|
+
return;
|
|
163
|
+
}
|
|
164
|
+
let key = event.key.toLowerCase();
|
|
165
|
+
for (let i = 1, n = rows.length; i < n; i++) {
|
|
166
|
+
let row = rows[(position + i) % n];
|
|
167
|
+
if (row.label.toLowerCase().startsWith(key)) {
|
|
168
|
+
target = row.id;
|
|
169
|
+
break;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
event.preventDefault();
|
|
175
|
+
if (target !== undefined) {
|
|
176
|
+
focus(root, target);
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
template_u1.slot(element_1n2ul8nj, render(nodes, 1), 1);
|
|
180
|
+
return root_1n2ul8nh;
|
|
181
|
+
})();
|
|
182
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
@layer components {.tree{--background:var(--background-default);--background-active:var(--color-grey-500);--background-default:transparent;--background-hover:var(--color-grey-400);--border-radius:var(--border-radius-300);--caret-duration:.32s;--caret-size:16px;--caret-timing-function:linear(0, .2 6%, .53 13%, .8 21%, .96 30%, 1.02 38%, 1.03 45%, 1.01 60%, 1);--close-duration:.2s;--close-fade-duration:.14s;--close-timing-function:cubic-bezier(.4, 0, 1, 1);--color:var(--color-default);--color-active:var(--color-text-500);--color-default:var(--color-text-300);--color-hover:var(--color-text-400);--focus-color:var(--color-blue-400);--focus-width:1.5px;--font-size:var(--font-size-300);--font-weight:var(--font-weight-400);--font-weight-active:var(--font-weight-500);--gap:var(--size-200);--guide-color:var(--color-border-300);--guide-width:1px;--height:28px;--meta-color:var(--color-text-300);--meta-font-family:"Geist Mono", ui-monospace, monospace;--open-duration:.28s;--open-fade-duration:.18s;--open-timing-function:cubic-bezier(.22, 1, .36, 1);--padding-horizontal:var(--size-300)}.tree-row:not(.--active):hover{--background:var(--background-hover);--color:var(--color-hover)}.tree-row.--active{--background:var(--background-active);--color:var(--color-active);--font-weight:var(--font-weight-active)}.tree{font-size:var(--font-size);flex-direction:column;display:flex}.tree-caret{flex:0 0 var(--caret-size);height:var(--caret-size);transition:rotate var(--caret-duration) var(--caret-timing-function);justify-content:center;align-items:center;display:inline-flex}.tree-caret.--active{rotate:90deg}.tree-caret svg{fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;stroke-width:1.6px;width:10px;height:10px}.tree-group{transition:grid-template-rows var(--open-duration) var(--open-timing-function);grid-template-rows:1fr;display:grid}.tree-group:not(.--active){transition:grid-template-rows var(--close-duration) var(--close-timing-function);grid-template-rows:0fr}.tree-group:not(.--active) .tree-group-content{opacity:0;transition:opacity var(--close-fade-duration) var(--close-timing-function)}.tree-group-content{border-inline-start:var(--guide-width) solid var(--guide-color);opacity:1;min-height:0;transition:opacity var(--open-fade-duration) var(--open-timing-function);flex-direction:column;margin-inline-start:calc(var(--padding-horizontal) + (var(--caret-size) - var(--guide-width)) / 2);padding-inline-start:var(--size-100);display:flex;overflow:hidden}.tree-label{text-overflow:ellipsis;white-space:nowrap;flex:auto;min-width:0;overflow:hidden}.tree-meta{color:var(--meta-color);font-family:var(--meta-font-family);font-size:.85em;font-weight:var(--font-weight-400);flex:none}.tree-row{background:var(--background);border-radius:var(--border-radius);color:var(--color);cursor:pointer;font-weight:var(--font-weight);align-items:center;gap:var(--gap);height:var(--height);padding-inline:var(--padding-horizontal);transition:background var(--transition-duration) var(--transition-timing-function), color var(--transition-duration) var(--transition-timing-function);-webkit-user-select:none;user-select:none;outline:none;display:flex}.tree-row:focus-visible{box-shadow:inset 0 0 0 var(--focus-width) var(--focus-color)}@media (prefers-reduced-motion:reduce){.tree-caret,.tree-group,.tree-group-content{transition:none!important}}}
|
|
2
|
+
/*$vite$:1*/
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { type Attributes, type Renderable } from '@esportsplus/template';
|
|
2
|
+
import './scss/index.scss';
|
|
3
|
+
type A = Attributes & {
|
|
4
|
+
nodes: Node[];
|
|
5
|
+
open?: string[];
|
|
6
|
+
selected?: string;
|
|
7
|
+
state?: {
|
|
8
|
+
selected: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
type Node = {
|
|
12
|
+
children?: Node[];
|
|
13
|
+
name: string;
|
|
14
|
+
};
|
|
15
|
+
declare const _default: {
|
|
16
|
+
(): Renderable<any>;
|
|
17
|
+
<T extends A>(attributes: T): Renderable<any>;
|
|
18
|
+
<T extends Renderable<any>>(content: T): Renderable<any>;
|
|
19
|
+
(attributes: A, content?: Renderable<any>): Renderable<any>;
|
|
20
|
+
bind(context: {
|
|
21
|
+
attributes?: Partial<A> | undefined;
|
|
22
|
+
content?: Renderable<any>;
|
|
23
|
+
}): any;
|
|
24
|
+
};
|
|
25
|
+
export default _default;
|