@ug666/ui-react 0.3.0-beta.1 → 0.3.0-beta.3
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/LICENSE +21 -0
- package/dist/RELEASE_PROVENANCE.json +8 -0
- package/dist/THIRD_PARTY_NOTICES.txt +98 -0
- package/dist/ai/SKILL.md +242 -0
- package/dist/ai/manifest.json +815 -0
- package/dist/ai/references/components/accordion.md +41 -0
- package/dist/ai/references/components/admin-shell.md +27 -0
- package/dist/ai/references/components/alert.md +40 -0
- package/dist/ai/references/components/app-tabs.md +27 -0
- package/dist/ai/references/components/attachment-list.md +27 -0
- package/dist/ai/references/components/autocomplete.md +41 -0
- package/dist/ai/references/components/avatar-group.md +39 -0
- package/dist/ai/references/components/avatar.md +39 -0
- package/dist/ai/references/components/backtop.md +40 -0
- package/dist/ai/references/components/badge.md +43 -0
- package/dist/ai/references/components/bar-chart.md +41 -0
- package/dist/ai/references/components/breadcrumb.md +41 -0
- package/dist/ai/references/components/button.md +39 -0
- package/dist/ai/references/components/calendar.md +42 -0
- package/dist/ai/references/components/card.md +39 -0
- package/dist/ai/references/components/carousel.md +41 -0
- package/dist/ai/references/components/cascader.md +43 -0
- package/dist/ai/references/components/checkbox.md +40 -0
- package/dist/ai/references/components/collapse.md +41 -0
- package/dist/ai/references/components/color-picker.md +42 -0
- package/dist/ai/references/components/config-provider.md +39 -0
- package/dist/ai/references/components/confirm-dialog.md +27 -0
- package/dist/ai/references/components/container.md +39 -0
- package/dist/ai/references/components/context-menu.md +40 -0
- package/dist/ai/references/components/conversation-list.md +27 -0
- package/dist/ai/references/components/copy-field.md +27 -0
- package/dist/ai/references/components/data-panel.md +43 -0
- package/dist/ai/references/components/data-table-identity.md +27 -0
- package/dist/ai/references/components/data-table-toolbar.md +27 -0
- package/dist/ai/references/components/data-table.md +32 -0
- package/dist/ai/references/components/date-picker.md +42 -0
- package/dist/ai/references/components/date-range-picker.md +43 -0
- package/dist/ai/references/components/date-time-picker.md +40 -0
- package/dist/ai/references/components/descriptions.md +40 -0
- package/dist/ai/references/components/dialog.md +40 -0
- package/dist/ai/references/components/dock.md +41 -0
- package/dist/ai/references/components/donut-chart.md +41 -0
- package/dist/ai/references/components/drawer.md +41 -0
- package/dist/ai/references/components/dropdown.md +42 -0
- package/dist/ai/references/components/empty-state.md +40 -0
- package/dist/ai/references/components/fab.md +41 -0
- package/dist/ai/references/components/feature-grid.md +27 -0
- package/dist/ai/references/components/fieldset.md +41 -0
- package/dist/ai/references/components/file-input.md +41 -0
- package/dist/ai/references/components/form.md +42 -0
- package/dist/ai/references/components/gauge-chart.md +41 -0
- package/dist/ai/references/components/heatmap-chart.md +41 -0
- package/dist/ai/references/components/icon.md +39 -0
- package/dist/ai/references/components/image.md +41 -0
- package/dist/ai/references/components/index.md +171 -0
- package/dist/ai/references/components/indicator.md +41 -0
- package/dist/ai/references/components/infinite-scroll.md +42 -0
- package/dist/ai/references/components/input.md +42 -0
- package/dist/ai/references/components/join.md +40 -0
- package/dist/ai/references/components/kbd.md +40 -0
- package/dist/ai/references/components/label.md +39 -0
- package/dist/ai/references/components/landing-hero.md +27 -0
- package/dist/ai/references/components/layout.md +39 -0
- package/dist/ai/references/components/link.md +41 -0
- package/dist/ai/references/components/list.md +41 -0
- package/dist/ai/references/components/loading.md +40 -0
- package/dist/ai/references/components/message.md +27 -0
- package/dist/ai/references/components/modal.md +42 -0
- package/dist/ai/references/components/navbar.md +41 -0
- package/dist/ai/references/components/navigation-menu.md +41 -0
- package/dist/ai/references/components/notification.md +41 -0
- package/dist/ai/references/components/number-input.md +40 -0
- package/dist/ai/references/components/otp-input.md +40 -0
- package/dist/ai/references/components/page-header.md +27 -0
- package/dist/ai/references/components/pagination.md +42 -0
- package/dist/ai/references/components/popconfirm.md +42 -0
- package/dist/ai/references/components/popover.md +41 -0
- package/dist/ai/references/components/progress.md +41 -0
- package/dist/ai/references/components/prompt-composer.md +27 -0
- package/dist/ai/references/components/quick-access.md +30 -0
- package/dist/ai/references/components/radar-chart.md +41 -0
- package/dist/ai/references/components/radial-progress.md +41 -0
- package/dist/ai/references/components/radio.md +40 -0
- package/dist/ai/references/components/ranking-list.md +41 -0
- package/dist/ai/references/components/rating.md +42 -0
- package/dist/ai/references/components/result.md +40 -0
- package/dist/ai/references/components/scrollbar.md +39 -0
- package/dist/ai/references/components/select.md +41 -0
- package/dist/ai/references/components/selection-list.md +29 -0
- package/dist/ai/references/components/separator.md +39 -0
- package/dist/ai/references/components/sheet.md +40 -0
- package/dist/ai/references/components/sidebar.md +46 -0
- package/dist/ai/references/components/skeleton.md +40 -0
- package/dist/ai/references/components/slider.md +40 -0
- package/dist/ai/references/components/space.md +39 -0
- package/dist/ai/references/components/spinner.md +41 -0
- package/dist/ai/references/components/splitter.md +39 -0
- package/dist/ai/references/components/stack.md +41 -0
- package/dist/ai/references/components/stacked-bar-chart.md +41 -0
- package/dist/ai/references/components/statistic-card.md +41 -0
- package/dist/ai/references/components/statistic.md +41 -0
- package/dist/ai/references/components/steps.md +40 -0
- package/dist/ai/references/components/switch.md +40 -0
- package/dist/ai/references/components/table.md +41 -0
- package/dist/ai/references/components/tabs.md +41 -0
- package/dist/ai/references/components/tag.md +39 -0
- package/dist/ai/references/components/text.md +39 -0
- package/dist/ai/references/components/textarea.md +40 -0
- package/dist/ai/references/components/theme-configurator-dialog.md +27 -0
- package/dist/ai/references/components/theme-configurator.md +27 -0
- package/dist/ai/references/components/theme-controller.md +41 -0
- package/dist/ai/references/components/time-picker.md +42 -0
- package/dist/ai/references/components/time-range-picker.md +41 -0
- package/dist/ai/references/components/time-select.md +40 -0
- package/dist/ai/references/components/timeline.md +41 -0
- package/dist/ai/references/components/toast.md +39 -0
- package/dist/ai/references/components/tooltip.md +39 -0
- package/dist/ai/references/components/transfer.md +41 -0
- package/dist/ai/references/components/tree-select.md +45 -0
- package/dist/ai/references/components/tree-table.md +27 -0
- package/dist/ai/references/components/tree.md +43 -0
- package/dist/ai/references/components/trend-chart.md +41 -0
- package/dist/ai/references/components/upload.md +43 -0
- package/dist/ai/references/components.md +97 -0
- package/dist/ai/references/examples/data-table.md +50 -0
- package/dist/ai/references/release.md +158 -0
- package/dist/ai/ui-react.zip +0 -0
- package/dist/aliases.d.ts +62 -14
- package/dist/aliases.d.ts.map +1 -1
- package/dist/blocks/feature-grid.d.ts +8 -0
- package/dist/blocks/feature-grid.d.ts.map +1 -1
- package/dist/blocks/index.cjs +1 -467
- package/dist/blocks/index.cjs.map +1 -1
- package/dist/blocks/index.js +1 -194
- package/dist/blocks/index.js.map +1 -1
- package/dist/blocks/landing-hero.d.ts +6 -0
- package/dist/blocks/landing-hero.d.ts.map +1 -1
- package/dist/chunk-2EJWWTLH.cjs +1 -0
- package/dist/chunk-2EJWWTLH.cjs.map +1 -0
- package/dist/chunk-3A5O2NHW.cjs +1 -0
- package/dist/chunk-3A5O2NHW.cjs.map +1 -0
- package/dist/chunk-3LSTRFSY.js +1 -0
- package/dist/chunk-3LSTRFSY.js.map +1 -0
- package/dist/chunk-AQJWS45G.js +1 -0
- package/dist/chunk-AQJWS45G.js.map +1 -0
- package/dist/chunk-D63UPGP5.cjs +1 -0
- package/dist/chunk-D63UPGP5.cjs.map +1 -0
- package/dist/chunk-DJDACMBD.js +1 -0
- package/dist/chunk-DJDACMBD.js.map +1 -0
- package/dist/chunk-EYSM2SU5.cjs +1 -0
- package/dist/chunk-EYSM2SU5.cjs.map +1 -0
- package/dist/chunk-HCGUPREG.cjs +1 -0
- package/dist/chunk-HCGUPREG.cjs.map +1 -0
- package/dist/chunk-IOUGF444.cjs +1 -0
- package/dist/chunk-IOUGF444.cjs.map +1 -0
- package/dist/chunk-JJQENNZW.cjs +1 -0
- package/dist/chunk-JJQENNZW.cjs.map +1 -0
- package/dist/chunk-KNWHIFJE.js +1 -0
- package/dist/chunk-KNWHIFJE.js.map +1 -0
- package/dist/chunk-PZ4UH6BC.js +1 -0
- package/dist/chunk-PZ4UH6BC.js.map +1 -0
- package/dist/chunk-TWOBEV2L.js +1 -0
- package/dist/chunk-TWOBEV2L.js.map +1 -0
- package/dist/chunk-V4VCVCOX.js +1 -0
- package/dist/chunk-V4VCVCOX.js.map +1 -0
- package/dist/chunk-WQHHSYYD.js +1 -0
- package/dist/chunk-WQHHSYYD.js.map +1 -0
- package/dist/chunk-X4EMYHLY.cjs +1 -0
- package/dist/chunk-X4EMYHLY.cjs.map +1 -0
- package/dist/chunk-XN7GQRSF.js +1 -0
- package/dist/chunk-XN7GQRSF.js.map +1 -0
- package/dist/chunk-YI5JDPI2.cjs +1 -0
- package/dist/chunk-YI5JDPI2.cjs.map +1 -0
- package/dist/components/accordion.d.ts +8 -2
- package/dist/components/accordion.d.ts.map +1 -1
- package/dist/components/alert.d.ts +4 -5
- package/dist/components/alert.d.ts.map +1 -1
- package/dist/components/autocomplete.d.ts +21 -0
- package/dist/components/autocomplete.d.ts.map +1 -0
- package/dist/components/avatar.d.ts +4 -5
- package/dist/components/avatar.d.ts.map +1 -1
- package/dist/components/backtop.d.ts +11 -0
- package/dist/components/backtop.d.ts.map +1 -0
- package/dist/components/badge.d.ts +21 -2
- package/dist/components/badge.d.ts.map +1 -1
- package/dist/components/bar-chart.d.ts +23 -0
- package/dist/components/bar-chart.d.ts.map +1 -0
- package/dist/components/breadcrumb.d.ts +5 -1
- package/dist/components/breadcrumb.d.ts.map +1 -1
- package/dist/components/button-group.d.ts.map +1 -1
- package/dist/components/button.d.ts +12 -7
- package/dist/components/button.d.ts.map +1 -1
- package/dist/components/calendar.d.ts +40 -0
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/card.d.ts +8 -1
- package/dist/components/card.d.ts.map +1 -1
- package/dist/components/carousel.d.ts +29 -0
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/cascader.d.ts +54 -0
- package/dist/components/cascader.d.ts.map +1 -0
- package/dist/components/checkbox-group.d.ts.map +1 -1
- package/dist/components/checkbox.d.ts +4 -2
- package/dist/components/checkbox.d.ts.map +1 -1
- package/dist/components/collapsible.d.ts +23 -0
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/color-picker.d.ts +19 -0
- package/dist/components/color-picker.d.ts.map +1 -0
- package/dist/components/config-provider.d.ts +2 -0
- package/dist/components/config-provider.d.ts.map +1 -1
- package/dist/components/context/form-context.d.ts.map +1 -1
- package/dist/components/context-menu.d.ts +1 -1
- package/dist/components/context-menu.d.ts.map +1 -1
- package/dist/components/data-panel.d.ts +38 -0
- package/dist/components/data-panel.d.ts.map +1 -0
- package/dist/components/date-picker.d.ts +16 -0
- package/dist/components/date-picker.d.ts.map +1 -0
- package/dist/components/date-range-picker.d.ts +42 -0
- package/dist/components/date-range-picker.d.ts.map +1 -0
- package/dist/components/date-time-picker.d.ts +12 -0
- package/dist/components/date-time-picker.d.ts.map +1 -0
- package/dist/components/descriptions.d.ts.map +1 -1
- package/dist/components/dialog.d.ts +9 -0
- package/dist/components/dialog.d.ts.map +1 -1
- package/dist/components/dock.d.ts +29 -0
- package/dist/components/dock.d.ts.map +1 -0
- package/dist/components/donut-chart.d.ts +30 -0
- package/dist/components/donut-chart.d.ts.map +1 -0
- package/dist/components/drawer.d.ts +11 -2
- package/dist/components/drawer.d.ts.map +1 -1
- package/dist/components/dropdown.d.ts +9 -1
- package/dist/components/dropdown.d.ts.map +1 -1
- package/dist/components/empty-state.d.ts +3 -0
- package/dist/components/empty-state.d.ts.map +1 -1
- package/dist/components/fab.d.ts +38 -0
- package/dist/components/fab.d.ts.map +1 -0
- package/dist/components/fieldset.d.ts +13 -0
- package/dist/components/fieldset.d.ts.map +1 -0
- package/dist/components/file-input.d.ts +17 -0
- package/dist/components/file-input.d.ts.map +1 -0
- package/dist/components/form.d.ts +2 -2
- package/dist/components/form.d.ts.map +1 -1
- package/dist/components/gauge-chart.d.ts +19 -0
- package/dist/components/gauge-chart.d.ts.map +1 -0
- package/dist/components/heatmap-chart.d.ts +28 -0
- package/dist/components/heatmap-chart.d.ts.map +1 -0
- package/dist/components/image-viewer.d.ts +15 -0
- package/dist/components/image-viewer.d.ts.map +1 -0
- package/dist/components/image.d.ts +14 -0
- package/dist/components/image.d.ts.map +1 -0
- package/dist/components/index.cjs +1 -8684
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +49 -1
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +1 -391
- package/dist/components/indicator.d.ts +20 -0
- package/dist/components/indicator.d.ts.map +1 -0
- package/dist/components/infinite-scroll.d.ts +20 -0
- package/dist/components/infinite-scroll.d.ts.map +1 -0
- package/dist/components/input.d.ts.map +1 -1
- package/dist/components/join.d.ts +20 -0
- package/dist/components/join.d.ts.map +1 -0
- package/dist/components/kbd.d.ts +8 -0
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/label.d.ts.map +1 -1
- package/dist/components/list.d.ts +21 -0
- package/dist/components/list.d.ts.map +1 -0
- package/dist/components/loading.d.ts +10 -0
- package/dist/components/loading.d.ts.map +1 -0
- package/dist/components/modal.d.ts +20 -3
- package/dist/components/modal.d.ts.map +1 -1
- package/dist/components/navbar.d.ts +23 -0
- package/dist/components/navbar.d.ts.map +1 -0
- package/dist/components/navigation-menu.d.ts +15 -0
- package/dist/components/navigation-menu.d.ts.map +1 -1
- package/dist/components/notification.d.ts +22 -0
- package/dist/components/notification.d.ts.map +1 -0
- package/dist/components/number-input.d.ts +4 -2
- package/dist/components/number-input.d.ts.map +1 -1
- package/dist/components/otp-input.d.ts +13 -3
- package/dist/components/otp-input.d.ts.map +1 -1
- package/dist/components/pagination.d.ts +12 -9
- package/dist/components/pagination.d.ts.map +1 -1
- package/dist/components/popconfirm.d.ts +20 -0
- package/dist/components/popconfirm.d.ts.map +1 -0
- package/dist/components/popover.d.ts +3 -2
- package/dist/components/popover.d.ts.map +1 -1
- package/dist/components/progress.d.ts +9 -0
- package/dist/components/progress.d.ts.map +1 -1
- package/dist/components/radar-chart.d.ts +24 -0
- package/dist/components/radar-chart.d.ts.map +1 -0
- package/dist/components/radial-progress.d.ts +18 -0
- package/dist/components/radial-progress.d.ts.map +1 -0
- package/dist/components/radio.d.ts +15 -6
- package/dist/components/radio.d.ts.map +1 -1
- package/dist/components/ranking-list.d.ts +31 -0
- package/dist/components/ranking-list.d.ts.map +1 -0
- package/dist/components/rating.d.ts +20 -0
- package/dist/components/rating.d.ts.map +1 -0
- package/dist/components/result.d.ts +13 -0
- package/dist/components/result.d.ts.map +1 -0
- package/dist/components/select.d.ts +2 -2
- package/dist/components/select.d.ts.map +1 -1
- package/dist/components/sheet.d.ts +11 -0
- package/dist/components/sheet.d.ts.map +1 -1
- package/dist/components/sidebar.d.ts +46 -10
- package/dist/components/sidebar.d.ts.map +1 -1
- package/dist/components/skeleton.d.ts +4 -5
- package/dist/components/skeleton.d.ts.map +1 -1
- package/dist/components/slider.d.ts.map +1 -1
- package/dist/components/space.d.ts.map +1 -1
- package/dist/components/spinner.d.ts +8 -5
- package/dist/components/spinner.d.ts.map +1 -1
- package/dist/components/splitter.d.ts +1 -0
- package/dist/components/splitter.d.ts.map +1 -1
- package/dist/components/stack.d.ts +16 -0
- package/dist/components/stack.d.ts.map +1 -0
- package/dist/components/stacked-bar-chart.d.ts +25 -0
- package/dist/components/stacked-bar-chart.d.ts.map +1 -0
- package/dist/components/statistic-card.d.ts +50 -0
- package/dist/components/statistic-card.d.ts.map +1 -0
- package/dist/components/statistic.d.ts +6 -1
- package/dist/components/statistic.d.ts.map +1 -1
- package/dist/components/steps.d.ts +3 -1
- package/dist/components/steps.d.ts.map +1 -1
- package/dist/components/switch.d.ts.map +1 -1
- package/dist/components/table.d.ts +15 -1
- package/dist/components/table.d.ts.map +1 -1
- package/dist/components/tabs.d.ts +13 -0
- package/dist/components/tabs.d.ts.map +1 -1
- package/dist/components/tag.d.ts +9 -4
- package/dist/components/tag.d.ts.map +1 -1
- package/dist/components/text.d.ts.map +1 -1
- package/dist/components/textarea.d.ts.map +1 -1
- package/dist/components/theme-controller.d.ts +24 -0
- package/dist/components/theme-controller.d.ts.map +1 -0
- package/dist/components/time-picker.d.ts +8 -0
- package/dist/components/time-picker.d.ts.map +1 -0
- package/dist/components/time-range-picker.d.ts +30 -0
- package/dist/components/time-range-picker.d.ts.map +1 -0
- package/dist/components/time-select.d.ts +15 -0
- package/dist/components/time-select.d.ts.map +1 -0
- package/dist/components/timeline.d.ts +22 -0
- package/dist/components/timeline.d.ts.map +1 -0
- package/dist/components/toast.d.ts +52 -6
- package/dist/components/toast.d.ts.map +1 -1
- package/dist/components/tooltip.d.ts +5 -2
- package/dist/components/tooltip.d.ts.map +1 -1
- package/dist/components/transfer.d.ts +51 -0
- package/dist/components/transfer.d.ts.map +1 -0
- package/dist/components/tree-select.d.ts +29 -0
- package/dist/components/tree-select.d.ts.map +1 -0
- package/dist/components/tree.d.ts +56 -0
- package/dist/components/tree.d.ts.map +1 -0
- package/dist/components/trend-chart.d.ts +43 -0
- package/dist/components/trend-chart.d.ts.map +1 -0
- package/dist/components/upload.d.ts +28 -0
- package/dist/components/upload.d.ts.map +1 -0
- package/dist/essentials.cjs +1 -0
- package/dist/essentials.cjs.map +1 -0
- package/dist/essentials.css +2 -0
- package/dist/essentials.d.ts +9 -0
- package/dist/essentials.d.ts.map +1 -0
- package/dist/essentials.js +1 -0
- package/dist/essentials.js.map +1 -0
- package/dist/hooks/index.cjs +1 -553
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.js +1 -32
- package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -1
- package/dist/hooks/use-escape-key.d.ts +8 -1
- package/dist/hooks/use-escape-key.d.ts.map +1 -1
- package/dist/hooks/use-event-listener.d.ts +6 -7
- package/dist/hooks/use-event-listener.d.ts.map +1 -1
- package/dist/hooks/use-form.d.ts +17 -16
- package/dist/hooks/use-form.d.ts.map +1 -1
- package/dist/hooks/use-local-storage.d.ts.map +1 -1
- package/dist/hooks/use-media-query.d.ts.map +1 -1
- package/dist/hooks/use-pagination.d.ts.map +1 -1
- package/dist/index.cjs +1 -9206
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +64 -17
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -419
- package/dist/internal/data-table-header.d.ts +20 -0
- package/dist/internal/data-table-header.d.ts.map +1 -0
- package/dist/internal/date-time/date-mode-panel.d.ts +9 -0
- package/dist/internal/date-time/date-mode-panel.d.ts.map +1 -0
- package/dist/internal/date-time/date-time-control.d.ts +33 -0
- package/dist/internal/date-time/date-time-control.d.ts.map +1 -0
- package/dist/internal/date-time/date-time-range-control.d.ts +27 -0
- package/dist/internal/date-time/date-time-range-control.d.ts.map +1 -0
- package/dist/internal/date-time/time-panel.d.ts +8 -0
- package/dist/internal/date-time/time-panel.d.ts.map +1 -0
- package/dist/internal/navigation/admin-horizontal-navigation.d.ts +9 -0
- package/dist/internal/navigation/admin-horizontal-navigation.d.ts.map +1 -0
- package/dist/internal/navigation/sidebar-navigation.d.ts +55 -0
- package/dist/internal/navigation/sidebar-navigation.d.ts.map +1 -0
- package/dist/internal/overlay/use-floating-layout-observer.d.ts +8 -0
- package/dist/internal/overlay/use-floating-layout-observer.d.ts.map +1 -0
- package/dist/internal/overlay/use-overlay-focus.d.ts +9 -0
- package/dist/internal/overlay/use-overlay-focus.d.ts.map +1 -0
- package/dist/internal/overlay/use-portal-container.d.ts.map +1 -0
- package/dist/internal/overlay/use-presence.d.ts +13 -0
- package/dist/internal/overlay/use-presence.d.ts.map +1 -0
- package/dist/internal/selection/option-window.d.ts +9 -0
- package/dist/internal/selection/option-window.d.ts.map +1 -0
- package/dist/internal/selection/use-cascader-lazy.d.ts +8 -0
- package/dist/internal/selection/use-cascader-lazy.d.ts.map +1 -0
- package/dist/internal/selection/use-transfer-remote.d.ts +20 -0
- package/dist/internal/selection/use-transfer-remote.d.ts.map +1 -0
- package/dist/internal/selection/use-tree-data.d.ts +8 -0
- package/dist/internal/selection/use-tree-data.d.ts.map +1 -0
- package/dist/patterns/admin-shell.d.ts +68 -2
- package/dist/patterns/admin-shell.d.ts.map +1 -1
- package/dist/patterns/app-tabs.d.ts +33 -0
- package/dist/patterns/app-tabs.d.ts.map +1 -0
- package/dist/patterns/attachment-list.d.ts +36 -0
- package/dist/patterns/attachment-list.d.ts.map +1 -0
- package/dist/patterns/confirm-dialog.d.ts.map +1 -1
- package/dist/patterns/conversation-list.d.ts +27 -0
- package/dist/patterns/conversation-list.d.ts.map +1 -0
- package/dist/patterns/copy-field.d.ts +6 -0
- package/dist/patterns/copy-field.d.ts.map +1 -1
- package/dist/patterns/data-table-identity.d.ts +14 -0
- package/dist/patterns/data-table-identity.d.ts.map +1 -0
- package/dist/patterns/data-table-toolbar.d.ts +18 -0
- package/dist/patterns/data-table-toolbar.d.ts.map +1 -0
- package/dist/patterns/data-table.d.ts +69 -0
- package/dist/patterns/data-table.d.ts.map +1 -0
- package/dist/patterns/index.cjs +1 -1206
- package/dist/patterns/index.cjs.map +1 -1
- package/dist/patterns/index.d.ts +14 -1
- package/dist/patterns/index.d.ts.map +1 -1
- package/dist/patterns/index.js +1 -375
- package/dist/patterns/index.js.map +1 -1
- package/dist/patterns/message.d.ts +30 -0
- package/dist/patterns/message.d.ts.map +1 -0
- package/dist/patterns/page-header.d.ts +4 -0
- package/dist/patterns/page-header.d.ts.map +1 -1
- package/dist/patterns/prompt-composer.d.ts +55 -0
- package/dist/patterns/prompt-composer.d.ts.map +1 -0
- package/dist/patterns/quick-access.d.ts +39 -0
- package/dist/patterns/quick-access.d.ts.map +1 -0
- package/dist/patterns/selection-list.d.ts +34 -0
- package/dist/patterns/selection-list.d.ts.map +1 -0
- package/dist/patterns/theme-configurator-dialog.d.ts +21 -0
- package/dist/patterns/theme-configurator-dialog.d.ts.map +1 -0
- package/dist/patterns/theme-configurator.d.ts +24 -0
- package/dist/patterns/theme-configurator.d.ts.map +1 -0
- package/dist/patterns/tree-table.d.ts +18 -0
- package/dist/patterns/tree-table.d.ts.map +1 -0
- package/dist/primitives/index.cjs +1 -2161
- package/dist/primitives/index.cjs.map +1 -1
- package/dist/primitives/index.d.ts +6 -2
- package/dist/primitives/index.d.ts.map +1 -1
- package/dist/primitives/index.js +1 -107
- package/dist/styles.css +1 -4364
- package/dist/theme.cjs +1 -161
- package/dist/theme.cjs.map +1 -1
- package/dist/theme.d.ts +7 -0
- package/dist/theme.d.ts.map +1 -1
- package/dist/theme.js +1 -19
- package/dist/themes/default.css +1 -80
- package/dist/themes/mecha.css +1 -195
- package/dist/themes/minimal.css +1 -160
- package/dist/tokens.css +1 -1240
- package/package.json +21 -17
- package/dist/chunk-AKWJMDCW.js +0 -467
- package/dist/chunk-AKWJMDCW.js.map +0 -1
- package/dist/chunk-F23X4N6B.js +0 -11
- package/dist/chunk-F23X4N6B.js.map +0 -1
- package/dist/chunk-HGO3GZ56.js +0 -1777
- package/dist/chunk-HGO3GZ56.js.map +0 -1
- package/dist/chunk-HXIWD5LQ.js +0 -319
- package/dist/chunk-HXIWD5LQ.js.map +0 -1
- package/dist/chunk-M6J4PLF4.js +0 -521
- package/dist/chunk-M6J4PLF4.js.map +0 -1
- package/dist/chunk-N3Z7R6GG.js +0 -139
- package/dist/chunk-N3Z7R6GG.js.map +0 -1
- package/dist/chunk-UXWCK6M7.js +0 -5757
- package/dist/chunk-UXWCK6M7.js.map +0 -1
- package/dist/internal/use-overlay-focus.d.ts +0 -8
- package/dist/internal/use-overlay-focus.d.ts.map +0 -1
- package/dist/internal/use-portal-container.d.ts.map +0 -1
- package/dist/labs/file-preview.d.ts +0 -44
- package/dist/labs/file-preview.d.ts.map +0 -1
- package/dist/labs/index.cjs +0 -224
- package/dist/labs/index.cjs.map +0 -1
- package/dist/labs/index.d.ts +0 -14
- package/dist/labs/index.d.ts.map +0 -1
- package/dist/labs/index.js +0 -188
- package/dist/labs/index.js.map +0 -1
- package/dist/labs/model-card.d.ts +0 -50
- package/dist/labs/model-card.d.ts.map +0 -1
- /package/dist/internal/{use-portal-container.d.ts → overlay/use-portal-container.d.ts} +0 -0
package/dist/patterns/index.cjs
CHANGED
|
@@ -1,1206 +1 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
"use client";
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7
|
-
var __export = (target, all) => {
|
|
8
|
-
for (var name in all)
|
|
9
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
10
|
-
};
|
|
11
|
-
var __copyProps = (to, from, except, desc) => {
|
|
12
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13
|
-
for (let key of __getOwnPropNames(from))
|
|
14
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
15
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
16
|
-
}
|
|
17
|
-
return to;
|
|
18
|
-
};
|
|
19
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
20
|
-
|
|
21
|
-
// src/patterns/index.ts
|
|
22
|
-
var patterns_exports = {};
|
|
23
|
-
__export(patterns_exports, {
|
|
24
|
-
AdminShell: () => AdminShell,
|
|
25
|
-
ConfirmDialog: () => ConfirmDialog,
|
|
26
|
-
CopyField: () => CopyField,
|
|
27
|
-
PageHeader: () => PageHeader,
|
|
28
|
-
UGAdminShell: () => AdminShell,
|
|
29
|
-
UGConfirmDialog: () => ConfirmDialog,
|
|
30
|
-
UGCopyField: () => CopyField,
|
|
31
|
-
UGPageHeader: () => PageHeader
|
|
32
|
-
});
|
|
33
|
-
module.exports = __toCommonJS(patterns_exports);
|
|
34
|
-
|
|
35
|
-
// src/patterns/admin-shell.tsx
|
|
36
|
-
var import_react5 = require("react");
|
|
37
|
-
var import_lucide_react3 = require("lucide-react");
|
|
38
|
-
|
|
39
|
-
// src/components/button.tsx
|
|
40
|
-
var import_react3 = require("react");
|
|
41
|
-
var import_lucide_react = require("lucide-react");
|
|
42
|
-
var import_class_variance_authority = require("class-variance-authority");
|
|
43
|
-
|
|
44
|
-
// src/internal/cn.ts
|
|
45
|
-
var import_clsx = require("clsx");
|
|
46
|
-
var import_tailwind_merge = require("tailwind-merge");
|
|
47
|
-
function cn(...inputs) {
|
|
48
|
-
return (0, import_tailwind_merge.twMerge)((0, import_clsx.clsx)(inputs));
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// src/internal/button-group-context.ts
|
|
52
|
-
var import_react = require("react");
|
|
53
|
-
var ButtonGroupContext = (0, import_react.createContext)({});
|
|
54
|
-
var ButtonGroupProvider = ButtonGroupContext.Provider;
|
|
55
|
-
function useButtonGroup() {
|
|
56
|
-
return (0, import_react.useContext)(ButtonGroupContext);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
// src/components/config-provider.tsx
|
|
60
|
-
var import_react2 = require("react");
|
|
61
|
-
var import_jsx_runtime = require("react/jsx-runtime");
|
|
62
|
-
function resolveDisabled(disabled, configDisabled) {
|
|
63
|
-
return disabled ?? configDisabled;
|
|
64
|
-
}
|
|
65
|
-
var defaultConfig = {
|
|
66
|
-
namespace: "ug",
|
|
67
|
-
size: "medium",
|
|
68
|
-
disabled: false,
|
|
69
|
-
button: {},
|
|
70
|
-
link: {}
|
|
71
|
-
};
|
|
72
|
-
var ConfigContext = (0, import_react2.createContext)(defaultConfig);
|
|
73
|
-
function useUIConfig() {
|
|
74
|
-
return (0, import_react2.useContext)(ConfigContext);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
// src/components/button.tsx
|
|
78
|
-
var import_jsx_runtime2 = require("react/jsx-runtime");
|
|
79
|
-
var buttonVariants = (0, import_class_variance_authority.cva)(
|
|
80
|
-
"inline-flex items-center justify-center gap-[var(--button-icon-gap)] whitespace-nowrap border-solid border-transparent font-[var(--button-font-weight)] transition-[background,border-color,color,box-shadow,opacity] duration-[var(--motion-duration-base)] ease-[var(--motion-easing-standard)] motion-reduce:transition-none focus-visible:outline-none focus-visible:ring-[length:var(--button-focus-ring-width)] focus-visible:ring-primary focus-visible:ring-offset-[length:var(--button-focus-ring-offset)] disabled:pointer-events-none disabled:cursor-not-allowed select-none",
|
|
81
|
-
{
|
|
82
|
-
variants: {
|
|
83
|
-
variant: {
|
|
84
|
-
solid: "",
|
|
85
|
-
soft: "",
|
|
86
|
-
// 蓝绿主按钮
|
|
87
|
-
primary: "bg-[var(--button-primary-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-primary-solid-hover)] active:bg-[var(--button-primary-solid-active)] focus-visible:ring-primary",
|
|
88
|
-
// 成功绿按钮 (主流框架标准绿)
|
|
89
|
-
success: "bg-[var(--button-success-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-success-solid-hover)] active:bg-[var(--button-success-solid-active)] focus-visible:ring-success",
|
|
90
|
-
// 警告黄/橙按钮 (主流框架标准橙)
|
|
91
|
-
warning: "bg-[var(--button-warning-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-warning-solid-hover)] active:bg-[var(--button-warning-solid-active)] focus-visible:ring-warning",
|
|
92
|
-
// 危险红按钮 (主流框架标准红)
|
|
93
|
-
danger: "bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger",
|
|
94
|
-
destructive: "bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger",
|
|
95
|
-
// 信息蓝按钮 (主流框架标准蓝)
|
|
96
|
-
info: "bg-[var(--button-info-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-info-solid-hover)] active:bg-[var(--button-info-solid-active)] focus-visible:ring-info",
|
|
97
|
-
// 默认按钮:经典白底/浅灰底 + 1px 标准边框,Hover 时变主色
|
|
98
|
-
default: "border-border-base bg-surface-1 text-text-primary shadow-xs hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40",
|
|
99
|
-
outline: "bg-transparent",
|
|
100
|
-
// 次要按钮:柔和背景
|
|
101
|
-
secondary: "border-border-base bg-surface-2 text-text-primary shadow-xs hover:bg-surface-3 active:bg-surface-3 focus-visible:ring-primary/40",
|
|
102
|
-
// 虚线按钮:标准 1px 虚线框
|
|
103
|
-
dashed: "border-dashed bg-transparent",
|
|
104
|
-
// 幽灵与文本按钮的视觉由语义色映射控制
|
|
105
|
-
ghost: "",
|
|
106
|
-
text: "",
|
|
107
|
-
link: ""
|
|
108
|
-
},
|
|
109
|
-
size: {
|
|
110
|
-
default: "h-[var(--control-height-md)] px-[var(--control-padding-x-md)] py-0",
|
|
111
|
-
sm: "h-[var(--control-height-sm)] px-[var(--control-padding-x-sm)] py-0",
|
|
112
|
-
lg: "h-[var(--control-height-lg)] px-[var(--control-padding-x-lg)] py-0",
|
|
113
|
-
icon: "h-[var(--control-height-md)] w-[var(--control-height-md)] p-0"
|
|
114
|
-
},
|
|
115
|
-
shape: {
|
|
116
|
-
default: "rounded-[var(--radius-control)]",
|
|
117
|
-
circle: "!rounded-full !p-0 aspect-square",
|
|
118
|
-
round: "!rounded-full"
|
|
119
|
-
},
|
|
120
|
-
block: {
|
|
121
|
-
true: "w-full flex",
|
|
122
|
-
false: ""
|
|
123
|
-
}
|
|
124
|
-
},
|
|
125
|
-
defaultVariants: {
|
|
126
|
-
variant: "default",
|
|
127
|
-
size: "default",
|
|
128
|
-
shape: "default",
|
|
129
|
-
block: false
|
|
130
|
-
}
|
|
131
|
-
}
|
|
132
|
-
);
|
|
133
|
-
var TONE_VARIANT_CLASSES = {
|
|
134
|
-
neutral: {
|
|
135
|
-
solid: "border-border-strong bg-surface-3 text-text-primary shadow-xs hover:bg-surface-2 active:bg-surface-3 focus-visible:ring-primary/40",
|
|
136
|
-
soft: "bg-surface-2 text-text-primary shadow-xs hover:bg-surface-3 active:bg-surface-3 focus-visible:ring-primary/40",
|
|
137
|
-
outline: "border-border-strong bg-transparent text-text-primary shadow-xs hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40",
|
|
138
|
-
dashed: "border-border-strong text-text-primary hover:border-primary active:bg-surface-2 focus-visible:ring-primary/40",
|
|
139
|
-
ghost: "text-text-primary hover:bg-surface-2 active:bg-surface-3 focus-visible:ring-primary/40",
|
|
140
|
-
text: "text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-primary/40",
|
|
141
|
-
link: "text-text-primary focus-visible:ring-primary/40"
|
|
142
|
-
},
|
|
143
|
-
primary: {
|
|
144
|
-
solid: "bg-[var(--button-primary-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-primary-solid-hover)] active:bg-[var(--button-primary-solid-active)] focus-visible:ring-primary",
|
|
145
|
-
soft: "bg-primary-soft text-text-primary hover:shadow-sm active:bg-primary-soft focus-visible:ring-primary/40",
|
|
146
|
-
outline: "border-primary bg-transparent text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40",
|
|
147
|
-
dashed: "border-primary text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40",
|
|
148
|
-
ghost: "text-text-primary hover:bg-primary-soft active:bg-primary-soft focus-visible:ring-primary/40",
|
|
149
|
-
text: "text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-primary/40",
|
|
150
|
-
link: "text-text-primary focus-visible:ring-primary/40"
|
|
151
|
-
},
|
|
152
|
-
success: {
|
|
153
|
-
solid: "bg-[var(--button-success-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-success-solid-hover)] active:bg-[var(--button-success-solid-active)] focus-visible:ring-success",
|
|
154
|
-
soft: "bg-success-soft text-text-primary hover:shadow-sm active:bg-success-soft focus-visible:ring-success/40",
|
|
155
|
-
outline: "border-success bg-transparent text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40",
|
|
156
|
-
dashed: "border-success text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40",
|
|
157
|
-
ghost: "text-text-primary hover:bg-success-soft active:bg-success-soft focus-visible:ring-success/40",
|
|
158
|
-
text: "text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-success/40",
|
|
159
|
-
link: "text-text-primary focus-visible:ring-success/40"
|
|
160
|
-
},
|
|
161
|
-
warning: {
|
|
162
|
-
solid: "bg-[var(--button-warning-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-warning-solid-hover)] active:bg-[var(--button-warning-solid-active)] focus-visible:ring-warning",
|
|
163
|
-
soft: "bg-warning-soft text-text-primary hover:shadow-sm active:bg-warning-soft focus-visible:ring-warning/40",
|
|
164
|
-
outline: "border-warning bg-transparent text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40",
|
|
165
|
-
dashed: "border-warning text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40",
|
|
166
|
-
ghost: "text-text-primary hover:bg-warning-soft active:bg-warning-soft focus-visible:ring-warning/40",
|
|
167
|
-
text: "text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-warning/40",
|
|
168
|
-
link: "text-text-primary focus-visible:ring-warning/40"
|
|
169
|
-
},
|
|
170
|
-
danger: {
|
|
171
|
-
solid: "bg-[var(--button-danger-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-danger-solid-hover)] active:bg-[var(--button-danger-solid-active)] focus-visible:ring-danger",
|
|
172
|
-
soft: "bg-danger-soft text-text-primary hover:shadow-sm active:bg-danger-soft focus-visible:ring-danger/40",
|
|
173
|
-
outline: "border-danger bg-transparent text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40",
|
|
174
|
-
dashed: "border-danger text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40",
|
|
175
|
-
ghost: "text-text-primary hover:bg-danger-soft active:bg-danger-soft focus-visible:ring-danger/40",
|
|
176
|
-
text: "text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-danger/40",
|
|
177
|
-
link: "text-text-primary focus-visible:ring-danger/40"
|
|
178
|
-
},
|
|
179
|
-
info: {
|
|
180
|
-
solid: "bg-[var(--button-info-solid)] text-[hsl(var(--button-solid-fg))] shadow-xs hover:bg-[var(--button-info-solid-hover)] active:bg-[var(--button-info-solid-active)] focus-visible:ring-info",
|
|
181
|
-
soft: "bg-info-soft text-text-primary hover:shadow-sm active:bg-info-soft focus-visible:ring-info/40",
|
|
182
|
-
outline: "border-info bg-transparent text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40",
|
|
183
|
-
dashed: "border-info text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40",
|
|
184
|
-
ghost: "text-text-primary hover:bg-info-soft active:bg-info-soft focus-visible:ring-info/40",
|
|
185
|
-
text: "text-text-primary hover:opacity-80 active:opacity-70 focus-visible:ring-info/40",
|
|
186
|
-
link: "text-text-primary focus-visible:ring-info/40"
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
var VARIANT_LAYOUT_CLASSES = {
|
|
190
|
-
text: "px-[var(--control-padding-x-sm)]",
|
|
191
|
-
link: "h-auto p-0 underline-offset-4 hover:underline"
|
|
192
|
-
};
|
|
193
|
-
var CONFIG_SIZE_TO_BUTTON_SIZE = {
|
|
194
|
-
small: "sm",
|
|
195
|
-
medium: "default",
|
|
196
|
-
large: "lg"
|
|
197
|
-
};
|
|
198
|
-
var LEGACY_VARIANT_TONES = {
|
|
199
|
-
primary: "primary",
|
|
200
|
-
success: "success",
|
|
201
|
-
warning: "warning",
|
|
202
|
-
danger: "danger",
|
|
203
|
-
destructive: "danger",
|
|
204
|
-
info: "info"
|
|
205
|
-
};
|
|
206
|
-
function isToneVariant(variant) {
|
|
207
|
-
return ["solid", "soft", "outline", "dashed", "ghost", "text", "link"].includes(variant);
|
|
208
|
-
}
|
|
209
|
-
function getButtonState(loading, disabled) {
|
|
210
|
-
const states = [];
|
|
211
|
-
if (loading) states.push("loading");
|
|
212
|
-
if (disabled || loading) states.push("disabled");
|
|
213
|
-
return states.length > 0 ? states.join(" ") : void 0;
|
|
214
|
-
}
|
|
215
|
-
var Button = (0, import_react3.forwardRef)(
|
|
216
|
-
({
|
|
217
|
-
className,
|
|
218
|
-
variant,
|
|
219
|
-
tone,
|
|
220
|
-
size,
|
|
221
|
-
shape,
|
|
222
|
-
block,
|
|
223
|
-
loading = false,
|
|
224
|
-
loadingText,
|
|
225
|
-
loadingIcon,
|
|
226
|
-
loadingPlacement = "start",
|
|
227
|
-
disabled,
|
|
228
|
-
type = "button",
|
|
229
|
-
style,
|
|
230
|
-
children,
|
|
231
|
-
...props
|
|
232
|
-
}, ref) => {
|
|
233
|
-
const group = useButtonGroup();
|
|
234
|
-
const config = useUIConfig();
|
|
235
|
-
const resolvedVariant = variant ?? group.variant ?? config.button.variant ?? "default";
|
|
236
|
-
const resolvedTone = tone ?? group.tone ?? config.button.tone ?? LEGACY_VARIANT_TONES[resolvedVariant] ?? (resolvedVariant === "solid" || resolvedVariant === "soft" ? "primary" : "neutral");
|
|
237
|
-
const resolvedSize = size ?? group.size ?? CONFIG_SIZE_TO_BUTTON_SIZE[config.size];
|
|
238
|
-
const resolvedShape = shape ?? group.shape ?? config.button.shape ?? "default";
|
|
239
|
-
const resolvedDisabled = resolveDisabled(
|
|
240
|
-
disabled,
|
|
241
|
-
group.disabled ?? config.disabled
|
|
242
|
-
);
|
|
243
|
-
const state = getButtonState(loading, resolvedDisabled);
|
|
244
|
-
const loader = loadingIcon ?? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_lucide_react.Loader2, { className: "animate-spin motion-reduce:animate-none", size: resolvedSize === "sm" ? 14 : 16 });
|
|
245
|
-
const label = loading && loadingText !== void 0 ? loadingText : children;
|
|
246
|
-
const toneClasses = isToneVariant(resolvedVariant) ? TONE_VARIANT_CLASSES[resolvedTone][resolvedVariant] : void 0;
|
|
247
|
-
const loaderNode = loading ? /* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "data-ug-slot": "loader", className: "inline-flex shrink-0 items-center justify-center", "aria-hidden": "true", children: loader }) : null;
|
|
248
|
-
return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
|
|
249
|
-
"button",
|
|
250
|
-
{
|
|
251
|
-
ref,
|
|
252
|
-
...props,
|
|
253
|
-
type,
|
|
254
|
-
style: { fontWeight: "var(--button-font-weight)", ...style },
|
|
255
|
-
className: cn(
|
|
256
|
-
buttonVariants({
|
|
257
|
-
variant: resolvedVariant,
|
|
258
|
-
size: resolvedSize,
|
|
259
|
-
shape: resolvedShape,
|
|
260
|
-
block
|
|
261
|
-
}),
|
|
262
|
-
toneClasses,
|
|
263
|
-
VARIANT_LAYOUT_CLASSES[resolvedVariant],
|
|
264
|
-
className
|
|
265
|
-
),
|
|
266
|
-
disabled: resolvedDisabled || loading,
|
|
267
|
-
"aria-busy": loading || void 0,
|
|
268
|
-
"data-ug": "button",
|
|
269
|
-
"data-state": state,
|
|
270
|
-
"data-variant": resolvedVariant,
|
|
271
|
-
"data-tone": resolvedTone,
|
|
272
|
-
"data-size": resolvedSize,
|
|
273
|
-
"data-shape": resolvedShape,
|
|
274
|
-
"data-block": block ? "true" : void 0,
|
|
275
|
-
"data-ug-namespace": config.namespace,
|
|
276
|
-
children: [
|
|
277
|
-
loadingPlacement === "start" ? loaderNode : null,
|
|
278
|
-
/* @__PURE__ */ (0, import_jsx_runtime2.jsx)("span", { "data-ug-slot": "label", className: "inline-flex min-w-0 items-center justify-center gap-[var(--button-icon-gap)]", children: label }),
|
|
279
|
-
loadingPlacement === "end" ? loaderNode : null
|
|
280
|
-
]
|
|
281
|
-
}
|
|
282
|
-
);
|
|
283
|
-
}
|
|
284
|
-
);
|
|
285
|
-
Button.displayName = "Button";
|
|
286
|
-
|
|
287
|
-
// src/components/sidebar.tsx
|
|
288
|
-
var import_react4 = require("react");
|
|
289
|
-
var import_lucide_react2 = require("lucide-react");
|
|
290
|
-
var import_jsx_runtime3 = require("react/jsx-runtime");
|
|
291
|
-
var variantStyles = {
|
|
292
|
-
primary: {
|
|
293
|
-
container: "border-r border-border-base bg-surface-1 text-text-primary shadow-sm",
|
|
294
|
-
active: "bg-primary/10 text-primary-soft-fg shadow-sm ring-1 ring-primary/20 before:absolute before:left-0 before:top-1/2 before:h-[calc(var(--control-height-md)*0.6)] before:w-[3px] before:-translate-y-1/2 before:bg-primary before:[border-bottom-right-radius:var(--radius-control)] before:[border-top-right-radius:var(--radius-control)]",
|
|
295
|
-
inactive: "text-text-secondary hover:bg-surface-2 hover:text-text-primary",
|
|
296
|
-
divider: "border-border-base",
|
|
297
|
-
icon: "bg-transparent text-text-tertiary group-hover:bg-surface-3 group-hover:text-primary",
|
|
298
|
-
activeIcon: "bg-primary/15 text-primary-soft-fg"
|
|
299
|
-
},
|
|
300
|
-
dark: {
|
|
301
|
-
container: "border-r border-border-base bg-surface-1 text-text-primary shadow-sm",
|
|
302
|
-
active: "bg-primary/10 text-primary-soft-fg shadow-sm ring-1 ring-primary/20 before:absolute before:left-0 before:top-1/2 before:h-[calc(var(--control-height-md)*0.6)] before:w-[3px] before:-translate-y-1/2 before:bg-primary before:[border-bottom-right-radius:var(--radius-control)] before:[border-top-right-radius:var(--radius-control)]",
|
|
303
|
-
inactive: "text-text-secondary hover:bg-surface-2 hover:text-text-primary",
|
|
304
|
-
divider: "border-border-base",
|
|
305
|
-
icon: "bg-transparent text-text-tertiary group-hover:bg-surface-3 group-hover:text-primary",
|
|
306
|
-
activeIcon: "bg-primary/15 text-primary-soft-fg"
|
|
307
|
-
}
|
|
308
|
-
};
|
|
309
|
-
function getItemKey(item, index, parentKey) {
|
|
310
|
-
return item.id ?? item.href ?? `${parentKey}-${index}-${item.label}`;
|
|
311
|
-
}
|
|
312
|
-
function itemHasActiveChild(item) {
|
|
313
|
-
return Boolean(item.children?.some((child) => child.active || itemHasActiveChild(child)));
|
|
314
|
-
}
|
|
315
|
-
function normalizeSearch(value) {
|
|
316
|
-
return value.toLowerCase().replace(/\s+/g, "");
|
|
317
|
-
}
|
|
318
|
-
function filterSidebarItems(items, query) {
|
|
319
|
-
if (!query) return items;
|
|
320
|
-
return items.reduce((result, item) => {
|
|
321
|
-
const children = item.children ? filterSidebarItems(item.children, query) : [];
|
|
322
|
-
const matched = normalizeSearch(item.label).includes(query);
|
|
323
|
-
if (matched || children.length > 0) {
|
|
324
|
-
result.push({ ...item, children });
|
|
325
|
-
}
|
|
326
|
-
return result;
|
|
327
|
-
}, []);
|
|
328
|
-
}
|
|
329
|
-
var Sidebar = (0, import_react4.forwardRef)(
|
|
330
|
-
({
|
|
331
|
-
items,
|
|
332
|
-
variant = "primary",
|
|
333
|
-
collapsed,
|
|
334
|
-
defaultCollapsed = false,
|
|
335
|
-
onCollapsedChange,
|
|
336
|
-
collapsible = false,
|
|
337
|
-
searchable = false,
|
|
338
|
-
searchPlaceholder = "\u641C\u7D22\u83DC\u5355...",
|
|
339
|
-
responsive = false,
|
|
340
|
-
mobileOpen = false,
|
|
341
|
-
onMobileOpenChange,
|
|
342
|
-
header,
|
|
343
|
-
footer,
|
|
344
|
-
className,
|
|
345
|
-
...props
|
|
346
|
-
}, ref) => {
|
|
347
|
-
const styles = variantStyles[variant];
|
|
348
|
-
const instanceId = `ug-sidebar-${(0, import_react4.useId)().replace(/:/g, "")}`;
|
|
349
|
-
const searchId = `${instanceId}-search`;
|
|
350
|
-
const [internalCollapsed, setInternalCollapsed] = (0, import_react4.useState)(defaultCollapsed);
|
|
351
|
-
const [expandedKeys, setExpandedKeys] = (0, import_react4.useState)(() => /* @__PURE__ */ new Set());
|
|
352
|
-
const [query, setQuery] = (0, import_react4.useState)("");
|
|
353
|
-
const effectiveCollapsed = collapsed ?? internalCollapsed;
|
|
354
|
-
const normalizedQuery = normalizeSearch(query);
|
|
355
|
-
const visibleItems = (0, import_react4.useMemo)(() => filterSidebarItems(items, normalizedQuery), [items, normalizedQuery]);
|
|
356
|
-
function setCollapsedState(nextCollapsed) {
|
|
357
|
-
setInternalCollapsed(nextCollapsed);
|
|
358
|
-
onCollapsedChange?.(nextCollapsed);
|
|
359
|
-
}
|
|
360
|
-
function toggleExpanded(key) {
|
|
361
|
-
setExpandedKeys((current) => {
|
|
362
|
-
const next = new Set(current);
|
|
363
|
-
if (next.has(key)) {
|
|
364
|
-
next.delete(key);
|
|
365
|
-
} else {
|
|
366
|
-
next.add(key);
|
|
367
|
-
}
|
|
368
|
-
return next;
|
|
369
|
-
});
|
|
370
|
-
}
|
|
371
|
-
function closeMobile() {
|
|
372
|
-
onMobileOpenChange?.(false);
|
|
373
|
-
}
|
|
374
|
-
function renderItems(list, depth = 0, parentKey = "root", listId) {
|
|
375
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
376
|
-
"ul",
|
|
377
|
-
{
|
|
378
|
-
id: listId,
|
|
379
|
-
className: cn(
|
|
380
|
-
"flex flex-col gap-1",
|
|
381
|
-
depth === 0 ? "px-[calc(var(--control-padding-x-sm)*0.8)]" : "ml-[calc(var(--control-height-md)*0.6)] mt-1 border-l border-border-base pl-[calc(var(--control-padding-x-sm)*0.65)]"
|
|
382
|
-
),
|
|
383
|
-
"data-ug-slot": "list",
|
|
384
|
-
children: list.map((item, index) => {
|
|
385
|
-
const key = getItemKey(item, index, parentKey);
|
|
386
|
-
const hasChildren = Boolean(item.children?.length);
|
|
387
|
-
const childListId = `${instanceId}-list-${encodeURIComponent(key)}`;
|
|
388
|
-
const active = Boolean(item.active || itemHasActiveChild(item));
|
|
389
|
-
const expanded = !effectiveCollapsed && hasChildren && (normalizedQuery.length > 0 || active || expandedKeys.has(key));
|
|
390
|
-
const itemContent = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
391
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
392
|
-
"span",
|
|
393
|
-
{
|
|
394
|
-
className: cn(
|
|
395
|
-
"flex shrink-0 items-center justify-center transition-colors [height:var(--control-height-sm)] [width:var(--control-height-sm)] [border-radius:var(--radius-control)]",
|
|
396
|
-
active ? styles.activeIcon : styles.icon
|
|
397
|
-
),
|
|
398
|
-
"data-ug-slot": "icon",
|
|
399
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(item.icon, { size: 16 })
|
|
400
|
-
}
|
|
401
|
-
),
|
|
402
|
-
!effectiveCollapsed && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("span", { className: "min-w-0 flex-1 truncate text-left", "data-ug-slot": "label", children: item.label }),
|
|
403
|
-
!effectiveCollapsed && hasChildren && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
404
|
-
import_lucide_react2.ChevronDown,
|
|
405
|
-
{
|
|
406
|
-
size: 15,
|
|
407
|
-
className: cn("shrink-0 text-text-tertiary transition-transform", expanded && "rotate-180"),
|
|
408
|
-
"aria-hidden": "true",
|
|
409
|
-
"data-ug-slot": "chevron"
|
|
410
|
-
}
|
|
411
|
-
)
|
|
412
|
-
] });
|
|
413
|
-
const itemClassName = cn(
|
|
414
|
-
"group relative flex min-w-0 items-center gap-2.5 px-[var(--control-padding-x-sm)] py-[calc(var(--control-height-sm)*0.18)] text-sm font-medium outline-none transition-all duration-150 [border-radius:var(--radius-control)] focus-visible:ring-2 focus-visible:ring-primary/35",
|
|
415
|
-
effectiveCollapsed && "justify-center px-[calc(var(--control-padding-x-sm)*0.75)]",
|
|
416
|
-
active ? styles.active : styles.inactive
|
|
417
|
-
);
|
|
418
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("li", { "data-ug-slot": "item", "data-state": active ? "active" : "default", children: [
|
|
419
|
-
hasChildren ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
420
|
-
"button",
|
|
421
|
-
{
|
|
422
|
-
type: "button",
|
|
423
|
-
className: cn("w-full", itemClassName),
|
|
424
|
-
"aria-expanded": expanded,
|
|
425
|
-
"aria-controls": childListId,
|
|
426
|
-
title: effectiveCollapsed ? item.label : void 0,
|
|
427
|
-
onClick: () => toggleExpanded(key),
|
|
428
|
-
children: itemContent
|
|
429
|
-
}
|
|
430
|
-
) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
431
|
-
"a",
|
|
432
|
-
{
|
|
433
|
-
href: item.href ?? "#",
|
|
434
|
-
"aria-current": item.active ? "page" : void 0,
|
|
435
|
-
className: itemClassName,
|
|
436
|
-
title: effectiveCollapsed ? item.label : void 0,
|
|
437
|
-
onClick: closeMobile,
|
|
438
|
-
children: itemContent
|
|
439
|
-
}
|
|
440
|
-
),
|
|
441
|
-
expanded && item.children ? renderItems(item.children, depth + 1, key, childListId) : null
|
|
442
|
-
] }, key);
|
|
443
|
-
})
|
|
444
|
-
}
|
|
445
|
-
);
|
|
446
|
-
}
|
|
447
|
-
const sidebar = /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
448
|
-
"aside",
|
|
449
|
-
{
|
|
450
|
-
ref,
|
|
451
|
-
...props,
|
|
452
|
-
className: cn(
|
|
453
|
-
"flex flex-col overflow-hidden transition-all duration-300",
|
|
454
|
-
styles.container,
|
|
455
|
-
effectiveCollapsed ? "w-[72px]" : "w-64",
|
|
456
|
-
responsive && [
|
|
457
|
-
"fixed inset-y-0 left-0 z-50 md:relative md:inset-auto md:z-auto",
|
|
458
|
-
mobileOpen ? "translate-x-0" : "-translate-x-full md:translate-x-0"
|
|
459
|
-
],
|
|
460
|
-
className
|
|
461
|
-
),
|
|
462
|
-
"data-ug": "sidebar",
|
|
463
|
-
"data-state": [
|
|
464
|
-
effectiveCollapsed ? "collapsed" : "expanded",
|
|
465
|
-
responsive && mobileOpen ? "mobile-open" : null
|
|
466
|
-
].filter(Boolean).join(" "),
|
|
467
|
-
"data-variant": variant,
|
|
468
|
-
"data-size": "md",
|
|
469
|
-
children: [
|
|
470
|
-
(header || collapsible || responsive && mobileOpen) && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
|
|
471
|
-
"div",
|
|
472
|
-
{
|
|
473
|
-
className: cn(
|
|
474
|
-
"flex border-b px-[var(--control-padding-x-sm)] py-[calc(var(--content-gap)*0.75)]",
|
|
475
|
-
styles.divider,
|
|
476
|
-
effectiveCollapsed ? "justify-center" : "items-center gap-2"
|
|
477
|
-
),
|
|
478
|
-
"data-ug-slot": "header",
|
|
479
|
-
children: [
|
|
480
|
-
!effectiveCollapsed && header ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: "min-w-0 flex-1", children: header }) : null,
|
|
481
|
-
collapsible && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
482
|
-
"button",
|
|
483
|
-
{
|
|
484
|
-
type: "button",
|
|
485
|
-
className: "flex shrink-0 items-center justify-center border border-border-base bg-surface-2 text-text-secondary transition-colors [height:var(--control-height-md)] [width:var(--control-height-md)] [border-radius:var(--radius-control)] hover:border-primary/40 hover:text-text-primary",
|
|
486
|
-
"aria-label": effectiveCollapsed ? "\u5C55\u5F00\u4FA7\u8FB9\u680F" : "\u6298\u53E0\u4FA7\u8FB9\u680F",
|
|
487
|
-
"data-ug-slot": "toggle",
|
|
488
|
-
onClick: () => setCollapsedState(!effectiveCollapsed),
|
|
489
|
-
children: effectiveCollapsed ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.PanelLeftOpen, { size: 17 }) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.PanelLeftClose, { size: 17 })
|
|
490
|
-
}
|
|
491
|
-
),
|
|
492
|
-
responsive && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
493
|
-
"button",
|
|
494
|
-
{
|
|
495
|
-
type: "button",
|
|
496
|
-
className: "flex shrink-0 items-center justify-center border border-border-base bg-surface-2 text-text-secondary transition-colors [height:var(--control-height-md)] [width:var(--control-height-md)] [border-radius:var(--radius-control)] hover:border-primary/40 hover:text-text-primary md:hidden",
|
|
497
|
-
"aria-label": "\u5173\u95ED\u4FA7\u8FB9\u680F",
|
|
498
|
-
"data-ug-slot": "close",
|
|
499
|
-
onClick: closeMobile,
|
|
500
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.X, { size: 17 })
|
|
501
|
-
}
|
|
502
|
-
)
|
|
503
|
-
]
|
|
504
|
-
}
|
|
505
|
-
),
|
|
506
|
-
searchable && !effectiveCollapsed && /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: cn("border-b px-[var(--control-padding-x-sm)] py-[calc(var(--content-gap)*0.75)]", styles.divider), "data-ug-slot": "search", children: [
|
|
507
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("label", { className: "sr-only", htmlFor: searchId, children: "\u641C\u7D22\u83DC\u5355" }),
|
|
508
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: "relative", children: [
|
|
509
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.Search, { className: "pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 text-text-tertiary [height:calc(var(--control-height-sm)*0.5)] [width:calc(var(--control-height-sm)*0.5)]", "aria-hidden": "true" }),
|
|
510
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
511
|
-
"input",
|
|
512
|
-
{
|
|
513
|
-
id: searchId,
|
|
514
|
-
value: query,
|
|
515
|
-
onChange: (event) => setQuery(event.target.value),
|
|
516
|
-
placeholder: searchPlaceholder,
|
|
517
|
-
autoComplete: "off",
|
|
518
|
-
className: "w-full border border-border-base bg-surface-0 px-[var(--control-padding-x-sm)] pl-9 pr-9 text-sm text-text-primary outline-none transition-colors [height:var(--control-height-md)] [border-radius:var(--radius-control)] placeholder:text-text-tertiary focus:border-primary focus:ring-2 focus:ring-primary/20",
|
|
519
|
-
type: "text",
|
|
520
|
-
role: "searchbox"
|
|
521
|
-
}
|
|
522
|
-
),
|
|
523
|
-
query ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
524
|
-
"button",
|
|
525
|
-
{
|
|
526
|
-
type: "button",
|
|
527
|
-
className: "absolute right-1 top-1/2 flex -translate-y-1/2 items-center justify-center text-text-tertiary transition-colors [height:var(--control-height-sm)] [width:var(--control-height-sm)] [border-radius:var(--radius-control)] hover:bg-surface-2 hover:text-text-primary",
|
|
528
|
-
"aria-label": "\u6E05\u7A7A\u641C\u7D22",
|
|
529
|
-
onClick: () => setQuery(""),
|
|
530
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(import_lucide_react2.X, { size: 14 })
|
|
531
|
-
}
|
|
532
|
-
) : null
|
|
533
|
-
] })
|
|
534
|
-
] }),
|
|
535
|
-
/* @__PURE__ */ (0, import_jsx_runtime3.jsx)("nav", { className: "flex-1 overflow-y-auto py-3.5", "data-ug-slot": "nav", children: visibleItems.length > 0 ? renderItems(visibleItems) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("p", { className: "mx-3 border border-dashed border-border-base bg-surface-0 px-[var(--control-padding-x-sm)] py-[calc(var(--content-gap)*0.75)] text-sm text-text-tertiary [border-radius:var(--radius-panel)]", "data-ug-slot": "empty", children: "\u6CA1\u6709\u5339\u914D\u7684\u83DC\u5355" }) }),
|
|
536
|
-
footer && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
537
|
-
"div",
|
|
538
|
-
{
|
|
539
|
-
className: cn(
|
|
540
|
-
"border-t px-[calc(var(--control-padding-x-sm)*0.8)] py-[calc(var(--content-gap)*0.75)]",
|
|
541
|
-
styles.divider,
|
|
542
|
-
effectiveCollapsed && "flex justify-center"
|
|
543
|
-
),
|
|
544
|
-
"data-ug-slot": "footer",
|
|
545
|
-
children: footer
|
|
546
|
-
}
|
|
547
|
-
)
|
|
548
|
-
]
|
|
549
|
-
}
|
|
550
|
-
);
|
|
551
|
-
return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(import_jsx_runtime3.Fragment, { children: [
|
|
552
|
-
responsive && mobileOpen ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
|
|
553
|
-
"button",
|
|
554
|
-
{
|
|
555
|
-
type: "button",
|
|
556
|
-
className: "fixed inset-0 z-40 bg-overlay md:hidden",
|
|
557
|
-
"aria-label": "\u5173\u95ED\u4FA7\u8FB9\u680F\u906E\u7F69",
|
|
558
|
-
"data-ug-slot": "overlay",
|
|
559
|
-
onClick: closeMobile
|
|
560
|
-
}
|
|
561
|
-
) : null,
|
|
562
|
-
sidebar
|
|
563
|
-
] });
|
|
564
|
-
}
|
|
565
|
-
);
|
|
566
|
-
Sidebar.displayName = "Sidebar";
|
|
567
|
-
|
|
568
|
-
// src/patterns/admin-shell.tsx
|
|
569
|
-
var import_jsx_runtime4 = require("react/jsx-runtime");
|
|
570
|
-
var AdminShell = (0, import_react5.forwardRef)(
|
|
571
|
-
({
|
|
572
|
-
navItems,
|
|
573
|
-
sidebarHeader,
|
|
574
|
-
sidebarFooter,
|
|
575
|
-
sidebarVariant = "dark",
|
|
576
|
-
sidebarSearchable = false,
|
|
577
|
-
sidebarCollapsible = true,
|
|
578
|
-
sidebarCollapsed,
|
|
579
|
-
defaultSidebarCollapsed = false,
|
|
580
|
-
onSidebarCollapsedChange,
|
|
581
|
-
mobileSidebarOpen,
|
|
582
|
-
onMobileSidebarOpenChange,
|
|
583
|
-
topbarStart,
|
|
584
|
-
topbarEnd,
|
|
585
|
-
topbar,
|
|
586
|
-
mainClassName,
|
|
587
|
-
contentClassName,
|
|
588
|
-
children,
|
|
589
|
-
className,
|
|
590
|
-
...props
|
|
591
|
-
}, ref) => {
|
|
592
|
-
const [internalMobileOpen, setInternalMobileOpen] = (0, import_react5.useState)(false);
|
|
593
|
-
const effectiveMobileOpen = mobileSidebarOpen ?? internalMobileOpen;
|
|
594
|
-
function setMobileOpen(open) {
|
|
595
|
-
if (mobileSidebarOpen === void 0) {
|
|
596
|
-
setInternalMobileOpen(open);
|
|
597
|
-
}
|
|
598
|
-
onMobileSidebarOpenChange?.(open);
|
|
599
|
-
}
|
|
600
|
-
return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
601
|
-
"div",
|
|
602
|
-
{
|
|
603
|
-
ref,
|
|
604
|
-
className: cn("min-h-screen bg-surface-0 text-text-primary", className),
|
|
605
|
-
...props,
|
|
606
|
-
"data-ug": "admin-shell",
|
|
607
|
-
"data-state": effectiveMobileOpen ? "mobile-open" : "default",
|
|
608
|
-
"data-variant": sidebarVariant,
|
|
609
|
-
"data-size": "md",
|
|
610
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex min-h-screen min-w-0", children: [
|
|
611
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
612
|
-
Sidebar,
|
|
613
|
-
{
|
|
614
|
-
items: navItems,
|
|
615
|
-
variant: sidebarVariant,
|
|
616
|
-
header: sidebarHeader,
|
|
617
|
-
footer: sidebarFooter,
|
|
618
|
-
searchable: sidebarSearchable,
|
|
619
|
-
collapsible: sidebarCollapsible,
|
|
620
|
-
collapsed: sidebarCollapsed,
|
|
621
|
-
defaultCollapsed: defaultSidebarCollapsed,
|
|
622
|
-
onCollapsedChange: onSidebarCollapsedChange,
|
|
623
|
-
responsive: true,
|
|
624
|
-
mobileOpen: effectiveMobileOpen,
|
|
625
|
-
onMobileOpenChange: setMobileOpen,
|
|
626
|
-
className: "shrink-0",
|
|
627
|
-
"data-ug-slot": "sidebar"
|
|
628
|
-
}
|
|
629
|
-
),
|
|
630
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)("div", { className: "flex min-w-0 flex-1 flex-col", children: [
|
|
631
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
|
|
632
|
-
"header",
|
|
633
|
-
{
|
|
634
|
-
className: "sticky top-0 z-30 flex min-h-[var(--control-height-lg)] items-center gap-[calc(var(--content-gap)*0.75)] border-b border-border-base bg-surface-0/95 px-[var(--content-gap)] backdrop-blur sm:px-[calc(var(--content-gap)*1.25)] lg:px-[calc(var(--content-gap)*1.5)]",
|
|
635
|
-
"data-ug-slot": "topbar",
|
|
636
|
-
children: [
|
|
637
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
638
|
-
Button,
|
|
639
|
-
{
|
|
640
|
-
type: "button",
|
|
641
|
-
variant: "ghost",
|
|
642
|
-
size: "icon",
|
|
643
|
-
className: "md:hidden",
|
|
644
|
-
"aria-label": "\u6253\u5F00\u4FA7\u8FB9\u680F",
|
|
645
|
-
onClick: () => setMobileOpen(true),
|
|
646
|
-
"data-ug-slot": "mobile-trigger",
|
|
647
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_lucide_react3.Menu, { "aria-hidden": "true", focusable: "false", size: 18 })
|
|
648
|
-
}
|
|
649
|
-
),
|
|
650
|
-
topbar ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "min-w-0 flex-1", "data-ug-slot": "topbar-content", children: topbar }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(import_jsx_runtime4.Fragment, { children: [
|
|
651
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "min-w-0 flex-1", "data-ug-slot": "topbar-start", children: topbarStart }),
|
|
652
|
-
topbarEnd ? /* @__PURE__ */ (0, import_jsx_runtime4.jsx)("div", { className: "flex shrink-0 items-center gap-[calc(var(--content-gap)*0.5)]", "data-ug-slot": "topbar-end", children: topbarEnd }) : null
|
|
653
|
-
] })
|
|
654
|
-
]
|
|
655
|
-
}
|
|
656
|
-
),
|
|
657
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)("main", { className: cn("min-w-0 flex-1 overflow-x-clip", mainClassName), "data-ug-slot": "main", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
658
|
-
"div",
|
|
659
|
-
{
|
|
660
|
-
className: cn("mx-auto w-full max-w-7xl px-[var(--content-gap)] py-[calc(var(--content-gap)*1.5)] sm:px-[calc(var(--content-gap)*1.25)] lg:px-[calc(var(--content-gap)*1.5)]", contentClassName),
|
|
661
|
-
"data-ug-slot": "content",
|
|
662
|
-
children
|
|
663
|
-
}
|
|
664
|
-
) })
|
|
665
|
-
] })
|
|
666
|
-
] })
|
|
667
|
-
}
|
|
668
|
-
);
|
|
669
|
-
}
|
|
670
|
-
);
|
|
671
|
-
AdminShell.displayName = "AdminShell";
|
|
672
|
-
|
|
673
|
-
// src/patterns/confirm-dialog.tsx
|
|
674
|
-
var import_react11 = require("react");
|
|
675
|
-
var import_lucide_react5 = require("lucide-react");
|
|
676
|
-
|
|
677
|
-
// src/components/modal.tsx
|
|
678
|
-
var import_react10 = require("react");
|
|
679
|
-
var import_react_dom = require("react-dom");
|
|
680
|
-
var import_lucide_react4 = require("lucide-react");
|
|
681
|
-
|
|
682
|
-
// src/hooks/use-escape-key.ts
|
|
683
|
-
var import_react6 = require("react");
|
|
684
|
-
var import_overlay = require("@ug666/ui-web/overlay");
|
|
685
|
-
function useEscapeKey(open, onEscape) {
|
|
686
|
-
const handleEscape = (0, import_react6.useCallback)(
|
|
687
|
-
(e) => {
|
|
688
|
-
if (e.key === "Escape") onEscape();
|
|
689
|
-
},
|
|
690
|
-
[onEscape]
|
|
691
|
-
);
|
|
692
|
-
(0, import_react6.useEffect)(() => {
|
|
693
|
-
if (!open || typeof document === "undefined") return;
|
|
694
|
-
const releaseScrollLock = (0, import_overlay.acquireBodyScrollLock)();
|
|
695
|
-
const releaseEscapeHandler = (0, import_overlay.registerEscapeKeyHandler)(handleEscape);
|
|
696
|
-
return () => {
|
|
697
|
-
releaseEscapeHandler();
|
|
698
|
-
releaseScrollLock();
|
|
699
|
-
};
|
|
700
|
-
}, [open, handleEscape]);
|
|
701
|
-
}
|
|
702
|
-
|
|
703
|
-
// src/internal/use-portal-container.ts
|
|
704
|
-
var import_react7 = require("react");
|
|
705
|
-
function usePortalContainer() {
|
|
706
|
-
const [container, setContainer] = (0, import_react7.useState)(null);
|
|
707
|
-
(0, import_react7.useEffect)(() => {
|
|
708
|
-
if (typeof document === "undefined") return;
|
|
709
|
-
setContainer(document.body);
|
|
710
|
-
}, []);
|
|
711
|
-
return container;
|
|
712
|
-
}
|
|
713
|
-
|
|
714
|
-
// src/internal/use-overlay-focus.ts
|
|
715
|
-
var import_react8 = require("react");
|
|
716
|
-
var import_overlay2 = require("@ug666/ui-web/overlay");
|
|
717
|
-
function useOverlayFocus(open, containerRef) {
|
|
718
|
-
const previousFocusRef = (0, import_react8.useRef)(null);
|
|
719
|
-
(0, import_react8.useEffect)(() => {
|
|
720
|
-
if (!open || typeof document === "undefined") return;
|
|
721
|
-
previousFocusRef.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
722
|
-
(0, import_overlay2.focusFirstElement)(containerRef.current);
|
|
723
|
-
return () => {
|
|
724
|
-
previousFocusRef.current?.focus();
|
|
725
|
-
previousFocusRef.current = null;
|
|
726
|
-
};
|
|
727
|
-
}, [containerRef, open]);
|
|
728
|
-
return (0, import_react8.useCallback)(
|
|
729
|
-
(event) => {
|
|
730
|
-
(0, import_overlay2.trapTabKey)(event, containerRef.current);
|
|
731
|
-
},
|
|
732
|
-
[containerRef]
|
|
733
|
-
);
|
|
734
|
-
}
|
|
735
|
-
|
|
736
|
-
// src/theme.ts
|
|
737
|
-
var import_react9 = require("react");
|
|
738
|
-
var import_theme = require("@ug666/ui-core/theme");
|
|
739
|
-
var import_theme2 = require("@ug666/ui-web/theme");
|
|
740
|
-
var UGThemeContext = (0, import_react9.createContext)(import_theme.defaultUGTheme);
|
|
741
|
-
function useUGTheme() {
|
|
742
|
-
return (0, import_react9.useContext)(UGThemeContext);
|
|
743
|
-
}
|
|
744
|
-
var UGThemeProvider = (0, import_react9.forwardRef)(
|
|
745
|
-
({
|
|
746
|
-
preset = import_theme.defaultUGTheme.preset,
|
|
747
|
-
mode = import_theme.defaultUGTheme.mode,
|
|
748
|
-
surface = import_theme.defaultUGTheme.surface,
|
|
749
|
-
density = import_theme.defaultUGTheme.density,
|
|
750
|
-
radius = import_theme.defaultUGTheme.radius,
|
|
751
|
-
shadow = import_theme.defaultUGTheme.shadow,
|
|
752
|
-
font = import_theme.defaultUGTheme.font,
|
|
753
|
-
contrast = import_theme.defaultUGTheme.contrast,
|
|
754
|
-
motion = import_theme.defaultUGTheme.motion,
|
|
755
|
-
background = import_theme.defaultUGTheme.background,
|
|
756
|
-
accent = import_theme.defaultUGTheme.accent,
|
|
757
|
-
children,
|
|
758
|
-
...props
|
|
759
|
-
}, ref) => {
|
|
760
|
-
const value = {
|
|
761
|
-
preset,
|
|
762
|
-
mode,
|
|
763
|
-
surface,
|
|
764
|
-
density,
|
|
765
|
-
radius,
|
|
766
|
-
shadow,
|
|
767
|
-
font,
|
|
768
|
-
contrast,
|
|
769
|
-
motion,
|
|
770
|
-
background,
|
|
771
|
-
accent
|
|
772
|
-
};
|
|
773
|
-
return (0, import_react9.createElement)(
|
|
774
|
-
UGThemeContext.Provider,
|
|
775
|
-
{ value },
|
|
776
|
-
(0, import_react9.createElement)("div", {
|
|
777
|
-
...props,
|
|
778
|
-
...(0, import_theme2.getUGThemeDataAttributes)(value),
|
|
779
|
-
ref,
|
|
780
|
-
children
|
|
781
|
-
})
|
|
782
|
-
);
|
|
783
|
-
}
|
|
784
|
-
);
|
|
785
|
-
UGThemeProvider.displayName = "UGThemeProvider";
|
|
786
|
-
var UGThemeScope = (0, import_react9.forwardRef)(
|
|
787
|
-
({
|
|
788
|
-
preset,
|
|
789
|
-
mode,
|
|
790
|
-
surface,
|
|
791
|
-
density,
|
|
792
|
-
radius,
|
|
793
|
-
shadow,
|
|
794
|
-
font,
|
|
795
|
-
contrast,
|
|
796
|
-
motion,
|
|
797
|
-
background,
|
|
798
|
-
accent,
|
|
799
|
-
children,
|
|
800
|
-
...props
|
|
801
|
-
}, ref) => {
|
|
802
|
-
const parent = useUGTheme();
|
|
803
|
-
const value = (0, import_theme.createUGThemeValue)(parent, {
|
|
804
|
-
preset,
|
|
805
|
-
mode,
|
|
806
|
-
surface,
|
|
807
|
-
density,
|
|
808
|
-
radius,
|
|
809
|
-
shadow,
|
|
810
|
-
font,
|
|
811
|
-
contrast,
|
|
812
|
-
motion,
|
|
813
|
-
background,
|
|
814
|
-
accent
|
|
815
|
-
});
|
|
816
|
-
return (0, import_react9.createElement)(
|
|
817
|
-
UGThemeContext.Provider,
|
|
818
|
-
{ value },
|
|
819
|
-
(0, import_react9.createElement)("div", {
|
|
820
|
-
...props,
|
|
821
|
-
...(0, import_theme2.getUGThemeDataAttributes)(value),
|
|
822
|
-
ref,
|
|
823
|
-
children
|
|
824
|
-
})
|
|
825
|
-
);
|
|
826
|
-
}
|
|
827
|
-
);
|
|
828
|
-
UGThemeScope.displayName = "UGThemeScope";
|
|
829
|
-
var UGThemeSurface = (0, import_react9.forwardRef)(
|
|
830
|
-
({ surface = "workspace", density, radius, shadow, font, contrast, motion, background, accent, children, ...props }, ref) => {
|
|
831
|
-
const parent = useUGTheme();
|
|
832
|
-
const value = (0, import_theme.createUGThemeValue)(parent, {
|
|
833
|
-
surface,
|
|
834
|
-
density,
|
|
835
|
-
radius,
|
|
836
|
-
shadow,
|
|
837
|
-
font,
|
|
838
|
-
contrast,
|
|
839
|
-
motion,
|
|
840
|
-
background,
|
|
841
|
-
accent
|
|
842
|
-
});
|
|
843
|
-
return (0, import_react9.createElement)(
|
|
844
|
-
UGThemeContext.Provider,
|
|
845
|
-
{ value },
|
|
846
|
-
(0, import_react9.createElement)("div", {
|
|
847
|
-
...props,
|
|
848
|
-
...(0, import_theme2.getUGThemeDataAttributes)(value),
|
|
849
|
-
ref,
|
|
850
|
-
children
|
|
851
|
-
})
|
|
852
|
-
);
|
|
853
|
-
}
|
|
854
|
-
);
|
|
855
|
-
UGThemeSurface.displayName = "UGThemeSurface";
|
|
856
|
-
|
|
857
|
-
// src/components/modal.tsx
|
|
858
|
-
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
859
|
-
var ModalContext = (0, import_react10.createContext)(null);
|
|
860
|
-
function useModalContext() {
|
|
861
|
-
const context = (0, import_react10.useContext)(ModalContext);
|
|
862
|
-
if (!context) throw new Error("Modal \u5B50\u7EC4\u4EF6\u5FC5\u987B\u5728 <Modal> \u5185\u4F7F\u7528");
|
|
863
|
-
return context;
|
|
864
|
-
}
|
|
865
|
-
var Modal = (0, import_react10.forwardRef)(({ open, onClose, children, className, ariaLabel = "\u5BF9\u8BDD\u6846" }, ref) => {
|
|
866
|
-
useEscapeKey(open, onClose);
|
|
867
|
-
const portalContainer = usePortalContainer();
|
|
868
|
-
const dialogRef = (0, import_react10.useRef)(null);
|
|
869
|
-
const titleId = `ug-modal-title-${(0, import_react10.useId)().replace(/:/g, "")}`;
|
|
870
|
-
const handleFocusKeyDown = useOverlayFocus(open && Boolean(portalContainer), dialogRef);
|
|
871
|
-
const themeScope = useUGTheme();
|
|
872
|
-
const themeAttributes = (0, import_theme2.getUGThemeDataAttributes)(themeScope);
|
|
873
|
-
if (!open || !portalContainer) return null;
|
|
874
|
-
return (0, import_react_dom.createPortal)(
|
|
875
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(ModalContext.Provider, { value: { onClose, titleId }, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
876
|
-
"div",
|
|
877
|
-
{
|
|
878
|
-
ref: (node) => {
|
|
879
|
-
dialogRef.current = node;
|
|
880
|
-
if (typeof ref === "function") ref(node);
|
|
881
|
-
else if (ref) ref.current = node;
|
|
882
|
-
},
|
|
883
|
-
...themeAttributes,
|
|
884
|
-
className: cn(
|
|
885
|
-
"fixed inset-0 z-[80] flex items-center justify-center p-[var(--content-gap)]",
|
|
886
|
-
className
|
|
887
|
-
),
|
|
888
|
-
role: "dialog",
|
|
889
|
-
"aria-modal": "true",
|
|
890
|
-
"aria-label": ariaLabel,
|
|
891
|
-
"aria-labelledby": titleId,
|
|
892
|
-
tabIndex: -1,
|
|
893
|
-
onKeyDown: handleFocusKeyDown,
|
|
894
|
-
"data-ug": "modal",
|
|
895
|
-
"data-state": "open",
|
|
896
|
-
"data-variant": "default",
|
|
897
|
-
"data-size": "md",
|
|
898
|
-
children: [
|
|
899
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
900
|
-
"div",
|
|
901
|
-
{
|
|
902
|
-
className: "absolute inset-0 bg-overlay",
|
|
903
|
-
onClick: onClose,
|
|
904
|
-
"aria-hidden": "true",
|
|
905
|
-
"data-ug-slot": "overlay"
|
|
906
|
-
}
|
|
907
|
-
),
|
|
908
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { className: "relative z-10", children })
|
|
909
|
-
]
|
|
910
|
-
}
|
|
911
|
-
) }),
|
|
912
|
-
portalContainer
|
|
913
|
-
);
|
|
914
|
-
});
|
|
915
|
-
var ModalContent = (0, import_react10.forwardRef)(({ className, maxWidth = "max-w-lg", children, ...props }, ref) => {
|
|
916
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref, ...props, className: cn("flex max-h-[85vh] w-full flex-col rounded-[var(--radius-overlay)] border border-border-base bg-surface-1 shadow-xl", maxWidth, className), "data-ug-slot": "content", children });
|
|
917
|
-
});
|
|
918
|
-
var ModalHeader = (0, import_react10.forwardRef)(({ className, ...props }, ref) => {
|
|
919
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref, ...props, className: cn("flex shrink-0 items-center justify-between border-b border-border-base p-[var(--content-gap)]", className), "data-ug-slot": "header" });
|
|
920
|
-
});
|
|
921
|
-
var ModalTitle = (0, import_react10.forwardRef)(({ className, ...props }, ref) => {
|
|
922
|
-
const { titleId } = useModalContext();
|
|
923
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("h2", { ref, ...props, id: titleId, className: cn("text-lg font-semibold text-text-primary", className), "data-ug-slot": "title" });
|
|
924
|
-
});
|
|
925
|
-
var ModalFooter = (0, import_react10.forwardRef)(({ className, ...props }, ref) => {
|
|
926
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("div", { ref, ...props, className: cn("flex shrink-0 items-center justify-end gap-2 border-t border-border-base p-[var(--content-gap)]", className), "data-ug-slot": "footer" });
|
|
927
|
-
});
|
|
928
|
-
var ModalCloseButton = (0, import_react10.forwardRef)(({ onClick, className, type = "button", ...props }, ref) => {
|
|
929
|
-
const { onClose } = useModalContext();
|
|
930
|
-
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
931
|
-
"button",
|
|
932
|
-
{
|
|
933
|
-
ref,
|
|
934
|
-
type,
|
|
935
|
-
onClick: (event) => {
|
|
936
|
-
onClose();
|
|
937
|
-
onClick?.(event);
|
|
938
|
-
},
|
|
939
|
-
className: cn(
|
|
940
|
-
"rounded-[var(--radius-control)] p-[calc(var(--content-gap)*0.25)] text-text-tertiary transition-colors hover:bg-surface-3 hover:text-text-secondary",
|
|
941
|
-
className
|
|
942
|
-
),
|
|
943
|
-
"aria-label": "\u5173\u95ED",
|
|
944
|
-
"data-ug-slot": "close",
|
|
945
|
-
...props,
|
|
946
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_lucide_react4.X, { size: 18 })
|
|
947
|
-
}
|
|
948
|
-
);
|
|
949
|
-
});
|
|
950
|
-
Modal.displayName = "Modal";
|
|
951
|
-
ModalContent.displayName = "ModalContent";
|
|
952
|
-
ModalHeader.displayName = "ModalHeader";
|
|
953
|
-
ModalTitle.displayName = "ModalTitle";
|
|
954
|
-
ModalFooter.displayName = "ModalFooter";
|
|
955
|
-
ModalCloseButton.displayName = "ModalCloseButton";
|
|
956
|
-
|
|
957
|
-
// src/patterns/confirm-dialog.tsx
|
|
958
|
-
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
959
|
-
var ConfirmDialog = (0, import_react11.forwardRef)(
|
|
960
|
-
({
|
|
961
|
-
open,
|
|
962
|
-
onOpenChange,
|
|
963
|
-
title,
|
|
964
|
-
description,
|
|
965
|
-
children,
|
|
966
|
-
variant = "destructive",
|
|
967
|
-
icon,
|
|
968
|
-
cancelText = "\u53D6\u6D88",
|
|
969
|
-
confirmText = "\u786E\u8BA4",
|
|
970
|
-
loading = false,
|
|
971
|
-
disabled = false,
|
|
972
|
-
closeOnConfirm = true,
|
|
973
|
-
onCancel,
|
|
974
|
-
onConfirm,
|
|
975
|
-
className,
|
|
976
|
-
...props
|
|
977
|
-
}, ref) => {
|
|
978
|
-
const Icon = icon ?? (variant === "destructive" ? import_lucide_react5.AlertTriangle : import_lucide_react5.HelpCircle);
|
|
979
|
-
function handleCancel() {
|
|
980
|
-
onCancel?.();
|
|
981
|
-
onOpenChange(false);
|
|
982
|
-
}
|
|
983
|
-
function handleConfirm() {
|
|
984
|
-
const result = onConfirm?.();
|
|
985
|
-
if (closeOnConfirm) onOpenChange(false);
|
|
986
|
-
return result;
|
|
987
|
-
}
|
|
988
|
-
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Modal, { open, onClose: handleCancel, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
989
|
-
ModalContent,
|
|
990
|
-
{
|
|
991
|
-
ref,
|
|
992
|
-
className: cn("max-w-md", className),
|
|
993
|
-
...props,
|
|
994
|
-
"data-ug": "confirm-dialog",
|
|
995
|
-
"data-state": open ? "open" : "default",
|
|
996
|
-
"data-variant": variant,
|
|
997
|
-
"data-size": "md",
|
|
998
|
-
children: [
|
|
999
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(ModalHeader, { className: "items-start gap-[calc(var(--content-gap)*0.75)]", "data-ug-slot": "header", children: [
|
|
1000
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1001
|
-
"div",
|
|
1002
|
-
{
|
|
1003
|
-
className: cn(
|
|
1004
|
-
"flex h-[var(--control-height-md)] w-[var(--control-height-md)] shrink-0 items-center justify-center rounded-[var(--radius-control)]",
|
|
1005
|
-
variant === "destructive" ? "bg-danger-soft text-danger-soft-fg" : "bg-primary-soft text-primary-soft-fg"
|
|
1006
|
-
),
|
|
1007
|
-
"data-ug-slot": "icon",
|
|
1008
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Icon, { size: 20, "aria-hidden": "true" })
|
|
1009
|
-
}
|
|
1010
|
-
),
|
|
1011
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)("div", { className: "min-w-0 flex-1 space-y-[calc(var(--content-gap)*0.25)]", "data-ug-slot": "content", children: [
|
|
1012
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(ModalTitle, { className: "break-words text-base", "data-ug-slot": "title", children: title }),
|
|
1013
|
-
description ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("p", { className: "text-sm leading-6 text-text-secondary", "data-ug-slot": "description", children: description }) : null
|
|
1014
|
-
] })
|
|
1015
|
-
] }),
|
|
1016
|
-
children ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)("div", { className: "px-[var(--content-gap)] py-[var(--content-gap)] text-sm text-text-secondary", "data-ug-slot": "body", children }) : null,
|
|
1017
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(ModalFooter, { className: "flex-col-reverse gap-[calc(var(--content-gap)*0.5)] sm:flex-row", "data-ug-slot": "footer", children: [
|
|
1018
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(Button, { type: "button", variant: "outline", disabled: loading, onClick: handleCancel, "data-ug-slot": "cancel", children: cancelText }),
|
|
1019
|
-
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
1020
|
-
Button,
|
|
1021
|
-
{
|
|
1022
|
-
type: "button",
|
|
1023
|
-
variant: variant === "destructive" ? "destructive" : "default",
|
|
1024
|
-
loading,
|
|
1025
|
-
disabled,
|
|
1026
|
-
onClick: handleConfirm,
|
|
1027
|
-
"data-ug-slot": "confirm",
|
|
1028
|
-
children: confirmText
|
|
1029
|
-
}
|
|
1030
|
-
)
|
|
1031
|
-
] })
|
|
1032
|
-
]
|
|
1033
|
-
}
|
|
1034
|
-
) });
|
|
1035
|
-
}
|
|
1036
|
-
);
|
|
1037
|
-
ConfirmDialog.displayName = "ConfirmDialog";
|
|
1038
|
-
|
|
1039
|
-
// src/patterns/copy-field.tsx
|
|
1040
|
-
var import_react12 = require("react");
|
|
1041
|
-
var import_lucide_react6 = require("lucide-react");
|
|
1042
|
-
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
1043
|
-
var CopyField = (0, import_react12.forwardRef)(
|
|
1044
|
-
({
|
|
1045
|
-
value,
|
|
1046
|
-
label,
|
|
1047
|
-
displayValue,
|
|
1048
|
-
monospace = true,
|
|
1049
|
-
disabled = false,
|
|
1050
|
-
copyLabel = "\u590D\u5236",
|
|
1051
|
-
copiedLabel = "\u5DF2\u590D\u5236",
|
|
1052
|
-
onCopied,
|
|
1053
|
-
onCopyError,
|
|
1054
|
-
className,
|
|
1055
|
-
...props
|
|
1056
|
-
}, ref) => {
|
|
1057
|
-
const [copied, setCopied] = (0, import_react12.useState)(false);
|
|
1058
|
-
const timeoutRef = (0, import_react12.useRef)(null);
|
|
1059
|
-
(0, import_react12.useEffect)(() => {
|
|
1060
|
-
return () => {
|
|
1061
|
-
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
1062
|
-
};
|
|
1063
|
-
}, []);
|
|
1064
|
-
(0, import_react12.useEffect)(() => {
|
|
1065
|
-
setCopied(false);
|
|
1066
|
-
if (timeoutRef.current) {
|
|
1067
|
-
clearTimeout(timeoutRef.current);
|
|
1068
|
-
timeoutRef.current = null;
|
|
1069
|
-
}
|
|
1070
|
-
}, [value]);
|
|
1071
|
-
async function handleCopy() {
|
|
1072
|
-
if (disabled) return;
|
|
1073
|
-
try {
|
|
1074
|
-
if (!navigator.clipboard?.writeText) {
|
|
1075
|
-
throw new Error("Clipboard API is not available");
|
|
1076
|
-
}
|
|
1077
|
-
await navigator.clipboard.writeText(value);
|
|
1078
|
-
setCopied(true);
|
|
1079
|
-
onCopied?.(value);
|
|
1080
|
-
if (timeoutRef.current) clearTimeout(timeoutRef.current);
|
|
1081
|
-
timeoutRef.current = setTimeout(() => setCopied(false), 1400);
|
|
1082
|
-
} catch (error) {
|
|
1083
|
-
onCopyError?.(error);
|
|
1084
|
-
}
|
|
1085
|
-
}
|
|
1086
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1087
|
-
"div",
|
|
1088
|
-
{
|
|
1089
|
-
ref,
|
|
1090
|
-
className: cn("space-y-[calc(var(--content-gap)*0.5)]", className),
|
|
1091
|
-
...props,
|
|
1092
|
-
"data-ug": "copy-field",
|
|
1093
|
-
"data-state": disabled ? "disabled" : copied ? "copied" : "default",
|
|
1094
|
-
"data-variant": monospace ? "monospace" : "default",
|
|
1095
|
-
"data-size": "md",
|
|
1096
|
-
children: [
|
|
1097
|
-
label ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "text-xs font-medium text-text-secondary", "data-ug-slot": "label", children: label }) : null,
|
|
1098
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1099
|
-
"div",
|
|
1100
|
-
{
|
|
1101
|
-
className: cn(
|
|
1102
|
-
"flex min-w-0 items-stretch overflow-hidden rounded-[var(--radius-control)] border border-border-base bg-surface-1",
|
|
1103
|
-
disabled && "opacity-60"
|
|
1104
|
-
),
|
|
1105
|
-
"data-ug-slot": "field",
|
|
1106
|
-
children: [
|
|
1107
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
1108
|
-
"div",
|
|
1109
|
-
{
|
|
1110
|
-
className: cn(
|
|
1111
|
-
"min-w-0 flex-1 truncate px-[var(--control-padding-x-sm)] py-[calc(var(--content-gap)*0.5)] text-sm text-text-primary",
|
|
1112
|
-
monospace && "font-mono"
|
|
1113
|
-
),
|
|
1114
|
-
title: typeof displayValue === "string" ? displayValue : value,
|
|
1115
|
-
"data-ug-slot": "value",
|
|
1116
|
-
children: displayValue ?? value
|
|
1117
|
-
}
|
|
1118
|
-
),
|
|
1119
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)("div", { className: "flex shrink-0 items-center border-l border-border-base bg-surface-2 px-[calc(var(--content-gap)*0.375)]", "data-ug-slot": "action", children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
1120
|
-
Button,
|
|
1121
|
-
{
|
|
1122
|
-
type: "button",
|
|
1123
|
-
variant: "ghost",
|
|
1124
|
-
size: "sm",
|
|
1125
|
-
disabled,
|
|
1126
|
-
onClick: handleCopy,
|
|
1127
|
-
"aria-live": "polite",
|
|
1128
|
-
"data-ug-slot": "button",
|
|
1129
|
-
children: [
|
|
1130
|
-
copied ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react6.Check, { "aria-hidden": "true", focusable: "false", size: 15 }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_lucide_react6.Copy, { "aria-hidden": "true", focusable: "false", size: 15 }),
|
|
1131
|
-
copied ? copiedLabel : copyLabel
|
|
1132
|
-
]
|
|
1133
|
-
}
|
|
1134
|
-
) })
|
|
1135
|
-
]
|
|
1136
|
-
}
|
|
1137
|
-
)
|
|
1138
|
-
]
|
|
1139
|
-
}
|
|
1140
|
-
);
|
|
1141
|
-
}
|
|
1142
|
-
);
|
|
1143
|
-
CopyField.displayName = "CopyField";
|
|
1144
|
-
|
|
1145
|
-
// src/patterns/page-header.tsx
|
|
1146
|
-
var import_react13 = require("react");
|
|
1147
|
-
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
1148
|
-
var PageHeader = (0, import_react13.forwardRef)(
|
|
1149
|
-
({
|
|
1150
|
-
eyebrow,
|
|
1151
|
-
title,
|
|
1152
|
-
description,
|
|
1153
|
-
badge,
|
|
1154
|
-
breadcrumb,
|
|
1155
|
-
actions,
|
|
1156
|
-
meta,
|
|
1157
|
-
children,
|
|
1158
|
-
className,
|
|
1159
|
-
...props
|
|
1160
|
-
}, ref) => {
|
|
1161
|
-
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
1162
|
-
"header",
|
|
1163
|
-
{
|
|
1164
|
-
ref,
|
|
1165
|
-
className: cn(
|
|
1166
|
-
"flex min-w-0 flex-col gap-[calc(var(--content-gap)*1.25)] border-b border-border-base pb-[calc(var(--content-gap)*1.5)]",
|
|
1167
|
-
className
|
|
1168
|
-
),
|
|
1169
|
-
...props,
|
|
1170
|
-
"data-ug": "page-header",
|
|
1171
|
-
"data-state": "default",
|
|
1172
|
-
"data-variant": "default",
|
|
1173
|
-
"data-size": "md",
|
|
1174
|
-
children: [
|
|
1175
|
-
breadcrumb ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "min-w-0", "data-ug-slot": "breadcrumb", children: breadcrumb }) : null,
|
|
1176
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex min-w-0 flex-col gap-[var(--content-gap)] lg:flex-row lg:items-start lg:justify-between", "data-ug-slot": "body", children: [
|
|
1177
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "min-w-0 space-y-[calc(var(--content-gap)*0.75)]", "data-ug-slot": "content", children: [
|
|
1178
|
-
eyebrow ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "text-xs font-semibold uppercase text-primary", "data-ug-slot": "eyebrow", children: eyebrow }) : null,
|
|
1179
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)("div", { className: "flex min-w-0 flex-wrap items-center gap-[calc(var(--content-gap)*0.625)]", children: [
|
|
1180
|
-
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)("h1", { className: "min-w-0 break-words text-2xl font-bold leading-tight text-text-primary sm:text-3xl", "data-ug-slot": "title", children: title }),
|
|
1181
|
-
badge ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "shrink-0", "data-ug-slot": "badge", children: badge }) : null
|
|
1182
|
-
] }),
|
|
1183
|
-
description ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("p", { className: "max-w-3xl text-sm leading-6 text-text-secondary", "data-ug-slot": "description", children: description }) : null,
|
|
1184
|
-
meta ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex min-w-0 flex-wrap items-center gap-x-[var(--content-gap)] gap-y-[calc(var(--content-gap)*0.5)] text-xs text-text-tertiary", "data-ug-slot": "meta", children: meta }) : null
|
|
1185
|
-
] }),
|
|
1186
|
-
actions ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "flex shrink-0 flex-wrap items-center gap-[calc(var(--content-gap)*0.5)] lg:justify-end", "data-ug-slot": "actions", children: actions }) : null
|
|
1187
|
-
] }),
|
|
1188
|
-
children ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)("div", { className: "min-w-0", "data-ug-slot": "footer", children }) : null
|
|
1189
|
-
]
|
|
1190
|
-
}
|
|
1191
|
-
);
|
|
1192
|
-
}
|
|
1193
|
-
);
|
|
1194
|
-
PageHeader.displayName = "PageHeader";
|
|
1195
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
1196
|
-
0 && (module.exports = {
|
|
1197
|
-
AdminShell,
|
|
1198
|
-
ConfirmDialog,
|
|
1199
|
-
CopyField,
|
|
1200
|
-
PageHeader,
|
|
1201
|
-
UGAdminShell,
|
|
1202
|
-
UGConfirmDialog,
|
|
1203
|
-
UGCopyField,
|
|
1204
|
-
UGPageHeader
|
|
1205
|
-
});
|
|
1206
|
-
//# sourceMappingURL=index.cjs.map
|
|
1
|
+
"use strict";function _nullishCoalesce(e,a){return null!=e?e:a()}function _optionalChain(e){let a,l=e[0],t=1;for(;t<e.length;){const i=e[t],o=e[t+1];if(t+=2,("optionalAccess"===i||"optionalCall"===i)&&null==l)return;"access"===i||"optionalAccess"===i?(a=l,l=o(l)):"call"!==i&&"optionalCall"!==i||(l=o((...e)=>l.call(a,...e)),a=void 0)}return l}Object.defineProperty(exports,"__esModule",{value:!0});var e=require("../chunk-JJQENNZW.cjs"),a=require("../chunk-HCGUPREG.cjs");require("../chunk-2EJWWTLH.cjs");var l=require("../chunk-X4EMYHLY.cjs"),t=require("../chunk-IOUGF444.cjs"),i=require("../chunk-EYSM2SU5.cjs"),o=require("react"),n=require("@ug666/ui-core"),s=require("lucide-react"),r=require("react/jsx-runtime"),d=o.forwardRef.call(void 0,({options:a,value:l,defaultValue:d=[],onValueChange:c,searchable:u=!0,searchPlaceholder:v="搜索选项",emptyLabel:g="没有匹配项",disabled:h,size:p,name:m,form:x,layout:b="stack",collapsibleGroups:f=!1,expandedGroups:j,defaultExpandedGroups:w,onExpandedGroupsChange:C,showSelectAll:y=!0,showSummary:N=!0,showGroupCount:k=!0,className:S,...T},z)=>{const _=i.useUIConfig.call(void 0),A=o.useId.call(void 0),R=o.useRef.call(void 0,null),[M,L]=o.useState.call(void 0,[...d]),[I,D]=o.useState.call(void 0,""),E=o.useRef.call(void 0,{value:l,defaultValue:d});E.current={value:l,defaultValue:d};const[B,G]=o.useState.call(void 0,()=>void 0===w?[]:n.groupSelectionListOptions.call(void 0,a).filter(e=>!w.includes(e.key)).map(e=>e.key)),F=_nullishCoalesce(l,()=>M),$=i.resolveDisabled.call(void 0,h,_.disabled),V=i.resolveControlSize.call(void 0,p,_.size),P=n.filterSelectionListOptions.call(void 0,a,u?I:""),U=n.groupSelectionListOptions.call(void 0,P),W=n.getSelectionListScope.call(void 0,P,F),O=n.groupSelectionListOptions.call(void 0,a),H=_nullishCoalesce(j,()=>O.filter(e=>!B.includes(e.key)).map(e=>e.key)),q=u&&I.trim().length>0,Q=U.every(e=>H.includes(e.key));function changeExpanded(e){void 0===j&&G(O.filter(a=>!e.includes(a.key)).map(e=>e.key)),_optionalChain([C,"optionalCall",a=>a(e)])}function change(e){$||(void 0===l&&L(e),_optionalChain([c,"optionalCall",a=>a(e)]))}return o.useEffect.call(void 0,()=>{const e=x?document.getElementById(x):_optionalChain([R,"access",e=>e.current,"optionalAccess",e=>e.closest,"call",e=>e("form")]);if(!e)return;const a=new Set;function reset(e){const l=setTimeout(()=>{a.delete(l),e.defaultPrevented||(void 0===E.current.value&&L([...E.current.defaultValue]),D(""))},0);a.add(l)}return e.addEventListener("reset",reset),()=>{e.removeEventListener("reset",reset),a.forEach(clearTimeout)}},[x]),r.jsxs.call(void 0,"div",{...T,ref:e=>{R.current=e,"function"==typeof z?z(e):z&&(z.current=e)},className:i.cn.call(void 0,"grid min-w-0 gap-[var(--content-gap)] text-text-primary",S),"data-ug":"selection-list","data-ug-slot":"root","data-size":V,"data-layout":b,"data-state":$?"disabled":0===P.length?"empty":"default","data-variant":"grouped",role:"group","aria-label":_nullishCoalesce(T["aria-label"],()=>"选项列表"),"aria-disabled":$||void 0,children:[u?r.jsx.call(void 0,"div",{"data-ug-slot":"search",children:r.jsx.call(void 0,t.Input,{value:I,onValueChange:D,clearable:!0,"aria-label":v,placeholder:v,size:V,disabled:$})}):null,y||N?r.jsxs.call(void 0,"div",{"data-ug-slot":"bulk",className:"flex flex-wrap items-center justify-between gap-[calc(var(--content-gap)*0.5)]",children:[y?r.jsx.call(void 0,e.Checkbox,{checked:W.checked,indeterminate:W.indeterminate,size:V,disabled:$||0===W.available,"aria-describedby":N?`${A}-summary`:void 0,onCheckedChange:e=>change(n.updateSelectionListScope.call(void 0,F,P,e)),label:"全选当前结果"}):null,N?r.jsxs.call(void 0,"span",{id:`${A}-summary`,"data-ug-slot":"summary",className:"text-xs text-text-secondary","aria-live":"polite",children:["已选 ",new Set(F).size," 项;当前 ",W.total," 项,",W.available," 项可操作",W.disabled>0?`,${W.disabled} 项不可操作`:""]}):null]}):null,f?r.jsxs.call(void 0,"div",{"data-ug-slot":"group-actions",children:[r.jsx.call(void 0,i.Button,{type:"button",size:"default",variant:"ghost",disabled:q||0===U.length,title:q?"清空搜索后可折叠分组":void 0,onClick:()=>changeExpanded(Q?H.filter(e=>!U.some(a=>a.key===e)):[...new Set([...H,...U.map(e=>e.key)])]),children:Q?"全部收起":"全部展开"}),q?r.jsx.call(void 0,"span",{"data-ug-slot":"search-hint",children:"搜索时展开匹配分组"}):null]}):null,r.jsxs.call(void 0,"div",{"data-ug-slot":"groups",className:"grid min-w-0 gap-[var(--content-gap)]",children:[U.map(a=>{const l=n.getSelectionListScope.call(void 0,a.options,F),t=!f||q||H.includes(a.key),o=`${A}-group-${encodeURIComponent(a.key)}`;return r.jsxs.call(void 0,e.Fieldset,{variant:"card",size:"sm","data-ug-slot":"group",children:[r.jsx.call(void 0,e.FieldsetLegend,{children:a.label}),r.jsxs.call(void 0,"div",{"data-ug-slot":"group-heading",className:"flex flex-wrap items-center justify-between gap-[calc(var(--content-gap)*0.5)]",children:[r.jsx.call(void 0,e.Checkbox,{checked:l.checked,indeterminate:l.indeterminate,size:V,disabled:$||0===l.available,onCheckedChange:e=>change(n.updateSelectionListScope.call(void 0,F,a.options,e)),label:`全选${a.label}`}),k?r.jsxs.call(void 0,"span",{"data-ug-slot":"group-count",className:"text-xs text-text-secondary",children:["已选 ",l.selected,"/",l.total,l.disabled>0?`,${l.disabled} 项不可操作`:""]}):null,f?r.jsx.call(void 0,i.Button,{type:"button",variant:"ghost",size:"icon",disabled:q,className:k?void 0:"ml-auto","aria-label":`${t?"收起":"展开"}${a.label}选项`,"aria-expanded":t,"aria-controls":o,title:q?"清空搜索后可折叠分组":`${t?"收起":"展开"}${a.label}选项`,onClick:()=>changeExpanded(t?H.filter(e=>e!==a.key):[...H,a.key]),children:t?r.jsx.call(void 0,s.ChevronDown,{size:16,"aria-hidden":"true"}):r.jsx.call(void 0,s.ChevronRight,{size:16,"aria-hidden":"true"})}):null]}),r.jsx.call(void 0,"div",{id:o,"data-ug-slot":"options",hidden:!t,children:r.jsx.call(void 0,e.CheckboxGroup,{value:F,disabled:$,size:V,orientation:"vertical","aria-label":`${a.label}选项`,onValueChange:e=>change(e.map(String)),children:a.options.map(a=>r.jsx.call(void 0,e.Checkbox,{value:a.id,disabled:a.disabled,"aria-label":a.label,"aria-describedby":[a.description&&`${A}-description-${encodeURIComponent(a.id)}`,a.disabled&&`${A}-locked-${encodeURIComponent(a.id)}`].filter(Boolean).join(" ")||void 0,label:r.jsxs.call(void 0,"span",{"data-ug-slot":"option-label",className:"grid min-w-0 [overflow-wrap:anywhere]",children:[r.jsxs.call(void 0,"span",{children:[a.label,a.disabled?r.jsx.call(void 0,"span",{id:`${A}-locked-${encodeURIComponent(a.id)}`,"data-ug-slot":"locked",className:"ml-1 text-xs text-text-secondary",children:"(不可操作)"}):null]}),a.description?r.jsx.call(void 0,"span",{id:`${A}-description-${encodeURIComponent(a.id)}`,"data-ug-slot":"option-description",className:"text-xs text-text-secondary",children:a.description}):null]})},a.id))})})]},a.key)}),0===P.length?r.jsx.call(void 0,"p",{"data-ug-slot":"empty",className:"text-sm text-text-secondary",role:"status",children:g}):null]}),m?[...new Set(F)].map(e=>r.jsx.call(void 0,"input",{type:"hidden",name:m,form:x,value:e,disabled:$},e)):null]})});d.displayName="SelectionList";var c=require("@ug666/ui-web");function DataTableHeader({headers:a,layout:l,widths:t,offset:d,selection:u,actions:v,sort:g,order:h,onSortChange:p,reorderable:m,move:x}){const b=o.useRef.call(void 0,void 0);return r.jsx.call(void 0,e.TableHeader,{children:a.map((o,f)=>r.jsxs.call(void 0,e.TableRow,{children:[0===f&&null!=u&&r.jsx.call(void 0,e.TableHead,{rowSpan:a.length,scope:"col","data-leaf-index":0,className:"text-center","data-fixed":n.getTableColumnFixed.call(void 0,l[0]),style:c.getTableColumnStyle.call(void 0,l,0,t),children:u}),o.map(a=>{const{column:o,leafIndex:u,colSpan:v,rowSpan:f,siblingIds:j}=a,w=u+d,C=l.slice(w,w+v),y=n.getTableColumnFixed.call(void 0,C[0]),N=C.every(e=>n.getTableColumnFixed.call(void 0,e)===y),k=c.getTableColumnStyle.call(void 0,l,"right"===y?w+v-1:w,t),S=j.indexOf(o.id),T=_nullishCoalesce(o.sortLabel,()=>"string"==typeof o.header||"number"==typeof o.header?String(o.header):o.id),z=Boolean(_optionalChain([o,"access",e=>e.children,"optionalAccess",e=>e.length]));return r.jsx.call(void 0,e.TableHead,{scope:z?"colgroup":"col",colSpan:v,rowSpan:f,"data-leaf-index":z?void 0:w,"data-fixed":N?y:void 0,style:z?{...k,width:void 0,minWidth:void 0}:k,className:o.className,"aria-sort":!z&&o.sortable&&g===o.id?"asc"===h?"ascending":"descending":void 0,draggable:m||void 0,onDragStart:e=>{b.current=o.id,e.dataTransfer.setData("text/plain",o.id),e.dataTransfer.effectAllowed="move"},onDragEnd:()=>{b.current=void 0},onDragOver:e=>{m&&b.current&&j.includes(b.current)&&e.preventDefault()},onDrop:e=>{m&&b.current&&j.includes(b.current)&&(e.preventDefault(),x(b.current,o.id),b.current=void 0)},children:r.jsxs.call(void 0,"span",{"data-ug-slot":"header",className:"contents",children:[!z&&o.sortable&&p?r.jsxs.call(void 0,i.Button,{"aria-label":`按${T}排序`,style:{fontWeight:"inherit"},type:"button",size:"sm",tone:"neutral",variant:"text",onClick:()=>p(o.id,g===o.id&&"asc"===h?"desc":"asc"),children:[o.header,g!==o.id?r.jsx.call(void 0,s.ArrowUpDown,{"aria-hidden":!0,size:14}):"asc"===h?r.jsx.call(void 0,s.ArrowUp,{"aria-hidden":!0,size:14}):r.jsx.call(void 0,s.ArrowDown,{"aria-hidden":!0,size:14})]}):o.header,m&&r.jsxs.call(void 0,"span",{"data-ug-slot":"column-reorder",children:[r.jsx.call(void 0,i.Button,{type:"button",variant:"text",size:"icon-sm","aria-label":`向左移动${T}`,disabled:0===S,onClick:()=>x(o.id,j[S-1]),children:r.jsx.call(void 0,s.ChevronLeft,{size:14,"aria-hidden":!0})}),r.jsx.call(void 0,i.Button,{type:"button",variant:"text",size:"icon-sm","aria-label":`向右移动${T}`,disabled:S===j.length-1,onClick:()=>x(o.id,j[S+1],!0),children:r.jsx.call(void 0,s.ChevronRight,{size:14,"aria-hidden":!0})})]})]})},o.id)}),0===f&&null!=v&&r.jsx.call(void 0,e.TableHead,{rowSpan:a.length,scope:"col","data-leaf-index":l.length-1,className:"whitespace-nowrap text-right","data-ug-slot":"action-column","data-fixed":n.getTableColumnFixed.call(void 0,l.at(-1)),children:v})]},f))})}var u=["loading-a","loading-b","loading-c","loading-d","loading-e"];function DataTable({rows:a,columns:l,getRowId:t,loading:d=!1,error:v,errorTitle:g="数据加载失败",emptyTitle:h="暂无数据",emptyDescription:p="当前条件下没有可展示的记录。",selectedIds:m=new Set,onSelectionChange:x,sort:b,order:f="asc",onSortChange:j,rowActions:w,actionsLabel:C="操作",page:y=1,total:N=a.length,pageSize:k=20,onPageChange:S,pageSizeOptions:T,onPageSizeChange:z,onRetry:_,retryLabel:A="重试",scrollRegionLabel:R="数据表格",size:M="sm",bordered:L=!0,striped:I=!1,tableClassName:D,fill:E=!1,pagination:B=!0,spanMethod:G,summaryMethod:F,columnOrder:$,defaultColumnOrder:V=[],onColumnOrderChange:P,reorderableColumns:U=!1,className:W,...O}){const[H,q]=o.useState.call(void 0,V),Q=n.getTableStructure.call(void 0,l,_nullishCoalesce($,()=>H)),J=Q.leaves,K=n.getTableSpanGrid.call(void 0,a.length,J.length,(e,l)=>_optionalChain([G,"optionalCall",t=>t({row:a[e],column:J[l],rowIndex:e,columnIndex:l})])),X=!d&&F?F({rows:a,columns:J}):void 0;const Y=o.useRef.call(void 0,null),[Z,ee]=o.useState.call(void 0,{widths:[],regionWidth:1/0}),ae=Z.widths,le=J.some(e=>"left"===n.getTableColumnFixed.call(void 0,e)),te=[...x?[{width:"var(--control-height-lg)",fixed:le?"left":void 0}]:[],...J,...w?[{width:"min-content",minWidth:"min-content",fixed:"right"}]:[]],ie=x?1:0,oe=ae.length>0&&ae.reduce((e,a)=>e+a,0)>Z.regionWidth+.5,ne=oe?te:te.map(({fixed:e,...a})=>a),se=n.resolveTableFixedColumns.call(void 0,ne,ae,Z.regionWidth,oe&&w?ne.length-1:void 0),re=JSON.stringify([Q.order,te.map(({width:e,minWidth:a,align:l,fixed:t})=>({width:e,minWidth:a,align:l,fixed:t}))]),de=a.map(t),ce=de.length>0&&de.every(e=>m.has(e)),ue=de.some(e=>m.has(e))&&!ce,ve=Math.max(Math.ceil(N/Math.max(k,1)),1),ge=[...new Set([..._nullishCoalesce(T,()=>[]),k])].filter(e=>Number.isSafeInteger(e)&&e>0).sort((e,a)=>e-a),he=v?"error":d?"loading":0===a.length?"empty":"ready";return o.useLayoutEffect.call(void 0,()=>(w||J.some(e=>n.getTableColumnFixed.call(void 0,e)))&&Y.current?c.observeTableColumnWidths.call(void 0,Y.current,(e,a)=>ee({widths:e,regionWidth:a})):void 0,[re,he]),r.jsx.call(void 0,"div",{ref:Y,className:i.cn.call(void 0,"min-w-0",!E&&"space-y-[calc(var(--content-gap)*0.75)]",W),"data-ug":"data-table","data-fill":E||void 0,"data-state":he,"data-variant":L?"bordered":"default","data-size":M,...O,children:v?r.jsxs.call(void 0,"div",{className:"grid min-h-[calc(var(--control-height-lg)*3)] content-center gap-[calc(var(--content-gap)*0.75)]","data-ug-slot":"feedback",children:[r.jsxs.call(void 0,e.Alert,{variant:"destructive",children:[r.jsx.call(void 0,e.AlertTitle,{children:g}),r.jsx.call(void 0,e.AlertDescription,{children:v})]}),_?r.jsx.call(void 0,"div",{children:r.jsxs.call(void 0,i.Button,{onClick:_,size:"sm",type:"button",variant:"default",children:[r.jsx.call(void 0,s.RefreshCw,{"aria-hidden":"true",size:16}),A]})}):null]}):r.jsxs.call(void 0,r.Fragment,{children:[r.jsx.call(void 0,"div",{"data-ug-slot":"table",children:r.jsxs.call(void 0,e.Table,{bordered:L,className:i.cn.call(void 0,"min-w-[48rem] table-auto",D),scrollRegionLabel:R,size:M,striped:I,children:[r.jsx.call(void 0,"colgroup",{children:te.map((e,a)=>r.jsx.call(void 0,"col",{style:{width:c.tableColumnLength.call(void 0,e.width)}},a))}),r.jsx.call(void 0,DataTableHeader,{headers:Q.headers,layout:se,widths:ae,offset:ie,sort:b,order:f,onSortChange:j,reorderable:U,move:function moveColumn(e,a,t=!1){const i=n.moveTableColumn.call(void 0,l,Q.order,e,a,t);i.every((e,a)=>e===Q.order[a])||(void 0===$&&q(i),_optionalChain([P,"optionalCall",e=>e(i)]))},selection:x?r.jsx.call(void 0,"span",{className:"inline-flex","data-ug-slot":"selection",children:r.jsx.call(void 0,e.Checkbox,{"aria-label":"选择当前页全部记录",checked:ce,indeterminate:ue,onCheckedChange:function toggleAll(e){const a=new Set(m);for(const l of de)e?a.add(l):a.delete(l);_optionalChain([x,"optionalCall",e=>e(a)])}})}):void 0,actions:w?r.jsx.call(void 0,"span",{"data-ug-slot":"header",children:C}):void 0}),r.jsxs.call(void 0,e.TableBody,{children:[d?u.map(a=>r.jsxs.call(void 0,e.TableRow,{children:[x?r.jsx.call(void 0,e.TableCell,{className:"text-center","data-fixed":n.getTableColumnFixed.call(void 0,se[0]),style:c.getTableColumnStyle.call(void 0,se,0,ae),children:r.jsx.call(void 0,"span",{className:"inline-flex","data-ug-slot":"selection",children:r.jsx.call(void 0,e.Skeleton,{className:"size-[calc(var(--control-height-sm)*0.5)]",variant:"rect"})})}):null,J.map((a,l)=>r.jsx.call(void 0,e.TableCell,{className:a.className,"data-fixed":n.getTableColumnFixed.call(void 0,se[l+ie]),style:c.getTableColumnStyle.call(void 0,se,l+ie,ae),children:r.jsx.call(void 0,"span",{"data-ug-slot":"loading",children:r.jsx.call(void 0,e.Skeleton,{variant:"text"})})},a.id)),w?r.jsx.call(void 0,e.TableCell,{className:"whitespace-nowrap text-right","data-ug-slot":"action-column","data-fixed":n.getTableColumnFixed.call(void 0,se[te.length-1]),children:r.jsx.call(void 0,"span",{"data-ug-slot":"loading",children:r.jsx.call(void 0,e.Skeleton,{variant:"text"})})}):null]},a)):a.map((a,l)=>{const i=t(a),o=m.has(i);return r.jsxs.call(void 0,e.TableRow,{"data-state":o?"selected":"default",children:[x?r.jsx.call(void 0,e.TableCell,{className:"text-center","data-fixed":n.getTableColumnFixed.call(void 0,se[0]),style:c.getTableColumnStyle.call(void 0,se,0,ae),children:r.jsx.call(void 0,"span",{className:"inline-flex","data-ug-slot":"selection",children:r.jsx.call(void 0,e.Checkbox,{"aria-label":`选择记录 ${i}`,checked:o,onCheckedChange:e=>function toggleOne(e,a){const l=new Set(m);a?l.add(e):l.delete(e),_optionalChain([x,"optionalCall",e=>e(l)])}(i,e)})})}):null,J.map((t,i)=>K[l][i].rowSpan>0?r.jsx.call(void 0,e.TableCell,{rowSpan:K[l][i].rowSpan,colSpan:K[l][i].colSpan,className:t.className,"data-fixed":1===K[l][i].colSpan?n.getTableColumnFixed.call(void 0,se[i+ie]):void 0,style:c.getTableColumnStyle.call(void 0,se,i+ie,ae),children:r.jsx.call(void 0,"span",{className:"contents","data-ug-slot":"cell",children:t.cell?t.cell(a):String(_nullishCoalesce(a[t.id],()=>"—"))})},t.id):null),w?r.jsx.call(void 0,e.TableCell,{className:"whitespace-nowrap text-right","data-ug-slot":"action-column","data-fixed":n.getTableColumnFixed.call(void 0,se[te.length-1]),children:r.jsx.call(void 0,"div",{"data-ug-slot":"actions",children:w(a)})}):null]},i)}),d||0!==a.length?null:r.jsx.call(void 0,e.TableRow,{children:r.jsx.call(void 0,e.TableCell,{colSpan:J.length+(x?1:0)+(w?1:0),children:r.jsx.call(void 0,"div",{"data-ug-slot":"empty",children:r.jsx.call(void 0,e.EmptyState,{description:p,icon:s.Database,size:"sm",title:h})})})})]}),X&&a.length>0&&r.jsx.call(void 0,"tfoot",{"data-ug-slot":"aggregate",children:r.jsxs.call(void 0,e.TableRow,{children:[x&&r.jsx.call(void 0,e.TableCell,{}),J.map((a,l)=>r.jsx.call(void 0,e.TableCell,{"data-fixed":n.getTableColumnFixed.call(void 0,se[l+ie]),style:c.getTableColumnStyle.call(void 0,se,l+ie,ae),children:X[l]},a.id)),w&&r.jsx.call(void 0,e.TableCell,{"data-ug-slot":"action-column","data-fixed":n.getTableColumnFixed.call(void 0,se[te.length-1])})]})})]})}),B&&!d&&(N>0||T&&z)?r.jsxs.call(void 0,"div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-[var(--content-gap)] text-sm text-text-secondary max-sm:items-stretch max-sm:flex-col","data-ug-slot":"pagination",children:[r.jsxs.call(void 0,"span",{"data-ug-slot":"summary",children:["共 ",N," 条,第 ",y," / ",ve," 页"]}),r.jsxs.call(void 0,"div",{"data-ug-slot":"pagination-controls",children:[T&&z?r.jsx.call(void 0,e.Select,{"aria-label":"每页条数",options:ge.map(e=>({label:`每页 ${e} 条`,value:e})),size:"sm",value:k,onValueChange:e=>{"number"==typeof e&&z(e)}}):null,S&&ve>1?r.jsx.call(void 0,e.Pagination,{onPageChange:S,page:y,totalPages:ve,size:"sm"}):null]})]}):null]})})}function defaultChildren(e){return e.children}function TreeTable({rows:e,columns:a,getRowId:l,getChildren:t=defaultChildren,getRowLabel:d,treeColumnId:c=_optionalChain([n.getTableStructure.call(void 0,a),"access",e=>e.leaves,"access",e=>e[0],"optionalAccess",e=>e.id]),expandedIds:u,defaultExpandedIds:v,defaultExpandAll:g=!1,onExpandedChange:h,onExpandChange:p,indent:m=16,expansionDisabled:x=!1,expansionDisabledReason:b,fill:f=!1,size:j="sm",bordered:w=!0,className:C,...y}){const[N,k]=o.useState.call(void 0,()=>v?new Set(v):void 0),S=_nullishCoalesce(u,()=>N),T=o.useMemo.call(void 0,()=>n.projectTreeTableRows.call(void 0,e,{getRowId:l,getChildren:t,expandedIds:S,defaultExpandAll:g}),[e,l,t,S,g]),z=new Map(T.visibleRows.map(e=>[e.id,e]));function toggle(e,a){if(x)return;const t=l(e),i=new Set(_nullishCoalesce(S,()=>g?T.expandableIds:[]));a?i.add(t):i.delete(t),void 0===u&&k(i),_optionalChain([h,"optionalCall",e=>e(i)]),_optionalChain([p,"optionalCall",l=>l(e,a)])}const decorate=e=>e.map(e=>_optionalChain([e,"access",e=>e.children,"optionalAccess",e=>e.length])?{...e,children:decorate(e.children)}:e.id!==c?e:{...e,cell:a=>{const t=z.get(l(a)),o=_nullishCoalesce(_optionalChain([d,"optionalCall",e=>e(a)]),()=>`记录 ${t.id}`);return r.jsxs.call(void 0,"div",{"data-ug-slot":"tree-cell","data-depth":t.depth,style:{paddingInlineStart:t.depth*Math.max(m,0)},children:[r.jsxs.call(void 0,"span",{"data-ug-slot":"level",children:["层级 ",t.depth+1,","]}),t.hasChildren?r.jsx.call(void 0,i.Button,{type:"button",size:"icon-sm",variant:"ghost",tone:"neutral","aria-label":`${t.expanded?"收起":"展开"}${o}`,"aria-expanded":t.expanded,disabled:x,"aria-description":b,onClick:()=>toggle(a,!t.expanded),onKeyDown:e=>{x||("ArrowRight"!==e.key||t.expanded||(e.preventDefault(),toggle(a,!0)),"ArrowLeft"===e.key&&t.expanded&&(e.preventDefault(),toggle(a,!1)))},children:t.expanded?r.jsx.call(void 0,s.ChevronDown,{size:16,"aria-hidden":!0}):r.jsx.call(void 0,s.ChevronRight,{size:16,"aria-hidden":!0})}):r.jsx.call(void 0,"span",{"data-ug-slot":"tree-spacer","aria-hidden":!0}),r.jsx.call(void 0,"span",{"data-ug-slot":"tree-content",title:o,children:e.cell?e.cell(a):String(_nullishCoalesce(a[e.id],()=>"—"))})]})}}),_=decorate(a);return r.jsx.call(void 0,"div",{className:C,"data-ug":"tree-table","data-ug-slot":"root","data-fill":f||void 0,"data-size":j,"data-variant":w?"bordered":"default","data-state":y.error?"error":y.loading?"loading":T.visibleRows.length?"ready":"empty",children:r.jsx.call(void 0,DataTable,{...y,rows:T.visibleRows.map(e=>e.record),columns:_,getRowId:l,pagination:!1,fill:f,size:j,bordered:w})})}var v=require("@ug666/ui-core/theme"),g=require("@ug666/ui-web/sidebar");function activeClass(e,a){return e?"indicator"===a?"bg-transparent text-[var(--ug-navigation-active-text)] hover:bg-[var(--ug-navigation-hover-bg)] hover:text-[var(--ug-navigation-active-text)] data-[state=open]:bg-[var(--ug-navigation-hover-bg)] data-[state=open]:text-[var(--ug-navigation-active-text)] after:absolute after:inset-x-2 after:bottom-0 after:h-0.5 after:bg-[var(--ug-navigation-active-text)]":"bg-[var(--ug-navigation-active-bg)] text-[var(--ug-navigation-active-text)] hover:bg-[var(--ug-navigation-active-bg)] hover:text-[var(--ug-navigation-active-text)] data-[state=open]:bg-[var(--ug-navigation-active-bg)] data-[state=open]:text-[var(--ug-navigation-active-text)]":"bg-transparent text-[var(--ug-navigation-text)] hover:bg-[var(--ug-navigation-hover-bg)] hover:text-[var(--ug-navigation-text)] data-[state=open]:bg-[var(--ug-navigation-hover-bg)] data-[state=open]:text-[var(--ug-navigation-text)]"}function topItemClass(e,a,l){return i.cn.call(void 0,"relative flex max-w-40 items-center gap-1.5 rounded-[var(--radius-control)] px-2.5 font-medium","compact"===l?"h-8 text-xs":"h-9 text-sm",activeClass(e,a))}function moreItemClass(e,a,l){return i.cn.call(void 0,"relative flex shrink-0 items-center gap-1 px-2.5","compact"===l?"h-8 text-xs":"h-9 text-sm",activeClass(e,a))}var h=o.memo.call(void 0,function DropdownItems2({items:a,level:l=0}){return r.jsx.call(void 0,"div",{className:i.cn.call(void 0,"grid min-w-52 gap-1 p-1.5",l>0&&"min-w-48 border-l border-[var(--ug-navigation-border)] pl-2"),children:a.map((a,t)=>{const o=a.icon,n=_nullishCoalesce(_nullishCoalesce(a.id,()=>a.href),()=>`${l}-${t}-${a.label}`);return _optionalChain([a,"access",e=>e.children,"optionalAccess",e=>e.length])?r.jsxs.call(void 0,"div",{className:"grid gap-1",children:[r.jsxs.call(void 0,"div",{className:"flex items-center gap-2 px-2 py-1.5 text-xs font-semibold text-[var(--ug-navigation-text)] opacity-75",children:[r.jsx.call(void 0,o,{"aria-hidden":"true",size:14}),r.jsx.call(void 0,"span",{className:"truncate",children:a.label})]}),r.jsx.call(void 0,DropdownItems2,{items:a.children,level:l+1})]},n):r.jsxs.call(void 0,e.NavigationMenuLink,{active:a.active,className:i.cn.call(void 0,"flex w-full items-center gap-2 px-2.5 py-2",(s=Boolean(a.active),s?"bg-[var(--ug-navigation-active-bg)] text-[var(--ug-navigation-active-text)] hover:bg-[var(--ug-navigation-active-bg)] hover:text-[var(--ug-navigation-active-text)]":"bg-transparent text-[var(--ug-navigation-text)] hover:bg-[var(--ug-navigation-hover-bg)] hover:text-[var(--ug-navigation-text)]")),href:a.href,children:[r.jsx.call(void 0,o,{"aria-hidden":"true",size:15}),r.jsx.call(void 0,"span",{className:"min-w-0 flex-1 truncate",children:a.label}),void 0!==a.badge?r.jsx.call(void 0,"span",{className:"text-xs opacity-70",children:a.badge}):null]},n);var s})})}),p=o.memo.call(void 0,function TopItem2({item:a,active:l,activeStyle:t,density:i}){const o=a.icon,n=topItemClass(l,t,i);return _optionalChain([a,"access",e=>e.children,"optionalAccess",e=>e.length])?r.jsxs.call(void 0,e.NavigationMenuItem,{children:[r.jsxs.call(void 0,e.NavigationMenuTrigger,{active:l,className:n,children:[r.jsx.call(void 0,o,{"aria-hidden":"true",size:15}),r.jsx.call(void 0,"span",{className:"truncate",children:a.label})]}),r.jsx.call(void 0,e.NavigationMenuContent,{className:"max-h-[min(70dvh,32rem)] overflow-y-auto overscroll-contain border-[var(--ug-navigation-border)] bg-[var(--ug-navigation-bg)] text-[var(--ug-navigation-text)]",children:r.jsx.call(void 0,h,{items:a.children})})]}):r.jsx.call(void 0,e.NavigationMenuItem,{children:r.jsxs.call(void 0,e.NavigationMenuLink,{active:l,className:n,href:a.href,children:[r.jsx.call(void 0,o,{"aria-hidden":"true",size:15}),r.jsx.call(void 0,"span",{className:"truncate",children:a.label})]})})});function AdminHorizontalNavigation({items:a,activeStyle:l,density:t}){const n=o.useMemo.call(void 0,()=>function normalizeItems(e){const a=1===e.length?e[0]:void 0;return _optionalChain([a,"optionalAccess",e=>e.children,"optionalAccess",e=>e.length])?a.href?[{...a,children:void 0},...a.children]:a.children:e}(a),[a]),d=o.useMemo.call(void 0,()=>g.createSidebarTreeMeta.call(void 0,n),[n]),[c,u]=o.useState.call(void 0,()=>Math.min(n.length,6)),v=o.useRef.call(void 0,null),m=o.useRef.call(void 0,null),x=o.useRef.call(void 0,null),b=o.useMemo.call(void 0,()=>n.slice(0,c),[n,c]),f=o.useMemo.call(void 0,()=>n.slice(c),[n,c]),j=o.useCallback.call(void 0,e=>Boolean(e.active||d.activeBranches.has(e)),[d]),w=o.useMemo.call(void 0,()=>f.some(j),[j,f]),C=o.useCallback.call(void 0,()=>{const e=v.current,a=m.current;if(!e||!a||e.clientWidth<=0)return void u(Math.min(n.length,6));const l=Array.from(a.querySelectorAll('[data-ug-navigation-measure="item"]')),t=a.querySelector('[data-ug-navigation-measure="more"]'),i=Number.parseFloat(window.getComputedStyle(a).columnGap)||4,o=_nullishCoalesce(_optionalChain([t,"optionalAccess",e=>e.getBoundingClientRect,"call",e=>e(),"access",e=>e.width]),()=>0);let s=0,r=0;for(let a=0;a<l.length;a+=1){const t=_nullishCoalesce(_optionalChain([l,"access",e=>e[a],"optionalAccess",e=>e.getBoundingClientRect,"call",e=>e(),"access",e=>e.width]),()=>0),n=a>0?i:0;if(s+n+t+(a<l.length-1?i+o:0)>e.clientWidth+.5)break;s+=n+t,r+=1}u(r)},[n]),y=o.useCallback.call(void 0,()=>{null===x.current&&(x.current=window.requestAnimationFrame(()=>{x.current=null,C()}))},[C]);return o.useLayoutEffect.call(void 0,()=>{let e=!1;const a="undefined"==typeof ResizeObserver?void 0:new ResizeObserver(y);return v.current&&_optionalChain([a,"optionalAccess",e=>e.observe,"call",e=>e(v.current)]),y(),_optionalChain([document,"access",e=>e.fonts,"optionalAccess",e=>e.ready,"access",e=>e.then,"call",a=>a(()=>{e||y()})]),()=>{e=!0,null!==x.current&&window.cancelAnimationFrame(x.current),x.current=null,_optionalChain([a,"optionalAccess",e=>e.disconnect,"call",e=>e()])}},[t,y]),r.jsxs.call(void 0,"div",{className:"relative min-w-0 flex-1",ref:v,children:[r.jsxs.call(void 0,"div",{"aria-hidden":"true",className:"pointer-events-none absolute invisible flex max-w-none items-center gap-1 whitespace-nowrap","data-ug-slot":"measure",inert:!0,ref:m,children:[n.map((e,a)=>{const o=e.icon;return r.jsxs.call(void 0,"span",{className:i.cn.call(void 0,topItemClass(j(e),l,t),"max-w-none shrink-0"),"data-ug-navigation-measure":"item",children:[r.jsx.call(void 0,o,{"aria-hidden":"true",size:15}),r.jsx.call(void 0,"span",{children:e.label}),_optionalChain([e,"access",e=>e.children,"optionalAccess",e=>e.length])?r.jsx.call(void 0,s.ChevronDown,{"aria-hidden":"true",size:14}):null]},_nullishCoalesce(_nullishCoalesce(e.id,()=>e.href),()=>`measure-${a}-${e.label}`))}),r.jsxs.call(void 0,"span",{className:moreItemClass(!1,l,t),"data-ug-navigation-measure":"more",children:[r.jsx.call(void 0,s.MoreHorizontal,{"aria-hidden":"true",size:16}),r.jsx.call(void 0,"span",{children:"更多"})]})]}),r.jsxs.call(void 0,e.NavigationMenu,{activation:"click",tone:"inherit",className:"min-w-0 w-full overflow-visible","data-ug-context":"admin-horizontal-navigation",children:[b.map((e,a)=>r.jsx.call(void 0,p,{active:j(e),activeStyle:l,density:t,item:e},_nullishCoalesce(_nullishCoalesce(e.id,()=>e.href),()=>`${a}-${e.label}`))),f.length?r.jsxs.call(void 0,e.NavigationMenuItem,{children:[r.jsxs.call(void 0,e.NavigationMenuTrigger,{active:w,className:moreItemClass(w,l,t),children:[r.jsx.call(void 0,s.MoreHorizontal,{"aria-hidden":"true",size:16}),r.jsx.call(void 0,"span",{children:"更多"})]}),r.jsx.call(void 0,e.NavigationMenuContent,{className:"right-0 left-auto max-h-[min(70dvh,32rem)] overflow-y-auto overscroll-contain border-[var(--ug-navigation-border)] bg-[var(--ug-navigation-bg)] text-[var(--ug-navigation-text)]",children:r.jsx.call(void 0,h,{items:f})})]}):null]})]})}var m=o.forwardRef.call(void 0,({navItems:a,sidebarHeader:t,sidebarCollapsedHeader:n,sidebarHeaderAlign:d="start",sidebarHeaderDivider:c=!0,sidebarContextSwitcher:u,sidebarContextSwitcherVisible:g=!1,sidebarContextSwitcherDividers:h=!1,sidebarContextSwitcherPlacement:p="after-search",sidebarScrollActiveItemIntoView:m=!0,sidebarFooter:x,sidebarVariant:b="dark",navigationMode:f="sidebar",navigationPalette:j,themePreset:w="default",themeMode:C,themeAccent:y="theme",navigationColors:N,navigationActiveStyle:k,navigationDensity:S,sidebarActiveStyle:T="highlight",sidebarDensity:z="comfortable",sidebarSearchable:_=!1,sidebarSearchPlaceholder:A="搜索菜单...",sidebarSearchDividers:R=!0,sidebarCollapsible:M=!0,sidebarTogglePlacement:L="sidebar",sidebarResizable:I=!1,sidebarWidth:D,defaultSidebarWidth:E=256,sidebarMinWidth:B=208,sidebarMaxWidth:G=480,onSidebarWidthChange:F,sidebarCollapsed:$,defaultSidebarCollapsed:V=!1,onSidebarCollapsedChange:P,mobileSidebarOpen:U,onMobileSidebarOpenChange:W,topbarStart:O,topbarEnd:H,topbar:q,secondaryBar:Q,topbarBordered:J=!0,secondaryBarBordered:K=!1,fluidContent:X=!1,contentPadding:Y=!0,mainClassName:Z,contentClassName:ee,children:ae,className:le,...te},ie)=>{const oe=l.useMediaQuery.call(void 0,"(prefers-color-scheme: dark)"),[ne,se]=o.useState.call(void 0,V),[re,de]=o.useState.call(void 0,!1),ce=_nullishCoalesce($,()=>ne),ue=_nullishCoalesce(U,()=>re),ve=_nullishCoalesce(j,()=>"primary"===b?"light":"dark"),ge=void 0===C?ve:v.resolveUGNavigationPalette.call(void 0,C,oe),he=N?ve:ge,pe=v.resolveUGNavigationColors.call(void 0,w,he,N,y),me=_nullishCoalesce(k,()=>T),xe=_nullishCoalesce(S,()=>z),be="light"===he?"primary":"dark",fe={"--ug-navigation-bg":pe.background,"--ug-navigation-text":pe.text,"--ug-navigation-active-bg":pe.activeBackground,"--ug-navigation-active-text":pe.activeText,"--ug-navigation-hover-bg":pe.hoverBackground,"--ug-navigation-border":`color-mix(in srgb, ${pe.text} 18%, ${pe.background})`};function setSidebarCollapsed(e){void 0===$&&se(e),_optionalChain([P,"optionalCall",a=>a(e)])}function setMobileOpen(e){void 0===U&&de(e),_optionalChain([W,"optionalCall",a=>a(e)])}return r.jsx.call(void 0,"div",{ref:ie,className:i.cn.call(void 0,"text-text-primary",le),...te,"data-ug":"admin-shell","data-state":ue?"mobile-open":"default","data-variant":be,"data-navigation-mode":f,"data-navigation-palette":he,"data-sidebar-active-style":me,"data-sidebar-density":xe,"data-size":"md",children:r.jsxs.call(void 0,"div",{className:"flex min-h-screen min-w-0",children:[r.jsx.call(void 0,e.Sidebar,{items:a,variant:be,activeStyle:me,density:xe,colors:pe,header:t,headerAlign:d,headerDivider:c,collapsedHeader:n,contextSwitcher:u,contextSwitcherVisible:g,contextSwitcherDividers:h,contextSwitcherPlacement:p,scrollActiveItemIntoView:m,footer:x,searchable:_,searchPlaceholder:A,searchDividers:R,collapsible:M&&"sidebar"===L,bottomCollapsible:M&&"bottom"===L,resizable:I,width:D,defaultWidth:E,minWidth:B,maxWidth:G,onWidthChange:F,collapsed:ce,onCollapsedChange:setSidebarCollapsed,responsive:!0,mobileOpen:ue,onMobileOpenChange:setMobileOpen,className:i.cn.call(void 0,"shrink-0","header"===f&&"lg:hidden"),"data-ug-slot":"sidebar"}),r.jsxs.call(void 0,"div",{className:"flex min-w-0 flex-1 flex-col",children:[r.jsxs.call(void 0,"header",{className:i.cn.call(void 0,"sticky top-0 z-30 flex items-center gap-[calc(var(--content-gap)*0.75)] px-[var(--content-gap)] sm:px-[calc(var(--content-gap)*1.25)] lg:px-[calc(var(--content-gap)*1.5)]",J?"border-b":"border-b-0","header"===f?"border-[var(--ug-navigation-border)] bg-[var(--ug-navigation-bg)] text-[var(--ug-navigation-text)]":"border-border-base bg-surface-0"),style:"header"===f?fe:void 0,"data-ug-slot":"topbar",children:[r.jsx.call(void 0,i.Button,{type:"button",variant:"ghost",size:"icon",className:"md:hidden","aria-label":"打开侧边栏",onClick:()=>setMobileOpen(!0),"data-ug-slot":"mobile-trigger",children:r.jsx.call(void 0,s.Menu,{"aria-hidden":"true",focusable:"false",size:18})}),"sidebar"===f&&M&&"topbar"===L?r.jsx.call(void 0,i.Button,{type:"button",variant:"ghost",size:"icon",className:"hidden md:inline-flex","aria-label":ce?"展开侧边栏":"折叠侧边栏",onClick:()=>setSidebarCollapsed(!ce),"data-ug-slot":"desktop-sidebar-trigger",children:ce?r.jsx.call(void 0,s.PanelLeftOpen,{"aria-hidden":"true",focusable:"false",size:18}):r.jsx.call(void 0,s.PanelLeftClose,{"aria-hidden":"true",focusable:"false",size:18})}):null,"header"===f?r.jsxs.call(void 0,r.Fragment,{children:[r.jsx.call(void 0,"div",{className:"hidden shrink-0 items-center lg:flex",children:t}),r.jsx.call(void 0,"div",{className:"hidden min-w-0 flex-1 lg:flex",children:r.jsx.call(void 0,AdminHorizontalNavigation,{activeStyle:me,density:xe,items:a})}),r.jsx.call(void 0,"div",{className:"min-w-0 flex-1 lg:hidden","data-ug-slot":"topbar-start",children:O})]}):q?r.jsx.call(void 0,"div",{className:"min-w-0 flex-1","data-ug-slot":"topbar-content",children:q}):r.jsx.call(void 0,"div",{className:"min-w-0 flex-1","data-ug-slot":"topbar-start",children:O}),"header"!==f&&q||!H?null:r.jsx.call(void 0,"div",{className:"flex shrink-0 items-center gap-[calc(var(--content-gap)*0.5)]","data-ug-slot":"topbar-end",children:H},"topbar-end")]}),Q?r.jsx.call(void 0,"div",{className:i.cn.call(void 0,"sticky top-[var(--ug-admin-shell-topbar-height)] z-20 bg-surface-1",K&&"border-b border-border-base"),"data-ug-slot":"secondary-bar",children:Q}):null,r.jsx.call(void 0,"main",{className:i.cn.call(void 0,"flex-1 overflow-x-clip",Z),"data-ug-slot":"main",children:r.jsx.call(void 0,"div",{className:i.cn.call(void 0,"mx-auto",X?"max-w-none":"max-w-7xl",Y?"px-[var(--content-gap)] py-[calc(var(--content-gap)*1.5)] sm:px-[calc(var(--content-gap)*1.25)] lg:px-[calc(var(--content-gap)*1.5)]":"!p-0",ee),"data-ug-context":"admin-shell","data-ug-slot":"content",children:ae})})]})]})})});function getScrollBehavior(e){return e.closest('[data-ug-motion="reduced"]')||"function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches?"auto":"smooth"}function getTabElements(e){return Array.from(e.children).filter(e=>e instanceof HTMLLIElement&&"item"===e.dataset.ugSlot)}function clearItemMotion(e){delete e.dataset.motion,e.style.removeProperty("--ug-app-tabs-motion-x")}function playItemMotion(e,a,l=0){const t=Boolean(e.dataset.motion);clearItemMotion(e),t&&e.offsetWidth,"move"===a&&e.style.setProperty("--ug-app-tabs-motion-x",`${l}px`),e.dataset.motion=a}m.displayName="AdminShell";var x=o.memo.call(void 0,({active:e,activeItemRef:a,closable:l,closeEnabled:t,icon:i,label:o,onActivate:n,onClose:d,value:c})=>r.jsxs.call(void 0,"li",{"data-closable":l||void 0,"data-state":e?"active":"default","data-ug-slot":"item","data-value":c,ref:e?a:void 0,children:[r.jsxs.call(void 0,"button",{"aria-current":e?"page":void 0,"data-ug-slot":"trigger",onAuxClick:e=>{1===e.button&&l&&t&&(e.preventDefault(),d(c))},onClick:()=>n(c),title:o,type:"button",children:[i?r.jsx.call(void 0,"span",{"aria-hidden":"true","data-ug-slot":"icon",children:i}):null,r.jsx.call(void 0,"span",{"data-ug-slot":"label",children:o})]}),l&&t?r.jsx.call(void 0,"button",{"aria-label":`关闭页面 ${o}`,"data-ug-slot":"close",onClick:()=>d(c),type:"button",children:r.jsx.call(void 0,s.X,{"aria-hidden":"true",size:13})}):null]}));x.displayName="AppTabView";var b=o.forwardRef.call(void 0,({items:e,value:a,density:l="comfortable",showIcons:t=!0,closable:n=!0,bordered:d=!0,onValueChange:c,onClose:u,className:v,"aria-label":g="页面标签",...h},p)=>{const m=o.useRef.call(void 0,null),b=o.useRef.call(void 0,null),f=o.useRef.call(void 0,null),j=o.useRef.call(void 0,null),w=o.useRef.call(void 0,null),C=o.useRef.call(void 0,new Map),y=o.useRef.call(void 0,null),N=o.useRef.call(void 0,e),k=o.useRef.call(void 0,c),S=o.useRef.call(void 0,u),[T,z]=o.useState.call(void 0,{canScrollStart:!1,canScrollEnd:!1}),_=T.canScrollStart||T.canScrollEnd,A=o.useMemo.call(void 0,()=>e.map(e=>`${e.value}${e.label}${n&&e.closable?"1":"0"}${t&&e.icon?"1":"0"}`).join(""),[n,e,t]);N.current=e,k.current=c,S.current=u;const R=o.useCallback.call(void 0,e=>{const a=N.current.find(a=>a.value===e);a&&k.current(a)},[]),M=o.useCallback.call(void 0,e=>{const a=N.current.find(a=>a.value===e);if(!a)return;const l=b.current;_optionalChain([l?getTabElements(l).find(a=>a.dataset.value===e):null,"optionalAccess",e=>e.contains,"call",e=>e(document.activeElement)])&&(y.current=e),_optionalChain([S,"access",e=>e.current,"optionalCall",e=>e(a)])},[]),L=o.useCallback.call(void 0,()=>{null===j.current&&(j.current=window.requestAnimationFrame(()=>{j.current=null;const e=b.current;if(!e)return;const a=Math.max(0,e.scrollWidth-e.clientWidth),l={canScrollStart:e.scrollLeft>1,canScrollEnd:e.scrollLeft<a-1};z(e=>e.canScrollStart===l.canScrollStart&&e.canScrollEnd===l.canScrollEnd?e:l)}))},[]),I=o.useCallback.call(void 0,e=>{const a=b.current,l=f.current;if(!a||!l)return;const t=getTabElements(a);if(l===t[0]&&a.scrollLeft>1)return void a.scrollBy({behavior:e,left:-a.scrollLeft});const i=Math.max(0,a.scrollWidth-a.clientWidth);if(l===t[t.length-1]&&a.scrollLeft<i-1)return void a.scrollBy({behavior:e,left:i-a.scrollLeft});const o=l.offsetLeft-a.scrollLeft,n=o+l.offsetWidth-a.clientWidth;o<0?a.scrollBy({behavior:e,left:o-2}):n>0&&a.scrollBy({behavior:e,left:n+2})},[]);function scrollTabs(e){const a=b.current;a&&a.scrollBy({behavior:getScrollBehavior(a),left:e*Math.max(160,.6*a.clientWidth)})}return o.useLayoutEffect.call(void 0,()=>{const e=b.current;if(!e)return;const a=getTabElements(e),l=new Map;for(const e of a){const a=e.dataset.value;a&&l.set(a,e.offsetLeft)}const t=C.current;if(t.size>0&&"auto"!==getScrollBehavior(e))for(const e of a){const a=e.dataset.value;if(!a)continue;const i=t.get(a),o=_nullishCoalesce(l.get(a),()=>0),n=void 0===i?0:i-o;void 0!==i&&Math.abs(n)<.5||playItemMotion(e,void 0===i?"enter":"move",n)}C.current=l},[A]),o.useLayoutEffect.call(void 0,()=>{const e=y.current;if(!e||N.current.some(a=>a.value===e))return;const a=_optionalChain([b,"access",e=>e.current,"optionalAccess",e=>e.querySelector,"call",e=>e('[data-ug-slot="item"][data-state="active"] [data-ug-slot="trigger"]')]);a&&(y.current=null,a.focus({preventScroll:!0}))},[A,a]),o.useEffect.call(void 0,()=>{const e=m.current,a=b.current;if(!e||!a)return;L(),a.addEventListener("scroll",L,{passive:!0});const handleContainerResize=()=>{L(),null!==w.current&&window.cancelAnimationFrame(w.current),w.current=window.requestAnimationFrame(()=>{w.current=window.requestAnimationFrame(()=>{w.current=null,I("auto"),L()})})},l="undefined"==typeof ResizeObserver?null:new ResizeObserver(handleContainerResize);return l?l.observe(e):window.addEventListener("resize",handleContainerResize),()=>{a.removeEventListener("scroll",L),l?l.disconnect():window.removeEventListener("resize",handleContainerResize),null!==j.current&&(window.cancelAnimationFrame(j.current),j.current=null),null!==w.current&&(window.cancelAnimationFrame(w.current),w.current=null)}},[I,L]),o.useEffect.call(void 0,()=>{if(!e.some(e=>e.value===a))return;const l=b.current;l&&(I(getScrollBehavior(l)),L())},[e,I,L,a]),r.jsx.call(void 0,"nav",{ref:p,...h,"aria-label":g,className:i.cn.call(void 0,"text-text-primary",!d&&"[background-image:none]",v),"data-density":l,"data-overflow":_||void 0,"data-size":"md","data-state":_?"overflow":"default","data-ug":"app-tabs","data-variant":"browser",children:r.jsxs.call(void 0,"div",{"data-ug-slot":"track",ref:m,children:[r.jsx.call(void 0,"button",{"aria-label":"向左滚动页面标签","data-ug-slot":"scroll-start","data-visible":_&&T.canScrollStart||void 0,disabled:!T.canScrollStart,onClick:()=>scrollTabs(-1),type:"button",children:r.jsx.call(void 0,s.ChevronLeft,{"aria-hidden":"true",size:15})}),r.jsx.call(void 0,"ul",{ref:b,"aria-label":"页面标签列表","data-ug-slot":"list",onAnimationEnd:e=>{["ug-motion-app-tab-enter","ug-motion-app-tab-layout-shift"].includes(e.animationName)&&clearItemMotion(e.target)},children:e.map(e=>r.jsx.call(void 0,x,{active:e.value===a,activeItemRef:f,closable:n&&Boolean(e.closable),closeEnabled:n&&Boolean(u),icon:t?e.icon:void 0,label:e.label,onActivate:R,onClose:M,value:e.value},e.value))}),r.jsx.call(void 0,"button",{"aria-label":"向右滚动页面标签","data-ug-slot":"scroll-end","data-visible":_&&T.canScrollEnd||void 0,disabled:!T.canScrollEnd,onClick:()=>scrollTabs(1),type:"button",children:r.jsx.call(void 0,s.ChevronRight,{"aria-hidden":"true",size:15})})]})})});b.displayName="AppTabs";var f=o.forwardRef.call(void 0,({open:a,onOpenChange:l,title:t,description:o,children:n,variant:d="destructive",icon:c,cancelText:u="取消",confirmText:v="确认",loading:g=!1,disabled:h=!1,closeOnConfirm:p=!0,onCancel:m,onConfirm:x,className:b,...f},j)=>{const w=_nullishCoalesce(c,()=>"destructive"===d?s.AlertTriangle:s.HelpCircle);function handleCancel(){g||(_optionalChain([m,"optionalCall",e=>e()]),l(!1))}return r.jsx.call(void 0,e.Modal,{open:a,onClose:handleCancel,closeOnEsc:!g,closeOnOverlay:!g,children:r.jsxs.call(void 0,e.ModalContent,{ref:j,className:i.cn.call(void 0,"max-w-md",b),...f,"data-ug":"confirm-dialog","data-state":a?"open":"default","data-variant":d,"data-size":"md",children:[r.jsxs.call(void 0,e.ModalHeader,{className:"items-start gap-[calc(var(--content-gap)*0.75)]","data-ug-slot":"header",children:[r.jsx.call(void 0,"div",{className:i.cn.call(void 0,"flex h-[var(--control-height-md)] w-[var(--control-height-md)] shrink-0 items-center justify-center rounded-[var(--radius-control)]","destructive"===d?"bg-danger-soft text-danger-soft-fg":"bg-primary-soft text-primary-soft-fg"),"data-ug-slot":"icon",children:r.jsx.call(void 0,w,{size:20,"aria-hidden":"true"})}),r.jsxs.call(void 0,"div",{className:"min-w-0 flex-1 space-y-[calc(var(--content-gap)*0.25)]","data-ug-slot":"content",children:[r.jsx.call(void 0,e.ModalTitle,{className:"break-words text-base","data-ug-slot":"title",children:t}),o?r.jsx.call(void 0,"p",{className:"text-sm leading-6 text-text-secondary","data-ug-slot":"description",children:o}):null]})]}),n?r.jsx.call(void 0,"div",{className:"px-[var(--content-gap)] py-[var(--content-gap)] text-sm text-text-secondary","data-ug-slot":"body",children:n}):null,r.jsxs.call(void 0,e.ModalFooter,{className:"flex-col-reverse gap-[calc(var(--content-gap)*0.5)] sm:flex-row","data-ug-slot":"footer",children:[r.jsx.call(void 0,i.Button,{type:"button",variant:"outline",disabled:g,onClick:handleCancel,"data-ug-slot":"cancel",children:u}),r.jsx.call(void 0,i.Button,{type:"button",variant:"destructive"===d?"destructive":"default",loading:g,disabled:h,onClick:function handleConfirm(){const e=_optionalChain([x,"optionalCall",e=>e()]);return p&&l(!1),e},"data-ug-slot":"confirm",children:v})]})]})})});f.displayName="ConfirmDialog";var j=o.forwardRef.call(void 0,({value:e,label:a,displayValue:l,monospace:t=!0,disabled:n=!1,bordered:d=!0,showIcon:c=!0,showCopyText:u=!0,copyLabel:v="复制",copiedLabel:g="已复制",onCopied:h,onCopyError:p,className:m,...x},b)=>{const[f,j]=o.useState.call(void 0,!1),w=o.useRef.call(void 0,null),C=o.useRef.call(void 0,{value:e,generation:0,mounted:!0});return C.current.value!==e&&(C.current.value=e,C.current.generation++),o.useEffect.call(void 0,()=>(C.current.mounted=!0,()=>{C.current.mounted=!1,C.current.generation++,w.current&&clearTimeout(w.current)}),[]),o.useEffect.call(void 0,()=>{j(!1),w.current&&(clearTimeout(w.current),w.current=null)},[e]),r.jsxs.call(void 0,"div",{ref:b,className:i.cn.call(void 0,"space-y-[calc(var(--content-gap)*0.5)]",m),...x,"data-ug":"copy-field","data-state":n?"disabled":f?"copied":"default","data-variant":t?"monospace":"default","data-bordered":d?"true":"false","data-size":"md",children:[a?r.jsx.call(void 0,"div",{className:"text-xs font-medium text-text-secondary","data-ug-slot":"label",children:a}):null,r.jsxs.call(void 0,"div",{className:i.cn.call(void 0,"flex min-w-0 items-stretch overflow-hidden rounded-[var(--radius-control)] bg-surface-1",d&&"border border-border-base",n&&"opacity-60"),"data-ug-slot":"field",children:[r.jsx.call(void 0,"div",{className:i.cn.call(void 0,"min-w-0 flex-1 self-center truncate px-[var(--control-padding-x-sm)] py-[calc(var(--content-gap)*0.5)] text-sm text-text-primary",t&&"font-mono"),title:"string"==typeof l?l:e,"data-ug-slot":"value",children:_nullishCoalesce(l,()=>e)}),r.jsx.call(void 0,"div",{className:i.cn.call(void 0,"flex shrink-0 items-center bg-surface-2 px-[calc(var(--content-gap)*0.375)]",d&&"border-l border-border-base"),"data-ug-slot":"action",children:r.jsxs.call(void 0,i.Button,{type:"button",variant:"ghost",size:"sm",disabled:n,onClick:async function handleCopy(){if(n)return;const a=e,l=++C.current.generation,isCurrent=()=>C.current.mounted&&C.current.generation===l&&C.current.value===a;j(!1),w.current&&(clearTimeout(w.current),w.current=null);try{if(!_optionalChain([navigator,"access",e=>e.clipboard,"optionalAccess",e=>e.writeText]))throw new Error("Clipboard API is not available");if(await navigator.clipboard.writeText(a),!isCurrent())return;if(j(!0),_optionalChain([h,"optionalCall",e=>e(a)]),!isCurrent())return;w.current&&clearTimeout(w.current),w.current=setTimeout(()=>{isCurrent()&&j(!1),w.current=null},1400)}catch(e){isCurrent()&&_optionalChain([p,"optionalCall",a=>a(e)])}},"aria-label":u?void 0:f?g:v,"aria-live":"polite","data-ug-slot":"button",children:[c?f?r.jsx.call(void 0,s.Check,{"aria-hidden":"true",focusable:"false",size:15}):r.jsx.call(void 0,s.Copy,{"aria-hidden":"true",focusable:"false",size:15}):null,u?f?g:v:null]})})]})]})});function DataTableIdentity({title:e,description:a,leading:l,showLeading:t=!0,showDescription:o=!0,className:n,...s}){return r.jsxs.call(void 0,"span",{className:i.cn.call(void 0,"gap-[calc(var(--content-gap)*0.5)]",n),...s,"data-size":"md","data-state":"default","data-ug":"data-table-identity","data-variant":"default",children:[t&&l?r.jsx.call(void 0,"span",{"data-ug-slot":"leading",children:l}):null,r.jsxs.call(void 0,"span",{"data-ug-slot":"copy",children:[r.jsx.call(void 0,"strong",{"data-ug-slot":"title",children:e}),o&&a?r.jsx.call(void 0,"small",{className:"text-text-secondary","data-ug-slot":"description",children:a}):null]})]})}function DataTableToolbar({title:e,description:a,showDescription:l=!0,bordered:t=!0,compact:o=!1,actions:n,children:s,className:d,...c}){return r.jsxs.call(void 0,"div",{className:i.cn.call(void 0,"gap-[var(--content-gap)] border-border-base",!t&&"border-b-0",o&&"py-[calc(var(--content-gap)*0.5)]",d),...c,"data-size":o?"sm":"md","data-state":"default","data-ug":"data-table-toolbar","data-variant":"default",children:[r.jsxs.call(void 0,"div",{"data-ug-slot":"heading",children:[r.jsx.call(void 0,"strong",{"data-ug-slot":"title",children:e}),l&&a?r.jsx.call(void 0,"span",{"data-ug-slot":"description",children:a}):null]}),s?r.jsx.call(void 0,"div",{"data-ug-slot":"filters",children:s}):null,n?r.jsx.call(void 0,"div",{className:"flex shrink-0 flex-wrap items-center gap-[calc(var(--content-gap)*0.5)]","data-ug-slot":"actions",children:n}):null]})}j.displayName="CopyField";var w=o.forwardRef.call(void 0,({eyebrow:e,title:a,description:l,badge:t,breadcrumb:o,actions:n,meta:s,bordered:d=!0,compact:c=!1,children:u,className:v,...g},h)=>r.jsxs.call(void 0,"header",{ref:h,className:i.cn.call(void 0,"flex min-w-0 flex-col",c?"gap-[calc(var(--content-gap)*0.875)]":"gap-[calc(var(--content-gap)*1.25)]",d&&(c?"border-b border-border-base pb-[var(--content-gap)]":"border-b border-border-base pb-[calc(var(--content-gap)*1.5)]"),v),...g,"data-ug":"page-header","data-state":"default","data-variant":d?"default":"borderless","data-size":c?"sm":"md",children:[o?r.jsx.call(void 0,"div",{className:"min-w-0","data-ug-slot":"breadcrumb",children:o}):null,r.jsxs.call(void 0,"div",{className:"flex min-w-0 flex-col gap-[var(--content-gap)] lg:flex-row lg:items-start lg:justify-between","data-ug-slot":"body",children:[r.jsxs.call(void 0,"div",{className:"min-w-0 space-y-[calc(var(--content-gap)*0.75)]","data-ug-slot":"content",children:[e?r.jsx.call(void 0,"div",{className:"text-xs font-semibold uppercase text-primary","data-ug-slot":"eyebrow",children:e}):null,r.jsxs.call(void 0,"div",{className:"flex min-w-0 flex-wrap items-center gap-[calc(var(--content-gap)*0.625)]",children:[r.jsx.call(void 0,"h1",{className:"min-w-0 break-words text-2xl font-bold leading-tight text-text-primary sm:text-3xl","data-ug-slot":"title",children:a}),t?r.jsx.call(void 0,"div",{className:"shrink-0","data-ug-slot":"badge",children:t}):null]}),l?r.jsx.call(void 0,"p",{className:"max-w-3xl text-sm leading-6 text-text-secondary","data-ug-slot":"description",children:l}):null,s?r.jsx.call(void 0,"div",{className:"flex min-w-0 flex-wrap items-center gap-x-[var(--content-gap)] gap-y-[calc(var(--content-gap)*0.5)] text-xs text-text-tertiary","data-ug-slot":"meta",children:s}):null]}),n?r.jsx.call(void 0,"div",{className:"flex shrink-0 flex-wrap items-center gap-[calc(var(--content-gap)*0.5)] lg:justify-end","data-ug-slot":"actions",children:n}):null]}),u?r.jsx.call(void 0,"div",{className:"min-w-0","data-ug-slot":"footer",children:u}):null]}));w.displayName="PageHeader";var C={2:"md:grid-cols-2 xl:grid-cols-2",3:"md:grid-cols-2 lg:grid-cols-3",4:"md:grid-cols-2 xl:grid-cols-4"};function QuickAccessContent({item:e,showIcon:a,showIndicator:l}){const t=e.icon,o=Boolean(a&&t);return r.jsxs.call(void 0,r.Fragment,{children:[o&&t?r.jsx.call(void 0,"span",{"aria-hidden":"true",className:"flex h-[var(--control-height-lg)] w-[var(--control-height-lg)] shrink-0 items-center justify-center rounded-[var(--radius-control)] bg-primary-soft text-primary-soft-fg","data-ug-slot":"icon",children:r.jsx.call(void 0,t,{size:20})}):null,r.jsxs.call(void 0,"span",{className:i.cn.call(void 0,"min-w-0",!o&&"col-start-1"),"data-ug-slot":"content",children:[r.jsxs.call(void 0,"span",{className:"flex min-w-0 flex-wrap items-center gap-x-[calc(var(--content-gap)*0.5)] gap-y-1",children:[r.jsx.call(void 0,"strong",{className:"min-w-0 break-words text-sm font-semibold leading-5","data-ug-slot":"item-title",children:e.title}),e.meta?r.jsx.call(void 0,"span",{className:"text-xs leading-5 text-text-tertiary","data-ug-slot":"meta",children:e.meta}):null]}),e.description?r.jsx.call(void 0,"span",{className:"mt-1 block break-words text-xs leading-5 text-text-secondary","data-ug-slot":"item-description",children:e.description}):null]}),l?r.jsx.call(void 0,s.ArrowRight,{"aria-hidden":"true",className:i.cn.call(void 0,"shrink-0 text-text-tertiary transition-[color] duration-[var(--motion-duration-state)] ease-[var(--motion-easing-state)] group-hover:text-primary",!o&&"col-start-2"),"data-ug-slot":"indicator",size:16}):null]})}var y=o.forwardRef.call(void 0,({title:e,description:a,items:l,columns:t=4,showIndicator:o=!0,showIcon:n=!0,bordered:s=!0,onSelect:d,className:c,...u},v)=>r.jsxs.call(void 0,"section",{ref:v,...u,className:i.cn.call(void 0,"min-w-0 space-y-[var(--content-gap)]",c),"data-ug":"quick-access","data-state":l.length>0?"ready":"empty","data-variant":t,"data-size":"md",children:[e||a?r.jsxs.call(void 0,"div",{className:"min-w-0 space-y-1","data-ug-slot":"header",children:[e?r.jsx.call(void 0,"h2",{className:"text-base font-semibold leading-6 text-text-primary","data-ug-slot":"title",children:e}):null,a?r.jsx.call(void 0,"p",{className:"text-sm leading-6 text-text-secondary","data-ug-slot":"description",children:a}):null]}):null,r.jsx.call(void 0,"div",{className:i.cn.call(void 0,"grid min-w-0 gap-[var(--content-gap)]",C[t]),"data-ug-slot":"grid",children:l.map(e=>{const a=e.disabled?"disabled":"interactive",l=function getItemClasses(e,a,l){const t=a&&l?"grid-cols-[auto_minmax(0,1fr)_auto]":a?"grid-cols-[auto_minmax(0,1fr)]":l?"grid-cols-[minmax(0,1fr)_auto]":"grid-cols-[minmax(0,1fr)]";return i.cn.call(void 0,"group grid min-h-[calc(var(--control-height-lg)*2)] min-w-0 w-full items-center gap-[var(--content-gap)]",t,"rounded-[var(--radius-panel)] bg-surface-1 p-[var(--content-gap)] text-left text-text-primary shadow-sm",e?"border border-border-base hover:border-border-strong":"border border-transparent","transition-[background-color,border-color,box-shadow] duration-[var(--motion-duration-state)] ease-[var(--motion-easing-state)]","hover:bg-surface-2 hover:shadow-md focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2","disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-border-base disabled:hover:bg-surface-1 disabled:hover:shadow-sm")}(s,Boolean(n&&e.icon),o);return e.href&&!e.disabled?r.jsx.call(void 0,"a",{className:l,"data-state":a,"data-ug-slot":"item",href:e.href,onClick:()=>_optionalChain([d,"optionalCall",a=>a(e)]),children:r.jsx.call(void 0,QuickAccessContent,{item:e,showIcon:n,showIndicator:o})},e.id):r.jsx.call(void 0,"button",{className:l,"data-state":a,"data-ug-slot":"item",disabled:e.disabled,onClick:()=>_optionalChain([d,"optionalCall",a=>a(e)]),type:"button",children:r.jsx.call(void 0,QuickAccessContent,{item:e,showIcon:n,showIndicator:o})},e.id)})})]}));y.displayName="QuickAccess";var N=o.forwardRef.call(void 0,({value:e,onValueChange:l,onSubmit:t,onStop:o,onPasteFiles:n,header:d,leading:c,trailing:u,footer:v,submitting:g=!1,disabled:h=!1,submitDisabled:p=!1,allowEmpty:m=!1,submitOnEnter:x=!0,inputLabel:b="消息输入",placeholder:f,submitLabel:j="发送",stopLabel:w="停止",bordered:C=!0,showCharacterCount:y=!1,maxLength:N,shortcutHint:k,showShortcutHint:S,textareaProps:T,className:z,..._},A)=>{const R=!h&&!g&&!p&&(m||e.trim().length>0);function submit(){R&&t(e)}const M=_nullishCoalesce(S,()=>Boolean(k))?_nullishCoalesce(k,()=>x?"Enter 发送 · Shift+Enter 换行":null):null,L=y||Boolean(M);return r.jsxs.call(void 0,"div",{className:i.cn.call(void 0,"grid min-w-0 gap-[calc(var(--content-gap)*0.625)] rounded-[var(--radius-panel)] bg-surface-1 p-[calc(var(--content-gap)*0.75)] shadow-sm transition-[border-color,box-shadow]",C?"border border-border-strong focus-within:border-primary/70":"border border-transparent",h&&"opacity-60",z),..._,"data-ug":"prompt-composer","data-state":h?"disabled":g?"submitting":"default","data-variant":"default","data-size":"md",children:[d?r.jsx.call(void 0,"div",{className:"min-w-0","data-ug-slot":"header",children:d}):null,r.jsxs.call(void 0,"div",{className:"flex min-w-0 items-end gap-[calc(var(--content-gap)*0.5)]","data-ug-slot":"body",children:[c?r.jsx.call(void 0,"div",{className:"flex h-[var(--control-height-md)] shrink-0 items-center","data-ug-slot":"leading",children:c}):null,r.jsx.call(void 0,"div",{className:"min-w-0 flex-1","data-ug-slot":"input",children:r.jsx.call(void 0,a.Textarea,{...T,ref:A,"aria-label":_nullishCoalesce(_optionalChain([T,"optionalAccess",e=>e["aria-label"]]),()=>b),autosize:_nullishCoalesce(_optionalChain([T,"optionalAccess",e=>e.autosize]),()=>({minRows:1,maxRows:8})),className:i.cn.call(void 0,"min-h-[var(--control-height-md)] border-transparent bg-transparent px-[calc(var(--control-padding-x-sm)*0.5)] py-[var(--ug-prompt-input-padding-y)] shadow-none focus-visible:!border-transparent focus-visible:!ring-0 focus-visible:!ring-offset-0",_optionalChain([T,"optionalAccess",e=>e.className])),disabled:h,maxLength:_nullishCoalesce(N,()=>_optionalChain([T,"optionalAccess",e=>e.maxLength])),onKeyDown:function handleKeyDown(e){x&&"Enter"===e.key&&(e.shiftKey||e.nativeEvent.isComposing||(e.preventDefault(),submit()))},onPaste:function handlePaste(e){if(!n)return;const a=Array.from(e.clipboardData.files);a.length>0&&n(a,e)},onValueChange:l,placeholder:_nullishCoalesce(f,()=>_optionalChain([T,"optionalAccess",e=>e.placeholder])),resize:"none",value:e})}),u?r.jsx.call(void 0,"div",{className:"flex h-[var(--control-height-md)] shrink-0 items-center gap-1","data-ug-slot":"trailing",children:u}):null,g&&o?r.jsx.call(void 0,i.Button,{"aria-label":w,onClick:o,size:"icon",tone:"danger",type:"button",variant:"soft","data-ug-slot":"submit",children:r.jsx.call(void 0,s.Square,{"aria-hidden":"true",size:15})}):r.jsx.call(void 0,i.Button,{"aria-label":j,disabled:!R,onClick:submit,size:"icon",tone:"primary",type:"button",variant:"solid","data-ug-slot":"submit",children:r.jsx.call(void 0,s.Send,{"aria-hidden":"true",size:16})})]}),v||L?r.jsxs.call(void 0,"div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-2 text-xs text-text-tertiary","data-ug-slot":"footer",children:[v?r.jsx.call(void 0,"div",{className:"min-w-0 flex-1",children:v}):null,L?r.jsxs.call(void 0,"div",{className:"ml-auto flex shrink-0 items-center gap-3 tabular-nums","data-ug-slot":"footer-meta",children:[M?r.jsx.call(void 0,"span",{"data-ug-slot":"shortcut-hint",children:M}):null,y?r.jsx.call(void 0,"span",{"data-ug-slot":"character-count",children:void 0!==N?`${e.length}/${N}`:`${e.length}`}):null]}):null]}):null]})});N.displayName="PromptComposer";var k=o.forwardRef.call(void 0,({messageRole:e,status:a="idle",avatar:l,header:t,footer:o,children:n,className:s,...d},c)=>r.jsxs.call(void 0,"article",{ref:c,className:i.cn.call(void 0,"flex min-w-0 gap-[calc(var(--content-gap)*0.75)]","user"===e&&"justify-end",s),...d,"data-ug":"message","data-state":a,"data-variant":e,"data-size":"md",children:[l&&"user"!==e?r.jsx.call(void 0,"div",{className:"shrink-0","data-ug-slot":"avatar",children:l}):null,r.jsxs.call(void 0,"div",{className:i.cn.call(void 0,"grid min-w-0 gap-[calc(var(--content-gap)*0.5)]","user"===e?"max-w-[min(85%,44rem)] rounded-[var(--radius-panel)] bg-surface-2 px-[var(--control-padding-x-lg)] py-[calc(var(--content-gap)*0.75)]":"w-full","error"===a&&"text-danger"),"data-ug-slot":"body",children:[t?r.jsx.call(void 0,"div",{className:"text-xs font-medium text-text-secondary","data-ug-slot":"header",children:t}):null,r.jsxs.call(void 0,"div",{className:"min-w-0 break-words text-sm leading-7 text-text-primary","data-ug-slot":"content",children:[n,"streaming"===a?r.jsx.call(void 0,"span",{"aria-label":"正在生成",className:"ml-1 inline-block size-1.5 animate-pulse rounded-full bg-primary motion-reduce:animate-none","data-ug-slot":"streaming"}):null]}),o?r.jsx.call(void 0,"div",{className:"flex min-w-0 flex-wrap items-center gap-2 text-xs text-text-tertiary","data-ug-slot":"footer",children:o}):null]}),l&&"user"===e?r.jsx.call(void 0,"div",{className:"shrink-0","data-ug-slot":"avatar",children:l}):null]}));k.displayName="Message";var S=o.forwardRef.call(void 0,({empty:e,followOutput:a=!0,followThreshold:l=80,children:t,className:n,onScroll:s,...d},c)=>{const u=o.useRef.call(void 0,null),v=o.useRef.call(void 0,!0),g=o.Children.count(t)>0;return o.useEffect.call(void 0,()=>{const e=u.current;a&&e&&v.current&&_optionalChain([e,"access",e=>e.scrollTo,"optionalCall",a=>a({top:e.scrollHeight,behavior:"auto"})])},[t,a]),r.jsx.call(void 0,"div",{ref:function setRef(e){u.current=e,"function"==typeof c?c(e):c&&(c.current=e)},"aria-live":"polite","aria-relevant":"additions text",className:i.cn.call(void 0,"grid min-w-0 gap-[calc(var(--content-gap)*1.5)] overflow-y-auto overscroll-contain [min-height:0] [scrollbar-color:var(--color-border-strong)_transparent] [scrollbar-width:thin]",g?"content-start":"content-center",n),onScroll:function handleScroll(e){const a=e.currentTarget;v.current=a.scrollHeight-a.scrollTop-a.clientHeight<=Math.max(0,l),_optionalChain([s,"optionalCall",a=>a(e)])},role:"log",tabIndex:0,...d,"data-ug":"message-list","data-state":g?"populated":"empty","data-variant":a?"follow":"static","data-size":"md",children:g?t:r.jsx.call(void 0,"div",{className:"grid place-items-center text-center text-sm text-text-secondary [min-height:calc(var(--control-height-lg)*4)]","data-ug-slot":"empty",children:e})})});S.displayName="MessageList";var T=o.forwardRef.call(void 0,({items:e,onRemove:a,renderPreview:l,orientation:t="horizontal",showPreview:o=!0,showStatus:n=!0,showMeta:d=!0,bordered:c=!0,compact:u=!1,getRemoveLabel:v=e=>`移除附件:${e.name}`,empty:g,className:h,tabIndex:p,...m},x)=>0!==e.length||g?r.jsx.call(void 0,"ul",{ref:x,"aria-label":"附件",className:i.cn.call(void 0,"min-w-0 gap-[calc(var(--content-gap)*0.5)]","horizontal"===t?"flex overflow-x-auto pb-1 [scrollbar-width:thin]":"grid",h),tabIndex:_nullishCoalesce(p,()=>"horizontal"===t?0:void 0),...m,"data-ug":"attachment-list","data-state":e.length>0?"populated":"empty","data-variant":t,"data-size":u?"xs":"sm",children:0===e.length?r.jsx.call(void 0,"li",{className:"text-sm text-text-secondary","data-ug-slot":"empty",children:g}):e.map(e=>{const g=_optionalChain([e,"access",e=>e.mime,"optionalAccess",e=>e.startsWith,"call",e=>e("image/")])&&e.previewUrl,h=_nullishCoalesce(e.status,()=>"ready"),p=n?_nullishCoalesce(e.statusLabel,()=>({uploading:"正在上传",success:"上传完成",error:"上传失败"}[h])):void 0,m="uploading"===h?s.LoaderCircle:"success"===h?s.CircleCheck:"error"===h?s.TriangleAlert:null,x=d?e.meta:null;return r.jsxs.call(void 0,"li",{"aria-busy":"uploading"===h||void 0,"aria-invalid":"error"===h||void 0,className:i.cn.call(void 0,"group flex shrink-0 items-center rounded-[var(--radius-control)] bg-surface-2","horizontal"===t?"min-w-52 max-w-72":"w-full min-w-0",c?"border border-border-base":"border border-transparent",u?"gap-1.5 p-1.5":"gap-2 p-2"),"data-state":h,"data-ug-slot":"item",children:[o?r.jsx.call(void 0,"div",{className:i.cn.call(void 0,"grid shrink-0 place-items-center overflow-hidden rounded-[var(--radius-control)] bg-surface-1 text-text-secondary",u?"size-[var(--control-height-md)]":"size-[var(--control-height-lg)]"),"data-ug-slot":"preview",children:l?l(e):g?r.jsx.call(void 0,"img",{alt:e.name,className:"size-full object-cover",src:e.previewUrl}):r.jsx.call(void 0,s.File,{"aria-hidden":"true",size:u?15:17})}):null,r.jsxs.call(void 0,"div",{className:"min-w-0 flex-1","data-ug-slot":"content",children:[r.jsx.call(void 0,"p",{className:"truncate text-xs font-medium text-text-primary",title:e.name,children:e.name}),p||x?r.jsxs.call(void 0,"div",{className:"mt-1 flex min-w-0 items-center gap-1.5 text-xs text-text-tertiary","data-ug-slot":"meta",children:[p?r.jsxs.call(void 0,"span",{className:i.cn.call(void 0,"inline-flex min-w-0 items-center gap-1 truncate","uploading"===h&&"text-primary","success"===h&&"text-success-soft-fg","error"===h&&"text-danger"),"data-ug-slot":"status",role:"ready"===h?void 0:"status",children:[m?r.jsx.call(void 0,m,{"aria-hidden":"true",className:i.cn.call(void 0,"size-3.5 shrink-0","uploading"===h&&"animate-spin motion-reduce:animate-none")}):null,r.jsx.call(void 0,"span",{className:"truncate",children:p})]}):null,x?r.jsx.call(void 0,"span",{className:"min-w-0 truncate","data-ug-slot":"detail",children:x}):null]}):null]}),a?r.jsx.call(void 0,i.Button,{"aria-label":v(e),onClick:()=>a(e),size:"icon-sm",type:"button",variant:"ghost","data-ug-slot":"remove",children:r.jsx.call(void 0,s.X,{"aria-hidden":"true",size:13})}):null]},e.id)})}):null);T.displayName="AttachmentList";var z=o.forwardRef.call(void 0,({items:e,activeId:a,onSelect:l,renderActions:t,empty:o="暂无会话",orientation:n="vertical",activeStyle:s="soft",showBadge:d=!0,showDescription:c=!0,listLabel:u="会话列表",className:v,tabIndex:g,...h},p)=>r.jsx.call(void 0,"div",{ref:p,"aria-label":u,className:i.cn.call(void 0,"horizontal"===n?"flex min-w-0 gap-1 overflow-x-auto pb-1 [scrollbar-width:thin]":"grid min-w-0 content-start gap-1",v),role:"list",tabIndex:_nullishCoalesce(g,()=>"horizontal"===n?0:void 0),...h,"data-ug":"conversation-list","data-active-style":s,"data-state":e.length>0?"populated":"empty","data-variant":n,"data-size":"md",children:0===e.length?r.jsx.call(void 0,"div",{className:"px-[var(--control-padding-x-md)] py-[var(--content-gap)] text-sm text-text-secondary","data-ug-slot":"empty",children:o}):e.map(e=>{const o=e.id===a;return r.jsxs.call(void 0,"div",{className:i.cn.call(void 0,"group relative flex min-w-0 items-center rounded-[var(--radius-control)] transition-[background-color,color] duration-[var(--motion-duration-state)] ease-[var(--motion-easing-state)] motion-reduce:transition-none","horizontal"===n&&"min-w-52 shrink-0",o?i.cn.call(void 0,"bg-primary-soft","bordered"===s&&"ring-1 ring-inset ring-primary/30","indicator"===s&&"before:absolute before:left-0 before:top-1/2 before:h-[calc(var(--control-height-sm)*0.6)] before:w-[3px] before:-translate-y-1/2 before:rounded-r-[var(--radius-control)] before:bg-primary before:content-['']"):"hover:bg-surface-2",e.disabled&&"opacity-50"),"data-state":e.disabled?"disabled":o?"active":"default","data-ug-slot":"item",role:"listitem",children:[r.jsxs.call(void 0,"button",{"aria-current":o?"page":void 0,className:"min-w-0 flex-1 rounded-[var(--radius-control)] px-[var(--control-padding-x-md)] py-[calc(var(--content-gap)*0.625)] text-left focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring/40",disabled:e.disabled,onClick:()=>l(e),type:"button","data-ug-slot":"trigger",children:[r.jsxs.call(void 0,"span",{className:"flex min-w-0 items-center gap-2",children:[r.jsx.call(void 0,"span",{className:i.cn.call(void 0,"min-w-0 flex-1 truncate text-sm text-text-primary",o?"font-semibold":"font-medium"),"data-ug-slot":"title",children:e.title}),d&&e.badge?r.jsx.call(void 0,"span",{className:"shrink-0","data-ug-slot":"badge",children:e.badge}):null]}),c&&e.description?r.jsx.call(void 0,"span",{className:i.cn.call(void 0,"mt-0.5 block truncate text-xs",o?"text-primary-soft-fg":"text-text-tertiary"),"data-ug-slot":"description",children:e.description}):null]}),t?r.jsx.call(void 0,"div",{className:"flex shrink-0 items-center gap-1 pr-2","data-ug-slot":"actions",children:t(e)}):null]},e.id)})}));z.displayName="ConversationList";var _=[{value:"sidebar",label:"左侧导航"},{value:"header",label:"顶部导航"}],A=[{value:"light",label:"浅色"},{value:"dark",label:"深色"}],R=[{value:"highlight",label:"主题色块",description:"使用柔和主题底色突出当前菜单。"},{value:"indicator",label:"侧边标记",description:"使用淡色背景叠加左侧标记,定位更清楚。"}],M=[{value:"comfortable",label:"舒适"},{value:"compact",label:"紧凑"}];function ModeIcon({value:e}){return"system"===e?r.jsx.call(void 0,s.Monitor,{"aria-hidden":"true",size:16}):"light"===e?r.jsx.call(void 0,s.Sun,{"aria-hidden":"true",size:16}):"dark"===e?r.jsx.call(void 0,s.Moon,{"aria-hidden":"true",size:16}):null}function ThemePresetPreview({selected:e,value:a}){const l="mecha"===a;return r.jsxs.call(void 0,"span",{"aria-hidden":"true",className:i.cn.call(void 0,"relative flex h-[calc(var(--control-height-lg)*1.75)] w-full overflow-hidden rounded-[calc(var(--radius-control)*0.75)] border bg-surface-0 transition-[border-color,box-shadow,transform] duration-[var(--motion-duration-state)] ease-[var(--motion-easing-state)]",e?"border-primary shadow-sm ring-1 ring-primary/20":"border-border-base shadow-xs"),"data-ug-mode":"light","data-ug":"theme-preview","data-ug-theme":a,children:[e?r.jsx.call(void 0,"span",{className:"absolute right-1.5 top-1.5 z-10 inline-flex h-[calc(var(--control-height-sm)*0.75)] w-[calc(var(--control-height-sm)*0.75)] items-center justify-center rounded-full bg-primary text-primary-fg shadow-sm",children:r.jsx.call(void 0,s.Check,{"aria-hidden":"true",size:12,strokeWidth:3})}):null,r.jsxs.call(void 0,"span",{className:"flex w-[24%] flex-col gap-1 border-r border-border-base bg-text-primary p-[calc(var(--content-gap)*0.375)]",children:[r.jsx.call(void 0,"span",{className:"h-[calc(var(--control-height-sm)*0.2)] w-8 rounded-full bg-primary"}),r.jsx.call(void 0,"span",{className:"mt-1 h-[calc(var(--control-height-sm)*0.16)] w-full rounded-full bg-surface-3"}),r.jsx.call(void 0,"span",{className:"h-[calc(var(--control-height-sm)*0.16)] w-4/5 rounded-full bg-surface-3"}),r.jsx.call(void 0,"span",{className:"h-[calc(var(--control-height-sm)*0.16)] w-3/4 rounded-full bg-surface-3"}),r.jsx.call(void 0,"span",{className:"mt-auto h-[calc(var(--control-height-sm)*0.16)] w-2/3 rounded-full bg-surface-3"})]}),r.jsxs.call(void 0,"span",{className:i.cn.call(void 0,"flex min-w-0 flex-1 flex-col",l?"bg-text-primary":"bg-surface-0"),children:[r.jsx.call(void 0,"span",{className:i.cn.call(void 0,"h-[calc(var(--control-height-sm)*0.48)] border-b border-border-base",l?"bg-text-primary":"bg-surface-1")}),r.jsxs.call(void 0,"span",{className:"grid flex-1 grid-cols-3 gap-1.5 p-[calc(var(--content-gap)*0.375)]",children:[[0,1,2].map(e=>r.jsx.call(void 0,"span",{className:i.cn.call(void 0,"h-[calc(var(--control-height-sm)*0.42)] rounded-[calc(var(--radius-control)*0.35)] border border-border-base",l?"bg-text-secondary":1===e?"bg-primary-soft":"bg-surface-1")},e)),r.jsxs.call(void 0,"span",{className:i.cn.call(void 0,"relative col-span-3 overflow-hidden rounded-[calc(var(--radius-control)*0.4)] border border-border-base",l?"bg-text-secondary":"bg-surface-1"),children:[r.jsx.call(void 0,"span",{className:"absolute inset-x-2 bottom-2 top-2 border-b border-l border-border-base"}),r.jsx.call(void 0,"svg",{className:"absolute inset-2 h-[calc(100%_-_var(--content-gap))] w-[calc(100%_-_var(--content-gap))] overflow-visible text-primary",preserveAspectRatio:"none",viewBox:"0 0 100 32",children:r.jsx.call(void 0,"path",{d:"M0 25 C12 22, 16 14, 28 18 S45 27, 56 14 S74 8, 100 4",fill:"none",stroke:"currentColor",strokeWidth:"2",vectorEffect:"non-scaling-stroke"})})]})]})]})]})}function ChoiceGroup({title:a,description:l,value:t,options:n,onValueChange:d,presentation:c="compact",swatch:u,iconSet:v}){const g=o.useId.call(void 0),h=o.useId.call(void 0),p="card"===c,m="preview"===c,x=void 0!==u,b=!p&&!m&&!x;return r.jsxs.call(void 0,"section",{className:i.cn.call(void 0,"min-w-0",(b||x)&&"ug-theme-config-row"),"data-presentation":x?"swatch":c,"data-ug-slot":"group",children:[r.jsxs.call(void 0,"div",{className:"min-w-0",children:[r.jsx.call(void 0,"h3",{id:g,className:"m-0 text-sm font-semibold leading-5 text-text-primary",children:a}),r.jsx.call(void 0,"p",{id:h,className:"ug-theme-config-description",children:l})]}),r.jsx.call(void 0,e.RadioGroup,{"aria-describedby":h,"aria-labelledby":g,className:i.cn.call(void 0,"min-w-0",m&&"mt-2.5 grid grid-cols-1 gap-2.5 sm:grid-cols-3",p&&"mt-2 grid grid-cols-1 gap-2 sm:grid-cols-2",x&&"flex flex-wrap items-center gap-2.5",b&&"auto-cols-[minmax(max-content,1fr)]"),"data-ug-slot":"options",onValueChange:e=>d(String(e)),orientation:"horizontal",presentation:b?"segmented":"default",size:"default",sizing:b?"fill":"content",value:t,children:n.map(a=>r.jsx.call(void 0,e.Radio,{"aria-label":x?a.label:void 0,className:"hidden",controlClassName:x?void 0:"absolute",value:a.value,variant:p||m?"card":b?"segmented":"default",labelClassName:m?"group/theme flex min-h-[0] w-full cursor-pointer flex-col items-stretch gap-1.5 rounded-[var(--radius-control)] border-0 bg-transparent p-0 text-center shadow-none hover:bg-transparent focus-within:outline-none focus-within:ring-2 focus-within:ring-ring/30 data-[state=checked]:border-0 data-[state=checked]:bg-transparent data-[state=checked]:shadow-none":p?"min-h-[calc(var(--control-height-lg)*1.5)] gap-0 rounded-[var(--radius-control)] px-[calc(var(--content-gap)*0.75)] py-[calc(var(--content-gap)*0.5)]":x?"group/swatch min-h-[0] cursor-pointer gap-0 rounded-full p-0 focus-within:outline-none":b?"min-w-max px-[calc(var(--control-padding-x-sm)*0.75)]":void 0,label:r.jsxs.call(void 0,"span",{className:i.cn.call(void 0,"flex min-w-0",p||m?"flex-col gap-1":"items-center gap-2",x&&"block"),children:[m?r.jsx.call(void 0,ThemePresetPreview,{selected:a.value===t,value:a.value}):null,r.jsxs.call(void 0,"span",{className:"inline-flex min-w-0 items-center gap-2",children:["mode"===v?r.jsx.call(void 0,ModeIcon,{value:a.value}):null,x?r.jsx.call(void 0,"span",{"aria-hidden":"true","data-ug-swatch":"accent","data-ug-accent":a.value,children:r.jsx.call(void 0,s.Check,{"aria-hidden":"true",className:a.value===t?void 0:"invisible","data-ug-swatch-check":a.value===t?"":void 0,size:13,strokeWidth:3})}):null,r.jsx.call(void 0,"span",{className:i.cn.call(void 0,"min-w-0",p?"font-semibold text-text-primary":m?"w-full text-center font-medium text-text-primary":x?"sr-only":"truncate"),children:a.label})]}),p&&a.description?r.jsx.call(void 0,"span",{className:"text-xs font-normal leading-4 text-text-secondary",children:a.description}):null]})},a.value))})]})}var L=[{key:"background",label:"导航背景"},{key:"text",label:"普通文字"},{key:"activeBackground",label:"选中背景"},{key:"activeText",label:"选中文字"},{key:"hoverBackground",label:"悬停背景"}];function NavigationColorInput({label:e,value:a,onValueCommit:l}){const t=o.useRef.call(void 0,null),i=o.useRef.call(void 0,l);return i.current=l,o.useEffect.call(void 0,()=>{const e=t.current;if(!e)return;const commitValue=()=>i.current(e.value);return e.addEventListener("change",commitValue),()=>e.removeEventListener("change",commitValue)},[]),o.useEffect.call(void 0,()=>{t.current&&t.current.value!==a&&(t.current.value=a)},[a]),r.jsx.call(void 0,"input",{ref:t,"aria-label":e,"data-ug-slot":"color-swatch",defaultValue:a,type:"color"})}function NavigationColorGroup({customized:e,value:a,onReset:l,onValueChange:t}){return r.jsxs.call(void 0,"section",{className:"ug-theme-config-row min-w-0","data-presentation":"colors","data-ug":"navigation-colors","data-ug-slot":"group",children:[r.jsxs.call(void 0,"div",{className:"min-w-0","data-ug-slot":"group-label",children:[r.jsx.call(void 0,"h3",{className:"m-0 text-sm font-semibold leading-5 text-text-primary",children:"导航颜色"}),e?r.jsx.call(void 0,i.Button,{onClick:l,size:"sm",tone:"neutral",variant:"ghost",children:"恢复主题配色"}):null]}),r.jsx.call(void 0,"div",{"data-ug-slot":"options",children:L.map(e=>r.jsxs.call(void 0,"label",{"data-ug-slot":"color-option",children:[r.jsx.call(void 0,NavigationColorInput,{label:e.label,onValueCommit:l=>t({...a,[e.key]:l}),value:a[e.key]}),r.jsx.call(void 0,"span",{"data-ug-slot":"color-label",children:e.label}),r.jsx.call(void 0,"code",{"data-ug-slot":"color-value",children:a[e.key].toUpperCase()})]},e.key))})]})}function TabLabel({icon:e,children:a}){return r.jsxs.call(void 0,"span",{className:"gap-[calc(var(--content-gap)*0.625)]","data-ug-slot":"tab-label",children:[r.jsx.call(void 0,"span",{"data-ug-slot":"tab-icon",children:e}),r.jsx.call(void 0,"span",{className:"truncate",children:a})]})}var I=o.forwardRef.call(void 0,({value:a,onValueChange:t,options:n,sidebarValue:d,onSidebarValueChange:c,appearanceAddon:u,sidebarAddon:g,className:h,...p},m)=>{const[x,b]=o.useState.call(void 0,"appearance"),f=l.useMediaQuery.call(void 0,"(prefers-color-scheme: dark)"),j=o.useMemo.call(void 0,()=>({...v.defaultUGThemeConfiguratorOptions,...n}),[n]),w=_nullishCoalesce(d.palette,()=>"primary"===d.variant?"light":"dark"),C=d.colors?w:v.resolveUGNavigationPalette.call(void 0,a.mode,f),y=v.resolveUGNavigationColors.call(void 0,a.preset,C,d.colors,a.accent);function updateField(e,l){t({...a,[e]:l})}function updateSidebarField(e,a){c({...d,[e]:a})}return r.jsx.call(void 0,"div",{ref:m,className:i.cn.call(void 0,"h-full min-h-[0] min-w-0 text-text-primary",h),"data-ug":"theme-configurator","data-state":"ready","data-variant":"panel","data-size":"default",...p,children:r.jsx.call(void 0,e.Tabs,{className:"h-full",onValueChange:e=>b(e),size:"md",value:x,variant:"rail",children:r.jsxs.call(void 0,"div",{"data-ug-slot":"configurator-layout",children:[r.jsx.call(void 0,"div",{"data-ug-slot":"navigation",children:r.jsxs.call(void 0,e.TabsList,{"aria-label":"外观设置分类",orientation:"vertical",children:[r.jsx.call(void 0,e.TabsTrigger,{value:"appearance",children:r.jsx.call(void 0,TabLabel,{icon:r.jsx.call(void 0,s.SwatchBook,{"aria-hidden":"true",size:16}),children:"主题外观"})}),r.jsx.call(void 0,e.TabsTrigger,{value:"sidebar",children:r.jsx.call(void 0,TabLabel,{icon:r.jsx.call(void 0,s.PanelTop,{"aria-hidden":"true",size:16}),children:"导航菜单"})})]})}),r.jsxs.call(void 0,"div",{className:"min-h-[0]","data-ug-slot":"settings",children:[r.jsxs.call(void 0,e.TabsContent,{className:"ug-theme-config-appearance min-w-0",value:"appearance",children:[r.jsx.call(void 0,ChoiceGroup,{title:"主题风格",description:"选择整套界面的基础视觉气质。",value:a.preset,options:j.presets,presentation:"preview",onValueChange:e=>updateField("preset",e)}),r.jsx.call(void 0,ChoiceGroup,{title:"显示模式",description:"使用亮色、暗色,或自动跟随操作系统。",value:a.mode,options:j.modes,iconSet:"mode",onValueChange:e=>updateField("mode",e)}),r.jsx.call(void 0,ChoiceGroup,{title:"主题色",description:"统一按钮、链接、当前项和焦点状态。",value:a.accent,options:j.accents,swatch:"accent",onValueChange:e=>updateField("accent",e)}),r.jsxs.call(void 0,"section",{"data-ug-slot":"detail-section",children:[r.jsx.call(void 0,"div",{"data-ug-slot":"section-heading",children:r.jsx.call(void 0,"h3",{className:"m-0 text-sm font-semibold leading-5 text-text-primary",children:"界面细节"})}),r.jsxs.call(void 0,"div",{"data-ug-slot":"detail-grid",children:[r.jsx.call(void 0,ChoiceGroup,{title:"界面密度",description:"控制页面留白与控件间距。",value:a.density,options:j.densities,onValueChange:e=>updateField("density",e)}),r.jsx.call(void 0,ChoiceGroup,{title:"圆角风格",description:"统一控件和面板的边角语言。",value:a.radius,options:j.radii,onValueChange:e=>updateField("radius",e)}),r.jsx.call(void 0,ChoiceGroup,{title:"阴影层级",description:"调整浮层与卡片的空间层次。",value:a.shadow,options:j.shadows,onValueChange:e=>updateField("shadow",e)}),r.jsx.call(void 0,ChoiceGroup,{title:"字体排版",description:"选择阅读性或信息密度取向。",value:a.font,options:j.fonts,onValueChange:e=>updateField("font",e)}),r.jsx.call(void 0,ChoiceGroup,{title:"文字对比",description:"调整正文和次要信息的清晰度。",value:a.contrast,options:j.contrasts,onValueChange:e=>updateField("contrast",e)}),r.jsx.call(void 0,ChoiceGroup,{title:"界面动效",description:"控制过渡反馈的强弱。",value:a.motion,options:j.motions,onValueChange:e=>updateField("motion",e)}),r.jsx.call(void 0,ChoiceGroup,{title:"页面背景",description:"选择纯净、网格或柔光背景。",value:a.background,options:j.backgrounds,onValueChange:e=>updateField("background",e)})]})]}),u?r.jsx.call(void 0,"div",{"data-ug-slot":"appearance-addon",children:u}):null]}),r.jsxs.call(void 0,e.TabsContent,{className:"min-w-0",value:"sidebar",children:[r.jsxs.call(void 0,"div",{className:"ug-theme-config-sidebar-grid",children:[r.jsx.call(void 0,ChoiceGroup,{title:"导航位置",description:"选择左侧栏或桌面端顶栏导航。",value:_nullishCoalesce(d.mode,()=>"sidebar"),options:_,onValueChange:e=>updateSidebarField("mode",e)}),r.jsx.call(void 0,ChoiceGroup,{title:"配色基准",description:"默认跟随显示模式;选择后作为导航颜色覆盖。",value:C,options:A,onValueChange:e=>c({...d,palette:e,variant:"light"===e?"primary":"dark",colors:v.resolveUGNavigationColors.call(void 0,a.preset,e,void 0,a.accent)})}),r.jsx.call(void 0,NavigationColorGroup,{customized:Boolean(d.colors),value:y,onReset:()=>updateSidebarField("colors",void 0),onValueChange:e=>c({...d,palette:C,variant:"light"===C?"primary":"dark",colors:e})}),r.jsx.call(void 0,ChoiceGroup,{title:"当前菜单",description:"选择当前页面在导航中的强调方式。",value:d.activeStyle,options:R,onValueChange:e=>updateSidebarField("activeStyle",e)}),r.jsx.call(void 0,ChoiceGroup,{title:"菜单密度",description:"调整导航菜单的行高与间距。",value:d.density,options:M,onValueChange:e=>updateSidebarField("density",e)})]}),g?r.jsx.call(void 0,"div",{"data-ug-slot":"sidebar-addon",children:g}):null]})]})]})})})});function DefaultThemePreview({value:e,sidebarValue:a}){const t=l.useMediaQuery.call(void 0,"(prefers-color-scheme: dark)"),i=_nullishCoalesce(a.palette,()=>"primary"===a.variant?"light":"dark"),o=a.colors?i:v.resolveUGNavigationPalette.call(void 0,e.mode,t),n=v.resolveUGNavigationColors.call(void 0,e.preset,o,a.colors,e.accent),s={"--ug-preview-navigation-bg":n.background,"--ug-preview-navigation-text":n.text,"--ug-preview-navigation-active-bg":n.activeBackground,"--ug-preview-navigation-active-text":n.activeText,"--ug-preview-navigation-hover-bg":n.hoverBackground};return r.jsxs.call(void 0,"section",{"aria-label":"实时预览",className:"[--ug-theme-preview-gap:var(--content-gap)] border-border-base","data-ug":"theme-configurator-preview",children:[r.jsx.call(void 0,"h3",{"data-ug-preview":"title",children:"实时预览"}),r.jsxs.call(void 0,"div",{"data-navigation-active-style":a.activeStyle,"data-navigation-density":a.density,"data-navigation-mode":_nullishCoalesce(a.mode,()=>"sidebar"),"data-ug-accent":e.accent,"data-ug-background":e.background,"data-ug-contrast":e.contrast,"data-ug-density":e.density,"data-ug-font":e.font,"data-ug-mode":e.mode,"data-ug-motion":e.motion,"data-ug-radius":e.radius,"data-ug-shadow":e.shadow,"data-ug-preview":"frame","data-ug-surface":e.surface,"data-ug-theme":e.preset,style:s,children:[r.jsxs.call(void 0,"aside",{"data-ug-preview":"navigation",children:[r.jsx.call(void 0,"strong",{"data-ug-preview":"brand",children:"UG Admin"}),r.jsx.call(void 0,"div",{"data-ug-preview":"menu",children:["工作台","任务中心","数据分析","系统设置"].map((e,a)=>r.jsxs.call(void 0,"span",{"data-state":0===a?"active":"default","data-ug-preview":"menu-item",children:[r.jsx.call(void 0,"i",{"aria-hidden":"true","data-ug-preview":"menu-icon"}),r.jsx.call(void 0,"span",{children:e})]},e))})]}),r.jsxs.call(void 0,"div",{"data-ug-preview":"content",children:[r.jsxs.call(void 0,"header",{"data-ug-preview":"topbar",children:[r.jsx.call(void 0,"strong",{"data-ug-preview":"topbar-title",children:"工作台"}),r.jsxs.call(void 0,"span",{"aria-hidden":"true","data-ug-preview":"topbar-actions",children:[r.jsx.call(void 0,"i",{}),r.jsx.call(void 0,"i",{}),r.jsx.call(void 0,"i",{})]})]}),r.jsxs.call(void 0,"div",{"data-ug-preview":"tabs",children:[r.jsx.call(void 0,"span",{"data-state":"active",children:"工作台"}),r.jsx.call(void 0,"span",{children:"任务中心"}),r.jsx.call(void 0,"span",{children:"报表"})]}),r.jsxs.call(void 0,"main",{"data-ug-preview":"main",children:[r.jsx.call(void 0,"div",{"data-ug-preview":"stats",children:[["待办任务","12"],["团队成员","8"],["进行项目","24"]].map(([e,a])=>r.jsxs.call(void 0,"span",{"data-ug-preview":"stat",children:[r.jsx.call(void 0,"small",{children:e}),r.jsx.call(void 0,"strong",{children:a})]},e))}),r.jsxs.call(void 0,"div",{"data-ug-preview":"chart",children:[r.jsx.call(void 0,"strong",{children:"工作概览"}),r.jsx.call(void 0,"svg",{"aria-hidden":"true",preserveAspectRatio:"none",viewBox:"0 0 240 72",children:r.jsx.call(void 0,"path",{d:"M0 58 C28 48, 38 24, 66 36 S102 58, 130 28 S172 42, 240 12",fill:"none",stroke:"currentColor",strokeWidth:"3",vectorEffect:"non-scaling-stroke"})})]}),r.jsx.call(void 0,"div",{"data-ug-preview":"table",children:["整理发布计划","复核访问权限","更新项目进度"].map((e,a)=>r.jsxs.call(void 0,"span",{"data-ug-preview":"table-row",children:[r.jsx.call(void 0,"span",{children:e}),r.jsx.call(void 0,"i",{"data-state":1===a?"warning":"success",children:1===a?"待处理":"已完成"})]},e))})]})]})]})]})}function ThemeConfiguratorDialog({open:a,onOpenChange:l,onReset:t,onCancel:o,onApply:n,title:d="外观设置",preview:c,showPreview:u=!0,resetLabel:v="恢复默认",cancelLabel:g="取消",applyLabel:h,doneLabel:p,...m}){const x=_nullishCoalesce(_nullishCoalesce(h,()=>p),()=>"应用"),b=void 0===c?r.jsx.call(void 0,DefaultThemePreview,{value:m.value,sidebarValue:m.sidebarValue}):c,f=u&&null!==b&&!1!==b;function closeAsCancel(){_optionalChain([o,"optionalCall",e=>e()]),l(!1)}return r.jsx.call(void 0,e.Modal,{ariaLabel:"string"==typeof d?d:"外观设置",onClose:closeAsCancel,open:a,size:"2xl",children:r.jsxs.call(void 0,e.ModalContent,{"data-ug":"theme-configurator-dialog","data-state":a?"open":"closed","data-variant":f?"preview":"default","data-size":"2xl",children:[r.jsxs.call(void 0,e.ModalHeader,{children:[r.jsx.call(void 0,e.ModalTitle,{children:d}),r.jsx.call(void 0,e.ModalCloseButton,{})]}),r.jsx.call(void 0,e.ModalBody,{className:"overflow-hidden p-0",children:r.jsxs.call(void 0,"div",{"data-ug-layout":"dialog",children:[r.jsx.call(void 0,"div",{className:"h-full min-h-[0] min-w-0","data-ug-slot":"panel",children:r.jsx.call(void 0,I,{...m})}),f?r.jsx.call(void 0,"div",{"data-ug-slot":"preview",children:b}):null]})}),r.jsxs.call(void 0,e.ModalFooter,{className:"justify-between",children:[r.jsx.call(void 0,"div",{className:"flex min-w-0 items-center gap-3",children:t?r.jsxs.call(void 0,i.Button,{onClick:t,type:"button",variant:"default",children:[r.jsx.call(void 0,s.RotateCcw,{"aria-hidden":"true",size:16}),v]}):null}),r.jsxs.call(void 0,"div",{className:"flex shrink-0 items-center gap-2",children:[o?r.jsx.call(void 0,i.Button,{onClick:closeAsCancel,type:"button",variant:"default",children:g}):null,r.jsx.call(void 0,i.Button,{onClick:function closeAsApply(){_optionalChain([n,"optionalCall",e=>e()]),l(!1)},type:"button",variant:"primary",children:x})]})]})]})})}I.displayName="ThemeConfigurator",exports.AdminShell=m,exports.AppTabs=b,exports.AttachmentList=T,exports.ConfirmDialog=f,exports.ConversationList=z,exports.CopyField=j,exports.DataTable=DataTable,exports.DataTableIdentity=DataTableIdentity,exports.DataTableToolbar=DataTableToolbar,exports.Message=k,exports.MessageList=S,exports.PageHeader=w,exports.PromptComposer=N,exports.QuickAccess=y,exports.SelectionList=d,exports.ThemeConfigurator=I,exports.ThemeConfiguratorDialog=ThemeConfiguratorDialog,exports.TreeTable=TreeTable,exports.UGAdminShell=m,exports.UGAppTabs=b,exports.UGAttachmentList=T,exports.UGConfirmDialog=f,exports.UGConversationList=z,exports.UGCopyField=j,exports.UGDataTable=DataTable,exports.UGDataTableIdentity=DataTableIdentity,exports.UGDataTableToolbar=DataTableToolbar,exports.UGMessage=k,exports.UGMessageList=S,exports.UGPageHeader=w,exports.UGPromptComposer=N,exports.UGQuickAccess=y,exports.UGSelectionList=d,exports.UGThemeConfigurator=I,exports.UGThemeConfiguratorDialog=ThemeConfiguratorDialog,exports.UGTreeTable=TreeTable;//# sourceMappingURL=index.cjs.map
|