@espressif/dashboard-ui-components 1.10.0 → 1.11.0
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/CHANGELOG.md +65 -0
- package/dist/_vendor/@radix-ui/primitive/dist/index.js +9 -0
- package/dist/_vendor/@radix-ui/react-checkbox/dist/index.js +185 -0
- package/dist/_vendor/@radix-ui/react-compose-refs/dist/index.js +28 -0
- package/dist/_vendor/@radix-ui/react-context/dist/index.js +68 -0
- package/dist/_vendor/@radix-ui/react-presence/dist/index.js +127 -0
- package/dist/_vendor/@radix-ui/react-primitive/dist/index.js +42 -0
- package/dist/_vendor/@radix-ui/react-use-controllable-state/dist/index.js +55 -0
- package/dist/_vendor/@radix-ui/react-use-layout-effect/dist/index.js +5 -0
- package/dist/_vendor/@radix-ui/react-use-previous/dist/index.js +17 -0
- package/dist/_vendor/@radix-ui/react-use-size/dist/index.js +39 -0
- package/dist/_vendor/lottie-react/build/index.es.js +537 -0
- package/dist/_vendor/lottie-web/build/player/lottie.js +14149 -0
- package/dist/_virtual/_rolldown/runtime.js +24 -0
- package/dist/assets/illustrations/bulb-cloud-drawing.js +4 -0
- package/dist/assets/illustrations/rm-dashboard-update.js +4 -0
- package/dist/assets/illustrations/rm-data-download.js +4 -0
- package/dist/assets/logos/espressif/espressif-no-text.js +4 -0
- package/dist/assets/logos/espressif/espressif-with-text-dm.js +4 -0
- package/dist/assets/logos/espressif/espressif-with-text.js +4 -0
- package/dist/assets/logos/insights/insights-no-text.js +4 -0
- package/dist/assets/logos/insights/insights-with-text-dm.js +4 -0
- package/dist/assets/logos/insights/insights-with-text.js +4 -0
- package/dist/assets/logos/launchpad/launchpad-no-text-dm.js +4 -0
- package/dist/assets/logos/launchpad/launchpad-no-text.js +4 -0
- package/dist/assets/logos/launchpad/launchpad-with-text-dm.js +4 -0
- package/dist/assets/logos/launchpad/launchpad-with-text.js +4 -0
- package/dist/assets/logos/private-agents/private-agents-no-text.js +4 -0
- package/dist/assets/logos/private-agents/private-agents-with-text-dm.js +4 -0
- package/dist/assets/logos/private-agents/private-agents-with-text.js +4 -0
- package/dist/assets/logos/rainmaker/rainmaker-no-text.js +4 -0
- package/dist/assets/logos/rainmaker/rainmaker-with-text-dm.js +4 -0
- package/dist/assets/logos/rainmaker/rainmaker-with-text.js +4 -0
- package/dist/assets/logos/rainmaker-classic/rainmaker-classic-no-text-dm.js +4 -0
- package/dist/assets/logos/rainmaker-classic/rainmaker-classic-no-text.js +4 -0
- package/dist/assets/logos/rainmaker-classic/rainmaker-classic-with-text-dm.js +4 -0
- package/dist/assets/logos/rainmaker-classic/rainmaker-classic-with-text.js +4 -0
- package/dist/assets/logos/rainmaker-neo/rainmaker-neo-no-text.js +4 -0
- package/dist/assets/logos/rainmaker-neo/rainmaker-neo-with-text-dm.js +4 -0
- package/dist/assets/logos/rainmaker-neo/rainmaker-neo-with-text.js +4 -0
- package/dist/assets/logos/ui-components/ui-components-no-text.js +4 -0
- package/dist/assets/logos/ui-components/ui-components-with-text-dm.js +4 -0
- package/dist/assets/logos/ui-components/ui-components-with-text.js +4 -0
- package/dist/assets/logos/zerocode/zerocode-no-text.js +4 -0
- package/dist/assets/logos/zerocode/zerocode-with-text-dm.js +4 -0
- package/dist/assets/logos/zerocode/zerocode-with-text.js +4 -0
- package/dist/assets/logos/zerocode-ai/zerocode-ai-no-text.js +4 -0
- package/dist/assets/logos/zerocode-ai/zerocode-ai-with-text-dm.js +4 -0
- package/dist/assets/logos/zerocode-ai/zerocode-ai-with-text.js +4 -0
- package/dist/common/animated-rainmaker-logo/animated-rainmaker-logo.constants.js +18 -0
- package/dist/common/animated-rainmaker-logo/animated-rainmaker-logo.js +24 -0
- package/dist/common/animated-rainmaker-logo/rainmaker-c-logo.js +50 -0
- package/dist/common/animated-rainmaker-logo/use-animated-rainmaker-logo-animation.js +85 -0
- package/dist/common/app-logo/app-logo.js +59 -0
- package/dist/common/app-logo/logo-config.js +297 -0
- package/dist/common/copyright-card/copyright-card.js +39 -0
- package/dist/common/footer-card/footer-card.js +22 -0
- package/dist/common/index.js +8 -8
- package/dist/common/my-account-menu/my-account-menu.js +32 -0
- package/dist/common/page-loader/page-loader.js +21 -0
- package/dist/common/profile-card/profile-card.js +26 -0
- package/dist/components/accordion/accordion.js +52 -0
- package/dist/components/advanced-search-box/advanced-search-box.js +106 -0
- package/dist/components/alert/alert.js +85 -0
- package/dist/components/animated-containers/pop-collection-item.js +28 -0
- package/dist/components/async-multi-select/async-multi-select.js +199 -0
- package/dist/components/avatar/avatar.js +41 -0
- package/dist/components/button/button.js +191 -0
- package/dist/components/button/flash-button.js +110 -0
- package/dist/components/button/invert-button.js +13 -0
- package/dist/components/calendar/calendar.js +105 -0
- package/dist/components/cards/animated-card/animated-card-animations.js +57 -0
- package/dist/components/cards/animated-card/animated-card.js +42 -0
- package/dist/components/cards/basic-details-card.js +46 -0
- package/dist/components/cards/collapsible-card.js +48 -0
- package/dist/components/cards/no-data-card/no-data-card.js +30 -0
- package/dist/components/cards/section-card.js +265 -0
- package/dist/components/cards/simple-card.js +24 -0
- package/dist/components/carousel/carousel.js +158 -0
- package/dist/components/chart/area-chart.js +135 -0
- package/dist/components/chart/bar-chart.js +151 -0
- package/dist/components/chart/chart-colors.js +85 -0
- package/dist/components/chart/chart-series-data.js +53 -0
- package/dist/components/chart/chart.js +147 -0
- package/dist/components/chart/chart.types.js +7 -0
- package/dist/components/chart/composed-chart.js +182 -0
- package/dist/components/chart/donut-chart.js +177 -0
- package/dist/components/chart/line-chart.js +137 -0
- package/dist/components/chart/treemap-chart.js +294 -0
- package/dist/components/circular-progress/circular-progress.js +125 -0
- package/dist/components/code-editor/code-editor.js +235 -0
- package/dist/components/code-editor/code-editor.utils.js +122 -0
- package/dist/components/code-editor/use-code-editor-keys.js +79 -0
- package/dist/components/code-editor/use-highlighted-html.js +102 -0
- package/dist/components/confirmation-dialog/confirmation-dialog.js +72 -0
- package/dist/components/content-container/content-container.js +20 -0
- package/dist/components/copiable-text/copiable-text.js +46 -0
- package/dist/components/data-table/data-table.js +186 -0
- package/dist/components/data-table/responsive-columns.js +65 -0
- package/dist/components/data-table/row-actions.js +27 -0
- package/dist/components/data-table/sticky-columns.js +71 -0
- package/dist/components/data-table/table-body.js +57 -0
- package/dist/components/data-table/table-header.js +21 -0
- package/dist/components/date-picker/date-picker.js +95 -0
- package/dist/components/date-range-picker/date-range-picker.js +301 -0
- package/dist/components/date-range-picker/presets.js +174 -0
- package/dist/components/date-time-picker/date-time-picker.js +144 -0
- package/dist/components/date-time-picker/date-time-picker.utils.js +32 -0
- package/dist/components/device-icon/device-icon.config.js +194 -0
- package/dist/components/device-icon/device-icon.js +17 -0
- package/dist/components/device-icon/icons/air-conditioner.js +22 -0
- package/dist/components/device-icon/icons/blind.js +24 -0
- package/dist/components/device-icon/icons/dimmer.js +14 -0
- package/dist/components/device-icon/icons/extension-board.js +42 -0
- package/dist/components/device-icon/icons/fan.js +14 -0
- package/dist/components/device-icon/icons/knob.js +14 -0
- package/dist/components/device-icon/icons/led-strip.js +22 -0
- package/dist/components/device-icon/icons/light.js +14 -0
- package/dist/components/device-icon/icons/refrigerator.js +18 -0
- package/dist/components/device-icon/icons/retro-switch.js +18 -0
- package/dist/components/device-icon/icons/router.js +20 -0
- package/dist/components/device-icon/icons/sensor.js +20 -0
- package/dist/components/device-icon/icons/socket.js +19 -0
- package/dist/components/device-icon/icons/switch.js +19 -0
- package/dist/components/device-icon/icons/thermostat.js +21 -0
- package/dist/components/device-icon/icons/washing-machine.js +22 -0
- package/dist/components/device-icon/match-device.js +61 -0
- package/dist/components/dynamic-list/dynamic-list.js +445 -0
- package/dist/components/error-display/full-size-error/full-size-error.js +20 -0
- package/dist/components/error-display/inline-error/inline-error.js +12 -0
- package/dist/components/file-input/file-input.js +318 -0
- package/dist/components/file-upload/file-upload.js +317 -0
- package/dist/components/filters-bar/filters-bar.js +36 -0
- package/dist/components/fullscreen-dialog/fullscreen-dialog.js +68 -0
- package/dist/components/icon-avatar/icon-avatar.js +130 -0
- package/dist/components/icon-text-action-card/icon-text-action-card.js +190 -0
- package/dist/components/illustration/illustration-registry.js +37 -0
- package/dist/components/illustration/illustration-variants.js +21 -0
- package/dist/components/illustration/illustration.js +68 -0
- package/dist/components/index.d.ts +0 -20
- package/dist/components/index.js +134 -6
- package/dist/components/key-value-manager/key-value-manager-add-popover.js +126 -0
- package/dist/components/key-value-manager/key-value-manager-field.js +47 -0
- package/dist/components/key-value-manager/key-value-manager-table.js +188 -0
- package/dist/components/key-value-manager/key-value-manager.js +111 -0
- package/dist/components/key-value-manager/key-value-manager.props.js +28 -0
- package/dist/components/key-value-manager/key-value-manager.utils.js +21 -0
- package/dist/components/link/link.js +67 -0
- package/dist/components/list/dropdown-list-item.js +60 -0
- package/dist/components/list/list-item.utils.js +76 -0
- package/dist/components/list/list.js +49 -0
- package/dist/components/list/list.props.js +27 -0
- package/dist/components/list/standard-list-item.js +66 -0
- package/dist/components/list-details/list-details-item-button.js +46 -0
- package/dist/components/list-details/list-details-item-dropdown.js +112 -0
- package/dist/components/list-details/list-details-item-strip.js +125 -0
- package/dist/components/list-details/list-details.js +148 -0
- package/dist/components/lottie-animation-container/lottie-animation-container.js +31 -0
- package/dist/components/lottie-animations/animation-data/access-denied.js +3980 -0
- package/dist/components/lottie-animations/animation-data/active.js +825 -0
- package/dist/components/lottie-animations/animation-data/bar-chart.js +610 -0
- package/dist/components/lottie-animations/animation-data/chart-loading.js +5368 -0
- package/dist/components/lottie-animations/animation-data/cloud-download.js +1660 -0
- package/dist/components/lottie-animations/animation-data/cloud-sync.js +932 -0
- package/dist/components/lottie-animations/animation-data/coud-upload.js +7060 -0
- package/dist/components/lottie-animations/animation-data/cross-throb.js +1506 -0
- package/dist/components/lottie-animations/animation-data/dashboard-loading.js +14330 -0
- package/dist/components/lottie-animations/animation-data/error-spread-out.js +5567 -0
- package/dist/components/lottie-animations/animation-data/error.js +1211 -0
- package/dist/components/lottie-animations/animation-data/green-success.js +14826 -0
- package/dist/components/lottie-animations/animation-data/inactive.js +723 -0
- package/dist/components/lottie-animations/animation-data/light.js +2678 -0
- package/dist/components/lottie-animations/animation-data/lock.js +900 -0
- package/dist/components/lottie-animations/animation-data/lock2.js +1686 -0
- package/dist/components/lottie-animations/animation-data/locked.js +641 -0
- package/dist/components/lottie-animations/animation-data/search-error.js +954 -0
- package/dist/components/lottie-animations/animation-data/security.js +4121 -0
- package/dist/components/lottie-animations/animation-data/success.js +404 -0
- package/dist/components/lottie-animations/animation-data/verification-in-progress.js +10138 -0
- package/dist/components/lottie-animations/animation-data/warning.js +843 -0
- package/dist/components/lottie-animations/verification-in-progress/verification-in-progress.js +19 -0
- package/dist/components/markdown-content/markdown-content.components.js +114 -0
- package/dist/components/markdown-content/markdown-content.js +39 -0
- package/dist/components/menu/menu.js +19 -0
- package/dist/components/monospace-content/monospace-content.js +80 -0
- package/dist/components/nav-bar/nav-bar-details-panel.js +51 -0
- package/dist/components/nav-bar/nav-bar-mobile-menu.js +105 -0
- package/dist/components/nav-bar/nav-bar.js +449 -0
- package/dist/components/nav-bar/use-nav-bar-overflow.js +74 -0
- package/dist/components/nav-bar/use-nav-bar-scroll.js +42 -0
- package/dist/components/overflow-badge-list/overflow-badge-list.js +58 -0
- package/dist/components/page-container/page-container-skeleton.js +72 -0
- package/dist/components/page-container/page-container.js +93 -0
- package/dist/components/pagination/pagination.js +96 -0
- package/dist/components/pagination/pagination.props.js +16 -0
- package/dist/components/progress-bar/progress-bar.js +106 -0
- package/dist/components/radio-group/radio-group.js +41 -0
- package/dist/components/requirement-list/requirement-list.js +83 -0
- package/dist/components/scrollable-sections/scrollable-sections.js +270 -0
- package/dist/components/search-box/search-box.js +54 -0
- package/dist/components/search-field-shell.js +24 -0
- package/dist/components/selectable-card-list/checkbox-card-list.js +85 -0
- package/dist/components/selectable-card-list/radio-card-list.js +99 -0
- package/dist/components/selectable-card-list/selectable-card-list-shared.js +135 -0
- package/dist/components/selectable-card-list/selectable-card-list.js +34 -0
- package/dist/components/sidebar/sidebar.js +344 -0
- package/dist/components/sidebar/types.js +6 -0
- package/dist/components/simple-clickable-card/simple-clickable-card-shared.js +309 -0
- package/dist/components/simple-clickable-card/simple-clickable-card.js +106 -0
- package/dist/components/simple-info-card/simple-info-card.js +154 -0
- package/dist/components/simple-list/simple-list.js +146 -0
- package/dist/components/simple-paginated-list/simple-paginated-list.js +178 -0
- package/dist/components/simplified-date/simplified-date.js +56 -0
- package/dist/components/skeletons/table-skeleton.js +16 -0
- package/dist/components/spinner/spinner.js +25 -0
- package/dist/components/stat-card/stat-card.js +206 -0
- package/dist/components/status-badge/status-badge.js +108 -0
- package/dist/components/status-card-list/status-card-list.js +282 -0
- package/dist/components/tag/tag.js +144 -0
- package/dist/components/tag-input/tag-input.js +161 -0
- package/dist/components/text-effects/glitch-effect/glitch-text.js +115 -0
- package/dist/components/text-effects/gradient-text/gradient-text.js +32 -0
- package/dist/components/text-effects/highlight-text/highlight-text.js +35 -0
- package/dist/components/text-effects/parse-text-markup.js +53 -0
- package/dist/components/text-effects/shimmer-text/shimmer-text.js +67 -0
- package/dist/components/time-picker/time-picker.js +23 -0
- package/dist/components/toast/toast.js +126 -0
- package/dist/components/togglable-items-list/togglable-items-list.js +28 -0
- package/dist/components/tooltip/tooltip.js +21 -0
- package/dist/components/transfer-list/transfer-list.js +413 -0
- package/dist/components/truncated-line-with-tooltip/truncated-line-with-tooltip.js +61 -0
- package/dist/components/typography/typography-variants.js +41 -0
- package/dist/components/typography/typography.js +15 -0
- package/dist/components/user-type-badge/user-type-badge.js +40 -0
- package/dist/components/user-type-badge/user-type-badge.registry.js +17 -0
- package/dist/components/vertical-stepper/vertical-stepper.js +171 -0
- package/dist/core/alert.js +33 -0
- package/dist/core/animate-ui/components/animate/code-header.js +30 -0
- package/dist/core/animate-ui/components/animate/code.js +35 -0
- package/dist/core/animate-ui/components/animate/tabs.js +188 -0
- package/dist/core/animate-ui/components/animate/tooltip.js +39 -0
- package/dist/core/animate-ui/components/base/preview-card.js +29 -0
- package/dist/core/animate-ui/components/base/progress.js +32 -0
- package/dist/core/animate-ui/components/base/radio.js +24 -0
- package/dist/core/animate-ui/components/buttons/copy.js +95 -0
- package/dist/core/animate-ui/components/radix/accordion.js +36 -0
- package/dist/core/animate-ui/components/radix/dialog.js +60 -0
- package/dist/core/animate-ui/components/radix/dropdown-menu.js +129 -0
- package/dist/core/animate-ui/components/radix/sheet.js +110 -0
- package/dist/core/animate-ui/components/radix/sidebar.js +416 -0
- package/dist/core/animate-ui/components/radix/switch.js +34 -0
- package/dist/core/animate-ui/components/radix/toggle-group.js +115 -0
- package/dist/core/animate-ui/components/radix/toggle.js +24 -0
- package/dist/core/animate-ui/primitives/animate/code-block.js +131 -0
- package/dist/core/animate-ui/primitives/animate/escape-html.js +7 -0
- package/dist/core/animate-ui/primitives/animate/shiki-highlighter.js +64 -0
- package/dist/core/animate-ui/primitives/animate/slot.js +39 -0
- package/dist/core/animate-ui/primitives/animate/tabs.js +202 -0
- package/dist/core/animate-ui/primitives/animate/tooltip.js +351 -0
- package/dist/core/animate-ui/primitives/base/preview-card.js +107 -0
- package/dist/core/animate-ui/primitives/base/progress.js +60 -0
- package/dist/core/animate-ui/primitives/base/radio.js +83 -0
- package/dist/core/animate-ui/primitives/buttons/button.js +15 -0
- package/dist/core/animate-ui/primitives/effects/highlight.js +407 -0
- package/dist/core/animate-ui/primitives/radix/accordion.js +76 -0
- package/dist/core/animate-ui/primitives/radix/dialog.js +136 -0
- package/dist/core/animate-ui/primitives/radix/dropdown-menu.js +305 -0
- package/dist/core/animate-ui/primitives/radix/sheet.js +165 -0
- package/dist/core/animate-ui/primitives/radix/switch.js +86 -0
- package/dist/core/animate-ui/primitives/radix/toggle-group.js +100 -0
- package/dist/core/animate-ui/primitives/texts/counting-number.js +75 -0
- package/dist/core/avatar.js +32 -0
- package/dist/core/badge.js +27 -0
- package/dist/core/breadcrumb.js +62 -0
- package/dist/core/button/button.js +43 -0
- package/dist/core/button/craft-button.js +78 -0
- package/dist/core/button-group.js +38 -0
- package/dist/core/button.js +40 -0
- package/dist/core/card.js +42 -0
- package/dist/core/carousel/carousel.js +149 -0
- package/dist/core/checkbox/motion-checkbox.js +103 -0
- package/dist/core/collapsible.js +54 -0
- package/dist/core/combobox/combobox.js +85 -0
- package/dist/core/command.js +61 -0
- package/dist/core/field-end-icons.js +36 -0
- package/dist/core/field-label-row.js +33 -0
- package/dist/core/form.js +92 -0
- package/dist/core/hooks/use-controlled-state.js +27 -0
- package/dist/core/hooks/use-data-state.js +39 -0
- package/dist/core/hooks/use-is-in-view.js +18 -0
- package/dist/core/hooks/use-mobile.js +19 -0
- package/dist/core/hooks/use-reveal-on-scroll-up.js +141 -0
- package/dist/core/hooks/use-scroll-overflow.js +50 -0
- package/dist/core/index.js +18 -52
- package/dist/core/input/input-password.js +30 -0
- package/dist/core/input/input.js +147 -0
- package/dist/core/input-otp/input-otp.js +183 -0
- package/dist/core/label.js +15 -0
- package/dist/core/popover.js +31 -0
- package/dist/core/scroll-area.js +42 -0
- package/dist/core/select.js +121 -0
- package/dist/core/separator.js +40 -0
- package/dist/core/skeleton.js +11 -0
- package/dist/core/table.js +59 -0
- package/dist/core/textarea/textarea.js +97 -0
- package/dist/core/utils/get-strict-context.js +18 -0
- package/dist/index.js +148 -9
- package/dist/layouts/entry-layout/entry-layout-bg.js +4 -0
- package/dist/layouts/entry-layout/entry-layout.js +52 -0
- package/dist/layouts/index.js +7 -6
- package/dist/layouts/workspace-layout/account-menu/account-menu.js +108 -0
- package/dist/layouts/workspace-layout/breadcrumbs/derive-breadcrumbs.js +37 -0
- package/dist/layouts/workspace-layout/breadcrumbs/workspace-breadcrumbs.js +22 -0
- package/dist/layouts/workspace-layout/footer/footer.js +15 -0
- package/dist/layouts/workspace-layout/header/header.js +54 -0
- package/dist/layouts/workspace-layout/workspace-layout.js +157 -0
- package/dist/tailwind-preset.js +3 -4
- package/dist/utils/cn.js +8 -0
- package/dist/utils/color.js +72 -0
- package/dist/utils/index.js +3 -2
- package/dist/utils/path-match.js +17 -0
- package/dist/utils/silver-shine.js +63 -0
- package/dist/utils/variant-gradient-underlay.js +45 -0
- package/dist/utils/variant.js +426 -0
- package/package.json +7 -4
- package/dist/chunk-2GDYZAKR.js +0 -505
- package/dist/chunk-ALCWXFUC.js +0 -733
- package/dist/chunk-CDHBLANU.js +0 -59
- package/dist/chunk-LUESSJAF.js +0 -70068
- package/dist/chunk-TMORRNEB.js +0 -323
- package/dist/chunk-TRTQSARU.js +0 -31
- package/dist/chunk-VU4CZ76T.js +0 -43
- package/dist/chunk-XNLCVHBC.js +0 -364
- package/dist/chunk-Z4776NRY.js +0 -4347
- package/src/assets/illustrations/add-to-group.svg +0 -32
- package/src/assets/illustrations/chip.svg +0 -51
- package/src/assets/illustrations/create-new-group.svg +0 -27
- package/src/assets/illustrations/new-ota.svg +0 -61
- package/src/assets/illustrations/secured-key.svg +0 -48
- /package/dist/assets/{entry-layout-bg-JPI7GJ42.webp → entry-layout-bg-DUM0UhT3.webp} +0 -0
package/dist/chunk-ALCWXFUC.js
DELETED
|
@@ -1,733 +0,0 @@
|
|
|
1
|
-
import { Separator } from './chunk-XNLCVHBC.js';
|
|
2
|
-
import { cn, isPresetColor, resolveColor } from './chunk-VU4CZ76T.js';
|
|
3
|
-
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
4
|
-
import * as React from 'react';
|
|
5
|
-
import * as PopoverPrimitive from '@radix-ui/react-popover';
|
|
6
|
-
import * as LabelPrimitive from '@radix-ui/react-label';
|
|
7
|
-
import { cva } from 'class-variance-authority';
|
|
8
|
-
import { Slot } from '@radix-ui/react-slot';
|
|
9
|
-
import { useInView } from 'motion/react';
|
|
10
|
-
|
|
11
|
-
var SILVER_SHINE_OVERLAY_CLASS = cn(
|
|
12
|
-
"pointer-events-none absolute inset-0 -z-10 rounded-[inherit]",
|
|
13
|
-
"bg-[linear-gradient(135deg,rgba(255,255,255,0.10)_0%,rgba(255,255,255,0.02)_35%,rgba(0,0,0,0.04)_70%,rgba(255,255,255,0.06)_100%)]"
|
|
14
|
-
);
|
|
15
|
-
var SILVER_SHINE_OVERLAY_STYLE = {
|
|
16
|
-
boxShadow: "inset 0 0 0 1px rgba(255,255,255,0.18), inset 0 -1px 0 rgba(0,0,0,0.08)"
|
|
17
|
-
};
|
|
18
|
-
function SilverShineOverlay() {
|
|
19
|
-
return /* @__PURE__ */ jsx(
|
|
20
|
-
"span",
|
|
21
|
-
{
|
|
22
|
-
"aria-hidden": true,
|
|
23
|
-
className: SILVER_SHINE_OVERLAY_CLASS,
|
|
24
|
-
style: SILVER_SHINE_OVERLAY_STYLE
|
|
25
|
-
}
|
|
26
|
-
);
|
|
27
|
-
}
|
|
28
|
-
var SILVER_SOLID_SURFACE_STYLE = {
|
|
29
|
-
backgroundImage: "linear-gradient(135deg, rgba(255,255,255,0.22) 0%, rgba(255,255,255,0.04) 35%, rgba(0,0,0,0.12) 70%, rgba(255,255,255,0.14) 100%)",
|
|
30
|
-
boxShadow: "inset 0 1px 0 rgba(255,255,255,0.22), inset 0 -1px 0 rgba(0,0,0,0.18)"
|
|
31
|
-
};
|
|
32
|
-
function SilverMetallicBorderOverlay() {
|
|
33
|
-
return /* @__PURE__ */ jsx(
|
|
34
|
-
"span",
|
|
35
|
-
{
|
|
36
|
-
"aria-hidden": true,
|
|
37
|
-
className: cn(
|
|
38
|
-
"pointer-events-none absolute inset-0 rounded-[inherit] p-px",
|
|
39
|
-
"bg-[linear-gradient(135deg,rgba(230,230,230,0.95)_0%,rgba(190,190,190,0.70)_28%,rgba(248,248,248,0.95)_52%,rgba(175,175,175,0.70)_76%,rgba(225,225,225,0.95)_100%)]",
|
|
40
|
-
"dark:bg-[linear-gradient(135deg,rgba(255,255,255,0.05)_0%,rgba(110,110,110,0.28)_32%,rgba(255,255,255,0.07)_52%,rgba(70,70,70,0.24)_72%,rgba(180,180,180,0.09)_100%)]"
|
|
41
|
-
),
|
|
42
|
-
style: {
|
|
43
|
-
WebkitMask: "linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",
|
|
44
|
-
WebkitMaskComposite: "xor",
|
|
45
|
-
mask: "linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0)",
|
|
46
|
-
maskComposite: "exclude"
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
);
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// src/utils/variant.ts
|
|
53
|
-
var VARIANTS = ["outline", "solid", "soft", "gradient"];
|
|
54
|
-
var VARIANT_GRADIENT_TRANSITION_DURATION_MS = 2e3;
|
|
55
|
-
var VARIANT_GRADIENT_DURATION_CLASS = "duration-[2000ms]";
|
|
56
|
-
var VARIANT_GRADIENT_BACKDROP_BASE = "pointer-events-none absolute inset-0 -z-10 rounded-[inherit] bg-[length:100%_100%]";
|
|
57
|
-
var VARIANT_GRADIENT_HOVER_OVERLAY_CLASS = cn(
|
|
58
|
-
"opacity-0 transition-opacity ease-in-out group-hover:opacity-100",
|
|
59
|
-
VARIANT_GRADIENT_DURATION_CLASS
|
|
60
|
-
);
|
|
61
|
-
var PRESET_GRADIENT_FRAME = {
|
|
62
|
-
primary: "border border-primary/20 bg-transparent text-primary [&>svg]:text-primary",
|
|
63
|
-
secondary: "border border-secondary/20 bg-transparent text-secondary [&>svg]:text-secondary",
|
|
64
|
-
info: "border border-info/20 bg-transparent text-info [&>svg]:text-info",
|
|
65
|
-
warning: "border border-warning/20 bg-transparent text-warning [&>svg]:text-warning",
|
|
66
|
-
error: "border border-error/20 bg-transparent text-error [&>svg]:text-error",
|
|
67
|
-
success: "border border-success/20 bg-transparent text-success [&>svg]:text-success",
|
|
68
|
-
disabled: "border border-disabled/20 bg-transparent text-disabled [&>svg]:text-disabled",
|
|
69
|
-
gray: "border border-gray/20 bg-transparent text-gray [&>svg]:text-gray",
|
|
70
|
-
mist: "border border-mist-border bg-transparent text-mist-foreground [&>svg]:text-mist-foreground"
|
|
71
|
-
};
|
|
72
|
-
var PRESET_GRADIENT_BACKDROP = {
|
|
73
|
-
primary: {
|
|
74
|
-
idle: "bg-gradient-to-r from-primary/5 via-primary/10 to-primary/5",
|
|
75
|
-
hover: "bg-gradient-to-r from-primary/10 via-primary/5 to-primary/10"
|
|
76
|
-
},
|
|
77
|
-
secondary: {
|
|
78
|
-
idle: "bg-gradient-to-r from-secondary/5 via-secondary/10 to-secondary/5",
|
|
79
|
-
hover: "bg-gradient-to-r from-secondary/10 via-secondary/5 to-secondary/10"
|
|
80
|
-
},
|
|
81
|
-
info: {
|
|
82
|
-
idle: "bg-gradient-to-r from-info/5 via-info/10 to-info/5",
|
|
83
|
-
hover: "bg-gradient-to-r from-info/10 via-info/5 to-info/10"
|
|
84
|
-
},
|
|
85
|
-
warning: {
|
|
86
|
-
idle: "bg-gradient-to-r from-warning/5 via-warning/10 to-warning/5",
|
|
87
|
-
hover: "bg-gradient-to-r from-warning/10 via-warning/5 to-warning/10"
|
|
88
|
-
},
|
|
89
|
-
error: {
|
|
90
|
-
idle: "bg-gradient-to-r from-error/5 via-error/10 to-error/5",
|
|
91
|
-
hover: "bg-gradient-to-r from-error/10 via-error/5 to-error/10"
|
|
92
|
-
},
|
|
93
|
-
success: {
|
|
94
|
-
idle: "bg-gradient-to-r from-success/5 via-success/10 to-success/5",
|
|
95
|
-
hover: "bg-gradient-to-r from-success/10 via-success/5 to-success/10"
|
|
96
|
-
},
|
|
97
|
-
disabled: {
|
|
98
|
-
idle: "bg-gradient-to-r from-disabled/5 via-disabled/10 to-disabled/5",
|
|
99
|
-
hover: "bg-gradient-to-r from-disabled/10 via-disabled/5 to-disabled/10"
|
|
100
|
-
},
|
|
101
|
-
gray: {
|
|
102
|
-
idle: "bg-gradient-to-r from-gray/5 via-gray/10 to-gray/5",
|
|
103
|
-
hover: "bg-gradient-to-r from-gray/10 via-gray/5 to-gray/10"
|
|
104
|
-
},
|
|
105
|
-
mist: {
|
|
106
|
-
idle: "bg-gradient-to-r from-mist via-mist-border to-mist",
|
|
107
|
-
hover: "bg-gradient-to-r from-mist-border via-mist to-mist-border"
|
|
108
|
-
}
|
|
109
|
-
};
|
|
110
|
-
var SILVER_GRADIENT_BACKDROP = {
|
|
111
|
-
idle: "bg-gradient-to-r from-gray/2 via-gray/5 to-gray/2",
|
|
112
|
-
hover: "bg-gradient-to-r from-gray/5 via-gray/2 to-gray/5"
|
|
113
|
-
};
|
|
114
|
-
function arbitraryGradientBackgroundImage(color, emphasis) {
|
|
115
|
-
const mix = (pct) => `color-mix(in srgb, ${color} ${pct}%, transparent)`;
|
|
116
|
-
const [a, b, c] = emphasis === "idle" ? [5, 10, 5] : [10, 5, 10];
|
|
117
|
-
return `linear-gradient(to right, ${mix(a)}, ${mix(b)}, ${mix(c)})`;
|
|
118
|
-
}
|
|
119
|
-
var PRESET_VARIANT_STYLES = {
|
|
120
|
-
primary: {
|
|
121
|
-
soft: {
|
|
122
|
-
container: "border border-primary/10 bg-primary/5 text-primary [&>svg]:text-primary",
|
|
123
|
-
foreground: "text-primary",
|
|
124
|
-
description: "text-primary/80"
|
|
125
|
-
},
|
|
126
|
-
outline: {
|
|
127
|
-
container: "bg-transparent border border-primary/50 dark:border-primary/30 text-primary [&>svg]:text-primary",
|
|
128
|
-
foreground: "text-primary",
|
|
129
|
-
description: "text-primary/80"
|
|
130
|
-
},
|
|
131
|
-
solid: {
|
|
132
|
-
container: "border border-transparent bg-primary text-primary-foreground [&>svg]:text-primary-foreground",
|
|
133
|
-
foreground: "text-primary-foreground",
|
|
134
|
-
description: "text-primary-foreground/80"
|
|
135
|
-
},
|
|
136
|
-
gradient: {
|
|
137
|
-
container: "",
|
|
138
|
-
foreground: "text-primary",
|
|
139
|
-
description: "text-primary/60"
|
|
140
|
-
}
|
|
141
|
-
},
|
|
142
|
-
secondary: {
|
|
143
|
-
soft: {
|
|
144
|
-
container: "border border-secondary/10 bg-secondary/5 text-secondary [&>svg]:text-secondary",
|
|
145
|
-
foreground: "text-secondary",
|
|
146
|
-
description: "text-secondary/80"
|
|
147
|
-
},
|
|
148
|
-
outline: {
|
|
149
|
-
container: "bg-transparent border border-secondary/50 dark:border-secondary/30 text-secondary [&>svg]:text-secondary",
|
|
150
|
-
foreground: "text-secondary",
|
|
151
|
-
description: "text-secondary/80"
|
|
152
|
-
},
|
|
153
|
-
solid: {
|
|
154
|
-
container: "border border-transparent bg-secondary text-secondary-foreground [&>svg]:text-secondary-foreground",
|
|
155
|
-
foreground: "text-secondary-foreground",
|
|
156
|
-
description: "text-secondary-foreground/80"
|
|
157
|
-
},
|
|
158
|
-
gradient: {
|
|
159
|
-
container: "",
|
|
160
|
-
foreground: "text-secondary",
|
|
161
|
-
description: "text-secondary/60"
|
|
162
|
-
}
|
|
163
|
-
},
|
|
164
|
-
info: {
|
|
165
|
-
soft: {
|
|
166
|
-
container: "border border-info/10 bg-info/5 text-info [&>svg]:text-info",
|
|
167
|
-
foreground: "text-info",
|
|
168
|
-
description: "text-info/80"
|
|
169
|
-
},
|
|
170
|
-
outline: {
|
|
171
|
-
container: "bg-transparent border border-info/50 dark:border-info/30 text-info [&>svg]:text-info",
|
|
172
|
-
foreground: "text-info",
|
|
173
|
-
description: "text-info/80"
|
|
174
|
-
},
|
|
175
|
-
solid: {
|
|
176
|
-
container: "border border-transparent bg-info text-info-foreground [&>svg]:text-info-foreground",
|
|
177
|
-
foreground: "text-info-foreground",
|
|
178
|
-
description: "text-info-foreground/80"
|
|
179
|
-
},
|
|
180
|
-
gradient: {
|
|
181
|
-
container: "",
|
|
182
|
-
foreground: "text-info",
|
|
183
|
-
description: "text-info/60"
|
|
184
|
-
}
|
|
185
|
-
},
|
|
186
|
-
warning: {
|
|
187
|
-
soft: {
|
|
188
|
-
container: "border border-warning/10 bg-warning/5 text-warning [&>svg]:text-warning",
|
|
189
|
-
foreground: "text-warning",
|
|
190
|
-
description: "text-warning"
|
|
191
|
-
},
|
|
192
|
-
outline: {
|
|
193
|
-
container: "bg-transparent border border-warning/50 dark:border-warning/30 text-warning [&>svg]:text-warning",
|
|
194
|
-
foreground: "text-warning",
|
|
195
|
-
description: "text-warning"
|
|
196
|
-
},
|
|
197
|
-
solid: {
|
|
198
|
-
container: "border border-transparent bg-warning text-warning-foreground [&>svg]:text-warning-foreground",
|
|
199
|
-
foreground: "text-warning-foreground",
|
|
200
|
-
description: "text-warning-foreground/80"
|
|
201
|
-
},
|
|
202
|
-
gradient: {
|
|
203
|
-
container: "",
|
|
204
|
-
foreground: "text-warning",
|
|
205
|
-
description: "text-warning/60"
|
|
206
|
-
}
|
|
207
|
-
},
|
|
208
|
-
error: {
|
|
209
|
-
soft: {
|
|
210
|
-
container: "border border-error/10 bg-error/5 text-error [&>svg]:text-error",
|
|
211
|
-
foreground: "text-error",
|
|
212
|
-
description: "text-error/80"
|
|
213
|
-
},
|
|
214
|
-
outline: {
|
|
215
|
-
container: "bg-transparent border border-error/50 dark:border-error/30 text-error [&>svg]:text-error",
|
|
216
|
-
foreground: "text-error",
|
|
217
|
-
description: "text-error/80"
|
|
218
|
-
},
|
|
219
|
-
solid: {
|
|
220
|
-
container: "border border-transparent bg-error text-error-foreground [&>svg]:text-error-foreground",
|
|
221
|
-
foreground: "text-error-foreground",
|
|
222
|
-
description: "text-error-foreground/80"
|
|
223
|
-
},
|
|
224
|
-
gradient: {
|
|
225
|
-
container: "",
|
|
226
|
-
foreground: "text-error",
|
|
227
|
-
description: "text-error/60"
|
|
228
|
-
}
|
|
229
|
-
},
|
|
230
|
-
success: {
|
|
231
|
-
soft: {
|
|
232
|
-
container: "border border-success/10 bg-success/5 text-success [&>svg]:text-success",
|
|
233
|
-
foreground: "text-success",
|
|
234
|
-
description: "text-success/80"
|
|
235
|
-
},
|
|
236
|
-
outline: {
|
|
237
|
-
container: "bg-transparent border border-success/50 dark:border-success/30 text-success [&>svg]:text-success",
|
|
238
|
-
foreground: "text-success",
|
|
239
|
-
description: "text-success/80"
|
|
240
|
-
},
|
|
241
|
-
solid: {
|
|
242
|
-
container: "border border-transparent bg-success text-success-foreground [&>svg]:text-success-foreground",
|
|
243
|
-
foreground: "text-success-foreground",
|
|
244
|
-
description: "text-success-foreground/80"
|
|
245
|
-
},
|
|
246
|
-
gradient: {
|
|
247
|
-
container: "",
|
|
248
|
-
foreground: "text-success",
|
|
249
|
-
description: "text-success/60"
|
|
250
|
-
}
|
|
251
|
-
},
|
|
252
|
-
disabled: {
|
|
253
|
-
soft: {
|
|
254
|
-
container: "border border-disabled/10 bg-disabled/5 text-disabled [&>svg]:text-disabled",
|
|
255
|
-
foreground: "text-disabled",
|
|
256
|
-
description: "text-disabled/80"
|
|
257
|
-
},
|
|
258
|
-
outline: {
|
|
259
|
-
container: "bg-transparent border border-disabled/50 dark:border-disabled/30 text-disabled [&>svg]:text-disabled",
|
|
260
|
-
foreground: "text-disabled",
|
|
261
|
-
description: "text-disabled/80"
|
|
262
|
-
},
|
|
263
|
-
solid: {
|
|
264
|
-
container: "border border-transparent bg-disabled text-disabled-foreground [&>svg]:text-disabled-foreground",
|
|
265
|
-
foreground: "text-disabled-foreground",
|
|
266
|
-
description: "text-disabled-foreground/80"
|
|
267
|
-
},
|
|
268
|
-
gradient: {
|
|
269
|
-
container: "",
|
|
270
|
-
foreground: "text-disabled",
|
|
271
|
-
description: "text-disabled/60"
|
|
272
|
-
}
|
|
273
|
-
},
|
|
274
|
-
gray: {
|
|
275
|
-
soft: {
|
|
276
|
-
container: "border border-gray/10 bg-gray/5 text-gray [&>svg]:text-gray",
|
|
277
|
-
foreground: "text-gray",
|
|
278
|
-
description: "text-gray/80"
|
|
279
|
-
},
|
|
280
|
-
outline: {
|
|
281
|
-
container: "bg-transparent border border-gray/50 dark:border-gray/30 text-gray [&>svg]:text-gray",
|
|
282
|
-
foreground: "text-gray",
|
|
283
|
-
description: "text-gray/80"
|
|
284
|
-
},
|
|
285
|
-
solid: {
|
|
286
|
-
container: "border border-transparent bg-gray text-gray-foreground [&>svg]:text-gray-foreground",
|
|
287
|
-
foreground: "text-gray-foreground",
|
|
288
|
-
description: "text-gray-foreground/80"
|
|
289
|
-
},
|
|
290
|
-
gradient: {
|
|
291
|
-
container: "",
|
|
292
|
-
foreground: "text-gray",
|
|
293
|
-
description: "text-gray/60"
|
|
294
|
-
}
|
|
295
|
-
},
|
|
296
|
-
mist: {
|
|
297
|
-
soft: {
|
|
298
|
-
container: "border border-mist-border bg-mist text-mist-foreground [&>svg]:text-mist-foreground",
|
|
299
|
-
foreground: "text-mist-foreground",
|
|
300
|
-
description: "text-mist-secondary"
|
|
301
|
-
},
|
|
302
|
-
outline: {
|
|
303
|
-
container: "bg-transparent border border-mist-border text-mist-foreground [&>svg]:text-mist-foreground",
|
|
304
|
-
foreground: "text-mist-foreground",
|
|
305
|
-
description: "text-mist-secondary"
|
|
306
|
-
},
|
|
307
|
-
solid: {
|
|
308
|
-
container: "border border-transparent bg-mist text-mist-foreground [&>svg]:text-mist-foreground",
|
|
309
|
-
foreground: "text-mist-foreground",
|
|
310
|
-
description: "text-mist-secondary"
|
|
311
|
-
},
|
|
312
|
-
gradient: {
|
|
313
|
-
container: "",
|
|
314
|
-
foreground: "text-mist-foreground",
|
|
315
|
-
description: "text-mist-secondary"
|
|
316
|
-
}
|
|
317
|
-
}
|
|
318
|
-
};
|
|
319
|
-
var SILVER_VARIANT_ROWS = {
|
|
320
|
-
soft: {
|
|
321
|
-
container: "border border-gray/5 bg-gray/2 text-gray [&>svg]:text-gray",
|
|
322
|
-
foreground: "text-gray",
|
|
323
|
-
description: "text-gray/80"
|
|
324
|
-
},
|
|
325
|
-
outline: {
|
|
326
|
-
/** No `border-*` here — the metallic ring is painted by `SilverMetallicBorderOverlay`. */
|
|
327
|
-
container: "bg-transparent border-0 text-gray [&>svg]:text-gray",
|
|
328
|
-
foreground: "text-gray",
|
|
329
|
-
description: "text-gray/80"
|
|
330
|
-
},
|
|
331
|
-
solid: {
|
|
332
|
-
/** Metallic surface gradient layered on top of `bg-gray` via `SILVER_SOLID_SURFACE_STYLE`. */
|
|
333
|
-
container: "border border-transparent bg-gray text-gray-foreground [&>svg]:text-gray-foreground",
|
|
334
|
-
foreground: "text-gray-foreground",
|
|
335
|
-
description: "text-gray-foreground/80"
|
|
336
|
-
},
|
|
337
|
-
gradient: {
|
|
338
|
-
container: "",
|
|
339
|
-
foreground: "text-gray",
|
|
340
|
-
description: "text-gray/60"
|
|
341
|
-
}
|
|
342
|
-
};
|
|
343
|
-
function getArbitraryVariantStyles(variant, color) {
|
|
344
|
-
const text = resolveColor(color, "text");
|
|
345
|
-
const border = resolveColor(color, "border");
|
|
346
|
-
if (variant === "soft") {
|
|
347
|
-
return {
|
|
348
|
-
container: cn("border [&>svg]:text-current", text.className),
|
|
349
|
-
foreground: text.className ?? "",
|
|
350
|
-
foregroundStyle: text.style,
|
|
351
|
-
description: "text-current/80",
|
|
352
|
-
containerStyle: {
|
|
353
|
-
backgroundColor: `color-mix(in srgb, ${color} 5%, transparent)`,
|
|
354
|
-
borderColor: `color-mix(in srgb, ${color} 10%, transparent)`,
|
|
355
|
-
...text.style
|
|
356
|
-
}
|
|
357
|
-
};
|
|
358
|
-
}
|
|
359
|
-
if (variant === "outline") {
|
|
360
|
-
return {
|
|
361
|
-
container: cn(
|
|
362
|
-
"bg-transparent border [&>svg]:text-current",
|
|
363
|
-
border.className,
|
|
364
|
-
text.className
|
|
365
|
-
),
|
|
366
|
-
foreground: text.className ?? "",
|
|
367
|
-
foregroundStyle: text.style,
|
|
368
|
-
description: "text-current/80",
|
|
369
|
-
containerStyle: {
|
|
370
|
-
borderColor: `light-dark(
|
|
371
|
-
color-mix(in srgb, ${color} 50%, transparent),
|
|
372
|
-
color-mix(in srgb, ${color} 28%, transparent)
|
|
373
|
-
)`,
|
|
374
|
-
...text.style
|
|
375
|
-
}
|
|
376
|
-
};
|
|
377
|
-
}
|
|
378
|
-
if (variant === "solid") {
|
|
379
|
-
return {
|
|
380
|
-
container: "border border-transparent text-white [&>svg]:text-white",
|
|
381
|
-
foreground: "text-white",
|
|
382
|
-
foregroundStyle: { color: "#fff" },
|
|
383
|
-
description: "text-white/80",
|
|
384
|
-
containerStyle: { backgroundColor: color, color: "#fff" }
|
|
385
|
-
};
|
|
386
|
-
}
|
|
387
|
-
return {
|
|
388
|
-
container: cn(
|
|
389
|
-
"relative isolate overflow-hidden group border [&>svg]:text-current",
|
|
390
|
-
text.className
|
|
391
|
-
),
|
|
392
|
-
foreground: text.className ?? "",
|
|
393
|
-
foregroundStyle: text.style,
|
|
394
|
-
description: "text-current/60",
|
|
395
|
-
containerStyle: {
|
|
396
|
-
borderColor: `color-mix(in srgb, ${color} 20%, transparent)`,
|
|
397
|
-
...text.style
|
|
398
|
-
},
|
|
399
|
-
gradientHoverLayersInline: {
|
|
400
|
-
idle: {
|
|
401
|
-
backgroundImage: arbitraryGradientBackgroundImage(color, "idle"),
|
|
402
|
-
backgroundSize: "100% 100%"
|
|
403
|
-
},
|
|
404
|
-
hover: {
|
|
405
|
-
backgroundImage: arbitraryGradientBackgroundImage(color, "hover"),
|
|
406
|
-
backgroundSize: "100% 100%"
|
|
407
|
-
}
|
|
408
|
-
}
|
|
409
|
-
};
|
|
410
|
-
}
|
|
411
|
-
function resolveVariantStyles(variant, color) {
|
|
412
|
-
if (color === "silver") {
|
|
413
|
-
const row = SILVER_VARIANT_ROWS[variant];
|
|
414
|
-
if (variant === "gradient") {
|
|
415
|
-
return {
|
|
416
|
-
container: cn(
|
|
417
|
-
"relative isolate overflow-hidden group",
|
|
418
|
-
PRESET_GRADIENT_FRAME.gray
|
|
419
|
-
),
|
|
420
|
-
gradientHoverLayers: SILVER_GRADIENT_BACKDROP,
|
|
421
|
-
foreground: row.foreground,
|
|
422
|
-
description: row.description,
|
|
423
|
-
silverShine: true
|
|
424
|
-
};
|
|
425
|
-
}
|
|
426
|
-
return {
|
|
427
|
-
container: cn("relative isolate overflow-hidden", row.container),
|
|
428
|
-
containerStyle: variant === "solid" ? SILVER_SOLID_SURFACE_STYLE : void 0,
|
|
429
|
-
foreground: row.foreground,
|
|
430
|
-
description: row.description,
|
|
431
|
-
silverBorder: variant === "outline"
|
|
432
|
-
};
|
|
433
|
-
}
|
|
434
|
-
if (isPresetColor(color)) {
|
|
435
|
-
const preset = color;
|
|
436
|
-
const row = PRESET_VARIANT_STYLES[preset][variant];
|
|
437
|
-
if (variant === "gradient") {
|
|
438
|
-
return {
|
|
439
|
-
container: cn(
|
|
440
|
-
"relative isolate overflow-hidden group",
|
|
441
|
-
PRESET_GRADIENT_FRAME[preset]
|
|
442
|
-
),
|
|
443
|
-
gradientHoverLayers: PRESET_GRADIENT_BACKDROP[preset],
|
|
444
|
-
foreground: row.foreground,
|
|
445
|
-
description: row.description
|
|
446
|
-
};
|
|
447
|
-
}
|
|
448
|
-
return {
|
|
449
|
-
container: row.container,
|
|
450
|
-
foreground: row.foreground,
|
|
451
|
-
description: row.description
|
|
452
|
-
};
|
|
453
|
-
}
|
|
454
|
-
return getArbitraryVariantStyles(variant, color);
|
|
455
|
-
}
|
|
456
|
-
var Card = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
457
|
-
"div",
|
|
458
|
-
{
|
|
459
|
-
ref,
|
|
460
|
-
className: cn(
|
|
461
|
-
"rounded-xl border bg-card text-card-foreground shadow",
|
|
462
|
-
className
|
|
463
|
-
),
|
|
464
|
-
...props
|
|
465
|
-
}
|
|
466
|
-
));
|
|
467
|
-
Card.displayName = "Card";
|
|
468
|
-
var CardHeader = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
469
|
-
"div",
|
|
470
|
-
{
|
|
471
|
-
ref,
|
|
472
|
-
className: cn("flex flex-col space-y-1.5 p-6", className),
|
|
473
|
-
...props
|
|
474
|
-
}
|
|
475
|
-
));
|
|
476
|
-
CardHeader.displayName = "CardHeader";
|
|
477
|
-
var CardTitle = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
478
|
-
"div",
|
|
479
|
-
{
|
|
480
|
-
ref,
|
|
481
|
-
className: cn("font-semibold leading-none tracking-tight", className),
|
|
482
|
-
...props
|
|
483
|
-
}
|
|
484
|
-
));
|
|
485
|
-
CardTitle.displayName = "CardTitle";
|
|
486
|
-
var CardDescription = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
487
|
-
"div",
|
|
488
|
-
{
|
|
489
|
-
ref,
|
|
490
|
-
className: cn("text-sm text-muted-foreground", className),
|
|
491
|
-
...props
|
|
492
|
-
}
|
|
493
|
-
));
|
|
494
|
-
CardDescription.displayName = "CardDescription";
|
|
495
|
-
var CardContent = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", { ref, className: cn("p-6 pt-0", className), ...props }));
|
|
496
|
-
CardContent.displayName = "CardContent";
|
|
497
|
-
var CardFooter = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
498
|
-
"div",
|
|
499
|
-
{
|
|
500
|
-
ref,
|
|
501
|
-
className: cn("flex items-center p-6 pt-0", className),
|
|
502
|
-
...props
|
|
503
|
-
}
|
|
504
|
-
));
|
|
505
|
-
CardFooter.displayName = "CardFooter";
|
|
506
|
-
var Popover = PopoverPrimitive.Root;
|
|
507
|
-
var PopoverTrigger = PopoverPrimitive.Trigger;
|
|
508
|
-
var PopoverAnchor = PopoverPrimitive.Anchor;
|
|
509
|
-
var PopoverContent = React.forwardRef(
|
|
510
|
-
({
|
|
511
|
-
className,
|
|
512
|
-
align = "center",
|
|
513
|
-
sideOffset = 4,
|
|
514
|
-
portal = true,
|
|
515
|
-
onWheel,
|
|
516
|
-
onTouchMove,
|
|
517
|
-
...props
|
|
518
|
-
}, ref) => {
|
|
519
|
-
const handleWheel = (event) => {
|
|
520
|
-
onWheel?.(event);
|
|
521
|
-
event.stopPropagation();
|
|
522
|
-
};
|
|
523
|
-
const handleTouchMove = (event) => {
|
|
524
|
-
onTouchMove?.(event);
|
|
525
|
-
event.stopPropagation();
|
|
526
|
-
};
|
|
527
|
-
const content = /* @__PURE__ */ jsx(
|
|
528
|
-
PopoverPrimitive.Content,
|
|
529
|
-
{
|
|
530
|
-
ref,
|
|
531
|
-
align,
|
|
532
|
-
sideOffset,
|
|
533
|
-
onWheel: handleWheel,
|
|
534
|
-
onTouchMove: handleTouchMove,
|
|
535
|
-
className: cn(
|
|
536
|
-
"z-50 w-72 rounded-2xl border bg-popover p-4 text-popover-foreground shadow-lg outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-popover-content-transform-origin]",
|
|
537
|
-
className
|
|
538
|
-
),
|
|
539
|
-
...props
|
|
540
|
-
}
|
|
541
|
-
);
|
|
542
|
-
return portal ? /* @__PURE__ */ jsx(PopoverPrimitive.Portal, { children: content }) : content;
|
|
543
|
-
}
|
|
544
|
-
);
|
|
545
|
-
PopoverContent.displayName = PopoverPrimitive.Content.displayName;
|
|
546
|
-
var labelVariants = cva(
|
|
547
|
-
"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"
|
|
548
|
-
);
|
|
549
|
-
var Label = React.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(
|
|
550
|
-
LabelPrimitive.Root,
|
|
551
|
-
{
|
|
552
|
-
ref,
|
|
553
|
-
className: cn(labelVariants(), className),
|
|
554
|
-
...props
|
|
555
|
-
}
|
|
556
|
-
));
|
|
557
|
-
Label.displayName = LabelPrimitive.Root.displayName;
|
|
558
|
-
function VariantGradientUnderlay({
|
|
559
|
-
layers,
|
|
560
|
-
layersInline,
|
|
561
|
-
silverShine = false,
|
|
562
|
-
silverBorder = false
|
|
563
|
-
}) {
|
|
564
|
-
const shine = silverShine ? /* @__PURE__ */ jsx(SilverShineOverlay, {}) : null;
|
|
565
|
-
const border = silverBorder ? /* @__PURE__ */ jsx(SilverMetallicBorderOverlay, {}) : null;
|
|
566
|
-
if (layers != null) {
|
|
567
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
568
|
-
/* @__PURE__ */ jsx(
|
|
569
|
-
"span",
|
|
570
|
-
{
|
|
571
|
-
"aria-hidden": true,
|
|
572
|
-
className: cn(VARIANT_GRADIENT_BACKDROP_BASE, layers.idle)
|
|
573
|
-
}
|
|
574
|
-
),
|
|
575
|
-
/* @__PURE__ */ jsx(
|
|
576
|
-
"span",
|
|
577
|
-
{
|
|
578
|
-
"aria-hidden": true,
|
|
579
|
-
className: cn(
|
|
580
|
-
VARIANT_GRADIENT_BACKDROP_BASE,
|
|
581
|
-
layers.hover,
|
|
582
|
-
VARIANT_GRADIENT_HOVER_OVERLAY_CLASS
|
|
583
|
-
)
|
|
584
|
-
}
|
|
585
|
-
),
|
|
586
|
-
shine,
|
|
587
|
-
border
|
|
588
|
-
] });
|
|
589
|
-
}
|
|
590
|
-
if (layersInline != null) {
|
|
591
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
592
|
-
/* @__PURE__ */ jsx(
|
|
593
|
-
"span",
|
|
594
|
-
{
|
|
595
|
-
"aria-hidden": true,
|
|
596
|
-
className: VARIANT_GRADIENT_BACKDROP_BASE,
|
|
597
|
-
style: layersInline.idle
|
|
598
|
-
}
|
|
599
|
-
),
|
|
600
|
-
/* @__PURE__ */ jsx(
|
|
601
|
-
"span",
|
|
602
|
-
{
|
|
603
|
-
"aria-hidden": true,
|
|
604
|
-
className: cn(
|
|
605
|
-
VARIANT_GRADIENT_BACKDROP_BASE,
|
|
606
|
-
VARIANT_GRADIENT_HOVER_OVERLAY_CLASS
|
|
607
|
-
),
|
|
608
|
-
style: layersInline.hover
|
|
609
|
-
}
|
|
610
|
-
),
|
|
611
|
-
shine,
|
|
612
|
-
border
|
|
613
|
-
] });
|
|
614
|
-
}
|
|
615
|
-
if (shine || border) {
|
|
616
|
-
return /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
617
|
-
shine,
|
|
618
|
-
border
|
|
619
|
-
] });
|
|
620
|
-
}
|
|
621
|
-
return null;
|
|
622
|
-
}
|
|
623
|
-
var badgeVariants = cva(
|
|
624
|
-
"inline-flex items-center rounded-md px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2"
|
|
625
|
-
);
|
|
626
|
-
function Badge({
|
|
627
|
-
className,
|
|
628
|
-
variant = "soft",
|
|
629
|
-
color = "primary",
|
|
630
|
-
style,
|
|
631
|
-
children,
|
|
632
|
-
...props
|
|
633
|
-
}) {
|
|
634
|
-
const styles = resolveVariantStyles(variant, color);
|
|
635
|
-
return /* @__PURE__ */ jsxs(
|
|
636
|
-
"div",
|
|
637
|
-
{
|
|
638
|
-
className: cn(badgeVariants(), styles.container, className),
|
|
639
|
-
style: { ...styles.containerStyle, ...style },
|
|
640
|
-
...props,
|
|
641
|
-
children: [
|
|
642
|
-
/* @__PURE__ */ jsx(
|
|
643
|
-
VariantGradientUnderlay,
|
|
644
|
-
{
|
|
645
|
-
layers: styles.gradientHoverLayers,
|
|
646
|
-
layersInline: styles.gradientHoverLayersInline,
|
|
647
|
-
silverShine: styles.silverShine,
|
|
648
|
-
silverBorder: styles.silverBorder
|
|
649
|
-
}
|
|
650
|
-
),
|
|
651
|
-
children
|
|
652
|
-
]
|
|
653
|
-
}
|
|
654
|
-
);
|
|
655
|
-
}
|
|
656
|
-
var buttonGroupVariants = cva(
|
|
657
|
-
"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-2 [&>*]:focus-visible:relative [&>*]:focus-visible:z-10 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1",
|
|
658
|
-
{
|
|
659
|
-
variants: {
|
|
660
|
-
orientation: {
|
|
661
|
-
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
|
|
662
|
-
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
|
|
663
|
-
}
|
|
664
|
-
},
|
|
665
|
-
defaultVariants: {
|
|
666
|
-
orientation: "horizontal"
|
|
667
|
-
}
|
|
668
|
-
}
|
|
669
|
-
);
|
|
670
|
-
function ButtonGroup({
|
|
671
|
-
className,
|
|
672
|
-
orientation,
|
|
673
|
-
...props
|
|
674
|
-
}) {
|
|
675
|
-
return /* @__PURE__ */ jsx(
|
|
676
|
-
"div",
|
|
677
|
-
{
|
|
678
|
-
role: "group",
|
|
679
|
-
"data-slot": "button-group",
|
|
680
|
-
"data-orientation": orientation,
|
|
681
|
-
className: cn(buttonGroupVariants({ orientation }), className),
|
|
682
|
-
...props
|
|
683
|
-
}
|
|
684
|
-
);
|
|
685
|
-
}
|
|
686
|
-
function ButtonGroupText({
|
|
687
|
-
className,
|
|
688
|
-
asChild = false,
|
|
689
|
-
...props
|
|
690
|
-
}) {
|
|
691
|
-
const Comp = asChild ? Slot : "div";
|
|
692
|
-
return /* @__PURE__ */ jsx(
|
|
693
|
-
Comp,
|
|
694
|
-
{
|
|
695
|
-
className: cn(
|
|
696
|
-
"bg-muted shadow-xs flex items-center gap-2 rounded-md border px-4 text-sm font-medium [&_svg:not([class*='size-'])]:size-4 [&_svg]:pointer-events-none",
|
|
697
|
-
className
|
|
698
|
-
),
|
|
699
|
-
...props
|
|
700
|
-
}
|
|
701
|
-
);
|
|
702
|
-
}
|
|
703
|
-
function ButtonGroupSeparator({
|
|
704
|
-
className,
|
|
705
|
-
orientation = "vertical",
|
|
706
|
-
...props
|
|
707
|
-
}) {
|
|
708
|
-
return /* @__PURE__ */ jsx(
|
|
709
|
-
Separator,
|
|
710
|
-
{
|
|
711
|
-
"data-slot": "button-group-separator",
|
|
712
|
-
orientation,
|
|
713
|
-
className: cn(
|
|
714
|
-
"bg-input relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
|
|
715
|
-
className
|
|
716
|
-
),
|
|
717
|
-
...props
|
|
718
|
-
}
|
|
719
|
-
);
|
|
720
|
-
}
|
|
721
|
-
function useIsInView(ref, options = {}) {
|
|
722
|
-
const { inView, inViewOnce = false, inViewMargin = "0px" } = options;
|
|
723
|
-
const localRef = React.useRef(null);
|
|
724
|
-
React.useImperativeHandle(ref, () => localRef.current);
|
|
725
|
-
const inViewResult = useInView(localRef, {
|
|
726
|
-
once: inViewOnce,
|
|
727
|
-
margin: inViewMargin
|
|
728
|
-
});
|
|
729
|
-
const isInView = !inView || inViewResult;
|
|
730
|
-
return { ref: localRef, isInView };
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
export { Badge, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Label, PRESET_GRADIENT_BACKDROP, PRESET_GRADIENT_FRAME, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, SILVER_GRADIENT_BACKDROP, SilverMetallicBorderOverlay, SilverShineOverlay, VARIANTS, VARIANT_GRADIENT_BACKDROP_BASE, VARIANT_GRADIENT_DURATION_CLASS, VARIANT_GRADIENT_HOVER_OVERLAY_CLASS, VARIANT_GRADIENT_TRANSITION_DURATION_MS, VariantGradientUnderlay, arbitraryGradientBackgroundImage, badgeVariants, buttonGroupVariants, resolveVariantStyles, useIsInView };
|