@kujoforall/paper-ui 0.0.0-stage → 0.2.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/CHANGELOG.md +93 -0
- package/LICENSE +21 -0
- package/README.md +295 -2
- package/dist/components/editor/block-text.d.ts +8 -0
- package/dist/components/editor/block-text.d.ts.map +1 -0
- package/dist/components/editor/block-text.js +248 -0
- package/dist/components/editor/block-text.js.map +1 -0
- package/dist/components/editor/blocks.d.ts +33 -0
- package/dist/components/editor/blocks.d.ts.map +1 -0
- package/dist/components/editor/blocks.js +191 -0
- package/dist/components/editor/blocks.js.map +1 -0
- package/dist/components/editor/document-editor.d.ts +27 -0
- package/dist/components/editor/document-editor.d.ts.map +1 -0
- package/dist/components/editor/document-editor.js +42 -0
- package/dist/components/editor/document-editor.js.map +1 -0
- package/dist/components/editor/document-view.d.ts +22 -0
- package/dist/components/editor/document-view.d.ts.map +1 -0
- package/dist/components/editor/document-view.js +110 -0
- package/dist/components/editor/document-view.js.map +1 -0
- package/dist/components/editor/editor-state.d.ts +107 -0
- package/dist/components/editor/editor-state.d.ts.map +1 -0
- package/dist/components/editor/editor-state.js +217 -0
- package/dist/components/editor/editor-state.js.map +1 -0
- package/dist/components/editor/extensions/kit-blocks.d.ts +34 -0
- package/dist/components/editor/extensions/kit-blocks.d.ts.map +1 -0
- package/dist/components/editor/extensions/kit-blocks.js +201 -0
- package/dist/components/editor/extensions/kit-blocks.js.map +1 -0
- package/dist/components/editor/extensions/spoiler.d.ts +8 -0
- package/dist/components/editor/extensions/spoiler.d.ts.map +1 -0
- package/dist/components/editor/extensions/spoiler.js +36 -0
- package/dist/components/editor/extensions/spoiler.js.map +1 -0
- package/dist/components/editor/index.d.ts +10 -0
- package/dist/components/editor/index.d.ts.map +1 -0
- package/dist/components/editor/index.js +10 -0
- package/dist/components/editor/index.js.map +1 -0
- package/dist/components/editor/kinds.d.ts +99 -0
- package/dist/components/editor/kinds.d.ts.map +1 -0
- package/dist/components/editor/kinds.js +74 -0
- package/dist/components/editor/kinds.js.map +1 -0
- package/dist/components/editor/look.d.ts +18 -0
- package/dist/components/editor/look.d.ts.map +1 -0
- package/dist/components/editor/look.js +21 -0
- package/dist/components/editor/look.js.map +1 -0
- package/dist/components/sketch/rough.d.ts +38 -0
- package/dist/components/sketch/rough.d.ts.map +1 -0
- package/dist/components/sketch/rough.js +57 -0
- package/dist/components/sketch/rough.js.map +1 -0
- package/dist/components/three/model-viewer.d.ts +36 -0
- package/dist/components/three/model-viewer.d.ts.map +1 -0
- package/dist/components/three/model-viewer.js +338 -0
- package/dist/components/three/model-viewer.js.map +1 -0
- package/dist/components/ui/accent-picker.d.ts +2 -0
- package/dist/components/ui/accent-picker.d.ts.map +1 -0
- package/dist/components/ui/accent-picker.js +44 -0
- package/dist/components/ui/accent-picker.js.map +1 -0
- package/dist/components/ui/address-field.d.ts +10 -0
- package/dist/components/ui/address-field.d.ts.map +1 -0
- package/dist/components/ui/address-field.js +24 -0
- package/dist/components/ui/address-field.js.map +1 -0
- package/dist/components/ui/alert-dialog.d.ts +29 -0
- package/dist/components/ui/alert-dialog.d.ts.map +1 -0
- package/dist/components/ui/alert-dialog.js +72 -0
- package/dist/components/ui/alert-dialog.js.map +1 -0
- package/dist/components/ui/animated-height.d.ts +6 -0
- package/dist/components/ui/animated-height.d.ts.map +1 -0
- package/dist/components/ui/animated-height.js +26 -0
- package/dist/components/ui/animated-height.js.map +1 -0
- package/dist/components/ui/app-shell.d.ts +26 -0
- package/dist/components/ui/app-shell.d.ts.map +1 -0
- package/dist/components/ui/app-shell.js +71 -0
- package/dist/components/ui/app-shell.js.map +1 -0
- package/dist/components/ui/avatar.d.ts +30 -0
- package/dist/components/ui/avatar.d.ts.map +1 -0
- package/dist/components/ui/avatar.js +50 -0
- package/dist/components/ui/avatar.js.map +1 -0
- package/dist/components/ui/badge.d.ts +19 -0
- package/dist/components/ui/badge.d.ts.map +1 -0
- package/dist/components/ui/badge.js +62 -0
- package/dist/components/ui/badge.js.map +1 -0
- package/dist/components/ui/banner.d.ts +33 -0
- package/dist/components/ui/banner.d.ts.map +1 -0
- package/dist/components/ui/banner.js +21 -0
- package/dist/components/ui/banner.js.map +1 -0
- package/dist/components/ui/breadcrumbs.d.ts +10 -0
- package/dist/components/ui/breadcrumbs.d.ts.map +1 -0
- package/dist/components/ui/breadcrumbs.js +9 -0
- package/dist/components/ui/breadcrumbs.js.map +1 -0
- package/dist/components/ui/button.d.ts +15 -0
- package/dist/components/ui/button.d.ts.map +1 -0
- package/dist/components/ui/button.js +110 -0
- package/dist/components/ui/button.js.map +1 -0
- package/dist/components/ui/calendar.d.ts +5 -0
- package/dist/components/ui/calendar.d.ts.map +1 -0
- package/dist/components/ui/calendar.js +65 -0
- package/dist/components/ui/calendar.js.map +1 -0
- package/dist/components/ui/callout.d.ts +32 -0
- package/dist/components/ui/callout.d.ts.map +1 -0
- package/dist/components/ui/callout.js +40 -0
- package/dist/components/ui/callout.js.map +1 -0
- package/dist/components/ui/card.d.ts +18 -0
- package/dist/components/ui/card.d.ts.map +1 -0
- package/dist/components/ui/card.js +28 -0
- package/dist/components/ui/card.js.map +1 -0
- package/dist/components/ui/checkbox.d.ts +11 -0
- package/dist/components/ui/checkbox.d.ts.map +1 -0
- package/dist/components/ui/checkbox.js +30 -0
- package/dist/components/ui/checkbox.js.map +1 -0
- package/dist/components/ui/choice-label.d.ts +13 -0
- package/dist/components/ui/choice-label.d.ts.map +1 -0
- package/dist/components/ui/choice-label.js +17 -0
- package/dist/components/ui/choice-label.js.map +1 -0
- package/dist/components/ui/collapsible.d.ts +10 -0
- package/dist/components/ui/collapsible.d.ts.map +1 -0
- package/dist/components/ui/collapsible.js +21 -0
- package/dist/components/ui/collapsible.js.map +1 -0
- package/dist/components/ui/collection-layout.d.ts +24 -0
- package/dist/components/ui/collection-layout.d.ts.map +1 -0
- package/dist/components/ui/collection-layout.js +16 -0
- package/dist/components/ui/collection-layout.js.map +1 -0
- package/dist/components/ui/combobox.d.ts +10 -0
- package/dist/components/ui/combobox.d.ts.map +1 -0
- package/dist/components/ui/combobox.js +93 -0
- package/dist/components/ui/combobox.js.map +1 -0
- package/dist/components/ui/command-menu.d.ts +18 -0
- package/dist/components/ui/command-menu.d.ts.map +1 -0
- package/dist/components/ui/command-menu.js +49 -0
- package/dist/components/ui/command-menu.js.map +1 -0
- package/dist/components/ui/context-menu.d.ts +19 -0
- package/dist/components/ui/context-menu.d.ts.map +1 -0
- package/dist/components/ui/context-menu.js +42 -0
- package/dist/components/ui/context-menu.js.map +1 -0
- package/dist/components/ui/copy-button.d.ts +11 -0
- package/dist/components/ui/copy-button.d.ts.map +1 -0
- package/dist/components/ui/copy-button.js +48 -0
- package/dist/components/ui/copy-button.js.map +1 -0
- package/dist/components/ui/database/calendar-view.d.ts +10 -0
- package/dist/components/ui/database/calendar-view.d.ts.map +1 -0
- package/dist/components/ui/database/calendar-view.js +65 -0
- package/dist/components/ui/database/calendar-view.js.map +1 -0
- package/dist/components/ui/database/card-views.d.ts +22 -0
- package/dist/components/ui/database/card-views.d.ts.map +1 -0
- package/dist/components/ui/database/card-views.js +74 -0
- package/dist/components/ui/database/card-views.js.map +1 -0
- package/dist/components/ui/database/cells.d.ts +20 -0
- package/dist/components/ui/database/cells.d.ts.map +1 -0
- package/dist/components/ui/database/cells.js +132 -0
- package/dist/components/ui/database/cells.js.map +1 -0
- package/dist/components/ui/database/database.d.ts +19 -0
- package/dist/components/ui/database/database.d.ts.map +1 -0
- package/dist/components/ui/database/database.js +102 -0
- package/dist/components/ui/database/database.js.map +1 -0
- package/dist/components/ui/database/icons.d.ts +5 -0
- package/dist/components/ui/database/icons.d.ts.map +1 -0
- package/dist/components/ui/database/icons.js +13 -0
- package/dist/components/ui/database/icons.js.map +1 -0
- package/dist/components/ui/database/table-view.d.ts +11 -0
- package/dist/components/ui/database/table-view.d.ts.map +1 -0
- package/dist/components/ui/database/table-view.js +157 -0
- package/dist/components/ui/database/table-view.js.map +1 -0
- package/dist/components/ui/date-picker.d.ts +40 -0
- package/dist/components/ui/date-picker.d.ts.map +1 -0
- package/dist/components/ui/date-picker.js +64 -0
- package/dist/components/ui/date-picker.js.map +1 -0
- package/dist/components/ui/date-time-picker.d.ts +21 -0
- package/dist/components/ui/date-time-picker.d.ts.map +1 -0
- package/dist/components/ui/date-time-picker.js +34 -0
- package/dist/components/ui/date-time-picker.js.map +1 -0
- package/dist/components/ui/dialog.d.ts +21 -0
- package/dist/components/ui/dialog.d.ts.map +1 -0
- package/dist/components/ui/dialog.js +63 -0
- package/dist/components/ui/dialog.js.map +1 -0
- package/dist/components/ui/document-layout.d.ts +15 -0
- package/dist/components/ui/document-layout.d.ts.map +1 -0
- package/dist/components/ui/document-layout.js +15 -0
- package/dist/components/ui/document-layout.js.map +1 -0
- package/dist/components/ui/dropdown-menu.d.ts +24 -0
- package/dist/components/ui/dropdown-menu.d.ts.map +1 -0
- package/dist/components/ui/dropdown-menu.js +65 -0
- package/dist/components/ui/dropdown-menu.js.map +1 -0
- package/dist/components/ui/editable-text.d.ts +24 -0
- package/dist/components/ui/editable-text.d.ts.map +1 -0
- package/dist/components/ui/editable-text.js +85 -0
- package/dist/components/ui/editable-text.js.map +1 -0
- package/dist/components/ui/empty-state.d.ts +11 -0
- package/dist/components/ui/empty-state.d.ts.map +1 -0
- package/dist/components/ui/empty-state.js +9 -0
- package/dist/components/ui/empty-state.js.map +1 -0
- package/dist/components/ui/error-state.d.ts +20 -0
- package/dist/components/ui/error-state.d.ts.map +1 -0
- package/dist/components/ui/error-state.js +17 -0
- package/dist/components/ui/error-state.js.map +1 -0
- package/dist/components/ui/field-button.d.ts +15 -0
- package/dist/components/ui/field-button.d.ts.map +1 -0
- package/dist/components/ui/field-button.js +18 -0
- package/dist/components/ui/field-button.js.map +1 -0
- package/dist/components/ui/file-preview.d.ts +5 -0
- package/dist/components/ui/file-preview.d.ts.map +1 -0
- package/dist/components/ui/file-preview.js +66 -0
- package/dist/components/ui/file-preview.js.map +1 -0
- package/dist/components/ui/file-uploader.d.ts +39 -0
- package/dist/components/ui/file-uploader.d.ts.map +1 -0
- package/dist/components/ui/file-uploader.js +111 -0
- package/dist/components/ui/file-uploader.js.map +1 -0
- package/dist/components/ui/filter-builder.d.ts +18 -0
- package/dist/components/ui/filter-builder.d.ts.map +1 -0
- package/dist/components/ui/filter-builder.js +98 -0
- package/dist/components/ui/filter-builder.js.map +1 -0
- package/dist/components/ui/focus-shell.d.ts +14 -0
- package/dist/components/ui/focus-shell.d.ts.map +1 -0
- package/dist/components/ui/focus-shell.js +13 -0
- package/dist/components/ui/focus-shell.js.map +1 -0
- package/dist/components/ui/handle-row.d.ts +25 -0
- package/dist/components/ui/handle-row.d.ts.map +1 -0
- package/dist/components/ui/handle-row.js +110 -0
- package/dist/components/ui/handle-row.js.map +1 -0
- package/dist/components/ui/header-bar.d.ts +5 -0
- package/dist/components/ui/header-bar.d.ts.map +1 -0
- package/dist/components/ui/header-bar.js +10 -0
- package/dist/components/ui/header-bar.js.map +1 -0
- package/dist/components/ui/hover-card.d.ts +6 -0
- package/dist/components/ui/hover-card.d.ts.map +1 -0
- package/dist/components/ui/hover-card.js +13 -0
- package/dist/components/ui/hover-card.js.map +1 -0
- package/dist/components/ui/image-block.d.ts +31 -0
- package/dist/components/ui/image-block.d.ts.map +1 -0
- package/dist/components/ui/image-block.js +103 -0
- package/dist/components/ui/image-block.js.map +1 -0
- package/dist/components/ui/image-card.d.ts +17 -0
- package/dist/components/ui/image-card.d.ts.map +1 -0
- package/dist/components/ui/image-card.js +39 -0
- package/dist/components/ui/image-card.js.map +1 -0
- package/dist/components/ui/image-framer.d.ts +24 -0
- package/dist/components/ui/image-framer.d.ts.map +1 -0
- package/dist/components/ui/image-framer.js +89 -0
- package/dist/components/ui/image-framer.js.map +1 -0
- package/dist/components/ui/image-viewer.d.ts +31 -0
- package/dist/components/ui/image-viewer.d.ts.map +1 -0
- package/dist/components/ui/image-viewer.js +114 -0
- package/dist/components/ui/image-viewer.js.map +1 -0
- package/dist/components/ui/image.d.ts +33 -0
- package/dist/components/ui/image.d.ts.map +1 -0
- package/dist/components/ui/image.js +61 -0
- package/dist/components/ui/image.js.map +1 -0
- package/dist/components/ui/index.d.ts +92 -0
- package/dist/components/ui/index.d.ts.map +1 -0
- package/dist/components/ui/index.js +92 -0
- package/dist/components/ui/index.js.map +1 -0
- package/dist/components/ui/input.d.ts +75 -0
- package/dist/components/ui/input.d.ts.map +1 -0
- package/dist/components/ui/input.js +245 -0
- package/dist/components/ui/input.js.map +1 -0
- package/dist/components/ui/link-block.d.ts +13 -0
- package/dist/components/ui/link-block.d.ts.map +1 -0
- package/dist/components/ui/link-block.js +21 -0
- package/dist/components/ui/link-block.js.map +1 -0
- package/dist/components/ui/list-detail.d.ts +23 -0
- package/dist/components/ui/list-detail.d.ts.map +1 -0
- package/dist/components/ui/list-detail.js +33 -0
- package/dist/components/ui/list-detail.js.map +1 -0
- package/dist/components/ui/listbox.d.ts +7 -0
- package/dist/components/ui/listbox.d.ts.map +1 -0
- package/dist/components/ui/listbox.js +29 -0
- package/dist/components/ui/listbox.js.map +1 -0
- package/dist/components/ui/mac-card.d.ts +15 -0
- package/dist/components/ui/mac-card.d.ts.map +1 -0
- package/dist/components/ui/mac-card.js +9 -0
- package/dist/components/ui/mac-card.js.map +1 -0
- package/dist/components/ui/month-picker.d.ts +13 -0
- package/dist/components/ui/month-picker.d.ts.map +1 -0
- package/dist/components/ui/month-picker.js +53 -0
- package/dist/components/ui/month-picker.js.map +1 -0
- package/dist/components/ui/multi-select.d.ts +22 -0
- package/dist/components/ui/multi-select.d.ts.map +1 -0
- package/dist/components/ui/multi-select.js +88 -0
- package/dist/components/ui/multi-select.js.map +1 -0
- package/dist/components/ui/nav-tree.d.ts +16 -0
- package/dist/components/ui/nav-tree.d.ts.map +1 -0
- package/dist/components/ui/nav-tree.js +41 -0
- package/dist/components/ui/nav-tree.js.map +1 -0
- package/dist/components/ui/page.d.ts +23 -0
- package/dist/components/ui/page.d.ts.map +1 -0
- package/dist/components/ui/page.js +28 -0
- package/dist/components/ui/page.js.map +1 -0
- package/dist/components/ui/pagination.d.ts +26 -0
- package/dist/components/ui/pagination.d.ts.map +1 -0
- package/dist/components/ui/pagination.js +54 -0
- package/dist/components/ui/pagination.js.map +1 -0
- package/dist/components/ui/picker-panel.d.ts +13 -0
- package/dist/components/ui/picker-panel.d.ts.map +1 -0
- package/dist/components/ui/picker-panel.js +19 -0
- package/dist/components/ui/picker-panel.js.map +1 -0
- package/dist/components/ui/popover.d.ts +8 -0
- package/dist/components/ui/popover.d.ts.map +1 -0
- package/dist/components/ui/popover.js +18 -0
- package/dist/components/ui/popover.js.map +1 -0
- package/dist/components/ui/progress.d.ts +19 -0
- package/dist/components/ui/progress.d.ts.map +1 -0
- package/dist/components/ui/progress.js +22 -0
- package/dist/components/ui/progress.js.map +1 -0
- package/dist/components/ui/property.d.ts +11 -0
- package/dist/components/ui/property.d.ts.map +1 -0
- package/dist/components/ui/property.js +18 -0
- package/dist/components/ui/property.js.map +1 -0
- package/dist/components/ui/radio-group.d.ts +8 -0
- package/dist/components/ui/radio-group.d.ts.map +1 -0
- package/dist/components/ui/radio-group.js +18 -0
- package/dist/components/ui/radio-group.js.map +1 -0
- package/dist/components/ui/rating.d.ts +14 -0
- package/dist/components/ui/rating.d.ts.map +1 -0
- package/dist/components/ui/rating.js +61 -0
- package/dist/components/ui/rating.js.map +1 -0
- package/dist/components/ui/save-status.d.ts +8 -0
- package/dist/components/ui/save-status.d.ts.map +1 -0
- package/dist/components/ui/save-status.js +31 -0
- package/dist/components/ui/save-status.js.map +1 -0
- package/dist/components/ui/segmented.d.ts +21 -0
- package/dist/components/ui/segmented.d.ts.map +1 -0
- package/dist/components/ui/segmented.js +12 -0
- package/dist/components/ui/segmented.js.map +1 -0
- package/dist/components/ui/select-menu.d.ts +12 -0
- package/dist/components/ui/select-menu.d.ts.map +1 -0
- package/dist/components/ui/select-menu.js +10 -0
- package/dist/components/ui/select-menu.js.map +1 -0
- package/dist/components/ui/select.d.ts +16 -0
- package/dist/components/ui/select.d.ts.map +1 -0
- package/dist/components/ui/select.js +45 -0
- package/dist/components/ui/select.js.map +1 -0
- package/dist/components/ui/selection-bar.d.ts +12 -0
- package/dist/components/ui/selection-bar.d.ts.map +1 -0
- package/dist/components/ui/selection-bar.js +15 -0
- package/dist/components/ui/selection-bar.js.map +1 -0
- package/dist/components/ui/separator.d.ts +4 -0
- package/dist/components/ui/separator.d.ts.map +1 -0
- package/dist/components/ui/separator.js +12 -0
- package/dist/components/ui/separator.js.map +1 -0
- package/dist/components/ui/settings-layout.d.ts +34 -0
- package/dist/components/ui/settings-layout.d.ts.map +1 -0
- package/dist/components/ui/settings-layout.js +16 -0
- package/dist/components/ui/settings-layout.js.map +1 -0
- package/dist/components/ui/share-link.d.ts +14 -0
- package/dist/components/ui/share-link.d.ts.map +1 -0
- package/dist/components/ui/share-link.js +16 -0
- package/dist/components/ui/share-link.js.map +1 -0
- package/dist/components/ui/sheet.d.ts +21 -0
- package/dist/components/ui/sheet.d.ts.map +1 -0
- package/dist/components/ui/sheet.js +53 -0
- package/dist/components/ui/sheet.js.map +1 -0
- package/dist/components/ui/sidebar.d.ts +82 -0
- package/dist/components/ui/sidebar.d.ts.map +1 -0
- package/dist/components/ui/sidebar.js +258 -0
- package/dist/components/ui/sidebar.js.map +1 -0
- package/dist/components/ui/skeleton.d.ts +8 -0
- package/dist/components/ui/skeleton.d.ts.map +1 -0
- package/dist/components/ui/skeleton.js +15 -0
- package/dist/components/ui/skeleton.js.map +1 -0
- package/dist/components/ui/spinner.d.ts +12 -0
- package/dist/components/ui/spinner.d.ts.map +1 -0
- package/dist/components/ui/spinner.js +14 -0
- package/dist/components/ui/spinner.js.map +1 -0
- package/dist/components/ui/spotlight.d.ts +23 -0
- package/dist/components/ui/spotlight.d.ts.map +1 -0
- package/dist/components/ui/spotlight.js +110 -0
- package/dist/components/ui/spotlight.js.map +1 -0
- package/dist/components/ui/stat-tile.d.ts +8 -0
- package/dist/components/ui/stat-tile.d.ts.map +1 -0
- package/dist/components/ui/stat-tile.js +9 -0
- package/dist/components/ui/stat-tile.js.map +1 -0
- package/dist/components/ui/step-dialog.d.ts +20 -0
- package/dist/components/ui/step-dialog.d.ts.map +1 -0
- package/dist/components/ui/step-dialog.js +36 -0
- package/dist/components/ui/step-dialog.js.map +1 -0
- package/dist/components/ui/steps-layout.d.ts +20 -0
- package/dist/components/ui/steps-layout.d.ts.map +1 -0
- package/dist/components/ui/steps-layout.js +26 -0
- package/dist/components/ui/steps-layout.js.map +1 -0
- package/dist/components/ui/switch.d.ts +8 -0
- package/dist/components/ui/switch.d.ts.map +1 -0
- package/dist/components/ui/switch.js +21 -0
- package/dist/components/ui/switch.js.map +1 -0
- package/dist/components/ui/table.d.ts +16 -0
- package/dist/components/ui/table.d.ts.map +1 -0
- package/dist/components/ui/table.js +76 -0
- package/dist/components/ui/table.js.map +1 -0
- package/dist/components/ui/tabs.d.ts +7 -0
- package/dist/components/ui/tabs.d.ts.map +1 -0
- package/dist/components/ui/tabs.js +19 -0
- package/dist/components/ui/tabs.js.map +1 -0
- package/dist/components/ui/theme-toggle.d.ts +16 -0
- package/dist/components/ui/theme-toggle.d.ts.map +1 -0
- package/dist/components/ui/theme-toggle.js +65 -0
- package/dist/components/ui/theme-toggle.js.map +1 -0
- package/dist/components/ui/time-list.d.ts +16 -0
- package/dist/components/ui/time-list.d.ts.map +1 -0
- package/dist/components/ui/time-list.js +49 -0
- package/dist/components/ui/time-list.js.map +1 -0
- package/dist/components/ui/time-picker.d.ts +47 -0
- package/dist/components/ui/time-picker.d.ts.map +1 -0
- package/dist/components/ui/time-picker.js +141 -0
- package/dist/components/ui/time-picker.js.map +1 -0
- package/dist/components/ui/toast.d.ts +18 -0
- package/dist/components/ui/toast.d.ts.map +1 -0
- package/dist/components/ui/toast.js +77 -0
- package/dist/components/ui/toast.js.map +1 -0
- package/dist/components/ui/toggle.d.ts +15 -0
- package/dist/components/ui/toggle.d.ts.map +1 -0
- package/dist/components/ui/toggle.js +55 -0
- package/dist/components/ui/toggle.js.map +1 -0
- package/dist/components/ui/tooltip.d.ts +15 -0
- package/dist/components/ui/tooltip.d.ts.map +1 -0
- package/dist/components/ui/tooltip.js +32 -0
- package/dist/components/ui/tooltip.js.map +1 -0
- package/dist/components/ui/top-bar.d.ts +25 -0
- package/dist/components/ui/top-bar.d.ts.map +1 -0
- package/dist/components/ui/top-bar.js +23 -0
- package/dist/components/ui/top-bar.js.map +1 -0
- package/dist/components/ui/typography.d.ts +40 -0
- package/dist/components/ui/typography.d.ts.map +1 -0
- package/dist/components/ui/typography.js +98 -0
- package/dist/components/ui/typography.js.map +1 -0
- package/dist/components/ui/video-block.d.ts +14 -0
- package/dist/components/ui/video-block.d.ts.map +1 -0
- package/dist/components/ui/video-block.js +22 -0
- package/dist/components/ui/video-block.js.map +1 -0
- package/dist/hooks/use-dismiss.d.ts +5 -0
- package/dist/hooks/use-dismiss.d.ts.map +1 -0
- package/dist/hooks/use-dismiss.js +23 -0
- package/dist/hooks/use-dismiss.js.map +1 -0
- package/dist/hooks/use-escape-first.d.ts +3 -0
- package/dist/hooks/use-escape-first.d.ts.map +1 -0
- package/dist/hooks/use-escape-first.js +27 -0
- package/dist/hooks/use-escape-first.js.map +1 -0
- package/dist/hooks/use-media-query.d.ts +5 -0
- package/dist/hooks/use-media-query.d.ts.map +1 -0
- package/dist/hooks/use-media-query.js +16 -0
- package/dist/hooks/use-media-query.js.map +1 -0
- package/dist/hooks/use-save-queue.d.ts +13 -0
- package/dist/hooks/use-save-queue.d.ts.map +1 -0
- package/dist/hooks/use-save-queue.js +57 -0
- package/dist/hooks/use-save-queue.js.map +1 -0
- package/dist/hooks/use-selection.d.ts +10 -0
- package/dist/hooks/use-selection.d.ts.map +1 -0
- package/dist/hooks/use-selection.js +52 -0
- package/dist/hooks/use-selection.js.map +1 -0
- package/dist/hooks/use-shared-transition.d.ts +3 -0
- package/dist/hooks/use-shared-transition.d.ts.map +1 -0
- package/dist/hooks/use-shared-transition.js +38 -0
- package/dist/hooks/use-shared-transition.js.map +1 -0
- package/dist/hooks/use-upload-queue.d.ts +22 -0
- package/dist/hooks/use-upload-queue.d.ts.map +1 -0
- package/dist/hooks/use-upload-queue.js +78 -0
- package/dist/hooks/use-upload-queue.js.map +1 -0
- package/dist/lib/accent.d.ts +5 -0
- package/dist/lib/accent.d.ts.map +1 -0
- package/dist/lib/accent.js +10 -0
- package/dist/lib/accent.js.map +1 -0
- package/dist/lib/bento.d.ts +17 -0
- package/dist/lib/bento.d.ts.map +1 -0
- package/dist/lib/bento.js +92 -0
- package/dist/lib/bento.js.map +1 -0
- package/dist/lib/database.d.ts +92 -0
- package/dist/lib/database.d.ts.map +1 -0
- package/dist/lib/database.js +272 -0
- package/dist/lib/database.js.map +1 -0
- package/dist/lib/dates.d.ts +30 -0
- package/dist/lib/dates.d.ts.map +1 -0
- package/dist/lib/dates.js +61 -0
- package/dist/lib/dates.js.map +1 -0
- package/dist/lib/document.d.ts +79 -0
- package/dist/lib/document.d.ts.map +1 -0
- package/dist/lib/document.js +11 -0
- package/dist/lib/document.js.map +1 -0
- package/dist/lib/embed.d.ts +14 -0
- package/dist/lib/embed.d.ts.map +1 -0
- package/dist/lib/embed.js +63 -0
- package/dist/lib/embed.js.map +1 -0
- package/dist/lib/files.d.ts +23 -0
- package/dist/lib/files.d.ts.map +1 -0
- package/dist/lib/files.js +69 -0
- package/dist/lib/files.js.map +1 -0
- package/dist/lib/justified.d.ts +50 -0
- package/dist/lib/justified.d.ts.map +1 -0
- package/dist/lib/justified.js +78 -0
- package/dist/lib/justified.js.map +1 -0
- package/dist/lib/keys.d.ts +18 -0
- package/dist/lib/keys.d.ts.map +1 -0
- package/dist/lib/keys.js +66 -0
- package/dist/lib/keys.js.map +1 -0
- package/dist/lib/number.d.ts +4 -0
- package/dist/lib/number.d.ts.map +1 -0
- package/dist/lib/number.js +33 -0
- package/dist/lib/number.js.map +1 -0
- package/dist/lib/pointer.d.ts +2 -0
- package/dist/lib/pointer.d.ts.map +1 -0
- package/dist/lib/pointer.js +4 -0
- package/dist/lib/pointer.js.map +1 -0
- package/dist/lib/prepare-image.d.ts +43 -0
- package/dist/lib/prepare-image.d.ts.map +1 -0
- package/dist/lib/prepare-image.js +105 -0
- package/dist/lib/prepare-image.js.map +1 -0
- package/dist/lib/rich-text-dom.d.ts +16 -0
- package/dist/lib/rich-text-dom.d.ts.map +1 -0
- package/dist/lib/rich-text-dom.js +145 -0
- package/dist/lib/rich-text-dom.js.map +1 -0
- package/dist/lib/rich-text.d.ts +15 -0
- package/dist/lib/rich-text.d.ts.map +1 -0
- package/dist/lib/rich-text.js +35 -0
- package/dist/lib/rich-text.js.map +1 -0
- package/dist/lib/spotlight.d.ts +22 -0
- package/dist/lib/spotlight.d.ts.map +1 -0
- package/dist/lib/spotlight.js +66 -0
- package/dist/lib/spotlight.js.map +1 -0
- package/dist/lib/theme.d.ts +6 -0
- package/dist/lib/theme.d.ts.map +1 -0
- package/dist/lib/theme.js +15 -0
- package/dist/lib/theme.js.map +1 -0
- package/dist/lib/time.d.ts +19 -0
- package/dist/lib/time.d.ts.map +1 -0
- package/dist/lib/time.js +91 -0
- package/dist/lib/time.js.map +1 -0
- package/dist/lib/tree.d.ts +17 -0
- package/dist/lib/tree.d.ts.map +1 -0
- package/dist/lib/tree.js +35 -0
- package/dist/lib/tree.js.map +1 -0
- package/dist/lib/utils.d.ts +3 -0
- package/dist/lib/utils.d.ts.map +1 -0
- package/dist/lib/utils.js +24 -0
- package/dist/lib/utils.js.map +1 -0
- package/dist/styles/notion.css +817 -0
- package/package.json +129 -5
- package/src/components/editor/block-text.tsx +271 -0
- package/src/components/editor/blocks.tsx +373 -0
- package/src/components/editor/document-editor.tsx +106 -0
- package/src/components/editor/document-view.tsx +205 -0
- package/src/components/editor/editor-state.tsx +298 -0
- package/src/components/editor/extensions/kit-blocks.tsx +452 -0
- package/src/components/editor/extensions/spoiler.tsx +81 -0
- package/src/components/editor/index.ts +10 -0
- package/src/components/editor/kinds.ts +158 -0
- package/src/components/editor/look.tsx +36 -0
- package/src/components/sketch/rough.tsx +90 -0
- package/src/components/three/model-viewer.tsx +514 -0
- package/src/components/ui/accent-picker.tsx +72 -0
- package/src/components/ui/address-field.tsx +57 -0
- package/src/components/ui/alert-dialog.tsx +136 -0
- package/src/components/ui/animated-height.tsx +34 -0
- package/src/components/ui/app-shell.tsx +140 -0
- package/src/components/ui/avatar.tsx +106 -0
- package/src/components/ui/badge.tsx +81 -0
- package/src/components/ui/banner.tsx +53 -0
- package/src/components/ui/breadcrumbs.tsx +25 -0
- package/src/components/ui/button.tsx +147 -0
- package/src/components/ui/calendar.tsx +101 -0
- package/src/components/ui/callout.tsx +61 -0
- package/src/components/ui/card.tsx +59 -0
- package/src/components/ui/checkbox.tsx +66 -0
- package/src/components/ui/choice-label.tsx +43 -0
- package/src/components/ui/collapsible.tsx +58 -0
- package/src/components/ui/collection-layout.tsx +69 -0
- package/src/components/ui/combobox.tsx +155 -0
- package/src/components/ui/command-menu.tsx +102 -0
- package/src/components/ui/context-menu.tsx +89 -0
- package/src/components/ui/copy-button.tsx +80 -0
- package/src/components/ui/database/calendar-view.tsx +180 -0
- package/src/components/ui/database/card-views.tsx +221 -0
- package/src/components/ui/database/cells.tsx +237 -0
- package/src/components/ui/database/database.tsx +279 -0
- package/src/components/ui/database/icons.ts +15 -0
- package/src/components/ui/database/table-view.tsx +311 -0
- package/src/components/ui/date-picker.tsx +208 -0
- package/src/components/ui/date-time-picker.tsx +123 -0
- package/src/components/ui/dialog.tsx +151 -0
- package/src/components/ui/document-layout.tsx +52 -0
- package/src/components/ui/dropdown-menu.tsx +185 -0
- package/src/components/ui/editable-text.tsx +142 -0
- package/src/components/ui/empty-state.tsx +35 -0
- package/src/components/ui/error-state.tsx +67 -0
- package/src/components/ui/field-button.tsx +70 -0
- package/src/components/ui/file-preview.tsx +80 -0
- package/src/components/ui/file-uploader.tsx +375 -0
- package/src/components/ui/filter-builder.tsx +304 -0
- package/src/components/ui/focus-shell.tsx +48 -0
- package/src/components/ui/handle-row.tsx +252 -0
- package/src/components/ui/header-bar.tsx +15 -0
- package/src/components/ui/hover-card.tsx +30 -0
- package/src/components/ui/image-block.tsx +238 -0
- package/src/components/ui/image-card.tsx +95 -0
- package/src/components/ui/image-framer.tsx +160 -0
- package/src/components/ui/image-viewer.tsx +230 -0
- package/src/components/ui/image.tsx +200 -0
- package/src/components/ui/index.ts +178 -0
- package/src/components/ui/input.tsx +471 -0
- package/src/components/ui/link-block.tsx +85 -0
- package/src/components/ui/list-detail.tsx +115 -0
- package/src/components/ui/listbox.ts +26 -0
- package/src/components/ui/mac-card.tsx +46 -0
- package/src/components/ui/month-picker.tsx +119 -0
- package/src/components/ui/multi-select.tsx +221 -0
- package/src/components/ui/nav-tree.tsx +92 -0
- package/src/components/ui/page.tsx +73 -0
- package/src/components/ui/pagination.tsx +143 -0
- package/src/components/ui/picker-panel.tsx +69 -0
- package/src/components/ui/popover.tsx +42 -0
- package/src/components/ui/progress.tsx +76 -0
- package/src/components/ui/property.tsx +33 -0
- package/src/components/ui/radio-group.tsx +61 -0
- package/src/components/ui/rating.tsx +122 -0
- package/src/components/ui/save-status.tsx +53 -0
- package/src/components/ui/segmented.tsx +74 -0
- package/src/components/ui/select-menu.tsx +54 -0
- package/src/components/ui/select.tsx +147 -0
- package/src/components/ui/selection-bar.tsx +50 -0
- package/src/components/ui/separator.tsx +30 -0
- package/src/components/ui/settings-layout.tsx +117 -0
- package/src/components/ui/share-link.tsx +66 -0
- package/src/components/ui/sheet.tsx +90 -0
- package/src/components/ui/sidebar.tsx +627 -0
- package/src/components/ui/skeleton.tsx +22 -0
- package/src/components/ui/spinner.tsx +28 -0
- package/src/components/ui/spotlight.tsx +222 -0
- package/src/components/ui/stat-tile.tsx +25 -0
- package/src/components/ui/step-dialog.tsx +104 -0
- package/src/components/ui/steps-layout.tsx +91 -0
- package/src/components/ui/switch.tsx +55 -0
- package/src/components/ui/table.tsx +99 -0
- package/src/components/ui/tabs.tsx +41 -0
- package/src/components/ui/theme-toggle.tsx +80 -0
- package/src/components/ui/time-list.tsx +106 -0
- package/src/components/ui/time-picker.tsx +344 -0
- package/src/components/ui/toast.tsx +132 -0
- package/src/components/ui/toggle.tsx +76 -0
- package/src/components/ui/tooltip.tsx +78 -0
- package/src/components/ui/top-bar.tsx +118 -0
- package/src/components/ui/typography.tsx +204 -0
- package/src/components/ui/video-block.tsx +66 -0
- package/src/hooks/use-dismiss.ts +24 -0
- package/src/hooks/use-escape-first.ts +25 -0
- package/src/hooks/use-media-query.ts +23 -0
- package/src/hooks/use-save-queue.ts +78 -0
- package/src/hooks/use-selection.ts +51 -0
- package/src/hooks/use-shared-transition.ts +40 -0
- package/src/hooks/use-upload-queue.ts +111 -0
- package/src/lib/accent.ts +11 -0
- package/src/lib/bento.ts +87 -0
- package/src/lib/database.ts +322 -0
- package/src/lib/dates.ts +75 -0
- package/src/lib/document.ts +55 -0
- package/src/lib/embed.ts +62 -0
- package/src/lib/files.ts +73 -0
- package/src/lib/justified.ts +106 -0
- package/src/lib/keys.ts +72 -0
- package/src/lib/number.ts +29 -0
- package/src/lib/pointer.ts +3 -0
- package/src/lib/prepare-image.ts +141 -0
- package/src/lib/rich-text-dom.ts +138 -0
- package/src/lib/rich-text.ts +50 -0
- package/src/lib/spotlight.ts +78 -0
- package/src/lib/theme.ts +18 -0
- package/src/lib/time.ts +83 -0
- package/src/lib/tree.ts +41 -0
- package/src/lib/utils.ts +25 -0
- package/src/styles/notion.css +817 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
4
|
+
import { Check, Plus, X } from "lucide-react";
|
|
5
|
+
import { useId, useRef, useState } from "react";
|
|
6
|
+
import { cn } from "../../lib/utils.js";
|
|
7
|
+
import { Badge, tagColorFor } from "./badge.js";
|
|
8
|
+
import { fieldVariants, fromField, useField } from "./input.js";
|
|
9
|
+
import { useEscapeFirst } from "../../hooks/use-escape-first.js";
|
|
10
|
+
import { listSurfaceClasses, optionClasses, stepActive } from "./listbox.js";
|
|
11
|
+
export function MultiSelect({ options, value, onChange, onCreate, placeholder = "Add…", size = "md", disabled, name, className, "aria-label": ariaLabel, autoFocus, }) {
|
|
12
|
+
const listId = useId();
|
|
13
|
+
const own = fromField(useField(), { disabled, "aria-label": ariaLabel });
|
|
14
|
+
const input = useRef(null);
|
|
15
|
+
const [query, setQuery] = useState("");
|
|
16
|
+
const [open, setOpen] = useState(false);
|
|
17
|
+
const [at, setAt] = useState(-1);
|
|
18
|
+
const byValue = new Map(options.map((o) => [o.value, o]));
|
|
19
|
+
const chosen = value.map((v) => byValue.get(v) ?? { value: v, label: v });
|
|
20
|
+
const typed = query.trim();
|
|
21
|
+
const found = options.filter((o) => o.label.toLowerCase().includes(typed.toLowerCase()));
|
|
22
|
+
const canCreate = onCreate !== undefined && typed !== "" && !options.some((o) => o.label.toLowerCase() === typed.toLowerCase());
|
|
23
|
+
const rows = found.length + (canCreate ? 1 : 0);
|
|
24
|
+
const showing = open && rows > 0 && !own.disabled;
|
|
25
|
+
// One past the end (the options changed under it) is no highlight.
|
|
26
|
+
const active = at < rows ? at : -1;
|
|
27
|
+
const optionId = (i) => `${listId}-${i}`;
|
|
28
|
+
const colorOf = (o) => o.color ?? tagColorFor(o.value);
|
|
29
|
+
const toggle = (v) => onChange(value.includes(v) ? value.filter((x) => x !== v) : [...value, v]);
|
|
30
|
+
const pick = (i) => {
|
|
31
|
+
if (i < found.length)
|
|
32
|
+
toggle(found[i].value);
|
|
33
|
+
else if (canCreate) {
|
|
34
|
+
const made = onCreate(typed);
|
|
35
|
+
if (made)
|
|
36
|
+
onChange([...value, made.value]);
|
|
37
|
+
}
|
|
38
|
+
setQuery("");
|
|
39
|
+
setAt(-1);
|
|
40
|
+
};
|
|
41
|
+
// Escape closes the list and nothing else, before a dialog around it hears it.
|
|
42
|
+
useEscapeFirst(showing, input, () => setOpen(false));
|
|
43
|
+
return (_jsxs(PopoverPrimitive.Root, { open: showing, children: [_jsx(PopoverPrimitive.Anchor, { asChild: true, children: _jsxs("div", { className: cn(fieldVariants({ size }), "flex flex-wrap items-center gap-1 h-auto py-1 cursor-text", size === "sm" ? "min-h-control-sm" : size === "lg" ? "min-h-control-lg" : "min-h-control-md",
|
|
44
|
+
// The field shows focus while its input has it.
|
|
45
|
+
"focus-within:bg-surface focus-within:shadow-[inset_0_0_0_1px_var(--accent),0_0_0_3px_var(--accent-tint)]", own["aria-invalid"] && "shadow-[inset_0_0_0_1px_var(--danger)] focus-within:shadow-[inset_0_0_0_1px_var(--danger),0_0_0_3px_var(--danger-tint)]", own.disabled && "cursor-not-allowed text-ink-disabled", className), onPointerDown: (e) => {
|
|
46
|
+
if (e.target === e.currentTarget) {
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
input.current?.focus();
|
|
49
|
+
}
|
|
50
|
+
}, children: [chosen.map((o) => (_jsxs(Badge, { color: colorOf(o), className: "gap-0.5 pr-0.5", children: [o.label, _jsx("button", { type: "button", "aria-label": `Remove ${o.label}`, disabled: own.disabled, onClick: () => toggle(o.value), className: "relative flex justify-center items-center opacity-70 hover:opacity-100 rounded-small size-3.5 after:absolute after:-inset-1 after:content-['']", children: _jsx(X, { className: "size-3" }) })] }, o.value))), _jsx("input", { ref: input, autoFocus: autoFocus, id: own.id, role: "combobox", "aria-label": own["aria-label"], "aria-describedby": own["aria-describedby"], "aria-invalid": own["aria-invalid"], "aria-expanded": showing, "aria-controls": showing ? listId : undefined, "aria-autocomplete": "list", "aria-activedescendant": showing && active >= 0 ? optionId(active) : undefined, autoComplete: "off", disabled: own.disabled, value: query, placeholder: chosen.length === 0 ? placeholder : undefined, onChange: (e) => {
|
|
51
|
+
setQuery(e.target.value);
|
|
52
|
+
setOpen(true);
|
|
53
|
+
setAt(e.target.value.trim() === "" ? -1 : 0);
|
|
54
|
+
}, onFocus: () => setOpen(true),
|
|
55
|
+
// A click in the list is a prevented mousedown and keeps the focus
|
|
56
|
+
// here, so a blur means the field really was left.
|
|
57
|
+
onBlur: () => setOpen(false), onKeyDown: (e) => {
|
|
58
|
+
if (e.nativeEvent.isComposing || e.keyCode === 229)
|
|
59
|
+
return;
|
|
60
|
+
if (e.key === "ArrowDown" || e.key === "ArrowUp") {
|
|
61
|
+
e.preventDefault();
|
|
62
|
+
setOpen(true);
|
|
63
|
+
const next = stepActive(active, rows, e.key);
|
|
64
|
+
if (next !== null)
|
|
65
|
+
setAt(next);
|
|
66
|
+
}
|
|
67
|
+
else if (e.key === "Enter") {
|
|
68
|
+
// Words typed are a tag being chosen, never a form to send.
|
|
69
|
+
if (query.trim() !== "" || (showing && active >= 0))
|
|
70
|
+
e.preventDefault();
|
|
71
|
+
if (showing && active >= 0)
|
|
72
|
+
pick(active);
|
|
73
|
+
}
|
|
74
|
+
else if (e.key === "Backspace" && query === "" && value.length > 0) {
|
|
75
|
+
onChange(value.slice(0, -1));
|
|
76
|
+
}
|
|
77
|
+
}, className: "flex-1 bg-transparent disabled:cursor-not-allowed outline-none min-w-16 h-control-sm placeholder:text-ink-placeholder" }), name !== undefined && value.map((v) => _jsx("input", { type: "hidden", name: name, value: v }, v))] }) }), _jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { onOpenAutoFocus: (e) => e.preventDefault(), onMouseDown: (e) => e.preventDefault(), onCloseAutoFocus: (e) => e.preventDefault(), onInteractOutside: (e) => {
|
|
78
|
+
if (e.target instanceof Node && input.current?.parentElement?.contains(e.target))
|
|
79
|
+
e.preventDefault();
|
|
80
|
+
}, align: "start", sideOffset: 4, collisionPadding: 8, className: cn("z-(--z-overlay) w-(--radix-popper-anchor-width) max-h-[min(20rem,var(--radix-popper-available-height))] animate-slide-in", listSurfaceClasses), children: _jsxs("ul", { id: listId, role: "listbox", "aria-multiselectable": "true", children: [found.map((o, i) => (_jsxs("li", { id: optionId(i), role: "option", "aria-selected": value.includes(o.value), "data-active": i === active, onMouseDown: (e) => {
|
|
81
|
+
e.preventDefault();
|
|
82
|
+
pick(i);
|
|
83
|
+
}, onMouseEnter: () => setAt(i), className: optionClasses, children: [_jsx(Badge, { color: colorOf(o), children: o.label }), value.includes(o.value) && _jsx(Check, { "aria-hidden": true, className: "ml-auto size-4 text-ink-secondary" })] }, o.value))), canCreate && (_jsxs("li", { id: optionId(found.length), role: "option", "aria-selected": false, "data-active": active === found.length, onMouseDown: (e) => {
|
|
84
|
+
e.preventDefault();
|
|
85
|
+
pick(found.length);
|
|
86
|
+
}, onMouseEnter: () => setAt(found.length), className: optionClasses, children: [_jsx(Plus, { "aria-hidden": true, className: "size-4 text-ink-tertiary" }), _jsx("span", { className: "text-ink-secondary", children: "Create" }), _jsx(Badge, { color: tagColorFor(typed), children: typed })] }))] }) }) })] }));
|
|
87
|
+
}
|
|
88
|
+
//# sourceMappingURL=multi-select.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"multi-select.js","sourceRoot":"","sources":["../../../src/components/ui/multi-select.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,KAAK,EAAE,WAAW,EAAiB,MAAM,YAAa,CAAC;AAChE,OAAO,EAAE,aAAa,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,YAAa,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,cAAc,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,SAAS,EAAE,aAAa,aAExB,KAAC,KAAK,IAAC,KAAK,EAAE,OAAO,CAAC,CAAC,CAAC,YAAG,CAAC,CAAC,KAAK,GAAS,EAC1C,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,KAAC,KAAK,yBAAa,SAAS,EAAC,mCAAmC,GAAG,KAb1F,CAAC,CAAC,KAAK,CAcX,CACR,CAAC,EACD,SAAS,IAAI,CACV,cACI,EAAE,EAAE,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,EAC1B,IAAI,EAAC,QAAQ,mBACE,KAAK,iBACP,MAAM,KAAK,KAAK,CAAC,MAAM,EACpC,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;oCACf,CAAC,CAAC,cAAc,EAAE,CAAC;oCACnB,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;gCACvB,CAAC,EACD,YAAY,EAAE,GAAG,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,EACvC,SAAS,EAAE,aAAa,aAExB,KAAC,IAAI,yBAAa,SAAS,EAAC,0BAA0B,GAAG,EACzD,eAAM,SAAS,EAAC,oBAAoB,uBAAc,EAClD,KAAC,KAAK,IAAC,KAAK,EAAE,WAAW,CAAC,KAAK,CAAC,YAAG,KAAK,GAAS,IAChD,CACR,IACA,GACkB,GACL,IACN,CAC3B,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { type LucideIcon } from "lucide-react";
|
|
2
|
+
import { type ElementType } from "react";
|
|
3
|
+
export type NavNode = {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
href: string;
|
|
7
|
+
icon?: LucideIcon;
|
|
8
|
+
children?: NavNode[];
|
|
9
|
+
};
|
|
10
|
+
export declare function NavTree({ nodes, activeId, depth, link, }: {
|
|
11
|
+
nodes: NavNode[];
|
|
12
|
+
activeId?: string;
|
|
13
|
+
depth?: number;
|
|
14
|
+
link?: ElementType;
|
|
15
|
+
}): import("react").JSX.Element;
|
|
16
|
+
//# sourceMappingURL=nav-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav-tree.d.ts","sourceRoot":"","sources":["../../../src/components/ui/nav-tree.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA0B,KAAK,UAAU,EAAE,MAAM,cAAc,CAAC;AACvE,OAAO,EAAuB,KAAK,WAAW,EAAE,MAAM,OAAO,CAAC;AAG9D,MAAM,MAAM,OAAO,GAAG;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,EAAE,OAAO,EAAE,CAAA;CAAE,CAAC;AAmE3G,wBAAgB,OAAO,CAAC,EACpB,KAAK,EACL,QAAQ,EACR,KAAS,EACT,IAAU,GACb,EAAE;IACC,KAAK,EAAE,OAAO,EAAE,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,WAAW,CAAC;CACtB,+BAQA"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronRight, FileText } from "lucide-react";
|
|
4
|
+
import { useEffect, useState } from "react";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
// Each entry keeps one of the nine tag colours for its icon, picked from its id, so
|
|
7
|
+
// a sidebar has some colour and an entry is recognisable by more than its name.
|
|
8
|
+
const ICON_COLORS = [
|
|
9
|
+
"text-tag-gray-ink", "text-tag-brown-ink", "text-tag-orange-ink", "text-tag-yellow-ink", "text-tag-green-ink",
|
|
10
|
+
"text-tag-blue-ink", "text-tag-purple-ink", "text-tag-pink-ink", "text-tag-red-ink",
|
|
11
|
+
];
|
|
12
|
+
function iconColor(id) {
|
|
13
|
+
let hash = 0;
|
|
14
|
+
for (const ch of id)
|
|
15
|
+
hash = (hash * 31 + ch.charCodeAt(0)) | 0;
|
|
16
|
+
return ICON_COLORS[Math.abs(hash) % ICON_COLORS.length];
|
|
17
|
+
}
|
|
18
|
+
const holds = (node, id) => (node.children ?? []).some((c) => c.id === id || holds(c, id));
|
|
19
|
+
function Row({ node, depth, activeId, link: Link }) {
|
|
20
|
+
const children = node.children ?? [];
|
|
21
|
+
const holdsActive = activeId !== undefined && holds(node, activeId);
|
|
22
|
+
const [open, setOpen] = useState(holdsActive);
|
|
23
|
+
// Opening a page inside this one, from anywhere, shows where it is. Closing it by
|
|
24
|
+
// hand afterwards still works.
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (holdsActive)
|
|
27
|
+
setOpen(true);
|
|
28
|
+
}, [holdsActive]);
|
|
29
|
+
const current = node.id === activeId;
|
|
30
|
+
const Icon = node.icon ?? FileText;
|
|
31
|
+
return (_jsxs("li", { children: [_jsxs("div", { className: cn("group flex h-control-sm items-center rounded-control pr-2 text-sm font-medium transition-colors duration-(--duration-fast)", current ? "bg-accent-tint text-accent-text" : "text-ink-secondary hover:bg-tint-hover"), style: { paddingLeft: 8 + depth * 16 }, children: [_jsxs("span", { className: "relative mr-1.5 flex size-5 shrink-0 items-center justify-center", children: [_jsx(Icon, { className: cn("size-4", iconColor(node.id), children.length > 0 && "group-hover:opacity-0") }), children.length > 0 && (_jsx("button", { type: "button", "aria-label": open ? `Collapse ${node.title}` : `Expand ${node.title}`, "aria-expanded": open, onClick: () => setOpen(!open), className: "affordance absolute inset-0 flex items-center justify-center rounded-small hover:bg-tint-active", children: _jsx(ChevronRight, { className: cn("size-3.5 transition-transform duration-(--duration-fast)", open && "rotate-90") }) }))] }), _jsx(Link, { href: node.href, "aria-current": current ? "page" : undefined, className: "flex h-full min-w-0 flex-1 items-center outline-offset-[-2px]", children: _jsx("span", { className: "truncate", children: node.title }) })] }), children.length > 0 && open && _jsx(NavTree, { nodes: children, depth: depth + 1, activeId: activeId, link: Link })] }));
|
|
32
|
+
}
|
|
33
|
+
/* A sidebar's tree of destinations. The entry matching `activeId` is highlighted
|
|
34
|
+
in the accent, and its ancestors start open. Pass your router's link as `link`.
|
|
35
|
+
|
|
36
|
+
Put the tree inside something that is not itself a `group`, or use a named group
|
|
37
|
+
there: the rows use `group` to reveal their chevrons. */
|
|
38
|
+
export function NavTree({ nodes, activeId, depth = 0, link = "a", }) {
|
|
39
|
+
return (_jsx("ul", { className: "flex flex-col gap-px", children: nodes.map((node) => (_jsx(Row, { node: node, depth: depth, activeId: activeId, link: link }, node.id))) }));
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=nav-tree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"nav-tree.js","sourceRoot":"","sources":["../../../src/components/ui/nav-tree.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAmB,MAAM,cAAc,CAAC;AACvE,OAAO,EAAE,SAAS,EAAE,QAAQ,EAAoB,MAAM,OAAO,CAAC;AAC9D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAIxC,oFAAoF;AACpF,gFAAgF;AAChF,MAAM,WAAW,GAAG;IAChB,mBAAmB,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,oBAAoB;IAC7G,mBAAmB,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,kBAAkB;CACtF,CAAC;AACF,SAAS,SAAS,CAAC,EAAU;IACzB,IAAI,IAAI,GAAG,CAAC,CAAC;IACb,KAAK,MAAM,EAAE,IAAI,EAAE;QAAE,IAAI,GAAG,CAAC,IAAI,GAAG,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;IAC/D,OAAO,WAAW,CAAC,IAAI,CAAC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EAAE,QAAQ,EAAE,IAAI,EAAE,IAAI,IAAjE,IAAI,CAAC,EAAE,CAA8D,CAClF,CAAC,GACD,CACR,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
2
|
+
declare const WIDTHS: {
|
|
3
|
+
/** A reading width, for forms, settings and pages of text (endgame's). */
|
|
4
|
+
reading: string;
|
|
5
|
+
/** Room for a grid of pictures or a wide table (vault's). */
|
|
6
|
+
wide: string;
|
|
7
|
+
};
|
|
8
|
+
export declare function Page({ width, className, ...props }: ComponentPropsWithoutRef<"div"> & {
|
|
9
|
+
width?: keyof typeof WIDTHS;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
export declare function PageHeader({ title, lead, note, actions, className, }: {
|
|
12
|
+
title: ReactNode;
|
|
13
|
+
lead?: ReactNode;
|
|
14
|
+
note?: ReactNode;
|
|
15
|
+
actions?: ReactNode;
|
|
16
|
+
className?: string;
|
|
17
|
+
}): import("react").JSX.Element;
|
|
18
|
+
export declare function Section({ title, aside, children, className, ...props }: Omit<ComponentPropsWithoutRef<"section">, "title"> & {
|
|
19
|
+
title: ReactNode;
|
|
20
|
+
aside?: ReactNode;
|
|
21
|
+
}): import("react").JSX.Element;
|
|
22
|
+
export {};
|
|
23
|
+
//# sourceMappingURL=page.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.d.ts","sourceRoot":"","sources":["../../../src/components/ui/page.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAGjE,QAAA,MAAM,MAAM;IACR,0EAA0E;;IAE1E,6DAA6D;;CAEhE,CAAC;AAQF,wBAAgB,IAAI,CAAC,EACjB,KAAc,EACd,SAAS,EACT,GAAG,KAAK,EACX,EAAE,wBAAwB,CAAC,KAAK,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,MAAM,OAAO,MAAM,CAAA;CAAE,+BAEnE;AAID,wBAAgB,UAAU,CAAC,EACvB,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,SAAS,GACZ,EAAE;IACC,KAAK,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,+BAcA;AAID,wBAAgB,OAAO,CAAC,EACpB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACX,EAAE,IAAI,CAAC,wBAAwB,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC,GAAG;IAAE,KAAK,EAAE,SAAS,CAAC;IAAC,KAAK,CAAC,EAAE,SAAS,CAAA;CAAE,+BAU9F"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
const WIDTHS = {
|
|
4
|
+
/** A reading width, for forms, settings and pages of text (endgame's). */
|
|
5
|
+
reading: "max-w-reading",
|
|
6
|
+
/** Room for a grid of pictures or a wide table (vault's). */
|
|
7
|
+
wide: "max-w-wide",
|
|
8
|
+
};
|
|
9
|
+
/* Every page of an app sits in this: one width and one set of margins, so moving
|
|
10
|
+
between views does not shift the left edge. Meant for inside `SidebarInset` (or
|
|
11
|
+
any container): its margins answer to the room the page really has, sidebar
|
|
12
|
+
open or shut, not to the window. 20px on a phone, 32px from a 36rem page, 48px
|
|
13
|
+
from 56rem; checked at 360 to 2560px wide. Pick one width per app, or per kind
|
|
14
|
+
of page. */
|
|
15
|
+
export function Page({ width = "wide", className, ...props }) {
|
|
16
|
+
return _jsx("div", { className: cn("mx-auto w-full px-5 pt-8 pb-24 @xl:px-8 @xl:pt-12 @4xl:px-12", WIDTHS[width], className), ...props });
|
|
17
|
+
}
|
|
18
|
+
/* A page's name at the display size, the line under it, and room on the right for
|
|
19
|
+
its actions. */
|
|
20
|
+
export function PageHeader({ title, lead, note, actions, className, }) {
|
|
21
|
+
return (_jsxs("header", { className: cn("flex flex-wrap items-end gap-x-4 gap-y-3 mb-8", className), children: [_jsxs("div", { className: "flex-1 min-w-min", children: [_jsx("h1", { className: "text-display text-ink text-balance", children: title }), lead !== undefined && _jsx("p", { className: "mt-2 text-ink-secondary", children: lead }), note !== undefined && _jsx("p", { className: "mt-2 max-w-2xl text-ink-tertiary text-sm", children: note })] }), actions !== undefined && _jsx("div", { className: "flex items-center gap-1 pb-1 shrink-0", children: actions })] }));
|
|
22
|
+
}
|
|
23
|
+
/* A titled part of a page, with an optional link or button beside the title.
|
|
24
|
+
From endgame, 2026-12-05. */
|
|
25
|
+
export function Section({ title, aside, children, className, ...props }) {
|
|
26
|
+
return (_jsxs("section", { className: cn("min-w-0", className), ...props, children: [_jsxs("div", { className: "flex flex-wrap items-center gap-x-3 gap-y-1 mb-2", children: [_jsx("h2", { className: "flex-1 min-w-0 text-h3", children: title }), aside] }), children] }));
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=page.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"page.js","sourceRoot":"","sources":["../../../src/components/ui/page.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC,MAAM,MAAM,GAAG;IACX,0EAA0E;IAC1E,OAAO,EAAE,eAAe;IACxB,6DAA6D;IAC7D,IAAI,EAAE,YAAY;CACrB,CAAC;AAEF;;;;;cAKc;AACd,MAAM,UAAU,IAAI,CAAC,EACjB,KAAK,GAAG,MAAM,EACd,SAAS,EACT,GAAG,KAAK,EACwD;IAChE,OAAO,cAAK,SAAS,EAAE,EAAE,CAAC,8DAA8D,EAAE,MAAM,CAAC,KAAK,CAAC,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAC;AACvI,CAAC;AAED;kBACkB;AAClB,MAAM,UAAU,UAAU,CAAC,EACvB,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,OAAO,EACP,SAAS,GAOZ;IACG,OAAO,CACH,kBAAQ,SAAS,EAAE,EAAE,CAAC,+CAA+C,EAAE,SAAS,CAAC,aAI7E,eAAK,SAAS,EAAC,kBAAkB,aAC7B,aAAI,SAAS,EAAC,oCAAoC,YAAE,KAAK,GAAM,EAC9D,IAAI,KAAK,SAAS,IAAI,YAAG,SAAS,EAAC,yBAAyB,YAAE,IAAI,GAAK,EACvE,IAAI,KAAK,SAAS,IAAI,YAAG,SAAS,EAAC,0CAA0C,YAAE,IAAI,GAAK,IACvF,EACL,OAAO,KAAK,SAAS,IAAI,cAAK,SAAS,EAAC,uCAAuC,YAAE,OAAO,GAAO,IAC3F,CACZ,CAAC;AACN,CAAC;AAED;+BAC+B;AAC/B,MAAM,UAAU,OAAO,CAAC,EACpB,KAAK,EACL,KAAK,EACL,QAAQ,EACR,SAAS,EACT,GAAG,KAAK,EACmF;IAC3F,OAAO,CACH,mBAAS,SAAS,EAAE,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC,KAAM,KAAK,aACnD,eAAK,SAAS,EAAC,kDAAkD,aAC7D,aAAI,SAAS,EAAC,wBAAwB,YAAE,KAAK,GAAM,EAClD,KAAK,IACJ,EACL,QAAQ,IACH,CACb,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { type ElementType, type ReactNode } from "react";
|
|
2
|
+
/** The pages to show for `page` of `count`: the first, the last, the current and its neighbours, with "…" for the gaps. Never more than 7 entries. */
|
|
3
|
+
export declare function pageWindow(page: number, count: number, around?: number): (number | "gap")[];
|
|
4
|
+
export declare function Pagination({ page, count, onChange, href, link: Link, label, className, }: {
|
|
5
|
+
/** From 1. */
|
|
6
|
+
page: number;
|
|
7
|
+
count: number;
|
|
8
|
+
onChange?: (page: number) => void;
|
|
9
|
+
href?: (page: number) => string;
|
|
10
|
+
link?: ElementType;
|
|
11
|
+
label?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
}): import("react").JSX.Element | null;
|
|
14
|
+
export declare function LoadMore({ onLoad, loading, hasMore, auto, shown, total, label, endText, className, }: {
|
|
15
|
+
onLoad: () => void;
|
|
16
|
+
loading: boolean;
|
|
17
|
+
hasMore: boolean;
|
|
18
|
+
/** Load the next page on its own when this comes into view. */
|
|
19
|
+
auto?: boolean;
|
|
20
|
+
shown?: number;
|
|
21
|
+
total?: number;
|
|
22
|
+
label?: string;
|
|
23
|
+
endText?: ReactNode;
|
|
24
|
+
className?: string;
|
|
25
|
+
}): import("react").JSX.Element;
|
|
26
|
+
//# sourceMappingURL=pagination.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.d.ts","sourceRoot":"","sources":["../../../src/components/ui/pagination.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAqB,KAAK,WAAW,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAK5E,sJAAsJ;AACtJ,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,SAAI,GAAG,CAAC,MAAM,GAAG,KAAK,CAAC,EAAE,CAKtF;AAMD,wBAAgB,UAAU,CAAC,EACvB,IAAI,EACJ,KAAK,EACL,QAAQ,EACR,IAAI,EACJ,IAAI,EAAE,IAAU,EAChB,KAAe,EACf,SAAS,GACZ,EAAE;IACC,cAAc;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAClC,IAAI,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IAChC,IAAI,CAAC,EAAE,WAAW,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,sCAwCA;AAMD,wBAAgB,QAAQ,CAAC,EACrB,MAAM,EACN,OAAO,EACP,OAAO,EACP,IAAY,EACZ,KAAK,EACL,KAAK,EACL,KAAmB,EACnB,OAA8B,EAC9B,SAAS,GACZ,EAAE;IACC,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,OAAO,EAAE,OAAO,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;IACjB,+DAA+D;IAC/D,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,+BAsCA"}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { ChevronLeft, ChevronRight } from "lucide-react";
|
|
4
|
+
import { useEffect, useRef } from "react";
|
|
5
|
+
import { cn } from "../../lib/utils.js";
|
|
6
|
+
import { Button } from "./button.js";
|
|
7
|
+
import { Spinner } from "./spinner.js";
|
|
8
|
+
/** The pages to show for `page` of `count`: the first, the last, the current and its neighbours, with "…" for the gaps. Never more than 7 entries. */
|
|
9
|
+
export function pageWindow(page, count, around = 1) {
|
|
10
|
+
if (count <= 5 + around * 2)
|
|
11
|
+
return Array.from({ length: count }, (_, i) => i + 1);
|
|
12
|
+
const from = Math.max(2, Math.min(page - around, count - 2 - around * 2));
|
|
13
|
+
const to = Math.min(count - 1, Math.max(page + around, 3 + around * 2));
|
|
14
|
+
return [1, ...(from > 2 ? ["gap"] : []), ...Array.from({ length: to - from + 1 }, (_, i) => from + i), ...(to < count - 1 ? ["gap"] : []), count];
|
|
15
|
+
}
|
|
16
|
+
/* Numbered pages, Previous and Next. Under 20rem of room the numbers give way to "Page 3
|
|
17
|
+
of 12" between the two arrows. Pages are links when `href` is given (so they
|
|
18
|
+
can be opened in a tab and crawled; pass your router's `link`), buttons
|
|
19
|
+
otherwise. */
|
|
20
|
+
export function Pagination({ page, count, onChange, href, link: Link = "a", label = "Pages", className, }) {
|
|
21
|
+
if (count <= 1)
|
|
22
|
+
return null;
|
|
23
|
+
const go = (p, children, props) => {
|
|
24
|
+
const { disabled, ...rest } = props;
|
|
25
|
+
if (href && !disabled)
|
|
26
|
+
return (_jsx(Button, { asChild: true, ...rest, className: "tabular-nums", children: _jsx(Link, { href: href(p), onClick: () => onChange?.(p), children: children }) }));
|
|
27
|
+
return (_jsx(Button, { ...rest, disabled: disabled, onClick: () => onChange?.(p), className: "tabular-nums", children: children }));
|
|
28
|
+
};
|
|
29
|
+
return (_jsx("nav", { "aria-label": label, className: cn("@container flex justify-center", className), children: _jsxs("ul", { className: "flex items-center gap-1", children: [_jsx("li", { children: go(page - 1, _jsx(ChevronLeft, {}), { "aria-label": "Previous page", disabled: page <= 1, size: "icon-sm", variant: "ghost" }) }), pageWindow(page, count).map((p, i) => p === "gap" ? (_jsx("li", { "aria-hidden": true, className: "@max-xs:hidden px-1 text-ink-tertiary", children: "\u2026" }, `gap-${i}`)) : (_jsx("li", { className: "@max-xs:hidden", children: go(p, p, { "aria-label": `Page ${p}`, "aria-current": p === page ? "page" : undefined, size: "sm", variant: p === page ? "subtle" : "ghost" }) }, p))), _jsxs("li", { className: "@xs:hidden px-2 tabular-nums text-ink-secondary text-sm", "aria-hidden": true, children: ["Page ", page, " of ", count] }), _jsx("li", { children: go(page + 1, _jsx(ChevronRight, {}), { "aria-label": "Next page", disabled: page >= count, size: "icon-sm", variant: "ghost" }) })] }) }));
|
|
30
|
+
}
|
|
31
|
+
/* The foot of a feed: "Load more" to fetch the next page, or, with `auto`, the
|
|
32
|
+
next page fetched as the foot scrolls into view (an infinite list), with the
|
|
33
|
+
button kept as the fallback and for the keyboard. Says how many are shown, and
|
|
34
|
+
when there are no more. */
|
|
35
|
+
export function LoadMore({ onLoad, loading, hasMore, auto = false, shown, total, label = "Load more", endText = "That's everything.", className, }) {
|
|
36
|
+
// One observer while it may load, not one per render: a new observer reports
|
|
37
|
+
// at once, so an unrelated re-render would load the same page again.
|
|
38
|
+
const ref = useRef(null);
|
|
39
|
+
const latest = useRef({ onLoad, loading });
|
|
40
|
+
latest.current = { onLoad, loading };
|
|
41
|
+
useEffect(() => {
|
|
42
|
+
const el = ref.current;
|
|
43
|
+
if (!el || !auto || !hasMore || typeof IntersectionObserver === "undefined")
|
|
44
|
+
return;
|
|
45
|
+
const observer = new IntersectionObserver((entries) => {
|
|
46
|
+
if (entries.some((e) => e.isIntersecting) && !latest.current.loading)
|
|
47
|
+
latest.current.onLoad();
|
|
48
|
+
}, { rootMargin: "400px 0px" });
|
|
49
|
+
observer.observe(el);
|
|
50
|
+
return () => observer.disconnect();
|
|
51
|
+
}, [auto, hasMore, loading]);
|
|
52
|
+
return (_jsxs("div", { ref: ref, className: cn("flex flex-col items-center gap-2 py-6", className), children: [shown !== undefined && total !== undefined && (_jsxs("p", { className: "tabular-nums text-caption text-ink-tertiary", "aria-live": "polite", children: [shown, " of ", total] })), hasMore ? (auto && loading ? (_jsx(Spinner, { label: "Loading more" })) : (_jsx(Button, { variant: "secondary", loading: loading, onClick: onLoad, children: label }))) : (_jsx("p", { className: "text-ink-tertiary text-sm", children: endText }))] }));
|
|
53
|
+
}
|
|
54
|
+
//# sourceMappingURL=pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pagination.js","sourceRoot":"","sources":["../../../src/components/ui/pagination.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EAAE,SAAS,EAAE,MAAM,EAAoC,MAAM,OAAO,CAAC;AAC5E,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAo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1,13 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
export declare function PickerPanel({ open, onOpenChange, trigger, title, children, onOpenAutoFocus, className, }: {
|
|
3
|
+
open: boolean;
|
|
4
|
+
onOpenChange: (open: boolean) => void;
|
|
5
|
+
/** The field that opens it (a FieldButton). */
|
|
6
|
+
trigger: ReactNode;
|
|
7
|
+
/** Shown as the sheet's heading on a phone; names the panel for assistive technology. */
|
|
8
|
+
title: string;
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
onOpenAutoFocus?: (event: Event) => void;
|
|
11
|
+
className?: string;
|
|
12
|
+
}): import("react").JSX.Element;
|
|
13
|
+
//# sourceMappingURL=picker-panel.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"picker-panel.d.ts","sourceRoot":"","sources":["../../../src/components/ui/picker-panel.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASvC,wBAAgB,WAAW,CAAC,EACxB,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,eAAe,EACf,SAAS,GACZ,EAAE;IACC,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,+CAA+C;IAC/C,OAAO,EAAE,SAAS,CAAC;IACnB,yFAAyF;IACzF,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,SAAS,CAAC;IACpB,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,+BAqCA"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as DialogPrimitive from "@radix-ui/react-dialog";
|
|
4
|
+
import { X } from "lucide-react";
|
|
5
|
+
import { useIsPhone } from "../../hooks/use-media-query.js";
|
|
6
|
+
import { cn } from "../../lib/utils.js";
|
|
7
|
+
import { Popover, PopoverContent, PopoverTrigger } from "./popover.js";
|
|
8
|
+
/* Where a picker's panel opens: anchored under its field on a wide screen, and as a
|
|
9
|
+
sheet from the bottom on a phone, where a panel under the field would sit half
|
|
10
|
+
off the screen or under the keyboard. The sheet has the picker's name and a close
|
|
11
|
+
button, and the same scrim, Escape and focus rules as a dialog. */
|
|
12
|
+
export function PickerPanel({ open, onOpenChange, trigger, title, children, onOpenAutoFocus, className, }) {
|
|
13
|
+
const phone = useIsPhone();
|
|
14
|
+
if (!phone) {
|
|
15
|
+
return (_jsxs(Popover, { open: open, onOpenChange: onOpenChange, children: [_jsx(PopoverTrigger, { asChild: true, children: trigger }), _jsx(PopoverContent, { "aria-label": title, className: cn("w-auto", className), onOpenAutoFocus: onOpenAutoFocus, children: children })] }));
|
|
16
|
+
}
|
|
17
|
+
return (_jsxs(DialogPrimitive.Root, { open: open, onOpenChange: onOpenChange, children: [_jsx(DialogPrimitive.Trigger, { asChild: true, children: trigger }), _jsxs(DialogPrimitive.Portal, { children: [_jsx(DialogPrimitive.Overlay, { className: "z-(--z-overlay) fixed inset-0 bg-scrim data-[state=closed]:animate-fade-out data-[state=open]:animate-fade-in" }), _jsxs(DialogPrimitive.Content, { "aria-describedby": undefined, onOpenAutoFocus: onOpenAutoFocus, className: cn("z-(--z-overlay) fixed inset-x-0 bottom-0 flex flex-col bg-surface-overlay shadow-dialog rounded-t-overlay max-h-[92dvh] overflow-y-auto overscroll-contain outline-none", "pb-[env(safe-area-inset-bottom)] data-[state=open]:animate-sheet-in data-[state=closed]:animate-sheet-out", className), children: [_jsxs("div", { className: "flex items-center gap-2 px-4 pt-3 pb-1", children: [_jsx(DialogPrimitive.Title, { className: "flex-1 font-medium text-ink text-sm", children: title }), _jsx(DialogPrimitive.Close, { "aria-label": "Close", className: "inline-flex justify-center items-center hover:bg-tint-hover -mr-1 rounded-control size-9 text-ink-tertiary", children: _jsx(X, { className: "size-4" }) })] }), _jsx("div", { className: "flex justify-center", children: children })] })] })] }));
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=picker-panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"picker-panel.js","sourceRoot":"","sources":["../../../src/components/ui/picker-panel.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,CAAC,EAAE,MAAM,cAAc,CAAC;AAEjC,OAAO,EAAE,UAAU,EAAE,MAAM,gCAAgC,CAAC;AAC5D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,cAAe,CAAC;AAExE;;;qEAGqE;AACrE,MAAM,UAAU,WAAW,CAAC,EACxB,IAAI,EACJ,YAAY,EACZ,OAAO,EACP,KAAK,EACL,QAAQ,EACR,eAAe,EACf,SAAS,GAWZ;IACG,MAAM,KAAK,GAAG,UAAU,EAAE,CAAC;IAC3B,IAAI,CAAC,KAAK,EAAE,CAAC;QACT,OAAO,CACH,MAAC,OAAO,IAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,aAC3C,KAAC,cAAc,IAAC,OAAO,kBAAE,OAAO,GAAkB,EAClD,KAAC,cAAc,kBAAa,KAAK,EAAE,SAAS,EAAE,EAAE,CAAC,QAAQ,EAAE,SAAS,CAAC,EAAE,eAAe,EAAE,eAAe,YAClG,QAAQ,GACI,IACX,CACb,CAAC;IACN,CAAC;IACD,OAAO,CACH,MAAC,eAAe,CAAC,IAAI,IAAC,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,YAAY,aACxD,KAAC,eAAe,CAAC,OAAO,IAAC,OAAO,kBAAE,OAAO,GAA2B,EACpE,MAAC,eAAe,CAAC,MAAM,eACnB,KAAC,eAAe,CAAC,OAAO,IAAC,SAAS,EAAC,+GAA+G,GAAG,EACrJ,MAAC,eAAe,CAAC,OAAO,wBACF,SAAS,EAC3B,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,EAAE,CACT,yKAAyK,EACzK,2GAA2G,EAC3G,SAAS,CACZ,aAED,eAAK,SAAS,EAAC,wCAAwC,aACnD,KAAC,eAAe,CAAC,KAAK,IAAC,SAAS,EAAC,qCAAqC,YAAE,KAAK,GAAyB,EACtG,KAAC,eAAe,CAAC,KAAK,kBAAY,OAAO,EAAC,SAAS,EAAC,4GAA4G,YAC5J,KAAC,CAAC,IAAC,SAAS,EAAC,QAAQ,GAAG,GACJ,IACtB,EACN,cAAK,SAAS,EAAC,qBAAqB,YAAE,QAAQ,GAAO,IAC/B,IACL,IACN,CAC1B,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
2
|
+
import type { ComponentProps } from "react";
|
|
3
|
+
export declare const Popover: import("react").FC<PopoverPrimitive.PopoverProps>;
|
|
4
|
+
export declare const PopoverTrigger: import("react").ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
5
|
+
export declare const PopoverAnchor: import("react").ForwardRefExoticComponent<PopoverPrimitive.PopoverAnchorProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
6
|
+
export declare const PopoverClose: import("react").ForwardRefExoticComponent<PopoverPrimitive.PopoverCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
7
|
+
export declare function PopoverContent({ className, align, sideOffset, collisionPadding, ...props }: ComponentProps<typeof PopoverPrimitive.Content>): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=popover.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.d.ts","sourceRoot":"","sources":["../../../src/components/ui/popover.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAO5C,eAAO,MAAM,OAAO,mDAAwB,CAAC;AAC7C,eAAO,MAAM,cAAc,oIAA2B,CAAC;AACvD,eAAO,MAAM,aAAa,gIAA0B,CAAC;AACrD,eAAO,MAAM,YAAY,kIAAyB,CAAC;AAEnD,wBAAgB,cAAc,CAAC,EAC3B,SAAS,EACT,KAAe,EACf,UAAc,EACd,gBAAoB,EACpB,GAAG,KAAK,EACX,EAAE,cAAc,CAAC,OAAO,gBAAgB,CAAC,OAAO,CAAC,+BAoBjD"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
/* A panel anchored to the thing that opened it, for content richer than a menu: a
|
|
6
|
+
calendar, a few fields. The same surface as a dropdown, without its padding, so
|
|
7
|
+
what goes inside decides its own. */
|
|
8
|
+
export const Popover = PopoverPrimitive.Root;
|
|
9
|
+
export const PopoverTrigger = PopoverPrimitive.Trigger;
|
|
10
|
+
export const PopoverAnchor = PopoverPrimitive.Anchor;
|
|
11
|
+
export const PopoverClose = PopoverPrimitive.Close;
|
|
12
|
+
export function PopoverContent({ className, align = "start", sideOffset = 6, collisionPadding = 8, ...props }) {
|
|
13
|
+
return (_jsx(PopoverPrimitive.Portal, { children: _jsx(PopoverPrimitive.Content, { align: align, sideOffset: sideOffset, collisionPadding: collisionPadding, className: cn("z-(--z-overlay) bg-surface-overlay shadow-popover rounded-overlay outline-none",
|
|
14
|
+
// Never larger than the room there is: a tall panel on a short screen
|
|
15
|
+
// scrolls inside itself rather than running off the edge.
|
|
16
|
+
"max-w-[calc(100vw-1rem)] max-h-[var(--radix-popover-content-available-height)] overflow-y-auto overscroll-contain", "data-[state=open]:animate-slide-in data-[state=closed]:animate-fade-out", "origin-[--radix-popover-content-transform-origin]", className), ...props }) }));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=popover.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"popover.js","sourceRoot":"","sources":["../../../src/components/ui/popover.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAE5D,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC;;uCAEuC;AAEvC,MAAM,CAAC,MAAM,OAAO,GAAG,gBAAgB,CAAC,IAAI,CAAC;AAC7C,MAAM,CAAC,MAAM,cAAc,GAAG,gBAAgB,CAAC,OAAO,CAAC;AACvD,MAAM,CAAC,MAAM,aAAa,GAAG,gBAAgB,CAAC,MAAM,CAAC;AACrD,MAAM,CAAC,MAAM,YAAY,GAAG,gBAAgB,CAAC,KAAK,CAAC;AAEnD,MAAM,UAAU,cAAc,CAAC,EAC3B,SAAS,EACT,KAAK,GAAG,OAAO,EACf,UAAU,GAAG,CAAC,EACd,gBAAgB,GAAG,CAAC,EACpB,GAAG,KAAK,EACsC;IAC9C,OAAO,CACH,KAAC,gBAAgB,CAAC,MAAM,cACpB,KAAC,gBAAgB,CAAC,OAAO,IACrB,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,gBAAgB,EAAE,gBAAgB,EAClC,SAAS,EAAE,EAAE,CACT,gFAAgF;YAChF,sEAAsE;YACtE,0DAA0D;YAC1D,mHAAmH,EACnH,yEAAyE,EACzE,mDAAmD,EACnD,SAAS,CACZ,KACG,KAAK,GACX,GACoB,CAC7B,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { type ReactNode } from "react";
|
|
2
|
+
export declare function ProgressBar({ value, max, label, valueText, size, className, "aria-labelledby": labelledBy, }: {
|
|
3
|
+
value?: number;
|
|
4
|
+
max?: number;
|
|
5
|
+
label?: string;
|
|
6
|
+
valueText?: string;
|
|
7
|
+
size?: "sm" | "md";
|
|
8
|
+
className?: string;
|
|
9
|
+
"aria-labelledby"?: string;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
export declare function Progress({ value, max, label, action, className, }: {
|
|
12
|
+
value: number;
|
|
13
|
+
max: number;
|
|
14
|
+
/** Shown, and names the bar. Defaults to "value of max". */
|
|
15
|
+
label?: ReactNode;
|
|
16
|
+
action?: ReactNode;
|
|
17
|
+
className?: string;
|
|
18
|
+
}): import("react").JSX.Element;
|
|
19
|
+
//# sourceMappingURL=progress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.d.ts","sourceRoot":"","sources":["../../../src/components/ui/progress.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAS,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAS9C,wBAAgB,WAAW,CAAC,EACxB,KAAK,EACL,GAAS,EACT,KAAK,EACL,SAAS,EACT,IAAW,EACX,SAAS,EACT,iBAAiB,EAAE,UAAU,GAChC,EAAE;IACC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC9B,+BAqBA;AAKD,wBAAgB,QAAQ,CAAC,EACrB,KAAK,EACL,GAAG,EACH,KAAK,EACL,MAAM,EACN,SAAS,GACZ,EAAE;IACC,KAAK,EAAE,MAAM,CAAC;IACd,GAAG,EAAE,MAAM,CAAC;IACZ,4DAA4D;IAC5D,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACtB,+BAWA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useId } from "react";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
/* How far along something is, as a bar: the accent filling a track, 3:1 or better
|
|
5
|
+
between them in every colour theme (the deeper fill in light, where the plain
|
|
6
|
+
accent is too pale for orange; the plain one in dark, where it is the lighter). Without a value it is indeterminate: a short band
|
|
7
|
+
sliding along, for work whose length is not known. Name it with `label` (read to
|
|
8
|
+
assistive technology, not shown), or point aria-labelledby at a visible name.
|
|
9
|
+
`valueText` is what is read out ("3 of 5", "40%"); it defaults to the percentage. */
|
|
10
|
+
export function ProgressBar({ value, max = 100, label, valueText, size = "md", className, "aria-labelledby": labelledBy, }) {
|
|
11
|
+
const known = value !== undefined;
|
|
12
|
+
const share = !known || max <= 0 ? 0 : Math.min(Math.max(value / max, 0), 1);
|
|
13
|
+
return (_jsx("div", { role: "progressbar", "aria-label": label, "aria-labelledby": labelledBy, "aria-valuemin": known ? 0 : undefined, "aria-valuemax": known ? max : undefined, "aria-valuenow": known ? value : undefined, "aria-valuetext": known ? (valueText ?? `${Math.round(share * 100)}%`) : undefined, className: cn("relative bg-tint-active rounded-full overflow-hidden", size === "sm" ? "h-1" : "h-1.5", className), children: known ? (_jsx("div", { className: "bg-accent-solid dark:bg-accent rounded-full h-full transition-[width] duration-(--duration-base) ease-out-notion", style: { width: `${share * 100}%` } })) : (_jsx("div", { className: "absolute inset-y-0 bg-accent-solid dark:bg-accent rounded-full w-1/3 animate-[progress-slide_1.2s_ease-in-out_infinite] motion-reduce:animate-none motion-reduce:w-full motion-reduce:opacity-50" })) }));
|
|
14
|
+
}
|
|
15
|
+
/* How far along a list or a job is: "n of m", the bar, and room for one action on
|
|
16
|
+
the right (a reset, usually). The words name the bar for assistive technology.
|
|
17
|
+
The row wraps on a narrow screen. */
|
|
18
|
+
export function Progress({ value, max, label, action, className, }) {
|
|
19
|
+
const id = useId();
|
|
20
|
+
return (_jsxs("div", { className: cn("flex flex-wrap items-center gap-x-3 bg-surface-sunken py-2 pr-2 pl-4 rounded-surface", className), children: [_jsx("span", { id: id, className: "font-medium tabular-nums text-accent-text text-sm", children: label ?? `${value} of ${max}` }), _jsx(ProgressBar, { value: value, max: max, valueText: `${value} of ${max}`, "aria-labelledby": id, className: "flex-1 min-w-16" }), action] }));
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=progress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"progress.js","sourceRoot":"","sources":["../../../src/components/ui/progress.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,KAAK,EAAkB,MAAM,OAAO,CAAC;AAC9C,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC;;;;;uFAKuF;AACvF,MAAM,UAAU,WAAW,CAAC,EACxB,KAAK,EACL,GAAG,GAAG,GAAG,EACT,KAAK,EACL,SAAS,EACT,IAAI,GAAG,IAAI,EACX,SAAS,EACT,iBAAiB,EAAE,UAAU,GAShC;IACG,MAAM,KAAK,GAAG,KAAK,KAAK,SAAS,CAAC;IAClC,MAAM,KAAK,GAAG,CAAC,KAAK,IAAI,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,GAAG,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAC7E,OAAO,CACH,cACI,IAAI,EAAC,aAAa,gBACN,KAAK,qBACA,UAAU,mBACZ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,mBACrB,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,SAAS,mBACvB,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,oBACxB,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,GAAG,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,SAAS,EAChF,SAAS,EAAE,EAAE,CAAC,sDAAsD,EAAE,IAAI,KAAK,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,EAAE,SAAS,CAAC,YAEhH,KAAK,CAAC,CAAC,CAAC,CACL,cAAK,SAAS,EAAC,kHAAkH,EAAC,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,KAAK,GAAG,GAAG,GAAG,EAAE,GAAI,CAC5K,CAAC,CAAC,CAAC,CACA,cAAK,SAAS,EAAC,kMAAkM,GAAG,CACvN,GACC,CACT,CAAC;AACN,CAAC;AAED;;uCAEuC;AACvC,MAAM,UAAU,QAAQ,CAAC,EACrB,KAAK,EACL,GAAG,EACH,KAAK,EACL,MAAM,EACN,SAAS,GAQZ;IACG,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IACnB,OAAO,CACH,eAAK,SAAS,EAAE,EAAE,CAAC,sFAAsF,EAAE,SAAS,CAAC,aACjH,eAAM,EAAE,EAAE,EAAE,EAAE,SAAS,EAAC,mDAAmD,YACtE,KAAK,IAAI,GAAG,KAAK,OAAO,GAAG,EAAE,GAC3B,EACP,KAAC,WAAW,IAAC,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,KAAK,OAAO,GAAG,EAAE,qBAAmB,EAAE,EAAE,SAAS,EAAC,iBAAiB,GAAG,EACxH,MAAM,IACL,CACT,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { LucideIcon } from "lucide-react";
|
|
2
|
+
import type { ComponentPropsWithoutRef, ReactNode } from "react";
|
|
3
|
+
export declare const quietField = "min-h-control-sm w-full rounded-control bg-transparent px-1.5 py-1 text-body sm:text-sm outline-none transition-[background-color,box-shadow] duration-(--duration-fast) placeholder:text-ink-placeholder hover:bg-tint-hover focus:bg-surface focus:shadow-[inset_0_0_0_1px_var(--accent)] aria-invalid:shadow-[inset_0_0_0_1px_var(--danger)] disabled:text-ink-disabled disabled:hover:bg-transparent";
|
|
4
|
+
export declare function PropertyList({ className, ...props }: ComponentPropsWithoutRef<"div">): import("react").JSX.Element;
|
|
5
|
+
export declare function Property({ icon: Icon, label, children }: {
|
|
6
|
+
icon?: LucideIcon;
|
|
7
|
+
label: string;
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
}): import("react").JSX.Element;
|
|
10
|
+
export { NumberInput, QuietInput } from "./input.js";
|
|
11
|
+
//# sourceMappingURL=property.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property.d.ts","sourceRoot":"","sources":["../../../src/components/ui/property.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,KAAK,EAAE,wBAAwB,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AASjE,eAAO,MAAM,UAAU,6YACuX,CAAC;AAE/Y,wBAAgB,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,wBAAwB,CAAC,KAAK,CAAC,+BAEpF;AAED,wBAAgB,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE;IAAE,IAAI,CAAC,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,SAAS,CAAA;CAAE,+BAUlH;AAGD,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "../../lib/utils.js";
|
|
4
|
+
/* A record's properties, Notion's way: a quiet label column on the left, values on
|
|
5
|
+
the right, and no boxes until a value is hovered or focused. Use it in a dialog
|
|
6
|
+
or a side panel for anything with a handful of fields. */
|
|
7
|
+
// The look of a value at rest, for a control the kit does not provide: transparent,
|
|
8
|
+
// tinted on hover, the accent's edge on focus (as Input's quiet variant).
|
|
9
|
+
export const quietField = "min-h-control-sm w-full rounded-control bg-transparent px-1.5 py-1 text-body sm:text-sm outline-none transition-[background-color,box-shadow] duration-(--duration-fast) placeholder:text-ink-placeholder hover:bg-tint-hover focus:bg-surface focus:shadow-[inset_0_0_0_1px_var(--accent)] aria-invalid:shadow-[inset_0_0_0_1px_var(--danger)] disabled:text-ink-disabled disabled:hover:bg-transparent";
|
|
10
|
+
export function PropertyList({ className, ...props }) {
|
|
11
|
+
return _jsx("div", { className: cn("flex flex-col gap-1", className), ...props });
|
|
12
|
+
}
|
|
13
|
+
export function Property({ icon: Icon, label, children }) {
|
|
14
|
+
return (_jsxs("div", { className: "flex items-start gap-2", children: [_jsxs("div", { className: "flex h-control-sm w-28 shrink-0 items-center gap-1.5 text-sm text-ink-secondary sm:w-32", children: [Icon && _jsx(Icon, { className: "size-4 text-ink-tertiary" }), _jsx("span", { className: "truncate", children: label })] }), _jsx("div", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-1", children: children })] }));
|
|
15
|
+
}
|
|
16
|
+
// Moved to input.tsx with the other text inputs; exported from here too, as before.
|
|
17
|
+
export { NumberInput, QuietInput } from "./input.js";
|
|
18
|
+
//# sourceMappingURL=property.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"property.js","sourceRoot":"","sources":["../../../src/components/ui/property.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAIb,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AAExC;;4DAE4D;AAE5D,oFAAoF;AACpF,0EAA0E;AAC1E,MAAM,CAAC,MAAM,UAAU,GACnB,0YAA0Y,CAAC;AAE/Y,MAAM,UAAU,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAmC;IACjF,OAAO,cAAK,SAAS,EAAE,EAAE,CAAC,qBAAqB,EAAE,SAAS,CAAC,KAAM,KAAK,GAAI,CAAC;AAC/E,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,QAAQ,EAA6D;IAC/G,OAAO,CACH,eAAK,SAAS,EAAC,wBAAwB,aACnC,eAAK,SAAS,EAAC,yFAAyF,aACnG,IAAI,IAAI,KAAC,IAAI,IAAC,SAAS,EAAC,0BAA0B,GAAG,EACtD,eAAM,SAAS,EAAC,UAAU,YAAE,KAAK,GAAQ,IACvC,EACN,cAAK,SAAS,EAAC,kDAAkD,YAAE,QAAQ,GAAO,IAChF,CACT,CAAC;AACN,CAAC;AAED,oFAAoF;AACpF,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAa,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
2
|
+
import type { ComponentProps, ReactNode } from "react";
|
|
3
|
+
export declare function RadioGroup({ className, orientation, ...props }: ComponentProps<typeof RadioGroupPrimitive.Root>): import("react").JSX.Element;
|
|
4
|
+
export declare function RadioGroupItem({ label, description, className, ...props }: ComponentProps<typeof RadioGroupPrimitive.Item> & {
|
|
5
|
+
label?: ReactNode;
|
|
6
|
+
description?: ReactNode;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
//# sourceMappingURL=radio-group.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.d.ts","sourceRoot":"","sources":["../../../src/components/ui/radio-group.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAUvD,wBAAgB,UAAU,CAAC,EAAE,SAAS,EAAE,WAAwB,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,+BAc5H;AAED,wBAAgB,cAAc,CAAC,EAC3B,KAAK,EACL,WAAW,EACX,SAAS,EACT,GAAG,KAAK,EACX,EAAE,cAAc,CAAC,OAAO,mBAAmB,CAAC,IAAI,CAAC,GAAG;IAAE,KAAK,CAAC,EAAE,SAAS,CAAC;IAAC,WAAW,CAAC,EAAE,SAAS,CAAA;CAAE,+BA0BlG"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import * as RadioGroupPrimitive from "@radix-ui/react-radio-group";
|
|
4
|
+
import { cn } from "../../lib/utils.js";
|
|
5
|
+
import { ChoiceLabel } from "./choice-label.js";
|
|
6
|
+
import { useField } from "./input.js";
|
|
7
|
+
/* One of a few, all in view: each option a circle with its words, the arrow keys
|
|
8
|
+
moving the choice. For more than five or so, a Select. For two or three views of
|
|
9
|
+
one thing, Segmented. Inside a Field, the Field's label names the group and its
|
|
10
|
+
error describes it. The empty circle's edge reads at 3:1 (--control-edge). */
|
|
11
|
+
export function RadioGroup({ className, orientation = "vertical", ...props }) {
|
|
12
|
+
const field = useField();
|
|
13
|
+
return (_jsx(RadioGroupPrimitive.Root, { orientation: orientation, "aria-labelledby": props["aria-label"] || !field ? undefined : field.labelId, "aria-describedby": field?.describedBy, "aria-invalid": field?.invalid || undefined, required: field?.required, disabled: field?.disabled, className: cn("group flex gap-2.5", orientation === "vertical" ? "flex-col" : "flex-row flex-wrap gap-x-5", className), ...props }));
|
|
14
|
+
}
|
|
15
|
+
export function RadioGroupItem({ label, description, className, ...props }) {
|
|
16
|
+
return (_jsx(ChoiceLabel, { label: label, description: description, disabled: props.disabled, control: ({ labelId, descriptionId }) => (_jsx(RadioGroupPrimitive.Item, { "aria-labelledby": props["aria-labelledby"] ?? labelId, "aria-describedby": descriptionId, className: cn("relative flex justify-center items-center rounded-full size-4 shrink-0 outline-offset-2", "shadow-[inset_0_0_0_1.5px_var(--control-edge)] hover:bg-tint-hover transition-[background-color,box-shadow] duration-(--duration-fast)", "data-[state=checked]:bg-accent-solid data-[state=checked]:shadow-none data-[state=checked]:hover:bg-accent-solid-hover", "group-aria-invalid:shadow-[inset_0_0_0_1.5px_var(--danger)]", "disabled:cursor-not-allowed disabled:bg-tint-hover disabled:shadow-[inset_0_0_0_1.5px_var(--hairline-strong)] disabled:data-[state=checked]:bg-tint-active disabled:[&>span]:bg-ink-disabled", "after:absolute after:-inset-1 after:content-['']", className), ...props, children: _jsx(RadioGroupPrimitive.Indicator, { className: "block bg-accent-ink rounded-full size-1.5" }) })) }));
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=radio-group.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"radio-group.js","sourceRoot":"","sources":["../../../src/components/ui/radio-group.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,KAAK,mBAAmB,MAAM,6BAA6B,CAAC;AAEnE,OAAO,EAAE,EAAE,EAAE,MAAM,oBAAoB,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,mBAAoB,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAa,CAAC;AAEvC;;;gFAGgF;AAEhF,MAAM,UAAU,UAAU,CAAC,EAAE,SAAS,EAAE,WAAW,GAAG,UAAU,EAAE,GAAG,KAAK,EAAmD;IACzH,MAAM,KAAK,GAAG,QAAQ,EAAE,CAAC;IACzB,OAAO,CACH,KAAC,mBAAmB,CAAC,IAAI,IACrB,WAAW,EAAE,WAAW,qBACP,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,sBACxD,KAAK,EAAE,WAAW,kBACtB,KAAK,EAAE,OAAO,IAAI,SAAS,EACzC,QAAQ,EAAE,KAAK,EAAE,QAAQ,EACzB,QAAQ,EAAE,KAAK,EAAE,QAAQ,EACzB,SAAS,EAAE,EAAE,CAAC,oBAAoB,EAAE,WAAW,KAAK,UAAU,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,4BAA4B,EAAE,SAAS,CAAC,KAClH,KAAK,GACX,CACL,CAAC;AACN,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,EAC3B,KAAK,EACL,WAAW,EACX,SAAS,EACT,GAAG,KAAK,EACuF;IAC/F,OAAO,CACH,KAAC,WAAW,IACR,KAAK,EAAE,KAAK,EACZ,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,KAAK,CAAC,QAAQ,EACxB,OAAO,EAAE,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,EAAE,EAAE,CAAC,CACrC,KAAC,mBAAmB,CAAC,IAAI,uBACJ,KAAK,CAAC,iBAAiB,CAAC,IAAI,OAAO,sBAClC,aAAa,EAC/B,SAAS,EAAE,EAAE,CACT,yFAAyF,EACzF,wIAAwI,EACxI,wHAAwH,EACxH,6DAA6D,EAC7D,8LAA8L,EAC9L,kDAAkD,EAClD,SAAS,CACZ,KACG,KAAK,YAET,KAAC,mBAAmB,CAAC,SAAS,IAAC,SAAS,EAAC,2CAA2C,GAAG,GAChE,CAC9B,GACH,CACL,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare function Rating({ value, onChange, max, step, size, readOnly, required, disabled, label, className, }: {
|
|
2
|
+
value: number | null;
|
|
3
|
+
onChange?: (value: number | null) => void;
|
|
4
|
+
max?: number;
|
|
5
|
+
step?: 1 | 0.5;
|
|
6
|
+
size?: "sm" | "md" | "lg";
|
|
7
|
+
readOnly?: boolean;
|
|
8
|
+
/** It cannot be cleared back to no rating. */
|
|
9
|
+
required?: boolean;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
label?: string;
|
|
12
|
+
className?: string;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=rating.d.ts.map
|