@espressif/dashboard-ui-components 1.9.1 → 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 +179 -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 +159 -63
- 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.d.ts +1 -1
- 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-ABBHGIFI.js +0 -733
- package/dist/chunk-HIUBSBAP.js +0 -59
- package/dist/chunk-OKB2WTX7.js +0 -363
- package/dist/chunk-P6F6UWV2.js +0 -323
- package/dist/chunk-TRTQSARU.js +0 -31
- package/dist/chunk-VU4CZ76T.js +0 -43
- package/dist/chunk-XFYL5IZU.js +0 -69604
- package/dist/chunk-XW6Z6VO4.js +0 -505
- package/dist/chunk-ZFYUONPY.js +0 -4321
- 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,115 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useEffect, useRef, useState } from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/text-effects/glitch-effect/glitch-text.tsx
|
|
5
|
+
var GlitchText = ({ text, children, speed = 15, enableShadows = true, enableOnHover = false, className = "" }) => {
|
|
6
|
+
const containerRef = useRef(null);
|
|
7
|
+
const [isHovered, setIsHovered] = useState(false);
|
|
8
|
+
const [frame, setFrame] = useState(0);
|
|
9
|
+
const content = text ?? (typeof children === "string" ? children : "");
|
|
10
|
+
const clipPaths = [
|
|
11
|
+
"inset(10% 0 85% 0)",
|
|
12
|
+
"inset(45% 0 40% 0)",
|
|
13
|
+
"inset(80% 0 5% 0)",
|
|
14
|
+
"inset(10% 0 60% 0)",
|
|
15
|
+
"inset(70% 0 20% 0)",
|
|
16
|
+
"inset(25% 0 50% 0)",
|
|
17
|
+
"inset(55% 0 35% 0)",
|
|
18
|
+
"inset(5% 0 75% 0)",
|
|
19
|
+
"inset(90% 0 2% 0)",
|
|
20
|
+
"inset(30% 0 55% 0)",
|
|
21
|
+
"inset(15% 0 70% 0)",
|
|
22
|
+
"inset(65% 0 25% 0)",
|
|
23
|
+
"inset(40% 0 45% 0)",
|
|
24
|
+
"inset(85% 0 10% 0)",
|
|
25
|
+
"inset(20% 0 65% 0)",
|
|
26
|
+
"inset(50% 0 30% 0)",
|
|
27
|
+
"inset(75% 0 15% 0)",
|
|
28
|
+
"inset(35% 0 52% 0)",
|
|
29
|
+
"inset(60% 0 28% 0)",
|
|
30
|
+
"inset(8% 0 82% 0)"
|
|
31
|
+
];
|
|
32
|
+
const shouldAnimate = enableOnHover ? isHovered : true;
|
|
33
|
+
useEffect(() => {
|
|
34
|
+
if (!shouldAnimate) return;
|
|
35
|
+
const intervalMs = speed * 1e3 / clipPaths.length;
|
|
36
|
+
const interval = setInterval(() => {
|
|
37
|
+
setFrame((f) => (f + 1) % clipPaths.length);
|
|
38
|
+
}, intervalMs);
|
|
39
|
+
return () => clearInterval(interval);
|
|
40
|
+
}, [
|
|
41
|
+
shouldAnimate,
|
|
42
|
+
speed,
|
|
43
|
+
clipPaths.length
|
|
44
|
+
]);
|
|
45
|
+
const containerStyle = {
|
|
46
|
+
position: "relative",
|
|
47
|
+
display: "inline-block",
|
|
48
|
+
cursor: "pointer",
|
|
49
|
+
userSelect: "none"
|
|
50
|
+
};
|
|
51
|
+
const textStyle = {
|
|
52
|
+
position: "relative",
|
|
53
|
+
fontSize: "clamp(2rem, 10vw, 4rem)",
|
|
54
|
+
fontWeight: 900,
|
|
55
|
+
color: "white"
|
|
56
|
+
};
|
|
57
|
+
const layerBaseStyle = {
|
|
58
|
+
position: "absolute",
|
|
59
|
+
top: 0,
|
|
60
|
+
left: 0,
|
|
61
|
+
width: "100%",
|
|
62
|
+
height: "100%",
|
|
63
|
+
fontSize: "clamp(2rem, 10vw, 4rem)",
|
|
64
|
+
fontWeight: 900,
|
|
65
|
+
color: "white",
|
|
66
|
+
background: "black",
|
|
67
|
+
overflow: "hidden"
|
|
68
|
+
};
|
|
69
|
+
const afterIndex = frame;
|
|
70
|
+
const beforeIndex = (frame + 10) % clipPaths.length;
|
|
71
|
+
const showLayers = enableOnHover ? isHovered : true;
|
|
72
|
+
const afterStyle = {
|
|
73
|
+
...layerBaseStyle,
|
|
74
|
+
left: "10px",
|
|
75
|
+
textShadow: enableShadows ? "-5px 0 red" : "none",
|
|
76
|
+
clipPath: showLayers ? clipPaths[afterIndex] : "inset(0 0 100% 0)",
|
|
77
|
+
opacity: showLayers ? 1 : 0,
|
|
78
|
+
transition: "opacity 0.1s"
|
|
79
|
+
};
|
|
80
|
+
const beforeStyle = {
|
|
81
|
+
...layerBaseStyle,
|
|
82
|
+
left: "-10px",
|
|
83
|
+
textShadow: enableShadows ? "5px 0 cyan" : "none",
|
|
84
|
+
clipPath: showLayers ? clipPaths[beforeIndex] : "inset(0 0 100% 0)",
|
|
85
|
+
opacity: showLayers ? 1 : 0,
|
|
86
|
+
transition: "opacity 0.1s"
|
|
87
|
+
};
|
|
88
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
89
|
+
className,
|
|
90
|
+
onMouseEnter: () => setIsHovered(true),
|
|
91
|
+
onMouseLeave: () => setIsHovered(false),
|
|
92
|
+
ref: containerRef,
|
|
93
|
+
role: "button",
|
|
94
|
+
tabIndex: 0,
|
|
95
|
+
style: containerStyle,
|
|
96
|
+
children: [
|
|
97
|
+
/* @__PURE__ */ jsx("span", {
|
|
98
|
+
style: textStyle,
|
|
99
|
+
children: content
|
|
100
|
+
}),
|
|
101
|
+
/* @__PURE__ */ jsx("span", {
|
|
102
|
+
"aria-hidden": "true",
|
|
103
|
+
style: beforeStyle,
|
|
104
|
+
children: content
|
|
105
|
+
}),
|
|
106
|
+
/* @__PURE__ */ jsx("span", {
|
|
107
|
+
"aria-hidden": "true",
|
|
108
|
+
style: afterStyle,
|
|
109
|
+
children: content
|
|
110
|
+
})
|
|
111
|
+
]
|
|
112
|
+
});
|
|
113
|
+
};
|
|
114
|
+
//#endregion
|
|
115
|
+
export { GlitchText, GlitchText as default };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../../utils/cn.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { motion } from "motion/react";
|
|
5
|
+
//#region src/components/text-effects/gradient-text/gradient-text.tsx
|
|
6
|
+
function GradientText({ text, className, gradient = "linear-gradient(90deg, #3b82f6 0%, #a855f7 20%, #ec4899 50%, #a855f7 80%, #3b82f6 100%)", neon = false, transition = {
|
|
7
|
+
duration: 3,
|
|
8
|
+
repeat: Number.POSITIVE_INFINITY,
|
|
9
|
+
ease: "linear"
|
|
10
|
+
}, ...props }) {
|
|
11
|
+
const baseStyle = { backgroundImage: gradient };
|
|
12
|
+
return /* @__PURE__ */ jsxs("span", {
|
|
13
|
+
className: cn("relative inline-block", className),
|
|
14
|
+
"data-slot": "gradient-text",
|
|
15
|
+
...props,
|
|
16
|
+
children: [/* @__PURE__ */ jsx(motion.span, {
|
|
17
|
+
animate: { backgroundPositionX: ["0%", "200%"] },
|
|
18
|
+
className: "m-0 text-transparent bg-clip-text bg-[length:200%_100%]",
|
|
19
|
+
style: baseStyle,
|
|
20
|
+
transition,
|
|
21
|
+
children: text
|
|
22
|
+
}), neon && /* @__PURE__ */ jsx(motion.span, {
|
|
23
|
+
animate: { backgroundPositionX: ["0%", "200%"] },
|
|
24
|
+
className: "m-0 absolute top-0 left-0 text-transparent bg-clip-text blur-[8px] mix-blend-plus-lighter bg-[length:200%_100%]",
|
|
25
|
+
style: baseStyle,
|
|
26
|
+
transition,
|
|
27
|
+
children: text
|
|
28
|
+
})]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { GradientText, GradientText as default };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../../utils/cn.js";
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { motion, useInView } from "motion/react";
|
|
6
|
+
//#region src/components/text-effects/highlight-text/highlight-text.tsx
|
|
7
|
+
function HighlightText({ ref, text, className, inView = false, inViewMargin = "0px", inViewOnce = true, transition = {
|
|
8
|
+
duration: 2,
|
|
9
|
+
ease: "easeInOut"
|
|
10
|
+
}, ...props }) {
|
|
11
|
+
const localRef = React$1.useRef(null);
|
|
12
|
+
React$1.useImperativeHandle(ref, () => localRef.current);
|
|
13
|
+
const inViewResult = useInView(localRef, {
|
|
14
|
+
once: inViewOnce,
|
|
15
|
+
margin: inViewMargin
|
|
16
|
+
});
|
|
17
|
+
const isInView = !inView || inViewResult;
|
|
18
|
+
return /* @__PURE__ */ jsx(motion.span, {
|
|
19
|
+
animate: isInView ? { backgroundSize: "100% 100%" } : void 0,
|
|
20
|
+
className: cn("relative inline-block px-2 py-1 rounded-lg bg-gradient-to-r from-blue-100 to-purple-100 dark:from-blue-500 dark:to-purple-500", className),
|
|
21
|
+
"data-slot": "highlight-text",
|
|
22
|
+
initial: { backgroundSize: "0% 100%" },
|
|
23
|
+
ref: localRef,
|
|
24
|
+
style: {
|
|
25
|
+
backgroundRepeat: "no-repeat",
|
|
26
|
+
backgroundPosition: "left center",
|
|
27
|
+
display: "inline"
|
|
28
|
+
},
|
|
29
|
+
transition,
|
|
30
|
+
...props,
|
|
31
|
+
children: text
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
//#endregion
|
|
35
|
+
export { HighlightText, HighlightText as default };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { GlitchText } from "./glitch-effect/glitch-text.js";
|
|
2
|
+
import { GradientText } from "./gradient-text/gradient-text.js";
|
|
3
|
+
import { HighlightText } from "./highlight-text/highlight-text.js";
|
|
4
|
+
import { ShimmeringText } from "./shimmer-text/shimmer-text.js";
|
|
5
|
+
import { jsx } from "react/jsx-runtime";
|
|
6
|
+
//#region src/components/text-effects/parse-text-markup.tsx
|
|
7
|
+
var TEXT_EFFECT_REGISTRY = {
|
|
8
|
+
"glitch-text": GlitchText,
|
|
9
|
+
"gradient-text": GradientText,
|
|
10
|
+
"highlight-text": HighlightText,
|
|
11
|
+
"shimmer-text": ShimmeringText
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Builds a single regex that matches all registered tags.
|
|
15
|
+
* e.g. `<gradient-text>(.*?)<\/gradient-text>|<highlight-text>(.*?)<\/highlight-text>`
|
|
16
|
+
*/
|
|
17
|
+
function buildTagRegex(tags) {
|
|
18
|
+
const patterns = tags.map((tag) => `<${tag}>(.*?)<\\/${tag}>`);
|
|
19
|
+
return new RegExp(patterns.join("|"), "g");
|
|
20
|
+
}
|
|
21
|
+
var tagNames = Object.keys(TEXT_EFFECT_REGISTRY);
|
|
22
|
+
var TAG_REGEX = buildTagRegex(tagNames);
|
|
23
|
+
/**
|
|
24
|
+
* Parses a string containing text-effect markup tags (e.g. `<gradient-text>`,
|
|
25
|
+
* `<highlight-text>`) and returns an array of React nodes with the tagged
|
|
26
|
+
* segments rendered by their corresponding components.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* parseTextMarkup("Hello <gradient-text>World</gradient-text> and <highlight-text>Wow</highlight-text>!")
|
|
30
|
+
* // → ["Hello ", <GradientText text="World" />, " and ", <HighlightText text="Wow" />, "!"]
|
|
31
|
+
*/
|
|
32
|
+
function parseTextMarkup(text) {
|
|
33
|
+
const parts = [];
|
|
34
|
+
let lastIndex = 0;
|
|
35
|
+
let match;
|
|
36
|
+
TAG_REGEX.lastIndex = 0;
|
|
37
|
+
while ((match = TAG_REGEX.exec(text)) !== null) {
|
|
38
|
+
if (match.index > lastIndex) parts.push(text.slice(lastIndex, match.index));
|
|
39
|
+
for (let i = 0; i < tagNames.length; i++) {
|
|
40
|
+
const captured = match[i + 1];
|
|
41
|
+
if (captured !== void 0) {
|
|
42
|
+
const Component = TEXT_EFFECT_REGISTRY[tagNames[i]];
|
|
43
|
+
parts.push(/* @__PURE__ */ jsx(Component, { text: captured }, match.index));
|
|
44
|
+
break;
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
lastIndex = TAG_REGEX.lastIndex;
|
|
48
|
+
}
|
|
49
|
+
if (lastIndex < text.length) parts.push(text.slice(lastIndex));
|
|
50
|
+
return parts;
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { parseTextMarkup };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../../utils/cn.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { motion } from "motion/react";
|
|
5
|
+
//#region src/components/text-effects/shimmer-text/shimmer-text.tsx
|
|
6
|
+
function ShimmeringText({ text, duration = 2.5, transition, wave = false, className, color = "var(--color-neutral-500)", shimmeringColor = "var(--color-neutral-300)", ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx(motion.span, {
|
|
8
|
+
className: cn("relative inline-block [perspective:500px]", className),
|
|
9
|
+
style: {
|
|
10
|
+
"--shimmering-color": shimmeringColor,
|
|
11
|
+
"--color": color,
|
|
12
|
+
color: "var(--color)"
|
|
13
|
+
},
|
|
14
|
+
...props,
|
|
15
|
+
children: text?.split("")?.map((char, i) => /* @__PURE__ */ jsx(motion.span, {
|
|
16
|
+
animate: {
|
|
17
|
+
...wave ? {
|
|
18
|
+
x: [
|
|
19
|
+
0,
|
|
20
|
+
5,
|
|
21
|
+
0
|
|
22
|
+
],
|
|
23
|
+
y: [
|
|
24
|
+
0,
|
|
25
|
+
-5,
|
|
26
|
+
0
|
|
27
|
+
],
|
|
28
|
+
scale: [
|
|
29
|
+
1,
|
|
30
|
+
1.1,
|
|
31
|
+
1
|
|
32
|
+
],
|
|
33
|
+
rotateY: [
|
|
34
|
+
0,
|
|
35
|
+
15,
|
|
36
|
+
0
|
|
37
|
+
]
|
|
38
|
+
} : {},
|
|
39
|
+
color: [
|
|
40
|
+
"var(--color)",
|
|
41
|
+
"var(--shimmering-color)",
|
|
42
|
+
"var(--color)"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
className: "inline-block whitespace-pre [transform-style:preserve-3d]",
|
|
46
|
+
initial: {
|
|
47
|
+
...wave ? {
|
|
48
|
+
scale: 1,
|
|
49
|
+
rotateY: 0
|
|
50
|
+
} : {},
|
|
51
|
+
color: "var(--color)"
|
|
52
|
+
},
|
|
53
|
+
transition: {
|
|
54
|
+
duration,
|
|
55
|
+
repeat: Number.POSITIVE_INFINITY,
|
|
56
|
+
repeatType: "loop",
|
|
57
|
+
repeatDelay: text.length * .05,
|
|
58
|
+
delay: i * duration / text.length,
|
|
59
|
+
ease: "easeInOut",
|
|
60
|
+
...transition
|
|
61
|
+
},
|
|
62
|
+
children: char
|
|
63
|
+
}, i))
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
//#endregion
|
|
67
|
+
export { ShimmeringText, ShimmeringText as default };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { Input } from "../../core/input/input.js";
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { ClockIcon } from "lucide-react";
|
|
6
|
+
//#region src/components/time-picker/time-picker.tsx
|
|
7
|
+
/** Matches shadcn Date Picker "Time" example: hide WebKit picker affordance for a custom end icon. */
|
|
8
|
+
var timeInputChromeClass = "appearance-none bg-background [&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-calendar-picker-indicator]:appearance-none";
|
|
9
|
+
var TimePicker = React$1.forwardRef(({ hideIcon = false, className, ...props }, ref) => {
|
|
10
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
11
|
+
ref,
|
|
12
|
+
...props,
|
|
13
|
+
type: "time",
|
|
14
|
+
className: cn(timeInputChromeClass, className),
|
|
15
|
+
endIcon: hideIcon ? void 0 : /* @__PURE__ */ jsx(ClockIcon, {
|
|
16
|
+
size: 16,
|
|
17
|
+
className: "text-muted-foreground"
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
});
|
|
21
|
+
TimePicker.displayName = "TimePicker";
|
|
22
|
+
//#endregion
|
|
23
|
+
export { TimePicker };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { isPresetColor } from "../../utils/color.js";
|
|
3
|
+
import { resolveVariantStyles } from "../../utils/variant.js";
|
|
4
|
+
import { VariantGradientUnderlay } from "../../utils/variant-gradient-underlay.js";
|
|
5
|
+
import * as React$1 from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { CheckCheck, CircleAlert, CircleX, Info, TriangleAlert } from "lucide-react";
|
|
8
|
+
import { Toaster, toast } from "sonner";
|
|
9
|
+
import "sonner/dist/styles.css";
|
|
10
|
+
//#region src/components/toast/toast.tsx
|
|
11
|
+
var ToastDefaultVariantContext = React$1.createContext(void 0);
|
|
12
|
+
var typeIconMap = {
|
|
13
|
+
error: /* @__PURE__ */ jsx(CircleX, { className: "h-4 w-4" }),
|
|
14
|
+
info: /* @__PURE__ */ jsx(Info, { className: "h-4 w-4" }),
|
|
15
|
+
warning: /* @__PURE__ */ jsx(TriangleAlert, { className: "h-4 w-4" }),
|
|
16
|
+
success: /* @__PURE__ */ jsx(CheckCheck, { className: "h-4 w-4" })
|
|
17
|
+
};
|
|
18
|
+
var SEMANTIC_COLOR_TO_TYPE = {
|
|
19
|
+
error: "error",
|
|
20
|
+
info: "info",
|
|
21
|
+
warning: "warning",
|
|
22
|
+
success: "success"
|
|
23
|
+
};
|
|
24
|
+
function defaultIconFromColor(color) {
|
|
25
|
+
if (!isPresetColor(color)) return void 0;
|
|
26
|
+
const type = SEMANTIC_COLOR_TO_TYPE[color];
|
|
27
|
+
return type != null ? typeIconMap[type] : void 0;
|
|
28
|
+
}
|
|
29
|
+
function isToastProps(input) {
|
|
30
|
+
return input != null && typeof input === "object" && !React$1.isValidElement(input) && ("title" in input || "children" in input || "type" in input || "color" in input || "icon" in input || "hideIcon" in input || "action" in input || "variant" in input);
|
|
31
|
+
}
|
|
32
|
+
function normalizeToastInput(input, type) {
|
|
33
|
+
if (isToastProps(input)) return {
|
|
34
|
+
...input,
|
|
35
|
+
type: input.type ?? type
|
|
36
|
+
};
|
|
37
|
+
return {
|
|
38
|
+
title: input,
|
|
39
|
+
type
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function resolveToastOptions(props, options) {
|
|
43
|
+
return {
|
|
44
|
+
id: options?.id,
|
|
45
|
+
duration: options?.duration,
|
|
46
|
+
position: options?.position,
|
|
47
|
+
toasterId: options?.toasterId,
|
|
48
|
+
dismissible: options?.dismissible,
|
|
49
|
+
closeButton: options?.closeButton
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
var Toast = React$1.forwardRef(({ icon, title, children, type, color, variant, hideIcon = false, action, className }, ref) => {
|
|
53
|
+
const defaultVariantFromToaster = React$1.useContext(ToastDefaultVariantContext);
|
|
54
|
+
const resolvedVariant = variant ?? defaultVariantFromToaster ?? "soft";
|
|
55
|
+
const resolvedColor = color ?? type ?? "primary";
|
|
56
|
+
const resolvedIcon = icon ?? (type != null ? typeIconMap[type] : void 0) ?? (color != null ? defaultIconFromColor(color) : void 0) ?? /* @__PURE__ */ jsx(CircleAlert, { className: "h-4 w-4" });
|
|
57
|
+
const showIcon = !hideIcon && resolvedIcon != null;
|
|
58
|
+
const styles = resolveVariantStyles(resolvedVariant, resolvedColor);
|
|
59
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
60
|
+
ref,
|
|
61
|
+
className: cn("relative flex w-full min-w-[min(20rem,calc(100vw-2rem))] max-w-[min(24rem,calc(100vw-2rem))] items-start gap-3 overflow-hidden rounded-lg px-4 py-3 shadow-lg", styles.container, className),
|
|
62
|
+
style: styles.containerStyle,
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ jsx(VariantGradientUnderlay, {
|
|
65
|
+
layers: styles.gradientHoverLayers,
|
|
66
|
+
layersInline: styles.gradientHoverLayersInline,
|
|
67
|
+
silverShine: styles.silverShine,
|
|
68
|
+
silverBorder: styles.silverBorder
|
|
69
|
+
}),
|
|
70
|
+
showIcon && /* @__PURE__ */ jsx("div", {
|
|
71
|
+
className: "mt-0.5 shrink-0",
|
|
72
|
+
children: resolvedIcon
|
|
73
|
+
}),
|
|
74
|
+
/* @__PURE__ */ jsxs("div", {
|
|
75
|
+
className: "flex min-w-0 flex-1 flex-col gap-1",
|
|
76
|
+
children: [title && /* @__PURE__ */ jsx("div", {
|
|
77
|
+
className: "font-medium leading-normal text-sm",
|
|
78
|
+
children: title
|
|
79
|
+
}), children && /* @__PURE__ */ jsx("div", {
|
|
80
|
+
className: cn("text-sm leading-normal", styles.description),
|
|
81
|
+
style: styles.descriptionStyle,
|
|
82
|
+
children
|
|
83
|
+
})]
|
|
84
|
+
}),
|
|
85
|
+
action && /* @__PURE__ */ jsx("div", {
|
|
86
|
+
className: "shrink-0",
|
|
87
|
+
children: action
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
});
|
|
91
|
+
});
|
|
92
|
+
Toast.displayName = "Toast";
|
|
93
|
+
var Toaster$1 = React$1.forwardRef(({ position = "top-right", closeButton = true, toastVariant, ...props }, ref) => /* @__PURE__ */ jsx(ToastDefaultVariantContext.Provider, {
|
|
94
|
+
value: toastVariant,
|
|
95
|
+
children: /* @__PURE__ */ jsx(Toaster, {
|
|
96
|
+
ref,
|
|
97
|
+
position,
|
|
98
|
+
closeButton,
|
|
99
|
+
...props
|
|
100
|
+
})
|
|
101
|
+
}));
|
|
102
|
+
Toaster$1.displayName = "Toaster";
|
|
103
|
+
function show(input, options) {
|
|
104
|
+
const props = normalizeToastInput(input);
|
|
105
|
+
return toast.custom(() => /* @__PURE__ */ jsx(Toast, { ...props }), {
|
|
106
|
+
...resolveToastOptions(props, options),
|
|
107
|
+
unstyled: true
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
function showTypedToast(type, input, options) {
|
|
111
|
+
const props = normalizeToastInput(input, type);
|
|
112
|
+
return toast.custom(() => /* @__PURE__ */ jsx(Toast, { ...props }), {
|
|
113
|
+
...resolveToastOptions(props, options),
|
|
114
|
+
unstyled: true
|
|
115
|
+
});
|
|
116
|
+
}
|
|
117
|
+
var toast$1 = Object.assign(show, {
|
|
118
|
+
show,
|
|
119
|
+
success: (input, options) => showTypedToast("success", input, options),
|
|
120
|
+
error: (input, options) => showTypedToast("error", input, options),
|
|
121
|
+
info: (input, options) => showTypedToast("info", input, options),
|
|
122
|
+
warning: (input, options) => showTypedToast("warning", input, options),
|
|
123
|
+
dismiss: toast.dismiss
|
|
124
|
+
});
|
|
125
|
+
//#endregion
|
|
126
|
+
export { Toast, Toaster$1 as Toaster, toast$1 as toast };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuTrigger } from "../../core/animate-ui/components/radix/dropdown-menu.js";
|
|
2
|
+
import { Button } from "../button/button.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/togglable-items-list/togglable-items-list.tsx
|
|
5
|
+
function TogglableItemsList({ items, checkedState, onToggle, label, icon, triggerButtonVariant = "outline", triggerButtonColor, triggerButtonSize = "default", contentAlign = "end", contentClassName = "min-w-[150px]" }) {
|
|
6
|
+
return /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
7
|
+
asChild: true,
|
|
8
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
9
|
+
fullWidth: false,
|
|
10
|
+
variant: triggerButtonVariant,
|
|
11
|
+
color: triggerButtonColor,
|
|
12
|
+
size: triggerButtonSize,
|
|
13
|
+
startIcon: icon,
|
|
14
|
+
children: label
|
|
15
|
+
})
|
|
16
|
+
}), /* @__PURE__ */ jsx(DropdownMenuContent, {
|
|
17
|
+
align: contentAlign,
|
|
18
|
+
className: contentClassName,
|
|
19
|
+
children: items.map((item) => /* @__PURE__ */ jsx(DropdownMenuCheckboxItem, {
|
|
20
|
+
checked: checkedState[item.id] ?? true,
|
|
21
|
+
onCheckedChange: (value) => onToggle(item.id, !!value),
|
|
22
|
+
onSelect: (e) => e.preventDefault(),
|
|
23
|
+
children: item.label
|
|
24
|
+
}, item.id))
|
|
25
|
+
})] });
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { TogglableItemsList };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { Tooltip as Tooltip$1, TooltipContent, TooltipProvider, TooltipTrigger } from "../../core/animate-ui/components/animate/tooltip.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
//#region src/components/tooltip/tooltip.tsx
|
|
4
|
+
function Tooltip({ content, children, side, sideOffset, align, alignOffset, openDelay, closeDelay }) {
|
|
5
|
+
return /* @__PURE__ */ jsx(TooltipProvider, {
|
|
6
|
+
openDelay,
|
|
7
|
+
closeDelay,
|
|
8
|
+
children: /* @__PURE__ */ jsxs(Tooltip$1, {
|
|
9
|
+
side,
|
|
10
|
+
sideOffset,
|
|
11
|
+
align,
|
|
12
|
+
alignOffset,
|
|
13
|
+
children: [/* @__PURE__ */ jsx(TooltipTrigger, {
|
|
14
|
+
asChild: true,
|
|
15
|
+
children
|
|
16
|
+
}), /* @__PURE__ */ jsx(TooltipContent, { children: content })]
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { Tooltip as default };
|