@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,18 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
// src/components/morph-image/types.ts
|
|
3
|
+
/**
|
|
4
|
+
* Стили частей: кнопка-миниатюра, затемнение, слой и раскрытое изображение.
|
|
5
|
+
* Экспортируются, чтобы оформить свой элемент так же: morphImageVariants({ part: 'backdrop' }).
|
|
6
|
+
*/
|
|
7
|
+
const morphImageVariants = cva("", {
|
|
8
|
+
variants: { part: {
|
|
9
|
+
trigger: ["block cursor-zoom-in rounded-lg outline-none", "focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50"],
|
|
10
|
+
image: "size-full rounded-[inherit] object-cover object-center",
|
|
11
|
+
backdrop: "fixed inset-0 z-50 cursor-zoom-out bg-black/80",
|
|
12
|
+
layer: "pointer-events-none fixed inset-0 z-50 flex items-center justify-center p-4",
|
|
13
|
+
expanded: ["pointer-events-auto block cursor-zoom-out rounded-lg outline-none", "focus-visible:ring-3 focus-visible:ring-ring/50"],
|
|
14
|
+
expandedImage: "max-h-[90vh] max-w-[90vw] rounded-[inherit] object-cover object-center"
|
|
15
|
+
} },
|
|
16
|
+
defaultVariants: { part: "trigger" }
|
|
17
|
+
});
|
|
18
|
+
export { morphImageVariants };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { NativeSelectOptGroupPropsT, NativeSelectOptionPropsT, NativeSelectPropsT, nativeSelectVariants } from "./types.js";
|
|
2
|
+
import { NativeSelect, NativeSelectOptGroup, NativeSelectOption } from "./native-select.js";
|
|
3
|
+
export { NativeSelect, NativeSelectOptGroup, type NativeSelectOptGroupPropsT, NativeSelectOption, type NativeSelectOptionPropsT, type NativeSelectPropsT, nativeSelectVariants };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { NativeSelectOptGroupPropsT, NativeSelectOptionPropsT, NativeSelectPropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Нативный список браузера в стилях библиотеки: для форм и мобильных экранов.
|
|
4
|
+
* className применяется к обёртке, остальные пропсы — к элементу select
|
|
5
|
+
* @param props - пропсы нативного списка
|
|
6
|
+
* @returns обёртка со списком и иконкой
|
|
7
|
+
*/
|
|
8
|
+
export declare function NativeSelect({ className, size, ...props }: NativeSelectPropsT): import("react").JSX.Element;
|
|
9
|
+
/**
|
|
10
|
+
* Пункт нативного списка
|
|
11
|
+
* @param props - пропсы пункта
|
|
12
|
+
* @returns элемент option
|
|
13
|
+
*/
|
|
14
|
+
export declare function NativeSelectOption({ className, ...props }: NativeSelectOptionPropsT): import("react").JSX.Element;
|
|
15
|
+
/**
|
|
16
|
+
* Группа пунктов нативного списка с подписью label
|
|
17
|
+
* @param props - пропсы группы
|
|
18
|
+
* @returns элемент optgroup
|
|
19
|
+
*/
|
|
20
|
+
export declare function NativeSelectOptGroup({ className, ...props }: NativeSelectOptGroupPropsT): import("react").JSX.Element;
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { nativeSelectVariants } from "./types.js";
|
|
3
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
// src/components/native-select/native-select.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Нативный список браузера в стилях библиотеки: для форм и мобильных экранов.
|
|
8
|
+
* className применяется к обёртке, остальные пропсы — к элементу select
|
|
9
|
+
* @param props - пропсы нативного списка
|
|
10
|
+
* @returns обёртка со списком и иконкой
|
|
11
|
+
*/
|
|
12
|
+
function NativeSelect({ className, size = "default", ...props }) {
|
|
13
|
+
const classes = cn("group/native-select", "relative", "w-fit", "has-[select:disabled]:opacity-50", className);
|
|
14
|
+
const selectClasses = nativeSelectVariants({ size });
|
|
15
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
16
|
+
"data-slot": "native-select-wrapper",
|
|
17
|
+
"data-size": size,
|
|
18
|
+
className: classes,
|
|
19
|
+
children: [/* @__PURE__ */ jsx("select", {
|
|
20
|
+
"data-slot": "native-select",
|
|
21
|
+
"data-size": size,
|
|
22
|
+
className: selectClasses,
|
|
23
|
+
...props
|
|
24
|
+
}), /* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
25
|
+
"data-slot": "native-select-icon",
|
|
26
|
+
"aria-hidden": true,
|
|
27
|
+
className: "pointer-events-none absolute top-1/2 right-2.5 size-4 -translate-y-1/2 text-muted-foreground select-none"
|
|
28
|
+
})]
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Пункт нативного списка
|
|
33
|
+
* @param props - пропсы пункта
|
|
34
|
+
* @returns элемент option
|
|
35
|
+
*/
|
|
36
|
+
function NativeSelectOption({ className, ...props }) {
|
|
37
|
+
const classes = cn("bg-[Canvas]", "text-[CanvasText]", className);
|
|
38
|
+
return /* @__PURE__ */ jsx("option", {
|
|
39
|
+
"data-slot": "native-select-option",
|
|
40
|
+
className: classes,
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Группа пунктов нативного списка с подписью label
|
|
46
|
+
* @param props - пропсы группы
|
|
47
|
+
* @returns элемент optgroup
|
|
48
|
+
*/
|
|
49
|
+
function NativeSelectOptGroup({ className, ...props }) {
|
|
50
|
+
const classes = cn("bg-[Canvas]", "text-[CanvasText]", className);
|
|
51
|
+
return /* @__PURE__ */ jsx("optgroup", {
|
|
52
|
+
"data-slot": "native-select-optgroup",
|
|
53
|
+
className: classes,
|
|
54
|
+
...props
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
export { NativeSelect, NativeSelectOptGroup, NativeSelectOption };
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
|
+
import { ChangeEvent, ComponentProps } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Стили нативного списка: поле select и его размер.
|
|
5
|
+
* Экспортируются, чтобы оформить так же другой элемент: nativeSelectVariants({ size: 'sm' }).
|
|
6
|
+
*/
|
|
7
|
+
export declare const nativeSelectVariants: (props?: ({
|
|
8
|
+
size?: "default" | "sm" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
/**
|
|
11
|
+
* Размеры нативного списка
|
|
12
|
+
*/
|
|
13
|
+
export type NativeSelectVariantsT = VariantProps<typeof nativeSelectVariants>;
|
|
14
|
+
/**
|
|
15
|
+
* Пропсы нативного списка
|
|
16
|
+
*/
|
|
17
|
+
export type NativeSelectPropsT = Omit<ComponentProps<'select'>, 'size' | 'value' | 'defaultValue' | 'disabled' | 'required' | 'multiple' | 'aria-invalid' | 'onChange'> & {
|
|
18
|
+
/** Размер: default или sm */
|
|
19
|
+
size?: NativeSelectVariantsT['size'];
|
|
20
|
+
/** Отключённое состояние: список не открывается */
|
|
21
|
+
disabled?: boolean;
|
|
22
|
+
/** Ошибка: красная рамка и кольцо */
|
|
23
|
+
'aria-invalid'?: boolean;
|
|
24
|
+
/** Выбранное значение (контролируемый режим) */
|
|
25
|
+
value?: string | string[];
|
|
26
|
+
/** Значение по умолчанию (неконтролируемый режим) */
|
|
27
|
+
defaultValue?: string | string[];
|
|
28
|
+
/** Обязательное поле: форма не отправится без выбора */
|
|
29
|
+
required?: boolean;
|
|
30
|
+
/** Выбор нескольких пунктов: список превращается в поле со списком */
|
|
31
|
+
multiple?: boolean;
|
|
32
|
+
/** Выбор пункта */
|
|
33
|
+
onChange?: (event: ChangeEvent<HTMLSelectElement>) => void;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* Пропсы пункта нативного списка
|
|
37
|
+
*/
|
|
38
|
+
export type NativeSelectOptionPropsT = Omit<ComponentProps<'option'>, 'value' | 'disabled'> & {
|
|
39
|
+
/** Значение пункта: уходит в value списка и в форму */
|
|
40
|
+
value?: string;
|
|
41
|
+
/** Отключённый пункт: его нельзя выбрать */
|
|
42
|
+
disabled?: boolean;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Пропсы группы пунктов нативного списка
|
|
46
|
+
*/
|
|
47
|
+
export type NativeSelectOptGroupPropsT = Omit<ComponentProps<'optgroup'>, 'label' | 'disabled'> & {
|
|
48
|
+
/** Подпись группы */
|
|
49
|
+
label?: string;
|
|
50
|
+
/** Отключённая группа: её пункты нельзя выбрать */
|
|
51
|
+
disabled?: boolean;
|
|
52
|
+
};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
// src/components/native-select/types.ts
|
|
3
|
+
/**
|
|
4
|
+
* Стили нативного списка: поле select и его размер.
|
|
5
|
+
* Экспортируются, чтобы оформить так же другой элемент: nativeSelectVariants({ size: 'sm' }).
|
|
6
|
+
*/
|
|
7
|
+
const nativeSelectVariants = cva([
|
|
8
|
+
"h-8 w-full min-w-0 appearance-none rounded-lg border border-input bg-transparent py-1 pr-8 pl-2.5",
|
|
9
|
+
"text-sm transition-colors outline-none select-none",
|
|
10
|
+
"placeholder:text-muted-foreground selection:bg-primary selection:text-primary-foreground",
|
|
11
|
+
"dark:bg-input/30 dark:hover:bg-input/50",
|
|
12
|
+
"focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50",
|
|
13
|
+
"aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20",
|
|
14
|
+
"dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40",
|
|
15
|
+
"disabled:pointer-events-none disabled:cursor-not-allowed"
|
|
16
|
+
], {
|
|
17
|
+
variants: { size: {
|
|
18
|
+
default: "",
|
|
19
|
+
sm: "h-7 rounded-[min(var(--radius-md),10px)] py-0.5"
|
|
20
|
+
} },
|
|
21
|
+
defaultVariants: { size: "default" }
|
|
22
|
+
});
|
|
23
|
+
export { nativeSelectVariants };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { NavigationMenuContentPropsT, NavigationMenuIndicatorPropsT, NavigationMenuItemPropsT, NavigationMenuLinkPropsT, NavigationMenuListPropsT, NavigationMenuPositionerPropsT, NavigationMenuPropsT, NavigationMenuTriggerPropsT, navigationMenuTriggerStyle } from "./types.js";
|
|
2
|
+
import { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger } from "./navigation-menu.js";
|
|
3
|
+
export { NavigationMenu, NavigationMenuContent, type NavigationMenuContentPropsT, NavigationMenuIndicator, type NavigationMenuIndicatorPropsT, NavigationMenuItem, type NavigationMenuItemPropsT, NavigationMenuLink, type NavigationMenuLinkPropsT, NavigationMenuList, type NavigationMenuListPropsT, NavigationMenuPositioner, type NavigationMenuPositionerPropsT, type NavigationMenuPropsT, NavigationMenuTrigger, type NavigationMenuTriggerPropsT, navigationMenuTriggerStyle };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { navigationMenuTriggerStyle } from "./types.js";
|
|
2
|
+
import { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger } from "./navigation-menu.js";
|
|
3
|
+
export { NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger, navigationMenuTriggerStyle };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { NavigationMenuContentPropsT, NavigationMenuIndicatorPropsT, NavigationMenuItemPropsT, NavigationMenuLinkPropsT, NavigationMenuListPropsT, NavigationMenuPositionerPropsT, NavigationMenuPropsT, NavigationMenuTriggerPropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Меню навигации: ссылки по разделам сайта с выпадающими панелями в общем окне
|
|
4
|
+
* @param props - пропсы меню
|
|
5
|
+
* @returns nav
|
|
6
|
+
*/
|
|
7
|
+
export declare function NavigationMenu({ align, className, children, onValueChange, ...props }: NavigationMenuPropsT): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Список пунктов меню
|
|
10
|
+
* @param props - пропсы списка
|
|
11
|
+
* @returns ul
|
|
12
|
+
*/
|
|
13
|
+
export declare function NavigationMenuList({ className, ...props }: NavigationMenuListPropsT): import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Пункт меню: кнопка с панелью или ссылка
|
|
16
|
+
* @param props - пропсы пункта
|
|
17
|
+
* @returns li
|
|
18
|
+
*/
|
|
19
|
+
export declare function NavigationMenuItem({ className, ...props }: NavigationMenuItemPropsT): import("react").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Кнопка пункта: открывает панель при наведении и нажатии, со стрелкой
|
|
22
|
+
* @param props - пропсы кнопки
|
|
23
|
+
* @returns кнопка
|
|
24
|
+
*/
|
|
25
|
+
export declare function NavigationMenuTrigger({ className, children, ...props }: NavigationMenuTriggerPropsT): import("react").JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Панель пункта: проявляется в общем окне со сдвигом в сторону движения курсора
|
|
28
|
+
* @param props - пропсы панели
|
|
29
|
+
* @returns div
|
|
30
|
+
*/
|
|
31
|
+
export declare function NavigationMenuContent({ className, ...props }: NavigationMenuContentPropsT): import("react").JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Окно с панелями: появляется под открытым пунктом, плавно перемещается и меняет размер
|
|
34
|
+
* при переходе между пунктами. Рендерится в NavigationMenu сам
|
|
35
|
+
* @param props - пропсы окна
|
|
36
|
+
* @returns портал с окном
|
|
37
|
+
*/
|
|
38
|
+
export declare function NavigationMenuPositioner({ className, side, sideOffset, align, alignOffset, ...props }: NavigationMenuPositionerPropsT): import("react").JSX.Element;
|
|
39
|
+
/**
|
|
40
|
+
* Ссылка меню: в панели или на верхнем уровне. Ссылку роутера передают через render={<Link href />}
|
|
41
|
+
* @param props - пропсы ссылки
|
|
42
|
+
* @returns a
|
|
43
|
+
*/
|
|
44
|
+
export declare function NavigationMenuLink({ className, ...props }: NavigationMenuLinkPropsT): import("react").JSX.Element;
|
|
45
|
+
/**
|
|
46
|
+
* Указатель: стрелка под открытым пунктом
|
|
47
|
+
* @param props - пропсы указателя
|
|
48
|
+
* @returns span
|
|
49
|
+
*/
|
|
50
|
+
export declare function NavigationMenuIndicator({ className, ...props }: NavigationMenuIndicatorPropsT): import("react").JSX.Element;
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { navigationMenuTriggerStyle } from "./types.js";
|
|
4
|
+
import { ChevronDownIcon } from "lucide-react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
import { NavigationMenu } from "@base-ui/react/navigation-menu";
|
|
7
|
+
// src/components/navigation-menu/navigation-menu.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Меню навигации: ссылки по разделам сайта с выпадающими панелями в общем окне
|
|
10
|
+
* @param props - пропсы меню
|
|
11
|
+
* @returns nav
|
|
12
|
+
*/
|
|
13
|
+
function NavigationMenu$1({ align = "start", className, children, onValueChange, ...props }) {
|
|
14
|
+
const classes = cn("group/navigation-menu", "relative", "flex", "max-w-max", "flex-1", "items-center", "justify-center", className);
|
|
15
|
+
/**
|
|
16
|
+
* Открыт другой пункт: наружу только значение
|
|
17
|
+
* @param value - значение пункта или null
|
|
18
|
+
*/
|
|
19
|
+
const handleValueChange = (value) => {
|
|
20
|
+
onValueChange?.(value);
|
|
21
|
+
};
|
|
22
|
+
return /* @__PURE__ */ jsxs(NavigationMenu.Root, {
|
|
23
|
+
"data-slot": "navigation-menu",
|
|
24
|
+
className: classes,
|
|
25
|
+
onValueChange: handleValueChange,
|
|
26
|
+
...props,
|
|
27
|
+
children: [children, /* @__PURE__ */ jsx(NavigationMenuPositioner, { align })]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Список пунктов меню
|
|
32
|
+
* @param props - пропсы списка
|
|
33
|
+
* @returns ul
|
|
34
|
+
*/
|
|
35
|
+
function NavigationMenuList({ className, ...props }) {
|
|
36
|
+
const classes = cn("group", "flex", "flex-1", "list-none", "items-center", "justify-center", "gap-0", className);
|
|
37
|
+
return /* @__PURE__ */ jsx(NavigationMenu.List, {
|
|
38
|
+
"data-slot": "navigation-menu-list",
|
|
39
|
+
className: classes,
|
|
40
|
+
...props
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Пункт меню: кнопка с панелью или ссылка
|
|
45
|
+
* @param props - пропсы пункта
|
|
46
|
+
* @returns li
|
|
47
|
+
*/
|
|
48
|
+
function NavigationMenuItem({ className, ...props }) {
|
|
49
|
+
const classes = cn("relative", className);
|
|
50
|
+
return /* @__PURE__ */ jsx(NavigationMenu.Item, {
|
|
51
|
+
"data-slot": "navigation-menu-item",
|
|
52
|
+
className: classes,
|
|
53
|
+
...props
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Кнопка пункта: открывает панель при наведении и нажатии, со стрелкой
|
|
58
|
+
* @param props - пропсы кнопки
|
|
59
|
+
* @returns кнопка
|
|
60
|
+
*/
|
|
61
|
+
function NavigationMenuTrigger({ className, children, ...props }) {
|
|
62
|
+
const classes = cn(navigationMenuTriggerStyle(), "group", className);
|
|
63
|
+
const iconClasses = cn("relative", "top-px", "ml-1", "size-3", "transition", "duration-300", "group-data-popup-open/navigation-menu-trigger:rotate-180");
|
|
64
|
+
return /* @__PURE__ */ jsxs(NavigationMenu.Trigger, {
|
|
65
|
+
"data-slot": "navigation-menu-trigger",
|
|
66
|
+
className: classes,
|
|
67
|
+
...props,
|
|
68
|
+
children: [
|
|
69
|
+
children,
|
|
70
|
+
" ",
|
|
71
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
72
|
+
"aria-hidden": true,
|
|
73
|
+
className: iconClasses
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* Панель пункта: проявляется в общем окне со сдвигом в сторону движения курсора
|
|
80
|
+
* @param props - пропсы панели
|
|
81
|
+
* @returns div
|
|
82
|
+
*/
|
|
83
|
+
function NavigationMenuContent({ className, ...props }) {
|
|
84
|
+
const classes = cn("h-full", "w-auto", "p-1", "transition-[opacity,transform,translate]", "duration-[0.35s]", "ease-[cubic-bezier(0.22,1,0.36,1)]", "data-starting-style:opacity-0", "data-ending-style:opacity-0", "data-starting-style:data-[activation-direction=left]:-translate-x-1/2", "data-starting-style:data-[activation-direction=right]:translate-x-1/2", "data-ending-style:data-[activation-direction=left]:translate-x-1/2", "data-ending-style:data-[activation-direction=right]:-translate-x-1/2", "**:data-[slot=navigation-menu-link]:focus:ring-0", "**:data-[slot=navigation-menu-link]:focus:outline-none", className);
|
|
85
|
+
return /* @__PURE__ */ jsx(NavigationMenu.Content, {
|
|
86
|
+
"data-slot": "navigation-menu-content",
|
|
87
|
+
className: classes,
|
|
88
|
+
...props
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Окно с панелями: появляется под открытым пунктом, плавно перемещается и меняет размер
|
|
93
|
+
* при переходе между пунктами. Рендерится в NavigationMenu сам
|
|
94
|
+
* @param props - пропсы окна
|
|
95
|
+
* @returns портал с окном
|
|
96
|
+
*/
|
|
97
|
+
function NavigationMenuPositioner({ className, side = "bottom", sideOffset = 8, align = "start", alignOffset = 0, ...props }) {
|
|
98
|
+
const classes = cn("isolate", "z-50", "h-(--positioner-height)", "w-(--positioner-width)", "max-w-(--available-width)", "transition-[top,left,right,bottom]", "duration-[0.35s]", "ease-[cubic-bezier(0.22,1,0.36,1)]", "data-instant:transition-none", "data-[side=bottom]:before:absolute", "data-[side=bottom]:before:inset-x-0", "data-[side=bottom]:before:-top-2.5", "data-[side=bottom]:before:h-2.5", "data-[side=bottom]:before:content-[\"\"]", className);
|
|
99
|
+
const popupClasses = cn("relative", "h-(--popup-height)", "w-(--popup-width)", "origin-(--transform-origin)", "rounded-lg", "bg-popover", "text-popover-foreground", "shadow", "ring-1", "ring-foreground/10", "outline-none", "transition-[opacity,transform,width,height,scale,translate]", "duration-[0.35s]", "ease-[cubic-bezier(0.22,1,0.36,1)]", "data-starting-style:scale-90", "data-starting-style:opacity-0", "data-ending-style:scale-90", "data-ending-style:opacity-0", "data-ending-style:duration-150", "data-ending-style:ease-[ease]");
|
|
100
|
+
return /* @__PURE__ */ jsx(NavigationMenu.Portal, { children: /* @__PURE__ */ jsx(NavigationMenu.Positioner, {
|
|
101
|
+
"data-slot": "navigation-menu-positioner",
|
|
102
|
+
side,
|
|
103
|
+
sideOffset,
|
|
104
|
+
align,
|
|
105
|
+
alignOffset,
|
|
106
|
+
className: classes,
|
|
107
|
+
...props,
|
|
108
|
+
children: /* @__PURE__ */ jsx(NavigationMenu.Popup, {
|
|
109
|
+
"data-slot": "navigation-menu-popup",
|
|
110
|
+
className: popupClasses,
|
|
111
|
+
children: /* @__PURE__ */ jsx(NavigationMenu.Viewport, {
|
|
112
|
+
"data-slot": "navigation-menu-viewport",
|
|
113
|
+
className: "relative size-full overflow-hidden"
|
|
114
|
+
})
|
|
115
|
+
})
|
|
116
|
+
}) });
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Ссылка меню: в панели или на верхнем уровне. Ссылку роутера передают через render={<Link href />}
|
|
120
|
+
* @param props - пропсы ссылки
|
|
121
|
+
* @returns a
|
|
122
|
+
*/
|
|
123
|
+
function NavigationMenuLink({ className, ...props }) {
|
|
124
|
+
const classes = cn("flex", "items-center", "gap-2", "rounded-lg", "p-2", "text-sm", "transition-all", "outline-none", "hover:bg-muted", "focus:bg-muted", "focus-visible:ring-3", "focus-visible:ring-ring/50", "focus-visible:outline-1", "data-active:bg-muted/50", "data-active:hover:bg-muted", "data-active:focus:bg-muted", "in-data-[slot=navigation-menu-content]:rounded-md", "[&_svg:not([class*=size-])]:size-4", className);
|
|
125
|
+
return /* @__PURE__ */ jsx(NavigationMenu.Link, {
|
|
126
|
+
"data-slot": "navigation-menu-link",
|
|
127
|
+
className: classes,
|
|
128
|
+
...props
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Указатель: стрелка под открытым пунктом
|
|
133
|
+
* @param props - пропсы указателя
|
|
134
|
+
* @returns span
|
|
135
|
+
*/
|
|
136
|
+
function NavigationMenuIndicator({ className, ...props }) {
|
|
137
|
+
const classes = cn("top-full", "z-1", "flex", "h-1.5", "items-end", "justify-center", "overflow-hidden", className);
|
|
138
|
+
return /* @__PURE__ */ jsx(NavigationMenu.Icon, {
|
|
139
|
+
"data-slot": "navigation-menu-indicator",
|
|
140
|
+
className: classes,
|
|
141
|
+
...props,
|
|
142
|
+
children: /* @__PURE__ */ jsx("div", { className: "relative top-[60%] h-2 w-2 rotate-45 rounded-tl-sm bg-border shadow-md" })
|
|
143
|
+
});
|
|
144
|
+
}
|
|
145
|
+
export { NavigationMenu$1 as NavigationMenu, NavigationMenuContent, NavigationMenuIndicator, NavigationMenuItem, NavigationMenuLink, NavigationMenuList, NavigationMenuPositioner, NavigationMenuTrigger };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { FloatingAlignT, FloatingSideT } from "../../lib/floating.js";
|
|
2
|
+
import { CSSProperties } from "react";
|
|
3
|
+
import { NavigationMenu } from "@base-ui/react/navigation-menu";
|
|
4
|
+
/**
|
|
5
|
+
* Стили кнопки пункта. Экспортируются, чтобы оформить так же ссылку верхнего уровня:
|
|
6
|
+
* <NavigationMenuLink className={navigationMenuTriggerStyle()}>
|
|
7
|
+
*/
|
|
8
|
+
export declare const navigationMenuTriggerStyle: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
9
|
+
/**
|
|
10
|
+
* Пропсы части: className только строкой, render и style описаны по-русски
|
|
11
|
+
*/
|
|
12
|
+
type PartPropsT<PropsT extends {
|
|
13
|
+
render?: unknown;
|
|
14
|
+
}> = Omit<PropsT, 'className' | 'render' | 'style'> & {
|
|
15
|
+
/** Классы элемента */
|
|
16
|
+
className?: string;
|
|
17
|
+
/** Свой элемент вместо стандартного: render={<a />}. Стили и пропсы переходят на него */
|
|
18
|
+
render?: PropsT['render'];
|
|
19
|
+
/** Инлайн-стили элемента */
|
|
20
|
+
style?: CSSProperties;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Пропсы меню навигации
|
|
24
|
+
*/
|
|
25
|
+
export type NavigationMenuPropsT = PartPropsT<Omit<NavigationMenu.Root.Props, 'value' | 'defaultValue' | 'onValueChange' | 'delay' | 'closeDelay'>> & {
|
|
26
|
+
/** Значение открытого пункта — контролируемый режим, вместе с onValueChange; null — все закрыты */
|
|
27
|
+
value?: string | null;
|
|
28
|
+
/** Значение открытого пункта при первом рендере — неконтролируемый режим */
|
|
29
|
+
defaultValue?: string | null;
|
|
30
|
+
/** Открыт другой пункт: его значение; null — все закрыты */
|
|
31
|
+
onValueChange?: (value: string | null) => void;
|
|
32
|
+
/** Задержка перед открытием при наведении в мс. По умолчанию 50 */
|
|
33
|
+
delay?: number;
|
|
34
|
+
/** Задержка перед закрытием, когда курсор ушёл, в мс. По умолчанию 50 */
|
|
35
|
+
closeDelay?: number;
|
|
36
|
+
/** Выравнивание окна относительно открытого пункта. По умолчанию start */
|
|
37
|
+
align?: FloatingAlignT;
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Пропсы списка пунктов
|
|
41
|
+
*/
|
|
42
|
+
export type NavigationMenuListPropsT = PartPropsT<NavigationMenu.List.Props>;
|
|
43
|
+
/**
|
|
44
|
+
* Пропсы пункта
|
|
45
|
+
*/
|
|
46
|
+
export type NavigationMenuItemPropsT = PartPropsT<Omit<NavigationMenu.Item.Props, 'value'>> & {
|
|
47
|
+
/** Значение пункта: попадает в value меню, когда он открыт. По умолчанию — автоматическое */
|
|
48
|
+
value?: string;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* Пропсы кнопки пункта
|
|
52
|
+
*/
|
|
53
|
+
export type NavigationMenuTriggerPropsT = PartPropsT<NavigationMenu.Trigger.Props>;
|
|
54
|
+
/**
|
|
55
|
+
* Пропсы панели пункта
|
|
56
|
+
*/
|
|
57
|
+
export type NavigationMenuContentPropsT = PartPropsT<NavigationMenu.Content.Props>;
|
|
58
|
+
/**
|
|
59
|
+
* Пропсы окна с панелями
|
|
60
|
+
*/
|
|
61
|
+
export type NavigationMenuPositionerPropsT = PartPropsT<Omit<NavigationMenu.Positioner.Props, 'side' | 'align'>> & {
|
|
62
|
+
/** Сторона относительно пункта. По умолчанию bottom */
|
|
63
|
+
side?: FloatingSideT;
|
|
64
|
+
/** Выравнивание относительно пункта. По умолчанию start */
|
|
65
|
+
align?: FloatingAlignT;
|
|
66
|
+
/** Отступ от пункта в px. По умолчанию 8 */
|
|
67
|
+
sideOffset?: number;
|
|
68
|
+
/** Сдвиг вдоль пункта в px. По умолчанию 0 */
|
|
69
|
+
alignOffset?: number;
|
|
70
|
+
};
|
|
71
|
+
/**
|
|
72
|
+
* Пропсы ссылки
|
|
73
|
+
*/
|
|
74
|
+
export type NavigationMenuLinkPropsT = PartPropsT<NavigationMenu.Link.Props>;
|
|
75
|
+
/**
|
|
76
|
+
* Пропсы указателя
|
|
77
|
+
*/
|
|
78
|
+
export type NavigationMenuIndicatorPropsT = PartPropsT<NavigationMenu.Icon.Props>;
|
|
79
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
// src/components/navigation-menu/types.ts
|
|
3
|
+
/**
|
|
4
|
+
* Стили кнопки пункта. Экспортируются, чтобы оформить так же ссылку верхнего уровня:
|
|
5
|
+
* <NavigationMenuLink className={navigationMenuTriggerStyle()}>
|
|
6
|
+
*/
|
|
7
|
+
const navigationMenuTriggerStyle = cva([
|
|
8
|
+
"group/navigation-menu-trigger inline-flex h-9 w-max items-center justify-center rounded-lg px-2.5 py-1.5",
|
|
9
|
+
"text-sm font-medium transition-all outline-none",
|
|
10
|
+
"hover:bg-muted focus:bg-muted data-popup-open:bg-muted/50 data-popup-open:hover:bg-muted",
|
|
11
|
+
"data-open:bg-muted/50 data-open:hover:bg-muted data-open:focus:bg-muted",
|
|
12
|
+
"focus-visible:ring-3 focus-visible:ring-ring/50 focus-visible:outline-1",
|
|
13
|
+
"disabled:pointer-events-none disabled:opacity-50"
|
|
14
|
+
]);
|
|
15
|
+
export { navigationMenuTriggerStyle };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { NumberStepperPropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Степпер: число с кнопками «−» и «+». Держите кнопку — значение меняется всё быстрее;
|
|
4
|
+
* стрелки ↑↓ меняют на step, Shift+стрелки и PageUp/PageDown — на largeStep, Home/End — к границам.
|
|
5
|
+
* Значение можно ввести с клавиатуры, цифры прокручиваются в сторону изменения
|
|
6
|
+
* @param props - пропсы степпера
|
|
7
|
+
* @returns степпер
|
|
8
|
+
*/
|
|
9
|
+
export declare function NumberStepper({ className, variant, size, orientation, value, defaultValue, onValueChange, onValueCommitted, format, min, max, label, disabled, 'aria-invalid': ariaInvalid, ...props }: NumberStepperPropsT): import("react").JSX.Element;
|