@devalok/shilp-sutra 0.34.0 → 0.36.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -21
- package/dist/_chunks/badge-group.js +306 -246
- package/dist/_chunks/badge-group.js.map +1 -0
- package/dist/_chunks/chat.js +518 -0
- package/dist/_chunks/chat.js.map +1 -0
- package/dist/_chunks/date-picker.js +748 -0
- package/dist/_chunks/date-picker.js.map +1 -0
- package/dist/_chunks/document-preview.js +109 -90
- package/dist/_chunks/document-preview.js.map +1 -0
- package/dist/_chunks/file-preview.js +492 -504
- package/dist/_chunks/file-preview.js.map +1 -0
- package/dist/_chunks/framer.js +5564 -5613
- package/dist/_chunks/framer.js.map +1 -0
- package/dist/_chunks/image-preview.js +127 -88
- package/dist/_chunks/image-preview.js.map +1 -0
- package/dist/_chunks/keybinding.js +12 -14
- package/dist/_chunks/keybinding.js.map +1 -0
- package/dist/_chunks/link-context.js +19 -16
- package/dist/_chunks/link-context.js.map +1 -0
- package/dist/_chunks/mention-suggestion.js +353 -350
- package/dist/_chunks/mention-suggestion.js.map +1 -0
- package/dist/_chunks/motion-provider.js +26 -20
- package/dist/_chunks/motion-provider.js.map +1 -0
- package/dist/_chunks/popover.js +123 -0
- package/dist/_chunks/popover.js.map +1 -0
- package/dist/_chunks/primitives.js +7585 -6426
- package/dist/_chunks/primitives.js.map +1 -0
- package/dist/_chunks/rich-chat-input.js +2071 -0
- package/dist/_chunks/rich-chat-input.js.map +1 -0
- package/dist/_chunks/rolldown-runtime.js +21 -0
- package/dist/_chunks/shared.js +126 -0
- package/dist/_chunks/shared.js.map +1 -0
- package/dist/_chunks/sonner.js +605 -734
- package/dist/_chunks/sonner.js.map +1 -0
- package/dist/_chunks/stat-row.js +418 -440
- package/dist/_chunks/stat-row.js.map +1 -0
- package/dist/_chunks/tiptap.js +15850 -19964
- package/dist/_chunks/tiptap.js.map +1 -0
- package/dist/_chunks/tree-view.js +231 -290
- package/dist/_chunks/tree-view.js.map +1 -0
- package/dist/_chunks/use-calendar.js +161 -208
- package/dist/_chunks/use-calendar.js.map +1 -0
- package/dist/_chunks/vendor-client.js +314 -2199
- package/dist/_chunks/vendor-client.js.map +1 -0
- package/dist/_chunks/vendor-utils.js +1721 -2978
- package/dist/_chunks/vendor-utils.js.map +1 -0
- package/dist/ai/ai-command-provider.js +23 -17
- package/dist/ai/ai-command-provider.js.map +1 -0
- package/dist/ai/block-renderer.js +68 -51
- package/dist/ai/block-renderer.js.map +1 -0
- package/dist/ai/blocks/index.js +2 -12
- package/dist/ai/blocks/loading.d.ts.map +1 -1
- package/dist/ai/command-bar.js +470 -519
- package/dist/ai/command-bar.js.map +1 -0
- package/dist/ai/conversation.js +241 -227
- package/dist/ai/conversation.js.map +1 -0
- package/dist/ai/devadoot-icon.d.ts.map +1 -1
- package/dist/ai/index.js +181 -167
- package/dist/ai/index.js.map +1 -0
- package/dist/ai/types.js +0 -1
- package/dist/composed/activity-feed.js +232 -202
- package/dist/composed/activity-feed.js.map +1 -0
- package/dist/composed/avatar-group.js +164 -222
- package/dist/composed/avatar-group.js.map +1 -0
- package/dist/composed/bulk-action-bar.js +166 -165
- package/dist/composed/bulk-action-bar.js.map +1 -0
- package/dist/composed/command-palette.js +290 -308
- package/dist/composed/command-palette.js.map +1 -0
- package/dist/composed/confirm-dialog.js +28 -48
- package/dist/composed/confirm-dialog.js.map +1 -0
- package/dist/composed/content-card.js +69 -108
- package/dist/composed/content-card.js.map +1 -0
- package/dist/composed/date-picker/index.js +3 -13
- package/dist/composed/deadline-indicator.js +68 -74
- package/dist/composed/deadline-indicator.js.map +1 -0
- package/dist/composed/emoji-picker.js +83 -110
- package/dist/composed/emoji-picker.js.map +1 -0
- package/dist/composed/empty-state.d.ts.map +1 -1
- package/dist/composed/empty-state.js +64 -103
- package/dist/composed/empty-state.js.map +1 -0
- package/dist/composed/error-boundary.js +129 -127
- package/dist/composed/error-boundary.js.map +1 -0
- package/dist/composed/file-preview.js +2 -12
- package/dist/composed/filter-bar.js +98 -130
- package/dist/composed/filter-bar.js.map +1 -0
- package/dist/composed/form-section.js +61 -45
- package/dist/composed/form-section.js.map +1 -0
- package/dist/composed/global-loading.js +34 -47
- package/dist/composed/global-loading.js.map +1 -0
- package/dist/composed/index.js +34 -92
- package/dist/composed/inline-edit.js +92 -107
- package/dist/composed/inline-edit.js.map +1 -0
- package/dist/composed/lib/string-utils.js +8 -8
- package/dist/composed/lib/string-utils.js.map +1 -0
- package/dist/composed/loading-skeleton.js +103 -171
- package/dist/composed/loading-skeleton.js.map +1 -0
- package/dist/composed/markdown-viewer.js +187 -139
- package/dist/composed/markdown-viewer.js.map +1 -0
- package/dist/composed/master-detail.js +147 -156
- package/dist/composed/master-detail.js.map +1 -0
- package/dist/composed/member-picker.js +46 -49
- package/dist/composed/member-picker.js.map +1 -0
- package/dist/composed/multi-select-popover.d.ts.map +1 -1
- package/dist/composed/multi-select-popover.js +185 -179
- package/dist/composed/multi-select-popover.js.map +1 -0
- package/dist/composed/page-header.js +54 -76
- package/dist/composed/page-header.js.map +1 -0
- package/dist/composed/page-skeletons.js +143 -127
- package/dist/composed/page-skeletons.js.map +1 -0
- package/dist/composed/priority-indicator.js +105 -111
- package/dist/composed/priority-indicator.js.map +1 -0
- package/dist/composed/responsive-overlay.js +36 -41
- package/dist/composed/responsive-overlay.js.map +1 -0
- package/dist/composed/rich-chat-input/attachment-strip.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/reply-banner.d.ts.map +1 -1
- package/dist/composed/rich-chat-input/schedule-send.d.ts.map +1 -1
- package/dist/composed/rich-chat-input.d.ts.map +1 -1
- package/dist/composed/rich-chat-input.js +2 -1860
- package/dist/composed/rich-text-editor.js +561 -424
- package/dist/composed/rich-text-editor.js.map +1 -0
- package/dist/composed/schedule-view.js +134 -185
- package/dist/composed/schedule-view.js.map +1 -0
- package/dist/composed/simple-tooltip.js +21 -21
- package/dist/composed/simple-tooltip.js.map +1 -0
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +133 -137
- package/dist/composed/status-badge.js.map +1 -0
- package/dist/hooks/index.js +7 -12
- package/dist/hooks/use-color-mode.js +28 -25
- package/dist/hooks/use-color-mode.js.map +1 -0
- package/dist/hooks/use-mobile.js +13 -13
- package/dist/hooks/use-mobile.js.map +1 -0
- package/dist/hooks/use-toast.js +2 -4
- package/dist/hooks/use-touch-device.js +9 -11
- package/dist/hooks/use-touch-device.js.map +1 -0
- package/dist/hooks/use-viewport-height.js +14 -14
- package/dist/hooks/use-viewport-height.js.map +1 -0
- package/dist/motion/check-motion-provider.d.ts +3 -0
- package/dist/motion/check-motion-provider.d.ts.map +1 -0
- package/dist/motion/index.js +17 -11
- package/dist/motion/index.js.map +1 -0
- package/dist/motion/primitives-index.js +226 -186
- package/dist/motion/primitives-index.js.map +1 -0
- package/dist/primitives/react-accordion.d.ts +114 -114
- package/dist/primitives/react-alert-dialog.d.ts +51 -51
- package/dist/primitives/react-aspect-ratio.d.ts +11 -11
- package/dist/primitives/react-avatar.d.ts +24 -24
- package/dist/primitives/react-checkbox.d.ts +50 -50
- package/dist/primitives/react-collapsible.d.ts +33 -33
- package/dist/primitives/react-context-menu.d.ts +96 -96
- package/dist/primitives/react-dialog.d.ts +103 -103
- package/dist/primitives/react-dropdown-menu.d.ts +97 -97
- package/dist/primitives/react-hover-card.d.ts +79 -79
- package/dist/primitives/react-label.d.ts +10 -10
- package/dist/primitives/react-menu.d.ts +169 -169
- package/dist/primitives/react-menubar.d.ts +115 -115
- package/dist/primitives/react-navigation-menu.d.ts +126 -126
- package/dist/primitives/react-popover.d.ts +85 -85
- package/dist/primitives/react-progress.d.ts +19 -19
- package/dist/primitives/react-radio-group.d.ts +58 -58
- package/dist/primitives/react-roving-focus.d.ts +49 -49
- package/dist/primitives/react-select.d.ts +137 -137
- package/dist/primitives/react-separator.d.ts +21 -21
- package/dist/primitives/react-slider.d.ts +75 -75
- package/dist/primitives/react-switch.d.ts +21 -21
- package/dist/primitives/react-tabs.d.ts +56 -56
- package/dist/primitives/react-toast.d.ts +120 -120
- package/dist/primitives/react-toggle-group.d.ts +75 -75
- package/dist/primitives/react-toggle.d.ts +24 -24
- package/dist/primitives/react-tooltip.d.ts +101 -101
- package/dist/primitives/react-visually-hidden.d.ts +22 -22
- package/dist/shell/app-command-palette.d.ts +2 -0
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js +94 -238
- package/dist/shell/app-command-palette.js.map +1 -0
- package/dist/shell/bottom-navbar.js +150 -190
- package/dist/shell/bottom-navbar.js.map +1 -0
- package/dist/shell/command-registry.js +13 -14
- package/dist/shell/command-registry.js.map +1 -0
- package/dist/shell/index.js +10 -20
- package/dist/shell/link-context.js +2 -5
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +263 -259
- package/dist/shell/notification-center.js.map +1 -0
- package/dist/shell/notification-preferences.js +241 -184
- package/dist/shell/notification-preferences.js.map +1 -0
- package/dist/shell/sidebar.js +251 -281
- package/dist/shell/sidebar.js.map +1 -0
- package/dist/shell/top-bar.js +203 -237
- package/dist/shell/top-bar.js.map +1 -0
- package/dist/tailwind/index.cjs +473 -442
- package/dist/tailwind/index.js +2 -4
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +490 -459
- package/dist/tailwind/preset.js.map +1 -0
- package/dist/tokens/index.css +4 -4
- package/dist/tokens/primitives.css +442 -442
- package/dist/tokens/semantic.css +742 -547
- package/dist/tokens/typography-semantic.css +123 -100
- package/dist/tokens/typography.css +422 -422
- package/dist/ui/accordion.js +52 -60
- package/dist/ui/accordion.js.map +1 -0
- package/dist/ui/alert-dialog.d.ts +6 -2
- package/dist/ui/alert-dialog.d.ts.map +1 -1
- package/dist/ui/alert-dialog.js +112 -156
- package/dist/ui/alert-dialog.js.map +1 -0
- package/dist/ui/alert.d.ts +3 -2
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +203 -99
- package/dist/ui/alert.js.map +1 -0
- package/dist/ui/aspect-ratio.js +13 -16
- package/dist/ui/aspect-ratio.js.map +1 -0
- package/dist/ui/autocomplete.d.ts.map +1 -1
- package/dist/ui/autocomplete.js +137 -148
- package/dist/ui/autocomplete.js.map +1 -0
- package/dist/ui/avatar.js +196 -169
- package/dist/ui/avatar.js.map +1 -0
- package/dist/ui/badge-group.js +2 -7
- package/dist/ui/badge-indicator.js +42 -51
- package/dist/ui/badge-indicator.js.map +1 -0
- package/dist/ui/badge.js +2 -15
- package/dist/ui/banner.js +76 -68
- package/dist/ui/banner.js.map +1 -0
- package/dist/ui/breadcrumb.js +65 -84
- package/dist/ui/breadcrumb.js.map +1 -0
- package/dist/ui/button-group.js +109 -102
- package/dist/ui/button-group.js.map +1 -0
- package/dist/ui/button-processing.d.ts.map +1 -1
- package/dist/ui/button-processing.js +89 -72
- package/dist/ui/button-processing.js.map +1 -0
- package/dist/ui/button.js +393 -279
- package/dist/ui/button.js.map +1 -0
- package/dist/ui/card.js +151 -157
- package/dist/ui/card.js.map +1 -0
- package/dist/ui/charts/bar-chart.d.ts.map +1 -1
- package/dist/ui/charts/chart-container.d.ts +2 -0
- package/dist/ui/charts/chart-container.d.ts.map +1 -1
- package/dist/ui/charts/index.js +1025 -1319
- package/dist/ui/charts/index.js.map +1 -0
- package/dist/ui/charts/line-chart.d.ts.map +1 -1
- package/dist/ui/chat/index.js +2 -11
- package/dist/ui/chat/message-input.d.ts.map +1 -1
- package/dist/ui/chat/message-list.d.ts +1 -1
- package/dist/ui/chat/message-list.d.ts.map +1 -1
- package/dist/ui/chat/message.d.ts.map +1 -1
- package/dist/ui/chat/system-message.d.ts.map +1 -1
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +82 -100
- package/dist/ui/checkbox.js.map +1 -0
- package/dist/ui/code.js +18 -32
- package/dist/ui/code.js.map +1 -0
- package/dist/ui/collapsible.js +21 -29
- package/dist/ui/collapsible.js.map +1 -0
- package/dist/ui/color-input.d.ts.map +1 -1
- package/dist/ui/color-input.js +455 -372
- package/dist/ui/color-input.js.map +1 -0
- package/dist/ui/color-swatch.js +60 -90
- package/dist/ui/color-swatch.js.map +1 -0
- package/dist/ui/combobox.d.ts +7 -0
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +278 -293
- package/dist/ui/combobox.js.map +1 -0
- package/dist/ui/container.js +18 -24
- package/dist/ui/container.js.map +1 -0
- package/dist/ui/context-menu.js +154 -203
- package/dist/ui/context-menu.js.map +1 -0
- package/dist/ui/data-table-body.js +116 -213
- package/dist/ui/data-table-body.js.map +1 -0
- package/dist/ui/data-table-bulk-actions.js +43 -59
- package/dist/ui/data-table-bulk-actions.js.map +1 -0
- package/dist/ui/data-table-card.js +84 -71
- package/dist/ui/data-table-card.js.map +1 -0
- package/dist/ui/data-table-context.js +39 -42
- package/dist/ui/data-table-context.js.map +1 -0
- package/dist/ui/data-table-header.js +98 -139
- package/dist/ui/data-table-header.js.map +1 -0
- package/dist/ui/data-table-pagination.js +69 -82
- package/dist/ui/data-table-pagination.js.map +1 -0
- package/dist/ui/data-table-toolbar.js +104 -130
- package/dist/ui/data-table-toolbar.js.map +1 -0
- package/dist/ui/data-table.js +281 -354
- package/dist/ui/data-table.js.map +1 -0
- package/dist/ui/devalok-grain.js +77 -66
- package/dist/ui/devalok-grain.js.map +1 -0
- package/dist/ui/dialog.js +118 -151
- package/dist/ui/dialog.js.map +1 -0
- package/dist/ui/dropdown-menu.js +152 -203
- package/dist/ui/dropdown-menu.js.map +1 -0
- package/dist/ui/file-upload.js +242 -266
- package/dist/ui/file-upload.js.map +1 -0
- package/dist/ui/form.d.ts +8 -0
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +62 -56
- package/dist/ui/form.js.map +1 -0
- package/dist/ui/hover-card.js +54 -54
- package/dist/ui/hover-card.js.map +1 -0
- package/dist/ui/icon-button.js +21 -26
- package/dist/ui/icon-button.js.map +1 -0
- package/dist/ui/icon-context.js +17 -17
- package/dist/ui/icon-context.js.map +1 -0
- package/dist/ui/icon-group.js +22 -29
- package/dist/ui/icon-group.js.map +1 -0
- package/dist/ui/icon.js +201 -121
- package/dist/ui/icon.js.map +1 -0
- package/dist/ui/index.d.ts +4 -4
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +90 -350
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/input-otp.d.ts +12 -3
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +58 -48
- package/dist/ui/input-otp.js.map +1 -0
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +93 -169
- package/dist/ui/input.js.map +1 -0
- package/dist/ui/label.d.ts.map +1 -1
- package/dist/ui/label.js +23 -23
- package/dist/ui/label.js.map +1 -0
- package/dist/ui/lib/check-tokens.d.ts +3 -0
- package/dist/ui/lib/check-tokens.d.ts.map +1 -0
- package/dist/ui/lib/date-utils.js +14 -11
- package/dist/ui/lib/date-utils.js.map +1 -0
- package/dist/ui/lib/motion.d.ts +15 -4
- package/dist/ui/lib/motion.d.ts.map +1 -1
- package/dist/ui/lib/motion.js +83 -33
- package/dist/ui/lib/motion.js.map +1 -0
- package/dist/ui/lib/utils.js +39 -16
- package/dist/ui/lib/utils.js.map +1 -0
- package/dist/ui/link.js +13 -24
- package/dist/ui/link.js.map +1 -0
- package/dist/ui/menubar.js +132 -210
- package/dist/ui/menubar.js.map +1 -0
- package/dist/ui/navigation-menu.js +163 -193
- package/dist/ui/navigation-menu.js.map +1 -0
- package/dist/ui/number-input.d.ts +16 -1
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +102 -95
- package/dist/ui/number-input.js.map +1 -0
- package/dist/ui/pagination.js +122 -159
- package/dist/ui/pagination.js.map +1 -0
- package/dist/ui/popover.js +2 -131
- package/dist/ui/progress-ring.d.ts.map +1 -1
- package/dist/ui/progress-ring.js +133 -143
- package/dist/ui/progress-ring.js.map +1 -0
- package/dist/ui/progress.js +51 -95
- package/dist/ui/progress.js.map +1 -0
- package/dist/ui/radio.d.ts.map +1 -1
- package/dist/ui/radio.js +47 -49
- package/dist/ui/radio.js.map +1 -0
- package/dist/ui/search-input.js +51 -53
- package/dist/ui/search-input.js.map +1 -0
- package/dist/ui/segmented-control.d.ts +1 -1
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +95 -114
- package/dist/ui/segmented-control.js.map +1 -0
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +137 -157
- package/dist/ui/select.js.map +1 -0
- package/dist/ui/separator.d.ts.map +1 -1
- package/dist/ui/separator.js +18 -25
- package/dist/ui/separator.js.map +1 -0
- package/dist/ui/sheet.js +135 -163
- package/dist/ui/sheet.js.map +1 -0
- package/dist/ui/sidebar.js +357 -600
- package/dist/ui/sidebar.js.map +1 -0
- package/dist/ui/skeleton.js +179 -231
- package/dist/ui/skeleton.js.map +1 -0
- package/dist/ui/slider.d.ts +22 -3
- package/dist/ui/slider.d.ts.map +1 -1
- package/dist/ui/slider.js +62 -34
- package/dist/ui/slider.js.map +1 -0
- package/dist/ui/spinner.js +226 -205
- package/dist/ui/spinner.js.map +1 -0
- package/dist/ui/split-button.d.ts.map +1 -1
- package/dist/ui/split-button.js +228 -276
- package/dist/ui/split-button.js.map +1 -0
- package/dist/ui/stack.js +56 -70
- package/dist/ui/stack.js.map +1 -0
- package/dist/ui/stat-card.js +259 -251
- package/dist/ui/stat-card.js.map +1 -0
- package/dist/ui/status-dot.js +67 -63
- package/dist/ui/status-dot.js.map +1 -0
- package/dist/ui/stepper.d.ts +10 -0
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +124 -168
- package/dist/ui/stepper.js.map +1 -0
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +56 -55
- package/dist/ui/switch.js.map +1 -0
- package/dist/ui/table.js +57 -90
- package/dist/ui/table.js.map +1 -0
- package/dist/ui/tabs.d.ts +3 -1
- package/dist/ui/tabs.d.ts.map +1 -1
- package/dist/ui/tabs.js +159 -156
- package/dist/ui/tabs.js.map +1 -0
- package/dist/ui/text.d.ts +1 -1
- package/dist/ui/text.d.ts.map +1 -1
- package/dist/ui/text.js +60 -59
- package/dist/ui/text.js.map +1 -0
- package/dist/ui/textarea.js +40 -57
- package/dist/ui/textarea.js.map +1 -0
- package/dist/ui/toast-registry.d.ts +8 -0
- package/dist/ui/toast-registry.d.ts.map +1 -0
- package/dist/ui/toast-registry.js +13 -0
- package/dist/ui/toast-registry.js.map +1 -0
- package/dist/ui/toast-types.js +0 -1
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +559 -536
- package/dist/ui/toast.js.map +1 -0
- package/dist/ui/toaster.d.ts.map +1 -1
- package/dist/ui/toaster.js +24 -33
- package/dist/ui/toaster.js.map +1 -0
- package/dist/ui/toggle-group.d.ts +2 -0
- package/dist/ui/toggle-group.d.ts.map +1 -1
- package/dist/ui/toggle-group.js +44 -41
- package/dist/ui/toggle-group.js.map +1 -0
- package/dist/ui/toggle.d.ts +2 -0
- package/dist/ui/toggle.d.ts.map +1 -1
- package/dist/ui/toggle.js +44 -40
- package/dist/ui/toggle.js.map +1 -0
- package/dist/ui/tooltip.js +80 -65
- package/dist/ui/tooltip.js.map +1 -0
- package/dist/ui/tree-view/index.js +2 -6
- package/dist/ui/visually-hidden.js +12 -10
- package/dist/ui/visually-hidden.js.map +1 -0
- package/docs/components/_header.md +85 -85
- package/docs/components/composed/activity-feed.md +62 -62
- package/docs/components/composed/avatar-group.md +65 -65
- package/docs/components/composed/bulk-action-bar.md +40 -40
- package/docs/components/composed/command-palette.md +40 -40
- package/docs/components/composed/confirm-dialog.md +46 -46
- package/docs/components/composed/content-card.md +36 -36
- package/docs/components/composed/date-picker.md +130 -130
- package/docs/components/composed/deadline-indicator.md +27 -27
- package/docs/components/composed/emoji-picker.md +52 -52
- package/docs/components/composed/empty-state.md +53 -53
- package/docs/components/composed/error-boundary.md +29 -29
- package/docs/components/composed/file-preview.md +40 -40
- package/docs/components/composed/filter-bar.md +57 -57
- package/docs/components/composed/form-section.md +31 -31
- package/docs/components/composed/global-loading.md +27 -27
- package/docs/components/composed/inline-edit.md +35 -35
- package/docs/components/composed/loading-skeleton.md +51 -51
- package/docs/components/composed/markdown-viewer.md +27 -27
- package/docs/components/composed/master-detail.md +48 -48
- package/docs/components/composed/member-picker.md +35 -35
- package/docs/components/composed/multi-select-popover.md +62 -62
- package/docs/components/composed/page-header.md +41 -41
- package/docs/components/composed/page-skeletons.md +32 -32
- package/docs/components/composed/priority-indicator.md +32 -32
- package/docs/components/composed/responsive-overlay.md +34 -34
- package/docs/components/composed/rich-text-editor.md +82 -82
- package/docs/components/composed/schedule-view.md +39 -39
- package/docs/components/composed/simple-tooltip.md +33 -33
- package/docs/components/composed/status-badge.md +55 -55
- package/docs/components/shell/app-command-palette.md +44 -44
- package/docs/components/shell/bottom-navbar.md +52 -52
- package/docs/components/shell/command-registry.md +48 -48
- package/docs/components/shell/link-context.md +41 -41
- package/docs/components/shell/notification-center.md +63 -63
- package/docs/components/shell/notification-preferences.md +42 -42
- package/docs/components/shell/sidebar.md +92 -92
- package/docs/components/shell/top-bar.md +143 -143
- package/docs/components/ui/accordion.md +51 -51
- package/docs/components/ui/alert-dialog.md +61 -61
- package/docs/components/ui/alert.md +46 -46
- package/docs/components/ui/aspect-ratio.md +25 -25
- package/docs/components/ui/autocomplete.md +48 -48
- package/docs/components/ui/avatar.md +56 -56
- package/docs/components/ui/badge.md +83 -82
- package/docs/components/ui/banner.md +42 -42
- package/docs/components/ui/breadcrumb.md +37 -37
- package/docs/components/ui/button-group.md +41 -41
- package/docs/components/ui/button.md +94 -93
- package/docs/components/ui/card.md +52 -52
- package/docs/components/ui/charts.md +43 -43
- package/docs/components/ui/checkbox.md +36 -36
- package/docs/components/ui/chip.md +47 -47
- package/docs/components/ui/code.md +28 -28
- package/docs/components/ui/collapsible.md +40 -40
- package/docs/components/ui/color-input.md +91 -91
- package/docs/components/ui/color-swatch.md +25 -25
- package/docs/components/ui/combobox.md +54 -54
- package/docs/components/ui/container.md +26 -26
- package/docs/components/ui/context-menu.md +43 -43
- package/docs/components/ui/data-table-body.md +1 -1
- package/docs/components/ui/data-table-bulk-actions.md +1 -1
- package/docs/components/ui/data-table-card.md +1 -1
- package/docs/components/ui/data-table-context.md +1 -1
- package/docs/components/ui/data-table-header.md +1 -1
- package/docs/components/ui/data-table-pagination.md +1 -1
- package/docs/components/ui/data-table-toolbar.md +44 -44
- package/docs/components/ui/data-table.md +94 -94
- package/docs/components/ui/dialog.md +54 -54
- package/docs/components/ui/dropdown-menu.md +48 -48
- package/docs/components/ui/file-upload.md +41 -41
- package/docs/components/ui/form.md +51 -51
- package/docs/components/ui/hover-card.md +32 -32
- package/docs/components/ui/icon-button.md +40 -40
- package/docs/components/ui/input-otp.md +44 -44
- package/docs/components/ui/input.md +74 -74
- package/docs/components/ui/label.md +25 -25
- package/docs/components/ui/link.md +29 -29
- package/docs/components/ui/menubar.md +44 -44
- package/docs/components/ui/navigation-menu.md +46 -46
- package/docs/components/ui/number-input.md +44 -44
- package/docs/components/ui/pagination.md +48 -48
- package/docs/components/ui/popover.md +30 -30
- package/docs/components/ui/progress-ring.md +41 -41
- package/docs/components/ui/progress.md +34 -34
- package/docs/components/ui/radio.md +34 -34
- package/docs/components/ui/search-input.md +43 -43
- package/docs/components/ui/segmented-control.md +50 -50
- package/docs/components/ui/select.md +53 -53
- package/docs/components/ui/separator.md +32 -32
- package/docs/components/ui/sheet.md +47 -47
- package/docs/components/ui/sidebar.md +72 -72
- package/docs/components/ui/skeleton.md +77 -77
- package/docs/components/ui/slider.md +29 -29
- package/docs/components/ui/spinner.md +54 -54
- package/docs/components/ui/stack.md +39 -39
- package/docs/components/ui/stat-card.md +61 -61
- package/docs/components/ui/status-dot.md +26 -26
- package/docs/components/ui/stepper.md +49 -49
- package/docs/components/ui/switch.md +47 -47
- package/docs/components/ui/table.md +47 -47
- package/docs/components/ui/tabs.md +60 -60
- package/docs/components/ui/text.md +37 -37
- package/docs/components/ui/textarea.md +39 -39
- package/docs/components/ui/toast.md +65 -65
- package/docs/components/ui/toaster.md +47 -47
- package/docs/components/ui/toggle-group.md +43 -43
- package/docs/components/ui/toggle.md +37 -37
- package/docs/components/ui/tooltip.md +38 -38
- package/docs/components/ui/tree-view.md +65 -65
- package/docs/components/ui/visually-hidden.md +21 -21
- package/llms-full.txt +5266 -5264
- package/llms.txt +624 -580
- package/package.json +7 -8
- package/dist/_chunks/date-time-picker.js +0 -851
- package/dist/_chunks/typing-indicator.js +0 -565
|
@@ -0,0 +1,748 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../ui/lib/utils.js";
|
|
3
|
+
import { Icon as t } from "../ui/icon.js";
|
|
4
|
+
import { i as n, r, t as i } from "./popover.js";
|
|
5
|
+
import { n as a } from "./use-calendar.js";
|
|
6
|
+
import * as o from "react";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
import { IconCalendarClock as l, IconCalendarEvent as u, IconClock as d } from "@tabler/icons-react";
|
|
9
|
+
import { addMonths as f, endOfDay as p, endOfMonth as m, format as h, isAfter as g, isBefore as _, setHours as v, setMinutes as y, setMonth as b, setSeconds as x, setYear as S, startOfDay as C, startOfMonth as w, startOfYear as T, subDays as E, subMonths as D } from "date-fns";
|
|
10
|
+
//#region src/composed/date-picker/year-picker.tsx
|
|
11
|
+
var O = o.forwardRef(function({ currentYear: t, selectedYear: n, onYearSelect: r, minDate: i, maxDate: a, className: l, ...u }, d) {
|
|
12
|
+
let f = Math.floor(t / 10) * 10, p = Array.from({ length: 12 }, (e, t) => f + t), [m, h] = o.useState(() => {
|
|
13
|
+
let e = p.indexOf(n ?? t);
|
|
14
|
+
return e >= 0 ? e : 0;
|
|
15
|
+
}), g = o.useRef([]), _ = (e) => i != null && e < i.getFullYear() || a != null && e > a.getFullYear(), v = (e) => {
|
|
16
|
+
let t = m;
|
|
17
|
+
switch (e.key) {
|
|
18
|
+
case "ArrowRight":
|
|
19
|
+
t = Math.min(11, m + 1);
|
|
20
|
+
break;
|
|
21
|
+
case "ArrowLeft":
|
|
22
|
+
t = Math.max(0, m - 1);
|
|
23
|
+
break;
|
|
24
|
+
case "ArrowDown":
|
|
25
|
+
t = Math.min(11, m + 3);
|
|
26
|
+
break;
|
|
27
|
+
case "ArrowUp":
|
|
28
|
+
t = Math.max(0, m - 3);
|
|
29
|
+
break;
|
|
30
|
+
case "Home":
|
|
31
|
+
t = 0;
|
|
32
|
+
break;
|
|
33
|
+
case "End":
|
|
34
|
+
t = 11;
|
|
35
|
+
break;
|
|
36
|
+
default: return;
|
|
37
|
+
}
|
|
38
|
+
for (e.preventDefault(); t !== m && _(p[t]);) if (t += e.key === "ArrowLeft" || e.key === "ArrowUp" ? -1 : 1, t < 0 || t > 11) return;
|
|
39
|
+
h(t), g.current[t]?.focus();
|
|
40
|
+
};
|
|
41
|
+
return /* @__PURE__ */ c("div", {
|
|
42
|
+
ref: d,
|
|
43
|
+
...u,
|
|
44
|
+
className: e("w-[252px]", l),
|
|
45
|
+
children: [/* @__PURE__ */ c("div", {
|
|
46
|
+
className: "text-center pb-ds-04 text-ds-md font-semibold text-surface-fg",
|
|
47
|
+
children: [
|
|
48
|
+
f,
|
|
49
|
+
" – ",
|
|
50
|
+
f + 11
|
|
51
|
+
]
|
|
52
|
+
}), /* @__PURE__ */ s("div", {
|
|
53
|
+
role: "grid",
|
|
54
|
+
"aria-label": "Year picker",
|
|
55
|
+
tabIndex: -1,
|
|
56
|
+
onKeyDown: v,
|
|
57
|
+
children: [
|
|
58
|
+
0,
|
|
59
|
+
1,
|
|
60
|
+
2,
|
|
61
|
+
3
|
|
62
|
+
].map((t) => /* @__PURE__ */ s("div", {
|
|
63
|
+
role: "row",
|
|
64
|
+
className: "grid grid-cols-3 gap-ds-02 mb-ds-02 last:mb-0",
|
|
65
|
+
children: p.slice(t * 3, t * 3 + 3).map((t) => {
|
|
66
|
+
let i = p.indexOf(t), a = t === n, o = _(t);
|
|
67
|
+
return /* @__PURE__ */ s("button", {
|
|
68
|
+
ref: (e) => {
|
|
69
|
+
g.current[i] = e;
|
|
70
|
+
},
|
|
71
|
+
type: "button",
|
|
72
|
+
role: "gridcell",
|
|
73
|
+
tabIndex: i === m ? 0 : -1,
|
|
74
|
+
disabled: o || !1,
|
|
75
|
+
onClick: () => !o && r(t),
|
|
76
|
+
className: e("h-ds-sm-plus rounded-ds-md text-ds-md transition-colors focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2", o && "opacity-action-disabled pointer-events-none cursor-not-allowed", a && "bg-accent-9 text-accent-fg", !a && !o && "hover:bg-surface-raised-hover text-surface-fg"),
|
|
77
|
+
children: t
|
|
78
|
+
}, t);
|
|
79
|
+
})
|
|
80
|
+
}, t))
|
|
81
|
+
})]
|
|
82
|
+
});
|
|
83
|
+
});
|
|
84
|
+
O.displayName = "YearPicker";
|
|
85
|
+
//#endregion
|
|
86
|
+
//#region src/composed/date-picker/month-picker.tsx
|
|
87
|
+
var k = [
|
|
88
|
+
"Jan",
|
|
89
|
+
"Feb",
|
|
90
|
+
"Mar",
|
|
91
|
+
"Apr",
|
|
92
|
+
"May",
|
|
93
|
+
"Jun",
|
|
94
|
+
"Jul",
|
|
95
|
+
"Aug",
|
|
96
|
+
"Sep",
|
|
97
|
+
"Oct",
|
|
98
|
+
"Nov",
|
|
99
|
+
"Dec"
|
|
100
|
+
], A = o.forwardRef(function({ currentYear: t, selectedMonth: n, onMonthSelect: r, minDate: i, maxDate: a, className: l, ...u }, d) {
|
|
101
|
+
let [f, p] = o.useState(n ?? 0), m = o.useRef([]), h = (e) => i != null && (t < i.getFullYear() || t === i.getFullYear() && e < i.getMonth()) || a != null && (t > a.getFullYear() || t === a.getFullYear() && e > a.getMonth()), g = (e) => {
|
|
102
|
+
let t = f;
|
|
103
|
+
switch (e.key) {
|
|
104
|
+
case "ArrowRight":
|
|
105
|
+
t = Math.min(11, f + 1);
|
|
106
|
+
break;
|
|
107
|
+
case "ArrowLeft":
|
|
108
|
+
t = Math.max(0, f - 1);
|
|
109
|
+
break;
|
|
110
|
+
case "ArrowDown":
|
|
111
|
+
t = Math.min(11, f + 4);
|
|
112
|
+
break;
|
|
113
|
+
case "ArrowUp":
|
|
114
|
+
t = Math.max(0, f - 4);
|
|
115
|
+
break;
|
|
116
|
+
case "Home":
|
|
117
|
+
t = 0;
|
|
118
|
+
break;
|
|
119
|
+
case "End":
|
|
120
|
+
t = 11;
|
|
121
|
+
break;
|
|
122
|
+
default: return;
|
|
123
|
+
}
|
|
124
|
+
for (e.preventDefault(); t !== f && h(t);) if (t += e.key === "ArrowLeft" || e.key === "ArrowUp" ? -1 : 1, t < 0 || t > 11) return;
|
|
125
|
+
p(t), m.current[t]?.focus();
|
|
126
|
+
};
|
|
127
|
+
return /* @__PURE__ */ c("div", {
|
|
128
|
+
ref: d,
|
|
129
|
+
...u,
|
|
130
|
+
className: e("w-[252px]", l),
|
|
131
|
+
children: [/* @__PURE__ */ s("div", {
|
|
132
|
+
className: "text-center pb-ds-04 text-ds-md font-semibold text-surface-fg",
|
|
133
|
+
children: t
|
|
134
|
+
}), /* @__PURE__ */ s("div", {
|
|
135
|
+
role: "grid",
|
|
136
|
+
"aria-label": "Month picker",
|
|
137
|
+
tabIndex: -1,
|
|
138
|
+
onKeyDown: g,
|
|
139
|
+
children: [
|
|
140
|
+
0,
|
|
141
|
+
1,
|
|
142
|
+
2
|
|
143
|
+
].map((t) => /* @__PURE__ */ s("div", {
|
|
144
|
+
role: "row",
|
|
145
|
+
className: "grid grid-cols-4 gap-ds-02 mb-ds-02 last:mb-0",
|
|
146
|
+
children: k.slice(t * 4, t * 4 + 4).map((i, a) => {
|
|
147
|
+
let o = t * 4 + a, c = o === n, l = h(o);
|
|
148
|
+
return /* @__PURE__ */ s("button", {
|
|
149
|
+
ref: (e) => {
|
|
150
|
+
m.current[o] = e;
|
|
151
|
+
},
|
|
152
|
+
type: "button",
|
|
153
|
+
role: "gridcell",
|
|
154
|
+
tabIndex: o === f ? 0 : -1,
|
|
155
|
+
disabled: l || !1,
|
|
156
|
+
onClick: () => !l && r(o),
|
|
157
|
+
className: e("h-ds-sm-plus rounded-ds-md text-ds-md transition-colors focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2", l && "opacity-action-disabled pointer-events-none cursor-not-allowed", c && "bg-accent-9 text-accent-fg", !c && !l && "hover:bg-surface-raised-hover text-surface-fg"),
|
|
158
|
+
children: i
|
|
159
|
+
}, i);
|
|
160
|
+
})
|
|
161
|
+
}, t))
|
|
162
|
+
})]
|
|
163
|
+
});
|
|
164
|
+
});
|
|
165
|
+
A.displayName = "MonthPicker";
|
|
166
|
+
//#endregion
|
|
167
|
+
//#region src/composed/date-picker/date-picker.tsx
|
|
168
|
+
var j = o.forwardRef(function({ value: l, onChange: d, placeholder: f = "Pick a date", className: p, formatStr: m = "MMM d, yyyy", minDate: g, maxDate: _, disabledDates: v, ...y }, x) {
|
|
169
|
+
let [C, w] = o.useState(!1), [T, E] = o.useState(l ?? /* @__PURE__ */ new Date()), [D, k] = o.useState("days");
|
|
170
|
+
o.useEffect(() => {
|
|
171
|
+
C || k("days");
|
|
172
|
+
}, [C]);
|
|
173
|
+
let j = (e) => {
|
|
174
|
+
d?.(e), w(!1);
|
|
175
|
+
}, M = () => {
|
|
176
|
+
k((e) => e === "days" ? "months" : "years");
|
|
177
|
+
}, N = (e) => {
|
|
178
|
+
E((t) => b(t, e)), k("days");
|
|
179
|
+
}, P = (e) => {
|
|
180
|
+
E((t) => S(t, e)), k("months");
|
|
181
|
+
}, F = () => {
|
|
182
|
+
switch (D) {
|
|
183
|
+
case "years": return /* @__PURE__ */ s(O, {
|
|
184
|
+
currentYear: T.getFullYear(),
|
|
185
|
+
selectedYear: l?.getFullYear(),
|
|
186
|
+
onYearSelect: P,
|
|
187
|
+
minDate: g,
|
|
188
|
+
maxDate: _
|
|
189
|
+
});
|
|
190
|
+
case "months": return /* @__PURE__ */ s(A, {
|
|
191
|
+
currentYear: T.getFullYear(),
|
|
192
|
+
selectedMonth: l?.getMonth(),
|
|
193
|
+
onMonthSelect: N,
|
|
194
|
+
minDate: g,
|
|
195
|
+
maxDate: _
|
|
196
|
+
});
|
|
197
|
+
default: return /* @__PURE__ */ s(a, {
|
|
198
|
+
currentMonth: T,
|
|
199
|
+
selected: l,
|
|
200
|
+
onSelect: j,
|
|
201
|
+
onMonthChange: E,
|
|
202
|
+
onHeaderClick: M,
|
|
203
|
+
disabledDates: v,
|
|
204
|
+
minDate: g,
|
|
205
|
+
maxDate: _
|
|
206
|
+
});
|
|
207
|
+
}
|
|
208
|
+
};
|
|
209
|
+
return /* @__PURE__ */ c(i, {
|
|
210
|
+
open: C,
|
|
211
|
+
onOpenChange: w,
|
|
212
|
+
children: [/* @__PURE__ */ s(n, {
|
|
213
|
+
asChild: !0,
|
|
214
|
+
children: /* @__PURE__ */ c("button", {
|
|
215
|
+
ref: x,
|
|
216
|
+
type: "button",
|
|
217
|
+
"aria-label": l ? `Change date, ${h(l, m)}` : f,
|
|
218
|
+
...y,
|
|
219
|
+
className: e("inline-flex h-ds-sm-plus items-center gap-ds-03 rounded-ds-lg border border-surface-border-strong bg-surface-overlay px-ds-04 text-left transition-colors duration-fast-01 ease-productive-standard", "hover:border-surface-border-strong", "focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2", p),
|
|
220
|
+
children: [/* @__PURE__ */ s(t, {
|
|
221
|
+
icon: u,
|
|
222
|
+
size: "sm",
|
|
223
|
+
stroke: "light",
|
|
224
|
+
className: "text-surface-fg-subtle"
|
|
225
|
+
}), /* @__PURE__ */ s("span", {
|
|
226
|
+
className: e("text-ds-md", l ? "text-surface-fg" : "text-surface-fg-subtle"),
|
|
227
|
+
children: l ? h(l, m) : f
|
|
228
|
+
})]
|
|
229
|
+
})
|
|
230
|
+
}), /* @__PURE__ */ s(r, {
|
|
231
|
+
className: "w-auto border-surface-border-strong bg-surface-overlay p-ds-04",
|
|
232
|
+
align: "start",
|
|
233
|
+
sideOffset: 4,
|
|
234
|
+
children: F()
|
|
235
|
+
})]
|
|
236
|
+
});
|
|
237
|
+
});
|
|
238
|
+
j.displayName = "DatePicker";
|
|
239
|
+
//#endregion
|
|
240
|
+
//#region src/composed/date-picker/presets.tsx
|
|
241
|
+
var M = {
|
|
242
|
+
today: {
|
|
243
|
+
label: "Today",
|
|
244
|
+
getRange: () => {
|
|
245
|
+
let e = /* @__PURE__ */ new Date();
|
|
246
|
+
return {
|
|
247
|
+
start: C(e),
|
|
248
|
+
end: p(e)
|
|
249
|
+
};
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
yesterday: {
|
|
253
|
+
label: "Yesterday",
|
|
254
|
+
getRange: () => {
|
|
255
|
+
let e = E(/* @__PURE__ */ new Date(), 1);
|
|
256
|
+
return {
|
|
257
|
+
start: C(e),
|
|
258
|
+
end: p(e)
|
|
259
|
+
};
|
|
260
|
+
}
|
|
261
|
+
},
|
|
262
|
+
last7days: {
|
|
263
|
+
label: "Last 7 days",
|
|
264
|
+
getRange: () => {
|
|
265
|
+
let e = /* @__PURE__ */ new Date();
|
|
266
|
+
return {
|
|
267
|
+
start: C(E(e, 6)),
|
|
268
|
+
end: p(e)
|
|
269
|
+
};
|
|
270
|
+
}
|
|
271
|
+
},
|
|
272
|
+
last30days: {
|
|
273
|
+
label: "Last 30 days",
|
|
274
|
+
getRange: () => {
|
|
275
|
+
let e = /* @__PURE__ */ new Date();
|
|
276
|
+
return {
|
|
277
|
+
start: C(E(e, 29)),
|
|
278
|
+
end: p(e)
|
|
279
|
+
};
|
|
280
|
+
}
|
|
281
|
+
},
|
|
282
|
+
thisMonth: {
|
|
283
|
+
label: "This month",
|
|
284
|
+
getRange: () => {
|
|
285
|
+
let e = /* @__PURE__ */ new Date();
|
|
286
|
+
return {
|
|
287
|
+
start: w(e),
|
|
288
|
+
end: m(e)
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
},
|
|
292
|
+
lastMonth: {
|
|
293
|
+
label: "Last month",
|
|
294
|
+
getRange: () => {
|
|
295
|
+
let e = D(/* @__PURE__ */ new Date(), 1);
|
|
296
|
+
return {
|
|
297
|
+
start: w(e),
|
|
298
|
+
end: m(e)
|
|
299
|
+
};
|
|
300
|
+
}
|
|
301
|
+
},
|
|
302
|
+
thisYear: {
|
|
303
|
+
label: "This year",
|
|
304
|
+
getRange: () => {
|
|
305
|
+
let e = /* @__PURE__ */ new Date();
|
|
306
|
+
return {
|
|
307
|
+
start: T(e),
|
|
308
|
+
end: p(e)
|
|
309
|
+
};
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}, N = o.forwardRef(function({ presets: t, onSelect: n, className: r, ...i }, a) {
|
|
313
|
+
return /* @__PURE__ */ s("div", {
|
|
314
|
+
ref: a,
|
|
315
|
+
...i,
|
|
316
|
+
className: e("flex flex-col gap-ds-01", r),
|
|
317
|
+
children: t.map((t) => {
|
|
318
|
+
let r = M[t];
|
|
319
|
+
return r ? /* @__PURE__ */ s("button", {
|
|
320
|
+
type: "button",
|
|
321
|
+
onClick: () => {
|
|
322
|
+
let { start: e, end: t } = r.getRange();
|
|
323
|
+
n(e, t);
|
|
324
|
+
},
|
|
325
|
+
className: e("h-ds-sm w-full rounded-ds-md px-ds-03 text-left text-ds-sm", "text-surface-fg transition-colors", "hover:bg-surface-raised-hover", "focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9"),
|
|
326
|
+
children: r.label
|
|
327
|
+
}, t) : null;
|
|
328
|
+
})
|
|
329
|
+
});
|
|
330
|
+
});
|
|
331
|
+
N.displayName = "Presets";
|
|
332
|
+
//#endregion
|
|
333
|
+
//#region src/composed/date-picker/date-range-picker.tsx
|
|
334
|
+
var P = o.forwardRef(function({ startDate: l, endDate: d, onChange: p, placeholder: m = "Pick a date range", className: v, formatStr: y = "MMM d, yyyy", minDate: x, maxDate: C, disabledDates: w, presets: T, numberOfMonths: E = 1, ...D }, k) {
|
|
335
|
+
let [j, M] = o.useState(!1), [P, F] = o.useState(l ?? /* @__PURE__ */ new Date()), [I, L] = o.useState(l ?? null), [R, z] = o.useState(d ?? null), [B, V] = o.useState(null), [H, U] = o.useState("days"), W = Math.max(1, E);
|
|
336
|
+
o.useEffect(() => {
|
|
337
|
+
L(l ?? null), z(d ?? null);
|
|
338
|
+
}, [l, d]), o.useEffect(() => {
|
|
339
|
+
j || U("days");
|
|
340
|
+
}, [j]);
|
|
341
|
+
let G = (e) => {
|
|
342
|
+
if (!I || I && R) L(e), z(null);
|
|
343
|
+
else {
|
|
344
|
+
let t = _(e, I) ? e : I, n = g(e, I) ? e : I;
|
|
345
|
+
L(t), z(n), p?.({
|
|
346
|
+
start: t,
|
|
347
|
+
end: n
|
|
348
|
+
}), M(!1);
|
|
349
|
+
}
|
|
350
|
+
}, K = (e, t) => {
|
|
351
|
+
L(e), z(t), p?.({
|
|
352
|
+
start: e,
|
|
353
|
+
end: t
|
|
354
|
+
}), M(!1);
|
|
355
|
+
}, q = () => {
|
|
356
|
+
U((e) => e === "days" ? "months" : "years");
|
|
357
|
+
}, J = (e) => {
|
|
358
|
+
F((t) => b(t, e)), U("days");
|
|
359
|
+
}, Y = (e) => {
|
|
360
|
+
F((t) => S(t, e)), U("months");
|
|
361
|
+
}, X = () => I && R ? `${h(I, y)} - ${h(R, y)}` : m, Z = () => W === 1 ? /* @__PURE__ */ s(a, {
|
|
362
|
+
currentMonth: P,
|
|
363
|
+
rangeStart: I,
|
|
364
|
+
rangeEnd: R,
|
|
365
|
+
hoverDate: B,
|
|
366
|
+
onSelect: G,
|
|
367
|
+
onHover: V,
|
|
368
|
+
onMonthChange: F,
|
|
369
|
+
onHeaderClick: q,
|
|
370
|
+
disabledDates: w,
|
|
371
|
+
minDate: x,
|
|
372
|
+
maxDate: C
|
|
373
|
+
}) : /* @__PURE__ */ s("div", {
|
|
374
|
+
className: "flex flex-row gap-ds-04",
|
|
375
|
+
children: Array.from({ length: W }, (e, t) => /* @__PURE__ */ s(a, {
|
|
376
|
+
currentMonth: f(P, t),
|
|
377
|
+
rangeStart: I,
|
|
378
|
+
rangeEnd: R,
|
|
379
|
+
hoverDate: B,
|
|
380
|
+
onSelect: G,
|
|
381
|
+
onHover: V,
|
|
382
|
+
onMonthChange: (e) => {
|
|
383
|
+
F(f(e, -t));
|
|
384
|
+
},
|
|
385
|
+
onHeaderClick: q,
|
|
386
|
+
disabledDates: w,
|
|
387
|
+
minDate: x,
|
|
388
|
+
maxDate: C,
|
|
389
|
+
hidePrevNav: t > 0,
|
|
390
|
+
hideNextNav: t < W - 1
|
|
391
|
+
}, t))
|
|
392
|
+
}), Q = () => {
|
|
393
|
+
switch (H) {
|
|
394
|
+
case "years": return /* @__PURE__ */ s(O, {
|
|
395
|
+
currentYear: P.getFullYear(),
|
|
396
|
+
selectedYear: I?.getFullYear(),
|
|
397
|
+
onYearSelect: Y,
|
|
398
|
+
minDate: x,
|
|
399
|
+
maxDate: C
|
|
400
|
+
});
|
|
401
|
+
case "months": return /* @__PURE__ */ s(A, {
|
|
402
|
+
currentYear: P.getFullYear(),
|
|
403
|
+
selectedMonth: I?.getMonth(),
|
|
404
|
+
onMonthSelect: J,
|
|
405
|
+
minDate: x,
|
|
406
|
+
maxDate: C
|
|
407
|
+
});
|
|
408
|
+
default: return Z();
|
|
409
|
+
}
|
|
410
|
+
}, $ = T && T.length > 0;
|
|
411
|
+
return /* @__PURE__ */ c(i, {
|
|
412
|
+
open: j,
|
|
413
|
+
onOpenChange: M,
|
|
414
|
+
children: [/* @__PURE__ */ s(n, {
|
|
415
|
+
asChild: !0,
|
|
416
|
+
children: /* @__PURE__ */ c("button", {
|
|
417
|
+
ref: k,
|
|
418
|
+
type: "button",
|
|
419
|
+
"aria-label": I && R ? `Change date range, ${X()}` : m,
|
|
420
|
+
...D,
|
|
421
|
+
className: e("inline-flex h-ds-sm-plus items-center gap-ds-03 rounded-ds-lg border border-surface-border-strong bg-surface-overlay px-ds-04 text-left transition-colors duration-fast-01 ease-productive-standard", "hover:border-surface-border-strong", "focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2", v),
|
|
422
|
+
children: [/* @__PURE__ */ s(t, {
|
|
423
|
+
icon: u,
|
|
424
|
+
size: "sm",
|
|
425
|
+
stroke: "light",
|
|
426
|
+
className: "text-surface-fg-subtle"
|
|
427
|
+
}), /* @__PURE__ */ s("span", {
|
|
428
|
+
className: e("text-ds-md", I && R ? "text-surface-fg" : "text-surface-fg-subtle"),
|
|
429
|
+
children: X()
|
|
430
|
+
})]
|
|
431
|
+
})
|
|
432
|
+
}), /* @__PURE__ */ s(r, {
|
|
433
|
+
className: "w-auto border-surface-border-strong bg-surface-overlay p-ds-04",
|
|
434
|
+
align: "start",
|
|
435
|
+
sideOffset: 4,
|
|
436
|
+
children: $ ? /* @__PURE__ */ c("div", {
|
|
437
|
+
className: "flex flex-row gap-ds-04",
|
|
438
|
+
children: [/* @__PURE__ */ s("div", {
|
|
439
|
+
className: "min-w-[140px] border-r border-surface-border-strong pr-ds-04",
|
|
440
|
+
children: /* @__PURE__ */ s(N, {
|
|
441
|
+
presets: T,
|
|
442
|
+
onSelect: K
|
|
443
|
+
})
|
|
444
|
+
}), /* @__PURE__ */ s("div", { children: Q() })]
|
|
445
|
+
}) : Q()
|
|
446
|
+
})]
|
|
447
|
+
});
|
|
448
|
+
});
|
|
449
|
+
P.displayName = "DateRangePicker";
|
|
450
|
+
//#endregion
|
|
451
|
+
//#region src/composed/date-picker/time-picker.tsx
|
|
452
|
+
function F(e, t, n) {
|
|
453
|
+
let r = [];
|
|
454
|
+
for (let i = e; i <= t; i += n) r.push(i);
|
|
455
|
+
return r;
|
|
456
|
+
}
|
|
457
|
+
function I(e) {
|
|
458
|
+
return e.toString().padStart(2, "0");
|
|
459
|
+
}
|
|
460
|
+
var L = o.forwardRef(function({ value: a, onChange: l, format: u = "12h", minuteStep: f = 1, secondStep: p = 1, showSeconds: m = !1, placeholder: g = "Pick a time", className: _, disabled: b = !1, ...S }, C) {
|
|
461
|
+
let [w, T] = o.useState(!1), E = a ? a.getHours() : null, D = a ? a.getMinutes() : null, O = a ? a.getSeconds() : null, k = E === null ? null : E >= 12 ? "PM" : "AM", A = E === null ? null : E === 0 ? 12 : E > 12 ? E - 12 : E, j = u === "12h" ? F(1, 12, 1) : F(0, 23, 1), M = F(0, 59, f), N = F(0, 59, p), P = (e) => {
|
|
462
|
+
let t = a ? new Date(a) : /* @__PURE__ */ new Date(), n = e.hours ?? t.getHours(), r = e.minutes ?? t.getMinutes(), i = e.seconds ?? t.getSeconds();
|
|
463
|
+
u === "12h" && e.hours !== void 0 && (n = (e.ampm ?? k ?? "AM") === "AM" ? e.hours === 12 ? 0 : e.hours : e.hours === 12 ? 12 : e.hours + 12);
|
|
464
|
+
let o = v(t, n);
|
|
465
|
+
return o = y(o, r), o = x(o, i), o;
|
|
466
|
+
}, L = (e) => {
|
|
467
|
+
let t = P({ hours: e });
|
|
468
|
+
l?.(t);
|
|
469
|
+
}, R = (e) => {
|
|
470
|
+
let t = P({ minutes: e });
|
|
471
|
+
l?.(t);
|
|
472
|
+
}, z = (e) => {
|
|
473
|
+
let t = P({ seconds: e });
|
|
474
|
+
l?.(t);
|
|
475
|
+
}, B = (e) => {
|
|
476
|
+
if (!a) {
|
|
477
|
+
let t = e === "AM" ? 0 : 12, n = /* @__PURE__ */ new Date();
|
|
478
|
+
n = v(n, t), n = y(n, 0), n = x(n, 0), l?.(n);
|
|
479
|
+
return;
|
|
480
|
+
}
|
|
481
|
+
let t = a.getHours(), n;
|
|
482
|
+
n = e === "AM" ? t >= 12 ? t - 12 : t : t < 12 ? t + 12 : t, l?.(v(new Date(a), n));
|
|
483
|
+
}, V = o.useMemo(() => a ? u === "12h" ? h(a, m ? "h:mm:ss a" : "h:mm a") : h(a, m ? "HH:mm:ss" : "HH:mm") : null, [
|
|
484
|
+
a,
|
|
485
|
+
u,
|
|
486
|
+
m
|
|
487
|
+
]), H = u === "12h" ? A : E, U = "flex flex-col gap-ds-01 overflow-y-auto max-h-[200px] px-ds-01", W = "flex h-ds-sm w-full items-center justify-center rounded-ds-md text-ds-md transition-colors duration-fast-01 ease-productive-standard cursor-pointer", G = "bg-accent-9 text-accent-fg", K = "text-surface-fg hover:bg-surface-raised-hover";
|
|
488
|
+
return /* @__PURE__ */ c(i, {
|
|
489
|
+
open: w,
|
|
490
|
+
onOpenChange: T,
|
|
491
|
+
children: [/* @__PURE__ */ s(n, {
|
|
492
|
+
asChild: !0,
|
|
493
|
+
children: /* @__PURE__ */ c("button", {
|
|
494
|
+
ref: C,
|
|
495
|
+
type: "button",
|
|
496
|
+
disabled: b,
|
|
497
|
+
...S,
|
|
498
|
+
className: e("inline-flex h-ds-sm-plus items-center gap-ds-03 rounded-ds-lg border border-surface-border-strong bg-surface-overlay px-ds-04 text-left transition-colors duration-fast-01 ease-productive-standard", "hover:border-surface-border-strong", "focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2", b && "opacity-action-disabled pointer-events-none", _),
|
|
499
|
+
"aria-label": V ? `Selected time: ${V}` : g,
|
|
500
|
+
children: [/* @__PURE__ */ s(t, {
|
|
501
|
+
icon: d,
|
|
502
|
+
size: "sm",
|
|
503
|
+
stroke: "light",
|
|
504
|
+
className: "text-surface-fg-subtle"
|
|
505
|
+
}), /* @__PURE__ */ s("span", {
|
|
506
|
+
className: e("text-ds-md", V ? "text-surface-fg" : "text-surface-fg-subtle"),
|
|
507
|
+
children: V ?? g
|
|
508
|
+
})]
|
|
509
|
+
})
|
|
510
|
+
}), /* @__PURE__ */ s(r, {
|
|
511
|
+
className: "w-auto border-surface-border-strong bg-surface-overlay p-ds-04",
|
|
512
|
+
align: "start",
|
|
513
|
+
sideOffset: 4,
|
|
514
|
+
children: /* @__PURE__ */ c("div", {
|
|
515
|
+
className: "flex gap-ds-03",
|
|
516
|
+
role: "group",
|
|
517
|
+
"aria-label": "Time picker",
|
|
518
|
+
children: [
|
|
519
|
+
/* @__PURE__ */ c("div", {
|
|
520
|
+
className: "flex flex-col items-center gap-ds-02",
|
|
521
|
+
children: [/* @__PURE__ */ s("span", {
|
|
522
|
+
className: "text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle",
|
|
523
|
+
children: "Hr"
|
|
524
|
+
}), /* @__PURE__ */ s("div", {
|
|
525
|
+
className: e(U, "min-w-[48px]"),
|
|
526
|
+
children: j.map((t) => /* @__PURE__ */ s("button", {
|
|
527
|
+
type: "button",
|
|
528
|
+
onClick: () => L(t),
|
|
529
|
+
className: e(W, H === t ? G : K),
|
|
530
|
+
"aria-label": `${t} hours`,
|
|
531
|
+
"aria-selected": H === t || void 0,
|
|
532
|
+
children: u === "24h" ? I(t) : t
|
|
533
|
+
}, t))
|
|
534
|
+
})]
|
|
535
|
+
}),
|
|
536
|
+
/* @__PURE__ */ c("div", {
|
|
537
|
+
className: "flex flex-col items-center gap-ds-02",
|
|
538
|
+
children: [/* @__PURE__ */ s("span", {
|
|
539
|
+
className: "text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle",
|
|
540
|
+
children: "Min"
|
|
541
|
+
}), /* @__PURE__ */ s("div", {
|
|
542
|
+
className: e(U, "min-w-[48px]"),
|
|
543
|
+
children: M.map((t) => /* @__PURE__ */ s("button", {
|
|
544
|
+
type: "button",
|
|
545
|
+
onClick: () => R(t),
|
|
546
|
+
className: e(W, D === t ? G : K),
|
|
547
|
+
"aria-label": `${I(t)} minutes`,
|
|
548
|
+
"aria-selected": D === t || void 0,
|
|
549
|
+
children: I(t)
|
|
550
|
+
}, t))
|
|
551
|
+
})]
|
|
552
|
+
}),
|
|
553
|
+
m && /* @__PURE__ */ c("div", {
|
|
554
|
+
className: "flex flex-col items-center gap-ds-02",
|
|
555
|
+
children: [/* @__PURE__ */ s("span", {
|
|
556
|
+
className: "text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle",
|
|
557
|
+
children: "Sec"
|
|
558
|
+
}), /* @__PURE__ */ s("div", {
|
|
559
|
+
className: e(U, "min-w-[48px]"),
|
|
560
|
+
children: N.map((t) => /* @__PURE__ */ s("button", {
|
|
561
|
+
type: "button",
|
|
562
|
+
onClick: () => z(t),
|
|
563
|
+
className: e(W, O === t ? G : K),
|
|
564
|
+
"aria-label": `${I(t)} seconds`,
|
|
565
|
+
"aria-selected": O === t || void 0,
|
|
566
|
+
children: I(t)
|
|
567
|
+
}, t))
|
|
568
|
+
})]
|
|
569
|
+
}),
|
|
570
|
+
u === "12h" && /* @__PURE__ */ c("div", {
|
|
571
|
+
className: "flex flex-col items-center gap-ds-02",
|
|
572
|
+
children: [/* @__PURE__ */ s("span", {
|
|
573
|
+
className: "text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle",
|
|
574
|
+
children: "\xA0"
|
|
575
|
+
}), /* @__PURE__ */ s("div", {
|
|
576
|
+
className: "flex flex-col gap-ds-01 px-ds-01",
|
|
577
|
+
children: ["AM", "PM"].map((t) => /* @__PURE__ */ s("button", {
|
|
578
|
+
type: "button",
|
|
579
|
+
onClick: () => B(t),
|
|
580
|
+
className: e(W, "min-w-[44px] font-semibold", k === t ? G : K),
|
|
581
|
+
"aria-label": t,
|
|
582
|
+
"aria-selected": k === t || void 0,
|
|
583
|
+
children: t
|
|
584
|
+
}, t))
|
|
585
|
+
})]
|
|
586
|
+
})
|
|
587
|
+
]
|
|
588
|
+
})
|
|
589
|
+
})]
|
|
590
|
+
});
|
|
591
|
+
});
|
|
592
|
+
L.displayName = "TimePicker";
|
|
593
|
+
//#endregion
|
|
594
|
+
//#region src/composed/date-picker/date-time-picker.tsx
|
|
595
|
+
function R(e) {
|
|
596
|
+
return e.toString().padStart(2, "0");
|
|
597
|
+
}
|
|
598
|
+
function z(e, t, n) {
|
|
599
|
+
let r = [];
|
|
600
|
+
for (let i = e; i <= t; i += n) r.push(i);
|
|
601
|
+
return r;
|
|
602
|
+
}
|
|
603
|
+
var B = o.forwardRef(function({ value: u, onChange: d, minDate: f, maxDate: p, disabledDates: m, timeFormat: g = "12h", minuteStep: _ = 1, placeholder: x = "Pick date & time", className: C, ...w }, T) {
|
|
604
|
+
let [E, D] = o.useState(!1), [k, j] = o.useState(u ?? /* @__PURE__ */ new Date()), [M, N] = o.useState("days");
|
|
605
|
+
o.useEffect(() => {
|
|
606
|
+
E || N("days");
|
|
607
|
+
}, [E]);
|
|
608
|
+
let P = u ? u.getHours() : 0, F = u ? u.getMinutes() : 0, I = P >= 12 ? "PM" : "AM", L = P === 0 ? 12 : P > 12 ? P - 12 : P, B = g === "12h" ? z(1, 12, 1) : z(0, 23, 1), V = z(0, 59, _), H = g === "12h" ? L : P, U = (e) => {
|
|
609
|
+
let t = v(e, u ? u.getHours() : P);
|
|
610
|
+
t = y(t, u ? u.getMinutes() : F), d?.(t);
|
|
611
|
+
}, W = () => {
|
|
612
|
+
N((e) => e === "days" ? "months" : "years");
|
|
613
|
+
}, G = (e) => {
|
|
614
|
+
j((t) => b(t, e)), N("days");
|
|
615
|
+
}, K = (e) => {
|
|
616
|
+
j((t) => S(t, e)), N("months");
|
|
617
|
+
}, q = (e) => {
|
|
618
|
+
let t = u ? new Date(u) : /* @__PURE__ */ new Date(), n = e;
|
|
619
|
+
g === "12h" && (n = (u ? I : "AM") === "AM" ? e === 12 ? 0 : e : e === 12 ? 12 : e + 12);
|
|
620
|
+
let r = v(t, n);
|
|
621
|
+
d?.(r);
|
|
622
|
+
}, J = (e) => {
|
|
623
|
+
let t = y(u ? new Date(u) : /* @__PURE__ */ new Date(), e);
|
|
624
|
+
d?.(t);
|
|
625
|
+
}, Y = (e) => {
|
|
626
|
+
let t = u ? new Date(u) : /* @__PURE__ */ new Date(), n = t.getHours(), r;
|
|
627
|
+
r = e === "AM" ? n >= 12 ? n - 12 : n : n < 12 ? n + 12 : n, d?.(v(t, r));
|
|
628
|
+
}, X = o.useMemo(() => u ? h(u, g === "12h" ? "MMM d, yyyy h:mm a" : "MMM d, yyyy HH:mm") : null, [u, g]), Z = () => {
|
|
629
|
+
switch (M) {
|
|
630
|
+
case "years": return /* @__PURE__ */ s(O, {
|
|
631
|
+
currentYear: k.getFullYear(),
|
|
632
|
+
selectedYear: u?.getFullYear(),
|
|
633
|
+
onYearSelect: K,
|
|
634
|
+
minDate: f,
|
|
635
|
+
maxDate: p
|
|
636
|
+
});
|
|
637
|
+
case "months": return /* @__PURE__ */ s(A, {
|
|
638
|
+
currentYear: k.getFullYear(),
|
|
639
|
+
selectedMonth: u?.getMonth(),
|
|
640
|
+
onMonthSelect: G,
|
|
641
|
+
minDate: f,
|
|
642
|
+
maxDate: p
|
|
643
|
+
});
|
|
644
|
+
default: return /* @__PURE__ */ s(a, {
|
|
645
|
+
currentMonth: k,
|
|
646
|
+
selected: u,
|
|
647
|
+
onSelect: U,
|
|
648
|
+
onMonthChange: j,
|
|
649
|
+
onHeaderClick: W,
|
|
650
|
+
disabledDates: m,
|
|
651
|
+
minDate: f,
|
|
652
|
+
maxDate: p
|
|
653
|
+
});
|
|
654
|
+
}
|
|
655
|
+
}, Q = "h-ds-sm rounded-ds-md border border-surface-border-strong bg-surface-overlay px-ds-02 text-ds-md text-surface-fg transition-colors duration-fast-01 ease-productive-standard hover:border-surface-border-strong focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 cursor-pointer appearance-none";
|
|
656
|
+
return /* @__PURE__ */ c(i, {
|
|
657
|
+
open: E,
|
|
658
|
+
onOpenChange: D,
|
|
659
|
+
children: [/* @__PURE__ */ s(n, {
|
|
660
|
+
asChild: !0,
|
|
661
|
+
children: /* @__PURE__ */ c("button", {
|
|
662
|
+
ref: T,
|
|
663
|
+
type: "button",
|
|
664
|
+
...w,
|
|
665
|
+
className: e("inline-flex h-ds-sm-plus items-center gap-ds-03 rounded-ds-lg border border-surface-border-strong bg-surface-overlay px-ds-04 text-left transition-colors duration-fast-01 ease-productive-standard", "hover:border-surface-border-strong", "focus-visible:outline-hidden focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2", C),
|
|
666
|
+
"aria-label": X ? `Selected: ${X}` : x,
|
|
667
|
+
children: [/* @__PURE__ */ s(t, {
|
|
668
|
+
icon: l,
|
|
669
|
+
size: "sm",
|
|
670
|
+
stroke: "light",
|
|
671
|
+
className: "text-surface-fg-subtle"
|
|
672
|
+
}), /* @__PURE__ */ s("span", {
|
|
673
|
+
className: e("text-ds-md", X ? "text-surface-fg" : "text-surface-fg-subtle"),
|
|
674
|
+
children: X ?? x
|
|
675
|
+
})]
|
|
676
|
+
})
|
|
677
|
+
}), /* @__PURE__ */ s(r, {
|
|
678
|
+
className: "w-auto border-surface-border-strong bg-surface-overlay p-ds-04",
|
|
679
|
+
align: "start",
|
|
680
|
+
sideOffset: 4,
|
|
681
|
+
children: /* @__PURE__ */ c("div", {
|
|
682
|
+
className: "flex flex-col gap-ds-04",
|
|
683
|
+
children: [Z(), M === "days" && /* @__PURE__ */ c("div", {
|
|
684
|
+
className: "flex items-center gap-ds-02 border-t border-surface-border-strong pt-ds-04",
|
|
685
|
+
children: [
|
|
686
|
+
/* @__PURE__ */ s("span", {
|
|
687
|
+
className: "text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle",
|
|
688
|
+
children: "Time"
|
|
689
|
+
}),
|
|
690
|
+
/* @__PURE__ */ c("select", {
|
|
691
|
+
value: H ?? "",
|
|
692
|
+
onChange: (e) => q(Number(e.target.value)),
|
|
693
|
+
className: Q,
|
|
694
|
+
"aria-label": "Hour",
|
|
695
|
+
children: [!u && /* @__PURE__ */ s("option", {
|
|
696
|
+
value: "",
|
|
697
|
+
children: "--"
|
|
698
|
+
}), B.map((e) => /* @__PURE__ */ s("option", {
|
|
699
|
+
value: e,
|
|
700
|
+
children: g === "24h" ? R(e) : e
|
|
701
|
+
}, e))]
|
|
702
|
+
}),
|
|
703
|
+
/* @__PURE__ */ s("span", {
|
|
704
|
+
className: "text-ds-md font-semibold text-surface-fg-subtle",
|
|
705
|
+
children: ":"
|
|
706
|
+
}),
|
|
707
|
+
/* @__PURE__ */ c("select", {
|
|
708
|
+
value: u ? F : "",
|
|
709
|
+
onChange: (e) => J(Number(e.target.value)),
|
|
710
|
+
className: Q,
|
|
711
|
+
"aria-label": "Minute",
|
|
712
|
+
children: [!u && /* @__PURE__ */ s("option", {
|
|
713
|
+
value: "",
|
|
714
|
+
children: "--"
|
|
715
|
+
}), V.map((e) => /* @__PURE__ */ s("option", {
|
|
716
|
+
value: e,
|
|
717
|
+
children: R(e)
|
|
718
|
+
}, e))]
|
|
719
|
+
}),
|
|
720
|
+
g === "12h" && /* @__PURE__ */ c("select", {
|
|
721
|
+
value: u ? I : "",
|
|
722
|
+
onChange: (e) => Y(e.target.value),
|
|
723
|
+
className: Q,
|
|
724
|
+
"aria-label": "AM or PM",
|
|
725
|
+
children: [
|
|
726
|
+
!u && /* @__PURE__ */ s("option", {
|
|
727
|
+
value: "",
|
|
728
|
+
children: "--"
|
|
729
|
+
}),
|
|
730
|
+
/* @__PURE__ */ s("option", {
|
|
731
|
+
value: "AM",
|
|
732
|
+
children: "AM"
|
|
733
|
+
}),
|
|
734
|
+
/* @__PURE__ */ s("option", {
|
|
735
|
+
value: "PM",
|
|
736
|
+
children: "PM"
|
|
737
|
+
})
|
|
738
|
+
]
|
|
739
|
+
})
|
|
740
|
+
]
|
|
741
|
+
})]
|
|
742
|
+
})
|
|
743
|
+
})]
|
|
744
|
+
});
|
|
745
|
+
});
|
|
746
|
+
B.displayName = "DateTimePicker";
|
|
747
|
+
//#endregion
|
|
748
|
+
export { j as a, N as i, L as n, A as o, P as r, O as s, B as t };
|