@espressif/dashboard-ui-components 1.10.0 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +65 -0
- package/dist/_vendor/@radix-ui/primitive/dist/index.js +9 -0
- package/dist/_vendor/@radix-ui/react-checkbox/dist/index.js +185 -0
- package/dist/_vendor/@radix-ui/react-compose-refs/dist/index.js +28 -0
- package/dist/_vendor/@radix-ui/react-context/dist/index.js +68 -0
- package/dist/_vendor/@radix-ui/react-presence/dist/index.js +127 -0
- package/dist/_vendor/@radix-ui/react-primitive/dist/index.js +42 -0
- package/dist/_vendor/@radix-ui/react-use-controllable-state/dist/index.js +55 -0
- package/dist/_vendor/@radix-ui/react-use-layout-effect/dist/index.js +5 -0
- package/dist/_vendor/@radix-ui/react-use-previous/dist/index.js +17 -0
- package/dist/_vendor/@radix-ui/react-use-size/dist/index.js +39 -0
- package/dist/_vendor/lottie-react/build/index.es.js +537 -0
- package/dist/_vendor/lottie-web/build/player/lottie.js +14149 -0
- package/dist/_virtual/_rolldown/runtime.js +24 -0
- package/dist/assets/illustrations/bulb-cloud-drawing.js +4 -0
- package/dist/assets/illustrations/rm-dashboard-update.js +4 -0
- package/dist/assets/illustrations/rm-data-download.js +4 -0
- package/dist/assets/logos/espressif/espressif-no-text.js +4 -0
- package/dist/assets/logos/espressif/espressif-with-text-dm.js +4 -0
- package/dist/assets/logos/espressif/espressif-with-text.js +4 -0
- package/dist/assets/logos/insights/insights-no-text.js +4 -0
- package/dist/assets/logos/insights/insights-with-text-dm.js +4 -0
- package/dist/assets/logos/insights/insights-with-text.js +4 -0
- package/dist/assets/logos/launchpad/launchpad-no-text-dm.js +4 -0
- package/dist/assets/logos/launchpad/launchpad-no-text.js +4 -0
- package/dist/assets/logos/launchpad/launchpad-with-text-dm.js +4 -0
- package/dist/assets/logos/launchpad/launchpad-with-text.js +4 -0
- package/dist/assets/logos/private-agents/private-agents-no-text.js +4 -0
- package/dist/assets/logos/private-agents/private-agents-with-text-dm.js +4 -0
- package/dist/assets/logos/private-agents/private-agents-with-text.js +4 -0
- package/dist/assets/logos/rainmaker/rainmaker-no-text.js +4 -0
- package/dist/assets/logos/rainmaker/rainmaker-with-text-dm.js +4 -0
- package/dist/assets/logos/rainmaker/rainmaker-with-text.js +4 -0
- package/dist/assets/logos/rainmaker-classic/rainmaker-classic-no-text-dm.js +4 -0
- package/dist/assets/logos/rainmaker-classic/rainmaker-classic-no-text.js +4 -0
- package/dist/assets/logos/rainmaker-classic/rainmaker-classic-with-text-dm.js +4 -0
- package/dist/assets/logos/rainmaker-classic/rainmaker-classic-with-text.js +4 -0
- package/dist/assets/logos/rainmaker-neo/rainmaker-neo-no-text.js +4 -0
- package/dist/assets/logos/rainmaker-neo/rainmaker-neo-with-text-dm.js +4 -0
- package/dist/assets/logos/rainmaker-neo/rainmaker-neo-with-text.js +4 -0
- package/dist/assets/logos/ui-components/ui-components-no-text.js +4 -0
- package/dist/assets/logos/ui-components/ui-components-with-text-dm.js +4 -0
- package/dist/assets/logos/ui-components/ui-components-with-text.js +4 -0
- package/dist/assets/logos/zerocode/zerocode-no-text.js +4 -0
- package/dist/assets/logos/zerocode/zerocode-with-text-dm.js +4 -0
- package/dist/assets/logos/zerocode/zerocode-with-text.js +4 -0
- package/dist/assets/logos/zerocode-ai/zerocode-ai-no-text.js +4 -0
- package/dist/assets/logos/zerocode-ai/zerocode-ai-with-text-dm.js +4 -0
- package/dist/assets/logos/zerocode-ai/zerocode-ai-with-text.js +4 -0
- package/dist/common/animated-rainmaker-logo/animated-rainmaker-logo.constants.js +18 -0
- package/dist/common/animated-rainmaker-logo/animated-rainmaker-logo.js +24 -0
- package/dist/common/animated-rainmaker-logo/rainmaker-c-logo.js +50 -0
- package/dist/common/animated-rainmaker-logo/use-animated-rainmaker-logo-animation.js +85 -0
- package/dist/common/app-logo/app-logo.js +59 -0
- package/dist/common/app-logo/logo-config.js +297 -0
- package/dist/common/copyright-card/copyright-card.js +39 -0
- package/dist/common/footer-card/footer-card.js +22 -0
- package/dist/common/index.js +8 -8
- package/dist/common/my-account-menu/my-account-menu.js +32 -0
- package/dist/common/page-loader/page-loader.js +21 -0
- package/dist/common/profile-card/profile-card.js +26 -0
- package/dist/components/accordion/accordion.js +52 -0
- package/dist/components/advanced-search-box/advanced-search-box.js +106 -0
- package/dist/components/alert/alert.js +85 -0
- package/dist/components/animated-containers/pop-collection-item.js +28 -0
- package/dist/components/async-multi-select/async-multi-select.js +199 -0
- package/dist/components/avatar/avatar.js +41 -0
- package/dist/components/button/button.js +191 -0
- package/dist/components/button/flash-button.js +110 -0
- package/dist/components/button/invert-button.js +13 -0
- package/dist/components/calendar/calendar.js +105 -0
- package/dist/components/cards/animated-card/animated-card-animations.js +57 -0
- package/dist/components/cards/animated-card/animated-card.js +42 -0
- package/dist/components/cards/basic-details-card.js +46 -0
- package/dist/components/cards/collapsible-card.js +48 -0
- package/dist/components/cards/no-data-card/no-data-card.js +30 -0
- package/dist/components/cards/section-card.js +265 -0
- package/dist/components/cards/simple-card.js +24 -0
- package/dist/components/carousel/carousel.js +158 -0
- package/dist/components/chart/area-chart.js +135 -0
- package/dist/components/chart/bar-chart.js +151 -0
- package/dist/components/chart/chart-colors.js +85 -0
- package/dist/components/chart/chart-series-data.js +53 -0
- package/dist/components/chart/chart.js +147 -0
- package/dist/components/chart/chart.types.js +7 -0
- package/dist/components/chart/composed-chart.js +182 -0
- package/dist/components/chart/donut-chart.js +177 -0
- package/dist/components/chart/line-chart.js +137 -0
- package/dist/components/chart/treemap-chart.js +294 -0
- package/dist/components/circular-progress/circular-progress.js +125 -0
- package/dist/components/code-editor/code-editor.js +235 -0
- package/dist/components/code-editor/code-editor.utils.js +122 -0
- package/dist/components/code-editor/use-code-editor-keys.js +79 -0
- package/dist/components/code-editor/use-highlighted-html.js +102 -0
- package/dist/components/confirmation-dialog/confirmation-dialog.js +72 -0
- package/dist/components/content-container/content-container.js +20 -0
- package/dist/components/copiable-text/copiable-text.js +46 -0
- package/dist/components/data-table/data-table.js +186 -0
- package/dist/components/data-table/responsive-columns.js +65 -0
- package/dist/components/data-table/row-actions.js +27 -0
- package/dist/components/data-table/sticky-columns.js +71 -0
- package/dist/components/data-table/table-body.js +57 -0
- package/dist/components/data-table/table-header.js +21 -0
- package/dist/components/date-picker/date-picker.js +95 -0
- package/dist/components/date-range-picker/date-range-picker.js +301 -0
- package/dist/components/date-range-picker/presets.js +174 -0
- package/dist/components/date-time-picker/date-time-picker.js +144 -0
- package/dist/components/date-time-picker/date-time-picker.utils.js +32 -0
- package/dist/components/device-icon/device-icon.config.js +194 -0
- package/dist/components/device-icon/device-icon.js +17 -0
- package/dist/components/device-icon/icons/air-conditioner.js +22 -0
- package/dist/components/device-icon/icons/blind.js +24 -0
- package/dist/components/device-icon/icons/dimmer.js +14 -0
- package/dist/components/device-icon/icons/extension-board.js +42 -0
- package/dist/components/device-icon/icons/fan.js +14 -0
- package/dist/components/device-icon/icons/knob.js +14 -0
- package/dist/components/device-icon/icons/led-strip.js +22 -0
- package/dist/components/device-icon/icons/light.js +14 -0
- package/dist/components/device-icon/icons/refrigerator.js +18 -0
- package/dist/components/device-icon/icons/retro-switch.js +18 -0
- package/dist/components/device-icon/icons/router.js +20 -0
- package/dist/components/device-icon/icons/sensor.js +20 -0
- package/dist/components/device-icon/icons/socket.js +19 -0
- package/dist/components/device-icon/icons/switch.js +19 -0
- package/dist/components/device-icon/icons/thermostat.js +21 -0
- package/dist/components/device-icon/icons/washing-machine.js +22 -0
- package/dist/components/device-icon/match-device.js +61 -0
- package/dist/components/dynamic-list/dynamic-list.js +445 -0
- package/dist/components/error-display/full-size-error/full-size-error.js +20 -0
- package/dist/components/error-display/inline-error/inline-error.js +12 -0
- package/dist/components/file-input/file-input.js +318 -0
- package/dist/components/file-upload/file-upload.js +317 -0
- package/dist/components/filters-bar/filters-bar.js +36 -0
- package/dist/components/fullscreen-dialog/fullscreen-dialog.js +68 -0
- package/dist/components/icon-avatar/icon-avatar.js +130 -0
- package/dist/components/icon-text-action-card/icon-text-action-card.js +190 -0
- package/dist/components/illustration/illustration-registry.js +37 -0
- package/dist/components/illustration/illustration-variants.js +21 -0
- package/dist/components/illustration/illustration.js +68 -0
- package/dist/components/index.d.ts +0 -20
- package/dist/components/index.js +134 -6
- package/dist/components/key-value-manager/key-value-manager-add-popover.js +126 -0
- package/dist/components/key-value-manager/key-value-manager-field.js +47 -0
- package/dist/components/key-value-manager/key-value-manager-table.js +188 -0
- package/dist/components/key-value-manager/key-value-manager.js +111 -0
- package/dist/components/key-value-manager/key-value-manager.props.js +28 -0
- package/dist/components/key-value-manager/key-value-manager.utils.js +21 -0
- package/dist/components/link/link.js +67 -0
- package/dist/components/list/dropdown-list-item.js +60 -0
- package/dist/components/list/list-item.utils.js +76 -0
- package/dist/components/list/list.js +49 -0
- package/dist/components/list/list.props.js +27 -0
- package/dist/components/list/standard-list-item.js +66 -0
- package/dist/components/list-details/list-details-item-button.js +46 -0
- package/dist/components/list-details/list-details-item-dropdown.js +112 -0
- package/dist/components/list-details/list-details-item-strip.js +125 -0
- package/dist/components/list-details/list-details.js +148 -0
- package/dist/components/lottie-animation-container/lottie-animation-container.js +31 -0
- package/dist/components/lottie-animations/animation-data/access-denied.js +3980 -0
- package/dist/components/lottie-animations/animation-data/active.js +825 -0
- package/dist/components/lottie-animations/animation-data/bar-chart.js +610 -0
- package/dist/components/lottie-animations/animation-data/chart-loading.js +5368 -0
- package/dist/components/lottie-animations/animation-data/cloud-download.js +1660 -0
- package/dist/components/lottie-animations/animation-data/cloud-sync.js +932 -0
- package/dist/components/lottie-animations/animation-data/coud-upload.js +7060 -0
- package/dist/components/lottie-animations/animation-data/cross-throb.js +1506 -0
- package/dist/components/lottie-animations/animation-data/dashboard-loading.js +14330 -0
- package/dist/components/lottie-animations/animation-data/error-spread-out.js +5567 -0
- package/dist/components/lottie-animations/animation-data/error.js +1211 -0
- package/dist/components/lottie-animations/animation-data/green-success.js +14826 -0
- package/dist/components/lottie-animations/animation-data/inactive.js +723 -0
- package/dist/components/lottie-animations/animation-data/light.js +2678 -0
- package/dist/components/lottie-animations/animation-data/lock.js +900 -0
- package/dist/components/lottie-animations/animation-data/lock2.js +1686 -0
- package/dist/components/lottie-animations/animation-data/locked.js +641 -0
- package/dist/components/lottie-animations/animation-data/search-error.js +954 -0
- package/dist/components/lottie-animations/animation-data/security.js +4121 -0
- package/dist/components/lottie-animations/animation-data/success.js +404 -0
- package/dist/components/lottie-animations/animation-data/verification-in-progress.js +10138 -0
- package/dist/components/lottie-animations/animation-data/warning.js +843 -0
- package/dist/components/lottie-animations/verification-in-progress/verification-in-progress.js +19 -0
- package/dist/components/markdown-content/markdown-content.components.js +114 -0
- package/dist/components/markdown-content/markdown-content.js +39 -0
- package/dist/components/menu/menu.js +19 -0
- package/dist/components/monospace-content/monospace-content.js +80 -0
- package/dist/components/nav-bar/nav-bar-details-panel.js +51 -0
- package/dist/components/nav-bar/nav-bar-mobile-menu.js +105 -0
- package/dist/components/nav-bar/nav-bar.js +449 -0
- package/dist/components/nav-bar/use-nav-bar-overflow.js +74 -0
- package/dist/components/nav-bar/use-nav-bar-scroll.js +42 -0
- package/dist/components/overflow-badge-list/overflow-badge-list.js +58 -0
- package/dist/components/page-container/page-container-skeleton.js +72 -0
- package/dist/components/page-container/page-container.js +93 -0
- package/dist/components/pagination/pagination.js +96 -0
- package/dist/components/pagination/pagination.props.js +16 -0
- package/dist/components/progress-bar/progress-bar.js +106 -0
- package/dist/components/radio-group/radio-group.js +41 -0
- package/dist/components/requirement-list/requirement-list.js +83 -0
- package/dist/components/scrollable-sections/scrollable-sections.js +270 -0
- package/dist/components/search-box/search-box.js +54 -0
- package/dist/components/search-field-shell.js +24 -0
- package/dist/components/selectable-card-list/checkbox-card-list.js +85 -0
- package/dist/components/selectable-card-list/radio-card-list.js +99 -0
- package/dist/components/selectable-card-list/selectable-card-list-shared.js +135 -0
- package/dist/components/selectable-card-list/selectable-card-list.js +34 -0
- package/dist/components/sidebar/sidebar.js +344 -0
- package/dist/components/sidebar/types.js +6 -0
- package/dist/components/simple-clickable-card/simple-clickable-card-shared.js +309 -0
- package/dist/components/simple-clickable-card/simple-clickable-card.js +106 -0
- package/dist/components/simple-info-card/simple-info-card.js +154 -0
- package/dist/components/simple-list/simple-list.js +146 -0
- package/dist/components/simple-paginated-list/simple-paginated-list.js +178 -0
- package/dist/components/simplified-date/simplified-date.js +56 -0
- package/dist/components/skeletons/table-skeleton.js +16 -0
- package/dist/components/spinner/spinner.js +25 -0
- package/dist/components/stat-card/stat-card.js +206 -0
- package/dist/components/status-badge/status-badge.js +108 -0
- package/dist/components/status-card-list/status-card-list.js +282 -0
- package/dist/components/tag/tag.js +144 -0
- package/dist/components/tag-input/tag-input.js +161 -0
- package/dist/components/text-effects/glitch-effect/glitch-text.js +115 -0
- package/dist/components/text-effects/gradient-text/gradient-text.js +32 -0
- package/dist/components/text-effects/highlight-text/highlight-text.js +35 -0
- package/dist/components/text-effects/parse-text-markup.js +53 -0
- package/dist/components/text-effects/shimmer-text/shimmer-text.js +67 -0
- package/dist/components/time-picker/time-picker.js +23 -0
- package/dist/components/toast/toast.js +126 -0
- package/dist/components/togglable-items-list/togglable-items-list.js +28 -0
- package/dist/components/tooltip/tooltip.js +21 -0
- package/dist/components/transfer-list/transfer-list.js +413 -0
- package/dist/components/truncated-line-with-tooltip/truncated-line-with-tooltip.js +61 -0
- package/dist/components/typography/typography-variants.js +41 -0
- package/dist/components/typography/typography.js +15 -0
- package/dist/components/user-type-badge/user-type-badge.js +40 -0
- package/dist/components/user-type-badge/user-type-badge.registry.js +17 -0
- package/dist/components/vertical-stepper/vertical-stepper.js +171 -0
- package/dist/core/alert.js +33 -0
- package/dist/core/animate-ui/components/animate/code-header.js +30 -0
- package/dist/core/animate-ui/components/animate/code.js +35 -0
- package/dist/core/animate-ui/components/animate/tabs.js +188 -0
- package/dist/core/animate-ui/components/animate/tooltip.js +39 -0
- package/dist/core/animate-ui/components/base/preview-card.js +29 -0
- package/dist/core/animate-ui/components/base/progress.js +32 -0
- package/dist/core/animate-ui/components/base/radio.js +24 -0
- package/dist/core/animate-ui/components/buttons/copy.js +95 -0
- package/dist/core/animate-ui/components/radix/accordion.js +36 -0
- package/dist/core/animate-ui/components/radix/dialog.js +60 -0
- package/dist/core/animate-ui/components/radix/dropdown-menu.js +129 -0
- package/dist/core/animate-ui/components/radix/sheet.js +110 -0
- package/dist/core/animate-ui/components/radix/sidebar.js +416 -0
- package/dist/core/animate-ui/components/radix/switch.js +34 -0
- package/dist/core/animate-ui/components/radix/toggle-group.js +115 -0
- package/dist/core/animate-ui/components/radix/toggle.js +24 -0
- package/dist/core/animate-ui/primitives/animate/code-block.js +131 -0
- package/dist/core/animate-ui/primitives/animate/escape-html.js +7 -0
- package/dist/core/animate-ui/primitives/animate/shiki-highlighter.js +64 -0
- package/dist/core/animate-ui/primitives/animate/slot.js +39 -0
- package/dist/core/animate-ui/primitives/animate/tabs.js +202 -0
- package/dist/core/animate-ui/primitives/animate/tooltip.js +351 -0
- package/dist/core/animate-ui/primitives/base/preview-card.js +107 -0
- package/dist/core/animate-ui/primitives/base/progress.js +60 -0
- package/dist/core/animate-ui/primitives/base/radio.js +83 -0
- package/dist/core/animate-ui/primitives/buttons/button.js +15 -0
- package/dist/core/animate-ui/primitives/effects/highlight.js +407 -0
- package/dist/core/animate-ui/primitives/radix/accordion.js +76 -0
- package/dist/core/animate-ui/primitives/radix/dialog.js +136 -0
- package/dist/core/animate-ui/primitives/radix/dropdown-menu.js +305 -0
- package/dist/core/animate-ui/primitives/radix/sheet.js +165 -0
- package/dist/core/animate-ui/primitives/radix/switch.js +86 -0
- package/dist/core/animate-ui/primitives/radix/toggle-group.js +100 -0
- package/dist/core/animate-ui/primitives/texts/counting-number.js +75 -0
- package/dist/core/avatar.js +32 -0
- package/dist/core/badge.js +27 -0
- package/dist/core/breadcrumb.js +62 -0
- package/dist/core/button/button.js +43 -0
- package/dist/core/button/craft-button.js +78 -0
- package/dist/core/button-group.js +38 -0
- package/dist/core/button.js +40 -0
- package/dist/core/card.js +42 -0
- package/dist/core/carousel/carousel.js +149 -0
- package/dist/core/checkbox/motion-checkbox.js +103 -0
- package/dist/core/collapsible.js +54 -0
- package/dist/core/combobox/combobox.js +85 -0
- package/dist/core/command.js +61 -0
- package/dist/core/field-end-icons.js +36 -0
- package/dist/core/field-label-row.js +33 -0
- package/dist/core/form.js +92 -0
- package/dist/core/hooks/use-controlled-state.js +27 -0
- package/dist/core/hooks/use-data-state.js +39 -0
- package/dist/core/hooks/use-is-in-view.js +18 -0
- package/dist/core/hooks/use-mobile.js +19 -0
- package/dist/core/hooks/use-reveal-on-scroll-up.js +141 -0
- package/dist/core/hooks/use-scroll-overflow.js +50 -0
- package/dist/core/index.js +18 -52
- package/dist/core/input/input-password.js +30 -0
- package/dist/core/input/input.js +147 -0
- package/dist/core/input-otp/input-otp.js +183 -0
- package/dist/core/label.js +15 -0
- package/dist/core/popover.js +31 -0
- package/dist/core/scroll-area.js +42 -0
- package/dist/core/select.js +121 -0
- package/dist/core/separator.js +40 -0
- package/dist/core/skeleton.js +11 -0
- package/dist/core/table.js +59 -0
- package/dist/core/textarea/textarea.js +97 -0
- package/dist/core/utils/get-strict-context.js +18 -0
- package/dist/index.js +148 -9
- package/dist/layouts/entry-layout/entry-layout-bg.js +4 -0
- package/dist/layouts/entry-layout/entry-layout.js +52 -0
- package/dist/layouts/index.js +7 -6
- package/dist/layouts/workspace-layout/account-menu/account-menu.js +108 -0
- package/dist/layouts/workspace-layout/breadcrumbs/derive-breadcrumbs.js +37 -0
- package/dist/layouts/workspace-layout/breadcrumbs/workspace-breadcrumbs.js +22 -0
- package/dist/layouts/workspace-layout/footer/footer.js +15 -0
- package/dist/layouts/workspace-layout/header/header.js +54 -0
- package/dist/layouts/workspace-layout/workspace-layout.js +157 -0
- package/dist/tailwind-preset.js +3 -4
- package/dist/utils/cn.js +8 -0
- package/dist/utils/color.js +72 -0
- package/dist/utils/index.js +3 -2
- package/dist/utils/path-match.js +17 -0
- package/dist/utils/silver-shine.js +63 -0
- package/dist/utils/variant-gradient-underlay.js +45 -0
- package/dist/utils/variant.js +426 -0
- package/package.json +7 -4
- package/dist/chunk-2GDYZAKR.js +0 -505
- package/dist/chunk-ALCWXFUC.js +0 -733
- package/dist/chunk-CDHBLANU.js +0 -59
- package/dist/chunk-LUESSJAF.js +0 -70068
- package/dist/chunk-TMORRNEB.js +0 -323
- package/dist/chunk-TRTQSARU.js +0 -31
- package/dist/chunk-VU4CZ76T.js +0 -43
- package/dist/chunk-XNLCVHBC.js +0 -364
- package/dist/chunk-Z4776NRY.js +0 -4347
- package/src/assets/illustrations/add-to-group.svg +0 -32
- package/src/assets/illustrations/chip.svg +0 -51
- package/src/assets/illustrations/create-new-group.svg +0 -27
- package/src/assets/illustrations/new-ota.svg +0 -61
- package/src/assets/illustrations/secured-key.svg +0 -48
- /package/dist/assets/{entry-layout-bg-JPI7GJ42.webp → entry-layout-bg-DUM0UhT3.webp} +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../utils/cn.js";
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area";
|
|
6
|
+
//#region src/core/scroll-area.tsx
|
|
7
|
+
/**
|
|
8
|
+
* True when a horizontal `ScrollBar` is passed as a direct child, the pattern
|
|
9
|
+
* used before `orientation` existed; such areas keep growing horizontally.
|
|
10
|
+
*/
|
|
11
|
+
function hasHorizontalScrollBarChild(children) {
|
|
12
|
+
return React$1.Children.toArray(children).some((child) => React$1.isValidElement(child) && child.type === ScrollBar && child.props.orientation === "horizontal");
|
|
13
|
+
}
|
|
14
|
+
var ScrollArea = React$1.forwardRef(({ className, children, orientation = "vertical", ...props }, ref) => {
|
|
15
|
+
const scrollsX = orientation !== "vertical" || hasHorizontalScrollBarChild(children);
|
|
16
|
+
const scrollsY = orientation !== "horizontal";
|
|
17
|
+
return /* @__PURE__ */ jsxs(ScrollAreaPrimitive.Root, {
|
|
18
|
+
ref,
|
|
19
|
+
className: cn("relative overflow-hidden", className),
|
|
20
|
+
...props,
|
|
21
|
+
children: [
|
|
22
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Viewport, {
|
|
23
|
+
className: cn("h-full w-full rounded-[inherit]", !scrollsX && "[&>div]:block!"),
|
|
24
|
+
children
|
|
25
|
+
}),
|
|
26
|
+
scrollsY && /* @__PURE__ */ jsx(ScrollBar, {}),
|
|
27
|
+
orientation !== "vertical" && /* @__PURE__ */ jsx(ScrollBar, { orientation: "horizontal" }),
|
|
28
|
+
/* @__PURE__ */ jsx(ScrollAreaPrimitive.Corner, {})
|
|
29
|
+
]
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
ScrollArea.displayName = ScrollAreaPrimitive.Root.displayName;
|
|
33
|
+
var ScrollBar = React$1.forwardRef(({ className, orientation = "vertical", ...props }, ref) => /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaScrollbar, {
|
|
34
|
+
ref,
|
|
35
|
+
orientation,
|
|
36
|
+
className: cn("flex touch-none select-none transition-colors", orientation === "vertical" && "h-full w-2.5 border-l border-l-transparent p-[1px]", orientation === "horizontal" && "h-2.5 flex-col border-t border-t-transparent p-[1px]", className),
|
|
37
|
+
...props,
|
|
38
|
+
children: /* @__PURE__ */ jsx(ScrollAreaPrimitive.ScrollAreaThumb, { className: "relative flex-1 rounded-full bg-border" })
|
|
39
|
+
}));
|
|
40
|
+
ScrollBar.displayName = ScrollAreaPrimitive.ScrollAreaScrollbar.displayName;
|
|
41
|
+
//#endregion
|
|
42
|
+
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { cn } from "../utils/cn.js";
|
|
2
|
+
import { FieldLabelRow, fieldHintClassName } from "./field-label-row.js";
|
|
3
|
+
import * as React$1 from "react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Check, ChevronDown, ChevronUp } from "lucide-react";
|
|
6
|
+
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
7
|
+
//#region src/core/select.tsx
|
|
8
|
+
var Select = SelectPrimitive.Root;
|
|
9
|
+
var SelectGroup = SelectPrimitive.Group;
|
|
10
|
+
var SelectValue = SelectPrimitive.Value;
|
|
11
|
+
var triggerSizeClasses = {
|
|
12
|
+
sm: "h-8 px-3 text-xs",
|
|
13
|
+
default: "h-10 px-3.5 py-2 text-base md:text-sm",
|
|
14
|
+
lg: "h-12 px-5 text-lg"
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Fixed 16px like the decorators inside `Input` (`startIcon` / `endIcon`
|
|
18
|
+
* are rendered at `size={16}` at every input size), so a Select next to an
|
|
19
|
+
* Input shows matching icon dimensions whatever `size` they share.
|
|
20
|
+
*/
|
|
21
|
+
var triggerIconClassName = "size-4 shrink-0 opacity-50";
|
|
22
|
+
var SelectTrigger = React$1.forwardRef(({ className, children, size = "default", label, required, hintContent, error, errorContent, id, "aria-describedby": ariaDescribedBy, ...props }, ref) => {
|
|
23
|
+
const autoId = React$1.useId();
|
|
24
|
+
const hasEnhancedProps = label !== void 0 || required !== void 0 || hintContent !== void 0 || error !== void 0 || errorContent !== void 0;
|
|
25
|
+
const hasError = error || !!errorContent;
|
|
26
|
+
const triggerId = id ?? (hasEnhancedProps ? autoId : void 0);
|
|
27
|
+
const errorId = errorContent ? `${triggerId}-error` : void 0;
|
|
28
|
+
const describedBy = [ariaDescribedBy, errorId].filter(Boolean).join(" ") || void 0;
|
|
29
|
+
const trigger = /* @__PURE__ */ jsxs(SelectPrimitive.Trigger, {
|
|
30
|
+
ref,
|
|
31
|
+
id: triggerId,
|
|
32
|
+
"aria-required": required || void 0,
|
|
33
|
+
"aria-invalid": hasError || void 0,
|
|
34
|
+
"aria-describedby": describedBy,
|
|
35
|
+
className: cn("flex w-full items-center justify-between whitespace-nowrap rounded-md border border-input bg-background ring-offset-background transition-[box-shadow,border-color] duration-200 ease-in-out data-[placeholder]:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1", triggerSizeClasses[size], hasError && "border-destructive focus-visible:ring-destructive", className),
|
|
36
|
+
...props,
|
|
37
|
+
children: [children, /* @__PURE__ */ jsx(SelectPrimitive.Icon, {
|
|
38
|
+
asChild: true,
|
|
39
|
+
children: /* @__PURE__ */ jsx(ChevronDown, {
|
|
40
|
+
"data-slot": "select-icon",
|
|
41
|
+
className: triggerIconClassName
|
|
42
|
+
})
|
|
43
|
+
})]
|
|
44
|
+
});
|
|
45
|
+
if (!hasEnhancedProps) return trigger;
|
|
46
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
47
|
+
className: "space-y-2 flex-1",
|
|
48
|
+
children: [
|
|
49
|
+
label && /* @__PURE__ */ jsx(FieldLabelRow, {
|
|
50
|
+
htmlFor: triggerId,
|
|
51
|
+
label,
|
|
52
|
+
required,
|
|
53
|
+
hintContent
|
|
54
|
+
}),
|
|
55
|
+
!label && hintContent && /* @__PURE__ */ jsx("span", {
|
|
56
|
+
className: fieldHintClassName,
|
|
57
|
+
children: hintContent
|
|
58
|
+
}),
|
|
59
|
+
trigger,
|
|
60
|
+
errorContent && /* @__PURE__ */ jsx("div", {
|
|
61
|
+
id: errorId,
|
|
62
|
+
className: "text-sm text-destructive",
|
|
63
|
+
children: errorContent
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
SelectTrigger.displayName = SelectPrimitive.Trigger.displayName;
|
|
69
|
+
var SelectScrollUpButton = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.ScrollUpButton, {
|
|
70
|
+
ref,
|
|
71
|
+
className: cn("flex cursor-default items-center justify-center py-1.5", className),
|
|
72
|
+
...props,
|
|
73
|
+
children: /* @__PURE__ */ jsx(ChevronUp, { className: "h-4 w-4" })
|
|
74
|
+
}));
|
|
75
|
+
SelectScrollUpButton.displayName = SelectPrimitive.ScrollUpButton.displayName;
|
|
76
|
+
var SelectScrollDownButton = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.ScrollDownButton, {
|
|
77
|
+
ref,
|
|
78
|
+
className: cn("flex cursor-default items-center justify-center py-1.5", className),
|
|
79
|
+
...props,
|
|
80
|
+
children: /* @__PURE__ */ jsx(ChevronDown, { className: "h-4 w-4" })
|
|
81
|
+
}));
|
|
82
|
+
SelectScrollDownButton.displayName = SelectPrimitive.ScrollDownButton.displayName;
|
|
83
|
+
var SelectContent = React$1.forwardRef(({ className, children, position = "popper", ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Portal, { children: /* @__PURE__ */ jsxs(SelectPrimitive.Content, {
|
|
84
|
+
ref,
|
|
85
|
+
className: cn("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-2xl border bg-popover px-1.5 py-2 text-popover-foreground shadow-lg outline-none will-change-[opacity,transform] select-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]", position === "popper" && "data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1", className),
|
|
86
|
+
position,
|
|
87
|
+
...props,
|
|
88
|
+
children: [
|
|
89
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
90
|
+
/* @__PURE__ */ jsx(SelectPrimitive.Viewport, {
|
|
91
|
+
className: cn("p-0", position === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),
|
|
92
|
+
children
|
|
93
|
+
}),
|
|
94
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
95
|
+
]
|
|
96
|
+
}) }));
|
|
97
|
+
SelectContent.displayName = SelectPrimitive.Content.displayName;
|
|
98
|
+
var SelectLabel = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Label, {
|
|
99
|
+
ref,
|
|
100
|
+
className: cn("px-2.5 py-2 text-sm font-semibold", className),
|
|
101
|
+
...props
|
|
102
|
+
}));
|
|
103
|
+
SelectLabel.displayName = SelectPrimitive.Label.displayName;
|
|
104
|
+
var SelectItem = React$1.forwardRef(({ className, children, ...props }, ref) => /* @__PURE__ */ jsxs(SelectPrimitive.Item, {
|
|
105
|
+
ref,
|
|
106
|
+
className: cn("relative flex w-full cursor-default select-none items-center rounded-sm py-2 pl-2.5 pr-9 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50", className),
|
|
107
|
+
...props,
|
|
108
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
109
|
+
className: "absolute right-2.5 flex h-3.5 w-3.5 items-center justify-center",
|
|
110
|
+
children: /* @__PURE__ */ jsx(SelectPrimitive.ItemIndicator, { children: /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) })
|
|
111
|
+
}), /* @__PURE__ */ jsx(SelectPrimitive.ItemText, { children })]
|
|
112
|
+
}));
|
|
113
|
+
SelectItem.displayName = SelectPrimitive.Item.displayName;
|
|
114
|
+
var SelectSeparator = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx(SelectPrimitive.Separator, {
|
|
115
|
+
ref,
|
|
116
|
+
className: cn("-mx-1.5 my-1.5 h-px bg-muted", className),
|
|
117
|
+
...props
|
|
118
|
+
}));
|
|
119
|
+
SelectSeparator.displayName = SelectPrimitive.Separator.displayName;
|
|
120
|
+
//#endregion
|
|
121
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { cn } from "../utils/cn.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
5
|
+
//#region src/core/separator.tsx
|
|
6
|
+
var Separator = React$1.forwardRef(({ className, orientation = "horizontal", decorative = true, label, stackLabel = false, labelClassName, ...props }, ref) => {
|
|
7
|
+
if (!label) return /* @__PURE__ */ jsx(SeparatorPrimitive.Root, {
|
|
8
|
+
ref,
|
|
9
|
+
decorative,
|
|
10
|
+
orientation,
|
|
11
|
+
className: cn("shrink-0 bg-border", orientation === "horizontal" ? "h-[1px] w-full" : "h-full w-[1px]", className),
|
|
12
|
+
...props
|
|
13
|
+
});
|
|
14
|
+
const isHorizontal = orientation === "horizontal";
|
|
15
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
16
|
+
ref,
|
|
17
|
+
role: "separator",
|
|
18
|
+
"aria-orientation": orientation,
|
|
19
|
+
"data-orientation": orientation,
|
|
20
|
+
className: cn("flex items-center gap-3", isHorizontal ? "w-full" : "flex-col h-full", className),
|
|
21
|
+
...props,
|
|
22
|
+
children: [
|
|
23
|
+
/* @__PURE__ */ jsx("div", {
|
|
24
|
+
"aria-hidden": "true",
|
|
25
|
+
className: cn("shrink-0 bg-border flex-1", isHorizontal ? "h-[1px]" : "w-[1px]")
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ jsx("span", {
|
|
28
|
+
className: cn("text-xs font-medium text-muted-foreground shrink-0 select-none", !isHorizontal && stackLabel && "[writing-mode:vertical-lr] [text-orientation:upright]", labelClassName),
|
|
29
|
+
children: label
|
|
30
|
+
}),
|
|
31
|
+
/* @__PURE__ */ jsx("div", {
|
|
32
|
+
"aria-hidden": "true",
|
|
33
|
+
className: cn("shrink-0 bg-border flex-1", isHorizontal ? "h-[1px]" : "w-[1px]")
|
|
34
|
+
})
|
|
35
|
+
]
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
Separator.displayName = "Separator";
|
|
39
|
+
//#endregion
|
|
40
|
+
export { Separator };
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { cn } from "../utils/cn.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/core/skeleton.tsx
|
|
4
|
+
function Skeleton({ className, ...props }) {
|
|
5
|
+
return /* @__PURE__ */ jsx("div", {
|
|
6
|
+
className: cn("animate-pulse rounded-md bg-primary/10", className),
|
|
7
|
+
...props
|
|
8
|
+
});
|
|
9
|
+
}
|
|
10
|
+
//#endregion
|
|
11
|
+
export { Skeleton };
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { cn } from "../utils/cn.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/core/table.tsx
|
|
5
|
+
var Table = React$1.forwardRef(({ className, containerRef, containerClassName, ...props }, ref) => /* @__PURE__ */ jsx("div", {
|
|
6
|
+
ref: containerRef,
|
|
7
|
+
"data-slot": "table-container",
|
|
8
|
+
className: cn("relative w-full overflow-auto", containerClassName),
|
|
9
|
+
children: /* @__PURE__ */ jsx("table", {
|
|
10
|
+
ref,
|
|
11
|
+
className: cn("w-full caption-bottom text-sm", className),
|
|
12
|
+
...props
|
|
13
|
+
})
|
|
14
|
+
}));
|
|
15
|
+
Table.displayName = "Table";
|
|
16
|
+
var TableHeader = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("thead", {
|
|
17
|
+
ref,
|
|
18
|
+
className: cn("[&_tr]:border-b", className),
|
|
19
|
+
...props
|
|
20
|
+
}));
|
|
21
|
+
TableHeader.displayName = "TableHeader";
|
|
22
|
+
var TableBody = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tbody", {
|
|
23
|
+
ref,
|
|
24
|
+
className: cn("[&_tr:last-child]:border-0", className),
|
|
25
|
+
...props
|
|
26
|
+
}));
|
|
27
|
+
TableBody.displayName = "TableBody";
|
|
28
|
+
var TableFooter = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tfoot", {
|
|
29
|
+
ref,
|
|
30
|
+
className: cn("border-t bg-muted/50 font-medium [&>tr]:last:border-b-0", className),
|
|
31
|
+
...props
|
|
32
|
+
}));
|
|
33
|
+
TableFooter.displayName = "TableFooter";
|
|
34
|
+
var TableRow = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("tr", {
|
|
35
|
+
ref,
|
|
36
|
+
className: cn("border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted", className),
|
|
37
|
+
...props
|
|
38
|
+
}));
|
|
39
|
+
TableRow.displayName = "TableRow";
|
|
40
|
+
var TableHead = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("th", {
|
|
41
|
+
ref,
|
|
42
|
+
className: cn("h-10 px-2 text-left align-middle font-medium text-muted-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
|
|
43
|
+
...props
|
|
44
|
+
}));
|
|
45
|
+
TableHead.displayName = "TableHead";
|
|
46
|
+
var TableCell = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("td", {
|
|
47
|
+
ref,
|
|
48
|
+
className: cn("p-2 align-middle [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]", className),
|
|
49
|
+
...props
|
|
50
|
+
}));
|
|
51
|
+
TableCell.displayName = "TableCell";
|
|
52
|
+
var TableCaption = React$1.forwardRef(({ className, ...props }, ref) => /* @__PURE__ */ jsx("caption", {
|
|
53
|
+
ref,
|
|
54
|
+
className: cn("mt-4 text-sm text-muted-foreground", className),
|
|
55
|
+
...props
|
|
56
|
+
}));
|
|
57
|
+
TableCaption.displayName = "TableCaption";
|
|
58
|
+
//#endregion
|
|
59
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import { cn } from "../../utils/cn.js";
|
|
2
|
+
import * as React$1 from "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/core/textarea/textarea.tsx
|
|
5
|
+
var labelClasses = "flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50";
|
|
6
|
+
var sizeClasses = {
|
|
7
|
+
sm: "min-h-[60px] px-2 py-1.5 text-xs",
|
|
8
|
+
default: "min-h-[80px] px-3 py-2 text-base md:text-sm",
|
|
9
|
+
lg: "min-h-[100px] px-4 py-3 text-lg"
|
|
10
|
+
};
|
|
11
|
+
var Textarea = React$1.forwardRef(({ className, label, size = "default", hintContent, error, errorContent, charLimit, onChange, value, defaultValue, id, required, placeholder, ...restProps }, ref) => {
|
|
12
|
+
const autoId = React$1.useId();
|
|
13
|
+
const textareaId = id || autoId;
|
|
14
|
+
const [charCount, setCharCount] = React$1.useState(() => {
|
|
15
|
+
if (charLimit === void 0) return 0;
|
|
16
|
+
if (typeof value === "string") return value.length;
|
|
17
|
+
if (typeof defaultValue === "string") return defaultValue.length;
|
|
18
|
+
return 0;
|
|
19
|
+
});
|
|
20
|
+
React$1.useEffect(() => {
|
|
21
|
+
if (charLimit !== void 0 && typeof value === "string") setCharCount(value.length);
|
|
22
|
+
}, [value, charLimit]);
|
|
23
|
+
const hasEnhancedProps = label !== void 0 || hintContent !== void 0 || error !== void 0 || errorContent !== void 0 || charLimit !== void 0;
|
|
24
|
+
const hasError = error || !!errorContent;
|
|
25
|
+
const effectiveSize = size || "default";
|
|
26
|
+
const handleChange = (e) => {
|
|
27
|
+
if (charLimit !== void 0) setCharCount(e.target.value.length);
|
|
28
|
+
onChange?.(e);
|
|
29
|
+
};
|
|
30
|
+
const textareaElement = /* @__PURE__ */ jsx("textarea", {
|
|
31
|
+
id: textareaId,
|
|
32
|
+
ref,
|
|
33
|
+
className: cn("flex w-full rounded-md border border-input bg-background ring-offset-background transition-[box-shadow,border-color] duration-200 ease-in-out placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 resize-y", sizeClasses[effectiveSize], hasError && "border-destructive focus-visible:ring-destructive", className),
|
|
34
|
+
required,
|
|
35
|
+
"aria-invalid": hasError || void 0,
|
|
36
|
+
"aria-describedby": errorContent ? `${textareaId}-error` : void 0,
|
|
37
|
+
onChange: handleChange,
|
|
38
|
+
value,
|
|
39
|
+
defaultValue,
|
|
40
|
+
maxLength: charLimit,
|
|
41
|
+
placeholder,
|
|
42
|
+
...restProps
|
|
43
|
+
});
|
|
44
|
+
if (!hasEnhancedProps) return /* @__PURE__ */ jsx("textarea", {
|
|
45
|
+
ref,
|
|
46
|
+
id,
|
|
47
|
+
className: cn("flex min-h-[60px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background transition-[box-shadow,border-color] duration-200 ease-in-out placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm resize-y", className),
|
|
48
|
+
required,
|
|
49
|
+
placeholder,
|
|
50
|
+
value,
|
|
51
|
+
defaultValue,
|
|
52
|
+
onChange,
|
|
53
|
+
...restProps
|
|
54
|
+
});
|
|
55
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
56
|
+
className: "space-y-2 flex-1",
|
|
57
|
+
children: [
|
|
58
|
+
label != null && /* @__PURE__ */ jsxs("div", {
|
|
59
|
+
className: "flex items-center justify-between",
|
|
60
|
+
children: [/* @__PURE__ */ jsxs("label", {
|
|
61
|
+
htmlFor: textareaId,
|
|
62
|
+
className: labelClasses,
|
|
63
|
+
children: [label, required && /* @__PURE__ */ jsx("span", {
|
|
64
|
+
className: "text-destructive",
|
|
65
|
+
children: "*"
|
|
66
|
+
})]
|
|
67
|
+
}), hintContent != null && /* @__PURE__ */ jsx("span", {
|
|
68
|
+
className: "text-sm text-muted-foreground",
|
|
69
|
+
children: hintContent
|
|
70
|
+
})]
|
|
71
|
+
}),
|
|
72
|
+
!label && hintContent != null && /* @__PURE__ */ jsx("span", {
|
|
73
|
+
className: "text-sm text-muted-foreground",
|
|
74
|
+
children: hintContent
|
|
75
|
+
}),
|
|
76
|
+
/* @__PURE__ */ jsxs("div", {
|
|
77
|
+
className: "relative",
|
|
78
|
+
children: [textareaElement, charLimit !== void 0 && /* @__PURE__ */ jsxs("div", {
|
|
79
|
+
className: "absolute bottom-2 end-2 text-xs tabular-nums text-muted-foreground pointer-events-none",
|
|
80
|
+
children: [
|
|
81
|
+
charCount,
|
|
82
|
+
"/",
|
|
83
|
+
charLimit
|
|
84
|
+
]
|
|
85
|
+
})]
|
|
86
|
+
}),
|
|
87
|
+
errorContent != null && /* @__PURE__ */ jsx("div", {
|
|
88
|
+
id: `${textareaId}-error`,
|
|
89
|
+
className: "text-sm text-destructive",
|
|
90
|
+
children: errorContent
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
});
|
|
94
|
+
});
|
|
95
|
+
Textarea.displayName = "Textarea";
|
|
96
|
+
//#endregion
|
|
97
|
+
export { Textarea };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
//#region src/core/utils/get-strict-context.tsx
|
|
4
|
+
function getStrictContext(name) {
|
|
5
|
+
const Context = React$1.createContext(void 0);
|
|
6
|
+
const Provider = ({ value, children }) => /* @__PURE__ */ jsx(Context.Provider, {
|
|
7
|
+
value,
|
|
8
|
+
children
|
|
9
|
+
});
|
|
10
|
+
const useSafeContext = () => {
|
|
11
|
+
const ctx = React$1.useContext(Context);
|
|
12
|
+
if (ctx === void 0) throw new Error(`useContext must be used within ${name ?? "a Provider"}`);
|
|
13
|
+
return ctx;
|
|
14
|
+
};
|
|
15
|
+
return [Provider, useSafeContext];
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { getStrictContext };
|
package/dist/index.js
CHANGED
|
@@ -1,9 +1,148 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
import
|
|
1
|
+
import { cn } from "./utils/cn.js";
|
|
2
|
+
import { PRESET_GRADIENT_BACKDROP, PRESET_GRADIENT_FRAME, VARIANTS, VARIANT_GRADIENT_BACKDROP_BASE, VARIANT_GRADIENT_DURATION_CLASS, VARIANT_GRADIENT_HOVER_OVERLAY_CLASS, VARIANT_GRADIENT_TRANSITION_DURATION_MS, arbitraryGradientBackgroundImage, resolveVariantStyles } from "./utils/variant.js";
|
|
3
|
+
import { useControlledState } from "./core/hooks/use-controlled-state.js";
|
|
4
|
+
import { Accordion } from "./components/accordion/accordion.js";
|
|
5
|
+
import Avatar from "./components/avatar/avatar.js";
|
|
6
|
+
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger } from "./core/animate-ui/components/radix/dropdown-menu.js";
|
|
7
|
+
import { LIST_CLASS_NAMES } from "./components/list/list.props.js";
|
|
8
|
+
import { Collapsible, CollapsibleContent, CollapsibleTrigger } from "./core/collapsible.js";
|
|
9
|
+
import List from "./components/list/list.js";
|
|
10
|
+
import { Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle } from "./core/card.js";
|
|
11
|
+
import { SimpleCard } from "./components/cards/simple-card.js";
|
|
12
|
+
import { BasicDetailsCard } from "./components/cards/basic-details-card.js";
|
|
13
|
+
import { illustrationRegistry, illustrationsById, parseSvgViewBoxAspectRatio } from "./components/illustration/illustration-registry.js";
|
|
14
|
+
import { Illustration } from "./components/illustration/illustration.js";
|
|
15
|
+
import NoDataCard from "./components/cards/no-data-card/no-data-card.js";
|
|
16
|
+
import { CollapsibleCard } from "./components/cards/collapsible-card.js";
|
|
17
|
+
import { buttonVariants } from "./core/button.js";
|
|
18
|
+
import { Tooltip as Tooltip$1, TooltipContent, TooltipProvider, TooltipTrigger } from "./core/animate-ui/components/animate/tooltip.js";
|
|
19
|
+
import Tooltip from "./components/tooltip/tooltip.js";
|
|
20
|
+
import { Button } from "./components/button/button.js";
|
|
21
|
+
import { InvertButton } from "./components/button/invert-button.js";
|
|
22
|
+
import { FlashButton } from "./components/button/flash-button.js";
|
|
23
|
+
import { CopyButton } from "./core/animate-ui/components/buttons/copy.js";
|
|
24
|
+
import { SectionCard } from "./components/cards/section-card.js";
|
|
25
|
+
import { LottieAnimationContainer } from "./components/lottie-animation-container/lottie-animation-container.js";
|
|
26
|
+
import { animatedCardAnimations, animatedCardTypeKeys } from "./components/cards/animated-card/animated-card-animations.js";
|
|
27
|
+
import { AnimatedRainmakerLogo } from "./common/animated-rainmaker-logo/animated-rainmaker-logo.js";
|
|
28
|
+
import { AnimatedCard } from "./components/cards/animated-card/animated-card.js";
|
|
29
|
+
import { ScrollArea, ScrollBar } from "./core/scroll-area.js";
|
|
30
|
+
import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "./core/popover.js";
|
|
31
|
+
import { ListDetails } from "./components/list-details/list-details.js";
|
|
32
|
+
import Menu from "./components/menu/menu.js";
|
|
33
|
+
import { useIsMobile } from "./core/hooks/use-mobile.js";
|
|
34
|
+
import { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger } from "./core/animate-ui/components/radix/sheet.js";
|
|
35
|
+
import { NavBar } from "./components/nav-bar/nav-bar.js";
|
|
36
|
+
import { Input } from "./core/input/input.js";
|
|
37
|
+
import { InputPassword } from "./core/input/input-password.js";
|
|
38
|
+
import { Separator } from "./core/separator.js";
|
|
39
|
+
import { Skeleton } from "./core/skeleton.js";
|
|
40
|
+
import { Sidebar as Sidebar$1, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, useSidebar } from "./core/animate-ui/components/radix/sidebar.js";
|
|
41
|
+
import { isSidebarGroup } from "./components/sidebar/types.js";
|
|
42
|
+
import Sidebar from "./components/sidebar/sidebar.js";
|
|
43
|
+
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./core/select.js";
|
|
44
|
+
import { Tabs, TabsContent, TabsContents, TabsList, TabsTrigger } from "./core/animate-ui/components/animate/tabs.js";
|
|
45
|
+
import { ScrollableSections } from "./components/scrollable-sections/scrollable-sections.js";
|
|
46
|
+
import { Label } from "./core/label.js";
|
|
47
|
+
import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, useFormField } from "./core/form.js";
|
|
48
|
+
import { IconAvatar } from "./components/icon-avatar/icon-avatar.js";
|
|
49
|
+
import { TYPOGRAPHY_VARIANTS, typographyDefaultElement, typographyVariantClasses } from "./components/typography/typography-variants.js";
|
|
50
|
+
import { Typography } from "./components/typography/typography.js";
|
|
51
|
+
import { FileUpload } from "./components/file-upload/file-upload.js";
|
|
52
|
+
import { FileInput } from "./components/file-input/file-input.js";
|
|
53
|
+
import { Checkbox } from "./core/checkbox/motion-checkbox.js";
|
|
54
|
+
import { Switch } from "./core/animate-ui/components/radix/switch.js";
|
|
55
|
+
import { ToggleGroup, ToggleGroupItem } from "./core/animate-ui/components/radix/toggle-group.js";
|
|
56
|
+
import { RadioGroup } from "./components/radio-group/radio-group.js";
|
|
57
|
+
import { SelectableCardList } from "./components/selectable-card-list/selectable-card-list.js";
|
|
58
|
+
import { StatusCardList } from "./components/status-card-list/status-card-list.js";
|
|
59
|
+
import { VerticalStepper } from "./components/vertical-stepper/vertical-stepper.js";
|
|
60
|
+
import { Badge, badgeVariants } from "./core/badge.js";
|
|
61
|
+
import { Spinner } from "./components/spinner/spinner.js";
|
|
62
|
+
import { StatCard } from "./components/stat-card/stat-card.js";
|
|
63
|
+
import { ButtonGroup, ButtonGroupSeparator, ButtonGroupText, buttonGroupVariants } from "./core/button-group.js";
|
|
64
|
+
import { ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent } from "./components/chart/chart.js";
|
|
65
|
+
import { CHART_CATEGORY_COLORS, CHART_SERIES_COLORS, DEFAULT_CHART_SERIES_COLORS, buildSeriesChartConfig, getChartSeriesColor } from "./components/chart/chart-colors.js";
|
|
66
|
+
import { BarChart } from "./components/chart/bar-chart.js";
|
|
67
|
+
import { AreaChart } from "./components/chart/area-chart.js";
|
|
68
|
+
import { LineChart } from "./components/chart/line-chart.js";
|
|
69
|
+
import { ComposedChart } from "./components/chart/composed-chart.js";
|
|
70
|
+
import { DonutChart } from "./components/chart/donut-chart.js";
|
|
71
|
+
import { TreemapChart } from "./components/chart/treemap-chart.js";
|
|
72
|
+
import { InputOTP, InputOTPSeparator } from "./core/input-otp/input-otp.js";
|
|
73
|
+
import { Carousel } from "./components/carousel/carousel.js";
|
|
74
|
+
import { Textarea } from "./core/textarea/textarea.js";
|
|
75
|
+
import { AsyncCombobox } from "./core/combobox/combobox.js";
|
|
76
|
+
import { AsyncMultiSelect } from "./components/async-multi-select/async-multi-select.js";
|
|
77
|
+
import { Calendar, CalendarDayButton } from "./components/calendar/calendar.js";
|
|
78
|
+
import { DatePicker } from "./components/date-picker/date-picker.js";
|
|
79
|
+
import { TimePicker } from "./components/time-picker/time-picker.js";
|
|
80
|
+
import { DateTimePicker } from "./components/date-time-picker/date-time-picker.js";
|
|
81
|
+
import { PRESET_IDS, PRESET_LABELS, ROLLING_PRESET_IDS, computeDateRange } from "./components/date-range-picker/presets.js";
|
|
82
|
+
import { DateRangePicker } from "./components/date-range-picker/date-range-picker.js";
|
|
83
|
+
import { Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator } from "./core/breadcrumb.js";
|
|
84
|
+
import { SimplifiedDate } from "./components/simplified-date/simplified-date.js";
|
|
85
|
+
import { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow } from "./core/table.js";
|
|
86
|
+
import { Link } from "./components/link/link.js";
|
|
87
|
+
import SearchBox from "./components/search-box/search-box.js";
|
|
88
|
+
import FiltersBar from "./components/filters-bar/filters-bar.js";
|
|
89
|
+
import AdvancedSearchBox from "./components/advanced-search-box/advanced-search-box.js";
|
|
90
|
+
import { TogglableItemsList } from "./components/togglable-items-list/togglable-items-list.js";
|
|
91
|
+
import { Pagination } from "./components/pagination/pagination.js";
|
|
92
|
+
import { DEFAULT_PAGE_SIZE_OPTIONS } from "./components/pagination/pagination.props.js";
|
|
93
|
+
import { CopiableText } from "./components/copiable-text/copiable-text.js";
|
|
94
|
+
import { TableSkeleton } from "./components/skeletons/table-skeleton.js";
|
|
95
|
+
import { DataTable } from "./components/data-table/data-table.js";
|
|
96
|
+
import { DataTableRowActions } from "./components/data-table/row-actions.js";
|
|
97
|
+
import { DeviceIcon } from "./components/device-icon/device-icon.js";
|
|
98
|
+
import { userTypeBadgeRegistry, userTypeBadgeUserTypes } from "./components/user-type-badge/user-type-badge.registry.js";
|
|
99
|
+
import { UserTypeBadge, userTypeBadgeSizeVariants } from "./components/user-type-badge/user-type-badge.js";
|
|
100
|
+
import { StatusBadge, statusBadgeSizeVariants } from "./components/status-badge/status-badge.js";
|
|
101
|
+
import { Tag } from "./components/tag/tag.js";
|
|
102
|
+
import { TagInput } from "./components/tag-input/tag-input.js";
|
|
103
|
+
import { TransferList } from "./components/transfer-list/transfer-list.js";
|
|
104
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "./core/animate-ui/components/radix/dialog.js";
|
|
105
|
+
import { IconTextActionCard } from "./components/icon-text-action-card/icon-text-action-card.js";
|
|
106
|
+
import { Alert } from "./components/alert/alert.js";
|
|
107
|
+
import { ConfirmationDialog } from "./components/confirmation-dialog/confirmation-dialog.js";
|
|
108
|
+
import { PreviewCard, PreviewCardBackdrop, PreviewCardPanel, PreviewCardTrigger } from "./core/animate-ui/components/base/preview-card.js";
|
|
109
|
+
import { Code } from "./core/animate-ui/components/animate/code.js";
|
|
110
|
+
import { MonospaceContent } from "./components/monospace-content/monospace-content.js";
|
|
111
|
+
import { SimpleList } from "./components/simple-list/simple-list.js";
|
|
112
|
+
import { DynamicList } from "./components/dynamic-list/dynamic-list.js";
|
|
113
|
+
import { KeyValueManager } from "./components/key-value-manager/key-value-manager.js";
|
|
114
|
+
import { RequirementList } from "./components/requirement-list/requirement-list.js";
|
|
115
|
+
import { SimplePaginatedList } from "./components/simple-paginated-list/simple-paginated-list.js";
|
|
116
|
+
import { Toast, Toaster, toast } from "./components/toast/toast.js";
|
|
117
|
+
import { MarkdownContent } from "./components/markdown-content/markdown-content.js";
|
|
118
|
+
import { OverflowBadgeList } from "./components/overflow-badge-list/overflow-badge-list.js";
|
|
119
|
+
import { PopCollectionItem } from "./components/animated-containers/pop-collection-item.js";
|
|
120
|
+
import { FullscreenDialog } from "./components/fullscreen-dialog/fullscreen-dialog.js";
|
|
121
|
+
import { VerificationInProgress } from "./components/lottie-animations/verification-in-progress/verification-in-progress.js";
|
|
122
|
+
import { CircularProgress } from "./components/circular-progress/circular-progress.js";
|
|
123
|
+
import { ProgressBar } from "./components/progress-bar/progress-bar.js";
|
|
124
|
+
import { FullSizeError } from "./components/error-display/full-size-error/full-size-error.js";
|
|
125
|
+
import { InlineError } from "./components/error-display/inline-error/inline-error.js";
|
|
126
|
+
import { SimpleClickableCard } from "./components/simple-clickable-card/simple-clickable-card.js";
|
|
127
|
+
import { SimpleInfoCard } from "./components/simple-info-card/simple-info-card.js";
|
|
128
|
+
import { GlitchText } from "./components/text-effects/glitch-effect/glitch-text.js";
|
|
129
|
+
import { GradientText } from "./components/text-effects/gradient-text/gradient-text.js";
|
|
130
|
+
import { HighlightText } from "./components/text-effects/highlight-text/highlight-text.js";
|
|
131
|
+
import { ShimmeringText } from "./components/text-effects/shimmer-text/shimmer-text.js";
|
|
132
|
+
import { parseTextMarkup } from "./components/text-effects/parse-text-markup.js";
|
|
133
|
+
import { CodeEditor } from "./components/code-editor/code-editor.js";
|
|
134
|
+
import { ContentContainer } from "./components/content-container/content-container.js";
|
|
135
|
+
import PageContainer from "./components/page-container/page-container.js";
|
|
136
|
+
import PageContainerSkeleton from "./components/page-container/page-container-skeleton.js";
|
|
137
|
+
import AppLogo from "./common/app-logo/app-logo.js";
|
|
138
|
+
import ProfileCard from "./common/profile-card/profile-card.js";
|
|
139
|
+
import CopyrightCard from "./common/copyright-card/copyright-card.js";
|
|
140
|
+
import PageLoader from "./common/page-loader/page-loader.js";
|
|
141
|
+
import MyAccountMenu from "./common/my-account-menu/my-account-menu.js";
|
|
142
|
+
import FooterCard from "./common/footer-card/footer-card.js";
|
|
143
|
+
import Header from "./layouts/workspace-layout/header/header.js";
|
|
144
|
+
import Footer from "./layouts/workspace-layout/footer/footer.js";
|
|
145
|
+
import AccountMenu from "./layouts/workspace-layout/account-menu/account-menu.js";
|
|
146
|
+
import WorkspaceLayout from "./layouts/workspace-layout/workspace-layout.js";
|
|
147
|
+
import EntryLayout from "./layouts/entry-layout/entry-layout.js";
|
|
148
|
+
export { Accordion, AccountMenu, AdvancedSearchBox, Alert, AnimatedCard, AnimatedRainmakerLogo, AppLogo, AreaChart, AsyncCombobox, AsyncMultiSelect, Avatar, Badge, BarChart, BasicDetailsCard, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, ButtonGroup, ButtonGroupSeparator, ButtonGroupText, CHART_CATEGORY_COLORS, CHART_SERIES_COLORS, Calendar, CalendarDayButton, Card, CardContent, CardDescription, CardFooter, CardHeader, CardTitle, Carousel, ChartContainer, ChartLegend, ChartLegendContent, ChartStyle, ChartTooltip, ChartTooltipContent, Checkbox, CircularProgress, Code, CodeEditor, Collapsible, CollapsibleCard, CollapsibleContent, CollapsibleTrigger, ComposedChart, ConfirmationDialog, ContentContainer, CopiableText, CopyButton, CopyrightCard, DEFAULT_CHART_SERIES_COLORS, DEFAULT_PAGE_SIZE_OPTIONS, DataTable, DataTableRowActions, DatePicker, DateRangePicker, DateTimePicker, DeviceIcon, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, DonutChart, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, DynamicList, EntryLayout, FileInput, FileUpload, FiltersBar, FlashButton, FooterCard, Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage, FullSizeError, FullscreenDialog, GlitchText, GradientText, HighlightText, IconAvatar, IconTextActionCard, Illustration, InlineError, Input, InputOTP, InputOTPSeparator, InputPassword, InvertButton, KeyValueManager, LIST_CLASS_NAMES, Label, LineChart, Link, List, ListDetails, LottieAnimationContainer, MarkdownContent, Menu, MonospaceContent, MyAccountMenu, NavBar, NoDataCard, OverflowBadgeList, PRESET_GRADIENT_BACKDROP, PRESET_GRADIENT_FRAME, PRESET_IDS, PRESET_LABELS, PageContainer, PageContainerSkeleton, PageLoader, Pagination, PopCollectionItem, Popover, PopoverAnchor, PopoverContent, PopoverTrigger, PreviewCard, PreviewCardBackdrop, PreviewCardPanel, PreviewCardTrigger, ProfileCard, ProgressBar, ROLLING_PRESET_IDS, RadioGroup, RequirementList, ScrollArea, ScrollBar, ScrollableSections, SearchBox, SectionCard, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, SelectableCardList, Separator, Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetTitle, SheetTrigger, ShimmeringText, Sidebar, SidebarContent, SidebarFooter, SidebarGroup, SidebarGroupAction, SidebarGroupContent, SidebarGroupLabel, SidebarHeader, SidebarInput, SidebarInset, SidebarMenu, SidebarMenuAction, SidebarMenuBadge, SidebarMenuButton, SidebarMenuItem, SidebarMenuSkeleton, SidebarMenuSub, SidebarMenuSubButton, SidebarMenuSubItem, Sidebar$1 as SidebarPrimitive, SidebarProvider, SidebarRail, SidebarSeparator, SidebarTrigger, SimpleCard, SimpleClickableCard, SimpleInfoCard, SimpleList, SimplePaginatedList, SimplifiedDate, Skeleton, Spinner, StatCard, StatusBadge, StatusCardList, Switch, TYPOGRAPHY_VARIANTS, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, TableSkeleton, Tabs, TabsContent, TabsContents, TabsList, TabsTrigger, Tag, TagInput, Textarea, TimePicker, Toast, Toaster, TogglableItemsList, ToggleGroup, ToggleGroupItem, Tooltip, TooltipContent, TooltipProvider, Tooltip$1 as TooltipRoot, TooltipTrigger, TransferList, TreemapChart, Typography, UserTypeBadge, VARIANTS, VARIANT_GRADIENT_BACKDROP_BASE, VARIANT_GRADIENT_DURATION_CLASS, VARIANT_GRADIENT_HOVER_OVERLAY_CLASS, VARIANT_GRADIENT_TRANSITION_DURATION_MS, VerificationInProgress, VerticalStepper, Footer as WorkspaceFooter, Header as WorkspaceHeader, WorkspaceLayout, animatedCardAnimations, animatedCardTypeKeys, arbitraryGradientBackgroundImage, badgeVariants, buildSeriesChartConfig, buttonGroupVariants, buttonVariants, cn, computeDateRange, getChartSeriesColor, illustrationRegistry, illustrationsById, isSidebarGroup, parseSvgViewBoxAspectRatio, parseTextMarkup, resolveVariantStyles, statusBadgeSizeVariants, toast, typographyDefaultElement, typographyVariantClasses, useControlledState, useFormField, useIsMobile, useSidebar, userTypeBadgeRegistry, userTypeBadgeSizeVariants, userTypeBadgeUserTypes };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { parseTextMarkup } from "../../components/text-effects/parse-text-markup.js";
|
|
2
|
+
import AppLogo from "../../common/app-logo/app-logo.js";
|
|
3
|
+
import FooterCard from "../../common/footer-card/footer-card.js";
|
|
4
|
+
import entry_layout_bg_default from "./entry-layout-bg.js";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
//#region src/layouts/entry-layout/entry-layout.tsx
|
|
7
|
+
function EntryLayout({ appName, children, backgroundImageUrl, heading, darkMode, logo, logoAssets, customRightPanel, disableBackgroundImage, hideLogo, hideFooter, hideRightPanel }) {
|
|
8
|
+
const bgImage = backgroundImageUrl ?? (disableBackgroundImage ? void 0 : entry_layout_bg_default);
|
|
9
|
+
const resolvedLogo = logo !== void 0 ? logo : logoAssets ? /* @__PURE__ */ jsx(AppLogo, {
|
|
10
|
+
logo: logoAssets,
|
|
11
|
+
darkMode,
|
|
12
|
+
width: 256
|
|
13
|
+
}) : appName ? /* @__PURE__ */ jsx(AppLogo, {
|
|
14
|
+
name: appName,
|
|
15
|
+
darkMode,
|
|
16
|
+
width: 256
|
|
17
|
+
}) : null;
|
|
18
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
19
|
+
className: `flex h-screen overflow-hidden w-full${hideRightPanel ? " justify-center" : ""}`,
|
|
20
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
21
|
+
className: "w-[40%] flex flex-col overflow-y-auto bg-gradient-to-b from-background to-transparent max-xl:w-full max-xl:py-8 max-xl:px-5",
|
|
22
|
+
children: /* @__PURE__ */ jsxs("div", {
|
|
23
|
+
className: "main-content-wrapper h-full flex flex-col justify-center",
|
|
24
|
+
children: [!hideLogo && resolvedLogo !== null && /* @__PURE__ */ jsx("div", {
|
|
25
|
+
className: "sticky top-0 z-10 shrink-0 flex justify-center py-6 bg-background/75 backdrop-blur-xs w-full logo-wrapper",
|
|
26
|
+
children: resolvedLogo
|
|
27
|
+
}), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("div", {
|
|
28
|
+
className: "flex-1 flex flex-col items-center justify-center main-content",
|
|
29
|
+
children
|
|
30
|
+
}), !hideFooter && /* @__PURE__ */ jsx("div", {
|
|
31
|
+
className: "shrink-0 text-center text-xs text-muted-foreground footer-card-wrapper py-10",
|
|
32
|
+
children: /* @__PURE__ */ jsx(FooterCard, {})
|
|
33
|
+
})] })]
|
|
34
|
+
})
|
|
35
|
+
}), !hideRightPanel && /* @__PURE__ */ jsx("div", {
|
|
36
|
+
className: "w-[60%] relative bg-cover bg-center bg-no-repeat max-xl:hidden",
|
|
37
|
+
style: bgImage ? { backgroundImage: `url(${bgImage})` } : void 0,
|
|
38
|
+
children: customRightPanel ? /* @__PURE__ */ jsx("div", {
|
|
39
|
+
className: "absolute inset-0",
|
|
40
|
+
children: customRightPanel
|
|
41
|
+
}) : heading ? /* @__PURE__ */ jsx("div", {
|
|
42
|
+
className: "absolute inset-0 bg-gradient-to-b from-black/30 to-transparent flex items-center justify-center p-12",
|
|
43
|
+
children: /* @__PURE__ */ jsx("h1", {
|
|
44
|
+
className: "text-white text-[3.25rem] leading-[1.25] text-center max-w-full px-6 font-bold tracking-tight",
|
|
45
|
+
children: typeof heading === "string" ? parseTextMarkup(heading) : heading
|
|
46
|
+
})
|
|
47
|
+
}) : null
|
|
48
|
+
})]
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
export { EntryLayout as default };
|