jaci-ui 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/components/accordion/accordion.cjs +83 -0
- package/dist/components/accordion/accordion.cjs.map +1 -0
- package/dist/components/accordion/accordion.d.cts +32 -0
- package/dist/components/accordion/accordion.d.ts +32 -0
- package/dist/components/accordion/accordion.js +77 -0
- package/dist/components/accordion/accordion.js.map +1 -0
- package/dist/components/accordion/index.d.cts +2 -0
- package/dist/components/accordion/index.d.ts +2 -0
- package/dist/components/alert/alert.cjs +76 -0
- package/dist/components/alert/alert.cjs.map +1 -0
- package/dist/components/alert/alert.d.cts +26 -0
- package/dist/components/alert/alert.d.ts +26 -0
- package/dist/components/alert/alert.js +72 -0
- package/dist/components/alert/alert.js.map +1 -0
- package/dist/components/alert/index.d.cts +2 -0
- package/dist/components/alert/index.d.ts +2 -0
- package/dist/components/alert-dialog/alert-dialog.cjs +147 -0
- package/dist/components/alert-dialog/alert-dialog.cjs.map +1 -0
- package/dist/components/alert-dialog/alert-dialog.d.cts +73 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +73 -0
- package/dist/components/alert-dialog/alert-dialog.js +133 -0
- package/dist/components/alert-dialog/alert-dialog.js.map +1 -0
- package/dist/components/alert-dialog/index.d.cts +2 -0
- package/dist/components/alert-dialog/index.d.ts +2 -0
- package/dist/components/avatar/avatar.cjs +89 -0
- package/dist/components/avatar/avatar.cjs.map +1 -0
- package/dist/components/avatar/avatar.d.cts +33 -0
- package/dist/components/avatar/avatar.d.ts +33 -0
- package/dist/components/avatar/avatar.js +86 -0
- package/dist/components/avatar/avatar.js.map +1 -0
- package/dist/components/avatar/index.d.cts +2 -0
- package/dist/components/avatar/index.d.ts +2 -0
- package/dist/components/base-ui.cjs +14 -0
- package/dist/components/base-ui.cjs.map +1 -0
- package/dist/components/base-ui.js +14 -0
- package/dist/components/base-ui.js.map +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.cjs +84 -0
- package/dist/components/breadcrumbs/breadcrumbs.cjs.map +1 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.cts +31 -0
- package/dist/components/breadcrumbs/breadcrumbs.d.ts +31 -0
- package/dist/components/breadcrumbs/breadcrumbs.js +78 -0
- package/dist/components/breadcrumbs/breadcrumbs.js.map +1 -0
- package/dist/components/breadcrumbs/index.d.cts +2 -0
- package/dist/components/breadcrumbs/index.d.ts +2 -0
- package/dist/components/button/button.cjs +54 -0
- package/dist/components/button/button.cjs.map +1 -0
- package/dist/components/button/button.d.cts +21 -0
- package/dist/components/button/button.d.ts +21 -0
- package/dist/components/button/button.js +54 -0
- package/dist/components/button/button.js.map +1 -0
- package/dist/components/button/index.d.cts +2 -0
- package/dist/components/button/index.d.ts +2 -0
- package/dist/components/card/card.cjs +55 -0
- package/dist/components/card/card.cjs.map +1 -0
- package/dist/components/card/card.d.cts +13 -0
- package/dist/components/card/card.d.ts +13 -0
- package/dist/components/card/card.js +51 -0
- package/dist/components/card/card.js.map +1 -0
- package/dist/components/card/index.d.cts +2 -0
- package/dist/components/card/index.d.ts +2 -0
- package/dist/components/checkbox-group/checkbox-group.cjs +85 -0
- package/dist/components/checkbox-group/checkbox-group.cjs.map +1 -0
- package/dist/components/checkbox-group/checkbox-group.d.cts +37 -0
- package/dist/components/checkbox-group/checkbox-group.d.ts +37 -0
- package/dist/components/checkbox-group/checkbox-group.js +79 -0
- package/dist/components/checkbox-group/checkbox-group.js.map +1 -0
- package/dist/components/checkbox-group/index.d.cts +2 -0
- package/dist/components/checkbox-group/index.d.ts +2 -0
- package/dist/components/collapsible/collapsible.cjs +59 -0
- package/dist/components/collapsible/collapsible.cjs.map +1 -0
- package/dist/components/collapsible/collapsible.d.cts +22 -0
- package/dist/components/collapsible/collapsible.d.ts +22 -0
- package/dist/components/collapsible/collapsible.js +55 -0
- package/dist/components/collapsible/collapsible.js.map +1 -0
- package/dist/components/collapsible/index.d.cts +2 -0
- package/dist/components/collapsible/index.d.ts +2 -0
- package/dist/components/color-picker/color-picker.cjs +360 -0
- package/dist/components/color-picker/color-picker.cjs.map +1 -0
- package/dist/components/color-picker/color-picker.d.cts +94 -0
- package/dist/components/color-picker/color-picker.d.ts +94 -0
- package/dist/components/color-picker/color-picker.js +344 -0
- package/dist/components/color-picker/color-picker.js.map +1 -0
- package/dist/components/color-picker/color-utils.cjs +162 -0
- package/dist/components/color-picker/color-utils.cjs.map +1 -0
- package/dist/components/color-picker/color-utils.d.cts +14 -0
- package/dist/components/color-picker/color-utils.d.ts +14 -0
- package/dist/components/color-picker/color-utils.js +160 -0
- package/dist/components/color-picker/color-utils.js.map +1 -0
- package/dist/components/color-picker/index.d.cts +3 -0
- package/dist/components/color-picker/index.d.ts +3 -0
- package/dist/components/combobox/combobox.cjs +218 -0
- package/dist/components/combobox/combobox.cjs.map +1 -0
- package/dist/components/combobox/combobox.d.cts +81 -0
- package/dist/components/combobox/combobox.d.ts +81 -0
- package/dist/components/combobox/combobox.js +199 -0
- package/dist/components/combobox/combobox.js.map +1 -0
- package/dist/components/combobox/index.d.cts +2 -0
- package/dist/components/combobox/index.d.ts +2 -0
- package/dist/components/command/command.cjs +303 -0
- package/dist/components/command/command.cjs.map +1 -0
- package/dist/components/command/command.d.cts +50 -0
- package/dist/components/command/command.d.ts +50 -0
- package/dist/components/command/command.js +294 -0
- package/dist/components/command/command.js.map +1 -0
- package/dist/components/command/index.d.cts +2 -0
- package/dist/components/command/index.d.ts +2 -0
- package/dist/components/context-menu/context-menu.cjs +175 -0
- package/dist/components/context-menu/context-menu.cjs.map +1 -0
- package/dist/components/context-menu/context-menu.d.cts +69 -0
- package/dist/components/context-menu/context-menu.d.ts +69 -0
- package/dist/components/context-menu/context-menu.js +156 -0
- package/dist/components/context-menu/context-menu.js.map +1 -0
- package/dist/components/context-menu/index.d.cts +2 -0
- package/dist/components/context-menu/index.d.ts +2 -0
- package/dist/components/controls/checkbox.cjs +33 -0
- package/dist/components/controls/checkbox.cjs.map +1 -0
- package/dist/components/controls/checkbox.d.cts +12 -0
- package/dist/components/controls/checkbox.d.ts +12 -0
- package/dist/components/controls/checkbox.js +33 -0
- package/dist/components/controls/checkbox.js.map +1 -0
- package/dist/components/controls/index.d.cts +6 -0
- package/dist/components/controls/index.d.ts +6 -0
- package/dist/components/controls/input.cjs +29 -0
- package/dist/components/controls/input.cjs.map +1 -0
- package/dist/components/controls/input.d.cts +9 -0
- package/dist/components/controls/input.d.ts +9 -0
- package/dist/components/controls/input.js +29 -0
- package/dist/components/controls/input.js.map +1 -0
- package/dist/components/controls/radio.cjs +20 -0
- package/dist/components/controls/radio.cjs.map +1 -0
- package/dist/components/controls/radio.d.cts +7 -0
- package/dist/components/controls/radio.d.ts +7 -0
- package/dist/components/controls/radio.js +20 -0
- package/dist/components/controls/radio.js.map +1 -0
- package/dist/components/controls/switch.cjs +30 -0
- package/dist/components/controls/switch.cjs.map +1 -0
- package/dist/components/controls/switch.d.cts +10 -0
- package/dist/components/controls/switch.d.ts +10 -0
- package/dist/components/controls/switch.js +30 -0
- package/dist/components/controls/switch.js.map +1 -0
- package/dist/components/controls/textarea.cjs +30 -0
- package/dist/components/controls/textarea.cjs.map +1 -0
- package/dist/components/controls/textarea.d.cts +9 -0
- package/dist/components/controls/textarea.d.ts +9 -0
- package/dist/components/controls/textarea.js +30 -0
- package/dist/components/controls/textarea.js.map +1 -0
- package/dist/components/copyable/copyable.cjs +124 -0
- package/dist/components/copyable/copyable.cjs.map +1 -0
- package/dist/components/copyable/copyable.d.cts +27 -0
- package/dist/components/copyable/copyable.d.ts +27 -0
- package/dist/components/copyable/copyable.js +121 -0
- package/dist/components/copyable/copyable.js.map +1 -0
- package/dist/components/copyable/index.d.cts +2 -0
- package/dist/components/copyable/index.d.ts +2 -0
- package/dist/components/data-view/data-view.cjs +85 -0
- package/dist/components/data-view/data-view.cjs.map +1 -0
- package/dist/components/data-view/data-view.d.cts +31 -0
- package/dist/components/data-view/data-view.d.ts +31 -0
- package/dist/components/data-view/data-view.js +79 -0
- package/dist/components/data-view/data-view.js.map +1 -0
- package/dist/components/data-view/index.d.cts +2 -0
- package/dist/components/data-view/index.d.ts +2 -0
- package/dist/components/date-picker/date-picker.cjs +448 -0
- package/dist/components/date-picker/date-picker.cjs.map +1 -0
- package/dist/components/date-picker/date-picker.d.cts +118 -0
- package/dist/components/date-picker/date-picker.d.ts +118 -0
- package/dist/components/date-picker/date-picker.js +432 -0
- package/dist/components/date-picker/date-picker.js.map +1 -0
- package/dist/components/date-picker/date-utils.cjs +80 -0
- package/dist/components/date-picker/date-utils.cjs.map +1 -0
- package/dist/components/date-picker/date-utils.js +66 -0
- package/dist/components/date-picker/date-utils.js.map +1 -0
- package/dist/components/date-picker/index.d.cts +2 -0
- package/dist/components/date-picker/index.d.ts +2 -0
- package/dist/components/dialog/dialog.cjs +130 -0
- package/dist/components/dialog/dialog.cjs.map +1 -0
- package/dist/components/dialog/dialog.d.cts +55 -0
- package/dist/components/dialog/dialog.d.ts +55 -0
- package/dist/components/dialog/dialog.js +118 -0
- package/dist/components/dialog/dialog.js.map +1 -0
- package/dist/components/dialog/index.d.cts +2 -0
- package/dist/components/dialog/index.d.ts +2 -0
- package/dist/components/drawer/drawer.cjs +165 -0
- package/dist/components/drawer/drawer.cjs.map +1 -0
- package/dist/components/drawer/drawer.d.cts +58 -0
- package/dist/components/drawer/drawer.d.ts +58 -0
- package/dist/components/drawer/drawer.js +153 -0
- package/dist/components/drawer/drawer.js.map +1 -0
- package/dist/components/drawer/index.d.cts +2 -0
- package/dist/components/drawer/index.d.ts +2 -0
- package/dist/components/feedback/badge.cjs +18 -0
- package/dist/components/feedback/badge.cjs.map +1 -0
- package/dist/components/feedback/badge.d.cts +9 -0
- package/dist/components/feedback/badge.d.ts +9 -0
- package/dist/components/feedback/badge.js +18 -0
- package/dist/components/feedback/badge.js.map +1 -0
- package/dist/components/feedback/index.d.cts +2 -0
- package/dist/components/feedback/index.d.ts +2 -0
- package/dist/components/field/field.cjs +127 -0
- package/dist/components/field/field.cjs.map +1 -0
- package/dist/components/field/field.d.cts +47 -0
- package/dist/components/field/field.d.ts +47 -0
- package/dist/components/field/field.js +123 -0
- package/dist/components/field/field.js.map +1 -0
- package/dist/components/field/index.d.cts +2 -0
- package/dist/components/field/index.d.ts +2 -0
- package/dist/components/fieldset/fieldset.cjs +48 -0
- package/dist/components/fieldset/fieldset.cjs.map +1 -0
- package/dist/components/fieldset/fieldset.d.cts +17 -0
- package/dist/components/fieldset/fieldset.d.ts +17 -0
- package/dist/components/fieldset/fieldset.js +45 -0
- package/dist/components/fieldset/fieldset.js.map +1 -0
- package/dist/components/fieldset/index.d.cts +2 -0
- package/dist/components/fieldset/index.d.ts +2 -0
- package/dist/components/form/form.cjs +27 -0
- package/dist/components/form/form.cjs.map +1 -0
- package/dist/components/form/form.d.cts +18 -0
- package/dist/components/form/form.d.ts +18 -0
- package/dist/components/form/form.js +26 -0
- package/dist/components/form/form.js.map +1 -0
- package/dist/components/form/index.d.cts +2 -0
- package/dist/components/form/index.d.ts +2 -0
- package/dist/components/layout/index.cjs +73 -0
- package/dist/components/layout/index.cjs.map +1 -0
- package/dist/components/layout/index.d.cts +35 -0
- package/dist/components/layout/index.d.ts +35 -0
- package/dist/components/layout/index.js +69 -0
- package/dist/components/layout/index.js.map +1 -0
- package/dist/components/list/index.d.cts +2 -0
- package/dist/components/list/index.d.ts +2 -0
- package/dist/components/list/list.cjs +86 -0
- package/dist/components/list/list.cjs.map +1 -0
- package/dist/components/list/list.d.cts +37 -0
- package/dist/components/list/list.d.ts +37 -0
- package/dist/components/list/list.js +80 -0
- package/dist/components/list/list.js.map +1 -0
- package/dist/components/menu/index.d.cts +2 -0
- package/dist/components/menu/index.d.ts +2 -0
- package/dist/components/menu/menu.cjs +108 -0
- package/dist/components/menu/menu.cjs.map +1 -0
- package/dist/components/menu/menu.d.cts +47 -0
- package/dist/components/menu/menu.d.ts +47 -0
- package/dist/components/menu/menu.js +98 -0
- package/dist/components/menu/menu.js.map +1 -0
- package/dist/components/menubar/index.d.cts +2 -0
- package/dist/components/menubar/index.d.ts +2 -0
- package/dist/components/menubar/menubar.cjs +206 -0
- package/dist/components/menubar/menubar.cjs.map +1 -0
- package/dist/components/menubar/menubar.d.cts +74 -0
- package/dist/components/menubar/menubar.d.ts +74 -0
- package/dist/components/menubar/menubar.js +187 -0
- package/dist/components/menubar/menubar.js.map +1 -0
- package/dist/components/meter/index.d.cts +2 -0
- package/dist/components/meter/index.d.ts +2 -0
- package/dist/components/meter/meter.cjs +91 -0
- package/dist/components/meter/meter.cjs.map +1 -0
- package/dist/components/meter/meter.d.cts +30 -0
- package/dist/components/meter/meter.d.ts +30 -0
- package/dist/components/meter/meter.js +86 -0
- package/dist/components/meter/meter.js.map +1 -0
- package/dist/components/navigation/index.d.cts +2 -0
- package/dist/components/navigation/index.d.ts +2 -0
- package/dist/components/navigation/navigation.cjs +163 -0
- package/dist/components/navigation/navigation.cjs.map +1 -0
- package/dist/components/navigation/navigation.d.cts +75 -0
- package/dist/components/navigation/navigation.d.ts +75 -0
- package/dist/components/navigation/navigation.js +151 -0
- package/dist/components/navigation/navigation.js.map +1 -0
- package/dist/components/navigation-menu/index.d.cts +2 -0
- package/dist/components/navigation-menu/index.d.ts +2 -0
- package/dist/components/navigation-menu/navigation-menu.cjs +214 -0
- package/dist/components/navigation-menu/navigation-menu.cjs.map +1 -0
- package/dist/components/navigation-menu/navigation-menu.d.cts +54 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +54 -0
- package/dist/components/navigation-menu/navigation-menu.js +201 -0
- package/dist/components/navigation-menu/navigation-menu.js.map +1 -0
- package/dist/components/number-field/index.d.cts +2 -0
- package/dist/components/number-field/index.d.ts +2 -0
- package/dist/components/number-field/number-field.cjs +124 -0
- package/dist/components/number-field/number-field.cjs.map +1 -0
- package/dist/components/number-field/number-field.d.cts +48 -0
- package/dist/components/number-field/number-field.d.ts +48 -0
- package/dist/components/number-field/number-field.js +116 -0
- package/dist/components/number-field/number-field.js.map +1 -0
- package/dist/components/option-selector/index.d.cts +2 -0
- package/dist/components/option-selector/index.d.ts +2 -0
- package/dist/components/option-selector/option-selector.cjs +105 -0
- package/dist/components/option-selector/option-selector.cjs.map +1 -0
- package/dist/components/option-selector/option-selector.d.cts +46 -0
- package/dist/components/option-selector/option-selector.d.ts +46 -0
- package/dist/components/option-selector/option-selector.js +105 -0
- package/dist/components/option-selector/option-selector.js.map +1 -0
- package/dist/components/pagination/index.d.cts +2 -0
- package/dist/components/pagination/index.d.ts +2 -0
- package/dist/components/pagination/pagination.cjs +132 -0
- package/dist/components/pagination/pagination.cjs.map +1 -0
- package/dist/components/pagination/pagination.d.cts +44 -0
- package/dist/components/pagination/pagination.d.ts +44 -0
- package/dist/components/pagination/pagination.js +125 -0
- package/dist/components/pagination/pagination.js.map +1 -0
- package/dist/components/popover/index.d.cts +2 -0
- package/dist/components/popover/index.d.ts +2 -0
- package/dist/components/popover/popover.cjs +98 -0
- package/dist/components/popover/popover.cjs.map +1 -0
- package/dist/components/popover/popover.d.cts +61 -0
- package/dist/components/popover/popover.d.ts +61 -0
- package/dist/components/popover/popover.js +89 -0
- package/dist/components/popover/popover.js.map +1 -0
- package/dist/components/progress/index.d.cts +2 -0
- package/dist/components/progress/index.d.ts +2 -0
- package/dist/components/progress/progress.cjs +59 -0
- package/dist/components/progress/progress.cjs.map +1 -0
- package/dist/components/progress/progress.d.cts +20 -0
- package/dist/components/progress/progress.d.ts +20 -0
- package/dist/components/progress/progress.js +59 -0
- package/dist/components/progress/progress.js.map +1 -0
- package/dist/components/radio-group/index.d.cts +2 -0
- package/dist/components/radio-group/index.d.ts +2 -0
- package/dist/components/radio-group/radio-group.cjs +90 -0
- package/dist/components/radio-group/radio-group.cjs.map +1 -0
- package/dist/components/radio-group/radio-group.d.cts +40 -0
- package/dist/components/radio-group/radio-group.d.ts +40 -0
- package/dist/components/radio-group/radio-group.js +84 -0
- package/dist/components/radio-group/radio-group.js.map +1 -0
- package/dist/components/range-slider/index.d.cts +2 -0
- package/dist/components/range-slider/index.d.ts +2 -0
- package/dist/components/range-slider/range-slider.cjs +103 -0
- package/dist/components/range-slider/range-slider.cjs.map +1 -0
- package/dist/components/range-slider/range-slider.d.cts +40 -0
- package/dist/components/range-slider/range-slider.d.ts +40 -0
- package/dist/components/range-slider/range-slider.js +96 -0
- package/dist/components/range-slider/range-slider.js.map +1 -0
- package/dist/components/scroll-area/index.d.cts +2 -0
- package/dist/components/scroll-area/index.d.ts +2 -0
- package/dist/components/scroll-area/scroll-area.cjs +76 -0
- package/dist/components/scroll-area/scroll-area.cjs.map +1 -0
- package/dist/components/scroll-area/scroll-area.d.cts +26 -0
- package/dist/components/scroll-area/scroll-area.d.ts +26 -0
- package/dist/components/scroll-area/scroll-area.js +70 -0
- package/dist/components/scroll-area/scroll-area.js.map +1 -0
- package/dist/components/select/index.d.cts +2 -0
- package/dist/components/select/index.d.ts +2 -0
- package/dist/components/select/select.cjs +171 -0
- package/dist/components/select/select.cjs.map +1 -0
- package/dist/components/select/select.d.cts +74 -0
- package/dist/components/select/select.d.ts +74 -0
- package/dist/components/select/select.js +156 -0
- package/dist/components/select/select.js.map +1 -0
- package/dist/components/sidebar/index.d.cts +2 -0
- package/dist/components/sidebar/index.d.ts +2 -0
- package/dist/components/sidebar/sidebar.cjs +162 -0
- package/dist/components/sidebar/sidebar.cjs.map +1 -0
- package/dist/components/sidebar/sidebar.d.cts +64 -0
- package/dist/components/sidebar/sidebar.d.ts +64 -0
- package/dist/components/sidebar/sidebar.js +154 -0
- package/dist/components/sidebar/sidebar.js.map +1 -0
- package/dist/components/skeleton/index.d.cts +2 -0
- package/dist/components/skeleton/index.d.ts +2 -0
- package/dist/components/skeleton/skeleton.cjs +25 -0
- package/dist/components/skeleton/skeleton.cjs.map +1 -0
- package/dist/components/skeleton/skeleton.d.cts +13 -0
- package/dist/components/skeleton/skeleton.d.ts +13 -0
- package/dist/components/skeleton/skeleton.js +25 -0
- package/dist/components/skeleton/skeleton.js.map +1 -0
- package/dist/components/slider/index.d.cts +2 -0
- package/dist/components/slider/index.d.ts +2 -0
- package/dist/components/slider/slider.cjs +96 -0
- package/dist/components/slider/slider.cjs.map +1 -0
- package/dist/components/slider/slider.d.cts +39 -0
- package/dist/components/slider/slider.d.ts +39 -0
- package/dist/components/slider/slider.js +89 -0
- package/dist/components/slider/slider.js.map +1 -0
- package/dist/components/table/index.d.cts +2 -0
- package/dist/components/table/index.d.ts +2 -0
- package/dist/components/table/table.cjs +196 -0
- package/dist/components/table/table.cjs.map +1 -0
- package/dist/components/table/table.d.cts +66 -0
- package/dist/components/table/table.d.ts +66 -0
- package/dist/components/table/table.js +184 -0
- package/dist/components/table/table.js.map +1 -0
- package/dist/components/tabs/index.d.cts +2 -0
- package/dist/components/tabs/index.d.ts +2 -0
- package/dist/components/tabs/tabs.cjs +65 -0
- package/dist/components/tabs/tabs.cjs.map +1 -0
- package/dist/components/tabs/tabs.d.cts +23 -0
- package/dist/components/tabs/tabs.d.ts +23 -0
- package/dist/components/tabs/tabs.js +61 -0
- package/dist/components/tabs/tabs.js.map +1 -0
- package/dist/components/tags-input/index.d.cts +2 -0
- package/dist/components/tags-input/index.d.ts +2 -0
- package/dist/components/tags-input/tags-input.cjs +172 -0
- package/dist/components/tags-input/tags-input.cjs.map +1 -0
- package/dist/components/tags-input/tags-input.d.cts +26 -0
- package/dist/components/tags-input/tags-input.d.ts +26 -0
- package/dist/components/tags-input/tags-input.js +172 -0
- package/dist/components/tags-input/tags-input.js.map +1 -0
- package/dist/components/toast/index.d.cts +2 -0
- package/dist/components/toast/index.d.ts +2 -0
- package/dist/components/toast/toast.cjs +135 -0
- package/dist/components/toast/toast.cjs.map +1 -0
- package/dist/components/toast/toast.d.cts +61 -0
- package/dist/components/toast/toast.d.ts +61 -0
- package/dist/components/toast/toast.js +125 -0
- package/dist/components/toast/toast.js.map +1 -0
- package/dist/components/toggle/index.d.cts +2 -0
- package/dist/components/toggle/index.d.ts +2 -0
- package/dist/components/toggle/toggle.cjs +25 -0
- package/dist/components/toggle/toggle.cjs.map +1 -0
- package/dist/components/toggle/toggle.d.cts +16 -0
- package/dist/components/toggle/toggle.d.ts +16 -0
- package/dist/components/toggle/toggle.js +25 -0
- package/dist/components/toggle/toggle.js.map +1 -0
- package/dist/components/toggle-group/index.d.cts +2 -0
- package/dist/components/toggle-group/index.d.ts +2 -0
- package/dist/components/toggle-group/toggle-group.cjs +52 -0
- package/dist/components/toggle-group/toggle-group.cjs.map +1 -0
- package/dist/components/toggle-group/toggle-group.d.cts +25 -0
- package/dist/components/toggle-group/toggle-group.d.ts +25 -0
- package/dist/components/toggle-group/toggle-group.js +50 -0
- package/dist/components/toggle-group/toggle-group.js.map +1 -0
- package/dist/components/toolbar/index.d.cts +2 -0
- package/dist/components/toolbar/index.d.ts +2 -0
- package/dist/components/toolbar/toolbar.cjs +85 -0
- package/dist/components/toolbar/toolbar.cjs.map +1 -0
- package/dist/components/toolbar/toolbar.d.cts +34 -0
- package/dist/components/toolbar/toolbar.d.ts +34 -0
- package/dist/components/toolbar/toolbar.js +79 -0
- package/dist/components/toolbar/toolbar.js.map +1 -0
- package/dist/components/tooltip/index.d.cts +2 -0
- package/dist/components/tooltip/index.d.ts +2 -0
- package/dist/components/tooltip/tooltip.cjs +65 -0
- package/dist/components/tooltip/tooltip.cjs.map +1 -0
- package/dist/components/tooltip/tooltip.d.cts +28 -0
- package/dist/components/tooltip/tooltip.d.ts +28 -0
- package/dist/components/tooltip/tooltip.js +59 -0
- package/dist/components/tooltip/tooltip.js.map +1 -0
- package/dist/components/tree-view/index.d.cts +2 -0
- package/dist/components/tree-view/index.d.ts +2 -0
- package/dist/components/tree-view/tree-view.cjs +345 -0
- package/dist/components/tree-view/tree-view.cjs.map +1 -0
- package/dist/components/tree-view/tree-view.d.cts +39 -0
- package/dist/components/tree-view/tree-view.d.ts +39 -0
- package/dist/components/tree-view/tree-view.js +340 -0
- package/dist/components/tree-view/tree-view.js.map +1 -0
- package/dist/components/typography/heading.cjs +28 -0
- package/dist/components/typography/heading.cjs.map +1 -0
- package/dist/components/typography/heading.d.cts +12 -0
- package/dist/components/typography/heading.d.ts +12 -0
- package/dist/components/typography/heading.js +28 -0
- package/dist/components/typography/heading.js.map +1 -0
- package/dist/components/typography/index.d.cts +5 -0
- package/dist/components/typography/index.d.ts +5 -0
- package/dist/components/typography/link.cjs +18 -0
- package/dist/components/typography/link.cjs.map +1 -0
- package/dist/components/typography/link.d.cts +9 -0
- package/dist/components/typography/link.d.ts +9 -0
- package/dist/components/typography/link.js +18 -0
- package/dist/components/typography/link.js.map +1 -0
- package/dist/components/typography/paragraph.cjs +18 -0
- package/dist/components/typography/paragraph.cjs.map +1 -0
- package/dist/components/typography/paragraph.d.cts +7 -0
- package/dist/components/typography/paragraph.d.ts +7 -0
- package/dist/components/typography/paragraph.js +18 -0
- package/dist/components/typography/paragraph.js.map +1 -0
- package/dist/components/typography/text.cjs +21 -0
- package/dist/components/typography/text.cjs.map +1 -0
- package/dist/components/typography/text.d.cts +14 -0
- package/dist/components/typography/text.d.ts +14 -0
- package/dist/components/typography/text.js +21 -0
- package/dist/components/typography/text.js.map +1 -0
- package/dist/components/upload/index.d.cts +2 -0
- package/dist/components/upload/index.d.ts +2 -0
- package/dist/components/upload/upload.cjs +411 -0
- package/dist/components/upload/upload.cjs.map +1 -0
- package/dist/components/upload/upload.d.cts +91 -0
- package/dist/components/upload/upload.d.ts +91 -0
- package/dist/components/upload/upload.js +398 -0
- package/dist/components/upload/upload.js.map +1 -0
- package/dist/components/visually-hidden/index.d.cts +2 -0
- package/dist/components/visually-hidden/index.d.ts +2 -0
- package/dist/components/visually-hidden/visually-hidden.cjs +18 -0
- package/dist/components/visually-hidden/visually-hidden.cjs.map +1 -0
- package/dist/components/visually-hidden/visually-hidden.d.cts +7 -0
- package/dist/components/visually-hidden/visually-hidden.d.ts +7 -0
- package/dist/components/visually-hidden/visually-hidden.js +18 -0
- package/dist/components/visually-hidden/visually-hidden.js.map +1 -0
- package/dist/index.cjs +494 -0
- package/dist/index.d.cts +116 -0
- package/dist/index.d.ts +116 -0
- package/dist/index.js +63 -0
- package/dist/panda-preset.cjs +11 -0
- package/dist/panda-preset.cjs.map +1 -0
- package/dist/panda-preset.d.cts +4 -0
- package/dist/panda-preset.d.ts +5 -0
- package/dist/panda-preset.js +12 -0
- package/dist/panda-preset.js.map +1 -0
- package/dist/styled-system/css/conditions.cjs +31 -0
- package/dist/styled-system/css/conditions.cjs.map +1 -0
- package/dist/styled-system/css/conditions.js +29 -0
- package/dist/styled-system/css/conditions.js.map +1 -0
- package/dist/styled-system/css/css.cjs +48 -0
- package/dist/styled-system/css/css.cjs.map +1 -0
- package/dist/styled-system/css/css.js +47 -0
- package/dist/styled-system/css/css.js.map +1 -0
- package/dist/styled-system/css/cva.cjs +20 -0
- package/dist/styled-system/css/cva.cjs.map +1 -0
- package/dist/styled-system/css/cva.js +19 -0
- package/dist/styled-system/css/cva.js.map +1 -0
- package/dist/styled-system/css/cx.cjs +13 -0
- package/dist/styled-system/css/cx.cjs.map +1 -0
- package/dist/styled-system/css/cx.js +13 -0
- package/dist/styled-system/css/cx.js.map +1 -0
- package/dist/styled-system/helpers.cjs +231 -0
- package/dist/styled-system/helpers.cjs.map +1 -0
- package/dist/styled-system/helpers.js +216 -0
- package/dist/styled-system/helpers.js.map +1 -0
- package/dist/styled-system/recipes/accordion.cjs +37 -0
- package/dist/styled-system/recipes/accordion.cjs.map +1 -0
- package/dist/styled-system/recipes/accordion.js +37 -0
- package/dist/styled-system/recipes/accordion.js.map +1 -0
- package/dist/styled-system/recipes/alert.cjs +40 -0
- package/dist/styled-system/recipes/alert.cjs.map +1 -0
- package/dist/styled-system/recipes/alert.js +40 -0
- package/dist/styled-system/recipes/alert.js.map +1 -0
- package/dist/styled-system/recipes/avatar.cjs +46 -0
- package/dist/styled-system/recipes/avatar.cjs.map +1 -0
- package/dist/styled-system/recipes/avatar.js +46 -0
- package/dist/styled-system/recipes/avatar.js.map +1 -0
- package/dist/styled-system/recipes/badge.cjs +31 -0
- package/dist/styled-system/recipes/badge.cjs.map +1 -0
- package/dist/styled-system/recipes/badge.js +31 -0
- package/dist/styled-system/recipes/badge.js.map +1 -0
- package/dist/styled-system/recipes/bottom-navigation.cjs +30 -0
- package/dist/styled-system/recipes/bottom-navigation.cjs.map +1 -0
- package/dist/styled-system/recipes/bottom-navigation.js +30 -0
- package/dist/styled-system/recipes/bottom-navigation.js.map +1 -0
- package/dist/styled-system/recipes/breadcrumbs.cjs +37 -0
- package/dist/styled-system/recipes/breadcrumbs.cjs.map +1 -0
- package/dist/styled-system/recipes/breadcrumbs.js +37 -0
- package/dist/styled-system/recipes/breadcrumbs.js.map +1 -0
- package/dist/styled-system/recipes/button.cjs +42 -0
- package/dist/styled-system/recipes/button.cjs.map +1 -0
- package/dist/styled-system/recipes/button.js +42 -0
- package/dist/styled-system/recipes/button.js.map +1 -0
- package/dist/styled-system/recipes/card.cjs +40 -0
- package/dist/styled-system/recipes/card.cjs.map +1 -0
- package/dist/styled-system/recipes/card.js +40 -0
- package/dist/styled-system/recipes/card.js.map +1 -0
- package/dist/styled-system/recipes/checkbox-group.cjs +37 -0
- package/dist/styled-system/recipes/checkbox-group.cjs.map +1 -0
- package/dist/styled-system/recipes/checkbox-group.js +37 -0
- package/dist/styled-system/recipes/checkbox-group.js.map +1 -0
- package/dist/styled-system/recipes/checkbox.cjs +30 -0
- package/dist/styled-system/recipes/checkbox.cjs.map +1 -0
- package/dist/styled-system/recipes/checkbox.js +30 -0
- package/dist/styled-system/recipes/checkbox.js.map +1 -0
- package/dist/styled-system/recipes/collapsible.cjs +35 -0
- package/dist/styled-system/recipes/collapsible.cjs.map +1 -0
- package/dist/styled-system/recipes/collapsible.js +35 -0
- package/dist/styled-system/recipes/collapsible.js.map +1 -0
- package/dist/styled-system/recipes/color-picker.cjs +46 -0
- package/dist/styled-system/recipes/color-picker.cjs.map +1 -0
- package/dist/styled-system/recipes/color-picker.js +46 -0
- package/dist/styled-system/recipes/color-picker.js.map +1 -0
- package/dist/styled-system/recipes/combobox.cjs +53 -0
- package/dist/styled-system/recipes/combobox.cjs.map +1 -0
- package/dist/styled-system/recipes/combobox.js +53 -0
- package/dist/styled-system/recipes/combobox.js.map +1 -0
- package/dist/styled-system/recipes/command.cjs +41 -0
- package/dist/styled-system/recipes/command.cjs.map +1 -0
- package/dist/styled-system/recipes/command.js +41 -0
- package/dist/styled-system/recipes/command.js.map +1 -0
- package/dist/styled-system/recipes/copyable.cjs +35 -0
- package/dist/styled-system/recipes/copyable.cjs.map +1 -0
- package/dist/styled-system/recipes/copyable.js +35 -0
- package/dist/styled-system/recipes/copyable.js.map +1 -0
- package/dist/styled-system/recipes/create-recipe.cjs +80 -0
- package/dist/styled-system/recipes/create-recipe.cjs.map +1 -0
- package/dist/styled-system/recipes/create-recipe.js +79 -0
- package/dist/styled-system/recipes/create-recipe.js.map +1 -0
- package/dist/styled-system/recipes/data-view.cjs +52 -0
- package/dist/styled-system/recipes/data-view.cjs.map +1 -0
- package/dist/styled-system/recipes/data-view.js +52 -0
- package/dist/styled-system/recipes/data-view.js.map +1 -0
- package/dist/styled-system/recipes/date-picker.cjs +51 -0
- package/dist/styled-system/recipes/date-picker.cjs.map +1 -0
- package/dist/styled-system/recipes/date-picker.js +51 -0
- package/dist/styled-system/recipes/date-picker.js.map +1 -0
- package/dist/styled-system/recipes/dialog.cjs +46 -0
- package/dist/styled-system/recipes/dialog.cjs.map +1 -0
- package/dist/styled-system/recipes/dialog.js +46 -0
- package/dist/styled-system/recipes/dialog.js.map +1 -0
- package/dist/styled-system/recipes/drawer.cjs +46 -0
- package/dist/styled-system/recipes/drawer.cjs.map +1 -0
- package/dist/styled-system/recipes/drawer.js +46 -0
- package/dist/styled-system/recipes/drawer.js.map +1 -0
- package/dist/styled-system/recipes/field.cjs +36 -0
- package/dist/styled-system/recipes/field.cjs.map +1 -0
- package/dist/styled-system/recipes/field.js +36 -0
- package/dist/styled-system/recipes/field.js.map +1 -0
- package/dist/styled-system/recipes/fieldset.cjs +34 -0
- package/dist/styled-system/recipes/fieldset.cjs.map +1 -0
- package/dist/styled-system/recipes/fieldset.js +34 -0
- package/dist/styled-system/recipes/fieldset.js.map +1 -0
- package/dist/styled-system/recipes/form.cjs +25 -0
- package/dist/styled-system/recipes/form.cjs.map +1 -0
- package/dist/styled-system/recipes/form.js +25 -0
- package/dist/styled-system/recipes/form.js.map +1 -0
- package/dist/styled-system/recipes/heading.cjs +32 -0
- package/dist/styled-system/recipes/heading.cjs.map +1 -0
- package/dist/styled-system/recipes/heading.js +32 -0
- package/dist/styled-system/recipes/heading.js.map +1 -0
- package/dist/styled-system/recipes/input.cjs +29 -0
- package/dist/styled-system/recipes/input.cjs.map +1 -0
- package/dist/styled-system/recipes/input.js +29 -0
- package/dist/styled-system/recipes/input.js.map +1 -0
- package/dist/styled-system/recipes/layout-grid.cjs +42 -0
- package/dist/styled-system/recipes/layout-grid.cjs.map +1 -0
- package/dist/styled-system/recipes/layout-grid.js +42 -0
- package/dist/styled-system/recipes/layout-grid.js.map +1 -0
- package/dist/styled-system/recipes/layout-stack.cjs +53 -0
- package/dist/styled-system/recipes/layout-stack.cjs.map +1 -0
- package/dist/styled-system/recipes/layout-stack.js +53 -0
- package/dist/styled-system/recipes/layout-stack.js.map +1 -0
- package/dist/styled-system/recipes/link.cjs +25 -0
- package/dist/styled-system/recipes/link.cjs.map +1 -0
- package/dist/styled-system/recipes/link.js +25 -0
- package/dist/styled-system/recipes/link.js.map +1 -0
- package/dist/styled-system/recipes/list.cjs +52 -0
- package/dist/styled-system/recipes/list.cjs.map +1 -0
- package/dist/styled-system/recipes/list.js +52 -0
- package/dist/styled-system/recipes/list.js.map +1 -0
- package/dist/styled-system/recipes/menu.cjs +38 -0
- package/dist/styled-system/recipes/menu.cjs.map +1 -0
- package/dist/styled-system/recipes/menu.js +38 -0
- package/dist/styled-system/recipes/menu.js.map +1 -0
- package/dist/styled-system/recipes/menubar.cjs +30 -0
- package/dist/styled-system/recipes/menubar.cjs.map +1 -0
- package/dist/styled-system/recipes/menubar.js +30 -0
- package/dist/styled-system/recipes/menubar.js.map +1 -0
- package/dist/styled-system/recipes/meter.cjs +52 -0
- package/dist/styled-system/recipes/meter.cjs.map +1 -0
- package/dist/styled-system/recipes/meter.js +52 -0
- package/dist/styled-system/recipes/meter.js.map +1 -0
- package/dist/styled-system/recipes/navbar.cjs +41 -0
- package/dist/styled-system/recipes/navbar.cjs.map +1 -0
- package/dist/styled-system/recipes/navbar.js +41 -0
- package/dist/styled-system/recipes/navbar.js.map +1 -0
- package/dist/styled-system/recipes/navigation-menu.cjs +43 -0
- package/dist/styled-system/recipes/navigation-menu.cjs.map +1 -0
- package/dist/styled-system/recipes/navigation-menu.js +43 -0
- package/dist/styled-system/recipes/navigation-menu.js.map +1 -0
- package/dist/styled-system/recipes/number-field.cjs +43 -0
- package/dist/styled-system/recipes/number-field.cjs.map +1 -0
- package/dist/styled-system/recipes/number-field.js +43 -0
- package/dist/styled-system/recipes/number-field.js.map +1 -0
- package/dist/styled-system/recipes/option-selector.cjs +52 -0
- package/dist/styled-system/recipes/option-selector.cjs.map +1 -0
- package/dist/styled-system/recipes/option-selector.js +52 -0
- package/dist/styled-system/recipes/option-selector.js.map +1 -0
- package/dist/styled-system/recipes/pagination.cjs +44 -0
- package/dist/styled-system/recipes/pagination.cjs.map +1 -0
- package/dist/styled-system/recipes/pagination.js +44 -0
- package/dist/styled-system/recipes/pagination.js.map +1 -0
- package/dist/styled-system/recipes/paragraph.cjs +25 -0
- package/dist/styled-system/recipes/paragraph.cjs.map +1 -0
- package/dist/styled-system/recipes/paragraph.js +25 -0
- package/dist/styled-system/recipes/paragraph.js.map +1 -0
- package/dist/styled-system/recipes/popover.cjs +38 -0
- package/dist/styled-system/recipes/popover.cjs.map +1 -0
- package/dist/styled-system/recipes/popover.js +38 -0
- package/dist/styled-system/recipes/popover.js.map +1 -0
- package/dist/styled-system/recipes/progress.cjs +35 -0
- package/dist/styled-system/recipes/progress.cjs.map +1 -0
- package/dist/styled-system/recipes/progress.js +35 -0
- package/dist/styled-system/recipes/progress.js.map +1 -0
- package/dist/styled-system/recipes/radio-group.cjs +37 -0
- package/dist/styled-system/recipes/radio-group.cjs.map +1 -0
- package/dist/styled-system/recipes/radio-group.js +37 -0
- package/dist/styled-system/recipes/radio-group.js.map +1 -0
- package/dist/styled-system/recipes/range-slider.cjs +42 -0
- package/dist/styled-system/recipes/range-slider.cjs.map +1 -0
- package/dist/styled-system/recipes/range-slider.js +42 -0
- package/dist/styled-system/recipes/range-slider.js.map +1 -0
- package/dist/styled-system/recipes/screen-reader-only.cjs +25 -0
- package/dist/styled-system/recipes/screen-reader-only.cjs.map +1 -0
- package/dist/styled-system/recipes/screen-reader-only.js +25 -0
- package/dist/styled-system/recipes/screen-reader-only.js.map +1 -0
- package/dist/styled-system/recipes/scroll-area.cjs +37 -0
- package/dist/styled-system/recipes/scroll-area.cjs.map +1 -0
- package/dist/styled-system/recipes/scroll-area.js +37 -0
- package/dist/styled-system/recipes/scroll-area.js.map +1 -0
- package/dist/styled-system/recipes/select.cjs +48 -0
- package/dist/styled-system/recipes/select.cjs.map +1 -0
- package/dist/styled-system/recipes/select.js +48 -0
- package/dist/styled-system/recipes/select.js.map +1 -0
- package/dist/styled-system/recipes/separator.cjs +25 -0
- package/dist/styled-system/recipes/separator.cjs.map +1 -0
- package/dist/styled-system/recipes/separator.js +25 -0
- package/dist/styled-system/recipes/separator.js.map +1 -0
- package/dist/styled-system/recipes/sidebar.cjs +44 -0
- package/dist/styled-system/recipes/sidebar.cjs.map +1 -0
- package/dist/styled-system/recipes/sidebar.js +44 -0
- package/dist/styled-system/recipes/sidebar.js.map +1 -0
- package/dist/styled-system/recipes/skeleton.cjs +35 -0
- package/dist/styled-system/recipes/skeleton.cjs.map +1 -0
- package/dist/styled-system/recipes/skeleton.js +35 -0
- package/dist/styled-system/recipes/skeleton.js.map +1 -0
- package/dist/styled-system/recipes/slider.cjs +42 -0
- package/dist/styled-system/recipes/slider.cjs.map +1 -0
- package/dist/styled-system/recipes/slider.js +42 -0
- package/dist/styled-system/recipes/slider.js.map +1 -0
- package/dist/styled-system/recipes/spinner.cjs +29 -0
- package/dist/styled-system/recipes/spinner.cjs.map +1 -0
- package/dist/styled-system/recipes/spinner.js +29 -0
- package/dist/styled-system/recipes/spinner.js.map +1 -0
- package/dist/styled-system/recipes/table.cjs +58 -0
- package/dist/styled-system/recipes/table.cjs.map +1 -0
- package/dist/styled-system/recipes/table.js +58 -0
- package/dist/styled-system/recipes/table.js.map +1 -0
- package/dist/styled-system/recipes/tabs.cjs +35 -0
- package/dist/styled-system/recipes/tabs.cjs.map +1 -0
- package/dist/styled-system/recipes/tabs.js +35 -0
- package/dist/styled-system/recipes/tabs.js.map +1 -0
- package/dist/styled-system/recipes/tags-input.cjs +43 -0
- package/dist/styled-system/recipes/tags-input.cjs.map +1 -0
- package/dist/styled-system/recipes/tags-input.js +43 -0
- package/dist/styled-system/recipes/tags-input.js.map +1 -0
- package/dist/styled-system/recipes/text.cjs +35 -0
- package/dist/styled-system/recipes/text.cjs.map +1 -0
- package/dist/styled-system/recipes/text.js +35 -0
- package/dist/styled-system/recipes/text.js.map +1 -0
- package/dist/styled-system/recipes/textarea.cjs +29 -0
- package/dist/styled-system/recipes/textarea.cjs.map +1 -0
- package/dist/styled-system/recipes/textarea.js +29 -0
- package/dist/styled-system/recipes/textarea.js.map +1 -0
- package/dist/styled-system/recipes/toast.cjs +45 -0
- package/dist/styled-system/recipes/toast.cjs.map +1 -0
- package/dist/styled-system/recipes/toast.js +45 -0
- package/dist/styled-system/recipes/toast.js.map +1 -0
- package/dist/styled-system/recipes/toggle-group.cjs +44 -0
- package/dist/styled-system/recipes/toggle-group.cjs.map +1 -0
- package/dist/styled-system/recipes/toggle-group.js +44 -0
- package/dist/styled-system/recipes/toggle-group.js.map +1 -0
- package/dist/styled-system/recipes/toggle-switch.cjs +30 -0
- package/dist/styled-system/recipes/toggle-switch.cjs.map +1 -0
- package/dist/styled-system/recipes/toggle-switch.js +30 -0
- package/dist/styled-system/recipes/toggle-switch.js.map +1 -0
- package/dist/styled-system/recipes/toggle.cjs +39 -0
- package/dist/styled-system/recipes/toggle.cjs.map +1 -0
- package/dist/styled-system/recipes/toggle.js +39 -0
- package/dist/styled-system/recipes/toggle.js.map +1 -0
- package/dist/styled-system/recipes/toolbar.cjs +51 -0
- package/dist/styled-system/recipes/toolbar.cjs.map +1 -0
- package/dist/styled-system/recipes/toolbar.js +51 -0
- package/dist/styled-system/recipes/toolbar.js.map +1 -0
- package/dist/styled-system/recipes/tooltip.cjs +35 -0
- package/dist/styled-system/recipes/tooltip.cjs.map +1 -0
- package/dist/styled-system/recipes/tooltip.js +35 -0
- package/dist/styled-system/recipes/tooltip.js.map +1 -0
- package/dist/styled-system/recipes/tree-view.cjs +37 -0
- package/dist/styled-system/recipes/tree-view.cjs.map +1 -0
- package/dist/styled-system/recipes/tree-view.js +37 -0
- package/dist/styled-system/recipes/tree-view.js.map +1 -0
- package/dist/styled-system/recipes/upload.cjs +55 -0
- package/dist/styled-system/recipes/upload.cjs.map +1 -0
- package/dist/styled-system/recipes/upload.js +55 -0
- package/dist/styled-system/recipes/upload.js.map +1 -0
- package/dist/styles/theme.cjs +137 -0
- package/dist/styles/theme.cjs.map +1 -0
- package/dist/styles/theme.js +136 -0
- package/dist/styles/theme.js.map +1 -0
- package/dist/styles.css +7706 -0
- package/package.json +107 -0
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { withRecipeClassName } from "../base-ui.js";
|
|
2
|
+
import { meter } from "../../styled-system/recipes/meter.js";
|
|
3
|
+
import { createContext, forwardRef, useContext } from "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Meter } from "@base-ui/react/meter";
|
|
6
|
+
//#region src/components/meter/meter.tsx
|
|
7
|
+
const MeterContext = createContext(null);
|
|
8
|
+
function useMeterContext() {
|
|
9
|
+
const context = useContext(MeterContext);
|
|
10
|
+
if (!context) throw new Error("Meter parts must be rendered inside Meter.Root.");
|
|
11
|
+
return context;
|
|
12
|
+
}
|
|
13
|
+
const MeterRoot = forwardRef(function MeterRoot({ children, className, size = "md", tone = "accent", value, min = 0, max = 100, ...props }, ref) {
|
|
14
|
+
const styles = meter({
|
|
15
|
+
size,
|
|
16
|
+
tone
|
|
17
|
+
});
|
|
18
|
+
const safeMax = Number.isFinite(max) && max > min ? max : min + 1;
|
|
19
|
+
const safeValue = Number.isFinite(value) ? Math.min(Math.max(value, min), safeMax) : min;
|
|
20
|
+
const percentage = (safeValue - min) / (safeMax - min) * 100;
|
|
21
|
+
return /* @__PURE__ */ jsx(MeterContext.Provider, {
|
|
22
|
+
value: { styles },
|
|
23
|
+
children: /* @__PURE__ */ jsx(Meter.Root, {
|
|
24
|
+
...props,
|
|
25
|
+
ref,
|
|
26
|
+
max: safeMax,
|
|
27
|
+
min,
|
|
28
|
+
value: safeValue,
|
|
29
|
+
className: withRecipeClassName(styles.root, className),
|
|
30
|
+
"data-jaci-component": "meter",
|
|
31
|
+
"data-slot": "meter",
|
|
32
|
+
style: {
|
|
33
|
+
"--meter-value": `${percentage}%`,
|
|
34
|
+
...props.style
|
|
35
|
+
},
|
|
36
|
+
children
|
|
37
|
+
})
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
const MeterLabel = forwardRef(function MeterLabel({ className, ...props }, ref) {
|
|
41
|
+
const { styles } = useMeterContext();
|
|
42
|
+
return /* @__PURE__ */ jsx(Meter.Label, {
|
|
43
|
+
...props,
|
|
44
|
+
ref,
|
|
45
|
+
className: withRecipeClassName(styles.label, className),
|
|
46
|
+
"data-slot": "meter-label"
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
const MeterTrack = forwardRef(function MeterTrack({ className, ...props }, ref) {
|
|
50
|
+
const { styles } = useMeterContext();
|
|
51
|
+
return /* @__PURE__ */ jsx(Meter.Track, {
|
|
52
|
+
...props,
|
|
53
|
+
ref,
|
|
54
|
+
className: withRecipeClassName(styles.track, className),
|
|
55
|
+
"data-slot": "meter-track"
|
|
56
|
+
});
|
|
57
|
+
});
|
|
58
|
+
const MeterIndicator = forwardRef(function MeterIndicator({ className, ...props }, ref) {
|
|
59
|
+
const { styles } = useMeterContext();
|
|
60
|
+
return /* @__PURE__ */ jsx(Meter.Indicator, {
|
|
61
|
+
...props,
|
|
62
|
+
ref,
|
|
63
|
+
className: withRecipeClassName(styles.indicator, className),
|
|
64
|
+
"data-slot": "meter-indicator"
|
|
65
|
+
});
|
|
66
|
+
});
|
|
67
|
+
const MeterValue = forwardRef(function MeterValue({ className, ...props }, ref) {
|
|
68
|
+
const { styles } = useMeterContext();
|
|
69
|
+
return /* @__PURE__ */ jsx(Meter.Value, {
|
|
70
|
+
...props,
|
|
71
|
+
ref,
|
|
72
|
+
className: withRecipeClassName(styles.value, className),
|
|
73
|
+
"data-slot": "meter-value"
|
|
74
|
+
});
|
|
75
|
+
});
|
|
76
|
+
const Meter$1 = {
|
|
77
|
+
Root: MeterRoot,
|
|
78
|
+
Label: MeterLabel,
|
|
79
|
+
Track: MeterTrack,
|
|
80
|
+
Indicator: MeterIndicator,
|
|
81
|
+
Value: MeterValue
|
|
82
|
+
};
|
|
83
|
+
//#endregion
|
|
84
|
+
export { Meter$1 as Meter, MeterIndicator, MeterLabel, MeterRoot, MeterTrack, MeterValue };
|
|
85
|
+
|
|
86
|
+
//# sourceMappingURL=meter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"meter.js","names":["BaseMeter","Meter"],"sources":["../../../src/components/meter/meter.tsx"],"sourcesContent":["import { Meter as BaseMeter } from \"@base-ui/react/meter\";\nimport { createContext, forwardRef, useContext } from \"react\";\nimport type { CSSProperties, ComponentPropsWithoutRef, ReactNode } from \"react\";\n\nimport { meter } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\n\nexport type MeterSize = \"sm\" | \"md\" | \"lg\";\nexport type MeterTone = \"neutral\" | \"accent\" | \"success\" | \"warning\" | \"danger\";\n\ninterface MeterContextValue {\n styles: ReturnType<typeof meter>;\n}\n\nconst MeterContext = createContext<MeterContextValue | null>(null);\n\nfunction useMeterContext() {\n const context = useContext(MeterContext);\n if (!context) {\n throw new Error(\"Meter parts must be rendered inside Meter.Root.\");\n }\n\n return context;\n}\n\nexport interface MeterRootProps extends Omit<BaseMeter.Root.Props, \"children\" | \"className\"> {\n size?: MeterSize;\n tone?: MeterTone;\n children?: ReactNode;\n className?: string;\n}\n\nexport const MeterRoot = forwardRef<HTMLDivElement, MeterRootProps>(function MeterRoot(\n { children, className, size = \"md\", tone = \"accent\", value, min = 0, max = 100, ...props },\n ref,\n) {\n const styles = meter({ size, tone });\n const safeMax = Number.isFinite(max) && max > min ? max : min + 1;\n const safeValue = Number.isFinite(value) ? Math.min(Math.max(value, min), safeMax) : min;\n const percentage = ((safeValue - min) / (safeMax - min)) * 100;\n\n return (\n <MeterContext.Provider value={{ styles }}>\n <BaseMeter.Root\n {...props}\n ref={ref}\n max={safeMax}\n min={min}\n value={safeValue}\n className={withRecipeClassName(styles.root, className)}\n data-jaci-component=\"meter\"\n data-slot=\"meter\"\n style={{ \"--meter-value\": `${percentage}%`, ...props.style } as unknown as CSSProperties}\n >\n {children}\n </BaseMeter.Root>\n </MeterContext.Provider>\n );\n});\n\nexport type MeterLabelProps = ComponentPropsWithoutRef<typeof BaseMeter.Label>;\nexport const MeterLabel = forwardRef<HTMLSpanElement, MeterLabelProps>(function MeterLabel(\n { className, ...props },\n ref,\n) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Label\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.label, className)}\n data-slot=\"meter-label\"\n />\n );\n});\n\nexport type MeterTrackProps = ComponentPropsWithoutRef<typeof BaseMeter.Track>;\nexport const MeterTrack = forwardRef<HTMLDivElement, MeterTrackProps>(function MeterTrack(\n { className, ...props },\n ref,\n) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Track\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.track, className)}\n data-slot=\"meter-track\"\n />\n );\n});\n\nexport type MeterIndicatorProps = ComponentPropsWithoutRef<typeof BaseMeter.Indicator>;\nexport const MeterIndicator = forwardRef<HTMLDivElement, MeterIndicatorProps>(\n function MeterIndicator({ className, ...props }, ref) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Indicator\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.indicator, className)}\n data-slot=\"meter-indicator\"\n />\n );\n },\n);\n\nexport type MeterValueProps = ComponentPropsWithoutRef<typeof BaseMeter.Value>;\nexport const MeterValue = forwardRef<HTMLSpanElement, MeterValueProps>(function MeterValue(\n { className, ...props },\n ref,\n) {\n const { styles } = useMeterContext();\n return (\n <BaseMeter.Value\n {...props}\n ref={ref}\n className={withRecipeClassName(styles.value, className)}\n data-slot=\"meter-value\"\n />\n );\n});\n\nexport const Meter = {\n Root: MeterRoot,\n Label: MeterLabel,\n Track: MeterTrack,\n Indicator: MeterIndicator,\n Value: MeterValue,\n};\n"],"mappings":";;;;;;AAcA,MAAM,eAAe,cAAwC,IAAI;AAEjE,SAAS,kBAAkB;CACzB,MAAM,UAAU,WAAW,YAAY;CACvC,IAAI,CAAC,SACH,MAAM,IAAI,MAAM,iDAAiD;CAGnE,OAAO;AACT;AASA,MAAa,YAAY,WAA2C,SAAS,UAC3E,EAAE,UAAU,WAAW,OAAO,MAAM,OAAO,UAAU,OAAO,MAAM,GAAG,MAAM,KAAK,GAAG,SACnF,KACA;CACA,MAAM,SAAS,MAAM;EAAE;EAAM;CAAK,CAAC;CACnC,MAAM,UAAU,OAAO,SAAS,GAAG,KAAK,MAAM,MAAM,MAAM,MAAM;CAChE,MAAM,YAAY,OAAO,SAAS,KAAK,IAAI,KAAK,IAAI,KAAK,IAAI,OAAO,GAAG,GAAG,OAAO,IAAI;CACrF,MAAM,cAAe,YAAY,QAAQ,UAAU,OAAQ;CAE3D,OACE,oBAAC,aAAa,UAAd;EAAuB,OAAO,EAAE,OAAO;YACrC,oBAACA,MAAU,MAAX;GACE,GAAI;GACC;GACL,KAAK;GACA;GACL,OAAO;GACP,WAAW,oBAAoB,OAAO,MAAM,SAAS;GACrD,uBAAoB;GACpB,aAAU;GACV,OAAO;IAAE,iBAAiB,GAAG,WAAW;IAAI,GAAG,MAAM;GAAM;GAE1D;EACa,CAAA;CACK,CAAA;AAE3B,CAAC;AAGD,MAAa,aAAa,WAA6C,SAAS,WAC9E,EAAE,WAAW,GAAG,SAChB,KACA;CACA,MAAM,EAAE,WAAW,gBAAgB;CACnC,OACE,oBAACA,MAAU,OAAX;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,OAAO,OAAO,SAAS;EACtD,aAAU;CACX,CAAA;AAEL,CAAC;AAGD,MAAa,aAAa,WAA4C,SAAS,WAC7E,EAAE,WAAW,GAAG,SAChB,KACA;CACA,MAAM,EAAE,WAAW,gBAAgB;CACnC,OACE,oBAACA,MAAU,OAAX;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,OAAO,OAAO,SAAS;EACtD,aAAU;CACX,CAAA;AAEL,CAAC;AAGD,MAAa,iBAAiB,WAC5B,SAAS,eAAe,EAAE,WAAW,GAAG,SAAS,KAAK;CACpD,MAAM,EAAE,WAAW,gBAAgB;CACnC,OACE,oBAACA,MAAU,WAAX;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,OAAO,WAAW,SAAS;EAC1D,aAAU;CACX,CAAA;AAEL,CACF;AAGA,MAAa,aAAa,WAA6C,SAAS,WAC9E,EAAE,WAAW,GAAG,SAChB,KACA;CACA,MAAM,EAAE,WAAW,gBAAgB;CACnC,OACE,oBAACA,MAAU,OAAX;EACE,GAAI;EACC;EACL,WAAW,oBAAoB,OAAO,OAAO,SAAS;EACtD,aAAU;CACX,CAAA;AAEL,CAAC;AAED,MAAaC,UAAQ;CACnB,MAAM;CACN,OAAO;CACP,OAAO;CACP,WAAW;CACX,OAAO;AACT"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { BottomNavigation, BottomNavigationItem, BottomNavigationItemProps, BottomNavigationProps, BottomNavigationRoot, Navbar, NavbarBar, NavbarBarProps, NavbarCenter, NavbarCenterProps, NavbarClose, NavbarCloseProps, NavbarDrawer, NavbarDrawerPortalProps, NavbarDrawerProps, NavbarEnd, NavbarEndProps, NavbarItem, NavbarItemProps, NavbarRoot, NavbarRootProps, NavbarStart, NavbarStartProps, NavbarToggle, NavbarToggleProps } from "./navigation.cjs";
|
|
2
|
+
export { BottomNavigation, BottomNavigationItem, type BottomNavigationItemProps, type BottomNavigationProps, BottomNavigationRoot, Navbar, NavbarBar, type NavbarBarProps, NavbarCenter, type NavbarCenterProps, NavbarClose, type NavbarCloseProps, NavbarDrawer, type NavbarDrawerPortalProps, type NavbarDrawerProps, NavbarEnd, type NavbarEndProps, NavbarItem, type NavbarItemProps, NavbarRoot, type NavbarRootProps, NavbarStart, type NavbarStartProps, NavbarToggle, type NavbarToggleProps };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { BottomNavigation, BottomNavigationItem, BottomNavigationItemProps, BottomNavigationProps, BottomNavigationRoot, Navbar, NavbarBar, NavbarBarProps, NavbarCenter, NavbarCenterProps, NavbarClose, NavbarCloseProps, NavbarDrawer, NavbarDrawerPortalProps, NavbarDrawerProps, NavbarEnd, NavbarEndProps, NavbarItem, NavbarItemProps, NavbarRoot, NavbarRootProps, NavbarStart, NavbarStartProps, NavbarToggle, NavbarToggleProps } from "./navigation.js";
|
|
2
|
+
export { BottomNavigation, BottomNavigationItem, type BottomNavigationItemProps, type BottomNavigationProps, BottomNavigationRoot, Navbar, NavbarBar, type NavbarBarProps, NavbarCenter, type NavbarCenterProps, NavbarClose, type NavbarCloseProps, NavbarDrawer, type NavbarDrawerPortalProps, type NavbarDrawerProps, NavbarEnd, type NavbarEndProps, NavbarItem, type NavbarItemProps, NavbarRoot, type NavbarRootProps, NavbarStart, type NavbarStartProps, NavbarToggle, type NavbarToggleProps };
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
const require_cx = require("../../styled-system/css/cx.cjs");
|
|
3
|
+
const require_base_ui = require("../base-ui.cjs");
|
|
4
|
+
const require_navbar = require("../../styled-system/recipes/navbar.cjs");
|
|
5
|
+
const require_bottom_navigation = require("../../styled-system/recipes/bottom-navigation.cjs");
|
|
6
|
+
let react = require("react");
|
|
7
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
|
+
let _base_ui_react_dialog = require("@base-ui/react/dialog");
|
|
9
|
+
//#region src/components/navigation/navigation.tsx
|
|
10
|
+
function NavbarRoot(props) {
|
|
11
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Root, { ...props });
|
|
12
|
+
}
|
|
13
|
+
/** A fixed, translucent zinc navigation surface. */
|
|
14
|
+
const NavbarBar = (0, react.forwardRef)(function NavbarBar({ className, ...props }, ref) {
|
|
15
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
16
|
+
...props,
|
|
17
|
+
ref,
|
|
18
|
+
className: require_cx.cx(require_navbar.navbar().bar, className),
|
|
19
|
+
"data-jaci-component": "navbar",
|
|
20
|
+
"data-slot": "navbar-bar"
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
const NavbarStart = (0, react.forwardRef)(function NavbarStart({ className, ...props }, ref) {
|
|
24
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
25
|
+
...props,
|
|
26
|
+
ref,
|
|
27
|
+
className: require_cx.cx(require_navbar.navbar().start, className),
|
|
28
|
+
"data-slot": "navbar-start"
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
const NavbarCenter = (0, react.forwardRef)(function NavbarCenter({ className, ...props }, ref) {
|
|
32
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
33
|
+
...props,
|
|
34
|
+
ref,
|
|
35
|
+
className: require_cx.cx(require_navbar.navbar().center, className),
|
|
36
|
+
"data-slot": "navbar-center"
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
const NavbarEnd = (0, react.forwardRef)(function NavbarEnd({ className, ...props }, ref) {
|
|
40
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
41
|
+
...props,
|
|
42
|
+
ref,
|
|
43
|
+
className: require_cx.cx(require_navbar.navbar().end, className),
|
|
44
|
+
"data-slot": "navbar-end"
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
/**
|
|
48
|
+
* Opens the responsive drawer. It is hidden at the large breakpoint by
|
|
49
|
+
* default, while still allowing a controlled host to render a drawer anywhere.
|
|
50
|
+
*/
|
|
51
|
+
const NavbarToggle = (0, react.forwardRef)(function NavbarToggle({ "aria-label": ariaLabel, children, className, ...props }, ref) {
|
|
52
|
+
const hasVisibleLabel = children != null;
|
|
53
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Trigger, {
|
|
54
|
+
...props,
|
|
55
|
+
"aria-label": ariaLabel ?? (hasVisibleLabel ? void 0 : "Open navigation menu"),
|
|
56
|
+
ref,
|
|
57
|
+
className: require_base_ui.withRecipeClassName(require_navbar.navbar().toggle, className),
|
|
58
|
+
"data-slot": "navbar-toggle",
|
|
59
|
+
children: children ?? "☰"
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
/**
|
|
63
|
+
* A left-aligned mobile drawer. It intentionally owns the Dialog portal,
|
|
64
|
+
* backdrop, viewport, and popup so consumers cannot accidentally omit the
|
|
65
|
+
* pieces required for focus trapping and Escape/backdrop dismissal.
|
|
66
|
+
*/
|
|
67
|
+
const NavbarDrawer = (0, react.forwardRef)(function NavbarDrawer({ "aria-label": ariaLabel, children, className, portalProps, ...props }, ref) {
|
|
68
|
+
const styles = require_navbar.navbar();
|
|
69
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(_base_ui_react_dialog.Dialog.Portal, {
|
|
70
|
+
...portalProps,
|
|
71
|
+
children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Backdrop, {
|
|
72
|
+
className: require_base_ui.withRecipeClassName(styles.drawerBackdrop, void 0),
|
|
73
|
+
"data-slot": "navbar-drawer-backdrop"
|
|
74
|
+
}), /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Viewport, {
|
|
75
|
+
className: require_base_ui.withRecipeClassName(styles.drawerViewport, void 0),
|
|
76
|
+
"data-slot": "navbar-drawer-viewport",
|
|
77
|
+
children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Popup, {
|
|
78
|
+
...props,
|
|
79
|
+
"aria-label": ariaLabel ?? "Navigation menu",
|
|
80
|
+
ref,
|
|
81
|
+
className: require_base_ui.withRecipeClassName(styles.drawer, className),
|
|
82
|
+
"data-jaci-component": "navbar",
|
|
83
|
+
"data-slot": "navbar-drawer",
|
|
84
|
+
children
|
|
85
|
+
})
|
|
86
|
+
})]
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
/** A close affordance for use inside `Navbar.Drawer`. */
|
|
90
|
+
const NavbarClose = (0, react.forwardRef)(function NavbarClose({ "aria-label": ariaLabel, children, className, ...props }, ref) {
|
|
91
|
+
const hasVisibleLabel = children != null;
|
|
92
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Close, {
|
|
93
|
+
...props,
|
|
94
|
+
"aria-label": ariaLabel ?? (hasVisibleLabel ? void 0 : "Close navigation menu"),
|
|
95
|
+
ref,
|
|
96
|
+
className: require_base_ui.withRecipeClassName(require_navbar.navbar().close, className),
|
|
97
|
+
"data-slot": "navbar-close",
|
|
98
|
+
children: children ?? "×"
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
/** A semantic navigation link for either the fixed bar or mobile drawer. */
|
|
102
|
+
const NavbarItem = (0, react.forwardRef)(function NavbarItem({ "aria-current": ariaCurrent, active = false, className, ...props }, ref) {
|
|
103
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
104
|
+
...props,
|
|
105
|
+
"aria-current": ariaCurrent ?? (active ? "page" : void 0),
|
|
106
|
+
ref,
|
|
107
|
+
className: require_cx.cx(require_navbar.navbar({ active }).item, className),
|
|
108
|
+
"data-active": active || void 0,
|
|
109
|
+
"data-slot": "navbar-item"
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
const Navbar = {
|
|
113
|
+
Root: NavbarRoot,
|
|
114
|
+
Bar: NavbarBar,
|
|
115
|
+
Start: NavbarStart,
|
|
116
|
+
Center: NavbarCenter,
|
|
117
|
+
End: NavbarEnd,
|
|
118
|
+
Toggle: NavbarToggle,
|
|
119
|
+
Drawer: NavbarDrawer,
|
|
120
|
+
Close: NavbarClose,
|
|
121
|
+
Item: NavbarItem,
|
|
122
|
+
createHandle: _base_ui_react_dialog.Dialog.createHandle
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* A compact floating navigation bar for small-screen destinations. It is
|
|
126
|
+
* independent from `Navbar` so it can be used in layouts without a drawer.
|
|
127
|
+
*/
|
|
128
|
+
const BottomNavigationRoot = (0, react.forwardRef)(function BottomNavigationRoot({ className, ...props }, ref) {
|
|
129
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("nav", {
|
|
130
|
+
...props,
|
|
131
|
+
ref,
|
|
132
|
+
className: require_cx.cx(require_bottom_navigation.bottomNavigation().root, className),
|
|
133
|
+
"data-jaci-component": "bottom-navigation",
|
|
134
|
+
"data-slot": "bottom-navigation"
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
const BottomNavigationItem = (0, react.forwardRef)(function BottomNavigationItem({ "aria-current": ariaCurrent, active = false, className, ...props }, ref) {
|
|
138
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("a", {
|
|
139
|
+
...props,
|
|
140
|
+
"aria-current": ariaCurrent ?? (active ? "page" : void 0),
|
|
141
|
+
ref,
|
|
142
|
+
className: require_cx.cx(require_bottom_navigation.bottomNavigation({ active }).item, className),
|
|
143
|
+
"data-active": active || void 0,
|
|
144
|
+
"data-slot": "bottom-navigation-item"
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
const BottomNavigation = Object.assign(BottomNavigationRoot, { Item: BottomNavigationItem });
|
|
148
|
+
//#endregion
|
|
149
|
+
exports.BottomNavigation = BottomNavigation;
|
|
150
|
+
exports.BottomNavigationItem = BottomNavigationItem;
|
|
151
|
+
exports.BottomNavigationRoot = BottomNavigationRoot;
|
|
152
|
+
exports.Navbar = Navbar;
|
|
153
|
+
exports.NavbarBar = NavbarBar;
|
|
154
|
+
exports.NavbarCenter = NavbarCenter;
|
|
155
|
+
exports.NavbarClose = NavbarClose;
|
|
156
|
+
exports.NavbarDrawer = NavbarDrawer;
|
|
157
|
+
exports.NavbarEnd = NavbarEnd;
|
|
158
|
+
exports.NavbarItem = NavbarItem;
|
|
159
|
+
exports.NavbarRoot = NavbarRoot;
|
|
160
|
+
exports.NavbarStart = NavbarStart;
|
|
161
|
+
exports.NavbarToggle = NavbarToggle;
|
|
162
|
+
|
|
163
|
+
//# sourceMappingURL=navigation.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.cjs","names":["BaseDialog","cx","navbar","withRecipeClassName","bottomNavigation"],"sources":["../../../src/components/navigation/navigation.tsx"],"sourcesContent":["\"use client\";\n\nimport { Dialog as BaseDialog } from \"@base-ui/react/dialog\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { DialogRoot as BaseDialogRoot } from \"@base-ui/react/dialog\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { bottomNavigation, navbar } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\n\n/**\n * Groups a responsive navigation bar and its mobile drawer. The `open`,\n * `defaultOpen`, and `onOpenChange` props are forwarded to Base UI's Dialog\n * root, which supplies focus management, Escape handling, and backdrop\n * dismissal for `Navbar.Drawer`.\n */\nexport type NavbarRootProps<Payload = unknown> = BaseDialogRoot.Props<Payload>;\n\nexport function NavbarRoot<Payload = unknown>(props: NavbarRootProps<Payload>) {\n return <BaseDialog.Root {...props} />;\n}\n\nexport type NavbarBarProps = ComponentPropsWithoutRef<\"nav\">;\n\n/** A fixed, translucent zinc navigation surface. */\nexport const NavbarBar = forwardRef<HTMLElement, NavbarBarProps>(function NavbarBar(\n { className, ...props },\n ref,\n) {\n return (\n <nav\n {...props}\n ref={ref}\n className={cx(navbar().bar, className)}\n data-jaci-component=\"navbar\"\n data-slot=\"navbar-bar\"\n />\n );\n});\n\nexport type NavbarStartProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const NavbarStart = forwardRef<HTMLDivElement, NavbarStartProps>(function NavbarStart(\n { className, ...props },\n ref,\n) {\n return (\n <div {...props} ref={ref} className={cx(navbar().start, className)} data-slot=\"navbar-start\" />\n );\n});\n\nexport type NavbarCenterProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const NavbarCenter = forwardRef<HTMLDivElement, NavbarCenterProps>(function NavbarCenter(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(navbar().center, className)}\n data-slot=\"navbar-center\"\n />\n );\n});\n\nexport type NavbarEndProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const NavbarEnd = forwardRef<HTMLDivElement, NavbarEndProps>(function NavbarEnd(\n { className, ...props },\n ref,\n) {\n return (\n <div {...props} ref={ref} className={cx(navbar().end, className)} data-slot=\"navbar-end\" />\n );\n});\n\nexport type NavbarToggleProps = ComponentPropsWithoutRef<typeof BaseDialog.Trigger>;\n\n/**\n * Opens the responsive drawer. It is hidden at the large breakpoint by\n * default, while still allowing a controlled host to render a drawer anywhere.\n */\nexport const NavbarToggle = forwardRef<HTMLButtonElement, NavbarToggleProps>(function NavbarToggle(\n { \"aria-label\": ariaLabel, children, className, ...props },\n ref,\n) {\n const hasVisibleLabel = children != null;\n\n return (\n <BaseDialog.Trigger\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Open navigation menu\")}\n ref={ref}\n className={withRecipeClassName(navbar().toggle, className)}\n data-slot=\"navbar-toggle\"\n >\n {children ?? \"☰\"}\n </BaseDialog.Trigger>\n );\n});\n\nexport type NavbarDrawerPortalProps = Omit<\n ComponentPropsWithoutRef<typeof BaseDialog.Portal>,\n \"children\"\n>;\n\nexport interface NavbarDrawerProps extends ComponentPropsWithoutRef<typeof BaseDialog.Popup> {\n /** Optional controls for the underlying Base UI portal. */\n portalProps?: NavbarDrawerPortalProps;\n}\n\n/**\n * A left-aligned mobile drawer. It intentionally owns the Dialog portal,\n * backdrop, viewport, and popup so consumers cannot accidentally omit the\n * pieces required for focus trapping and Escape/backdrop dismissal.\n */\nexport const NavbarDrawer = forwardRef<HTMLDivElement, NavbarDrawerProps>(function NavbarDrawer(\n { \"aria-label\": ariaLabel, children, className, portalProps, ...props },\n ref,\n) {\n const styles = navbar();\n\n return (\n <BaseDialog.Portal {...portalProps}>\n <BaseDialog.Backdrop\n className={withRecipeClassName(styles.drawerBackdrop, undefined)}\n data-slot=\"navbar-drawer-backdrop\"\n />\n <BaseDialog.Viewport\n className={withRecipeClassName(styles.drawerViewport, undefined)}\n data-slot=\"navbar-drawer-viewport\"\n >\n <BaseDialog.Popup\n {...props}\n aria-label={ariaLabel ?? \"Navigation menu\"}\n ref={ref}\n className={withRecipeClassName(styles.drawer, className)}\n data-jaci-component=\"navbar\"\n data-slot=\"navbar-drawer\"\n >\n {children}\n </BaseDialog.Popup>\n </BaseDialog.Viewport>\n </BaseDialog.Portal>\n );\n});\n\nexport type NavbarCloseProps = ComponentPropsWithoutRef<typeof BaseDialog.Close>;\n\n/** A close affordance for use inside `Navbar.Drawer`. */\nexport const NavbarClose = forwardRef<HTMLButtonElement, NavbarCloseProps>(function NavbarClose(\n { \"aria-label\": ariaLabel, children, className, ...props },\n ref,\n) {\n const hasVisibleLabel = children != null;\n\n return (\n <BaseDialog.Close\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Close navigation menu\")}\n ref={ref}\n className={withRecipeClassName(navbar().close, className)}\n data-slot=\"navbar-close\"\n >\n {children ?? \"×\"}\n </BaseDialog.Close>\n );\n});\n\nexport interface NavbarItemProps extends ComponentPropsWithoutRef<\"a\"> {\n /** Marks the current navigation destination. */\n active?: boolean;\n}\n\n/** A semantic navigation link for either the fixed bar or mobile drawer. */\nexport const NavbarItem = forwardRef<HTMLAnchorElement, NavbarItemProps>(function NavbarItem(\n { \"aria-current\": ariaCurrent, active = false, className, ...props },\n ref,\n) {\n return (\n <a\n {...props}\n aria-current={ariaCurrent ?? (active ? \"page\" : undefined)}\n ref={ref}\n className={cx(navbar({ active }).item, className)}\n data-active={active || undefined}\n data-slot=\"navbar-item\"\n />\n );\n});\n\nexport const Navbar = {\n Root: NavbarRoot,\n Bar: NavbarBar,\n Start: NavbarStart,\n Center: NavbarCenter,\n End: NavbarEnd,\n Toggle: NavbarToggle,\n Drawer: NavbarDrawer,\n Close: NavbarClose,\n Item: NavbarItem,\n createHandle: BaseDialog.createHandle,\n};\n\nexport type BottomNavigationProps = ComponentPropsWithoutRef<\"nav\">;\n\n/**\n * A compact floating navigation bar for small-screen destinations. It is\n * independent from `Navbar` so it can be used in layouts without a drawer.\n */\nexport const BottomNavigationRoot = forwardRef<HTMLElement, BottomNavigationProps>(\n function BottomNavigationRoot({ className, ...props }, ref) {\n return (\n <nav\n {...props}\n ref={ref}\n className={cx(bottomNavigation().root, className)}\n data-jaci-component=\"bottom-navigation\"\n data-slot=\"bottom-navigation\"\n />\n );\n },\n);\n\nexport interface BottomNavigationItemProps extends ComponentPropsWithoutRef<\"a\"> {\n /** Marks the current navigation destination. */\n active?: boolean;\n}\n\nexport const BottomNavigationItem = forwardRef<HTMLAnchorElement, BottomNavigationItemProps>(\n function BottomNavigationItem(\n { \"aria-current\": ariaCurrent, active = false, className, ...props },\n ref,\n ) {\n return (\n <a\n {...props}\n aria-current={ariaCurrent ?? (active ? \"page\" : undefined)}\n ref={ref}\n className={cx(bottomNavigation({ active }).item, className)}\n data-active={active || undefined}\n data-slot=\"bottom-navigation-item\"\n />\n );\n },\n);\n\nexport const BottomNavigation = Object.assign(BottomNavigationRoot, {\n Item: BottomNavigationItem,\n});\n"],"mappings":"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"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import { Dialog, DialogRoot } from "@base-ui/react/dialog";
|
|
3
|
+
//#region src/components/navigation/navigation.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Groups a responsive navigation bar and its mobile drawer. The `open`,
|
|
6
|
+
* `defaultOpen`, and `onOpenChange` props are forwarded to Base UI's Dialog
|
|
7
|
+
* root, which supplies focus management, Escape handling, and backdrop
|
|
8
|
+
* dismissal for `Navbar.Drawer`.
|
|
9
|
+
*/
|
|
10
|
+
type NavbarRootProps<Payload = unknown> = DialogRoot.Props<Payload>;
|
|
11
|
+
declare function NavbarRoot<Payload = unknown>(props: NavbarRootProps<Payload>): import("react").JSX.Element;
|
|
12
|
+
type NavbarBarProps = ComponentPropsWithoutRef<"nav">;
|
|
13
|
+
/** A fixed, translucent zinc navigation surface. */
|
|
14
|
+
declare const NavbarBar: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
15
|
+
type NavbarStartProps = ComponentPropsWithoutRef<"div">;
|
|
16
|
+
declare const NavbarStart: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
|
+
type NavbarCenterProps = ComponentPropsWithoutRef<"div">;
|
|
18
|
+
declare const NavbarCenter: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
19
|
+
type NavbarEndProps = ComponentPropsWithoutRef<"div">;
|
|
20
|
+
declare const NavbarEnd: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
|
+
type NavbarToggleProps = ComponentPropsWithoutRef<typeof Dialog.Trigger>;
|
|
22
|
+
/**
|
|
23
|
+
* Opens the responsive drawer. It is hidden at the large breakpoint by
|
|
24
|
+
* default, while still allowing a controlled host to render a drawer anywhere.
|
|
25
|
+
*/
|
|
26
|
+
declare const NavbarToggle: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogTriggerProps<unknown> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
27
|
+
type NavbarDrawerPortalProps = Omit<ComponentPropsWithoutRef<typeof Dialog.Portal>, "children">;
|
|
28
|
+
interface NavbarDrawerProps extends ComponentPropsWithoutRef<typeof Dialog.Popup> {
|
|
29
|
+
/** Optional controls for the underlying Base UI portal. */
|
|
30
|
+
portalProps?: NavbarDrawerPortalProps;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A left-aligned mobile drawer. It intentionally owns the Dialog portal,
|
|
34
|
+
* backdrop, viewport, and popup so consumers cannot accidentally omit the
|
|
35
|
+
* pieces required for focus trapping and Escape/backdrop dismissal.
|
|
36
|
+
*/
|
|
37
|
+
declare const NavbarDrawer: import("react").ForwardRefExoticComponent<NavbarDrawerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
38
|
+
type NavbarCloseProps = ComponentPropsWithoutRef<typeof Dialog.Close>;
|
|
39
|
+
/** A close affordance for use inside `Navbar.Drawer`. */
|
|
40
|
+
declare const NavbarClose: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
41
|
+
interface NavbarItemProps extends ComponentPropsWithoutRef<"a"> {
|
|
42
|
+
/** Marks the current navigation destination. */
|
|
43
|
+
active?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/** A semantic navigation link for either the fixed bar or mobile drawer. */
|
|
46
|
+
declare const NavbarItem: import("react").ForwardRefExoticComponent<NavbarItemProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
47
|
+
declare const Navbar: {
|
|
48
|
+
Root: typeof NavbarRoot;
|
|
49
|
+
Bar: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
50
|
+
Start: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
51
|
+
Center: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
52
|
+
End: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
53
|
+
Toggle: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogTriggerProps<unknown> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
54
|
+
Drawer: import("react").ForwardRefExoticComponent<NavbarDrawerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
55
|
+
Close: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
56
|
+
Item: import("react").ForwardRefExoticComponent<NavbarItemProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
57
|
+
createHandle: typeof Dialog.createHandle;
|
|
58
|
+
};
|
|
59
|
+
type BottomNavigationProps = ComponentPropsWithoutRef<"nav">;
|
|
60
|
+
/**
|
|
61
|
+
* A compact floating navigation bar for small-screen destinations. It is
|
|
62
|
+
* independent from `Navbar` so it can be used in layouts without a drawer.
|
|
63
|
+
*/
|
|
64
|
+
declare const BottomNavigationRoot: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
65
|
+
interface BottomNavigationItemProps extends ComponentPropsWithoutRef<"a"> {
|
|
66
|
+
/** Marks the current navigation destination. */
|
|
67
|
+
active?: boolean;
|
|
68
|
+
}
|
|
69
|
+
declare const BottomNavigationItem: import("react").ForwardRefExoticComponent<BottomNavigationItemProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
70
|
+
declare const BottomNavigation: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>> & {
|
|
71
|
+
Item: import("react").ForwardRefExoticComponent<BottomNavigationItemProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
72
|
+
};
|
|
73
|
+
//#endregion
|
|
74
|
+
export { BottomNavigation, BottomNavigationItem, BottomNavigationItemProps, BottomNavigationProps, BottomNavigationRoot, Navbar, NavbarBar, NavbarBarProps, NavbarCenter, NavbarCenterProps, NavbarClose, NavbarCloseProps, NavbarDrawer, NavbarDrawerPortalProps, NavbarDrawerProps, NavbarEnd, NavbarEndProps, NavbarItem, NavbarItemProps, NavbarRoot, NavbarRootProps, NavbarStart, NavbarStartProps, NavbarToggle, NavbarToggleProps };
|
|
75
|
+
//# sourceMappingURL=navigation.d.cts.map
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import { Dialog, DialogRoot } from "@base-ui/react/dialog";
|
|
3
|
+
//#region src/components/navigation/navigation.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Groups a responsive navigation bar and its mobile drawer. The `open`,
|
|
6
|
+
* `defaultOpen`, and `onOpenChange` props are forwarded to Base UI's Dialog
|
|
7
|
+
* root, which supplies focus management, Escape handling, and backdrop
|
|
8
|
+
* dismissal for `Navbar.Drawer`.
|
|
9
|
+
*/
|
|
10
|
+
type NavbarRootProps<Payload = unknown> = DialogRoot.Props<Payload>;
|
|
11
|
+
declare function NavbarRoot<Payload = unknown>(props: NavbarRootProps<Payload>): import("react").JSX.Element;
|
|
12
|
+
type NavbarBarProps = ComponentPropsWithoutRef<"nav">;
|
|
13
|
+
/** A fixed, translucent zinc navigation surface. */
|
|
14
|
+
declare const NavbarBar: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
15
|
+
type NavbarStartProps = ComponentPropsWithoutRef<"div">;
|
|
16
|
+
declare const NavbarStart: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
17
|
+
type NavbarCenterProps = ComponentPropsWithoutRef<"div">;
|
|
18
|
+
declare const NavbarCenter: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
19
|
+
type NavbarEndProps = ComponentPropsWithoutRef<"div">;
|
|
20
|
+
declare const NavbarEnd: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
21
|
+
type NavbarToggleProps = ComponentPropsWithoutRef<typeof Dialog.Trigger>;
|
|
22
|
+
/**
|
|
23
|
+
* Opens the responsive drawer. It is hidden at the large breakpoint by
|
|
24
|
+
* default, while still allowing a controlled host to render a drawer anywhere.
|
|
25
|
+
*/
|
|
26
|
+
declare const NavbarToggle: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogTriggerProps<unknown> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
27
|
+
type NavbarDrawerPortalProps = Omit<ComponentPropsWithoutRef<typeof Dialog.Portal>, "children">;
|
|
28
|
+
interface NavbarDrawerProps extends ComponentPropsWithoutRef<typeof Dialog.Popup> {
|
|
29
|
+
/** Optional controls for the underlying Base UI portal. */
|
|
30
|
+
portalProps?: NavbarDrawerPortalProps;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A left-aligned mobile drawer. It intentionally owns the Dialog portal,
|
|
34
|
+
* backdrop, viewport, and popup so consumers cannot accidentally omit the
|
|
35
|
+
* pieces required for focus trapping and Escape/backdrop dismissal.
|
|
36
|
+
*/
|
|
37
|
+
declare const NavbarDrawer: import("react").ForwardRefExoticComponent<NavbarDrawerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
38
|
+
type NavbarCloseProps = ComponentPropsWithoutRef<typeof Dialog.Close>;
|
|
39
|
+
/** A close affordance for use inside `Navbar.Drawer`. */
|
|
40
|
+
declare const NavbarClose: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
41
|
+
interface NavbarItemProps extends ComponentPropsWithoutRef<"a"> {
|
|
42
|
+
/** Marks the current navigation destination. */
|
|
43
|
+
active?: boolean;
|
|
44
|
+
}
|
|
45
|
+
/** A semantic navigation link for either the fixed bar or mobile drawer. */
|
|
46
|
+
declare const NavbarItem: import("react").ForwardRefExoticComponent<NavbarItemProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
47
|
+
declare const Navbar: {
|
|
48
|
+
Root: typeof NavbarRoot;
|
|
49
|
+
Bar: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
50
|
+
Start: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
51
|
+
Center: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
52
|
+
End: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
53
|
+
Toggle: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogTriggerProps<unknown> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
54
|
+
Drawer: import("react").ForwardRefExoticComponent<NavbarDrawerProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
55
|
+
Close: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
56
|
+
Item: import("react").ForwardRefExoticComponent<NavbarItemProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
57
|
+
createHandle: typeof Dialog.createHandle;
|
|
58
|
+
};
|
|
59
|
+
type BottomNavigationProps = ComponentPropsWithoutRef<"nav">;
|
|
60
|
+
/**
|
|
61
|
+
* A compact floating navigation bar for small-screen destinations. It is
|
|
62
|
+
* independent from `Navbar` so it can be used in layouts without a drawer.
|
|
63
|
+
*/
|
|
64
|
+
declare const BottomNavigationRoot: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>>;
|
|
65
|
+
interface BottomNavigationItemProps extends ComponentPropsWithoutRef<"a"> {
|
|
66
|
+
/** Marks the current navigation destination. */
|
|
67
|
+
active?: boolean;
|
|
68
|
+
}
|
|
69
|
+
declare const BottomNavigationItem: import("react").ForwardRefExoticComponent<BottomNavigationItemProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
70
|
+
declare const BottomNavigation: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLElement>, HTMLElement>, "ref"> & import("react").RefAttributes<HTMLElement>> & {
|
|
71
|
+
Item: import("react").ForwardRefExoticComponent<BottomNavigationItemProps & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
72
|
+
};
|
|
73
|
+
//#endregion
|
|
74
|
+
export { BottomNavigation, BottomNavigationItem, BottomNavigationItemProps, BottomNavigationProps, BottomNavigationRoot, Navbar, NavbarBar, NavbarBarProps, NavbarCenter, NavbarCenterProps, NavbarClose, NavbarCloseProps, NavbarDrawer, NavbarDrawerPortalProps, NavbarDrawerProps, NavbarEnd, NavbarEndProps, NavbarItem, NavbarItemProps, NavbarRoot, NavbarRootProps, NavbarStart, NavbarStartProps, NavbarToggle, NavbarToggleProps };
|
|
75
|
+
//# sourceMappingURL=navigation.d.ts.map
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cx } from "../../styled-system/css/cx.js";
|
|
3
|
+
import { withRecipeClassName } from "../base-ui.js";
|
|
4
|
+
import { navbar } from "../../styled-system/recipes/navbar.js";
|
|
5
|
+
import { bottomNavigation } from "../../styled-system/recipes/bottom-navigation.js";
|
|
6
|
+
import { forwardRef } from "react";
|
|
7
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
9
|
+
//#region src/components/navigation/navigation.tsx
|
|
10
|
+
function NavbarRoot(props) {
|
|
11
|
+
return /* @__PURE__ */ jsx(Dialog.Root, { ...props });
|
|
12
|
+
}
|
|
13
|
+
/** A fixed, translucent zinc navigation surface. */
|
|
14
|
+
const NavbarBar = forwardRef(function NavbarBar({ className, ...props }, ref) {
|
|
15
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
16
|
+
...props,
|
|
17
|
+
ref,
|
|
18
|
+
className: cx(navbar().bar, className),
|
|
19
|
+
"data-jaci-component": "navbar",
|
|
20
|
+
"data-slot": "navbar-bar"
|
|
21
|
+
});
|
|
22
|
+
});
|
|
23
|
+
const NavbarStart = forwardRef(function NavbarStart({ className, ...props }, ref) {
|
|
24
|
+
return /* @__PURE__ */ jsx("div", {
|
|
25
|
+
...props,
|
|
26
|
+
ref,
|
|
27
|
+
className: cx(navbar().start, className),
|
|
28
|
+
"data-slot": "navbar-start"
|
|
29
|
+
});
|
|
30
|
+
});
|
|
31
|
+
const NavbarCenter = forwardRef(function NavbarCenter({ className, ...props }, ref) {
|
|
32
|
+
return /* @__PURE__ */ jsx("div", {
|
|
33
|
+
...props,
|
|
34
|
+
ref,
|
|
35
|
+
className: cx(navbar().center, className),
|
|
36
|
+
"data-slot": "navbar-center"
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
const NavbarEnd = forwardRef(function NavbarEnd({ className, ...props }, ref) {
|
|
40
|
+
return /* @__PURE__ */ jsx("div", {
|
|
41
|
+
...props,
|
|
42
|
+
ref,
|
|
43
|
+
className: cx(navbar().end, className),
|
|
44
|
+
"data-slot": "navbar-end"
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
/**
|
|
48
|
+
* Opens the responsive drawer. It is hidden at the large breakpoint by
|
|
49
|
+
* default, while still allowing a controlled host to render a drawer anywhere.
|
|
50
|
+
*/
|
|
51
|
+
const NavbarToggle = forwardRef(function NavbarToggle({ "aria-label": ariaLabel, children, className, ...props }, ref) {
|
|
52
|
+
const hasVisibleLabel = children != null;
|
|
53
|
+
return /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
54
|
+
...props,
|
|
55
|
+
"aria-label": ariaLabel ?? (hasVisibleLabel ? void 0 : "Open navigation menu"),
|
|
56
|
+
ref,
|
|
57
|
+
className: withRecipeClassName(navbar().toggle, className),
|
|
58
|
+
"data-slot": "navbar-toggle",
|
|
59
|
+
children: children ?? "☰"
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
/**
|
|
63
|
+
* A left-aligned mobile drawer. It intentionally owns the Dialog portal,
|
|
64
|
+
* backdrop, viewport, and popup so consumers cannot accidentally omit the
|
|
65
|
+
* pieces required for focus trapping and Escape/backdrop dismissal.
|
|
66
|
+
*/
|
|
67
|
+
const NavbarDrawer = forwardRef(function NavbarDrawer({ "aria-label": ariaLabel, children, className, portalProps, ...props }, ref) {
|
|
68
|
+
const styles = navbar();
|
|
69
|
+
return /* @__PURE__ */ jsxs(Dialog.Portal, {
|
|
70
|
+
...portalProps,
|
|
71
|
+
children: [/* @__PURE__ */ jsx(Dialog.Backdrop, {
|
|
72
|
+
className: withRecipeClassName(styles.drawerBackdrop, void 0),
|
|
73
|
+
"data-slot": "navbar-drawer-backdrop"
|
|
74
|
+
}), /* @__PURE__ */ jsx(Dialog.Viewport, {
|
|
75
|
+
className: withRecipeClassName(styles.drawerViewport, void 0),
|
|
76
|
+
"data-slot": "navbar-drawer-viewport",
|
|
77
|
+
children: /* @__PURE__ */ jsx(Dialog.Popup, {
|
|
78
|
+
...props,
|
|
79
|
+
"aria-label": ariaLabel ?? "Navigation menu",
|
|
80
|
+
ref,
|
|
81
|
+
className: withRecipeClassName(styles.drawer, className),
|
|
82
|
+
"data-jaci-component": "navbar",
|
|
83
|
+
"data-slot": "navbar-drawer",
|
|
84
|
+
children
|
|
85
|
+
})
|
|
86
|
+
})]
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
/** A close affordance for use inside `Navbar.Drawer`. */
|
|
90
|
+
const NavbarClose = forwardRef(function NavbarClose({ "aria-label": ariaLabel, children, className, ...props }, ref) {
|
|
91
|
+
const hasVisibleLabel = children != null;
|
|
92
|
+
return /* @__PURE__ */ jsx(Dialog.Close, {
|
|
93
|
+
...props,
|
|
94
|
+
"aria-label": ariaLabel ?? (hasVisibleLabel ? void 0 : "Close navigation menu"),
|
|
95
|
+
ref,
|
|
96
|
+
className: withRecipeClassName(navbar().close, className),
|
|
97
|
+
"data-slot": "navbar-close",
|
|
98
|
+
children: children ?? "×"
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
/** A semantic navigation link for either the fixed bar or mobile drawer. */
|
|
102
|
+
const NavbarItem = forwardRef(function NavbarItem({ "aria-current": ariaCurrent, active = false, className, ...props }, ref) {
|
|
103
|
+
return /* @__PURE__ */ jsx("a", {
|
|
104
|
+
...props,
|
|
105
|
+
"aria-current": ariaCurrent ?? (active ? "page" : void 0),
|
|
106
|
+
ref,
|
|
107
|
+
className: cx(navbar({ active }).item, className),
|
|
108
|
+
"data-active": active || void 0,
|
|
109
|
+
"data-slot": "navbar-item"
|
|
110
|
+
});
|
|
111
|
+
});
|
|
112
|
+
const Navbar = {
|
|
113
|
+
Root: NavbarRoot,
|
|
114
|
+
Bar: NavbarBar,
|
|
115
|
+
Start: NavbarStart,
|
|
116
|
+
Center: NavbarCenter,
|
|
117
|
+
End: NavbarEnd,
|
|
118
|
+
Toggle: NavbarToggle,
|
|
119
|
+
Drawer: NavbarDrawer,
|
|
120
|
+
Close: NavbarClose,
|
|
121
|
+
Item: NavbarItem,
|
|
122
|
+
createHandle: Dialog.createHandle
|
|
123
|
+
};
|
|
124
|
+
/**
|
|
125
|
+
* A compact floating navigation bar for small-screen destinations. It is
|
|
126
|
+
* independent from `Navbar` so it can be used in layouts without a drawer.
|
|
127
|
+
*/
|
|
128
|
+
const BottomNavigationRoot = forwardRef(function BottomNavigationRoot({ className, ...props }, ref) {
|
|
129
|
+
return /* @__PURE__ */ jsx("nav", {
|
|
130
|
+
...props,
|
|
131
|
+
ref,
|
|
132
|
+
className: cx(bottomNavigation().root, className),
|
|
133
|
+
"data-jaci-component": "bottom-navigation",
|
|
134
|
+
"data-slot": "bottom-navigation"
|
|
135
|
+
});
|
|
136
|
+
});
|
|
137
|
+
const BottomNavigationItem = forwardRef(function BottomNavigationItem({ "aria-current": ariaCurrent, active = false, className, ...props }, ref) {
|
|
138
|
+
return /* @__PURE__ */ jsx("a", {
|
|
139
|
+
...props,
|
|
140
|
+
"aria-current": ariaCurrent ?? (active ? "page" : void 0),
|
|
141
|
+
ref,
|
|
142
|
+
className: cx(bottomNavigation({ active }).item, className),
|
|
143
|
+
"data-active": active || void 0,
|
|
144
|
+
"data-slot": "bottom-navigation-item"
|
|
145
|
+
});
|
|
146
|
+
});
|
|
147
|
+
const BottomNavigation = Object.assign(BottomNavigationRoot, { Item: BottomNavigationItem });
|
|
148
|
+
//#endregion
|
|
149
|
+
export { BottomNavigation, BottomNavigationItem, BottomNavigationRoot, Navbar, NavbarBar, NavbarCenter, NavbarClose, NavbarDrawer, NavbarEnd, NavbarItem, NavbarRoot, NavbarStart, NavbarToggle };
|
|
150
|
+
|
|
151
|
+
//# sourceMappingURL=navigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.js","names":["BaseDialog"],"sources":["../../../src/components/navigation/navigation.tsx"],"sourcesContent":["\"use client\";\n\nimport { Dialog as BaseDialog } from \"@base-ui/react/dialog\";\nimport { forwardRef } from \"react\";\nimport type { ComponentPropsWithoutRef } from \"react\";\nimport type { DialogRoot as BaseDialogRoot } from \"@base-ui/react/dialog\";\n\nimport { cx } from \"../../styled-system/css\";\nimport { bottomNavigation, navbar } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\n\n/**\n * Groups a responsive navigation bar and its mobile drawer. The `open`,\n * `defaultOpen`, and `onOpenChange` props are forwarded to Base UI's Dialog\n * root, which supplies focus management, Escape handling, and backdrop\n * dismissal for `Navbar.Drawer`.\n */\nexport type NavbarRootProps<Payload = unknown> = BaseDialogRoot.Props<Payload>;\n\nexport function NavbarRoot<Payload = unknown>(props: NavbarRootProps<Payload>) {\n return <BaseDialog.Root {...props} />;\n}\n\nexport type NavbarBarProps = ComponentPropsWithoutRef<\"nav\">;\n\n/** A fixed, translucent zinc navigation surface. */\nexport const NavbarBar = forwardRef<HTMLElement, NavbarBarProps>(function NavbarBar(\n { className, ...props },\n ref,\n) {\n return (\n <nav\n {...props}\n ref={ref}\n className={cx(navbar().bar, className)}\n data-jaci-component=\"navbar\"\n data-slot=\"navbar-bar\"\n />\n );\n});\n\nexport type NavbarStartProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const NavbarStart = forwardRef<HTMLDivElement, NavbarStartProps>(function NavbarStart(\n { className, ...props },\n ref,\n) {\n return (\n <div {...props} ref={ref} className={cx(navbar().start, className)} data-slot=\"navbar-start\" />\n );\n});\n\nexport type NavbarCenterProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const NavbarCenter = forwardRef<HTMLDivElement, NavbarCenterProps>(function NavbarCenter(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(navbar().center, className)}\n data-slot=\"navbar-center\"\n />\n );\n});\n\nexport type NavbarEndProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const NavbarEnd = forwardRef<HTMLDivElement, NavbarEndProps>(function NavbarEnd(\n { className, ...props },\n ref,\n) {\n return (\n <div {...props} ref={ref} className={cx(navbar().end, className)} data-slot=\"navbar-end\" />\n );\n});\n\nexport type NavbarToggleProps = ComponentPropsWithoutRef<typeof BaseDialog.Trigger>;\n\n/**\n * Opens the responsive drawer. It is hidden at the large breakpoint by\n * default, while still allowing a controlled host to render a drawer anywhere.\n */\nexport const NavbarToggle = forwardRef<HTMLButtonElement, NavbarToggleProps>(function NavbarToggle(\n { \"aria-label\": ariaLabel, children, className, ...props },\n ref,\n) {\n const hasVisibleLabel = children != null;\n\n return (\n <BaseDialog.Trigger\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Open navigation menu\")}\n ref={ref}\n className={withRecipeClassName(navbar().toggle, className)}\n data-slot=\"navbar-toggle\"\n >\n {children ?? \"☰\"}\n </BaseDialog.Trigger>\n );\n});\n\nexport type NavbarDrawerPortalProps = Omit<\n ComponentPropsWithoutRef<typeof BaseDialog.Portal>,\n \"children\"\n>;\n\nexport interface NavbarDrawerProps extends ComponentPropsWithoutRef<typeof BaseDialog.Popup> {\n /** Optional controls for the underlying Base UI portal. */\n portalProps?: NavbarDrawerPortalProps;\n}\n\n/**\n * A left-aligned mobile drawer. It intentionally owns the Dialog portal,\n * backdrop, viewport, and popup so consumers cannot accidentally omit the\n * pieces required for focus trapping and Escape/backdrop dismissal.\n */\nexport const NavbarDrawer = forwardRef<HTMLDivElement, NavbarDrawerProps>(function NavbarDrawer(\n { \"aria-label\": ariaLabel, children, className, portalProps, ...props },\n ref,\n) {\n const styles = navbar();\n\n return (\n <BaseDialog.Portal {...portalProps}>\n <BaseDialog.Backdrop\n className={withRecipeClassName(styles.drawerBackdrop, undefined)}\n data-slot=\"navbar-drawer-backdrop\"\n />\n <BaseDialog.Viewport\n className={withRecipeClassName(styles.drawerViewport, undefined)}\n data-slot=\"navbar-drawer-viewport\"\n >\n <BaseDialog.Popup\n {...props}\n aria-label={ariaLabel ?? \"Navigation menu\"}\n ref={ref}\n className={withRecipeClassName(styles.drawer, className)}\n data-jaci-component=\"navbar\"\n data-slot=\"navbar-drawer\"\n >\n {children}\n </BaseDialog.Popup>\n </BaseDialog.Viewport>\n </BaseDialog.Portal>\n );\n});\n\nexport type NavbarCloseProps = ComponentPropsWithoutRef<typeof BaseDialog.Close>;\n\n/** A close affordance for use inside `Navbar.Drawer`. */\nexport const NavbarClose = forwardRef<HTMLButtonElement, NavbarCloseProps>(function NavbarClose(\n { \"aria-label\": ariaLabel, children, className, ...props },\n ref,\n) {\n const hasVisibleLabel = children != null;\n\n return (\n <BaseDialog.Close\n {...props}\n aria-label={ariaLabel ?? (hasVisibleLabel ? undefined : \"Close navigation menu\")}\n ref={ref}\n className={withRecipeClassName(navbar().close, className)}\n data-slot=\"navbar-close\"\n >\n {children ?? \"×\"}\n </BaseDialog.Close>\n );\n});\n\nexport interface NavbarItemProps extends ComponentPropsWithoutRef<\"a\"> {\n /** Marks the current navigation destination. */\n active?: boolean;\n}\n\n/** A semantic navigation link for either the fixed bar or mobile drawer. */\nexport const NavbarItem = forwardRef<HTMLAnchorElement, NavbarItemProps>(function NavbarItem(\n { \"aria-current\": ariaCurrent, active = false, className, ...props },\n ref,\n) {\n return (\n <a\n {...props}\n aria-current={ariaCurrent ?? (active ? \"page\" : undefined)}\n ref={ref}\n className={cx(navbar({ active }).item, className)}\n data-active={active || undefined}\n data-slot=\"navbar-item\"\n />\n );\n});\n\nexport const Navbar = {\n Root: NavbarRoot,\n Bar: NavbarBar,\n Start: NavbarStart,\n Center: NavbarCenter,\n End: NavbarEnd,\n Toggle: NavbarToggle,\n Drawer: NavbarDrawer,\n Close: NavbarClose,\n Item: NavbarItem,\n createHandle: BaseDialog.createHandle,\n};\n\nexport type BottomNavigationProps = ComponentPropsWithoutRef<\"nav\">;\n\n/**\n * A compact floating navigation bar for small-screen destinations. It is\n * independent from `Navbar` so it can be used in layouts without a drawer.\n */\nexport const BottomNavigationRoot = forwardRef<HTMLElement, BottomNavigationProps>(\n function BottomNavigationRoot({ className, ...props }, ref) {\n return (\n <nav\n {...props}\n ref={ref}\n className={cx(bottomNavigation().root, className)}\n data-jaci-component=\"bottom-navigation\"\n data-slot=\"bottom-navigation\"\n />\n );\n },\n);\n\nexport interface BottomNavigationItemProps extends ComponentPropsWithoutRef<\"a\"> {\n /** Marks the current navigation destination. */\n active?: boolean;\n}\n\nexport const BottomNavigationItem = forwardRef<HTMLAnchorElement, BottomNavigationItemProps>(\n function BottomNavigationItem(\n { \"aria-current\": ariaCurrent, active = false, className, ...props },\n ref,\n ) {\n return (\n <a\n {...props}\n aria-current={ariaCurrent ?? (active ? \"page\" : undefined)}\n ref={ref}\n className={cx(bottomNavigation({ active }).item, className)}\n data-active={active || undefined}\n data-slot=\"bottom-navigation-item\"\n />\n );\n },\n);\n\nexport const BottomNavigation = Object.assign(BottomNavigationRoot, {\n Item: BottomNavigationItem,\n});\n"],"mappings":"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"}
|