@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,297 @@
|
|
|
1
|
+
import espressif_with_text_default from "../../assets/logos/espressif/espressif-with-text.js";
|
|
2
|
+
import espressif_with_text_dm_default from "../../assets/logos/espressif/espressif-with-text-dm.js";
|
|
3
|
+
import espressif_no_text_default from "../../assets/logos/espressif/espressif-no-text.js";
|
|
4
|
+
import insights_with_text_default from "../../assets/logos/insights/insights-with-text.js";
|
|
5
|
+
import insights_with_text_dm_default from "../../assets/logos/insights/insights-with-text-dm.js";
|
|
6
|
+
import insights_no_text_default from "../../assets/logos/insights/insights-no-text.js";
|
|
7
|
+
import launchpad_with_text_default from "../../assets/logos/launchpad/launchpad-with-text.js";
|
|
8
|
+
import launchpad_with_text_dm_default from "../../assets/logos/launchpad/launchpad-with-text-dm.js";
|
|
9
|
+
import launchpad_no_text_default from "../../assets/logos/launchpad/launchpad-no-text.js";
|
|
10
|
+
import launchpad_no_text_dm_default from "../../assets/logos/launchpad/launchpad-no-text-dm.js";
|
|
11
|
+
import private_agents_with_text_default from "../../assets/logos/private-agents/private-agents-with-text.js";
|
|
12
|
+
import private_agents_with_text_dm_default from "../../assets/logos/private-agents/private-agents-with-text-dm.js";
|
|
13
|
+
import private_agents_no_text_default from "../../assets/logos/private-agents/private-agents-no-text.js";
|
|
14
|
+
import rainmaker_with_text_default from "../../assets/logos/rainmaker/rainmaker-with-text.js";
|
|
15
|
+
import rainmaker_with_text_dm_default from "../../assets/logos/rainmaker/rainmaker-with-text-dm.js";
|
|
16
|
+
import rainmaker_no_text_default from "../../assets/logos/rainmaker/rainmaker-no-text.js";
|
|
17
|
+
import rainmaker_classic_with_text_default from "../../assets/logos/rainmaker-classic/rainmaker-classic-with-text.js";
|
|
18
|
+
import rainmaker_classic_with_text_dm_default from "../../assets/logos/rainmaker-classic/rainmaker-classic-with-text-dm.js";
|
|
19
|
+
import rainmaker_classic_no_text_default from "../../assets/logos/rainmaker-classic/rainmaker-classic-no-text.js";
|
|
20
|
+
import rainmaker_classic_no_text_dm_default from "../../assets/logos/rainmaker-classic/rainmaker-classic-no-text-dm.js";
|
|
21
|
+
import rainmaker_neo_with_text_default from "../../assets/logos/rainmaker-neo/rainmaker-neo-with-text.js";
|
|
22
|
+
import rainmaker_neo_with_text_dm_default from "../../assets/logos/rainmaker-neo/rainmaker-neo-with-text-dm.js";
|
|
23
|
+
import rainmaker_neo_no_text_default from "../../assets/logos/rainmaker-neo/rainmaker-neo-no-text.js";
|
|
24
|
+
import ui_components_with_text_default from "../../assets/logos/ui-components/ui-components-with-text.js";
|
|
25
|
+
import ui_components_with_text_dm_default from "../../assets/logos/ui-components/ui-components-with-text-dm.js";
|
|
26
|
+
import ui_components_no_text_default from "../../assets/logos/ui-components/ui-components-no-text.js";
|
|
27
|
+
import zerocode_with_text_default from "../../assets/logos/zerocode/zerocode-with-text.js";
|
|
28
|
+
import zerocode_with_text_dm_default from "../../assets/logos/zerocode/zerocode-with-text-dm.js";
|
|
29
|
+
import zerocode_no_text_default from "../../assets/logos/zerocode/zerocode-no-text.js";
|
|
30
|
+
import zerocode_ai_with_text_default from "../../assets/logos/zerocode-ai/zerocode-ai-with-text.js";
|
|
31
|
+
import zerocode_ai_with_text_dm_default from "../../assets/logos/zerocode-ai/zerocode-ai-with-text-dm.js";
|
|
32
|
+
import zerocode_ai_no_text_default from "../../assets/logos/zerocode-ai/zerocode-ai-no-text.js";
|
|
33
|
+
//#region src/common/app-logo/logo-config.ts
|
|
34
|
+
var logoConfig = {
|
|
35
|
+
espressif: {
|
|
36
|
+
light: {
|
|
37
|
+
full: {
|
|
38
|
+
src: espressif_with_text_default,
|
|
39
|
+
width: 116.84,
|
|
40
|
+
height: 21.04
|
|
41
|
+
},
|
|
42
|
+
minimal: {
|
|
43
|
+
src: espressif_no_text_default,
|
|
44
|
+
width: 21.4,
|
|
45
|
+
height: 21
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
dark: {
|
|
49
|
+
full: {
|
|
50
|
+
src: espressif_with_text_dm_default,
|
|
51
|
+
width: 116.84,
|
|
52
|
+
height: 21
|
|
53
|
+
},
|
|
54
|
+
minimal: {
|
|
55
|
+
src: espressif_no_text_default,
|
|
56
|
+
width: 21.4,
|
|
57
|
+
height: 21
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
insights: {
|
|
62
|
+
light: {
|
|
63
|
+
full: {
|
|
64
|
+
src: insights_with_text_default,
|
|
65
|
+
width: 690.62,
|
|
66
|
+
height: 130.7
|
|
67
|
+
},
|
|
68
|
+
minimal: {
|
|
69
|
+
src: insights_no_text_default,
|
|
70
|
+
width: 125.22,
|
|
71
|
+
height: 125.22
|
|
72
|
+
}
|
|
73
|
+
},
|
|
74
|
+
dark: {
|
|
75
|
+
full: {
|
|
76
|
+
src: insights_with_text_dm_default,
|
|
77
|
+
width: 685.25,
|
|
78
|
+
height: 125.22
|
|
79
|
+
},
|
|
80
|
+
minimal: {
|
|
81
|
+
src: insights_no_text_default,
|
|
82
|
+
width: 125.22,
|
|
83
|
+
height: 125.22
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
},
|
|
87
|
+
launchpad: {
|
|
88
|
+
light: {
|
|
89
|
+
full: {
|
|
90
|
+
src: launchpad_with_text_default,
|
|
91
|
+
width: 319.42,
|
|
92
|
+
height: 46.05
|
|
93
|
+
},
|
|
94
|
+
minimal: {
|
|
95
|
+
src: launchpad_no_text_default,
|
|
96
|
+
width: 41.22,
|
|
97
|
+
height: 40.89
|
|
98
|
+
}
|
|
99
|
+
},
|
|
100
|
+
dark: {
|
|
101
|
+
full: {
|
|
102
|
+
src: launchpad_with_text_dm_default,
|
|
103
|
+
width: 319.42,
|
|
104
|
+
height: 40.89
|
|
105
|
+
},
|
|
106
|
+
minimal: {
|
|
107
|
+
src: launchpad_no_text_dm_default,
|
|
108
|
+
width: 41.22,
|
|
109
|
+
height: 40.89
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
},
|
|
113
|
+
"private-agents": {
|
|
114
|
+
light: {
|
|
115
|
+
full: {
|
|
116
|
+
src: private_agents_with_text_default,
|
|
117
|
+
width: 2244.36,
|
|
118
|
+
height: 342.3
|
|
119
|
+
},
|
|
120
|
+
minimal: {
|
|
121
|
+
src: private_agents_no_text_default,
|
|
122
|
+
width: 278.63,
|
|
123
|
+
height: 342.3
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
dark: {
|
|
127
|
+
full: {
|
|
128
|
+
src: private_agents_with_text_dm_default,
|
|
129
|
+
width: 2244.36,
|
|
130
|
+
height: 342.3
|
|
131
|
+
},
|
|
132
|
+
minimal: {
|
|
133
|
+
src: private_agents_no_text_default,
|
|
134
|
+
width: 278.63,
|
|
135
|
+
height: 342.3
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
},
|
|
139
|
+
rainmaker: {
|
|
140
|
+
light: {
|
|
141
|
+
full: {
|
|
142
|
+
src: rainmaker_with_text_default,
|
|
143
|
+
width: 367.31,
|
|
144
|
+
height: 49.08
|
|
145
|
+
},
|
|
146
|
+
minimal: {
|
|
147
|
+
src: rainmaker_no_text_default,
|
|
148
|
+
width: 512,
|
|
149
|
+
height: 420.01
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
dark: {
|
|
153
|
+
full: {
|
|
154
|
+
src: rainmaker_with_text_dm_default,
|
|
155
|
+
width: 367.31,
|
|
156
|
+
height: 49.08
|
|
157
|
+
},
|
|
158
|
+
minimal: {
|
|
159
|
+
src: rainmaker_no_text_default,
|
|
160
|
+
width: 512,
|
|
161
|
+
height: 420.01
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"rainmaker-classic": {
|
|
166
|
+
light: {
|
|
167
|
+
full: {
|
|
168
|
+
src: rainmaker_classic_with_text_default,
|
|
169
|
+
width: 1053.8,
|
|
170
|
+
height: 175.6
|
|
171
|
+
},
|
|
172
|
+
minimal: {
|
|
173
|
+
src: rainmaker_classic_no_text_default,
|
|
174
|
+
width: 455.1,
|
|
175
|
+
height: 459.1
|
|
176
|
+
}
|
|
177
|
+
},
|
|
178
|
+
dark: {
|
|
179
|
+
full: {
|
|
180
|
+
src: rainmaker_classic_with_text_dm_default,
|
|
181
|
+
width: 1053.8,
|
|
182
|
+
height: 175.6
|
|
183
|
+
},
|
|
184
|
+
minimal: {
|
|
185
|
+
src: rainmaker_classic_no_text_dm_default,
|
|
186
|
+
width: 455.1,
|
|
187
|
+
height: 459.1
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
},
|
|
191
|
+
"rainmaker-neo": {
|
|
192
|
+
light: {
|
|
193
|
+
full: {
|
|
194
|
+
src: rainmaker_neo_with_text_default,
|
|
195
|
+
width: 1053.8,
|
|
196
|
+
height: 175.6
|
|
197
|
+
},
|
|
198
|
+
minimal: {
|
|
199
|
+
src: rainmaker_neo_no_text_default,
|
|
200
|
+
width: 455.1,
|
|
201
|
+
height: 459.1
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
dark: {
|
|
205
|
+
full: {
|
|
206
|
+
src: rainmaker_neo_with_text_dm_default,
|
|
207
|
+
width: 1053.7,
|
|
208
|
+
height: 175.7
|
|
209
|
+
},
|
|
210
|
+
minimal: {
|
|
211
|
+
src: rainmaker_neo_no_text_default,
|
|
212
|
+
width: 455.1,
|
|
213
|
+
height: 459.1
|
|
214
|
+
}
|
|
215
|
+
}
|
|
216
|
+
},
|
|
217
|
+
"ui-components": {
|
|
218
|
+
light: {
|
|
219
|
+
full: {
|
|
220
|
+
src: ui_components_with_text_default,
|
|
221
|
+
width: 2320.33,
|
|
222
|
+
height: 342.3
|
|
223
|
+
},
|
|
224
|
+
minimal: {
|
|
225
|
+
src: ui_components_no_text_default,
|
|
226
|
+
width: 267.95,
|
|
227
|
+
height: 320
|
|
228
|
+
}
|
|
229
|
+
},
|
|
230
|
+
dark: {
|
|
231
|
+
full: {
|
|
232
|
+
src: ui_components_with_text_dm_default,
|
|
233
|
+
width: 2297.02,
|
|
234
|
+
height: 320
|
|
235
|
+
},
|
|
236
|
+
minimal: {
|
|
237
|
+
src: ui_components_no_text_default,
|
|
238
|
+
width: 267.95,
|
|
239
|
+
height: 320
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
},
|
|
243
|
+
zerocode: {
|
|
244
|
+
light: {
|
|
245
|
+
full: {
|
|
246
|
+
src: zerocode_with_text_default,
|
|
247
|
+
width: 565,
|
|
248
|
+
height: 54.4
|
|
249
|
+
},
|
|
250
|
+
minimal: {
|
|
251
|
+
src: zerocode_no_text_default,
|
|
252
|
+
width: 63.4,
|
|
253
|
+
height: 54.4
|
|
254
|
+
}
|
|
255
|
+
},
|
|
256
|
+
dark: {
|
|
257
|
+
full: {
|
|
258
|
+
src: zerocode_with_text_dm_default,
|
|
259
|
+
width: 565,
|
|
260
|
+
height: 54.4
|
|
261
|
+
},
|
|
262
|
+
minimal: {
|
|
263
|
+
src: zerocode_no_text_default,
|
|
264
|
+
width: 63.4,
|
|
265
|
+
height: 54.4
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
},
|
|
269
|
+
"zerocode-ai": {
|
|
270
|
+
light: {
|
|
271
|
+
full: {
|
|
272
|
+
src: zerocode_ai_with_text_default,
|
|
273
|
+
width: 592.8,
|
|
274
|
+
height: 78.4
|
|
275
|
+
},
|
|
276
|
+
minimal: {
|
|
277
|
+
src: zerocode_ai_no_text_default,
|
|
278
|
+
width: 59,
|
|
279
|
+
height: 52.1
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
dark: {
|
|
283
|
+
full: {
|
|
284
|
+
src: zerocode_ai_with_text_dm_default,
|
|
285
|
+
width: 592.8,
|
|
286
|
+
height: 78.4
|
|
287
|
+
},
|
|
288
|
+
minimal: {
|
|
289
|
+
src: zerocode_ai_no_text_default,
|
|
290
|
+
width: 59,
|
|
291
|
+
height: 52.1
|
|
292
|
+
}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
};
|
|
296
|
+
//#endregion
|
|
297
|
+
export { logoConfig };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { Card, CardContent } from "../../core/card.js";
|
|
2
|
+
import Tooltip from "../../components/tooltip/tooltip.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/common/copyright-card/copyright-card.tsx
|
|
5
|
+
function CopyrightCard({ text, logoSrc, logoAlt = "Logo", href, logoOnly = false }) {
|
|
6
|
+
const handleClick = () => {
|
|
7
|
+
if (href) window.open(href, "_blank", "noopener,noreferrer");
|
|
8
|
+
};
|
|
9
|
+
const copyrightText = /* @__PURE__ */ jsx("div", {
|
|
10
|
+
className: "flex items-center gap-1.5 text-sm text-muted-foreground",
|
|
11
|
+
children: /* @__PURE__ */ jsx("span", { children: text })
|
|
12
|
+
});
|
|
13
|
+
if (logoOnly && logoSrc) return /* @__PURE__ */ jsx(Tooltip, {
|
|
14
|
+
content: copyrightText,
|
|
15
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
16
|
+
className: "inline-block cursor-pointer",
|
|
17
|
+
onClick: handleClick,
|
|
18
|
+
children: /* @__PURE__ */ jsx("img", {
|
|
19
|
+
src: logoSrc,
|
|
20
|
+
alt: logoAlt,
|
|
21
|
+
className: "h-5 w-5 object-contain"
|
|
22
|
+
})
|
|
23
|
+
})
|
|
24
|
+
});
|
|
25
|
+
return /* @__PURE__ */ jsx(Card, {
|
|
26
|
+
className: "border p-2 cursor-pointer hover:bg-accent/50 transition-colors",
|
|
27
|
+
onClick: handleClick,
|
|
28
|
+
children: /* @__PURE__ */ jsxs(CardContent, {
|
|
29
|
+
className: "flex items-center gap-4 p-0",
|
|
30
|
+
children: [logoSrc && /* @__PURE__ */ jsx("img", {
|
|
31
|
+
src: logoSrc,
|
|
32
|
+
alt: logoAlt,
|
|
33
|
+
className: "h-5 w-5 object-contain"
|
|
34
|
+
}), copyrightText]
|
|
35
|
+
})
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
//#endregion
|
|
39
|
+
export { CopyrightCard as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Link } from "../../components/link/link.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
//#region src/common/footer-card/footer-card.tsx
|
|
4
|
+
function FooterCard() {
|
|
5
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
6
|
+
className: "text-xs",
|
|
7
|
+
children: [
|
|
8
|
+
"© ",
|
|
9
|
+
(/* @__PURE__ */ new Date()).getFullYear(),
|
|
10
|
+
" ",
|
|
11
|
+
/* @__PURE__ */ jsx(Link, {
|
|
12
|
+
to: "https://www.espressif.com/",
|
|
13
|
+
underline: true,
|
|
14
|
+
className: "h-auto hover:bg-transparent p-0 text-xs",
|
|
15
|
+
children: "Espressif Systems"
|
|
16
|
+
}),
|
|
17
|
+
". All rights reserved."
|
|
18
|
+
]
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { FooterCard as default };
|
package/dist/common/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import
|
|
8
|
-
|
|
1
|
+
import { AnimatedRainmakerLogo } from "./animated-rainmaker-logo/animated-rainmaker-logo.js";
|
|
2
|
+
import AppLogo from "./app-logo/app-logo.js";
|
|
3
|
+
import ProfileCard from "./profile-card/profile-card.js";
|
|
4
|
+
import CopyrightCard from "./copyright-card/copyright-card.js";
|
|
5
|
+
import PageLoader from "./page-loader/page-loader.js";
|
|
6
|
+
import MyAccountMenu from "./my-account-menu/my-account-menu.js";
|
|
7
|
+
import FooterCard from "./footer-card/footer-card.js";
|
|
8
|
+
export { AnimatedRainmakerLogo, AppLogo, CopyrightCard, FooterCard, MyAccountMenu, PageLoader, ProfileCard };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import Avatar from "../../components/avatar/avatar.js";
|
|
2
|
+
import List from "../../components/list/list.js";
|
|
3
|
+
import { Button } from "../../components/button/button.js";
|
|
4
|
+
import Menu from "../../components/menu/menu.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/common/my-account-menu/my-account-menu.tsx
|
|
7
|
+
function MyAccountMenu({ name, email, imageUrl, minWidth = "200px", menuItems, badgeColor, badgeIcon }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Menu, {
|
|
9
|
+
trigger: /* @__PURE__ */ jsxs(Button, {
|
|
10
|
+
variant: "ghost",
|
|
11
|
+
size: "icon",
|
|
12
|
+
className: "rounded-full",
|
|
13
|
+
children: [/* @__PURE__ */ jsx(Avatar, {
|
|
14
|
+
name: name || email,
|
|
15
|
+
imageUrl,
|
|
16
|
+
badgeColor,
|
|
17
|
+
badgeIcon
|
|
18
|
+
}), /* @__PURE__ */ jsx("span", {
|
|
19
|
+
className: "sr-only",
|
|
20
|
+
children: "My Account"
|
|
21
|
+
})]
|
|
22
|
+
}),
|
|
23
|
+
align: "end",
|
|
24
|
+
minWidth,
|
|
25
|
+
children: /* @__PURE__ */ jsx(List, {
|
|
26
|
+
items: menuItems,
|
|
27
|
+
role: "dropdown-list"
|
|
28
|
+
})
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { MyAccountMenu as default };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ProgressBar } from "../../components/progress-bar/progress-bar.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/common/page-loader/page-loader.tsx
|
|
4
|
+
/**
|
|
5
|
+
* Full-screen loading indicator
|
|
6
|
+
* Used as defaultPendingComponent for route transitions
|
|
7
|
+
*/
|
|
8
|
+
function PageLoader() {
|
|
9
|
+
return /* @__PURE__ */ jsx("div", {
|
|
10
|
+
className: "flex min-h-screen items-center justify-center bg-background",
|
|
11
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
12
|
+
className: "flex flex-col items-center gap-4 w-full max-w-sm",
|
|
13
|
+
children: /* @__PURE__ */ jsx(ProgressBar, {
|
|
14
|
+
showFakeProgress: true,
|
|
15
|
+
className: "w-full"
|
|
16
|
+
})
|
|
17
|
+
})
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
//#endregion
|
|
21
|
+
export { PageLoader as default };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import Avatar from "../../components/avatar/avatar.js";
|
|
2
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
+
//#region src/common/profile-card/profile-card.tsx
|
|
4
|
+
function ProfileCard({ name, email, imageUrl }) {
|
|
5
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
6
|
+
className: "flex items-center gap-3",
|
|
7
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
8
|
+
className: "shrink-0",
|
|
9
|
+
children: /* @__PURE__ */ jsx(Avatar, {
|
|
10
|
+
name: name || email,
|
|
11
|
+
imageUrl: imageUrl || ""
|
|
12
|
+
})
|
|
13
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
14
|
+
className: "flex-1 min-w-0 flex flex-col gap-1",
|
|
15
|
+
children: [name && /* @__PURE__ */ jsx("div", {
|
|
16
|
+
className: "text-sm font-medium leading-5 text-foreground truncate",
|
|
17
|
+
children: name
|
|
18
|
+
}), email && /* @__PURE__ */ jsx("div", {
|
|
19
|
+
className: "text-xs leading-4 text-muted-foreground truncate",
|
|
20
|
+
children: email
|
|
21
|
+
})]
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { ProfileCard as default };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { Accordion as Accordion$1, AccordionContent, AccordionItem, AccordionTrigger } from "../../core/animate-ui/components/radix/accordion.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/accordion/accordion.tsx
|
|
5
|
+
var sizeStyles = {
|
|
6
|
+
sm: {
|
|
7
|
+
trigger: "py-2 px-3",
|
|
8
|
+
content: "px-3 pb-2",
|
|
9
|
+
text: "text-sm font-medium tracking-tight"
|
|
10
|
+
},
|
|
11
|
+
default: {
|
|
12
|
+
trigger: "py-3 px-4",
|
|
13
|
+
content: "px-4 pb-3",
|
|
14
|
+
text: "text-base font-medium tracking-tight"
|
|
15
|
+
},
|
|
16
|
+
lg: {
|
|
17
|
+
trigger: "py-4 px-5",
|
|
18
|
+
content: "px-5 pb-4",
|
|
19
|
+
text: "text-lg font-medium tracking-tight"
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
function Accordion({ items, size = "default", allowMultiple = false, defaultValue, className, triggerClassName, contentClassName }) {
|
|
23
|
+
const styles = sizeStyles[size];
|
|
24
|
+
const resolvedDefault = allowMultiple ? Array.isArray(defaultValue) ? defaultValue : defaultValue ? [defaultValue] : void 0 : typeof defaultValue === "string" ? defaultValue : Array.isArray(defaultValue) ? defaultValue[0] : void 0;
|
|
25
|
+
return /* @__PURE__ */ jsx(Accordion$1, {
|
|
26
|
+
type: allowMultiple ? "multiple" : "single",
|
|
27
|
+
collapsible: true,
|
|
28
|
+
defaultValue: resolvedDefault,
|
|
29
|
+
className: cn("w-full", className),
|
|
30
|
+
children: items.map((item) => /* @__PURE__ */ jsxs(AccordionItem, {
|
|
31
|
+
value: item.id,
|
|
32
|
+
children: [/* @__PURE__ */ jsx(AccordionTrigger, {
|
|
33
|
+
className: cn(styles.trigger, triggerClassName),
|
|
34
|
+
children: /* @__PURE__ */ jsxs("span", {
|
|
35
|
+
className: "flex items-center gap-2",
|
|
36
|
+
children: [item.icon, typeof item.title === "string" ? /* @__PURE__ */ jsx("span", {
|
|
37
|
+
className: styles.text,
|
|
38
|
+
children: item.title
|
|
39
|
+
}) : item.title]
|
|
40
|
+
})
|
|
41
|
+
}), /* @__PURE__ */ jsx(AccordionContent, {
|
|
42
|
+
className: cn(styles.content, contentClassName),
|
|
43
|
+
children: typeof item.content === "string" ? /* @__PURE__ */ jsx("span", {
|
|
44
|
+
className: styles.text,
|
|
45
|
+
children: item.content
|
|
46
|
+
}) : item.content
|
|
47
|
+
})]
|
|
48
|
+
}, item.id))
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
export { Accordion };
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import { DropdownMenu, DropdownMenuContent, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuTrigger } from "../../core/animate-ui/components/radix/dropdown-menu.js";
|
|
3
|
+
import { Button } from "../button/button.js";
|
|
4
|
+
import { outlineSearchShellClasses, searchFieldContainerSizeClasses, searchFieldIconSizeClasses, searchFieldInputTextClasses } from "../search-field-shell.js";
|
|
5
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { ChevronDown, Search, X } from "lucide-react";
|
|
8
|
+
//#region src/components/advanced-search-box/advanced-search-box.tsx
|
|
9
|
+
var DEBOUNCE_MS = 500;
|
|
10
|
+
function AdvancedSearchBox({ searchMeta, onSearch, size = "default", className, searchOnEnter = false }) {
|
|
11
|
+
const [selectedId, setSelectedId] = useState(searchMeta[0].id);
|
|
12
|
+
const [value, setValue] = useState("");
|
|
13
|
+
const onSearchRef = useRef(onSearch);
|
|
14
|
+
onSearchRef.current = onSearch;
|
|
15
|
+
const selectedMeta = searchMeta.find((m) => m.id === selectedId);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if (searchOnEnter) return;
|
|
18
|
+
const timer = setTimeout(() => {
|
|
19
|
+
onSearchRef.current({
|
|
20
|
+
id: selectedId,
|
|
21
|
+
value: value.trim()
|
|
22
|
+
});
|
|
23
|
+
}, DEBOUNCE_MS);
|
|
24
|
+
return () => clearTimeout(timer);
|
|
25
|
+
}, [
|
|
26
|
+
value,
|
|
27
|
+
selectedId,
|
|
28
|
+
searchOnEnter
|
|
29
|
+
]);
|
|
30
|
+
const handleClear = useCallback(() => {
|
|
31
|
+
setValue("");
|
|
32
|
+
onSearchRef.current({
|
|
33
|
+
id: selectedId,
|
|
34
|
+
value: ""
|
|
35
|
+
});
|
|
36
|
+
}, [selectedId]);
|
|
37
|
+
const handleFieldChange = useCallback((newId) => {
|
|
38
|
+
setSelectedId(newId);
|
|
39
|
+
if (searchOnEnter) return;
|
|
40
|
+
onSearchRef.current({
|
|
41
|
+
id: newId,
|
|
42
|
+
value: value.trim()
|
|
43
|
+
});
|
|
44
|
+
}, [value, searchOnEnter]);
|
|
45
|
+
const handleKeyDown = useCallback((e) => {
|
|
46
|
+
if (!searchOnEnter) return;
|
|
47
|
+
if (e.key === "Enter") {
|
|
48
|
+
e.preventDefault();
|
|
49
|
+
onSearchRef.current({
|
|
50
|
+
id: selectedId,
|
|
51
|
+
value: value.trim()
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
}, [
|
|
55
|
+
searchOnEnter,
|
|
56
|
+
selectedId,
|
|
57
|
+
value
|
|
58
|
+
]);
|
|
59
|
+
const iconSize = searchFieldIconSizeClasses[size];
|
|
60
|
+
const fieldSelector = /* @__PURE__ */ jsxs(DropdownMenu, { children: [/* @__PURE__ */ jsx(DropdownMenuTrigger, {
|
|
61
|
+
asChild: true,
|
|
62
|
+
children: /* @__PURE__ */ jsx(Button, {
|
|
63
|
+
variant: "ghost",
|
|
64
|
+
size,
|
|
65
|
+
fullWidth: false,
|
|
66
|
+
endIcon: /* @__PURE__ */ jsx(ChevronDown, { className: iconSize }),
|
|
67
|
+
className: "text-foreground h-auto px-0 py-0 shrink-0",
|
|
68
|
+
children: selectedMeta.label
|
|
69
|
+
})
|
|
70
|
+
}), /* @__PURE__ */ jsx(DropdownMenuContent, {
|
|
71
|
+
align: "start",
|
|
72
|
+
children: /* @__PURE__ */ jsx(DropdownMenuRadioGroup, {
|
|
73
|
+
value: selectedId,
|
|
74
|
+
onValueChange: handleFieldChange,
|
|
75
|
+
children: searchMeta.map((meta) => /* @__PURE__ */ jsx(DropdownMenuRadioItem, {
|
|
76
|
+
value: meta.id,
|
|
77
|
+
children: meta.label
|
|
78
|
+
}, meta.id))
|
|
79
|
+
})
|
|
80
|
+
})] });
|
|
81
|
+
const clearButton = value ? /* @__PURE__ */ jsx(Button, {
|
|
82
|
+
variant: "ghost",
|
|
83
|
+
fullWidth: false,
|
|
84
|
+
onClick: handleClear,
|
|
85
|
+
startIcon: /* @__PURE__ */ jsx(X, { className: iconSize }),
|
|
86
|
+
className: "h-auto w-auto p-0 m-0 shrink-0"
|
|
87
|
+
}) : /* @__PURE__ */ jsx(Search, { className: cn(iconSize, "text-muted-foreground shrink-0") });
|
|
88
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
89
|
+
className: cn(outlineSearchShellClasses, "flex w-full items-center gap-2 rounded-md", "focus-within:ring-2 focus-within:ring-ring focus-within:ring-offset-2 ring-offset-background", searchFieldContainerSizeClasses[size], className),
|
|
90
|
+
children: [
|
|
91
|
+
fieldSelector,
|
|
92
|
+
/* @__PURE__ */ jsx("div", { className: "h-4 w-px bg-border shrink-0" }),
|
|
93
|
+
/* @__PURE__ */ jsx("input", {
|
|
94
|
+
type: selectedMeta.type,
|
|
95
|
+
value,
|
|
96
|
+
onChange: (e) => setValue(e.target.value),
|
|
97
|
+
onKeyDown: handleKeyDown,
|
|
98
|
+
placeholder: selectedMeta.placeholder,
|
|
99
|
+
className: cn("flex-1 min-w-0 bg-transparent outline-none placeholder:text-muted-foreground", searchFieldInputTextClasses[size])
|
|
100
|
+
}),
|
|
101
|
+
clearButton
|
|
102
|
+
]
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
//#endregion
|
|
106
|
+
export { AdvancedSearchBox as default };
|