tembro 2.0.4 → 2.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/actions/action-menu.cjs +1 -1
- package/dist/components/actions/action-menu.d.ts +13 -1
- package/dist/components/actions/action-menu.js +87 -61
- package/dist/components/actions/button-group.cjs +1 -1
- package/dist/components/actions/button-group.d.ts +9 -1
- package/dist/components/actions/button-group.js +58 -14
- package/dist/components/actions/copy-button.cjs +1 -1
- package/dist/components/actions/copy-button.d.ts +2 -1
- package/dist/components/actions/copy-button.js +13 -11
- package/dist/components/calendar/calendar.cjs +1 -1
- package/dist/components/calendar/calendar.d.ts +14 -1
- package/dist/components/calendar/calendar.js +207 -128
- package/dist/components/calendar/date-picker.cjs +1 -1
- package/dist/components/calendar/date-picker.d.ts +3 -1
- package/dist/components/calendar/date-picker.js +57 -27
- package/dist/components/calendar/date-range-picker.cjs +1 -1
- package/dist/components/calendar/date-range-picker.d.ts +10 -1
- package/dist/components/calendar/date-range-picker.js +149 -64
- package/dist/components/data-table/data-table-toolbar.cjs +1 -1
- package/dist/components/data-table/data-table-toolbar.d.ts +5 -1
- package/dist/components/data-table/data-table-toolbar.js +36 -23
- package/dist/components/data-table/data-table.cjs +1 -1
- package/dist/components/data-table/data-table.d.ts +6 -4
- package/dist/components/data-table/data-table.js +87 -79
- package/dist/components/data-table/demo.cjs +1 -1
- package/dist/components/data-table/demo.js +3 -13
- package/dist/components/data-table/index.cjs +1 -1
- package/dist/components/data-table/index.js +5 -5
- package/dist/components/data-table/public.cjs +1 -1
- package/dist/components/data-table/public.d.ts +1 -6
- package/dist/components/data-table/public.js +7 -12
- package/dist/components/display/activity-feed.cjs +1 -1
- package/dist/components/display/activity-feed.d.ts +12 -1
- package/dist/components/display/activity-feed.js +69 -47
- package/dist/components/display/carousel.cjs +1 -1
- package/dist/components/display/carousel.d.ts +10 -1
- package/dist/components/display/carousel.js +68 -23
- package/dist/components/display/code-block.cjs +2 -1
- package/dist/components/display/code-block.d.ts +3 -1
- package/dist/components/display/code-block.js +33 -19
- package/dist/components/display/comparison-card.cjs +1 -1
- package/dist/components/display/comparison-card.d.ts +3 -3
- package/dist/components/display/comparison-card.js +14 -38
- package/dist/components/display/data-state.cjs +1 -1
- package/dist/components/display/data-state.d.ts +12 -2
- package/dist/components/display/data-state.js +80 -42
- package/dist/components/display/demo.cjs +1 -1
- package/dist/components/display/demo.js +1 -5
- package/dist/components/display/index.cjs +1 -1
- package/dist/components/display/index.d.ts +0 -3
- package/dist/components/display/index.js +21 -24
- package/dist/components/feedback/alert.cjs +1 -1
- package/dist/components/feedback/alert.d.ts +6 -1
- package/dist/components/feedback/alert.js +49 -19
- package/dist/components/feedback/index.cjs +1 -1
- package/dist/components/feedback/index.d.ts +0 -2
- package/dist/components/feedback/index.js +3 -5
- package/dist/components/filters/demo.cjs +1 -1
- package/dist/components/filters/demo.js +1 -5
- package/dist/components/filters/filter-bar.cjs +1 -1
- package/dist/components/filters/filter-bar.d.ts +15 -1
- package/dist/components/filters/filter-bar.js +94 -50
- package/dist/components/filters/index.cjs +1 -1
- package/dist/components/filters/index.d.ts +0 -1
- package/dist/components/filters/index.js +3 -4
- package/dist/components/form/form-field-shell.cjs +1 -1
- package/dist/components/form/form-field-shell.d.ts +17 -3
- package/dist/components/form/form-field-shell.js +54 -40
- package/dist/components/form/form-input.cjs +1 -1
- package/dist/components/form/form-input.js +278 -217
- package/dist/components/form/form-select.cjs +1 -1
- package/dist/components/form/form-select.js +47 -33
- package/dist/components/form/form-switch.cjs +1 -1
- package/dist/components/form/form-switch.js +79 -66
- package/dist/components/form/form-textarea.cjs +1 -1
- package/dist/components/form/form-textarea.js +59 -48
- package/dist/components/form/index.cjs +1 -1
- package/dist/components/form/index.js +14 -14
- package/dist/components/form/public.cjs +1 -1
- package/dist/components/form/public.d.ts +0 -8
- package/dist/components/form/public.js +7 -15
- package/dist/components/inputs/async-select.cjs +1 -1
- package/dist/components/inputs/async-select.d.ts +11 -2
- package/dist/components/inputs/async-select.js +278 -270
- package/dist/components/inputs/combobox.cjs +1 -1
- package/dist/components/inputs/combobox.d.ts +5 -1
- package/dist/components/inputs/combobox.js +52 -19
- package/dist/components/inputs/simple-select.cjs +1 -1
- package/dist/components/inputs/simple-select.d.ts +2 -1
- package/dist/components/inputs/simple-select.js +32 -16
- package/dist/components/layout/app-sidebar.cjs +1 -1
- package/dist/components/layout/app-sidebar.d.ts +4 -1
- package/dist/components/layout/app-sidebar.js +152 -132
- package/dist/components/layout/breadcrumbs.cjs +1 -1
- package/dist/components/layout/breadcrumbs.d.ts +2 -1
- package/dist/components/layout/breadcrumbs.js +10 -10
- package/dist/components/layout/index.cjs +1 -1
- package/dist/components/layout/index.js +3 -3
- package/dist/components/layout/stat-card.cjs +1 -1
- package/dist/components/layout/stat-card.d.ts +8 -1
- package/dist/components/layout/stat-card.js +33 -11
- package/dist/components/modern/calendar-scheduler.cjs +1 -1
- package/dist/components/modern/calendar-scheduler.d.ts +2 -1
- package/dist/components/modern/calendar-scheduler.js +21 -12
- package/dist/components/overlay/alert-dialog.cjs +1 -1
- package/dist/components/overlay/alert-dialog.d.ts +15 -1
- package/dist/components/overlay/alert-dialog.js +102 -27
- package/dist/components/overlay/drawer.cjs +1 -1
- package/dist/components/overlay/drawer.d.ts +4 -1
- package/dist/components/overlay/drawer.js +20 -17
- package/dist/components/patterns/index.cjs +1 -1
- package/dist/components/patterns/index.d.ts +0 -1
- package/dist/components/patterns/index.js +1 -2
- package/dist/components/patterns/public.cjs +1 -1
- package/dist/components/patterns/public.d.ts +0 -1
- package/dist/components/patterns/public.js +1 -2
- package/dist/components/ui/button/index.cjs +1 -1
- package/dist/components/ui/button/index.d.ts +3 -1
- package/dist/components/ui/button/index.js +7 -5
- package/dist/components/ui/checkbox/index.cjs +1 -1
- package/dist/components/ui/checkbox/index.d.ts +8 -0
- package/dist/components/ui/checkbox/index.js +16 -14
- package/dist/components/ui/collapse/index.cjs +1 -1
- package/dist/components/ui/collapse/index.d.ts +17 -3
- package/dist/components/ui/collapse/index.js +88 -33
- package/dist/components/ui/dialog/index.cjs +1 -1
- package/dist/components/ui/dialog/index.d.ts +2 -1
- package/dist/components/ui/dialog/index.js +6 -4
- package/dist/components/ui/dropdown-menu/index.cjs +1 -1
- package/dist/components/ui/dropdown-menu/index.d.ts +9 -4
- package/dist/components/ui/dropdown-menu/index.js +87 -62
- package/dist/index.cjs +1 -1
- package/dist/index.js +137 -156
- package/dist/public-component-surface.cjs +1 -1
- package/dist/public-component-surface.js +0 -15
- package/dist/showcase/component-api-schema.cjs +1 -1
- package/dist/showcase/component-api-schema.js +2 -2
- package/dist/showcase/create-demo.cjs +20 -34
- package/dist/showcase/create-demo.js +15 -16
- package/dist/showcase/fallback.cjs +3 -3
- package/dist/showcase/fallback.js +275 -265
- package/dist/showcase/premium/accordion/showcase.cjs +1 -1
- package/dist/showcase/premium/accordion/showcase.js +36 -5
- package/dist/showcase/premium/action-menu/showcase.cjs +1 -1
- package/dist/showcase/premium/action-menu/showcase.js +26 -8
- package/dist/showcase/premium/activity-feed/showcase.cjs +1 -1
- package/dist/showcase/premium/activity-feed/showcase.js +60 -36
- package/dist/showcase/premium/alert/showcase.cjs +1 -1
- package/dist/showcase/premium/alert/showcase.js +41 -18
- package/dist/showcase/premium/alert-dialog/showcase.cjs +1 -1
- package/dist/showcase/premium/alert-dialog/showcase.js +35 -7
- package/dist/showcase/premium/async-multi-select/mock.cjs +4 -3
- package/dist/showcase/premium/async-multi-select/mock.js +5 -5
- package/dist/showcase/premium/async-multi-select/showcase.cjs +1 -1
- package/dist/showcase/premium/async-multi-select/showcase.js +4 -3
- package/dist/showcase/premium/async-select/mock.cjs +1 -1
- package/dist/showcase/premium/async-select/mock.js +1 -1
- package/dist/showcase/premium/async-select/showcase.cjs +1 -1
- package/dist/showcase/premium/async-select/showcase.js +69 -22
- package/dist/showcase/premium/button/showcase.cjs +1 -1
- package/dist/showcase/premium/button/showcase.js +49 -3
- package/dist/showcase/premium/button-group/showcase.cjs +1 -1
- package/dist/showcase/premium/button-group/showcase.js +53 -29
- package/dist/showcase/premium/calendar/showcase.cjs +1 -1
- package/dist/showcase/premium/calendar/showcase.js +7 -2
- package/dist/showcase/premium/carousel/showcase.cjs +1 -1
- package/dist/showcase/premium/carousel/showcase.js +95 -47
- package/dist/showcase/premium/checkbox/showcase.cjs +1 -1
- package/dist/showcase/premium/checkbox/showcase.js +143 -67
- package/dist/showcase/premium/clearable-input/mock.cjs +4 -3
- package/dist/showcase/premium/clearable-input/mock.js +3 -2
- package/dist/showcase/premium/clearable-input/showcase.cjs +1 -1
- package/dist/showcase/premium/clearable-input/showcase.js +8 -2
- package/dist/showcase/premium/collapse/showcase.cjs +1 -1
- package/dist/showcase/premium/collapse/showcase.js +7 -0
- package/dist/showcase/premium/combobox/showcase.cjs +1 -1
- package/dist/showcase/premium/combobox/showcase.d.ts +2 -1
- package/dist/showcase/premium/combobox/showcase.js +56 -47
- package/dist/showcase/premium/data-table/showcase.cjs +1 -1
- package/dist/showcase/premium/data-table/showcase.js +138 -46
- package/dist/showcase/premium/data-table-parts/showcase.cjs +1 -1
- package/dist/showcase/premium/data-table-parts/showcase.js +13 -13
- package/dist/showcase/premium/date-input/mock.cjs +1 -1
- package/dist/showcase/premium/date-input/mock.js +1 -1
- package/dist/showcase/premium/date-range-picker/showcase.cjs +1 -1
- package/dist/showcase/premium/date-range-picker/showcase.js +32 -1
- package/dist/showcase/premium/dropdown-menu/showcase.cjs +1 -1
- package/dist/showcase/premium/dropdown-menu/showcase.js +88 -54
- package/dist/showcase/premium/form-wrapper/mock.cjs +41 -15
- package/dist/showcase/premium/form-wrapper/mock.js +4 -4
- package/dist/showcase/premium/form-wrapper/showcase.cjs +1 -1
- package/dist/showcase/premium/form-wrapper/showcase.js +77 -28
- package/dist/showcase/premium/index.cjs +1 -1
- package/dist/showcase/premium/index.js +426 -467
- package/dist/showcase/premium/input/mock.cjs +4 -1
- package/dist/showcase/premium/input/mock.js +1 -1
- package/dist/showcase/premium/masked-input/mock.cjs +1 -1
- package/dist/showcase/premium/masked-input/mock.js +1 -1
- package/dist/showcase/premium/money-input/mock.cjs +1 -1
- package/dist/showcase/premium/money-input/mock.js +1 -1
- package/dist/showcase/premium/number-input/mock.cjs +1 -1
- package/dist/showcase/premium/number-input/mock.js +1 -1
- package/dist/showcase/premium/phone-input/mock.cjs +1 -1
- package/dist/showcase/premium/phone-input/mock.js +1 -1
- package/dist/showcase/premium/quantity-input/mock.cjs +1 -1
- package/dist/showcase/premium/quantity-input/mock.js +1 -1
- package/dist/showcase/premium/simple-select/mock.cjs +1 -1
- package/dist/showcase/premium/simple-select/mock.js +1 -1
- package/dist/showcase/premium/simple-select/showcase.cjs +1 -1
- package/dist/showcase/premium/simple-select/showcase.js +4 -2
- package/dist/showcase/preview-catalog.cjs +7 -10
- package/dist/showcase/preview-catalog.js +7 -7
- package/dist/showcase/registry-quality.cjs +1 -1
- package/dist/showcase/registry-quality.js +0 -23
- package/dist/showcase/registry-specific.cjs +1 -1
- package/dist/showcase/registry-specific.js +149 -383
- package/dist/showcase/render-registry-preview.cjs +1 -1
- package/dist/showcase/render-registry-preview.js +163 -195
- package/dist/showcase/site-data.cjs +1 -1
- package/dist/showcase/site-data.js +197 -941
- package/dist/showcase/supplemental.cjs +1 -1
- package/dist/showcase/supplemental.js +1 -1
- package/dist/showcase/tembro-registry.json.cjs +1 -1
- package/dist/showcase/tembro-registry.json.js +33 -51
- package/package.json +1 -1
- package/packages/cli/dist/index.cjs +2 -2
- package/packages/cli/vendor/src/components/actions/action-menu.tsx +149 -83
- package/packages/cli/vendor/src/components/actions/button-group.tsx +141 -33
- package/packages/cli/vendor/src/components/actions/copy-button.tsx +21 -16
- package/packages/cli/vendor/src/components/calendar/calendar.tsx +223 -88
- package/packages/cli/vendor/src/components/calendar/date-picker.tsx +73 -29
- package/packages/cli/vendor/src/components/calendar/date-range-picker.tsx +154 -49
- package/packages/cli/vendor/src/components/data-table/data-table-toolbar.tsx +71 -50
- package/packages/cli/vendor/src/components/data-table/data-table.tsx +65 -53
- package/packages/cli/vendor/src/components/data-table/demo.tsx +2 -12
- package/packages/cli/vendor/src/components/data-table/public.ts +1 -6
- package/packages/cli/vendor/src/components/display/activity-feed.tsx +98 -40
- package/packages/cli/vendor/src/components/display/carousel.tsx +88 -2
- package/packages/cli/vendor/src/components/display/code-block.tsx +58 -26
- package/packages/cli/vendor/src/components/display/comparison-card.tsx +15 -41
- package/packages/cli/vendor/src/components/display/data-state.tsx +119 -50
- package/packages/cli/vendor/src/components/display/demo.tsx +0 -4
- package/packages/cli/vendor/src/components/display/index.ts +0 -3
- package/packages/cli/vendor/src/components/feedback/alert.tsx +86 -28
- package/packages/cli/vendor/src/components/feedback/index.ts +0 -2
- package/packages/cli/vendor/src/components/filters/demo.tsx +0 -1
- package/packages/cli/vendor/src/components/filters/filter-bar.tsx +126 -54
- package/packages/cli/vendor/src/components/filters/index.ts +0 -1
- package/packages/cli/vendor/src/components/form/form-field-shell.tsx +72 -34
- package/packages/cli/vendor/src/components/form/form-input.tsx +118 -11
- package/packages/cli/vendor/src/components/form/form-select.tsx +26 -3
- package/packages/cli/vendor/src/components/form/form-switch.tsx +77 -58
- package/packages/cli/vendor/src/components/form/form-textarea.tsx +65 -51
- package/packages/cli/vendor/src/components/form/public.ts +0 -9
- package/packages/cli/vendor/src/components/inputs/async-select.tsx +126 -82
- package/packages/cli/vendor/src/components/inputs/combobox.tsx +66 -9
- package/packages/cli/vendor/src/components/inputs/simple-select.tsx +52 -24
- package/packages/cli/vendor/src/components/layout/app-sidebar.tsx +42 -1
- package/packages/cli/vendor/src/components/layout/breadcrumbs.tsx +17 -8
- package/packages/cli/vendor/src/components/layout/stat-card.tsx +63 -23
- package/packages/cli/vendor/src/components/modern/calendar-scheduler.tsx +32 -22
- package/packages/cli/vendor/src/components/overlay/alert-dialog.tsx +148 -24
- package/packages/cli/vendor/src/components/overlay/drawer.tsx +42 -30
- package/packages/cli/vendor/src/components/patterns/index.ts +0 -1
- package/packages/cli/vendor/src/components/patterns/public.ts +0 -1
- package/packages/cli/vendor/src/components/ui/button/index.tsx +27 -17
- package/packages/cli/vendor/src/components/ui/checkbox/index.tsx +22 -5
- package/packages/cli/vendor/src/components/ui/collapse/index.tsx +97 -16
- package/packages/cli/vendor/src/components/ui/dialog/index.tsx +12 -8
- package/packages/cli/vendor/src/components/ui/dropdown-menu/index.tsx +82 -28
- package/packages/cli/vendor/src/public-component-surface.ts +0 -3
- package/packages/cli/vendor/src/showcase/component-api-schema.ts +2 -2
- package/packages/cli/vendor/src/showcase/create-demo.tsx +31 -46
- package/packages/cli/vendor/src/showcase/fallback.tsx +80 -99
- package/packages/cli/vendor/src/showcase/premium/accordion/showcase.tsx +32 -2
- package/packages/cli/vendor/src/showcase/premium/action-menu/showcase.tsx +12 -3
- package/packages/cli/vendor/src/showcase/premium/activity-feed/showcase.tsx +15 -2
- package/packages/cli/vendor/src/showcase/premium/alert/showcase.tsx +32 -17
- package/packages/cli/vendor/src/showcase/premium/alert-dialog/showcase.tsx +28 -3
- package/packages/cli/vendor/src/showcase/premium/async-multi-select/mock.ts +6 -5
- package/packages/cli/vendor/src/showcase/premium/async-multi-select/showcase.tsx +5 -4
- package/packages/cli/vendor/src/showcase/premium/async-select/mock.ts +1 -1
- package/packages/cli/vendor/src/showcase/premium/async-select/showcase.tsx +36 -0
- package/packages/cli/vendor/src/showcase/premium/button/showcase.tsx +26 -5
- package/packages/cli/vendor/src/showcase/premium/button-group/showcase.tsx +20 -3
- package/packages/cli/vendor/src/showcase/premium/calendar/showcase.tsx +5 -0
- package/packages/cli/vendor/src/showcase/premium/carousel/showcase.tsx +33 -5
- package/packages/cli/vendor/src/showcase/premium/checkbox/showcase.tsx +46 -3
- package/packages/cli/vendor/src/showcase/premium/clearable-input/mock.ts +5 -3
- package/packages/cli/vendor/src/showcase/premium/clearable-input/showcase.tsx +5 -2
- package/packages/cli/vendor/src/showcase/premium/collapse/showcase.tsx +4 -0
- package/packages/cli/vendor/src/showcase/premium/combobox/showcase.tsx +8 -0
- package/packages/cli/vendor/src/showcase/premium/data-table/showcase.tsx +77 -27
- package/packages/cli/vendor/src/showcase/premium/data-table-parts/showcase.tsx +11 -11
- package/packages/cli/vendor/src/showcase/premium/date-input/mock.ts +1 -1
- package/packages/cli/vendor/src/showcase/premium/date-range-picker/showcase.tsx +7 -0
- package/packages/cli/vendor/src/showcase/premium/dropdown-menu/showcase.tsx +46 -3
- package/packages/cli/vendor/src/showcase/premium/form-wrapper/mock.ts +70 -44
- package/packages/cli/vendor/src/showcase/premium/form-wrapper/showcase.tsx +129 -12
- package/packages/cli/vendor/src/showcase/premium/index.ts +7 -24
- package/packages/cli/vendor/src/showcase/premium/input/mock.ts +2 -2
- package/packages/cli/vendor/src/showcase/premium/masked-input/mock.ts +1 -1
- package/packages/cli/vendor/src/showcase/premium/money-input/mock.ts +1 -1
- package/packages/cli/vendor/src/showcase/premium/number-input/mock.ts +1 -1
- package/packages/cli/vendor/src/showcase/premium/phone-input/mock.ts +1 -1
- package/packages/cli/vendor/src/showcase/premium/quantity-input/mock.ts +1 -1
- package/packages/cli/vendor/src/showcase/premium/simple-select/mock.ts +1 -1
- package/packages/cli/vendor/src/showcase/premium/simple-select/showcase.tsx +2 -1
- package/packages/cli/vendor/src/showcase/preview-catalog.tsx +7 -7
- package/packages/cli/vendor/src/showcase/registry-quality.ts +4 -28
- package/packages/cli/vendor/src/showcase/registry-specific.tsx +3 -178
- package/packages/cli/vendor/src/showcase/render-registry-preview.tsx +18 -51
- package/packages/cli/vendor/src/showcase/site-data.tsx +2443 -2761
- package/packages/cli/vendor/src/showcase/supplemental.tsx +2 -42
- package/packages/cli/vendor/src/showcase/tembro-registry.json +11 -58
- package/registry.json +11 -61
- package/dist/components/display/entity-card.cjs +0 -1
- package/dist/components/display/entity-card.d.ts +0 -18
- package/dist/components/display/entity-card.js +0 -61
- package/dist/components/display/entity-header.cjs +0 -1
- package/dist/components/display/entity-header.d.ts +0 -13
- package/dist/components/display/entity-header.js +0 -52
- package/dist/components/display/file-card.cjs +0 -1
- package/dist/components/display/file-card.d.ts +0 -14
- package/dist/components/display/file-card.js +0 -59
- package/dist/components/feedback/empty-search-state.cjs +0 -1
- package/dist/components/feedback/empty-search-state.d.ts +0 -11
- package/dist/components/feedback/empty-search-state.js +0 -45
- package/dist/components/feedback/empty-state.cjs +0 -1
- package/dist/components/feedback/empty-state.d.ts +0 -11
- package/dist/components/feedback/empty-state.js +0 -38
- package/dist/components/filters/filter-chips.cjs +0 -1
- package/dist/components/filters/filter-chips.d.ts +0 -18
- package/dist/components/filters/filter-chips.js +0 -61
- package/dist/components/patterns/form-builder-presets.cjs +0 -1
- package/dist/components/patterns/form-builder-presets.d.ts +0 -1
- package/dist/components/patterns/form-builder-presets.js +0 -2
- package/dist/components/patterns/form-builder.cjs +0 -1
- package/dist/components/patterns/form-builder.d.ts +0 -109
- package/dist/components/patterns/form-builder.js +0 -263
- package/dist/showcase/premium/empty-state/index.cjs +0 -1
- package/dist/showcase/premium/empty-state/index.d.ts +0 -2
- package/dist/showcase/premium/empty-state/index.js +0 -3
- package/dist/showcase/premium/empty-state/mock.cjs +0 -14
- package/dist/showcase/premium/empty-state/mock.d.ts +0 -2
- package/dist/showcase/premium/empty-state/mock.js +0 -31
- package/dist/showcase/premium/empty-state/showcase.cjs +0 -1
- package/dist/showcase/premium/empty-state/showcase.d.ts +0 -3
- package/dist/showcase/premium/empty-state/showcase.js +0 -99
- package/dist/showcase/premium/form-builder/index.cjs +0 -1
- package/dist/showcase/premium/form-builder/index.d.ts +0 -2
- package/dist/showcase/premium/form-builder/index.js +0 -3
- package/dist/showcase/premium/form-builder/mock.cjs +0 -57
- package/dist/showcase/premium/form-builder/mock.d.ts +0 -2
- package/dist/showcase/premium/form-builder/mock.js +0 -40
- package/dist/showcase/premium/form-builder/showcase.cjs +0 -1
- package/dist/showcase/premium/form-builder/showcase.d.ts +0 -3
- package/dist/showcase/premium/form-builder/showcase.js +0 -69
- package/packages/cli/vendor/src/components/display/entity-card.tsx +0 -80
- package/packages/cli/vendor/src/components/display/entity-header.tsx +0 -80
- package/packages/cli/vendor/src/components/display/file-card.tsx +0 -61
- package/packages/cli/vendor/src/components/feedback/empty-search-state.tsx +0 -65
- package/packages/cli/vendor/src/components/feedback/empty-state.tsx +0 -56
- package/packages/cli/vendor/src/components/filters/filter-chips.tsx +0 -89
- package/packages/cli/vendor/src/components/patterns/form-builder-presets.ts +0 -13
- package/packages/cli/vendor/src/components/patterns/form-builder.tsx +0 -443
- package/packages/cli/vendor/src/showcase/premium/empty-state/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/empty-state/mock.ts +0 -30
- package/packages/cli/vendor/src/showcase/premium/empty-state/showcase.tsx +0 -65
- package/packages/cli/vendor/src/showcase/premium/form-builder/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/form-builder/mock.ts +0 -79
- package/packages/cli/vendor/src/showcase/premium/form-builder/showcase.tsx +0 -55
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/button/index.cjs"),r=require("../ui/dropdown-menu/index.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("lucide-react"),o=require("react/jsx-runtime");function s({actions:e,label:s,trigger:c,align:l=`end`,side:u=`bottom`,sideOffset:d=4,disabled:f=!1,
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/button/index.cjs"),r=require("../ui/dropdown-menu/index.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("lucide-react"),o=require("react/jsx-runtime");function s({actions:e,label:s,trigger:c,align:l=`end`,side:u=`bottom`,sideOffset:d=4,disabled:f=!1,triggerVariant:p=`ghost`,triggerSize:m=`icon-sm`,showChevron:h=!1,closeOnSelect:g=!0,contentClassName:_,triggerClassName:v,itemClassName:y,emptyLabel:b=`No actions`,menuWidth:x,loadingLabel:S=`Working...`,persistIconSpace:C=!0}){let w=e.filter(e=>!e.hidden),[T,E]=i.useState(null),[D,O]=i.useState(!1),k=i.useRef(null),A=async e=>{if(!(e.disabled||e.loading||T))try{E(e.key),await e.onSelect?.(),g&&!e.keepOpen&&O(!1)}finally{E(null)}},j=e=>{k.current!==e.key&&(k.current=e.key,queueMicrotask(()=>{k.current===e.key&&(k.current=null)}),A(e))};return(0,o.jsxs)(r.DropdownMenu,{open:D,onOpenChange:O,children:[(0,o.jsxs)(r.DropdownMenuTrigger,{render:c??(0,o.jsx)(n.Button,{type:`button`,variant:p,size:m,disabled:f,className:t.cn(`rounded-full border border-transparent text-muted-foreground shadow-none transition-[background-color,border-color,color,box-shadow] hover:border-border/70 hover:bg-accent hover:text-foreground focus-visible:border-[color:var(--aui-focus-ring,var(--ring))] focus-visible:shadow-[0_0_0_3px_var(--aui-focus-ring-soft,transparent)]`,v),onMouseDown:t.stopInteractivePropagation,onDoubleClick:t.stopInteractivePropagation}),children:[!c&&(0,o.jsx)(a.MoreHorizontalIcon,{}),!c&&h&&(0,o.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-[0.18em]`,children:`Menu`}),(0,o.jsx)(`span`,{className:`sr-only`,children:`Open actions`})]}),(0,o.jsxs)(r.DropdownMenuContent,{align:l,side:u,sideOffset:d,className:t.cn(`min-w-48 rounded-[var(--aui-card-radius,var(--radius-lg))]`,_),style:x?{width:typeof x==`number`?`${x}px`:x}:void 0,children:[s&&(0,o.jsx)(r.DropdownMenuLabel,{children:s}),s&&w.length>0&&(0,o.jsx)(r.DropdownMenuSeparator,{}),w.length===0&&(0,o.jsx)(r.DropdownMenuItem,{disabled:!0,children:b}),w.map((e,n)=>{let s=e.loading||T===e.key,c=n>0?w[n-1]?.section:void 0,l=!!(e.section&&e.section!==c);return(0,o.jsxs)(i.Fragment,{children:[l?(0,o.jsxs)(o.Fragment,{children:[n>0?(0,o.jsx)(r.DropdownMenuSeparator,{}):null,(0,o.jsx)(r.DropdownMenuLabel,{children:e.section})]}):null,(0,o.jsxs)(r.DropdownMenuItem,{disabled:e.disabled||s,variant:e.destructive?`destructive`:`default`,closeOnSelect:g&&!e.keepOpen,className:t.cn(`min-h-11 items-start gap-3 rounded-[calc(var(--radius-md)+1px)] border border-transparent py-2.5 transition-[background-color,color,border-color,box-shadow] data-[highlighted]:shadow-[inset_0_0_0_1px_color-mix(in_oklch,var(--primary),transparent_76%)] data-[disabled]:opacity-45`,y),onSelect:n=>{(e.keepOpen||!g)&&n.preventDefault(),t.stopInteractivePropagation(n),j(e)},onClick:n=>{t.stopInteractivePropagation(n),j(e)},onMouseDown:t.stopInteractivePropagation,onDoubleClick:t.stopInteractivePropagation,children:[(0,o.jsx)(`span`,{className:t.cn(`mt-0.5 flex size-5 shrink-0 items-center justify-center text-muted-foreground`,!C&&!s&&!e.icon&&`hidden`),children:s?(0,o.jsx)(a.Loader2Icon,{className:`size-4 animate-spin`}):e.icon}),(0,o.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,o.jsx)(`span`,{className:`block truncate`,children:e.label}),e.description?(0,o.jsx)(r.DropdownMenuItemDescription,{className:`mt-0.5 truncate`,children:s?S:e.description}):null]}),e.shortcut&&(0,o.jsx)(r.DropdownMenuShortcut,{children:e.shortcut})]})]},e.key)})]})]})}exports.ActionMenu=s;
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
|
+
import { Button } from "@/components/ui/button";
|
|
2
3
|
export type ActionMenuItem = {
|
|
3
4
|
key: string;
|
|
4
5
|
label: React.ReactNode;
|
|
6
|
+
section?: React.ReactNode;
|
|
7
|
+
description?: React.ReactNode;
|
|
5
8
|
icon?: React.ReactNode;
|
|
6
9
|
shortcut?: React.ReactNode;
|
|
7
10
|
disabled?: boolean;
|
|
8
11
|
loading?: boolean;
|
|
9
12
|
destructive?: boolean;
|
|
10
13
|
hidden?: boolean;
|
|
14
|
+
keepOpen?: boolean;
|
|
11
15
|
onSelect?: () => void | Promise<void>;
|
|
12
16
|
};
|
|
13
17
|
export type ActionMenuProps = {
|
|
@@ -18,9 +22,17 @@ export type ActionMenuProps = {
|
|
|
18
22
|
side?: "top" | "right" | "bottom" | "left";
|
|
19
23
|
sideOffset?: number;
|
|
20
24
|
disabled?: boolean;
|
|
25
|
+
triggerVariant?: React.ComponentProps<typeof Button>["variant"];
|
|
26
|
+
triggerSize?: React.ComponentProps<typeof Button>["size"];
|
|
27
|
+
showChevron?: boolean;
|
|
28
|
+
closeOnSelect?: boolean;
|
|
21
29
|
contentClassName?: string;
|
|
22
30
|
triggerClassName?: string;
|
|
31
|
+
itemClassName?: string;
|
|
23
32
|
emptyLabel?: React.ReactNode;
|
|
33
|
+
menuWidth?: number | string;
|
|
34
|
+
loadingLabel?: React.ReactNode;
|
|
35
|
+
persistIconSpace?: boolean;
|
|
24
36
|
};
|
|
25
|
-
declare function ActionMenu({ actions, label, trigger, align, side, sideOffset, disabled, contentClassName, triggerClassName, emptyLabel, }: ActionMenuProps): React.JSX.Element;
|
|
37
|
+
declare function ActionMenu({ actions, label, trigger, align, side, sideOffset, disabled, triggerVariant, triggerSize, showChevron, closeOnSelect, contentClassName, triggerClassName, itemClassName, emptyLabel, menuWidth, loadingLabel, persistIconSpace, }: ActionMenuProps): React.JSX.Element;
|
|
26
38
|
export { ActionMenu };
|
|
@@ -1,70 +1,96 @@
|
|
|
1
1
|
import { cn as e, stopInteractivePropagation as t } from "../../lib/utils.js";
|
|
2
2
|
import { Button as n } from "../ui/button/index.js";
|
|
3
|
-
import { DropdownMenu as r, DropdownMenuContent as i, DropdownMenuItem as a,
|
|
4
|
-
import * as
|
|
5
|
-
import { Loader2Icon as
|
|
6
|
-
import { jsx as
|
|
3
|
+
import { DropdownMenu as r, DropdownMenuContent as i, DropdownMenuItem as a, DropdownMenuItemDescription as o, DropdownMenuLabel as s, DropdownMenuSeparator as c, DropdownMenuShortcut as l, DropdownMenuTrigger as u } from "../ui/dropdown-menu/index.js";
|
|
4
|
+
import * as d from "react";
|
|
5
|
+
import { Loader2Icon as f, MoreHorizontalIcon as p } from "lucide-react";
|
|
6
|
+
import { Fragment as m, jsx as h, jsxs as g } from "react/jsx-runtime";
|
|
7
7
|
//#region src/components/actions/action-menu.tsx
|
|
8
|
-
function
|
|
9
|
-
let
|
|
10
|
-
if (!(e.disabled || e.loading ||
|
|
11
|
-
|
|
8
|
+
function _({ actions: _, label: v, trigger: y, align: b = "end", side: x = "bottom", sideOffset: S = 4, disabled: C = !1, triggerVariant: w = "ghost", triggerSize: T = "icon-sm", showChevron: E = !1, closeOnSelect: D = !0, contentClassName: O, triggerClassName: k, itemClassName: A, emptyLabel: j = "No actions", menuWidth: M, loadingLabel: N = "Working...", persistIconSpace: P = !0 }) {
|
|
9
|
+
let F = _.filter((e) => !e.hidden), [I, L] = d.useState(null), [R, z] = d.useState(!1), B = d.useRef(null), V = async (e) => {
|
|
10
|
+
if (!(e.disabled || e.loading || I)) try {
|
|
11
|
+
L(e.key), await e.onSelect?.(), D && !e.keepOpen && z(!1);
|
|
12
12
|
} finally {
|
|
13
|
-
|
|
13
|
+
L(null);
|
|
14
14
|
}
|
|
15
|
+
}, H = (e) => {
|
|
16
|
+
B.current !== e.key && (B.current = e.key, queueMicrotask(() => {
|
|
17
|
+
B.current === e.key && (B.current = null);
|
|
18
|
+
}), V(e));
|
|
15
19
|
};
|
|
16
|
-
return /* @__PURE__ */
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
className: "sr-only",
|
|
29
|
-
children: "Open actions"
|
|
30
|
-
})]
|
|
31
|
-
}), /* @__PURE__ */ p(i, {
|
|
32
|
-
align: _,
|
|
33
|
-
side: v,
|
|
34
|
-
sideOffset: y,
|
|
35
|
-
className: e("min-w-40", x),
|
|
36
|
-
children: [
|
|
37
|
-
h && /* @__PURE__ */ f(o, { children: h }),
|
|
38
|
-
h && w.length > 0 && /* @__PURE__ */ f(s, {}),
|
|
39
|
-
w.length === 0 && /* @__PURE__ */ f(a, {
|
|
40
|
-
disabled: !0,
|
|
41
|
-
children: C
|
|
20
|
+
return /* @__PURE__ */ g(r, {
|
|
21
|
+
open: R,
|
|
22
|
+
onOpenChange: z,
|
|
23
|
+
children: [/* @__PURE__ */ g(u, {
|
|
24
|
+
render: y ?? /* @__PURE__ */ h(n, {
|
|
25
|
+
type: "button",
|
|
26
|
+
variant: w,
|
|
27
|
+
size: T,
|
|
28
|
+
disabled: C,
|
|
29
|
+
className: e("rounded-full border border-transparent text-muted-foreground shadow-none transition-[background-color,border-color,color,box-shadow] hover:border-border/70 hover:bg-accent hover:text-foreground focus-visible:border-[color:var(--aui-focus-ring,var(--ring))] focus-visible:shadow-[0_0_0_3px_var(--aui-focus-ring-soft,transparent)]", k),
|
|
30
|
+
onMouseDown: t,
|
|
31
|
+
onDoubleClick: t
|
|
42
32
|
}),
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
33
|
+
children: [
|
|
34
|
+
!y && /* @__PURE__ */ h(p, {}),
|
|
35
|
+
!y && E && /* @__PURE__ */ h("span", {
|
|
36
|
+
className: "text-[10px] font-medium uppercase tracking-[0.18em]",
|
|
37
|
+
children: "Menu"
|
|
38
|
+
}),
|
|
39
|
+
/* @__PURE__ */ h("span", {
|
|
40
|
+
className: "sr-only",
|
|
41
|
+
children: "Open actions"
|
|
42
|
+
})
|
|
43
|
+
]
|
|
44
|
+
}), /* @__PURE__ */ g(i, {
|
|
45
|
+
align: b,
|
|
46
|
+
side: x,
|
|
47
|
+
sideOffset: S,
|
|
48
|
+
className: e("min-w-48 rounded-[var(--aui-card-radius,var(--radius-lg))]", O),
|
|
49
|
+
style: M ? { width: typeof M == "number" ? `${M}px` : M } : void 0,
|
|
50
|
+
children: [
|
|
51
|
+
v && /* @__PURE__ */ h(s, { children: v }),
|
|
52
|
+
v && F.length > 0 && /* @__PURE__ */ h(c, {}),
|
|
53
|
+
F.length === 0 && /* @__PURE__ */ h(a, {
|
|
54
|
+
disabled: !0,
|
|
55
|
+
children: j
|
|
56
|
+
}),
|
|
57
|
+
F.map((n, r) => {
|
|
58
|
+
let i = n.loading || I === n.key, u = r > 0 ? F[r - 1]?.section : void 0, p = !!(n.section && n.section !== u);
|
|
59
|
+
return /* @__PURE__ */ g(d.Fragment, { children: [p ? /* @__PURE__ */ g(m, { children: [r > 0 ? /* @__PURE__ */ h(c, {}) : null, /* @__PURE__ */ h(s, { children: n.section })] }) : null, /* @__PURE__ */ g(a, {
|
|
60
|
+
disabled: n.disabled || i,
|
|
61
|
+
variant: n.destructive ? "destructive" : "default",
|
|
62
|
+
closeOnSelect: D && !n.keepOpen,
|
|
63
|
+
className: e("min-h-11 items-start gap-3 rounded-[calc(var(--radius-md)+1px)] border border-transparent py-2.5 transition-[background-color,color,border-color,box-shadow] data-[highlighted]:shadow-[inset_0_0_0_1px_color-mix(in_oklch,var(--primary),transparent_76%)] data-[disabled]:opacity-45", A),
|
|
64
|
+
onSelect: (e) => {
|
|
65
|
+
(n.keepOpen || !D) && e.preventDefault(), t(e), H(n);
|
|
66
|
+
},
|
|
67
|
+
onClick: (e) => {
|
|
68
|
+
t(e), H(n);
|
|
69
|
+
},
|
|
70
|
+
onMouseDown: t,
|
|
71
|
+
onDoubleClick: t,
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ h("span", {
|
|
74
|
+
className: e("mt-0.5 flex size-5 shrink-0 items-center justify-center text-muted-foreground", !P && !i && !n.icon && "hidden"),
|
|
75
|
+
children: i ? /* @__PURE__ */ h(f, { className: "size-4 animate-spin" }) : n.icon
|
|
76
|
+
}),
|
|
77
|
+
/* @__PURE__ */ g("span", {
|
|
78
|
+
className: "min-w-0 flex-1",
|
|
79
|
+
children: [/* @__PURE__ */ h("span", {
|
|
80
|
+
className: "block truncate",
|
|
81
|
+
children: n.label
|
|
82
|
+
}), n.description ? /* @__PURE__ */ h(o, {
|
|
83
|
+
className: "mt-0.5 truncate",
|
|
84
|
+
children: i ? N : n.description
|
|
85
|
+
}) : null]
|
|
86
|
+
}),
|
|
87
|
+
n.shortcut && /* @__PURE__ */ h(l, { children: n.shortcut })
|
|
88
|
+
]
|
|
89
|
+
})] }, n.key);
|
|
90
|
+
})
|
|
91
|
+
]
|
|
92
|
+
})]
|
|
93
|
+
});
|
|
68
94
|
}
|
|
69
95
|
//#endregion
|
|
70
|
-
export {
|
|
96
|
+
export { _ as ActionMenu };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/button/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime");function a({items:e,attached:
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/button/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime");function a({items:e,attached:a=!0,size:o=`sm`,variant:s=`outline`,activeVariant:c=`default`,orientation:l=`horizontal`,fullWidth:u=!1,allowDeselect:d=!1,value:f,defaultValue:p,onValueChange:m,className:h,children:g,..._}){let v=l===`vertical`,y=f!==void 0,[b,x]=r.useState(p),S=y?f:b,C=r.useId(),w=r.useRef([]),T=e=>{let t=d&&S===e?``:e;y||x(t),m?.(t)};return(0,i.jsxs)(`div`,{"data-slot":`button-group`,role:`group`,"data-orientation":l,"aria-orientation":l,className:t.cn(`inline-flex`,v?`flex-col`:`items-center`,u&&`w-full`,a?`overflow-hidden rounded-[var(--aui-control-radius,var(--radius-md))] border border-[color:var(--aui-control-border,var(--border))] bg-[color:var(--aui-control-surface,var(--background))] shadow-[var(--aui-control-shadow,none)]`:`gap-2`,h),..._,children:[e?.map(({key:r,label:l,description:d,className:f,size:p,variant:m,onClick:h,"aria-label":g,..._},y)=>{let b=S===r,x=d?`${C}-${r}-description`:void 0;return(0,i.jsx)(n.Button,{ref:e=>{w.current[y]=e},size:p??o,variant:m??(b?c:s),"aria-label":g??(d&&typeof l==`string`?l:void 0),"aria-pressed":b||void 0,"aria-describedby":x,tabIndex:b||!S&&y===0?0:-1,"data-selected":b||void 0,className:t.cn(a&&t.cn(`relative rounded-none border-0 shadow-none first:ml-0 data-[selected=true]:shadow-none`,u&&`flex-1`,v?`w-full border-t border-[color:var(--aui-control-border,var(--border))] first:border-t-0`:`border-l border-[color:var(--aui-control-border,var(--border))] first:border-l-0`),d&&`h-auto min-h-9 py-2`,f),onClick:e=>{T(r),h?.(e)},onKeyDown:t=>{let n=e?.length??0;if(!n)return;let r=e=>{let t=(e+n)%n;w.current[t]?.focus()};t.key===`ArrowRight`&&!v?(t.preventDefault(),r(y+1)):t.key===`ArrowLeft`&&!v?(t.preventDefault(),r(y-1)):t.key===`ArrowDown`&&v?(t.preventDefault(),r(y+1)):t.key===`ArrowUp`&&v?(t.preventDefault(),r(y-1)):t.key===`Home`?(t.preventDefault(),r(0)):t.key===`End`&&(t.preventDefault(),r(n-1))},..._,children:d?(0,i.jsxs)(`span`,{className:`flex min-w-0 flex-col items-start text-left`,children:[(0,i.jsx)(`span`,{children:l}),(0,i.jsx)(`span`,{"aria-hidden":`true`,className:`truncate text-[11px] font-medium opacity-80`,children:d}),(0,i.jsx)(`span`,{id:x,className:`sr-only`,children:d})]}):l},r)}),g]})}exports.ButtonGroup=a;
|
|
@@ -4,12 +4,20 @@ type ButtonProps = React.ComponentProps<typeof Button>;
|
|
|
4
4
|
export type ButtonGroupItem = Omit<ButtonProps, "children"> & {
|
|
5
5
|
key: string;
|
|
6
6
|
label: React.ReactNode;
|
|
7
|
+
description?: React.ReactNode;
|
|
7
8
|
};
|
|
8
9
|
export type ButtonGroupProps = React.ComponentProps<"div"> & {
|
|
9
10
|
items?: ButtonGroupItem[];
|
|
10
11
|
attached?: boolean;
|
|
11
12
|
size?: ButtonProps["size"];
|
|
12
13
|
variant?: ButtonProps["variant"];
|
|
14
|
+
activeVariant?: ButtonProps["variant"];
|
|
15
|
+
orientation?: "horizontal" | "vertical";
|
|
16
|
+
fullWidth?: boolean;
|
|
17
|
+
allowDeselect?: boolean;
|
|
18
|
+
value?: string;
|
|
19
|
+
defaultValue?: string;
|
|
20
|
+
onValueChange?: (value: string) => void;
|
|
13
21
|
};
|
|
14
|
-
declare function ButtonGroup({ items, attached, size, variant, className, children, ...props }: ButtonGroupProps): React.JSX.Element;
|
|
22
|
+
declare function ButtonGroup({ items, attached, size, variant, activeVariant, orientation, fullWidth, allowDeselect, value, defaultValue, onValueChange, className, children, ...props }: ButtonGroupProps): React.JSX.Element;
|
|
15
23
|
export { ButtonGroup };
|
|
@@ -1,22 +1,66 @@
|
|
|
1
1
|
import { cn as e } from "../../lib/utils.js";
|
|
2
2
|
import { Button as t } from "../ui/button/index.js";
|
|
3
|
-
import "react";
|
|
4
|
-
import { jsx as
|
|
3
|
+
import * as n from "react";
|
|
4
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/actions/button-group.tsx
|
|
6
|
-
function
|
|
7
|
-
|
|
6
|
+
function a({ items: a, attached: o = !0, size: s = "sm", variant: c = "outline", activeVariant: l = "default", orientation: u = "horizontal", fullWidth: d = !1, allowDeselect: f = !1, value: p, defaultValue: m, onValueChange: h, className: g, children: _, ...v }) {
|
|
7
|
+
let y = u === "vertical", b = p !== void 0, [x, S] = n.useState(m), C = b ? p : x, w = n.useId(), T = n.useRef([]), E = (e) => {
|
|
8
|
+
let t = f && C === e ? "" : e;
|
|
9
|
+
b || S(t), h?.(t);
|
|
10
|
+
};
|
|
11
|
+
return /* @__PURE__ */ i("div", {
|
|
8
12
|
"data-slot": "button-group",
|
|
9
13
|
role: "group",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
14
|
+
"data-orientation": u,
|
|
15
|
+
"aria-orientation": u,
|
|
16
|
+
className: e("inline-flex", y ? "flex-col" : "items-center", d && "w-full", o ? "overflow-hidden rounded-[var(--aui-control-radius,var(--radius-md))] border border-[color:var(--aui-control-border,var(--border))] bg-[color:var(--aui-control-surface,var(--background))] shadow-[var(--aui-control-shadow,none)]" : "gap-2", g),
|
|
17
|
+
...v,
|
|
18
|
+
children: [a?.map(({ key: n, label: u, description: f, className: p, size: m, variant: h, onClick: g, "aria-label": _, ...v }, b) => {
|
|
19
|
+
let x = C === n, S = f ? `${w}-${n}-description` : void 0;
|
|
20
|
+
return /* @__PURE__ */ r(t, {
|
|
21
|
+
ref: (e) => {
|
|
22
|
+
T.current[b] = e;
|
|
23
|
+
},
|
|
24
|
+
size: m ?? s,
|
|
25
|
+
variant: h ?? (x ? l : c),
|
|
26
|
+
"aria-label": _ ?? (f && typeof u == "string" ? u : void 0),
|
|
27
|
+
"aria-pressed": x || void 0,
|
|
28
|
+
"aria-describedby": S,
|
|
29
|
+
tabIndex: x || !C && b === 0 ? 0 : -1,
|
|
30
|
+
"data-selected": x || void 0,
|
|
31
|
+
className: e(o && e("relative rounded-none border-0 shadow-none first:ml-0 data-[selected=true]:shadow-none", d && "flex-1", y ? "w-full border-t border-[color:var(--aui-control-border,var(--border))] first:border-t-0" : "border-l border-[color:var(--aui-control-border,var(--border))] first:border-l-0"), f && "h-auto min-h-9 py-2", p),
|
|
32
|
+
onClick: (e) => {
|
|
33
|
+
E(n), g?.(e);
|
|
34
|
+
},
|
|
35
|
+
onKeyDown: (e) => {
|
|
36
|
+
let t = a?.length ?? 0;
|
|
37
|
+
if (!t) return;
|
|
38
|
+
let n = (e) => {
|
|
39
|
+
let n = (e + t) % t;
|
|
40
|
+
T.current[n]?.focus();
|
|
41
|
+
};
|
|
42
|
+
e.key === "ArrowRight" && !y ? (e.preventDefault(), n(b + 1)) : e.key === "ArrowLeft" && !y ? (e.preventDefault(), n(b - 1)) : e.key === "ArrowDown" && y ? (e.preventDefault(), n(b + 1)) : e.key === "ArrowUp" && y ? (e.preventDefault(), n(b - 1)) : e.key === "Home" ? (e.preventDefault(), n(0)) : e.key === "End" && (e.preventDefault(), n(t - 1));
|
|
43
|
+
},
|
|
44
|
+
...v,
|
|
45
|
+
children: f ? /* @__PURE__ */ i("span", {
|
|
46
|
+
className: "flex min-w-0 flex-col items-start text-left",
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ r("span", { children: u }),
|
|
49
|
+
/* @__PURE__ */ r("span", {
|
|
50
|
+
"aria-hidden": "true",
|
|
51
|
+
className: "truncate text-[11px] font-medium opacity-80",
|
|
52
|
+
children: f
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ r("span", {
|
|
55
|
+
id: S,
|
|
56
|
+
className: "sr-only",
|
|
57
|
+
children: f
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
}) : u
|
|
61
|
+
}, n);
|
|
62
|
+
}), _]
|
|
19
63
|
});
|
|
20
64
|
}
|
|
21
65
|
//#endregion
|
|
22
|
-
export {
|
|
66
|
+
export { a as ButtonGroup };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/button/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("lucide-react"),a=require("react/jsx-runtime");async function o(e){if(typeof navigator<`u`&&navigator.clipboard?.writeText){await navigator.clipboard.writeText(e);return}if(typeof document>`u`)throw Error(`Clipboard is not available`);let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.left=`-9999px`,document.body.appendChild(t),t.select();try{document.execCommand(`copy`)}finally{document.body.removeChild(t)}}function s({value:e,copiedLabel:s=`Copied`,copyLabel:c=`Copy`,copiedTimeout:l=1600,onCopied:u,onCopyError:d,showIcon:f=!0,
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/button/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("lucide-react"),a=require("react/jsx-runtime");async function o(e){if(typeof navigator<`u`&&navigator.clipboard?.writeText){await navigator.clipboard.writeText(e);return}if(typeof document>`u`)throw Error(`Clipboard is not available`);let t=document.createElement(`textarea`);t.value=e,t.setAttribute(`readonly`,``),t.style.position=`fixed`,t.style.left=`-9999px`,document.body.appendChild(t),t.select();try{document.execCommand(`copy`)}finally{document.body.removeChild(t)}}function s({value:e,copiedLabel:s=`Copied`,copyLabel:c=`Copy`,copiedTimeout:l=1600,onCopied:u,onCopyError:d,showIcon:f=!0,copiedVariant:p,variant:m,disabled:h,children:g,type:_=`button`,...v}){let[y,b]=r.useState(!1),x=r.useRef(void 0);r.useEffect(()=>()=>{x.current&&window.clearTimeout(x.current)},[]);let S=r.useCallback(async()=>{try{await o(e),b(!0),u?.(e),x.current&&window.clearTimeout(x.current),x.current=window.setTimeout(()=>b(!1),l)}catch(e){d?.(e)}},[l,u,d,e]);return(0,a.jsxs)(n.Button,{"data-slot":`copy-button`,"data-copied":y||void 0,type:_,variant:y?p??`secondary`:m,disabled:h||!e,onClick:e=>{t.stopInteractivePropagation(e),S()},onMouseDown:t.stopInteractivePropagation,onDoubleClick:t.stopInteractivePropagation,"aria-live":`polite`,...v,children:[f&&(y?(0,a.jsx)(i.CheckIcon,{"data-icon":`inline-start`}):(0,a.jsx)(i.CopyIcon,{"data-icon":`inline-start`})),g??(y?s:c)]})}exports.CopyButton=s;
|
|
@@ -8,6 +8,7 @@ export type CopyButtonProps = Omit<React.ComponentProps<typeof Button>, "onClick
|
|
|
8
8
|
onCopied?: (value: string) => void;
|
|
9
9
|
onCopyError?: (error: unknown) => void;
|
|
10
10
|
showIcon?: boolean;
|
|
11
|
+
copiedVariant?: React.ComponentProps<typeof Button>["variant"];
|
|
11
12
|
};
|
|
12
|
-
declare function CopyButton({ value, copiedLabel, copyLabel, copiedTimeout, onCopied, onCopyError, showIcon, disabled, children, type, ...props }: CopyButtonProps): React.JSX.Element;
|
|
13
|
+
declare function CopyButton({ value, copiedLabel, copyLabel, copiedTimeout, onCopied, onCopyError, showIcon, copiedVariant, variant, disabled, children, type, ...props }: CopyButtonProps): React.JSX.Element;
|
|
13
14
|
export { CopyButton };
|
|
@@ -18,14 +18,14 @@ async function s(e) {
|
|
|
18
18
|
document.body.removeChild(t);
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
|
-
function c({ value: c, copiedLabel: l = "Copied", copyLabel: u = "Copy", copiedTimeout: d = 1600, onCopied: f, onCopyError: p, showIcon: m = !0,
|
|
22
|
-
let [
|
|
21
|
+
function c({ value: c, copiedLabel: l = "Copied", copyLabel: u = "Copy", copiedTimeout: d = 1600, onCopied: f, onCopyError: p, showIcon: m = !0, copiedVariant: h, variant: g, disabled: _, children: v, type: y = "button", ...b }) {
|
|
22
|
+
let [x, S] = n.useState(!1), C = n.useRef(void 0);
|
|
23
23
|
n.useEffect(() => () => {
|
|
24
|
-
|
|
24
|
+
C.current && window.clearTimeout(C.current);
|
|
25
25
|
}, []);
|
|
26
|
-
let
|
|
26
|
+
let w = n.useCallback(async () => {
|
|
27
27
|
try {
|
|
28
|
-
await s(c),
|
|
28
|
+
await s(c), S(!0), f?.(c), C.current && window.clearTimeout(C.current), C.current = window.setTimeout(() => S(!1), d);
|
|
29
29
|
} catch (e) {
|
|
30
30
|
p?.(e);
|
|
31
31
|
}
|
|
@@ -37,16 +37,18 @@ function c({ value: c, copiedLabel: l = "Copied", copyLabel: u = "Copy", copiedT
|
|
|
37
37
|
]);
|
|
38
38
|
return /* @__PURE__ */ o(t, {
|
|
39
39
|
"data-slot": "copy-button",
|
|
40
|
-
"data-copied":
|
|
41
|
-
type:
|
|
42
|
-
|
|
40
|
+
"data-copied": x || void 0,
|
|
41
|
+
type: y,
|
|
42
|
+
variant: x ? h ?? "secondary" : g,
|
|
43
|
+
disabled: _ || !c,
|
|
43
44
|
onClick: (t) => {
|
|
44
|
-
e(t),
|
|
45
|
+
e(t), w();
|
|
45
46
|
},
|
|
46
47
|
onMouseDown: e,
|
|
47
48
|
onDoubleClick: e,
|
|
48
|
-
|
|
49
|
-
|
|
49
|
+
"aria-live": "polite",
|
|
50
|
+
...b,
|
|
51
|
+
children: [m && a(x ? r : i, { "data-icon": "inline-start" }), v ?? (x ? l : u)]
|
|
50
52
|
});
|
|
51
53
|
}
|
|
52
54
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/button/index.cjs"),r=require("./date-utils.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("lucide-react"),o=require("react/jsx-runtime");function s(e,t,n){if(e instanceof Date)return r.startOfMonth(e);let i=r.parseDateKey(e);if(i)return r.startOfMonth(i);let a=r.parseDateKey(t);if(a)return r.startOfMonth(a);let o=r.parseDateKey(n?.from??n?.to);return o?r.startOfMonth(o):r.startOfMonth(new Date)}function c(e,t){let n=new Date(e);return n.setDate(e.getDate()+t),n}function l(e,t){let n=new Date(t.getFullYear(),t.getMonth()+1,0).getDate();return new Date(t.getFullYear(),t.getMonth(),Math.min(e.getDate(),n))}function u(e,t){let n=r.parseDateKey(e),i=r.parseDateKey(t);if(!n||!i||t<e)return[];let a=[],o=new Date(n);for(;r.toDateKey(o)<=t;)a.push(r.toDateKey(o)),o.setDate(o.getDate()+1);return a}function d({className:e,value:
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../../lib/utils.cjs"),n=require("../ui/button/index.cjs"),r=require("./date-utils.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("lucide-react"),o=require("react/jsx-runtime");function s(e,t,n){if(e instanceof Date)return r.startOfMonth(e);let i=r.parseDateKey(e);if(i)return r.startOfMonth(i);let a=r.parseDateKey(t);if(a)return r.startOfMonth(a);let o=r.parseDateKey(n?.from??n?.to);return o?r.startOfMonth(o):r.startOfMonth(new Date)}function c(e,t){let n=new Date(e);return n.setDate(e.getDate()+t),n}function l(e,t){let n=new Date(t.getFullYear(),t.getMonth()+1,0).getDate();return new Date(t.getFullYear(),t.getMonth(),Math.min(e.getDate(),n))}function u(e,t){let n=r.parseDateKey(e),i=r.parseDateKey(t);if(!n||!i||t<e)return[];let a=[],o=new Date(n);for(;r.toDateKey(o)<=t;)a.push(r.toDateKey(o)),o.setDate(o.getDate()+1);return a}function d(e,t){let n=r.parseDateKey(e);return!n||!e?null:new Intl.DateTimeFormat(t,{dateStyle:`medium`}).format(n)}function f({className:e,value:f,range:p,onValueChange:m,onRangeChange:h,mode:g=`single`,month:ee,defaultMonth:te,onMonthChange:ne,min:_,max:v,disabledDates:y,locale:b=`en-US`,weekStartsOn:x=1,numberOfMonths:re=1,showMonthHeaders:ie,showOutsideDays:S=!0,pagedNavigation:ae=!1,showTodayShortcut:C=!1,showClearShortcut:w=!1,showSelectionSummary:T=!1,labels:E,renderSelectionSummary:D,...oe}){let O=f!==void 0,k=p!==void 0,[se,A]=i.useState(f??null),[ce,j]=i.useState(p??{}),[le,ue]=i.useState(()=>s(te,f,p)),M=O?f:se,N=k?p:ce,P=ee??le,F=Math.max(re,1),de=ie??F>1,I=ae?F:1,L=r.toDateKey(new Date),R=i.useMemo(()=>new Set(y??[]),[y]),fe=i.useMemo(()=>r.getWeekdayLabels(b,x),[b,x]),z=i.useRef(new Map),[B,V]=i.useState(()=>f??p?.from??L),[H,U]=i.useState(null),W=i.useMemo(()=>Array.from({length:F},(e,t)=>r.addMonths(P,t)),[P,F]),G=i.useMemo(()=>W.map(e=>({month:e,days:r.getMonthDays(e,x)})),[W,x]),K=i.useMemo(()=>G.flatMap(e=>e.days),[G]),q=i.useCallback(e=>{if(R.has(e))return`disabled`;if(r.isBeforeDate(e,_))return`min`;if(r.isAfterDate(e,v))return`max`},[R,v,_]),J=i.useCallback(e=>!!q(e),[q]),Y=i.useMemo(()=>K.map(r.toDateKey).filter(e=>!J(e)),[K,J]),pe=i.useMemo(()=>{let e=f??p?.from??L,t=N?.from??void 0,n=M??void 0;return Y.includes(B)?B:Y.includes(n??t??e)?n??t??e:Y[0]},[N?.from,M,B,p?.from,L,f,Y]);i.useEffect(()=>{O&&A(f??null)},[O,f]),i.useEffect(()=>{k&&p&&j(p)},[k,p]),i.useEffect(()=>{B&&z.current.get(B)?.focus()},[B]),i.useEffect(()=>{g!==`range`&&U(null)},[g]);let X=e=>{let t=r.startOfMonth(e);ue(t),ne?.(t)},Z=e=>{let t=e,n=r.toDateKey(t),i=0;for(;J(n)&&i<370;)t=c(t,t<e?-1:1),n=r.toDateKey(t),i+=1;V(n),W.some(e=>r.isSameMonth(t,e))||X(r.startOfMonth(t))},Q=e=>{if(J(e))return;if(g===`single`){O||A(e),m?.(e);return}let t=N?.from??null,n=N?.to??null;if(!t||t&&n||e<t){let t={from:e,to:null};k||j(t),h?.(t);return}if(u(t,e).some(e=>J(e))){let t={from:e,to:null};k||j(t),h?.(t);return}let r={from:t,to:e};k||j(r),h?.(r)},$=g===`range`&&N?.from&&!N.to&&H&&H>=N.from&&!u(N.from,H).some(e=>J(e))?{from:N.from,to:H}:null,me=i.useMemo(()=>{if(!T&&!D)return null;if(D)return D({mode:g,value:M,range:N,locale:b});if(g===`range`){let e=d(N?.from,b),t=d(N?.to,b);return e&&t?`${e} -> ${t}`:e?`${e} -> ...`:`No range selected`}return d(M,b)??`No date selected`},[N,M,b,g,D,T]),he=()=>{if(g===`single`){O||A(null),m?.(``);return}let e={from:null,to:null};k||j(e),h?.(e)},ge=()=>{let e=new Date,t=r.toDateKey(e);X(e),V(t),J(t)||Q(t)},_e=(e,t)=>{let n=((G.find(e=>r.isSameMonth(t,e.month))?.days.findIndex(e=>r.toDateKey(e)===r.toDateKey(t))??0)+7)%7;switch(e.key){case`ArrowRight`:e.preventDefault(),Z(c(t,1));break;case`ArrowLeft`:e.preventDefault(),Z(c(t,-1));break;case`ArrowDown`:e.preventDefault(),Z(c(t,7));break;case`ArrowUp`:e.preventDefault(),Z(c(t,-7));break;case`Home`:e.preventDefault(),Z(c(t,-n));break;case`End`:e.preventDefault(),Z(c(t,6-n));break;case`PageUp`:e.preventDefault(),Z(l(t,r.addMonths(t,-1)));break;case`PageDown`:e.preventDefault(),Z(l(t,r.addMonths(t,1)));break}};return(0,o.jsxs)(`div`,{"data-slot":`calendar`,"data-months":F,className:t.cn(`w-fit rounded-[var(--aui-card-radius,var(--radius-lg))] border border-[color:var(--aui-card-border,var(--border))] bg-popover p-3 text-popover-foreground shadow-[var(--aui-control-panel-shadow,0_18px_40px_rgba(15,23,42,0.14))]`,e),...oe,children:[(0,o.jsxs)(`div`,{className:`mb-3 flex items-center justify-between gap-3`,children:[(0,o.jsx)(n.Button,{type:`button`,variant:`outline`,size:`icon-sm`,className:`rounded-[var(--radius-md)] border-border/70 bg-background text-foreground shadow-none hover:border-border hover:bg-accent hover:text-accent-foreground`,"aria-label":E?.previousMonth??`Previous month`,onClick:()=>X(r.addMonths(P,-I)),children:(0,o.jsx)(a.ChevronLeftIcon,{})}),(0,o.jsxs)(`div`,{className:`flex flex-1 flex-col items-center text-center`,children:[(0,o.jsx)(`span`,{className:`text-[10px] font-semibold uppercase tracking-[0.24em] text-muted-foreground/90`,children:`Calendar`}),(0,o.jsx)(`div`,{className:`text-base font-semibold capitalize tracking-tight text-foreground`,children:r.getMonthLabel(P,b)})]}),(0,o.jsx)(n.Button,{type:`button`,variant:`outline`,size:`icon-sm`,className:`rounded-[var(--radius-md)] border-border/70 bg-background text-foreground shadow-none hover:border-border hover:bg-accent hover:text-accent-foreground`,"aria-label":E?.nextMonth??`Next month`,onClick:()=>X(r.addMonths(P,I)),children:(0,o.jsx)(a.ChevronRightIcon,{})})]}),(0,o.jsx)(`div`,{className:t.cn(`grid gap-3`,F>1&&`sm:grid-cols-2`),style:F>2?{gridTemplateColumns:`repeat(${F}, minmax(0, 1fr))`}:void 0,children:G.map(({month:e,days:n})=>(0,o.jsxs)(`div`,{className:`min-w-[16.5rem] rounded-[var(--radius-md)] bg-transparent p-1`,children:[de&&(0,o.jsx)(`div`,{className:`mb-2 text-center text-sm font-semibold capitalize tracking-tight text-foreground`,children:r.getMonthLabel(e,b)}),(0,o.jsx)(`div`,{className:`grid grid-cols-7 gap-1 text-center text-[0.68rem] font-semibold uppercase tracking-[0.18em] text-muted-foreground/90`,children:fe.map(t=>(0,o.jsx)(`div`,{className:`py-1`,children:t},`${r.toDateKey(e)}-${t}`))}),(0,o.jsx)(`div`,{className:`mt-1.5 grid grid-cols-7 gap-1`,children:n.map(n=>{let i=r.toDateKey(n),a=!r.isSameMonth(n,e),s=g===`single`?M===i:i===N?.from||i===N?.to,c=g===`range`&&r.isWithinRange(i,N?.from,N?.to),l=!c&&g===`range`&&r.isWithinRange(i,$?.from,$?.to),u=q(i),d=!!u,f=u?E?.disabledDate?.(i,u):void 0;return(0,o.jsx)(`button`,{ref:e=>{e?z.current.set(i,e):z.current.delete(i)},type:`button`,disabled:d,"aria-label":f??E?.selectDate?.(i)??i,"aria-current":i===L?`date`:void 0,tabIndex:i===pe?0:-1,title:f,"data-selected":s||void 0,"data-today":i===L||void 0,"data-outside":a||void 0,"data-in-range":c||void 0,"data-in-preview-range":l||void 0,"data-disabled-reason":u,className:t.cn(`flex h-9 items-center justify-center rounded-[var(--radius-sm)] border border-transparent text-sm font-medium outline-none transition-[background-color,color,border-color,box-shadow,transform] hover:bg-accent hover:text-accent-foreground focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-30`,a&&S?`text-muted-foreground/34`:`text-foreground`,a&&!S&&`pointer-events-none opacity-0`,i===L&&`border-border/70 bg-muted/60 text-foreground`,c&&`bg-primary/10 text-foreground`,l&&`bg-primary/6 text-foreground`,s&&`border-primary bg-primary text-primary-foreground shadow-[0_10px_22px_color-mix(in_oklch,var(--primary),transparent_78%)] hover:bg-primary hover:text-primary-foreground`),onFocus:()=>V(i),onMouseEnter:()=>U(i),onMouseLeave:()=>U(null),onKeyDown:e=>_e(e,n),onClick:()=>Q(i),children:n.getDate()},i)})})]},r.toDateKey(e)))}),C||w||T||D?(0,o.jsxs)(`div`,{className:`mt-3 flex flex-wrap items-center justify-between gap-2 border-t border-[color:var(--aui-card-border,var(--border))] pt-3`,children:[(0,o.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:me}),(0,o.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[w?(0,o.jsx)(n.Button,{type:`button`,size:`sm`,variant:`ghost`,onClick:he,children:E?.clear??`Clear`}):null,C?(0,o.jsx)(n.Button,{type:`button`,size:`sm`,variant:`outline`,onClick:ge,children:E?.today??`Today`}):null]})]}):null]})}exports.Calendar=f;
|
|
@@ -7,9 +7,17 @@ export type CalendarDisabledReason = "disabled" | "min" | "max" | "range";
|
|
|
7
7
|
export type CalendarLabels = {
|
|
8
8
|
previousMonth?: string;
|
|
9
9
|
nextMonth?: string;
|
|
10
|
+
today?: string;
|
|
11
|
+
clear?: string;
|
|
10
12
|
selectDate?: (date: string) => string;
|
|
11
13
|
disabledDate?: (date: string, reason: CalendarDisabledReason) => string;
|
|
12
14
|
};
|
|
15
|
+
export type CalendarSummaryState = {
|
|
16
|
+
mode: "single" | "range";
|
|
17
|
+
value?: string | null;
|
|
18
|
+
range?: CalendarDateRange;
|
|
19
|
+
locale: string;
|
|
20
|
+
};
|
|
13
21
|
export type CalendarProps = React.ComponentProps<"div"> & {
|
|
14
22
|
value?: string | null;
|
|
15
23
|
range?: CalendarDateRange;
|
|
@@ -26,8 +34,13 @@ export type CalendarProps = React.ComponentProps<"div"> & {
|
|
|
26
34
|
weekStartsOn?: 0 | 1;
|
|
27
35
|
numberOfMonths?: number;
|
|
28
36
|
showMonthHeaders?: boolean;
|
|
37
|
+
showOutsideDays?: boolean;
|
|
29
38
|
pagedNavigation?: boolean;
|
|
39
|
+
showTodayShortcut?: boolean;
|
|
40
|
+
showClearShortcut?: boolean;
|
|
41
|
+
showSelectionSummary?: boolean;
|
|
30
42
|
labels?: CalendarLabels;
|
|
43
|
+
renderSelectionSummary?: (state: CalendarSummaryState) => React.ReactNode;
|
|
31
44
|
};
|
|
32
|
-
declare function Calendar({ className, value, range, onValueChange, onRangeChange, mode, month, defaultMonth, onMonthChange, min, max, disabledDates, locale, weekStartsOn, numberOfMonths, showMonthHeaders, pagedNavigation, labels, ...props }: CalendarProps): React.JSX.Element;
|
|
45
|
+
declare function Calendar({ className, value, range, onValueChange, onRangeChange, mode, month, defaultMonth, onMonthChange, min, max, disabledDates, locale, weekStartsOn, numberOfMonths, showMonthHeaders, showOutsideDays, pagedNavigation, showTodayShortcut, showClearShortcut, showSelectionSummary, labels, renderSelectionSummary, ...props }: CalendarProps): React.JSX.Element;
|
|
33
46
|
export { Calendar };
|