@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,98 @@
|
|
|
1
|
+
import { MenubarCheckboxItemPropsT, MenubarContentPropsT, MenubarGroupPropsT, MenubarItemPropsT, MenubarLabelPropsT, MenubarMenuPropsT, MenubarPortalPropsT, MenubarPropsT, MenubarRadioGroupPropsT, MenubarRadioItemPropsT, MenubarSeparatorPropsT, MenubarShortcutPropsT, MenubarSubContentPropsT, MenubarSubPropsT, MenubarSubTriggerPropsT, MenubarTriggerPropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Строка меню: постоянно видимый ряд меню, как в настольных приложениях
|
|
4
|
+
* @param props - пропсы строки
|
|
5
|
+
* @returns div с role="menubar"
|
|
6
|
+
*/
|
|
7
|
+
export declare function Menubar({ className, ...props }: MenubarPropsT): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Меню в строке: кнопка и выпадающий список
|
|
10
|
+
* @param props - пропсы меню
|
|
11
|
+
* @returns корень без своей разметки
|
|
12
|
+
*/
|
|
13
|
+
export declare function MenubarMenu({ onOpenChange, ...props }: MenubarMenuPropsT): import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Портал: переносит меню в конец body. MenubarContent рендерит его сам
|
|
16
|
+
* @param props - пропсы портала
|
|
17
|
+
* @returns портал
|
|
18
|
+
*/
|
|
19
|
+
export declare function MenubarPortal(props: MenubarPortalPropsT): import("react").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Кнопка меню в строке: открывает список
|
|
22
|
+
* @param props - пропсы кнопки
|
|
23
|
+
* @returns кнопка с role="menuitem"
|
|
24
|
+
*/
|
|
25
|
+
export declare function MenubarTrigger({ className, ...props }: MenubarTriggerPropsT): import("react").JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Содержимое меню: рендерится в портале под кнопкой
|
|
28
|
+
* @param props - пропсы содержимого; по умолчанию align="start", alignOffset={-4}, sideOffset={8}
|
|
29
|
+
* @returns портал с меню
|
|
30
|
+
*/
|
|
31
|
+
export declare function MenubarContent({ className, side, sideOffset, align, alignOffset, collisionPadding, arrowPadding, sticky, ...props }: MenubarContentPropsT): import("react").JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Группа пунктов: объединяет связанные действия; MenubarLabel кладётся внутрь неё
|
|
34
|
+
* @param props - пропсы группы
|
|
35
|
+
* @returns div с role="group"
|
|
36
|
+
*/
|
|
37
|
+
export declare function MenubarGroup(props: MenubarGroupPropsT): import("react").JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* Пункт меню: действие. Ссылку рисуют через render={<a href />}
|
|
40
|
+
* @param props - пропсы пункта
|
|
41
|
+
* @returns div с role="menuitem"
|
|
42
|
+
*/
|
|
43
|
+
export declare function MenubarItem({ className, inset, variant, ...props }: MenubarItemPropsT): import("react").JSX.Element;
|
|
44
|
+
/**
|
|
45
|
+
* Пункт-флажок: включает и выключает настройку, отмечен галочкой справа
|
|
46
|
+
* @param props - пропсы пункта
|
|
47
|
+
* @returns div с role="menuitemcheckbox"
|
|
48
|
+
*/
|
|
49
|
+
export declare function MenubarCheckboxItem({ className, children, inset, onCheckedChange, ...props }: MenubarCheckboxItemPropsT): import("react").JSX.Element;
|
|
50
|
+
/**
|
|
51
|
+
* Группа радиокнопок: из пунктов внутри выбран один
|
|
52
|
+
* @param props - пропсы группы
|
|
53
|
+
* @returns div с role="group"
|
|
54
|
+
*/
|
|
55
|
+
export declare function MenubarRadioGroup({ onValueChange, ...props }: MenubarRadioGroupPropsT): import("react").JSX.Element;
|
|
56
|
+
/**
|
|
57
|
+
* Пункт-радиокнопка: выбранный отмечен галочкой справа
|
|
58
|
+
* @param props - пропсы пункта
|
|
59
|
+
* @returns div с role="menuitemradio"
|
|
60
|
+
*/
|
|
61
|
+
export declare function MenubarRadioItem({ className, children, inset, ...props }: MenubarRadioItemPropsT): import("react").JSX.Element;
|
|
62
|
+
/**
|
|
63
|
+
* Подпись: заголовок группы пунктов, не выбирается. Кладётся внутрь MenubarGroup
|
|
64
|
+
* или MenubarRadioGroup
|
|
65
|
+
* @param props - пропсы подписи
|
|
66
|
+
* @returns div
|
|
67
|
+
*/
|
|
68
|
+
export declare function MenubarLabel({ className, inset, ...props }: MenubarLabelPropsT): import("react").JSX.Element;
|
|
69
|
+
/**
|
|
70
|
+
* Разделитель: линия между группами пунктов
|
|
71
|
+
* @param props - пропсы разделителя
|
|
72
|
+
* @returns div с role="separator"
|
|
73
|
+
*/
|
|
74
|
+
export declare function MenubarSeparator({ className, ...props }: MenubarSeparatorPropsT): import("react").JSX.Element;
|
|
75
|
+
/**
|
|
76
|
+
* Сочетание клавиш: подсказка справа в пункте. Само сочетание не обрабатывает
|
|
77
|
+
* @param props - пропсы сочетания
|
|
78
|
+
* @returns span
|
|
79
|
+
*/
|
|
80
|
+
export declare function MenubarShortcut({ className, ...props }: MenubarShortcutPropsT): import("react").JSX.Element;
|
|
81
|
+
/**
|
|
82
|
+
* Подменю: вложенный список, открывается из пункта
|
|
83
|
+
* @param props - пропсы подменю
|
|
84
|
+
* @returns корень без своей разметки
|
|
85
|
+
*/
|
|
86
|
+
export declare function MenubarSub({ onOpenChange, ...props }: MenubarSubPropsT): import("react").JSX.Element;
|
|
87
|
+
/**
|
|
88
|
+
* Пункт, открывающий подменю: со стрелкой справа
|
|
89
|
+
* @param props - пропсы пункта
|
|
90
|
+
* @returns div с role="menuitem"
|
|
91
|
+
*/
|
|
92
|
+
export declare function MenubarSubTrigger({ className, inset, children, ...props }: MenubarSubTriggerPropsT): import("react").JSX.Element;
|
|
93
|
+
/**
|
|
94
|
+
* Содержимое подменю: появляется сбоку от пункта
|
|
95
|
+
* @param props - пропсы содержимого; по умолчанию side="right", align="start"
|
|
96
|
+
* @returns портал с подменю
|
|
97
|
+
*/
|
|
98
|
+
export declare function MenubarSubContent({ className, side, sideOffset, align, alignOffset, ...props }: MenubarSubContentPropsT): import("react").JSX.Element;
|
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { CheckIcon, ChevronRightIcon } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Menu } from "@base-ui/react/menu";
|
|
6
|
+
import { Menubar } from "@base-ui/react/menubar";
|
|
7
|
+
// src/components/menubar/menubar.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Строка меню: постоянно видимый ряд меню, как в настольных приложениях
|
|
10
|
+
* @param props - пропсы строки
|
|
11
|
+
* @returns div с role="menubar"
|
|
12
|
+
*/
|
|
13
|
+
function Menubar$1({ className, ...props }) {
|
|
14
|
+
const classes = cn("flex", "h-8", "items-center", "gap-0.5", "rounded-lg", "border", "p-[3px]", className);
|
|
15
|
+
return /* @__PURE__ */ jsx(Menubar, {
|
|
16
|
+
"data-slot": "menubar",
|
|
17
|
+
className: classes,
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Меню в строке: кнопка и выпадающий список
|
|
23
|
+
* @param props - пропсы меню
|
|
24
|
+
* @returns корень без своей разметки
|
|
25
|
+
*/
|
|
26
|
+
function MenubarMenu({ onOpenChange, ...props }) {
|
|
27
|
+
/**
|
|
28
|
+
* Меню открыли или закрыли: наружу только флаг
|
|
29
|
+
* @param open - открыто ли
|
|
30
|
+
*/
|
|
31
|
+
const handleOpenChange = (open) => onOpenChange?.(open);
|
|
32
|
+
return /* @__PURE__ */ jsx(Menu.Root, {
|
|
33
|
+
"data-slot": "menubar-menu",
|
|
34
|
+
onOpenChange: handleOpenChange,
|
|
35
|
+
...props
|
|
36
|
+
});
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Портал: переносит меню в конец body. MenubarContent рендерит его сам
|
|
40
|
+
* @param props - пропсы портала
|
|
41
|
+
* @returns портал
|
|
42
|
+
*/
|
|
43
|
+
function MenubarPortal(props) {
|
|
44
|
+
return /* @__PURE__ */ jsx(Menu.Portal, {
|
|
45
|
+
"data-slot": "menubar-portal",
|
|
46
|
+
...props
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Кнопка меню в строке: открывает список
|
|
51
|
+
* @param props - пропсы кнопки
|
|
52
|
+
* @returns кнопка с role="menuitem"
|
|
53
|
+
*/
|
|
54
|
+
function MenubarTrigger({ className, ...props }) {
|
|
55
|
+
const classes = cn("flex", "items-center", "rounded-sm", "px-1.5", "py-[2px]", "text-sm", "font-medium", "outline-hidden", "select-none", "hover:bg-muted", "aria-expanded:bg-muted", className);
|
|
56
|
+
return /* @__PURE__ */ jsx(Menu.Trigger, {
|
|
57
|
+
"data-slot": "menubar-trigger",
|
|
58
|
+
className: classes,
|
|
59
|
+
...props
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/** Классы окна меню */
|
|
63
|
+
const contentClasses = [
|
|
64
|
+
"z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin)",
|
|
65
|
+
"overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md",
|
|
66
|
+
"ring-1 ring-foreground/10 duration-100 outline-none data-closed:overflow-hidden",
|
|
67
|
+
"data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95",
|
|
68
|
+
"data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",
|
|
69
|
+
"data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2",
|
|
70
|
+
"data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2"
|
|
71
|
+
];
|
|
72
|
+
/**
|
|
73
|
+
* Содержимое меню: рендерится в портале под кнопкой
|
|
74
|
+
* @param props - пропсы содержимого; по умолчанию align="start", alignOffset={-4}, sideOffset={8}
|
|
75
|
+
* @returns портал с меню
|
|
76
|
+
*/
|
|
77
|
+
function MenubarContent({ className, side = "bottom", sideOffset = 8, align = "start", alignOffset = -4, collisionPadding, arrowPadding, sticky, ...props }) {
|
|
78
|
+
const classes = cn(contentClasses, className);
|
|
79
|
+
const positionerProps = {
|
|
80
|
+
side,
|
|
81
|
+
sideOffset,
|
|
82
|
+
align,
|
|
83
|
+
alignOffset,
|
|
84
|
+
collisionPadding,
|
|
85
|
+
arrowPadding,
|
|
86
|
+
sticky
|
|
87
|
+
};
|
|
88
|
+
return /* @__PURE__ */ jsx(Menu.Portal, { children: /* @__PURE__ */ jsx(Menu.Positioner, {
|
|
89
|
+
className: "isolate z-50 outline-none",
|
|
90
|
+
...positionerProps,
|
|
91
|
+
children: /* @__PURE__ */ jsx(Menu.Popup, {
|
|
92
|
+
"data-slot": "menubar-content",
|
|
93
|
+
className: classes,
|
|
94
|
+
...props
|
|
95
|
+
})
|
|
96
|
+
}) });
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Группа пунктов: объединяет связанные действия; MenubarLabel кладётся внутрь неё
|
|
100
|
+
* @param props - пропсы группы
|
|
101
|
+
* @returns div с role="group"
|
|
102
|
+
*/
|
|
103
|
+
function MenubarGroup(props) {
|
|
104
|
+
return /* @__PURE__ */ jsx(Menu.Group, {
|
|
105
|
+
"data-slot": "menubar-group",
|
|
106
|
+
...props
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Пункт меню: действие. Ссылку рисуют через render={<a href />}
|
|
111
|
+
* @param props - пропсы пункта
|
|
112
|
+
* @returns div с role="menuitem"
|
|
113
|
+
*/
|
|
114
|
+
function MenubarItem({ className, inset, variant = "default", ...props }) {
|
|
115
|
+
const classes = cn("group/menubar-item", "relative", "flex", "cursor-default", "items-center", "gap-1.5", "rounded-md", "px-1.5", "py-1", "text-sm", "outline-hidden", "select-none", "data-inset:pl-7", "focus:bg-accent", "focus:text-accent-foreground", "not-data-[variant=destructive]:focus:**:text-accent-foreground", "data-[variant=destructive]:text-destructive", "data-[variant=destructive]:focus:bg-destructive/10", "data-[variant=destructive]:focus:text-destructive", "dark:data-[variant=destructive]:focus:bg-destructive/20", "data-[variant=destructive]:*:[svg]:text-destructive!", "data-disabled:pointer-events-none", "data-disabled:opacity-50", "[&_svg]:pointer-events-none", "[&_svg]:shrink-0", "[&_svg:not([class*=size-])]:size-4", className);
|
|
116
|
+
return /* @__PURE__ */ jsx(Menu.Item, {
|
|
117
|
+
"data-slot": "menubar-item",
|
|
118
|
+
"data-inset": inset,
|
|
119
|
+
"data-variant": variant,
|
|
120
|
+
className: classes,
|
|
121
|
+
...props
|
|
122
|
+
});
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Классы пунктов-переключателей: флажка и радиокнопки
|
|
126
|
+
*/
|
|
127
|
+
const toggleItemClasses = [
|
|
128
|
+
"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-1.5 pl-7 text-sm outline-hidden select-none",
|
|
129
|
+
"data-inset:pl-7 focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground",
|
|
130
|
+
"data-disabled:pointer-events-none data-disabled:opacity-50",
|
|
131
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4"
|
|
132
|
+
];
|
|
133
|
+
/**
|
|
134
|
+
* Пункт-флажок: включает и выключает настройку, отмечен галочкой справа
|
|
135
|
+
* @param props - пропсы пункта
|
|
136
|
+
* @returns div с role="menuitemcheckbox"
|
|
137
|
+
*/
|
|
138
|
+
function MenubarCheckboxItem({ className, children, inset, onCheckedChange, ...props }) {
|
|
139
|
+
const classes = cn(toggleItemClasses, className);
|
|
140
|
+
/**
|
|
141
|
+
* Отметку переключили: наружу только состояние
|
|
142
|
+
* @param checked - отмечен ли
|
|
143
|
+
*/
|
|
144
|
+
const handleCheckedChange = (checked) => onCheckedChange?.(checked);
|
|
145
|
+
return /* @__PURE__ */ jsxs(Menu.CheckboxItem, {
|
|
146
|
+
"data-slot": "menubar-checkbox-item",
|
|
147
|
+
"data-inset": inset,
|
|
148
|
+
className: classes,
|
|
149
|
+
onCheckedChange: handleCheckedChange,
|
|
150
|
+
...props,
|
|
151
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
152
|
+
"data-slot": "menubar-checkbox-item-indicator",
|
|
153
|
+
className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center",
|
|
154
|
+
children: /* @__PURE__ */ jsx(Menu.CheckboxItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
155
|
+
}), children]
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Группа радиокнопок: из пунктов внутри выбран один
|
|
160
|
+
* @param props - пропсы группы
|
|
161
|
+
* @returns div с role="group"
|
|
162
|
+
*/
|
|
163
|
+
function MenubarRadioGroup({ onValueChange, ...props }) {
|
|
164
|
+
/**
|
|
165
|
+
* Выбран другой пункт: наружу только значение
|
|
166
|
+
* @param value - значение пункта
|
|
167
|
+
*/
|
|
168
|
+
const handleValueChange = (value) => onValueChange?.(value);
|
|
169
|
+
return /* @__PURE__ */ jsx(Menu.RadioGroup, {
|
|
170
|
+
"data-slot": "menubar-radio-group",
|
|
171
|
+
onValueChange: handleValueChange,
|
|
172
|
+
...props
|
|
173
|
+
});
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* Пункт-радиокнопка: выбранный отмечен галочкой справа
|
|
177
|
+
* @param props - пропсы пункта
|
|
178
|
+
* @returns div с role="menuitemradio"
|
|
179
|
+
*/
|
|
180
|
+
function MenubarRadioItem({ className, children, inset, ...props }) {
|
|
181
|
+
const classes = cn(toggleItemClasses, className);
|
|
182
|
+
return /* @__PURE__ */ jsxs(Menu.RadioItem, {
|
|
183
|
+
"data-slot": "menubar-radio-item",
|
|
184
|
+
"data-inset": inset,
|
|
185
|
+
className: classes,
|
|
186
|
+
...props,
|
|
187
|
+
children: [/* @__PURE__ */ jsx("span", {
|
|
188
|
+
"data-slot": "menubar-radio-item-indicator",
|
|
189
|
+
className: "pointer-events-none absolute left-1.5 flex size-4 items-center justify-center",
|
|
190
|
+
children: /* @__PURE__ */ jsx(Menu.RadioItemIndicator, { children: /* @__PURE__ */ jsx(CheckIcon, {}) })
|
|
191
|
+
}), children]
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Подпись: заголовок группы пунктов, не выбирается. Кладётся внутрь MenubarGroup
|
|
196
|
+
* или MenubarRadioGroup
|
|
197
|
+
* @param props - пропсы подписи
|
|
198
|
+
* @returns div
|
|
199
|
+
*/
|
|
200
|
+
function MenubarLabel({ className, inset, ...props }) {
|
|
201
|
+
const classes = cn("px-1.5", "py-1", "text-sm", "font-medium", "data-inset:pl-7", className);
|
|
202
|
+
return /* @__PURE__ */ jsx(Menu.GroupLabel, {
|
|
203
|
+
"data-slot": "menubar-label",
|
|
204
|
+
"data-inset": inset,
|
|
205
|
+
className: classes,
|
|
206
|
+
...props
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
/**
|
|
210
|
+
* Разделитель: линия между группами пунктов
|
|
211
|
+
* @param props - пропсы разделителя
|
|
212
|
+
* @returns div с role="separator"
|
|
213
|
+
*/
|
|
214
|
+
function MenubarSeparator({ className, ...props }) {
|
|
215
|
+
const classes = cn("-mx-1", "my-1", "h-px", "bg-border", className);
|
|
216
|
+
return /* @__PURE__ */ jsx(Menu.Separator, {
|
|
217
|
+
"data-slot": "menubar-separator",
|
|
218
|
+
className: classes,
|
|
219
|
+
...props
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
/**
|
|
223
|
+
* Сочетание клавиш: подсказка справа в пункте. Само сочетание не обрабатывает
|
|
224
|
+
* @param props - пропсы сочетания
|
|
225
|
+
* @returns span
|
|
226
|
+
*/
|
|
227
|
+
function MenubarShortcut({ className, ...props }) {
|
|
228
|
+
const classes = cn("ml-auto", "text-xs", "tracking-widest", "text-muted-foreground", "group-focus/menubar-item:text-accent-foreground", className);
|
|
229
|
+
return /* @__PURE__ */ jsx("span", {
|
|
230
|
+
"data-slot": "menubar-shortcut",
|
|
231
|
+
className: classes,
|
|
232
|
+
...props
|
|
233
|
+
});
|
|
234
|
+
}
|
|
235
|
+
/**
|
|
236
|
+
* Подменю: вложенный список, открывается из пункта
|
|
237
|
+
* @param props - пропсы подменю
|
|
238
|
+
* @returns корень без своей разметки
|
|
239
|
+
*/
|
|
240
|
+
function MenubarSub({ onOpenChange, ...props }) {
|
|
241
|
+
/**
|
|
242
|
+
* Подменю открыли или закрыли: наружу только флаг
|
|
243
|
+
* @param open - открыто ли
|
|
244
|
+
*/
|
|
245
|
+
const handleOpenChange = (open) => onOpenChange?.(open);
|
|
246
|
+
return /* @__PURE__ */ jsx(Menu.SubmenuRoot, {
|
|
247
|
+
"data-slot": "menubar-sub",
|
|
248
|
+
onOpenChange: handleOpenChange,
|
|
249
|
+
...props
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* Пункт, открывающий подменю: со стрелкой справа
|
|
254
|
+
* @param props - пропсы пункта
|
|
255
|
+
* @returns div с role="menuitem"
|
|
256
|
+
*/
|
|
257
|
+
function MenubarSubTrigger({ className, inset, children, ...props }) {
|
|
258
|
+
const classes = cn("flex", "cursor-default", "items-center", "gap-1.5", "rounded-md", "px-1.5", "py-1", "text-sm", "outline-hidden", "select-none", "data-inset:pl-7", "focus:bg-accent", "focus:text-accent-foreground", "not-data-[variant=destructive]:focus:**:text-accent-foreground", "data-popup-open:bg-accent", "data-popup-open:text-accent-foreground", "[&_svg]:pointer-events-none", "[&_svg]:shrink-0", "[&_svg:not([class*=size-])]:size-4", className);
|
|
259
|
+
return /* @__PURE__ */ jsxs(Menu.SubmenuTrigger, {
|
|
260
|
+
"data-slot": "menubar-sub-trigger",
|
|
261
|
+
"data-inset": inset,
|
|
262
|
+
className: classes,
|
|
263
|
+
...props,
|
|
264
|
+
children: [children, /* @__PURE__ */ jsx(ChevronRightIcon, { className: "ml-auto" })]
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
/**
|
|
268
|
+
* Содержимое подменю: появляется сбоку от пункта
|
|
269
|
+
* @param props - пропсы содержимого; по умолчанию side="right", align="start"
|
|
270
|
+
* @returns портал с подменю
|
|
271
|
+
*/
|
|
272
|
+
function MenubarSubContent({ className, side = "right", sideOffset = 0, align = "start", alignOffset = -3, ...props }) {
|
|
273
|
+
const classes = cn("w-auto", "min-w-32", "shadow-lg", className);
|
|
274
|
+
return /* @__PURE__ */ jsx(MenubarContent, {
|
|
275
|
+
"data-slot": "menubar-sub-content",
|
|
276
|
+
side,
|
|
277
|
+
sideOffset,
|
|
278
|
+
align,
|
|
279
|
+
alignOffset,
|
|
280
|
+
className: classes,
|
|
281
|
+
...props
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
export { Menubar$1 as Menubar, MenubarCheckboxItem, MenubarContent, MenubarGroup, MenubarItem, MenubarLabel, MenubarMenu, MenubarPortal, MenubarRadioGroup, MenubarRadioItem, MenubarSeparator, MenubarShortcut, MenubarSub, MenubarSubContent, MenubarSubTrigger, MenubarTrigger };
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { PartPropsT } from "../../lib/part-props.js";
|
|
2
|
+
import { FloatingPropsT } from "../../lib/floating.js";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
import { Menu } from "@base-ui/react/menu";
|
|
5
|
+
import { Menubar } from "@base-ui/react/menubar";
|
|
6
|
+
/**
|
|
7
|
+
* Пропсы строки меню
|
|
8
|
+
*/
|
|
9
|
+
export type MenubarPropsT = PartPropsT<Menubar.Props> & {
|
|
10
|
+
/** Стрелки переходят с последнего меню на первое и обратно. По умолчанию true */
|
|
11
|
+
loopFocus?: boolean;
|
|
12
|
+
/** Отключить все меню строки */
|
|
13
|
+
disabled?: boolean;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Пропсы меню в строке
|
|
17
|
+
*/
|
|
18
|
+
export type MenubarMenuPropsT = Omit<Menu.Root.Props, 'onOpenChange'> & {
|
|
19
|
+
/** Меню открыто — контролируемый режим, вместе с onOpenChange */
|
|
20
|
+
open?: boolean;
|
|
21
|
+
/** Меню открыто при первом рендере — неконтролируемый режим */
|
|
22
|
+
defaultOpen?: boolean;
|
|
23
|
+
/** Меню открыли или закрыли: новое состояние */
|
|
24
|
+
onOpenChange?: (open: boolean) => void;
|
|
25
|
+
};
|
|
26
|
+
/**
|
|
27
|
+
* Пропсы портала
|
|
28
|
+
*/
|
|
29
|
+
export type MenubarPortalPropsT = Menu.Portal.Props;
|
|
30
|
+
/**
|
|
31
|
+
* Пропсы кнопки открытия
|
|
32
|
+
*/
|
|
33
|
+
export type MenubarTriggerPropsT = PartPropsT<Menu.Trigger.Props> & {};
|
|
34
|
+
/**
|
|
35
|
+
* Пропсы содержимого меню
|
|
36
|
+
*/
|
|
37
|
+
export type MenubarContentPropsT = PartPropsT<Menu.Popup.Props> & FloatingPropsT;
|
|
38
|
+
/**
|
|
39
|
+
* Пропсы группы пунктов
|
|
40
|
+
*/
|
|
41
|
+
export type MenubarGroupPropsT = PartPropsT<Menu.Group.Props>;
|
|
42
|
+
/**
|
|
43
|
+
* Вариант оформления пункта
|
|
44
|
+
*/
|
|
45
|
+
export type MenubarItemVariantT = 'default' | 'destructive';
|
|
46
|
+
/**
|
|
47
|
+
* Пропсы пункта меню
|
|
48
|
+
*/
|
|
49
|
+
export type MenubarItemPropsT = PartPropsT<Menu.Item.Props> & {
|
|
50
|
+
/** Отступ слева под иконку, чтобы выровнять с пунктами с иконками */
|
|
51
|
+
inset?: boolean;
|
|
52
|
+
/** Вариант оформления: destructive — красный, для опасных действий */
|
|
53
|
+
variant?: MenubarItemVariantT;
|
|
54
|
+
/** Отключить пункт */
|
|
55
|
+
disabled?: boolean;
|
|
56
|
+
/** Закрывать меню после нажатия. По умолчанию true */
|
|
57
|
+
closeOnClick?: boolean;
|
|
58
|
+
/** Текст для поиска набором букв, если содержимое пункта — не просто текст */
|
|
59
|
+
label?: string;
|
|
60
|
+
};
|
|
61
|
+
/**
|
|
62
|
+
* Пропсы пункта-флажка
|
|
63
|
+
*/
|
|
64
|
+
export type MenubarCheckboxItemPropsT = PartPropsT<Omit<Menu.CheckboxItem.Props, 'onCheckedChange'>> & {
|
|
65
|
+
/** Отступ слева под иконку, чтобы выровнять с пунктами с иконками */
|
|
66
|
+
inset?: boolean;
|
|
67
|
+
/** Отмечен ли пункт — контролируемый режим, вместе с onCheckedChange */
|
|
68
|
+
checked?: boolean;
|
|
69
|
+
/** Отмечен ли пункт при первом рендере — неконтролируемый режим */
|
|
70
|
+
defaultChecked?: boolean;
|
|
71
|
+
/** Отметку переключили: новое состояние */
|
|
72
|
+
onCheckedChange?: (checked: boolean) => void;
|
|
73
|
+
/** Отключить пункт */
|
|
74
|
+
disabled?: boolean;
|
|
75
|
+
/** Закрывать меню после выбора. По умолчанию false — меню остаётся открытым, чтобы выбрать несколько */
|
|
76
|
+
closeOnClick?: boolean;
|
|
77
|
+
/** Текст для поиска набором букв, если содержимое пункта — не просто текст */
|
|
78
|
+
label?: string;
|
|
79
|
+
};
|
|
80
|
+
/**
|
|
81
|
+
* Пропсы группы радиокнопок
|
|
82
|
+
*/
|
|
83
|
+
export type MenubarRadioGroupPropsT = PartPropsT<Omit<Menu.RadioGroup.Props, 'value' | 'defaultValue' | 'onValueChange'>> & {
|
|
84
|
+
/** Значение выбранного пункта — контролируемый режим, вместе с onValueChange */
|
|
85
|
+
value?: string;
|
|
86
|
+
/** Значение выбранного пункта при первом рендере — неконтролируемый режим */
|
|
87
|
+
defaultValue?: string;
|
|
88
|
+
/** Выбран другой пункт: его значение */
|
|
89
|
+
onValueChange?: (value: string) => void;
|
|
90
|
+
};
|
|
91
|
+
/**
|
|
92
|
+
* Пропсы пункта-радиокнопки
|
|
93
|
+
*/
|
|
94
|
+
export type MenubarRadioItemPropsT = PartPropsT<Omit<Menu.RadioItem.Props, 'value'>> & {
|
|
95
|
+
/** Значение пункта: попадает в value группы при выборе */
|
|
96
|
+
value: string;
|
|
97
|
+
/** Отступ слева под иконку, чтобы выровнять с пунктами с иконками */
|
|
98
|
+
inset?: boolean;
|
|
99
|
+
/** Отключить пункт */
|
|
100
|
+
disabled?: boolean;
|
|
101
|
+
/** Закрывать меню после выбора. По умолчанию false — меню остаётся открытым */
|
|
102
|
+
closeOnClick?: boolean;
|
|
103
|
+
/** Текст для поиска набором букв, если содержимое пункта — не просто текст */
|
|
104
|
+
label?: string;
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* Пропсы подписи
|
|
108
|
+
*/
|
|
109
|
+
export type MenubarLabelPropsT = PartPropsT<Menu.GroupLabel.Props> & {
|
|
110
|
+
/** Отступ слева под иконку, чтобы выровнять с пунктами с иконками */
|
|
111
|
+
inset?: boolean;
|
|
112
|
+
};
|
|
113
|
+
/**
|
|
114
|
+
* Пропсы разделителя
|
|
115
|
+
*/
|
|
116
|
+
export type MenubarSeparatorPropsT = PartPropsT<Menu.Separator.Props>;
|
|
117
|
+
/**
|
|
118
|
+
* Пропсы сочетания клавиш
|
|
119
|
+
*/
|
|
120
|
+
export type MenubarShortcutPropsT = ComponentProps<'span'>;
|
|
121
|
+
/**
|
|
122
|
+
* Пропсы подменю
|
|
123
|
+
*/
|
|
124
|
+
export type MenubarSubPropsT = Omit<Menu.SubmenuRoot.Props, 'onOpenChange'> & {
|
|
125
|
+
/** Подменю открыто — контролируемый режим, вместе с onOpenChange */
|
|
126
|
+
open?: boolean;
|
|
127
|
+
/** Подменю открыто при первом рендере — неконтролируемый режим */
|
|
128
|
+
defaultOpen?: boolean;
|
|
129
|
+
/** Подменю открыли или закрыли: новое состояние */
|
|
130
|
+
onOpenChange?: (open: boolean) => void;
|
|
131
|
+
};
|
|
132
|
+
/**
|
|
133
|
+
* Пропсы пункта, открывающего подменю
|
|
134
|
+
*/
|
|
135
|
+
export type MenubarSubTriggerPropsT = PartPropsT<Menu.SubmenuTrigger.Props> & {
|
|
136
|
+
/** Отступ слева под иконку, чтобы выровнять с пунктами с иконками */
|
|
137
|
+
inset?: boolean;
|
|
138
|
+
/** Отключить пункт */
|
|
139
|
+
disabled?: boolean;
|
|
140
|
+
/** Текст для поиска набором букв, если содержимое пункта — не просто текст */
|
|
141
|
+
label?: string;
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Пропсы содержимого подменю
|
|
145
|
+
*/
|
|
146
|
+
export type MenubarSubContentPropsT = MenubarContentPropsT;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { MessageAlignT, MessageAvatarPropsT, MessageContentPropsT, MessageFooterPropsT, MessageGroupPropsT, MessageHeaderPropsT, MessagePropsT } from "./types.js";
|
|
2
|
+
import { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader } from "./message.js";
|
|
3
|
+
export { Message, type MessageAlignT, MessageAvatar, type MessageAvatarPropsT, MessageContent, type MessageContentPropsT, MessageFooter, type MessageFooterPropsT, MessageGroup, type MessageGroupPropsT, MessageHeader, type MessageHeaderPropsT, type MessagePropsT };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader } from "./message.js";
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { MessageAvatarPropsT, MessageContentPropsT, MessageFooterPropsT, MessageGroupPropsT, MessageHeaderPropsT, MessagePropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Группа сообщений одного автора подряд
|
|
4
|
+
* @param props - пропсы группы
|
|
5
|
+
* @returns колонка сообщений
|
|
6
|
+
*/
|
|
7
|
+
export declare function MessageGroup({ className, ...props }: MessageGroupPropsT): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Сообщение чата: аватар и содержимое (пузырь, заголовок, подвал)
|
|
10
|
+
* @param props - пропсы сообщения
|
|
11
|
+
* @returns строка сообщения
|
|
12
|
+
*/
|
|
13
|
+
export declare function Message({ className, align, ...props }: MessagePropsT): import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Аватар автора: внизу у последней строки, над подвалом, если он есть
|
|
16
|
+
* @param props - пропсы аватара
|
|
17
|
+
* @returns круглый контейнер аватара
|
|
18
|
+
*/
|
|
19
|
+
export declare function MessageAvatar({ className, ...props }: MessageAvatarPropsT): import("react").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Содержимое сообщения: заголовок, пузыри, вложения и подвал в колонку
|
|
22
|
+
* @param props - пропсы содержимого
|
|
23
|
+
* @returns колонка содержимого
|
|
24
|
+
*/
|
|
25
|
+
export declare function MessageContent({ className, ...props }: MessageContentPropsT): import("react").JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Заголовок сообщения: имя автора, время
|
|
28
|
+
* @param props - пропсы заголовка
|
|
29
|
+
* @returns строка заголовка
|
|
30
|
+
*/
|
|
31
|
+
export declare function MessageHeader({ className, ...props }: MessageHeaderPropsT): import("react").JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Подвал сообщения: статус доставки, действия
|
|
34
|
+
* @param props - пропсы подвала
|
|
35
|
+
* @returns строка подвала
|
|
36
|
+
*/
|
|
37
|
+
export declare function MessageFooter({ className, ...props }: MessageFooterPropsT): import("react").JSX.Element;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
// src/components/message/message.tsx
|
|
4
|
+
/**
|
|
5
|
+
* Группа сообщений одного автора подряд
|
|
6
|
+
* @param props - пропсы группы
|
|
7
|
+
* @returns колонка сообщений
|
|
8
|
+
*/
|
|
9
|
+
function MessageGroup({ className, ...props }) {
|
|
10
|
+
const classes = cn("flex", "min-w-0", "flex-col", "gap-2", className);
|
|
11
|
+
return /* @__PURE__ */ jsx("div", {
|
|
12
|
+
"data-slot": "message-group",
|
|
13
|
+
className: classes,
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Сообщение чата: аватар и содержимое (пузырь, заголовок, подвал)
|
|
19
|
+
* @param props - пропсы сообщения
|
|
20
|
+
* @returns строка сообщения
|
|
21
|
+
*/
|
|
22
|
+
function Message({ className, align = "start", ...props }) {
|
|
23
|
+
const classes = cn("group/message", "relative", "flex", "w-full", "min-w-0", "gap-2", "text-sm", "data-[align=end]:flex-row-reverse", className);
|
|
24
|
+
return /* @__PURE__ */ jsx("div", {
|
|
25
|
+
"data-slot": "message",
|
|
26
|
+
"data-align": align,
|
|
27
|
+
className: classes,
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Аватар автора: внизу у последней строки, над подвалом, если он есть
|
|
33
|
+
* @param props - пропсы аватара
|
|
34
|
+
* @returns круглый контейнер аватара
|
|
35
|
+
*/
|
|
36
|
+
function MessageAvatar({ className, ...props }) {
|
|
37
|
+
const classes = cn("flex", "w-fit", "min-w-8", "shrink-0", "items-center", "justify-center", "self-end", "overflow-hidden", "rounded-full", "bg-muted", "group-has-data-[slot=message-footer]/message:-translate-y-8", className);
|
|
38
|
+
return /* @__PURE__ */ jsx("div", {
|
|
39
|
+
"data-slot": "message-avatar",
|
|
40
|
+
className: classes,
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Содержимое сообщения: заголовок, пузыри, вложения и подвал в колонку
|
|
46
|
+
* @param props - пропсы содержимого
|
|
47
|
+
* @returns колонка содержимого
|
|
48
|
+
*/
|
|
49
|
+
function MessageContent({ className, ...props }) {
|
|
50
|
+
const classes = cn("flex", "w-full", "min-w-0", "flex-col", "gap-2.5", "wrap-break-word", "group-data-[align=end]/message:*:data-slot:self-end", className);
|
|
51
|
+
return /* @__PURE__ */ jsx("div", {
|
|
52
|
+
"data-slot": "message-content",
|
|
53
|
+
className: classes,
|
|
54
|
+
...props
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Заголовок сообщения: имя автора, время
|
|
59
|
+
* @param props - пропсы заголовка
|
|
60
|
+
* @returns строка заголовка
|
|
61
|
+
*/
|
|
62
|
+
function MessageHeader({ className, ...props }) {
|
|
63
|
+
const classes = cn("flex", "max-w-full", "min-w-0", "items-center", "px-3", "text-xs", "font-medium", "text-muted-foreground", "group-has-data-[variant=ghost]/message:px-0", className);
|
|
64
|
+
return /* @__PURE__ */ jsx("div", {
|
|
65
|
+
"data-slot": "message-header",
|
|
66
|
+
className: classes,
|
|
67
|
+
...props
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Подвал сообщения: статус доставки, действия
|
|
72
|
+
* @param props - пропсы подвала
|
|
73
|
+
* @returns строка подвала
|
|
74
|
+
*/
|
|
75
|
+
function MessageFooter({ className, ...props }) {
|
|
76
|
+
const classes = cn("flex", "max-w-full", "min-w-0", "items-center", "px-3", "text-xs", "font-medium", "text-muted-foreground", "group-has-data-[variant=ghost]/message:px-0", "group-data-[align=end]/message:justify-end", className);
|
|
77
|
+
return /* @__PURE__ */ jsx("div", {
|
|
78
|
+
"data-slot": "message-footer",
|
|
79
|
+
className: classes,
|
|
80
|
+
...props
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
export { Message, MessageAvatar, MessageContent, MessageFooter, MessageGroup, MessageHeader };
|