@archytechtor/ui 0.0.0-stage → 0.2.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/README.md +105 -2
- package/dist/components/accordion/accordion.d.ts +25 -0
- package/dist/components/accordion/accordion.js +88 -0
- package/dist/components/accordion/index.d.ts +3 -0
- package/dist/components/accordion/index.js +1 -0
- package/dist/components/accordion/types.d.ts +39 -0
- package/dist/components/alert/alert.d.ts +25 -0
- package/dist/components/alert/alert.js +59 -0
- package/dist/components/alert/index.d.ts +3 -0
- package/dist/components/alert/index.js +3 -0
- package/dist/components/alert/types.d.ts +32 -0
- package/dist/components/alert/types.js +19 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +73 -0
- package/dist/components/alert-dialog/alert-dialog.js +170 -0
- package/dist/components/alert-dialog/index.d.ts +3 -0
- package/dist/components/alert-dialog/index.js +1 -0
- package/dist/components/alert-dialog/types.d.ts +80 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +8 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +20 -0
- package/dist/components/aspect-ratio/index.d.ts +3 -0
- package/dist/components/aspect-ratio/index.js +1 -0
- package/dist/components/aspect-ratio/types.d.ts +8 -0
- package/dist/components/attachment/attachment.d.ts +57 -0
- package/dist/components/attachment/attachment.js +139 -0
- package/dist/components/attachment/index.d.ts +3 -0
- package/dist/components/attachment/index.js +3 -0
- package/dist/components/attachment/types.d.ts +79 -0
- package/dist/components/attachment/types.js +43 -0
- package/dist/components/avatar/avatar.d.ts +39 -0
- package/dist/components/avatar/avatar.js +88 -0
- package/dist/components/avatar/index.d.ts +3 -0
- package/dist/components/avatar/index.js +3 -0
- package/dist/components/avatar/types.d.ts +54 -0
- package/dist/components/avatar/types.js +21 -0
- package/dist/components/badge/badge.d.ts +7 -0
- package/dist/components/badge/badge.js +23 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.js +3 -0
- package/dist/components/badge/types.d.ts +21 -0
- package/dist/components/badge/types.js +26 -0
- package/dist/components/bottom-nav/bottom-nav.d.ts +19 -0
- package/dist/components/bottom-nav/bottom-nav.js +59 -0
- package/dist/components/bottom-nav/index.d.ts +3 -0
- package/dist/components/bottom-nav/index.js +3 -0
- package/dist/components/bottom-nav/types.d.ts +45 -0
- package/dist/components/bottom-nav/types.js +44 -0
- package/dist/components/box/box.d.ts +7 -0
- package/dist/components/box/box.js +26 -0
- package/dist/components/box/index.d.ts +3 -0
- package/dist/components/box/index.js +3 -0
- package/dist/components/box/types.d.ts +23 -0
- package/dist/components/box/types.js +27 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +43 -0
- package/dist/components/breadcrumb/breadcrumb.js +115 -0
- package/dist/components/breadcrumb/index.d.ts +3 -0
- package/dist/components/breadcrumb/index.js +1 -0
- package/dist/components/breadcrumb/types.d.ts +36 -0
- package/dist/components/bubble/bubble.d.ts +25 -0
- package/dist/components/bubble/bubble.js +69 -0
- package/dist/components/bubble/index.d.ts +3 -0
- package/dist/components/bubble/index.js +3 -0
- package/dist/components/bubble/types.d.ts +51 -0
- package/dist/components/bubble/types.js +60 -0
- package/dist/components/button/button.d.ts +7 -0
- package/dist/components/button/button.js +155 -0
- package/dist/components/button/index.d.ts +4 -0
- package/dist/components/button/index.js +4 -0
- package/dist/components/button/types.d.ts +80 -0
- package/dist/components/button/types.js +99 -0
- package/dist/components/button/use-hold-to-confirm.d.ts +25 -0
- package/dist/components/button/use-hold-to-confirm.js +161 -0
- package/dist/components/button-group/button-group.d.ts +20 -0
- package/dist/components/button-group/button-group.js +62 -0
- package/dist/components/button-group/index.d.ts +3 -0
- package/dist/components/button-group/index.js +3 -0
- package/dist/components/button-group/types.d.ts +30 -0
- package/dist/components/button-group/types.js +19 -0
- package/dist/components/calendar/calendar.d.ts +15 -0
- package/dist/components/calendar/calendar.js +157 -0
- package/dist/components/calendar/index.d.ts +3 -0
- package/dist/components/calendar/index.js +1 -0
- package/dist/components/calendar/types.d.ts +21 -0
- package/dist/components/card/card.d.ts +43 -0
- package/dist/components/card/card.js +97 -0
- package/dist/components/card/index.d.ts +3 -0
- package/dist/components/card/index.js +3 -0
- package/dist/components/card/types.d.ts +44 -0
- package/dist/components/card/types.js +19 -0
- package/dist/components/carousel/carousel.d.ts +36 -0
- package/dist/components/carousel/carousel.js +190 -0
- package/dist/components/carousel/index.d.ts +3 -0
- package/dist/components/carousel/index.js +1 -0
- package/dist/components/carousel/types.d.ts +79 -0
- package/dist/components/chart/chart.d.ts +35 -0
- package/dist/components/chart/chart.js +212 -0
- package/dist/components/chart/index.d.ts +3 -0
- package/dist/components/chart/index.js +1 -0
- package/dist/components/chart/types.d.ts +89 -0
- package/dist/components/chart/types.js +7 -0
- package/dist/components/checkbox/checkbox.d.ts +7 -0
- package/dist/components/checkbox/checkbox.js +31 -0
- package/dist/components/checkbox/index.d.ts +3 -0
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/checkbox/types.d.ts +25 -0
- package/dist/components/code-block/code-block.d.ts +49 -0
- package/dist/components/code-block/code-block.js +188 -0
- package/dist/components/code-block/highlighter.d.ts +15 -0
- package/dist/components/code-block/highlighter.js +123 -0
- package/dist/components/code-block/index.d.ts +5 -0
- package/dist/components/code-block/index.js +5 -0
- package/dist/components/code-block/types.d.ts +94 -0
- package/dist/components/code-block/types.js +38 -0
- package/dist/components/code-block/use-highlighted-code.d.ts +9 -0
- package/dist/components/code-block/use-highlighted-code.js +67 -0
- package/dist/components/collapsible/collapsible.d.ts +19 -0
- package/dist/components/collapsible/collapsible.js +44 -0
- package/dist/components/collapsible/index.d.ts +3 -0
- package/dist/components/collapsible/index.js +1 -0
- package/dist/components/collapsible/types.d.ts +26 -0
- package/dist/components/combobox/combobox.d.ts +104 -0
- package/dist/components/combobox/combobox.js +365 -0
- package/dist/components/combobox/index.d.ts +3 -0
- package/dist/components/combobox/index.js +1 -0
- package/dist/components/combobox/types.d.ts +229 -0
- package/dist/components/command/command.d.ts +55 -0
- package/dist/components/command/command.js +179 -0
- package/dist/components/command/index.d.ts +3 -0
- package/dist/components/command/index.js +1 -0
- package/dist/components/command/types.d.ts +69 -0
- package/dist/components/context-menu/context-menu.d.ts +92 -0
- package/dist/components/context-menu/context-menu.js +270 -0
- package/dist/components/context-menu/index.d.ts +3 -0
- package/dist/components/context-menu/index.js +1 -0
- package/dist/components/context-menu/types.d.ts +138 -0
- package/dist/components/data-table/data-table-features.d.ts +21 -0
- package/dist/components/data-table/data-table-features.js +22 -0
- package/dist/components/data-table/data-table.d.ts +69 -0
- package/dist/components/data-table/data-table.js +283 -0
- package/dist/components/data-table/index.d.ts +4 -0
- package/dist/components/data-table/index.js +3 -0
- package/dist/components/data-table/types.d.ts +63 -0
- package/dist/components/date-input/date-input.d.ts +7 -0
- package/dist/components/date-input/date-input.js +147 -0
- package/dist/components/date-input/index.d.ts +3 -0
- package/dist/components/date-input/index.js +1 -0
- package/dist/components/date-input/types.d.ts +27 -0
- package/dist/components/date-picker/date-picker.d.ts +7 -0
- package/dist/components/date-picker/date-picker.js +74 -0
- package/dist/components/date-picker/index.d.ts +3 -0
- package/dist/components/date-picker/index.js +1 -0
- package/dist/components/date-picker/types.d.ts +38 -0
- package/dist/components/date-range-picker/date-range-picker.d.ts +7 -0
- package/dist/components/date-range-picker/date-range-picker.js +89 -0
- package/dist/components/date-range-picker/index.d.ts +3 -0
- package/dist/components/date-range-picker/index.js +1 -0
- package/dist/components/date-range-picker/types.d.ts +43 -0
- package/dist/components/dialog/dialog.d.ts +61 -0
- package/dist/components/dialog/dialog.js +160 -0
- package/dist/components/dialog/index.d.ts +3 -0
- package/dist/components/dialog/index.js +1 -0
- package/dist/components/dialog/types.d.ts +68 -0
- package/dist/components/drawer/drawer.d.ts +69 -0
- package/dist/components/drawer/drawer.js +245 -0
- package/dist/components/drawer/index.d.ts +3 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/drawer/types.d.ts +93 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +92 -0
- package/dist/components/dropdown-menu/dropdown-menu.js +268 -0
- package/dist/components/dropdown-menu/index.d.ts +3 -0
- package/dist/components/dropdown-menu/index.js +1 -0
- package/dist/components/dropdown-menu/types.d.ts +143 -0
- package/dist/components/empty/empty.d.ts +37 -0
- package/dist/components/empty/empty.js +84 -0
- package/dist/components/empty/index.d.ts +3 -0
- package/dist/components/empty/index.js +3 -0
- package/dist/components/empty/types.d.ts +39 -0
- package/dist/components/empty/types.js +13 -0
- package/dist/components/expanded-card/expanded-card.d.ts +43 -0
- package/dist/components/expanded-card/expanded-card.js +352 -0
- package/dist/components/expanded-card/index.d.ts +3 -0
- package/dist/components/expanded-card/index.js +1 -0
- package/dist/components/expanded-card/types.d.ts +52 -0
- package/dist/components/field/field.d.ts +62 -0
- package/dist/components/field/field.js +173 -0
- package/dist/components/field/index.d.ts +3 -0
- package/dist/components/field/index.js +3 -0
- package/dist/components/field/types.d.ts +81 -0
- package/dist/components/field/types.js +21 -0
- package/dist/components/form/form.d.ts +49 -0
- package/dist/components/form/form.js +136 -0
- package/dist/components/form/index.d.ts +3 -0
- package/dist/components/form/index.js +1 -0
- package/dist/components/form/types.d.ts +59 -0
- package/dist/components/grid/grid.d.ts +7 -0
- package/dist/components/grid/grid.js +36 -0
- package/dist/components/grid/index.d.ts +3 -0
- package/dist/components/grid/index.js +3 -0
- package/dist/components/grid/types.d.ts +35 -0
- package/dist/components/grid/types.js +102 -0
- package/dist/components/hover-card/hover-card.d.ts +19 -0
- package/dist/components/hover-card/hover-card.js +63 -0
- package/dist/components/hover-card/index.d.ts +3 -0
- package/dist/components/hover-card/index.js +1 -0
- package/dist/components/hover-card/types.d.ts +27 -0
- package/dist/components/image-gallery/image-gallery.d.ts +8 -0
- package/dist/components/image-gallery/image-gallery.js +294 -0
- package/dist/components/image-gallery/index.d.ts +4 -0
- package/dist/components/image-gallery/index.js +3 -0
- package/dist/components/image-gallery/masonry.d.ts +11 -0
- package/dist/components/image-gallery/masonry.js +62 -0
- package/dist/components/image-gallery/types.d.ts +80 -0
- package/dist/components/input/index.d.ts +3 -0
- package/dist/components/input/index.js +1 -0
- package/dist/components/input/input.d.ts +7 -0
- package/dist/components/input/input.js +18 -0
- package/dist/components/input/types.d.ts +28 -0
- package/dist/components/input-group/index.d.ts +3 -0
- package/dist/components/input-group/index.js +3 -0
- package/dist/components/input-group/input-group.d.ts +37 -0
- package/dist/components/input-group/input-group.js +103 -0
- package/dist/components/input-group/types.d.ts +64 -0
- package/dist/components/input-group/types.js +31 -0
- package/dist/components/input-otp/index.d.ts +3 -0
- package/dist/components/input-otp/index.js +1 -0
- package/dist/components/input-otp/input-otp.d.ts +25 -0
- package/dist/components/input-otp/input-otp.js +76 -0
- package/dist/components/input-otp/types.d.ts +43 -0
- package/dist/components/item/index.d.ts +3 -0
- package/dist/components/item/index.js +3 -0
- package/dist/components/item/item.d.ts +61 -0
- package/dist/components/item/item.js +149 -0
- package/dist/components/item/types.d.ts +75 -0
- package/dist/components/item/types.js +48 -0
- package/dist/components/kbd/index.d.ts +3 -0
- package/dist/components/kbd/index.js +1 -0
- package/dist/components/kbd/kbd.d.ts +13 -0
- package/dist/components/kbd/kbd.js +30 -0
- package/dist/components/kbd/types.d.ts +9 -0
- package/dist/components/label/index.d.ts +3 -0
- package/dist/components/label/index.js +1 -0
- package/dist/components/label/label.d.ts +7 -0
- package/dist/components/label/label.js +17 -0
- package/dist/components/label/types.d.ts +8 -0
- package/dist/components/loader/index.d.ts +3 -0
- package/dist/components/loader/index.js +3 -0
- package/dist/components/loader/loader.d.ts +8 -0
- package/dist/components/loader/loader.js +386 -0
- package/dist/components/loader/types.d.ts +27 -0
- package/dist/components/loader/types.js +58 -0
- package/dist/components/marker/index.d.ts +3 -0
- package/dist/components/marker/index.js +3 -0
- package/dist/components/marker/marker.d.ts +19 -0
- package/dist/components/marker/marker.js +51 -0
- package/dist/components/marker/types.d.ts +30 -0
- package/dist/components/marker/types.js +16 -0
- package/dist/components/menubar/index.d.ts +3 -0
- package/dist/components/menubar/index.js +1 -0
- package/dist/components/menubar/menubar.d.ts +98 -0
- package/dist/components/menubar/menubar.js +284 -0
- package/dist/components/menubar/types.d.ts +146 -0
- package/dist/components/message/index.d.ts +3 -0
- package/dist/components/message/index.js +1 -0
- package/dist/components/message/message.d.ts +37 -0
- package/dist/components/message/message.js +83 -0
- package/dist/components/message/types.d.ts +32 -0
- package/dist/components/message-scroller/index.d.ts +4 -0
- package/dist/components/message-scroller/index.js +3 -0
- package/dist/components/message-scroller/message-scroller-primitive.d.ts +21 -0
- package/dist/components/message-scroller/message-scroller-primitive.js +1349 -0
- package/dist/components/message-scroller/message-scroller.d.ts +39 -0
- package/dist/components/message-scroller/message-scroller.js +103 -0
- package/dist/components/message-scroller/types.d.ts +107 -0
- package/dist/components/money-input/index.d.ts +3 -0
- package/dist/components/money-input/index.js +1 -0
- package/dist/components/money-input/money-input.d.ts +7 -0
- package/dist/components/money-input/money-input.js +143 -0
- package/dist/components/money-input/types.d.ts +20 -0
- package/dist/components/morph-image/index.d.ts +3 -0
- package/dist/components/morph-image/index.js +3 -0
- package/dist/components/morph-image/morph-image.d.ts +8 -0
- package/dist/components/morph-image/morph-image.js +155 -0
- package/dist/components/morph-image/types.d.ts +38 -0
- package/dist/components/morph-image/types.js +18 -0
- package/dist/components/native-select/index.d.ts +3 -0
- package/dist/components/native-select/index.js +3 -0
- package/dist/components/native-select/native-select.d.ts +20 -0
- package/dist/components/native-select/native-select.js +57 -0
- package/dist/components/native-select/types.d.ts +52 -0
- package/dist/components/native-select/types.js +23 -0
- package/dist/components/navigation-menu/index.d.ts +3 -0
- package/dist/components/navigation-menu/index.js +3 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +50 -0
- package/dist/components/navigation-menu/navigation-menu.js +145 -0
- package/dist/components/navigation-menu/types.d.ts +79 -0
- package/dist/components/navigation-menu/types.js +15 -0
- package/dist/components/number-stepper/index.d.ts +3 -0
- package/dist/components/number-stepper/index.js +3 -0
- package/dist/components/number-stepper/number-stepper.d.ts +9 -0
- package/dist/components/number-stepper/number-stepper.js +223 -0
- package/dist/components/number-stepper/types.d.ts +47 -0
- package/dist/components/number-stepper/types.js +174 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/pagination/index.js +1 -0
- package/dist/components/pagination/pagination.d.ts +43 -0
- package/dist/components/pagination/pagination.js +121 -0
- package/dist/components/pagination/types.d.ts +37 -0
- package/dist/components/phone-input/index.d.ts +3 -0
- package/dist/components/phone-input/index.js +1 -0
- package/dist/components/phone-input/phone-input.d.ts +7 -0
- package/dist/components/phone-input/phone-input.js +54 -0
- package/dist/components/phone-input/types.d.ts +12 -0
- package/dist/components/popover/index.d.ts +3 -0
- package/dist/components/popover/index.js +1 -0
- package/dist/components/popover/popover.d.ts +37 -0
- package/dist/components/popover/popover.js +100 -0
- package/dist/components/popover/types.d.ts +51 -0
- package/dist/components/progress/index.d.ts +3 -0
- package/dist/components/progress/index.js +1 -0
- package/dist/components/progress/progress.d.ts +32 -0
- package/dist/components/progress/progress.js +100 -0
- package/dist/components/progress/types.d.ts +31 -0
- package/dist/components/questionnaire/index.d.ts +3 -0
- package/dist/components/questionnaire/index.js +1 -0
- package/dist/components/questionnaire/questionnaire-primitive.js +1563 -0
- package/dist/components/questionnaire/questionnaire.d.ts +91 -0
- package/dist/components/questionnaire/questionnaire.js +315 -0
- package/dist/components/questionnaire/types.d.ts +203 -0
- package/dist/components/radio-group/index.d.ts +3 -0
- package/dist/components/radio-group/index.js +1 -0
- package/dist/components/radio-group/radio-group.d.ts +13 -0
- package/dist/components/radio-group/radio-group.js +44 -0
- package/dist/components/radio-group/types.d.ts +33 -0
- package/dist/components/reorder-list/index.d.ts +3 -0
- package/dist/components/reorder-list/index.js +1 -0
- package/dist/components/reorder-list/reorder-list.d.ts +19 -0
- package/dist/components/reorder-list/reorder-list.js +279 -0
- package/dist/components/reorder-list/types.d.ts +65 -0
- package/dist/components/resizable/index.d.ts +3 -0
- package/dist/components/resizable/index.js +1 -0
- package/dist/components/resizable/resizable.d.ts +19 -0
- package/dist/components/resizable/resizable.js +44 -0
- package/dist/components/resizable/types.d.ts +89 -0
- package/dist/components/scroll-area/index.d.ts +3 -0
- package/dist/components/scroll-area/index.js +1 -0
- package/dist/components/scroll-area/scroll-area.d.ts +13 -0
- package/dist/components/scroll-area/scroll-area.js +47 -0
- package/dist/components/scroll-area/types.d.ts +19 -0
- package/dist/components/select/index.d.ts +3 -0
- package/dist/components/select/index.js +1 -0
- package/dist/components/select/select.d.ts +61 -0
- package/dist/components/select/select.js +183 -0
- package/dist/components/select/types.d.ts +100 -0
- package/dist/components/separator/index.d.ts +3 -0
- package/dist/components/separator/index.js +1 -0
- package/dist/components/separator/separator.d.ts +7 -0
- package/dist/components/separator/separator.js +20 -0
- package/dist/components/separator/types.d.ts +9 -0
- package/dist/components/sheet/index.d.ts +3 -0
- package/dist/components/sheet/index.js +1 -0
- package/dist/components/sheet/sheet.d.ts +61 -0
- package/dist/components/sheet/sheet.js +155 -0
- package/dist/components/sheet/types.d.ts +69 -0
- package/dist/components/sidebar/index.d.ts +3 -0
- package/dist/components/sidebar/index.js +3 -0
- package/dist/components/sidebar/sidebar.d.ts +145 -0
- package/dist/components/sidebar/sidebar.js +550 -0
- package/dist/components/sidebar/types.d.ts +186 -0
- package/dist/components/sidebar/types.js +42 -0
- package/dist/components/sidebar/use-mobile.js +21 -0
- package/dist/components/skeleton/index.d.ts +3 -0
- package/dist/components/skeleton/index.js +1 -0
- package/dist/components/skeleton/skeleton.d.ts +8 -0
- package/dist/components/skeleton/skeleton.js +18 -0
- package/dist/components/skeleton/types.d.ts +5 -0
- package/dist/components/slider/index.d.ts +3 -0
- package/dist/components/slider/index.js +1 -0
- package/dist/components/slider/slider.d.ts +7 -0
- package/dist/components/slider/slider.js +106 -0
- package/dist/components/slider/types.d.ts +39 -0
- package/dist/components/spinner/index.d.ts +3 -0
- package/dist/components/spinner/index.js +1 -0
- package/dist/components/spinner/spinner.d.ts +7 -0
- package/dist/components/spinner/spinner.js +21 -0
- package/dist/components/spinner/types.d.ts +8 -0
- package/dist/components/stack/index.d.ts +3 -0
- package/dist/components/stack/index.js +3 -0
- package/dist/components/stack/stack.d.ts +7 -0
- package/dist/components/stack/stack.js +29 -0
- package/dist/components/stack/types.d.ts +56 -0
- package/dist/components/stack/types.js +62 -0
- package/dist/components/statistics/index.d.ts +3 -0
- package/dist/components/statistics/index.js +3 -0
- package/dist/components/statistics/statistics.d.ts +31 -0
- package/dist/components/statistics/statistics.js +141 -0
- package/dist/components/statistics/types.d.ts +84 -0
- package/dist/components/statistics/types.js +27 -0
- package/dist/components/switch/index.d.ts +3 -0
- package/dist/components/switch/index.js +3 -0
- package/dist/components/switch/switch.d.ts +7 -0
- package/dist/components/switch/switch.js +32 -0
- package/dist/components/switch/types.d.ts +37 -0
- package/dist/components/switch/types.js +23 -0
- package/dist/components/table/index.d.ts +3 -0
- package/dist/components/table/index.js +1 -0
- package/dist/components/table/table.d.ts +49 -0
- package/dist/components/table/table.js +112 -0
- package/dist/components/table/types.d.ts +33 -0
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/tabs/index.js +3 -0
- package/dist/components/tabs/tabs.d.ts +25 -0
- package/dist/components/tabs/tabs.js +81 -0
- package/dist/components/tabs/types.d.ts +61 -0
- package/dist/components/tabs/types.js +18 -0
- package/dist/components/textarea/index.d.ts +3 -0
- package/dist/components/textarea/index.js +1 -0
- package/dist/components/textarea/textarea.d.ts +7 -0
- package/dist/components/textarea/textarea.js +17 -0
- package/dist/components/textarea/types.d.ts +26 -0
- package/dist/components/toast/index.d.ts +3 -0
- package/dist/components/toast/index.js +1 -0
- package/dist/components/toast/toast.d.ts +63 -0
- package/dist/components/toast/toast.js +321 -0
- package/dist/components/toast/types.d.ts +120 -0
- package/dist/components/toggle/index.d.ts +3 -0
- package/dist/components/toggle/index.js +3 -0
- package/dist/components/toggle/toggle.d.ts +7 -0
- package/dist/components/toggle/toggle.js +32 -0
- package/dist/components/toggle/types.d.ts +35 -0
- package/dist/components/toggle/types.js +37 -0
- package/dist/components/toggle-group/index.d.ts +3 -0
- package/dist/components/toggle-group/index.js +1 -0
- package/dist/components/toggle-group/toggle-group.d.ts +13 -0
- package/dist/components/toggle-group/toggle-group.js +88 -0
- package/dist/components/toggle-group/types.d.ts +52 -0
- package/dist/components/tooltip/index.d.ts +3 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/tooltip/tooltip.d.ts +25 -0
- package/dist/components/tooltip/tooltip.js +79 -0
- package/dist/components/tooltip/types.d.ts +48 -0
- package/dist/components/trace/index.d.ts +3 -0
- package/dist/components/trace/index.js +1 -0
- package/dist/components/trace/trace.d.ts +52 -0
- package/dist/components/trace/trace.js +132 -0
- package/dist/components/trace/types.d.ts +54 -0
- package/dist/components/typography/index.d.ts +3 -0
- package/dist/components/typography/index.js +3 -0
- package/dist/components/typography/types.d.ts +29 -0
- package/dist/components/typography/types.js +25 -0
- package/dist/components/typography/typography.d.ts +7 -0
- package/dist/components/typography/typography.js +40 -0
- package/dist/components/video-player/index.d.ts +6 -0
- package/dist/components/video-player/index.js +5 -0
- package/dist/components/video-player/types.d.ts +143 -0
- package/dist/components/video-player/use-video-player.js +319 -0
- package/dist/components/video-player/video-player-context.d.ts +45 -0
- package/dist/components/video-player/video-player-context.js +15 -0
- package/dist/components/video-player/video-player-controls.d.ts +38 -0
- package/dist/components/video-player/video-player-controls.js +226 -0
- package/dist/components/video-player/video-player-overlay.d.ts +13 -0
- package/dist/components/video-player/video-player-overlay.js +113 -0
- package/dist/components/video-player/video-player.d.ts +8 -0
- package/dist/components/video-player/video-player.js +139 -0
- package/dist/index.d.ts +259 -0
- package/dist/index.js +124 -0
- package/dist/lib/floating.d.ts +44 -0
- package/dist/lib/focus-source.js +51 -0
- package/dist/lib/format.d.ts +67 -0
- package/dist/lib/format.js +130 -0
- package/dist/lib/locale.d.ts +104 -0
- package/dist/lib/locale.js +103 -0
- package/dist/lib/part-props.d.ts +15 -0
- package/dist/lib/use-controllable-state.js +22 -0
- package/dist/lib/utils.d.ts +9 -0
- package/dist/lib/utils.js +16 -0
- package/dist/styles/index.css +128 -0
- package/dist/styles/theme.css +84 -0
- package/dist/styles/utilities.css +553 -0
- package/package.json +89 -3
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { texts } from "../../lib/locale.js";
|
|
4
|
+
import { Button } from "../button/button.js";
|
|
5
|
+
import { XIcon } from "lucide-react";
|
|
6
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
7
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
8
|
+
// src/components/dialog/dialog.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Диалог: окно поверх страницы, которое требует внимания пользователя
|
|
11
|
+
* @param props - пропсы диалога
|
|
12
|
+
* @returns корень диалога без своей разметки
|
|
13
|
+
*/
|
|
14
|
+
function Dialog$1({ onOpenChange, ...props }) {
|
|
15
|
+
/**
|
|
16
|
+
* Диалог открыли или закрыли: наружу только флаг
|
|
17
|
+
* @param open - открыт ли
|
|
18
|
+
*/
|
|
19
|
+
const handleOpenChange = (open) => onOpenChange?.(open);
|
|
20
|
+
return /* @__PURE__ */ jsx(Dialog.Root, {
|
|
21
|
+
"data-slot": "dialog",
|
|
22
|
+
onOpenChange: handleOpenChange,
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Кнопка открытия диалога. Свою кнопку — через render={<Button />}
|
|
28
|
+
* @param props - пропсы кнопки
|
|
29
|
+
* @returns кнопка с aria-haspopup="dialog"
|
|
30
|
+
*/
|
|
31
|
+
function DialogTrigger(props) {
|
|
32
|
+
return /* @__PURE__ */ jsx(Dialog.Trigger, {
|
|
33
|
+
"data-slot": "dialog-trigger",
|
|
34
|
+
...props
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Портал: переносит оверлей и окно в конец body
|
|
39
|
+
* @param props - пропсы портала
|
|
40
|
+
* @returns портал
|
|
41
|
+
*/
|
|
42
|
+
function DialogPortal(props) {
|
|
43
|
+
return /* @__PURE__ */ jsx(Dialog.Portal, {
|
|
44
|
+
"data-slot": "dialog-portal",
|
|
45
|
+
...props
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Кнопка закрытия диалога: любая кнопка внутри окна, которая закрывает его. Свою — через render={<Button />}
|
|
50
|
+
* @param props - пропсы кнопки
|
|
51
|
+
* @returns кнопка
|
|
52
|
+
*/
|
|
53
|
+
function DialogClose(props) {
|
|
54
|
+
return /* @__PURE__ */ jsx(Dialog.Close, {
|
|
55
|
+
"data-slot": "dialog-close",
|
|
56
|
+
...props
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Оверлей: затемняет и размывает страницу под диалогом
|
|
61
|
+
* @param props - пропсы оверлея
|
|
62
|
+
* @returns полупрозрачный слой на весь экран
|
|
63
|
+
*/
|
|
64
|
+
function DialogOverlay({ className, ...props }) {
|
|
65
|
+
const classes = cn("fixed", "inset-0", "isolate", "z-50", "bg-black/10", "duration-100", "supports-backdrop-filter:backdrop-blur-xs", "data-open:animate-in", "data-open:fade-in-0", "data-closed:animate-out", "data-closed:fade-out-0", className);
|
|
66
|
+
return /* @__PURE__ */ jsx(Dialog.Backdrop, {
|
|
67
|
+
"data-slot": "dialog-overlay",
|
|
68
|
+
className: classes,
|
|
69
|
+
...props
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Окно диалога: рендерится в портале поверх оверлея, по центру экрана
|
|
74
|
+
* @param props - пропсы окна
|
|
75
|
+
* @returns портал с оверлеем и окном
|
|
76
|
+
*/
|
|
77
|
+
function DialogContent({ className, children, showCloseButton = true, closeLabel = texts.close, ...props }) {
|
|
78
|
+
const classes = cn("fixed", "top-1/2", "left-1/2", "z-50", "grid", "w-full", "max-w-[calc(100%-2rem)]", "-translate-x-1/2", "-translate-y-1/2", "gap-4", "rounded-xl", "bg-popover", "p-4", "text-sm", "text-popover-foreground", "ring-1", "ring-foreground/10", "duration-100", "outline-none", "sm:max-w-sm", "data-open:animate-in", "data-open:fade-in-0", "data-open:zoom-in-95", "data-closed:animate-out", "data-closed:fade-out-0", "data-closed:zoom-out-95", className);
|
|
79
|
+
let closeButton = null;
|
|
80
|
+
if (showCloseButton) {
|
|
81
|
+
const closeRender = /* @__PURE__ */ jsx(Button, {
|
|
82
|
+
variant: "ghost",
|
|
83
|
+
size: "icon-sm",
|
|
84
|
+
className: "absolute top-2 right-2"
|
|
85
|
+
});
|
|
86
|
+
closeButton = /* @__PURE__ */ jsxs(Dialog.Close, {
|
|
87
|
+
"data-slot": "dialog-close",
|
|
88
|
+
render: closeRender,
|
|
89
|
+
children: [/* @__PURE__ */ jsx(XIcon, {}), /* @__PURE__ */ jsx("span", {
|
|
90
|
+
className: "sr-only",
|
|
91
|
+
children: closeLabel
|
|
92
|
+
})]
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
return /* @__PURE__ */ jsxs(DialogPortal, { children: [/* @__PURE__ */ jsx(DialogOverlay, {}), /* @__PURE__ */ jsxs(Dialog.Popup, {
|
|
96
|
+
"data-slot": "dialog-content",
|
|
97
|
+
className: classes,
|
|
98
|
+
...props,
|
|
99
|
+
children: [children, closeButton]
|
|
100
|
+
})] });
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Шапка диалога: заголовок и описание
|
|
104
|
+
* @param props - пропсы шапки
|
|
105
|
+
* @returns блок
|
|
106
|
+
*/
|
|
107
|
+
function DialogHeader({ className, ...props }) {
|
|
108
|
+
const classes = cn("flex", "flex-col", "gap-2", className);
|
|
109
|
+
return /* @__PURE__ */ jsx("div", {
|
|
110
|
+
"data-slot": "dialog-header",
|
|
111
|
+
className: classes,
|
|
112
|
+
...props
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Подвал диалога: кнопки действий, на узком экране — столбиком
|
|
117
|
+
* @param props - пропсы подвала
|
|
118
|
+
* @returns блок с серым фоном и разделителем
|
|
119
|
+
*/
|
|
120
|
+
function DialogFooter({ className, showCloseButton = false, closeLabel = texts.close, children, ...props }) {
|
|
121
|
+
const classes = cn("-mx-4", "-mb-4", "flex", "flex-col-reverse", "gap-2", "rounded-b-xl", "border-t", "bg-muted/50", "p-4", "sm:flex-row", "sm:justify-end", className);
|
|
122
|
+
let closeButton = null;
|
|
123
|
+
if (showCloseButton) closeButton = /* @__PURE__ */ jsx(Dialog.Close, {
|
|
124
|
+
render: /* @__PURE__ */ jsx(Button, { variant: "outline" }),
|
|
125
|
+
children: closeLabel
|
|
126
|
+
});
|
|
127
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
128
|
+
"data-slot": "dialog-footer",
|
|
129
|
+
className: classes,
|
|
130
|
+
...props,
|
|
131
|
+
children: [children, closeButton]
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
/**
|
|
135
|
+
* Заголовок диалога: озвучивается при открытии
|
|
136
|
+
* @param props - пропсы заголовка
|
|
137
|
+
* @returns h2
|
|
138
|
+
*/
|
|
139
|
+
function DialogTitle({ className, ...props }) {
|
|
140
|
+
const classes = cn("text-base", "leading-none", "font-medium", className);
|
|
141
|
+
return /* @__PURE__ */ jsx(Dialog.Title, {
|
|
142
|
+
"data-slot": "dialog-title",
|
|
143
|
+
className: classes,
|
|
144
|
+
...props
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* Описание диалога: озвучивается после заголовка
|
|
149
|
+
* @param props - пропсы описания
|
|
150
|
+
* @returns p
|
|
151
|
+
*/
|
|
152
|
+
function DialogDescription({ className, ...props }) {
|
|
153
|
+
const classes = cn("text-sm", "text-muted-foreground", "*:[a]:underline", "*:[a]:underline-offset-3", "*:[a]:hover:text-foreground", className);
|
|
154
|
+
return /* @__PURE__ */ jsx(Dialog.Description, {
|
|
155
|
+
"data-slot": "dialog-description",
|
|
156
|
+
className: classes,
|
|
157
|
+
...props
|
|
158
|
+
});
|
|
159
|
+
}
|
|
160
|
+
export { Dialog$1 as Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DialogClosePropsT, DialogContentPropsT, DialogDescriptionPropsT, DialogFooterPropsT, DialogHeaderPropsT, DialogOverlayPropsT, DialogPortalPropsT, DialogPropsT, DialogTitlePropsT, DialogTriggerPropsT } from "./types.js";
|
|
2
|
+
import { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./dialog.js";
|
|
3
|
+
export { Dialog, DialogClose, type DialogClosePropsT, DialogContent, type DialogContentPropsT, DialogDescription, type DialogDescriptionPropsT, DialogFooter, type DialogFooterPropsT, DialogHeader, type DialogHeaderPropsT, DialogOverlay, type DialogOverlayPropsT, DialogPortal, type DialogPortalPropsT, type DialogPropsT, DialogTitle, type DialogTitlePropsT, DialogTrigger, type DialogTriggerPropsT };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogOverlay, DialogPortal, DialogTitle, DialogTrigger } from "./dialog.js";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { PartPropsT } from "../../lib/part-props.js";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import { Dialog } from "@base-ui/react/dialog";
|
|
4
|
+
/**
|
|
5
|
+
* Пропсы диалога
|
|
6
|
+
*/
|
|
7
|
+
export type DialogPropsT = Omit<Dialog.Root.Props, 'onOpenChange'> & {
|
|
8
|
+
/** Диалог открыт — контролируемый режим, вместе с onOpenChange */
|
|
9
|
+
open?: boolean;
|
|
10
|
+
/** Диалог открыт при первом рендере — неконтролируемый режим */
|
|
11
|
+
defaultOpen?: boolean;
|
|
12
|
+
/** Диалог открыли или закрыли: новое состояние */
|
|
13
|
+
onOpenChange?: (open: boolean) => void;
|
|
14
|
+
/** Модальный режим: страница под диалогом недоступна, фокус заперт внутри. По умолчанию true */
|
|
15
|
+
modal?: boolean | 'trap-focus';
|
|
16
|
+
/** Не закрывать диалог нажатием вне окна */
|
|
17
|
+
disablePointerDismissal?: boolean;
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Пропсы кнопки открытия
|
|
21
|
+
*/
|
|
22
|
+
export type DialogTriggerPropsT = PartPropsT<Dialog.Trigger.Props>;
|
|
23
|
+
/**
|
|
24
|
+
* Пропсы портала
|
|
25
|
+
*/
|
|
26
|
+
export type DialogPortalPropsT = Dialog.Portal.Props;
|
|
27
|
+
/**
|
|
28
|
+
* Пропсы кнопки закрытия
|
|
29
|
+
*/
|
|
30
|
+
export type DialogClosePropsT = PartPropsT<Dialog.Close.Props>;
|
|
31
|
+
/**
|
|
32
|
+
* Пропсы оверлея
|
|
33
|
+
*/
|
|
34
|
+
export type DialogOverlayPropsT = PartPropsT<Dialog.Backdrop.Props>;
|
|
35
|
+
/**
|
|
36
|
+
* Пропсы окна диалога
|
|
37
|
+
*/
|
|
38
|
+
export type DialogContentPropsT = PartPropsT<Dialog.Popup.Props> & {
|
|
39
|
+
/** Показать кнопку-крестик в правом верхнем углу. По умолчанию true */
|
|
40
|
+
showCloseButton?: boolean;
|
|
41
|
+
/** Подпись крестика для скринридеров */
|
|
42
|
+
closeLabel?: string;
|
|
43
|
+
/** Куда перевести фокус при открытии: элемент или false — оставить на месте */
|
|
44
|
+
initialFocus?: Dialog.Popup.Props['initialFocus'];
|
|
45
|
+
/** Куда вернуть фокус при закрытии: элемент или false — никуда */
|
|
46
|
+
finalFocus?: Dialog.Popup.Props['finalFocus'];
|
|
47
|
+
};
|
|
48
|
+
/**
|
|
49
|
+
* Пропсы шапки
|
|
50
|
+
*/
|
|
51
|
+
export type DialogHeaderPropsT = ComponentProps<'div'>;
|
|
52
|
+
/**
|
|
53
|
+
* Пропсы подвала
|
|
54
|
+
*/
|
|
55
|
+
export type DialogFooterPropsT = ComponentProps<'div'> & {
|
|
56
|
+
/** Добавить в конец кнопку «Закрыть» */
|
|
57
|
+
showCloseButton?: boolean;
|
|
58
|
+
/** Текст кнопки «Закрыть» */
|
|
59
|
+
closeLabel?: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Пропсы заголовка
|
|
63
|
+
*/
|
|
64
|
+
export type DialogTitlePropsT = PartPropsT<Dialog.Title.Props>;
|
|
65
|
+
/**
|
|
66
|
+
* Пропсы описания
|
|
67
|
+
*/
|
|
68
|
+
export type DialogDescriptionPropsT = PartPropsT<Dialog.Description.Props>;
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { DrawerClosePropsT, DrawerContentPropsT, DrawerDescriptionPropsT, DrawerFooterPropsT, DrawerHeaderPropsT, DrawerOverlayPropsT, DrawerPortalPropsT, DrawerPropsT, DrawerSwipeHandlePropsT, DrawerTitlePropsT, DrawerTriggerPropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Шторка: выезжает с края экрана и закрывается свайпом. Шторка внутри шторки
|
|
4
|
+
* становится вложенной: предыдущие уходят назад стопкой
|
|
5
|
+
* @param props - пропсы шторки
|
|
6
|
+
* @returns корень шторки без своей разметки
|
|
7
|
+
*/
|
|
8
|
+
export declare function Drawer({ modal, showSwipeHandle, snapPoints, swipeDirection, onOpenChange, onSnapPointChange, ...props }: DrawerPropsT): import("react").JSX.Element;
|
|
9
|
+
/**
|
|
10
|
+
* Кнопка открытия шторки. Свою кнопку передают через render={<Button />}
|
|
11
|
+
* @param props - пропсы кнопки
|
|
12
|
+
* @returns кнопка
|
|
13
|
+
*/
|
|
14
|
+
export declare function DrawerTrigger(props: DrawerTriggerPropsT): import("react").JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* Портал: выносит шторку в конец body. DrawerContent рендерит его сам
|
|
17
|
+
* @param props - пропсы портала
|
|
18
|
+
* @returns портал
|
|
19
|
+
*/
|
|
20
|
+
export declare function DrawerPortal(props: DrawerPortalPropsT): import("react").JSX.Element;
|
|
21
|
+
/**
|
|
22
|
+
* Кнопка закрытия шторки. Свою кнопку передают через render={<Button />}
|
|
23
|
+
* @param props - пропсы кнопки
|
|
24
|
+
* @returns кнопка
|
|
25
|
+
*/
|
|
26
|
+
export declare function DrawerClose(props: DrawerClosePropsT): import("react").JSX.Element;
|
|
27
|
+
/**
|
|
28
|
+
* Затемнение под шторкой: светлеет вместе со свайпом. DrawerContent рендерит его сам в модальном режиме
|
|
29
|
+
* @param props - пропсы затемнения
|
|
30
|
+
* @returns слой на весь экран
|
|
31
|
+
*/
|
|
32
|
+
export declare function DrawerOverlay({ className, ...props }: DrawerOverlayPropsT): import("react").JSX.Element;
|
|
33
|
+
/**
|
|
34
|
+
* Ручка: полоска у края шторки, за которую её тянут. Показывается при showSwipeHandle
|
|
35
|
+
* @param props - пропсы ручки
|
|
36
|
+
* @returns полоска
|
|
37
|
+
*/
|
|
38
|
+
export declare function DrawerSwipeHandle({ className, ...props }: DrawerSwipeHandlePropsT): import("react").JSX.Element;
|
|
39
|
+
/**
|
|
40
|
+
* Окно шторки: рендерится в портале поверх затемнения. Содержимое скрывается,
|
|
41
|
+
* когда поверх открыта вложенная шторка
|
|
42
|
+
* @param props - пропсы окна
|
|
43
|
+
* @returns портал с затемнением и окном
|
|
44
|
+
*/
|
|
45
|
+
export declare function DrawerContent({ className, children, ...props }: DrawerContentPropsT): import("react").JSX.Element;
|
|
46
|
+
/**
|
|
47
|
+
* Шапка шторки: заголовок и описание. Снизу и сверху — по центру, на широком экране — слева
|
|
48
|
+
* @param props - пропсы шапки
|
|
49
|
+
* @returns блок
|
|
50
|
+
*/
|
|
51
|
+
export declare function DrawerHeader({ className, ...props }: DrawerHeaderPropsT): import("react").JSX.Element;
|
|
52
|
+
/**
|
|
53
|
+
* Подвал шторки: прижат к низу, кнопки столбиком
|
|
54
|
+
* @param props - пропсы подвала
|
|
55
|
+
* @returns блок
|
|
56
|
+
*/
|
|
57
|
+
export declare function DrawerFooter({ className, ...props }: DrawerFooterPropsT): import("react").JSX.Element;
|
|
58
|
+
/**
|
|
59
|
+
* Заголовок шторки: озвучивается при открытии
|
|
60
|
+
* @param props - пропсы заголовка
|
|
61
|
+
* @returns h2
|
|
62
|
+
*/
|
|
63
|
+
export declare function DrawerTitle({ className, ...props }: DrawerTitlePropsT): import("react").JSX.Element;
|
|
64
|
+
/**
|
|
65
|
+
* Описание шторки: озвучивается после заголовка
|
|
66
|
+
* @param props - пропсы описания
|
|
67
|
+
* @returns p
|
|
68
|
+
*/
|
|
69
|
+
export declare function DrawerDescription({ className, ...props }: DrawerDescriptionPropsT): import("react").JSX.Element;
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { createContext, useContext, useMemo } from "react";
|
|
5
|
+
import { Drawer } from "@base-ui/react/drawer";
|
|
6
|
+
// src/components/drawer/drawer.tsx
|
|
7
|
+
/** Настройки ближайшей шторки */
|
|
8
|
+
const DrawerContext = createContext({
|
|
9
|
+
hasSnapPoints: false,
|
|
10
|
+
modal: true,
|
|
11
|
+
showSwipeHandle: false,
|
|
12
|
+
swipeDirection: "down"
|
|
13
|
+
});
|
|
14
|
+
/**
|
|
15
|
+
* Шторка: выезжает с края экрана и закрывается свайпом. Шторка внутри шторки
|
|
16
|
+
* становится вложенной: предыдущие уходят назад стопкой
|
|
17
|
+
* @param props - пропсы шторки
|
|
18
|
+
* @returns корень шторки без своей разметки
|
|
19
|
+
*/
|
|
20
|
+
function Drawer$1({ modal = true, showSwipeHandle = false, snapPoints, swipeDirection = "down", onOpenChange, onSnapPointChange, ...props }) {
|
|
21
|
+
const hasSnapPoints = snapPoints !== void 0 && snapPoints.length > 0;
|
|
22
|
+
const context = useMemo(() => ({
|
|
23
|
+
hasSnapPoints,
|
|
24
|
+
modal,
|
|
25
|
+
showSwipeHandle,
|
|
26
|
+
swipeDirection
|
|
27
|
+
}), [
|
|
28
|
+
hasSnapPoints,
|
|
29
|
+
modal,
|
|
30
|
+
showSwipeHandle,
|
|
31
|
+
swipeDirection
|
|
32
|
+
]);
|
|
33
|
+
/**
|
|
34
|
+
* Шторка открылась или закрылась: наружу только флаг
|
|
35
|
+
* @param open - открыта ли
|
|
36
|
+
*/
|
|
37
|
+
const handleOpenChange = (open) => onOpenChange?.(open);
|
|
38
|
+
/**
|
|
39
|
+
* Точка остановки сменилась: наружу только значение
|
|
40
|
+
* @param snapPoint - точка
|
|
41
|
+
*/
|
|
42
|
+
const handleSnapPointChange = (snapPoint) => onSnapPointChange?.(snapPoint);
|
|
43
|
+
return /* @__PURE__ */ jsx(DrawerContext, {
|
|
44
|
+
value: context,
|
|
45
|
+
children: /* @__PURE__ */ jsx(Drawer.Root, {
|
|
46
|
+
modal,
|
|
47
|
+
snapPoints,
|
|
48
|
+
swipeDirection,
|
|
49
|
+
onOpenChange: handleOpenChange,
|
|
50
|
+
onSnapPointChange: handleSnapPointChange,
|
|
51
|
+
...props
|
|
52
|
+
})
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Кнопка открытия шторки. Свою кнопку передают через render={<Button />}
|
|
57
|
+
* @param props - пропсы кнопки
|
|
58
|
+
* @returns кнопка
|
|
59
|
+
*/
|
|
60
|
+
function DrawerTrigger(props) {
|
|
61
|
+
return /* @__PURE__ */ jsx(Drawer.Trigger, {
|
|
62
|
+
"data-slot": "drawer-trigger",
|
|
63
|
+
...props
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Портал: выносит шторку в конец body. DrawerContent рендерит его сам
|
|
68
|
+
* @param props - пропсы портала
|
|
69
|
+
* @returns портал
|
|
70
|
+
*/
|
|
71
|
+
function DrawerPortal(props) {
|
|
72
|
+
return /* @__PURE__ */ jsx(Drawer.Portal, {
|
|
73
|
+
"data-slot": "drawer-portal",
|
|
74
|
+
...props
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Кнопка закрытия шторки. Свою кнопку передают через render={<Button />}
|
|
79
|
+
* @param props - пропсы кнопки
|
|
80
|
+
* @returns кнопка
|
|
81
|
+
*/
|
|
82
|
+
function DrawerClose(props) {
|
|
83
|
+
return /* @__PURE__ */ jsx(Drawer.Close, {
|
|
84
|
+
"data-slot": "drawer-close",
|
|
85
|
+
...props
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* Затемнение под шторкой: светлеет вместе со свайпом. DrawerContent рендерит его сам в модальном режиме
|
|
90
|
+
* @param props - пропсы затемнения
|
|
91
|
+
* @returns слой на весь экран
|
|
92
|
+
*/
|
|
93
|
+
function DrawerOverlay({ className, ...props }) {
|
|
94
|
+
const classes = cn("fixed", "inset-0", "z-50", "min-h-dvh", "bg-black/30", "select-none", "supports-backdrop-filter:backdrop-blur-sm", "opacity-[max(var(--drawer-overlay-min-opacity,0),calc(1-var(--drawer-swipe-progress)))]", "transition-opacity", "duration-450", "ease-[cubic-bezier(0.32,0.72,0,1)]", "data-starting-style:opacity-0", "data-ending-style:pointer-events-none", "data-ending-style:opacity-0", "data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)]", "data-swiping:duration-0", "data-snap-points:[--drawer-overlay-min-opacity:0.5]", "supports-[-webkit-touch-callout:none]:absolute", className);
|
|
95
|
+
return /* @__PURE__ */ jsx(Drawer.Backdrop, {
|
|
96
|
+
"data-slot": "drawer-overlay",
|
|
97
|
+
className: classes,
|
|
98
|
+
...props
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Ручка: полоска у края шторки, за которую её тянут. Показывается при showSwipeHandle
|
|
103
|
+
* @param props - пропсы ручки
|
|
104
|
+
* @returns полоска
|
|
105
|
+
*/
|
|
106
|
+
function DrawerSwipeHandle({ className, ...props }) {
|
|
107
|
+
const classes = cn("relative", "z-10", "flex", "shrink-0", "cursor-grab", "transition-opacity", "duration-200", "active:cursor-grabbing", "after:block", "after:shrink-0", "after:rounded-full", "after:bg-muted", "group-data-nested-drawer-open/drawer-popup:opacity-0", "group-data-nested-drawer-swiping/drawer-popup:opacity-100", "group-data-[swipe-direction=left]/drawer-popup:order-last", "group-data-[swipe-direction=up]/drawer-popup:order-last", "group-data-[swipe-axis=y]/drawer-popup:h-3", "group-data-[swipe-axis=y]/drawer-popup:w-full", "group-data-[swipe-axis=y]/drawer-popup:justify-center", "group-data-[swipe-axis=y]/drawer-popup:after:h-1.5", "group-data-[swipe-axis=y]/drawer-popup:after:w-[100px]", "group-data-[swipe-direction=down]/drawer-popup:items-end", "group-data-[swipe-direction=up]/drawer-popup:items-start", "group-data-[swipe-axis=x]/drawer-popup:h-full", "group-data-[swipe-axis=x]/drawer-popup:w-3", "group-data-[swipe-axis=x]/drawer-popup:items-center", "group-data-[swipe-axis=x]/drawer-popup:after:h-[100px]", "group-data-[swipe-axis=x]/drawer-popup:after:w-1.5", "group-data-[swipe-direction=left]/drawer-popup:justify-start", "group-data-[swipe-direction=right]/drawer-popup:justify-end", className);
|
|
108
|
+
return /* @__PURE__ */ jsx("div", {
|
|
109
|
+
"data-slot": "drawer-swipe-handle",
|
|
110
|
+
"aria-hidden": true,
|
|
111
|
+
className: classes,
|
|
112
|
+
...props
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
/** Стили окна: размер, свайп, стопка вложенных шторок и анимации */
|
|
116
|
+
const popupClasses = [
|
|
117
|
+
"group/drawer-popup pointer-events-auto fixed z-50 m-(--drawer-inset,0px) flex h-(--drawer-content-height)",
|
|
118
|
+
"max-h-(--drawer-content-max-height,none) min-h-0 w-(--drawer-content-width,auto) flex-col",
|
|
119
|
+
"rounded-[min(var(--radius-4xl),24px)] border border-popover bg-popover text-sm text-popover-foreground shadow-xl",
|
|
120
|
+
"outline-none select-none will-change-transform [interpolate-size:allow-keywords] dark:border-border",
|
|
121
|
+
"transform-[translate3d(var(--translate-x,0px),var(--translate-y,0px),0)_scale(var(--stack-scale))]",
|
|
122
|
+
"transition-[transform,height,opacity,filter] duration-450 ease-[cubic-bezier(0.22,1,0.36,1)]",
|
|
123
|
+
"[--drawer-bleed-background:transparent] [--drawer-inset:--spacing(2)]",
|
|
124
|
+
"[--drawer-stacked-shadow:0_-20px_25px_-5px_rgb(0_0_0/0.1),0_-8px_10px_-6px_rgb(0_0_0/0.1)]",
|
|
125
|
+
"data-[swipe-direction=down]:data-nested-drawer-open:shadow-(--drawer-stacked-shadow)",
|
|
126
|
+
"data-nested-drawer-open:overflow-hidden data-nested-drawer-open:brightness-95",
|
|
127
|
+
"after:pointer-events-none after:absolute after:bg-(--drawer-bleed-background,var(--color-popover))",
|
|
128
|
+
"data-[swipe-axis=x]:after:inset-y-0 data-[swipe-axis=x]:after:w-(--bleed)",
|
|
129
|
+
"data-[swipe-axis=y]:after:inset-x-0 data-[swipe-axis=y]:after:h-(--bleed)",
|
|
130
|
+
"data-[swipe-direction=down]:after:top-full data-[swipe-direction=left]:after:right-full",
|
|
131
|
+
"data-[swipe-direction=right]:after:left-full data-[swipe-direction=up]:after:bottom-full",
|
|
132
|
+
"[--drawer-content-height:var(--drawer-height,auto)] data-[swipe-axis=x]:[--drawer-content-width:75%]",
|
|
133
|
+
"data-[swipe-axis=y]:[--drawer-content-max-height:calc(100dvh-6rem)]",
|
|
134
|
+
"data-[swipe-axis=y]:data-snap-points:[--drawer-content-height:100dvh]",
|
|
135
|
+
"data-[swipe-axis=x]:sm:[--drawer-content-width:24rem]",
|
|
136
|
+
"[--bleed:3rem] [--peek:1rem] [--stack-step:0.05]",
|
|
137
|
+
"[--stack-height:var(--drawer-frontmost-height,var(--drawer-height,0px))]",
|
|
138
|
+
"[--stack-progress:clamp(0,var(--drawer-swipe-progress),1)]",
|
|
139
|
+
"[--stack-peek-offset:max(0px,calc((var(--nested-drawers)-var(--stack-progress))*var(--peek)))]",
|
|
140
|
+
"[--stack-scale-base:max(0,calc(1-(var(--nested-drawers)*var(--stack-step))))]",
|
|
141
|
+
"[--stack-scale:clamp(0,calc(var(--stack-scale-base)+(var(--stack-step)*var(--stack-progress))),1)]",
|
|
142
|
+
"[--stack-shrink:calc(1-var(--stack-scale))]",
|
|
143
|
+
"data-starting-style:transform-(--closed-transform) data-ending-style:transform-(--closed-transform)",
|
|
144
|
+
"data-ending-style:opacity-[0.9999] data-ending-style:duration-[calc(var(--drawer-swipe-strength)*400ms)]",
|
|
145
|
+
"data-swiping:duration-0 data-nested-drawer-swiping:duration-0",
|
|
146
|
+
"data-ending-style:data-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)]",
|
|
147
|
+
"data-ending-style:data-nested-drawer-swiping:duration-[calc(var(--drawer-swipe-strength)*400ms)]",
|
|
148
|
+
"data-[swipe-axis=y]:inset-x-0 data-[swipe-axis=y]:data-nested-drawer-open:h-(--stack-height)",
|
|
149
|
+
"data-[swipe-axis=x]:inset-y-0 data-[swipe-axis=x]:flex-row",
|
|
150
|
+
"data-[swipe-direction=down]:bottom-0 data-[swipe-direction=down]:origin-bottom",
|
|
151
|
+
"data-[swipe-direction=down]:[--closed-transform:translate3d(0,calc(100%+var(--drawer-inset,0px)+2px),0)]",
|
|
152
|
+
"data-[swipe-direction=down]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)-var(--stack-peek-offset)-(var(--stack-shrink)*var(--stack-height)))]",
|
|
153
|
+
"data-[swipe-direction=up]:top-0 data-[swipe-direction=up]:origin-top",
|
|
154
|
+
"data-[swipe-direction=up]:[--closed-transform:translate3d(0,calc(-100%-var(--drawer-inset,0px)-2px),0)]",
|
|
155
|
+
"data-[swipe-direction=up]:[--translate-y:calc(var(--drawer-snap-point-offset,0px)+var(--drawer-swipe-movement-y)+var(--stack-peek-offset)+(var(--stack-shrink)*var(--stack-height)))]",
|
|
156
|
+
"data-[swipe-direction=left]:left-0 data-[swipe-direction=left]:origin-left",
|
|
157
|
+
"data-[swipe-direction=left]:[--closed-transform:translate3d(calc(-100%-var(--drawer-inset,0px)-2px),0,0)]",
|
|
158
|
+
"data-[swipe-direction=left]:[--translate-x:calc(var(--drawer-swipe-movement-x)+var(--stack-peek-offset)+(var(--stack-shrink)*100%))]",
|
|
159
|
+
"data-[swipe-direction=right]:right-0 data-[swipe-direction=right]:origin-right",
|
|
160
|
+
"data-[swipe-direction=right]:[--closed-transform:translate3d(calc(100%+var(--drawer-inset,0px)+2px),0,0)]",
|
|
161
|
+
"data-[swipe-direction=right]:[--translate-x:calc(var(--drawer-swipe-movement-x)-var(--stack-peek-offset)-(var(--stack-shrink)*100%))]"
|
|
162
|
+
];
|
|
163
|
+
/**
|
|
164
|
+
* Окно шторки: рендерится в портале поверх затемнения. Содержимое скрывается,
|
|
165
|
+
* когда поверх открыта вложенная шторка
|
|
166
|
+
* @param props - пропсы окна
|
|
167
|
+
* @returns портал с затемнением и окном
|
|
168
|
+
*/
|
|
169
|
+
function DrawerContent({ className, children, ...props }) {
|
|
170
|
+
const { hasSnapPoints, modal, showSwipeHandle, swipeDirection } = useContext(DrawerContext);
|
|
171
|
+
const swipeAxis = swipeDirection === "left" || swipeDirection === "right" ? "x" : "y";
|
|
172
|
+
const snapPointsAttribute = hasSnapPoints ? "" : void 0;
|
|
173
|
+
const classes = cn(popupClasses, className);
|
|
174
|
+
const contentClasses = cn("flex", "min-h-0", "flex-1", "flex-col", "overflow-hidden", "overscroll-contain", "rounded-[inherit]", "select-text", "transition-opacity", "duration-300", "ease-[cubic-bezier(0.45,1.005,0,1.005)]", "group-data-nested-drawer-open/drawer-popup:opacity-0", "group-data-nested-drawer-swiping/drawer-popup:opacity-100", "group-data-swiping/drawer-popup:select-none");
|
|
175
|
+
return /* @__PURE__ */ jsxs(DrawerPortal, { children: [modal === true && /* @__PURE__ */ jsx(DrawerOverlay, { "data-snap-points": snapPointsAttribute }), /* @__PURE__ */ jsx(Drawer.Viewport, {
|
|
176
|
+
"data-slot": "drawer-viewport",
|
|
177
|
+
"data-modal": modal,
|
|
178
|
+
className: "pointer-events-none fixed inset-0 z-50 select-none data-[modal=true]:pointer-events-auto",
|
|
179
|
+
children: /* @__PURE__ */ jsxs(Drawer.Popup, {
|
|
180
|
+
"data-slot": "drawer-popup",
|
|
181
|
+
"data-swipe-axis": swipeAxis,
|
|
182
|
+
"data-snap-points": snapPointsAttribute,
|
|
183
|
+
className: classes,
|
|
184
|
+
...props,
|
|
185
|
+
children: [showSwipeHandle && /* @__PURE__ */ jsx(DrawerSwipeHandle, {}), /* @__PURE__ */ jsx(Drawer.Content, {
|
|
186
|
+
"data-slot": "drawer-content",
|
|
187
|
+
className: contentClasses,
|
|
188
|
+
children
|
|
189
|
+
})]
|
|
190
|
+
})
|
|
191
|
+
})] });
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* Шапка шторки: заголовок и описание. Снизу и сверху — по центру, на широком экране — слева
|
|
195
|
+
* @param props - пропсы шапки
|
|
196
|
+
* @returns блок
|
|
197
|
+
*/
|
|
198
|
+
function DrawerHeader({ className, ...props }) {
|
|
199
|
+
const classes = cn("flex", "shrink-0", "flex-col", "gap-0.5", "p-4", "pb-0", "md:gap-1.5", "md:text-left", "group-data-[swipe-axis=y]/drawer-popup:text-center", className);
|
|
200
|
+
return /* @__PURE__ */ jsx("div", {
|
|
201
|
+
"data-slot": "drawer-header",
|
|
202
|
+
className: classes,
|
|
203
|
+
...props
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Подвал шторки: прижат к низу, кнопки столбиком
|
|
208
|
+
* @param props - пропсы подвала
|
|
209
|
+
* @returns блок
|
|
210
|
+
*/
|
|
211
|
+
function DrawerFooter({ className, ...props }) {
|
|
212
|
+
const classes = cn("mt-auto", "flex", "shrink-0", "flex-col", "gap-2", "p-4", "pt-0", className);
|
|
213
|
+
return /* @__PURE__ */ jsx("div", {
|
|
214
|
+
"data-slot": "drawer-footer",
|
|
215
|
+
className: classes,
|
|
216
|
+
...props
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
/**
|
|
220
|
+
* Заголовок шторки: озвучивается при открытии
|
|
221
|
+
* @param props - пропсы заголовка
|
|
222
|
+
* @returns h2
|
|
223
|
+
*/
|
|
224
|
+
function DrawerTitle({ className, ...props }) {
|
|
225
|
+
const classes = cn("text-base", "font-medium", "text-foreground", className);
|
|
226
|
+
return /* @__PURE__ */ jsx(Drawer.Title, {
|
|
227
|
+
"data-slot": "drawer-title",
|
|
228
|
+
className: classes,
|
|
229
|
+
...props
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Описание шторки: озвучивается после заголовка
|
|
234
|
+
* @param props - пропсы описания
|
|
235
|
+
* @returns p
|
|
236
|
+
*/
|
|
237
|
+
function DrawerDescription({ className, ...props }) {
|
|
238
|
+
const classes = cn("text-sm", "text-balance", "text-muted-foreground", className);
|
|
239
|
+
return /* @__PURE__ */ jsx(Drawer.Description, {
|
|
240
|
+
"data-slot": "drawer-description",
|
|
241
|
+
className: classes,
|
|
242
|
+
...props
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
export { Drawer$1 as Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { DrawerClosePropsT, DrawerContentPropsT, DrawerDescriptionPropsT, DrawerFooterPropsT, DrawerHeaderPropsT, DrawerOverlayPropsT, DrawerPortalPropsT, DrawerPropsT, DrawerSnapPointT, DrawerSwipeDirectionT, DrawerSwipeHandlePropsT, DrawerTitlePropsT, DrawerTriggerPropsT } from "./types.js";
|
|
2
|
+
import { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger } from "./drawer.js";
|
|
3
|
+
export { Drawer, DrawerClose, type DrawerClosePropsT, DrawerContent, type DrawerContentPropsT, DrawerDescription, type DrawerDescriptionPropsT, DrawerFooter, type DrawerFooterPropsT, DrawerHeader, type DrawerHeaderPropsT, DrawerOverlay, type DrawerOverlayPropsT, DrawerPortal, type DrawerPortalPropsT, type DrawerPropsT, type DrawerSnapPointT, type DrawerSwipeDirectionT, DrawerSwipeHandle, type DrawerSwipeHandlePropsT, DrawerTitle, type DrawerTitlePropsT, DrawerTrigger, type DrawerTriggerPropsT };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Drawer, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerSwipeHandle, DrawerTitle, DrawerTrigger } from "./drawer.js";
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { CSSProperties, ComponentProps } from "react";
|
|
2
|
+
import { Drawer } from "@base-ui/react/drawer";
|
|
3
|
+
/**
|
|
4
|
+
* Пропсы части: className только строкой, render и style описаны по-русски
|
|
5
|
+
*/
|
|
6
|
+
export type PartPropsT<PropsT extends {
|
|
7
|
+
render?: unknown;
|
|
8
|
+
}> = Omit<PropsT, 'className' | 'render' | 'style'> & {
|
|
9
|
+
/** Классы элемента */
|
|
10
|
+
className?: string;
|
|
11
|
+
/** Свой элемент вместо стандартного: render={<Button />}. Стили и пропсы переходят на него */
|
|
12
|
+
render?: PropsT['render'];
|
|
13
|
+
/** Инлайн-стили элемента */
|
|
14
|
+
style?: CSSProperties;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* Край, к которому шторка закрывается свайпом: down — снизу, up — сверху, left — слева, right — справа
|
|
18
|
+
*/
|
|
19
|
+
export type DrawerSwipeDirectionT = 'down' | 'up' | 'left' | 'right';
|
|
20
|
+
/**
|
|
21
|
+
* Точка остановки: доля высоты (0.5) или размер строкой ('300px', '20rem')
|
|
22
|
+
*/
|
|
23
|
+
export type DrawerSnapPointT = number | string;
|
|
24
|
+
/**
|
|
25
|
+
* Пропсы шторки
|
|
26
|
+
*/
|
|
27
|
+
export type DrawerPropsT = Omit<Drawer.Root.Props, 'onOpenChange' | 'swipeDirection' | 'snapPoints' | 'snapPoint' | 'defaultSnapPoint' | 'onSnapPointChange'> & {
|
|
28
|
+
/** Открыта ли шторка — контролируемый режим, вместе с onOpenChange */
|
|
29
|
+
open?: boolean;
|
|
30
|
+
/** Открыта ли шторка при первом рендере — неконтролируемый режим */
|
|
31
|
+
defaultOpen?: boolean;
|
|
32
|
+
/** Шторка открылась или закрылась */
|
|
33
|
+
onOpenChange?: (open: boolean) => void;
|
|
34
|
+
/**
|
|
35
|
+
* Модальность: true — затемняет страницу и держит фокус, false — страница остаётся доступной,
|
|
36
|
+
* 'trap-focus' — держит фокус без затемнения. По умолчанию true
|
|
37
|
+
*/
|
|
38
|
+
modal?: boolean | 'trap-focus';
|
|
39
|
+
/** Край экрана: шторка выезжает с него и закрывается свайпом к нему. По умолчанию down */
|
|
40
|
+
swipeDirection?: DrawerSwipeDirectionT;
|
|
41
|
+
/** Точки остановки: доли высоты (0.5) или размеры ('300px'). 1 — во всю высоту */
|
|
42
|
+
snapPoints?: DrawerSnapPointT[];
|
|
43
|
+
/** Текущая точка остановки — контролируемый режим, вместе с onSnapPointChange */
|
|
44
|
+
snapPoint?: DrawerSnapPointT | null;
|
|
45
|
+
/** Точка остановки при открытии — неконтролируемый режим. По умолчанию первая */
|
|
46
|
+
defaultSnapPoint?: DrawerSnapPointT | null;
|
|
47
|
+
/** Шторка остановилась на другой точке */
|
|
48
|
+
onSnapPointChange?: (snapPoint: DrawerSnapPointT | null) => void;
|
|
49
|
+
/** Показать ручку, за которую шторку тянут. По умолчанию false */
|
|
50
|
+
showSwipeHandle?: boolean;
|
|
51
|
+
/** Не закрывать шторку нажатием вне неё */
|
|
52
|
+
disablePointerDismissal?: boolean;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Пропсы кнопки открытия
|
|
56
|
+
*/
|
|
57
|
+
export type DrawerTriggerPropsT = PartPropsT<Drawer.Trigger.Props>;
|
|
58
|
+
/**
|
|
59
|
+
* Пропсы портала
|
|
60
|
+
*/
|
|
61
|
+
export type DrawerPortalPropsT = Drawer.Portal.Props;
|
|
62
|
+
/**
|
|
63
|
+
* Пропсы кнопки закрытия
|
|
64
|
+
*/
|
|
65
|
+
export type DrawerClosePropsT = PartPropsT<Drawer.Close.Props>;
|
|
66
|
+
/**
|
|
67
|
+
* Пропсы затемнения
|
|
68
|
+
*/
|
|
69
|
+
export type DrawerOverlayPropsT = PartPropsT<Drawer.Backdrop.Props>;
|
|
70
|
+
/**
|
|
71
|
+
* Пропсы ручки
|
|
72
|
+
*/
|
|
73
|
+
export type DrawerSwipeHandlePropsT = ComponentProps<'div'>;
|
|
74
|
+
/**
|
|
75
|
+
* Пропсы окна шторки
|
|
76
|
+
*/
|
|
77
|
+
export type DrawerContentPropsT = PartPropsT<Drawer.Popup.Props>;
|
|
78
|
+
/**
|
|
79
|
+
* Пропсы шапки
|
|
80
|
+
*/
|
|
81
|
+
export type DrawerHeaderPropsT = ComponentProps<'div'>;
|
|
82
|
+
/**
|
|
83
|
+
* Пропсы подвала
|
|
84
|
+
*/
|
|
85
|
+
export type DrawerFooterPropsT = ComponentProps<'div'>;
|
|
86
|
+
/**
|
|
87
|
+
* Пропсы заголовка
|
|
88
|
+
*/
|
|
89
|
+
export type DrawerTitlePropsT = PartPropsT<Drawer.Title.Props>;
|
|
90
|
+
/**
|
|
91
|
+
* Пропсы описания
|
|
92
|
+
*/
|
|
93
|
+
export type DrawerDescriptionPropsT = PartPropsT<Drawer.Description.Props>;
|