@wheelhouse/ui 0.1.6 → 0.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/blocks/index.d.ts +2 -0
- package/dist/blocks/index.d.ts.map +1 -0
- package/dist/blocks/index.js +1 -0
- package/dist/blocks/navigation/index.d.ts +2 -0
- package/dist/blocks/navigation/index.d.ts.map +1 -0
- package/dist/blocks/navigation/index.js +1 -0
- package/dist/blocks/navigation/pattern-1/index.d.ts +3 -0
- package/dist/blocks/navigation/pattern-1/index.d.ts.map +1 -0
- package/dist/blocks/navigation/pattern-1/index.js +1 -0
- package/dist/blocks/navigation/pattern-1/pattern-1.config.d.ts +47 -0
- package/dist/blocks/navigation/pattern-1/pattern-1.config.d.ts.map +1 -0
- package/dist/blocks/navigation/pattern-1/pattern-1.config.js +55 -0
- package/dist/blocks/navigation/pattern-1/pattern-1.d.ts +7 -0
- package/dist/blocks/navigation/pattern-1/pattern-1.d.ts.map +1 -0
- package/dist/blocks/navigation/pattern-1/pattern-1.js +50 -0
- package/dist/blocks/navigation/pattern-1/pattern-1.stories.d.ts +16 -0
- package/dist/blocks/navigation/pattern-1/pattern-1.stories.d.ts.map +1 -0
- package/dist/blocks/navigation/pattern-1/pattern-1.stories.js +20 -0
- package/dist/components/accordion/accordion.d.ts +15 -0
- package/dist/components/accordion/accordion.d.ts.map +1 -0
- package/dist/components/accordion/accordion.js +18 -0
- package/dist/components/accordion/accordion.stories.d.ts +7 -0
- package/dist/components/accordion/accordion.stories.d.ts.map +1 -0
- package/dist/components/accordion/accordion.stories.js +17 -0
- package/dist/components/accordion/index.d.ts +3 -0
- package/dist/components/accordion/index.d.ts.map +1 -0
- package/dist/components/accordion/index.js +1 -0
- package/dist/components/alert/alert.d.ts +11 -0
- package/dist/components/alert/alert.d.ts.map +1 -0
- package/dist/components/alert/alert.js +28 -0
- package/dist/components/alert/alert.stories.d.ts +11 -0
- package/dist/components/alert/alert.stories.d.ts.map +1 -0
- package/dist/components/alert/alert.stories.js +35 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/alert/index.d.ts.map +1 -0
- package/dist/components/alert/index.js +1 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +44 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts.map +1 -0
- package/dist/components/alert-dialog/alert-dialog.js +43 -0
- package/dist/components/alert-dialog/alert-dialog.stories.d.ts +9 -0
- package/dist/components/alert-dialog/alert-dialog.stories.d.ts.map +1 -0
- package/dist/components/alert-dialog/alert-dialog.stories.js +22 -0
- package/dist/components/alert-dialog/index.d.ts +3 -0
- package/dist/components/alert-dialog/index.d.ts.map +1 -0
- package/dist/components/alert-dialog/index.js +1 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +11 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts.map +1 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +9 -0
- package/dist/components/aspect-ratio/aspect-ratio.stories.d.ts +8 -0
- package/dist/components/aspect-ratio/aspect-ratio.stories.d.ts.map +1 -0
- package/dist/components/aspect-ratio/aspect-ratio.stories.js +26 -0
- package/dist/components/aspect-ratio/index.d.ts +3 -0
- package/dist/components/aspect-ratio/index.d.ts.map +1 -0
- package/dist/components/aspect-ratio/index.js +1 -0
- package/dist/components/avatar/avatar.d.ts +29 -0
- package/dist/components/avatar/avatar.d.ts.map +1 -0
- package/dist/components/avatar/avatar.js +24 -0
- package/dist/components/avatar/avatar.stories.d.ts +20 -0
- package/dist/components/avatar/avatar.stories.d.ts.map +1 -0
- package/dist/components/avatar/avatar.stories.js +40 -0
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/avatar/index.d.ts.map +1 -0
- package/dist/components/avatar/index.js +1 -0
- package/dist/components/badge/badge.d.ts +5 -4
- package/dist/components/badge/badge.d.ts.map +1 -1
- package/dist/components/badge/badge.js +3 -3
- package/dist/components/breadcrumb/breadcrumb.d.ts +25 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.js +38 -0
- package/dist/components/breadcrumb/breadcrumb.stories.d.ts +16 -0
- package/dist/components/breadcrumb/breadcrumb.stories.d.ts.map +1 -0
- package/dist/components/breadcrumb/breadcrumb.stories.js +21 -0
- package/dist/components/breadcrumb/index.d.ts +2 -0
- package/dist/components/breadcrumb/index.d.ts.map +1 -0
- package/dist/components/breadcrumb/index.js +1 -0
- package/dist/components/button/button.d.ts +9 -6
- package/dist/components/button/button.d.ts.map +1 -1
- package/dist/components/button/button.js +3 -3
- package/dist/components/button-group/button-group.d.ts +3 -1
- package/dist/components/button-group/button-group.d.ts.map +1 -1
- package/dist/components/button-group/button-group.js +1 -1
- package/dist/components/button-group/button-group.stories.d.ts +1 -0
- package/dist/components/button-group/button-group.stories.d.ts.map +1 -1
- package/dist/components/button-group/button-group.stories.js +4 -0
- package/dist/components/button-group/index.d.ts +1 -0
- package/dist/components/button-group/index.d.ts.map +1 -1
- package/dist/components/calendar/calendar.d.ts +34 -0
- package/dist/components/calendar/calendar.d.ts.map +1 -0
- package/dist/components/calendar/calendar.js +82 -0
- package/dist/components/calendar/calendar.stories.d.ts +16 -0
- package/dist/components/calendar/calendar.stories.d.ts.map +1 -0
- package/dist/components/calendar/calendar.stories.js +33 -0
- package/dist/components/calendar/index.d.ts +3 -0
- package/dist/components/calendar/index.d.ts.map +1 -0
- package/dist/components/calendar/index.js +1 -0
- package/dist/components/card/card.d.ts +28 -0
- package/dist/components/card/card.d.ts.map +1 -0
- package/dist/components/card/card.js +25 -0
- package/dist/components/card/card.stories.d.ts +10 -0
- package/dist/components/card/card.stories.d.ts.map +1 -0
- package/dist/components/card/card.stories.js +30 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/card/index.d.ts.map +1 -0
- package/dist/components/card/index.js +1 -0
- package/dist/components/checkbox/checkbox.d.ts +9 -0
- package/dist/components/checkbox/checkbox.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.js +9 -0
- package/dist/components/checkbox/checkbox.stories.d.ts +19 -0
- package/dist/components/checkbox/checkbox.stories.d.ts.map +1 -0
- package/dist/components/checkbox/checkbox.stories.js +31 -0
- package/dist/components/checkbox/index.d.ts +2 -0
- package/dist/components/checkbox/index.d.ts.map +1 -0
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/collapsible/collapsible.d.ts +17 -0
- package/dist/components/collapsible/collapsible.d.ts.map +1 -0
- package/dist/components/collapsible/collapsible.js +17 -0
- package/dist/components/collapsible/collapsible.stories.d.ts +16 -0
- package/dist/components/collapsible/collapsible.stories.d.ts.map +1 -0
- package/dist/components/collapsible/collapsible.stories.js +24 -0
- package/dist/components/collapsible/index.d.ts +3 -0
- package/dist/components/collapsible/index.d.ts.map +1 -0
- package/dist/components/collapsible/index.js +1 -0
- package/dist/components/combobox/combobox.d.ts +38 -0
- package/dist/components/combobox/combobox.d.ts.map +1 -0
- package/dist/components/combobox/combobox.js +63 -0
- package/dist/components/combobox/combobox.stories.d.ts +18 -0
- package/dist/components/combobox/combobox.stories.d.ts.map +1 -0
- package/dist/components/combobox/combobox.stories.js +46 -0
- package/dist/components/combobox/index.d.ts +3 -0
- package/dist/components/combobox/index.d.ts.map +1 -0
- package/dist/components/combobox/index.js +1 -0
- package/dist/components/command/command.d.ts +31 -0
- package/dist/components/command/command.d.ts.map +1 -0
- package/dist/components/command/command.js +36 -0
- package/dist/components/command/command.stories.d.ts +16 -0
- package/dist/components/command/command.stories.d.ts.map +1 -0
- package/dist/components/command/command.stories.js +26 -0
- package/dist/components/command/index.d.ts +2 -0
- package/dist/components/command/index.d.ts.map +1 -0
- package/dist/components/command/index.js +1 -0
- package/dist/components/context-menu/context-menu.d.ts +62 -0
- package/dist/components/context-menu/context-menu.d.ts.map +1 -0
- package/dist/components/context-menu/context-menu.js +52 -0
- package/dist/components/context-menu/context-menu.stories.d.ts +17 -0
- package/dist/components/context-menu/context-menu.stories.d.ts.map +1 -0
- package/dist/components/context-menu/context-menu.stories.js +27 -0
- package/dist/components/context-menu/index.d.ts +2 -0
- package/dist/components/context-menu/index.d.ts.map +1 -0
- package/dist/components/context-menu/index.js +1 -0
- package/dist/components/date-selector/date-selector-context.d.ts +6 -0
- package/dist/components/date-selector/date-selector-context.d.ts.map +1 -0
- package/dist/components/date-selector/date-selector-context.js +11 -0
- package/dist/components/date-selector/date-selector-parts.d.ts +68 -0
- package/dist/components/date-selector/date-selector-parts.d.ts.map +1 -0
- package/dist/components/date-selector/date-selector-parts.js +131 -0
- package/dist/components/date-selector/date-selector-types.d.ts +118 -0
- package/dist/components/date-selector/date-selector-types.d.ts.map +1 -0
- package/dist/components/date-selector/date-selector-types.js +32 -0
- package/dist/components/date-selector/date-selector-value.d.ts +47 -0
- package/dist/components/date-selector/date-selector-value.d.ts.map +1 -0
- package/dist/components/date-selector/date-selector-value.js +183 -0
- package/dist/components/date-selector/date-selector.d.ts +6 -0
- package/dist/components/date-selector/date-selector.d.ts.map +1 -0
- package/dist/components/date-selector/date-selector.js +144 -0
- package/dist/components/date-selector/date-selector.stories.d.ts +135 -0
- package/dist/components/date-selector/date-selector.stories.d.ts.map +1 -0
- package/dist/components/date-selector/date-selector.stories.js +144 -0
- package/dist/components/date-selector/index.d.ts +7 -0
- package/dist/components/date-selector/index.d.ts.map +1 -0
- package/dist/components/date-selector/index.js +5 -0
- package/dist/components/date-selector/use-date-selector.d.ts +50 -0
- package/dist/components/date-selector/use-date-selector.d.ts.map +1 -0
- package/dist/components/date-selector/use-date-selector.js +305 -0
- package/dist/components/dialog/dialog.d.ts +40 -0
- package/dist/components/dialog/dialog.d.ts.map +1 -0
- package/dist/components/dialog/dialog.js +38 -0
- package/dist/components/dialog/dialog.stories.d.ts +9 -0
- package/dist/components/dialog/dialog.stories.d.ts.map +1 -0
- package/dist/components/dialog/dialog.stories.js +22 -0
- package/dist/components/dialog/index.d.ts +3 -0
- package/dist/components/dialog/index.d.ts.map +1 -0
- package/dist/components/dialog/index.js +1 -0
- package/dist/components/direction/direction.d.ts +7 -0
- package/dist/components/direction/direction.d.ts.map +1 -0
- package/dist/components/direction/direction.js +5 -0
- package/dist/components/direction/direction.stories.d.ts +8 -0
- package/dist/components/direction/direction.stories.d.ts.map +1 -0
- package/dist/components/direction/direction.stories.js +23 -0
- package/dist/components/direction/index.d.ts +2 -0
- package/dist/components/direction/index.d.ts.map +1 -0
- package/dist/components/direction/index.js +1 -0
- package/dist/components/drawer/drawer.d.ts +25 -0
- package/dist/components/drawer/drawer.d.ts.map +1 -0
- package/dist/components/drawer/drawer.js +36 -0
- package/dist/components/drawer/drawer.stories.d.ts +7 -0
- package/dist/components/drawer/drawer.stories.d.ts.map +1 -0
- package/dist/components/drawer/drawer.stories.js +17 -0
- package/dist/components/drawer/index.d.ts +2 -0
- package/dist/components/drawer/index.d.ts.map +1 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +65 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts.map +1 -0
- package/dist/components/dropdown-menu/dropdown-menu.js +52 -0
- package/dist/components/dropdown-menu/dropdown-menu.stories.d.ts +18 -0
- package/dist/components/dropdown-menu/dropdown-menu.stories.d.ts.map +1 -0
- package/dist/components/dropdown-menu/dropdown-menu.stories.js +31 -0
- package/dist/components/dropdown-menu/index.d.ts +3 -0
- package/dist/components/dropdown-menu/index.d.ts.map +1 -0
- package/dist/components/dropdown-menu/index.js +1 -0
- package/dist/components/empty/empty.d.ts +25 -0
- package/dist/components/empty/empty.d.ts.map +1 -0
- package/dist/components/empty/empty.js +34 -0
- package/dist/components/empty/empty.stories.d.ts +7 -0
- package/dist/components/empty/empty.stories.d.ts.map +1 -0
- package/dist/components/empty/empty.stories.js +19 -0
- package/dist/components/empty/index.d.ts +3 -0
- package/dist/components/empty/index.d.ts.map +1 -0
- package/dist/components/empty/index.js +1 -0
- package/dist/components/field/field.d.ts +22 -0
- package/dist/components/field/field.d.ts.map +1 -0
- package/dist/components/field/field.js +34 -0
- package/dist/components/field/field.stories.d.ts +16 -0
- package/dist/components/field/field.stories.d.ts.map +1 -0
- package/dist/components/field/field.stories.js +26 -0
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/field/index.d.ts.map +1 -0
- package/dist/components/field/index.js +1 -0
- package/dist/components/filters/filters-defaults.d.ts +5 -0
- package/dist/components/filters/filters-defaults.d.ts.map +1 -0
- package/dist/components/filters/filters-defaults.js +97 -0
- package/dist/components/filters/filters-types.d.ts +135 -0
- package/dist/components/filters/filters-types.d.ts.map +1 -0
- package/dist/components/filters/filters-types.js +1 -0
- package/dist/components/filters/filters-utils.d.ts +4 -0
- package/dist/components/filters/filters-utils.d.ts.map +1 -0
- package/dist/components/filters/filters-utils.js +12 -0
- package/dist/components/filters/filters.d.ts +29 -0
- package/dist/components/filters/filters.d.ts.map +1 -0
- package/dist/components/filters/filters.js +733 -0
- package/dist/components/filters/filters.stories.d.ts +8 -0
- package/dist/components/filters/filters.stories.d.ts.map +1 -0
- package/dist/components/filters/filters.stories.js +48 -0
- package/dist/components/filters/index.d.ts +5 -0
- package/dist/components/filters/index.d.ts.map +1 -0
- package/dist/components/filters/index.js +4 -0
- package/dist/components/frame/frame.d.ts +65 -0
- package/dist/components/frame/frame.d.ts.map +1 -0
- package/dist/components/frame/frame.js +108 -0
- package/dist/components/frame/frame.stories.d.ts +14 -0
- package/dist/components/frame/frame.stories.d.ts.map +1 -0
- package/dist/components/frame/frame.stories.js +50 -0
- package/dist/components/frame/index.d.ts +3 -0
- package/dist/components/frame/index.d.ts.map +1 -0
- package/dist/components/frame/index.js +1 -0
- package/dist/components/hover-card/hover-card.d.ts +16 -0
- package/dist/components/hover-card/hover-card.d.ts.map +1 -0
- package/dist/components/hover-card/hover-card.js +14 -0
- package/dist/components/hover-card/hover-card.stories.d.ts +7 -0
- package/dist/components/hover-card/hover-card.stories.d.ts.map +1 -0
- package/dist/components/hover-card/hover-card.stories.js +15 -0
- package/dist/components/hover-card/index.d.ts +3 -0
- package/dist/components/hover-card/index.d.ts.map +1 -0
- package/dist/components/hover-card/index.js +1 -0
- package/dist/components/index.d.ts +51 -0
- package/dist/components/index.d.ts.map +1 -1
- package/dist/components/index.js +51 -0
- package/dist/components/input/index.d.ts +2 -0
- package/dist/components/input/index.d.ts.map +1 -0
- package/dist/components/input/index.js +1 -0
- package/dist/components/input/input.d.ts +16 -0
- package/dist/components/input/input.d.ts.map +1 -0
- package/dist/components/input/input.js +22 -0
- package/dist/components/input/input.stories.d.ts +28 -0
- package/dist/components/input/input.stories.d.ts.map +1 -0
- package/dist/components/input/input.stories.js +33 -0
- package/dist/components/input-group/index.d.ts +3 -0
- package/dist/components/input-group/index.d.ts.map +1 -0
- package/dist/components/input-group/index.js +1 -0
- package/dist/components/input-group/input-group.d.ts +44 -0
- package/dist/components/input-group/input-group.d.ts.map +1 -0
- package/dist/components/input-group/input-group.js +72 -0
- package/dist/components/input-group/input-group.stories.d.ts +18 -0
- package/dist/components/input-group/input-group.stories.d.ts.map +1 -0
- package/dist/components/input-group/input-group.stories.js +29 -0
- package/dist/components/item/index.d.ts +3 -0
- package/dist/components/item/index.d.ts.map +1 -0
- package/dist/components/item/index.js +1 -0
- package/dist/components/item/item.d.ts +60 -0
- package/dist/components/item/item.d.ts.map +1 -0
- package/dist/components/item/item.js +95 -0
- package/dist/components/item/item.stories.d.ts +34 -0
- package/dist/components/item/item.stories.d.ts.map +1 -0
- package/dist/components/item/item.stories.js +40 -0
- package/dist/components/kbd/index.d.ts +3 -0
- package/dist/components/kbd/index.d.ts.map +1 -0
- package/dist/components/kbd/index.js +1 -0
- package/dist/components/kbd/kbd.d.ts +15 -0
- package/dist/components/kbd/kbd.d.ts.map +1 -0
- package/dist/components/kbd/kbd.js +16 -0
- package/dist/components/kbd/kbd.stories.d.ts +17 -0
- package/dist/components/kbd/kbd.stories.d.ts.map +1 -0
- package/dist/components/kbd/kbd.stories.js +25 -0
- package/dist/components/label/index.d.ts +2 -0
- package/dist/components/label/index.d.ts.map +1 -0
- package/dist/components/label/index.js +1 -0
- package/dist/components/label/label.d.ts +6 -0
- package/dist/components/label/label.d.ts.map +1 -0
- package/dist/components/label/label.js +10 -0
- package/dist/components/label/label.stories.d.ts +18 -0
- package/dist/components/label/label.stories.d.ts.map +1 -0
- package/dist/components/label/label.stories.js +29 -0
- package/dist/components/menubar/index.d.ts +3 -0
- package/dist/components/menubar/index.d.ts.map +1 -0
- package/dist/components/menubar/index.js +1 -0
- package/dist/components/menubar/menubar.d.ts +64 -0
- package/dist/components/menubar/menubar.d.ts.map +1 -0
- package/dist/components/menubar/menubar.js +56 -0
- package/dist/components/menubar/menubar.stories.d.ts +15 -0
- package/dist/components/menubar/menubar.stories.d.ts.map +1 -0
- package/dist/components/menubar/menubar.stories.js +18 -0
- package/dist/components/native-select/index.d.ts +2 -0
- package/dist/components/native-select/index.d.ts.map +1 -0
- package/dist/components/native-select/index.js +1 -0
- package/dist/components/native-select/native-select.d.ts +12 -0
- package/dist/components/native-select/native-select.d.ts.map +1 -0
- package/dist/components/native-select/native-select.js +14 -0
- package/dist/components/native-select/native-select.stories.d.ts +8 -0
- package/dist/components/native-select/native-select.stories.d.ts.map +1 -0
- package/dist/components/native-select/native-select.stories.js +19 -0
- package/dist/components/navigation-menu/index.d.ts +3 -0
- package/dist/components/navigation-menu/index.d.ts.map +1 -0
- package/dist/components/navigation-menu/index.js +1 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +33 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts.map +1 -0
- package/dist/components/navigation-menu/navigation-menu.js +33 -0
- package/dist/components/navigation-menu/navigation-menu.stories.d.ts +14 -0
- package/dist/components/navigation-menu/navigation-menu.stories.d.ts.map +1 -0
- package/dist/components/navigation-menu/navigation-menu.stories.js +14 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/pagination/index.d.ts.map +1 -0
- package/dist/components/pagination/index.js +1 -0
- package/dist/components/pagination/pagination.d.ts +31 -0
- package/dist/components/pagination/pagination.d.ts.map +1 -0
- package/dist/components/pagination/pagination.js +29 -0
- package/dist/components/pagination/pagination.stories.d.ts +14 -0
- package/dist/components/pagination/pagination.stories.d.ts.map +1 -0
- package/dist/components/pagination/pagination.stories.js +14 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/index.d.ts.map +1 -0
- package/dist/components/popover/index.js +1 -0
- package/dist/components/popover/popover.d.ts +20 -0
- package/dist/components/popover/popover.d.ts.map +1 -0
- package/dist/components/popover/popover.js +24 -0
- package/dist/components/popover/popover.stories.d.ts +7 -0
- package/dist/components/popover/popover.stories.d.ts.map +1 -0
- package/dist/components/popover/popover.stories.js +17 -0
- package/dist/components/progress/index.d.ts +3 -0
- package/dist/components/progress/index.d.ts.map +1 -0
- package/dist/components/progress/index.js +1 -0
- package/dist/components/progress/progress.d.ts +18 -0
- package/dist/components/progress/progress.d.ts.map +1 -0
- package/dist/components/progress/progress.js +20 -0
- package/dist/components/progress/progress.stories.d.ts +9 -0
- package/dist/components/progress/progress.stories.d.ts.map +1 -0
- package/dist/components/progress/progress.stories.js +29 -0
- package/dist/components/radio-group/index.d.ts +3 -0
- package/dist/components/radio-group/index.d.ts.map +1 -0
- package/dist/components/radio-group/index.js +1 -0
- package/dist/components/radio-group/radio-group.d.ts +13 -0
- package/dist/components/radio-group/radio-group.d.ts.map +1 -0
- package/dist/components/radio-group/radio-group.js +12 -0
- package/dist/components/radio-group/radio-group.stories.d.ts +7 -0
- package/dist/components/radio-group/radio-group.stories.d.ts.map +1 -0
- package/dist/components/radio-group/radio-group.stories.js +18 -0
- package/dist/components/resizable/index.d.ts +2 -0
- package/dist/components/resizable/index.d.ts.map +1 -0
- package/dist/components/resizable/index.js +1 -0
- package/dist/components/resizable/resizable.d.ts +12 -0
- package/dist/components/resizable/resizable.d.ts.map +1 -0
- package/dist/components/resizable/resizable.js +14 -0
- package/dist/components/resizable/resizable.stories.d.ts +7 -0
- package/dist/components/resizable/resizable.stories.d.ts.map +1 -0
- package/dist/components/resizable/resizable.stories.js +16 -0
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/index.d.ts.map +1 -0
- package/dist/components/scroll-area/index.js +1 -0
- package/dist/components/scroll-area/scroll-area.d.ts +7 -0
- package/dist/components/scroll-area/scroll-area.d.ts.map +1 -0
- package/dist/components/scroll-area/scroll-area.js +11 -0
- package/dist/components/scroll-area/scroll-area.stories.d.ts +6 -0
- package/dist/components/scroll-area/scroll-area.stories.d.ts.map +1 -0
- package/dist/components/scroll-area/scroll-area.stories.js +13 -0
- package/dist/components/select/index.d.ts +3 -0
- package/dist/components/select/index.d.ts.map +1 -0
- package/dist/components/select/index.js +1 -0
- package/dist/components/select/select.d.ts +49 -0
- package/dist/components/select/select.d.ts.map +1 -0
- package/dist/components/select/select.js +50 -0
- package/dist/components/select/select.stories.d.ts +9 -0
- package/dist/components/select/select.stories.d.ts.map +1 -0
- package/dist/components/select/select.stories.js +20 -0
- package/dist/components/separator/index.d.ts +1 -0
- package/dist/components/separator/index.d.ts.map +1 -1
- package/dist/components/separator/separator.d.ts +3 -1
- package/dist/components/separator/separator.d.ts.map +1 -1
- package/dist/components/sheet/index.d.ts +2 -0
- package/dist/components/sheet/index.d.ts.map +1 -0
- package/dist/components/sheet/index.js +1 -0
- package/dist/components/sheet/sheet.d.ts +34 -0
- package/dist/components/sheet/sheet.d.ts.map +1 -0
- package/dist/components/sheet/sheet.js +38 -0
- package/dist/components/sheet/sheet.stories.d.ts +9 -0
- package/dist/components/sheet/sheet.stories.d.ts.map +1 -0
- package/dist/components/sheet/sheet.stories.js +21 -0
- package/dist/components/slider/index.d.ts +3 -0
- package/dist/components/slider/index.d.ts.map +1 -0
- package/dist/components/slider/index.js +1 -0
- package/dist/components/slider/slider.d.ts +15 -0
- package/dist/components/slider/slider.d.ts.map +1 -0
- package/dist/components/slider/slider.js +20 -0
- package/dist/components/slider/slider.stories.d.ts +11 -0
- package/dist/components/slider/slider.stories.d.ts.map +1 -0
- package/dist/components/slider/slider.stories.js +36 -0
- package/dist/components/sonner/index.d.ts +4 -0
- package/dist/components/sonner/index.d.ts.map +1 -0
- package/dist/components/sonner/index.js +2 -0
- package/dist/components/sonner/sonner.d.ts +12 -0
- package/dist/components/sonner/sonner.d.ts.map +1 -0
- package/dist/components/sonner/sonner.js +32 -0
- package/dist/components/sonner/sonner.stories.d.ts +8 -0
- package/dist/components/sonner/sonner.stories.d.ts.map +1 -0
- package/dist/components/sonner/sonner.stories.js +25 -0
- package/dist/components/sonner/toast.d.ts +2 -0
- package/dist/components/sonner/toast.d.ts.map +1 -0
- package/dist/components/sonner/toast.js +1 -0
- package/dist/components/sortable/index.d.ts +3 -0
- package/dist/components/sortable/index.d.ts.map +1 -0
- package/dist/components/sortable/index.js +1 -0
- package/dist/components/sortable/sortable.d.ts +94 -0
- package/dist/components/sortable/sortable.d.ts.map +1 -0
- package/dist/components/sortable/sortable.js +210 -0
- package/dist/components/sortable/sortable.stories.d.ts +14 -0
- package/dist/components/sortable/sortable.stories.d.ts.map +1 -0
- package/dist/components/sortable/sortable.stories.js +38 -0
- package/dist/components/spinner/index.d.ts +3 -0
- package/dist/components/spinner/index.d.ts.map +1 -0
- package/dist/components/spinner/index.js +1 -0
- package/dist/components/spinner/spinner.d.ts +13 -0
- package/dist/components/spinner/spinner.d.ts.map +1 -0
- package/dist/components/spinner/spinner.js +12 -0
- package/dist/components/spinner/spinner.stories.d.ts +9 -0
- package/dist/components/spinner/spinner.stories.d.ts.map +1 -0
- package/dist/components/spinner/spinner.stories.js +20 -0
- package/dist/components/status-indicator/index.d.ts +3 -0
- package/dist/components/status-indicator/index.d.ts.map +1 -0
- package/dist/components/status-indicator/index.js +1 -0
- package/dist/components/status-indicator/status-indicator.d.ts +51 -0
- package/dist/components/status-indicator/status-indicator.d.ts.map +1 -0
- package/dist/components/status-indicator/status-indicator.js +48 -0
- package/dist/components/status-indicator/status-indicator.stories.d.ts +20 -0
- package/dist/components/status-indicator/status-indicator.stories.d.ts.map +1 -0
- package/dist/components/status-indicator/status-indicator.stories.js +97 -0
- package/dist/components/switch/index.d.ts +2 -0
- package/dist/components/switch/index.d.ts.map +1 -0
- package/dist/components/switch/index.js +1 -0
- package/dist/components/switch/switch.d.ts +13 -0
- package/dist/components/switch/switch.d.ts.map +1 -0
- package/dist/components/switch/switch.js +8 -0
- package/dist/components/switch/switch.stories.d.ts +20 -0
- package/dist/components/switch/switch.stories.d.ts.map +1 -0
- package/dist/components/switch/switch.stories.js +46 -0
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/tabs/index.d.ts.map +1 -0
- package/dist/components/tabs/index.js +1 -0
- package/dist/components/tabs/tabs.d.ts +35 -0
- package/dist/components/tabs/tabs.d.ts.map +1 -0
- package/dist/components/tabs/tabs.js +34 -0
- package/dist/components/tabs/tabs.stories.d.ts +10 -0
- package/dist/components/tabs/tabs.stories.d.ts.map +1 -0
- package/dist/components/tabs/tabs.stories.js +29 -0
- package/dist/components/text/index.d.ts +3 -0
- package/dist/components/text/index.d.ts.map +1 -0
- package/dist/components/text/index.js +1 -0
- package/dist/components/text/text.d.ts +47 -0
- package/dist/components/text/text.d.ts.map +1 -0
- package/dist/components/text/text.js +53 -0
- package/dist/components/text/text.stories.d.ts +11 -0
- package/dist/components/text/text.stories.d.ts.map +1 -0
- package/dist/components/text/text.stories.js +84 -0
- package/dist/components/textarea/index.d.ts +2 -0
- package/dist/components/textarea/index.d.ts.map +1 -0
- package/dist/components/textarea/index.js +1 -0
- package/dist/components/textarea/textarea.d.ts +11 -0
- package/dist/components/textarea/textarea.d.ts.map +1 -0
- package/dist/components/textarea/textarea.js +10 -0
- package/dist/components/textarea/textarea.stories.d.ts +24 -0
- package/dist/components/textarea/textarea.stories.d.ts.map +1 -0
- package/dist/components/textarea/textarea.stories.js +32 -0
- package/dist/components/toggle/index.d.ts +3 -0
- package/dist/components/toggle/index.d.ts.map +1 -0
- package/dist/components/toggle/index.js +1 -0
- package/dist/components/toggle/toggle.d.ts +31 -0
- package/dist/components/toggle/toggle.d.ts.map +1 -0
- package/dist/components/toggle/toggle.js +33 -0
- package/dist/components/toggle/toggle.stories.d.ts +11 -0
- package/dist/components/toggle/toggle.stories.d.ts.map +1 -0
- package/dist/components/toggle/toggle.stories.js +60 -0
- package/dist/components/toggle-group/index.d.ts +3 -0
- package/dist/components/toggle-group/index.d.ts.map +1 -0
- package/dist/components/toggle-group/index.js +1 -0
- package/dist/components/toggle-group/toggle-group.d.ts +32 -0
- package/dist/components/toggle-group/toggle-group.d.ts.map +1 -0
- package/dist/components/toggle-group/toggle-group.js +33 -0
- package/dist/components/toggle-group/toggle-group.stories.d.ts +10 -0
- package/dist/components/toggle-group/toggle-group.stories.d.ts.map +1 -0
- package/dist/components/toggle-group/toggle-group.stories.js +28 -0
- package/dist/components/tooltip/index.d.ts +3 -0
- package/dist/components/tooltip/index.d.ts.map +1 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/tooltip/tooltip.d.ts +22 -0
- package/dist/components/tooltip/tooltip.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.js +21 -0
- package/dist/components/tooltip/tooltip.stories.d.ts +11 -0
- package/dist/components/tooltip/tooltip.stories.d.ts.map +1 -0
- package/dist/components/tooltip/tooltip.stories.js +33 -0
- package/dist/hooks/use-mobile.d.ts +2 -0
- package/dist/hooks/use-mobile.d.ts.map +1 -0
- package/dist/hooks/use-mobile.js +15 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/llms.txt +21 -19
- package/package.json +17 -9
- package/src/styles/globals.css +6 -11
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Menu as MenuPrimitive } from '@base-ui/react/menu';
|
|
3
|
+
type DropdownMenuContentPositionProps = Pick<MenuPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset'>;
|
|
4
|
+
/**
|
|
5
|
+
* Props for `DropdownMenu`. Inherits behavior from
|
|
6
|
+
* [Base UI Menu](https://base-ui.com/react/components/menu).
|
|
7
|
+
*/
|
|
8
|
+
type DropdownMenuProps = MenuPrimitive.Root.Props;
|
|
9
|
+
/** Props for `DropdownMenuPortal`. */
|
|
10
|
+
type DropdownMenuPortalProps = MenuPrimitive.Portal.Props;
|
|
11
|
+
/** Props for `DropdownMenuTrigger`. */
|
|
12
|
+
type DropdownMenuTriggerProps = MenuPrimitive.Trigger.Props;
|
|
13
|
+
/** Props for `DropdownMenuContent` (popup plus positioner alignment). */
|
|
14
|
+
type DropdownMenuContentProps = MenuPrimitive.Popup.Props & DropdownMenuContentPositionProps;
|
|
15
|
+
/** Props for `DropdownMenuSubContent` (same surface as content, tuned for nested menus). */
|
|
16
|
+
type DropdownMenuSubContentProps = DropdownMenuContentProps;
|
|
17
|
+
/** Props for `DropdownMenuGroup`. */
|
|
18
|
+
type DropdownMenuGroupProps = MenuPrimitive.Group.Props;
|
|
19
|
+
/** Props for `DropdownMenuLabel`. */
|
|
20
|
+
type DropdownMenuLabelProps = React.ComponentProps<'div'> & {
|
|
21
|
+
inset?: boolean;
|
|
22
|
+
};
|
|
23
|
+
/** Props for `DropdownMenuItem`. */
|
|
24
|
+
type DropdownMenuItemProps = MenuPrimitive.Item.Props & {
|
|
25
|
+
inset?: boolean;
|
|
26
|
+
variant?: 'default' | 'destructive';
|
|
27
|
+
};
|
|
28
|
+
/** Props for `DropdownMenuSub`. */
|
|
29
|
+
type DropdownMenuSubProps = MenuPrimitive.SubmenuRoot.Props;
|
|
30
|
+
/** Props for `DropdownMenuSubTrigger`. */
|
|
31
|
+
type DropdownMenuSubTriggerProps = MenuPrimitive.SubmenuTrigger.Props & {
|
|
32
|
+
inset?: boolean;
|
|
33
|
+
};
|
|
34
|
+
/** Props for `DropdownMenuCheckboxItem`. */
|
|
35
|
+
type DropdownMenuCheckboxItemProps = MenuPrimitive.CheckboxItem.Props & {
|
|
36
|
+
inset?: boolean;
|
|
37
|
+
};
|
|
38
|
+
/** Props for `DropdownMenuRadioGroup`. */
|
|
39
|
+
type DropdownMenuRadioGroupProps = MenuPrimitive.RadioGroup.Props;
|
|
40
|
+
/** Props for `DropdownMenuRadioItem`. */
|
|
41
|
+
type DropdownMenuRadioItemProps = MenuPrimitive.RadioItem.Props & {
|
|
42
|
+
inset?: boolean;
|
|
43
|
+
};
|
|
44
|
+
/** Props for `DropdownMenuSeparator`. */
|
|
45
|
+
type DropdownMenuSeparatorProps = MenuPrimitive.Separator.Props;
|
|
46
|
+
/** Props for `DropdownMenuShortcut`. */
|
|
47
|
+
type DropdownMenuShortcutProps = React.ComponentProps<'span'>;
|
|
48
|
+
declare function DropdownMenu({ ...props }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
49
|
+
declare function DropdownMenuPortal({ ...props }: DropdownMenuPortalProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
declare function DropdownMenuTrigger({ ...props }: DropdownMenuTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
declare function DropdownMenuContent({ align, alignOffset, side, sideOffset, className, ...props }: DropdownMenuContentProps): import("react/jsx-runtime").JSX.Element;
|
|
52
|
+
declare function DropdownMenuGroup({ ...props }: DropdownMenuGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
53
|
+
declare function DropdownMenuLabel({ className, inset, ...props }: DropdownMenuLabelProps): import("react/jsx-runtime").JSX.Element;
|
|
54
|
+
declare function DropdownMenuItem({ className, inset, variant, ...props }: DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
|
|
55
|
+
declare function DropdownMenuSub({ ...props }: DropdownMenuSubProps): import("react/jsx-runtime").JSX.Element;
|
|
56
|
+
declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: DropdownMenuSubTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
declare function DropdownMenuSubContent({ align, alignOffset, side, sideOffset, className, ...props }: DropdownMenuSubContentProps): import("react/jsx-runtime").JSX.Element;
|
|
58
|
+
declare function DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }: DropdownMenuCheckboxItemProps): import("react/jsx-runtime").JSX.Element;
|
|
59
|
+
declare function DropdownMenuRadioGroup({ ...props }: DropdownMenuRadioGroupProps): import("react/jsx-runtime").JSX.Element;
|
|
60
|
+
declare function DropdownMenuRadioItem({ className, children, inset, ...props }: DropdownMenuRadioItemProps): import("react/jsx-runtime").JSX.Element;
|
|
61
|
+
declare function DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorProps): import("react/jsx-runtime").JSX.Element;
|
|
62
|
+
declare function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutProps): import("react/jsx-runtime").JSX.Element;
|
|
63
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
64
|
+
export type { DropdownMenuProps, DropdownMenuPortalProps, DropdownMenuTriggerProps, DropdownMenuContentProps, DropdownMenuSubContentProps, DropdownMenuGroupProps, DropdownMenuLabelProps, DropdownMenuItemProps, DropdownMenuSubProps, DropdownMenuSubTriggerProps, DropdownMenuCheckboxItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuSeparatorProps, DropdownMenuShortcutProps, };
|
|
65
|
+
//# sourceMappingURL=dropdown-menu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown-menu/dropdown-menu.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,IAAI,aAAa,EAAE,MAAM,qBAAqB,CAAC;AAK5D,KAAK,gCAAgC,GAAG,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,GAAG,MAAM,GAAG,YAAY,CAAC,CAAC;AAE9H;;;GAGG;AACH,KAAK,iBAAiB,GAAG,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC;AAElD,sCAAsC;AACtC,KAAK,uBAAuB,GAAG,aAAa,CAAC,MAAM,CAAC,KAAK,CAAC;AAE1D,uCAAuC;AACvC,KAAK,wBAAwB,GAAG,aAAa,CAAC,OAAO,CAAC,KAAK,CAAC;AAE5D,yEAAyE;AACzE,KAAK,wBAAwB,GAAG,aAAa,CAAC,KAAK,CAAC,KAAK,GAAG,gCAAgC,CAAC;AAE7F,4FAA4F;AAC5F,KAAK,2BAA2B,GAAG,wBAAwB,CAAC;AAE5D,qCAAqC;AACrC,KAAK,sBAAsB,GAAG,aAAa,CAAC,KAAK,CAAC,KAAK,CAAC;AAExD,qCAAqC;AACrC,KAAK,sBAAsB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG;IACxD,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,oCAAoC;AACpC,KAAK,qBAAqB,GAAG,aAAa,CAAC,IAAI,CAAC,KAAK,GAAG;IACpD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,OAAO,CAAC,EAAE,SAAS,GAAG,aAAa,CAAC;CACvC,CAAC;AAEF,mCAAmC;AACnC,KAAK,oBAAoB,GAAG,aAAa,CAAC,WAAW,CAAC,KAAK,CAAC;AAE5D,0CAA0C;AAC1C,KAAK,2BAA2B,GAAG,aAAa,CAAC,cAAc,CAAC,KAAK,GAAG;IACpE,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,4CAA4C;AAC5C,KAAK,6BAA6B,GAAG,aAAa,CAAC,YAAY,CAAC,KAAK,GAAG;IACpE,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,0CAA0C;AAC1C,KAAK,2BAA2B,GAAG,aAAa,CAAC,UAAU,CAAC,KAAK,CAAC;AAElE,yCAAyC;AACzC,KAAK,0BAA0B,GAAG,aAAa,CAAC,SAAS,CAAC,KAAK,GAAG;IAC9D,KAAK,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,yCAAyC;AACzC,KAAK,0BAA0B,GAAG,aAAa,CAAC,SAAS,CAAC,KAAK,CAAC;AAEhE,wCAAwC;AACxC,KAAK,yBAAyB,GAAG,KAAK,CAAC,cAAc,CAAC,MAAM,CAAC,CAAC;AAE9D,iBAAS,YAAY,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CAEpD;AAED,iBAAS,kBAAkB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,uBAAuB,2CAEhE;AAED,iBAAS,mBAAmB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,wBAAwB,2CAElE;AAED,iBAAS,mBAAmB,CAAC,EAAE,KAAe,EAAE,WAAe,EAAE,IAAe,EAAE,UAAc,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,wBAAwB,2CAehJ;AAED,iBAAS,iBAAiB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,2CAE9D;AAED,iBAAS,iBAAiB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,sBAAsB,2CAShF;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,OAAmB,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,2CAanG;AAED,iBAAS,eAAe,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,oBAAoB,2CAE1D;AAED,iBAAS,sBAAsB,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,2BAA2B,2CAepG;AAED,iBAAS,sBAAsB,CAAC,EAAE,KAAe,EAAE,WAAgB,EAAE,IAAc,EAAE,UAAc,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,2BAA2B,2CAetJ;AAED,iBAAS,wBAAwB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,6BAA6B,2CAoBjH;AAED,iBAAS,sBAAsB,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,2BAA2B,2CAMxE;AAED,iBAAS,qBAAqB,CAAC,EAAE,SAAS,EAAE,QAAQ,EAAE,KAAK,EAAE,GAAG,KAAK,EAAE,EAAE,0BAA0B,2CAmBlG;AAED,iBAAS,qBAAqB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,0BAA0B,2CAEjF;AAED,iBAAS,oBAAoB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,yBAAyB,2CAQ/E;AAED,OAAO,EACH,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,GACzB,CAAC;AAEF,YAAY,EACR,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,2BAA2B,EAC3B,6BAA6B,EAC7B,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,GAC5B,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Menu as MenuPrimitive } from '@base-ui/react/menu';
|
|
5
|
+
import { cn } from '../../lib/utils';
|
|
6
|
+
import { Check, ChevronRight } from 'lucide-react';
|
|
7
|
+
function DropdownMenu({ ...props }) {
|
|
8
|
+
return _jsx(MenuPrimitive.Root, { "data-slot": "dropdown-menu", ...props });
|
|
9
|
+
}
|
|
10
|
+
function DropdownMenuPortal({ ...props }) {
|
|
11
|
+
return _jsx(MenuPrimitive.Portal, { "data-slot": "dropdown-menu-portal", ...props });
|
|
12
|
+
}
|
|
13
|
+
function DropdownMenuTrigger({ ...props }) {
|
|
14
|
+
return _jsx(MenuPrimitive.Trigger, { "data-slot": "dropdown-menu-trigger", ...props });
|
|
15
|
+
}
|
|
16
|
+
function DropdownMenuContent({ align = 'start', alignOffset = 0, side = 'bottom', sideOffset = 4, className, ...props }) {
|
|
17
|
+
return (_jsx(MenuPrimitive.Portal, { children: _jsx(MenuPrimitive.Positioner, { className: "isolate z-50 outline-none", align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, children: _jsx(MenuPrimitive.Popup, { "data-slot": "dropdown-menu-content", className: cn('z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95', className), ...props }) }) }));
|
|
18
|
+
}
|
|
19
|
+
function DropdownMenuGroup({ ...props }) {
|
|
20
|
+
return _jsx(MenuPrimitive.Group, { "data-slot": "dropdown-menu-group", ...props });
|
|
21
|
+
}
|
|
22
|
+
function DropdownMenuLabel({ className, inset, ...props }) {
|
|
23
|
+
return (_jsx("div", { "data-slot": "dropdown-menu-label", "data-inset": inset, className: cn('px-1.5 py-1 text-xs text-muted-foreground data-inset:pl-7', className), ...props }));
|
|
24
|
+
}
|
|
25
|
+
function DropdownMenuItem({ className, inset, variant = 'default', ...props }) {
|
|
26
|
+
return (_jsx(MenuPrimitive.Item, { "data-slot": "dropdown-menu-item", "data-inset": inset, "data-variant": variant, className: cn("group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive-foreground data-[variant=destructive]:focus:bg-destructive-foreground/10 data-[variant=destructive]:focus:text-destructive-foreground dark:data-[variant=destructive]:focus:bg-destructive-foreground/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive-foreground", className), ...props }));
|
|
27
|
+
}
|
|
28
|
+
function DropdownMenuSub({ ...props }) {
|
|
29
|
+
return _jsx(MenuPrimitive.SubmenuRoot, { "data-slot": "dropdown-menu-sub", ...props });
|
|
30
|
+
}
|
|
31
|
+
function DropdownMenuSubTrigger({ className, inset, children, ...props }) {
|
|
32
|
+
return (_jsxs(MenuPrimitive.SubmenuTrigger, { "data-slot": "dropdown-menu-sub-trigger", "data-inset": inset, className: cn("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [children, _jsx(ChevronRight, { className: "ml-auto" })] }));
|
|
33
|
+
}
|
|
34
|
+
function DropdownMenuSubContent({ align = 'start', alignOffset = -3, side = 'right', sideOffset = 0, className, ...props }) {
|
|
35
|
+
return (_jsx(DropdownMenuContent, { "data-slot": "dropdown-menu-sub-content", className: cn('w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95', className), align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, ...props }));
|
|
36
|
+
}
|
|
37
|
+
function DropdownMenuCheckboxItem({ className, children, checked, inset, ...props }) {
|
|
38
|
+
return (_jsxs(MenuPrimitive.CheckboxItem, { "data-slot": "dropdown-menu-checkbox-item", "data-inset": inset, className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), checked: checked, ...props, children: [_jsx("span", { className: "pointer-events-none absolute right-2 flex items-center justify-center", "data-slot": "dropdown-menu-checkbox-item-indicator", children: _jsx(MenuPrimitive.CheckboxItemIndicator, { children: _jsx(Check, {}) }) }), children] }));
|
|
39
|
+
}
|
|
40
|
+
function DropdownMenuRadioGroup({ ...props }) {
|
|
41
|
+
return (_jsx(MenuPrimitive.Group, { children: _jsx(MenuPrimitive.RadioGroup, { "data-slot": "dropdown-menu-radio-group", ...props }) }));
|
|
42
|
+
}
|
|
43
|
+
function DropdownMenuRadioItem({ className, children, inset, ...props }) {
|
|
44
|
+
return (_jsxs(MenuPrimitive.RadioItem, { "data-slot": "dropdown-menu-radio-item", "data-inset": inset, className: cn("relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute right-2 flex items-center justify-center", "data-slot": "dropdown-menu-radio-item-indicator", children: _jsx(MenuPrimitive.RadioItemIndicator, { children: _jsx(Check, {}) }) }), children] }));
|
|
45
|
+
}
|
|
46
|
+
function DropdownMenuSeparator({ className, ...props }) {
|
|
47
|
+
return _jsx(MenuPrimitive.Separator, { "data-slot": "dropdown-menu-separator", className: cn('-mx-1 my-1 h-px bg-border', className), ...props });
|
|
48
|
+
}
|
|
49
|
+
function DropdownMenuShortcut({ className, ...props }) {
|
|
50
|
+
return (_jsx("span", { "data-slot": "dropdown-menu-shortcut", className: cn('ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground', className), ...props }));
|
|
51
|
+
}
|
|
52
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
import { DropdownMenu } from '.';
|
|
3
|
+
declare const meta: {
|
|
4
|
+
title: string;
|
|
5
|
+
component: typeof DropdownMenu;
|
|
6
|
+
tags: string[];
|
|
7
|
+
parameters: {
|
|
8
|
+
layout: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
export default meta;
|
|
12
|
+
type Story = StoryObj<typeof meta>;
|
|
13
|
+
export declare const Default: Story;
|
|
14
|
+
export declare const WithShortcuts: Story;
|
|
15
|
+
export declare const WithCheckboxAndRadio: Story;
|
|
16
|
+
export declare const WithSubmenu: Story;
|
|
17
|
+
export declare const Gallery: Story;
|
|
18
|
+
//# sourceMappingURL=dropdown-menu.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dropdown-menu.stories.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown-menu/dropdown-menu.stories.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EACH,YAAY,EAcf,MAAM,GAAG,CAAC;AAEX,QAAA,MAAM,IAAI;;;;;;;CAO2B,CAAC;AAEtC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAMnC,eAAO,MAAM,OAAO,EAAE,KAerB,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,KAkB3B,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,KAuBlC,CAAC;AAEF,eAAO,MAAM,WAAW,EAAE,KAkBzB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAqDrB,CAAC"}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from '../button';
|
|
3
|
+
import { DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, } from '.';
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'UI/DropdownMenu',
|
|
6
|
+
component: DropdownMenu,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
function MenuTriggerButton(props) {
|
|
14
|
+
return _jsx(DropdownMenuTrigger, { render: _jsx(Button, { variant: "outline", size: "sm" }), children: props.children });
|
|
15
|
+
}
|
|
16
|
+
export const Default = {
|
|
17
|
+
render: () => (_jsxs(DropdownMenu, { children: [_jsx(MenuTriggerButton, { children: "Open menu" }), _jsxs(DropdownMenuContent, { className: "min-w-48", children: [_jsxs(DropdownMenuGroup, { children: [_jsx(DropdownMenuLabel, { children: "Actions" }), _jsx(DropdownMenuItem, { children: "New file" }), _jsx(DropdownMenuItem, { children: "New folder" })] }), _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuItem, { variant: "destructive", children: "Delete" })] })] })),
|
|
18
|
+
};
|
|
19
|
+
export const WithShortcuts = {
|
|
20
|
+
render: () => (_jsxs(DropdownMenu, { children: [_jsx(MenuTriggerButton, { children: "File" }), _jsxs(DropdownMenuContent, { className: "min-w-52", children: [_jsxs(DropdownMenuItem, { children: ["Save ", _jsx(DropdownMenuShortcut, { children: "\u2318S" })] }), _jsxs(DropdownMenuItem, { children: ["Duplicate ", _jsx(DropdownMenuShortcut, { children: "\u2318D" })] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuItem, { variant: "destructive", children: ["Delete ", _jsx(DropdownMenuShortcut, { children: "\u232B" })] })] })] })),
|
|
21
|
+
};
|
|
22
|
+
export const WithCheckboxAndRadio = {
|
|
23
|
+
render: () => (_jsxs(DropdownMenu, { children: [_jsx(MenuTriggerButton, { children: "View options" }), _jsxs(DropdownMenuContent, { className: "min-w-48", children: [_jsxs(DropdownMenuGroup, { children: [_jsx(DropdownMenuLabel, { children: "Appearance" }), _jsx(DropdownMenuCheckboxItem, { defaultChecked: true, children: "Show sidebar" }), _jsx(DropdownMenuCheckboxItem, { children: "Show status bar" })] }), _jsx(DropdownMenuSeparator, {}), _jsxs(DropdownMenuRadioGroup, { defaultValue: "comfortable", children: [_jsx(DropdownMenuLabel, { inset: true, children: "Density" }), _jsx(DropdownMenuRadioItem, { value: "compact", inset: true, children: "Compact" }), _jsx(DropdownMenuRadioItem, { value: "comfortable", inset: true, children: "Comfortable" })] })] })] })),
|
|
24
|
+
};
|
|
25
|
+
export const WithSubmenu = {
|
|
26
|
+
render: () => (_jsxs(DropdownMenu, { children: [_jsx(MenuTriggerButton, { children: "More" }), _jsxs(DropdownMenuContent, { className: "min-w-44", children: [_jsx(DropdownMenuItem, { children: "Back" }), _jsxs(DropdownMenuSub, { children: [_jsx(DropdownMenuSubTrigger, { children: "Share" }), _jsxs(DropdownMenuSubContent, { children: [_jsx(DropdownMenuItem, { children: "Copy link" }), _jsx(DropdownMenuItem, { children: "Email" })] })] }), _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuItem, { variant: "destructive", children: "Remove" })] })] })),
|
|
27
|
+
};
|
|
28
|
+
export const Gallery = {
|
|
29
|
+
parameters: { layout: 'padded' },
|
|
30
|
+
render: () => (_jsxs("div", { className: "flex flex-col gap-10", children: [_jsxs("div", { className: "flex flex-col gap-3", children: [_jsx("p", { className: "text-xs font-medium tracking-wide text-muted-foreground uppercase", children: "Default" }), _jsx("div", { className: "flex flex-wrap gap-4", children: _jsxs(DropdownMenu, { children: [_jsx(MenuTriggerButton, { children: "Menu" }), _jsxs(DropdownMenuContent, { children: [_jsx(DropdownMenuItem, { children: "One" }), _jsx(DropdownMenuItem, { children: "Two" })] })] }) })] }), _jsxs("div", { className: "flex flex-col gap-3", children: [_jsx("p", { className: "text-xs font-medium tracking-wide text-muted-foreground uppercase", children: "Shortcuts & destructive" }), _jsx("div", { className: "flex flex-wrap gap-4", children: _jsxs(DropdownMenu, { children: [_jsx(MenuTriggerButton, { children: "Edit" }), _jsxs(DropdownMenuContent, { className: "min-w-52", children: [_jsxs(DropdownMenuItem, { children: ["Cut ", _jsx(DropdownMenuShortcut, { children: "\u2318X" })] }), _jsxs(DropdownMenuItem, { children: ["Copy ", _jsx(DropdownMenuShortcut, { children: "\u2318C" })] }), _jsx(DropdownMenuSeparator, {}), _jsx(DropdownMenuItem, { variant: "destructive", children: "Delete" })] })] }) })] }), _jsxs("div", { className: "flex flex-col gap-3", children: [_jsx("p", { className: "text-xs font-medium tracking-wide text-muted-foreground uppercase", children: "Nested" }), _jsx("div", { className: "flex flex-wrap gap-4", children: _jsxs(DropdownMenu, { children: [_jsx(MenuTriggerButton, { children: "Export" }), _jsx(DropdownMenuContent, { children: _jsxs(DropdownMenuSub, { children: [_jsx(DropdownMenuSubTrigger, { children: "Download" }), _jsxs(DropdownMenuSubContent, { children: [_jsx(DropdownMenuItem, { children: "PNG" }), _jsx(DropdownMenuItem, { children: "SVG" })] })] }) })] }) })] })] })),
|
|
31
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, } from './dropdown-menu';
|
|
2
|
+
export type { DropdownMenuProps, DropdownMenuPortalProps, DropdownMenuTriggerProps, DropdownMenuContentProps, DropdownMenuSubContentProps, DropdownMenuGroupProps, DropdownMenuLabelProps, DropdownMenuItemProps, DropdownMenuSubProps, DropdownMenuSubTriggerProps, DropdownMenuCheckboxItemProps, DropdownMenuRadioGroupProps, DropdownMenuRadioItemProps, DropdownMenuSeparatorProps, DropdownMenuShortcutProps, } from './dropdown-menu';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/dropdown-menu/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,YAAY,EACZ,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EACjB,gBAAgB,EAChB,wBAAwB,EACxB,sBAAsB,EACtB,qBAAqB,EACrB,qBAAqB,EACrB,oBAAoB,EACpB,eAAe,EACf,sBAAsB,EACtB,sBAAsB,GACzB,MAAM,iBAAiB,CAAC;AAEzB,YAAY,EACR,iBAAiB,EACjB,uBAAuB,EACvB,wBAAwB,EACxB,wBAAwB,EACxB,2BAA2B,EAC3B,sBAAsB,EACtB,sBAAsB,EACtB,qBAAqB,EACrB,oBAAoB,EACpB,2BAA2B,EAC3B,6BAA6B,EAC7B,2BAA2B,EAC3B,0BAA0B,EAC1B,0BAA0B,EAC1B,yBAAyB,GAC5B,MAAM,iBAAiB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { DropdownMenu, DropdownMenuPortal, DropdownMenuTrigger, DropdownMenuContent, DropdownMenuGroup, DropdownMenuLabel, DropdownMenuItem, DropdownMenuCheckboxItem, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubTrigger, DropdownMenuSubContent, } from './dropdown-menu';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { type VariantProps } from 'class-variance-authority';
|
|
3
|
+
/** Props for `Empty`. */
|
|
4
|
+
export type EmptyProps = React.ComponentProps<'div'>;
|
|
5
|
+
/** Props for `EmptyHeader`. */
|
|
6
|
+
export type EmptyHeaderProps = React.ComponentProps<'div'>;
|
|
7
|
+
/** Props for `EmptyMedia`. */
|
|
8
|
+
export type EmptyMediaProps = React.ComponentProps<'div'> & VariantProps<typeof emptyMediaVariants>;
|
|
9
|
+
/** Props for `EmptyTitle`. */
|
|
10
|
+
export type EmptyTitleProps = React.ComponentProps<'div'>;
|
|
11
|
+
/** Props for `EmptyDescription`. */
|
|
12
|
+
export type EmptyDescriptionProps = React.ComponentProps<'div'>;
|
|
13
|
+
/** Props for `EmptyContent`. */
|
|
14
|
+
export type EmptyContentProps = React.ComponentProps<'div'>;
|
|
15
|
+
declare function Empty({ className, ...props }: EmptyProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare function EmptyHeader({ className, ...props }: EmptyHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare const emptyMediaVariants: (props?: ({
|
|
18
|
+
variant?: "default" | "icon" | null | undefined;
|
|
19
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
20
|
+
declare function EmptyMedia({ className, variant, ...props }: EmptyMediaProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare function EmptyTitle({ className, ...props }: EmptyTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
declare function EmptyDescription({ className, ...props }: EmptyDescriptionProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare function EmptyContent({ className, ...props }: EmptyContentProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, emptyMediaVariants };
|
|
25
|
+
//# sourceMappingURL=empty.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty.d.ts","sourceRoot":"","sources":["../../../src/components/empty/empty.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAIlE,yBAAyB;AACzB,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAErD,+BAA+B;AAC/B,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAE3D,8BAA8B;AAC9B,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,GAAG,YAAY,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpG,8BAA8B;AAC9B,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAE1D,oCAAoC;AACpC,MAAM,MAAM,qBAAqB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAEhE,gCAAgC;AAChC,MAAM,MAAM,iBAAiB,GAAG,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;AAE5D,iBAAS,KAAK,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,UAAU,2CAWjD;AAED,iBAAS,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,gBAAgB,2CAE7D;AAED,QAAA,MAAM,kBAAkB;;8EAUtB,CAAC;AAEH,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,OAAmB,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAEhF;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,eAAe,2CAE3D;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,qBAAqB,2CAQvE;AAED,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CAQ/D;AAED,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
import { cva } from 'class-variance-authority';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
function Empty({ className, ...props }) {
|
|
6
|
+
return (_jsx("div", { "data-slot": "empty", className: cn('flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance', className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
function EmptyHeader({ className, ...props }) {
|
|
9
|
+
return _jsx("div", { "data-slot": "empty-header", className: cn('flex max-w-sm flex-col items-center gap-2', className), ...props });
|
|
10
|
+
}
|
|
11
|
+
const emptyMediaVariants = cva('mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0', {
|
|
12
|
+
variants: {
|
|
13
|
+
variant: {
|
|
14
|
+
default: 'bg-transparent',
|
|
15
|
+
icon: "flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4",
|
|
16
|
+
},
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
variant: 'default',
|
|
20
|
+
},
|
|
21
|
+
});
|
|
22
|
+
function EmptyMedia({ className, variant = 'default', ...props }) {
|
|
23
|
+
return _jsx("div", { "data-slot": "empty-icon", "data-variant": variant, className: cn(emptyMediaVariants({ variant, className })), ...props });
|
|
24
|
+
}
|
|
25
|
+
function EmptyTitle({ className, ...props }) {
|
|
26
|
+
return _jsx("div", { "data-slot": "empty-title", className: cn('font-heading text-sm font-medium tracking-tight', className), ...props });
|
|
27
|
+
}
|
|
28
|
+
function EmptyDescription({ className, ...props }) {
|
|
29
|
+
return (_jsx("div", { "data-slot": "empty-description", className: cn('text-sm/relaxed text-muted-foreground [&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary', className), ...props }));
|
|
30
|
+
}
|
|
31
|
+
function EmptyContent({ className, ...props }) {
|
|
32
|
+
return (_jsx("div", { "data-slot": "empty-content", className: cn('flex w-full max-w-sm min-w-0 flex-col items-center gap-2.5 text-sm text-balance', className), ...props }));
|
|
33
|
+
}
|
|
34
|
+
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, emptyMediaVariants };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { Meta, StoryObj } from '@storybook/react';
|
|
2
|
+
import { Empty } from './empty';
|
|
3
|
+
declare const meta: Meta<typeof Empty>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Default: Story;
|
|
7
|
+
//# sourceMappingURL=empty.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"empty.stories.d.ts","sourceRoot":"","sources":["../../../src/components/empty/empty.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGvD,OAAO,EAAE,KAAK,EAAuE,MAAM,SAAS,CAAC;AAErG,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,OAAO,KAAK,CAcC,CAAC;AAE/B,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAerB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { FolderOpen } from 'lucide-react';
|
|
3
|
+
import { Button } from '../button';
|
|
4
|
+
import { Empty, EmptyContent, EmptyDescription, EmptyHeader, EmptyMedia, EmptyTitle } from './empty';
|
|
5
|
+
const meta = {
|
|
6
|
+
title: 'UI/Empty',
|
|
7
|
+
component: Empty,
|
|
8
|
+
tags: ['autodocs'],
|
|
9
|
+
parameters: {
|
|
10
|
+
layout: 'centered',
|
|
11
|
+
},
|
|
12
|
+
decorators: [
|
|
13
|
+
(Story) => (_jsx("div", { className: "flex w-full max-w-md justify-center p-4", children: _jsx(Story, {}) })),
|
|
14
|
+
],
|
|
15
|
+
};
|
|
16
|
+
export default meta;
|
|
17
|
+
export const Default = {
|
|
18
|
+
render: () => (_jsxs(Empty, { children: [_jsxs(EmptyHeader, { children: [_jsx(EmptyMedia, { variant: "icon", children: _jsx(FolderOpen, {}) }), _jsx(EmptyTitle, { children: "No projects yet" }), _jsx(EmptyDescription, { children: "Create a project to get started, or browse templates." })] }), _jsx(EmptyContent, { children: _jsx(Button, { size: "sm", children: "New project" }) })] })),
|
|
19
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, emptyMediaVariants } from './empty';
|
|
2
|
+
export type { EmptyProps, EmptyHeaderProps, EmptyMediaProps, EmptyTitleProps, EmptyDescriptionProps, EmptyContentProps } from './empty';
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/empty/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,UAAU,EAAE,gBAAgB,EAAE,YAAY,EAAE,UAAU,EAAE,kBAAkB,EAAE,MAAM,SAAS,CAAC;AAEzH,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,eAAe,EAAE,eAAe,EAAE,qBAAqB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Empty, EmptyHeader, EmptyTitle, EmptyDescription, EmptyContent, EmptyMedia, emptyMediaVariants } from './empty';
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { Field as FieldPrimitive } from '@base-ui/react/field';
|
|
2
|
+
declare function FieldRoot({ className, ...props }: FieldPrimitive.Root.Props): import("react/jsx-runtime").JSX.Element;
|
|
3
|
+
declare function FieldLabel({ className, ...props }: FieldPrimitive.Label.Props): import("react/jsx-runtime").JSX.Element;
|
|
4
|
+
declare function FieldDescription({ className, ...props }: FieldPrimitive.Description.Props): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function FieldError({ className, ...props }: FieldPrimitive.Error.Props): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
export type FieldControlProps = Omit<FieldPrimitive.Control.Props, 'size'> & {
|
|
7
|
+
size?: 'sm' | 'default';
|
|
8
|
+
};
|
|
9
|
+
declare function FieldControl({ className, size, ...props }: FieldControlProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function FieldItem({ className, ...props }: FieldPrimitive.Item.Props): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
declare const FieldValidity: import("react").FC<import("@base-ui/react").FieldValidityProps>;
|
|
12
|
+
export declare const Field: {
|
|
13
|
+
Root: typeof FieldRoot;
|
|
14
|
+
Label: typeof FieldLabel;
|
|
15
|
+
Description: typeof FieldDescription;
|
|
16
|
+
Error: typeof FieldError;
|
|
17
|
+
Control: typeof FieldControl;
|
|
18
|
+
Validity: import("react").FC<import("@base-ui/react").FieldValidityProps>;
|
|
19
|
+
Item: typeof FieldItem;
|
|
20
|
+
};
|
|
21
|
+
export { FieldRoot, FieldLabel, FieldDescription, FieldError, FieldControl, FieldItem, FieldValidity };
|
|
22
|
+
//# sourceMappingURL=field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../../src/components/field/field.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,IAAI,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAK/D,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,KAAK,2CAEpE;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,KAAK,2CAWtE;AAED,iBAAS,gBAAgB,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,WAAW,CAAC,KAAK,2CAElF;AAED,iBAAS,UAAU,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,KAAK,2CAEtE;AAED,MAAM,MAAM,iBAAiB,GAAG,IAAI,CAAC,cAAc,CAAC,OAAO,CAAC,KAAK,EAAE,MAAM,CAAC,GAAG;IAAE,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;CAAE,CAAC;AAEzG,iBAAS,YAAY,CAAC,EAAE,SAAS,EAAE,IAAgB,EAAE,GAAG,KAAK,EAAE,EAAE,iBAAiB,2CAEjF;AAED,iBAAS,SAAS,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,KAAK,2CAEpE;AAED,QAAA,MAAM,aAAa,iEAA0B,CAAC;AAE9C,eAAO,MAAM,KAAK;;;;;;;;CAQjB,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,CAAC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Field as FieldPrimitive } from '@base-ui/react/field';
|
|
4
|
+
import { cn } from '../../lib/utils';
|
|
5
|
+
import { inputVariants } from '../input/input';
|
|
6
|
+
function FieldRoot({ className, ...props }) {
|
|
7
|
+
return _jsx(FieldPrimitive.Root, { "data-slot": "field", className: cn('group/field flex flex-col gap-1.5', className), ...props });
|
|
8
|
+
}
|
|
9
|
+
function FieldLabel({ className, ...props }) {
|
|
10
|
+
return (_jsx(FieldPrimitive.Label, { "data-slot": "field-label", className: cn('flex items-center gap-2 text-sm leading-none font-medium select-none group-data-disabled/field:pointer-events-none group-data-disabled/field:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50', className), ...props }));
|
|
11
|
+
}
|
|
12
|
+
function FieldDescription({ className, ...props }) {
|
|
13
|
+
return _jsx(FieldPrimitive.Description, { "data-slot": "field-description", className: cn('text-xs text-muted-foreground', className), ...props });
|
|
14
|
+
}
|
|
15
|
+
function FieldError({ className, ...props }) {
|
|
16
|
+
return _jsx(FieldPrimitive.Error, { "data-slot": "field-error", className: cn('text-xs text-destructive-foreground', className), ...props });
|
|
17
|
+
}
|
|
18
|
+
function FieldControl({ className, size = 'default', ...props }) {
|
|
19
|
+
return _jsx(FieldPrimitive.Control, { "data-slot": "field-control", className: cn(inputVariants({ size }), className), ...props });
|
|
20
|
+
}
|
|
21
|
+
function FieldItem({ className, ...props }) {
|
|
22
|
+
return _jsx(FieldPrimitive.Item, { "data-slot": "field-item", className: cn('flex gap-2', className), ...props });
|
|
23
|
+
}
|
|
24
|
+
const FieldValidity = FieldPrimitive.Validity;
|
|
25
|
+
export const Field = {
|
|
26
|
+
Root: FieldRoot,
|
|
27
|
+
Label: FieldLabel,
|
|
28
|
+
Description: FieldDescription,
|
|
29
|
+
Error: FieldError,
|
|
30
|
+
Control: FieldControl,
|
|
31
|
+
Validity: FieldValidity,
|
|
32
|
+
Item: FieldItem,
|
|
33
|
+
};
|
|
34
|
+
export { FieldRoot, FieldLabel, FieldDescription, FieldError, FieldControl, FieldItem, FieldValidity };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { StoryObj } from '@storybook/react';
|
|
2
|
+
declare const meta: {
|
|
3
|
+
title: string;
|
|
4
|
+
component: typeof import("./field").FieldRoot;
|
|
5
|
+
tags: string[];
|
|
6
|
+
parameters: {
|
|
7
|
+
layout: string;
|
|
8
|
+
};
|
|
9
|
+
};
|
|
10
|
+
export default meta;
|
|
11
|
+
type Story = StoryObj<typeof meta>;
|
|
12
|
+
export declare const Default: Story;
|
|
13
|
+
export declare const Invalid: Story;
|
|
14
|
+
export declare const WithFieldControl: Story;
|
|
15
|
+
export declare const Gallery: Story;
|
|
16
|
+
//# sourceMappingURL=field.stories.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field.stories.d.ts","sourceRoot":"","sources":["../../../src/components/field/field.stories.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAKvD,QAAA,MAAM,IAAI;;;;;;;CAOyB,CAAC;AAEpC,eAAe,IAAI,CAAC;AACpB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAEnC,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAQrB,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,KAQ9B,CAAC;AAEF,eAAO,MAAM,OAAO,EAAE,KAoBrB,CAAC"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Input } from '../input';
|
|
3
|
+
import { Field } from './field';
|
|
4
|
+
const meta = {
|
|
5
|
+
title: 'UI/Field',
|
|
6
|
+
component: Field.Root,
|
|
7
|
+
tags: ['autodocs'],
|
|
8
|
+
parameters: {
|
|
9
|
+
layout: 'centered',
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
export default meta;
|
|
13
|
+
export const Default = {
|
|
14
|
+
render: () => (_jsxs(Field.Root, { name: "email", className: "w-72", children: [_jsx(Field.Label, { children: "Email" }), _jsx(Input, { type: "email", placeholder: "you@example.com" }), _jsx(Field.Description, { children: "We will never share your email." })] })),
|
|
15
|
+
};
|
|
16
|
+
export const Invalid = {
|
|
17
|
+
render: () => (_jsxs(Field.Root, { name: "email", invalid: true, className: "w-72", children: [_jsx(Field.Label, { children: "Email" }), _jsx(Input, { type: "email", placeholder: "you@example.com" }), _jsx(Field.Error, { children: "Enter a valid email address." })] })),
|
|
18
|
+
};
|
|
19
|
+
export const WithFieldControl = {
|
|
20
|
+
name: 'Using Field.Control',
|
|
21
|
+
render: () => (_jsxs(Field.Root, { name: "name", className: "w-72", children: [_jsx(Field.Label, { children: "Display name" }), _jsx(Field.Control, { placeholder: "Jane Doe" })] })),
|
|
22
|
+
};
|
|
23
|
+
export const Gallery = {
|
|
24
|
+
parameters: { layout: 'padded' },
|
|
25
|
+
render: () => (_jsxs("div", { className: "flex max-w-md flex-col gap-8", children: [_jsxs(Field.Root, { name: "g1", className: "w-full", children: [_jsx(Field.Label, { children: "Basic" }), _jsx(Field.Control, { placeholder: "Field.Control" }), _jsx(Field.Description, { children: "Helper text below the control." })] }), _jsxs(Field.Root, { name: "g2", invalid: true, className: "w-full", children: [_jsx(Field.Label, { children: "Invalid" }), _jsx(Field.Control, { placeholder: "Invalid value" }), _jsx(Field.Error, { children: "Fix this field." })] }), _jsxs(Field.Root, { name: "g3", disabled: true, className: "w-full", children: [_jsx(Field.Label, { children: "Disabled" }), _jsx(Field.Control, { placeholder: "Cannot edit" })] })] })),
|
|
26
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/field/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,gBAAgB,EAAE,UAAU,EAAE,YAAY,EAAE,SAAS,EAAE,aAAa,EAAE,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Field, FieldRoot, FieldLabel, FieldDescription, FieldError, FieldControl, FieldItem, FieldValidity } from './field';
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { FilterI18nConfig, FilterOperator } from './filters-types';
|
|
2
|
+
export declare const DEFAULT_I18N: FilterI18nConfig;
|
|
3
|
+
export declare const createOperatorsFromI18n: (i18n: FilterI18nConfig) => Record<string, FilterOperator[]>;
|
|
4
|
+
export declare const DEFAULT_OPERATORS: Record<string, FilterOperator[]>;
|
|
5
|
+
//# sourceMappingURL=filters-defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filters-defaults.d.ts","sourceRoot":"","sources":["../../../src/components/filters/filters-defaults.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAExE,eAAO,MAAM,YAAY,EAAE,gBAkE1B,CAAC;AAEF,eAAO,MAAM,uBAAuB,GAAI,MAAM,gBAAgB,KAAG,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAgC9F,CAAC;AAEH,eAAO,MAAM,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,EAAE,CAAyC,CAAC"}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
export const DEFAULT_I18N = {
|
|
2
|
+
addFilter: 'Filter',
|
|
3
|
+
searchFields: 'Filter...',
|
|
4
|
+
noFieldsFound: 'No filters found.',
|
|
5
|
+
noResultsFound: 'No results found.',
|
|
6
|
+
select: 'Select...',
|
|
7
|
+
true: 'True',
|
|
8
|
+
false: 'False',
|
|
9
|
+
min: 'Min',
|
|
10
|
+
max: 'Max',
|
|
11
|
+
to: 'to',
|
|
12
|
+
typeAndPressEnter: 'Type and press Enter to add tag',
|
|
13
|
+
selected: 'selected',
|
|
14
|
+
selectedCount: 'selected',
|
|
15
|
+
percent: '%',
|
|
16
|
+
defaultCurrency: '$',
|
|
17
|
+
defaultColor: '#000000',
|
|
18
|
+
addFilterTitle: 'Add filter',
|
|
19
|
+
operators: {
|
|
20
|
+
is: 'is',
|
|
21
|
+
isNot: 'is not',
|
|
22
|
+
isAnyOf: 'is any of',
|
|
23
|
+
isNotAnyOf: 'is not any of',
|
|
24
|
+
includesAll: 'includes all',
|
|
25
|
+
excludesAll: 'excludes all',
|
|
26
|
+
before: 'before',
|
|
27
|
+
after: 'after',
|
|
28
|
+
between: 'between',
|
|
29
|
+
notBetween: 'not between',
|
|
30
|
+
contains: 'contains',
|
|
31
|
+
notContains: 'does not contain',
|
|
32
|
+
startsWith: 'starts with',
|
|
33
|
+
endsWith: 'ends with',
|
|
34
|
+
isExactly: 'is exactly',
|
|
35
|
+
equals: 'equals',
|
|
36
|
+
notEquals: 'not equals',
|
|
37
|
+
greaterThan: 'greater than',
|
|
38
|
+
lessThan: 'less than',
|
|
39
|
+
overlaps: 'overlaps',
|
|
40
|
+
includes: 'includes',
|
|
41
|
+
excludes: 'excludes',
|
|
42
|
+
includesAllOf: 'includes all of',
|
|
43
|
+
includesAnyOf: 'includes any of',
|
|
44
|
+
empty: 'is empty',
|
|
45
|
+
notEmpty: 'is not empty',
|
|
46
|
+
},
|
|
47
|
+
placeholders: {
|
|
48
|
+
enterField: (fieldType) => `Enter ${fieldType}...`,
|
|
49
|
+
selectField: 'Select...',
|
|
50
|
+
searchField: (fieldName) => `Search ${fieldName.toLowerCase()}...`,
|
|
51
|
+
enterKey: 'Enter key...',
|
|
52
|
+
enterValue: 'Enter value...',
|
|
53
|
+
},
|
|
54
|
+
helpers: {
|
|
55
|
+
formatOperator: (operator) => operator.replace(/_/g, ' '),
|
|
56
|
+
},
|
|
57
|
+
validation: {
|
|
58
|
+
invalidEmail: 'Invalid email format',
|
|
59
|
+
invalidUrl: 'Invalid URL format',
|
|
60
|
+
invalidTel: 'Invalid phone format',
|
|
61
|
+
invalid: 'Invalid input format',
|
|
62
|
+
},
|
|
63
|
+
};
|
|
64
|
+
export const createOperatorsFromI18n = (i18n) => ({
|
|
65
|
+
select: [
|
|
66
|
+
{ value: 'is', label: i18n.operators.is },
|
|
67
|
+
{ value: 'is_not', label: i18n.operators.isNot },
|
|
68
|
+
{ value: 'empty', label: i18n.operators.empty },
|
|
69
|
+
{ value: 'not_empty', label: i18n.operators.notEmpty },
|
|
70
|
+
],
|
|
71
|
+
multiselect: [
|
|
72
|
+
{ value: 'is_any_of', label: i18n.operators.isAnyOf },
|
|
73
|
+
{ value: 'is_not_any_of', label: i18n.operators.isNotAnyOf },
|
|
74
|
+
{ value: 'includes_all', label: i18n.operators.includesAll },
|
|
75
|
+
{ value: 'excludes_all', label: i18n.operators.excludesAll },
|
|
76
|
+
{ value: 'empty', label: i18n.operators.empty },
|
|
77
|
+
{ value: 'not_empty', label: i18n.operators.notEmpty },
|
|
78
|
+
],
|
|
79
|
+
text: [
|
|
80
|
+
{ value: 'contains', label: i18n.operators.contains },
|
|
81
|
+
{ value: 'not_contains', label: i18n.operators.notContains },
|
|
82
|
+
{ value: 'starts_with', label: i18n.operators.startsWith },
|
|
83
|
+
{ value: 'ends_with', label: i18n.operators.endsWith },
|
|
84
|
+
{ value: 'is', label: i18n.operators.isExactly },
|
|
85
|
+
{ value: 'empty', label: i18n.operators.empty },
|
|
86
|
+
{ value: 'not_empty', label: i18n.operators.notEmpty },
|
|
87
|
+
],
|
|
88
|
+
custom: [
|
|
89
|
+
{ value: 'is', label: i18n.operators.is },
|
|
90
|
+
{ value: 'after', label: i18n.operators.after },
|
|
91
|
+
{ value: 'is', label: i18n.operators.is },
|
|
92
|
+
{ value: 'between', label: i18n.operators.between },
|
|
93
|
+
{ value: 'empty', label: i18n.operators.empty },
|
|
94
|
+
{ value: 'not_empty', label: i18n.operators.notEmpty },
|
|
95
|
+
],
|
|
96
|
+
});
|
|
97
|
+
export const DEFAULT_OPERATORS = createOperatorsFromI18n(DEFAULT_I18N);
|