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,80 @@
|
|
|
1
|
+
//#region src/components/date-picker/date-utils.ts
|
|
2
|
+
function cloneDate(date) {
|
|
3
|
+
return new Date(date.getTime());
|
|
4
|
+
}
|
|
5
|
+
/** Creates a local date at noon to avoid DST changes moving a calendar day. */
|
|
6
|
+
function createCalendarDate(year, month, day) {
|
|
7
|
+
return new Date(year, month, day, 12, 0, 0, 0);
|
|
8
|
+
}
|
|
9
|
+
function startOfMonth(date) {
|
|
10
|
+
return createCalendarDate(date.getFullYear(), date.getMonth(), 1);
|
|
11
|
+
}
|
|
12
|
+
function addDays(date, amount) {
|
|
13
|
+
const result = cloneDate(date);
|
|
14
|
+
result.setDate(result.getDate() + amount);
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
function addMonths(date, amount) {
|
|
18
|
+
return createCalendarDate(date.getFullYear(), date.getMonth() + amount, 1);
|
|
19
|
+
}
|
|
20
|
+
function dateKey(date) {
|
|
21
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
22
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
23
|
+
return `${date.getFullYear()}-${month}-${day}`;
|
|
24
|
+
}
|
|
25
|
+
function toInputDate(date) {
|
|
26
|
+
return date ? dateKey(date) : "";
|
|
27
|
+
}
|
|
28
|
+
function isSameDay(left, right) {
|
|
29
|
+
return Boolean(left && right && dateKey(left) === dateKey(right));
|
|
30
|
+
}
|
|
31
|
+
function isBeforeDay(left, right) {
|
|
32
|
+
return dateKey(left) < dateKey(right);
|
|
33
|
+
}
|
|
34
|
+
function isAfterDay(left, right) {
|
|
35
|
+
return dateKey(left) > dateKey(right);
|
|
36
|
+
}
|
|
37
|
+
function getCalendarDays(month, weekStartsOn) {
|
|
38
|
+
const firstDay = startOfMonth(month);
|
|
39
|
+
const firstVisibleDay = addDays(firstDay, -((firstDay.getDay() - weekStartsOn + 7) % 7));
|
|
40
|
+
return Array.from({ length: 42 }, (_, index) => addDays(firstVisibleDay, index));
|
|
41
|
+
}
|
|
42
|
+
function getWeekdayLabels(locale, weekStartsOn) {
|
|
43
|
+
const formatter = new Intl.DateTimeFormat(locale, { weekday: "short" });
|
|
44
|
+
const sunday = createCalendarDate(2024, 0, 7);
|
|
45
|
+
return Array.from({ length: 7 }, (_, index) => formatter.format(addDays(sunday, (weekStartsOn + index) % 7)));
|
|
46
|
+
}
|
|
47
|
+
function formatMonthLabel(date, locale) {
|
|
48
|
+
return new Intl.DateTimeFormat(locale, {
|
|
49
|
+
month: "long",
|
|
50
|
+
year: "numeric"
|
|
51
|
+
}).format(date);
|
|
52
|
+
}
|
|
53
|
+
function formatDateLabel(date, locale, placeholder) {
|
|
54
|
+
return date ? new Intl.DateTimeFormat(locale, { dateStyle: "medium" }).format(date) : placeholder;
|
|
55
|
+
}
|
|
56
|
+
function getDateRangeLabel(date, locale) {
|
|
57
|
+
return new Intl.DateTimeFormat(locale, {
|
|
58
|
+
day: "numeric",
|
|
59
|
+
month: "long",
|
|
60
|
+
year: "numeric"
|
|
61
|
+
}).format(date);
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
exports.addDays = addDays;
|
|
65
|
+
exports.addMonths = addMonths;
|
|
66
|
+
exports.cloneDate = cloneDate;
|
|
67
|
+
exports.createCalendarDate = createCalendarDate;
|
|
68
|
+
exports.dateKey = dateKey;
|
|
69
|
+
exports.formatDateLabel = formatDateLabel;
|
|
70
|
+
exports.formatMonthLabel = formatMonthLabel;
|
|
71
|
+
exports.getCalendarDays = getCalendarDays;
|
|
72
|
+
exports.getDateRangeLabel = getDateRangeLabel;
|
|
73
|
+
exports.getWeekdayLabels = getWeekdayLabels;
|
|
74
|
+
exports.isAfterDay = isAfterDay;
|
|
75
|
+
exports.isBeforeDay = isBeforeDay;
|
|
76
|
+
exports.isSameDay = isSameDay;
|
|
77
|
+
exports.startOfMonth = startOfMonth;
|
|
78
|
+
exports.toInputDate = toInputDate;
|
|
79
|
+
|
|
80
|
+
//# sourceMappingURL=date-utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-utils.cjs","names":[],"sources":["../../../src/components/date-picker/date-utils.ts"],"sourcesContent":["export type DateLike = Date | null | undefined;\n\nexport function cloneDate(date: Date): Date {\n return new Date(date.getTime());\n}\n\n/** Creates a local date at noon to avoid DST changes moving a calendar day. */\nexport function createCalendarDate(year: number, month: number, day: number): Date {\n return new Date(year, month, day, 12, 0, 0, 0);\n}\n\nexport function startOfMonth(date: Date): Date {\n return createCalendarDate(date.getFullYear(), date.getMonth(), 1);\n}\n\nexport function addDays(date: Date, amount: number): Date {\n const result = cloneDate(date);\n result.setDate(result.getDate() + amount);\n return result;\n}\n\nexport function addMonths(date: Date, amount: number): Date {\n return createCalendarDate(date.getFullYear(), date.getMonth() + amount, 1);\n}\n\nexport function dateKey(date: Date): string {\n const month = String(date.getMonth() + 1).padStart(2, \"0\");\n const day = String(date.getDate()).padStart(2, \"0\");\n return `${date.getFullYear()}-${month}-${day}`;\n}\n\nexport function toInputDate(date: DateLike): string {\n return date ? dateKey(date) : \"\";\n}\n\nexport function isSameDay(left: DateLike, right: DateLike): boolean {\n return Boolean(left && right && dateKey(left) === dateKey(right));\n}\n\nexport function isBeforeDay(left: Date, right: Date): boolean {\n return dateKey(left) < dateKey(right);\n}\n\nexport function isAfterDay(left: Date, right: Date): boolean {\n return dateKey(left) > dateKey(right);\n}\n\nexport function getCalendarDays(month: Date, weekStartsOn: number): Date[] {\n const firstDay = startOfMonth(month);\n const offset = (firstDay.getDay() - weekStartsOn + 7) % 7;\n const firstVisibleDay = addDays(firstDay, -offset);\n\n return Array.from({ length: 42 }, (_, index) => addDays(firstVisibleDay, index));\n}\n\nexport function getWeekdayLabels(locale: string, weekStartsOn: number): string[] {\n const formatter = new Intl.DateTimeFormat(locale, { weekday: \"short\" });\n const sunday = createCalendarDate(2024, 0, 7);\n\n return Array.from({ length: 7 }, (_, index) =>\n formatter.format(addDays(sunday, (weekStartsOn + index) % 7)),\n );\n}\n\nexport function formatMonthLabel(date: Date, locale: string): string {\n return new Intl.DateTimeFormat(locale, { month: \"long\", year: \"numeric\" }).format(date);\n}\n\nexport function formatDateLabel(date: DateLike, locale: string, placeholder: string): string {\n return date ? new Intl.DateTimeFormat(locale, { dateStyle: \"medium\" }).format(date) : placeholder;\n}\n\nexport function getDateRangeLabel(date: Date, locale: string): string {\n return new Intl.DateTimeFormat(locale, {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n }).format(date);\n}\n"],"mappings":";AAEA,SAAgB,UAAU,MAAkB;CAC1C,OAAO,IAAI,KAAK,KAAK,QAAQ,CAAC;AAChC;;AAGA,SAAgB,mBAAmB,MAAc,OAAe,KAAmB;CACjF,OAAO,IAAI,KAAK,MAAM,OAAO,KAAK,IAAI,GAAG,GAAG,CAAC;AAC/C;AAEA,SAAgB,aAAa,MAAkB;CAC7C,OAAO,mBAAmB,KAAK,YAAY,GAAG,KAAK,SAAS,GAAG,CAAC;AAClE;AAEA,SAAgB,QAAQ,MAAY,QAAsB;CACxD,MAAM,SAAS,UAAU,IAAI;CAC7B,OAAO,QAAQ,OAAO,QAAQ,IAAI,MAAM;CACxC,OAAO;AACT;AAEA,SAAgB,UAAU,MAAY,QAAsB;CAC1D,OAAO,mBAAmB,KAAK,YAAY,GAAG,KAAK,SAAS,IAAI,QAAQ,CAAC;AAC3E;AAEA,SAAgB,QAAQ,MAAoB;CAC1C,MAAM,QAAQ,OAAO,KAAK,SAAS,IAAI,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG;CACzD,MAAM,MAAM,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG;CAClD,OAAO,GAAG,KAAK,YAAY,EAAE,GAAG,MAAM,GAAG;AAC3C;AAEA,SAAgB,YAAY,MAAwB;CAClD,OAAO,OAAO,QAAQ,IAAI,IAAI;AAChC;AAEA,SAAgB,UAAU,MAAgB,OAA0B;CAClE,OAAO,QAAQ,QAAQ,SAAS,QAAQ,IAAI,MAAM,QAAQ,KAAK,CAAC;AAClE;AAEA,SAAgB,YAAY,MAAY,OAAsB;CAC5D,OAAO,QAAQ,IAAI,IAAI,QAAQ,KAAK;AACtC;AAEA,SAAgB,WAAW,MAAY,OAAsB;CAC3D,OAAO,QAAQ,IAAI,IAAI,QAAQ,KAAK;AACtC;AAEA,SAAgB,gBAAgB,OAAa,cAA8B;CACzE,MAAM,WAAW,aAAa,KAAK;CAEnC,MAAM,kBAAkB,QAAQ,UAAU,GAD1B,SAAS,OAAO,IAAI,eAAe,KAAK,EACP;CAEjD,OAAO,MAAM,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,UAAU,QAAQ,iBAAiB,KAAK,CAAC;AACjF;AAEA,SAAgB,iBAAiB,QAAgB,cAAgC;CAC/E,MAAM,YAAY,IAAI,KAAK,eAAe,QAAQ,EAAE,SAAS,QAAQ,CAAC;CACtE,MAAM,SAAS,mBAAmB,MAAM,GAAG,CAAC;CAE5C,OAAO,MAAM,KAAK,EAAE,QAAQ,EAAE,IAAI,GAAG,UACnC,UAAU,OAAO,QAAQ,SAAS,eAAe,SAAS,CAAC,CAAC,CAC9D;AACF;AAEA,SAAgB,iBAAiB,MAAY,QAAwB;CACnE,OAAO,IAAI,KAAK,eAAe,QAAQ;EAAE,OAAO;EAAQ,MAAM;CAAU,CAAC,CAAC,CAAC,OAAO,IAAI;AACxF;AAEA,SAAgB,gBAAgB,MAAgB,QAAgB,aAA6B;CAC3F,OAAO,OAAO,IAAI,KAAK,eAAe,QAAQ,EAAE,WAAW,SAAS,CAAC,CAAC,CAAC,OAAO,IAAI,IAAI;AACxF;AAEA,SAAgB,kBAAkB,MAAY,QAAwB;CACpE,OAAO,IAAI,KAAK,eAAe,QAAQ;EACrC,KAAK;EACL,OAAO;EACP,MAAM;CACR,CAAC,CAAC,CAAC,OAAO,IAAI;AAChB"}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
//#region src/components/date-picker/date-utils.ts
|
|
2
|
+
function cloneDate(date) {
|
|
3
|
+
return new Date(date.getTime());
|
|
4
|
+
}
|
|
5
|
+
/** Creates a local date at noon to avoid DST changes moving a calendar day. */
|
|
6
|
+
function createCalendarDate(year, month, day) {
|
|
7
|
+
return new Date(year, month, day, 12, 0, 0, 0);
|
|
8
|
+
}
|
|
9
|
+
function startOfMonth(date) {
|
|
10
|
+
return createCalendarDate(date.getFullYear(), date.getMonth(), 1);
|
|
11
|
+
}
|
|
12
|
+
function addDays(date, amount) {
|
|
13
|
+
const result = cloneDate(date);
|
|
14
|
+
result.setDate(result.getDate() + amount);
|
|
15
|
+
return result;
|
|
16
|
+
}
|
|
17
|
+
function addMonths(date, amount) {
|
|
18
|
+
return createCalendarDate(date.getFullYear(), date.getMonth() + amount, 1);
|
|
19
|
+
}
|
|
20
|
+
function dateKey(date) {
|
|
21
|
+
const month = String(date.getMonth() + 1).padStart(2, "0");
|
|
22
|
+
const day = String(date.getDate()).padStart(2, "0");
|
|
23
|
+
return `${date.getFullYear()}-${month}-${day}`;
|
|
24
|
+
}
|
|
25
|
+
function toInputDate(date) {
|
|
26
|
+
return date ? dateKey(date) : "";
|
|
27
|
+
}
|
|
28
|
+
function isSameDay(left, right) {
|
|
29
|
+
return Boolean(left && right && dateKey(left) === dateKey(right));
|
|
30
|
+
}
|
|
31
|
+
function isBeforeDay(left, right) {
|
|
32
|
+
return dateKey(left) < dateKey(right);
|
|
33
|
+
}
|
|
34
|
+
function isAfterDay(left, right) {
|
|
35
|
+
return dateKey(left) > dateKey(right);
|
|
36
|
+
}
|
|
37
|
+
function getCalendarDays(month, weekStartsOn) {
|
|
38
|
+
const firstDay = startOfMonth(month);
|
|
39
|
+
const firstVisibleDay = addDays(firstDay, -((firstDay.getDay() - weekStartsOn + 7) % 7));
|
|
40
|
+
return Array.from({ length: 42 }, (_, index) => addDays(firstVisibleDay, index));
|
|
41
|
+
}
|
|
42
|
+
function getWeekdayLabels(locale, weekStartsOn) {
|
|
43
|
+
const formatter = new Intl.DateTimeFormat(locale, { weekday: "short" });
|
|
44
|
+
const sunday = createCalendarDate(2024, 0, 7);
|
|
45
|
+
return Array.from({ length: 7 }, (_, index) => formatter.format(addDays(sunday, (weekStartsOn + index) % 7)));
|
|
46
|
+
}
|
|
47
|
+
function formatMonthLabel(date, locale) {
|
|
48
|
+
return new Intl.DateTimeFormat(locale, {
|
|
49
|
+
month: "long",
|
|
50
|
+
year: "numeric"
|
|
51
|
+
}).format(date);
|
|
52
|
+
}
|
|
53
|
+
function formatDateLabel(date, locale, placeholder) {
|
|
54
|
+
return date ? new Intl.DateTimeFormat(locale, { dateStyle: "medium" }).format(date) : placeholder;
|
|
55
|
+
}
|
|
56
|
+
function getDateRangeLabel(date, locale) {
|
|
57
|
+
return new Intl.DateTimeFormat(locale, {
|
|
58
|
+
day: "numeric",
|
|
59
|
+
month: "long",
|
|
60
|
+
year: "numeric"
|
|
61
|
+
}).format(date);
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
export { addDays, addMonths, cloneDate, createCalendarDate, dateKey, formatDateLabel, formatMonthLabel, getCalendarDays, getDateRangeLabel, getWeekdayLabels, isAfterDay, isBeforeDay, isSameDay, startOfMonth, toInputDate };
|
|
65
|
+
|
|
66
|
+
//# sourceMappingURL=date-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"date-utils.js","names":[],"sources":["../../../src/components/date-picker/date-utils.ts"],"sourcesContent":["export type DateLike = Date | null | undefined;\n\nexport function cloneDate(date: Date): Date {\n return new Date(date.getTime());\n}\n\n/** Creates a local date at noon to avoid DST changes moving a calendar day. */\nexport function createCalendarDate(year: number, month: number, day: number): Date {\n return new Date(year, month, day, 12, 0, 0, 0);\n}\n\nexport function startOfMonth(date: Date): Date {\n return createCalendarDate(date.getFullYear(), date.getMonth(), 1);\n}\n\nexport function addDays(date: Date, amount: number): Date {\n const result = cloneDate(date);\n result.setDate(result.getDate() + amount);\n return result;\n}\n\nexport function addMonths(date: Date, amount: number): Date {\n return createCalendarDate(date.getFullYear(), date.getMonth() + amount, 1);\n}\n\nexport function dateKey(date: Date): string {\n const month = String(date.getMonth() + 1).padStart(2, \"0\");\n const day = String(date.getDate()).padStart(2, \"0\");\n return `${date.getFullYear()}-${month}-${day}`;\n}\n\nexport function toInputDate(date: DateLike): string {\n return date ? dateKey(date) : \"\";\n}\n\nexport function isSameDay(left: DateLike, right: DateLike): boolean {\n return Boolean(left && right && dateKey(left) === dateKey(right));\n}\n\nexport function isBeforeDay(left: Date, right: Date): boolean {\n return dateKey(left) < dateKey(right);\n}\n\nexport function isAfterDay(left: Date, right: Date): boolean {\n return dateKey(left) > dateKey(right);\n}\n\nexport function getCalendarDays(month: Date, weekStartsOn: number): Date[] {\n const firstDay = startOfMonth(month);\n const offset = (firstDay.getDay() - weekStartsOn + 7) % 7;\n const firstVisibleDay = addDays(firstDay, -offset);\n\n return Array.from({ length: 42 }, (_, index) => addDays(firstVisibleDay, index));\n}\n\nexport function getWeekdayLabels(locale: string, weekStartsOn: number): string[] {\n const formatter = new Intl.DateTimeFormat(locale, { weekday: \"short\" });\n const sunday = createCalendarDate(2024, 0, 7);\n\n return Array.from({ length: 7 }, (_, index) =>\n formatter.format(addDays(sunday, (weekStartsOn + index) % 7)),\n );\n}\n\nexport function formatMonthLabel(date: Date, locale: string): string {\n return new Intl.DateTimeFormat(locale, { month: \"long\", year: \"numeric\" }).format(date);\n}\n\nexport function formatDateLabel(date: DateLike, locale: string, placeholder: string): string {\n return date ? new Intl.DateTimeFormat(locale, { dateStyle: \"medium\" }).format(date) : placeholder;\n}\n\nexport function getDateRangeLabel(date: Date, locale: string): string {\n return new Intl.DateTimeFormat(locale, {\n day: \"numeric\",\n month: \"long\",\n year: \"numeric\",\n }).format(date);\n}\n"],"mappings":";AAEA,SAAgB,UAAU,MAAkB;CAC1C,OAAO,IAAI,KAAK,KAAK,QAAQ,CAAC;AAChC;;AAGA,SAAgB,mBAAmB,MAAc,OAAe,KAAmB;CACjF,OAAO,IAAI,KAAK,MAAM,OAAO,KAAK,IAAI,GAAG,GAAG,CAAC;AAC/C;AAEA,SAAgB,aAAa,MAAkB;CAC7C,OAAO,mBAAmB,KAAK,YAAY,GAAG,KAAK,SAAS,GAAG,CAAC;AAClE;AAEA,SAAgB,QAAQ,MAAY,QAAsB;CACxD,MAAM,SAAS,UAAU,IAAI;CAC7B,OAAO,QAAQ,OAAO,QAAQ,IAAI,MAAM;CACxC,OAAO;AACT;AAEA,SAAgB,UAAU,MAAY,QAAsB;CAC1D,OAAO,mBAAmB,KAAK,YAAY,GAAG,KAAK,SAAS,IAAI,QAAQ,CAAC;AAC3E;AAEA,SAAgB,QAAQ,MAAoB;CAC1C,MAAM,QAAQ,OAAO,KAAK,SAAS,IAAI,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG;CACzD,MAAM,MAAM,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,SAAS,GAAG,GAAG;CAClD,OAAO,GAAG,KAAK,YAAY,EAAE,GAAG,MAAM,GAAG;AAC3C;AAEA,SAAgB,YAAY,MAAwB;CAClD,OAAO,OAAO,QAAQ,IAAI,IAAI;AAChC;AAEA,SAAgB,UAAU,MAAgB,OAA0B;CAClE,OAAO,QAAQ,QAAQ,SAAS,QAAQ,IAAI,MAAM,QAAQ,KAAK,CAAC;AAClE;AAEA,SAAgB,YAAY,MAAY,OAAsB;CAC5D,OAAO,QAAQ,IAAI,IAAI,QAAQ,KAAK;AACtC;AAEA,SAAgB,WAAW,MAAY,OAAsB;CAC3D,OAAO,QAAQ,IAAI,IAAI,QAAQ,KAAK;AACtC;AAEA,SAAgB,gBAAgB,OAAa,cAA8B;CACzE,MAAM,WAAW,aAAa,KAAK;CAEnC,MAAM,kBAAkB,QAAQ,UAAU,GAD1B,SAAS,OAAO,IAAI,eAAe,KAAK,EACP;CAEjD,OAAO,MAAM,KAAK,EAAE,QAAQ,GAAG,IAAI,GAAG,UAAU,QAAQ,iBAAiB,KAAK,CAAC;AACjF;AAEA,SAAgB,iBAAiB,QAAgB,cAAgC;CAC/E,MAAM,YAAY,IAAI,KAAK,eAAe,QAAQ,EAAE,SAAS,QAAQ,CAAC;CACtE,MAAM,SAAS,mBAAmB,MAAM,GAAG,CAAC;CAE5C,OAAO,MAAM,KAAK,EAAE,QAAQ,EAAE,IAAI,GAAG,UACnC,UAAU,OAAO,QAAQ,SAAS,eAAe,SAAS,CAAC,CAAC,CAC9D;AACF;AAEA,SAAgB,iBAAiB,MAAY,QAAwB;CACnE,OAAO,IAAI,KAAK,eAAe,QAAQ;EAAE,OAAO;EAAQ,MAAM;CAAU,CAAC,CAAC,CAAC,OAAO,IAAI;AACxF;AAEA,SAAgB,gBAAgB,MAAgB,QAAgB,aAA6B;CAC3F,OAAO,OAAO,IAAI,KAAK,eAAe,QAAQ,EAAE,WAAW,SAAS,CAAC,CAAC,CAAC,OAAO,IAAI,IAAI;AACxF;AAEA,SAAgB,kBAAkB,MAAY,QAAwB;CACpE,OAAO,IAAI,KAAK,eAAe,QAAQ;EACrC,KAAK;EACL,OAAO;EACP,MAAM;CACR,CAAC,CAAC,CAAC,OAAO,IAAI;AAChB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { DatePicker, DatePickerCalendar, DatePickerCalendarProps, DatePickerCaption, DatePickerCaptionProps, DatePickerClear, DatePickerClearProps, DatePickerClose, DatePickerCloseProps, DatePickerControl, DatePickerControlProps, DatePickerDay, DatePickerDayProps, DatePickerHeader, DatePickerHeaderProps, DatePickerLabel, DatePickerLabelProps, DatePickerNavigationProps, DatePickerNext, DatePickerPopup, DatePickerPopupProps, DatePickerPortal, DatePickerPortalProps, DatePickerPositioner, DatePickerPositionerProps, DatePickerPrevious, DatePickerRoot, DatePickerRootProps, DatePickerSize, DatePickerTrigger, DatePickerTriggerProps, DatePickerValue, DatePickerValueProps } from "./date-picker.cjs";
|
|
2
|
+
export { DatePicker, DatePickerCalendar, type DatePickerCalendarProps, DatePickerCaption, type DatePickerCaptionProps, DatePickerClear, type DatePickerClearProps, DatePickerClose, type DatePickerCloseProps, DatePickerControl, type DatePickerControlProps, DatePickerDay, type DatePickerDayProps, DatePickerHeader, type DatePickerHeaderProps, DatePickerLabel, type DatePickerLabelProps, type DatePickerNavigationProps, DatePickerNext, DatePickerPopup, type DatePickerPopupProps, DatePickerPortal, type DatePickerPortalProps, DatePickerPositioner, type DatePickerPositionerProps, DatePickerPrevious, DatePickerRoot, type DatePickerRootProps, type DatePickerSize, DatePickerTrigger, type DatePickerTriggerProps, DatePickerValue, type DatePickerValueProps };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { DatePicker, DatePickerCalendar, DatePickerCalendarProps, DatePickerCaption, DatePickerCaptionProps, DatePickerClear, DatePickerClearProps, DatePickerClose, DatePickerCloseProps, DatePickerControl, DatePickerControlProps, DatePickerDay, DatePickerDayProps, DatePickerHeader, DatePickerHeaderProps, DatePickerLabel, DatePickerLabelProps, DatePickerNavigationProps, DatePickerNext, DatePickerPopup, DatePickerPopupProps, DatePickerPortal, DatePickerPortalProps, DatePickerPositioner, DatePickerPositionerProps, DatePickerPrevious, DatePickerRoot, DatePickerRootProps, DatePickerSize, DatePickerTrigger, DatePickerTriggerProps, DatePickerValue, DatePickerValueProps } from "./date-picker.js";
|
|
2
|
+
export { DatePicker, DatePickerCalendar, type DatePickerCalendarProps, DatePickerCaption, type DatePickerCaptionProps, DatePickerClear, type DatePickerClearProps, DatePickerClose, type DatePickerCloseProps, DatePickerControl, type DatePickerControlProps, DatePickerDay, type DatePickerDayProps, DatePickerHeader, type DatePickerHeaderProps, DatePickerLabel, type DatePickerLabelProps, type DatePickerNavigationProps, DatePickerNext, DatePickerPopup, type DatePickerPopupProps, DatePickerPortal, type DatePickerPortalProps, DatePickerPositioner, type DatePickerPositionerProps, DatePickerPrevious, DatePickerRoot, type DatePickerRootProps, type DatePickerSize, DatePickerTrigger, type DatePickerTriggerProps, DatePickerValue, type DatePickerValueProps };
|
|
@@ -0,0 +1,130 @@
|
|
|
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_dialog = require("../../styled-system/recipes/dialog.cjs");
|
|
5
|
+
let react = require("react");
|
|
6
|
+
let react_jsx_runtime = require("react/jsx-runtime");
|
|
7
|
+
let _base_ui_react_dialog = require("@base-ui/react/dialog");
|
|
8
|
+
//#region src/components/dialog/dialog.tsx
|
|
9
|
+
function DialogRoot(props) {
|
|
10
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Root, { ...props });
|
|
11
|
+
}
|
|
12
|
+
const DialogTrigger = (0, react.forwardRef)(function DialogTrigger({ className, ...props }, ref) {
|
|
13
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Trigger, {
|
|
14
|
+
...props,
|
|
15
|
+
ref,
|
|
16
|
+
className: require_base_ui.withRecipeClassName(require_dialog.dialog().trigger, className),
|
|
17
|
+
"data-slot": "dialog-trigger"
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* Preserves Base UI's portal behavior and optional container/ref APIs.
|
|
22
|
+
*/
|
|
23
|
+
const DialogPortal = _base_ui_react_dialog.Dialog.Portal;
|
|
24
|
+
const DialogBackdrop = (0, react.forwardRef)(function DialogBackdrop({ className, ...props }, ref) {
|
|
25
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Backdrop, {
|
|
26
|
+
...props,
|
|
27
|
+
ref,
|
|
28
|
+
className: require_base_ui.withRecipeClassName(require_dialog.dialog().backdrop, className),
|
|
29
|
+
"data-slot": "dialog-backdrop"
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
const DialogViewport = (0, react.forwardRef)(function DialogViewport({ className, ...props }, ref) {
|
|
33
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Viewport, {
|
|
34
|
+
...props,
|
|
35
|
+
ref,
|
|
36
|
+
className: require_base_ui.withRecipeClassName(require_dialog.dialog().viewport, className),
|
|
37
|
+
"data-slot": "dialog-viewport"
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
const DialogPopup = (0, react.forwardRef)(function DialogPopup({ className, size = "md", ...props }, ref) {
|
|
41
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Popup, {
|
|
42
|
+
...props,
|
|
43
|
+
ref,
|
|
44
|
+
className: require_base_ui.withRecipeClassName(require_dialog.dialog({ size }).popup, className),
|
|
45
|
+
"data-jaci-component": "dialog",
|
|
46
|
+
"data-slot": "dialog-popup"
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
const DialogHeader = (0, react.forwardRef)(function DialogHeader({ className, ...props }, ref) {
|
|
50
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
51
|
+
...props,
|
|
52
|
+
ref,
|
|
53
|
+
className: require_cx.cx(require_dialog.dialog().header, className),
|
|
54
|
+
"data-slot": "dialog-header"
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
const DialogTitle = (0, react.forwardRef)(function DialogTitle({ className, ...props }, ref) {
|
|
58
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Title, {
|
|
59
|
+
...props,
|
|
60
|
+
ref,
|
|
61
|
+
className: require_base_ui.withRecipeClassName(require_dialog.dialog().title, className),
|
|
62
|
+
"data-slot": "dialog-title"
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
const DialogDescription = (0, react.forwardRef)(function DialogDescription({ className, ...props }, ref) {
|
|
66
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Description, {
|
|
67
|
+
...props,
|
|
68
|
+
ref,
|
|
69
|
+
className: require_base_ui.withRecipeClassName(require_dialog.dialog().description, className),
|
|
70
|
+
"data-slot": "dialog-description"
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
const DialogBody = (0, react.forwardRef)(function DialogBody({ className, ...props }, ref) {
|
|
74
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
75
|
+
...props,
|
|
76
|
+
ref,
|
|
77
|
+
className: require_cx.cx(require_dialog.dialog().body, className),
|
|
78
|
+
"data-slot": "dialog-body"
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
const DialogFooter = (0, react.forwardRef)(function DialogFooter({ className, ...props }, ref) {
|
|
82
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
|
|
83
|
+
...props,
|
|
84
|
+
ref,
|
|
85
|
+
className: require_cx.cx(require_dialog.dialog().footer, className),
|
|
86
|
+
"data-slot": "dialog-footer"
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
const DialogClose = (0, react.forwardRef)(function DialogClose({ "aria-label": ariaLabel, children, className, ...props }, ref) {
|
|
90
|
+
const hasVisibleLabel = children != null;
|
|
91
|
+
return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(_base_ui_react_dialog.Dialog.Close, {
|
|
92
|
+
...props,
|
|
93
|
+
"aria-label": ariaLabel ?? (hasVisibleLabel ? void 0 : "Close dialog"),
|
|
94
|
+
ref,
|
|
95
|
+
className: require_base_ui.withRecipeClassName(hasVisibleLabel ? require_dialog.dialog().action : require_dialog.dialog().close, className),
|
|
96
|
+
"data-slot": "dialog-close",
|
|
97
|
+
children: children ?? "×"
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
const Dialog = {
|
|
101
|
+
Root: DialogRoot,
|
|
102
|
+
Trigger: DialogTrigger,
|
|
103
|
+
Portal: DialogPortal,
|
|
104
|
+
Backdrop: DialogBackdrop,
|
|
105
|
+
Viewport: DialogViewport,
|
|
106
|
+
Popup: DialogPopup,
|
|
107
|
+
Header: DialogHeader,
|
|
108
|
+
Title: DialogTitle,
|
|
109
|
+
Description: DialogDescription,
|
|
110
|
+
Body: DialogBody,
|
|
111
|
+
Footer: DialogFooter,
|
|
112
|
+
Close: DialogClose,
|
|
113
|
+
createHandle: _base_ui_react_dialog.Dialog.createHandle
|
|
114
|
+
};
|
|
115
|
+
//#endregion
|
|
116
|
+
exports.Dialog = Dialog;
|
|
117
|
+
exports.DialogBackdrop = DialogBackdrop;
|
|
118
|
+
exports.DialogBody = DialogBody;
|
|
119
|
+
exports.DialogClose = DialogClose;
|
|
120
|
+
exports.DialogDescription = DialogDescription;
|
|
121
|
+
exports.DialogFooter = DialogFooter;
|
|
122
|
+
exports.DialogHeader = DialogHeader;
|
|
123
|
+
exports.DialogPopup = DialogPopup;
|
|
124
|
+
exports.DialogPortal = DialogPortal;
|
|
125
|
+
exports.DialogRoot = DialogRoot;
|
|
126
|
+
exports.DialogTitle = DialogTitle;
|
|
127
|
+
exports.DialogTrigger = DialogTrigger;
|
|
128
|
+
exports.DialogViewport = DialogViewport;
|
|
129
|
+
|
|
130
|
+
//# sourceMappingURL=dialog.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.cjs","names":["BaseDialog","withRecipeClassName","dialog","cx"],"sources":["../../../src/components/dialog/dialog.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 { dialog } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\n\nexport type DialogSize = \"sm\" | \"md\" | \"lg\";\n\n/**\n * Groups the dialog parts. It supports Base UI's controlled open/onOpenChange\n * API and uncontrolled defaultOpen API.\n */\nexport type DialogRootProps<Payload = unknown> = BaseDialogRoot.Props<Payload>;\n\nexport function DialogRoot<Payload = unknown>(props: DialogRootProps<Payload>) {\n return <BaseDialog.Root {...props} />;\n}\n\nexport type DialogTriggerProps = ComponentPropsWithoutRef<typeof BaseDialog.Trigger>;\n\nexport const DialogTrigger = forwardRef<HTMLButtonElement, DialogTriggerProps>(\n function DialogTrigger({ className, ...props }, ref) {\n return (\n <BaseDialog.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().trigger, className)}\n data-slot=\"dialog-trigger\"\n />\n );\n },\n);\n\nexport type DialogPortalProps = ComponentPropsWithoutRef<typeof BaseDialog.Portal>;\n\n/**\n * Preserves Base UI's portal behavior and optional container/ref APIs.\n */\nexport const DialogPortal = BaseDialog.Portal;\n\nexport type DialogBackdropProps = ComponentPropsWithoutRef<typeof BaseDialog.Backdrop>;\n\nexport const DialogBackdrop = forwardRef<HTMLDivElement, DialogBackdropProps>(\n function DialogBackdrop({ className, ...props }, ref) {\n return (\n <BaseDialog.Backdrop\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().backdrop, className)}\n data-slot=\"dialog-backdrop\"\n />\n );\n },\n);\n\nexport type DialogViewportProps = ComponentPropsWithoutRef<typeof BaseDialog.Viewport>;\n\nexport const DialogViewport = forwardRef<HTMLDivElement, DialogViewportProps>(\n function DialogViewport({ className, ...props }, ref) {\n return (\n <BaseDialog.Viewport\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().viewport, className)}\n data-slot=\"dialog-viewport\"\n />\n );\n },\n);\n\nexport interface DialogPopupProps extends ComponentPropsWithoutRef<typeof BaseDialog.Popup> {\n size?: DialogSize;\n}\n\nexport const DialogPopup = forwardRef<HTMLDivElement, DialogPopupProps>(function DialogPopup(\n { className, size = \"md\", ...props },\n ref,\n) {\n return (\n <BaseDialog.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog({ size }).popup, className)}\n data-jaci-component=\"dialog\"\n data-slot=\"dialog-popup\"\n />\n );\n});\n\nexport type DialogHeaderProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const DialogHeader = forwardRef<HTMLDivElement, DialogHeaderProps>(function DialogHeader(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dialog().header, className)}\n data-slot=\"dialog-header\"\n />\n );\n});\n\nexport type DialogTitleProps = ComponentPropsWithoutRef<typeof BaseDialog.Title>;\n\nexport const DialogTitle = forwardRef<HTMLHeadingElement, DialogTitleProps>(function DialogTitle(\n { className, ...props },\n ref,\n) {\n return (\n <BaseDialog.Title\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().title, className)}\n data-slot=\"dialog-title\"\n />\n );\n});\n\nexport type DialogDescriptionProps = ComponentPropsWithoutRef<typeof BaseDialog.Description>;\n\nexport const DialogDescription = forwardRef<HTMLParagraphElement, DialogDescriptionProps>(\n function DialogDescription({ className, ...props }, ref) {\n return (\n <BaseDialog.Description\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().description, className)}\n data-slot=\"dialog-description\"\n />\n );\n },\n);\n\nexport type DialogBodyProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const DialogBody = forwardRef<HTMLDivElement, DialogBodyProps>(function DialogBody(\n { className, ...props },\n ref,\n) {\n return (\n <div {...props} ref={ref} className={cx(dialog().body, className)} data-slot=\"dialog-body\" />\n );\n});\n\nexport type DialogFooterProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const DialogFooter = forwardRef<HTMLDivElement, DialogFooterProps>(function DialogFooter(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dialog().footer, className)}\n data-slot=\"dialog-footer\"\n />\n );\n});\n\nexport type DialogCloseProps = ComponentPropsWithoutRef<typeof BaseDialog.Close>;\n\nexport const DialogClose = forwardRef<HTMLButtonElement, DialogCloseProps>(function DialogClose(\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 dialog\")}\n ref={ref}\n className={withRecipeClassName(hasVisibleLabel ? dialog().action : dialog().close, className)}\n data-slot=\"dialog-close\"\n >\n {children ?? \"×\"}\n </BaseDialog.Close>\n );\n});\n\nexport const Dialog = {\n Root: DialogRoot,\n Trigger: DialogTrigger,\n Portal: DialogPortal,\n Backdrop: DialogBackdrop,\n Viewport: DialogViewport,\n Popup: DialogPopup,\n Header: DialogHeader,\n Title: DialogTitle,\n Description: DialogDescription,\n Body: DialogBody,\n Footer: DialogFooter,\n Close: DialogClose,\n createHandle: BaseDialog.createHandle,\n};\n"],"mappings":"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"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import { Dialog, DialogRoot } from "@base-ui/react/dialog";
|
|
3
|
+
//#region src/components/dialog/dialog.d.ts
|
|
4
|
+
type DialogSize = "sm" | "md" | "lg";
|
|
5
|
+
/**
|
|
6
|
+
* Groups the dialog parts. It supports Base UI's controlled open/onOpenChange
|
|
7
|
+
* API and uncontrolled defaultOpen API.
|
|
8
|
+
*/
|
|
9
|
+
type DialogRootProps<Payload = unknown> = DialogRoot.Props<Payload>;
|
|
10
|
+
declare function DialogRoot$1<Payload = unknown>(props: DialogRootProps<Payload>): import("react").JSX.Element;
|
|
11
|
+
type DialogTriggerProps = ComponentPropsWithoutRef<typeof Dialog.Trigger>;
|
|
12
|
+
declare const DialogTrigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogTriggerProps<unknown> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
type DialogPortalProps = ComponentPropsWithoutRef<typeof Dialog.Portal>;
|
|
14
|
+
/**
|
|
15
|
+
* Preserves Base UI's portal behavior and optional container/ref APIs.
|
|
16
|
+
*/
|
|
17
|
+
declare const DialogPortal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
type DialogBackdropProps = ComponentPropsWithoutRef<typeof Dialog.Backdrop>;
|
|
19
|
+
declare const DialogBackdrop: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogBackdropProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
|
+
type DialogViewportProps = ComponentPropsWithoutRef<typeof Dialog.Viewport>;
|
|
21
|
+
declare const DialogViewport: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogViewportProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
+
interface DialogPopupProps extends ComponentPropsWithoutRef<typeof Dialog.Popup> {
|
|
23
|
+
size?: DialogSize;
|
|
24
|
+
}
|
|
25
|
+
declare const DialogPopup: import("react").ForwardRefExoticComponent<DialogPopupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
26
|
+
type DialogHeaderProps = ComponentPropsWithoutRef<"div">;
|
|
27
|
+
declare const DialogHeader: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
|
+
type DialogTitleProps = ComponentPropsWithoutRef<typeof Dialog.Title>;
|
|
29
|
+
declare const DialogTitle: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogTitleProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
30
|
+
type DialogDescriptionProps = ComponentPropsWithoutRef<typeof Dialog.Description>;
|
|
31
|
+
declare const DialogDescription: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogDescriptionProps, "ref"> & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
32
|
+
type DialogBodyProps = ComponentPropsWithoutRef<"div">;
|
|
33
|
+
declare const DialogBody: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
|
+
type DialogFooterProps = ComponentPropsWithoutRef<"div">;
|
|
35
|
+
declare const DialogFooter: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
36
|
+
type DialogCloseProps = ComponentPropsWithoutRef<typeof Dialog.Close>;
|
|
37
|
+
declare const DialogClose: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
38
|
+
declare const Dialog$1: {
|
|
39
|
+
Root: typeof DialogRoot$1;
|
|
40
|
+
Trigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogTriggerProps<unknown> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
41
|
+
Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
42
|
+
Backdrop: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogBackdropProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
43
|
+
Viewport: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogViewportProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
44
|
+
Popup: import("react").ForwardRefExoticComponent<DialogPopupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
45
|
+
Header: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
46
|
+
Title: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogTitleProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
47
|
+
Description: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogDescriptionProps, "ref"> & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
48
|
+
Body: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
49
|
+
Footer: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
50
|
+
Close: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
51
|
+
createHandle: typeof Dialog.createHandle;
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { Dialog$1 as Dialog, DialogBackdrop, DialogBackdropProps, DialogBody, DialogBodyProps, DialogClose, DialogCloseProps, DialogDescription, DialogDescriptionProps, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogPopup, DialogPopupProps, DialogPortal, DialogPortalProps, DialogRoot$1 as DialogRoot, DialogRootProps, DialogSize, DialogTitle, DialogTitleProps, DialogTrigger, DialogTriggerProps, DialogViewport, DialogViewportProps };
|
|
55
|
+
//# sourceMappingURL=dialog.d.cts.map
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { ComponentPropsWithoutRef } from "react";
|
|
2
|
+
import { Dialog, DialogRoot } from "@base-ui/react/dialog";
|
|
3
|
+
//#region src/components/dialog/dialog.d.ts
|
|
4
|
+
type DialogSize = "sm" | "md" | "lg";
|
|
5
|
+
/**
|
|
6
|
+
* Groups the dialog parts. It supports Base UI's controlled open/onOpenChange
|
|
7
|
+
* API and uncontrolled defaultOpen API.
|
|
8
|
+
*/
|
|
9
|
+
type DialogRootProps<Payload = unknown> = DialogRoot.Props<Payload>;
|
|
10
|
+
declare function DialogRoot$1<Payload = unknown>(props: DialogRootProps<Payload>): import("react").JSX.Element;
|
|
11
|
+
type DialogTriggerProps = ComponentPropsWithoutRef<typeof Dialog.Trigger>;
|
|
12
|
+
declare const DialogTrigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogTriggerProps<unknown> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
13
|
+
type DialogPortalProps = ComponentPropsWithoutRef<typeof Dialog.Portal>;
|
|
14
|
+
/**
|
|
15
|
+
* Preserves Base UI's portal behavior and optional container/ref APIs.
|
|
16
|
+
*/
|
|
17
|
+
declare const DialogPortal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
18
|
+
type DialogBackdropProps = ComponentPropsWithoutRef<typeof Dialog.Backdrop>;
|
|
19
|
+
declare const DialogBackdrop: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogBackdropProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
20
|
+
type DialogViewportProps = ComponentPropsWithoutRef<typeof Dialog.Viewport>;
|
|
21
|
+
declare const DialogViewport: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogViewportProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
22
|
+
interface DialogPopupProps extends ComponentPropsWithoutRef<typeof Dialog.Popup> {
|
|
23
|
+
size?: DialogSize;
|
|
24
|
+
}
|
|
25
|
+
declare const DialogPopup: import("react").ForwardRefExoticComponent<DialogPopupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
26
|
+
type DialogHeaderProps = ComponentPropsWithoutRef<"div">;
|
|
27
|
+
declare const DialogHeader: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
28
|
+
type DialogTitleProps = ComponentPropsWithoutRef<typeof Dialog.Title>;
|
|
29
|
+
declare const DialogTitle: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogTitleProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
30
|
+
type DialogDescriptionProps = ComponentPropsWithoutRef<typeof Dialog.Description>;
|
|
31
|
+
declare const DialogDescription: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogDescriptionProps, "ref"> & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
32
|
+
type DialogBodyProps = ComponentPropsWithoutRef<"div">;
|
|
33
|
+
declare const DialogBody: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
34
|
+
type DialogFooterProps = ComponentPropsWithoutRef<"div">;
|
|
35
|
+
declare const DialogFooter: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
36
|
+
type DialogCloseProps = ComponentPropsWithoutRef<typeof Dialog.Close>;
|
|
37
|
+
declare const DialogClose: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
38
|
+
declare const Dialog$1: {
|
|
39
|
+
Root: typeof DialogRoot$1;
|
|
40
|
+
Trigger: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").DialogTriggerProps<unknown> & import("react").RefAttributes<HTMLElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
41
|
+
Portal: import("react").ForwardRefExoticComponent<Omit<import("@base-ui/react").AlertDialogPortalProps, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
42
|
+
Backdrop: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogBackdropProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
43
|
+
Viewport: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogViewportProps, "ref"> & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
44
|
+
Popup: import("react").ForwardRefExoticComponent<DialogPopupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
45
|
+
Header: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
46
|
+
Title: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogTitleProps, "ref"> & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
47
|
+
Description: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogDescriptionProps, "ref"> & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
48
|
+
Body: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
49
|
+
Footer: import("react").ForwardRefExoticComponent<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
50
|
+
Close: import("react").ForwardRefExoticComponent<Omit<Omit<import("@base-ui/react").AlertDialogCloseProps, "ref"> & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
51
|
+
createHandle: typeof Dialog.createHandle;
|
|
52
|
+
};
|
|
53
|
+
//#endregion
|
|
54
|
+
export { Dialog$1 as Dialog, DialogBackdrop, DialogBackdropProps, DialogBody, DialogBodyProps, DialogClose, DialogCloseProps, DialogDescription, DialogDescriptionProps, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogPopup, DialogPopupProps, DialogPortal, DialogPortalProps, DialogRoot$1 as DialogRoot, DialogRootProps, DialogSize, DialogTitle, DialogTitleProps, DialogTrigger, DialogTriggerProps, DialogViewport, DialogViewportProps };
|
|
55
|
+
//# sourceMappingURL=dialog.d.ts.map
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cx } from "../../styled-system/css/cx.js";
|
|
3
|
+
import { withRecipeClassName } from "../base-ui.js";
|
|
4
|
+
import { dialog } from "../../styled-system/recipes/dialog.js";
|
|
5
|
+
import { forwardRef } from "react";
|
|
6
|
+
import { jsx } from "react/jsx-runtime";
|
|
7
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
8
|
+
//#region src/components/dialog/dialog.tsx
|
|
9
|
+
function DialogRoot$1(props) {
|
|
10
|
+
return /* @__PURE__ */ jsx(Dialog.Root, { ...props });
|
|
11
|
+
}
|
|
12
|
+
const DialogTrigger = forwardRef(function DialogTrigger({ className, ...props }, ref) {
|
|
13
|
+
return /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
14
|
+
...props,
|
|
15
|
+
ref,
|
|
16
|
+
className: withRecipeClassName(dialog().trigger, className),
|
|
17
|
+
"data-slot": "dialog-trigger"
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
/**
|
|
21
|
+
* Preserves Base UI's portal behavior and optional container/ref APIs.
|
|
22
|
+
*/
|
|
23
|
+
const DialogPortal = Dialog.Portal;
|
|
24
|
+
const DialogBackdrop = forwardRef(function DialogBackdrop({ className, ...props }, ref) {
|
|
25
|
+
return /* @__PURE__ */ jsx(Dialog.Backdrop, {
|
|
26
|
+
...props,
|
|
27
|
+
ref,
|
|
28
|
+
className: withRecipeClassName(dialog().backdrop, className),
|
|
29
|
+
"data-slot": "dialog-backdrop"
|
|
30
|
+
});
|
|
31
|
+
});
|
|
32
|
+
const DialogViewport = forwardRef(function DialogViewport({ className, ...props }, ref) {
|
|
33
|
+
return /* @__PURE__ */ jsx(Dialog.Viewport, {
|
|
34
|
+
...props,
|
|
35
|
+
ref,
|
|
36
|
+
className: withRecipeClassName(dialog().viewport, className),
|
|
37
|
+
"data-slot": "dialog-viewport"
|
|
38
|
+
});
|
|
39
|
+
});
|
|
40
|
+
const DialogPopup = forwardRef(function DialogPopup({ className, size = "md", ...props }, ref) {
|
|
41
|
+
return /* @__PURE__ */ jsx(Dialog.Popup, {
|
|
42
|
+
...props,
|
|
43
|
+
ref,
|
|
44
|
+
className: withRecipeClassName(dialog({ size }).popup, className),
|
|
45
|
+
"data-jaci-component": "dialog",
|
|
46
|
+
"data-slot": "dialog-popup"
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
const DialogHeader = forwardRef(function DialogHeader({ className, ...props }, ref) {
|
|
50
|
+
return /* @__PURE__ */ jsx("div", {
|
|
51
|
+
...props,
|
|
52
|
+
ref,
|
|
53
|
+
className: cx(dialog().header, className),
|
|
54
|
+
"data-slot": "dialog-header"
|
|
55
|
+
});
|
|
56
|
+
});
|
|
57
|
+
const DialogTitle = forwardRef(function DialogTitle({ className, ...props }, ref) {
|
|
58
|
+
return /* @__PURE__ */ jsx(Dialog.Title, {
|
|
59
|
+
...props,
|
|
60
|
+
ref,
|
|
61
|
+
className: withRecipeClassName(dialog().title, className),
|
|
62
|
+
"data-slot": "dialog-title"
|
|
63
|
+
});
|
|
64
|
+
});
|
|
65
|
+
const DialogDescription = forwardRef(function DialogDescription({ className, ...props }, ref) {
|
|
66
|
+
return /* @__PURE__ */ jsx(Dialog.Description, {
|
|
67
|
+
...props,
|
|
68
|
+
ref,
|
|
69
|
+
className: withRecipeClassName(dialog().description, className),
|
|
70
|
+
"data-slot": "dialog-description"
|
|
71
|
+
});
|
|
72
|
+
});
|
|
73
|
+
const DialogBody = forwardRef(function DialogBody({ className, ...props }, ref) {
|
|
74
|
+
return /* @__PURE__ */ jsx("div", {
|
|
75
|
+
...props,
|
|
76
|
+
ref,
|
|
77
|
+
className: cx(dialog().body, className),
|
|
78
|
+
"data-slot": "dialog-body"
|
|
79
|
+
});
|
|
80
|
+
});
|
|
81
|
+
const DialogFooter = forwardRef(function DialogFooter({ className, ...props }, ref) {
|
|
82
|
+
return /* @__PURE__ */ jsx("div", {
|
|
83
|
+
...props,
|
|
84
|
+
ref,
|
|
85
|
+
className: cx(dialog().footer, className),
|
|
86
|
+
"data-slot": "dialog-footer"
|
|
87
|
+
});
|
|
88
|
+
});
|
|
89
|
+
const DialogClose = forwardRef(function DialogClose({ "aria-label": ariaLabel, children, className, ...props }, ref) {
|
|
90
|
+
const hasVisibleLabel = children != null;
|
|
91
|
+
return /* @__PURE__ */ jsx(Dialog.Close, {
|
|
92
|
+
...props,
|
|
93
|
+
"aria-label": ariaLabel ?? (hasVisibleLabel ? void 0 : "Close dialog"),
|
|
94
|
+
ref,
|
|
95
|
+
className: withRecipeClassName(hasVisibleLabel ? dialog().action : dialog().close, className),
|
|
96
|
+
"data-slot": "dialog-close",
|
|
97
|
+
children: children ?? "×"
|
|
98
|
+
});
|
|
99
|
+
});
|
|
100
|
+
const Dialog$1 = {
|
|
101
|
+
Root: DialogRoot$1,
|
|
102
|
+
Trigger: DialogTrigger,
|
|
103
|
+
Portal: DialogPortal,
|
|
104
|
+
Backdrop: DialogBackdrop,
|
|
105
|
+
Viewport: DialogViewport,
|
|
106
|
+
Popup: DialogPopup,
|
|
107
|
+
Header: DialogHeader,
|
|
108
|
+
Title: DialogTitle,
|
|
109
|
+
Description: DialogDescription,
|
|
110
|
+
Body: DialogBody,
|
|
111
|
+
Footer: DialogFooter,
|
|
112
|
+
Close: DialogClose,
|
|
113
|
+
createHandle: Dialog.createHandle
|
|
114
|
+
};
|
|
115
|
+
//#endregion
|
|
116
|
+
export { Dialog$1 as Dialog, DialogBackdrop, DialogBody, DialogClose, DialogDescription, DialogFooter, DialogHeader, DialogPopup, DialogPortal, DialogRoot$1 as DialogRoot, DialogTitle, DialogTrigger, DialogViewport };
|
|
117
|
+
|
|
118
|
+
//# sourceMappingURL=dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dialog.js","names":["DialogRoot","BaseDialog","Dialog"],"sources":["../../../src/components/dialog/dialog.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 { dialog } from \"../../styled-system/recipes\";\nimport { withRecipeClassName } from \"../base-ui\";\n\nexport type DialogSize = \"sm\" | \"md\" | \"lg\";\n\n/**\n * Groups the dialog parts. It supports Base UI's controlled open/onOpenChange\n * API and uncontrolled defaultOpen API.\n */\nexport type DialogRootProps<Payload = unknown> = BaseDialogRoot.Props<Payload>;\n\nexport function DialogRoot<Payload = unknown>(props: DialogRootProps<Payload>) {\n return <BaseDialog.Root {...props} />;\n}\n\nexport type DialogTriggerProps = ComponentPropsWithoutRef<typeof BaseDialog.Trigger>;\n\nexport const DialogTrigger = forwardRef<HTMLButtonElement, DialogTriggerProps>(\n function DialogTrigger({ className, ...props }, ref) {\n return (\n <BaseDialog.Trigger\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().trigger, className)}\n data-slot=\"dialog-trigger\"\n />\n );\n },\n);\n\nexport type DialogPortalProps = ComponentPropsWithoutRef<typeof BaseDialog.Portal>;\n\n/**\n * Preserves Base UI's portal behavior and optional container/ref APIs.\n */\nexport const DialogPortal = BaseDialog.Portal;\n\nexport type DialogBackdropProps = ComponentPropsWithoutRef<typeof BaseDialog.Backdrop>;\n\nexport const DialogBackdrop = forwardRef<HTMLDivElement, DialogBackdropProps>(\n function DialogBackdrop({ className, ...props }, ref) {\n return (\n <BaseDialog.Backdrop\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().backdrop, className)}\n data-slot=\"dialog-backdrop\"\n />\n );\n },\n);\n\nexport type DialogViewportProps = ComponentPropsWithoutRef<typeof BaseDialog.Viewport>;\n\nexport const DialogViewport = forwardRef<HTMLDivElement, DialogViewportProps>(\n function DialogViewport({ className, ...props }, ref) {\n return (\n <BaseDialog.Viewport\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().viewport, className)}\n data-slot=\"dialog-viewport\"\n />\n );\n },\n);\n\nexport interface DialogPopupProps extends ComponentPropsWithoutRef<typeof BaseDialog.Popup> {\n size?: DialogSize;\n}\n\nexport const DialogPopup = forwardRef<HTMLDivElement, DialogPopupProps>(function DialogPopup(\n { className, size = \"md\", ...props },\n ref,\n) {\n return (\n <BaseDialog.Popup\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog({ size }).popup, className)}\n data-jaci-component=\"dialog\"\n data-slot=\"dialog-popup\"\n />\n );\n});\n\nexport type DialogHeaderProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const DialogHeader = forwardRef<HTMLDivElement, DialogHeaderProps>(function DialogHeader(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dialog().header, className)}\n data-slot=\"dialog-header\"\n />\n );\n});\n\nexport type DialogTitleProps = ComponentPropsWithoutRef<typeof BaseDialog.Title>;\n\nexport const DialogTitle = forwardRef<HTMLHeadingElement, DialogTitleProps>(function DialogTitle(\n { className, ...props },\n ref,\n) {\n return (\n <BaseDialog.Title\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().title, className)}\n data-slot=\"dialog-title\"\n />\n );\n});\n\nexport type DialogDescriptionProps = ComponentPropsWithoutRef<typeof BaseDialog.Description>;\n\nexport const DialogDescription = forwardRef<HTMLParagraphElement, DialogDescriptionProps>(\n function DialogDescription({ className, ...props }, ref) {\n return (\n <BaseDialog.Description\n {...props}\n ref={ref}\n className={withRecipeClassName(dialog().description, className)}\n data-slot=\"dialog-description\"\n />\n );\n },\n);\n\nexport type DialogBodyProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const DialogBody = forwardRef<HTMLDivElement, DialogBodyProps>(function DialogBody(\n { className, ...props },\n ref,\n) {\n return (\n <div {...props} ref={ref} className={cx(dialog().body, className)} data-slot=\"dialog-body\" />\n );\n});\n\nexport type DialogFooterProps = ComponentPropsWithoutRef<\"div\">;\n\nexport const DialogFooter = forwardRef<HTMLDivElement, DialogFooterProps>(function DialogFooter(\n { className, ...props },\n ref,\n) {\n return (\n <div\n {...props}\n ref={ref}\n className={cx(dialog().footer, className)}\n data-slot=\"dialog-footer\"\n />\n );\n});\n\nexport type DialogCloseProps = ComponentPropsWithoutRef<typeof BaseDialog.Close>;\n\nexport const DialogClose = forwardRef<HTMLButtonElement, DialogCloseProps>(function DialogClose(\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 dialog\")}\n ref={ref}\n className={withRecipeClassName(hasVisibleLabel ? dialog().action : dialog().close, className)}\n data-slot=\"dialog-close\"\n >\n {children ?? \"×\"}\n </BaseDialog.Close>\n );\n});\n\nexport const Dialog = {\n Root: DialogRoot,\n Trigger: DialogTrigger,\n Portal: DialogPortal,\n Backdrop: DialogBackdrop,\n Viewport: DialogViewport,\n Popup: DialogPopup,\n Header: DialogHeader,\n Title: DialogTitle,\n Description: DialogDescription,\n Body: DialogBody,\n Footer: DialogFooter,\n Close: DialogClose,\n createHandle: BaseDialog.createHandle,\n};\n"],"mappings":"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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Dialog, DialogBackdrop, DialogBackdropProps, DialogBody, DialogBodyProps, DialogClose, DialogCloseProps, DialogDescription, DialogDescriptionProps, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogPopup, DialogPopupProps, DialogPortal, DialogPortalProps, DialogRoot, DialogRootProps, DialogSize, DialogTitle, DialogTitleProps, DialogTrigger, DialogTriggerProps, DialogViewport, DialogViewportProps } from "./dialog.cjs";
|
|
2
|
+
export { Dialog, DialogBackdrop, type DialogBackdropProps, DialogBody, type DialogBodyProps, DialogClose, type DialogCloseProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogPopup, type DialogPopupProps, DialogPortal, type DialogPortalProps, DialogRoot, type DialogRootProps, type DialogSize, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, DialogViewport, type DialogViewportProps };
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { Dialog, DialogBackdrop, DialogBackdropProps, DialogBody, DialogBodyProps, DialogClose, DialogCloseProps, DialogDescription, DialogDescriptionProps, DialogFooter, DialogFooterProps, DialogHeader, DialogHeaderProps, DialogPopup, DialogPopupProps, DialogPortal, DialogPortalProps, DialogRoot, DialogRootProps, DialogSize, DialogTitle, DialogTitleProps, DialogTrigger, DialogTriggerProps, DialogViewport, DialogViewportProps } from "./dialog.js";
|
|
2
|
+
export { Dialog, DialogBackdrop, type DialogBackdropProps, DialogBody, type DialogBodyProps, DialogClose, type DialogCloseProps, DialogDescription, type DialogDescriptionProps, DialogFooter, type DialogFooterProps, DialogHeader, type DialogHeaderProps, DialogPopup, type DialogPopupProps, DialogPortal, type DialogPortalProps, DialogRoot, type DialogRootProps, type DialogSize, DialogTitle, type DialogTitleProps, DialogTrigger, type DialogTriggerProps, DialogViewport, type DialogViewportProps };
|