@mohou/ui 1.0.20
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/README.md +10 -0
- package/lib/types/blocks/activity-feed.d.ts +12 -0
- package/lib/types/blocks/activity-feed.d.ts.map +1 -0
- package/lib/types/blocks/app-shell.d.ts +17 -0
- package/lib/types/blocks/app-shell.d.ts.map +1 -0
- package/lib/types/blocks/attachment-gallery.d.ts +15 -0
- package/lib/types/blocks/attachment-gallery.d.ts.map +1 -0
- package/lib/types/blocks/bar-chart.d.ts +19 -0
- package/lib/types/blocks/bar-chart.d.ts.map +1 -0
- package/lib/types/blocks/comment-thread.d.ts +17 -0
- package/lib/types/blocks/comment-thread.d.ts.map +1 -0
- package/lib/types/blocks/dashboard-shell.d.ts +35 -0
- package/lib/types/blocks/dashboard-shell.d.ts.map +1 -0
- package/lib/types/blocks/description-list.d.ts +14 -0
- package/lib/types/blocks/description-list.d.ts.map +1 -0
- package/lib/types/blocks/detail-panel.d.ts +16 -0
- package/lib/types/blocks/detail-panel.d.ts.map +1 -0
- package/lib/types/blocks/donut-chart.d.ts +21 -0
- package/lib/types/blocks/donut-chart.d.ts.map +1 -0
- package/lib/types/blocks/env-badge.d.ts +11 -0
- package/lib/types/blocks/env-badge.d.ts.map +1 -0
- package/lib/types/blocks/env-table.d.ts +29 -0
- package/lib/types/blocks/env-table.d.ts.map +1 -0
- package/lib/types/blocks/file-tree.d.ts +12 -0
- package/lib/types/blocks/file-tree.d.ts.map +1 -0
- package/lib/types/blocks/filter-bar.d.ts +15 -0
- package/lib/types/blocks/filter-bar.d.ts.map +1 -0
- package/lib/types/blocks/form-sheet.d.ts +47 -0
- package/lib/types/blocks/form-sheet.d.ts.map +1 -0
- package/lib/types/blocks/gauge.d.ts +14 -0
- package/lib/types/blocks/gauge.d.ts.map +1 -0
- package/lib/types/blocks/list-detail.d.ts +42 -0
- package/lib/types/blocks/list-detail.d.ts.map +1 -0
- package/lib/types/blocks/notification-center.d.ts +16 -0
- package/lib/types/blocks/notification-center.d.ts.map +1 -0
- package/lib/types/blocks/page-header.d.ts +15 -0
- package/lib/types/blocks/page-header.d.ts.map +1 -0
- package/lib/types/blocks/progress-ring.d.ts +13 -0
- package/lib/types/blocks/progress-ring.d.ts.map +1 -0
- package/lib/types/blocks/radar-chart.d.ts +19 -0
- package/lib/types/blocks/radar-chart.d.ts.map +1 -0
- package/lib/types/blocks/request-inspector.d.ts +14 -0
- package/lib/types/blocks/request-inspector.d.ts.map +1 -0
- package/lib/types/blocks/reveal.d.ts +30 -0
- package/lib/types/blocks/reveal.d.ts.map +1 -0
- package/lib/types/blocks/run-timeline.d.ts +12 -0
- package/lib/types/blocks/run-timeline.d.ts.map +1 -0
- package/lib/types/blocks/scrollspy.d.ts +15 -0
- package/lib/types/blocks/scrollspy.d.ts.map +1 -0
- package/lib/types/blocks/settings-split.d.ts +47 -0
- package/lib/types/blocks/settings-split.d.ts.map +1 -0
- package/lib/types/blocks/severity-chip.d.ts +23 -0
- package/lib/types/blocks/severity-chip.d.ts.map +1 -0
- package/lib/types/blocks/sparkline.d.ts +14 -0
- package/lib/types/blocks/sparkline.d.ts.map +1 -0
- package/lib/types/blocks/stat-card.d.ts +17 -0
- package/lib/types/blocks/stat-card.d.ts.map +1 -0
- package/lib/types/blocks/status-badge.d.ts +21 -0
- package/lib/types/blocks/status-badge.d.ts.map +1 -0
- package/lib/types/blocks/table-page.d.ts +35 -0
- package/lib/types/blocks/table-page.d.ts.map +1 -0
- package/lib/types/blocks/terminal.d.ts +12 -0
- package/lib/types/blocks/terminal.d.ts.map +1 -0
- package/lib/types/blocks/test-step-list.d.ts +17 -0
- package/lib/types/blocks/test-step-list.d.ts.map +1 -0
- package/lib/types/blocks/trend-card.d.ts +20 -0
- package/lib/types/blocks/trend-card.d.ts.map +1 -0
- package/lib/types/blocks/wizard-shell.d.ts +47 -0
- package/lib/types/blocks/wizard-shell.d.ts.map +1 -0
- package/lib/types/components/accordion.d.ts +14 -0
- package/lib/types/components/accordion.d.ts.map +1 -0
- package/lib/types/components/alert-dialog.d.ts +26 -0
- package/lib/types/components/alert-dialog.d.ts.map +1 -0
- package/lib/types/components/alert.d.ts +18 -0
- package/lib/types/components/alert.d.ts.map +1 -0
- package/lib/types/components/aspect-ratio.d.ts +9 -0
- package/lib/types/components/aspect-ratio.d.ts.map +1 -0
- package/lib/types/components/attachment.d.ts +28 -0
- package/lib/types/components/attachment.d.ts.map +1 -0
- package/lib/types/components/avatar.d.ts +16 -0
- package/lib/types/components/avatar.d.ts.map +1 -0
- package/lib/types/components/badge.d.ts +15 -0
- package/lib/types/components/badge.d.ts.map +1 -0
- package/lib/types/components/breadcrumb.d.ts +15 -0
- package/lib/types/components/breadcrumb.d.ts.map +1 -0
- package/lib/types/components/bubble.d.ts +21 -0
- package/lib/types/components/bubble.d.ts.map +1 -0
- package/lib/types/components/button-group.d.ts +17 -0
- package/lib/types/components/button-group.d.ts.map +1 -0
- package/lib/types/components/button.d.ts +16 -0
- package/lib/types/components/button.d.ts.map +1 -0
- package/lib/types/components/calendar.d.ts +15 -0
- package/lib/types/components/calendar.d.ts.map +1 -0
- package/lib/types/components/card.d.ts +19 -0
- package/lib/types/components/card.d.ts.map +1 -0
- package/lib/types/components/chart.d.ts +52 -0
- package/lib/types/components/chart.d.ts.map +1 -0
- package/lib/types/components/checkbox.d.ts +9 -0
- package/lib/types/components/checkbox.d.ts.map +1 -0
- package/lib/types/components/collapsible.d.ts +10 -0
- package/lib/types/components/collapsible.d.ts.map +1 -0
- package/lib/types/components/combobox.d.ts +29 -0
- package/lib/types/components/combobox.d.ts.map +1 -0
- package/lib/types/components/command.d.ts +26 -0
- package/lib/types/components/command.d.ts.map +1 -0
- package/lib/types/components/context-menu.d.ts +34 -0
- package/lib/types/components/context-menu.d.ts.map +1 -0
- package/lib/types/components/dialog.d.ts +30 -0
- package/lib/types/components/dialog.d.ts.map +1 -0
- package/lib/types/components/drawer.d.ts +21 -0
- package/lib/types/components/drawer.d.ts.map +1 -0
- package/lib/types/components/dropdown-menu.d.ts +37 -0
- package/lib/types/components/dropdown-menu.d.ts.map +1 -0
- package/lib/types/components/empty.d.ts +24 -0
- package/lib/types/components/empty.d.ts.map +1 -0
- package/lib/types/components/field.d.ts +31 -0
- package/lib/types/components/field.d.ts.map +1 -0
- package/lib/types/components/hover-card.d.ts +10 -0
- package/lib/types/components/hover-card.d.ts.map +1 -0
- package/lib/types/components/input-group.d.ts +23 -0
- package/lib/types/components/input-group.d.ts.map +1 -0
- package/lib/types/components/input.d.ts +11 -0
- package/lib/types/components/input.d.ts.map +1 -0
- package/lib/types/components/item.d.ts +27 -0
- package/lib/types/components/item.d.ts.map +1 -0
- package/lib/types/components/kbd.d.ts +8 -0
- package/lib/types/components/kbd.d.ts.map +1 -0
- package/lib/types/components/label.d.ts +11 -0
- package/lib/types/components/label.d.ts.map +1 -0
- package/lib/types/components/marker.d.ts +15 -0
- package/lib/types/components/marker.d.ts.map +1 -0
- package/lib/types/components/menubar.d.ts +34 -0
- package/lib/types/components/menubar.d.ts.map +1 -0
- package/lib/types/components/message-scroller.d.ts +15 -0
- package/lib/types/components/message-scroller.d.ts.map +1 -0
- package/lib/types/components/message.d.ts +15 -0
- package/lib/types/components/message.d.ts.map +1 -0
- package/lib/types/components/native-select.d.ts +13 -0
- package/lib/types/components/native-select.d.ts.map +1 -0
- package/lib/types/components/navigation-menu.d.ts +16 -0
- package/lib/types/components/navigation-menu.d.ts.map +1 -0
- package/lib/types/components/pagination.d.ts +22 -0
- package/lib/types/components/pagination.d.ts.map +1 -0
- package/lib/types/components/popover.d.ts +17 -0
- package/lib/types/components/popover.d.ts.map +1 -0
- package/lib/types/components/progress.d.ts +15 -0
- package/lib/types/components/progress.d.ts.map +1 -0
- package/lib/types/components/questionnaire.d.ts +24 -0
- package/lib/types/components/questionnaire.d.ts.map +1 -0
- package/lib/types/components/radio-group.d.ts +10 -0
- package/lib/types/components/radio-group.d.ts.map +1 -0
- package/lib/types/components/resizable.d.ts +15 -0
- package/lib/types/components/resizable.d.ts.map +1 -0
- package/lib/types/components/scroll-area.d.ts +9 -0
- package/lib/types/components/scroll-area.d.ts.map +1 -0
- package/lib/types/components/select.d.ts +23 -0
- package/lib/types/components/select.d.ts.map +1 -0
- package/lib/types/components/separator.d.ts +9 -0
- package/lib/types/components/separator.d.ts.map +1 -0
- package/lib/types/components/sheet.d.ts +28 -0
- package/lib/types/components/sheet.d.ts.map +1 -0
- package/lib/types/components/sidebar.d.ts +68 -0
- package/lib/types/components/sidebar.d.ts.map +1 -0
- package/lib/types/components/skeleton.d.ts +10 -0
- package/lib/types/components/skeleton.d.ts.map +1 -0
- package/lib/types/components/slider.d.ts +8 -0
- package/lib/types/components/slider.d.ts.map +1 -0
- package/lib/types/components/spinner.d.ts +9 -0
- package/lib/types/components/spinner.d.ts.map +1 -0
- package/lib/types/components/switch.d.ts +13 -0
- package/lib/types/components/switch.d.ts.map +1 -0
- package/lib/types/components/table.d.ts +18 -0
- package/lib/types/components/table.d.ts.map +1 -0
- package/lib/types/components/tabs.d.ts +18 -0
- package/lib/types/components/tabs.d.ts.map +1 -0
- package/lib/types/components/textarea.d.ts +11 -0
- package/lib/types/components/textarea.d.ts.map +1 -0
- package/lib/types/components/toast.d.ts +35 -0
- package/lib/types/components/toast.d.ts.map +1 -0
- package/lib/types/components/toggle-group.d.ts +16 -0
- package/lib/types/components/toggle-group.d.ts.map +1 -0
- package/lib/types/components/toggle.d.ts +13 -0
- package/lib/types/components/toggle.d.ts.map +1 -0
- package/lib/types/components/tooltip.d.ts +14 -0
- package/lib/types/components/tooltip.d.ts.map +1 -0
- package/lib/types/composites/autocomplete.d.ts +15 -0
- package/lib/types/composites/autocomplete.d.ts.map +1 -0
- package/lib/types/composites/cascader.d.ts +18 -0
- package/lib/types/composites/cascader.d.ts.map +1 -0
- package/lib/types/composites/color-picker.d.ts +12 -0
- package/lib/types/composites/color-picker.d.ts.map +1 -0
- package/lib/types/composites/confirm-dialog.d.ts +17 -0
- package/lib/types/composites/confirm-dialog.d.ts.map +1 -0
- package/lib/types/composites/copyable.d.ts +12 -0
- package/lib/types/composites/copyable.d.ts.map +1 -0
- package/lib/types/composites/currency-input.d.ts +13 -0
- package/lib/types/composites/currency-input.d.ts.map +1 -0
- package/lib/types/composites/date-chrome.d.ts +8 -0
- package/lib/types/composites/date-chrome.d.ts.map +1 -0
- package/lib/types/composites/date-picker.d.ts +17 -0
- package/lib/types/composites/date-picker.d.ts.map +1 -0
- package/lib/types/composites/date-range-picker.d.ts +18 -0
- package/lib/types/composites/date-range-picker.d.ts.map +1 -0
- package/lib/types/composites/date-time-picker.d.ts +18 -0
- package/lib/types/composites/date-time-picker.d.ts.map +1 -0
- package/lib/types/composites/date-time-range-picker.d.ts +17 -0
- package/lib/types/composites/date-time-range-picker.d.ts.map +1 -0
- package/lib/types/composites/duration-input.d.ts +14 -0
- package/lib/types/composites/duration-input.d.ts.map +1 -0
- package/lib/types/composites/live-refresh.d.ts +46 -0
- package/lib/types/composites/live-refresh.d.ts.map +1 -0
- package/lib/types/composites/mini-calendar.d.ts +13 -0
- package/lib/types/composites/mini-calendar.d.ts.map +1 -0
- package/lib/types/composites/number-field.d.ts +15 -0
- package/lib/types/composites/number-field.d.ts.map +1 -0
- package/lib/types/composites/password-field.d.ts +13 -0
- package/lib/types/composites/password-field.d.ts.map +1 -0
- package/lib/types/composites/phone-input.d.ts +12 -0
- package/lib/types/composites/phone-input.d.ts.map +1 -0
- package/lib/types/composites/rating.d.ts +13 -0
- package/lib/types/composites/rating.d.ts.map +1 -0
- package/lib/types/composites/relative-date-picker.d.ts +16 -0
- package/lib/types/composites/relative-date-picker.d.ts.map +1 -0
- package/lib/types/composites/search-input.d.ts +16 -0
- package/lib/types/composites/search-input.d.ts.map +1 -0
- package/lib/types/composites/slider-range.d.ts +14 -0
- package/lib/types/composites/slider-range.d.ts.map +1 -0
- package/lib/types/composites/tag-input.d.ts +14 -0
- package/lib/types/composites/tag-input.d.ts.map +1 -0
- package/lib/types/composites/time-picker.d.ts +28 -0
- package/lib/types/composites/time-picker.d.ts.map +1 -0
- package/lib/types/composites/time-range-picker.d.ts +16 -0
- package/lib/types/composites/time-range-picker.d.ts.map +1 -0
- package/lib/types/composites/timezone-select.d.ts +22 -0
- package/lib/types/composites/timezone-select.d.ts.map +1 -0
- package/lib/types/composites/transfer.d.ts +17 -0
- package/lib/types/composites/transfer.d.ts.map +1 -0
- package/lib/types/composites/user-picker.d.ts +17 -0
- package/lib/types/composites/user-picker.d.ts.map +1 -0
- package/lib/types/hooks/use-html-dark.d.ts +4 -0
- package/lib/types/hooks/use-html-dark.d.ts.map +1 -0
- package/lib/types/hooks/use-mobile.d.ts +2 -0
- package/lib/types/hooks/use-mobile.d.ts.map +1 -0
- package/lib/types/i18n/context.d.ts +310 -0
- package/lib/types/i18n/context.d.ts.map +1 -0
- package/lib/types/i18n/en.d.ts +290 -0
- package/lib/types/i18n/en.d.ts.map +1 -0
- package/lib/types/i18n/zh.d.ts +3 -0
- package/lib/types/i18n/zh.d.ts.map +1 -0
- package/lib/types/index.d.ts +151 -0
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/lib/clipboard.d.ts +3 -0
- package/lib/types/lib/clipboard.d.ts.map +1 -0
- package/lib/types/lib/defined.d.ts +3 -0
- package/lib/types/lib/defined.d.ts.map +1 -0
- package/lib/types/lib/icons.d.ts +16 -0
- package/lib/types/lib/icons.d.ts.map +1 -0
- package/lib/types/lib/illustrations.d.ts +18 -0
- package/lib/types/lib/illustrations.d.ts.map +1 -0
- package/lib/types/lib/utils.d.ts +3 -0
- package/lib/types/lib/utils.d.ts.map +1 -0
- package/lib/types/products/cells.d.ts +13 -0
- package/lib/types/products/cells.d.ts.map +1 -0
- package/lib/types/products/code-block.d.ts +14 -0
- package/lib/types/products/code-block.d.ts.map +1 -0
- package/lib/types/products/code-editor.d.ts +21 -0
- package/lib/types/products/code-editor.d.ts.map +1 -0
- package/lib/types/products/commit-graph.d.ts +38 -0
- package/lib/types/products/commit-graph.d.ts.map +1 -0
- package/lib/types/products/data-grid.d.ts +79 -0
- package/lib/types/products/data-grid.d.ts.map +1 -0
- package/lib/types/products/diff-viewer.d.ts +15 -0
- package/lib/types/products/diff-viewer.d.ts.map +1 -0
- package/lib/types/products/event-calendar.d.ts +23 -0
- package/lib/types/products/event-calendar.d.ts.map +1 -0
- package/lib/types/products/export-csv.d.ts +2 -0
- package/lib/types/products/export-csv.d.ts.map +1 -0
- package/lib/types/products/file-dropzone.d.ts +12 -0
- package/lib/types/products/file-dropzone.d.ts.map +1 -0
- package/lib/types/products/full-calendar/animations.d.ts +12 -0
- package/lib/types/products/full-calendar/animations.d.ts.map +1 -0
- package/lib/types/products/full-calendar/calendar-body.d.ts +2 -0
- package/lib/types/products/full-calendar/calendar-body.d.ts.map +1 -0
- package/lib/types/products/full-calendar/constants.d.ts +3 -0
- package/lib/types/products/full-calendar/constants.d.ts.map +1 -0
- package/lib/types/products/full-calendar/contexts/calendar-context.d.ts +42 -0
- package/lib/types/products/full-calendar/contexts/calendar-context.d.ts.map +1 -0
- package/lib/types/products/full-calendar/contexts/dnd-context.d.ts +16 -0
- package/lib/types/products/full-calendar/contexts/dnd-context.d.ts.map +1 -0
- package/lib/types/products/full-calendar/dialogs/add-edit-event-dialog.d.ts +21 -0
- package/lib/types/products/full-calendar/dialogs/add-edit-event-dialog.d.ts.map +1 -0
- package/lib/types/products/full-calendar/dialogs/delete-event-dialog.d.ts +4 -0
- package/lib/types/products/full-calendar/dialogs/delete-event-dialog.d.ts.map +1 -0
- package/lib/types/products/full-calendar/dialogs/event-details-dialog.d.ts +7 -0
- package/lib/types/products/full-calendar/dialogs/event-details-dialog.d.ts.map +1 -0
- package/lib/types/products/full-calendar/dialogs/events-list-dialog.d.ts +9 -0
- package/lib/types/products/full-calendar/dialogs/events-list-dialog.d.ts.map +1 -0
- package/lib/types/products/full-calendar/dnd/draggable-event.d.ts +11 -0
- package/lib/types/products/full-calendar/dnd/draggable-event.d.ts.map +1 -0
- package/lib/types/products/full-calendar/dnd/droppable-area.d.ts +11 -0
- package/lib/types/products/full-calendar/dnd/droppable-area.d.ts.map +1 -0
- package/lib/types/products/full-calendar/dnd/resizable-event.d.ts +10 -0
- package/lib/types/products/full-calendar/dnd/resizable-event.d.ts.map +1 -0
- package/lib/types/products/full-calendar/header/calendar-header.d.ts +2 -0
- package/lib/types/products/full-calendar/header/calendar-header.d.ts.map +1 -0
- package/lib/types/products/full-calendar/header/date-navigator.d.ts +9 -0
- package/lib/types/products/full-calendar/header/date-navigator.d.ts.map +1 -0
- package/lib/types/products/full-calendar/header/filter.d.ts +2 -0
- package/lib/types/products/full-calendar/header/filter.d.ts.map +1 -0
- package/lib/types/products/full-calendar/header/today-button.d.ts +2 -0
- package/lib/types/products/full-calendar/header/today-button.d.ts.map +1 -0
- package/lib/types/products/full-calendar/header/user-select.d.ts +2 -0
- package/lib/types/products/full-calendar/header/user-select.d.ts.map +1 -0
- package/lib/types/products/full-calendar/header/view-tabs.d.ts +4 -0
- package/lib/types/products/full-calendar/header/view-tabs.d.ts.map +1 -0
- package/lib/types/products/full-calendar/helpers.d.ts +42 -0
- package/lib/types/products/full-calendar/helpers.d.ts.map +1 -0
- package/lib/types/products/full-calendar/hooks/use-time-range-create.d.ts +25 -0
- package/lib/types/products/full-calendar/hooks/use-time-range-create.d.ts.map +1 -0
- package/lib/types/products/full-calendar/hooks.d.ts +11 -0
- package/lib/types/products/full-calendar/hooks.d.ts.map +1 -0
- package/lib/types/products/full-calendar/interfaces.d.ts +21 -0
- package/lib/types/products/full-calendar/interfaces.d.ts.map +1 -0
- package/lib/types/products/full-calendar/settings/settings.d.ts +2 -0
- package/lib/types/products/full-calendar/settings/settings.d.ts.map +1 -0
- package/lib/types/products/full-calendar/shims/avatar-group.d.ts +7 -0
- package/lib/types/products/full-calendar/shims/avatar-group.d.ts.map +1 -0
- package/lib/types/products/full-calendar/shims/day-picker.d.ts +2 -0
- package/lib/types/products/full-calendar/shims/day-picker.d.ts.map +1 -0
- package/lib/types/products/full-calendar/shims/motion.d.ts +32 -0
- package/lib/types/products/full-calendar/shims/motion.d.ts.map +1 -0
- package/lib/types/products/full-calendar/shims/next-themes.d.ts +5 -0
- package/lib/types/products/full-calendar/shims/next-themes.d.ts.map +1 -0
- package/lib/types/products/full-calendar/shims/re-resizable.d.ts +19 -0
- package/lib/types/products/full-calendar/shims/re-resizable.d.ts.map +1 -0
- package/lib/types/products/full-calendar/shims/sonner.d.ts +5 -0
- package/lib/types/products/full-calendar/shims/sonner.d.ts.map +1 -0
- package/lib/types/products/full-calendar/types.d.ts +3 -0
- package/lib/types/products/full-calendar/types.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/agenda-view/agenda-events.d.ts +3 -0
- package/lib/types/products/full-calendar/views/agenda-view/agenda-events.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/month-view/calendar-month-view.d.ts +8 -0
- package/lib/types/products/full-calendar/views/month-view/calendar-month-view.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/month-view/day-cell.d.ts +12 -0
- package/lib/types/products/full-calendar/views/month-view/day-cell.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/month-view/event-bullet.d.ts +6 -0
- package/lib/types/products/full-calendar/views/month-view/event-bullet.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/month-view/month-event-badge.d.ts +17 -0
- package/lib/types/products/full-calendar/views/month-view/month-event-badge.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/calendar-day-view.d.ts +8 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/calendar-day-view.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/calendar-time-line.d.ts +2 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/calendar-time-line.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/calendar-week-view.d.ts +8 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/calendar-week-view.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/day-view-multi-day-events-row.d.ts +8 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/day-view-multi-day-events-row.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/event-block.d.ts +12 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/event-block.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/render-grouped-events.d.ts +8 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/render-grouped-events.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/week-view-multi-day-events-row.d.ts +8 -0
- package/lib/types/products/full-calendar/views/week-and-day-view/week-view-multi-day-events-row.d.ts.map +1 -0
- package/lib/types/products/full-calendar/views/year-view/calendar-year-view.d.ts +8 -0
- package/lib/types/products/full-calendar/views/year-view/calendar-year-view.d.ts.map +1 -0
- package/lib/types/products/gantt.d.ts +17 -0
- package/lib/types/products/gantt.d.ts.map +1 -0
- package/lib/types/products/jira-wiki-parse.d.ts +55 -0
- package/lib/types/products/jira-wiki-parse.d.ts.map +1 -0
- package/lib/types/products/jira-wiki.d.ts +39 -0
- package/lib/types/products/jira-wiki.d.ts.map +1 -0
- package/lib/types/products/jql-input.d.ts +22 -0
- package/lib/types/products/jql-input.d.ts.map +1 -0
- package/lib/types/products/json-viewer.d.ts +12 -0
- package/lib/types/products/json-viewer.d.ts.map +1 -0
- package/lib/types/products/kanban-issue-panel.d.ts +15 -0
- package/lib/types/products/kanban-issue-panel.d.ts.map +1 -0
- package/lib/types/products/kanban.d.ts +43 -0
- package/lib/types/products/kanban.d.ts.map +1 -0
- package/lib/types/products/log-viewer.d.ts +25 -0
- package/lib/types/products/log-viewer.d.ts.map +1 -0
- package/lib/types/products/markdown-editor.d.ts +16 -0
- package/lib/types/products/markdown-editor.d.ts.map +1 -0
- package/lib/types/products/markdown.d.ts +13 -0
- package/lib/types/products/markdown.d.ts.map +1 -0
- package/lib/types/products/rich-text-editor.d.ts +13 -0
- package/lib/types/products/rich-text-editor.d.ts.map +1 -0
- package/lib/types/products/sortable-list.d.ts +16 -0
- package/lib/types/products/sortable-list.d.ts.map +1 -0
- package/lib/types/products/stepper.d.ts +39 -0
- package/lib/types/products/stepper.d.ts.map +1 -0
- package/lib/types/products/timeline.d.ts +17 -0
- package/lib/types/products/timeline.d.ts.map +1 -0
- package/lib/types/products/tree-view.d.ts +17 -0
- package/lib/types/products/tree-view.d.ts.map +1 -0
- package/lib/types/sdk/app-error-boundary.d.ts +33 -0
- package/lib/types/sdk/app-error-boundary.d.ts.map +1 -0
- package/lib/types/sdk/app-id.d.ts +6 -0
- package/lib/types/sdk/app-id.d.ts.map +1 -0
- package/lib/types/sdk/use-app.d.ts +32 -0
- package/lib/types/sdk/use-app.d.ts.map +1 -0
- package/package.json +67 -0
- package/src/blocks/activity-feed.tsx +16 -0
- package/src/blocks/app-shell.tsx +38 -0
- package/src/blocks/attachment-gallery.tsx +36 -0
- package/src/blocks/bar-chart.tsx +46 -0
- package/src/blocks/comment-thread.tsx +37 -0
- package/src/blocks/dashboard-shell.tsx +108 -0
- package/src/blocks/description-list.tsx +23 -0
- package/src/blocks/detail-panel.tsx +43 -0
- package/src/blocks/donut-chart.tsx +54 -0
- package/src/blocks/env-badge.tsx +30 -0
- package/src/blocks/env-table.tsx +315 -0
- package/src/blocks/file-tree.tsx +12 -0
- package/src/blocks/filter-bar.tsx +22 -0
- package/src/blocks/form-sheet.tsx +159 -0
- package/src/blocks/gauge.tsx +36 -0
- package/src/blocks/list-detail.tsx +120 -0
- package/src/blocks/notification-center.tsx +29 -0
- package/src/blocks/page-header.tsx +31 -0
- package/src/blocks/progress-ring.tsx +43 -0
- package/src/blocks/radar-chart.tsx +47 -0
- package/src/blocks/request-inspector.tsx +41 -0
- package/src/blocks/reveal.tsx +56 -0
- package/src/blocks/run-timeline.tsx +12 -0
- package/src/blocks/scrollspy.tsx +48 -0
- package/src/blocks/settings-split.tsx +153 -0
- package/src/blocks/severity-chip.tsx +34 -0
- package/src/blocks/sparkline.tsx +27 -0
- package/src/blocks/stat-card.tsx +50 -0
- package/src/blocks/status-badge.tsx +40 -0
- package/src/blocks/table-page.tsx +82 -0
- package/src/blocks/terminal.tsx +28 -0
- package/src/blocks/test-step-list.tsx +26 -0
- package/src/blocks/trend-card.tsx +57 -0
- package/src/blocks/wizard-shell.tsx +131 -0
- package/src/cdn-modules.d.ts +5 -0
- package/src/components/accordion.tsx +79 -0
- package/src/components/alert-dialog.tsx +192 -0
- package/src/components/alert.tsx +83 -0
- package/src/components/aspect-ratio.tsx +26 -0
- package/src/components/attachment.tsx +211 -0
- package/src/components/avatar.tsx +111 -0
- package/src/components/badge.tsx +59 -0
- package/src/components/breadcrumb.tsx +129 -0
- package/src/components/bubble.tsx +132 -0
- package/src/components/button-group.tsx +93 -0
- package/src/components/button.tsx +65 -0
- package/src/components/calendar.tsx +224 -0
- package/src/components/card.tsx +110 -0
- package/src/components/chart.tsx +378 -0
- package/src/components/checkbox.tsx +33 -0
- package/src/components/collapsible.tsx +23 -0
- package/src/components/combobox.tsx +299 -0
- package/src/components/command.tsx +201 -0
- package/src/components/context-menu.tsx +274 -0
- package/src/components/dialog.tsx +179 -0
- package/src/components/drawer.tsx +230 -0
- package/src/components/dropdown-menu.tsx +274 -0
- package/src/components/empty.tsx +130 -0
- package/src/components/field.tsx +242 -0
- package/src/components/hover-card.tsx +53 -0
- package/src/components/input-group.tsx +161 -0
- package/src/components/input.tsx +27 -0
- package/src/components/item.tsx +205 -0
- package/src/components/kbd.tsx +30 -0
- package/src/components/label.tsx +26 -0
- package/src/components/marker.tsx +75 -0
- package/src/components/menubar.tsx +283 -0
- package/src/components/message-scroller.tsx +133 -0
- package/src/components/message.tsx +96 -0
- package/src/components/native-select.tsx +65 -0
- package/src/components/navigation-menu.tsx +172 -0
- package/src/components/pagination.tsx +138 -0
- package/src/components/popover.tsx +95 -0
- package/src/components/progress.tsx +89 -0
- package/src/components/questionnaire.tsx +332 -0
- package/src/components/radio-group.tsx +40 -0
- package/src/components/resizable.tsx +56 -0
- package/src/components/scroll-area.tsx +56 -0
- package/src/components/select.tsx +207 -0
- package/src/components/separator.tsx +28 -0
- package/src/components/sheet.tsx +158 -0
- package/src/components/sidebar.tsx +725 -0
- package/src/components/skeleton.tsx +20 -0
- package/src/components/slider.tsx +56 -0
- package/src/components/spinner.tsx +16 -0
- package/src/components/switch.tsx +38 -0
- package/src/components/table.tsx +121 -0
- package/src/components/tabs.tsx +88 -0
- package/src/components/textarea.tsx +25 -0
- package/src/components/toast.tsx +273 -0
- package/src/components/toggle-group.tsx +92 -0
- package/src/components/toggle.tsx +47 -0
- package/src/components/tooltip.tsx +72 -0
- package/src/composites/autocomplete.tsx +61 -0
- package/src/composites/cascader.tsx +52 -0
- package/src/composites/color-picker.tsx +25 -0
- package/src/composites/confirm-dialog.tsx +62 -0
- package/src/composites/copyable.tsx +44 -0
- package/src/composites/currency-input.tsx +37 -0
- package/src/composites/date-chrome.tsx +156 -0
- package/src/composites/date-picker.tsx +97 -0
- package/src/composites/date-range-picker.tsx +99 -0
- package/src/composites/date-time-picker.tsx +121 -0
- package/src/composites/date-time-range-picker.tsx +57 -0
- package/src/composites/duration-input.tsx +128 -0
- package/src/composites/live-refresh.tsx +348 -0
- package/src/composites/mini-calendar.tsx +30 -0
- package/src/composites/number-field.tsx +59 -0
- package/src/composites/password-field.tsx +50 -0
- package/src/composites/phone-input.tsx +28 -0
- package/src/composites/rating.tsx +45 -0
- package/src/composites/relative-date-picker.tsx +68 -0
- package/src/composites/search-input.tsx +55 -0
- package/src/composites/slider-range.tsx +36 -0
- package/src/composites/tag-input.tsx +62 -0
- package/src/composites/time-picker.tsx +208 -0
- package/src/composites/time-range-picker.tsx +31 -0
- package/src/composites/timezone-select.tsx +257 -0
- package/src/composites/transfer.tsx +58 -0
- package/src/composites/user-picker.tsx +46 -0
- package/src/hooks/use-html-dark.ts +36 -0
- package/src/hooks/use-mobile.ts +22 -0
- package/src/i18n/context.tsx +71 -0
- package/src/i18n/en.ts +308 -0
- package/src/i18n/zh.ts +290 -0
- package/src/index.ts +151 -0
- package/src/lib/clipboard.ts +10 -0
- package/src/lib/defined.ts +8 -0
- package/src/lib/icons.tsx +16 -0
- package/src/lib/illustrations.tsx +573 -0
- package/src/lib/utils.ts +6 -0
- package/src/products/cells.tsx +18 -0
- package/src/products/code-block.tsx +91 -0
- package/src/products/code-editor.tsx +271 -0
- package/src/products/column-meta.d.ts +9 -0
- package/src/products/commit-graph.tsx +643 -0
- package/src/products/data-grid.tsx +692 -0
- package/src/products/diff-viewer.tsx +224 -0
- package/src/products/event-calendar.tsx +49 -0
- package/src/products/export-csv.ts +26 -0
- package/src/products/file-dropzone.tsx +47 -0
- package/src/products/full-calendar/animations.ts +38 -0
- package/src/products/full-calendar/calendar-body.tsx +76 -0
- package/src/products/full-calendar/constants.ts +10 -0
- package/src/products/full-calendar/contexts/calendar-context.tsx +254 -0
- package/src/products/full-calendar/contexts/dnd-context.tsx +156 -0
- package/src/products/full-calendar/dialogs/add-edit-event-dialog.tsx +186 -0
- package/src/products/full-calendar/dialogs/delete-event-dialog.tsx +39 -0
- package/src/products/full-calendar/dialogs/event-details-dialog.tsx +99 -0
- package/src/products/full-calendar/dialogs/events-list-dialog.tsx +86 -0
- package/src/products/full-calendar/dnd/draggable-event.tsx +45 -0
- package/src/products/full-calendar/dnd/droppable-area.tsx +45 -0
- package/src/products/full-calendar/dnd/resizable-event.tsx +178 -0
- package/src/products/full-calendar/header/calendar-header.tsx +64 -0
- package/src/products/full-calendar/header/date-navigator.tsx +110 -0
- package/src/products/full-calendar/header/filter.tsx +58 -0
- package/src/products/full-calendar/header/today-button.tsx +45 -0
- package/src/products/full-calendar/header/user-select.tsx +64 -0
- package/src/products/full-calendar/header/view-tabs.tsx +36 -0
- package/src/products/full-calendar/helpers.ts +463 -0
- package/src/products/full-calendar/hooks/use-time-range-create.ts +152 -0
- package/src/products/full-calendar/hooks.ts +70 -0
- package/src/products/full-calendar/interfaces.ts +23 -0
- package/src/products/full-calendar/settings/settings.tsx +80 -0
- package/src/products/full-calendar/shims/avatar-group.tsx +16 -0
- package/src/products/full-calendar/shims/day-picker.tsx +1 -0
- package/src/products/full-calendar/shims/motion.tsx +97 -0
- package/src/products/full-calendar/shims/next-themes.ts +6 -0
- package/src/products/full-calendar/shims/re-resizable.tsx +25 -0
- package/src/products/full-calendar/shims/sonner.ts +4 -0
- package/src/products/full-calendar/types.ts +8 -0
- package/src/products/full-calendar/views/agenda-view/agenda-events.tsx +140 -0
- package/src/products/full-calendar/views/month-view/calendar-month-view.tsx +69 -0
- package/src/products/full-calendar/views/month-view/day-cell.tsx +200 -0
- package/src/products/full-calendar/views/month-view/event-bullet.tsx +40 -0
- package/src/products/full-calendar/views/month-view/month-event-badge.tsx +143 -0
- package/src/products/full-calendar/views/week-and-day-view/calendar-day-view.tsx +295 -0
- package/src/products/full-calendar/views/week-and-day-view/calendar-time-line.tsx +35 -0
- package/src/products/full-calendar/views/week-and-day-view/calendar-week-view.tsx +251 -0
- package/src/products/full-calendar/views/week-and-day-view/day-view-multi-day-events-row.tsx +73 -0
- package/src/products/full-calendar/views/week-and-day-view/event-block.tsx +114 -0
- package/src/products/full-calendar/views/week-and-day-view/render-grouped-events.tsx +49 -0
- package/src/products/full-calendar/views/week-and-day-view/week-view-multi-day-events-row.tsx +145 -0
- package/src/products/full-calendar/views/year-view/calendar-year-view.tsx +161 -0
- package/src/products/gantt.tsx +47 -0
- package/src/products/jira-wiki-parse.ts +197 -0
- package/src/products/jira-wiki.tsx +287 -0
- package/src/products/jql-input.tsx +391 -0
- package/src/products/json-viewer.tsx +43 -0
- package/src/products/kanban-issue-panel.tsx +104 -0
- package/src/products/kanban.tsx +245 -0
- package/src/products/log-viewer.tsx +404 -0
- package/src/products/markdown-editor.tsx +77 -0
- package/src/products/markdown.tsx +50 -0
- package/src/products/rich-text-editor.tsx +89 -0
- package/src/products/sortable-list.tsx +67 -0
- package/src/products/stepper.tsx +237 -0
- package/src/products/timeline.tsx +39 -0
- package/src/products/tree-view.tsx +62 -0
- package/src/sdk/app-error-boundary.tsx +240 -0
- package/src/sdk/app-id.ts +7 -0
- package/src/sdk/use-app.ts +43 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
import { Slider } from '@mohou/ui/components/slider'
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Two-thumb range slider.
|
|
6
|
+
* @when min/max numeric filters.
|
|
7
|
+
* @example
|
|
8
|
+
* <SliderRange min={0} max={100} value={[10, 40]} onChange={(v) => set(v)} />
|
|
9
|
+
* @family Form
|
|
10
|
+
*/
|
|
11
|
+
export function SliderRange({
|
|
12
|
+
value = [20, 80],
|
|
13
|
+
onChange,
|
|
14
|
+
min = 0,
|
|
15
|
+
max = 100,
|
|
16
|
+
}: {
|
|
17
|
+
value?: number[]
|
|
18
|
+
onChange?: (value: number[]) => void
|
|
19
|
+
min?: number
|
|
20
|
+
max?: number
|
|
21
|
+
}) {
|
|
22
|
+
return (
|
|
23
|
+
<div className="w-56" data-testid="slider-range">
|
|
24
|
+
<Slider
|
|
25
|
+
value={value}
|
|
26
|
+
min={min}
|
|
27
|
+
max={max}
|
|
28
|
+
onValueChange={next => onChange?.(Array.from(next as number[]))}
|
|
29
|
+
/>
|
|
30
|
+
<div className="mt-1 flex justify-between text-xs text-muted-foreground">
|
|
31
|
+
<span>{value[0]}</span>
|
|
32
|
+
<span>{value[1]}</span>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
)
|
|
36
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
import { X } from 'lucide-react'
|
|
4
|
+
|
|
5
|
+
import { Badge } from '@mohou/ui/components/badge'
|
|
6
|
+
import { Input } from '@mohou/ui/components/input'
|
|
7
|
+
import { useLabels } from '@mohou/ui/i18n/context'
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Chip-style multi-value text input.
|
|
11
|
+
* @when Labels/owners where free values are allowed (`Transfer` when choosing from a fixed pool).
|
|
12
|
+
* @example
|
|
13
|
+
* <TagInput value={tags} onChange={(v) => set(v)} />
|
|
14
|
+
* @family Form
|
|
15
|
+
*/
|
|
16
|
+
export function TagInput({
|
|
17
|
+
value = [],
|
|
18
|
+
onChange,
|
|
19
|
+
placeholder,
|
|
20
|
+
}: {
|
|
21
|
+
value?: string[]
|
|
22
|
+
onChange?: (value: string[]) => void
|
|
23
|
+
placeholder?: string
|
|
24
|
+
}) {
|
|
25
|
+
const t = useLabels('tagInput')
|
|
26
|
+
const [draft, setDraft] = React.useState('')
|
|
27
|
+
const add = () => {
|
|
28
|
+
const next = draft.trim()
|
|
29
|
+
if (!next || value.includes(next)) return
|
|
30
|
+
onChange?.([...value, next])
|
|
31
|
+
setDraft('')
|
|
32
|
+
}
|
|
33
|
+
return (
|
|
34
|
+
<div className="flex flex-col gap-2" data-testid="tag-input">
|
|
35
|
+
<div className="flex flex-wrap gap-1">
|
|
36
|
+
{value.map(tag => (
|
|
37
|
+
<Badge key={tag} variant="secondary" className="gap-1">
|
|
38
|
+
{tag}
|
|
39
|
+
<button
|
|
40
|
+
type="button"
|
|
41
|
+
aria-label={`Remove ${tag}`}
|
|
42
|
+
onClick={() => onChange?.(value.filter(item => item !== tag))}
|
|
43
|
+
>
|
|
44
|
+
<X className="size-3" />
|
|
45
|
+
</button>
|
|
46
|
+
</Badge>
|
|
47
|
+
))}
|
|
48
|
+
</div>
|
|
49
|
+
<Input
|
|
50
|
+
value={draft}
|
|
51
|
+
placeholder={placeholder ?? t.placeholder}
|
|
52
|
+
onChange={event => setDraft(event.target.value)}
|
|
53
|
+
onKeyDown={(event) => {
|
|
54
|
+
if (event.key === 'Enter') {
|
|
55
|
+
event.preventDefault()
|
|
56
|
+
add()
|
|
57
|
+
}
|
|
58
|
+
}}
|
|
59
|
+
/>
|
|
60
|
+
</div>
|
|
61
|
+
)
|
|
62
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
import { ChevronDown } from 'lucide-react'
|
|
4
|
+
|
|
5
|
+
import { Button } from '@mohou/ui/components/button'
|
|
6
|
+
import {
|
|
7
|
+
Popover,
|
|
8
|
+
PopoverContent,
|
|
9
|
+
PopoverTrigger,
|
|
10
|
+
} from '@mohou/ui/components/popover'
|
|
11
|
+
import { cn } from '@mohou/ui/lib/utils'
|
|
12
|
+
|
|
13
|
+
const ITEM_H = 36
|
|
14
|
+
|
|
15
|
+
function pad(n: number) {
|
|
16
|
+
return String(n).padStart(2, '0')
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function parseTime(value: string) {
|
|
20
|
+
const match = /^(\d{1,2}):(\d{1,2})$/.exec(value)
|
|
21
|
+
if (!match) return { hours: 0, minutes: 0 }
|
|
22
|
+
return {
|
|
23
|
+
hours: Math.min(23, Number(match[1])),
|
|
24
|
+
minutes: Math.min(59, Number(match[2])),
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Column wheel for picking a time value.
|
|
30
|
+
* @family Calendar & date
|
|
31
|
+
* @when Inside a time picker where tapping a list beats typing. Prefer `TimePicker` for a normal field.
|
|
32
|
+
*/
|
|
33
|
+
export function TimeWheel({
|
|
34
|
+
values,
|
|
35
|
+
value,
|
|
36
|
+
onChange,
|
|
37
|
+
testId,
|
|
38
|
+
visible = 5,
|
|
39
|
+
className,
|
|
40
|
+
}: {
|
|
41
|
+
values: number[]
|
|
42
|
+
value: number
|
|
43
|
+
onChange: (value: number) => void
|
|
44
|
+
testId: string
|
|
45
|
+
visible?: number
|
|
46
|
+
className?: string
|
|
47
|
+
}) {
|
|
48
|
+
const listRef = React.useRef<HTMLDivElement>(null)
|
|
49
|
+
const padPx = ITEM_H * Math.floor((visible - 1) / 2)
|
|
50
|
+
const index = Math.max(0, values.indexOf(value))
|
|
51
|
+
const armed = React.useRef(false)
|
|
52
|
+
const timer = React.useRef<number>(0)
|
|
53
|
+
|
|
54
|
+
const jump = React.useCallback((i: number) => {
|
|
55
|
+
const list = listRef.current
|
|
56
|
+
if (!list || list.clientHeight === 0) return
|
|
57
|
+
list.scrollTop = i * ITEM_H
|
|
58
|
+
}, [])
|
|
59
|
+
|
|
60
|
+
React.useLayoutEffect(() => {
|
|
61
|
+
armed.current = false
|
|
62
|
+
const list = listRef.current
|
|
63
|
+
if (!list) return
|
|
64
|
+
jump(index)
|
|
65
|
+
const ro = new ResizeObserver(() => jump(index))
|
|
66
|
+
ro.observe(list)
|
|
67
|
+
const t1 = window.setTimeout(() => jump(index), 0)
|
|
68
|
+
const t2 = window.setTimeout(() => jump(index), 32)
|
|
69
|
+
return () => {
|
|
70
|
+
ro.disconnect()
|
|
71
|
+
window.clearTimeout(t1)
|
|
72
|
+
window.clearTimeout(t2)
|
|
73
|
+
}
|
|
74
|
+
}, [index, jump])
|
|
75
|
+
|
|
76
|
+
const commit = () => {
|
|
77
|
+
const list = listRef.current
|
|
78
|
+
if (!list || !armed.current) return
|
|
79
|
+
const next = Math.min(
|
|
80
|
+
values.length - 1,
|
|
81
|
+
Math.max(0, Math.round(list.scrollTop / ITEM_H)),
|
|
82
|
+
)
|
|
83
|
+
jump(next)
|
|
84
|
+
const picked = values[next]
|
|
85
|
+
if (picked != null && picked !== value) onChange(picked)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
return (
|
|
89
|
+
<div
|
|
90
|
+
className={cn('relative w-14', className)}
|
|
91
|
+
style={{ height: ITEM_H * visible }}
|
|
92
|
+
>
|
|
93
|
+
<div className="bg-muted pointer-events-none absolute inset-x-0 top-1/2 z-0 h-9 -translate-y-1/2 rounded-md" />
|
|
94
|
+
<div
|
|
95
|
+
ref={listRef}
|
|
96
|
+
data-testid={testId}
|
|
97
|
+
className="relative z-10 h-full overflow-y-auto [overflow-anchor:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden"
|
|
98
|
+
style={{
|
|
99
|
+
WebkitMaskImage:
|
|
100
|
+
'linear-gradient(to bottom, transparent, black 18%, black 82%, transparent)',
|
|
101
|
+
maskImage:
|
|
102
|
+
'linear-gradient(to bottom, transparent, black 18%, black 82%, transparent)',
|
|
103
|
+
}}
|
|
104
|
+
onPointerDown={() => {
|
|
105
|
+
armed.current = true
|
|
106
|
+
}}
|
|
107
|
+
onScroll={() => {
|
|
108
|
+
if (!armed.current) return
|
|
109
|
+
window.clearTimeout(timer.current)
|
|
110
|
+
timer.current = window.setTimeout(commit, 80)
|
|
111
|
+
}}
|
|
112
|
+
>
|
|
113
|
+
<div style={{ height: padPx }} />
|
|
114
|
+
{values.map((item, i) => (
|
|
115
|
+
<button
|
|
116
|
+
key={item}
|
|
117
|
+
type="button"
|
|
118
|
+
data-selected={item === value || undefined}
|
|
119
|
+
className={cn(
|
|
120
|
+
'flex w-full items-center justify-center text-sm tabular-nums',
|
|
121
|
+
item === value
|
|
122
|
+
? 'font-medium text-foreground'
|
|
123
|
+
: 'text-muted-foreground'
|
|
124
|
+
)}
|
|
125
|
+
style={{ height: ITEM_H }}
|
|
126
|
+
onClick={() => {
|
|
127
|
+
jump(i)
|
|
128
|
+
onChange(item)
|
|
129
|
+
}}
|
|
130
|
+
>
|
|
131
|
+
{pad(item)}
|
|
132
|
+
</button>
|
|
133
|
+
))}
|
|
134
|
+
<div style={{ height: padPx }} />
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
)
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export type TimePickerProps = {
|
|
141
|
+
value?: string
|
|
142
|
+
onChange?: (value: string) => void
|
|
143
|
+
disabled?: boolean
|
|
144
|
+
className?: string
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
/** `value` is `HH:mm` (24h).
|
|
148
|
+
* @when Clock-only fields. `value` is a string, not a Date.
|
|
149
|
+
* @example
|
|
150
|
+
* <TimePicker value="09:30" onChange={(v) => set(v)} />
|
|
151
|
+
* @family Calendar & date
|
|
152
|
+
*/
|
|
153
|
+
export function TimePicker({
|
|
154
|
+
value = '',
|
|
155
|
+
onChange,
|
|
156
|
+
disabled,
|
|
157
|
+
className,
|
|
158
|
+
}: TimePickerProps) {
|
|
159
|
+
const [open, setOpen] = React.useState(false)
|
|
160
|
+
const parsed = parseTime(value)
|
|
161
|
+
const [hours, setHours] = React.useState(parsed.hours)
|
|
162
|
+
const [minutes, setMinutes] = React.useState(parsed.minutes)
|
|
163
|
+
React.useEffect(() => {
|
|
164
|
+
const next = parseTime(value)
|
|
165
|
+
setHours(next.hours)
|
|
166
|
+
setMinutes(next.minutes)
|
|
167
|
+
}, [value])
|
|
168
|
+
const emit = (nextHours: number, nextMinutes: number) => {
|
|
169
|
+
setHours(nextHours)
|
|
170
|
+
setMinutes(nextMinutes)
|
|
171
|
+
onChange?.(`${pad(nextHours)}:${pad(nextMinutes)}`)
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
return (
|
|
175
|
+
<Popover open={open} onOpenChange={setOpen}>
|
|
176
|
+
<PopoverTrigger
|
|
177
|
+
disabled={disabled}
|
|
178
|
+
render={
|
|
179
|
+
<Button
|
|
180
|
+
variant="outline"
|
|
181
|
+
data-testid="time-picker"
|
|
182
|
+
className={cn('w-[120px] justify-between font-normal tabular-nums', className)}
|
|
183
|
+
/>
|
|
184
|
+
}
|
|
185
|
+
>
|
|
186
|
+
<span>{value || '--:--'}</span>
|
|
187
|
+
<ChevronDown className="size-3.5 opacity-50" />
|
|
188
|
+
</PopoverTrigger>
|
|
189
|
+
<PopoverContent align="start" className="w-auto p-2">
|
|
190
|
+
<div className="flex items-center gap-1">
|
|
191
|
+
<TimeWheel
|
|
192
|
+
testId="time-picker-hour"
|
|
193
|
+
values={Array.from({ length: 24 }, (_, i) => i)}
|
|
194
|
+
value={hours}
|
|
195
|
+
onChange={h => emit(h, minutes)}
|
|
196
|
+
/>
|
|
197
|
+
<span className="text-muted-foreground pb-0.5 text-sm font-medium">:</span>
|
|
198
|
+
<TimeWheel
|
|
199
|
+
testId="time-picker-minute"
|
|
200
|
+
values={Array.from({ length: 60 }, (_, i) => i)}
|
|
201
|
+
value={minutes}
|
|
202
|
+
onChange={m => emit(hours, m)}
|
|
203
|
+
/>
|
|
204
|
+
</div>
|
|
205
|
+
</PopoverContent>
|
|
206
|
+
</Popover>
|
|
207
|
+
)
|
|
208
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
|
|
2
|
+
import { TimePicker } from '@mohou/ui/composites/time-picker'
|
|
3
|
+
import { useLabels } from '@mohou/ui/i18n/context'
|
|
4
|
+
|
|
5
|
+
export type TimeRange = { start: string; end: string }
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* From/to time of day.
|
|
9
|
+
* @when Daily windows (maintenance 02:00–04:00).
|
|
10
|
+
* @example
|
|
11
|
+
* <TimeRangePicker onChange={(r) => set(r)} />
|
|
12
|
+
* @family Calendar & date
|
|
13
|
+
*/
|
|
14
|
+
export function TimeRangePicker({
|
|
15
|
+
value,
|
|
16
|
+
onChange,
|
|
17
|
+
}: {
|
|
18
|
+
value?: TimeRange
|
|
19
|
+
onChange?: (value: TimeRange) => void
|
|
20
|
+
}) {
|
|
21
|
+
const t = useLabels('timeRange')
|
|
22
|
+
const start = value?.start ?? ''
|
|
23
|
+
const end = value?.end ?? ''
|
|
24
|
+
return (
|
|
25
|
+
<div className="flex items-center gap-2" data-testid="time-range-picker">
|
|
26
|
+
<TimePicker value={start} onChange={next => onChange?.({ start: next, end })} />
|
|
27
|
+
<span className="text-muted-foreground text-xs">{t.to}</span>
|
|
28
|
+
<TimePicker value={end} onChange={next => onChange?.({ start, end: next })} />
|
|
29
|
+
</div>
|
|
30
|
+
)
|
|
31
|
+
}
|
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
|
|
2
|
+
import * as React from 'react'
|
|
3
|
+
import { ChevronsUpDown } from 'lucide-react'
|
|
4
|
+
|
|
5
|
+
import { Button } from '@mohou/ui/components/button'
|
|
6
|
+
import {
|
|
7
|
+
Command,
|
|
8
|
+
CommandEmpty,
|
|
9
|
+
CommandGroup,
|
|
10
|
+
CommandInput,
|
|
11
|
+
CommandItem,
|
|
12
|
+
CommandList,
|
|
13
|
+
} from '@mohou/ui/components/command'
|
|
14
|
+
import {
|
|
15
|
+
Popover,
|
|
16
|
+
PopoverContent,
|
|
17
|
+
PopoverTrigger,
|
|
18
|
+
} from '@mohou/ui/components/popover'
|
|
19
|
+
import { useLabels } from '@mohou/ui/i18n/context'
|
|
20
|
+
import { cn } from '@mohou/ui/lib/utils'
|
|
21
|
+
|
|
22
|
+
const COMMON_IDS = [
|
|
23
|
+
'UTC',
|
|
24
|
+
'Asia/Shanghai',
|
|
25
|
+
'Asia/Singapore',
|
|
26
|
+
'Asia/Tokyo',
|
|
27
|
+
'Asia/Hong_Kong',
|
|
28
|
+
'Europe/London',
|
|
29
|
+
'Europe/Paris',
|
|
30
|
+
'America/New_York',
|
|
31
|
+
'America/Los_Angeles',
|
|
32
|
+
'Australia/Sydney',
|
|
33
|
+
] as const
|
|
34
|
+
|
|
35
|
+
const ALIASES: Record<string, string> = {
|
|
36
|
+
UTC: 'gmt zulu',
|
|
37
|
+
'Asia/Shanghai': 'china beijing cst prc',
|
|
38
|
+
'Asia/Singapore': 'sg',
|
|
39
|
+
'Asia/Tokyo': 'japan jst',
|
|
40
|
+
'Asia/Hong_Kong': 'hk hongkong',
|
|
41
|
+
'Europe/London': 'uk gmt bst',
|
|
42
|
+
'Europe/Paris': 'france cet cest',
|
|
43
|
+
'America/New_York': 'nyc eastern est edt usa',
|
|
44
|
+
'America/Los_Angeles': 'pacific pst pdt la california usa',
|
|
45
|
+
'Australia/Sydney': 'aest australia',
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export type ZoneInfo = {
|
|
49
|
+
id: string
|
|
50
|
+
city: string
|
|
51
|
+
region: string
|
|
52
|
+
offset: string
|
|
53
|
+
search: string
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
const ianaZones =
|
|
57
|
+
typeof Intl !== 'undefined' && 'supportedValuesOf' in Intl
|
|
58
|
+
? Intl.supportedValuesOf('timeZone')
|
|
59
|
+
: ['UTC']
|
|
60
|
+
|
|
61
|
+
function cityName(zone: string) {
|
|
62
|
+
if (zone === 'UTC' || zone === 'Etc/UTC') return 'UTC'
|
|
63
|
+
return zone.split('/').pop()?.replaceAll('_', ' ') ?? zone
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
function offsetLabel(zone: string) {
|
|
67
|
+
try {
|
|
68
|
+
return (
|
|
69
|
+
new Intl.DateTimeFormat('en-US', {
|
|
70
|
+
timeZone: zone,
|
|
71
|
+
timeZoneName: 'shortOffset',
|
|
72
|
+
})
|
|
73
|
+
.formatToParts(new Date())
|
|
74
|
+
.find(part => part.type === 'timeZoneName')?.value ?? ''
|
|
75
|
+
)
|
|
76
|
+
} catch {
|
|
77
|
+
return ''
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
let zoneCache: ZoneInfo[] | null = null
|
|
82
|
+
|
|
83
|
+
export function listTimezones(): ZoneInfo[] {
|
|
84
|
+
if (zoneCache) return zoneCache
|
|
85
|
+
zoneCache = ianaZones.map((id) => {
|
|
86
|
+
const city = cityName(id)
|
|
87
|
+
const region = id.includes('/') ? id.slice(0, id.indexOf('/')) : id
|
|
88
|
+
const offset = offsetLabel(id)
|
|
89
|
+
const alias = ALIASES[id] ?? ''
|
|
90
|
+
return {
|
|
91
|
+
id,
|
|
92
|
+
city,
|
|
93
|
+
region,
|
|
94
|
+
offset,
|
|
95
|
+
search: `${id} ${city} ${offset} ${offset.replace('GMT', 'UTC')} ${alias}`.toLowerCase(),
|
|
96
|
+
}
|
|
97
|
+
})
|
|
98
|
+
return zoneCache
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function localZoneId() {
|
|
102
|
+
try {
|
|
103
|
+
return Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
104
|
+
} catch {
|
|
105
|
+
return 'UTC'
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
function groupByRegion(zones: ZoneInfo[]) {
|
|
110
|
+
const map = new Map<string, ZoneInfo[]>()
|
|
111
|
+
for (const zone of zones) {
|
|
112
|
+
const list = map.get(zone.region)
|
|
113
|
+
if (list) list.push(zone)
|
|
114
|
+
else map.set(zone.region, [zone])
|
|
115
|
+
}
|
|
116
|
+
return [...map.entries()]
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function ZoneItem({
|
|
120
|
+
zone,
|
|
121
|
+
selected,
|
|
122
|
+
onSelect,
|
|
123
|
+
}: {
|
|
124
|
+
zone: ZoneInfo
|
|
125
|
+
selected: boolean
|
|
126
|
+
onSelect: (id: string) => void
|
|
127
|
+
}) {
|
|
128
|
+
return (
|
|
129
|
+
<CommandItem
|
|
130
|
+
value={zone.id}
|
|
131
|
+
data-checked={selected || undefined}
|
|
132
|
+
onSelect={() => onSelect(zone.id)}
|
|
133
|
+
>
|
|
134
|
+
<span className="flex min-w-0 flex-1 items-baseline gap-2">
|
|
135
|
+
<span className="truncate">{zone.city}</span>
|
|
136
|
+
<span className="text-muted-foreground truncate text-[11px]">{zone.id}</span>
|
|
137
|
+
</span>
|
|
138
|
+
<span className="text-muted-foreground text-xs tabular-nums">{zone.offset}</span>
|
|
139
|
+
</CommandItem>
|
|
140
|
+
)
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* IANA timezone dropdown.
|
|
145
|
+
* @when Pair with `DateTimePicker` when data is UTC.
|
|
146
|
+
* @example
|
|
147
|
+
* <TimezoneSelect value={tz} onChange={(v) => set(v)} />
|
|
148
|
+
* @family Calendar & date
|
|
149
|
+
*/
|
|
150
|
+
export function TimezoneSelect({
|
|
151
|
+
value,
|
|
152
|
+
onChange,
|
|
153
|
+
className,
|
|
154
|
+
}: {
|
|
155
|
+
value?: string | undefined
|
|
156
|
+
onChange?: (zone: string) => void
|
|
157
|
+
className?: string
|
|
158
|
+
}) {
|
|
159
|
+
const [open, setOpen] = React.useState(false)
|
|
160
|
+
const [query, setQuery] = React.useState('')
|
|
161
|
+
const t = useLabels('timezoneSelect')
|
|
162
|
+
const zones = React.useMemo(() => listTimezones(), [])
|
|
163
|
+
const selectedId = value ?? localZoneId()
|
|
164
|
+
const selected = zones.find(zone => zone.id === selectedId)
|
|
165
|
+
|
|
166
|
+
const common = React.useMemo(() => {
|
|
167
|
+
const local = localZoneId()
|
|
168
|
+
const ids = [local, ...COMMON_IDS.filter(id => id !== local)]
|
|
169
|
+
return ids
|
|
170
|
+
.map(id => zones.find(zone => zone.id === id))
|
|
171
|
+
.filter((zone): zone is ZoneInfo => Boolean(zone))
|
|
172
|
+
}, [zones])
|
|
173
|
+
|
|
174
|
+
const matches = React.useMemo(() => {
|
|
175
|
+
const needle = query.trim().toLowerCase()
|
|
176
|
+
if (!needle) return null
|
|
177
|
+
return zones.filter(zone => zone.search.includes(needle)).slice(0, 80)
|
|
178
|
+
}, [query, zones])
|
|
179
|
+
|
|
180
|
+
const pick = (id: string) => {
|
|
181
|
+
onChange?.(id)
|
|
182
|
+
setOpen(false)
|
|
183
|
+
setQuery('')
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
return (
|
|
187
|
+
<Popover
|
|
188
|
+
open={open}
|
|
189
|
+
onOpenChange={(next) => {
|
|
190
|
+
setOpen(next)
|
|
191
|
+
if (!next) setQuery('')
|
|
192
|
+
}}
|
|
193
|
+
>
|
|
194
|
+
<PopoverTrigger
|
|
195
|
+
render={
|
|
196
|
+
<Button
|
|
197
|
+
variant="outline"
|
|
198
|
+
data-testid="timezone-select"
|
|
199
|
+
aria-label={t.aria(selected?.city ?? selectedId)}
|
|
200
|
+
className={cn('w-[240px] justify-between font-normal', className)}
|
|
201
|
+
/>
|
|
202
|
+
}
|
|
203
|
+
>
|
|
204
|
+
<span className="truncate">
|
|
205
|
+
{selected?.city ?? cityName(selectedId)}
|
|
206
|
+
<span className="text-muted-foreground ml-1 text-xs tabular-nums">
|
|
207
|
+
{selected?.offset ?? offsetLabel(selectedId)}
|
|
208
|
+
</span>
|
|
209
|
+
</span>
|
|
210
|
+
<ChevronsUpDown className="size-3.5 opacity-50" />
|
|
211
|
+
</PopoverTrigger>
|
|
212
|
+
<PopoverContent align="start" className="w-[320px] overflow-hidden p-0">
|
|
213
|
+
<Command shouldFilter={false} className="h-auto overflow-hidden">
|
|
214
|
+
<CommandInput
|
|
215
|
+
placeholder={t.search}
|
|
216
|
+
value={query}
|
|
217
|
+
onValueChange={setQuery}
|
|
218
|
+
data-testid="timezone-search"
|
|
219
|
+
/>
|
|
220
|
+
<CommandList className="max-h-64">
|
|
221
|
+
<CommandEmpty>{t.empty}</CommandEmpty>
|
|
222
|
+
{matches ? (
|
|
223
|
+
groupByRegion(matches).map(([region, items]) => (
|
|
224
|
+
<CommandGroup key={region} heading={region}>
|
|
225
|
+
{items.map(zone => (
|
|
226
|
+
<ZoneItem
|
|
227
|
+
key={zone.id}
|
|
228
|
+
zone={zone}
|
|
229
|
+
selected={zone.id === selectedId}
|
|
230
|
+
onSelect={pick}
|
|
231
|
+
/>
|
|
232
|
+
))}
|
|
233
|
+
</CommandGroup>
|
|
234
|
+
))
|
|
235
|
+
) : (
|
|
236
|
+
<CommandGroup heading={t.common}>
|
|
237
|
+
{common.map(zone => (
|
|
238
|
+
<ZoneItem
|
|
239
|
+
key={zone.id}
|
|
240
|
+
zone={zone}
|
|
241
|
+
selected={zone.id === selectedId}
|
|
242
|
+
onSelect={pick}
|
|
243
|
+
/>
|
|
244
|
+
))}
|
|
245
|
+
</CommandGroup>
|
|
246
|
+
)}
|
|
247
|
+
</CommandList>
|
|
248
|
+
{!matches ? (
|
|
249
|
+
<p className="text-muted-foreground border-t px-2.5 py-1.5 text-[11px]">
|
|
250
|
+
{t.typeToSearch(zones.length)}
|
|
251
|
+
</p>
|
|
252
|
+
) : null}
|
|
253
|
+
</Command>
|
|
254
|
+
</PopoverContent>
|
|
255
|
+
</Popover>
|
|
256
|
+
)
|
|
257
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
|
|
2
|
+
import { Button } from '@mohou/ui/components/button'
|
|
3
|
+
|
|
4
|
+
export type TransferItem = { id: string; label: string }
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Two-panel move-between-lists picker.
|
|
8
|
+
* @when Selecting many items from a known pool (assign users to a shift).
|
|
9
|
+
* @example
|
|
10
|
+
* <Transfer items={[{ id: "u1", label: "张三" }]} onChange={(ids) => set(ids)} />
|
|
11
|
+
* @family Form
|
|
12
|
+
*/
|
|
13
|
+
export function Transfer({
|
|
14
|
+
items,
|
|
15
|
+
value = [],
|
|
16
|
+
onChange,
|
|
17
|
+
}: {
|
|
18
|
+
items: TransferItem[]
|
|
19
|
+
value?: string[]
|
|
20
|
+
onChange?: (value: string[]) => void
|
|
21
|
+
}) {
|
|
22
|
+
const selected = new Set(value)
|
|
23
|
+
const left = items.filter(item => !selected.has(item.id))
|
|
24
|
+
const right = items.filter(item => selected.has(item.id))
|
|
25
|
+
return (
|
|
26
|
+
<div className="grid grid-cols-[1fr_auto_1fr] items-center gap-2" data-testid="transfer">
|
|
27
|
+
<ul className="h-40 overflow-auto rounded-lg border p-1 text-sm">
|
|
28
|
+
{left.map(item => (
|
|
29
|
+
<li key={item.id}>
|
|
30
|
+
<button
|
|
31
|
+
type="button"
|
|
32
|
+
className="w-full rounded-md px-2 py-1 text-left hover:bg-muted"
|
|
33
|
+
onClick={() => onChange?.([...value, item.id])}
|
|
34
|
+
>
|
|
35
|
+
{item.label}
|
|
36
|
+
</button>
|
|
37
|
+
</li>
|
|
38
|
+
))}
|
|
39
|
+
</ul>
|
|
40
|
+
<Button variant="outline" size="icon-xs" disabled>
|
|
41
|
+
→
|
|
42
|
+
</Button>
|
|
43
|
+
<ul className="h-40 overflow-auto rounded-lg border p-1 text-sm">
|
|
44
|
+
{right.map(item => (
|
|
45
|
+
<li key={item.id}>
|
|
46
|
+
<button
|
|
47
|
+
type="button"
|
|
48
|
+
className="w-full rounded-md px-2 py-1 text-left hover:bg-muted"
|
|
49
|
+
onClick={() => onChange?.(value.filter(id => id !== item.id))}
|
|
50
|
+
>
|
|
51
|
+
{item.label}
|
|
52
|
+
</button>
|
|
53
|
+
</li>
|
|
54
|
+
))}
|
|
55
|
+
</ul>
|
|
56
|
+
</div>
|
|
57
|
+
)
|
|
58
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
import { Avatar, AvatarFallback } from '@mohou/ui/components/avatar'
|
|
3
|
+
import { NativeSelect, NativeSelectOption } from '@mohou/ui/components/native-select'
|
|
4
|
+
import { useLabels } from '@mohou/ui/i18n/context'
|
|
5
|
+
|
|
6
|
+
export type UserOption = { id: string; name: string }
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Pick a user from a list (avatar + name).
|
|
10
|
+
* @when Assignee/owner fields; you supply the user list.
|
|
11
|
+
* @example
|
|
12
|
+
* <UserPicker users={[{ id: "u1", name: "张三" }]} onChange={(id) => set(id)} />
|
|
13
|
+
* @family Form
|
|
14
|
+
*/
|
|
15
|
+
export function UserPicker({
|
|
16
|
+
users,
|
|
17
|
+
value,
|
|
18
|
+
onChange,
|
|
19
|
+
}: {
|
|
20
|
+
users: UserOption[]
|
|
21
|
+
value?: string
|
|
22
|
+
onChange?: (id: string) => void
|
|
23
|
+
}) {
|
|
24
|
+
const t = useLabels('userPicker')
|
|
25
|
+
const selected = users.find(user => user.id === value)
|
|
26
|
+
return (
|
|
27
|
+
<div className="flex items-center gap-2" data-testid="user-picker">
|
|
28
|
+
<Avatar className="size-6">
|
|
29
|
+
<AvatarFallback className="text-[10px]">
|
|
30
|
+
{(selected?.name ?? '?').slice(0, 2).toUpperCase()}
|
|
31
|
+
</AvatarFallback>
|
|
32
|
+
</Avatar>
|
|
33
|
+
<NativeSelect
|
|
34
|
+
value={value ?? ''}
|
|
35
|
+
onChange={event => onChange?.(event.target.value)}
|
|
36
|
+
>
|
|
37
|
+
<NativeSelectOption value="">{t.placeholder}</NativeSelectOption>
|
|
38
|
+
{users.map(user => (
|
|
39
|
+
<NativeSelectOption key={user.id} value={user.id}>
|
|
40
|
+
{user.name}
|
|
41
|
+
</NativeSelectOption>
|
|
42
|
+
))}
|
|
43
|
+
</NativeSelect>
|
|
44
|
+
</div>
|
|
45
|
+
)
|
|
46
|
+
}
|