tembro 2.0.3 → 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 -8
- package/dist/components/display/index.js +21 -29
- 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/demo.cjs +1 -1
- package/dist/components/form/demo.js +1 -2
- 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.d.ts +0 -1
- package/dist/components/form/index.js +11 -12
- package/dist/components/form/public.cjs +1 -1
- package/dist/components/form/public.d.ts +0 -9
- package/dist/components/form/public.js +7 -16
- 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/index.cjs +1 -1
- package/dist/components/inputs/index.d.ts +0 -2
- package/dist/components/inputs/index.js +3 -5
- package/dist/components/inputs/public.cjs +1 -1
- package/dist/components/inputs/public.d.ts +0 -2
- package/dist/components/inputs/public.js +3 -5
- 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.d.ts +0 -1
- package/dist/components/layout/index.js +4 -5
- package/dist/components/layout/public.cjs +1 -1
- package/dist/components/layout/public.d.ts +0 -1
- package/dist/components/layout/public.js +2 -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/modern/index.cjs +1 -1
- package/dist/components/modern/index.d.ts +0 -4
- package/dist/components/modern/index.js +12 -16
- 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 +145 -177
- package/dist/public-component-surface.cjs +1 -1
- package/dist/public-component-surface.js +0 -80
- 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 +287 -451
- 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 +467 -574
- 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 -24
- 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 -59
- 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 -8
- 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/demo.tsx +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/index.ts +0 -1
- package/packages/cli/vendor/src/components/form/public.ts +0 -11
- 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/index.ts +0 -2
- package/packages/cli/vendor/src/components/inputs/public.ts +0 -2
- 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/index.ts +0 -1
- package/packages/cli/vendor/src/components/layout/public.ts +0 -1
- 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/modern/index.ts +1 -5
- 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 -16
- 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 +83 -263
- 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 -46
- 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 -30
- 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 +206 -280
- package/registry.json +251 -329
- package/dist/components/display/aspect-ratio.cjs +0 -1
- package/dist/components/display/aspect-ratio.d.ts +0 -6
- package/dist/components/display/aspect-ratio.js +0 -21
- 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/display/float-button.cjs +0 -1
- package/dist/components/display/float-button.d.ts +0 -6
- package/dist/components/display/float-button.js +0 -20
- package/dist/components/display/key-value-card.cjs +0 -1
- package/dist/components/display/key-value-card.d.ts +0 -16
- package/dist/components/display/key-value-card.js +0 -35
- package/dist/components/display/keyboard-shortcut.cjs +0 -1
- package/dist/components/display/keyboard-shortcut.d.ts +0 -7
- package/dist/components/display/keyboard-shortcut.js +0 -18
- package/dist/components/display/skeleton-form.cjs +0 -1
- package/dist/components/display/skeleton-form.d.ts +0 -9
- package/dist/components/display/skeleton-form.js +0 -31
- package/dist/components/display/skeleton-table.cjs +0 -1
- package/dist/components/display/skeleton-table.d.ts +0 -9
- package/dist/components/display/skeleton-table.js +0 -42
- package/dist/components/display/tag-list.cjs +0 -1
- package/dist/components/display/tag-list.d.ts +0 -17
- package/dist/components/display/tag-list.js +0 -30
- package/dist/components/display/watermark.cjs +0 -1
- package/dist/components/display/watermark.d.ts +0 -6
- package/dist/components/display/watermark.js +0 -23
- 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/form/repeater-field.cjs +0 -1
- package/dist/components/form/repeater-field.d.ts +0 -16
- package/dist/components/form/repeater-field.js +0 -48
- package/dist/components/inputs/cascader.cjs +0 -1
- package/dist/components/inputs/cascader.d.ts +0 -13
- package/dist/components/inputs/cascader.js +0 -58
- package/dist/components/inputs/mention-input.cjs +0 -1
- package/dist/components/inputs/mention-input.d.ts +0 -18
- package/dist/components/inputs/mention-input.js +0 -96
- package/dist/components/layout/stack.cjs +0 -1
- package/dist/components/layout/stack.d.ts +0 -23
- package/dist/components/layout/stack.js +0 -57
- package/dist/components/modern/affix.cjs +0 -1
- package/dist/components/modern/affix.d.ts +0 -7
- package/dist/components/modern/affix.js +0 -18
- 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/affix/index.cjs +0 -1
- package/dist/showcase/premium/affix/index.d.ts +0 -2
- package/dist/showcase/premium/affix/index.js +0 -3
- package/dist/showcase/premium/affix/mock.cjs +0 -12
- package/dist/showcase/premium/affix/mock.d.ts +0 -2
- package/dist/showcase/premium/affix/mock.js +0 -15
- package/dist/showcase/premium/affix/showcase.cjs +0 -1
- package/dist/showcase/premium/affix/showcase.d.ts +0 -2
- package/dist/showcase/premium/affix/showcase.js +0 -64
- package/dist/showcase/premium/aspect-ratio/index.cjs +0 -1
- package/dist/showcase/premium/aspect-ratio/index.d.ts +0 -2
- package/dist/showcase/premium/aspect-ratio/index.js +0 -3
- package/dist/showcase/premium/aspect-ratio/mock.cjs +0 -11
- package/dist/showcase/premium/aspect-ratio/mock.d.ts +0 -2
- package/dist/showcase/premium/aspect-ratio/mock.js +0 -26
- package/dist/showcase/premium/aspect-ratio/showcase.cjs +0 -1
- package/dist/showcase/premium/aspect-ratio/showcase.d.ts +0 -2
- package/dist/showcase/premium/aspect-ratio/showcase.js +0 -53
- package/dist/showcase/premium/cascader/index.cjs +0 -1
- package/dist/showcase/premium/cascader/index.d.ts +0 -2
- package/dist/showcase/premium/cascader/index.js +0 -3
- package/dist/showcase/premium/cascader/mock.cjs +0 -9
- package/dist/showcase/premium/cascader/mock.d.ts +0 -2
- package/dist/showcase/premium/cascader/mock.js +0 -19
- package/dist/showcase/premium/cascader/showcase.cjs +0 -1
- package/dist/showcase/premium/cascader/showcase.d.ts +0 -2
- package/dist/showcase/premium/cascader/showcase.js +0 -43
- 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/float-button/index.cjs +0 -1
- package/dist/showcase/premium/float-button/index.d.ts +0 -2
- package/dist/showcase/premium/float-button/index.js +0 -3
- package/dist/showcase/premium/float-button/mock.cjs +0 -10
- package/dist/showcase/premium/float-button/mock.d.ts +0 -2
- package/dist/showcase/premium/float-button/mock.js +0 -15
- package/dist/showcase/premium/float-button/showcase.cjs +0 -1
- package/dist/showcase/premium/float-button/showcase.d.ts +0 -2
- package/dist/showcase/premium/float-button/showcase.js +0 -28
- 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/dist/showcase/premium/keyboard-shortcut/index.cjs +0 -1
- package/dist/showcase/premium/keyboard-shortcut/index.d.ts +0 -2
- package/dist/showcase/premium/keyboard-shortcut/index.js +0 -3
- package/dist/showcase/premium/keyboard-shortcut/mock.cjs +0 -5
- package/dist/showcase/premium/keyboard-shortcut/mock.d.ts +0 -2
- package/dist/showcase/premium/keyboard-shortcut/mock.js +0 -26
- package/dist/showcase/premium/keyboard-shortcut/showcase.cjs +0 -1
- package/dist/showcase/premium/keyboard-shortcut/showcase.d.ts +0 -1
- package/dist/showcase/premium/keyboard-shortcut/showcase.js +0 -64
- package/dist/showcase/premium/mention-input/index.cjs +0 -1
- package/dist/showcase/premium/mention-input/index.d.ts +0 -2
- package/dist/showcase/premium/mention-input/index.js +0 -3
- package/dist/showcase/premium/mention-input/mock.cjs +0 -11
- package/dist/showcase/premium/mention-input/mock.d.ts +0 -2
- package/dist/showcase/premium/mention-input/mock.js +0 -19
- package/dist/showcase/premium/mention-input/showcase.cjs +0 -1
- package/dist/showcase/premium/mention-input/showcase.d.ts +0 -2
- package/dist/showcase/premium/mention-input/showcase.js +0 -35
- package/dist/showcase/premium/skeleton-form/index.cjs +0 -1
- package/dist/showcase/premium/skeleton-form/index.d.ts +0 -2
- package/dist/showcase/premium/skeleton-form/index.js +0 -3
- package/dist/showcase/premium/skeleton-form/mock.cjs +0 -5
- package/dist/showcase/premium/skeleton-form/mock.d.ts +0 -2
- package/dist/showcase/premium/skeleton-form/mock.js +0 -19
- package/dist/showcase/premium/skeleton-form/showcase.cjs +0 -1
- package/dist/showcase/premium/skeleton-form/showcase.d.ts +0 -2
- package/dist/showcase/premium/skeleton-form/showcase.js +0 -52
- package/dist/showcase/premium/skeleton-table/index.cjs +0 -1
- package/dist/showcase/premium/skeleton-table/index.d.ts +0 -2
- package/dist/showcase/premium/skeleton-table/index.js +0 -3
- package/dist/showcase/premium/skeleton-table/mock.cjs +0 -5
- package/dist/showcase/premium/skeleton-table/mock.d.ts +0 -2
- package/dist/showcase/premium/skeleton-table/mock.js +0 -19
- package/dist/showcase/premium/skeleton-table/showcase.cjs +0 -1
- package/dist/showcase/premium/skeleton-table/showcase.d.ts +0 -2
- package/dist/showcase/premium/skeleton-table/showcase.js +0 -59
- package/dist/showcase/premium/stack/index.cjs +0 -1
- package/dist/showcase/premium/stack/index.d.ts +0 -2
- package/dist/showcase/premium/stack/index.js +0 -3
- package/dist/showcase/premium/stack/mock.cjs +0 -10
- package/dist/showcase/premium/stack/mock.d.ts +0 -2
- package/dist/showcase/premium/stack/mock.js +0 -26
- package/dist/showcase/premium/stack/showcase.cjs +0 -1
- package/dist/showcase/premium/stack/showcase.d.ts +0 -1
- package/dist/showcase/premium/stack/showcase.js +0 -47
- package/dist/showcase/premium/tag-list/index.cjs +0 -1
- package/dist/showcase/premium/tag-list/index.d.ts +0 -2
- package/dist/showcase/premium/tag-list/index.js +0 -3
- package/dist/showcase/premium/tag-list/mock.cjs +0 -12
- package/dist/showcase/premium/tag-list/mock.d.ts +0 -2
- package/dist/showcase/premium/tag-list/mock.js +0 -26
- package/dist/showcase/premium/tag-list/showcase.cjs +0 -1
- package/dist/showcase/premium/tag-list/showcase.d.ts +0 -2
- package/dist/showcase/premium/tag-list/showcase.js +0 -83
- package/dist/showcase/premium/watermark/index.cjs +0 -1
- package/dist/showcase/premium/watermark/index.d.ts +0 -2
- package/dist/showcase/premium/watermark/index.js +0 -3
- package/dist/showcase/premium/watermark/mock.cjs +0 -11
- package/dist/showcase/premium/watermark/mock.d.ts +0 -2
- package/dist/showcase/premium/watermark/mock.js +0 -26
- package/dist/showcase/premium/watermark/showcase.cjs +0 -1
- package/dist/showcase/premium/watermark/showcase.d.ts +0 -2
- package/dist/showcase/premium/watermark/showcase.js +0 -34
- package/packages/cli/vendor/src/components/display/aspect-ratio.tsx +0 -22
- 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/display/float-button.tsx +0 -27
- package/packages/cli/vendor/src/components/display/key-value-card.tsx +0 -50
- package/packages/cli/vendor/src/components/display/keyboard-shortcut.tsx +0 -31
- package/packages/cli/vendor/src/components/display/skeleton-form.tsx +0 -51
- package/packages/cli/vendor/src/components/display/skeleton-table.tsx +0 -59
- package/packages/cli/vendor/src/components/display/tag-list.tsx +0 -52
- package/packages/cli/vendor/src/components/display/watermark.tsx +0 -20
- 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/form/repeater-field.tsx +0 -93
- package/packages/cli/vendor/src/components/inputs/cascader.tsx +0 -41
- package/packages/cli/vendor/src/components/inputs/mention-input.tsx +0 -162
- package/packages/cli/vendor/src/components/layout/stack.tsx +0 -106
- package/packages/cli/vendor/src/components/modern/affix.tsx +0 -21
- 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/affix/index.ts +0 -3
- package/packages/cli/vendor/src/showcase/premium/affix/mock.ts +0 -26
- package/packages/cli/vendor/src/showcase/premium/affix/showcase.tsx +0 -37
- package/packages/cli/vendor/src/showcase/premium/aspect-ratio/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/aspect-ratio/mock.ts +0 -26
- package/packages/cli/vendor/src/showcase/premium/aspect-ratio/showcase.tsx +0 -37
- package/packages/cli/vendor/src/showcase/premium/cascader/index.ts +0 -3
- package/packages/cli/vendor/src/showcase/premium/cascader/mock.ts +0 -24
- package/packages/cli/vendor/src/showcase/premium/cascader/showcase.tsx +0 -20
- 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/float-button/index.ts +0 -3
- package/packages/cli/vendor/src/showcase/premium/float-button/mock.ts +0 -24
- package/packages/cli/vendor/src/showcase/premium/float-button/showcase.tsx +0 -21
- 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
- package/packages/cli/vendor/src/showcase/premium/keyboard-shortcut/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/keyboard-shortcut/mock.ts +0 -20
- package/packages/cli/vendor/src/showcase/premium/keyboard-shortcut/showcase.tsx +0 -42
- package/packages/cli/vendor/src/showcase/premium/mention-input/index.ts +0 -3
- package/packages/cli/vendor/src/showcase/premium/mention-input/mock.ts +0 -26
- package/packages/cli/vendor/src/showcase/premium/mention-input/showcase.tsx +0 -27
- package/packages/cli/vendor/src/showcase/premium/skeleton-form/index.ts +0 -3
- package/packages/cli/vendor/src/showcase/premium/skeleton-form/mock.ts +0 -20
- package/packages/cli/vendor/src/showcase/premium/skeleton-form/showcase.tsx +0 -34
- package/packages/cli/vendor/src/showcase/premium/skeleton-table/index.ts +0 -3
- package/packages/cli/vendor/src/showcase/premium/skeleton-table/mock.ts +0 -20
- package/packages/cli/vendor/src/showcase/premium/skeleton-table/showcase.tsx +0 -37
- package/packages/cli/vendor/src/showcase/premium/stack/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/stack/mock.ts +0 -25
- package/packages/cli/vendor/src/showcase/premium/stack/showcase.tsx +0 -22
- package/packages/cli/vendor/src/showcase/premium/tag-list/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/tag-list/mock.ts +0 -27
- package/packages/cli/vendor/src/showcase/premium/tag-list/showcase.tsx +0 -55
- package/packages/cli/vendor/src/showcase/premium/watermark/index.ts +0 -2
- package/packages/cli/vendor/src/showcase/premium/watermark/mock.ts +0 -26
- package/packages/cli/vendor/src/showcase/premium/watermark/showcase.tsx +0 -26
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { AsyncSelect as e } from "../../../components/inputs/async-select.js";
|
|
2
2
|
import { useState as t } from "react";
|
|
3
3
|
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
4
|
//#region src/showcase/premium/async-multi-select/showcase.tsx
|
|
@@ -29,13 +29,14 @@ function o() {
|
|
|
29
29
|
className: "rounded-[20px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] p-4",
|
|
30
30
|
children: [/* @__PURE__ */ n("p", {
|
|
31
31
|
className: "text-sm font-medium aui-text-strong",
|
|
32
|
-
children: "
|
|
32
|
+
children: "Use AsyncSelect with isMulti for remote multi-value flows"
|
|
33
33
|
}), /* @__PURE__ */ n("p", {
|
|
34
34
|
className: "mt-2 text-sm leading-6 aui-text-muted",
|
|
35
|
-
children: "
|
|
35
|
+
children: "Keep the Select family centered on one remote surface. This route documents the multi-value mode, but new code should stay on AsyncSelect."
|
|
36
36
|
})]
|
|
37
37
|
}),
|
|
38
38
|
/* @__PURE__ */ n(e, {
|
|
39
|
+
isMulti: !0,
|
|
39
40
|
value: i,
|
|
40
41
|
onValueChange: (e) => o(e),
|
|
41
42
|
loadOptions: a,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e={code:`import { useState } from "react"
|
|
2
|
-
import { AsyncSelect, type AsyncSelectOption } from "
|
|
2
|
+
import { AsyncSelect, type AsyncSelectOption } from "tembro"
|
|
3
3
|
|
|
4
4
|
const seedOptions: AsyncSelectOption[] = [
|
|
5
5
|
{ value: "acme", label: "ACME", description: "Core product line" },
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
//#region src/showcase/premium/async-select/mock.ts
|
|
2
2
|
var e = {
|
|
3
|
-
code: "import { useState } from \"react\"\nimport { AsyncSelect, type AsyncSelectOption } from \"
|
|
3
|
+
code: "import { useState } from \"react\"\nimport { AsyncSelect, type AsyncSelectOption } from \"tembro\"\n\nconst seedOptions: AsyncSelectOption[] = [\n { value: \"acme\", label: \"ACME\", description: \"Core product line\" },\n { value: \"nova\", label: \"Nova\", description: \"Enterprise clients\" },\n { value: \"spark\", label: \"Spark\", description: \"Growth workspace\" },\n { value: \"atlas\", label: \"Atlas\", description: \"Billing team\" },\n { value: \"zen\", label: \"Zen\", description: \"Ops and support\" },\n { value: \"legacy\", label: \"Legacy\", description: \"Deprecated workspace\", disabled: true },\n]\n\nconst loadWorkspaces = async (search: string) => {\n await new Promise((resolve) => setTimeout(resolve, 420))\n const query = search.trim().toLowerCase()\n if (query === \"error\") {\n throw new Error(\"Unable to fetch options for the current query.\")\n }\n\n if (query.length < 2) return []\n return seedOptions.filter((option) => String(option.label ?? \"\").toLowerCase().includes(query))\n}\n\nexport function Example() {\n const [value, setValue] = useState(\"\")\n const [label, setLabel] = useState(\"Select workspace\")\n\n return (\n <div className=\"space-y-3\">\n <AsyncSelect\n value={value}\n onValueChange={(nextValue, option) => {\n setValue(nextValue ?? \"\")\n setLabel(option?.label ? String(option.label) : \"Select workspace\")\n }}\n loadOptions={loadWorkspaces}\n loadSelectedOption={async (selectedValue) => {\n await new Promise((resolve) => setTimeout(resolve, 40))\n return seedOptions.find((option) => option.value === selectedValue) ?? null\n }}\n clearable\n debounceMs={250}\n minSearchLength={2}\n defaultOptions={seedOptions}\n />\n <div className=\"rounded-2xl border border-[color:var(--aui-surface-border)] bg-[color:var(--aui-surface-muted)] px-4 py-3 text-sm aui-text-muted\">\n Selected: <strong>{value || \"none\"}</strong> — {label}\n </div>\n <p className=\"text-sm aui-text-muted\">\n Set search to <code>error</code> to preview empty/error handling paths.\n </p>\n <p className=\"text-sm aui-text-muted\">Disabled items are rendered non-selectable in the list.</p>\n </div>\n )\n}",
|
|
4
4
|
htmlCode: "<button data-slot=\"async-select-trigger\">Choose workspace</button>",
|
|
5
5
|
cliCommand: "npx tembro add async-select",
|
|
6
6
|
highlights: [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../components/ui/badge/index.cjs"),t=require("../../../components/inputs/async-select.cjs"),n=require("../../component-route-data.cjs");let r=require("react"),i=require("react/jsx-runtime");var a=n.routeWorkspaceOptions,o=`rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5`,s=async e=>{await new Promise(e=>setTimeout(e,260));let t=e.trim().toLowerCase();return t?a.filter(e=>String(e.label??``).toLowerCase().includes(t)):a};function c(){let[c,l]=(0,r.useState)(``),u=n.routeWorkspaceOptions.find(e=>e.value===c);return(0,i.jsx)(`div`,{className:`space-y-5`,children:(0,i.jsxs)(`section`,{className:`rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6`,children:[(0,i.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-start xl:justify-between`,children:[(0,i.jsxs)(`div`,{className:`max-w-xl`,children:[(0,i.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted`,children:`Remote selection`}),(0,i.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`AsyncSelect is the remote member of the Select family`}),(0,i.jsx)(`p`,{className:`mt-3 max-w-lg text-sm leading-6 aui-text-muted`,children:`Use AsyncSelect only when the main Select flow is not enough because the option set is large, remote, or hydration-aware.`})]}),(0,i.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,i.jsx)(e.Badge,{variant:`outline`,className:`rounded-full`,children:`Async`}),(0,i.jsx)(e.Badge,{variant:`outline`,className:`rounded-full`,children:`Search`}),(0,i.jsx)(e.Badge,{variant:`outline`,className:`rounded-full`,children:`Clearable`})]})]}),(0,i.jsxs)(`div`,{className:`mt-6 grid gap-4 xl:grid-cols-[1.12fr_0.88fr]`,children:[(0,i.jsxs)(`div`,{className:o,children:[(0,i.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Assign service region`}),(0,i.jsx)(`div`,{className:`mt-3`,children:(0,i.jsx)(t.AsyncSelect,{value:c,onValueChange:e=>l(e??``),loadOptions:s,defaultOptions:a,minSearchLength:1,clearable:!0,debounceMs:220})}),(0,i.jsxs)(`div`,{className:`mt-4 grid gap-3 md:grid-cols-3`,children:[(0,i.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm`,children:[(0,i.jsx)(`p`,{className:`font-medium aui-text-strong`,children:`Type to query`}),(0,i.jsx)(`p`,{className:`mt-2 leading-6 aui-text-muted`,children:`Minimum search length keeps remote requests intentional.`})]}),(0,i.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm`,children:[(0,i.jsx)(`p`,{className:`font-medium aui-text-strong`,children:`Clear safely`}),(0,i.jsx)(`p`,{className:`mt-2 leading-6 aui-text-muted`,children:`Clear action is isolated from the trigger surface.`})]}),(0,i.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm`,children:[(0,i.jsx)(`p`,{className:`font-medium aui-text-strong`,children:`Hydrate selection`}),(0,i.jsx)(`p`,{className:`mt-2 leading-6 aui-text-muted`,children:`Selected value can be restored from ID-first edit state.`})]})]})]}),(0,i.jsxs)(`div`,{className:o,children:[(0,i.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Selected result`}),(0,i.jsx)(`p`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../components/ui/badge/index.cjs"),t=require("../../../components/inputs/async-select.cjs"),n=require("../../component-route-data.cjs");let r=require("react"),i=require("react/jsx-runtime");var a=n.routeWorkspaceOptions,o=`rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5`,s=async e=>{await new Promise(e=>setTimeout(e,260));let t=e.trim().toLowerCase();return t?a.filter(e=>String(e.label??``).toLowerCase().includes(t)):a};function c(){let[c,l]=(0,r.useState)(``),[u,d]=(0,r.useState)([`north`,`west`]),f=n.routeWorkspaceOptions.find(e=>e.value===c),p=n.routeWorkspaceOptions.filter(e=>u.includes(String(e.value)));return(0,i.jsx)(`div`,{className:`space-y-5`,children:(0,i.jsxs)(`section`,{className:`rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6`,children:[(0,i.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-start xl:justify-between`,children:[(0,i.jsxs)(`div`,{className:`max-w-xl`,children:[(0,i.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted`,children:`Remote selection`}),(0,i.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`AsyncSelect is the remote member of the Select family`}),(0,i.jsx)(`p`,{className:`mt-3 max-w-lg text-sm leading-6 aui-text-muted`,children:`Use AsyncSelect only when the main Select flow is not enough because the option set is large, remote, or hydration-aware.`})]}),(0,i.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,i.jsx)(e.Badge,{variant:`outline`,className:`rounded-full`,children:`Async`}),(0,i.jsx)(e.Badge,{variant:`outline`,className:`rounded-full`,children:`Search`}),(0,i.jsx)(e.Badge,{variant:`outline`,className:`rounded-full`,children:`Clearable`})]})]}),(0,i.jsxs)(`div`,{className:`mt-6 grid gap-4 xl:grid-cols-[1.12fr_0.88fr]`,children:[(0,i.jsxs)(`div`,{className:o,children:[(0,i.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Assign service region`}),(0,i.jsx)(`div`,{className:`mt-3`,children:(0,i.jsx)(t.AsyncSelect,{value:c,onValueChange:e=>l(e??``),loadOptions:s,defaultOptions:a,minSearchLength:1,clearable:!0,showSelectedDescription:!0,debounceMs:220,labels:{placeholder:`Choose service region`,searchPlaceholder:`Search regions...`}})}),(0,i.jsxs)(`div`,{className:`mt-5`,children:[(0,i.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Multi select uses the same component`}),(0,i.jsx)(`div`,{className:`mt-3`,children:(0,i.jsx)(t.AsyncSelect,{isMulti:!0,value:u,onValueChange:e=>d(e),loadOptions:s,defaultOptions:a,minSearchLength:1,clearable:!0,showSelectAll:!0,maxSelected:3,maxVisibleTags:2,showSelectedDescription:!0,debounceMs:220,labels:{multiPlaceholder:`Choose team coverage`,searchPlaceholder:`Search team regions...`,selectedCount:e=>`${e} regions selected`,hiddenSelected:e=>`+${e} more`}})})]}),(0,i.jsxs)(`div`,{className:`mt-4 grid gap-3 md:grid-cols-3`,children:[(0,i.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm`,children:[(0,i.jsx)(`p`,{className:`font-medium aui-text-strong`,children:`Type to query`}),(0,i.jsx)(`p`,{className:`mt-2 leading-6 aui-text-muted`,children:`Minimum search length keeps remote requests intentional.`})]}),(0,i.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm`,children:[(0,i.jsx)(`p`,{className:`font-medium aui-text-strong`,children:`Clear safely`}),(0,i.jsx)(`p`,{className:`mt-2 leading-6 aui-text-muted`,children:`Clear action is isolated from the trigger surface.`})]}),(0,i.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm`,children:[(0,i.jsx)(`p`,{className:`font-medium aui-text-strong`,children:`Hydrate selection`}),(0,i.jsx)(`p`,{className:`mt-2 leading-6 aui-text-muted`,children:`Selected value can be restored from ID-first edit state.`})]})]})]}),(0,i.jsxs)(`div`,{className:o,children:[(0,i.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Selected result`}),(0,i.jsx)(`p`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:f?.label||`No region selected`}),(0,i.jsx)(`p`,{className:`mt-2 text-sm leading-6 aui-text-muted`,children:`Start typing to simulate remote filtering. This should feel like a specialized extension of Select, not a completely separate mental model.`}),(0,i.jsxs)(`div`,{className:`mt-4 space-y-3`,children:[(0,i.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3`,children:[(0,i.jsx)(`p`,{className:`text-xs uppercase tracking-[0.2em] aui-text-muted`,children:`Value`}),(0,i.jsx)(`p`,{className:`mt-2 text-sm font-medium aui-text-strong`,children:c||`none`})]}),(0,i.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3`,children:[(0,i.jsx)(`p`,{className:`text-xs uppercase tracking-[0.2em] aui-text-muted`,children:`Team`}),(0,i.jsx)(`p`,{className:`mt-2 text-sm font-medium aui-text-strong`,children:f?n.routeWorkspaceOptions.find(e=>e.value===f.value)?.team:`No team`})]}),(0,i.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3`,children:[(0,i.jsx)(`p`,{className:`text-xs uppercase tracking-[0.2em] aui-text-muted`,children:`Multi mode`}),(0,i.jsx)(`p`,{className:`mt-2 text-sm font-medium aui-text-strong`,children:p.length?p.map(e=>e.label).join(`, `):`No teams selected`})]})]})]})]})]})})}exports.AsyncSelectShowcase=c;
|
|
@@ -10,7 +10,7 @@ var o = n, s = "rounded-[22px] border border-[color:var(--aui-divider)] bg-[colo
|
|
|
10
10
|
return t ? o.filter((e) => String(e.label ?? "").toLowerCase().includes(t)) : o;
|
|
11
11
|
};
|
|
12
12
|
function l() {
|
|
13
|
-
let [l, u] = r(""), d = n.find((e) => e.value === l);
|
|
13
|
+
let [l, u] = r(""), [d, f] = r(["north", "west"]), p = n.find((e) => e.value === l), m = n.filter((e) => d.includes(String(e.value)));
|
|
14
14
|
return /* @__PURE__ */ i("div", {
|
|
15
15
|
className: "space-y-5",
|
|
16
16
|
children: /* @__PURE__ */ a("section", {
|
|
@@ -71,9 +71,43 @@ function l() {
|
|
|
71
71
|
defaultOptions: o,
|
|
72
72
|
minSearchLength: 1,
|
|
73
73
|
clearable: !0,
|
|
74
|
-
|
|
74
|
+
showSelectedDescription: !0,
|
|
75
|
+
debounceMs: 220,
|
|
76
|
+
labels: {
|
|
77
|
+
placeholder: "Choose service region",
|
|
78
|
+
searchPlaceholder: "Search regions..."
|
|
79
|
+
}
|
|
75
80
|
})
|
|
76
81
|
}),
|
|
82
|
+
/* @__PURE__ */ a("div", {
|
|
83
|
+
className: "mt-5",
|
|
84
|
+
children: [/* @__PURE__ */ i("p", {
|
|
85
|
+
className: "text-sm font-medium aui-text-muted",
|
|
86
|
+
children: "Multi select uses the same component"
|
|
87
|
+
}), /* @__PURE__ */ i("div", {
|
|
88
|
+
className: "mt-3",
|
|
89
|
+
children: /* @__PURE__ */ i(t, {
|
|
90
|
+
isMulti: !0,
|
|
91
|
+
value: d,
|
|
92
|
+
onValueChange: (e) => f(e),
|
|
93
|
+
loadOptions: c,
|
|
94
|
+
defaultOptions: o,
|
|
95
|
+
minSearchLength: 1,
|
|
96
|
+
clearable: !0,
|
|
97
|
+
showSelectAll: !0,
|
|
98
|
+
maxSelected: 3,
|
|
99
|
+
maxVisibleTags: 2,
|
|
100
|
+
showSelectedDescription: !0,
|
|
101
|
+
debounceMs: 220,
|
|
102
|
+
labels: {
|
|
103
|
+
multiPlaceholder: "Choose team coverage",
|
|
104
|
+
searchPlaceholder: "Search team regions...",
|
|
105
|
+
selectedCount: (e) => `${e} regions selected`,
|
|
106
|
+
hiddenSelected: (e) => `+${e} more`
|
|
107
|
+
}
|
|
108
|
+
})
|
|
109
|
+
})]
|
|
110
|
+
}),
|
|
77
111
|
/* @__PURE__ */ a("div", {
|
|
78
112
|
className: "mt-4 grid gap-3 md:grid-cols-3",
|
|
79
113
|
children: [
|
|
@@ -119,7 +153,7 @@ function l() {
|
|
|
119
153
|
}),
|
|
120
154
|
/* @__PURE__ */ i("p", {
|
|
121
155
|
className: "mt-3 text-2xl font-semibold tracking-tight aui-text-strong",
|
|
122
|
-
children:
|
|
156
|
+
children: p?.label || "No region selected"
|
|
123
157
|
}),
|
|
124
158
|
/* @__PURE__ */ i("p", {
|
|
125
159
|
className: "mt-2 text-sm leading-6 aui-text-muted",
|
|
@@ -127,25 +161,38 @@ function l() {
|
|
|
127
161
|
}),
|
|
128
162
|
/* @__PURE__ */ a("div", {
|
|
129
163
|
className: "mt-4 space-y-3",
|
|
130
|
-
children: [
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
className: "
|
|
143
|
-
children: "
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
164
|
+
children: [
|
|
165
|
+
/* @__PURE__ */ a("div", {
|
|
166
|
+
className: "rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3",
|
|
167
|
+
children: [/* @__PURE__ */ i("p", {
|
|
168
|
+
className: "text-xs uppercase tracking-[0.2em] aui-text-muted",
|
|
169
|
+
children: "Value"
|
|
170
|
+
}), /* @__PURE__ */ i("p", {
|
|
171
|
+
className: "mt-2 text-sm font-medium aui-text-strong",
|
|
172
|
+
children: l || "none"
|
|
173
|
+
})]
|
|
174
|
+
}),
|
|
175
|
+
/* @__PURE__ */ a("div", {
|
|
176
|
+
className: "rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3",
|
|
177
|
+
children: [/* @__PURE__ */ i("p", {
|
|
178
|
+
className: "text-xs uppercase tracking-[0.2em] aui-text-muted",
|
|
179
|
+
children: "Team"
|
|
180
|
+
}), /* @__PURE__ */ i("p", {
|
|
181
|
+
className: "mt-2 text-sm font-medium aui-text-strong",
|
|
182
|
+
children: p ? n.find((e) => e.value === p.value)?.team : "No team"
|
|
183
|
+
})]
|
|
184
|
+
}),
|
|
185
|
+
/* @__PURE__ */ a("div", {
|
|
186
|
+
className: "rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3",
|
|
187
|
+
children: [/* @__PURE__ */ i("p", {
|
|
188
|
+
className: "text-xs uppercase tracking-[0.2em] aui-text-muted",
|
|
189
|
+
children: "Multi mode"
|
|
190
|
+
}), /* @__PURE__ */ i("p", {
|
|
191
|
+
className: "mt-2 text-sm font-medium aui-text-strong",
|
|
192
|
+
children: m.length ? m.map((e) => e.label).join(", ") : "No teams selected"
|
|
193
|
+
})]
|
|
194
|
+
})
|
|
195
|
+
]
|
|
149
196
|
})
|
|
150
197
|
]
|
|
151
198
|
})]
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../components/ui/button/index.cjs"),n=require("../../../components/ui/badge/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("lucide-react"),a=require("react/jsx-runtime");var o=[[`Default`,`default`],[`Secondary`,`secondary`],[`Outline`,`outline`],[`Ghost`,`ghost`],[`Destructive`,`destructive`]],s=[`Ready`,`Focus`,`Loading`,`Disabled`],c=`border-t border-[color:var(--aui-divider)] py-6`;function l({label:e,variant:n}){return(0,a.jsxs)(`div`,{className:`grid gap-3 border-b border-[color:var(--aui-divider)] py-4 last:border-b-0 md:grid-cols-[160px_1fr] md:items-center`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`aui-text-strong text-sm font-semibold`,children:e}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-1 text-xs`,children:`npm package variant`})]}),(0,a.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,a.jsx)(t.Button,{variant:n,children:e}),(0,a.jsx)(t.Button,{variant:n,size:`sm`,children:`Small`}),(0,a.jsx)(t.Button,{variant:n,size:`icon`,"aria-label":`${e} icon button`,children:(0,a.jsx)(i.ArrowRightIcon,{className:`size-4`})})]})]})}function u({state:e,variant:n}){return e===`Loading`?(0,a.jsx)(t.Button,{variant:n,loading:!0,loadingLabel:`Saving`,children:`Save`}):(0,a.jsx)(t.Button,{variant:n,disabled:e===`Disabled`,className:e===`Focus`?`ring-2 ring-[color:var(--aui-ring)] ring-offset-2 ring-offset-[color:var(--aui-page-bg)]`:void 0,children:e})}function d(){let[e,d]=r.useState(`default`),[f,p]=r.useState(`idle`),[m,h]=r.useState(0);return(0,a.jsxs)(`div`,{className:`space-y-0`,children:[(0,a.jsxs)(`section`,{className:`pb-6`,children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Installed from npm`}),(0,a.jsx)(`h3`,{className:`aui-text-strong mt-3 text-2xl font-semibold tracking-tight`,children:`Real tembro buttons`}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-3 max-w-2xl text-sm leading-6`,children:`This preview uses the exported Button component directly from the installed package. The docs page only provides spacing around it.`})]}),(0,a.
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../components/ui/button/index.cjs"),n=require("../../../components/ui/badge/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("lucide-react"),a=require("react/jsx-runtime");var o=[[`Default`,`default`],[`Secondary`,`secondary`],[`Outline`,`outline`],[`Ghost`,`ghost`],[`Destructive`,`destructive`]],s=[`Ready`,`Focus`,`Loading`,`Disabled`],c=`border-t border-[color:var(--aui-divider)] py-6`;function l({label:e,variant:n}){return(0,a.jsxs)(`div`,{className:`grid gap-3 border-b border-[color:var(--aui-divider)] py-4 last:border-b-0 md:grid-cols-[160px_1fr] md:items-center`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`aui-text-strong text-sm font-semibold`,children:e}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-1 text-xs`,children:`npm package variant`})]}),(0,a.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,a.jsx)(t.Button,{variant:n,children:e}),(0,a.jsx)(t.Button,{variant:n,size:`sm`,children:`Small`}),(0,a.jsx)(t.Button,{variant:n,size:`icon`,"aria-label":`${e} icon button`,children:(0,a.jsx)(i.ArrowRightIcon,{className:`size-4`})})]})]})}function u({state:e,variant:n}){return e===`Loading`?(0,a.jsx)(t.Button,{variant:n,loading:!0,loadingLabel:`Saving`,children:`Save`}):(0,a.jsx)(t.Button,{variant:n,pressed:e===`Focus`,disabled:e===`Disabled`,className:e===`Focus`?`ring-2 ring-[color:var(--aui-ring)] ring-offset-2 ring-offset-[color:var(--aui-page-bg)]`:void 0,children:e})}function d(){let[e,d]=r.useState(`default`),[f,p]=r.useState(`idle`),[m,h]=r.useState(0);return(0,a.jsxs)(`div`,{className:`space-y-0`,children:[(0,a.jsxs)(`section`,{className:`pb-6`,children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.24em] aui-text-muted`,children:`Installed from npm`}),(0,a.jsx)(`h3`,{className:`aui-text-strong mt-3 text-2xl font-semibold tracking-tight`,children:`Real tembro buttons`}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-3 max-w-2xl text-sm leading-6`,children:`This preview uses the exported Button component directly from the installed package. The docs page only provides spacing around it.`})]}),(0,a.jsxs)(`section`,{className:c,children:[(0,a.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[1fr_360px] xl:items-start`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`aui-text-strong text-lg font-semibold`,children:`Approval action row`}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-2 max-w-xl text-sm leading-6`,children:`Primary, secondary and outline actions should read clearly without custom wrapper styles.`}),(0,a.jsx)(`div`,{className:`mt-5 flex flex-wrap gap-2`,children:o.map(([n,r])=>(0,a.jsx)(t.Button,{type:`button`,size:`sm`,variant:e===r?`default`:`outline`,onClick:()=>d(r),children:n},r))})]}),(0,a.jsxs)(`div`,{className:`rounded-xl border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] p-4`,children:[(0,a.jsxs)(`div`,{className:`flex items-start justify-between gap-4`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`aui-text-strong text-sm font-semibold`,children:`Invoice #4821`}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-1 text-xs`,children:`Requires finance approval`})]}),(0,a.jsx)(n.Badge,{variant:f===`done`?`secondary`:`outline`,children:f===`idle`?`Pending`:f===`saving`?`Saving`:`Approved`})]}),(0,a.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center gap-2`,children:[(0,a.jsx)(t.Button,{variant:`secondary`,onClick:()=>h(e=>e+1),children:`Save draft`}),(0,a.jsx)(t.Button,{variant:`outline`,children:`Preview`}),(0,a.jsx)(t.Button,{variant:e,fullWidth:!0,loading:f===`saving`,loadingLabel:`Approving`,onClick:()=>{h(e=>e+1),p(`saving`),window.setTimeout(()=>p(`done`),850)},children:f===`done`?`Approved`:`Approve invoice`})]})]})]}),(0,a.jsxs)(`div`,{className:`mt-6 grid gap-3 md:grid-cols-4`,children:[(0,a.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm`,children:[(0,a.jsx)(`p`,{className:`font-medium aui-text-strong`,children:`Primary`}),(0,a.jsx)(`p`,{className:`mt-2 leading-6 aui-text-muted`,children:`Main action with filled emphasis.`})]}),(0,a.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm`,children:[(0,a.jsx)(`p`,{className:`font-medium aui-text-strong`,children:`Secondary`}),(0,a.jsx)(`p`,{className:`mt-2 leading-6 aui-text-muted`,children:`Alternative action without stealing focus.`})]}),(0,a.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm`,children:[(0,a.jsx)(`p`,{className:`font-medium aui-text-strong`,children:`Outline`}),(0,a.jsx)(`p`,{className:`mt-2 leading-6 aui-text-muted`,children:`Low-emphasis action for previews and neutral workflows.`})]}),(0,a.jsxs)(`div`,{className:`rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm`,children:[(0,a.jsx)(`p`,{className:`font-medium aui-text-strong`,children:`Destructive`}),(0,a.jsx)(`p`,{className:`mt-2 leading-6 aui-text-muted`,children:`Reserved for archive, delete, or dangerous transitions.`})]})]})]}),(0,a.jsx)(`section`,{className:c,children:(0,a.jsxs)(`div`,{className:`grid gap-6 xl:grid-cols-[1fr_1fr]`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`aui-text-strong text-lg font-semibold`,children:`Interaction states`}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-2 max-w-xl text-sm leading-6`,children:`Keep the important states visible without a heavy table or nested card matrix.`}),(0,a.jsx)(`div`,{className:`mt-5 grid gap-3 sm:grid-cols-2`,children:s.map(t=>(0,a.jsxs)(`div`,{className:`flex items-center justify-between gap-4 border-b border-[color:var(--aui-divider)] py-3`,children:[(0,a.jsx)(`span`,{className:`aui-text-muted text-xs font-semibold uppercase tracking-[0.2em]`,children:t}),(0,a.jsx)(u,{state:t,variant:e})]},t))})]}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`aui-text-strong text-lg font-semibold`,children:`Variant rail`}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-2 max-w-xl text-sm leading-6`,children:`All variants use the same exported Button API.`}),(0,a.jsx)(`div`,{className:`mt-2`,children:o.map(([e,t])=>(0,a.jsx)(l,{label:e,variant:t},t))})]})]})}),(0,a.jsx)(`section`,{className:c,children:(0,a.jsxs)(`div`,{className:`grid gap-5 xl:grid-cols-[1fr_1fr]`,children:[(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`aui-text-strong text-lg font-semibold`,children:`Production footer`}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-2 max-w-xl text-sm leading-6`,children:`A compact footer pattern for forms, settings pages and dashboard actions.`}),(0,a.jsxs)(`div`,{className:`mt-5 flex flex-wrap items-center gap-2`,children:[(0,a.jsx)(t.Button,{variant:`secondary`,children:`Save draft`}),(0,a.jsx)(t.Button,{variant:`outline`,children:`Preview`}),(0,a.jsxs)(t.Button,{children:[`Continue`,(0,a.jsx)(i.ArrowRightIcon,{className:`ml-2 size-4`})]})]})]}),(0,a.jsxs)(`div`,{children:[(0,a.jsx)(`p`,{className:`aui-text-strong text-lg font-semibold`,children:`Icon, async and danger`}),(0,a.jsx)(`p`,{className:`aui-text-muted mt-2 max-w-xl text-sm leading-6`,children:`Loading and disabled states stay readable; destructive actions remain visually distinct.`}),(0,a.jsxs)(`div`,{className:`mt-5 flex flex-wrap items-center gap-2`,children:[(0,a.jsxs)(t.Button,{variant:`destructive`,children:[(0,a.jsx)(i.Trash2Icon,{className:`mr-2 size-4`}),`Delete`]}),(0,a.jsx)(t.Button,{loading:!0,loadingLabel:`Publishing`,children:`Publish`}),(0,a.jsx)(t.Button,{variant:`outline`,size:`icon`,"aria-label":`Download`,children:(0,a.jsx)(i.DownloadIcon,{className:`size-4`})}),(0,a.jsx)(`a`,{href:`#`,className:t.buttonVariants({variant:`link`}),children:`Text link`})]})]})]})}),(0,a.jsx)(`section`,{className:c,children:(0,a.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 text-sm`,children:[(0,a.jsx)(`span`,{className:`aui-text-muted`,children:`Interaction count:`}),(0,a.jsx)(n.Badge,{variant:`secondary`,children:m}),(0,a.jsx)(`span`,{className:`aui-text-muted`,children:`Selected variant:`}),(0,a.jsx)(n.Badge,{variant:`outline`,children:e})]})})]})}exports.ButtonShowcase=d;
|
|
@@ -55,6 +55,7 @@ function p({ state: t, variant: n }) {
|
|
|
55
55
|
children: "Save"
|
|
56
56
|
}) : /* @__PURE__ */ s(e, {
|
|
57
57
|
variant: n,
|
|
58
|
+
pressed: t === "Focus",
|
|
58
59
|
disabled: t === "Disabled",
|
|
59
60
|
className: t === "Focus" ? "ring-2 ring-[color:var(--aui-ring)] ring-offset-2 ring-offset-[color:var(--aui-page-bg)]" : void 0,
|
|
60
61
|
children: t
|
|
@@ -82,9 +83,9 @@ function m() {
|
|
|
82
83
|
})
|
|
83
84
|
]
|
|
84
85
|
}),
|
|
85
|
-
/* @__PURE__ */
|
|
86
|
+
/* @__PURE__ */ c("section", {
|
|
86
87
|
className: d,
|
|
87
|
-
children: /* @__PURE__ */ c("div", {
|
|
88
|
+
children: [/* @__PURE__ */ c("div", {
|
|
88
89
|
className: "grid gap-6 xl:grid-cols-[1fr_360px] xl:items-start",
|
|
89
90
|
children: [/* @__PURE__ */ c("div", { children: [
|
|
90
91
|
/* @__PURE__ */ s("p", {
|
|
@@ -133,6 +134,7 @@ function m() {
|
|
|
133
134
|
}),
|
|
134
135
|
/* @__PURE__ */ s(e, {
|
|
135
136
|
variant: m,
|
|
137
|
+
fullWidth: !0,
|
|
136
138
|
loading: g === "saving",
|
|
137
139
|
loadingLabel: "Approving",
|
|
138
140
|
onClick: () => {
|
|
@@ -143,7 +145,51 @@ function m() {
|
|
|
143
145
|
]
|
|
144
146
|
})]
|
|
145
147
|
})]
|
|
146
|
-
})
|
|
148
|
+
}), /* @__PURE__ */ c("div", {
|
|
149
|
+
className: "mt-6 grid gap-3 md:grid-cols-4",
|
|
150
|
+
children: [
|
|
151
|
+
/* @__PURE__ */ c("div", {
|
|
152
|
+
className: "rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm",
|
|
153
|
+
children: [/* @__PURE__ */ s("p", {
|
|
154
|
+
className: "font-medium aui-text-strong",
|
|
155
|
+
children: "Primary"
|
|
156
|
+
}), /* @__PURE__ */ s("p", {
|
|
157
|
+
className: "mt-2 leading-6 aui-text-muted",
|
|
158
|
+
children: "Main action with filled emphasis."
|
|
159
|
+
})]
|
|
160
|
+
}),
|
|
161
|
+
/* @__PURE__ */ c("div", {
|
|
162
|
+
className: "rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm",
|
|
163
|
+
children: [/* @__PURE__ */ s("p", {
|
|
164
|
+
className: "font-medium aui-text-strong",
|
|
165
|
+
children: "Secondary"
|
|
166
|
+
}), /* @__PURE__ */ s("p", {
|
|
167
|
+
className: "mt-2 leading-6 aui-text-muted",
|
|
168
|
+
children: "Alternative action without stealing focus."
|
|
169
|
+
})]
|
|
170
|
+
}),
|
|
171
|
+
/* @__PURE__ */ c("div", {
|
|
172
|
+
className: "rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm",
|
|
173
|
+
children: [/* @__PURE__ */ s("p", {
|
|
174
|
+
className: "font-medium aui-text-strong",
|
|
175
|
+
children: "Outline"
|
|
176
|
+
}), /* @__PURE__ */ s("p", {
|
|
177
|
+
className: "mt-2 leading-6 aui-text-muted",
|
|
178
|
+
children: "Low-emphasis action for previews and neutral workflows."
|
|
179
|
+
})]
|
|
180
|
+
}),
|
|
181
|
+
/* @__PURE__ */ c("div", {
|
|
182
|
+
className: "rounded-[18px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg-alt)] px-4 py-3 text-sm",
|
|
183
|
+
children: [/* @__PURE__ */ s("p", {
|
|
184
|
+
className: "font-medium aui-text-strong",
|
|
185
|
+
children: "Destructive"
|
|
186
|
+
}), /* @__PURE__ */ s("p", {
|
|
187
|
+
className: "mt-2 leading-6 aui-text-muted",
|
|
188
|
+
children: "Reserved for archive, delete, or dangerous transitions."
|
|
189
|
+
})]
|
|
190
|
+
})
|
|
191
|
+
]
|
|
192
|
+
})]
|
|
147
193
|
}),
|
|
148
194
|
/* @__PURE__ */ s("section", {
|
|
149
195
|
className: d,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../components/actions/button-group.cjs"),n=require("../../../components/ui/badge/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=`rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5`;function o({mode:e}){let[o,s]=r.useState(`list`);return(0,i.jsxs)(`div`,{className:`space-y-5`,children:[(0,i.jsx)(`section`,{className:`rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6`,children:(0,i.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-start xl:justify-between`,children:[(0,i.jsxs)(`div`,{className:`max-w-xl`,children:[(0,i.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted`,children:`Grouped control`}),(0,i.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`ButtonGroup should make adjacent choices feel like one control set`}),(0,i.jsx)(`p`,{className:`mt-3 max-w-lg text-sm leading-6 aui-text-muted`,children:`Use it for closely related toggles like view mode or density. It should reduce toolbar noise, not create another visual cluster.`})]}),(0,i.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,i.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`View switching`}),(0,i.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Toolbar compactness`})]})]})}),(0,i.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:[(0,i.
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../components/actions/button-group.cjs"),n=require("../../../components/ui/badge/index.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=`rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5`;function o({mode:e}){let[o,s]=r.useState(`list`),[c,l]=r.useState(`comfortable`);return(0,i.jsxs)(`div`,{className:`space-y-5`,children:[(0,i.jsx)(`section`,{className:`rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6`,children:(0,i.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-start xl:justify-between`,children:[(0,i.jsxs)(`div`,{className:`max-w-xl`,children:[(0,i.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted`,children:`Grouped control`}),(0,i.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`ButtonGroup should make adjacent choices feel like one control set`}),(0,i.jsx)(`p`,{className:`mt-3 max-w-lg text-sm leading-6 aui-text-muted`,children:`Use it for closely related toggles like view mode or density. It should reduce toolbar noise, not create another visual cluster.`})]}),(0,i.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,i.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`View switching`}),(0,i.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Toolbar compactness`})]})]})}),(0,i.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:[(0,i.jsxs)(`section`,{className:a,children:[(0,i.jsx)(t.ButtonGroup,{value:o,onValueChange:e=>s(e),items:[{key:`list`,label:`List`,description:`Rows first`},{key:`board`,label:`Board`,description:`Kanban view`},{key:`timeline`,label:`Timeline`,description:`Chronology`}]}),(0,i.jsx)(`div`,{className:`mt-4`,children:(0,i.jsx)(t.ButtonGroup,{value:c,onValueChange:e=>l(e),size:`xs`,activeVariant:`secondary`,allowDeselect:!0,items:[{key:`comfortable`,label:`Comfortable`},{key:`compact`,label:`Compact`}]})})]}),(0,i.jsxs)(`section`,{className:a,children:[(0,i.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Selected view`}),(0,i.jsx)(`p`,{className:`mt-3 text-base font-medium aui-text-strong`,children:o}),(0,i.jsxs)(`p`,{className:`mt-2 text-sm aui-text-muted`,children:[`Density: `,c||`none`]})]})]}),e===`playground`?(0,i.jsx)(`section`,{className:a,children:(0,i.jsx)(`p`,{className:`text-sm aui-text-muted`,children:`ButtonGroup list/board/timeline kabi yaqin tanlovlar uchun yaxshi ishlaydi.`})}):null]})}exports.ButtonGroupShowcase=o;
|
|
@@ -5,7 +5,7 @@ import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
|
5
5
|
//#region src/showcase/premium/button-group/showcase.tsx
|
|
6
6
|
var a = "rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5";
|
|
7
7
|
function o({ mode: o }) {
|
|
8
|
-
let [s, c] = n.useState("list");
|
|
8
|
+
let [s, c] = n.useState("list"), [l, u] = n.useState("comfortable");
|
|
9
9
|
return /* @__PURE__ */ i("div", {
|
|
10
10
|
className: "space-y-5",
|
|
11
11
|
children: [
|
|
@@ -45,37 +45,61 @@ function o({ mode: o }) {
|
|
|
45
45
|
}),
|
|
46
46
|
/* @__PURE__ */ i("div", {
|
|
47
47
|
className: "grid gap-4 xl:grid-cols-2",
|
|
48
|
-
children: [/* @__PURE__ */
|
|
48
|
+
children: [/* @__PURE__ */ i("section", {
|
|
49
49
|
className: a,
|
|
50
|
-
children: /* @__PURE__ */ r(e, {
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
50
|
+
children: [/* @__PURE__ */ r(e, {
|
|
51
|
+
value: s,
|
|
52
|
+
onValueChange: (e) => c(e),
|
|
53
|
+
items: [
|
|
54
|
+
{
|
|
55
|
+
key: "list",
|
|
56
|
+
label: "List",
|
|
57
|
+
description: "Rows first"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
key: "board",
|
|
61
|
+
label: "Board",
|
|
62
|
+
description: "Kanban view"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
key: "timeline",
|
|
66
|
+
label: "Timeline",
|
|
67
|
+
description: "Chronology"
|
|
68
|
+
}
|
|
69
|
+
]
|
|
70
|
+
}), /* @__PURE__ */ r("div", {
|
|
71
|
+
className: "mt-4",
|
|
72
|
+
children: /* @__PURE__ */ r(e, {
|
|
73
|
+
value: l,
|
|
74
|
+
onValueChange: (e) => u(e),
|
|
75
|
+
size: "xs",
|
|
76
|
+
activeVariant: "secondary",
|
|
77
|
+
allowDeselect: !0,
|
|
78
|
+
items: [{
|
|
79
|
+
key: "comfortable",
|
|
80
|
+
label: "Comfortable"
|
|
81
|
+
}, {
|
|
82
|
+
key: "compact",
|
|
83
|
+
label: "Compact"
|
|
84
|
+
}]
|
|
85
|
+
})
|
|
86
|
+
})]
|
|
70
87
|
}), /* @__PURE__ */ i("section", {
|
|
71
88
|
className: a,
|
|
72
|
-
children: [
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
89
|
+
children: [
|
|
90
|
+
/* @__PURE__ */ r("p", {
|
|
91
|
+
className: "text-sm font-medium aui-text-muted",
|
|
92
|
+
children: "Selected view"
|
|
93
|
+
}),
|
|
94
|
+
/* @__PURE__ */ r("p", {
|
|
95
|
+
className: "mt-3 text-base font-medium aui-text-strong",
|
|
96
|
+
children: s
|
|
97
|
+
}),
|
|
98
|
+
/* @__PURE__ */ i("p", {
|
|
99
|
+
className: "mt-2 text-sm aui-text-muted",
|
|
100
|
+
children: ["Density: ", l || "none"]
|
|
101
|
+
})
|
|
102
|
+
]
|
|
79
103
|
})]
|
|
80
104
|
}),
|
|
81
105
|
o === "playground" ? /* @__PURE__ */ r("section", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../components/ui/button/index.cjs"),n=require("../../../components/ui/badge/index.cjs"),r=require("../../../components/calendar/calendar.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o=`rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5`,s=[`2026-07-18`,`2026-07-19`,`2026-07-25`];function c({mode:e}){let[c,l]=i.useState(`2026-07-14`),[u,d]=i.useState({from:`2026-07-10`,to:`2026-07-15`}),[f,p]=i.useState(2);return(0,a.jsxs)(`div`,{className:`space-y-5`,children:[(0,a.jsx)(`section`,{className:`rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6`,children:(0,a.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-start xl:justify-between`,children:[(0,a.jsxs)(`div`,{className:`max-w-xl`,children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted`,children:`Date control`}),(0,a.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`Calendar should feel precise, not decorative`}),(0,a.jsx)(`p`,{className:`mt-3 max-w-lg text-sm leading-6 aui-text-muted`,children:`Real usage needs visible range selection, disabled business dates, and month comparison without clutter. This surface shows all three.`})]}),(0,a.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,a.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Range mode`}),(0,a.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Blocked dates`})]})]})}),(0,a.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[1.15fr_0.85fr]`,children:[(0,a.jsxs)(`section`,{className:o,children:[(0,a.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Range selection`}),(0,a.jsx)(`div`,{className:`mt-4 overflow-x-auto pb-1`,children:(0,a.jsx)(r.Calendar,{mode:`range`,range:u,onRangeChange:d,defaultMonth:`2026-07-01`,min:`2026-07-01`,max:`2026-08-31`,disabledDates:s,numberOfMonths:f,pagedNavigation:!0})})]}),(0,a.jsxs)(`div`,{className:`space-y-4`,children:[(0,a.jsxs)(`section`,{className:o,children:[(0,a.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Single date`}),(0,a.jsx)(`div`,{className:`mt-4 overflow-x-auto pb-1`,children:(0,a.jsx)(r.Calendar,{value:c,onValueChange:l,defaultMonth:`2026-07-01`,min:`2026-07-01`,max:`2026-07-31`,disabledDates:s})})]}),(0,a.jsxs)(`section`,{className:o,children:[(0,a.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Selection summary`}),(0,a.jsxs)(`div`,{className:`mt-4 space-y-3 text-sm leading-6 aui-text-muted`,children:[(0,a.jsxs)(`p`,{children:[`Single: `,(0,a.jsx)(`span`,{className:`font-medium aui-text-strong`,children:c})]}),(0,a.jsxs)(`p`,{children:[`Range start: `,(0,a.jsx)(`span`,{className:`font-medium aui-text-strong`,children:u.from??`not selected`})]}),(0,a.jsxs)(`p`,{children:[`Range end: `,(0,a.jsx)(`span`,{className:`font-medium aui-text-strong`,children:u.to??`not selected`})]})]})]})]})]}),e===`playground`?(0,a.jsx)(`section`,{className:o,children:(0,a.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,a.jsx)(t.Button,{size:`sm`,variant:f===1?`default`:`outline`,onClick:()=>p(1),children:`1 month`}),(0,a.jsx)(t.Button,{size:`sm`,variant:f===2?`default`:`outline`,onClick:()=>p(2),children:`2 months`}),(0,a.jsx)(t.Button,{size:`sm`,variant:`outline`,onClick:()=>{l(`2026-07-14`),d({from:`2026-07-10`,to:`2026-07-15`})},children:`Reset selection`})]})}):null]})}exports.CalendarShowcase=c;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../components/ui/button/index.cjs"),n=require("../../../components/ui/badge/index.cjs"),r=require("../../../components/calendar/calendar.cjs");let i=require("react");i=e.__toESM(i,1);let a=require("react/jsx-runtime");var o=`rounded-[22px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5`,s=[`2026-07-18`,`2026-07-19`,`2026-07-25`];function c({mode:e}){let[c,l]=i.useState(`2026-07-14`),[u,d]=i.useState({from:`2026-07-10`,to:`2026-07-15`}),[f,p]=i.useState(2);return(0,a.jsxs)(`div`,{className:`space-y-5`,children:[(0,a.jsx)(`section`,{className:`rounded-[24px] border border-[color:var(--aui-divider)] bg-[color:var(--aui-page-bg)] p-5 sm:p-6`,children:(0,a.jsxs)(`div`,{className:`flex flex-col gap-6 xl:flex-row xl:items-start xl:justify-between`,children:[(0,a.jsxs)(`div`,{className:`max-w-xl`,children:[(0,a.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.26em] aui-text-muted`,children:`Date control`}),(0,a.jsx)(`h3`,{className:`mt-3 text-2xl font-semibold tracking-tight aui-text-strong`,children:`Calendar should feel precise, not decorative`}),(0,a.jsx)(`p`,{className:`mt-3 max-w-lg text-sm leading-6 aui-text-muted`,children:`Real usage needs visible range selection, disabled business dates, and month comparison without clutter. This surface shows all three.`})]}),(0,a.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,a.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Range mode`}),(0,a.jsx)(n.Badge,{variant:`outline`,className:`rounded-full`,children:`Blocked dates`})]})]})}),(0,a.jsxs)(`div`,{className:`grid gap-4 xl:grid-cols-[1.15fr_0.85fr]`,children:[(0,a.jsxs)(`section`,{className:o,children:[(0,a.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Range selection`}),(0,a.jsx)(`div`,{className:`mt-4 overflow-x-auto pb-1`,children:(0,a.jsx)(r.Calendar,{mode:`range`,range:u,onRangeChange:d,defaultMonth:`2026-07-01`,min:`2026-07-01`,max:`2026-08-31`,disabledDates:s,numberOfMonths:f,pagedNavigation:!0,showClearShortcut:!0,showTodayShortcut:!0,showSelectionSummary:!0})})]}),(0,a.jsxs)(`div`,{className:`space-y-4`,children:[(0,a.jsxs)(`section`,{className:o,children:[(0,a.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Single date`}),(0,a.jsx)(`div`,{className:`mt-4 overflow-x-auto pb-1`,children:(0,a.jsx)(r.Calendar,{value:c,onValueChange:l,defaultMonth:`2026-07-01`,min:`2026-07-01`,max:`2026-07-31`,disabledDates:s,showClearShortcut:!0,showSelectionSummary:!0})})]}),(0,a.jsxs)(`section`,{className:o,children:[(0,a.jsx)(`p`,{className:`text-sm font-medium aui-text-muted`,children:`Selection summary`}),(0,a.jsxs)(`div`,{className:`mt-4 space-y-3 text-sm leading-6 aui-text-muted`,children:[(0,a.jsxs)(`p`,{children:[`Single: `,(0,a.jsx)(`span`,{className:`font-medium aui-text-strong`,children:c})]}),(0,a.jsxs)(`p`,{children:[`Range start: `,(0,a.jsx)(`span`,{className:`font-medium aui-text-strong`,children:u.from??`not selected`})]}),(0,a.jsxs)(`p`,{children:[`Range end: `,(0,a.jsx)(`span`,{className:`font-medium aui-text-strong`,children:u.to??`not selected`})]})]})]})]})]}),e===`playground`?(0,a.jsx)(`section`,{className:o,children:(0,a.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,a.jsx)(t.Button,{size:`sm`,variant:f===1?`default`:`outline`,onClick:()=>p(1),children:`1 month`}),(0,a.jsx)(t.Button,{size:`sm`,variant:f===2?`default`:`outline`,onClick:()=>p(2),children:`2 months`}),(0,a.jsx)(t.Button,{size:`sm`,variant:`outline`,onClick:()=>{l(`2026-07-14`),d({from:`2026-07-10`,to:`2026-07-15`})},children:`Reset selection`})]})}):null]})}exports.CalendarShowcase=c;
|
|
@@ -69,7 +69,10 @@ function c({ mode: c }) {
|
|
|
69
69
|
max: "2026-08-31",
|
|
70
70
|
disabledDates: s,
|
|
71
71
|
numberOfMonths: p,
|
|
72
|
-
pagedNavigation: !0
|
|
72
|
+
pagedNavigation: !0,
|
|
73
|
+
showClearShortcut: !0,
|
|
74
|
+
showTodayShortcut: !0,
|
|
75
|
+
showSelectionSummary: !0
|
|
73
76
|
})
|
|
74
77
|
})]
|
|
75
78
|
}), /* @__PURE__ */ a("div", {
|
|
@@ -87,7 +90,9 @@ function c({ mode: c }) {
|
|
|
87
90
|
defaultMonth: "2026-07-01",
|
|
88
91
|
min: "2026-07-01",
|
|
89
92
|
max: "2026-07-31",
|
|
90
|
-
disabledDates: s
|
|
93
|
+
disabledDates: s,
|
|
94
|
+
showClearShortcut: !0,
|
|
95
|
+
showSelectionSummary: !0
|
|
91
96
|
})
|
|
92
97
|
})]
|
|
93
98
|
}), /* @__PURE__ */ a("section", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../components/ui/button/index.cjs"),n=require("../../../components/display/carousel.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=[{title:`Onboarding`,text:`Guide quickly from first login
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../../_virtual/_rolldown/runtime.cjs"),t=require("../../../components/ui/button/index.cjs"),n=require("../../../components/display/carousel.cjs");let r=require("react");r=e.__toESM(r,1);let i=require("react/jsx-runtime");var a=[{title:`Onboarding`,text:`Guide quickly from first login.`,tone:`Launch`},{title:`Components`,text:`Review ready-made dashboard patterns.`,tone:`Library`},{title:`Release`,text:`Publish, test, and iterate faster.`,tone:`Ship`}];function o(){let[e,o]=r.useState(!0),[s,c]=r.useState(!0),[l,u]=r.useState(!1),[d,f]=r.useState(0),[p,m]=r.useState(!1);return(0,i.jsxs)(`div`,{className:`space-y-5`,children:[(0,i.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,i.jsxs)(t.Button,{size:`sm`,variant:e?`default`:`outline`,onClick:()=>o(e=>!e),children:[e?`Hide`:`Show`,` arrows`]}),(0,i.jsxs)(t.Button,{size:`sm`,variant:s?`default`:`outline`,onClick:()=>c(e=>!e),children:[s?`Hide`:`Show`,` dots`]}),(0,i.jsxs)(t.Button,{size:`sm`,variant:l?`default`:`outline`,onClick:()=>u(e=>!e),children:[l?`Stop`:`Start`,` autoplay`]})]}),(0,i.jsx)(`div`,{className:`grid gap-3 md:grid-cols-3`,children:a.map((e,n)=>(0,i.jsxs)(t.Button,{type:`button`,variant:d===n?`default`:`outline`,className:`justify-start`,onClick:()=>f(n),children:[n+1,`. `,e.title]},e.title))}),(0,i.jsx)(n.Carousel,{index:d,loop:!0,showArrows:e,showDots:s,autoplay:l,autoplayInterval:2200,showPlaybackControl:!0,onIndexChange:e=>f(e),onAutoplayChange:m,previousLabel:`Previous slide`,nextLabel:`Next slide`,children:a.map((e,t)=>(0,i.jsx)(n.CarouselItem,{children:(0,i.jsx)(`div`,{className:`min-h-56 rounded-xl border border-border bg-card p-8`,children:(0,i.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,i.jsxs)(`div`,{className:`grid gap-2`,children:[(0,i.jsx)(`p`,{className:`text-[11px] font-semibold uppercase tracking-[0.24em] text-primary`,children:e.tone}),(0,i.jsx)(`p`,{className:`text-xs font-semibold uppercase tracking-[0.2em] text-muted-foreground`,children:`Slide ${t+1}`}),(0,i.jsx)(`h3`,{className:`text-lg font-semibold text-foreground`,children:e.title}),(0,i.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.text})]}),(0,i.jsxs)(`div`,{className:`rounded-full border border-border/70 px-3 py-1 text-xs text-muted-foreground`,children:[t+1,`/`,a.length]})]})})},e.title))}),(0,i.jsxs)(`div`,{className:`text-sm text-muted-foreground`,children:[`Playback: `,p||l?`active`:`paused`]})]})}exports.CarouselShowcase=o;
|