@major-tech/ui 0.0.0-stage → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +107 -0
- package/THIRD_PARTY_NOTICES.md +27 -0
- package/dist/components/accordion.d.ts +33 -0
- package/dist/components/accordion.d.ts.map +1 -0
- package/dist/components/accordion.js +51 -0
- package/dist/components/accordion.js.map +1 -0
- package/dist/components/activity-chart.d.ts +26 -0
- package/dist/components/activity-chart.d.ts.map +1 -0
- package/dist/components/activity-chart.js +56 -0
- package/dist/components/activity-chart.js.map +1 -0
- package/dist/components/alert-dialog.d.ts +28 -0
- package/dist/components/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog.js +51 -0
- package/dist/components/alert-dialog.js.map +1 -0
- package/dist/components/alert.d.ts +34 -0
- package/dist/components/alert.d.ts.map +1 -0
- package/dist/components/alert.js +59 -0
- package/dist/components/alert.js.map +1 -0
- package/dist/components/ask-user-question.d.ts +103 -0
- package/dist/components/ask-user-question.d.ts.map +1 -0
- package/dist/components/ask-user-question.js +401 -0
- package/dist/components/ask-user-question.js.map +1 -0
- package/dist/components/attachment-gallery.d.ts +137 -0
- package/dist/components/attachment-gallery.d.ts.map +1 -0
- package/dist/components/attachment-gallery.js +317 -0
- package/dist/components/attachment-gallery.js.map +1 -0
- package/dist/components/avatar.d.ts +37 -0
- package/dist/components/avatar.d.ts.map +1 -0
- package/dist/components/avatar.js +62 -0
- package/dist/components/avatar.js.map +1 -0
- package/dist/components/badge.d.ts +29 -0
- package/dist/components/badge.d.ts.map +1 -0
- package/dist/components/badge.js +50 -0
- package/dist/components/badge.js.map +1 -0
- package/dist/components/brand-tile.d.ts +33 -0
- package/dist/components/brand-tile.d.ts.map +1 -0
- package/dist/components/brand-tile.js +36 -0
- package/dist/components/brand-tile.js.map +1 -0
- package/dist/components/button.d.ts +51 -0
- package/dist/components/button.d.ts.map +1 -0
- package/dist/components/button.js +90 -0
- package/dist/components/button.js.map +1 -0
- package/dist/components/calendar.d.ts +18 -0
- package/dist/components/calendar.d.ts.map +1 -0
- package/dist/components/calendar.js +78 -0
- package/dist/components/calendar.js.map +1 -0
- package/dist/components/card.d.ts +18 -0
- package/dist/components/card.d.ts.map +1 -0
- package/dist/components/card.js +34 -0
- package/dist/components/card.js.map +1 -0
- package/dist/components/carousel.d.ts +48 -0
- package/dist/components/carousel.d.ts.map +1 -0
- package/dist/components/carousel.js +227 -0
- package/dist/components/carousel.js.map +1 -0
- package/dist/components/catalog-card.d.ts +29 -0
- package/dist/components/catalog-card.d.ts.map +1 -0
- package/dist/components/catalog-card.js +20 -0
- package/dist/components/catalog-card.js.map +1 -0
- package/dist/components/chart.d.ts +118 -0
- package/dist/components/chart.d.ts.map +1 -0
- package/dist/components/chart.js +209 -0
- package/dist/components/chart.js.map +1 -0
- package/dist/components/checkbox.d.ts +8 -0
- package/dist/components/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox.js +14 -0
- package/dist/components/checkbox.js.map +1 -0
- package/dist/components/chip.d.ts +68 -0
- package/dist/components/chip.d.ts.map +1 -0
- package/dist/components/chip.js +100 -0
- package/dist/components/chip.js.map +1 -0
- package/dist/components/code-block.d.ts +99 -0
- package/dist/components/code-block.d.ts.map +1 -0
- package/dist/components/code-block.js +144 -0
- package/dist/components/code-block.js.map +1 -0
- package/dist/components/collapsible.d.ts +17 -0
- package/dist/components/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible.js +25 -0
- package/dist/components/collapsible.js.map +1 -0
- package/dist/components/command.d.ts +51 -0
- package/dist/components/command.d.ts.map +1 -0
- package/dist/components/command.js +120 -0
- package/dist/components/command.js.map +1 -0
- package/dist/components/composer.d.ts +211 -0
- package/dist/components/composer.d.ts.map +1 -0
- package/dist/components/composer.js +605 -0
- package/dist/components/composer.js.map +1 -0
- package/dist/components/connector-request.d.ts +63 -0
- package/dist/components/connector-request.d.ts.map +1 -0
- package/dist/components/connector-request.js +57 -0
- package/dist/components/connector-request.js.map +1 -0
- package/dist/components/context-menu.d.ts +26 -0
- package/dist/components/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu.js +33 -0
- package/dist/components/context-menu.js.map +1 -0
- package/dist/components/data-table.d.ts +61 -0
- package/dist/components/data-table.d.ts.map +1 -0
- package/dist/components/data-table.js +79 -0
- package/dist/components/data-table.js.map +1 -0
- package/dist/components/date-range-picker.d.ts +54 -0
- package/dist/components/date-range-picker.d.ts.map +1 -0
- package/dist/components/date-range-picker.js +451 -0
- package/dist/components/date-range-picker.js.map +1 -0
- package/dist/components/dialog.d.ts +46 -0
- package/dist/components/dialog.d.ts.map +1 -0
- package/dist/components/dialog.js +75 -0
- package/dist/components/dialog.js.map +1 -0
- package/dist/components/drawer.d.ts +85 -0
- package/dist/components/drawer.d.ts.map +1 -0
- package/dist/components/drawer.js +166 -0
- package/dist/components/drawer.js.map +1 -0
- package/dist/components/dropdown-menu.d.ts +77 -0
- package/dist/components/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu.js +112 -0
- package/dist/components/dropdown-menu.js.map +1 -0
- package/dist/components/editor-tabs.d.ts +49 -0
- package/dist/components/editor-tabs.d.ts.map +1 -0
- package/dist/components/editor-tabs.js +159 -0
- package/dist/components/editor-tabs.js.map +1 -0
- package/dist/components/empty-state.d.ts +21 -0
- package/dist/components/empty-state.d.ts.map +1 -0
- package/dist/components/empty-state.js +14 -0
- package/dist/components/empty-state.js.map +1 -0
- package/dist/components/entity-card.d.ts +301 -0
- package/dist/components/entity-card.d.ts.map +1 -0
- package/dist/components/entity-card.js +392 -0
- package/dist/components/entity-card.js.map +1 -0
- package/dist/components/entity-row.d.ts +37 -0
- package/dist/components/entity-row.d.ts.map +1 -0
- package/dist/components/entity-row.js +65 -0
- package/dist/components/entity-row.js.map +1 -0
- package/dist/components/env-var-request.d.ts +51 -0
- package/dist/components/env-var-request.d.ts.map +1 -0
- package/dist/components/env-var-request.js +50 -0
- package/dist/components/env-var-request.js.map +1 -0
- package/dist/components/field.d.ts +30 -0
- package/dist/components/field.d.ts.map +1 -0
- package/dist/components/field.js +48 -0
- package/dist/components/field.js.map +1 -0
- package/dist/components/file-upload.d.ts +108 -0
- package/dist/components/file-upload.d.ts.map +1 -0
- package/dist/components/file-upload.js +217 -0
- package/dist/components/file-upload.js.map +1 -0
- package/dist/components/hover-card.d.ts +18 -0
- package/dist/components/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card.js +84 -0
- package/dist/components/hover-card.js.map +1 -0
- package/dist/components/input-group.d.ts +29 -0
- package/dist/components/input-group.d.ts.map +1 -0
- package/dist/components/input-group.js +61 -0
- package/dist/components/input-group.js.map +1 -0
- package/dist/components/input.d.ts +9 -0
- package/dist/components/input.d.ts.map +1 -0
- package/dist/components/input.js +13 -0
- package/dist/components/input.js.map +1 -0
- package/dist/components/island.d.ts +18 -0
- package/dist/components/island.d.ts.map +1 -0
- package/dist/components/island.js +30 -0
- package/dist/components/island.js.map +1 -0
- package/dist/components/kbd.d.ts +7 -0
- package/dist/components/kbd.d.ts.map +1 -0
- package/dist/components/kbd.js +11 -0
- package/dist/components/kbd.js.map +1 -0
- package/dist/components/label.d.ts +8 -0
- package/dist/components/label.d.ts.map +1 -0
- package/dist/components/label.js +12 -0
- package/dist/components/label.js.map +1 -0
- package/dist/components/markdown.d.ts +24 -0
- package/dist/components/markdown.d.ts.map +1 -0
- package/dist/components/markdown.js +38 -0
- package/dist/components/markdown.js.map +1 -0
- package/dist/components/message.d.ts +38 -0
- package/dist/components/message.d.ts.map +1 -0
- package/dist/components/message.js +25 -0
- package/dist/components/message.js.map +1 -0
- package/dist/components/page-header.d.ts +31 -0
- package/dist/components/page-header.d.ts.map +1 -0
- package/dist/components/page-header.js +94 -0
- package/dist/components/page-header.js.map +1 -0
- package/dist/components/pagination.d.ts +22 -0
- package/dist/components/pagination.d.ts.map +1 -0
- package/dist/components/pagination.js +36 -0
- package/dist/components/pagination.js.map +1 -0
- package/dist/components/password-input.d.ts +5 -0
- package/dist/components/password-input.d.ts.map +1 -0
- package/dist/components/password-input.js +12 -0
- package/dist/components/password-input.js.map +1 -0
- package/dist/components/pepper.d.ts +92 -0
- package/dist/components/pepper.d.ts.map +1 -0
- package/dist/components/pepper.js +1279 -0
- package/dist/components/pepper.js.map +1 -0
- package/dist/components/permission-request.d.ts +53 -0
- package/dist/components/permission-request.d.ts.map +1 -0
- package/dist/components/permission-request.js +54 -0
- package/dist/components/permission-request.js.map +1 -0
- package/dist/components/popover.d.ts +42 -0
- package/dist/components/popover.d.ts.map +1 -0
- package/dist/components/popover.js +76 -0
- package/dist/components/popover.js.map +1 -0
- package/dist/components/progress.d.ts +9 -0
- package/dist/components/progress.d.ts.map +1 -0
- package/dist/components/progress.js +12 -0
- package/dist/components/progress.js.map +1 -0
- package/dist/components/progressive-blur.d.ts +31 -0
- package/dist/components/progressive-blur.d.ts.map +1 -0
- package/dist/components/progressive-blur.js +44 -0
- package/dist/components/progressive-blur.js.map +1 -0
- package/dist/components/radio-group.d.ts +8 -0
- package/dist/components/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group.js +15 -0
- package/dist/components/radio-group.js.map +1 -0
- package/dist/components/request-card.d.ts +34 -0
- package/dist/components/request-card.d.ts.map +1 -0
- package/dist/components/request-card.js +50 -0
- package/dist/components/request-card.js.map +1 -0
- package/dist/components/resizable.d.ts +24 -0
- package/dist/components/resizable.d.ts.map +1 -0
- package/dist/components/resizable.js +40 -0
- package/dist/components/resizable.js.map +1 -0
- package/dist/components/responsive-overlay.d.ts +136 -0
- package/dist/components/responsive-overlay.d.ts.map +1 -0
- package/dist/components/responsive-overlay.js +302 -0
- package/dist/components/responsive-overlay.js.map +1 -0
- package/dist/components/scroll-shadows.d.ts +11 -0
- package/dist/components/scroll-shadows.d.ts.map +1 -0
- package/dist/components/scroll-shadows.js +53 -0
- package/dist/components/scroll-shadows.js.map +1 -0
- package/dist/components/search-field.d.ts +16 -0
- package/dist/components/search-field.d.ts.map +1 -0
- package/dist/components/search-field.js +50 -0
- package/dist/components/search-field.js.map +1 -0
- package/dist/components/searchable-select.d.ts +43 -0
- package/dist/components/searchable-select.d.ts.map +1 -0
- package/dist/components/searchable-select.js +39 -0
- package/dist/components/searchable-select.js.map +1 -0
- package/dist/components/select.d.ts +60 -0
- package/dist/components/select.d.ts.map +1 -0
- package/dist/components/select.js +94 -0
- package/dist/components/select.js.map +1 -0
- package/dist/components/separator.d.ts +7 -0
- package/dist/components/separator.d.ts.map +1 -0
- package/dist/components/separator.js +12 -0
- package/dist/components/separator.js.map +1 -0
- package/dist/components/settings-section.d.ts +41 -0
- package/dist/components/settings-section.d.ts.map +1 -0
- package/dist/components/settings-section.js +50 -0
- package/dist/components/settings-section.js.map +1 -0
- package/dist/components/sidebar-item.d.ts +41 -0
- package/dist/components/sidebar-item.d.ts.map +1 -0
- package/dist/components/sidebar-item.js +59 -0
- package/dist/components/sidebar-item.js.map +1 -0
- package/dist/components/skeleton.d.ts +7 -0
- package/dist/components/skeleton.d.ts.map +1 -0
- package/dist/components/skeleton.js +11 -0
- package/dist/components/skeleton.js.map +1 -0
- package/dist/components/slider.d.ts +10 -0
- package/dist/components/slider.d.ts.map +1 -0
- package/dist/components/slider.js +36 -0
- package/dist/components/slider.js.map +1 -0
- package/dist/components/sonner.d.ts +8 -0
- package/dist/components/sonner.d.ts.map +1 -0
- package/dist/components/sonner.js +21 -0
- package/dist/components/sonner.js.map +1 -0
- package/dist/components/spinner.d.ts +7 -0
- package/dist/components/spinner.d.ts.map +1 -0
- package/dist/components/spinner.js +12 -0
- package/dist/components/spinner.js.map +1 -0
- package/dist/components/stat-strip.d.ts +20 -0
- package/dist/components/stat-strip.d.ts.map +1 -0
- package/dist/components/stat-strip.js +11 -0
- package/dist/components/stat-strip.js.map +1 -0
- package/dist/components/status-dot.d.ts +25 -0
- package/dist/components/status-dot.d.ts.map +1 -0
- package/dist/components/status-dot.js +31 -0
- package/dist/components/status-dot.js.map +1 -0
- package/dist/components/subagent-run.d.ts +27 -0
- package/dist/components/subagent-run.d.ts.map +1 -0
- package/dist/components/subagent-run.js +38 -0
- package/dist/components/subagent-run.js.map +1 -0
- package/dist/components/switch.d.ts +8 -0
- package/dist/components/switch.d.ts.map +1 -0
- package/dist/components/switch.js +13 -0
- package/dist/components/switch.js.map +1 -0
- package/dist/components/system-notice.d.ts +34 -0
- package/dist/components/system-notice.d.ts.map +1 -0
- package/dist/components/system-notice.js +52 -0
- package/dist/components/system-notice.js.map +1 -0
- package/dist/components/table.d.ts +27 -0
- package/dist/components/table.d.ts.map +1 -0
- package/dist/components/table.js +37 -0
- package/dist/components/table.js.map +1 -0
- package/dist/components/tabs.d.ts +40 -0
- package/dist/components/tabs.d.ts.map +1 -0
- package/dist/components/tabs.js +52 -0
- package/dist/components/tabs.js.map +1 -0
- package/dist/components/textarea.d.ts +5 -0
- package/dist/components/textarea.d.ts.map +1 -0
- package/dist/components/textarea.js +9 -0
- package/dist/components/textarea.js.map +1 -0
- package/dist/components/thinking-indicator.d.ts +21 -0
- package/dist/components/thinking-indicator.d.ts.map +1 -0
- package/dist/components/thinking-indicator.js +136 -0
- package/dist/components/thinking-indicator.js.map +1 -0
- package/dist/components/thread-status.d.ts +25 -0
- package/dist/components/thread-status.d.ts.map +1 -0
- package/dist/components/thread-status.js +41 -0
- package/dist/components/thread-status.js.map +1 -0
- package/dist/components/todo-list.d.ts +52 -0
- package/dist/components/todo-list.d.ts.map +1 -0
- package/dist/components/todo-list.js +137 -0
- package/dist/components/todo-list.js.map +1 -0
- package/dist/components/toggle-group.d.ts +17 -0
- package/dist/components/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group.js +26 -0
- package/dist/components/toggle-group.js.map +1 -0
- package/dist/components/toggle.d.ts +27 -0
- package/dist/components/toggle.d.ts.map +1 -0
- package/dist/components/toggle.js +44 -0
- package/dist/components/toggle.js.map +1 -0
- package/dist/components/tool-call.d.ts +60 -0
- package/dist/components/tool-call.d.ts.map +1 -0
- package/dist/components/tool-call.js +94 -0
- package/dist/components/tool-call.js.map +1 -0
- package/dist/components/tool-result.d.ts +127 -0
- package/dist/components/tool-result.d.ts.map +1 -0
- package/dist/components/tool-result.js +155 -0
- package/dist/components/tool-result.js.map +1 -0
- package/dist/components/tooltip.d.ts +18 -0
- package/dist/components/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip.js +38 -0
- package/dist/components/tooltip.js.map +1 -0
- package/dist/components/trace.d.ts +38 -0
- package/dist/components/trace.d.ts.map +1 -0
- package/dist/components/trace.js +52 -0
- package/dist/components/trace.js.map +1 -0
- package/dist/components/turn-summary.d.ts +17 -0
- package/dist/components/turn-summary.d.ts.map +1 -0
- package/dist/components/turn-summary.js +19 -0
- package/dist/components/turn-summary.js.map +1 -0
- package/dist/components/usage-meter.d.ts +16 -0
- package/dist/components/usage-meter.d.ts.map +1 -0
- package/dist/components/usage-meter.js +10 -0
- package/dist/components/usage-meter.js.map +1 -0
- package/dist/components/view-switcher.d.ts +25 -0
- package/dist/components/view-switcher.d.ts.map +1 -0
- package/dist/components/view-switcher.js +196 -0
- package/dist/components/view-switcher.js.map +1 -0
- package/dist/docs/components/accordion.md +151 -0
- package/dist/docs/components/activity-chart.md +104 -0
- package/dist/docs/components/alert-dialog.md +216 -0
- package/dist/docs/components/alert.md +203 -0
- package/dist/docs/components/ask-user-question.md +429 -0
- package/dist/docs/components/attachment-gallery.md +377 -0
- package/dist/docs/components/avatar.md +197 -0
- package/dist/docs/components/badge.md +162 -0
- package/dist/docs/components/brand-tile.md +138 -0
- package/dist/docs/components/button.md +392 -0
- package/dist/docs/components/calendar.md +113 -0
- package/dist/docs/components/card.md +157 -0
- package/dist/docs/components/carousel.md +144 -0
- package/dist/docs/components/catalog-card.md +136 -0
- package/dist/docs/components/chart.md +608 -0
- package/dist/docs/components/checkbox.md +164 -0
- package/dist/docs/components/chip.md +411 -0
- package/dist/docs/components/code-block.md +389 -0
- package/dist/docs/components/collapsible.md +93 -0
- package/dist/docs/components/command.md +276 -0
- package/dist/docs/components/composer.md +1092 -0
- package/dist/docs/components/connector-request.md +497 -0
- package/dist/docs/components/context-menu.md +127 -0
- package/dist/docs/components/data-table.md +462 -0
- package/dist/docs/components/date-range-picker.md +425 -0
- package/dist/docs/components/dialog.md +263 -0
- package/dist/docs/components/drawer.md +505 -0
- package/dist/docs/components/dropdown-menu.md +336 -0
- package/dist/docs/components/editor-tabs.md +284 -0
- package/dist/docs/components/empty-state.md +134 -0
- package/dist/docs/components/entity-card.md +640 -0
- package/dist/docs/components/entity-row.md +291 -0
- package/dist/docs/components/env-var-request.md +223 -0
- package/dist/docs/components/field.md +272 -0
- package/dist/docs/components/file-upload.md +255 -0
- package/dist/docs/components/hover-card.md +335 -0
- package/dist/docs/components/input-group.md +134 -0
- package/dist/docs/components/input.md +97 -0
- package/dist/docs/components/island.md +97 -0
- package/dist/docs/components/kbd.md +91 -0
- package/dist/docs/components/markdown.md +180 -0
- package/dist/docs/components/message.md +336 -0
- package/dist/docs/components/page-header.md +203 -0
- package/dist/docs/components/pagination.md +211 -0
- package/dist/docs/components/password-input.md +68 -0
- package/dist/docs/components/pepper.md +238 -0
- package/dist/docs/components/permission-request.md +265 -0
- package/dist/docs/components/popover.md +206 -0
- package/dist/docs/components/progress.md +142 -0
- package/dist/docs/components/progressive-blur.md +195 -0
- package/dist/docs/components/radio-group.md +129 -0
- package/dist/docs/components/request-card.md +305 -0
- package/dist/docs/components/resizable.md +318 -0
- package/dist/docs/components/responsive-overlay.md +449 -0
- package/dist/docs/components/scroll-shadows.md +161 -0
- package/dist/docs/components/search-field.md +86 -0
- package/dist/docs/components/searchable-select.md +144 -0
- package/dist/docs/components/select.md +331 -0
- package/dist/docs/components/separator.md +80 -0
- package/dist/docs/components/settings-section.md +246 -0
- package/dist/docs/components/sidebar-item.md +307 -0
- package/dist/docs/components/skeleton.md +107 -0
- package/dist/docs/components/slider.md +171 -0
- package/dist/docs/components/sonner.md +122 -0
- package/dist/docs/components/spinner.md +112 -0
- package/dist/docs/components/stat-strip.md +85 -0
- package/dist/docs/components/status-dot.md +190 -0
- package/dist/docs/components/subagent-run.md +196 -0
- package/dist/docs/components/switch.md +91 -0
- package/dist/docs/components/system-notice.md +144 -0
- package/dist/docs/components/table.md +201 -0
- package/dist/docs/components/tabs.md +233 -0
- package/dist/docs/components/textarea.md +89 -0
- package/dist/docs/components/thinking-indicator.md +164 -0
- package/dist/docs/components/thread-status.md +143 -0
- package/dist/docs/components/todo-list.md +225 -0
- package/dist/docs/components/toggle-group.md +117 -0
- package/dist/docs/components/toggle.md +132 -0
- package/dist/docs/components/tool-call.md +237 -0
- package/dist/docs/components/tool-result.md +418 -0
- package/dist/docs/components/tooltip.md +136 -0
- package/dist/docs/components/trace.md +319 -0
- package/dist/docs/components/turn-summary.md +218 -0
- package/dist/docs/components/usage-meter.md +69 -0
- package/dist/docs/components/view-switcher.md +193 -0
- package/dist/docs/foundations/colors.md +83 -0
- package/dist/docs/foundations/elevation.md +19 -0
- package/dist/docs/foundations/iconography.md +34 -0
- package/dist/docs/foundations/layout.md +42 -0
- package/dist/docs/foundations/logo.md +111 -0
- package/dist/docs/foundations/motion.md +91 -0
- package/dist/docs/foundations/radius.md +13 -0
- package/dist/docs/foundations/spacing.md +23 -0
- package/dist/docs/foundations/typography.md +42 -0
- package/dist/docs/getting-started/installation.md +116 -0
- package/dist/docs/getting-started/releases.md +59 -0
- package/dist/docs/getting-started/theming.md +58 -0
- package/dist/docs/guidelines/accessibility.md +28 -0
- package/dist/docs/guidelines/content.md +36 -0
- package/dist/docs/guidelines/forms.md +36 -0
- package/dist/docs/guidelines/principles.md +30 -0
- package/dist/docs/hooks/use-is-mobile.md +134 -0
- package/dist/docs/index.md +182 -0
- package/dist/docs/overview.md +35 -0
- package/dist/docs/patterns/chat.md +477 -0
- package/dist/docs/patterns/index.md +13 -0
- package/dist/docs/patterns/login.md +311 -0
- package/dist/docs/patterns/share.md +415 -0
- package/dist/hooks/use-is-mobile.d.ts +9 -0
- package/dist/hooks/use-is-mobile.d.ts.map +1 -0
- package/dist/hooks/use-is-mobile.js +26 -0
- package/dist/hooks/use-is-mobile.js.map +1 -0
- package/dist/lib/cn.d.ts +4 -0
- package/dist/lib/cn.d.ts.map +1 -0
- package/dist/lib/cn.js +31 -0
- package/dist/lib/cn.js.map +1 -0
- package/dist/lib/code-language.d.ts +8 -0
- package/dist/lib/code-language.d.ts.map +1 -0
- package/dist/lib/code-language.js +48 -0
- package/dist/lib/code-language.js.map +1 -0
- package/dist/lib/date-range.d.ts +122 -0
- package/dist/lib/date-range.d.ts.map +1 -0
- package/dist/lib/date-range.js +281 -0
- package/dist/lib/date-range.js.map +1 -0
- package/dist/lib/major-tokens.d.ts +40 -0
- package/dist/lib/major-tokens.d.ts.map +1 -0
- package/dist/lib/major-tokens.js +602 -0
- package/dist/lib/major-tokens.js.map +1 -0
- package/dist/lib/markdown.d.ts +25 -0
- package/dist/lib/markdown.d.ts.map +1 -0
- package/dist/lib/markdown.js +87 -0
- package/dist/lib/markdown.js.map +1 -0
- package/dist/lib/overlay-portal-branch.d.ts +6 -0
- package/dist/lib/overlay-portal-branch.d.ts.map +1 -0
- package/dist/lib/overlay-portal-branch.js +15 -0
- package/dist/lib/overlay-portal-branch.js.map +1 -0
- package/dist/lib/pepper-matcap.d.ts +2 -0
- package/dist/lib/pepper-matcap.d.ts.map +1 -0
- package/dist/lib/pepper-matcap.js +4 -0
- package/dist/lib/pepper-matcap.js.map +1 -0
- package/dist/lib/scroll-fade.d.ts +28 -0
- package/dist/lib/scroll-fade.d.ts.map +1 -0
- package/dist/lib/scroll-fade.js +57 -0
- package/dist/lib/scroll-fade.js.map +1 -0
- package/dist/tailwind.css +7 -0
- package/dist/theme.css +428 -0
- package/package.json +145 -3
- package/tokens.json +841 -0
- package/README.md +0 -3
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export declare const DATE_RANGE_MODES: {
|
|
3
|
+
/** A date and a time for each end, and a time zone: logs, where minutes matter (the audit log). */
|
|
4
|
+
readonly DATE_TIME: "date-time";
|
|
5
|
+
/** Whole days: dashboards that count by day (analytics). */
|
|
6
|
+
readonly DATE: "date";
|
|
7
|
+
};
|
|
8
|
+
export type DateRangeMode = (typeof DATE_RANGE_MODES)[keyof typeof DATE_RANGE_MODES];
|
|
9
|
+
export declare const TIME_ZONES: {
|
|
10
|
+
readonly LOCAL: "local";
|
|
11
|
+
readonly UTC: "utc";
|
|
12
|
+
};
|
|
13
|
+
export type TimeZone = (typeof TIME_ZONES)[keyof typeof TIME_ZONES];
|
|
14
|
+
export interface DateRange {
|
|
15
|
+
from: Date;
|
|
16
|
+
to: Date;
|
|
17
|
+
}
|
|
18
|
+
export interface DateRangePreset {
|
|
19
|
+
id: string;
|
|
20
|
+
label: string;
|
|
21
|
+
/** The range as of `now`, read in `timeZone`. */
|
|
22
|
+
getRange: (now: Date, timeZone: TimeZone) => DateRange;
|
|
23
|
+
/** Starts a new group in the list: a rule above it. */
|
|
24
|
+
isGroupStart?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Drawn before the label in the list, and on the trigger in place of the calendar while it is picked: for what the
|
|
27
|
+
* words don't carry, like a live window's pulse. 14px.
|
|
28
|
+
*/
|
|
29
|
+
icon?: ReactNode;
|
|
30
|
+
}
|
|
31
|
+
/** The clock as read in a time zone: the day, as a local midnight, and the minutes since it. */
|
|
32
|
+
export interface WallTime {
|
|
33
|
+
day: Date;
|
|
34
|
+
minutes: number;
|
|
35
|
+
}
|
|
36
|
+
export interface DateRangeValue {
|
|
37
|
+
range: DateRange;
|
|
38
|
+
/** The quick range it came from: the trigger names it, and it is re-read from now when reapplied. */
|
|
39
|
+
presetId: string | null;
|
|
40
|
+
timeZone: TimeZone;
|
|
41
|
+
}
|
|
42
|
+
export declare const MINUTES_PER_DAY = 1440;
|
|
43
|
+
export declare const LAST_MINUTE_OF_DAY: number;
|
|
44
|
+
export declare const startOfDay: (date: Date) => Date;
|
|
45
|
+
export declare const addDays: (date: Date, days: number) => Date;
|
|
46
|
+
export declare const startOfMonth: (date: Date) => Date;
|
|
47
|
+
export declare function checkIfSameDay(a: Date | null, b: Date | null): boolean;
|
|
48
|
+
export declare const getMinutesOfDay: (date: Date) => number;
|
|
49
|
+
export declare const combineDayAndMinutes: (day: Date, minutes: number) => Date;
|
|
50
|
+
/** The clock as read in `timeZone`, to the minute. */
|
|
51
|
+
export declare function toWallTime(date: Date, timeZone: TimeZone): WallTime;
|
|
52
|
+
/** The instant a wall clock in `timeZone` names. */
|
|
53
|
+
export declare function fromWallTime({ day, minutes }: WallTime, timeZone: TimeZone): Date;
|
|
54
|
+
/**
|
|
55
|
+
* The instant a range's end names: the end of its minute, so that minute counts: To 10:30 AM runs to 10:30:59.999,
|
|
56
|
+
* 11:59 PM to the end of the day. Read in another zone, the end keeps its minute whole.
|
|
57
|
+
*/
|
|
58
|
+
export declare function fromWallTimeEnd(wall: WallTime, timeZone: TimeZone): Date;
|
|
59
|
+
/** A wall time's minutes on a clock with no daylight saving: ends compare and spans count in it. */
|
|
60
|
+
export declare const getClockMinutes: ({ day, minutes }: WallTime) => number;
|
|
61
|
+
/** The browser's zone, as people read it: "Europe/Amsterdam (GMT+1)". */
|
|
62
|
+
export declare function getLocalTimeZoneLabel(): string;
|
|
63
|
+
/** As the product writes times: "9:30 AM". */
|
|
64
|
+
export declare function formatTime(minutes: number): string;
|
|
65
|
+
/** "Nov 18", with the year when it isn't this year's, or always with `hasYear`. */
|
|
66
|
+
export declare function formatDay(date: Date, { hasYear }?: {
|
|
67
|
+
hasYear?: boolean;
|
|
68
|
+
}): string;
|
|
69
|
+
/** A range as read in `timeZone`: "Nov 18, 9:00 AM – Nov 20, 5:30 PM", or "Nov 18 – Nov 20" for whole days. */
|
|
70
|
+
export declare function formatRange(range: DateRange, { timeZone, hasTime }: {
|
|
71
|
+
timeZone: TimeZone;
|
|
72
|
+
hasTime: boolean;
|
|
73
|
+
}): string;
|
|
74
|
+
/** The two largest units of a span between two wall times: "2 days, 8 hours". Ending at 11:59 PM counts that minute. */
|
|
75
|
+
export declare function formatDuration(from: WallTime, to: WallTime): string;
|
|
76
|
+
/** Reads "930", "9:30", "9.30pm", "14:00", "noon": minutes since midnight, or null. */
|
|
77
|
+
export declare function parseTime(text: string): number | null;
|
|
78
|
+
/**
|
|
79
|
+
* Reads "Nov 18", "18 Nov 2026", "2026-11-18", "11/18", "today": a day, or null. A missing year is `reference`'s, or
|
|
80
|
+
* with `isOnOrAfterReference` the first that puts the day on or after it: "Jan 5" typed as the end of a range that
|
|
81
|
+
* starts on Dec 20, "Feb 29" the next leap year's. Dotted dates aren't read: "05.11.2026" is May 11 in some places and
|
|
82
|
+
* Nov 5 in others. `today` is the day "today" names: the picker's, in its time zone.
|
|
83
|
+
*/
|
|
84
|
+
export declare function parseDate(text: string, reference: Date, { isOnOrAfterReference, today }?: {
|
|
85
|
+
isOnOrAfterReference?: boolean;
|
|
86
|
+
today?: Date;
|
|
87
|
+
}): Date | null;
|
|
88
|
+
/** Whole days, from the first one's midnight to the end of the last one (11:59:59.999 PM), in `timeZone`. */
|
|
89
|
+
export declare function getWholeDays(firstDay: Date, lastDay: Date, timeZone: TimeZone): DateRange;
|
|
90
|
+
/** Today's midnight, as read in `timeZone`. */
|
|
91
|
+
export declare const getToday: (now: Date, timeZone: TimeZone) => Date;
|
|
92
|
+
/** A window that ends now and starts `minutes` before: "Last 15 minutes", "Last 24 hours". */
|
|
93
|
+
export declare function createRollingPreset(id: string, label: string, minutes: number): DateRangePreset;
|
|
94
|
+
/** The last `days` whole days, today included: "Last 7 days" on a dashboard. */
|
|
95
|
+
export declare function createLastDaysPreset(id: string, label: string, days: number): DateRangePreset;
|
|
96
|
+
/** Whole days `daysAgo` back: Today (0), Yesterday (1). */
|
|
97
|
+
export declare function createDayPreset(id: string, label: string, daysAgo: number): DateRangePreset;
|
|
98
|
+
/**
|
|
99
|
+
* Ready quick ranges: a page lists the ones it offers, in its order. `PAST_…` windows end now, to the minute: logs, in
|
|
100
|
+
* `date-time` mode. `LAST_…` ranges and periods are whole days, today included: dashboards, in either mode. Ids are
|
|
101
|
+
* stable, so a value kept in a URL or a setting still names its range. Spread one to relabel it or start a group:
|
|
102
|
+
* `{ ...DATE_PICKER_PRESETS.TODAY, isGroupStart: true }`.
|
|
103
|
+
*/
|
|
104
|
+
export declare const DATE_PICKER_PRESETS: {
|
|
105
|
+
readonly PAST_15_MINUTES: DateRangePreset;
|
|
106
|
+
readonly PAST_1_HOUR: DateRangePreset;
|
|
107
|
+
readonly PAST_4_HOURS: DateRangePreset;
|
|
108
|
+
readonly PAST_1_DAY: DateRangePreset;
|
|
109
|
+
readonly PAST_1_WEEK: DateRangePreset;
|
|
110
|
+
readonly PAST_2_WEEKS: DateRangePreset;
|
|
111
|
+
readonly TODAY: DateRangePreset;
|
|
112
|
+
readonly YESTERDAY: DateRangePreset;
|
|
113
|
+
readonly LAST_7_DAYS: DateRangePreset;
|
|
114
|
+
readonly LAST_30_DAYS: DateRangePreset;
|
|
115
|
+
readonly LAST_90_DAYS: DateRangePreset;
|
|
116
|
+
/** 365 days through today, or 366 across a February 29. */
|
|
117
|
+
readonly LAST_12_MONTHS: DateRangePreset;
|
|
118
|
+
readonly MONTH_TO_DATE: DateRangePreset;
|
|
119
|
+
readonly QUARTER_TO_DATE: DateRangePreset;
|
|
120
|
+
readonly YEAR_TO_DATE: DateRangePreset;
|
|
121
|
+
};
|
|
122
|
+
//# sourceMappingURL=date-range.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-range.d.ts","sourceRoot":"","sources":["../../src/lib/date-range.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,eAAO,MAAM,gBAAgB;IAC3B,mGAAmG;;IAEnG,4DAA4D;;CAEpD,CAAC;AAEX,MAAM,MAAM,aAAa,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,MAAM,OAAO,gBAAgB,CAAC,CAAC;AAErF,eAA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AAY,CAAC,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAKzF;AAED,+CAA+C;AAC/C,eAAO,MAAM,QAAQ,GAAI,KAAK,IAAI,EAAE,UAAU,QAAQ,SAAkC,CAAC;AAEzF,8FAA8F;AAC9F,wBAAgB,mBAAmB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,eAAe,CAM/F;AAED,gFAAgF;AAChF,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,eAAe,CAU7F;AAED,2DAA2D;AAC3D,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,eAAe,CAU3F;AA0BD;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;IAY9B,2DAA2D;;;;;CAST,CAAC"}
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
// The date range picker's value and the date arithmetic, parsing and wording behind it. Days are local midnights; a
|
|
2
|
+
// time of day is minutes since midnight; a wall time is the clock as read in the chosen time zone, held as that day and
|
|
3
|
+
// those minutes, so the calendar and the fields never deal with offsets. A wall time is never put back into a Date's
|
|
4
|
+
// local fields: in UTC an hour the browser's zone skips for daylight saving would move. Products use these to build
|
|
5
|
+
// their quick ranges.
|
|
6
|
+
export const DATE_RANGE_MODES = {
|
|
7
|
+
/** A date and a time for each end, and a time zone: logs, where minutes matter (the audit log). */
|
|
8
|
+
DATE_TIME: "date-time",
|
|
9
|
+
/** Whole days: dashboards that count by day (analytics). */
|
|
10
|
+
DATE: "date",
|
|
11
|
+
};
|
|
12
|
+
export const TIME_ZONES = {
|
|
13
|
+
LOCAL: "local",
|
|
14
|
+
UTC: "utc",
|
|
15
|
+
};
|
|
16
|
+
export const MINUTES_PER_DAY = 1440;
|
|
17
|
+
export const LAST_MINUTE_OF_DAY = MINUTES_PER_DAY - 1;
|
|
18
|
+
const MS_PER_MINUTE = 60_000;
|
|
19
|
+
/** A range's end runs to the end of its minute: 10:30 AM to 10:30:59.999, 11:59 PM to the end of the day. */
|
|
20
|
+
const LAST_MS_OF_MINUTE = MS_PER_MINUTE - 1;
|
|
21
|
+
const MINUTES_PER_HOUR = 60;
|
|
22
|
+
const LOCALE = "en-US";
|
|
23
|
+
const MONTH_PREFIXES = ["jan", "feb", "mar", "apr", "may", "jun", "jul", "aug", "sep", "oct", "nov", "dec"];
|
|
24
|
+
const TWO_DIGIT_YEAR_BASE = 2000;
|
|
25
|
+
const TWO_DIGIT_YEAR_LIMIT = 100;
|
|
26
|
+
const HOURS_IN_HALF_DAY = 12;
|
|
27
|
+
const LAST_HOUR = 23;
|
|
28
|
+
const LAST_MINUTE = 59;
|
|
29
|
+
export const startOfDay = (date) => new Date(date.getFullYear(), date.getMonth(), date.getDate());
|
|
30
|
+
export const addDays = (date, days) => new Date(date.getFullYear(), date.getMonth(), date.getDate() + days);
|
|
31
|
+
export const startOfMonth = (date) => new Date(date.getFullYear(), date.getMonth(), 1);
|
|
32
|
+
export function checkIfSameDay(a, b) {
|
|
33
|
+
return (a !== null &&
|
|
34
|
+
b !== null &&
|
|
35
|
+
a.getFullYear() === b.getFullYear() &&
|
|
36
|
+
a.getMonth() === b.getMonth() &&
|
|
37
|
+
a.getDate() === b.getDate());
|
|
38
|
+
}
|
|
39
|
+
export const getMinutesOfDay = (date) => date.getHours() * MINUTES_PER_HOUR + date.getMinutes();
|
|
40
|
+
export const combineDayAndMinutes = (day, minutes) => new Date(day.getFullYear(), day.getMonth(), day.getDate(), Math.floor(minutes / MINUTES_PER_HOUR), minutes % MINUTES_PER_HOUR);
|
|
41
|
+
/** The clock as read in `timeZone`, to the minute. */
|
|
42
|
+
export function toWallTime(date, timeZone) {
|
|
43
|
+
if (timeZone === TIME_ZONES.LOCAL) {
|
|
44
|
+
return { day: startOfDay(date), minutes: getMinutesOfDay(date) };
|
|
45
|
+
}
|
|
46
|
+
return {
|
|
47
|
+
day: new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()),
|
|
48
|
+
minutes: date.getUTCHours() * MINUTES_PER_HOUR + date.getUTCMinutes(),
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
/** The instant a wall clock in `timeZone` names. */
|
|
52
|
+
export function fromWallTime({ day, minutes }, timeZone) {
|
|
53
|
+
if (timeZone === TIME_ZONES.LOCAL) {
|
|
54
|
+
return combineDayAndMinutes(day, minutes);
|
|
55
|
+
}
|
|
56
|
+
return new Date(Date.UTC(day.getFullYear(), day.getMonth(), day.getDate(), 0, minutes));
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* The instant a range's end names: the end of its minute, so that minute counts: To 10:30 AM runs to 10:30:59.999,
|
|
60
|
+
* 11:59 PM to the end of the day. Read in another zone, the end keeps its minute whole.
|
|
61
|
+
*/
|
|
62
|
+
export function fromWallTimeEnd(wall, timeZone) {
|
|
63
|
+
return new Date(fromWallTime(wall, timeZone).getTime() + LAST_MS_OF_MINUTE);
|
|
64
|
+
}
|
|
65
|
+
/** A wall time's minutes on a clock with no daylight saving: ends compare and spans count in it. */
|
|
66
|
+
export const getClockMinutes = ({ day, minutes }) => Date.UTC(day.getFullYear(), day.getMonth(), day.getDate()) / MS_PER_MINUTE + minutes;
|
|
67
|
+
/** The browser's zone, as people read it: "Europe/Amsterdam (GMT+1)". */
|
|
68
|
+
export function getLocalTimeZoneLabel() {
|
|
69
|
+
const name = Intl.DateTimeFormat().resolvedOptions().timeZone.replaceAll("_", " ");
|
|
70
|
+
const offset = new Intl.DateTimeFormat(LOCALE, { timeZoneName: "shortOffset" })
|
|
71
|
+
.formatToParts(new Date())
|
|
72
|
+
.find((part) => part.type === "timeZoneName")?.value ?? "";
|
|
73
|
+
return offset ? `${name} (${offset})` : name;
|
|
74
|
+
}
|
|
75
|
+
/** As the product writes times: "9:30 AM". */
|
|
76
|
+
export function formatTime(minutes) {
|
|
77
|
+
const hours = Math.floor(minutes / MINUTES_PER_HOUR);
|
|
78
|
+
const paddedMinutes = String(minutes % MINUTES_PER_HOUR).padStart(2, "0");
|
|
79
|
+
const meridiem = hours < HOURS_IN_HALF_DAY ? "AM" : "PM";
|
|
80
|
+
return `${hours % HOURS_IN_HALF_DAY || HOURS_IN_HALF_DAY}:${paddedMinutes} ${meridiem}`;
|
|
81
|
+
}
|
|
82
|
+
/** "Nov 18", with the year when it isn't this year's, or always with `hasYear`. */
|
|
83
|
+
export function formatDay(date, { hasYear = false } = {}) {
|
|
84
|
+
const isOtherYear = date.getFullYear() !== new Date().getFullYear();
|
|
85
|
+
return date.toLocaleDateString(LOCALE, {
|
|
86
|
+
month: "short",
|
|
87
|
+
day: "numeric",
|
|
88
|
+
year: hasYear || isOtherYear ? "numeric" : undefined,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/** A range as read in `timeZone`: "Nov 18, 9:00 AM – Nov 20, 5:30 PM", or "Nov 18 – Nov 20" for whole days. */
|
|
92
|
+
export function formatRange(range, { timeZone, hasTime }) {
|
|
93
|
+
const from = toWallTime(range.from, timeZone);
|
|
94
|
+
const to = toWallTime(range.to, timeZone);
|
|
95
|
+
if (!hasTime) {
|
|
96
|
+
return checkIfSameDay(from.day, to.day) ? formatDay(from.day) : `${formatDay(from.day)} – ${formatDay(to.day)}`;
|
|
97
|
+
}
|
|
98
|
+
const fromText = `${formatDay(from.day)}, ${formatTime(from.minutes)}`;
|
|
99
|
+
return checkIfSameDay(from.day, to.day)
|
|
100
|
+
? `${fromText} – ${formatTime(to.minutes)}`
|
|
101
|
+
: `${fromText} – ${formatDay(to.day)}, ${formatTime(to.minutes)}`;
|
|
102
|
+
}
|
|
103
|
+
const pluralize = (count, word) => `${count} ${word}${count === 1 ? "" : "s"}`;
|
|
104
|
+
/** The two largest units of a span between two wall times: "2 days, 8 hours". Ending at 11:59 PM counts that minute. */
|
|
105
|
+
export function formatDuration(from, to) {
|
|
106
|
+
const endsAtMidnight = to.minutes === LAST_MINUTE_OF_DAY ? 1 : 0;
|
|
107
|
+
let minutes = getClockMinutes(to) - getClockMinutes(from) + endsAtMidnight;
|
|
108
|
+
const days = Math.floor(minutes / MINUTES_PER_DAY);
|
|
109
|
+
minutes -= days * MINUTES_PER_DAY;
|
|
110
|
+
const hours = Math.floor(minutes / MINUTES_PER_HOUR);
|
|
111
|
+
minutes -= hours * MINUTES_PER_HOUR;
|
|
112
|
+
const parts = [
|
|
113
|
+
days > 0 && pluralize(days, "day"),
|
|
114
|
+
hours > 0 && pluralize(hours, "hour"),
|
|
115
|
+
minutes > 0 && `${minutes} min`,
|
|
116
|
+
].filter((part) => typeof part === "string");
|
|
117
|
+
return parts.slice(0, 2).join(", ") || "under a minute";
|
|
118
|
+
}
|
|
119
|
+
/** Reads "930", "9:30", "9.30pm", "14:00", "noon": minutes since midnight, or null. */
|
|
120
|
+
export function parseTime(text) {
|
|
121
|
+
const value = text.trim().toLowerCase().replaceAll(/\s+/g, "");
|
|
122
|
+
if (value === "noon") {
|
|
123
|
+
return HOURS_IN_HALF_DAY * MINUTES_PER_HOUR;
|
|
124
|
+
}
|
|
125
|
+
if (value === "midnight") {
|
|
126
|
+
return 0;
|
|
127
|
+
}
|
|
128
|
+
const match = /^(\d{1,2})(?:[:.h]?(\d{2}))?(a|am|p|pm)?$/.exec(value);
|
|
129
|
+
if (!match) {
|
|
130
|
+
return null;
|
|
131
|
+
}
|
|
132
|
+
let hours = Number(match[1]);
|
|
133
|
+
const minutes = match[2] ? Number(match[2]) : 0;
|
|
134
|
+
const meridiem = match[3];
|
|
135
|
+
if (minutes > LAST_MINUTE) {
|
|
136
|
+
return null;
|
|
137
|
+
}
|
|
138
|
+
if (meridiem) {
|
|
139
|
+
if (hours < 1 || hours > HOURS_IN_HALF_DAY) {
|
|
140
|
+
return null;
|
|
141
|
+
}
|
|
142
|
+
hours = meridiem.startsWith("a") ? hours % HOURS_IN_HALF_DAY : (hours % HOURS_IN_HALF_DAY) + HOURS_IN_HALF_DAY;
|
|
143
|
+
}
|
|
144
|
+
else if (hours > LAST_HOUR) {
|
|
145
|
+
return null;
|
|
146
|
+
}
|
|
147
|
+
return hours * MINUTES_PER_HOUR + minutes;
|
|
148
|
+
}
|
|
149
|
+
const findMonthIndex = (word) => MONTH_PREFIXES.indexOf(word.slice(0, 3));
|
|
150
|
+
/**
|
|
151
|
+
* Reads "Nov 18", "18 Nov 2026", "2026-11-18", "11/18", "today": a day, or null. A missing year is `reference`'s, or
|
|
152
|
+
* with `isOnOrAfterReference` the first that puts the day on or after it: "Jan 5" typed as the end of a range that
|
|
153
|
+
* starts on Dec 20, "Feb 29" the next leap year's. Dotted dates aren't read: "05.11.2026" is May 11 in some places and
|
|
154
|
+
* Nov 5 in others. `today` is the day "today" names: the picker's, in its time zone.
|
|
155
|
+
*/
|
|
156
|
+
export function parseDate(text, reference, { isOnOrAfterReference = false, today = startOfDay(new Date()) } = {}) {
|
|
157
|
+
const value = text.trim().toLowerCase().replaceAll(",", " ").replaceAll(/\s+/g, " ");
|
|
158
|
+
const relativeDays = { today: 0, yesterday: -1, tomorrow: 1 };
|
|
159
|
+
if (value in relativeDays) {
|
|
160
|
+
return addDays(today, relativeDays[value]);
|
|
161
|
+
}
|
|
162
|
+
const iso = /^(\d{4})-(\d{1,2})-(\d{1,2})$/.exec(value);
|
|
163
|
+
const numeric = /^(\d{1,2})\/(\d{1,2})(?:\/(\d{2,4}))?$/.exec(value);
|
|
164
|
+
const monthFirst = /^(?:[a-z]+ )?([a-z]{3,}) (\d{1,2})(?: (\d{4}))?$/.exec(value);
|
|
165
|
+
const dayFirst = /^(\d{1,2}) ([a-z]{3,})(?: (\d{4}))?$/.exec(value);
|
|
166
|
+
// Year, month index, day; the year null when it wasn't typed.
|
|
167
|
+
let parts = null;
|
|
168
|
+
if (iso) {
|
|
169
|
+
parts = [Number(iso[1]), Number(iso[2]) - 1, Number(iso[3])];
|
|
170
|
+
}
|
|
171
|
+
else if (numeric) {
|
|
172
|
+
const year = numeric[3] ? Number(numeric[3]) : null;
|
|
173
|
+
parts = [year !== null && year < TWO_DIGIT_YEAR_LIMIT ? year + TWO_DIGIT_YEAR_BASE : year, Number(numeric[1]) - 1, Number(numeric[2])];
|
|
174
|
+
}
|
|
175
|
+
else if (monthFirst) {
|
|
176
|
+
parts = [monthFirst[3] ? Number(monthFirst[3]) : null, findMonthIndex(monthFirst[1]), Number(monthFirst[2])];
|
|
177
|
+
}
|
|
178
|
+
else if (dayFirst) {
|
|
179
|
+
parts = [dayFirst[3] ? Number(dayFirst[3]) : null, findMonthIndex(dayFirst[2]), Number(dayFirst[1])];
|
|
180
|
+
}
|
|
181
|
+
if (!parts || parts[1] < 0) {
|
|
182
|
+
return null;
|
|
183
|
+
}
|
|
184
|
+
const [typedYear, month, day] = parts;
|
|
185
|
+
const read = (year) => {
|
|
186
|
+
const date = new Date(year, month, day);
|
|
187
|
+
return date.getMonth() === month && date.getDate() === day ? date : null;
|
|
188
|
+
};
|
|
189
|
+
if (typedYear !== null) {
|
|
190
|
+
return read(typedYear);
|
|
191
|
+
}
|
|
192
|
+
const date = read(reference.getFullYear());
|
|
193
|
+
if (!isOnOrAfterReference) {
|
|
194
|
+
return date;
|
|
195
|
+
}
|
|
196
|
+
// Before the reference, or no such day in its year (February 29): the next year's.
|
|
197
|
+
return date && date >= startOfDay(reference) ? date : read(reference.getFullYear() + 1);
|
|
198
|
+
}
|
|
199
|
+
// ── Building quick ranges ──
|
|
200
|
+
/** Whole days, from the first one's midnight to the end of the last one (11:59:59.999 PM), in `timeZone`. */
|
|
201
|
+
export function getWholeDays(firstDay, lastDay, timeZone) {
|
|
202
|
+
return {
|
|
203
|
+
from: fromWallTime({ day: startOfDay(firstDay), minutes: 0 }, timeZone),
|
|
204
|
+
to: fromWallTimeEnd({ day: startOfDay(lastDay), minutes: LAST_MINUTE_OF_DAY }, timeZone),
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
/** Today's midnight, as read in `timeZone`. */
|
|
208
|
+
export const getToday = (now, timeZone) => toWallTime(now, timeZone).day;
|
|
209
|
+
/** A window that ends now and starts `minutes` before: "Last 15 minutes", "Last 24 hours". */
|
|
210
|
+
export function createRollingPreset(id, label, minutes) {
|
|
211
|
+
return {
|
|
212
|
+
id,
|
|
213
|
+
label,
|
|
214
|
+
getRange: (now) => ({ from: new Date(now.getTime() - minutes * MS_PER_MINUTE), to: now }),
|
|
215
|
+
};
|
|
216
|
+
}
|
|
217
|
+
/** The last `days` whole days, today included: "Last 7 days" on a dashboard. */
|
|
218
|
+
export function createLastDaysPreset(id, label, days) {
|
|
219
|
+
return {
|
|
220
|
+
id,
|
|
221
|
+
label,
|
|
222
|
+
getRange: (now, timeZone) => {
|
|
223
|
+
const today = getToday(now, timeZone);
|
|
224
|
+
return getWholeDays(addDays(today, 1 - days), today, timeZone);
|
|
225
|
+
},
|
|
226
|
+
};
|
|
227
|
+
}
|
|
228
|
+
/** Whole days `daysAgo` back: Today (0), Yesterday (1). */
|
|
229
|
+
export function createDayPreset(id, label, daysAgo) {
|
|
230
|
+
return {
|
|
231
|
+
id,
|
|
232
|
+
label,
|
|
233
|
+
getRange: (now, timeZone) => {
|
|
234
|
+
const day = addDays(getToday(now, timeZone), -daysAgo);
|
|
235
|
+
return getWholeDays(day, day, timeZone);
|
|
236
|
+
},
|
|
237
|
+
};
|
|
238
|
+
}
|
|
239
|
+
// ── Ready quick ranges ──
|
|
240
|
+
const DAYS_PER_WEEK = 7;
|
|
241
|
+
const MONTHS_PER_QUARTER = 3;
|
|
242
|
+
/** The day after this date a year ago; from February 29, the day after February 28. */
|
|
243
|
+
function getDayAfterYearAgo(today) {
|
|
244
|
+
const yearAgo = new Date(today.getFullYear() - 1, today.getMonth(), today.getDate());
|
|
245
|
+
const lastDayOfMonth = new Date(today.getFullYear() - 1, today.getMonth() + 1, 0);
|
|
246
|
+
return addDays(yearAgo.getMonth() === today.getMonth() ? yearAgo : lastDayOfMonth, 1);
|
|
247
|
+
}
|
|
248
|
+
/** A period so far, in whole days: from the day `getFirstDay` gives for today, through today. */
|
|
249
|
+
const createToDatePreset = (id, label, getFirstDay) => ({
|
|
250
|
+
id,
|
|
251
|
+
label,
|
|
252
|
+
getRange: (now, timeZone) => {
|
|
253
|
+
const today = getToday(now, timeZone);
|
|
254
|
+
return getWholeDays(getFirstDay(today), today, timeZone);
|
|
255
|
+
},
|
|
256
|
+
});
|
|
257
|
+
/**
|
|
258
|
+
* Ready quick ranges: a page lists the ones it offers, in its order. `PAST_…` windows end now, to the minute: logs, in
|
|
259
|
+
* `date-time` mode. `LAST_…` ranges and periods are whole days, today included: dashboards, in either mode. Ids are
|
|
260
|
+
* stable, so a value kept in a URL or a setting still names its range. Spread one to relabel it or start a group:
|
|
261
|
+
* `{ ...DATE_PICKER_PRESETS.TODAY, isGroupStart: true }`.
|
|
262
|
+
*/
|
|
263
|
+
export const DATE_PICKER_PRESETS = {
|
|
264
|
+
PAST_15_MINUTES: createRollingPreset("past-15-minutes", "Past 15 minutes", 15),
|
|
265
|
+
PAST_1_HOUR: createRollingPreset("past-1-hour", "Past 1 hour", MINUTES_PER_HOUR),
|
|
266
|
+
PAST_4_HOURS: createRollingPreset("past-4-hours", "Past 4 hours", 4 * MINUTES_PER_HOUR),
|
|
267
|
+
PAST_1_DAY: createRollingPreset("past-1-day", "Past 1 day", MINUTES_PER_DAY),
|
|
268
|
+
PAST_1_WEEK: createRollingPreset("past-1-week", "Past 1 week", DAYS_PER_WEEK * MINUTES_PER_DAY),
|
|
269
|
+
PAST_2_WEEKS: createRollingPreset("past-2-weeks", "Past 2 weeks", 2 * DAYS_PER_WEEK * MINUTES_PER_DAY),
|
|
270
|
+
TODAY: createDayPreset("today", "Today", 0),
|
|
271
|
+
YESTERDAY: createDayPreset("yesterday", "Yesterday", 1),
|
|
272
|
+
LAST_7_DAYS: createLastDaysPreset("last-7-days", "Last 7 days", 7),
|
|
273
|
+
LAST_30_DAYS: createLastDaysPreset("last-30-days", "Last 30 days", 30),
|
|
274
|
+
LAST_90_DAYS: createLastDaysPreset("last-90-days", "Last 90 days", 90),
|
|
275
|
+
/** 365 days through today, or 366 across a February 29. */
|
|
276
|
+
LAST_12_MONTHS: createToDatePreset("last-12-months", "Last 12 months", getDayAfterYearAgo),
|
|
277
|
+
MONTH_TO_DATE: createToDatePreset("month-to-date", "Month to date", (today) => new Date(today.getFullYear(), today.getMonth(), 1)),
|
|
278
|
+
QUARTER_TO_DATE: createToDatePreset("quarter-to-date", "Quarter to date", (today) => new Date(today.getFullYear(), Math.floor(today.getMonth() / MONTHS_PER_QUARTER) * MONTHS_PER_QUARTER, 1)),
|
|
279
|
+
YEAR_TO_DATE: createToDatePreset("year-to-date", "Year to date", (today) => new Date(today.getFullYear(), 0, 1)),
|
|
280
|
+
};
|
|
281
|
+
//# sourceMappingURL=date-range.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-range.js","sourceRoot":"","sources":["../../src/lib/date-range.ts"],"names":[],"mappings":"AAAA,oHAAoH;AACpH,wHAAwH;AACxH,qHAAqH;AACrH,oHAAoH;AACpH,sBAAsB;AAItB,MAAM,CAAC,MAAM,gBAAgB,GAAG;IAC9B,mGAAmG;IACnG,SAAS,EAAE,WAAW;IACtB,4DAA4D;IAC5D,IAAI,EAAE,MAAM;CACJ,CAAC;AAIX,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,KAAK,EAAE,OAAO;IACd,GAAG,EAAE,KAAK;CACF,CAAC;AAoCX,MAAM,CAAC,MAAM,eAAe,GAAG,IAAI,CAAC;AACpC,MAAM,CAAC,MAAM,kBAAkB,GAAG,eAAe,GAAG,CAAC,CAAC;AACtD,MAAM,aAAa,GAAG,MAAM,CAAC;AAC7B,6GAA6G;AAC7G,MAAM,iBAAiB,GAAG,aAAa,GAAG,CAAC,CAAC;AAC5C,MAAM,gBAAgB,GAAG,EA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EAAE,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,QAAQ,EAAE,GAAG,kBAAkB,CAAC,GAAG,kBAAkB,EAAE,CAAC,CAAC,CACpH;IACD,YAAY,EAAE,kBAAkB,CAAC,cAAc,EAAE,cAAc,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;CAC9D,CAAC","sourcesContent":["// The date range picker's value and the date arithmetic, parsing and wording behind it. Days are local midnights; a\n// time of day is minutes since midnight; a wall time is the clock as read in the chosen time zone, held as that day and\n// those minutes, so the calendar and the fields never deal with offsets. A wall time is never put back into a Date's\n// local fields: in UTC an hour the browser's zone skips for daylight saving would move. Products use these to build\n// their quick ranges.\n\nimport type { ReactNode } from \"react\";\n\nexport const DATE_RANGE_MODES = {\n /** A date and a time for each end, and a time zone: logs, where minutes matter (the audit log). */\n DATE_TIME: \"date-time\",\n /** Whole days: dashboards that count by day (analytics). */\n DATE: \"date\",\n} as const;\n\nexport type DateRangeMode = (typeof DATE_RANGE_MODES)[keyof typeof DATE_RANGE_MODES];\n\nexport const TIME_ZONES = {\n LOCAL: \"local\",\n UTC: \"utc\",\n} as const;\n\nexport type TimeZone = (typeof TIME_ZONES)[keyof typeof TIME_ZONES];\n\nexport interface DateRange {\n from: Date;\n to: Date;\n}\n\nexport interface DateRangePreset {\n id: string;\n label: string;\n /** The range as of `now`, read in `timeZone`. */\n getRange: (now: Date, timeZone: TimeZone) => DateRange;\n /** Starts a new group in the list: a rule above it. */\n isGroupStart?: boolean;\n /**\n * Drawn before the label in the list, and on the trigger in place of the calendar while it is picked: for what the\n * words don't carry, like a live window's pulse. 14px.\n */\n icon?: ReactNode;\n}\n\n/** The clock as read in a time zone: the day, as a local midnight, and the minutes since it. */\nexport interface WallTime {\n day: Date;\n minutes: number;\n}\n\nexport interface DateRangeValue {\n range: DateRange;\n /** The quick range it came from: the trigger names it, and it is re-read from now when reapplied. */\n presetId: string | null;\n timeZone: TimeZone;\n}\n\nexport const MINUTES_PER_DAY = 1440;\nexport const LAST_MINUTE_OF_DAY = MINUTES_PER_DAY - 1;\nconst MS_PER_MINUTE = 60_000;\n/** A range's end runs to the end of its minute: 10:30 AM to 10:30:59.999, 11:59 PM to the end of the day. */\nconst LAST_MS_OF_MINUTE = MS_PER_MINUTE - 1;\nconst MINUTES_PER_HOUR = 60;\nconst LOCALE = \"en-US\";\nconst MONTH_PREFIXES = [\"jan\", \"feb\", \"mar\", \"apr\", \"may\", \"jun\", \"jul\", \"aug\", \"sep\", \"oct\", \"nov\", \"dec\"];\nconst TWO_DIGIT_YEAR_BASE = 2000;\nconst TWO_DIGIT_YEAR_LIMIT = 100;\nconst HOURS_IN_HALF_DAY = 12;\nconst LAST_HOUR = 23;\nconst LAST_MINUTE = 59;\n\nexport const startOfDay = (date: Date) => new Date(date.getFullYear(), date.getMonth(), date.getDate());\n\nexport const addDays = (date: Date, days: number) => new Date(date.getFullYear(), date.getMonth(), date.getDate() + days);\n\nexport const startOfMonth = (date: Date) => new Date(date.getFullYear(), date.getMonth(), 1);\n\nexport function checkIfSameDay(a: Date | null, b: Date | null) {\n return (\n a !== null &&\n b !== null &&\n a.getFullYear() === b.getFullYear() &&\n a.getMonth() === b.getMonth() &&\n a.getDate() === b.getDate()\n );\n}\n\nexport const getMinutesOfDay = (date: Date) => date.getHours() * MINUTES_PER_HOUR + date.getMinutes();\n\nexport const combineDayAndMinutes = (day: Date, minutes: number) =>\n new Date(day.getFullYear(), day.getMonth(), day.getDate(), Math.floor(minutes / MINUTES_PER_HOUR), minutes % MINUTES_PER_HOUR);\n\n/** The clock as read in `timeZone`, to the minute. */\nexport function toWallTime(date: Date, timeZone: TimeZone): WallTime {\n if (timeZone === TIME_ZONES.LOCAL) {\n return { day: startOfDay(date), minutes: getMinutesOfDay(date) };\n }\n\n return {\n day: new Date(date.getUTCFullYear(), date.getUTCMonth(), date.getUTCDate()),\n minutes: date.getUTCHours() * MINUTES_PER_HOUR + date.getUTCMinutes(),\n };\n}\n\n/** The instant a wall clock in `timeZone` names. */\nexport function fromWallTime({ day, minutes }: WallTime, timeZone: TimeZone) {\n if (timeZone === TIME_ZONES.LOCAL) {\n return combineDayAndMinutes(day, minutes);\n }\n\n return new Date(Date.UTC(day.getFullYear(), day.getMonth(), day.getDate(), 0, minutes));\n}\n\n/**\n * The instant a range's end names: the end of its minute, so that minute counts: To 10:30 AM runs to 10:30:59.999,\n * 11:59 PM to the end of the day. Read in another zone, the end keeps its minute whole.\n */\nexport function fromWallTimeEnd(wall: WallTime, timeZone: TimeZone) {\n return new Date(fromWallTime(wall, timeZone).getTime() + LAST_MS_OF_MINUTE);\n}\n\n/** A wall time's minutes on a clock with no daylight saving: ends compare and spans count in it. */\nexport const getClockMinutes = ({ day, minutes }: WallTime) =>\n Date.UTC(day.getFullYear(), day.getMonth(), day.getDate()) / MS_PER_MINUTE + minutes;\n\n/** The browser's zone, as people read it: \"Europe/Amsterdam (GMT+1)\". */\nexport function getLocalTimeZoneLabel() {\n const name = Intl.DateTimeFormat().resolvedOptions().timeZone.replaceAll(\"_\", \" \");\n const offset =\n new Intl.DateTimeFormat(LOCALE, { timeZoneName: \"shortOffset\" })\n .formatToParts(new Date())\n .find((part) => part.type === \"timeZoneName\")?.value ?? \"\";\n\n return offset ? `${name} (${offset})` : name;\n}\n\n/** As the product writes times: \"9:30 AM\". */\nexport function formatTime(minutes: number) {\n const hours = Math.floor(minutes / MINUTES_PER_HOUR);\n const paddedMinutes = String(minutes % MINUTES_PER_HOUR).padStart(2, \"0\");\n const meridiem = hours < HOURS_IN_HALF_DAY ? \"AM\" : \"PM\";\n\n return `${hours % HOURS_IN_HALF_DAY || HOURS_IN_HALF_DAY}:${paddedMinutes} ${meridiem}`;\n}\n\n/** \"Nov 18\", with the year when it isn't this year's, or always with `hasYear`. */\nexport function formatDay(date: Date, { hasYear = false }: { hasYear?: boolean } = {}) {\n const isOtherYear = date.getFullYear() !== new Date().getFullYear();\n\n return date.toLocaleDateString(LOCALE, {\n month: \"short\",\n day: \"numeric\",\n year: hasYear || isOtherYear ? \"numeric\" : undefined,\n });\n}\n\n/** A range as read in `timeZone`: \"Nov 18, 9:00 AM – Nov 20, 5:30 PM\", or \"Nov 18 – Nov 20\" for whole days. */\nexport function formatRange(range: DateRange, { timeZone, hasTime }: { timeZone: TimeZone; hasTime: boolean }) {\n const from = toWallTime(range.from, timeZone);\n const to = toWallTime(range.to, timeZone);\n\n if (!hasTime) {\n return checkIfSameDay(from.day, to.day) ? formatDay(from.day) : `${formatDay(from.day)} – ${formatDay(to.day)}`;\n }\n\n const fromText = `${formatDay(from.day)}, ${formatTime(from.minutes)}`;\n\n return checkIfSameDay(from.day, to.day)\n ? `${fromText} – ${formatTime(to.minutes)}`\n : `${fromText} – ${formatDay(to.day)}, ${formatTime(to.minutes)}`;\n}\n\nconst pluralize = (count: number, word: string) => `${count} ${word}${count === 1 ? \"\" : \"s\"}`;\n\n/** The two largest units of a span between two wall times: \"2 days, 8 hours\". Ending at 11:59 PM counts that minute. */\nexport function formatDuration(from: WallTime, to: WallTime) {\n const endsAtMidnight = to.minutes === LAST_MINUTE_OF_DAY ? 1 : 0;\n let minutes = getClockMinutes(to) - getClockMinutes(from) + endsAtMidnight;\n const days = Math.floor(minutes / MINUTES_PER_DAY);\n minutes -= days * MINUTES_PER_DAY;\n const hours = Math.floor(minutes / MINUTES_PER_HOUR);\n minutes -= hours * MINUTES_PER_HOUR;\n\n const parts = [\n days > 0 && pluralize(days, \"day\"),\n hours > 0 && pluralize(hours, \"hour\"),\n minutes > 0 && `${minutes} min`,\n ].filter((part): part is string => typeof part === \"string\");\n\n return parts.slice(0, 2).join(\", \") || \"under a minute\";\n}\n\n/** Reads \"930\", \"9:30\", \"9.30pm\", \"14:00\", \"noon\": minutes since midnight, or null. */\nexport function parseTime(text: string) {\n const value = text.trim().toLowerCase().replaceAll(/\\s+/g, \"\");\n\n if (value === \"noon\") {\n return HOURS_IN_HALF_DAY * MINUTES_PER_HOUR;\n }\n\n if (value === \"midnight\") {\n return 0;\n }\n\n const match = /^(\\d{1,2})(?:[:.h]?(\\d{2}))?(a|am|p|pm)?$/.exec(value);\n\n if (!match) {\n return null;\n }\n\n let hours = Number(match[1]);\n const minutes = match[2] ? Number(match[2]) : 0;\n const meridiem = match[3];\n\n if (minutes > LAST_MINUTE) {\n return null;\n }\n\n if (meridiem) {\n if (hours < 1 || hours > HOURS_IN_HALF_DAY) {\n return null;\n }\n\n hours = meridiem.startsWith(\"a\") ? hours % HOURS_IN_HALF_DAY : (hours % HOURS_IN_HALF_DAY) + HOURS_IN_HALF_DAY;\n } else if (hours > LAST_HOUR) {\n return null;\n }\n\n return hours * MINUTES_PER_HOUR + minutes;\n}\n\nconst findMonthIndex = (word: string) => MONTH_PREFIXES.indexOf(word.slice(0, 3));\n\n/**\n * Reads \"Nov 18\", \"18 Nov 2026\", \"2026-11-18\", \"11/18\", \"today\": a day, or null. A missing year is `reference`'s, or\n * with `isOnOrAfterReference` the first that puts the day on or after it: \"Jan 5\" typed as the end of a range that\n * starts on Dec 20, \"Feb 29\" the next leap year's. Dotted dates aren't read: \"05.11.2026\" is May 11 in some places and\n * Nov 5 in others. `today` is the day \"today\" names: the picker's, in its time zone.\n */\nexport function parseDate(\n text: string,\n reference: Date,\n { isOnOrAfterReference = false, today = startOfDay(new Date()) }: { isOnOrAfterReference?: boolean; today?: Date } = {}\n) {\n const value = text.trim().toLowerCase().replaceAll(\",\", \" \").replaceAll(/\\s+/g, \" \");\n const relativeDays: Record<string, number> = { today: 0, yesterday: -1, tomorrow: 1 };\n\n if (value in relativeDays) {\n return addDays(today, relativeDays[value]);\n }\n\n const iso = /^(\\d{4})-(\\d{1,2})-(\\d{1,2})$/.exec(value);\n const numeric = /^(\\d{1,2})\\/(\\d{1,2})(?:\\/(\\d{2,4}))?$/.exec(value);\n const monthFirst = /^(?:[a-z]+ )?([a-z]{3,}) (\\d{1,2})(?: (\\d{4}))?$/.exec(value);\n const dayFirst = /^(\\d{1,2}) ([a-z]{3,})(?: (\\d{4}))?$/.exec(value);\n\n // Year, month index, day; the year null when it wasn't typed.\n let parts: [number | null, number, number] | null = null;\n\n if (iso) {\n parts = [Number(iso[1]), Number(iso[2]) - 1, Number(iso[3])];\n } else if (numeric) {\n const year = numeric[3] ? Number(numeric[3]) : null;\n parts = [year !== null && year < TWO_DIGIT_YEAR_LIMIT ? year + TWO_DIGIT_YEAR_BASE : year, Number(numeric[1]) - 1, Number(numeric[2])];\n } else if (monthFirst) {\n parts = [monthFirst[3] ? Number(monthFirst[3]) : null, findMonthIndex(monthFirst[1]), Number(monthFirst[2])];\n } else if (dayFirst) {\n parts = [dayFirst[3] ? Number(dayFirst[3]) : null, findMonthIndex(dayFirst[2]), Number(dayFirst[1])];\n }\n\n if (!parts || parts[1] < 0) {\n return null;\n }\n\n const [typedYear, month, day] = parts;\n const read = (year: number) => {\n const date = new Date(year, month, day);\n\n return date.getMonth() === month && date.getDate() === day ? date : null;\n };\n\n if (typedYear !== null) {\n return read(typedYear);\n }\n\n const date = read(reference.getFullYear());\n\n if (!isOnOrAfterReference) {\n return date;\n }\n\n // Before the reference, or no such day in its year (February 29): the next year's.\n return date && date >= startOfDay(reference) ? date : read(reference.getFullYear() + 1);\n}\n\n// ── Building quick ranges ──\n\n/** Whole days, from the first one's midnight to the end of the last one (11:59:59.999 PM), in `timeZone`. */\nexport function getWholeDays(firstDay: Date, lastDay: Date, timeZone: TimeZone): DateRange {\n return {\n from: fromWallTime({ day: startOfDay(firstDay), minutes: 0 }, timeZone),\n to: fromWallTimeEnd({ day: startOfDay(lastDay), minutes: LAST_MINUTE_OF_DAY }, timeZone),\n };\n}\n\n/** Today's midnight, as read in `timeZone`. */\nexport const getToday = (now: Date, timeZone: TimeZone) => toWallTime(now, timeZone).day;\n\n/** A window that ends now and starts `minutes` before: \"Last 15 minutes\", \"Last 24 hours\". */\nexport function createRollingPreset(id: string, label: string, minutes: number): DateRangePreset {\n return {\n id,\n label,\n getRange: (now) => ({ from: new Date(now.getTime() - minutes * MS_PER_MINUTE), to: now }),\n };\n}\n\n/** The last `days` whole days, today included: \"Last 7 days\" on a dashboard. */\nexport function createLastDaysPreset(id: string, label: string, days: number): DateRangePreset {\n return {\n id,\n label,\n getRange: (now, timeZone) => {\n const today = getToday(now, timeZone);\n\n return getWholeDays(addDays(today, 1 - days), today, timeZone);\n },\n };\n}\n\n/** Whole days `daysAgo` back: Today (0), Yesterday (1). */\nexport function createDayPreset(id: string, label: string, daysAgo: number): DateRangePreset {\n return {\n id,\n label,\n getRange: (now, timeZone) => {\n const day = addDays(getToday(now, timeZone), -daysAgo);\n\n return getWholeDays(day, day, timeZone);\n },\n };\n}\n\n// ── Ready quick ranges ──\n\nconst DAYS_PER_WEEK = 7;\nconst MONTHS_PER_QUARTER = 3;\n\n/** The day after this date a year ago; from February 29, the day after February 28. */\nfunction getDayAfterYearAgo(today: Date) {\n const yearAgo = new Date(today.getFullYear() - 1, today.getMonth(), today.getDate());\n const lastDayOfMonth = new Date(today.getFullYear() - 1, today.getMonth() + 1, 0);\n\n return addDays(yearAgo.getMonth() === today.getMonth() ? yearAgo : lastDayOfMonth, 1);\n}\n\n/** A period so far, in whole days: from the day `getFirstDay` gives for today, through today. */\nconst createToDatePreset = (id: string, label: string, getFirstDay: (today: Date) => Date): DateRangePreset => ({\n id,\n label,\n getRange: (now, timeZone) => {\n const today = getToday(now, timeZone);\n\n return getWholeDays(getFirstDay(today), today, timeZone);\n },\n});\n\n/**\n * Ready quick ranges: a page lists the ones it offers, in its order. `PAST_…` windows end now, to the minute: logs, in\n * `date-time` mode. `LAST_…` ranges and periods are whole days, today included: dashboards, in either mode. Ids are\n * stable, so a value kept in a URL or a setting still names its range. Spread one to relabel it or start a group:\n * `{ ...DATE_PICKER_PRESETS.TODAY, isGroupStart: true }`.\n */\nexport const DATE_PICKER_PRESETS = {\n PAST_15_MINUTES: createRollingPreset(\"past-15-minutes\", \"Past 15 minutes\", 15),\n PAST_1_HOUR: createRollingPreset(\"past-1-hour\", \"Past 1 hour\", MINUTES_PER_HOUR),\n PAST_4_HOURS: createRollingPreset(\"past-4-hours\", \"Past 4 hours\", 4 * MINUTES_PER_HOUR),\n PAST_1_DAY: createRollingPreset(\"past-1-day\", \"Past 1 day\", MINUTES_PER_DAY),\n PAST_1_WEEK: createRollingPreset(\"past-1-week\", \"Past 1 week\", DAYS_PER_WEEK * MINUTES_PER_DAY),\n PAST_2_WEEKS: createRollingPreset(\"past-2-weeks\", \"Past 2 weeks\", 2 * DAYS_PER_WEEK * MINUTES_PER_DAY),\n TODAY: createDayPreset(\"today\", \"Today\", 0),\n YESTERDAY: createDayPreset(\"yesterday\", \"Yesterday\", 1),\n LAST_7_DAYS: createLastDaysPreset(\"last-7-days\", \"Last 7 days\", 7),\n LAST_30_DAYS: createLastDaysPreset(\"last-30-days\", \"Last 30 days\", 30),\n LAST_90_DAYS: createLastDaysPreset(\"last-90-days\", \"Last 90 days\", 90),\n /** 365 days through today, or 366 across a February 29. */\n LAST_12_MONTHS: createToDatePreset(\"last-12-months\", \"Last 12 months\", getDayAfterYearAgo),\n MONTH_TO_DATE: createToDatePreset(\"month-to-date\", \"Month to date\", (today) => new Date(today.getFullYear(), today.getMonth(), 1)),\n QUARTER_TO_DATE: createToDatePreset(\n \"quarter-to-date\",\n \"Quarter to date\",\n (today) => new Date(today.getFullYear(), Math.floor(today.getMonth() / MONTHS_PER_QUARTER) * MONTHS_PER_QUARTER, 1)\n ),\n YEAR_TO_DATE: createToDatePreset(\"year-to-date\", \"Year to date\", (today) => new Date(today.getFullYear(), 0, 1)),\n} as const satisfies Record<string, DateRangePreset>;\n"]}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
export type ColorToken = "app-bg" | "panel" | "panel-home" | "panel-edge" | "surface" | "selected" | "selected-edge" | "ink" | "ink-strong" | "ink-nav" | "ink-2" | "muted" | "faint" | "line" | "hover" | "secondary" | "chip" | "callout" | "code-surface" | "bubble" | "accent" | "accent-edge" | "accent-ink" | "link" | "ok" | "avatar" | "avatar-ink" | "danger" | "danger-soft" | "warn" | "warn-soft" | "object-purple" | "object-purple-soft" | "object-blue" | "object-blue-soft" | "selection" | "selection-soft" | "object-green" | "object-green-soft" | "success" | "success-soft" | "chart-1" | "chart-2" | "chart-3" | "dim" | "island-glow" | "glass-edge" | "glass-focus" | "tooltip" | "brand-deep" | "brand-mint" | "syntax-plain" | "syntax-comment" | "syntax-keyword" | "syntax-string" | "syntax-function" | "syntax-constant" | "syntax-tag" | "syntax-url";
|
|
2
|
+
export type SpacingToken = "space-2" | "space-4" | "space-6" | "space-8" | "space-10" | "space-12" | "space-14" | "space-16" | "space-24" | "space-32" | "space-48" | "space-56";
|
|
3
|
+
export type RadiusToken = "sm" | "segment" | "md" | "row" | "lg" | "panel" | "xl" | "full";
|
|
4
|
+
export type ShadowToken = "shadow-card" | "shadow-card-hover" | "shadow-pop" | "shadow-cta" | "shadow-glass" | "shadow-glass-hover" | "shadow-glass-active";
|
|
5
|
+
export type TextStyleName = "page-title" | "editor-title" | "editor-h2" | "editor-body" | "body" | "card-title" | "ui" | "ui-strong" | "small" | "label" | "code" | "code-small" | "2xs" | "ui-sm" | "nav" | "md" | "title-sm" | "display";
|
|
6
|
+
export interface ThemedValue {
|
|
7
|
+
light: string;
|
|
8
|
+
dark: string;
|
|
9
|
+
usage: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ScalarValue {
|
|
12
|
+
value: string;
|
|
13
|
+
usage: string;
|
|
14
|
+
}
|
|
15
|
+
export interface TextStyleValue {
|
|
16
|
+
name: string;
|
|
17
|
+
family: string;
|
|
18
|
+
fontSize: string;
|
|
19
|
+
lineHeight: string;
|
|
20
|
+
fontWeight: number;
|
|
21
|
+
letterSpacing?: string;
|
|
22
|
+
sample?: string;
|
|
23
|
+
usage?: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const tokens: {
|
|
26
|
+
color: Record<ColorToken, ThemedValue>;
|
|
27
|
+
spacing: Record<SpacingToken, ScalarValue>;
|
|
28
|
+
radius: Record<RadiusToken, ScalarValue>;
|
|
29
|
+
shadow: Record<ShadowToken, ThemedValue>;
|
|
30
|
+
fontFamily: Record<string, string>;
|
|
31
|
+
textStyles: Record<TextStyleName, TextStyleValue>;
|
|
32
|
+
};
|
|
33
|
+
/** Theme names as Tailwind sees them (text-ui, bg-surface, rounded-xl, p-space-12), for tailwind-merge. */
|
|
34
|
+
export declare const themeNames: {
|
|
35
|
+
textStyles: TextStyleName[];
|
|
36
|
+
colors: ColorToken[];
|
|
37
|
+
radii: RadiusToken[];
|
|
38
|
+
spacing: SpacingToken[];
|
|
39
|
+
};
|
|
40
|
+
//# sourceMappingURL=major-tokens.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"major-tokens.d.ts","sourceRoot":"","sources":["../../src/lib/major-tokens.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,YAAY,GAAG,YAAY,GAAG,SAAS,GAAG,UAAU,GAAG,eAAe,GAAG,KAAK,GAAG,YAAY,GAAG,SAAS,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,GAAG,OAAO,GAAG,WAAW,GAAG,MAAM,GAAG,SAAS,GAAG,cAAc,GAAG,QAAQ,GAAG,QAAQ,GAAG,aAAa,GAAG,YAAY,GAAG,MAAM,GAAG,IAAI,GAAG,QAAQ,GAAG,YAAY,GAAG,QAAQ,GAAG,aAAa,GAAG,MAAM,GAAG,WAAW,GAAG,eAAe,GAAG,oBAAoB,GAAG,aAAa,GAAG,kBAAkB,GAAG,WAAW,GAAG,gBAAgB,GAAG,cAAc,GAAG,mBAAmB,GAAG,SAAS,GAAG,cAAc,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,KAAK,GAAG,aAAa,GAAG,YAAY,GAAG,aAAa,GAAG,SAAS,GAAG,YAAY,GAAG,YAAY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