@espressif/dashboard-ui-components 1.9.1 → 1.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +179 -0
- package/dist/_vendor/@radix-ui/primitive/dist/index.js +9 -0
- package/dist/_vendor/@radix-ui/react-checkbox/dist/index.js +185 -0
- package/dist/_vendor/@radix-ui/react-compose-refs/dist/index.js +28 -0
- package/dist/_vendor/@radix-ui/react-context/dist/index.js +68 -0
- package/dist/_vendor/@radix-ui/react-presence/dist/index.js +127 -0
- package/dist/_vendor/@radix-ui/react-primitive/dist/index.js +42 -0
- package/dist/_vendor/@radix-ui/react-use-controllable-state/dist/index.js +55 -0
- package/dist/_vendor/@radix-ui/react-use-layout-effect/dist/index.js +5 -0
- package/dist/_vendor/@radix-ui/react-use-previous/dist/index.js +17 -0
- package/dist/_vendor/@radix-ui/react-use-size/dist/index.js +39 -0
- package/dist/_vendor/lottie-react/build/index.es.js +537 -0
- package/dist/_vendor/lottie-web/build/player/lottie.js +14149 -0
- package/dist/_virtual/_rolldown/runtime.js +24 -0
- package/dist/assets/illustrations/bulb-cloud-drawing.js +4 -0
- package/dist/assets/illustrations/rm-dashboard-update.js +4 -0
- package/dist/assets/illustrations/rm-data-download.js +4 -0
- package/dist/assets/logos/espressif/espressif-no-text.js +4 -0
- package/dist/assets/logos/espressif/espressif-with-text-dm.js +4 -0
- package/dist/assets/logos/espressif/espressif-with-text.js +4 -0
- package/dist/assets/logos/insights/insights-no-text.js +4 -0
- package/dist/assets/logos/insights/insights-with-text-dm.js +4 -0
- package/dist/assets/logos/insights/insights-with-text.js +4 -0
- package/dist/assets/logos/launchpad/launchpad-no-text-dm.js +4 -0
- package/dist/assets/logos/launchpad/launchpad-no-text.js +4 -0
- package/dist/assets/logos/launchpad/launchpad-with-text-dm.js +4 -0
- package/dist/assets/logos/launchpad/launchpad-with-text.js +4 -0
- package/dist/assets/logos/private-agents/private-agents-no-text.js +4 -0
- package/dist/assets/logos/private-agents/private-agents-with-text-dm.js +4 -0
- package/dist/assets/logos/private-agents/private-agents-with-text.js +4 -0
- package/dist/assets/logos/rainmaker/rainmaker-no-text.js +4 -0
- package/dist/assets/logos/rainmaker/rainmaker-with-text-dm.js +4 -0
- package/dist/assets/logos/rainmaker/rainmaker-with-text.js +4 -0
- package/dist/assets/logos/rainmaker-classic/rainmaker-classic-no-text-dm.js +4 -0
- package/dist/assets/logos/rainmaker-classic/rainmaker-classic-no-text.js +4 -0
- package/dist/assets/logos/rainmaker-classic/rainmaker-classic-with-text-dm.js +4 -0
- package/dist/assets/logos/rainmaker-classic/rainmaker-classic-with-text.js +4 -0
- package/dist/assets/logos/rainmaker-neo/rainmaker-neo-no-text.js +4 -0
- package/dist/assets/logos/rainmaker-neo/rainmaker-neo-with-text-dm.js +4 -0
- package/dist/assets/logos/rainmaker-neo/rainmaker-neo-with-text.js +4 -0
- package/dist/assets/logos/ui-components/ui-components-no-text.js +4 -0
- package/dist/assets/logos/ui-components/ui-components-with-text-dm.js +4 -0
- package/dist/assets/logos/ui-components/ui-components-with-text.js +4 -0
- package/dist/assets/logos/zerocode/zerocode-no-text.js +4 -0
- package/dist/assets/logos/zerocode/zerocode-with-text-dm.js +4 -0
- package/dist/assets/logos/zerocode/zerocode-with-text.js +4 -0
- package/dist/assets/logos/zerocode-ai/zerocode-ai-no-text.js +4 -0
- package/dist/assets/logos/zerocode-ai/zerocode-ai-with-text-dm.js +4 -0
- package/dist/assets/logos/zerocode-ai/zerocode-ai-with-text.js +4 -0
- package/dist/common/animated-rainmaker-logo/animated-rainmaker-logo.constants.js +18 -0
- package/dist/common/animated-rainmaker-logo/animated-rainmaker-logo.js +24 -0
- package/dist/common/animated-rainmaker-logo/rainmaker-c-logo.js +50 -0
- package/dist/common/animated-rainmaker-logo/use-animated-rainmaker-logo-animation.js +85 -0
- package/dist/common/app-logo/app-logo.js +59 -0
- package/dist/common/app-logo/logo-config.js +297 -0
- package/dist/common/copyright-card/copyright-card.js +39 -0
- package/dist/common/footer-card/footer-card.js +22 -0
- package/dist/common/index.js +8 -8
- package/dist/common/my-account-menu/my-account-menu.js +32 -0
- package/dist/common/page-loader/page-loader.js +21 -0
- package/dist/common/profile-card/profile-card.js +26 -0
- package/dist/components/accordion/accordion.js +52 -0
- package/dist/components/advanced-search-box/advanced-search-box.js +106 -0
- package/dist/components/alert/alert.js +85 -0
- package/dist/components/animated-containers/pop-collection-item.js +28 -0
- package/dist/components/async-multi-select/async-multi-select.js +199 -0
- package/dist/components/avatar/avatar.js +41 -0
- package/dist/components/button/button.js +191 -0
- package/dist/components/button/flash-button.js +110 -0
- package/dist/components/button/invert-button.js +13 -0
- package/dist/components/calendar/calendar.js +105 -0
- package/dist/components/cards/animated-card/animated-card-animations.js +57 -0
- package/dist/components/cards/animated-card/animated-card.js +42 -0
- package/dist/components/cards/basic-details-card.js +46 -0
- package/dist/components/cards/collapsible-card.js +48 -0
- package/dist/components/cards/no-data-card/no-data-card.js +30 -0
- package/dist/components/cards/section-card.js +265 -0
- package/dist/components/cards/simple-card.js +24 -0
- package/dist/components/carousel/carousel.js +158 -0
- package/dist/components/chart/area-chart.js +135 -0
- package/dist/components/chart/bar-chart.js +151 -0
- package/dist/components/chart/chart-colors.js +85 -0
- package/dist/components/chart/chart-series-data.js +53 -0
- package/dist/components/chart/chart.js +147 -0
- package/dist/components/chart/chart.types.js +7 -0
- package/dist/components/chart/composed-chart.js +182 -0
- package/dist/components/chart/donut-chart.js +177 -0
- package/dist/components/chart/line-chart.js +137 -0
- package/dist/components/chart/treemap-chart.js +294 -0
- package/dist/components/circular-progress/circular-progress.js +125 -0
- package/dist/components/code-editor/code-editor.js +235 -0
- package/dist/components/code-editor/code-editor.utils.js +122 -0
- package/dist/components/code-editor/use-code-editor-keys.js +79 -0
- package/dist/components/code-editor/use-highlighted-html.js +102 -0
- package/dist/components/confirmation-dialog/confirmation-dialog.js +72 -0
- package/dist/components/content-container/content-container.js +20 -0
- package/dist/components/copiable-text/copiable-text.js +46 -0
- package/dist/components/data-table/data-table.js +186 -0
- package/dist/components/data-table/responsive-columns.js +65 -0
- package/dist/components/data-table/row-actions.js +27 -0
- package/dist/components/data-table/sticky-columns.js +71 -0
- package/dist/components/data-table/table-body.js +57 -0
- package/dist/components/data-table/table-header.js +21 -0
- package/dist/components/date-picker/date-picker.js +95 -0
- package/dist/components/date-range-picker/date-range-picker.js +301 -0
- package/dist/components/date-range-picker/presets.js +174 -0
- package/dist/components/date-time-picker/date-time-picker.js +144 -0
- package/dist/components/date-time-picker/date-time-picker.utils.js +32 -0
- package/dist/components/device-icon/device-icon.config.js +194 -0
- package/dist/components/device-icon/device-icon.js +17 -0
- package/dist/components/device-icon/icons/air-conditioner.js +22 -0
- package/dist/components/device-icon/icons/blind.js +24 -0
- package/dist/components/device-icon/icons/dimmer.js +14 -0
- package/dist/components/device-icon/icons/extension-board.js +42 -0
- package/dist/components/device-icon/icons/fan.js +14 -0
- package/dist/components/device-icon/icons/knob.js +14 -0
- package/dist/components/device-icon/icons/led-strip.js +22 -0
- package/dist/components/device-icon/icons/light.js +14 -0
- package/dist/components/device-icon/icons/refrigerator.js +18 -0
- package/dist/components/device-icon/icons/retro-switch.js +18 -0
- package/dist/components/device-icon/icons/router.js +20 -0
- package/dist/components/device-icon/icons/sensor.js +20 -0
- package/dist/components/device-icon/icons/socket.js +19 -0
- package/dist/components/device-icon/icons/switch.js +19 -0
- package/dist/components/device-icon/icons/thermostat.js +21 -0
- package/dist/components/device-icon/icons/washing-machine.js +22 -0
- package/dist/components/device-icon/match-device.js +61 -0
- package/dist/components/dynamic-list/dynamic-list.js +445 -0
- package/dist/components/error-display/full-size-error/full-size-error.js +20 -0
- package/dist/components/error-display/inline-error/inline-error.js +12 -0
- package/dist/components/file-input/file-input.js +318 -0
- package/dist/components/file-upload/file-upload.js +317 -0
- package/dist/components/filters-bar/filters-bar.js +36 -0
- package/dist/components/fullscreen-dialog/fullscreen-dialog.js +68 -0
- package/dist/components/icon-avatar/icon-avatar.js +130 -0
- package/dist/components/icon-text-action-card/icon-text-action-card.js +190 -0
- package/dist/components/illustration/illustration-registry.js +37 -0
- package/dist/components/illustration/illustration-variants.js +21 -0
- package/dist/components/illustration/illustration.js +68 -0
- package/dist/components/index.d.ts +159 -63
- package/dist/components/index.js +134 -6
- package/dist/components/key-value-manager/key-value-manager-add-popover.js +126 -0
- package/dist/components/key-value-manager/key-value-manager-field.js +47 -0
- package/dist/components/key-value-manager/key-value-manager-table.js +188 -0
- package/dist/components/key-value-manager/key-value-manager.js +111 -0
- package/dist/components/key-value-manager/key-value-manager.props.js +28 -0
- package/dist/components/key-value-manager/key-value-manager.utils.js +21 -0
- package/dist/components/link/link.js +67 -0
- package/dist/components/list/dropdown-list-item.js +60 -0
- package/dist/components/list/list-item.utils.js +76 -0
- package/dist/components/list/list.js +49 -0
- package/dist/components/list/list.props.js +27 -0
- package/dist/components/list/standard-list-item.js +66 -0
- package/dist/components/list-details/list-details-item-button.js +46 -0
- package/dist/components/list-details/list-details-item-dropdown.js +112 -0
- package/dist/components/list-details/list-details-item-strip.js +125 -0
- package/dist/components/list-details/list-details.js +148 -0
- package/dist/components/lottie-animation-container/lottie-animation-container.js +31 -0
- package/dist/components/lottie-animations/animation-data/access-denied.js +3980 -0
- package/dist/components/lottie-animations/animation-data/active.js +825 -0
- package/dist/components/lottie-animations/animation-data/bar-chart.js +610 -0
- package/dist/components/lottie-animations/animation-data/chart-loading.js +5368 -0
- package/dist/components/lottie-animations/animation-data/cloud-download.js +1660 -0
- package/dist/components/lottie-animations/animation-data/cloud-sync.js +932 -0
- package/dist/components/lottie-animations/animation-data/coud-upload.js +7060 -0
- package/dist/components/lottie-animations/animation-data/cross-throb.js +1506 -0
- package/dist/components/lottie-animations/animation-data/dashboard-loading.js +14330 -0
- package/dist/components/lottie-animations/animation-data/error-spread-out.js +5567 -0
- package/dist/components/lottie-animations/animation-data/error.js +1211 -0
- package/dist/components/lottie-animations/animation-data/green-success.js +14826 -0
- package/dist/components/lottie-animations/animation-data/inactive.js +723 -0
- package/dist/components/lottie-animations/animation-data/light.js +2678 -0
- package/dist/components/lottie-animations/animation-data/lock.js +900 -0
- package/dist/components/lottie-animations/animation-data/lock2.js +1686 -0
- package/dist/components/lottie-animations/animation-data/locked.js +641 -0
- package/dist/components/lottie-animations/animation-data/search-error.js +954 -0
- package/dist/components/lottie-animations/animation-data/security.js +4121 -0
- package/dist/components/lottie-animations/animation-data/success.js +404 -0
- package/dist/components/lottie-animations/animation-data/verification-in-progress.js +10138 -0
- package/dist/components/lottie-animations/animation-data/warning.js +843 -0
- package/dist/components/lottie-animations/verification-in-progress/verification-in-progress.js +19 -0
- package/dist/components/markdown-content/markdown-content.components.js +114 -0
- package/dist/components/markdown-content/markdown-content.js +39 -0
- package/dist/components/menu/menu.js +19 -0
- package/dist/components/monospace-content/monospace-content.js +80 -0
- package/dist/components/nav-bar/nav-bar-details-panel.js +51 -0
- package/dist/components/nav-bar/nav-bar-mobile-menu.js +105 -0
- package/dist/components/nav-bar/nav-bar.js +449 -0
- package/dist/components/nav-bar/use-nav-bar-overflow.js +74 -0
- package/dist/components/nav-bar/use-nav-bar-scroll.js +42 -0
- package/dist/components/overflow-badge-list/overflow-badge-list.js +58 -0
- package/dist/components/page-container/page-container-skeleton.js +72 -0
- package/dist/components/page-container/page-container.js +93 -0
- package/dist/components/pagination/pagination.js +96 -0
- package/dist/components/pagination/pagination.props.js +16 -0
- package/dist/components/progress-bar/progress-bar.js +106 -0
- package/dist/components/radio-group/radio-group.js +41 -0
- package/dist/components/requirement-list/requirement-list.js +83 -0
- package/dist/components/scrollable-sections/scrollable-sections.js +270 -0
- package/dist/components/search-box/search-box.js +54 -0
- package/dist/components/search-field-shell.js +24 -0
- package/dist/components/selectable-card-list/checkbox-card-list.js +85 -0
- package/dist/components/selectable-card-list/radio-card-list.js +99 -0
- package/dist/components/selectable-card-list/selectable-card-list-shared.js +135 -0
- package/dist/components/selectable-card-list/selectable-card-list.js +34 -0
- package/dist/components/sidebar/sidebar.js +344 -0
- package/dist/components/sidebar/types.js +6 -0
- package/dist/components/simple-clickable-card/simple-clickable-card-shared.js +309 -0
- package/dist/components/simple-clickable-card/simple-clickable-card.js +106 -0
- package/dist/components/simple-info-card/simple-info-card.js +154 -0
- package/dist/components/simple-list/simple-list.js +146 -0
- package/dist/components/simple-paginated-list/simple-paginated-list.js +178 -0
- package/dist/components/simplified-date/simplified-date.js +56 -0
- package/dist/components/skeletons/table-skeleton.js +16 -0
- package/dist/components/spinner/spinner.js +25 -0
- package/dist/components/stat-card/stat-card.js +206 -0
- package/dist/components/status-badge/status-badge.js +108 -0
- package/dist/components/status-card-list/status-card-list.js +282 -0
- package/dist/components/tag/tag.js +144 -0
- package/dist/components/tag-input/tag-input.js +161 -0
- package/dist/components/text-effects/glitch-effect/glitch-text.js +115 -0
- package/dist/components/text-effects/gradient-text/gradient-text.js +32 -0
- package/dist/components/text-effects/highlight-text/highlight-text.js +35 -0
- package/dist/components/text-effects/parse-text-markup.js +53 -0
- package/dist/components/text-effects/shimmer-text/shimmer-text.js +67 -0
- package/dist/components/time-picker/time-picker.js +23 -0
- package/dist/components/toast/toast.js +126 -0
- package/dist/components/togglable-items-list/togglable-items-list.js +28 -0
- package/dist/components/tooltip/tooltip.js +21 -0
- package/dist/components/transfer-list/transfer-list.js +413 -0
- package/dist/components/truncated-line-with-tooltip/truncated-line-with-tooltip.js +61 -0
- package/dist/components/typography/typography-variants.js +41 -0
- package/dist/components/typography/typography.js +15 -0
- package/dist/components/user-type-badge/user-type-badge.js +40 -0
- package/dist/components/user-type-badge/user-type-badge.registry.js +17 -0
- package/dist/components/vertical-stepper/vertical-stepper.js +171 -0
- package/dist/core/alert.js +33 -0
- package/dist/core/animate-ui/components/animate/code-header.js +30 -0
- package/dist/core/animate-ui/components/animate/code.js +35 -0
- package/dist/core/animate-ui/components/animate/tabs.js +188 -0
- package/dist/core/animate-ui/components/animate/tooltip.js +39 -0
- package/dist/core/animate-ui/components/base/preview-card.js +29 -0
- package/dist/core/animate-ui/components/base/progress.js +32 -0
- package/dist/core/animate-ui/components/base/radio.js +24 -0
- package/dist/core/animate-ui/components/buttons/copy.js +95 -0
- package/dist/core/animate-ui/components/radix/accordion.js +36 -0
- package/dist/core/animate-ui/components/radix/dialog.js +60 -0
- package/dist/core/animate-ui/components/radix/dropdown-menu.js +129 -0
- package/dist/core/animate-ui/components/radix/sheet.js +110 -0
- package/dist/core/animate-ui/components/radix/sidebar.js +416 -0
- package/dist/core/animate-ui/components/radix/switch.js +34 -0
- package/dist/core/animate-ui/components/radix/toggle-group.js +115 -0
- package/dist/core/animate-ui/components/radix/toggle.js +24 -0
- package/dist/core/animate-ui/primitives/animate/code-block.js +131 -0
- package/dist/core/animate-ui/primitives/animate/escape-html.js +7 -0
- package/dist/core/animate-ui/primitives/animate/shiki-highlighter.js +64 -0
- package/dist/core/animate-ui/primitives/animate/slot.js +39 -0
- package/dist/core/animate-ui/primitives/animate/tabs.js +202 -0
- package/dist/core/animate-ui/primitives/animate/tooltip.js +351 -0
- package/dist/core/animate-ui/primitives/base/preview-card.js +107 -0
- package/dist/core/animate-ui/primitives/base/progress.js +60 -0
- package/dist/core/animate-ui/primitives/base/radio.js +83 -0
- package/dist/core/animate-ui/primitives/buttons/button.js +15 -0
- package/dist/core/animate-ui/primitives/effects/highlight.js +407 -0
- package/dist/core/animate-ui/primitives/radix/accordion.js +76 -0
- package/dist/core/animate-ui/primitives/radix/dialog.js +136 -0
- package/dist/core/animate-ui/primitives/radix/dropdown-menu.js +305 -0
- package/dist/core/animate-ui/primitives/radix/sheet.js +165 -0
- package/dist/core/animate-ui/primitives/radix/switch.js +86 -0
- package/dist/core/animate-ui/primitives/radix/toggle-group.js +100 -0
- package/dist/core/animate-ui/primitives/texts/counting-number.js +75 -0
- package/dist/core/avatar.js +32 -0
- package/dist/core/badge.js +27 -0
- package/dist/core/breadcrumb.js +62 -0
- package/dist/core/button/button.js +43 -0
- package/dist/core/button/craft-button.js +78 -0
- package/dist/core/button-group.js +38 -0
- package/dist/core/button.js +40 -0
- package/dist/core/card.js +42 -0
- package/dist/core/carousel/carousel.js +149 -0
- package/dist/core/checkbox/motion-checkbox.js +103 -0
- package/dist/core/collapsible.js +54 -0
- package/dist/core/combobox/combobox.js +85 -0
- package/dist/core/command.js +61 -0
- package/dist/core/field-end-icons.js +36 -0
- package/dist/core/field-label-row.js +33 -0
- package/dist/core/form.js +92 -0
- package/dist/core/hooks/use-controlled-state.js +27 -0
- package/dist/core/hooks/use-data-state.js +39 -0
- package/dist/core/hooks/use-is-in-view.js +18 -0
- package/dist/core/hooks/use-mobile.js +19 -0
- package/dist/core/hooks/use-reveal-on-scroll-up.js +141 -0
- package/dist/core/hooks/use-scroll-overflow.js +50 -0
- package/dist/core/index.js +18 -52
- package/dist/core/input/input-password.js +30 -0
- package/dist/core/input/input.js +147 -0
- package/dist/core/input-otp/input-otp.js +183 -0
- package/dist/core/label.js +15 -0
- package/dist/core/popover.js +31 -0
- package/dist/core/scroll-area.js +42 -0
- package/dist/core/select.js +121 -0
- package/dist/core/separator.js +40 -0
- package/dist/core/skeleton.js +11 -0
- package/dist/core/table.js +59 -0
- package/dist/core/textarea/textarea.js +97 -0
- package/dist/core/utils/get-strict-context.js +18 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +148 -9
- package/dist/layouts/entry-layout/entry-layout-bg.js +4 -0
- package/dist/layouts/entry-layout/entry-layout.js +52 -0
- package/dist/layouts/index.js +7 -6
- package/dist/layouts/workspace-layout/account-menu/account-menu.js +108 -0
- package/dist/layouts/workspace-layout/breadcrumbs/derive-breadcrumbs.js +37 -0
- package/dist/layouts/workspace-layout/breadcrumbs/workspace-breadcrumbs.js +22 -0
- package/dist/layouts/workspace-layout/footer/footer.js +15 -0
- package/dist/layouts/workspace-layout/header/header.js +54 -0
- package/dist/layouts/workspace-layout/workspace-layout.js +157 -0
- package/dist/tailwind-preset.js +3 -4
- package/dist/utils/cn.js +8 -0
- package/dist/utils/color.js +72 -0
- package/dist/utils/index.js +3 -2
- package/dist/utils/path-match.js +17 -0
- package/dist/utils/silver-shine.js +63 -0
- package/dist/utils/variant-gradient-underlay.js +45 -0
- package/dist/utils/variant.js +426 -0
- package/package.json +7 -4
- package/dist/chunk-ABBHGIFI.js +0 -733
- package/dist/chunk-HIUBSBAP.js +0 -59
- package/dist/chunk-OKB2WTX7.js +0 -363
- package/dist/chunk-P6F6UWV2.js +0 -323
- package/dist/chunk-TRTQSARU.js +0 -31
- package/dist/chunk-VU4CZ76T.js +0 -43
- package/dist/chunk-XFYL5IZU.js +0 -69604
- package/dist/chunk-XW6Z6VO4.js +0 -505
- package/dist/chunk-ZFYUONPY.js +0 -4321
- package/src/assets/illustrations/add-to-group.svg +0 -32
- package/src/assets/illustrations/chip.svg +0 -51
- package/src/assets/illustrations/create-new-group.svg +0 -27
- package/src/assets/illustrations/new-ota.svg +0 -61
- package/src/assets/illustrations/secured-key.svg +0 -48
- /package/dist/assets/{entry-layout-bg-JPI7GJ42.webp → entry-layout-bg-DUM0UhT3.webp} +0 -0
package/dist/chunk-XW6Z6VO4.js
DELETED
|
@@ -1,505 +0,0 @@
|
|
|
1
|
-
import { FooterCard, MyAccountMenu, ProfileCard, AppLogo } from './chunk-P6F6UWV2.js';
|
|
2
|
-
import { useSidebar, SidebarTrigger, DropdownMenuItem, SidebarProvider, Sidebar2, SidebarInset, parseTextMarkup, isPathPrefixOf, isSidebarGroup } from './chunk-ZFYUONPY.js';
|
|
3
|
-
import { Button, Breadcrumb, BreadcrumbList, BreadcrumbItem, BreadcrumbLink, BreadcrumbPage, BreadcrumbSeparator } from './chunk-OKB2WTX7.js';
|
|
4
|
-
import { cn } from './chunk-VU4CZ76T.js';
|
|
5
|
-
import { Menu, Palette, Check, Globe, LogOut } from 'lucide-react';
|
|
6
|
-
import { jsx, jsxs } from 'react/jsx-runtime';
|
|
7
|
-
import React, { useMemo } from 'react';
|
|
8
|
-
|
|
9
|
-
function Header({
|
|
10
|
-
leftContent,
|
|
11
|
-
rightContent,
|
|
12
|
-
endContent,
|
|
13
|
-
showSidebarTrigger = false,
|
|
14
|
-
mobileLogo
|
|
15
|
-
}) {
|
|
16
|
-
const { state, isMobile, toggleSidebar } = useSidebar();
|
|
17
|
-
const isCollapsed = state === "collapsed";
|
|
18
|
-
const sidebarWidth = isCollapsed ? "calc(var(--espd-sidebar-width-collapsed) - 1px)" : "calc(var(--espd-sidebar-width) - 1px)";
|
|
19
|
-
return /* @__PURE__ */ jsx(
|
|
20
|
-
"header",
|
|
21
|
-
{
|
|
22
|
-
className: "fixed top-0 z-50 border-b backdrop-blur supports-[backdrop-filter]:bg-header transition-[left,width] duration-200 ease-linear border-header-border",
|
|
23
|
-
style: {
|
|
24
|
-
left: isMobile ? 0 : `calc(${sidebarWidth})`,
|
|
25
|
-
width: isMobile ? "100%" : `calc(100% - ${sidebarWidth})`,
|
|
26
|
-
height: "var(--espd-header-height)"
|
|
27
|
-
},
|
|
28
|
-
children: /* @__PURE__ */ jsxs("div", { className: "flex h-full items-center gap-3 pr-4", children: [
|
|
29
|
-
showSidebarTrigger && /* @__PURE__ */ jsx("div", { className: "sidebar-trigger shrink-0", children: isMobile ? /* @__PURE__ */ jsxs(
|
|
30
|
-
Button,
|
|
31
|
-
{
|
|
32
|
-
variant: "ghost",
|
|
33
|
-
size: "icon",
|
|
34
|
-
className: "size-10",
|
|
35
|
-
onClick: toggleSidebar,
|
|
36
|
-
children: [
|
|
37
|
-
/* @__PURE__ */ jsx(Menu, { className: "!size-6" }),
|
|
38
|
-
/* @__PURE__ */ jsx("span", { className: "sr-only", children: "Toggle Sidebar" })
|
|
39
|
-
]
|
|
40
|
-
}
|
|
41
|
-
) : /* @__PURE__ */ jsx(SidebarTrigger, {}) }),
|
|
42
|
-
isMobile && mobileLogo && /* @__PURE__ */ jsx("div", { className: "mobile-logo shrink-0", children: mobileLogo }),
|
|
43
|
-
leftContent && /* @__PURE__ */ jsx("div", { className: cn("min-w-0", !rightContent && "flex-1"), children: leftContent }),
|
|
44
|
-
rightContent && /* @__PURE__ */ jsx("div", { className: "flex-1 min-w-0", children: rightContent }),
|
|
45
|
-
endContent && /* @__PURE__ */ jsx("div", { className: "shrink-0 ml-auto flex items-center gap-2", children: endContent })
|
|
46
|
-
] })
|
|
47
|
-
}
|
|
48
|
-
);
|
|
49
|
-
}
|
|
50
|
-
function Footer({ hidden = false }) {
|
|
51
|
-
return /* @__PURE__ */ jsx(
|
|
52
|
-
"footer",
|
|
53
|
-
{
|
|
54
|
-
className: cn(
|
|
55
|
-
"bg-sidebar",
|
|
56
|
-
hidden ? "h-[var(--espd-hidden-footer-height)]" : "h-[var(--espd-footer-height)]"
|
|
57
|
-
),
|
|
58
|
-
children: !hidden && /* @__PURE__ */ jsx("div", { className: "text-[10px] text-muted-foreground h-full flex items-center justify-center tracking-normal", children: /* @__PURE__ */ jsx(FooterCard, {}) })
|
|
59
|
-
}
|
|
60
|
-
);
|
|
61
|
-
}
|
|
62
|
-
function AccountMenu({
|
|
63
|
-
userName,
|
|
64
|
-
userEmail,
|
|
65
|
-
userProfilePictureUrl,
|
|
66
|
-
avatarBadgeColor,
|
|
67
|
-
onLogoutClick,
|
|
68
|
-
onProfileCardClick,
|
|
69
|
-
onColorThemeChange,
|
|
70
|
-
colorTheme,
|
|
71
|
-
onLanguageChange,
|
|
72
|
-
languages,
|
|
73
|
-
currentLanguage,
|
|
74
|
-
additionalItems
|
|
75
|
-
}) {
|
|
76
|
-
const menuItems = useMemo(() => {
|
|
77
|
-
const groups = [];
|
|
78
|
-
if (userName || userEmail) {
|
|
79
|
-
const profileCard = /* @__PURE__ */ jsx(
|
|
80
|
-
ProfileCard,
|
|
81
|
-
{
|
|
82
|
-
name: userName,
|
|
83
|
-
email: userEmail,
|
|
84
|
-
imageUrl: userProfilePictureUrl
|
|
85
|
-
},
|
|
86
|
-
"profile"
|
|
87
|
-
);
|
|
88
|
-
groups.push({
|
|
89
|
-
id: "profile",
|
|
90
|
-
items: [
|
|
91
|
-
onProfileCardClick ? (
|
|
92
|
-
// A menu item (not a plain button) so Radix closes the menu on select and
|
|
93
|
-
// includes the card in keyboard navigation. Negative margins cancel the
|
|
94
|
-
// custom-item wrapper's padding so the card keeps its position; they sit on
|
|
95
|
-
// an outer div because the hover highlight is sized from the item's wrapper.
|
|
96
|
-
/* @__PURE__ */ jsx("div", { className: "-mx-2.5 -my-1.5", children: /* @__PURE__ */ jsx(
|
|
97
|
-
DropdownMenuItem,
|
|
98
|
-
{
|
|
99
|
-
onSelect: onProfileCardClick,
|
|
100
|
-
className: "px-2.5 py-1.5 cursor-pointer *:flex-1 *:min-w-0",
|
|
101
|
-
children: profileCard
|
|
102
|
-
}
|
|
103
|
-
) }, "profile")
|
|
104
|
-
) : profileCard
|
|
105
|
-
]
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
if (onColorThemeChange) {
|
|
109
|
-
const isDark = colorTheme === "dark";
|
|
110
|
-
const themeItems = [
|
|
111
|
-
{
|
|
112
|
-
id: "theme-dark",
|
|
113
|
-
label: "Dark mode",
|
|
114
|
-
endIcon: isDark ? /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) : void 0,
|
|
115
|
-
isSelected: isDark,
|
|
116
|
-
onClick: () => onColorThemeChange("dark")
|
|
117
|
-
},
|
|
118
|
-
{
|
|
119
|
-
id: "theme-light",
|
|
120
|
-
label: "Light mode",
|
|
121
|
-
endIcon: !isDark ? /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) : void 0,
|
|
122
|
-
isSelected: !isDark,
|
|
123
|
-
onClick: () => onColorThemeChange("light")
|
|
124
|
-
}
|
|
125
|
-
];
|
|
126
|
-
groups.push({
|
|
127
|
-
id: "theme",
|
|
128
|
-
items: [
|
|
129
|
-
{
|
|
130
|
-
id: "color-theme",
|
|
131
|
-
label: "Color theme",
|
|
132
|
-
startIcon: /* @__PURE__ */ jsx(Palette, { className: "h-4 w-4" }),
|
|
133
|
-
items: themeItems
|
|
134
|
-
}
|
|
135
|
-
]
|
|
136
|
-
});
|
|
137
|
-
}
|
|
138
|
-
if (onLanguageChange && languages?.length) {
|
|
139
|
-
const langItems = languages.map((lang) => ({
|
|
140
|
-
id: `lang-${lang.code}`,
|
|
141
|
-
label: lang.label,
|
|
142
|
-
endIcon: lang.code === currentLanguage ? /* @__PURE__ */ jsx(Check, { className: "h-4 w-4" }) : void 0,
|
|
143
|
-
isSelected: lang.code === currentLanguage,
|
|
144
|
-
onClick: () => onLanguageChange(lang.code)
|
|
145
|
-
}));
|
|
146
|
-
groups.push({
|
|
147
|
-
id: "language",
|
|
148
|
-
items: [
|
|
149
|
-
{
|
|
150
|
-
id: "language",
|
|
151
|
-
label: "Language",
|
|
152
|
-
startIcon: /* @__PURE__ */ jsx(Globe, { className: "h-4 w-4" }),
|
|
153
|
-
items: langItems
|
|
154
|
-
}
|
|
155
|
-
]
|
|
156
|
-
});
|
|
157
|
-
}
|
|
158
|
-
if (additionalItems?.length) {
|
|
159
|
-
groups.push(...additionalItems);
|
|
160
|
-
}
|
|
161
|
-
if (onLogoutClick) {
|
|
162
|
-
groups.push({
|
|
163
|
-
id: "logout",
|
|
164
|
-
items: [
|
|
165
|
-
{
|
|
166
|
-
id: "logout",
|
|
167
|
-
label: "Logout",
|
|
168
|
-
startIcon: /* @__PURE__ */ jsx(LogOut, { className: "h-4 w-4" }),
|
|
169
|
-
color: "error",
|
|
170
|
-
onClick: onLogoutClick
|
|
171
|
-
}
|
|
172
|
-
]
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
return groups;
|
|
176
|
-
}, [
|
|
177
|
-
userName,
|
|
178
|
-
userEmail,
|
|
179
|
-
userProfilePictureUrl,
|
|
180
|
-
onProfileCardClick,
|
|
181
|
-
onColorThemeChange,
|
|
182
|
-
colorTheme,
|
|
183
|
-
onLanguageChange,
|
|
184
|
-
languages,
|
|
185
|
-
currentLanguage,
|
|
186
|
-
additionalItems,
|
|
187
|
-
onLogoutClick
|
|
188
|
-
]);
|
|
189
|
-
if (menuItems.length === 0) return null;
|
|
190
|
-
return /* @__PURE__ */ jsx(
|
|
191
|
-
MyAccountMenu,
|
|
192
|
-
{
|
|
193
|
-
name: userName,
|
|
194
|
-
email: userEmail,
|
|
195
|
-
imageUrl: userProfilePictureUrl,
|
|
196
|
-
badgeColor: avatarBadgeColor,
|
|
197
|
-
menuItems,
|
|
198
|
-
minWidth: "220px"
|
|
199
|
-
}
|
|
200
|
-
);
|
|
201
|
-
}
|
|
202
|
-
function WorkspaceBreadcrumbs({
|
|
203
|
-
items,
|
|
204
|
-
linkComponent: LinkComponent,
|
|
205
|
-
collapseOnMobile = false
|
|
206
|
-
}) {
|
|
207
|
-
const { isMobile } = useSidebar();
|
|
208
|
-
if (items.length === 0) return null;
|
|
209
|
-
const visibleItems = collapseOnMobile && isMobile ? items.slice(-1) : items;
|
|
210
|
-
return /* @__PURE__ */ jsx(Breadcrumb, { children: /* @__PURE__ */ jsx(BreadcrumbList, { children: visibleItems.map((item, index) => {
|
|
211
|
-
const isLast = index === visibleItems.length - 1;
|
|
212
|
-
return /* @__PURE__ */ jsxs(React.Fragment, { children: [
|
|
213
|
-
/* @__PURE__ */ jsx(BreadcrumbItem, { children: item.path ? /* @__PURE__ */ jsx(BreadcrumbLink, { asChild: true, children: /* @__PURE__ */ jsx(LinkComponent, { to: item.path, children: item.label }) }) : /* @__PURE__ */ jsx(BreadcrumbPage, { children: item.label }) }),
|
|
214
|
-
!isLast && /* @__PURE__ */ jsx(BreadcrumbSeparator, {})
|
|
215
|
-
] }, item.path ?? index);
|
|
216
|
-
}) }) });
|
|
217
|
-
}
|
|
218
|
-
|
|
219
|
-
// src/layouts/workspace-layout/breadcrumbs/derive-breadcrumbs.ts
|
|
220
|
-
function labelFromPath(path) {
|
|
221
|
-
const last = path.split("/").filter(Boolean).pop();
|
|
222
|
-
if (!last) return "Home";
|
|
223
|
-
return last.charAt(0).toUpperCase() + last.slice(1).replace(/-/g, " ");
|
|
224
|
-
}
|
|
225
|
-
function deriveBreadcrumbs(groups, currentPath, indexPath) {
|
|
226
|
-
const matches = [];
|
|
227
|
-
if (indexPath && isPathPrefixOf(indexPath, currentPath)) {
|
|
228
|
-
const coveredBySidebar = groups.some((entry) => {
|
|
229
|
-
if (isSidebarGroup(entry)) {
|
|
230
|
-
return entry.items.some((item) => item.path === indexPath);
|
|
231
|
-
}
|
|
232
|
-
return entry.path === indexPath;
|
|
233
|
-
});
|
|
234
|
-
if (!coveredBySidebar) {
|
|
235
|
-
matches.push({ label: labelFromPath(indexPath), path: indexPath });
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
for (const entry of groups) {
|
|
239
|
-
if (isSidebarGroup(entry)) {
|
|
240
|
-
for (const item of entry.items) {
|
|
241
|
-
if (isPathPrefixOf(item.path, currentPath)) {
|
|
242
|
-
matches.push({ label: item.label, path: item.path });
|
|
243
|
-
}
|
|
244
|
-
}
|
|
245
|
-
} else if (isPathPrefixOf(entry.path, currentPath)) {
|
|
246
|
-
matches.push({ label: entry.label, path: entry.path });
|
|
247
|
-
}
|
|
248
|
-
}
|
|
249
|
-
if (matches.length === 0) return [];
|
|
250
|
-
matches.sort((a, b) => a.path.length - b.path.length);
|
|
251
|
-
return matches.map((match) => ({
|
|
252
|
-
label: match.label,
|
|
253
|
-
path: match.path === currentPath ? void 0 : match.path
|
|
254
|
-
}));
|
|
255
|
-
}
|
|
256
|
-
function renderLogoForState({
|
|
257
|
-
logo,
|
|
258
|
-
logoCollapsed,
|
|
259
|
-
logoAssets,
|
|
260
|
-
appName,
|
|
261
|
-
darkMode,
|
|
262
|
-
collapsed
|
|
263
|
-
}) {
|
|
264
|
-
const nodeOverride = collapsed ? logoCollapsed ?? logo : logo;
|
|
265
|
-
if (nodeOverride !== void 0) return nodeOverride;
|
|
266
|
-
if (logoAssets) {
|
|
267
|
-
return /* @__PURE__ */ jsx(AppLogo, { logo: logoAssets, darkMode, minimal: collapsed });
|
|
268
|
-
}
|
|
269
|
-
if (appName) {
|
|
270
|
-
return /* @__PURE__ */ jsx(AppLogo, { name: appName, darkMode, minimal: collapsed });
|
|
271
|
-
}
|
|
272
|
-
return null;
|
|
273
|
-
}
|
|
274
|
-
function SidebarLogo({
|
|
275
|
-
logo,
|
|
276
|
-
logoCollapsed,
|
|
277
|
-
logoAssets,
|
|
278
|
-
appName,
|
|
279
|
-
darkMode,
|
|
280
|
-
indexPath,
|
|
281
|
-
linkComponent: LinkComponent
|
|
282
|
-
}) {
|
|
283
|
-
const { state, isMobile } = useSidebar();
|
|
284
|
-
const node = renderLogoForState({
|
|
285
|
-
logo,
|
|
286
|
-
logoCollapsed,
|
|
287
|
-
logoAssets,
|
|
288
|
-
appName,
|
|
289
|
-
darkMode,
|
|
290
|
-
// The mobile sheet is full-width, so always show the full logo there even if
|
|
291
|
-
// the desktop sidebar was left collapsed.
|
|
292
|
-
collapsed: state === "collapsed" && !isMobile
|
|
293
|
-
});
|
|
294
|
-
if (node === null) return null;
|
|
295
|
-
if (indexPath && LinkComponent) {
|
|
296
|
-
return /* @__PURE__ */ jsx(LinkComponent, { to: indexPath, className: "no-underline", children: node });
|
|
297
|
-
}
|
|
298
|
-
return node;
|
|
299
|
-
}
|
|
300
|
-
function EspressifFooterBranding({ darkMode }) {
|
|
301
|
-
const { state } = useSidebar();
|
|
302
|
-
return /* @__PURE__ */ jsx(
|
|
303
|
-
"a",
|
|
304
|
-
{
|
|
305
|
-
href: "https://www.espressif.com/",
|
|
306
|
-
target: "_blank",
|
|
307
|
-
rel: "noopener noreferrer",
|
|
308
|
-
className: "no-underline flex justify-center w-full opacity-25 transition-opacity duration-500 ease-in-out hover:opacity-100",
|
|
309
|
-
"aria-label": "Espressif",
|
|
310
|
-
children: /* @__PURE__ */ jsx(
|
|
311
|
-
AppLogo,
|
|
312
|
-
{
|
|
313
|
-
width: 120,
|
|
314
|
-
darkMode,
|
|
315
|
-
minimal: state === "collapsed"
|
|
316
|
-
}
|
|
317
|
-
)
|
|
318
|
-
}
|
|
319
|
-
);
|
|
320
|
-
}
|
|
321
|
-
function WorkspaceLayout({
|
|
322
|
-
appName,
|
|
323
|
-
logo,
|
|
324
|
-
logoCollapsed,
|
|
325
|
-
logoMobile,
|
|
326
|
-
logoAssets,
|
|
327
|
-
footerBranding,
|
|
328
|
-
children,
|
|
329
|
-
sidebarConfig,
|
|
330
|
-
headerConfig,
|
|
331
|
-
footerConfig,
|
|
332
|
-
sidebarOpen,
|
|
333
|
-
defaultSidebarOpen,
|
|
334
|
-
onSidebarOpenChange,
|
|
335
|
-
onLogoutClick,
|
|
336
|
-
onProfileCardClick,
|
|
337
|
-
onColorThemeChange,
|
|
338
|
-
colorTheme,
|
|
339
|
-
onLanguageChange,
|
|
340
|
-
languages,
|
|
341
|
-
currentLanguage,
|
|
342
|
-
accountMenuItems,
|
|
343
|
-
hideBreadcrumbs
|
|
344
|
-
}) {
|
|
345
|
-
const SidebarLinkComp = sidebarConfig.linkComponent;
|
|
346
|
-
const hideFooter = footerConfig?.hidden ?? false;
|
|
347
|
-
const darkMode = colorTheme === "dark";
|
|
348
|
-
const contentHeight = hideFooter ? "calc(100vh - var(--espd-header-height) - var(--espd-hidden-footer-height))" : "calc(100vh - var(--espd-header-height) - var(--espd-footer-height))";
|
|
349
|
-
const breadcrumbItems = hideBreadcrumbs ? [] : headerConfig?.breadcrumbs ?? deriveBreadcrumbs(
|
|
350
|
-
sidebarConfig.items,
|
|
351
|
-
sidebarConfig.currentPath,
|
|
352
|
-
sidebarConfig.indexPath
|
|
353
|
-
);
|
|
354
|
-
const defaultMobileLogo = logoAssets ? /* @__PURE__ */ jsx(AppLogo, { logo: logoAssets, darkMode, minimal: true, width: 24 }) : appName ? /* @__PURE__ */ jsx(AppLogo, { name: appName, darkMode, minimal: true, width: 24 }) : null;
|
|
355
|
-
const mobileLogoNode = logoMobile ?? defaultMobileLogo;
|
|
356
|
-
const mobileLogo = mobileLogoNode && sidebarConfig.indexPath ? /* @__PURE__ */ jsx(
|
|
357
|
-
SidebarLinkComp,
|
|
358
|
-
{
|
|
359
|
-
to: sidebarConfig.indexPath,
|
|
360
|
-
className: "no-underline",
|
|
361
|
-
children: mobileLogoNode
|
|
362
|
-
}
|
|
363
|
-
) : mobileLogoNode;
|
|
364
|
-
const headerLeftContent = breadcrumbItems.length > 0 ? /* @__PURE__ */ jsx(
|
|
365
|
-
WorkspaceBreadcrumbs,
|
|
366
|
-
{
|
|
367
|
-
items: breadcrumbItems,
|
|
368
|
-
linkComponent: SidebarLinkComp,
|
|
369
|
-
collapseOnMobile: headerConfig?.collapseBreadcrumbsOnMobile ?? false
|
|
370
|
-
}
|
|
371
|
-
) : null;
|
|
372
|
-
let footerBrandingNode = null;
|
|
373
|
-
if (footerBranding === false) {
|
|
374
|
-
footerBrandingNode = null;
|
|
375
|
-
} else if (footerBranding !== void 0) {
|
|
376
|
-
footerBrandingNode = footerBranding;
|
|
377
|
-
} else if (appName && sidebarConfig.hideCompanyBranding !== true) {
|
|
378
|
-
footerBrandingNode = /* @__PURE__ */ jsx(EspressifFooterBranding, { darkMode });
|
|
379
|
-
}
|
|
380
|
-
const sidebarFooter = sidebarConfig.footer != null || footerBrandingNode != null ? /* @__PURE__ */ jsxs("div", { className: "flex flex-col gap-2 w-full", children: [
|
|
381
|
-
sidebarConfig.footer,
|
|
382
|
-
footerBrandingNode
|
|
383
|
-
] }) : void 0;
|
|
384
|
-
const accountMenu = /* @__PURE__ */ jsx(
|
|
385
|
-
AccountMenu,
|
|
386
|
-
{
|
|
387
|
-
userName: headerConfig?.userName,
|
|
388
|
-
userEmail: headerConfig?.userEmail,
|
|
389
|
-
userProfilePictureUrl: headerConfig?.userProfilePictureUrl,
|
|
390
|
-
avatarBadgeColor: headerConfig?.avatarBadgeColor,
|
|
391
|
-
onLogoutClick,
|
|
392
|
-
onProfileCardClick,
|
|
393
|
-
onColorThemeChange,
|
|
394
|
-
colorTheme,
|
|
395
|
-
onLanguageChange,
|
|
396
|
-
languages,
|
|
397
|
-
currentLanguage,
|
|
398
|
-
additionalItems: accountMenuItems
|
|
399
|
-
}
|
|
400
|
-
);
|
|
401
|
-
return /* @__PURE__ */ jsxs(
|
|
402
|
-
SidebarProvider,
|
|
403
|
-
{
|
|
404
|
-
open: sidebarOpen,
|
|
405
|
-
defaultOpen: defaultSidebarOpen,
|
|
406
|
-
onOpenChange: onSidebarOpenChange,
|
|
407
|
-
children: [
|
|
408
|
-
/* @__PURE__ */ jsx(
|
|
409
|
-
Sidebar2,
|
|
410
|
-
{
|
|
411
|
-
items: sidebarConfig.items,
|
|
412
|
-
currentPath: sidebarConfig.currentPath,
|
|
413
|
-
header: /* @__PURE__ */ jsx(
|
|
414
|
-
SidebarLogo,
|
|
415
|
-
{
|
|
416
|
-
logo,
|
|
417
|
-
logoCollapsed,
|
|
418
|
-
logoAssets,
|
|
419
|
-
appName,
|
|
420
|
-
darkMode,
|
|
421
|
-
indexPath: sidebarConfig.indexPath,
|
|
422
|
-
linkComponent: SidebarLinkComp
|
|
423
|
-
}
|
|
424
|
-
),
|
|
425
|
-
headerHeight: "var(--espd-header-height)",
|
|
426
|
-
footer: sidebarFooter,
|
|
427
|
-
linkComponent: SidebarLinkComp,
|
|
428
|
-
collapsible: sidebarConfig.allowCollapsible ? "icon" : "none",
|
|
429
|
-
variant: sidebarConfig.variant,
|
|
430
|
-
focusActiveGroup: sidebarConfig.focusActiveGroup
|
|
431
|
-
}
|
|
432
|
-
),
|
|
433
|
-
/* @__PURE__ */ jsxs(SidebarInset, { className: "overflow-hidden h-dvh max-h-dvh", children: [
|
|
434
|
-
/* @__PURE__ */ jsx(
|
|
435
|
-
Header,
|
|
436
|
-
{
|
|
437
|
-
leftContent: headerLeftContent,
|
|
438
|
-
rightContent: headerConfig?.rightContent,
|
|
439
|
-
endContent: accountMenu,
|
|
440
|
-
showSidebarTrigger: sidebarConfig.allowCollapsible,
|
|
441
|
-
mobileLogo
|
|
442
|
-
}
|
|
443
|
-
),
|
|
444
|
-
/* @__PURE__ */ jsx(
|
|
445
|
-
"div",
|
|
446
|
-
{
|
|
447
|
-
className: "flex flex-1 flex-col gap-4 bg-sidebar",
|
|
448
|
-
style: {
|
|
449
|
-
paddingTop: "var(--espd-header-height)",
|
|
450
|
-
height: contentHeight
|
|
451
|
-
},
|
|
452
|
-
children: /* @__PURE__ */ jsx("main", { className: "flex-1 bg-background h-full overflow-y-auto md:rounded-tl-2xl md:rounded-bl-2xl pb-10", children })
|
|
453
|
-
}
|
|
454
|
-
),
|
|
455
|
-
/* @__PURE__ */ jsx(Footer, { hidden: hideFooter })
|
|
456
|
-
] })
|
|
457
|
-
]
|
|
458
|
-
}
|
|
459
|
-
);
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
// src/layouts/entry-layout/entry-layout-bg.webp
|
|
463
|
-
var entry_layout_bg_default = "./assets/entry-layout-bg-JPI7GJ42.webp";
|
|
464
|
-
function EntryLayout({
|
|
465
|
-
appName,
|
|
466
|
-
children,
|
|
467
|
-
backgroundImageUrl,
|
|
468
|
-
heading,
|
|
469
|
-
darkMode,
|
|
470
|
-
logo,
|
|
471
|
-
logoAssets,
|
|
472
|
-
customRightPanel,
|
|
473
|
-
disableBackgroundImage,
|
|
474
|
-
hideLogo,
|
|
475
|
-
hideFooter,
|
|
476
|
-
hideRightPanel
|
|
477
|
-
}) {
|
|
478
|
-
const bgImage = backgroundImageUrl ?? (disableBackgroundImage ? void 0 : entry_layout_bg_default);
|
|
479
|
-
const resolvedLogo = logo !== void 0 ? logo : logoAssets ? /* @__PURE__ */ jsx(AppLogo, { logo: logoAssets, darkMode, width: 256 }) : appName ? /* @__PURE__ */ jsx(AppLogo, { name: appName, darkMode, width: 256 }) : null;
|
|
480
|
-
return /* @__PURE__ */ jsxs(
|
|
481
|
-
"div",
|
|
482
|
-
{
|
|
483
|
-
className: `flex h-screen overflow-hidden w-full${hideRightPanel ? " justify-center" : ""}`,
|
|
484
|
-
children: [
|
|
485
|
-
/* @__PURE__ */ jsx("div", { 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", children: /* @__PURE__ */ jsxs("div", { className: "main-content-wrapper h-full flex flex-col justify-center", children: [
|
|
486
|
-
!hideLogo && resolvedLogo !== null && /* @__PURE__ */ jsx("div", { className: "sticky top-0 z-10 shrink-0 flex justify-center py-6 bg-background/75 backdrop-blur-xs w-full logo-wrapper", children: resolvedLogo }),
|
|
487
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
488
|
-
/* @__PURE__ */ jsx("div", { className: "flex-1 flex flex-col items-center justify-center main-content", children }),
|
|
489
|
-
!hideFooter && /* @__PURE__ */ jsx("div", { className: "shrink-0 text-center text-xs text-muted-foreground footer-card-wrapper py-10", children: /* @__PURE__ */ jsx(FooterCard, {}) })
|
|
490
|
-
] })
|
|
491
|
-
] }) }),
|
|
492
|
-
!hideRightPanel && /* @__PURE__ */ jsx(
|
|
493
|
-
"div",
|
|
494
|
-
{
|
|
495
|
-
className: "w-[60%] relative bg-cover bg-center bg-no-repeat max-xl:hidden",
|
|
496
|
-
style: bgImage ? { backgroundImage: `url(${bgImage})` } : void 0,
|
|
497
|
-
children: customRightPanel ? /* @__PURE__ */ jsx("div", { className: "absolute inset-0", children: customRightPanel }) : heading ? /* @__PURE__ */ jsx("div", { className: "absolute inset-0 bg-gradient-to-b from-black/30 to-transparent flex items-center justify-center p-12", children: /* @__PURE__ */ jsx("h1", { className: "text-white text-[3.25rem] leading-[1.25] text-center max-w-full px-6 font-bold tracking-tight", children: typeof heading === "string" ? parseTextMarkup(heading) : heading }) }) : null
|
|
498
|
-
}
|
|
499
|
-
)
|
|
500
|
-
]
|
|
501
|
-
}
|
|
502
|
-
);
|
|
503
|
-
}
|
|
504
|
-
|
|
505
|
-
export { AccountMenu, EntryLayout, Footer, Header, WorkspaceLayout };
|