@espressif/dashboard-ui-components 1.10.0 → 1.11.1
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 +75 -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 +16 -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
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { cloneElement, isValidElement } from "react";
|
|
3
|
+
import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { CheckIcon } from "lucide-react";
|
|
5
|
+
//#region src/components/vertical-stepper/vertical-stepper.tsx
|
|
6
|
+
var stateVisuals = {
|
|
7
|
+
complete: {
|
|
8
|
+
iconClass: "text-success",
|
|
9
|
+
iconBoxClass: "border-success/25 bg-success/10",
|
|
10
|
+
titleClass: "text-foreground",
|
|
11
|
+
descriptionClass: "text-muted-foreground",
|
|
12
|
+
connectorClass: "bg-success"
|
|
13
|
+
},
|
|
14
|
+
in_progress: {
|
|
15
|
+
iconClass: "text-primary",
|
|
16
|
+
iconBoxClass: "border-primary/25 bg-primary/10",
|
|
17
|
+
titleClass: "text-foreground",
|
|
18
|
+
descriptionClass: "text-muted-foreground",
|
|
19
|
+
connectorClass: "bg-border"
|
|
20
|
+
},
|
|
21
|
+
not_started: {
|
|
22
|
+
iconClass: "text-gray",
|
|
23
|
+
iconBoxClass: "border-border bg-background",
|
|
24
|
+
titleClass: "text-gray",
|
|
25
|
+
descriptionClass: "text-gray/80",
|
|
26
|
+
connectorClass: "bg-border"
|
|
27
|
+
}
|
|
28
|
+
};
|
|
29
|
+
var statusSrLabel = {
|
|
30
|
+
complete: "Completed",
|
|
31
|
+
in_progress: "Current step",
|
|
32
|
+
not_started: "Not started"
|
|
33
|
+
};
|
|
34
|
+
/** Aligned with StatusCardList / SelectableCardList size scales. */
|
|
35
|
+
var sizeStyles = {
|
|
36
|
+
sm: {
|
|
37
|
+
rowGap: "gap-2",
|
|
38
|
+
stepGap: "pb-8",
|
|
39
|
+
primary: "text-xs font-semibold",
|
|
40
|
+
secondary: "text-xs",
|
|
41
|
+
icon: "h-[18px] w-[18px] shrink-0",
|
|
42
|
+
iconBox: "size-9",
|
|
43
|
+
iconBoxHeight: "h-9",
|
|
44
|
+
connectorStart: "start-[1.125rem]",
|
|
45
|
+
connectorTop: "top-9",
|
|
46
|
+
textGap: "gap-0.5",
|
|
47
|
+
endIcon: "size-4 shrink-0",
|
|
48
|
+
endGap: "gap-2"
|
|
49
|
+
},
|
|
50
|
+
default: {
|
|
51
|
+
rowGap: "gap-3",
|
|
52
|
+
stepGap: "pb-10",
|
|
53
|
+
primary: "text-sm font-semibold",
|
|
54
|
+
secondary: "text-sm",
|
|
55
|
+
icon: "h-6 w-6 shrink-0",
|
|
56
|
+
iconBox: "size-11",
|
|
57
|
+
iconBoxHeight: "h-11",
|
|
58
|
+
connectorStart: "start-[1.375rem]",
|
|
59
|
+
connectorTop: "top-11",
|
|
60
|
+
textGap: "gap-0.5",
|
|
61
|
+
endIcon: "size-5 shrink-0",
|
|
62
|
+
endGap: "gap-2"
|
|
63
|
+
},
|
|
64
|
+
lg: {
|
|
65
|
+
rowGap: "gap-4",
|
|
66
|
+
stepGap: "pb-12",
|
|
67
|
+
primary: "text-base font-semibold",
|
|
68
|
+
secondary: "text-sm",
|
|
69
|
+
icon: "h-8 w-8 shrink-0",
|
|
70
|
+
iconBox: "size-[52px]",
|
|
71
|
+
iconBoxHeight: "h-[52px]",
|
|
72
|
+
connectorStart: "start-[1.625rem]",
|
|
73
|
+
connectorTop: "top-[52px]",
|
|
74
|
+
textGap: "gap-0.5",
|
|
75
|
+
endIcon: "size-6 shrink-0",
|
|
76
|
+
endGap: "gap-3"
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
function iconSized(icon, iconClass) {
|
|
80
|
+
if (icon == null) return null;
|
|
81
|
+
if (isValidElement(icon)) {
|
|
82
|
+
const el = icon;
|
|
83
|
+
return cloneElement(el, { className: cn(el.props.className, iconClass) });
|
|
84
|
+
}
|
|
85
|
+
return /* @__PURE__ */ jsx("span", {
|
|
86
|
+
className: cn("inline-flex items-center justify-center", iconClass),
|
|
87
|
+
"aria-hidden": true,
|
|
88
|
+
children: icon
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
function StepTextContent({ step, visuals, s }) {
|
|
92
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("span", {
|
|
93
|
+
className: cn(s.primary, visuals.titleClass),
|
|
94
|
+
children: step.title
|
|
95
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
96
|
+
className: cn(s.secondary, visuals.descriptionClass),
|
|
97
|
+
children: step.description
|
|
98
|
+
})] });
|
|
99
|
+
}
|
|
100
|
+
function VerticalStepperStepRow({ step, isLast, onStepClick, s }) {
|
|
101
|
+
const visuals = stateVisuals[step.status];
|
|
102
|
+
const srStatus = statusSrLabel[step.status];
|
|
103
|
+
const isInteractive = onStepClick != null;
|
|
104
|
+
const stepAriaLabel = `${step.title}, ${srStatus.toLowerCase()}`;
|
|
105
|
+
const iconBox = /* @__PURE__ */ jsx("div", {
|
|
106
|
+
className: cn("flex shrink-0 items-center justify-center rounded-lg border", s.iconBox, visuals.iconBoxClass),
|
|
107
|
+
"aria-hidden": true,
|
|
108
|
+
children: iconSized(step.icon, cn(s.icon, visuals.iconClass))
|
|
109
|
+
});
|
|
110
|
+
const textContent = /* @__PURE__ */ jsxs("div", {
|
|
111
|
+
className: cn("flex min-w-0 flex-1 flex-col", s.textGap),
|
|
112
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
113
|
+
className: "sr-only",
|
|
114
|
+
children: srStatus
|
|
115
|
+
}), /* @__PURE__ */ jsx(StepTextContent, {
|
|
116
|
+
step,
|
|
117
|
+
visuals,
|
|
118
|
+
s
|
|
119
|
+
})]
|
|
120
|
+
});
|
|
121
|
+
return /* @__PURE__ */ jsxs("li", {
|
|
122
|
+
className: cn("relative flex items-start last:pb-0", s.rowGap, s.stepGap),
|
|
123
|
+
"aria-current": step.status === "in_progress" ? "step" : void 0,
|
|
124
|
+
children: [
|
|
125
|
+
!isLast ? /* @__PURE__ */ jsx("div", {
|
|
126
|
+
"aria-hidden": true,
|
|
127
|
+
className: cn("pointer-events-none absolute bottom-0 w-px -translate-x-1/2", visuals.connectorClass, s.connectorStart, s.connectorTop)
|
|
128
|
+
}) : null,
|
|
129
|
+
/* @__PURE__ */ jsx("div", {
|
|
130
|
+
className: "relative z-10 shrink-0",
|
|
131
|
+
children: iconBox
|
|
132
|
+
}),
|
|
133
|
+
isInteractive ? /* @__PURE__ */ jsx("button", {
|
|
134
|
+
type: "button",
|
|
135
|
+
className: cn("flex min-w-0 flex-1 flex-col rounded-md text-left outline-none", s.textGap, "focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50"),
|
|
136
|
+
"aria-label": stepAriaLabel,
|
|
137
|
+
onClick: () => onStepClick(step.id),
|
|
138
|
+
children: /* @__PURE__ */ jsx(StepTextContent, {
|
|
139
|
+
step,
|
|
140
|
+
visuals,
|
|
141
|
+
s
|
|
142
|
+
})
|
|
143
|
+
}) : textContent,
|
|
144
|
+
step.status === "complete" || step.endAction != null ? /* @__PURE__ */ jsxs("div", {
|
|
145
|
+
className: cn("flex shrink-0 items-center", s.iconBoxHeight, s.endGap),
|
|
146
|
+
children: [step.status === "complete" ? /* @__PURE__ */ jsx(CheckIcon, {
|
|
147
|
+
className: cn(s.endIcon, "text-success"),
|
|
148
|
+
"aria-hidden": true
|
|
149
|
+
}) : null, step.endAction]
|
|
150
|
+
}) : null
|
|
151
|
+
]
|
|
152
|
+
});
|
|
153
|
+
}
|
|
154
|
+
function VerticalStepper({ data, onStepClick, size = "default", className, ariaLabel = "Progress" }) {
|
|
155
|
+
const s = sizeStyles[size];
|
|
156
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
157
|
+
"aria-label": ariaLabel,
|
|
158
|
+
className: cn(className),
|
|
159
|
+
children: /* @__PURE__ */ jsx("ol", {
|
|
160
|
+
className: "flex min-w-0 flex-col",
|
|
161
|
+
children: data.map((step, index) => /* @__PURE__ */ jsx(VerticalStepperStepRow, {
|
|
162
|
+
step,
|
|
163
|
+
isLast: index === data.length - 1,
|
|
164
|
+
onStepClick,
|
|
165
|
+
s
|
|
166
|
+
}, step.id))
|
|
167
|
+
})
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
//#endregion
|
|
171
|
+
export { VerticalStepper };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { cn } from "../utils/cn.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { cva } from "class-variance-authority";
|
|
5
|
+
//#region src/core/alert.tsx
|
|
6
|
+
var alertVariants = cva("relative w-full rounded-lg border px-4 py-3 text-sm [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground [&>svg~*]:pl-7", {
|
|
7
|
+
variants: { variant: {
|
|
8
|
+
default: "bg-background text-foreground",
|
|
9
|
+
destructive: "border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"
|
|
10
|
+
} },
|
|
11
|
+
defaultVariants: { variant: "default" }
|
|
12
|
+
});
|
|
13
|
+
var Alert = React$1.forwardRef(({ className, variant, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
14
|
+
ref,
|
|
15
|
+
role: "alert",
|
|
16
|
+
className: cn(alertVariants({ variant }), className),
|
|
17
|
+
...props
|
|
18
|
+
}));
|
|
19
|
+
Alert.displayName = "Alert";
|
|
20
|
+
var AlertTitle = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("h5", {
|
|
21
|
+
ref,
|
|
22
|
+
className: cn("mb-1 font-medium leading-none tracking-tight", className),
|
|
23
|
+
...props
|
|
24
|
+
}));
|
|
25
|
+
AlertTitle.displayName = "AlertTitle";
|
|
26
|
+
var AlertDescription = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
27
|
+
ref,
|
|
28
|
+
className: cn("text-sm [&_p]:leading-relaxed", className),
|
|
29
|
+
...props
|
|
30
|
+
}));
|
|
31
|
+
AlertDescription.displayName = "AlertDescription";
|
|
32
|
+
//#endregion
|
|
33
|
+
export { Alert, AlertDescription, AlertTitle };
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../../../utils/cn.js";
|
|
3
|
+
import { CopyButton } from "../buttons/copy.js";
|
|
4
|
+
import "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/core/animate-ui/components/animate/code-header.tsx
|
|
7
|
+
/** Header row shared by `Code` and `CodeEditor`: icon, file name, trailing actions and copy button. */
|
|
8
|
+
function CodeHeader({ icon: Icon, fileName, copyContent, copyLabel = "Copy", actions }) {
|
|
9
|
+
const copyButton = copyContent !== void 0 && /* @__PURE__ */ jsx(CopyButton, {
|
|
10
|
+
content: copyContent,
|
|
11
|
+
size: "sm",
|
|
12
|
+
variant: "ghost",
|
|
13
|
+
"aria-label": copyLabel,
|
|
14
|
+
title: copyLabel,
|
|
15
|
+
className: cn(actions == null && "ml-auto", "w-auto h-auto p-2 -mr-2")
|
|
16
|
+
});
|
|
17
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
18
|
+
className: "shrink-0 gap-x-2 border-b border-border/75 dark:border-border/50 text-sm flex text-muted-foreground items-center px-4 w-full h-10 font-medium",
|
|
19
|
+
children: [
|
|
20
|
+
Icon && /* @__PURE__ */ jsx(Icon, { className: "size-4" }),
|
|
21
|
+
fileName,
|
|
22
|
+
actions != null ? /* @__PURE__ */ jsxs("div", {
|
|
23
|
+
className: "ml-auto flex items-center gap-1",
|
|
24
|
+
children: [actions, copyButton]
|
|
25
|
+
}) : copyButton
|
|
26
|
+
]
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
//#endregion
|
|
30
|
+
export { CodeHeader };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../../../utils/cn.js";
|
|
3
|
+
import { CodeBlock } from "../../primitives/animate/code-block.js";
|
|
4
|
+
import { CodeHeader } from "./code-header.js";
|
|
5
|
+
import * as React$1 from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
//#region src/core/animate-ui/components/animate/code.tsx
|
|
8
|
+
function Code({ className, code, icon: Icon, theme = "light", themes, copyButton, lang, fileName, height, style, ...props }) {
|
|
9
|
+
const showCopyButton = copyButton !== false && (copyButton === true || copyButton === void 0 && Boolean(lang));
|
|
10
|
+
const showHeader = fileName !== void 0 || showCopyButton;
|
|
11
|
+
const scrollRef = React$1.useRef(null);
|
|
12
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
13
|
+
className: cn("relative flex flex-col overflow-hidden border bg-background rounded-lg", className),
|
|
14
|
+
style: {
|
|
15
|
+
height,
|
|
16
|
+
...style
|
|
17
|
+
},
|
|
18
|
+
...props,
|
|
19
|
+
children: [showHeader && /* @__PURE__ */ jsx(CodeHeader, {
|
|
20
|
+
icon: Icon,
|
|
21
|
+
fileName,
|
|
22
|
+
copyContent: showCopyButton ? code : void 0
|
|
23
|
+
}), lang && /* @__PURE__ */ jsx(CodeBlock, {
|
|
24
|
+
ref: scrollRef,
|
|
25
|
+
theme,
|
|
26
|
+
themes,
|
|
27
|
+
scrollContainerRef: scrollRef,
|
|
28
|
+
className: cn("relative text-sm p-4 overflow-auto bg-accent/10 flex-1 min-h-0", "[&>pre,_&_code]:!bg-transparent [&>pre,_&_code]:[background:transparent_!important] [&>pre,_&_code]:border-none [&_code]:!text-[13px] [&_code_.line]:!px-0"),
|
|
29
|
+
code,
|
|
30
|
+
lang
|
|
31
|
+
})]
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { Code };
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { cn } from "../../../../utils/cn.js";
|
|
2
|
+
import { useScrollOverflow } from "../../../hooks/use-scroll-overflow.js";
|
|
3
|
+
import { Tabs as Tabs$1, TabsContent as TabsContent$1, TabsContents as TabsContents$1, TabsHighlight, TabsHighlightItem, TabsList as TabsList$1, TabsTrigger as TabsTrigger$1, useTabs } from "../../primitives/animate/tabs.js";
|
|
4
|
+
import * as React$1 from "react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
7
|
+
//#region src/core/animate-ui/components/animate/tabs.tsx
|
|
8
|
+
var TabsListVariantContext = React$1.createContext(void 0);
|
|
9
|
+
var TABS_LIST_VARIANTS = {
|
|
10
|
+
default: {
|
|
11
|
+
highlight: {
|
|
12
|
+
mode: "parent",
|
|
13
|
+
className: "absolute z-0 inset-0 rounded-md bg-primary/10"
|
|
14
|
+
},
|
|
15
|
+
list: "bg-transparent text-muted-foreground inline-flex h-auto w-fit items-center justify-center rounded-md p-1 border border-primary/30"
|
|
16
|
+
},
|
|
17
|
+
line: {
|
|
18
|
+
highlight: {
|
|
19
|
+
mode: "parent",
|
|
20
|
+
variant: "line",
|
|
21
|
+
lineHeight: 2,
|
|
22
|
+
boundsOffset: { top: 2 },
|
|
23
|
+
className: "absolute z-0 bg-primary rounded-none"
|
|
24
|
+
},
|
|
25
|
+
list: "text-muted-foreground inline-flex h-auto w-fit items-center justify-center gap-1 border-b border-border"
|
|
26
|
+
},
|
|
27
|
+
rounded: {
|
|
28
|
+
highlight: {
|
|
29
|
+
mode: "parent",
|
|
30
|
+
className: "absolute z-0 inset-0 rounded-full bg-primary/10"
|
|
31
|
+
},
|
|
32
|
+
list: "bg-transparent text-muted-foreground inline-flex h-auto w-fit items-center justify-center rounded-full p-1 border border-primary/30"
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
/** Width of the edge fade, and the margin kept beside the active tab when it is scrolled into view. */
|
|
36
|
+
var EDGE_SIZE = 40;
|
|
37
|
+
function prefersReducedMotion() {
|
|
38
|
+
return typeof window !== "undefined" && window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Tracks whether a horizontal scroller has hidden content on either side and
|
|
42
|
+
* keeps the active tab in view whenever the selection changes.
|
|
43
|
+
*/
|
|
44
|
+
function useTabsOverflow(scrollerRef, enabled) {
|
|
45
|
+
const { activeValue } = useTabs();
|
|
46
|
+
/** Scrolls the active tab into view, keeping `EDGE_SIZE` clear of the faded edges. */
|
|
47
|
+
const revealActive = React$1.useCallback((behavior) => {
|
|
48
|
+
const scroller = scrollerRef.current;
|
|
49
|
+
if (!scroller) return;
|
|
50
|
+
const trigger = scroller.querySelector("[role=\"tab\"][data-state=\"active\"]");
|
|
51
|
+
if (!trigger) return;
|
|
52
|
+
const scrollerRect = scroller.getBoundingClientRect();
|
|
53
|
+
const triggerRect = trigger.getBoundingClientRect();
|
|
54
|
+
const overStart = triggerRect.left - (scrollerRect.left + EDGE_SIZE);
|
|
55
|
+
const overEnd = triggerRect.right - (scrollerRect.right - EDGE_SIZE);
|
|
56
|
+
let delta = 0;
|
|
57
|
+
if (overStart < 0) delta = overStart;
|
|
58
|
+
else if (overEnd > 0) delta = Math.min(overEnd, overStart);
|
|
59
|
+
if (Math.abs(delta) >= 1) scroller.scrollBy({
|
|
60
|
+
left: delta,
|
|
61
|
+
behavior
|
|
62
|
+
});
|
|
63
|
+
}, [scrollerRef]);
|
|
64
|
+
const overflow = useScrollOverflow(scrollerRef, {
|
|
65
|
+
enabled,
|
|
66
|
+
getContent: (scroller) => scroller.querySelector("[data-slot=\"tabs-list\"]"),
|
|
67
|
+
onResize: () => revealActive("auto")
|
|
68
|
+
});
|
|
69
|
+
const mountedRef = React$1.useRef(false);
|
|
70
|
+
React$1.useEffect(() => {
|
|
71
|
+
if (!enabled || activeValue === void 0) return;
|
|
72
|
+
const instant = !mountedRef.current || prefersReducedMotion();
|
|
73
|
+
mountedRef.current = true;
|
|
74
|
+
revealActive(instant ? "auto" : "smooth");
|
|
75
|
+
}, [
|
|
76
|
+
enabled,
|
|
77
|
+
activeValue,
|
|
78
|
+
revealActive
|
|
79
|
+
]);
|
|
80
|
+
return {
|
|
81
|
+
overflow,
|
|
82
|
+
scrollByPage: React$1.useCallback((direction) => {
|
|
83
|
+
const scroller = scrollerRef.current;
|
|
84
|
+
if (!scroller) return;
|
|
85
|
+
scroller.scrollBy({
|
|
86
|
+
left: direction * scroller.clientWidth * .8,
|
|
87
|
+
behavior: prefersReducedMotion() ? "auto" : "smooth"
|
|
88
|
+
});
|
|
89
|
+
}, [scrollerRef])
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function fadeMask(start, end) {
|
|
93
|
+
if (!start && !end) return {};
|
|
94
|
+
const image = `linear-gradient(to right, ${start ? `transparent, #000 ${EDGE_SIZE}px` : "#000"}, ${end ? `#000 calc(100% - ${EDGE_SIZE}px), transparent` : "#000"})`;
|
|
95
|
+
return {
|
|
96
|
+
maskImage: image,
|
|
97
|
+
WebkitMaskImage: image
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
var scrollButtonClass = "absolute top-1/2 z-10 -translate-y-1/2 inline-flex size-7 items-center justify-center rounded-full border border-border bg-background text-muted-foreground shadow-sm transition-colors hover:text-foreground [@media(pointer:coarse)]:hidden";
|
|
101
|
+
function TabsListContent({ variant, fullWidth, className, ...props }) {
|
|
102
|
+
const config = TABS_LIST_VARIANTS[variant];
|
|
103
|
+
const scrollerRef = React$1.useRef(null);
|
|
104
|
+
const scrollable = props["aria-orientation"] !== "vertical";
|
|
105
|
+
const { overflow, scrollByPage } = useTabsOverflow(scrollerRef, scrollable);
|
|
106
|
+
const list = /* @__PURE__ */ jsx(TabsHighlight, {
|
|
107
|
+
ref: scrollerRef,
|
|
108
|
+
containerClassName: scrollable ? "flex -my-1 py-1 overflow-x-auto overscroll-x-contain [scrollbar-width:none] [&::-webkit-scrollbar]:hidden" : void 0,
|
|
109
|
+
...config.highlight,
|
|
110
|
+
children: /* @__PURE__ */ jsx(TabsList$1, {
|
|
111
|
+
className: cn(config.list, scrollable && "shrink-0 min-w-fit", scrollable && fullWidth && "max-md:w-full", className),
|
|
112
|
+
...props
|
|
113
|
+
})
|
|
114
|
+
});
|
|
115
|
+
if (!scrollable) return list;
|
|
116
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
117
|
+
"data-slot": "tabs-list-scroller",
|
|
118
|
+
"data-overflow-start": overflow.start || void 0,
|
|
119
|
+
"data-overflow-end": overflow.end || void 0,
|
|
120
|
+
className: cn("relative min-w-0 max-w-full", fullWidth && "max-md:w-full"),
|
|
121
|
+
children: [
|
|
122
|
+
/* @__PURE__ */ jsx("div", {
|
|
123
|
+
style: fadeMask(overflow.start, overflow.end),
|
|
124
|
+
children: list
|
|
125
|
+
}),
|
|
126
|
+
overflow.start && /* @__PURE__ */ jsx("button", {
|
|
127
|
+
type: "button",
|
|
128
|
+
tabIndex: -1,
|
|
129
|
+
"aria-hidden": true,
|
|
130
|
+
className: cn(scrollButtonClass, "left-0"),
|
|
131
|
+
onClick: () => scrollByPage(-1),
|
|
132
|
+
children: /* @__PURE__ */ jsx(ChevronLeft, { className: "size-4" })
|
|
133
|
+
}),
|
|
134
|
+
overflow.end && /* @__PURE__ */ jsx("button", {
|
|
135
|
+
type: "button",
|
|
136
|
+
tabIndex: -1,
|
|
137
|
+
"aria-hidden": true,
|
|
138
|
+
className: cn(scrollButtonClass, "right-0"),
|
|
139
|
+
onClick: () => scrollByPage(1),
|
|
140
|
+
children: /* @__PURE__ */ jsx(ChevronRight, { className: "size-4" })
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
function Tabs({ className, ...props }) {
|
|
146
|
+
return /* @__PURE__ */ jsx(Tabs$1, {
|
|
147
|
+
className: cn("flex flex-col gap-2", className),
|
|
148
|
+
...props
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* When the tabs don't fit, the list scrolls horizontally: edges fade to signal
|
|
153
|
+
* hidden tabs, chevron buttons page through them on pointer devices, and the
|
|
154
|
+
* active tab is kept in view. Pass `aria-orientation="vertical"` for a stacked list.
|
|
155
|
+
*/
|
|
156
|
+
function TabsList({ variant, fullWidth = true, ...props }) {
|
|
157
|
+
return /* @__PURE__ */ jsx(TabsListVariantContext.Provider, {
|
|
158
|
+
value: variant,
|
|
159
|
+
children: /* @__PURE__ */ jsx(TabsListContent, {
|
|
160
|
+
variant: variant ?? "default",
|
|
161
|
+
fullWidth,
|
|
162
|
+
...props
|
|
163
|
+
})
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
var tabsTriggerBaseClass = "data-[state=active]:text-primary tracking-wide focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:outline-ring inline-flex flex-1 items-center justify-center gap-1.5 rounded-md w-full px-2 text-sm font-medium whitespace-nowrap transition-colors duration-500 ease-in-out focus-visible:ring-[3px] focus-visible:outline-1 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4";
|
|
167
|
+
function TabsTrigger({ className, ...props }) {
|
|
168
|
+
const isLine = React$1.useContext(TabsListVariantContext) === "line";
|
|
169
|
+
return /* @__PURE__ */ jsx(TabsHighlightItem, {
|
|
170
|
+
value: props.value,
|
|
171
|
+
className: "flex-1",
|
|
172
|
+
children: /* @__PURE__ */ jsx(TabsTrigger$1, {
|
|
173
|
+
className: cn(tabsTriggerBaseClass, isLine ? "text-muted-foreground py-2.5" : "text-muted-foreground h-[calc(100%-1px)] py-1", className),
|
|
174
|
+
...props
|
|
175
|
+
})
|
|
176
|
+
});
|
|
177
|
+
}
|
|
178
|
+
function TabsContents(props) {
|
|
179
|
+
return /* @__PURE__ */ jsx(TabsContents$1, { ...props });
|
|
180
|
+
}
|
|
181
|
+
function TabsContent({ className, ...props }) {
|
|
182
|
+
return /* @__PURE__ */ jsx(TabsContent$1, {
|
|
183
|
+
className: cn("outline-none", className),
|
|
184
|
+
...props
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
//#endregion
|
|
188
|
+
export { Tabs, TabsContent, TabsContents, TabsList, TabsTrigger };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { cn } from "../../../../utils/cn.js";
|
|
2
|
+
import { Tooltip as Tooltip$1, TooltipArrow, TooltipContent as TooltipContent$1, TooltipProvider as TooltipProvider$1, TooltipTrigger as TooltipTrigger$1 } from "../../primitives/animate/tooltip.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import * as motion from "motion/react-client";
|
|
6
|
+
//#region src/core/animate-ui/components/animate/tooltip.tsx
|
|
7
|
+
function TooltipProvider({ openDelay = 0, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(TooltipProvider$1, {
|
|
9
|
+
openDelay,
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function Tooltip({ sideOffset = 10, ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(Tooltip$1, {
|
|
15
|
+
sideOffset,
|
|
16
|
+
...props
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function TooltipTrigger({ ...props }) {
|
|
20
|
+
return /* @__PURE__ */ jsx(TooltipTrigger$1, { ...props });
|
|
21
|
+
}
|
|
22
|
+
function TooltipContent({ className, children, layout = "preserve-aspect", ...props }) {
|
|
23
|
+
return /* @__PURE__ */ jsxs(TooltipContent$1, {
|
|
24
|
+
className: cn("z-50 w-fit bg-tooltip text-tooltip-foreground rounded-md", className),
|
|
25
|
+
...props,
|
|
26
|
+
children: [/* @__PURE__ */ jsx(motion.div, {
|
|
27
|
+
className: "overflow-hidden px-3 py-1.5 text-xs text-balance",
|
|
28
|
+
children: /* @__PURE__ */ jsx(motion.div, {
|
|
29
|
+
layout,
|
|
30
|
+
children
|
|
31
|
+
})
|
|
32
|
+
}), /* @__PURE__ */ jsx(TooltipArrow, {
|
|
33
|
+
className: "fill-tooltip size-3 data-[side='bottom']:translate-y-[1px] data-[side='right']:translate-x-[1px] data-[side='left']:translate-x-[-1px] data-[side='top']:translate-y-[-1px]",
|
|
34
|
+
tipRadius: 2
|
|
35
|
+
})]
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { Tooltip, TooltipContent, TooltipProvider, TooltipTrigger };
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { cn } from "../../../../utils/cn.js";
|
|
2
|
+
import { PreviewCard as PreviewCard$1, PreviewCardBackdrop as PreviewCardBackdrop$1, PreviewCardPopup, PreviewCardPortal, PreviewCardPositioner, PreviewCardTrigger as PreviewCardTrigger$1 } from "../../primitives/base/preview-card.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/core/animate-ui/components/base/preview-card.tsx
|
|
6
|
+
function PreviewCard(props) {
|
|
7
|
+
return /* @__PURE__ */ jsx(PreviewCard$1, { ...props });
|
|
8
|
+
}
|
|
9
|
+
function PreviewCardTrigger(props) {
|
|
10
|
+
return /* @__PURE__ */ jsx(PreviewCardTrigger$1, { ...props });
|
|
11
|
+
}
|
|
12
|
+
function PreviewCardPanel({ className, align = "center", sideOffset = 4, style, children, ...props }) {
|
|
13
|
+
return /* @__PURE__ */ jsx(PreviewCardPortal, { children: /* @__PURE__ */ jsx(PreviewCardPositioner, {
|
|
14
|
+
align,
|
|
15
|
+
sideOffset,
|
|
16
|
+
className: "z-50",
|
|
17
|
+
...props,
|
|
18
|
+
children: /* @__PURE__ */ jsx(PreviewCardPopup, {
|
|
19
|
+
className: cn("bg-popover text-popover-foreground w-64 origin-(--transform-origin) rounded-md border p-4 shadow-md outline-hidden", className),
|
|
20
|
+
style,
|
|
21
|
+
children
|
|
22
|
+
})
|
|
23
|
+
}) });
|
|
24
|
+
}
|
|
25
|
+
function PreviewCardBackdrop(props) {
|
|
26
|
+
return /* @__PURE__ */ jsx(PreviewCardBackdrop$1, { ...props });
|
|
27
|
+
}
|
|
28
|
+
//#endregion
|
|
29
|
+
export { PreviewCard, PreviewCardBackdrop, PreviewCardPanel, PreviewCardTrigger };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { cn } from "../../../../utils/cn.js";
|
|
2
|
+
import { Progress as Progress$1, ProgressIndicator, ProgressLabel as ProgressLabel$1, ProgressTrack as ProgressTrack$1, ProgressValue as ProgressValue$1 } from "../../primitives/base/progress.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
//#region src/core/animate-ui/components/base/progress.tsx
|
|
6
|
+
function Progress(props) {
|
|
7
|
+
return /* @__PURE__ */ jsx(Progress$1, { ...props });
|
|
8
|
+
}
|
|
9
|
+
function ProgressTrack({ className, indicatorClassName, indicatorStyle, ...props }) {
|
|
10
|
+
return /* @__PURE__ */ jsx(ProgressTrack$1, {
|
|
11
|
+
className: cn("bg-primary/20 relative h-2 w-full overflow-hidden rounded-full", className),
|
|
12
|
+
...props,
|
|
13
|
+
children: /* @__PURE__ */ jsx(ProgressIndicator, {
|
|
14
|
+
className: cn("bg-primary rounded-full h-full w-full flex-1", indicatorClassName),
|
|
15
|
+
style: indicatorStyle
|
|
16
|
+
})
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
function ProgressLabel(props) {
|
|
20
|
+
return /* @__PURE__ */ jsx(ProgressLabel$1, {
|
|
21
|
+
className: "text-sm font-medium",
|
|
22
|
+
...props
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function ProgressValue(props) {
|
|
26
|
+
return /* @__PURE__ */ jsx(ProgressValue$1, {
|
|
27
|
+
className: "text-sm",
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { Progress, ProgressLabel, ProgressTrack, ProgressValue };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cn } from "../../../../utils/cn.js";
|
|
2
|
+
import { Radio as Radio$1, RadioGroup as RadioGroup$1, RadioIndicator } from "../../primitives/base/radio.js";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { CircleIcon } from "lucide-react";
|
|
6
|
+
//#region src/core/animate-ui/components/base/radio.tsx
|
|
7
|
+
function RadioGroup({ className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(RadioGroup$1, {
|
|
9
|
+
className: cn("grid gap-3", className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
function Radio({ className, ...props }) {
|
|
14
|
+
return /* @__PURE__ */ jsx(Radio$1, {
|
|
15
|
+
className: cn("border-input text-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:bg-input/30 aspect-square size-4 shrink-0 rounded-full border shadow-xs transition-[color,box-shadow] outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50", className),
|
|
16
|
+
...props,
|
|
17
|
+
children: /* @__PURE__ */ jsx(RadioIndicator, {
|
|
18
|
+
className: "relative flex items-center justify-center",
|
|
19
|
+
children: /* @__PURE__ */ jsx(CircleIcon, { className: "fill-primary absolute top-1/2 left-1/2 size-2 -translate-x-1/2 -translate-y-1/2" })
|
|
20
|
+
})
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { Radio, RadioGroup };
|