tembro 2.0.4 → 2.0.6
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-pagination.cjs +1 -1
- package/dist/components/data-table/data-table-pagination.js +4 -4
- 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 +8 -6
- package/dist/components/data-table/data-table.js +89 -80
- 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 +16 -1
- package/dist/components/display/carousel.js +71 -26
- 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/display/smart-card.d.ts +1 -1
- package/dist/components/display/status-legend.d.ts +1 -1
- 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.d.ts +3 -4
- package/dist/components/form/form-input.js +285 -224
- package/dist/components/form/form-select.cjs +1 -1
- package/dist/components/form/form-select.d.ts +2 -2
- package/dist/components/form/form-select.js +49 -35
- 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 +14 -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/search-input.d.ts +3 -0
- package/dist/components/inputs/simple-select.cjs +1 -1
- package/dist/components/inputs/simple-select.d.ts +10 -31
- package/dist/components/inputs/simple-select.js +5 -85
- 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/card/index.cjs +1 -1
- package/dist/components/ui/card/index.d.ts +13 -2
- package/dist/components/ui/card/index.js +74 -49
- 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/components/ui/input/index.cjs +1 -1
- package/dist/components/ui/input/index.d.ts +8 -0
- package/dist/components/ui/input/index.js +63 -30
- package/dist/components/ui/select/index.cjs +1 -1
- package/dist/components/ui/select/index.d.ts +33 -1
- package/dist/components/ui/select/index.js +154 -48
- 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 +23 -36
- 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 +16 -14
- 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/select/mock.cjs +8 -9
- package/dist/showcase/premium/select/mock.js +1 -1
- package/dist/showcase/premium/select/showcase.cjs +1 -1
- package/dist/showcase/premium/select/showcase.js +76 -86
- 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 +153 -383
- package/dist/showcase/render-registry-preview.cjs +1 -1
- package/dist/showcase/render-registry-preview.js +169 -197
- 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-pagination.tsx +7 -7
- 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 +86 -73
- 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 +104 -6
- 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/display/smart-card.tsx +1 -1
- package/packages/cli/vendor/src/components/display/status-legend.tsx +1 -1
- 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 +127 -23
- package/packages/cli/vendor/src/components/form/form-select.tsx +30 -7
- 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 +138 -91
- package/packages/cli/vendor/src/components/inputs/combobox.tsx +66 -9
- package/packages/cli/vendor/src/components/inputs/search-input.tsx +5 -2
- package/packages/cli/vendor/src/components/inputs/simple-select.tsx +20 -162
- 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/card/index.tsx +95 -25
- 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/components/ui/input/index.tsx +98 -0
- package/packages/cli/vendor/src/components/ui/select/index.tsx +227 -34
- 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 +44 -58
- 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 +14 -14
- 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/select/mock.ts +1 -1
- package/packages/cli/vendor/src/showcase/premium/select/showcase.tsx +13 -21
- 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 +10 -186
- package/packages/cli/vendor/src/showcase/render-registry-preview.tsx +23 -57
- 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
|
@@ -3,42 +3,56 @@ import "react";
|
|
|
3
3
|
import { AlertCircleIcon as t } from "lucide-react";
|
|
4
4
|
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
5
5
|
//#region src/components/form/form-field-shell.tsx
|
|
6
|
-
|
|
6
|
+
function a(e, t = {}) {
|
|
7
|
+
let n = `${e}-label`, r = `${e}-description`, i = `${e}-error`;
|
|
8
|
+
return {
|
|
9
|
+
labelId: n,
|
|
10
|
+
descriptionId: r,
|
|
11
|
+
errorId: i,
|
|
12
|
+
describedBy: [t.description ? r : null, t.error ? i : null].filter(Boolean).join(" ") || void 0
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
var o = {
|
|
7
16
|
vertical: "grid gap-2",
|
|
8
17
|
horizontal: "grid gap-2 sm:grid-cols-[minmax(0,12rem)_1fr] sm:items-start sm:gap-5",
|
|
9
18
|
inline: "flex flex-col gap-2 sm:flex-row sm:items-center sm:gap-4"
|
|
10
19
|
};
|
|
11
|
-
function
|
|
20
|
+
function s({ className: a, label: s, description: c, error: l, required: u = !1, htmlFor: d, labelId: f, descriptionId: p, errorId: m, layout: h = "vertical", descriptionPosition: g = "top", labelAction: _, requiredIndicator: v = /* @__PURE__ */ r("span", {
|
|
12
21
|
className: "ml-1 text-destructive",
|
|
13
22
|
children: "*"
|
|
14
|
-
}), errorIcon:
|
|
15
|
-
let
|
|
23
|
+
}), errorIcon: y, showErrorIcon: b = !0, disabled: x = !1, readOnly: S = !1, labelClassName: C, labelRowClassName: w, descriptionClassName: T, errorClassName: E, contentClassName: D, children: O, ...k }) {
|
|
24
|
+
let A = !!(s || _), j = c && g === "top", M = c && g === "bottom", N = y ?? /* @__PURE__ */ r(t, { className: "size-3.5" }), P = A ? /* @__PURE__ */ i("div", {
|
|
16
25
|
"data-slot": "form-field-label-row",
|
|
17
|
-
className: e("flex min-w-0 items-center justify-between gap-3",
|
|
26
|
+
className: e("flex min-w-0 items-center justify-between gap-3", h === "inline" && "sm:w-auto", w),
|
|
18
27
|
children: [s ? /* @__PURE__ */ i("label", {
|
|
19
28
|
"data-slot": "form-field-label",
|
|
20
29
|
htmlFor: d,
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
30
|
+
id: f,
|
|
31
|
+
className: e("min-w-0 text-sm font-semibold leading-none tracking-tight text-foreground", x && "cursor-not-allowed opacity-60", S && "opacity-80", C),
|
|
32
|
+
children: [s, u && v]
|
|
33
|
+
}) : /* @__PURE__ */ r("span", {}), _ && /* @__PURE__ */ r("div", {
|
|
24
34
|
"data-slot": "form-field-label-action",
|
|
25
35
|
className: "shrink-0 text-sm",
|
|
26
|
-
children:
|
|
36
|
+
children: _
|
|
27
37
|
})]
|
|
28
|
-
}) : null,
|
|
38
|
+
}) : null, F = c ? /* @__PURE__ */ r("p", {
|
|
29
39
|
"data-slot": "form-field-description",
|
|
30
|
-
|
|
40
|
+
id: p,
|
|
41
|
+
className: e("text-sm leading-6 text-muted-foreground", x && "opacity-60", T),
|
|
31
42
|
children: c
|
|
32
|
-
}) : null,
|
|
43
|
+
}) : null, I = /* @__PURE__ */ r("div", {
|
|
33
44
|
"data-slot": "form-field-content",
|
|
34
|
-
className: e("min-w-0 space-y-2",
|
|
35
|
-
children:
|
|
36
|
-
}),
|
|
45
|
+
className: e("min-w-0 space-y-2", D),
|
|
46
|
+
children: O
|
|
47
|
+
}), L = l ? /* @__PURE__ */ i("p", {
|
|
37
48
|
"data-slot": "form-field-error",
|
|
38
|
-
|
|
39
|
-
|
|
49
|
+
id: m,
|
|
50
|
+
role: "alert",
|
|
51
|
+
"aria-live": "polite",
|
|
52
|
+
className: e("flex items-start gap-2 rounded-[min(var(--radius-xl),16px)] border border-destructive/18 bg-destructive/8 px-3 py-2 text-sm font-medium leading-6 text-destructive", E),
|
|
53
|
+
children: [b && /* @__PURE__ */ r("span", {
|
|
40
54
|
className: "mt-1 shrink-0",
|
|
41
|
-
children:
|
|
55
|
+
children: N
|
|
42
56
|
}), /* @__PURE__ */ r("span", {
|
|
43
57
|
className: "min-w-0",
|
|
44
58
|
children: l
|
|
@@ -46,39 +60,39 @@ function o({ className: o, label: s, description: c, error: l, required: u = !1,
|
|
|
46
60
|
}) : null;
|
|
47
61
|
return /* @__PURE__ */ r("div", {
|
|
48
62
|
"data-slot": "form-field-shell",
|
|
49
|
-
"data-layout":
|
|
63
|
+
"data-layout": h,
|
|
50
64
|
"data-invalid": !!l || void 0,
|
|
51
|
-
"data-disabled":
|
|
52
|
-
"data-readonly":
|
|
53
|
-
"aria-disabled":
|
|
54
|
-
className: e(
|
|
55
|
-
...
|
|
56
|
-
children:
|
|
65
|
+
"data-disabled": x || void 0,
|
|
66
|
+
"data-readonly": S || void 0,
|
|
67
|
+
"aria-disabled": x || void 0,
|
|
68
|
+
className: e(o[h], "rounded-[var(--radius-2xl)]", a),
|
|
69
|
+
...k,
|
|
70
|
+
children: h === "horizontal" ? /* @__PURE__ */ i(n, { children: [/* @__PURE__ */ i("div", {
|
|
57
71
|
className: "grid gap-2 sm:pt-2.5",
|
|
58
|
-
children: [
|
|
72
|
+
children: [P, j && F]
|
|
59
73
|
}), /* @__PURE__ */ i("div", {
|
|
60
74
|
className: "grid min-w-0 gap-2",
|
|
61
75
|
children: [
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
76
|
+
I,
|
|
77
|
+
M && F,
|
|
78
|
+
L
|
|
65
79
|
]
|
|
66
|
-
})] }) :
|
|
80
|
+
})] }) : h === "inline" ? /* @__PURE__ */ i(n, { children: [P, /* @__PURE__ */ i("div", {
|
|
67
81
|
className: "grid min-w-0 flex-1 gap-2",
|
|
68
82
|
children: [
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
83
|
+
j && F,
|
|
84
|
+
I,
|
|
85
|
+
M && F,
|
|
86
|
+
L
|
|
73
87
|
]
|
|
74
88
|
})] }) : /* @__PURE__ */ i(n, { children: [
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
89
|
+
P,
|
|
90
|
+
j && F,
|
|
91
|
+
I,
|
|
92
|
+
M && F,
|
|
93
|
+
L
|
|
80
94
|
] })
|
|
81
95
|
});
|
|
82
96
|
}
|
|
83
97
|
//#endregion
|
|
84
|
-
export {
|
|
98
|
+
export { s as FormFieldShell, a as resolveFormFieldIds };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../inputs/clearable-input.cjs"),n=require("../inputs/date-input.cjs"),r=require("../inputs/date-range-input.cjs"),i=require("../inputs/money-input.cjs"),a=require("../inputs/masked-input.cjs"),o=require("../inputs/number-input.cjs"),s=require("../inputs/phone-input.cjs"),c=require("../inputs/quantity-input.cjs"),l=require("../inputs/search-input.cjs"),u=require("../ui/input/index.cjs"),d=require("./form-field-shell.cjs");let f=require("react");f=e.__toESM(f,1);let p=require("react/jsx-runtime"),m=require("react-hook-form");function h(e){return{label:e.label,description:e.description,required:e.required,className:e.className,layout:e.layout,descriptionPosition:e.descriptionPosition,labelAction:e.labelAction,requiredIndicator:e.requiredIndicator,errorIcon:e.errorIcon,showErrorIcon:e.showErrorIcon,disabled:e.disabled,readOnly:e.readOnly,labelClassName:e.labelClassName,labelRowClassName:e.labelRowClassName,descriptionClassName:e.descriptionClassName,errorClassName:e.errorClassName,contentClassName:e.contentClassName}}function g(e){let f=e.id??e.name,g=h(e),_=e.kind??`text`,v=e.fieldClassName??`w-full`;return(0,p.jsx)(m.Controller,{control:e.control,name:e.name,rules:e.rules,render:({field:m,fieldState:h})=>{let y=h.error?.message;if(_===`search`){let{control:t,name:n,label:r,description:i,required:a,className:o,layout:s,descriptionPosition:c,labelAction:u,requiredIndicator:_,errorIcon:b,showErrorIcon:x,disabled:S,readOnly:C,labelClassName:w,labelRowClassName:T,descriptionClassName:E,errorClassName:D,contentClassName:O,fieldClassName:k,id:A,kind:j,onValueChange:M,onBlur:N,...P}=e;return(0,p.jsx)(d.FormFieldShell,{...g,error:y,htmlFor:A??f,children:(0,p.jsx)(l.SearchInput,{...P,id:A??f,name:m.name,ref:m.ref,value:m.value??``,disabled:S,readOnly:e.readOnly,inputClassName:k??v,"aria-invalid":h.invalid||void 0,onBlur:e=>{m.onBlur(),N?.(e)},onValueChange:e=>{m.onChange(e),M?.(e)}})})}if(_===`password`){let{control:t,name:n,label:r,description:i,required:a,className:o,layout:s,descriptionPosition:c,labelAction:l,requiredIndicator:_,errorIcon:b,showErrorIcon:x,disabled:S,readOnly:C,labelClassName:w,labelRowClassName:T,descriptionClassName:E,errorClassName:D,contentClassName:O,fieldClassName:k,id:A,kind:j,onValueChange:M,onBlur:N,...P}=e;return(0,p.jsx)(d.FormFieldShell,{...g,error:y,htmlFor:A??f,children:(0,p.jsx)(u.Input,{...P,type:`password`,id:A??f,ref:m.ref,name:m.name,value:m.value??``,disabled:S,readOnly:e.readOnly,inputClassName:k??v,onBlur:e=>{m.onBlur(),N?.(e)},onChange:e=>{let t=e.currentTarget.value;m.onChange(t),M?.(t)},"aria-invalid":h.invalid||void 0})})}if(_===`number`){let{control:t,name:n,label:r,description:i,required:a,className:s,layout:c,descriptionPosition:l,labelAction:u,requiredIndicator:_,errorIcon:b,showErrorIcon:x,disabled:S,readOnly:C,labelClassName:w,labelRowClassName:T,descriptionClassName:E,errorClassName:D,contentClassName:O,fieldClassName:k,id:A,kind:j,emptyValue:M=null,onNumberChange:N,onBlur:P,...F}=e;return(0,p.jsx)(d.FormFieldShell,{...g,error:y,htmlFor:A??f,children:(0,p.jsx)(o.NumberInput,{...F,id:A??f,name:m.name,ref:m.ref,value:m.value??``,disabled:S,readOnly:e.readOnly,className:k??v,"aria-invalid":h.invalid||void 0,onBlur:e=>{m.onBlur(),P?.(e)},onNumberChange:e=>{m.onChange(e??M),N?.(e)}})})}if(_===`phone`){let{control:t,name:n,label:r,description:i,required:a,className:o,layout:c,descriptionPosition:l,labelAction:u,requiredIndicator:_,errorIcon:b,showErrorIcon:x,disabled:S,readOnly:C,labelClassName:w,labelRowClassName:T,descriptionClassName:E,errorClassName:D,contentClassName:O,fieldClassName:k,id:A,kind:j,valueMode:M=`raw`,countryCode:N=`+998`,maxDigits:P=12,onValueChange:F,onBlur:I,...L}=e,R=m.value==null?``:String(m.value),z=M===`raw`?s.formatPhoneDigits(R,N,P):R;return(0,p.jsx)(d.FormFieldShell,{...g,error:y,htmlFor:A??f,children:(0,p.jsx)(s.PhoneInput,{...L,id:A??f,name:m.name,ref:m.ref,value:z,disabled:S,readOnly:e.readOnly,countryCode:N,maxDigits:P,className:k??v,"aria-invalid":h.invalid||void 0,onBlur:e=>{m.onBlur(),I?.(e)},onValueChange:(e,t)=>{let n=M===`raw`?t:e;m.onChange(n),F?.(n,t,e)}})})}if(_===`date`){let{control:t,name:r,label:i,description:a,required:o,className:s,layout:c,descriptionPosition:l,labelAction:u,requiredIndicator:_,errorIcon:b,showErrorIcon:x,disabled:S,readOnly:C,labelClassName:w,labelRowClassName:T,descriptionClassName:E,errorClassName:D,contentClassName:O,fieldClassName:k,id:A,kind:j,emptyValue:M=``,onValueChange:N,onBlur:P,...F}=e;return(0,p.jsx)(d.FormFieldShell,{...g,error:y,htmlFor:A??f,children:(0,p.jsx)(n.DateInput,{...F,id:A??f,name:m.name,ref:m.ref,value:m.value??``,disabled:S,readOnly:e.readOnly,className:k??v,"aria-invalid":h.invalid||void 0,onBlur:e=>{m.onBlur(),P?.(e)},onValueChange:e=>{m.onChange(e||M),N?.(e)}})})}if(_===`clearable`){let{control:n,name:r,label:i,description:a,required:o,className:s,layout:c,descriptionPosition:l,labelAction:u,requiredIndicator:_,errorIcon:b,showErrorIcon:x,disabled:S,readOnly:C,labelClassName:w,labelRowClassName:T,descriptionClassName:E,errorClassName:D,contentClassName:O,fieldClassName:k,id:A,kind:j,emptyValue:M=``,onValueChange:N,onBlur:P,...F}=e;return(0,p.jsx)(d.FormFieldShell,{...g,error:y,htmlFor:A??f,children:(0,p.jsx)(t.ClearableInput,{...F,id:A??f,name:m.name,ref:m.ref,value:m.value??``,disabled:S,readOnly:e.readOnly,className:k??v,"aria-invalid":h.invalid||void 0,onBlur:e=>{m.onBlur(),P?.(e)},onValueChange:e=>{m.onChange(e||M),N?.(e)}})})}if(_===`masked`){let{control:t,name:n,label:r,description:i,required:o,className:s,layout:c,descriptionPosition:l,labelAction:u,requiredIndicator:_,errorIcon:b,showErrorIcon:x,disabled:S,readOnly:C,labelClassName:w,labelRowClassName:T,descriptionClassName:E,errorClassName:D,contentClassName:O,fieldClassName:k,id:A,kind:j,valueMode:M=`raw`,onValueChange:N,onBlur:P,...F}=e;return(0,p.jsx)(d.FormFieldShell,{...g,error:y,htmlFor:A??f,children:(0,p.jsx)(a.MaskedInput,{...F,id:A??f,name:m.name,ref:m.ref,value:String(m.value??``),disabled:S,readOnly:e.readOnly,className:k??v,"aria-invalid":h.invalid||void 0,onBlur:e=>{m.onBlur(),P?.(e)},onValueChange:(e,t)=>{let n=M===`raw`?t:e;m.onChange(n),N?.(e,t)}})})}if(_===`money`){let{control:t,name:n,label:r,description:a,required:o,className:s,layout:c,descriptionPosition:l,labelAction:u,requiredIndicator:_,errorIcon:b,showErrorIcon:x,disabled:S,readOnly:C,labelClassName:w,labelRowClassName:T,descriptionClassName:E,errorClassName:D,contentClassName:O,fieldClassName:k,id:A,kind:j,emptyValue:M=null,onValueChange:N,onBlur:P,...F}=e;return(0,p.jsx)(d.FormFieldShell,{...g,error:y,htmlFor:A??f,children:(0,p.jsx)(i.MoneyInput,{...F,id:A??f,name:m.name,ref:m.ref,value:m.value??null,disabled:S,readOnly:e.readOnly,className:k??v,"aria-invalid":h.invalid||void 0,onBlur:e=>{m.onBlur(),P?.(e)},onValueChange:(e,t)=>{m.onChange(e??M),N?.(e,t)}})})}if(_===`quantity`){let{control:t,name:n,label:r,description:i,required:a,className:o,layout:s,descriptionPosition:l,labelAction:u,requiredIndicator:_,errorIcon:b,showErrorIcon:x,disabled:S,readOnly:C,labelClassName:w,labelRowClassName:T,descriptionClassName:E,errorClassName:D,contentClassName:O,fieldClassName:k,id:A,kind:j,emptyValue:M=null,onValueChange:N,onBlur:P,...F}=e;return(0,p.jsx)(d.FormFieldShell,{...g,error:y,htmlFor:A??f,children:(0,p.jsx)(c.QuantityInput,{...F,id:A??f,name:m.name,ref:m.ref,value:m.value,disabled:S,readOnly:e.readOnly,className:k??v,"aria-invalid":h.invalid||void 0,onBlur:e=>{m.onBlur(),P?.(e)},onValueChange:e=>{m.onChange(e??M),N?.(e)}})})}if(_===`date-range`){let{control:t,name:n,label:i,description:a,required:o,className:s,layout:c,descriptionPosition:l,labelAction:u,requiredIndicator:_,errorIcon:v,showErrorIcon:b,disabled:x,labelClassName:S,labelRowClassName:C,descriptionClassName:w,errorClassName:T,contentClassName:E,fieldClassName:D,id:O,kind:k,onValueChange:A,onBlur:j,...M}=e,N=m.value;return(0,p.jsx)(d.FormFieldShell,{...g,error:y,htmlFor:O??f,children:(0,p.jsx)(r.DateRangeInput,{...M,id:O??f,value:N&&typeof N==`object`?{from:N.from,to:N.to}:{from:``,to:``},fromInputProps:{...M.fromInputProps??{},disabled:x,readOnly:e.readOnly},toInputProps:{...M.toInputProps??{},disabled:x,readOnly:e.readOnly},onValueChange:e=>{m.onChange(e),A?.(e)},"aria-invalid":h.invalid||void 0,onBlur:e=>{m.onBlur(),j?.(e)}})})}let{control:b,name:x,label:S,description:C,required:w,className:T,layout:E,descriptionPosition:D,labelAction:O,requiredIndicator:k,errorIcon:A,showErrorIcon:j,disabled:M,readOnly:N,labelClassName:P,labelRowClassName:F,descriptionClassName:I,errorClassName:L,contentClassName:R,fieldClassName:z,transformIn:B,transformOut:V,id:H,kind:U,onChange:W,onBlur:G,...K}=e;return(0,p.jsx)(d.FormFieldShell,{...g,error:y,htmlFor:H??f,children:(0,p.jsx)(u.Input,{...K,id:H??f,ref:m.ref,name:m.name,value:B?B(m.value):m.value??``,disabled:M,readOnly:N,onBlur:e=>{m.onBlur(),G?.(e)},onChange:e=>{m.onChange(V?V(e):e.target.value),W?.(e)},"aria-invalid":h.invalid||void 0,className:z??v})})}})}exports.FormInput=g;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("../../_virtual/_rolldown/runtime.cjs"),t=require("../inputs/date-input.cjs"),n=require("../inputs/date-range-input.cjs"),r=require("../inputs/money-input.cjs"),i=require("../inputs/masked-input.cjs"),a=require("../inputs/number-input.cjs"),o=require("../inputs/phone-input.cjs"),s=require("../inputs/quantity-input.cjs"),c=require("../ui/input/index.cjs"),l=require("./form-field-shell.cjs");let u=require("react");u=e.__toESM(u,1);let d=require("react/jsx-runtime"),f=require("react-hook-form");function p(e){return{label:e.label,description:e.description,required:e.required,className:e.className,htmlFor:e.id??e.name,layout:e.layout,descriptionPosition:e.descriptionPosition,labelAction:e.labelAction,requiredIndicator:e.requiredIndicator,errorIcon:e.errorIcon,showErrorIcon:e.showErrorIcon,disabled:e.disabled,readOnly:e.readOnly,labelClassName:e.labelClassName,labelRowClassName:e.labelRowClassName,descriptionClassName:e.descriptionClassName,errorClassName:e.errorClassName,contentClassName:e.contentClassName}}function m(e){let u=e.id??e.name,m=p(e),h=e.kind??`text`,g=e.fieldClassName??`w-full`;return(0,d.jsx)(f.Controller,{control:e.control,name:e.name,rules:e.rules,render:({field:f,fieldState:p})=>{let _=p.error?.message,v=l.resolveFormFieldIds(u,{description:e.description,error:_});if(h===`search`){let{control:t,name:n,label:r,description:i,required:a,className:o,layout:s,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,onValueChange:N,onBlur:P,...F}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(c.Input,{...F,type:`search`,id:j??u,name:f.name,ref:f.ref,value:f.value??``,disabled:C,readOnly:e.readOnly,inputClassName:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),P?.(e)},onValueChange:e=>{f.onChange(e),N?.(e)}})})}if(h===`password`){let{control:t,name:n,label:r,description:i,required:a,className:o,layout:s,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,onValueChange:N,onBlur:P,...F}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(c.Input,{...F,type:`password`,id:j??u,ref:f.ref,name:f.name,value:f.value??``,disabled:C,readOnly:e.readOnly,inputClassName:A??g,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),P?.(e)},onChange:e=>{let t=e.currentTarget.value;f.onChange(t),N?.(t)},"aria-invalid":p.invalid||void 0})})}if(h===`number`){let{control:t,name:n,label:r,description:i,required:o,className:s,layout:c,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,emptyValue:N=null,onNumberChange:P,onBlur:F,...I}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(a.NumberInput,{...I,id:j??u,name:f.name,ref:f.ref,value:f.value??``,disabled:C,readOnly:e.readOnly,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),F?.(e)},onNumberChange:e=>{f.onChange(e??N),P?.(e)}})})}if(h===`phone`){let{control:t,name:n,label:r,description:i,required:a,className:s,layout:c,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,valueMode:N=`raw`,countryCode:P=`+998`,maxDigits:F=12,onValueChange:I,onBlur:L,...R}=e,z=f.value==null?``:String(f.value),B=N===`raw`?o.formatPhoneDigits(z,P,F):z;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(o.PhoneInput,{...R,id:j??u,name:f.name,ref:f.ref,value:B,disabled:C,readOnly:e.readOnly,countryCode:P,maxDigits:F,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),L?.(e)},onValueChange:(e,t)=>{let n=N===`raw`?t:e;f.onChange(n),I?.(n,t,e)}})})}if(h===`date`){let{control:n,name:r,label:i,description:a,required:o,className:s,layout:c,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,emptyValue:N=``,onValueChange:P,onBlur:F,...I}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(t.DateInput,{...I,id:j??u,name:f.name,ref:f.ref,value:f.value??``,disabled:C,readOnly:e.readOnly,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),F?.(e)},onValueChange:e=>{f.onChange(e||N),P?.(e)}})})}if(h===`clearable`){let{control:t,name:n,label:r,description:i,required:a,className:o,layout:s,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,emptyValue:N=``,onValueChange:P,onBlur:F,...I}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(c.Input,{...I,clearable:!0,id:j??u,name:f.name,ref:f.ref,value:f.value??``,disabled:C,readOnly:e.readOnly,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),F?.(e)},onValueChange:e=>{f.onChange(e||N),P?.(e)}})})}if(h===`masked`){let{control:t,name:n,label:r,description:a,required:o,className:s,layout:c,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,valueMode:N=`raw`,onValueChange:P,onBlur:F,...I}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(i.MaskedInput,{...I,id:j??u,name:f.name,ref:f.ref,value:String(f.value??``),disabled:C,readOnly:e.readOnly,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),F?.(e)},onValueChange:(e,t)=>{let n=N===`raw`?t:e;f.onChange(n),P?.(e,t)}})})}if(h===`money`){let{control:t,name:n,label:i,description:a,required:o,className:s,layout:c,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,emptyValue:N=null,onValueChange:P,onBlur:F,...I}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(r.MoneyInput,{...I,id:j??u,name:f.name,ref:f.ref,value:f.value??null,disabled:C,readOnly:e.readOnly,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),F?.(e)},onValueChange:(e,t)=>{f.onChange(e??N),P?.(e,t)}})})}if(h===`quantity`){let{control:t,name:n,label:r,description:i,required:a,className:o,layout:c,descriptionPosition:h,labelAction:y,requiredIndicator:b,errorIcon:x,showErrorIcon:S,disabled:C,readOnly:w,labelClassName:T,labelRowClassName:E,descriptionClassName:D,errorClassName:O,contentClassName:k,fieldClassName:A,id:j,kind:M,emptyValue:N=null,onValueChange:P,onBlur:F,...I}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:j??u,children:(0,d.jsx)(s.QuantityInput,{...I,id:j??u,name:f.name,ref:f.ref,value:f.value,disabled:C,readOnly:e.readOnly,className:A??g,"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,onBlur:e=>{f.onBlur(),F?.(e)},onValueChange:e=>{f.onChange(e??N),P?.(e)}})})}if(h===`date-range`){let{control:t,name:r,label:i,description:a,required:o,className:s,layout:c,descriptionPosition:h,labelAction:g,requiredIndicator:y,errorIcon:b,showErrorIcon:x,disabled:S,labelClassName:C,labelRowClassName:w,descriptionClassName:T,errorClassName:E,contentClassName:D,fieldClassName:O,id:k,kind:A,onValueChange:j,onBlur:M,...N}=e,P=f.value;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:k??u,children:(0,d.jsx)(n.DateRangeInput,{...N,id:k??u,value:P&&typeof P==`object`?{from:P.from,to:P.to}:{from:``,to:``},fromInputProps:{...N.fromInputProps??{},disabled:S,readOnly:e.readOnly,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0},toInputProps:{...N.toInputProps??{},disabled:S,readOnly:e.readOnly,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0},onValueChange:e=>{f.onChange(e),j?.(e)},"aria-invalid":p.invalid||void 0,onBlur:e=>{f.onBlur(),M?.(e)}})})}let{control:y,name:b,label:x,description:S,required:C,className:w,layout:T,descriptionPosition:E,labelAction:D,requiredIndicator:O,errorIcon:k,showErrorIcon:A,disabled:j,readOnly:M,labelClassName:N,labelRowClassName:P,descriptionClassName:F,errorClassName:I,contentClassName:L,fieldClassName:R,transformIn:z,transformOut:B,id:V,kind:H,onChange:U,onBlur:W,...G}=e;return(0,d.jsx)(l.FormFieldShell,{...m,labelId:v.labelId,descriptionId:v.descriptionId,errorId:v.errorId,error:_,htmlFor:V??u,children:(0,d.jsx)(c.Input,{...G,id:V??u,ref:f.ref,name:f.name,value:z?z(f.value):f.value??``,disabled:j,readOnly:M,onBlur:e=>{f.onBlur(),W?.(e)},onChange:e=>{f.onChange(B?B(e):e.target.value),U?.(e)},"aria-invalid":p.invalid||void 0,"aria-describedby":v.describedBy,"aria-errormessage":_?v.errorId:void 0,className:R??g})})}})}exports.FormInput=m;
|
|
@@ -2,13 +2,12 @@ import * as React from "react";
|
|
|
2
2
|
import { type Control, type FieldPath, type FieldValues, type RegisterOptions } from "react-hook-form";
|
|
3
3
|
import { type DateRangeInputProps, type DateRangeValue } from "@/components/inputs/date-range-input";
|
|
4
4
|
import { type DateInputProps } from "@/components/inputs/date-input";
|
|
5
|
+
import { type InputClearableProps, type InputSearchProps } from "@/components/ui/input";
|
|
5
6
|
import { type MaskedInputProps } from "@/components/inputs/masked-input";
|
|
6
7
|
import { type MoneyInputProps } from "@/components/inputs/money-input";
|
|
7
8
|
import { type NumberInputProps } from "@/components/inputs/number-input";
|
|
8
9
|
import { type PhoneInputProps } from "@/components/inputs/phone-input";
|
|
9
10
|
import { type QuantityInputProps } from "@/components/inputs/quantity-input";
|
|
10
|
-
import { type SearchInputProps } from "@/components/inputs/search-input";
|
|
11
|
-
import { type ClearableInputProps } from "@/components/inputs/clearable-input";
|
|
12
11
|
import { type FormFieldShellControlProps } from "@/components/form/form-field-shell";
|
|
13
12
|
export type FormInputKind = "text" | "search" | "password" | "number" | "phone" | "date" | "date-range" | "clearable" | "masked" | "money" | "quantity";
|
|
14
13
|
export type FormInputPhoneInputValueMode = "raw" | "masked";
|
|
@@ -28,7 +27,7 @@ export type FormTextInputProps<TFieldValues extends FieldValues = FieldValues, T
|
|
|
28
27
|
transformIn?: (value: unknown) => string | number | readonly string[] | undefined;
|
|
29
28
|
transformOut?: (event: TextInputElementChangeEvent) => unknown;
|
|
30
29
|
};
|
|
31
|
-
export type FormInputSearchVariantProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = Omit<
|
|
30
|
+
export type FormInputSearchVariantProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = Omit<InputSearchProps, "name" | "value" | "defaultValue" | "onValueChange" | "kind"> & FormControlledFieldProps<TFieldValues, TName> & {
|
|
32
31
|
kind: "search";
|
|
33
32
|
onValueChange?: (value: string) => void;
|
|
34
33
|
};
|
|
@@ -57,7 +56,7 @@ export type FormInputDateRangeVariantProps<TFieldValues extends FieldValues = Fi
|
|
|
57
56
|
kind: "date-range";
|
|
58
57
|
onValueChange?: (value: DateRangeValue) => void;
|
|
59
58
|
};
|
|
60
|
-
export type FormInputClearableVariantProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = Omit<
|
|
59
|
+
export type FormInputClearableVariantProps<TFieldValues extends FieldValues = FieldValues, TName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>> = Omit<InputClearableProps, "name" | "value" | "defaultValue" | "onValueChange" | "kind"> & FormControlledFieldProps<TFieldValues, TName> & {
|
|
61
60
|
kind: "clearable";
|
|
62
61
|
emptyValue?: unknown;
|
|
63
62
|
onValueChange?: (value: string) => void;
|