@archytechtor/ui 0.0.0-stage → 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/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/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/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/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 +244 -0
- package/dist/index.js +114 -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 +126 -0
- package/dist/styles/theme.css +80 -0
- package/dist/styles/utilities.css +553 -0
- package/package.json +89 -3
|
@@ -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>;
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { DropdownMenuCheckboxItemPropsT, DropdownMenuContentPropsT, DropdownMenuGroupPropsT, DropdownMenuItemPropsT, DropdownMenuLabelPropsT, DropdownMenuPortalPropsT, DropdownMenuPropsT, DropdownMenuRadioGroupPropsT, DropdownMenuRadioItemPropsT, DropdownMenuSeparatorPropsT, DropdownMenuShortcutPropsT, DropdownMenuSubContentPropsT, DropdownMenuSubPropsT, DropdownMenuSubTriggerPropsT, DropdownMenuTriggerPropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Выпадающее меню: список действий по нажатию на кнопку
|
|
4
|
+
* @param props - пропсы меню
|
|
5
|
+
* @returns корень без своей разметки
|
|
6
|
+
*/
|
|
7
|
+
export declare function DropdownMenu({ onOpenChange, ...props }: DropdownMenuPropsT): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Портал: переносит меню в конец body. DropdownMenuContent рендерит его сам
|
|
10
|
+
* @param props - пропсы портала
|
|
11
|
+
* @returns портал
|
|
12
|
+
*/
|
|
13
|
+
export declare function DropdownMenuPortal(props: DropdownMenuPortalPropsT): import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Кнопка открытия меню. Свою кнопку — через render={<Button />}
|
|
16
|
+
* @param props - пропсы кнопки
|
|
17
|
+
* @returns кнопка с aria-haspopup="menu"
|
|
18
|
+
*/
|
|
19
|
+
export declare function DropdownMenuTrigger(props: DropdownMenuTriggerPropsT): import("react").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Содержимое меню: рендерится в портале под кнопкой, шириной не меньше кнопки
|
|
22
|
+
* @param props - пропсы содержимого; по умолчанию align="start", sideOffset={4}
|
|
23
|
+
* @returns портал с меню
|
|
24
|
+
*/
|
|
25
|
+
export declare function DropdownMenuContent({ className, side, sideOffset, align, alignOffset, collisionPadding, arrowPadding, sticky, ...props }: DropdownMenuContentPropsT): import("react").JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Группа пунктов: объединяет связанные действия; DropdownMenuLabel кладётся внутрь неё
|
|
28
|
+
* @param props - пропсы группы
|
|
29
|
+
* @returns div с role="group"
|
|
30
|
+
*/
|
|
31
|
+
export declare function DropdownMenuGroup(props: DropdownMenuGroupPropsT): import("react").JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Пункт меню: действие. Ссылку рисуют через render={<a href />}
|
|
34
|
+
* @param props - пропсы пункта
|
|
35
|
+
* @returns div с role="menuitem"
|
|
36
|
+
*/
|
|
37
|
+
export declare function DropdownMenuItem({ className, inset, variant, ...props }: DropdownMenuItemPropsT): import("react").JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* Пункт-флажок: включает и выключает настройку, отмечен галочкой справа
|
|
40
|
+
* @param props - пропсы пункта
|
|
41
|
+
* @returns div с role="menuitemcheckbox"
|
|
42
|
+
*/
|
|
43
|
+
export declare function DropdownMenuCheckboxItem({ className, children, inset, onCheckedChange, ...props }: DropdownMenuCheckboxItemPropsT): import("react").JSX.Element;
|
|
44
|
+
/**
|
|
45
|
+
* Группа радиокнопок: из пунктов внутри выбран один
|
|
46
|
+
* @param props - пропсы группы
|
|
47
|
+
* @returns div с role="group"
|
|
48
|
+
*/
|
|
49
|
+
export declare function DropdownMenuRadioGroup({ onValueChange, ...props }: DropdownMenuRadioGroupPropsT): import("react").JSX.Element;
|
|
50
|
+
/**
|
|
51
|
+
* Пункт-радиокнопка: выбранный отмечен галочкой справа
|
|
52
|
+
* @param props - пропсы пункта
|
|
53
|
+
* @returns div с role="menuitemradio"
|
|
54
|
+
*/
|
|
55
|
+
export declare function DropdownMenuRadioItem({ className, children, inset, ...props }: DropdownMenuRadioItemPropsT): import("react").JSX.Element;
|
|
56
|
+
/**
|
|
57
|
+
* Подпись: заголовок группы пунктов, не выбирается. Кладётся внутрь DropdownMenuGroup
|
|
58
|
+
* или DropdownMenuRadioGroup
|
|
59
|
+
* @param props - пропсы подписи
|
|
60
|
+
* @returns div
|
|
61
|
+
*/
|
|
62
|
+
export declare function DropdownMenuLabel({ className, inset, ...props }: DropdownMenuLabelPropsT): import("react").JSX.Element;
|
|
63
|
+
/**
|
|
64
|
+
* Разделитель: линия между группами пунктов
|
|
65
|
+
* @param props - пропсы разделителя
|
|
66
|
+
* @returns div с role="separator"
|
|
67
|
+
*/
|
|
68
|
+
export declare function DropdownMenuSeparator({ className, ...props }: DropdownMenuSeparatorPropsT): import("react").JSX.Element;
|
|
69
|
+
/**
|
|
70
|
+
* Сочетание клавиш: подсказка справа в пункте. Само сочетание не обрабатывает
|
|
71
|
+
* @param props - пропсы сочетания
|
|
72
|
+
* @returns span
|
|
73
|
+
*/
|
|
74
|
+
export declare function DropdownMenuShortcut({ className, ...props }: DropdownMenuShortcutPropsT): import("react").JSX.Element;
|
|
75
|
+
/**
|
|
76
|
+
* Подменю: вложенный список, открывается из пункта
|
|
77
|
+
* @param props - пропсы подменю
|
|
78
|
+
* @returns корень без своей разметки
|
|
79
|
+
*/
|
|
80
|
+
export declare function DropdownMenuSub({ onOpenChange, ...props }: DropdownMenuSubPropsT): import("react").JSX.Element;
|
|
81
|
+
/**
|
|
82
|
+
* Пункт, открывающий подменю: со стрелкой справа
|
|
83
|
+
* @param props - пропсы пункта
|
|
84
|
+
* @returns div с role="menuitem"
|
|
85
|
+
*/
|
|
86
|
+
export declare function DropdownMenuSubTrigger({ className, inset, children, ...props }: DropdownMenuSubTriggerPropsT): import("react").JSX.Element;
|
|
87
|
+
/**
|
|
88
|
+
* Содержимое подменю: появляется сбоку от пункта
|
|
89
|
+
* @param props - пропсы содержимого; по умолчанию side="right", align="start"
|
|
90
|
+
* @returns портал с подменю
|
|
91
|
+
*/
|
|
92
|
+
export declare function DropdownMenuSubContent({ className, side, sideOffset, align, alignOffset, ...props }: DropdownMenuSubContentPropsT): import("react").JSX.Element;
|