@ug666/ui-react 0.2.0 → 0.3.0-beta.2
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/dist/THIRD_PARTY_NOTICES.txt +98 -0
- package/dist/aliases.d.ts +107 -0
- package/dist/aliases.d.ts.map +1 -0
- package/dist/blocks/feature-grid.d.ts +48 -0
- package/dist/blocks/feature-grid.d.ts.map +1 -0
- package/dist/blocks/index.cjs +1 -238
- package/dist/blocks/index.cjs.map +1 -1
- package/dist/blocks/index.d.ts +6 -84
- package/dist/blocks/index.d.ts.map +1 -0
- package/dist/blocks/index.js +1 -153
- package/dist/blocks/index.js.map +1 -1
- package/dist/blocks/landing-hero.d.ts +61 -0
- package/dist/blocks/landing-hero.d.ts.map +1 -0
- package/dist/chunk-2EJWWTLH.cjs +1 -0
- package/dist/chunk-2EJWWTLH.cjs.map +1 -0
- package/dist/chunk-D63UPGP5.cjs +1 -0
- package/dist/chunk-D63UPGP5.cjs.map +1 -0
- package/dist/chunk-J4NAYP4L.cjs +1 -0
- package/dist/chunk-J4NAYP4L.cjs.map +1 -0
- package/dist/chunk-JY5S7YLF.cjs +1 -0
- package/dist/chunk-JY5S7YLF.cjs.map +1 -0
- package/dist/chunk-NRCPYVJW.js +1 -0
- package/dist/chunk-NRCPYVJW.js.map +1 -0
- package/dist/chunk-PXVCZ6AZ.js +1 -0
- package/dist/chunk-PXVCZ6AZ.js.map +1 -0
- package/dist/chunk-PZ4UH6BC.js +1 -0
- package/dist/chunk-PZ4UH6BC.js.map +1 -0
- package/dist/chunk-UBZ2ZCEJ.cjs +1 -0
- package/dist/chunk-UBZ2ZCEJ.cjs.map +1 -0
- package/dist/chunk-UEJM2SLH.js +1 -0
- package/dist/chunk-UEJM2SLH.js.map +1 -0
- package/dist/chunk-UESSLLSC.js +1 -0
- package/dist/chunk-UESSLLSC.js.map +1 -0
- package/dist/chunk-VDBATAZ3.js +1 -0
- package/dist/chunk-VDBATAZ3.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-XVFRKGM7.cjs +1 -0
- package/dist/chunk-XVFRKGM7.cjs.map +1 -0
- package/dist/chunk-ZDO5A2IZ.cjs +1 -0
- package/dist/chunk-ZDO5A2IZ.cjs.map +1 -0
- package/dist/components/accordion.d.ts +65 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/alert.d.ts +23 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/autocomplete.d.ts +21 -0
- package/dist/components/autocomplete.d.ts.map +1 -0
- package/dist/components/avatar-group.d.ts +20 -0
- package/dist/components/avatar-group.d.ts.map +1 -0
- package/dist/components/avatar.d.ts +34 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/backtop.d.ts +11 -0
- package/dist/components/backtop.d.ts.map +1 -0
- package/dist/components/badge.d.ts +33 -0
- package/dist/components/badge.d.ts.map +1 -0
- 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 +37 -0
- package/dist/components/breadcrumb.d.ts.map +1 -0
- package/dist/components/button-group.d.ts +26 -0
- package/dist/components/button-group.d.ts.map +1 -0
- package/dist/components/button.d.ts +45 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/calendar.d.ts +40 -0
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/card.d.ts +33 -0
- package/dist/components/card.d.ts.map +1 -0
- 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-context.d.ts +14 -0
- package/dist/components/checkbox-group-context.d.ts.map +1 -0
- package/dist/components/checkbox-group.d.ts +18 -0
- package/dist/components/checkbox-group.d.ts.map +1 -0
- package/dist/components/checkbox.d.ts +32 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- 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 +31 -0
- package/dist/components/config-provider.d.ts.map +1 -0
- package/dist/components/container.d.ts +27 -0
- package/dist/components/container.d.ts.map +1 -0
- package/dist/components/context/form-context.d.ts +41 -0
- package/dist/components/context/form-context.d.ts.map +1 -0
- package/dist/components/context-menu.d.ts +39 -0
- package/dist/components/context-menu.d.ts.map +1 -0
- 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 +40 -0
- package/dist/components/descriptions.d.ts.map +1 -0
- package/dist/components/dialog.d.ts +64 -0
- package/dist/components/dialog.d.ts.map +1 -0
- 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 +47 -0
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/dropdown.d.ts +50 -0
- package/dist/components/dropdown.d.ts.map +1 -0
- package/dist/components/empty-state.d.ts +27 -0
- package/dist/components/empty-state.d.ts.map +1 -0
- 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 +127 -0
- package/dist/components/form.d.ts.map +1 -0
- 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/icon.d.ts +16 -0
- package/dist/components/icon.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 -3993
- package/dist/components/index.cjs.map +1 -1
- package/dist/components/index.d.ts +107 -1096
- package/dist/components/index.d.ts.map +1 -0
- package/dist/components/index.js +1 -330
- 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 +28 -0
- package/dist/components/input.d.ts.map +1 -0
- 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 +18 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/layout.d.ts +34 -0
- package/dist/components/layout.d.ts.map +1 -0
- package/dist/components/link.d.ts +18 -0
- package/dist/components/link.d.ts.map +1 -0
- 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 +63 -0
- package/dist/components/modal.d.ts.map +1 -0
- package/dist/components/navbar.d.ts +23 -0
- package/dist/components/navbar.d.ts.map +1 -0
- package/dist/components/navigation-menu.d.ts +54 -0
- package/dist/components/navigation-menu.d.ts.map +1 -0
- package/dist/components/notification.d.ts +22 -0
- package/dist/components/notification.d.ts.map +1 -0
- package/dist/components/number-input.d.ts +35 -0
- package/dist/components/number-input.d.ts.map +1 -0
- package/dist/components/otp-input.d.ts +45 -0
- package/dist/components/otp-input.d.ts.map +1 -0
- package/dist/components/pagination.d.ts +19 -0
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/popconfirm.d.ts +20 -0
- package/dist/components/popconfirm.d.ts.map +1 -0
- package/dist/components/popover.d.ts +37 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/progress.d.ts +30 -0
- package/dist/components/progress.d.ts.map +1 -0
- 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 +79 -0
- package/dist/components/radio.d.ts.map +1 -0
- 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/scrollbar.d.ts +29 -0
- package/dist/components/scrollbar.d.ts.map +1 -0
- package/dist/components/select.d.ts +48 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/separator.d.ts +28 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/sheet.d.ts +35 -0
- package/dist/components/sheet.d.ts.map +1 -0
- package/dist/components/sidebar.d.ts +84 -0
- package/dist/components/sidebar.d.ts.map +1 -0
- package/dist/components/skeleton.d.ts +16 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/slider.d.ts +44 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/space.d.ts +19 -0
- package/dist/components/space.d.ts.map +1 -0
- package/dist/components/spinner.d.ts +22 -0
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/splitter.d.ts +52 -0
- package/dist/components/splitter.d.ts.map +1 -0
- 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 +35 -0
- package/dist/components/statistic.d.ts.map +1 -0
- package/dist/components/steps.d.ts +35 -0
- package/dist/components/steps.d.ts.map +1 -0
- package/dist/components/switch.d.ts +49 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/table.d.ts +46 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/tabs.d.ts +40 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tag.d.ts +29 -0
- package/dist/components/tag.d.ts.map +1 -0
- package/dist/components/text.d.ts +16 -0
- package/dist/components/text.d.ts.map +1 -0
- package/dist/components/textarea.d.ts +26 -0
- package/dist/components/textarea.d.ts.map +1 -0
- 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 +72 -0
- package/dist/components/toast.d.ts.map +1 -0
- package/dist/components/tooltip.d.ts +32 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- 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/hooks/index.cjs +1 -352
- package/dist/hooks/index.cjs.map +1 -1
- package/dist/hooks/index.d.ts +19 -231
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +1 -32
- package/dist/hooks/use-click-outside.d.ts +9 -0
- package/dist/hooks/use-click-outside.d.ts.map +1 -0
- package/dist/hooks/use-copy-to-clipboard.d.ts +12 -0
- package/dist/hooks/use-copy-to-clipboard.d.ts.map +1 -0
- package/dist/hooks/use-debounce.d.ts +7 -0
- package/dist/hooks/use-debounce.d.ts.map +1 -0
- package/dist/hooks/use-escape-key.d.ts +17 -0
- package/dist/hooks/use-escape-key.d.ts.map +1 -0
- package/dist/hooks/use-event-listener.d.ts +27 -0
- package/dist/hooks/use-event-listener.d.ts.map +1 -0
- package/dist/hooks/use-form.d.ts +49 -0
- package/dist/hooks/use-form.d.ts.map +1 -0
- package/dist/hooks/use-hotkeys.d.ts +30 -0
- package/dist/hooks/use-hotkeys.d.ts.map +1 -0
- package/dist/hooks/use-interval.d.ts +19 -0
- package/dist/hooks/use-interval.d.ts.map +1 -0
- package/dist/hooks/use-local-storage.d.ts +9 -0
- package/dist/hooks/use-local-storage.d.ts.map +1 -0
- package/dist/hooks/use-media-query.d.ts +8 -0
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-mounted.d.ts +18 -0
- package/dist/hooks/use-mounted.d.ts.map +1 -0
- package/dist/hooks/use-pagination.d.ts +36 -0
- package/dist/hooks/use-pagination.d.ts.map +1 -0
- package/dist/hooks/use-timeout.d.ts +19 -0
- package/dist/hooks/use-timeout.d.ts.map +1 -0
- package/dist/hooks/use-toggle.d.ts +9 -0
- package/dist/hooks/use-toggle.d.ts.map +1 -0
- package/dist/index.cjs +1 -4499
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +120 -294
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1 -539
- package/dist/index.js.map +1 -1
- package/dist/internal/admin-horizontal-navigation.d.ts +9 -0
- package/dist/internal/admin-horizontal-navigation.d.ts.map +1 -0
- package/dist/internal/button-group-context.d.ts +11 -0
- package/dist/internal/button-group-context.d.ts.map +1 -0
- package/dist/internal/cn.d.ts +8 -0
- package/dist/internal/cn.d.ts.map +1 -0
- 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-mode-panel.d.ts +9 -0
- package/dist/internal/date-mode-panel.d.ts.map +1 -0
- package/dist/internal/date-time-control.d.ts +33 -0
- package/dist/internal/date-time-control.d.ts.map +1 -0
- package/dist/internal/date-time-range-control.d.ts +27 -0
- package/dist/internal/date-time-range-control.d.ts.map +1 -0
- package/dist/internal/option-window.d.ts +9 -0
- package/dist/internal/option-window.d.ts.map +1 -0
- package/dist/internal/sidebar-navigation.d.ts +55 -0
- package/dist/internal/sidebar-navigation.d.ts.map +1 -0
- package/dist/internal/time-panel.d.ts +8 -0
- package/dist/internal/time-panel.d.ts.map +1 -0
- package/dist/internal/use-cascader-lazy.d.ts +8 -0
- package/dist/internal/use-cascader-lazy.d.ts.map +1 -0
- package/dist/internal/use-floating-layout-observer.d.ts +8 -0
- package/dist/internal/use-floating-layout-observer.d.ts.map +1 -0
- package/dist/internal/use-overlay-focus.d.ts +9 -0
- package/dist/internal/use-overlay-focus.d.ts.map +1 -0
- package/dist/internal/use-portal-container.d.ts +2 -0
- package/dist/internal/use-portal-container.d.ts.map +1 -0
- package/dist/internal/use-presence.d.ts +13 -0
- package/dist/internal/use-presence.d.ts.map +1 -0
- package/dist/internal/use-transfer-remote.d.ts +20 -0
- package/dist/internal/use-transfer-remote.d.ts.map +1 -0
- package/dist/internal/use-tree-data.d.ts +8 -0
- package/dist/internal/use-tree-data.d.ts.map +1 -0
- package/dist/patterns/admin-shell.d.ts +118 -0
- package/dist/patterns/admin-shell.d.ts.map +1 -0
- 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 +50 -0
- package/dist/patterns/confirm-dialog.d.ts.map +1 -0
- 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 +35 -0
- package/dist/patterns/copy-field.d.ts.map +1 -0
- 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 -758
- package/dist/patterns/index.cjs.map +1 -1
- package/dist/patterns/index.d.ts +18 -158
- package/dist/patterns/index.d.ts.map +1 -0
- package/dist/patterns/index.js +1 -320
- 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 +41 -0
- package/dist/patterns/page-header.d.ts.map +1 -0
- 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 -384
- package/dist/primitives/index.cjs.map +1 -1
- package/dist/primitives/index.d.ts +26 -135
- package/dist/primitives/index.d.ts.map +1 -0
- package/dist/primitives/index.js +1 -56
- package/dist/styles.css +2 -2499
- package/dist/theme.cjs +1 -0
- package/dist/theme.cjs.map +1 -0
- package/dist/theme.d.ts +46 -0
- package/dist/theme.d.ts.map +1 -0
- package/dist/theme.js +1 -0
- package/dist/theme.js.map +1 -0
- package/dist/themes/default.css +1 -0
- package/dist/themes/mecha.css +1 -0
- package/dist/themes/minimal.css +1 -0
- package/dist/tokens.css +2 -86
- package/package.json +24 -18
- package/dist/blocks/index.d.cts +0 -86
- package/dist/button-CaLZig8j.d.cts +0 -22
- package/dist/button-CaLZig8j.d.ts +0 -22
- package/dist/chunk-2IVRUJKO.js +0 -377
- package/dist/chunk-2IVRUJKO.js.map +0 -1
- package/dist/chunk-73WQAE3E.js +0 -3003
- package/dist/chunk-73WQAE3E.js.map +0 -1
- package/dist/chunk-MGXIF756.js +0 -313
- package/dist/chunk-MGXIF756.js.map +0 -1
- package/dist/chunk-RUDEZA5Q.js +0 -62
- package/dist/chunk-RUDEZA5Q.js.map +0 -1
- package/dist/chunk-S45GP6IB.js +0 -254
- package/dist/chunk-S45GP6IB.js.map +0 -1
- package/dist/components/index.d.cts +0 -1097
- package/dist/hooks/index.d.cts +0 -232
- package/dist/index.d.cts +0 -297
- package/dist/labs/index.cjs +0 -34
- package/dist/labs/index.cjs.map +0 -1
- package/dist/labs/index.d.cts +0 -12
- package/dist/labs/index.d.ts +0 -12
- package/dist/labs/index.js +0 -9
- package/dist/labs/index.js.map +0 -1
- package/dist/patterns/index.d.cts +0 -158
- package/dist/primitives/index.d.cts +0 -137
- package/dist/sidebar-vl00Z2o-.d.cts +0 -93
- package/dist/sidebar-vl00Z2o-.d.ts +0 -93
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/ug-ui/ug-ui/packages/ui-react/dist/chunk-D63UPGP5.cjs","../src/hooks/use-debounce.ts","../src/hooks/use-local-storage.ts","../src/hooks/use-click-outside.ts","../src/hooks/use-copy-to-clipboard.ts","../src/hooks/use-toggle.ts","../src/hooks/use-pagination.ts","../src/hooks/use-form.ts","../src/hooks/use-mounted.ts","../src/hooks/use-interval.ts","../src/hooks/use-timeout.ts","../src/hooks/use-hotkeys.ts","../src/hooks/use-event-listener.ts"],"names":["useState","useEffect","useCallback","useRef","useMemo","key","name","entry","values","event"],"mappings":"AAAA;AACA;AACA;ACGA,8BAAoC;AAO7B,SAAS,WAAA,CAAe,KAAA,EAAU,MAAA,EAAQ,GAAA,EAAQ;AACvD,EAAA,MAAM,CAAC,SAAA,EAAW,YAAY,EAAA,EAAI,6BAAA,KAAc,CAAA;AAEhD,EAAA,8BAAA,CAAU,EAAA,GAAM;AACd,IAAA,MAAM,MAAA,EAAQ,UAAA,CAAW,CAAA,EAAA,GAAM,YAAA,CAAa,KAAK,CAAA,EAAG,KAAK,CAAA;AACzD,IAAA,OAAO,CAAA,EAAA,GAAM,YAAA,CAAa,KAAK,CAAA;AAAA,EACjC,CAAA,EAAG,CAAC,KAAA,EAAO,KAAK,CAAC,CAAA;AAEjB,EAAA,OAAO,SAAA;AACT;ADTA;AACA;AERA;AAUA,SAAS,SAAA,CAAa,GAAA,EAAa,YAAA,EAAoB;AACrD,EAAA,GAAA,CAAI,OAAO,OAAA,IAAW,WAAA,EAAa,OAAO,YAAA;AAC1C,EAAA,IAAI;AACF,IAAA,MAAM,KAAA,EAAO,MAAA,CAAO,YAAA,CAAa,OAAA,CAAQ,GAAG,CAAA;AAC5C,IAAA,OAAO,KAAA,EAAQ,IAAA,CAAK,KAAA,CAAM,IAAI,EAAA,EAAU,YAAA;AAAA,EAC1C,EAAA,UAAQ;AACN,IAAA,OAAO,YAAA;AAAA,EACT;AACF;AAOO,SAAS,eAAA,CAAmB,GAAA,EAAa,YAAA,EAA2C;AACzF,EAAA,MAAM,CAAC,UAAA,EAAY,aAAa,EAAA,EAAIA,6BAAAA,CAAy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AG,CAAC,OAAO,CAAC,CAAA;AAEZ,EAAAA,8BAAAA,CAAU,EAAA,GAAM;AAEd,IAAA,GAAA,CAAI,OAAA,IAAW,IAAA,EAAM,MAAA;AACrB,IAAA,MAAM,YAAA,mBAA2B,MAAA,UAAU,QAAA;AAE3C,IAAA,SAAS,QAAA,CAASQ,MAAAA,EAAoB;AACpC,MAAA,YAAA,CAAa,OAAA,CAAQA,MAA0B,CAAA;AAAA,IACjD;AAEA,IAAA,WAAA,CAAY,gBAAA,CAAiB,KAAA,EAAO,QAAQ,CAAA;AAC5C,IAAA,OAAO,CAAA,EAAA,GAAM;AACX,MAAA,WAAA,CAAY,mBAAA,CAAoB,KAAA,EAAO,QAAQ,CAAA;AAAA,IACjD,CAAA;AAAA,EACF,CAAA,EAAG,CAAC,KAAA,EAAO,MAAM,CAAC,CAAA;AACpB;AZseA;AACA;AACE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF,6bAAC","file":"/home/runner/work/ug-ui/ug-ui/packages/ui-react/dist/chunk-D63UPGP5.cjs","sourcesContent":[null,"/**\n * @description: 防抖 hook\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-04-15\n */\nimport { useState, useEffect } from 'react'\n\n/**\n * 防抖值,延迟 delay 毫秒后才更新\n * @example\n * const keyword = useDebounce(inputValue, 300)\n */\nexport function useDebounce<T>(value: T, delay = 300): T {\n const [debounced, setDebounced] = useState(value)\n\n useEffect(() => {\n const timer = setTimeout(() => setDebounced(value), delay)\n return () => clearTimeout(timer)\n }, [value, delay])\n\n return debounced\n}\n","/**\n * @description: localStorage 持久化 hook\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-04-15\n */\nimport { useState, useCallback } from 'react'\n\nexport type SetLocalStorageValue<T> = (value: T | ((prev: T) => T)) => void\nexport type UseLocalStorageReturn<T> = [T, SetLocalStorageValue<T>, () => void]\n\ninterface StorageSlot<T> {\n key: string\n current: T\n}\n\nfunction readValue<T>(key: string, initialValue: T): T {\n if (typeof window === 'undefined') return initialValue\n try {\n const item = window.localStorage.getItem(key)\n return item ? (JSON.parse(item) as T) : initialValue\n } catch {\n return initialValue\n }\n}\n\n/**\n * 自动读写 localStorage 的 useState\n * @example\n * const [token, setToken, removeToken] = useLocalStorage('token', '')\n */\nexport function useLocalStorage<T>(key: string, initialValue: T): UseLocalStorageReturn<T> {\n const [storedSlot, setStoredSlot] = useState<StorageSlot<T>>(() => ({ key, current: readValue(key, initialValue) }))\n const [, renderValue] = useState(0)\n let slot = storedSlot\n if (slot.key !== key) {\n slot = { key, current: readValue(key, initialValue) }\n setStoredSlot(slot)\n }\n\n const setValue = useCallback((value: T | ((prev: T) => T)) => {\n // 当前槽立即保存会话值,连续调用不依赖尚未提交的 React 更新。\n const next = value instanceof Function ? value(slot.current) : value\n slot.current = next\n if (typeof window !== 'undefined') {\n try {\n window.localStorage.setItem(slot.key, JSON.stringify(next))\n } catch {\n // 存储不可用时仍保留当前会话内的 React 状态。\n }\n }\n renderValue(revision => revision + 1)\n }, [slot])\n\n const removeValue = useCallback(() => {\n slot.current = initialValue\n if (typeof window !== 'undefined') {\n try {\n window.localStorage.removeItem(slot.key)\n } catch {\n // 存储不可用时仍完成当前会话内的状态重置。\n }\n }\n renderValue(revision => revision + 1)\n }, [slot, initialValue])\n\n return [slot.current, setValue, removeValue]\n}\n","/**\n * @description: 点击元素外部触发回调的 hook\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-04-15\n */\nimport { useEffect } from 'react'\nimport type { RefObject } from 'react'\n\n/**\n * 点击 ref 元素外部时触发 handler\n * @example\n * const ref = useRef<HTMLDivElement>(null)\n * useClickOutside(ref, () => setOpen(false))\n */\nexport function useClickOutside<T extends HTMLElement>(\n ref: RefObject<T | null>,\n handler: () => void,\n): void {\n useEffect(() => {\n const handleMouseDown = (event: MouseEvent) => {\n if (ref.current && !ref.current.contains(event.target as Node)) {\n handler()\n }\n }\n\n const handleTouchStart = (event: TouchEvent) => {\n if (ref.current && !ref.current.contains(event.target as Node)) {\n handler()\n }\n }\n\n document.addEventListener('mousedown', handleMouseDown)\n document.addEventListener('touchstart', handleTouchStart)\n\n return () => {\n document.removeEventListener('mousedown', handleMouseDown)\n document.removeEventListener('touchstart', handleTouchStart)\n }\n }, [ref, handler])\n}\n","/**\n * @description: 复制文本到剪贴板的 hook\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-04-15\n */\nimport { useCallback, useLayoutEffect, useRef, useState } from 'react'\n\nexport interface UseCopyToClipboardReturn {\n copied: boolean\n copy: (text: string) => Promise<void>\n}\n\n/**\n * 复制文本到剪贴板,copied 状态 2 秒后自动重置\n * @example\n * const { copied, copy } = useCopyToClipboard()\n * <button onClick={() => copy('hello')}>{copied ? '已复制' : '复制'}</button>\n */\nexport function useCopyToClipboard(): UseCopyToClipboardReturn {\n const [copied, setCopied] = useState(false)\n const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null)\n const sequence = useRef(0)\n const alive = useRef(true)\n\n useLayoutEffect(() => {\n alive.current = true\n return () => {\n alive.current = false\n sequence.current++\n if (timerRef.current !== null) {\n clearTimeout(timerRef.current)\n timerRef.current = null\n }\n }\n }, [])\n\n const copy = useCallback(async (text: string) => {\n if (!alive.current) return\n const request = ++sequence.current\n if (timerRef.current !== null) { clearTimeout(timerRef.current); timerRef.current = null }\n setCopied(false)\n if (typeof navigator === 'undefined' || !navigator.clipboard) {\n return\n }\n\n try {\n await navigator.clipboard.writeText(text)\n if (!alive.current || request !== sequence.current) return\n setCopied(true)\n // 2 秒后自动重置状态\n timerRef.current = setTimeout(() => {\n timerRef.current = null\n if (alive.current && request === sequence.current) setCopied(false)\n }, 2000)\n } catch {\n if (alive.current && request === sequence.current) setCopied(false)\n }\n }, [])\n\n return { copied, copy }\n}\n","/**\n * @description: 布尔值切换 hook\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-04-15\n */\nimport { useState, useCallback } from 'react'\n\nexport type UseToggleReturn = [boolean, () => void, (value: boolean) => void]\n\n/**\n * 简单的布尔值切换,返回 [value, toggle, setValue]\n * @example\n * const [isOpen, toggleOpen, setIsOpen] = useToggle(false)\n * <button onClick={toggleOpen}>切换</button>\n */\nexport function useToggle(\n initial = false,\n): UseToggleReturn {\n const [value, setValue] = useState(initial)\n\n const toggle = useCallback(() => {\n setValue(prev => !prev)\n }, [])\n\n return [value, toggle, setValue]\n}\n","/**\n * @description: 分页状态管理 hook\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-04-15\n */\nimport { useCallback, useEffect, useMemo, useState } from 'react'\n\nexport interface UsePaginationOptions {\n /** 数据总条数 */\n total: number\n /** 每页条数,默认 10 */\n pageSize?: number\n /** 初始页码,默认 1 */\n initialPage?: number\n}\n\nexport interface UsePaginationReturn {\n /** 当前页码 (从 1 开始) */\n page: number\n /** 总页数 */\n totalPages: number\n /** 跳转到指定页 */\n setPage: (p: number) => void\n /** 下一页 */\n nextPage: () => void\n /** 上一页 */\n prevPage: () => void\n /** 是否有下一页 */\n hasNext: boolean\n /** 是否有上一页 */\n hasPrev: boolean\n /** 当前页起始索引 (0-based,用于切片) */\n startIndex: number\n /** 当前页结束索引 (exclusive,用于切片) */\n endIndex: number\n}\n\n/**\n * 分页状态管理,提供页码、边界判断和数据切片索引\n * @example\n * const { page, totalPages, nextPage, prevPage, startIndex, endIndex } = usePagination({ total: 100, pageSize: 10 })\n * const pageData = data.slice(startIndex, endIndex)\n */\nexport function usePagination({\n total,\n pageSize = 10,\n initialPage = 1,\n}: UsePaginationOptions): UsePaginationReturn {\n const totalPages = useMemo(\n () => Math.max(1, Math.ceil(total / pageSize)),\n [total, pageSize],\n )\n\n const [internalPage, setPageState] = useState(() =>\n Math.min(Math.max(1, initialPage), Math.max(1, Math.ceil(total / pageSize))),\n )\n const page = Math.min(internalPage, totalPages)\n\n useEffect(() => {\n setPageState(prev => Math.min(prev, totalPages))\n }, [totalPages])\n\n const setPage = useCallback(\n (p: number) => {\n setPageState(Math.min(Math.max(1, p), totalPages))\n },\n [totalPages],\n )\n\n const nextPage = useCallback(() => {\n setPageState(prev => Math.min(prev + 1, totalPages))\n }, [totalPages])\n\n const prevPage = useCallback(() => {\n setPageState(prev => Math.max(Math.min(prev, totalPages) - 1, 1))\n }, [totalPages])\n\n const startIndex = (page - 1) * pageSize\n const endIndex = Math.min(startIndex + pageSize, total)\n\n return {\n page,\n totalPages,\n setPage,\n nextPage,\n prevPage,\n hasNext: page < totalPages,\n hasPrev: page > 1,\n startIndex,\n endIndex,\n }\n}\n","/**\n * @description: React 表单状态、校验与提交流程管理\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-07-27\n */\nimport {\n useCallback,\n useMemo,\n useRef,\n useState,\n type FormEvent,\n type SetStateAction,\n} from 'react'\nimport {\n validateFormValue, createFormFieldArray, getFormPath, setFormPath, getFormPaths, isFormPathWithin, normalizeFormPath, isFormValueEqual, isFormPathActive,\n type FormFieldArray, type FormFieldName, type FormSetFieldValue, type FormFieldRules,\n type FormRules,\n type FormValidationTrigger,\n} from '@ug666/ui-core'\n\nexport type UseFormErrors<T extends Record<string, unknown>> = Partial<Record<string, string>>\nexport type UseFormTouched<T extends Record<string, unknown>> = Partial<Record<string, boolean>>\n\nexport interface UseFormOptions<T extends Record<string, unknown>> {\n rules?: FormRules<T>\n validateOnChange?: boolean\n validateOnBlur?: boolean\n initialErrors?: UseFormErrors<T>\n scrollToError?: boolean\n scrollIntoViewOptions?: ScrollIntoViewOptions\n onValidate?: (name: FormFieldName<T>, valid: boolean, message?: string) => void\n}\n\nexport interface UseFormReturn<T extends Record<string, unknown>> {\n values: T\n rules: FormRules<T> | undefined\n errors: UseFormErrors<T>\n touched: UseFormTouched<T>\n dirtyFields: UseFormTouched<T>\n validatingFields: UseFormTouched<T>\n isDirty: boolean\n isValid: boolean\n isValidating: boolean\n handleChange: FormSetFieldValue<T>\n handleBlur: (name: FormFieldName<T>) => void\n setFieldValue: FormSetFieldValue<T>\n setValues: (values: SetStateAction<T>) => void\n setError: (name: FormFieldName<T>, message: string) => void\n clearErrors: (names?: FormFieldName<T> | (FormFieldName<T>)[]) => void\n clearValidate: (names?: FormFieldName<T> | (FormFieldName<T>)[]) => void\n validateField: (name: FormFieldName<T>, trigger?: FormValidationTrigger) => Promise<boolean>\n validate: (names?: FormFieldName<T> | (FormFieldName<T>)[]) => Promise<boolean>\n handleSubmit: (\n callback: (values: T, event: FormEvent<HTMLFormElement>) => void | Promise<void>,\n ) => (event: FormEvent<HTMLFormElement>) => Promise<void>\n fieldArray: <Item = unknown>(name: FormFieldName<T>) => FormFieldArray<Item>\n reset: (nextValues?: T) => void\n resetFields: (names?: FormFieldName<T> | (FormFieldName<T>)[]) => void\n setInitialValues: (values: T) => void\n registerField: (name: FormFieldName<T>, element: HTMLElement | null) => void\n getField: (name: FormFieldName<T>) => HTMLElement | undefined\n scrollToField: (name: FormFieldName<T>, options?: ScrollIntoViewOptions) => void\n scrollToError: (options?: ScrollIntoViewOptions) => void\n}\n\nfunction normalizeFields<T extends Record<string, unknown>>(\n names: FormFieldName<T> | (FormFieldName<T>)[] | undefined,\n values: T,\n): (FormFieldName<T>)[] {\n if (names === undefined) return getFormPaths(values)\n return (Array.isArray(names) ? names : [names]).map(normalizeFormPath)\n}\n\nexport function useForm<T extends Record<string, unknown>>(\n initialValues: T,\n options: UseFormOptions<T> = {},\n): UseFormReturn<T> {\n const initialValuesRef = useRef<T>({ ...initialValues })\n const valuesRef = useRef<T>({ ...initialValues })\n const fieldArraysRef = useRef(new Map<string, ReturnType<typeof createFormFieldArray>>())\n const [baselineRevision, setBaselineRevision] = useState(0)\n const [values, setValuesState] = useState<T>(() => ({ ...initialValues }))\n const [errors, setErrors] = useState<UseFormErrors<T>>(options.initialErrors ?? {})\n const [touched, setTouched] = useState<UseFormTouched<T>>({})\n const [validatingFields, setValidatingFields] = useState<UseFormTouched<T>>({})\n const validationGenerationRef = useRef(0)\n const validationRunRef = useRef<Partial<Record<string, number>>>({})\n const fieldElementsRef = useRef(new Map<FormFieldName<T>, HTMLElement>())\n\n const dirtyFields = useMemo(() => {\n const next: UseFormTouched<T> = {}\n for (const name of new Set([...getFormPaths(initialValuesRef.current), ...getFormPaths(values)])) {\n if (!isFormValueEqual(getFormPath(values, name), getFormPath(initialValuesRef.current, name))) next[name] = true\n }\n return next\n }, [values, baselineRevision])\n\n const isDirty = Object.keys(dirtyFields).length > 0\n const isValid = Object.keys(errors).length === 0\n\n function getRules(path: string): FormFieldRules<T[Extract<keyof T, string>], T> | undefined {\n const key = Object.keys(options.rules ?? {}).find(key => normalizeFormPath(key) === path)\n return key === undefined ? undefined : (options.rules as Record<string, FormFieldRules<T[Extract<keyof T, string>], T>>)[key]\n }\n\n const runFieldValidation = useCallback(async (\n path: FormFieldName<T>,\n trigger: FormValidationTrigger,\n currentValues: T,\n ): Promise<boolean> => {\n const name = normalizeFormPath(path)\n if (!isFormPathActive(currentValues, name)) return true\n const run = (validationRunRef.current[name] ?? 0) + 1\n validationRunRef.current[name] = run\n setValidatingFields((current) => ({ ...current, [name]: true }))\n const generation = validationGenerationRef.current\n\n const message = await validateFormValue(\n getFormPath(currentValues, name) as T[Extract<keyof T, string>],\n getRules(name),\n currentValues,\n trigger,\n )\n\n const isLatestRun = () => validationRunRef.current[name] === run && generation === validationGenerationRef.current\n // validator 可以读取整表 values;仅比较当前字段会接收依赖字段已变的旧结果。\n const isCurrentRun = () => isLatestRun() && currentValues === valuesRef.current\n try {\n if (isCurrentRun()) {\n setErrors((current) => {\n if (message) return { ...current, [name]: message }\n if (current[name] === undefined) return current\n const next = { ...current }\n delete next[name]\n return next\n })\n options.onValidate?.(name, !message, message)\n }\n } finally {\n // 用户回调可能重入校验或 reset;清理也必须重新确认任务归属。\n if (isLatestRun()) setValidatingFields(current => { if (!isLatestRun()) return current; const next = { ...current }; delete next[name]; return next })\n }\n\n return isCurrentRun() && !message\n }, [options.onValidate, options.rules])\n\n const setFieldValue: FormSetFieldValue<T> = useCallback((path: string, value: unknown) => {\n const name = normalizeFormPath(path)\n const next = setFormPath(valuesRef.current, name, value)\n valuesRef.current = next\n setValuesState(next)\n if (options.validateOnChange) void runFieldValidation(name, 'change', next)\n }, [options.validateOnChange, runFieldValidation])\n\n const handleChange = setFieldValue\n\n const handleBlur = useCallback((path: FormFieldName<T>) => {\n const name = normalizeFormPath(path)\n setTouched((current) => ({ ...current, [name]: true }))\n if (options.validateOnBlur) void runFieldValidation(normalizeFormPath(name), 'blur', valuesRef.current)\n }, [options.validateOnBlur, runFieldValidation, values])\n\n const setValues = useCallback((nextValue: SetStateAction<T>) => {\n const next = typeof nextValue === 'function' ? (nextValue as (previous: T) => T)(valuesRef.current) : nextValue\n valuesRef.current = next\n setValuesState(next)\n }, [])\n\n const setError = useCallback((path: FormFieldName<T>, message: string) => {\n const name = normalizeFormPath(path)\n setErrors((current) => ({ ...current, [name]: message }))\n }, [])\n\n const clearErrors = useCallback((names?: FormFieldName<T> | (FormFieldName<T>)[]) => {\n if (names === undefined) {\n setErrors({})\n return\n }\n const fields = normalizeFields(names, valuesRef.current)\n setErrors((current) => {\n const next = { ...current }\n for (const name of Object.keys(next)) if (fields.some(field => isFormPathWithin(name, field))) delete next[name]\n return next\n })\n }, [])\n const clearValidate = useCallback((names?: FormFieldName<T> | (FormFieldName<T>)[]) => {\n clearErrors(names)\n const fields = names === undefined\n ? Object.keys(validationRunRef.current) as (FormFieldName<T>)[]\n : [...new Set([...normalizeFields(names, valuesRef.current), ...Object.keys(validationRunRef.current).filter(name => normalizeFields(names, valuesRef.current).some(field => isFormPathWithin(name, field)))])]\n for (const name of fields) {\n validationRunRef.current[name] = (validationRunRef.current[name] ?? 0) + 1\n }\n setValidatingFields((current) => {\n if (names === undefined) return {}\n const next = { ...current }\n for (const name of fields) delete next[name]\n return next\n })\n }, [clearErrors])\n\n const registerField = useCallback((path: FormFieldName<T>, element: HTMLElement | null) => {\n const name = normalizeFormPath(path)\n if (element) fieldElementsRef.current.set(name, element)\n else fieldElementsRef.current.delete(name)\n }, [])\n\n const getField = useCallback(\n (name: FormFieldName<T>) => fieldElementsRef.current.get(normalizeFormPath(name)),\n [],\n )\n\n const scrollToField = useCallback((\n name: FormFieldName<T>,\n scrollOptions: ScrollIntoViewOptions = options.scrollIntoViewOptions ?? {\n behavior: 'smooth',\n block: 'center',\n },\n ) => {\n fieldElementsRef.current.get(normalizeFormPath(name))?.scrollIntoView(scrollOptions)\n }, [options.scrollIntoViewOptions])\n\n const scrollToError = useCallback((\n scrollOptions?: ScrollIntoViewOptions,\n ) => {\n const firstInvalidField = (Object.keys(errors) as FormFieldName<T>[])[0]\n if (firstInvalidField !== undefined) scrollToField(firstInvalidField, scrollOptions)\n }, [errors, scrollToField])\n\n const validateField = useCallback((\n name: FormFieldName<T>,\n trigger: FormValidationTrigger = 'submit',\n ) => runFieldValidation(normalizeFormPath(name), trigger, valuesRef.current), [runFieldValidation, values])\n\n const validate = useCallback(async (names?: FormFieldName<T> | (FormFieldName<T>)[]) => {\n const snapshot = valuesRef.current\n const fields = names === undefined ? [...new Set([...getFormPaths(snapshot), ...Object.keys(options.rules ?? {}).map(normalizeFormPath), ...fieldElementsRef.current.keys()])] : normalizeFields(names, snapshot)\n const results = await Promise.all(\n fields.filter(name => isFormPathActive(snapshot, name)).map((name) => runFieldValidation(name, 'submit', snapshot)),\n )\n return results.every(Boolean) && snapshot === valuesRef.current\n }, [runFieldValidation, values, options.rules])\n\n const handleSubmit = useCallback((\n callback: (values: T, event: FormEvent<HTMLFormElement>) => void | Promise<void>,\n ) => async (event: FormEvent<HTMLFormElement>) => {\n event.preventDefault()\n setTouched(Object.fromEntries(\n getFormPaths(valuesRef.current).map((name) => [name, true]),\n ) as UseFormTouched<T>)\n if (await validate()) {\n await callback(valuesRef.current, event)\n return\n }\n if (options.scrollToError) {\n requestAnimationFrame(() => {\n const firstInvalidEntry = [...fieldElementsRef.current.entries()]\n .find(([, element]) => element.dataset.state === 'invalid')\n if (firstInvalidEntry) scrollToField(firstInvalidEntry[0])\n })\n }\n }, [options.scrollToError, scrollToField, validate, values])\n\n const reset = useCallback((nextValues?: T) => {\n if (nextValues) initialValuesRef.current = { ...nextValues }\n valuesRef.current = { ...(nextValues ?? initialValuesRef.current) }\n setValuesState(valuesRef.current)\n for (const entry of fieldArraysRef.current.values()) entry.resetIds()\n setErrors({})\n setTouched({})\n setValidatingFields({})\n for (const name of Object.keys(validationRunRef.current) as (FormFieldName<T>)[]) {\n validationRunRef.current[name] = (validationRunRef.current[name] ?? 0) + 1\n }\n validationGenerationRef.current += 1\n }, [])\n\n const resetFields = useCallback((names?: FormFieldName<T> | (FormFieldName<T>)[]) => {\n if (names === undefined) {\n reset()\n return\n }\n const fields = normalizeFields(names, valuesRef.current)\n for (const name of Object.keys(validationRunRef.current).filter(name => fields.some(field => isFormPathWithin(name, field)))) {\n validationRunRef.current[name] = (validationRunRef.current[name] ?? 0) + 1\n }\n let nextValues = valuesRef.current\n for (const name of fields) nextValues = setFormPath(nextValues, name, getFormPath(initialValuesRef.current, name))\n valuesRef.current = nextValues\n setValuesState(nextValues)\n for (const [name, entry] of fieldArraysRef.current) if (fields.some(field => isFormPathWithin(name, field) || isFormPathWithin(field, name))) entry.resetIds()\n\n setErrors((current) => {\n const next = { ...current }\n for (const name of Object.keys(next)) if (fields.some(field => isFormPathWithin(name, field))) delete next[name]\n return next\n })\n setTouched((current) => {\n const next = { ...current }\n for (const name of Object.keys(next)) if (fields.some(field => isFormPathWithin(name, field))) delete next[name]\n return next\n })\n setValidatingFields((current) => {\n const next = { ...current }\n for (const name of Object.keys(next)) if (fields.some(field => isFormPathWithin(name, field))) delete next[name]\n return next\n })\n }, [reset])\n\n const setInitialValues = useCallback((nextValues: T) => {\n initialValuesRef.current = { ...nextValues }\n setBaselineRevision(revision => revision + 1)\n }, [])\n\n const fieldArray = useCallback(<Item = unknown>(path: FormFieldName<T>): FormFieldArray<Item> => {\n const name = normalizeFormPath(path)\n let entry = fieldArraysRef.current.get(name)\n if (!entry) {\n entry = createFormFieldArray(name, () => getFormPath(valuesRef.current, name), next => {\n validationGenerationRef.current += 1\n setValidatingFields({})\n const prune = <Value,>(current: Partial<Record<FormFieldName<T>, Value>>) => Object.fromEntries(Object.entries(current).filter(([field]) => !isFormPathWithin(field, name))) as Partial<Record<FormFieldName<T>, Value>>\n setErrors(prune); setTouched(prune)\n for (const [field, entry] of fieldArraysRef.current) if (field !== name && isFormPathWithin(field, name)) entry.resetIds()\n const values = setFormPath(valuesRef.current, name, next)\n valuesRef.current = values; setValuesState(values)\n })\n fieldArraysRef.current.set(name, entry)\n }\n return entry.controller as FormFieldArray<Item>\n }, [])\n\n return {\n values,\n rules: options.rules,\n errors,\n touched,\n dirtyFields,\n validatingFields,\n isDirty,\n isValid,\n isValidating: Object.keys(validatingFields).length > 0,\n handleChange,\n handleBlur,\n setFieldValue,\n setValues,\n setError,\n clearErrors,\n clearValidate,\n validateField,\n validate,\n handleSubmit,\n fieldArray,\n reset,\n resetFields,\n setInitialValues,\n registerField,\n getField,\n scrollToField,\n scrollToError,\n }\n}\n","/**\n * @description: 组件挂载状态 hook — 用于避免 SSR 环境下的 hydration 报错\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-04-17\n */\nimport { useState, useEffect } from 'react'\n\n/**\n * 返回组件是否已在客户端挂载完成。\n *\n * 在 SSR 场景中,服务端渲染时始终返回 false,\n * 客户端 hydration 完成后变为 true,可用于条件渲染仅客户端内容。\n *\n * @returns 组件是否已挂载\n *\n * @example\n * ```tsx\n * const isMounted = useMounted()\n *\n * if (!isMounted) return null // 服务端不渲染\n * return <ClientOnlyComponent />\n * ```\n */\nexport function useMounted(): boolean {\n const [mounted, setMounted] = useState(false)\n\n useEffect(() => {\n setMounted(true)\n }, [])\n\n return mounted\n}\n","/**\n * @description: 定时间隔 hook — delay 为 null 时暂停,支持动态调整间隔\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-04-17\n */\nimport { useEffect, useRef } from 'react'\n\n/**\n * 以指定间隔重复调用回调函数。\n *\n * 当 delay 为 null 时定时器自动暂停,可动态修改 delay 或 callback。\n * 参考 Dan Abramov 的 useInterval 实现,使用 ref 保持 callback 最新引用。\n *\n * @param callback 每次触发时调用的函数\n * @param delay 间隔毫秒数;传入 null 则暂停定时器\n *\n * @example\n * ```tsx\n * const [count, setCount] = useState(0)\n * const [running, setRunning] = useState(true)\n *\n * useInterval(() => setCount(c => c + 1), running ? 1000 : null)\n * ```\n */\nexport function useInterval(callback: () => void, delay: number | null): void {\n const savedCallback = useRef<() => void>(callback)\n\n // 每次渲染都更新 ref,确保 callback 始终最新\n useEffect(() => {\n savedCallback.current = callback\n }, [callback])\n\n useEffect(() => {\n if (delay === null) return\n const id = setInterval(() => savedCallback.current(), delay)\n return () => clearInterval(id)\n }, [delay])\n}\n","/**\n * @description: 延迟执行 hook — delay 为 null 时暂停,组件卸载自动清理\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-04-17\n */\nimport { useEffect, useRef } from 'react'\n\n/**\n * 在指定延迟后执行一次回调函数。\n *\n * 当 delay 为 null 时定时器不启动(暂停模式)。\n * 每次 delay 变化都会重置定时器;组件卸载时自动清理。\n *\n * @param callback 延迟结束后调用的函数\n * @param delay 延迟毫秒数;传入 null 则不执行\n *\n * @example\n * ```tsx\n * const [show, setShow] = useState(true)\n *\n * // 3 秒后自动隐藏提示\n * useTimeout(() => setShow(false), show ? 3000 : null)\n * ```\n */\nexport function useTimeout(callback: () => void, delay: number | null): void {\n const savedCallback = useRef<() => void>(callback)\n\n // 每次渲染都更新 ref,确保 callback 始终最新\n useEffect(() => {\n savedCallback.current = callback\n }, [callback])\n\n useEffect(() => {\n if (delay === null) return\n const id = setTimeout(() => savedCallback.current(), delay)\n return () => clearTimeout(id)\n }, [delay])\n}\n","/**\n * @description: 快捷键绑定 hook — 支持 \"ctrl+k\"、\"cmd+s\"、\"escape\" 等组合键\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-04-17\n */\nimport { useEffect, useRef } from 'react'\n\nexport interface UseHotkeysOptions {\n /** 是否阻止默认浏览器行为,默认 false */\n preventDefault?: boolean\n /** 监听目标,默认 window */\n target?: HTMLElement | null\n}\n\n/**\n * 解析快捷键字符串,返回规范化的修饰键 + 主键结构。\n * 支持 ctrl/cmd/alt/shift + 任意按键,键名不区分大小写。\n * \"cmd\" 在 Mac 映射为 Meta,Windows 同样可响应 Meta 键。\n */\nfunction parseHotkey(keys: string): {\n ctrl: boolean\n meta: boolean\n alt: boolean\n shift: boolean\n key: string\n} {\n const parts = keys.toLowerCase().split('+').map((s) => s.trim())\n const ctrl = parts.includes('ctrl')\n const meta = parts.includes('cmd') || parts.includes('meta')\n const alt = parts.includes('alt')\n const shift = parts.includes('shift')\n const key = parts.find(\n (p) => !['ctrl', 'cmd', 'meta', 'alt', 'shift'].includes(p),\n ) ?? ''\n\n return { ctrl, meta, alt, shift, key }\n}\n\n/**\n * 将快捷键字符串绑定到回调函数。\n *\n * 支持修饰键组合:ctrl、cmd(Meta)、alt、shift,加主键(不区分大小写)。\n * 组件卸载时自动解绑。\n *\n * @param keys 快捷键字符串,如 \"ctrl+k\"、\"cmd+s\"、\"escape\"\n * @param callback 触发时调用的函数\n * @param options 额外配置项\n *\n * @example\n * ```tsx\n * // 全局搜索快捷键\n * useHotkeys('ctrl+k', () => setSearchOpen(true), { preventDefault: true })\n *\n * // ESC 关闭弹窗\n * useHotkeys('escape', () => setOpen(false))\n *\n * // 仅在特定元素内响应\n * useHotkeys('ctrl+enter', handleSubmit, { target: formRef.current })\n * ```\n */\nexport function useHotkeys(\n keys: string,\n callback: (event: KeyboardEvent) => void,\n options: UseHotkeysOptions = {},\n): void {\n const { preventDefault = false, target = null } = options\n const savedCallback = useRef<(event: KeyboardEvent) => void>(callback)\n\n useEffect(() => {\n savedCallback.current = callback\n }, [callback])\n\n useEffect(() => {\n const parsed = parseHotkey(keys)\n const eventTarget: EventTarget = target ?? window\n\n function handler(event: KeyboardEvent): void {\n const eventKey = event.key.toLowerCase()\n const match =\n eventKey === parsed.key &&\n event.ctrlKey === parsed.ctrl &&\n event.metaKey === parsed.meta &&\n event.altKey === parsed.alt &&\n event.shiftKey === parsed.shift\n\n if (match) {\n if (preventDefault) event.preventDefault()\n savedCallback.current(event)\n }\n }\n\n eventTarget.addEventListener('keydown', handler as EventListener)\n return () => {\n eventTarget.removeEventListener('keydown', handler as EventListener)\n }\n }, [keys, preventDefault, target])\n}\n","/**\n * @description: 事件监听 hook — 自动管理事件绑定与清理,支持 Window/Document/HTMLElement\n * @author: UG - 一个斗码大陆苦逼的三段码之气的少年,并没有神秘戒指中码老的帮助,但总有一天,我会成为斗码大陆中码帝一样的存在。三十年河东,三十年河西,莫欺少年穷。\n * @date: 2026-04-17\n */\nimport { useEffect, useRef } from 'react'\n\n/**\n * 在指定目标上绑定事件监听器,组件卸载时自动清理。\n *\n * 支持三种目标类型:\n * - 不传 target → 默认监听 window\n * - 传入 HTMLElement → 监听该元素\n * - 传入 null → 跳过绑定\n *\n * @typeParam K WindowEventMap 中的事件名称\n * @param event 事件名称,如 \"scroll\"、\"resize\"、\"click\"\n * @param handler 事件处理函数\n * @param target 监听目标;默认 window;传 null 跳过绑定\n *\n * @example\n * ```tsx\n * // 监听全局滚动\n * useEventListener('scroll', () => setScrollY(window.scrollY))\n *\n * // callback ref 用 state 接收节点,挂载及节点替换会触发重新绑定。\n * // 单独读取 ref.current 不会在节点挂载时触发 render。\n * const [target, setTarget] = useState<HTMLDivElement | null>(null)\n * useEventListener('click', handleClick, target)\n * return <div ref={setTarget} />\n * ```\n */\nexport function useEventListener<K extends keyof WindowEventMap>(\n event: K,\n handler: (event: WindowEventMap[K]) => void,\n target?: EventTarget | null,\n): void {\n const savedHandler = useRef<(event: WindowEventMap[K]) => void>(handler)\n\n useEffect(() => {\n savedHandler.current = handler\n }, [handler])\n\n useEffect(() => {\n // target 显式传入 null 时跳过绑定\n if (target === null) return\n const eventTarget: EventTarget = target ?? window\n\n function listener(event: Event): void {\n savedHandler.current(event as WindowEventMap[K])\n }\n\n eventTarget.addEventListener(event, listener)\n return () => {\n eventTarget.removeEventListener(event, listener)\n }\n }, [event, target])\n}\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
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 n=e[t],o=e[t+1];if(t+=2,("optionalAccess"===n||"optionalCall"===n)&&null==l)return;"access"===n||"optionalAccess"===n?(a=l,l=o(l)):"call"!==n&&"optionalCall"!==n||(l=o((...e)=>l.call(a,...e)),a=void 0)}return l}Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./chunk-XVFRKGM7.cjs"),a=require("react"),l=require("lucide-react"),t=require("@ug666/ui-core"),n=require("@ug666/ui-web"),o=require("react/jsx-runtime"),r={sm:"h-[var(--control-height-sm)]",default:"h-[var(--control-height-md)]",lg:"h-[var(--control-height-lg)]"},i={sm:"px-[var(--control-padding-x-sm)]",default:"px-[var(--control-padding-x-md)]",lg:"px-[var(--control-padding-x-lg)]"};function normalizeValue(e){return null==e?"":Array.isArray(e)?e.join(","):String(e)}var s=a.forwardRef.call(void 0,({append:s,className:d,clearable:c=!1,clearIcon:u,countCharacters:v,defaultValue:p,disabled:h,error:f,formatter:m,helperText:x,id:g,label:C,maxLength:w,onBlur:b,onChange:y,onClear:j,onCompositionEnd:_,onCompositionStart:N,onFocus:T,onKeyDown:S,onValueChange:z,parser:R,passwordHiddenIcon:V,passwordVisibleIcon:k,prefix:B,prepend:E,readOnly:I=!1,showPassword:A=!1,showWordLimit:q=!1,size:L,suffix:F,type:O="text",value:P,wordLimitPosition:D="inside","aria-describedby":K,"aria-invalid":M,form:X,name:G,...H},U)=>{const W=e.useUIConfig.call(void 0),$=a.useId.call(void 0),J=_nullishCoalesce(g,()=>$),Q=`${J}-message`,[Y,Z]=a.useState.call(void 0,!1),[ee,ae]=a.useState.call(void 0,!1),[le,te]=a.useState.call(void 0),ne=a.useRef.call(void 0,!1),oe=a.useRef.call(void 0,void 0),[re,ie]=a.useState.call(void 0,!1),[se,de]=a.useState.call(void 0,()=>normalizeValue(p)),ce=a.useRef.call(void 0,null),ue=e.resolveDisabled.call(void 0,h,W.disabled),ve=e.resolveControlSize.call(void 0,L,W.size),pe=Boolean(f)||e.isAriaInvalid.call(void 0,M),he=void 0===P?se:normalizeValue(P),fe=ee?_nullishCoalesce(le,()=>he):m&&""!==he?m(he):he,me=he.length>0,xe=c&&me&&!ue&&!I,ge=A&&"password"===O&&!ue,Ce=A&&"password"===O&&re?"text":O,we=Boolean(f||x||q&&w),be=function getInputState(e,a,l,t){return[e&&"disabled",a&&"invalid",l&&"readonly",t&&"focused"].filter(Boolean).join(" ")||"default"}(ue,pe,I,Y),ye=t.countTextCharacters.call(void 0,he,v),je=Boolean(q&&w&&"inside"===D),_e=Boolean(m&&G),Ne=a.useRef.call(void 0,{defaultValue:p,value:P,formatter:m});return Ne.current={defaultValue:p,value:P,formatter:m},a.useEffect.call(void 0,()=>{const e=_optionalChain([ce,"access",e=>e.current,"optionalAccess",e=>e.form]);if(!e)return;const a=new Set;function handleReset(l){const t=setTimeout(()=>{a.delete(t);const n=ce.current;if(l.defaultPrevented||!n||n.form!==e)return;const o=Ne.current,r=normalizeValue(void 0===o.value?o.defaultValue:o.value);ne.current=!1,oe.current=void 0,ae(!1),te(void 0),void 0===o.value&&de(r),ie(!1),n.value=o.formatter&&""!==r?o.formatter(r):r},0);a.add(t)}return e.addEventListener("reset",handleReset),()=>{e.removeEventListener("reset",handleReset);for(const e of a)clearTimeout(e)}},[X]),o.jsxs.call(void 0,"div",{className:"flex min-w-0 flex-col gap-1","data-size":ve,"data-state":be,"data-ug":"input","data-ug-slot":"root","data-variant":"default",children:[C?o.jsx.call(void 0,"label",{className:"min-w-0 text-sm font-medium text-text-primary [overflow-wrap:anywhere]","data-ug-slot":"label",htmlFor:J,children:C}):null,o.jsxs.call(void 0,"div",{className:"flex w-full min-w-0","data-ug-slot":"group",children:[E?o.jsx.call(void 0,"span",{className:e.cn.call(void 0,"inline-flex max-w-[45%] min-w-0 shrink items-center overflow-hidden text-ellipsis whitespace-nowrap border border-r-0 border-border-base bg-surface-2 text-text-secondary [border-end-start-radius:var(--radius-control)] [border-start-start-radius:var(--radius-control)]",r[ve],i[ve]),"data-ug-slot":"prepend",children:E}):null,o.jsxs.call(void 0,"div",{className:e.cn.call(void 0,"flex min-w-0 flex-1 items-center",r[ve]),"data-has-append":s?"true":void 0,"data-has-prepend":E?"true":void 0,"data-ug-slot":"wrapper",children:[B?o.jsx.call(void 0,"span",{"aria-hidden":"true",className:e.cn.call(void 0,"inline-flex shrink-0 items-center",i[ve],"pr-0"),"data-ug-slot":"prefix",children:B}):null,o.jsx.call(void 0,"input",{...H,ref:function setInputRef(e){ce.current=e,function assignRef(e,a){"function"==typeof e?e(a):e&&(e.current=a)}(U,e)},"aria-describedby":_nullishCoalesce(K,()=>we?Q:void 0),"aria-invalid":_nullishCoalesce(M,()=>!!f||void 0),className:e.cn.call(void 0,"h-full min-w-0 flex-1 border-0 bg-transparent py-0 outline-none",i[ve],B&&"pl-2",(F||xe||ge||je)&&"pr-2",ue&&"cursor-not-allowed",d),"data-ug-slot":"control",disabled:ue,form:X,id:J,maxLength:v?void 0:w,name:_e?void 0:G,onBlur:function handleBlur(e){Z(!1),_optionalChain([b,"optionalCall",a=>a(e)])},onChange:function handleChange(e){const a=e.currentTarget.value;if(n.isControlComposing.call(void 0,e.nativeEvent,ne.current))return te(a),void _optionalChain([y,"optionalCall",a=>a(e)]);const l=R?R(a):a,o=t.limitTextByCount.call(void 0,l,w,v);o!==e.currentTarget.value&&(e.currentTarget.value=o),de(o),oe.current!==o&&_optionalChain([z,"optionalCall",e=>e(o)]),oe.current=void 0,_optionalChain([y,"optionalCall",a=>a(e)])},onCompositionEnd:function handleCompositionEnd(e){ne.current=!1,ae(!1),te(void 0);const a=R?R(e.currentTarget.value):e.currentTarget.value,l=t.limitTextByCount.call(void 0,a,w,v);l!==e.currentTarget.value&&(e.currentTarget.value=l),de(l),oe.current=l,l!==he&&_optionalChain([z,"optionalCall",e=>e(l)]),_optionalChain([_,"optionalCall",a=>a(e)])},onCompositionStart:function handleCompositionStart(e){ne.current=!0,oe.current=void 0,ae(!0),te(e.currentTarget.value),_optionalChain([N,"optionalCall",a=>a(e)])},onFocus:function handleFocus(e){Z(!0),_optionalChain([T,"optionalCall",a=>a(e)])},onKeyDown:e=>{n.isControlComposing.call(void 0,e.nativeEvent,ne.current)||_optionalChain([S,"optionalCall",a=>a(e)])},readOnly:I,type:Ce,value:fe}),je?o.jsxs.call(void 0,"span",{"aria-hidden":"true",className:"shrink-0 whitespace-nowrap text-xs tabular-nums text-text-tertiary","data-ug-slot":"count",children:[ye,"/",w]}):null,xe?o.jsx.call(void 0,"button",{"aria-label":"清空输入","aria-controls":J,className:"inline-flex h-full shrink-0 items-center justify-center px-[calc(var(--control-padding-x-sm)*0.5)] text-text-secondary hover:text-text-primary","data-ug-slot":"clear",onClick:function handleClear(){ne.current=!1,oe.current=void 0,ae(!1),te(void 0),de(""),_optionalChain([z,"optionalCall",e=>e("")]),_optionalChain([j,"optionalCall",e=>e()]),_optionalChain([ce,"access",e=>e.current,"optionalAccess",e=>e.focus,"call",e=>e()])},type:"button",children:_nullishCoalesce(u,()=>o.jsx.call(void 0,l.X,{"aria-hidden":"true",size:14}))}):null,ge?o.jsx.call(void 0,"button",{"aria-label":re?"隐藏密码":"显示密码","aria-controls":J,"aria-pressed":re,className:"inline-flex h-full shrink-0 items-center justify-center px-[calc(var(--control-padding-x-sm)*0.5)] text-text-secondary hover:text-text-primary","data-ug-slot":"password-toggle",onClick:()=>ie(e=>!e),type:"button",children:re?_nullishCoalesce(k,()=>o.jsx.call(void 0,l.EyeOff,{"aria-hidden":"true",size:15})):_nullishCoalesce(V,()=>o.jsx.call(void 0,l.Eye,{"aria-hidden":"true",size:15}))}):null,F?o.jsx.call(void 0,"span",{className:e.cn.call(void 0,"inline-flex shrink-0 items-center",i[ve],"pl-0"),"data-ug-slot":"suffix",children:F}):null]}),s?o.jsx.call(void 0,"span",{className:e.cn.call(void 0,"inline-flex max-w-[45%] min-w-0 shrink items-center overflow-hidden text-ellipsis whitespace-nowrap border border-l-0 border-border-base bg-surface-2 text-text-secondary [border-end-end-radius:var(--radius-control)] [border-start-end-radius:var(--radius-control)]",r[ve],i[ve]),"data-ug-slot":"append",children:s}):null]}),_e?o.jsx.call(void 0,"input",{disabled:ue,form:X,name:G,type:"hidden",value:he}):null,q&&w&&"outside"===D?o.jsxs.call(void 0,"span",{"aria-hidden":"true",className:"self-end text-xs tabular-nums text-text-tertiary","data-ug-slot":"count",children:[ye,"/",w]}):null,f?o.jsx.call(void 0,"p",{id:Q,className:"min-w-0 text-xs text-danger [overflow-wrap:anywhere]","data-ug-slot":"message",children:f}):null,!f&&x?o.jsx.call(void 0,"p",{id:Q,className:"min-w-0 text-xs text-text-secondary [overflow-wrap:anywhere]","data-ug-slot":"message",children:x}):null]})});s.displayName="Input",exports.Input=s;//# sourceMappingURL=chunk-J4NAYP4L.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["/home/runner/work/ug-ui/ug-ui/packages/ui-react/dist/chunk-J4NAYP4L.cjs","../src/components/input.tsx"],"names":[],"mappings":"AAAA;AACA;AACE;AACA;AACA;AACA;AACA;AACF,wDAA6B;AAC7B;AACA;ACTA;AACE;AACA;AACA;AACA;AACA;AAAA,8BAMK;AACP,2CAA+B;AAC/B,wCAA8E;AAC9E,sCAAmC;AA4OzB,+CAAA;AAjNV,IAAM,iBAAA,EAAgD;AAAA,EACpD,EAAA,EAAI,8BAAA;AAAA,EACJ,OAAA,EAAS,8BAAA;AAAA,EACT,EAAA,EAAI;AACN,CAAA;AAEA,IAAM,oBAAA,EAAmD;AAAA,EACvD,EAAA,EAAI,kCAAA;AAAA,EACJ,OAAA,EAAS,kCAAA;AAAA,EACT,EAAA,EAAI;AACN,CAAA;AAEA,SAAS,SAAA,CAAa,GAAA,EAAyB,KAAA,EAAiB;AAC9D,EAAA,GAAA,CAAI,OAAO,IAAA,IAAQ,UAAA,EAAY,GAAA,CAAI,KAAK,CAAA;AAAA,EAAA,KAAA,GAAA,CAC/B,GAAA,EAAK,GAAA,CAAI,QAAA,EAAU,KAAA;AAC9B;AAEA,SAAS,cAAA,CAAe,KAAA,EAAyD;AAC/E,EAAA,GAAA,CAAI,MAAA,IAAU,KAAA,EAAA,GAAa,MAAA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NAYP4L.cjs","sourcesContent":[null,"import {\n forwardRef,\n useEffect,\n useId,\n useRef,\n useState,\n type ChangeEvent,\n type CompositionEvent,\n type FocusEvent,\n type ReactNode,\n type Ref,\n} from 'react'\nimport { Eye, EyeOff, X } from 'lucide-react'\nimport { countTextCharacters, limitTextByCount, type TextCountFunction } from '@ug666/ui-core'\nimport { isControlComposing } from '@ug666/ui-web'\nimport { cn } from '../internal/cn'\nimport { isAriaInvalid, resolveControlSize, resolveDisabled, useUIConfig, type ControlSize } from './config-provider'\n\nexport interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size' | 'prefix'> {\n label?: ReactNode\n error?: ReactNode\n helperText?: ReactNode\n size?: ControlSize\n prefix?: ReactNode\n suffix?: ReactNode\n prepend?: ReactNode\n append?: ReactNode\n clearable?: boolean\n clearIcon?: ReactNode\n showPassword?: boolean\n passwordVisibleIcon?: ReactNode\n passwordHiddenIcon?: ReactNode\n showWordLimit?: boolean\n wordLimitPosition?: 'inside' | 'outside'\n countCharacters?: TextCountFunction\n formatter?: (value: string) => string\n parser?: (value: string) => string\n onClear?: () => void\n onValueChange?: (value: string) => void\n}\n\nconst inputSizeClasses: Record<ControlSize, string> = {\n sm: 'h-[var(--control-height-sm)]',\n default: 'h-[var(--control-height-md)]',\n lg: 'h-[var(--control-height-lg)]',\n}\n\nconst inputPaddingClasses: Record<ControlSize, string> = {\n sm: 'px-[var(--control-padding-x-sm)]',\n default: 'px-[var(--control-padding-x-md)]',\n lg: 'px-[var(--control-padding-x-lg)]',\n}\n\nfunction assignRef<T>(ref: Ref<T> | undefined, value: T | null) {\n if (typeof ref === 'function') ref(value)\n else if (ref) ref.current = value\n}\n\nfunction normalizeValue(value: InputProps['value'] | InputProps['defaultValue']) {\n if (value === undefined || value === null) return ''\n return Array.isArray(value) ? value.join(',') : String(value)\n}\n\nfunction getInputState(disabled: boolean, invalid: boolean, readonly: boolean, focused: boolean) {\n return (\n [disabled && 'disabled', invalid && 'invalid', readonly && 'readonly', focused && 'focused']\n .filter(Boolean)\n .join(' ') || 'default'\n )\n}\n\nconst Input = forwardRef<HTMLInputElement, InputProps>(\n (\n {\n append,\n className,\n clearable = false,\n clearIcon,\n countCharacters,\n defaultValue,\n disabled,\n error,\n formatter,\n helperText,\n id,\n label,\n maxLength,\n onBlur,\n onChange,\n onClear,\n onCompositionEnd,\n onCompositionStart,\n onFocus,\n onKeyDown,\n onValueChange,\n parser,\n passwordHiddenIcon,\n passwordVisibleIcon,\n prefix,\n prepend,\n readOnly = false,\n showPassword = false,\n showWordLimit = false,\n size,\n suffix,\n type = 'text',\n value,\n wordLimitPosition = 'inside',\n 'aria-describedby': describedBy,\n 'aria-invalid': invalid,\n form,\n name,\n ...props\n },\n forwardedRef,\n ) => {\n const config = useUIConfig()\n const generatedId = useId()\n const inputId = id ?? generatedId\n const messageId = `${inputId}-message`\n const [focused, setFocused] = useState(false)\n const [composing, setComposing] = useState(false)\n const [compositionValue, setCompositionValue] = useState<string | undefined>()\n const compositionRef = useRef(false)\n const lastCompositionValueRef = useRef<string | undefined>(undefined)\n const [passwordVisible, setPasswordVisible] = useState(false)\n const [uncontrolledValue, setUncontrolledValue] = useState(() => normalizeValue(defaultValue))\n const inputRef = useRef<HTMLInputElement | null>(null)\n const resolvedDisabled = resolveDisabled(disabled, config.disabled)\n const resolvedSize = resolveControlSize(size, config.size)\n const resolvedInvalid = Boolean(error) || isAriaInvalid(invalid)\n const rawValue = value === undefined ? uncontrolledValue : normalizeValue(value)\n const displayValue = composing ? compositionValue ?? rawValue : formatter && rawValue !== '' ? formatter(rawValue) : rawValue\n const hasValue = rawValue.length > 0\n const canClear = clearable && hasValue && !resolvedDisabled && !readOnly\n const canTogglePassword = showPassword && type === 'password' && !resolvedDisabled\n const resolvedType = showPassword && type === 'password' && passwordVisible ? 'text' : type\n const hasMessage = Boolean(error || helperText || (showWordLimit && maxLength))\n const state = getInputState(resolvedDisabled, resolvedInvalid, readOnly, focused)\n const characterCount = countTextCharacters(rawValue, countCharacters)\n const hasInsideCount = Boolean(showWordLimit && maxLength && wordLimitPosition === 'inside')\n const usesCanonicalSubmitValue = Boolean(formatter && name)\n const resetStateRef = useRef({ defaultValue, value, formatter })\n resetStateRef.current = { defaultValue, value, formatter }\n\n useEffect(() => {\n const ownerForm = inputRef.current?.form\n if (!ownerForm) return\n const tasks = new Set<ReturnType<typeof setTimeout>>()\n function handleReset(event: Event) {\n const task = setTimeout(() => {\n tasks.delete(task)\n const input = inputRef.current\n if (event.defaultPrevented || !input || input.form !== ownerForm) return\n const current = resetStateRef.current\n const nextValue = normalizeValue(current.value === undefined ? current.defaultValue : current.value)\n compositionRef.current = false\n lastCompositionValueRef.current = undefined\n setComposing(false)\n setCompositionValue(undefined)\n if (current.value === undefined) setUncontrolledValue(nextValue)\n setPasswordVisible(false)\n input.value = current.formatter && nextValue !== '' ? current.formatter(nextValue) : nextValue\n }, 0)\n tasks.add(task)\n }\n ownerForm.addEventListener('reset', handleReset)\n return () => {\n ownerForm.removeEventListener('reset', handleReset)\n for (const task of tasks) clearTimeout(task)\n }\n }, [form])\n\n function setInputRef(node: HTMLInputElement | null) {\n inputRef.current = node\n assignRef(forwardedRef, node)\n }\n\n // 组合草稿/末次提交去重改写自 Arco React Input/useComposition.ts (MIT)。\n // Copyright (c) 2021 Bytedance, Inc. and its affiliates.\n // https://github.com/arco-design/arco-design/blob/fbf2ec0a8cc28a5d20f1f82de6c2c4196ef66950/components/Input/useComposition.ts\n // 完整许可保留于 ui-web/src/control-behavior.ts;UG 保留原生 onChange,只延迟业务值。\n function handleChange(event: ChangeEvent<HTMLInputElement>) {\n const inputValue = event.currentTarget.value\n if (isControlComposing(event.nativeEvent as InputEvent, compositionRef.current)) {\n setCompositionValue(inputValue)\n onChange?.(event)\n return\n }\n const parsedValue = parser ? parser(inputValue) : inputValue\n const nextValue = limitTextByCount(parsedValue, maxLength, countCharacters)\n if (nextValue !== event.currentTarget.value) event.currentTarget.value = nextValue\n setUncontrolledValue(nextValue)\n if (lastCompositionValueRef.current !== nextValue) onValueChange?.(nextValue)\n lastCompositionValueRef.current = undefined\n onChange?.(event)\n }\n\n function handleCompositionStart(event: CompositionEvent<HTMLInputElement>) {\n compositionRef.current = true\n lastCompositionValueRef.current = undefined\n setComposing(true)\n setCompositionValue(event.currentTarget.value)\n onCompositionStart?.(event)\n }\n\n function handleCompositionEnd(event: CompositionEvent<HTMLInputElement>) {\n compositionRef.current = false\n setComposing(false)\n setCompositionValue(undefined)\n const parsedValue = parser ? parser(event.currentTarget.value) : event.currentTarget.value\n const nextValue = limitTextByCount(parsedValue, maxLength, countCharacters)\n if (nextValue !== event.currentTarget.value) event.currentTarget.value = nextValue\n setUncontrolledValue(nextValue)\n lastCompositionValueRef.current = nextValue\n if (nextValue !== rawValue) onValueChange?.(nextValue)\n onCompositionEnd?.(event)\n }\n\n function handleFocus(event: FocusEvent<HTMLInputElement>) {\n setFocused(true)\n onFocus?.(event)\n }\n\n function handleBlur(event: FocusEvent<HTMLInputElement>) {\n setFocused(false)\n onBlur?.(event)\n }\n\n function handleClear() {\n compositionRef.current = false\n lastCompositionValueRef.current = undefined\n setComposing(false)\n setCompositionValue(undefined)\n setUncontrolledValue('')\n onValueChange?.('')\n onClear?.()\n inputRef.current?.focus()\n }\n\n return (\n <div\n className=\"flex min-w-0 flex-col gap-1\"\n data-size={resolvedSize}\n data-state={state}\n data-ug=\"input\"\n data-ug-slot=\"root\"\n data-variant=\"default\"\n >\n {label ? (\n <label\n className=\"min-w-0 text-sm font-medium text-text-primary [overflow-wrap:anywhere]\"\n data-ug-slot=\"label\"\n htmlFor={inputId}\n >\n {label}\n </label>\n ) : null}\n\n <div className=\"flex w-full min-w-0\" data-ug-slot=\"group\">\n {prepend ? (\n <span\n className={cn(\n 'inline-flex max-w-[45%] min-w-0 shrink items-center overflow-hidden text-ellipsis whitespace-nowrap border border-r-0 border-border-base bg-surface-2 text-text-secondary [border-end-start-radius:var(--radius-control)] [border-start-start-radius:var(--radius-control)]',\n inputSizeClasses[resolvedSize],\n inputPaddingClasses[resolvedSize],\n )}\n data-ug-slot=\"prepend\"\n >\n {prepend}\n </span>\n ) : null}\n\n <div\n className={cn(\n 'flex min-w-0 flex-1 items-center',\n inputSizeClasses[resolvedSize],\n )}\n data-has-append={append ? 'true' : undefined}\n data-has-prepend={prepend ? 'true' : undefined}\n data-ug-slot=\"wrapper\"\n >\n {prefix ? (\n <span\n aria-hidden=\"true\"\n className={cn(\n 'inline-flex shrink-0 items-center',\n inputPaddingClasses[resolvedSize],\n 'pr-0',\n )}\n data-ug-slot=\"prefix\"\n >\n {prefix}\n </span>\n ) : null}\n\n <input\n {...props}\n ref={setInputRef}\n aria-describedby={describedBy ?? (hasMessage ? messageId : undefined)}\n aria-invalid={invalid ?? (error ? true : undefined)}\n className={cn(\n 'h-full min-w-0 flex-1 border-0 bg-transparent py-0 outline-none',\n inputPaddingClasses[resolvedSize],\n prefix && 'pl-2',\n (suffix || canClear || canTogglePassword || hasInsideCount) && 'pr-2',\n resolvedDisabled && 'cursor-not-allowed',\n className,\n )}\n data-ug-slot=\"control\"\n disabled={resolvedDisabled}\n form={form}\n id={inputId}\n maxLength={countCharacters ? undefined : maxLength}\n name={usesCanonicalSubmitValue ? undefined : name}\n onBlur={handleBlur}\n onChange={handleChange}\n onCompositionEnd={handleCompositionEnd}\n onCompositionStart={handleCompositionStart}\n onFocus={handleFocus}\n onKeyDown={(event) => { if (!isControlComposing(event.nativeEvent, compositionRef.current)) onKeyDown?.(event) }}\n readOnly={readOnly}\n type={resolvedType}\n value={displayValue}\n />\n\n {hasInsideCount ? (\n <span\n aria-hidden=\"true\"\n className=\"shrink-0 whitespace-nowrap text-xs tabular-nums text-text-tertiary\"\n data-ug-slot=\"count\"\n >\n {characterCount}/{maxLength}\n </span>\n ) : null}\n {canClear ? (\n <button\n aria-label=\"清空输入\"\n aria-controls={inputId}\n className=\"inline-flex h-full shrink-0 items-center justify-center px-[calc(var(--control-padding-x-sm)*0.5)] text-text-secondary hover:text-text-primary\"\n data-ug-slot=\"clear\"\n onClick={handleClear}\n type=\"button\"\n >\n {clearIcon ?? <X aria-hidden=\"true\" size={14} />}\n </button>\n ) : null}\n {canTogglePassword ? (\n <button\n aria-label={passwordVisible ? '隐藏密码' : '显示密码'}\n aria-controls={inputId}\n aria-pressed={passwordVisible}\n className=\"inline-flex h-full shrink-0 items-center justify-center px-[calc(var(--control-padding-x-sm)*0.5)] text-text-secondary hover:text-text-primary\"\n data-ug-slot=\"password-toggle\"\n onClick={() => setPasswordVisible((current) => !current)}\n type=\"button\"\n >\n {passwordVisible\n ? (passwordVisibleIcon ?? <EyeOff aria-hidden=\"true\" size={15} />)\n : (passwordHiddenIcon ?? <Eye aria-hidden=\"true\" size={15} />)}\n </button>\n ) : null}\n {suffix ? (\n <span\n className={cn(\n 'inline-flex shrink-0 items-center',\n inputPaddingClasses[resolvedSize],\n 'pl-0',\n )}\n data-ug-slot=\"suffix\"\n >\n {suffix}\n </span>\n ) : null}\n </div>\n\n {append ? (\n <span\n className={cn(\n 'inline-flex max-w-[45%] min-w-0 shrink items-center overflow-hidden text-ellipsis whitespace-nowrap border border-l-0 border-border-base bg-surface-2 text-text-secondary [border-end-end-radius:var(--radius-control)] [border-start-end-radius:var(--radius-control)]',\n inputSizeClasses[resolvedSize],\n inputPaddingClasses[resolvedSize],\n )}\n data-ug-slot=\"append\"\n >\n {append}\n </span>\n ) : null}\n </div>\n\n {usesCanonicalSubmitValue ? (\n <input disabled={resolvedDisabled} form={form} name={name} type=\"hidden\" value={rawValue} />\n ) : null}\n {showWordLimit && maxLength && wordLimitPosition === 'outside' ? (\n <span aria-hidden=\"true\" className=\"self-end text-xs tabular-nums text-text-tertiary\" data-ug-slot=\"count\">\n {characterCount}/{maxLength}\n </span>\n ) : null}\n\n {error ? (\n <p id={messageId} className=\"min-w-0 text-xs text-danger [overflow-wrap:anywhere]\" data-ug-slot=\"message\">\n {error}\n </p>\n ) : null}\n {!error && helperText ? (\n <p\n id={messageId}\n className=\"min-w-0 text-xs text-text-secondary [overflow-wrap:anywhere]\"\n data-ug-slot=\"message\"\n >\n {helperText}\n </p>\n ) : null}\n </div>\n )\n },\n)\n\nInput.displayName = 'Input'\n\nexport { Input }\n"]}
|
|
@@ -0,0 +1 @@
|
|
|
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 o=e[t],i=e[t+1];if(t+=2,("optionalAccess"===o||"optionalCall"===o)&&null==l)return;"access"===o||"optionalAccess"===o?(a=l,l=i(l)):"call"!==o&&"optionalCall"!==o||(l=i((...e)=>l.call(a,...e)),a=void 0)}return l}Object.defineProperty(exports,"__esModule",{value:!0});var e=require("./chunk-2EJWWTLH.cjs"),a=require("./chunk-X4EMYHLY.cjs"),l=require("./chunk-J4NAYP4L.cjs"),t=require("./chunk-XVFRKGM7.cjs"),o=require("react"),i=require("lucide-react"),n=require("class-variance-authority"),r=o.createContext.call(void 0,null);var s=require("react/jsx-runtime"),c=n.cva.call(void 0,"peer inline-flex shrink-0 items-center justify-center rounded-[var(--radius-control)] border shadow-sm peer-focus-visible:outline-none peer-focus-visible:ring-2 peer-focus-visible:ring-ring/35 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-surface-0 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",{variants:{size:{sm:"h-[calc(var(--control-height-sm)*0.5)] w-[calc(var(--control-height-sm)*0.5)]",default:"h-[calc(var(--control-height-md)*0.45)] w-[calc(var(--control-height-md)*0.45)]",lg:"h-[calc(var(--control-height-lg)*0.45)] w-[calc(var(--control-height-lg)*0.45)]"},state:{unchecked:"border-border-strong bg-surface-1 text-transparent hover:border-primary/70 hover:bg-surface-2",checked:"border-[color:var(--ug-checkbox-selected-bg)] bg-[var(--ug-checkbox-selected-bg)] text-[color:var(--ug-checkbox-selected-fg)]",indeterminate:"border-[color:var(--ug-checkbox-selected-bg)] bg-[var(--ug-checkbox-selected-bg)] text-[color:var(--ug-checkbox-selected-fg)]"}},defaultVariants:{size:"default",state:"unchecked"}}),d=o.forwardRef.call(void 0,({className:e,size:a,checked:l,defaultChecked:n,indeterminate:d=!1,disabled:u,label:v,labelClassName:p,onChange:h,onCheckedChange:f,id:m,form:g,name:b,value:x,"aria-invalid":y,...C},w)=>{const N=t.useUIConfig.call(void 0),j=function useCheckboxGroupContext(){return o.useContext.call(void 0,r)}(),_=o.useRef.call(void 0,null),[k,T]=o.useState.call(void 0,Boolean(n)),z=o.useId.call(void 0),S=_nullishCoalesce(m,()=>z),R=j&&void 0!==x?j.values.includes(x):void 0,E=_nullishCoalesce(_nullishCoalesce(R,()=>l),()=>k),A=void 0!==R||void 0!==l,M=o.useRef.call(void 0,{checked:E,indeterminate:d});M.current={checked:E,indeterminate:d};const I=_nullishCoalesce(_optionalChain([j,"optionalAccess",e=>e.form]),()=>g),F=_nullishCoalesce(_optionalChain([j,"optionalAccess",e=>e.name]),()=>b);o.useEffect.call(void 0,()=>{_.current&&(_.current.indeterminate=d)},[d]),o.useEffect.call(void 0,()=>{const e=_.current,a=_optionalChain([e,"optionalAccess",e=>e.form]);if(!e||!a)return;const l=new Set;function handleReset(a){const t=setTimeout(()=>{if(l.delete(t),!e||a.defaultPrevented||_.current!==e)return;const o=A?M.current.checked:Boolean(n);A||T(o),e.checked=o,e.indeterminate=M.current.indeterminate},0);l.add(t)}return a.addEventListener("reset",handleReset),()=>{a.removeEventListener("reset",handleReset),l.forEach(clearTimeout)}},[A,n,I]);const L=d?"indeterminate":E?"checked":"unchecked",P=t.resolveControlSize.call(void 0,_nullishCoalesce(a,()=>_optionalChain([j,"optionalAccess",e=>e.size])),N.size),D=j&&void 0!==x?j.isOptionDisabled(x,E,u):t.resolveDisabled.call(void 0,u,N.disabled),B=Boolean(j&&void 0!==x&&E&&D&&!j.disabled&&!u&&F)?s.jsx.call(void 0,"input",{type:"hidden",name:F,form:I,value:x}):null,O=t.isAriaInvalid.call(void 0,y),V=[L,O?"invalid":void 0,D?"disabled":void 0].filter(Boolean).join(" "),K=t.cn.call(void 0,"shrink-0","sm"===P?"h-[calc(var(--control-height-sm)*0.35)] w-[calc(var(--control-height-sm)*0.35)]":"lg"===P?"h-[calc(var(--control-height-lg)*0.3)] w-[calc(var(--control-height-lg)*0.3)]":"h-[calc(var(--control-height-md)*0.3)] w-[calc(var(--control-height-md)*0.3)]"),$=s.jsxs.call(void 0,"span",{className:"relative inline-flex","data-ug-slot":"control",children:[s.jsx.call(void 0,"input",{ref:e=>{_.current=e,"function"==typeof w?w(e):w&&(w.current=e)},id:S,type:"checkbox",form:I,name:F,value:x,className:"peer sr-only",checked:E,"aria-checked":d?"mixed":E,"aria-invalid":y,disabled:D,onChange:e=>{j&&void 0!==x?j.toggleValue(x,e.target.checked):void 0===l&&T(e.target.checked),e.currentTarget.indeterminate=d,_optionalChain([h,"optionalCall",a=>a(e)]),_optionalChain([f,"optionalCall",a=>a(e.target.checked)])},"data-ug-slot":"input",...C}),s.jsx.call(void 0,"span",{"aria-hidden":"true",className:t.cn.call(void 0,c({size:P,state:L}),O&&"border-danger peer-focus-visible:ring-danger/35",e),"data-ug-slot":"indicator",children:d?s.jsx.call(void 0,i.Minus,{className:K,"data-ug-slot":"icon"}):E?s.jsx.call(void 0,i.Check,{className:K,"data-ug-slot":"icon"}):null})]});return null==v?s.jsxs.call(void 0,"label",{className:t.cn.call(void 0,"inline-flex cursor-pointer",D&&"cursor-not-allowed opacity-60"),"data-ug":"checkbox","data-state":V,"data-variant":"default","data-size":P,htmlFor:S,children:[$,B]}):s.jsxs.call(void 0,"label",{htmlFor:S,className:t.cn.call(void 0,"inline-flex min-h-[var(--control-height-sm)] max-w-full min-w-0 cursor-pointer items-start gap-2.5 text-sm leading-5 text-text-primary select-none",D&&"cursor-not-allowed opacity-60",p),"data-ug":"checkbox","data-state":V,"data-variant":"default","data-size":P,children:[$,B,s.jsx.call(void 0,"span",{className:"min-w-0 pt-px [overflow-wrap:anywhere]","data-ug-slot":"label",children:v})]})});d.displayName="Checkbox";var u=require("react-dom"),v=require("@ug666/ui-core"),p=require("@ug666/ui-web"),h=require("@ug666/ui-web/overlay");function useFloatingLayoutObserver(e,a,l,t){o.useEffect.call(void 0,()=>{if(e)return h.observeFloatingLayout.call(void 0,[l.current,_optionalChain([t,"optionalAccess",e=>e.current])],a)},[e,l,t,a])}function usePresence(e){const[a,l]=o.useState.call(void 0,e),[t,i]=o.useState.call(void 0,e?"open":"closed"),n=o.useRef.call(void 0,void 0),r=o.useCallback.call(void 0,()=>{n.current&&clearTimeout(n.current),n.current=void 0},[]),s=o.useCallback.call(void 0,()=>{r(),l(!1)},[r]);o.useEffect.call(void 0,()=>r,[r]),o.useEffect.call(void 0,()=>{if(r(),e)return l(!0),void i("open");a&&(i("closed"),n.current=setTimeout(s,function readExitDuration(){if("undefined"==typeof document)return 0;const e=getComputedStyle(document.documentElement).getPropertyValue("--motion-duration-exit").trim();return e?e.endsWith("ms")?Number.parseFloat(e)||250:e.endsWith("s")?1e3*(Number.parseFloat(e)||0):250:250}()+50))},[r,s,e,a]);const c=o.useCallback.call(void 0,e=>{"closed"===t&&e.animationName.endsWith("-out")&&s()},[s,t]);return{present:e||a,state:e?"open":t,handleAnimationEnd:c}}function usePortalContainer(){const[e,a]=o.useState.call(void 0,!1);return o.useEffect.call(void 0,()=>{"undefined"!=typeof document&&a(!0)},[]),e&&"undefined"!=typeof document?document.body:null}var f={sm:"min-h-[var(--control-height-sm)] px-[var(--control-padding-x-sm)]",default:"min-h-[var(--control-height-md)] px-[var(--control-padding-x-md)]",lg:"min-h-[var(--control-height-lg)] px-[var(--control-padding-x-lg)]"},m="undefined"==typeof window?o.useEffect:o.useLayoutEffect,g=o.forwardRef.call(void 0,(a,l)=>{const{className:n,label:r,error:c,helperText:d,options:g,placeholder:b="请选择",id:x,value:y,defaultValue:C,onChange:w,onValueChange:N,onOpenChange:j,onClear:_,disabled:k,size:T,name:z,required:S,multiple:R=!1,multipleLimit:E=0,clearable:A=!1,filterable:M=!1,filterMethod:I,remote:F=!1,remoteMethod:L,remoteDebounce:P=300,loading:D=!1,loadingText:B="加载中",reserveKeyword:O=!1,allowCreate:V=!1,defaultFirstOption:K=!1,collapseTags:$=!1,maxCollapseTags:q=1,collapseTagsTooltip:H=!1,noDataText:W="暂无选项",noMatchText:U="没有匹配项",teleported:G=!0,appendTo:X,"aria-label":Y,"aria-labelledby":J,"aria-describedby":Q,"aria-invalid":Z,onBlur:ee,onFocus:ae,...le}=a,te=t.useUIConfig.call(void 0),oe=o.useId.call(void 0),ie=_nullishCoalesce(x,()=>oe),ne=`${ie}-label`,re=`${ie}-listbox`,se=`${ie}-message`,ce=t.resolveDisabled.call(void 0,k,te.disabled),de=t.resolveControlSize.call(void 0,T,te.size),ue=Boolean(c)||t.isAriaInvalid.call(void 0,Z),ve=o.useRef.call(void 0,null),pe=o.useRef.call(void 0,null),he=o.useRef.call(void 0,null),fe=o.useRef.call(void 0,null),me=usePortalContainer(),ge=e.useUGThemePortalAttributes.call(void 0),be=o.useRef.call(void 0,""),xe=o.useRef.call(void 0,null),ye=o.useRef.call(void 0,null),Ce="value"in a,[we,Ne]=o.useState.call(void 0,_nullishCoalesce(C,()=>R?[]:void 0)),[je,_e]=o.useState.call(void 0,!1),{present:ke,state:Te,handleAnimationEnd:ze}=usePresence(je),[Se,Re]=o.useState.call(void 0),Ee=o.useRef.call(void 0,""),Ae=o.useRef.call(void 0,!1),[Me,Ie]=o.useState.call(void 0,""),[Fe,Le]=o.useState.call(void 0,!1),[Pe,De]=o.useState.call(void 0,[]),[Be,Oe]=o.useState.call(void 0,{top:0,left:0,width:0,zIndex:70,side:"bottom"}),Ve=me,Ke=o.useMemo.call(void 0,()=>G&&"undefined"!=typeof document?_nullishCoalesce("string"==typeof X?document.querySelector(X):X,()=>Ve):null,[X,Ve,G]),$e=Ce?y:we,qe=o.useRef.call(void 0,{isControlled:Ce,currentValue:$e,defaultValue:C,multiple:R});qe.current={isControlled:Ce,currentValue:$e,defaultValue:C,multiple:R};const He=o.useMemo.call(void 0,()=>{const e=new Set(g.map(e=>v.encodeSelectValue.call(void 0,e.value)));return[...g,...Pe.filter(a=>!e.has(v.encodeSelectValue.call(void 0,a.value)))]},[Pe,g]),We=o.useMemo.call(void 0,()=>v.normalizeSelectKeys.call(void 0,$e),[$e]),Ue=o.useMemo.call(void 0,()=>new Set(We),[We]),Ge=o.useMemo.call(void 0,()=>He.filter(e=>Ue.has(v.encodeSelectValue.call(void 0,e.value))),[He,Ue]),Xe=o.useMemo.call(void 0,()=>{const e=Me.trim().toLocaleLowerCase();return!F&&M&&e?He.filter(a=>I?I(Me,a):a.label.toLocaleLowerCase().includes(e)):He},[He,I,M,Me,F]),Ye=o.useMemo.call(void 0,()=>{const e=Me.trim();if(!V||!M||!e)return;return He.some(a=>a.label.toLocaleLowerCase()===e.toLocaleLowerCase()||v.encodeSelectValue.call(void 0,a.value)===v.encodeSelectValue.call(void 0,e))?void 0:{label:e,value:e}},[V,He,M,Me]),Je=o.useMemo.call(void 0,()=>Ye?[Ye,...Xe]:Xe,[Ye,Xe]),Qe=o.useMemo.call(void 0,()=>D?[]:Je.flatMap((e,a)=>e.disabled||R&&E>0&&We.length>=E&&!Ue.has(v.encodeSelectValue.call(void 0,e.value))?[]:[a]),[D,R,E,Ue,We.length,Je]),Ze=Je.findIndex(e=>v.encodeSelectValue.call(void 0,e.value)===Se);function setActiveIndex(e){const a=Je[e];Re(a?v.encodeSelectValue.call(void 0,a.value):void 0)}const ea=[je?"open":void 0,ce?"disabled":void 0,ue?"invalid":void 0].filter(Boolean).join(" ")||"default";function setMenuOpen(e){ce&&e||je!==e&&(_e(e),_optionalChain([j,"optionalCall",a=>a(e)]),e&&(Ee.current=Me,setActiveIndex(function getInitialActiveIndex(){return _nullishCoalesce(Qe.find(e=>Ue.has(v.encodeSelectValue.call(void 0,Je[e].value))),()=>M&&Me&&!K?-1:_nullishCoalesce(Qe[0],()=>-1))}())))}function commitKeys(e,a=He){const l=a.filter(a=>e.includes(v.encodeSelectValue.call(void 0,a.value))),t=R?l.map(e=>e.value):_optionalChain([l,"access",e=>e[0],"optionalAccess",e=>e.value]);Ce||Ne(t),function syncNativeSelection(e){const a=pe.current;a&&(Array.from(a.options).forEach(a=>{a.selected=e.includes(_nullishCoalesce(a.dataset.ugKey,()=>""))}),_optionalChain([w,"optionalCall",e=>e({target:a,currentTarget:a})]))}(e),_optionalChain([N,"optionalCall",e=>e(t)])}function handleSelect(e){if(ce||D||e.disabled)return;const a=v.encodeSelectValue.call(void 0,e.value),l=!He.some(e=>v.encodeSelectValue.call(void 0,e.value)===a),t=l?[...He,e]:He;if(l&&De(a=>[...a,e]),R){const e=Ue.has(a);if(!e&&E>0&&We.length>=E)return;return commitKeys(e?We.filter(e=>e!==a):[...We,a],t),void(O||Ie(""))}commitKeys([a],t),setMenuOpen(!1),_optionalChain([he,"access",e=>e.current,"optionalAccess",e=>e.focus,"call",e=>e({preventScroll:!0})])}const aa=o.useCallback.call(void 0,()=>{if(!G||!he.current||!fe.current)return;const e=he.current.getBoundingClientRect(),a=Math.min(Math.max(0,e.width),Math.max(0,window.innerWidth-16)),l=fe.current.offsetHeight,t=h.resolveFloatingPosition.call(void 0,e,{width:a,height:l},{width:window.innerWidth,height:window.innerHeight},{side:"bottom",align:"start",offset:4,collisionPadding:8});Oe({top:t.top,left:t.left,width:a,zIndex:h.resolveFloatingZIndex.call(void 0,he.current),side:t.side})},[G]);function handleTriggerKeyDown(e){if(!ce&&!p.isControlComposing.call(void 0,e.nativeEvent,Ae.current)){if("ArrowDown"===e.key||"ArrowUp"===e.key){if(e.preventDefault(),!je)return void setMenuOpen(!0);const a="ArrowDown"===e.key?1:-1;return void setActiveIndex(p.getNextEnabledSelectIndex.call(void 0,Qe,Ze,a))}if("Home"===e.key||"End"===e.key)return e.preventDefault(),je||setMenuOpen(!0),void setActiveIndex(p.getNextEnabledSelectIndex.call(void 0,Qe,-1,"Home"===e.key?1:-1));if("Enter"===e.key||!M&&" "===e.key){if(e.preventDefault(),!je)return void setMenuOpen(!0);const a=Je[Ze];return void(a&&handleSelect(a))}if("Tab"===e.key&&je){setMenuOpen(!1),_optionalChain([he,"access",e=>e.current,"optionalAccess",e=>e.focus,"call",e=>e({preventScroll:!0})]);const a=_optionalChain([he,"access",e=>e.current,"optionalAccess",e=>e.closest,"call",e=>e('[role="dialog"][aria-modal="true"]')]);return void(h.trapTabKey.call(void 0,e,_nullishCoalesce(a,()=>null))&&e.stopPropagation())}if("Escape"===e.key&&je)return e.stopPropagation(),e.preventDefault(),setMenuOpen(!1),void _optionalChain([he,"access",e=>e.current,"optionalAccess",e=>e.focus,"call",e=>e({preventScroll:!0})]);if("Backspace"===e.key&&R&&""===Me&&We.length>0)return e.preventDefault(),void commitKeys(We.slice(0,-1));if(!(M||1!==e.key.length||e.altKey||e.ctrlKey||e.metaKey)){be.current+=e.key.toLocaleLowerCase(),xe.current&&clearTimeout(xe.current),xe.current=setTimeout(()=>{be.current="",xe.current=null},500);const a=Je.findIndex((e,a)=>Qe.includes(a)&&e.label.toLocaleLowerCase().startsWith(be.current));a>=0&&(setMenuOpen(!0),setActiveIndex(a))}}}o.useEffect.call(void 0,()=>{if(!je)return;function handlePointerDown(e){const a=e.target;_optionalChain([ve,"access",e=>e.current,"optionalAccess",e=>e.contains,"call",e=>e(a)])||_optionalChain([fe,"access",e=>e.current,"optionalAccess",e=>e.contains,"call",e=>e(a)])||setMenuOpen(!1)}document.addEventListener("pointerdown",handlePointerDown);const e=h.registerEscapeKeyHandler.call(void 0,e=>{p.isControlComposing.call(void 0,e,Ae.current)||(e.preventDefault(),setMenuOpen(!1),_optionalChain([he,"access",e=>e.current,"optionalAccess",e=>e.focus,"call",e=>e({preventScroll:!0})]))},()=>fe.current);return()=>{document.removeEventListener("pointerdown",handlePointerDown),e()}},[je]),m(()=>{je&&G&&Ke&&aa()},[je,Ke,G,aa,Je]),useFloatingLayoutObserver(je&&G&&Boolean(Ke),aa,he,fe),o.useEffect.call(void 0,()=>{if(F&&L&&!Fe)return ye.current&&clearTimeout(ye.current),ye.current=setTimeout(()=>{Promise.resolve(L(Me)).catch(()=>{}),ye.current=null},Math.max(0,P)),()=>{ye.current&&clearTimeout(ye.current)}},[Me,Fe,F,P,L]),o.useEffect.call(void 0,()=>{if(!je)return;const e=Ee.current!==Me;Ee.current=Me,Re(a=>{const l=Je.findIndex(e=>v.encodeSelectValue.call(void 0,e.value)===a);if(!e&&Qe.includes(l))return a;const t=e&&M?K?_nullishCoalesce(Qe[0],()=>-1):-1:_nullishCoalesce(Qe.find(e=>Ue.has(v.encodeSelectValue.call(void 0,Je[e].value))),()=>M&&Me&&!K?-1:_nullishCoalesce(Qe[0],()=>-1)),o=Je[t];return o?v.encodeSelectValue.call(void 0,o.value):void 0})},[K,Qe,M,je,Me,Ue,Je]),o.useEffect.call(void 0,()=>{ce&&je&&setMenuOpen(!1)},[ce,je]),o.useEffect.call(void 0,()=>{if(!je||Ze<0||"undefined"==typeof document)return;const e=document.getElementById(`${re}-option-${Ze}`);h.revealFloatingItem.call(void 0,fe.current,e)},[Ze,re,je,Je]),o.useEffect.call(void 0,()=>{const e=_optionalChain([pe,"access",e=>e.current,"optionalAccess",e=>e.form]);if(!e)return;const a=new Set;function handleReset(e){const l=setTimeout(()=>{if(a.delete(l),e.defaultPrevented)return;const t=qe.current,o=t.isControlled?t.currentValue:_nullishCoalesce(t.defaultValue,()=>t.multiple?[]:void 0);t.isControlled||(Ne(o),De([])),_e(!1),Ie("");const i=v.normalizeSelectKeys.call(void 0,o);if(pe.current)for(const e of pe.current.options)e.selected=i.includes(_nullishCoalesce(e.dataset.ugKey,()=>""))||!t.multiple&&0===i.length&&""===e.value},0);a.add(l)}return e.addEventListener("reset",handleReset),()=>{e.removeEventListener("reset",handleReset),a.forEach(e=>clearTimeout(e))}},[le.form]),o.useEffect.call(void 0,()=>()=>{xe.current&&clearTimeout(xe.current),ye.current&&clearTimeout(ye.current)},[]),o.useEffect.call(void 0,()=>{je||ke||R&&O||Ie("")},[ke,R,je,O]);const la=Ge.length>0,ta=Math.max(1,Math.trunc(q)||1),oa=R&&$?Ge.slice(0,ta):Ge,ia=Ge.length-oa.length,na=Ge.slice(ta).map(e=>e.label).join("、"),ra=R?oa.map(e=>e.label).join("、"):_optionalChain([Ge,"access",e=>e[0],"optionalAccess",e=>e.label]),sa=ke?s.jsx.call(void 0,"div",{ref:fe,id:re,role:"listbox","aria-multiselectable":R||void 0,"aria-hidden":"closed"===Te||void 0,inert:"closed"===Te||void 0,className:t.cn.call(void 0,"z-[70] max-h-[calc(var(--control-height-md)*7)] overflow-auto rounded-[var(--radius-panel)] border border-border-strong bg-[var(--ug-overlay-surface)] p-[calc(var(--content-gap)*0.25)] shadow-lg",G?"fixed":"absolute left-0 right-0 top-full mt-[calc(var(--content-gap)*0.25)]"),style:G?{top:Be.top,left:Be.left,width:Be.width,zIndex:Be.zIndex}:void 0,...ge,"data-ug":"select","data-ug-slot":"content","data-state":Te,"data-side":Be.side,"data-variant":R?"multiple":"single","data-size":de,onAnimationEnd:ze,onBlurCapture:e=>{const a=e.relatedTarget;_optionalChain([ve,"access",e=>e.current,"optionalAccess",e=>e.contains,"call",e=>e(a)])||e.currentTarget.contains(a)||setMenuOpen(!1)},children:D?s.jsx.call(void 0,"div",{className:"px-[var(--control-padding-x-sm)] py-[var(--content-gap)] text-center text-sm text-text-tertiary","data-ug-slot":"loading",children:B}):0===Je.length?s.jsx.call(void 0,"div",{className:"px-[var(--control-padding-x-sm)] py-[var(--content-gap)] text-center text-sm text-text-tertiary","data-ug-slot":"empty",children:0===He.length?W:U}):Je.map((e,a)=>{const l=v.encodeSelectValue.call(void 0,e.value),o=Ue.has(l),n=_optionalChain([Je,"access",e=>e[a-1],"optionalAccess",e=>e.group]),r=R&&!o&&E>0&&We.length>=E;return s.jsxs.call(void 0,"div",{children:[e.group&&e.group!==n?s.jsx.call(void 0,"div",{className:"px-[var(--control-padding-x-sm)] py-[calc(var(--content-gap)*0.375)] text-xs font-medium text-text-tertiary","data-ug-slot":"group",children:e.group}):null,s.jsxs.call(void 0,"button",{id:`${re}-option-${a}`,type:"button",role:"option",tabIndex:-1,disabled:e.disabled||r,"aria-disabled":e.disabled||r||void 0,"aria-selected":o,"data-ug-slot":"item","data-active":Ze===a,"data-state":e.disabled||r?"disabled":o?"selected":"default",className:t.cn.call(void 0,"flex w-full items-center gap-2 rounded-[var(--radius-control)] px-[var(--control-padding-x-sm)] py-[calc(var(--content-gap)*0.5)] text-left text-sm text-text-primary",o?"bg-primary-soft text-primary-soft-fg":"hover:bg-[var(--ug-overlay-surface-hover)]",Ze===a&&!o&&"bg-[var(--ug-overlay-surface-hover)]",(e.disabled||r)&&"cursor-not-allowed opacity-50 hover:bg-transparent"),onClick:()=>handleSelect(e),onPointerEnter:()=>!e.disabled&&!r&&setActiveIndex(a),children:[s.jsx.call(void 0,"span",{className:"min-w-0 flex-1 truncate",children:e.label}),o?s.jsx.call(void 0,i.Check,{"aria-hidden":"true",className:"size-4 shrink-0","data-ug-slot":"check"}):null]})]},l)})}):null;return s.jsxs.call(void 0,"div",{ref:ve,className:"relative flex min-w-0 flex-col gap-1.5","data-ug":"select","data-state":ea,"data-variant":R?"multiple":"single","data-size":de,"data-filterable":M,onBlurCapture:e=>{const a=e.relatedTarget;e.currentTarget.contains(a)||_optionalChain([fe,"access",e=>e.current,"optionalAccess",e=>e.contains,"call",e=>e(a)])||setMenuOpen(!1)},children:[r?s.jsx.call(void 0,"label",{id:ne,htmlFor:ie,className:"min-w-0 text-sm font-medium text-text-primary [overflow-wrap:anywhere]","data-ug-slot":"label",children:r}):null,s.jsxs.call(void 0,"select",{ref:function setSelectRef(e){pe.current=e,"function"==typeof l?l(e):l&&(l.current=e)},id:`${ie}-native`,name:z,value:R?Ge.map(e=>String(e.value)):Ge[0]?String(Ge[0].value):"",multiple:R,required:S,disabled:ce,tabIndex:-1,"aria-hidden":"true",className:"sr-only","data-ug-slot":"native",onChange:e=>_optionalChain([w,"optionalCall",a=>a(e)]),...le,children:[R?null:s.jsx.call(void 0,"option",{value:"",children:b}),He.map(e=>s.jsx.call(void 0,"option",{"data-ug-key":v.encodeSelectValue.call(void 0,e.value),value:String(e.value),disabled:e.disabled,children:e.label},v.encodeSelectValue.call(void 0,e.value)))]}),s.jsxs.call(void 0,"div",{className:"relative min-w-0","data-ug-slot":"control","data-has-value":la,"data-clearable":A&&la&&!ce&&!D,children:[M?s.jsx.call(void 0,"input",{ref:he,type:"text",id:ie,disabled:ce,"aria-label":Y,"aria-labelledby":_nullishCoalesce(J,()=>!Y&&r?ne:void 0),"aria-describedby":_nullishCoalesce(Q,()=>c||d?se:void 0),"aria-invalid":_nullishCoalesce(Z,()=>!!c||void 0),role:"combobox","aria-autocomplete":"list","aria-haspopup":"listbox","aria-expanded":je,"aria-controls":re,"aria-required":S||void 0,"aria-activedescendant":je&&Ze>=0?`${re}-option-${Ze}`:void 0,value:je?Me:_nullishCoalesce(ra,()=>""),placeholder:je&&ra||b,className:t.cn.call(void 0,"block w-full min-w-0 text-left",f[de],n),onClick:()=>setMenuOpen(!0),onChange:e=>{Ie(e.target.value),setMenuOpen(!0)},onCompositionEnd:e=>{Ae.current=!1,Le(!1),Ie(e.currentTarget.value)},onCompositionStart:()=>{Ae.current=!0,Le(!0)},onBlur:ee,onFocus:ae,onKeyDown:handleTriggerKeyDown,"data-ug-slot":"trigger","data-state":ea,"data-variant":R?"multiple":"single","data-size":de}):s.jsxs.call(void 0,"button",{ref:he,type:"button",id:ie,disabled:ce,"aria-label":Y,"aria-labelledby":_nullishCoalesce(J,()=>!Y&&r?ne:void 0),"aria-describedby":_nullishCoalesce(Q,()=>c||d?se:void 0),"aria-invalid":_nullishCoalesce(Z,()=>!!c||void 0),role:"combobox","aria-haspopup":"listbox","aria-expanded":je,"aria-controls":re,"aria-required":S||void 0,"aria-activedescendant":je&&Ze>=0?`${re}-option-${Ze}`:void 0,className:t.cn.call(void 0,"flex w-full min-w-0 items-center gap-2 py-0 text-left",f[de],n),onClick:()=>setMenuOpen(!je),onBlur:ee,onFocus:ae,onKeyDown:handleTriggerKeyDown,"data-ug-slot":"trigger","data-state":ea,"data-variant":R?"multiple":"single","data-size":de,children:[s.jsx.call(void 0,"span",{className:"min-w-0 flex-1 truncate","data-ug-slot":"value",children:ra||b}),R&&$&&ia>0?s.jsxs.call(void 0,"span",{className:"shrink-0 text-xs text-text-secondary","data-ug-slot":"count",title:H?na:void 0,children:["+",ia]}):null]}),s.jsx.call(void 0,"span",{"aria-hidden":"true","data-ug-slot":"indicator",children:D?s.jsx.call(void 0,i.LoaderCircle,{className:"size-4 animate-spin text-text-tertiary motion-reduce:animate-none","data-ug-slot":"loading"}):s.jsx.call(void 0,i.ChevronDown,{className:t.cn.call(void 0,"size-4 text-text-tertiary transition-transform duration-[var(--motion-duration-state)] ease-[var(--motion-easing-state)] motion-reduce:transition-none",je&&"rotate-180"),"data-ug-slot":"icon"})}),A&&la&&!ce&&!D?s.jsx.call(void 0,"button",{type:"button","aria-label":"清空选择",className:"absolute right-[var(--control-padding-x-sm)] top-1/2 inline-flex size-6 -translate-y-1/2 items-center justify-center rounded-[var(--radius-control)] text-text-tertiary hover:bg-surface-2 hover:text-text-primary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/30",onClick:function clearSelection(e){_optionalChain([e,"optionalAccess",e=>e.stopPropagation,"call",e=>e()]),ce||0===We.length||(commitKeys([]),_optionalChain([_,"optionalCall",e=>e()]),Ie(""),_optionalChain([he,"access",e=>e.current,"optionalAccess",e=>e.focus,"call",e=>e({preventScroll:!0})]))},"data-ug-slot":"clear",children:s.jsx.call(void 0,i.X,{"aria-hidden":"true",className:"size-3.5"})}):null]}),G&&Ke&&sa?u.createPortal.call(void 0,sa,Ke):sa,c?s.jsx.call(void 0,"p",{id:se,className:"min-w-0 text-xs text-danger [overflow-wrap:anywhere]","data-ug-slot":"message",children:c}):null,!c&&d?s.jsx.call(void 0,"p",{id:se,className:"min-w-0 text-xs text-text-secondary [overflow-wrap:anywhere]","data-ug-slot":"message",children:d}):null]})});function useEscapeKey(e,a,l=e,t){const i=o.useRef.call(void 0,a);i.current=a,o.useEffect.call(void 0,()=>{if(!l||"undefined"==typeof document)return;const e=h.acquireBodyScrollLock.call(void 0);return()=>{e()}},[l]),o.useEffect.call(void 0,()=>{if(e&&"undefined"!=typeof document)return h.registerEscapeKeyHandler.call(void 0,e=>{e.isComposing||i.current()},t?()=>t.current:void 0)},[e,t])}g.displayName="Select";var b=o.createContext.call(void 0,null);function useOverlayFocus(e,a,l){const t=o.useRef.call(void 0,null),i=o.useContext.call(void 0,b);return o.useEffect.call(void 0,()=>{if(!e||"undefined"==typeof document)return;t.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const o=a.current;_optionalChain([o,"optionalAccess",e=>e.closest,"call",e=>e('[inert], [aria-hidden="true"]')])||h.focusFirstElement.call(void 0,o,l);const n=h.acquireModalBackgroundIsolation.call(void 0,o,()=>_nullishCoalesce(_optionalChain([i,"optionalAccess",e=>e.current]),()=>null));_optionalChain([o,"optionalAccess",e=>e.closest,"call",e=>e('[inert], [aria-hidden="true"]')])||_optionalChain([o,"optionalAccess",e=>e.contains,"call",e=>e(document.activeElement)])||h.focusFirstElement.call(void 0,o,l);const r=h.observeInitialFocusTarget.call(void 0,o,l);return()=>{r(),n(),h.restoreModalFocus.call(void 0,t.current),t.current=null}},[a,l,e,i]),o.useCallback.call(void 0,e=>{e.defaultPrevented||h.trapTabKey.call(void 0,e,a.current)},[a])}var x=o.createContext.call(void 0,null);function useModalContext(){const e=o.useContext.call(void 0,x);if(!e)throw new Error("Modal 子组件必须在 <Modal> 内使用");return e}var y=o.forwardRef.call(void 0,({open:a,onClose:l,children:i,className:n,ariaLabel:r="对话框",size:c="md",width:d,placement:v="center",topOffset:p="6vh",closeOnOverlay:h=!0,closeOnEsc:f=!0,initialFocusSelector:m},g)=>{const{present:y,state:C,handleAnimationEnd:w}=usePresence(a),N=o.useRef.call(void 0,null);useEscapeKey(a,()=>{f&&l()},y,N);const j=usePortalContainer(),_=`ug-modal-title-${o.useId.call(void 0).replace(/:/g,"")}`,k=useOverlayFocus(y&&Boolean(j),N,m),T=e.useUGThemePortalAttributes.call(void 0);return y&&j?u.createPortal.call(void 0,s.jsx.call(void 0,b.Provider,{value:N,children:s.jsx.call(void 0,x.Provider,{value:{onClose:l,titleId:_,size:c,width:d},children:s.jsxs.call(void 0,"div",{ref:e=>{N.current=e,"function"==typeof g?g(e):g&&(g.current=e)},...T,className:t.cn.call(void 0,"fixed inset-0 z-[80] flex justify-center p-[var(--content-gap)]","top"===v?"items-start":"items-center",n),role:"dialog",style:"top"===v?{paddingBlockStart:p}:void 0,"aria-modal":"true","aria-label":r,"aria-labelledby":_,tabIndex:-1,onKeyDown:k,onAnimationEnd:w,"data-ug":"modal","data-state":C,"data-variant":"default","data-size":c,children:[s.jsx.call(void 0,"div",{className:"absolute inset-0 bg-overlay",onClick:h?l:void 0,"aria-hidden":"true","data-ug-slot":"overlay"}),s.jsx.call(void 0,"div",{className:"relative z-10 flex w-full max-w-full justify-center",children:i})]})})}),j):null}),C=o.forwardRef.call(void 0,({className:e,maxWidth:a,children:l,style:o,...i},n)=>{const{size:r,width:c}=useModalContext();return s.jsx.call(void 0,"div",{ref:n,...i,style:{maxInlineSize:c,...o},className:t.cn.call(void 0,"flex max-h-[85vh] w-full flex-col rounded-[var(--radius-overlay)] border-[length:var(--ug-modal-border-width)] border-border-base bg-[var(--ug-overlay-surface)] p-[var(--ug-modal-padding)] shadow-xl",a,e),"data-ug-slot":"content","data-size":r,children:l})}),w=o.forwardRef.call(void 0,({className:e,...a},l)=>s.jsx.call(void 0,"div",{ref:l,...a,className:t.cn.call(void 0,"flex shrink-0 items-center justify-between border-b-[length:var(--ug-modal-divider-width)] border-border-base p-[var(--ug-modal-section-padding)] pb-[var(--ug-modal-header-gap)]",e),"data-ug-slot":"header"})),N=o.forwardRef.call(void 0,({className:e,...a},l)=>s.jsx.call(void 0,"div",{ref:l,...a,className:t.cn.call(void 0,"min-h-[0] flex-1 overflow-y-auto p-[var(--ug-modal-section-padding)]",e),"data-ug-slot":"body"})),j=o.forwardRef.call(void 0,({className:e,...a},l)=>{const{titleId:o}=useModalContext();return s.jsx.call(void 0,"h2",{ref:l,...a,id:o,className:t.cn.call(void 0,"m-0 text-lg font-[var(--ug-modal-title-weight)] leading-[var(--ug-modal-title-line-height)] text-text-primary",e),"data-ug-slot":"title"})}),_=o.forwardRef.call(void 0,({className:e,...a},l)=>s.jsx.call(void 0,"div",{ref:l,...a,className:t.cn.call(void 0,"flex shrink-0 items-center justify-end gap-2 border-t-[length:var(--ug-modal-divider-width)] border-border-base p-[var(--ug-modal-section-padding)] pt-[var(--ug-modal-footer-gap)]",e),"data-ug-slot":"footer"})),k=o.forwardRef.call(void 0,({onClick:e,className:a,type:l="button",...o},n)=>{const{onClose:r}=useModalContext();return s.jsx.call(void 0,"button",{ref:n,type:l,onClick:a=>{_optionalChain([e,"optionalCall",e=>e(a)]),a.defaultPrevented||r()},className:t.cn.call(void 0,"inline-flex h-[var(--control-height-md)] w-[var(--control-height-md)] shrink-0 items-center justify-center rounded-[var(--radius-control)] border-0 bg-transparent text-text-tertiary hover:bg-surface-3 hover:text-text-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/30",a),"aria-label":"关闭","data-ug-slot":"close","data-size":"md",...o,children:s.jsx.call(void 0,i.X,{"aria-hidden":"true",focusable:"false",size:18})})});y.displayName="Modal",C.displayName="ModalContent",w.displayName="ModalHeader",N.displayName="ModalBody",j.displayName="ModalTitle",_.displayName="ModalFooter",k.displayName="ModalCloseButton";var T={sm:"gap-[calc(var(--content-gap)*0.75)] p-[calc(var(--content-gap)*0.875)]",md:"gap-[var(--content-gap)] p-[calc(var(--content-gap)*1.25)]",lg:"gap-[calc(var(--content-gap)*1.25)] p-[calc(var(--content-gap)*1.5)]"},z=o.forwardRef.call(void 0,({className:e,children:a,disabled:l,size:o="md",variant:i="plain",...n},r)=>s.jsx.call(void 0,"fieldset",{ref:r,className:t.cn.call(void 0,"m-0 grid min-w-0 border-0 text-text-primary","card"===i&&"border border-border-base bg-surface-1 [border-radius:var(--radius-panel)]","card"===i?T[o]:"gap-[var(--content-gap)] p-0",l&&"opacity-60",e),disabled:l,"data-ug":"fieldset","data-state":l?"disabled":"default","data-size":o,"data-variant":i,...n,children:a}));z.displayName="Fieldset";var S=o.forwardRef.call(void 0,({className:e,children:a,...l},o)=>s.jsx.call(void 0,"legend",{ref:o,className:t.cn.call(void 0,"max-w-full [padding-inline:0] text-sm font-medium leading-5 text-text-primary [overflow-wrap:anywhere]",e),"data-ug-slot":"legend",...l,children:a}));S.displayName="FieldsetLegend";var R=o.forwardRef.call(void 0,({className:e,children:a,...l},o)=>s.jsx.call(void 0,"p",{ref:o,className:t.cn.call(void 0,"m-0 text-xs leading-5 text-text-secondary [overflow-wrap:anywhere]",e),"data-ug-slot":"description",...l,children:a}));R.displayName="FieldsetDescription";var E={sm:20,md:28,lg:32},A=o.forwardRef.call(void 0,({icon:e,title:a,description:l,action:i,size:n="md",className:r,role:c="status","aria-label":d,"aria-labelledby":u,"aria-describedby":v,...p},h)=>{const f=o.useId.call(void 0),m=`${f}-title`,g=`${f}-description`;return s.jsxs.call(void 0,"div",{ref:h,...p,className:t.cn.call(void 0,"flex min-w-0 flex-col items-center justify-center text-center",r),role:c,"aria-label":d,"aria-labelledby":_nullishCoalesce(u,()=>d?void 0:m),"aria-describedby":_nullishCoalesce(v,()=>l?g:void 0),"data-ug":"empty-state","data-state":"default","data-variant":"default","data-size":n,children:[e&&s.jsx.call(void 0,"div",{className:"flex items-center justify-center bg-surface-2 [border-radius:calc(var(--radius-overlay)*999)]","data-ug-slot":"icon",children:s.jsx.call(void 0,e,{size:E[n],className:"text-text-tertiary","aria-hidden":"true"})}),s.jsxs.call(void 0,"div",{className:"flex min-w-0 max-w-full flex-col gap-1","data-ug-slot":"content",children:[s.jsx.call(void 0,"p",{id:m,className:"font-semibold text-text-primary [overflow-wrap:anywhere]","data-ug-slot":"title",children:a}),l&&s.jsx.call(void 0,"p",{id:g,className:"text-text-secondary [overflow-wrap:anywhere]","data-ug-slot":"description",children:l})]}),i&&s.jsx.call(void 0,"div",{className:"mt-1","data-ug-slot":"action",children:i})]})});A.displayName="EmptyState";var M=o.forwardRef.call(void 0,({className:e,scrollRegionLabel:a="数据表格滚动区域",scrollRegionTabIndex:l=0,size:o="md",bordered:i=!1,striped:n=!1,hoverable:r=!0,...c},d)=>{const u=["default",i?"bordered":void 0,n?"striped":void 0,r?"hoverable":void 0].filter(Boolean).join(" ")||"default";return s.jsx.call(void 0,"div",{className:"w-full overflow-auto",role:"region","aria-label":a,tabIndex:l,"data-ug":"table","data-state":u,"data-variant":i?"bordered":"default","data-size":o,children:s.jsx.call(void 0,"table",{ref:d,className:t.cn.call(void 0,"w-full caption-bottom",e),"data-ug-slot":"table",...c})})}),I=o.forwardRef.call(void 0,({className:e,...a},l)=>s.jsx.call(void 0,"thead",{ref:l,className:e,"data-ug-slot":"header",...a})),F=o.forwardRef.call(void 0,({className:e,...a},l)=>s.jsx.call(void 0,"tbody",{ref:l,className:e,"data-ug-slot":"body",...a})),L=o.forwardRef.call(void 0,({className:e,...a},l)=>s.jsx.call(void 0,"tr",{ref:l,className:t.cn.call(void 0,e),"data-ug-slot":"row","data-state":"default",...a})),P=o.forwardRef.call(void 0,({className:e,...a},l)=>s.jsx.call(void 0,"th",{ref:l,className:t.cn.call(void 0,"text-left align-middle font-medium",e),"data-ug-slot":"head",...a})),D=o.forwardRef.call(void 0,({className:e,...a},l)=>s.jsx.call(void 0,"td",{ref:l,className:t.cn.call(void 0,"align-middle text-text-primary",e),"data-ug-slot":"cell",...a}));M.displayName="Table",I.displayName="TableHeader",F.displayName="TableBody",L.displayName="TableRow",P.displayName="TableHead",D.displayName="TableCell";var B=require("@ug666/ui-web/sidebar"),O=o.createContext.call(void 0,null),V="undefined"==typeof window?o.useEffect:o.useLayoutEffect;function assignRef(e,a){"function"!=typeof e?e&&(e.current=a):e(a)}function useTooltipContext(){const e=o.useContext.call(void 0,O);if(!e)throw new Error("Tooltip 子组件必须在 <Tooltip> 内使用");return e}var K=o.forwardRef.call(void 0,({children:e,delayDuration:a=200,className:l},i)=>{const[n,r]=o.useState.call(void 0,!1),c=o.useRef.call(void 0,null),d=o.useRef.call(void 0,null),u=`ug-tooltip-${o.useId.call(void 0).replace(/:/g,"")}`,v=Number.isFinite(a)?Math.max(0,Math.round(a)):200;return o.useEffect.call(void 0,()=>()=>{d.current&&clearTimeout(d.current)},[]),s.jsx.call(void 0,O.Provider,{value:{open:n,setOpen:r,triggerRef:c,delayRef:d,delayDuration:v,contentId:u},children:s.jsx.call(void 0,"span",{ref:i,className:t.cn.call(void 0,"relative inline-flex",l),"data-ug":"tooltip","data-state":n?"open":"default","data-variant":"default","data-size":"md",children:e})})}),$=o.forwardRef.call(void 0,({children:e,className:a},l)=>{const{open:i,setOpen:n,triggerRef:r,delayRef:c,delayDuration:d,contentId:u}=useTooltipContext(),v=o.useCallback.call(void 0,e=>{r.current=e,assignRef(l,e)},[l,r]);return o.useEffect.call(void 0,()=>{if(i)return h.bindOwnedDescriptionToken.call(void 0,r.current,u)},[u,i,r]),s.jsx.call(void 0,"span",{ref:v,className:t.cn.call(void 0,"inline-flex",a),onMouseEnter:function handleMouseEnter(){c.current&&clearTimeout(c.current),0!==d?c.current=setTimeout(()=>n(!0),d):n(!0)},onMouseLeave:function handleMouseLeave(){c.current&&clearTimeout(c.current),_optionalChain([r,"access",e=>e.current,"optionalAccess",e=>e.contains,"call",e=>e(document.activeElement)])||n(!1)},onFocus:()=>n(!0),onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||n(!1)},onKeyDown:e=>{"Escape"===e.key&&i&&(e.preventDefault(),n(!1))},"data-ug-slot":"trigger","data-state":i?"open":"default",children:e})}),q={top:"after:absolute after:top-full after:left-1/2 after:-translate-x-1/2 after:border-4 after:border-transparent after:border-t-text-primary",bottom:"after:absolute after:bottom-full after:left-1/2 after:-translate-x-1/2 after:border-4 after:border-transparent after:border-b-text-primary",left:"after:absolute after:left-full after:top-1/2 after:-translate-y-1/2 after:border-4 after:border-transparent after:border-l-text-primary",right:"after:absolute after:right-full after:top-1/2 after:-translate-y-1/2 after:border-4 after:border-transparent after:border-r-text-primary"},H=o.forwardRef.call(void 0,({children:a,side:l="top",className:i,style:n,...r},c)=>{const{open:d,triggerRef:v,contentId:p}=useTooltipContext(),f="sidebar"===r["data-ug-context"],m=o.useRef.call(void 0,null),g=usePortalContainer(),b=e.useUGThemePortalAttributes.call(void 0),{present:x,state:y,handleAnimationEnd:C}=usePresence(d),[w,N]=o.useState.call(void 0,{top:0,left:0,side:l,zIndex:50}),j=o.useCallback.call(void 0,e=>{m.current=e,assignRef(c,e)},[c]),_=o.useCallback.call(void 0,()=>{if(!v.current||!m.current)return;const e=v.current.getBoundingClientRect(),a=h.resolveFloatingPosition.call(void 0,e,{width:m.current.offsetWidth,height:m.current.offsetHeight},{width:window.innerWidth,height:window.innerHeight},{side:l,align:"center",offset:f?B.SIDEBAR_OVERLAY_OFFSET:8});N({...a,zIndex:h.resolveFloatingZIndex.call(void 0,v.current,50)})},[f,l,v]);return V(()=>{d&&_()},[d,_]),useFloatingLayoutObserver(d,_,v,m),x&&g?u.createPortal.call(void 0,s.jsxs.call(void 0,"div",{ref:j,id:p,role:"tooltip",...b,...r,style:{...n,top:w.top,left:w.left,zIndex:_nullishCoalesce(_optionalChain([n,"optionalAccess",e=>e.zIndex]),()=>w.zIndex)},className:t.cn.call(void 0,"fixed z-50 max-w-[min(20rem,calc(100vw-1rem))] [overflow-wrap:anywhere]",f?null:"rounded-[var(--radius-control)] bg-text-primary px-[var(--control-padding-x-sm)] py-[calc(var(--content-gap)*0.375)] text-xs text-surface-1 shadow-md",!f&&q[w.side],i),"aria-hidden":"closed"===y||void 0,inert:"closed"===y||void 0,"data-ug":"tooltip","data-ug-slot":"content","data-state":y,"data-side":w.side,"data-variant":"default","data-size":"md",onAnimationEnd:C,children:[f?s.jsx.call(void 0,"span",{"aria-hidden":"true","data-ug-slot":"arrow"}):null,a]}),g):null});function SidebarNavList({items:e,depth:a=0,parentKey:l="root",listId:n,renderChildren:r=!0,...c}){const[d,u]=o.useState.call(void 0,r);return r&&!d&&u(!0),s.jsx.call(void 0,"ul",{id:n,"data-depth":a,"data-ug-slot":"list",children:(d||r)&&e.map((e,o)=>{const n=B.getSidebarItemKey.call(void 0,e,o,l),r=Boolean(_optionalChain([e,"access",e=>e.children,"optionalAccess",e=>e.length])),d=`${c.instanceId}-list-${encodeURIComponent(n)}`,u=Boolean(e.active),v=c.activeBranches.has(e),p=r&&(c.normalizedQuery.length>0||_nullishCoalesce(c.expandedOverrides.get(n),()=>u||v)),h=!c.collapsed&&p,f=c.collapsed?c.collapsedFlyoutKey===n:p,m=s.jsxs.call(void 0,s.Fragment,{children:[s.jsx.call(void 0,"span",{className:t.cn.call(void 0,"flex shrink-0 items-center justify-center [height:var(--control-height-sm)] [width:var(--control-height-sm)] [border-radius:var(--radius-control)]",c.styles.icon),"data-ug-slot":"icon",children:s.jsx.call(void 0,e.icon,{"aria-hidden":"true",size:16})}),s.jsx.call(void 0,"span",{"aria-hidden":c.collapsed,className:"min-w-0 flex-1 truncate text-left","data-state":c.collapsed?"hidden":"visible","data-ug-slot":"label",children:e.label}),void 0!==e.badge?s.jsx.call(void 0,"span",{"aria-hidden":c.collapsed,className:t.cn.call(void 0,"shrink-0 rounded-full px-[calc(var(--control-padding-x-sm)*0.75)] py-0.5 text-xs font-semibold leading-none",c.styles.badge),"data-state":c.collapsed?"hidden":"visible","data-ug-slot":"badge",children:e.badge}):null]}),g=r?c.collapsed?s.jsx.call(void 0,i.ChevronRight,{"aria-hidden":"true",className:t.cn.call(void 0,"shrink-0",c.styles.chevron),"data-state":f?"open":"closed","data-ug-slot":"collapsed-chevron",size:11}):s.jsx.call(void 0,i.ChevronDown,{"aria-hidden":"true",className:t.cn.call(void 0,"shrink-0 transition-transform duration-[var(--motion-duration-state)] ease-[var(--motion-easing-state)] motion-reduce:transition-none",c.styles.chevron,p&&"rotate-180"),"data-state":"visible","data-ug-slot":"chevron",size:15}):null,b=t.cn.call(void 0,"group relative flex w-full min-w-0 items-center gap-[calc(var(--control-padding-x-sm)*0.5)] overflow-hidden px-[var(--control-padding-x-sm)] text-sm font-normal no-underline outline-none [border-radius:var(--radius-control)] focus-visible:ring-2",c.styles.focusRing,"compact"===c.density?"min-h-[var(--control-height-sm)] py-0":"min-h-[var(--control-height-md)] py-[calc(var(--control-height-sm)*0.125)]",u?t.cn.call(void 0,c.styles.active,"indicator"===c.activeStyle?c.styles.activeIndicator:c.styles.activeHighlight):v?c.styles.branchActive:c.styles.inactive),x=s.jsx.call(void 0,"a",{"aria-current":e.active?"page":void 0,"aria-label":c.collapsed?e.label:void 0,className:b,href:_nullishCoalesce(e.href,()=>"#"),onClick:c.onNavigate,onFocus:a=>B.syncSidebarOverflowTitle.call(void 0,a.currentTarget,e.label,c.collapsed),onMouseEnter:a=>B.syncSidebarOverflowTitle.call(void 0,a.currentTarget,e.label,c.collapsed),children:m});return s.jsxs.call(void 0,"li",{"data-depth":a,"data-state":u?"active":v?"contains-active":"default","data-ug-slot":"item",children:[r?s.jsxs.call(void 0,"button",{"aria-controls":c.collapsed?`${c.instanceId}-flyout`:d,"aria-expanded":f,"aria-haspopup":c.collapsed?"menu":void 0,"aria-label":`${f?"收起":"展开"}${e.label}${c.collapsed||void 0===e.badge?"":` ${e.badge}`}菜单`,className:t.cn.call(void 0,"m-0 w-full cursor-pointer appearance-none border-0 bg-transparent p-0 text-left",b),onClick:a=>{if(c.collapsed)return c.onOpenCollapsedFlyout(e,n,a.currentTarget),void(0===a.detail&&c.onFocusFlyoutItem("first"));c.onToggle(n,p)},onFocus:a=>{B.syncSidebarOverflowTitle.call(void 0,a.currentTarget,e.label,c.collapsed),c.onOpenCollapsedFlyout(e,n,a.currentTarget)},onKeyDown:a=>{if("Escape"===a.key&&c.collapsedFlyoutKey)return a.preventDefault(),a.stopPropagation(),void c.onCloseFlyout();!c.collapsed||"ArrowRight"!==a.key&&"ArrowDown"!==a.key||(a.preventDefault(),c.onOpenCollapsedFlyout(e,n,a.currentTarget),c.onFocusFlyoutItem("first"))},onMouseEnter:a=>{B.syncSidebarOverflowTitle.call(void 0,a.currentTarget,e.label,c.collapsed),c.onOpenCollapsedFlyout(e,n,a.currentTarget,"hover")},onMouseLeave:c.onScheduleFlyoutClose,type:"button",children:[m,g]}):c.collapsed?s.jsxs.call(void 0,K,{className:"flex",delayDuration:0,children:[s.jsx.call(void 0,$,{className:"flex",children:x}),s.jsx.call(void 0,H,{"data-custom-colors":c.customColors?"true":"false","data-navigation-variant":c.variant,"data-ug-context":"sidebar",side:"right",style:c.navigationColorStyle,children:e.label})]}):x,r&&e.children?s.jsx.call(void 0,"div",{"aria-hidden":!h,"data-state":h?"open":"closed","data-ug-slot":"submenu",inert:!h||void 0,children:s.jsx.call(void 0,"div",{"data-ug-slot":"submenu-clip",children:s.jsx.call(void 0,SidebarNavList,{...c,depth:a+1,items:e.children,listId:d,parentKey:n,renderChildren:h})})}):null]},n)})})}function SidebarCollapsedFlyoutItems({items:e,parentKey:a,depth:l=0,groupLabel:o,...i}){return s.jsx.call(void 0,"ul",{"aria-label":o,"data-depth":l,"data-ug-slot":0===l?"flyout-list":"flyout-group",role:0===l?"none":"group",children:e.map((e,o)=>{const n=B.getSidebarItemKey.call(void 0,e,o,a),r=Boolean(_optionalChain([e,"access",e=>e.children,"optionalAccess",e=>e.length])),c=Boolean(e.active),d=i.activeBranches.has(e),u=s.jsxs.call(void 0,s.Fragment,{children:[s.jsx.call(void 0,"span",{className:t.cn.call(void 0,"flex shrink-0 items-center justify-center [height:var(--control-height-sm)] [width:var(--control-height-sm)] [border-radius:var(--radius-control)]",i.styles.icon),"data-ug-slot":"icon",children:s.jsx.call(void 0,e.icon,{"aria-hidden":"true",size:16})}),s.jsx.call(void 0,"span",{className:"min-w-0 flex-1 truncate",children:e.label}),void 0!==e.badge?s.jsx.call(void 0,"span",{className:t.cn.call(void 0,"shrink-0 rounded-full px-[calc(var(--control-padding-x-sm)*0.75)] py-0.5 text-xs font-semibold leading-none",i.styles.badge),children:e.badge}):null]});return r&&e.children?s.jsxs.call(void 0,"li",{role:"none",children:[s.jsx.call(void 0,"div",{"data-depth":l,"data-state":d?"contains-active":"default","data-ug-slot":"flyout-group-label",role:"presentation",children:u}),s.jsx.call(void 0,SidebarCollapsedFlyoutItems,{...i,depth:l+1,groupLabel:e.label,items:e.children,parentKey:n})]},n):s.jsx.call(void 0,"li",{role:"none",children:s.jsx.call(void 0,"a",{"aria-current":c?"page":void 0,className:t.cn.call(void 0,"focus-visible:ring-2",i.styles.focusRing,c?t.cn.call(void 0,i.styles.active,"indicator"===i.activeStyle?i.styles.activeIndicator:i.styles.activeHighlight):i.styles.inactive),"data-depth":l,"data-state":c?"active":"default","data-ug-slot":"flyout-item",href:_nullishCoalesce(e.href,()=>"#"),onClick:i.onNavigate,role:"menuitem",children:u})},n)})})}K.displayName="Tooltip",$.displayName="TooltipTrigger",H.displayName="TooltipContent";var W="undefined"==typeof window?o.useEffect:o.useLayoutEffect,U=o.forwardRef.call(void 0,({items:l,variant:n="primary",activeStyle:r="highlight",density:c="comfortable",colors:d,collapsed:v,defaultCollapsed:p=!1,onCollapsedChange:f,collapsible:m=!1,bottomCollapsible:g=!1,resizable:b=!1,width:x,defaultWidth:y=256,minWidth:C=208,maxWidth:w=480,onWidthChange:N,searchable:j=!1,searchPlaceholder:_="搜索菜单...",responsive:k=!1,mobileOpen:T=!1,onMobileOpenChange:z,header:S,headerAlign:R="start",headerDivider:E=!0,collapsedHeader:A,contextSwitcher:M,contextSwitcherVisible:I=!1,contextSwitcherDividers:F=!1,contextSwitcherPlacement:L="after-search",scrollActiveItemIntoView:P=!0,footer:D,searchDividers:O=!0,className:V,style:K,...$},q)=>{const H=B.resolveSidebarStyles.call(void 0,n,Boolean(d)),U=`ug-sidebar-${o.useId.call(void 0).replace(/:/g,"")}`,G=`${U}-search`,[X,Y]=o.useState.call(void 0,p),[J,Q]=o.useState.call(void 0,()=>new Map),[Z,ee]=o.useState.call(void 0,""),ae=o.useMemo.call(void 0,()=>B.normalizeSidebarRange.call(void 0,C,w),[w,C]),[le,te]=o.useState.call(void 0,()=>B.clampSidebarWidth.call(void 0,y,ae.min,ae.max)),[oe,ie]=o.useState.call(void 0,!1),ne=o.useRef.call(void 0,null),re=o.useRef.call(void 0,null),se=o.useRef.call(void 0,null),ce=o.useRef.call(void 0,null),de=o.useRef.call(void 0,null),ue=o.useRef.call(void 0,!1),ve=o.useRef.call(void 0,!1),pe=o.useRef.call(void 0,null),he=o.useRef.call(void 0,null),fe=o.useRef.call(void 0,null),me=o.useRef.call(void 0,null),[ge,be]=o.useState.call(void 0,null),[xe,ye]=o.useState.call(void 0,{top:0,left:0,side:"right",arrowOffset:0}),Ce=usePortalContainer(),we=e.useUGThemePortalAttributes.call(void 0),Ne=_nullishCoalesce(v,()=>X),je=k&&T,_e=Ne&&!je,ke=a.useMediaQuery.call(void 0,"(max-width: 767px)"),Te=k&&ke&&!T,ze=B.clampSidebarWidth.call(void 0,_nullishCoalesce(x,()=>le),ae.min,ae.max),Se=B.normalizeSidebarSearch.call(void 0,Z),Re=o.useMemo.call(void 0,()=>B.filterSidebarItems.call(void 0,l,Se),[l,Se]),Ee=o.useMemo.call(void 0,()=>B.createSidebarTreeMeta.call(void 0,l),[l]),Ae=o.useMemo.call(void 0,()=>Re===l?Ee:B.createSidebarTreeMeta.call(void 0,Re),[l,Ee,Re]),Me=o.useMemo.call(void 0,()=>d?B.getSidebarNavigationStyle.call(void 0,d):void 0,[d]);function cancelFlyoutClose(){fe.current&&(clearTimeout(fe.current),fe.current=null)}function scheduleFlyoutClose(){cancelFlyoutClose(),fe.current=setTimeout(()=>be(null),80)}W(()=>{0!==Ee.activeBranchKeys.length&&Q(e=>{let a=e;return Ee.activeBranchKeys.forEach(l=>{a.has(l)||(a===e&&(a=new Map(e)),a.set(l,!0))}),a})},[Ee.activeBranchSignal]),o.useEffect.call(void 0,()=>{if(!P||_e||Se)return;const e=window.requestAnimationFrame(()=>{const e=he.current,a=_optionalChain([e,"optionalAccess",e=>e.querySelector,"call",e=>e('[aria-current="page"]')]);if(!e||!a||0===e.clientHeight)return;const l=e.getBoundingClientRect(),t=a.getBoundingClientRect();(t.top<l.top+24||t.bottom>l.bottom-24)&&(e.scrollTop+=t.top-l.top-e.clientHeight/2+t.height/2)});return()=>window.cancelAnimationFrame(e)},[Se,_e,P,Ae.activeItemSignal]);const Ie=o.useCallback.call(void 0,()=>{if(!ce.current||!de.current)return;const e=ce.current.getBoundingClientRect(),a=h.resolveFloatingPosition.call(void 0,e,{width:de.current.offsetWidth,height:de.current.offsetHeight},{width:window.innerWidth,height:window.innerHeight},{side:"right",align:"start",offset:B.SIDEBAR_OVERLAY_OFFSET});ye({...a,arrowOffset:e.top+e.height/2-a.top})},[]),Fe=o.useCallback.call(void 0,()=>{null===me.current&&(me.current=window.requestAnimationFrame(()=>{me.current=null,Ie()}))},[Ie]);function setCollapsedState(e){Y(e),_optionalChain([f,"optionalCall",a=>a(e)])}W(()=>{ge&&Ie()},[ge,Ie]),useFloatingLayoutObserver(Boolean(ge),Fe,ce,de),o.useEffect.call(void 0,()=>{_e?ee(""):be(null)},[_e]),o.useEffect.call(void 0,()=>{if(ge&&"undefined"!=typeof document)return document.addEventListener("pointerdown",handleDocumentPointerDown,!0),()=>{document.removeEventListener("pointerdown",handleDocumentPointerDown,!0)};function handleDocumentPointerDown(e){const a=e.target;a instanceof Node&&(_optionalChain([pe,"access",e=>e.current,"optionalAccess",e=>e.contains,"call",e=>e(a)])||_optionalChain([de,"access",e=>e.current,"optionalAccess",e=>e.contains,"call",e=>e(a)])||function closeFlyout(){fe.current&&(clearTimeout(fe.current),fe.current=null),be(null)}())}},[ge]),o.useEffect.call(void 0,()=>{if("undefined"==typeof document)return;function handleResize(){ue.current=!0,fe.current&&(clearTimeout(fe.current),fe.current=null),be(null)}const releaseHoverSuppression=()=>{ue.current=!1};return window.addEventListener("resize",handleResize),document.addEventListener("pointermove",releaseHoverSuppression,!0),document.addEventListener("pointerdown",releaseHoverSuppression,!0),()=>{window.removeEventListener("resize",handleResize),document.removeEventListener("pointermove",releaseHoverSuppression,!0),document.removeEventListener("pointerdown",releaseHoverSuppression,!0)}},[]),useEscapeKey(je,closeMobile),o.useEffect.call(void 0,()=>{if(!je||"undefined"==typeof document)return;const e=document.activeElement instanceof HTMLElement?document.activeElement:null,a=window.requestAnimationFrame(()=>h.focusFirstElement.call(void 0,pe.current));return()=>{window.cancelAnimationFrame(a),_optionalChain([e,"optionalAccess",e=>e.isConnected])&&e.focus({preventScroll:!0})}},[je]),o.useEffect.call(void 0,()=>()=>{fe.current&&clearTimeout(fe.current),null!==me.current&&window.cancelAnimationFrame(me.current)},[]);const Le=o.useCallback.call(void 0,e=>{const a=B.clampSidebarWidth.call(void 0,e,ae.min,ae.max);void 0===x&&te(a),_optionalChain([N,"optionalCall",e=>e(a)])},[N,x,ae.max,ae.min]);function closeMobile(){_optionalChain([z,"optionalCall",e=>e(!1)])}function closeFlyoutAndRestoreFocus(){be(null),ve.current=!0,_optionalChain([ce,"access",e=>e.current,"optionalAccess",e=>e.focus,"call",e=>e({preventScroll:!0})]),ve.current=!1}o.useEffect.call(void 0,()=>{if(!oe||!Ce)return;const e=Ce.style.cursor,a=Ce.style.userSelect;function handlePointerMove(e){const a=ne.current;a&&(se.current=a.width+e.clientX-a.x,null===re.current&&(re.current=window.requestAnimationFrame(()=>{re.current=null;const e=se.current;se.current=null,null!==e&&Le(e)})))}function stopResizing(){null!==re.current&&window.cancelAnimationFrame(re.current),re.current=null;const e=se.current;se.current=null,null!==e&&Le(e),ne.current=null,ie(!1)}return Ce.style.cursor="col-resize",Ce.style.userSelect="none",window.addEventListener("pointermove",handlePointerMove),window.addEventListener("pointerup",stopResizing),window.addEventListener("pointercancel",stopResizing),()=>{window.removeEventListener("pointermove",handlePointerMove),window.removeEventListener("pointerup",stopResizing),window.removeEventListener("pointercancel",stopResizing),null!==re.current&&window.cancelAnimationFrame(re.current),re.current=null,se.current=null,Ce.style.cursor=e,Ce.style.userSelect=a}},[oe,Ce,Le]);const Pe=I&&Boolean(M),De=j&&Pe,utilityRegionClassName=e=>B.getSidebarUtilityRegionClass.call(void 0,e,De,L),Be=Pe?s.jsx.call(void 0,"div",{"aria-hidden":_e,className:t.cn.call(void 0,"shrink-0",utilityRegionClassName("context-switcher"),F&&"border-y",H.divider),"data-dividers":F?"visible":"hidden","data-state":_e?"closed":"open","data-ug-slot":"context-switcher",inert:!!_e||void 0,children:M},"context-switcher"):null,Oe=j?s.jsxs.call(void 0,"div",{"aria-hidden":_e,className:t.cn.call(void 0,utilityRegionClassName("search"),O&&"border-y",H.divider),"data-dividers":O?"visible":"hidden","data-state":_e?"closed":"open","data-ug-slot":"search",inert:!!_e||void 0,children:[s.jsx.call(void 0,"label",{className:"sr-only",htmlFor:G,children:"搜索菜单"}),s.jsxs.call(void 0,"div",{className:"relative",children:[s.jsx.call(void 0,i.Search,{className:t.cn.call(void 0,"pointer-events-none absolute left-3 top-1/2 -translate-y-1/2 [height:calc(var(--control-height-sm)*0.5)] [width:calc(var(--control-height-sm)*0.5)]",H.searchIcon),"aria-hidden":"true"}),s.jsx.call(void 0,"input",{id:G,value:Z,onChange:e=>ee(e.target.value),placeholder:_,autoComplete:"off",className:t.cn.call(void 0,"w-full border px-[var(--control-padding-x-sm)] pl-9 pr-9 text-sm outline-none [height:var(--control-height-md)] [border-radius:var(--radius-control)] focus:ring-2",H.searchInput),type:"text",role:"searchbox"}),Z?s.jsx.call(void 0,"button",{type:"button",className:t.cn.call(void 0,"absolute right-1 top-1/2 flex -translate-y-1/2 items-center justify-center [height:var(--control-height-sm)] [width:var(--control-height-sm)] [border-radius:var(--radius-control)]",H.clear),"aria-label":"清空搜索","data-ug-slot":"clear",onClick:()=>ee(""),children:s.jsx.call(void 0,i.X,{size:14})}):null]})]},"search"):null,Ve="before-search"===L?[Be,Oe]:[Oe,Be];const Ke=s.jsxs.call(void 0,"aside",{ref:e=>{pe.current=e,"function"==typeof q?q(e):q&&(q.current=e)},...$,"aria-hidden":!!Te||void 0,"aria-label":_nullishCoalesce($["aria-label"],()=>"主导航"),"aria-modal":!!je||void 0,className:t.cn.call(void 0,"relative flex flex-col overflow-hidden",H.container,k&&["fixed inset-y-0 left-0 z-50 md:relative md:inset-auto md:z-auto",T?"translate-x-0":"-translate-x-full md:translate-x-0"],V),"data-ug":"sidebar","data-state":[_e?"collapsed":"expanded",k&&T?"mobile-open":null].filter(Boolean).join(" "),"data-variant":n,"data-active-style":r,"data-density":c,"data-size":"md","data-resizable":b?"true":"false","data-resizing":oe?"true":"false",inert:!!Te||void 0,onKeyDown:function handleSidebarKeyDown(e){je&&h.trapTabKey.call(void 0,e,pe.current),_optionalChain([$,"access",e=>e.onKeyDown,"optionalCall",a=>a(e)])},role:je?"dialog":$.role,style:{...K,...Me,width:_e?72:ze},tabIndex:je?-1:$.tabIndex,children:[(S||A||m||k&&T)&&s.jsxs.call(void 0,"div",{className:t.cn.call(void 0,"relative flex min-h-[var(--ug-sidebar-header-height)] items-center gap-2 px-[var(--control-padding-x-sm)]",E&&"border-b",H.divider),"data-align":R,"data-divider":E?"visible":"hidden","data-ug-slot":"header",children:[S?s.jsx.call(void 0,"div",{"aria-hidden":_e,className:t.cn.call(void 0,"flex min-w-0 flex-1","center"===R?"justify-center":"justify-start"),"data-state":_e?"hidden":"visible","data-ug-slot":"header-content",inert:!!_e||void 0,children:S}):null,A&&!m?s.jsx.call(void 0,"div",{"aria-hidden":!_e,className:"flex min-w-0 items-center justify-center","data-state":_e?"visible":"hidden","data-ug-slot":"collapsed-header",inert:!_e||void 0,children:A}):null,_e||S?null:s.jsx.call(void 0,"div",{className:"flex-1"}),m&&s.jsx.call(void 0,"button",{type:"button",className:t.cn.call(void 0,"shrink-0 items-center justify-center border [height:var(--control-height-md)] [width:var(--control-height-md)] [border-radius:var(--radius-control)]",k?"hidden md:flex":"flex",H.control),"aria-label":Ne?"展开侧边栏":"折叠侧边栏","data-ug-slot":"toggle",onClick:()=>setCollapsedState(!Ne),children:Ne?s.jsx.call(void 0,i.PanelLeftOpen,{size:17}):s.jsx.call(void 0,i.PanelLeftClose,{size:17})}),k&&s.jsx.call(void 0,"button",{type:"button",className:t.cn.call(void 0,"flex shrink-0 items-center justify-center border [height:var(--control-height-md)] [width:var(--control-height-md)] [border-radius:var(--radius-control)] md:hidden",H.control),"aria-label":"关闭侧边栏","data-ug-slot":"close",onClick:closeMobile,children:s.jsx.call(void 0,i.X,{size:17})})]}),Ve,s.jsx.call(void 0,"nav",{ref:he,className:t.cn.call(void 0,"flex-1 overflow-x-hidden overflow-y-auto overscroll-contain","compact"===c?!j&&!Pe||_e?"pb-3 pt-2":"pb-3 pt-0.5":!j&&!Pe||_e?"pb-5 pt-3":"pb-5 pt-0.5"),"data-ug-slot":"nav",children:Re.length>0?s.jsx.call(void 0,SidebarNavList,{activeBranches:Ae.activeBranches,activeStyle:r,collapsed:_e,collapsedFlyoutKey:_optionalChain([ge,"optionalAccess",e=>e.key]),customColors:Boolean(d),density:c,expandedOverrides:J,instanceId:U,items:Re,navigationColorStyle:Me,normalizedQuery:Se,onCloseFlyout:closeFlyoutAndRestoreFocus,onFocusFlyoutItem:function focusFlyoutItem(e="first"){window.requestAnimationFrame(()=>{B.focusSidebarMenuBoundary.call(void 0,de.current,e)})},onNavigate:closeMobile,onOpenCollapsedFlyout:function openCollapsedFlyout(e,a,l,t="interaction"){_e&&("hover"===t&&ue.current||ve.current||(cancelFlyoutClose(),ce.current=l,be(l=>_optionalChain([l,"optionalAccess",e=>e.key])===a?l:{item:e,key:a})))},onScheduleFlyoutClose:scheduleFlyoutClose,onToggle:function toggleExpanded(e,a){Q(l=>{const t=new Map(l);return t.set(e,!a),t})},styles:H,variant:n}):s.jsx.call(void 0,"p",{className:t.cn.call(void 0,"mx-3 border border-dashed px-[var(--control-padding-x-sm)] py-[calc(var(--content-gap)*0.75)] text-sm [border-radius:var(--radius-panel)]",H.empty),"data-ug-slot":"empty",children:"没有匹配的菜单"})}),D&&s.jsx.call(void 0,"div",{className:t.cn.call(void 0,"border-t px-[calc(var(--control-padding-x-sm)*0.8)] py-[calc(var(--content-gap)*0.75)]",H.divider,_e&&"flex justify-center"),"data-ug-slot":"footer",children:D}),g?s.jsx.call(void 0,"div",{className:t.cn.call(void 0,"shrink-0 border-t p-2",k?"hidden md:block":"block",H.divider),"data-ug-slot":"bottom-toggle",children:s.jsx.call(void 0,"button",{type:"button",className:t.cn.call(void 0,"flex w-full items-center justify-center border-0 bg-transparent [height:var(--control-height-md)] [border-radius:var(--radius-control)]",H.inactive),"aria-label":Ne?"展开侧边栏":"折叠侧边栏","data-ug-slot":"toggle",onClick:()=>setCollapsedState(!Ne),children:Ne?s.jsx.call(void 0,i.ChevronRight,{"aria-hidden":"true",size:17}):s.jsx.call(void 0,i.ChevronLeft,{"aria-hidden":"true",size:17})})}):null,b&&!_e?s.jsx.call(void 0,"div",{"aria-label":"调整侧边栏宽度","aria-orientation":"vertical","aria-valuemax":ae.max,"aria-valuemin":ae.min,"aria-valuenow":ze,className:"group absolute inset-y-0 right-0 z-20 hidden w-2 cursor-col-resize touch-none outline-none md:block","data-ug-slot":"resize-handle",onDoubleClick:()=>Le(y),onKeyDown:function handleResizeKeyDown(e){const a=e.shiftKey?16:8;let l;"ArrowLeft"===e.key&&(l=ze-a),"ArrowRight"===e.key&&(l=ze+a),"Home"===e.key&&(l=ae.min),"End"===e.key&&(l=ae.max),void 0!==l&&(e.preventDefault(),Le(l))},onPointerDown:e=>{0===e.button&&(e.preventDefault(),ne.current={x:e.clientX,width:ze},ie(!0))},role:"separator",tabIndex:0,children:s.jsx.call(void 0,"span",{"aria-hidden":"true",className:t.cn.call(void 0,"absolute inset-y-0 right-0 w-px group-hover:w-0.5 group-focus-visible:w-0.5",H.resizeHandle)})}):null]});return s.jsxs.call(void 0,s.Fragment,{children:[k&&T?s.jsx.call(void 0,"button",{type:"button",className:"fixed inset-0 z-40 bg-overlay md:hidden","aria-label":"关闭侧边栏遮罩","data-ug-slot":"overlay",onClick:closeMobile,tabIndex:-1}):null,Ke,_e&&ge&&Ce?u.createPortal.call(void 0,s.jsxs.call(void 0,"div",{...we,"aria-label":`${ge.item.label}菜单`,"data-active-style":r,"data-custom-colors":d?"true":"false","data-density":c,"data-side":xe.side,"data-state":"open","data-ug":"sidebar-flyout","data-ug-slot":"content","data-variant":n,id:`${U}-flyout`,onBlur:e=>{const a=e.relatedTarget;a instanceof Node&&(e.currentTarget.contains(a)||_optionalChain([ce,"access",e=>e.current,"optionalAccess",e=>e.contains,"call",e=>e(a)]))||be(null)},onKeyDown:function handleFlyoutKeyDown(e){if("Escape"===e.key||"ArrowLeft"===e.key)return e.preventDefault(),e.stopPropagation(),void closeFlyoutAndRestoreFocus();B.moveSidebarMenuFocus.call(void 0,e.currentTarget,e.key)&&e.preventDefault()},onMouseEnter:cancelFlyoutClose,onMouseLeave:scheduleFlyoutClose,ref:de,role:"menu",style:{...Me,"--ug-sidebar-flyout-arrow-offset":`${xe.arrowOffset}px`,top:xe.top,left:xe.left},children:[s.jsx.call(void 0,"span",{"aria-hidden":"true","data-ug-slot":"arrow"}),s.jsxs.call(void 0,"div",{"data-ug-slot":"panel",children:[s.jsxs.call(void 0,"div",{"data-ug-slot":"title",children:[s.jsx.call(void 0,"span",{"data-ug-slot":"title-icon",children:s.jsx.call(void 0,ge.item.icon,{"aria-hidden":"true",size:16})}),s.jsx.call(void 0,"span",{"data-ug-slot":"title-label",children:ge.item.label})]}),s.jsx.call(void 0,SidebarCollapsedFlyoutItems,{activeBranches:Ae.activeBranches,activeStyle:r,items:_nullishCoalesce(ge.item.children,()=>[]),onNavigate:()=>{be(null),closeMobile()},parentKey:ge.key,styles:H})]})]}),Ce):null]})});U.displayName="Sidebar";var integer=(e,a)=>"number"==typeof e&&Number.isFinite(e)?Math.floor(e):a;function pageNumbers(e,a){return a<=5?Array.from({length:a},(e,a)=>a+1):e<=3?[1,2,3,"...",a]:e>=a-2?[1,"...",a-2,a-1,a]:[1,"...",e,"...",a]}var G=o.forwardRef.call(void 0,function Pagination2({page:e,totalPages:a,total:n,pageSize:r,defaultPageSize:c=10,pageSizeOptions:d,onPageChange:u,onPageSizeChange:v,showTotal:p=!1,showJumper:h=!1,hideOnSingle:f=!1,disabled:m,size:b,className:x,...y},C){const w=t.useUIConfig.call(void 0),N=t.resolveDisabled.call(void 0,m,w.disabled),j=_nullishCoalesce(b,()=>"small"===w.size?"sm":"large"===w.size?"lg":"md"),_="md"===j?"default":j,[k,T]=o.useState.call(void 0,Math.max(1,integer(c,10))),z=Math.max(1,integer(_nullishCoalesce(r,()=>k),10)),S=Math.max(0,integer(n,0)),R=void 0!==a?Math.max(0,integer(a,0)):Math.ceil(S/z),E=0===R?0:Math.min(R,Math.max(1,integer(e,1))),[A,M]=o.useState.call(void 0,String(E||1)),I=o.useRef.call(void 0,void 0);o.useEffect.call(void 0,()=>{M(String(E||1)),I.current=void 0},[E]);const F=[...new Set([..._nullishCoalesce(d,()=>[]),z].filter(Number.isFinite).map(Math.floor).filter(e=>e>0))];function changePage(e){if(N||0===R)return;const a=Math.min(R,Math.max(1,integer(e,E)));a!==E&&u(a)}function jump(){const e=Number(A),a=Number.isFinite(e)&&A.trim()?Math.min(R,Math.max(1,Math.floor(e))):E;M(String(a||1)),a!==I.current&&(I.current=a,changePage(a))}return f&&R<=1?null:s.jsxs.call(void 0,"nav",{...y,ref:C,"aria-label":_nullishCoalesce(y["aria-label"],()=>"分页导航"),className:x,"data-ug":"pagination","data-state":N?"disabled":"default","data-variant":"default","data-size":j,"data-layout":p||d||h?"full":"simple",children:[p&&s.jsxs.call(void 0,"span",{"data-ug-slot":"total",children:["共 ",S," 条"]}),d&&s.jsx.call(void 0,"span",{"data-ug-slot":"sizes",children:s.jsx.call(void 0,g,{"aria-label":"每页条数",size:_,disabled:N,value:z,options:F.map(e=>({value:e,label:`每页 ${e} 条`})),onValueChange:e=>"number"==typeof e&&function changeSize(e){N||e===z||!Number.isFinite(e)||e<=0||(void 0===r&&T(Math.floor(e)),_optionalChain([v,"optionalCall",a=>a(Math.floor(e))]),1!==E&&u(1),M("1"))}(e)})}),s.jsxs.call(void 0,"span",{"data-ug-slot":"pages",children:[s.jsx.call(void 0,"button",{type:"button",disabled:N||E<=1,onClick:()=>changePage(E-1),"aria-label":"上一页","data-ug-slot":"prev","data-state":N||E<=1?"disabled":"default",children:s.jsx.call(void 0,i.ChevronLeft,{size:16,"aria-hidden":"true"})}),pageNumbers(E,R).map((e,a)=>"..."===e?s.jsx.call(void 0,"span",{"data-ug-slot":"ellipsis",children:"…"},`ellipsis-${a}`):s.jsx.call(void 0,"button",{type:"button",disabled:N,onClick:()=>changePage(e),"aria-label":`第 ${e} 页`,"aria-current":e===E?"page":void 0,"data-ug-slot":"item","data-state":N?"disabled":e===E?"active":"default",children:e},e)),s.jsx.call(void 0,"button",{type:"button",disabled:N||0===R||E>=R,onClick:()=>changePage(E+1),"aria-label":"下一页","data-ug-slot":"next","data-state":N||0===R||E>=R?"disabled":"default",children:s.jsx.call(void 0,i.ChevronRight,{size:16,"aria-hidden":"true"})})]}),h&&s.jsxs.call(void 0,"label",{"data-ug-slot":"jumper",children:["前往",s.jsx.call(void 0,l.Input,{"aria-label":"跳转页码",type:"number",min:1,max:R||1,step:1,size:_,disabled:N||0===R,value:A,onChange:e=>{I.current=void 0,M(e.target.value)},onBlur:jump,onKeyDown:e=>{"Enter"!==e.key||e.nativeEvent.isComposing||(e.preventDefault(),jump())}}),"页"]})]})});G.displayName="Pagination";var X=o.forwardRef.call(void 0,({children:e,className:a,defaultValue:l=[],disabled:i,form:n,max:c,min:d=0,name:u,onValueChange:v,orientation:p="horizontal",size:h,value:f,...m},g)=>{const b=t.useUIConfig.call(void 0),x=o.useRef.call(void 0,null),[y,C]=o.useState.call(void 0,[...l]),w=void 0===f?y:f,N=t.resolveDisabled.call(void 0,i,b.disabled),j=t.resolveControlSize.call(void 0,h,b.size),_=Math.max(0,d),k=void 0===c?void 0:Math.max(_,c),T=o.useRef.call(void 0,{value:f,defaultValue:l});T.current={value:f,defaultValue:l},o.useEffect.call(void 0,()=>{const e=n?document.getElementById(n):_nullishCoalesce(_optionalChain([x,"access",e=>e.current,"optionalAccess",e=>e.closest,"call",e=>e("form")]),()=>null);if(!e)return;const a=new Set;function handleReset(e){const l=setTimeout(()=>{a.delete(l);const t=T.current;e.defaultPrevented||void 0!==t.value||C([...t.defaultValue])},0);a.add(l)}return e.addEventListener("reset",handleReset),()=>{e.removeEventListener("reset",handleReset),a.forEach(clearTimeout)}},[n]);const z=o.useMemo.call(void 0,()=>({values:w,form:n,name:u,size:j,disabled:N,isOptionDisabled:(e,a,l=!1)=>!(!N&&!l)||(a?w.length<=_:void 0!==k&&w.length>=k&&!w.includes(e)),toggleValue(e,a){const l=a?w.includes(e)?[...w]:[...w,e]:w.filter(a=>a!==e);l.length<_||void 0!==k&&l.length>k||(void 0===f&&C(l),_optionalChain([v,"optionalCall",e=>e(l)]))}}),[u,n,k,_,v,N,j,f,w]);return s.jsx.call(void 0,r.Provider,{value:z,children:s.jsx.call(void 0,"div",{...m,ref:e=>{x.current=e,function assignRef2(e,a){"function"==typeof e?e(a):e&&(e.current=a)}(g,e)},className:t.cn.call(void 0,"flex","vertical"===p?"flex-col items-start gap-2":"flex-row flex-wrap items-center gap-x-5 gap-y-2",a),"data-size":j,"data-state":N?"disabled":"default","data-ug":"checkbox-group","data-ug-slot":"root","data-variant":p,role:"group","aria-disabled":N||void 0,children:e})})});X.displayName="CheckboxGroup";var Y=o.createContext.call(void 0,null);function assignRef3(e,a){"function"==typeof e?e(a):e&&(e.current=a)}var J=n.cva.call(void 0,"relative inline-flex shrink-0 items-center justify-center rounded-[var(--ug-radio-radius)] border shadow-sm peer-focus-visible:outline-none peer-focus-visible:ring-2 peer-focus-visible:ring-ring/35 peer-focus-visible:ring-offset-2 peer-focus-visible:ring-offset-surface-0 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",{variants:{size:{sm:"h-[calc(var(--control-height-sm)*0.5)] w-[calc(var(--control-height-sm)*0.5)]",default:"h-[calc(var(--control-height-md)*0.45)] w-[calc(var(--control-height-md)*0.45)]",lg:"h-[calc(var(--control-height-lg)*0.45)] w-[calc(var(--control-height-lg)*0.45)]"},checked:{true:"border-primary bg-surface-1",false:"border-border-strong bg-surface-1 hover:border-primary/70 hover:bg-surface-2"}},defaultVariants:{size:"default",checked:!1}}),Q=o.forwardRef.call(void 0,({className:e,size:a,value:l,checked:i,defaultChecked:n=!1,disabled:r,label:c,variant:d="default",labelClassName:u,controlClassName:v,name:p,form:h,required:f,onChange:m,id:g,"aria-invalid":b,...x},y)=>{const C=function useRadioGroupContext(){return o.useContext.call(void 0,Y)}(),w=t.useUIConfig.call(void 0),N=o.useId.call(void 0),j=o.useRef.call(void 0,null),_=_nullishCoalesce(g,()=>N),[k,T]=o.useState.call(void 0,Boolean(n)),z=C?C.value===l:_nullishCoalesce(i,()=>k),S=C?C.disabled||Boolean(r):t.resolveDisabled.call(void 0,r,w.disabled),R=C?C.name:p,E=_nullishCoalesce(_optionalChain([C,"optionalAccess",e=>e.form]),()=>h),A=_nullishCoalesce(_optionalChain([C,"optionalAccess",e=>e.required]),()=>Boolean(f)),M=o.useRef.call(void 0,{checkedProp:i,defaultChecked:n});M.current={checkedProp:i,defaultChecked:n},o.useEffect.call(void 0,()=>{const e=_optionalChain([j,"access",e=>e.current,"optionalAccess",e=>e.form]);if(!e||C)return;const a=new Set;function handleReset(l){const t=setTimeout(()=>{a.delete(t);const o=j.current;if(l.defaultPrevented||!o||o.form!==e)return;const i=M.current,n=Boolean(_nullishCoalesce(i.checkedProp,()=>i.defaultChecked));void 0===i.checkedProp&&T(n),o.checked=n},0);a.add(t)}return e.addEventListener("reset",handleReset),()=>{e.removeEventListener("reset",handleReset);for(const e of a)clearTimeout(e)}},[Boolean(C),E]);const I=t.resolveControlSize.call(void 0,_nullishCoalesce(a,()=>_optionalChain([C,"optionalAccess",e=>e.size])),w.size),F=t.isAriaInvalid.call(void 0,b),L=[z?"checked":"unchecked",F?"invalid":void 0,S?"disabled":void 0].filter(Boolean).join(" "),P="sm"===I?"h-[calc(var(--control-height-sm)*0.2)] w-[calc(var(--control-height-sm)*0.2)]":"lg"===I?"h-[calc(var(--control-height-lg)*0.22)] w-[calc(var(--control-height-lg)*0.22)]":"h-[calc(var(--control-height-md)*0.2)] w-[calc(var(--control-height-md)*0.2)]",D=s.jsxs.call(void 0,"span",{className:"relative inline-flex","data-ug-slot":"control",children:[s.jsx.call(void 0,"input",{ref:e=>{j.current=e,assignRef3(y,e)},id:_,type:"radio",className:"peer sr-only",value:l,checked:z,"aria-invalid":b,disabled:S,name:R,form:E,required:A,onChange:function handleChange(){C?C.onValueChange(l):(void 0===i&&T(!0),_optionalChain([m,"optionalCall",e=>e(l)]))},"data-ug-slot":"input",...x,"data-ug-value-type":typeof l}),s.jsx.call(void 0,"span",{"aria-hidden":"true",className:t.cn.call(void 0,J({size:I,checked:z}),F&&"border-danger peer-focus-visible:ring-danger/35",e),"data-ug-slot":"indicator",children:z&&s.jsx.call(void 0,"span",{className:t.cn.call(void 0,"rounded-[var(--ug-radio-radius)] bg-primary",P),"data-ug-slot":"dot"})})]});return null==c?s.jsx.call(void 0,"span",{"data-ug":"radio","data-state":L,"data-variant":"default","data-size":I,children:D}):s.jsxs.call(void 0,"label",{htmlFor:_,className:t.cn.call(void 0,"card"===d?"flex min-h-[calc(var(--control-height-lg)*1.75)] w-full cursor-pointer select-none items-start gap-3 rounded-[var(--radius-panel)] border border-border-base bg-surface-1 p-[var(--content-gap)] text-sm leading-5 text-text-primary shadow-xs hover:border-border-strong hover:bg-surface-2 focus-within:border-primary focus-within:ring-2 focus-within:ring-ring/30":"segmented"===d?"inline-flex w-full min-w-0 cursor-pointer select-none items-center justify-center gap-0 rounded-[calc(var(--radius-control)*0.75)] border border-transparent bg-transparent text-center leading-5 text-text-secondary shadow-none transition-[background-color,border-color,box-shadow,color] duration-[var(--motion-duration-state)] hover:bg-surface-3 hover:text-text-primary focus-within:z-10 focus-within:outline-none focus-within:ring-2 focus-within:ring-ring/30":"inline-flex min-h-[var(--control-height-sm)] max-w-full min-w-0 cursor-pointer items-start gap-2.5 text-sm leading-5 text-text-primary select-none","segmented"===d&&("sm"===I?"min-h-[var(--control-height-sm)] px-[var(--control-padding-x-sm)] text-sm":"lg"===I?"min-h-[var(--control-height-lg)] px-[var(--control-padding-x-lg)] text-base":"min-h-[var(--control-height-md)] px-[var(--control-padding-x-md)] text-sm"),"card"===d&&z&&"border-primary bg-primary-soft shadow-sm","segmented"===d&&z&&"border-primary/25 bg-surface-1 text-primary-soft-fg shadow-xs","card"===d&&F&&"border-danger focus-within:ring-danger/30","segmented"===d&&F&&"border-danger focus-within:ring-danger/30",S&&"cursor-not-allowed opacity-60",u),"data-ug":"radio","data-state":L,"data-variant":d,"data-size":I,children:[s.jsx.call(void 0,"span",{className:t.cn.call(void 0,"card"===d&&"mt-0.5","segmented"===d&&"sr-only",v),"data-ug-slot":"control",children:D}),s.jsx.call(void 0,"span",{className:t.cn.call(void 0,"min-w-0 pt-px [overflow-wrap:anywhere]","card"===d&&"flex-1"),"data-ug-slot":"label",children:c})]})});Q.displayName="Radio";var Z=o.forwardRef.call(void 0,({className:e,value:a,defaultValue:l,onValueChange:i,disabled:n,size:r,name:c,form:d,required:u=!1,orientation:v="vertical",presentation:p="default",sizing:h="fill",children:f,...m},g)=>{const b=t.useUIConfig.call(void 0),x=o.useRef.call(void 0,null),y=o.useId.call(void 0),[C,w]=o.useState.call(void 0,l),N=void 0!==a,j=N?a:C,_=t.resolveDisabled.call(void 0,n,b.disabled),k=t.resolveControlSize.call(void 0,r,b.size),T=o.useRef.call(void 0,{defaultValue:l,currentValue:j,isControlled:N});return T.current={defaultValue:l,currentValue:j,isControlled:N},o.useEffect.call(void 0,()=>{const e=d?document.getElementById(d):_nullishCoalesce(_optionalChain([x,"access",e=>e.current,"optionalAccess",e=>e.closest,"call",e=>e("form")]),()=>null);if(!e)return;const a=new Set;function handleReset(l){const t=setTimeout(()=>{if(a.delete(t),l.defaultPrevented||!x.current)return;const o=T.current,i=o.isControlled?o.currentValue:o.defaultValue;o.isControlled||w(i);for(const a of x.current.querySelectorAll('input[type="radio"]'))a.form===e&&a.closest('[data-ug="radio-group"]')===x.current&&(a.checked=a.dataset.ugValueType===typeof i&&("number"==typeof i?Number(a.value)===i:a.value===i))},0);a.add(t)}return e.addEventListener("reset",handleReset),()=>{e.removeEventListener("reset",handleReset);for(const e of a)clearTimeout(e)}},[d]),s.jsx.call(void 0,Y.Provider,{value:{value:j,onValueChange:function handleValueChange(e){N||w(e),_optionalChain([i,"optionalCall",a=>a(e)])},name:_nullishCoalesce(c,()=>`ug-radio-${y}`),form:d,required:u,disabled:_,size:k},children:s.jsx.call(void 0,"div",{ref:e=>{x.current=e,assignRef3(g,e)},role:"radiogroup","aria-disabled":_||void 0,"aria-required":u||void 0,className:t.cn.call(void 0,"segmented"===p?t.cn.call(void 0,"grid max-w-full grid-flow-col auto-cols-fr gap-1 rounded-[var(--radius-control)] border border-border-base bg-surface-2 p-1","content"===h?"w-fit":"w-full"):t.cn.call(void 0,"flex","vertical"===v?"flex-col gap-2.5":"flex-row flex-wrap gap-x-5 gap-y-2.5"),e),...m,"data-ug":"radio-group","data-state":_?"disabled":"default","data-variant":v,"data-presentation":p,"data-sizing":h,"data-size":k,children:f})})});Z.displayName="RadioGroup";var ee=o.createContext.call(void 0,null),ae=o.createContext.call(void 0,null);function useTabsContext(){const e=o.useContext.call(void 0,ee);if(!e)throw new Error("Tabs 子组件必须在 <Tabs> 内使用");return e}function getTabsPartId(e,a,l){return`${e}-${l}-${encodeURIComponent(a)}`}var le=(()=>{const e=o.forwardRef.call(void 0,({value:e,onValueChange:a,children:l,className:i,size:n="md",variant:r="default",onClose:c,onAdd:d,addLabel:u="添加标签",...v},p)=>{const h=`ug-tabs-${o.useId.call(void 0).replace(/:/g,"")}`;return s.jsx.call(void 0,ee.Provider,{value:{value:e,onValueChange:a,baseId:h,size:n,variant:r,onClose:c,onAdd:d,addLabel:u},children:s.jsx.call(void 0,"div",{ref:p,className:t.cn.call(void 0,"w-full",i),...v,"data-ug":"tabs","data-state":"default","data-variant":r,"data-size":n,children:l})})});return e.displayName="Tabs",e})(),te=(()=>{const e=o.forwardRef.call(void 0,({className:e,children:a,orientation:l="horizontal",...n},r)=>{const{variant:c,size:d,onAdd:u,addLabel:v}=useTabsContext(),p=o.useRef.call(void 0,null),h=o.useCallback.call(void 0,e=>{p.current=e,"function"==typeof r?r(e):r&&(r.current=e)},[r]),[f,m]=o.useState.call(void 0,null),[g,b]=o.useState.call(void 0,!0);return o.useLayoutEffect.call(void 0,()=>{const e=p.current;if(!e)return;const update=()=>b(Boolean(e.querySelector('[role="tab"]')));update();const a=new MutationObserver(update);return a.observe(e,{childList:!0,subtree:!0}),()=>a.disconnect()},[]),s.jsx.call(void 0,ae.Provider,{value:{listRef:p,host:f},children:s.jsxs.call(void 0,"div",{"data-ug-slot":"list-frame","data-orientation":l,children:[s.jsxs.call(void 0,"div",{"data-ug-slot":"list-viewport",children:[s.jsx.call(void 0,"div",{ref:h,role:g?"tablist":void 0,"aria-orientation":g?l:void 0,tabIndex:-1,className:t.cn.call(void 0,"flex w-full min-w-0 items-center overflow-x-auto","rail"===c&&"flex-col items-stretch gap-1 overflow-visible p-0",e),...n,"data-ug-slot":"list","data-variant":c,"data-size":d,children:a}),s.jsx.call(void 0,"div",{ref:m,"data-ug-slot":"edit-actions"})]}),u&&s.jsx.call(void 0,"button",{type:"button",onClick:u,"aria-label":v,"data-ug-slot":"add",children:s.jsx.call(void 0,i.Plus,{size:14,"aria-hidden":"true"})})]})})});return e.displayName="TabsList",e})(),oe=(()=>{const a=o.forwardRef.call(void 0,({value:a,className:l,children:n,disabled:r,onClick:c,onKeyDown:d,id:v,closable:p=!1,closeLabel:h,"aria-controls":f,...m},g)=>{const{value:b,onValueChange:x,baseId:y,size:C,variant:w,onClose:N}=useTabsContext(),j=o.useContext.call(void 0,ae),_=o.useRef.call(void 0,null),k=function useClosePosition(e,a,l){const[t,i]=o.useState.call(void 0);return o.useLayoutEffect.call(void 0,()=>{const t=e.current,o=_optionalChain([a,"optionalAccess",e=>e.host]),n=_nullishCoalesce(_optionalChain([a,"optionalAccess",e=>e.listRef,"access",e=>e.current]),()=>_optionalChain([t,"optionalAccess",e=>e.closest,"call",e=>e('[data-ug-slot="list"]')]));if(!(l&&t&&o&&n))return;function update(){const e=t.getBoundingClientRect(),a=o.getBoundingClientRect(),l={left:e.right-a.left-e.height,top:e.top-a.top,width:e.height,height:e.height};i(e=>e&&Object.keys(l).every(a=>e[a]===l[a])?e:l)}update();const r="undefined"==typeof ResizeObserver?void 0:new ResizeObserver(update);_optionalChain([r,"optionalAccess",e=>e.observe,"call",e=>e(t)]),_optionalChain([r,"optionalAccess",e=>e.observe,"call",e=>e(o)]),_optionalChain([r,"optionalAccess",e=>e.observe,"call",e=>e(n)]);const s=new MutationObserver(update);return s.observe(n,{childList:!0,subtree:!0,characterData:!0}),n.addEventListener("scroll",update,{passive:!0}),window.addEventListener("resize",update),()=>{_optionalChain([r,"optionalAccess",e=>e.disconnect,"call",e=>e()]),s.disconnect(),n.removeEventListener("scroll",update),window.removeEventListener("resize",update)}},[a,l,e]),t}(_,j,p),T=usePortalContainer(),z=e.useUGThemePortalAttributes.call(void 0),S=b===a,R=getTabsPartId(y,a,"trigger"),E=getTabsPartId(y,a,"panel"),A=[S?"selected":void 0,r?"disabled":void 0].filter(Boolean).join(" ")||"default";function closeTab(e){if(r||!N)return;const l=_nullishCoalesce(_optionalChain([j,"optionalAccess",e=>e.listRef,"access",e=>e.current]),()=>e.closest('[role="tablist"]')),t=Array.from(_nullishCoalesce(_optionalChain([l,"optionalAccess",e=>e.querySelectorAll,"call",e=>e('[role="tab"]:not(:disabled)')]),()=>[])),o=t.find(e=>e.id===_nullishCoalesce(v,()=>R)),i=o?t.indexOf(o):-1,n=_nullishCoalesce(t[i+1],()=>t[i-1]);N(a),S&&_optionalChain([n,"optionalAccess",e=>e.dataset,"access",e=>e.value])&&x(n.dataset.value),setTimeout(()=>{if(_optionalChain([n,"optionalAccess",e=>e.isConnected]))n.focus();else{const e=_optionalChain([l,"optionalAccess",e=>e.closest,"call",e=>e('[data-ug-slot="list-frame"]')]),a=_optionalChain([e,"optionalAccess",e=>e.querySelector,"call",e=>e('[data-ug-slot="add"]')]);_optionalChain([_nullishCoalesce(a,()=>l),"optionalAccess",e=>e.focus,"call",e=>e()])}},0)}const M=s.jsx.call(void 0,"button",{ref:e=>{_.current=e,"function"==typeof g?g(e):g&&(g.current=e)},type:"button",role:"tab",id:_nullishCoalesce(v,()=>R),"aria-controls":_nullishCoalesce(f,()=>E),"aria-selected":S,tabIndex:S?0:-1,disabled:r,onClick:e=>{r||(x(a),_optionalChain([c,"optionalCall",a=>a(e)]))},onKeyDown:e=>{_optionalChain([d,"optionalCall",a=>a(e)]);const a=e.currentTarget.closest('[role="tablist"]'),l=_nullishCoalesce(_optionalChain([a,"optionalAccess",e=>e.getAttribute,"call",e=>e("aria-orientation")]),()=>"horizontal"),t="vertical"===l?"ArrowUp":"ArrowLeft",o="vertical"===l?"ArrowDown":"ArrowRight";if(!e.defaultPrevented&&p&&"Delete"===e.key)return e.preventDefault(),void closeTab(e.currentTarget);if(e.defaultPrevented||![t,o,"Home","End"].includes(e.key))return;const i=Array.from(_nullishCoalesce(_optionalChain([a,"optionalAccess",e=>e.querySelectorAll,"call",e=>e('[role="tab"]:not(:disabled)')]),()=>[])),n=i.indexOf(e.currentTarget);if(n<0||0===i.length)return;e.preventDefault();const r="Home"===e.key?0:"End"===e.key?i.length-1:(n+(e.key===o?1:-1)+i.length)%i.length;_optionalChain([i,"access",e=>e[r],"optionalAccess",e=>e.focus,"call",e=>e()]),_optionalChain([i,"access",e=>e[r],"optionalAccess",e=>e.click,"call",e=>e()])},className:t.cn.call(void 0,"relative shrink-0 whitespace-nowrap border-0 bg-transparent font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/30 focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-50","rail"===w&&"flex w-full items-center justify-start rounded-[var(--radius-control)] border border-transparent text-left text-text-secondary shadow-none hover:bg-surface-3 hover:text-text-primary data-[state=selected]:border-primary/25 data-[state=selected]:bg-primary-soft data-[state=selected]:text-primary-soft-fg","rail"===w&&("sm"===C?"px-[var(--control-padding-x-sm)] text-sm":"lg"===C?"px-[var(--control-padding-x-lg)] text-base":"px-[var(--control-padding-x-md)] text-sm"),l),...m,"data-closable":p||void 0,"data-value":a,"data-ug-slot":"trigger","data-state":A,"data-variant":w,"data-size":C,children:n});return s.jsxs.call(void 0,s.Fragment,{children:[M,p&&T&&_optionalChain([j,"optionalAccess",e=>e.host])&&u.createPortal.call(void 0,s.jsx.call(void 0,"button",{...z,type:"button",disabled:r,style:k,"aria-label":_nullishCoalesce(h,()=>`关闭 ${"string"==typeof n?n:a}`),"data-ug-slot":"close",onFocus:function revealClose(){const e=_.current,a=_optionalChain([j,"optionalAccess",e=>e.listRef,"access",e=>e.current]);if(!e||!a)return;const l=e.getBoundingClientRect(),t=a.getBoundingClientRect();l.left<t.left?a.scrollLeft-=t.left-l.left:l.right>t.right&&(a.scrollLeft+=l.right-t.right),l.top<t.top?a.scrollTop-=t.top-l.top:l.bottom>t.bottom&&(a.scrollTop+=l.bottom-t.bottom),a.dispatchEvent(new Event("scroll"))},onClick:e=>closeTab(e.currentTarget),children:s.jsx.call(void 0,i.X,{size:12,"aria-hidden":"true"})}),j.host)]})});return a.displayName="TabsTrigger",a})(),ie=(()=>{const e=o.forwardRef.call(void 0,({value:e,className:a,children:l,id:o,style:i,"aria-labelledby":n,...r},c)=>{const{value:d,baseId:u}=useTabsContext(),v=d===e;return s.jsx.call(void 0,"div",{ref:c,role:"tabpanel",id:_nullishCoalesce(o,()=>getTabsPartId(u,e,"panel")),"aria-labelledby":_nullishCoalesce(n,()=>getTabsPartId(u,e,"trigger")),hidden:!v,tabIndex:v?0:-1,style:v?i:{...i,display:"none"},className:t.cn.call(void 0,"focus-visible:outline-none",a),...r,"data-ug-slot":"content","data-state":v?"selected":"inactive",children:l})});return e.displayName="TabsContent",e})(),ne=o.createContext.call(void 0,null);function useNavigationMenuContext(){const e=o.useContext.call(void 0,ne);if(!e)throw new Error("NavigationMenu 子组件必须在 <NavigationMenu> 内使用");return e}var re=o.createContext.call(void 0,null);function useNavigationMenuItemContext(){const e=o.useContext.call(void 0,re);if(!e)throw new Error("NavigationMenuTrigger/Content 必须在 <NavigationMenuItem> 内使用");return e}var se=(()=>{const e=o.forwardRef.call(void 0,({activation:e="hover",tone:a="default",orientation:l="horizontal",collapsed:i=!1,onNavigate:n,className:r,children:c,...d},u)=>{const[v,p]=o.useState.call(void 0,null),h=o.useRef.call(void 0,null);return o.useEffect.call(void 0,()=>{if("click"===e&&v)return document.addEventListener("pointerdown",handlePointerDown,!0),()=>document.removeEventListener("pointerdown",handlePointerDown,!0);function handlePointerDown(e){_optionalChain([h,"access",e=>e.current,"optionalAccess",e=>e.contains,"call",a=>a(e.target)])||p(null)}},[e,v]),s.jsx.call(void 0,ne.Provider,{value:{activation:e,activeItem:v,setActiveItem:p,tone:a,orientation:l,collapsed:i&&"vertical"===l,onNavigate:n},children:s.jsx.call(void 0,"nav",{ref:e=>{h.current=e,function assignRef4(e,a){"function"==typeof e?e(a):e&&(e.current=a)}(u,e)},"aria-label":"主导航",className:t.cn.call(void 0,"relative flex gap-1","vertical"===l?"w-full flex-col items-stretch":"items-center",r),"data-ug":"navigation-menu","data-state":"default","data-variant":"default","data-size":"md","data-activation":e,"data-tone":a,"data-orientation":l,"data-collapsed":i&&"vertical"===l||void 0,...d,children:c})})});return e.displayName="NavigationMenu",e})(),ce=(()=>{const e=o.forwardRef.call(void 0,({className:e,children:a,onMouseEnter:l,onMouseLeave:i,onBlur:n,...r},c)=>{const d=`ug-navigation-item-${o.useId.call(void 0).replace(/:/g,"")}`,{activation:u,activeItem:v,setActiveItem:p}=useNavigationMenuContext(),h=v===d,f=o.useRef.call(void 0,!1),m=o.useCallback.call(void 0,e=>{"hover"===u?(f.current=!h,p(d),_optionalChain([l,"optionalCall",a=>a(e)])):_optionalChain([l,"optionalCall",a=>a(e)])},[u,h,d,l,p]),g=o.useCallback.call(void 0,e=>{"hover"===u?(f.current=!1,p(null),_optionalChain([i,"optionalCall",a=>a(e)])):_optionalChain([i,"optionalCall",a=>a(e)])},[u,i,p]);return s.jsx.call(void 0,re.Provider,{value:{itemId:d,hoverOpened:f},children:s.jsx.call(void 0,"div",{ref:c,className:t.cn.call(void 0,"relative",e),onMouseEnter:m,onMouseLeave:g,onBlur:e=>{e.currentTarget.contains(e.relatedTarget)||p(null),_optionalChain([n,"optionalCall",a=>a(e)])},"data-ug-slot":"item","data-state":h?"open":"closed",...r,children:a})})});return e.displayName="NavigationMenuItem",e})(),de=(()=>{const e=o.forwardRef.call(void 0,({className:e,active:a=!1,children:l,onClick:o,icon:i,collapsedLabel:n,...r},c)=>{const{setActiveItem:d,tone:u,collapsed:v,onNavigate:p}=useNavigationMenuContext();return s.jsxs.call(void 0,"a",{ref:c,className:t.cn.call(void 0,"inline-flex items-center px-[var(--control-padding-x-sm)] py-[calc(var(--control-height-sm)*0.2)] text-sm font-medium [border-radius:var(--radius-control)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/30 focus-visible:ring-offset-1","default"===u?a?"bg-[var(--ug-navigation-menu-item-surface,hsl(var(--surface-3)))] text-text-primary":"text-text-secondary hover:bg-[var(--ug-navigation-menu-item-surface,hsl(var(--surface-3)))] hover:text-text-primary":void 0,e),"data-ug-slot":"link","data-state":a?"active":"default","aria-current":a?"page":void 0,title:v?n:r.title,"aria-label":v?_nullishCoalesce(n,()=>r["aria-label"]):r["aria-label"],onClick:e=>{d(null),_optionalChain([o,"optionalCall",a=>a(e)]),e.defaultPrevented||_optionalChain([p,"optionalCall",a=>a(r.href,e)])},...r,children:[(i||v)&&s.jsx.call(void 0,"span",{"aria-hidden":"true","data-ug-slot":"icon",children:_nullishCoalesce(i,()=>_nullishCoalesce(n,()=>"string"==typeof l?l:"…").slice(0,1))}),s.jsx.call(void 0,"span",{"data-ug-slot":"label",children:l})]})});return e.displayName="NavigationMenuLink",e})(),ue=(()=>{const e=o.forwardRef.call(void 0,({active:e=!1,className:a,children:l,id:o,onClick:n,onKeyDown:r,icon:c,collapsedLabel:d,"aria-controls":u,...v},p)=>{const{activeItem:h,setActiveItem:f,tone:m,collapsed:g}=useNavigationMenuContext(),{itemId:b,hoverOpened:x}=useNavigationMenuItemContext(),y=h===b,C=`${b}-trigger`,w=`${b}-content`;return s.jsxs.call(void 0,"button",{ref:p,type:"button",id:_nullishCoalesce(o,()=>C),"aria-controls":_nullishCoalesce(u,()=>w),"aria-expanded":y,title:g?d:v.title,"aria-label":g?_nullishCoalesce(d,()=>v["aria-label"]):v["aria-label"],onClick:e=>{x.current?(x.current=!1,f(b)):f(y?null:b),_optionalChain([n,"optionalCall",a=>a(e)])},onKeyDown:e=>{_optionalChain([r,"optionalCall",a=>a(e)]),e.defaultPrevented||("Escape"===e.key?(e.preventDefault(),f(null)):"ArrowDown"!==e.key&&"ArrowUp"!==e.key||(e.preventDefault(),f(b),function focusContent(e){requestAnimationFrame(()=>{const a=Array.from(_nullishCoalesce(_optionalChain([document,"access",e=>e.getElementById,"call",e=>e(w),"optionalAccess",e=>e.querySelectorAll,"call",e=>e('a[href], button:not(:disabled), [tabindex]:not([tabindex="-1"])')]),()=>[]));_optionalChain(["first"===e?a[0]:a.at(-1),"optionalAccess",e=>e.focus,"call",e=>e()])})}("ArrowDown"===e.key?"first":"last")))},className:t.cn.call(void 0,"inline-flex items-center gap-1 border-0 bg-transparent px-[var(--control-padding-x-sm)] py-[calc(var(--control-height-sm)*0.2)] text-sm font-medium [border-radius:var(--radius-control)] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/30 focus-visible:ring-offset-1","default"===m?y||e?"bg-[var(--ug-navigation-menu-item-surface,hsl(var(--surface-3)))] text-text-primary":"text-text-secondary hover:bg-[var(--ug-navigation-menu-item-surface,hsl(var(--surface-3)))] hover:text-text-primary":void 0,a),"data-ug-slot":"trigger","data-state":y?"open":"closed","data-active":e?"true":"false",...v,children:[(c||g)&&s.jsx.call(void 0,"span",{"aria-hidden":"true","data-ug-slot":"icon",children:_nullishCoalesce(c,()=>_nullishCoalesce(d,()=>"string"==typeof l?l:"…").slice(0,1))}),s.jsx.call(void 0,"span",{"data-ug-slot":"label",children:l}),s.jsx.call(void 0,i.ChevronDown,{"aria-hidden":"true",focusable:"false",size:14,className:void 0,"data-ug-slot":"indicator"})]})});return e.displayName="NavigationMenuTrigger",e})(),ve=(()=>{const e=o.forwardRef.call(void 0,({className:e,children:a,id:l,onKeyDown:o,onAnimationEnd:i,role:n="region","aria-labelledby":r,...c},d)=>{const u=useNavigationMenuContext(),{activeItem:v,setActiveItem:p}=u,{itemId:h}=useNavigationMenuItemContext(),f=v===h,{present:m,state:g,handleAnimationEnd:b}=usePresence(f),x="horizontal"===u.orientation||u.collapsed;return m?s.jsx.call(void 0,ne.Provider,{value:{...u,collapsed:!1},children:s.jsx.call(void 0,"div",{ref:d,id:_nullishCoalesce(l,()=>`${h}-content`),role:n,"aria-labelledby":_nullishCoalesce(r,()=>`${h}-trigger`),onKeyDown:e=>{_optionalChain([o,"optionalCall",a=>a(e)]),e.defaultPrevented||"Escape"!==e.key||(e.preventDefault(),p(null),_optionalChain([document,"access",e=>e.getElementById,"call",e=>e(`${h}-trigger`),"optionalAccess",e=>e.focus,"call",e=>e()]))},onAnimationEnd:e=>{b(e),_optionalChain([i,"optionalCall",a=>a(e)])},className:t.cn.call(void 0,"py-[calc(var(--content-gap)*0.25)] [border-radius:var(--radius-panel)]",x?"absolute left-0 top-full z-50 mt-1 min-w-40 border border-border-base shadow-lg":"static m-0 min-w-0 border-0 shadow-none",x&&"default"===u.tone?"bg-[var(--ug-overlay-surface)]":"bg-surface-1",e),"data-ug-slot":"content","data-state":g,...c,children:a})}):null});return e.displayName="NavigationMenuContent",e})();var pe=n.cva.call(void 0,"relative flex gap-3 rounded-[var(--radius-panel)] border-l-4 p-[var(--content-gap)]",{variants:{variant:{default:"border-l-primary bg-primary-soft text-primary-soft-fg",info:"border-l-info bg-info-soft text-info-soft-fg",success:"border-l-success bg-success-soft text-success-soft-fg",warning:"border-l-warning bg-warning-soft text-warning-soft-fg",destructive:"border-l-danger bg-danger-soft text-danger-soft-fg"}},defaultVariants:{variant:"default"}}),he={default:i.Info,info:i.Info,success:i.CheckCircle,warning:i.AlertTriangle,destructive:i.AlertCircle},fe={default:"text-primary",info:"text-info",success:"text-success",warning:"text-warning",destructive:"text-danger"},me=o.forwardRef.call(void 0,({variant:e="default",className:a,children:l,role:o,...i},n)=>{const r=he[_nullishCoalesce(e,()=>"default")],c=fe[_nullishCoalesce(e,()=>"default")],d=_nullishCoalesce(o,()=>"warning"===e||"destructive"===e?"alert":"status");return s.jsxs.call(void 0,"div",{ref:n,role:d,...i,className:t.cn.call(void 0,pe({variant:e}),a),"data-ug":"alert","data-state":"default","data-variant":_nullishCoalesce(e,()=>"default"),"data-size":"md",children:[s.jsx.call(void 0,r,{"aria-hidden":"true",focusable:"false","data-ug-slot":"icon",size:18,className:t.cn.call(void 0,"mt-0.5 shrink-0",c)}),s.jsx.call(void 0,"div",{"data-ug-slot":"content",className:"flex min-w-0 flex-1 flex-col gap-0.5 [overflow-wrap:anywhere]",children:l})]})}),ge=o.forwardRef.call(void 0,({className:e,...a},l)=>s.jsx.call(void 0,"p",{ref:l,...a,className:t.cn.call(void 0,"text-sm font-semibold leading-5",e),"data-ug-slot":"title"})),be=o.forwardRef.call(void 0,({className:e,...a},l)=>s.jsx.call(void 0,"p",{ref:l,...a,className:t.cn.call(void 0,"text-sm leading-5 opacity-90",e),"data-ug-slot":"description"}));me.displayName="Alert",ge.displayName="AlertTitle",be.displayName="AlertDescription";var xe={sm:"min-h-[calc(var(--control-height-sm)*2)] px-[var(--control-padding-x-sm)] py-1.5 text-xs",default:"min-h-[calc(var(--control-height-md)*2)] px-[var(--control-padding-x-md)] py-2 text-sm",lg:"min-h-[calc(var(--control-height-lg)*2)] px-[var(--control-padding-x-lg)] py-2.5 text-base"},ye={none:"resize-none",both:"resize",horizontal:"resize-x",vertical:"resize-y"};function normalizeValue(e){return null==e?"":Array.isArray(e)?e.join(","):String(e)}function resizeTextarea(e,a,l){if(!a)return;const t="object"==typeof a?a:{},o=getComputedStyle(e),i=Number.parseFloat(o.lineHeight)||1.5*Number.parseFloat(o.fontSize),n=Number.parseFloat(o.paddingTop)+Number.parseFloat(o.paddingBottom)+Number.parseFloat(o.borderTopWidth)+Number.parseFloat(o.borderBottomWidth),r=Math.max(1,_nullishCoalesce(t.minRows,()=>l)),s=t.maxRows?Math.max(r,t.maxRows):void 0,c=i*r+n,d=s?i*s+n:Number.POSITIVE_INFINITY;e.style.height="auto";const u=Math.min(d,Math.max(c,e.scrollHeight));e.style.height=`${u}px`,e.style.overflowY=e.scrollHeight>d?"auto":"hidden"}var Ce=o.forwardRef.call(void 0,({autosize:e=!1,className:a,clearable:l=!1,clearIcon:n,countCharacters:r,defaultValue:c,disabled:d,error:u,helperText:p,id:h,label:f,maxLength:m,onChange:g,onClear:b,onCompositionEnd:x,onCompositionStart:y,onValueChange:C,readOnly:w=!1,resize:N="vertical",rows:j=3,showWordLimit:_=!1,size:k,value:T,wordLimitPosition:z="inside","aria-describedby":S,"aria-invalid":R,...E},A)=>{const M=t.useUIConfig.call(void 0),I=o.useId.call(void 0),F=_nullishCoalesce(h,()=>I),L=`${F}-message`,P=o.useRef.call(void 0,null),[D,B]=o.useState.call(void 0,()=>normalizeValue(c)),[O,V]=o.useState.call(void 0,!1),K=t.resolveDisabled.call(void 0,d,M.disabled),$=t.resolveControlSize.call(void 0,k,M.size),q=Boolean(u)||t.isAriaInvalid.call(void 0,R),H=e?"object"==typeof e?Math.max(1,_nullishCoalesce(e.minRows,()=>1)):1:j,W=void 0===T?D:normalizeValue(T),U=Boolean(u||p||_&&m),G=v.countTextCharacters.call(void 0,W,r),X=l&&W.length>0&&!K&&!w,Y=Boolean(_&&m&&"inside"===z),J=!e&&"none"!==N,Q=[q&&"invalid",K&&"disabled",w&&"readonly"].filter(Boolean).join(" ")||"default",Z=o.useRef.call(void 0,{defaultValue:c,value:T,autosize:e,resolvedRows:H});return Z.current={defaultValue:c,value:T,autosize:e,resolvedRows:H},o.useEffect.call(void 0,()=>{const e=_optionalChain([P,"access",e=>e.current,"optionalAccess",e=>e.form]);if(!e)return;const a=new Set;function handleReset(l){const t=setTimeout(()=>{a.delete(t);const o=P.current;if(l.defaultPrevented||!o||o.form!==e)return;const i=Z.current,n=normalizeValue(void 0===i.value?i.defaultValue:i.value);V(!1),void 0===i.value&&B(n),o.value=n,resizeTextarea(o,i.autosize,i.resolvedRows)},0);a.add(t)}return e.addEventListener("reset",handleReset),()=>{e.removeEventListener("reset",handleReset);for(const e of a)clearTimeout(e)}},[E.form]),o.useLayoutEffect.call(void 0,()=>{P.current&&resizeTextarea(P.current,e,H)},[e,W,H]),s.jsxs.call(void 0,"div",{className:"flex min-w-0 flex-col gap-1","data-size":$,"data-state":Q,"data-ug":"textarea","data-ug-slot":"root","data-variant":e?"autosize":N,children:[f?s.jsx.call(void 0,"label",{className:"min-w-0 text-sm font-medium text-text-primary [overflow-wrap:anywhere]","data-ug-slot":"label",htmlFor:F,children:f}):null,s.jsxs.call(void 0,"div",{className:"relative min-w-0","data-ug-slot":"wrapper",children:[s.jsx.call(void 0,"textarea",{...E,ref:function setTextareaRef(e){P.current=e,function assignRef5(e,a){"function"==typeof e?e(a):e&&(e.current=a)}(A,e)},"aria-describedby":_nullishCoalesce(S,()=>U?L:void 0),"aria-invalid":_nullishCoalesce(R,()=>!!u||void 0),className:t.cn.call(void 0,"block w-full border bg-surface-1 text-text-primary placeholder:text-text-tertiary [border-radius:var(--radius-control)]",xe[$],e?"resize-none":ye[N],Y&&(J?"pb-11":"pb-7"),X&&"pr-9","transition-[background,border-color,box-shadow] duration-[var(--motion-duration-state)] ease-[var(--motion-easing-state)] motion-reduce:transition-none","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-1","disabled:cursor-not-allowed disabled:opacity-50",w&&"bg-surface-2",q?"border-danger focus-visible:ring-danger/30":"border-border-base hover:border-border-strong focus-visible:border-primary focus-visible:ring-ring/30",a),"data-ug-slot":"control","data-clearable":X?"true":void 0,disabled:K,id:F,maxLength:r?void 0:m,onChange:function handleChange(a){const l=a.currentTarget.value,t=O||a.nativeEvent.isComposing?l:v.limitTextByCount.call(void 0,l,m,r);t!==a.currentTarget.value&&(a.currentTarget.value=t),B(t),_optionalChain([C,"optionalCall",e=>e(t)]),resizeTextarea(a.currentTarget,e,j),_optionalChain([g,"optionalCall",e=>e(a)])},onCompositionEnd:function handleCompositionEnd(a){V(!1);const l=v.limitTextByCount.call(void 0,a.currentTarget.value,m,r);l!==a.currentTarget.value&&(a.currentTarget.value=l),B(l),_optionalChain([C,"optionalCall",e=>e(l)]),resizeTextarea(a.currentTarget,e,j),_optionalChain([x,"optionalCall",e=>e(a)])},onCompositionStart:function handleCompositionStart(e){V(!0),_optionalChain([y,"optionalCall",a=>a(e)])},readOnly:w,rows:H,value:W}),X?s.jsx.call(void 0,"button",{"aria-label":"清空输入","aria-controls":F,className:"absolute right-2 top-2 inline-flex size-7 items-center justify-center rounded-[var(--radius-control)] text-text-secondary hover:bg-surface-2 hover:text-text-primary","data-ug-slot":"clear",onClick:function handleClear(){B(""),_optionalChain([C,"optionalCall",e=>e("")]),_optionalChain([b,"optionalCall",e=>e()]),_optionalChain([P,"access",e=>e.current,"optionalAccess",e=>e.focus,"call",e=>e()])},type:"button",children:_nullishCoalesce(n,()=>s.jsx.call(void 0,i.X,{"aria-hidden":"true",size:14}))}):null,Y?s.jsxs.call(void 0,"span",{"aria-hidden":"true",className:t.cn.call(void 0,"pointer-events-none absolute right-3 text-xs tabular-nums text-text-tertiary",J?"bottom-6":"bottom-2"),"data-ug-slot":"count",children:[G,"/",m]}):null]}),_&&m&&"outside"===z?s.jsxs.call(void 0,"span",{"aria-hidden":"true",className:"self-end text-xs tabular-nums text-text-tertiary","data-ug-slot":"count",children:[G,"/",m]}):null,u?s.jsx.call(void 0,"p",{id:L,className:"min-w-0 text-xs text-danger [overflow-wrap:anywhere]","data-ug-slot":"message",children:u}):null,!u&&p?s.jsx.call(void 0,"p",{id:L,className:"min-w-0 text-xs text-text-secondary [overflow-wrap:anywhere]","data-ug-slot":"message",children:p}):null]})});Ce.displayName="Textarea";var we=n.cva.call(void 0,"animate-pulse bg-surface-3 motion-reduce:animate-none",{variants:{variant:{text:"w-full [height:calc(var(--control-height-sm)*0.5)] [border-radius:calc(var(--radius-control)*0.5)]",circle:"[border-radius:calc(var(--radius-overlay)*999)]",rect:"[border-radius:var(--radius-panel)]"}},defaultVariants:{variant:"rect"}}),Ne=o.forwardRef.call(void 0,({variant:e,className:a,...l},o)=>{const i=_nullishCoalesce(e,()=>"rect");return s.jsx.call(void 0,"div",{ref:o,...l,className:t.cn.call(void 0,we({variant:e}),a),"aria-hidden":"true","data-ug":"skeleton","data-ug-slot":"placeholder","data-state":"loading","data-variant":i,"data-size":"md"})});Ne.displayName="Skeleton",exports.useFloatingLayoutObserver=useFloatingLayoutObserver,exports.usePresence=usePresence,exports.usePortalContainer=usePortalContainer,exports.checkboxVariants=c,exports.Checkbox=d,exports.Select=g,exports.useEscapeKey=useEscapeKey,exports.OverlayFocusScope=b,exports.useOverlayFocus=useOverlayFocus,exports.Modal=y,exports.ModalContent=C,exports.ModalHeader=w,exports.ModalBody=N,exports.ModalTitle=j,exports.ModalFooter=_,exports.ModalCloseButton=k,exports.Fieldset=z,exports.FieldsetLegend=S,exports.FieldsetDescription=R,exports.EmptyState=A,exports.Table=M,exports.TableHeader=I,exports.TableBody=F,exports.TableRow=L,exports.TableHead=P,exports.TableCell=D,exports.Tooltip=K,exports.TooltipTrigger=$,exports.TooltipContent=H,exports.Sidebar=U,exports.Pagination=G,exports.CheckboxGroup=X,exports.Radio=Q,exports.RadioGroup=Z,exports.Tabs=le,exports.TabsList=te,exports.TabsTrigger=oe,exports.TabsContent=ie,exports.NavigationMenu=se,exports.NavigationMenuItem=ce,exports.NavigationMenuLink=de,exports.NavigationMenuTrigger=ue,exports.NavigationMenuContent=ve,exports.Alert=me,exports.AlertTitle=ge,exports.AlertDescription=be,exports.Textarea=Ce,exports.Skeleton=Ne;//# sourceMappingURL=chunk-JY5S7YLF.cjs.map
|