@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,39 @@
|
|
|
1
|
+
import { AvatarBadgePropsT, AvatarFallbackPropsT, AvatarGroupCountPropsT, AvatarGroupPropsT, AvatarImagePropsT, AvatarPropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Аватар: изображение пользователя с заглушкой на случай, если изображения нет
|
|
4
|
+
* @param props - пропсы аватара
|
|
5
|
+
* @returns круглый контейнер для AvatarImage, AvatarFallback и AvatarBadge
|
|
6
|
+
*/
|
|
7
|
+
export declare function Avatar({ className, size, ...props }: AvatarPropsT): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Изображение аватара: показывается только после успешной загрузки
|
|
10
|
+
* @param props - пропсы изображения
|
|
11
|
+
* @returns изображение
|
|
12
|
+
*/
|
|
13
|
+
export declare function AvatarImage({ className, ...props }: AvatarImagePropsT): import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Заглушка аватара: инициалы или иконка, пока изображение не загружено
|
|
16
|
+
* @param props - пропсы заглушки
|
|
17
|
+
* @returns заглушка
|
|
18
|
+
*/
|
|
19
|
+
export declare function AvatarFallback({ className, ...props }: AvatarFallbackPropsT): import("react").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Значок аватара: точка статуса или иконка в правом нижнем углу. Только у одиночного аватара:
|
|
22
|
+
* в AvatarGroup значок скрыт — у наложенных аватаров он вылезал бы поверх соседа
|
|
23
|
+
* @param props - пропсы значка
|
|
24
|
+
* @returns значок
|
|
25
|
+
*/
|
|
26
|
+
export declare function AvatarBadge({ className, ...props }: AvatarBadgePropsT): import("react").JSX.Element;
|
|
27
|
+
/**
|
|
28
|
+
* Группа аватаров: аватары с наложением друг на друга
|
|
29
|
+
* @param props - пропсы группы
|
|
30
|
+
* @returns группа
|
|
31
|
+
*/
|
|
32
|
+
export declare function AvatarGroup({ className, ...props }: AvatarGroupPropsT): import("react").JSX.Element;
|
|
33
|
+
/**
|
|
34
|
+
* Счётчик группы аватаров: сколько ещё участников не показано, например «+3».
|
|
35
|
+
* Размер повторяет размер аватаров группы
|
|
36
|
+
* @param props - пропсы счётчика
|
|
37
|
+
* @returns счётчик
|
|
38
|
+
*/
|
|
39
|
+
export declare function AvatarGroupCount({ className, ...props }: AvatarGroupCountPropsT): import("react").JSX.Element;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { avatarVariants } from "./types.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { Avatar } from "@base-ui/react/avatar";
|
|
6
|
+
// src/components/avatar/avatar.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Аватар: изображение пользователя с заглушкой на случай, если изображения нет
|
|
9
|
+
* @param props - пропсы аватара
|
|
10
|
+
* @returns круглый контейнер для AvatarImage, AvatarFallback и AvatarBadge
|
|
11
|
+
*/
|
|
12
|
+
function Avatar$1({ className, size = "default", ...props }) {
|
|
13
|
+
const classes = cn(avatarVariants({ size }), className);
|
|
14
|
+
return /* @__PURE__ */ jsx(Avatar.Root, {
|
|
15
|
+
"data-slot": "avatar",
|
|
16
|
+
"data-size": size,
|
|
17
|
+
className: classes,
|
|
18
|
+
...props
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Изображение аватара: показывается только после успешной загрузки
|
|
23
|
+
* @param props - пропсы изображения
|
|
24
|
+
* @returns изображение
|
|
25
|
+
*/
|
|
26
|
+
function AvatarImage({ className, ...props }) {
|
|
27
|
+
const classes = cn("aspect-square", "size-full", "rounded-full", "object-cover", className);
|
|
28
|
+
return /* @__PURE__ */ jsx(Avatar.Image, {
|
|
29
|
+
"data-slot": "avatar-image",
|
|
30
|
+
className: classes,
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Заглушка аватара: инициалы или иконка, пока изображение не загружено
|
|
36
|
+
* @param props - пропсы заглушки
|
|
37
|
+
* @returns заглушка
|
|
38
|
+
*/
|
|
39
|
+
function AvatarFallback({ className, ...props }) {
|
|
40
|
+
const classes = cn("flex", "size-full", "items-center", "justify-center", "rounded-full", "bg-muted", "text-sm", "text-muted-foreground", "group-data-[size=sm]/avatar:text-xs", className);
|
|
41
|
+
return /* @__PURE__ */ jsx(Avatar.Fallback, {
|
|
42
|
+
"data-slot": "avatar-fallback",
|
|
43
|
+
className: classes,
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Значок аватара: точка статуса или иконка в правом нижнем углу. Только у одиночного аватара:
|
|
49
|
+
* в AvatarGroup значок скрыт — у наложенных аватаров он вылезал бы поверх соседа
|
|
50
|
+
* @param props - пропсы значка
|
|
51
|
+
* @returns значок
|
|
52
|
+
*/
|
|
53
|
+
function AvatarBadge({ className, ...props }) {
|
|
54
|
+
const classes = cn("absolute", "right-0", "bottom-0", "z-10", "inline-flex", "items-center", "justify-center", "rounded-full", "select-none", "bg-primary", "text-primary-foreground", "bg-blend-color", "ring-2", "ring-background", "group-data-[size=sm]/avatar:size-2", "group-data-[size=sm]/avatar:[&>svg]:hidden", "group-data-[size=default]/avatar:size-2.5", "group-data-[size=default]/avatar:[&>svg]:size-2", "group-data-[size=lg]/avatar:size-3", "group-data-[size=lg]/avatar:[&>svg]:size-2", "in-data-[slot=avatar-group]:hidden", className);
|
|
55
|
+
return /* @__PURE__ */ jsx("span", {
|
|
56
|
+
"data-slot": "avatar-badge",
|
|
57
|
+
className: classes,
|
|
58
|
+
...props
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Группа аватаров: аватары с наложением друг на друга
|
|
63
|
+
* @param props - пропсы группы
|
|
64
|
+
* @returns группа
|
|
65
|
+
*/
|
|
66
|
+
function AvatarGroup({ className, ...props }) {
|
|
67
|
+
const classes = cn("group/avatar-group", "flex", "-space-x-2", "*:data-[slot=avatar]:ring-2", "*:data-[slot=avatar]:ring-background", className);
|
|
68
|
+
return /* @__PURE__ */ jsx("div", {
|
|
69
|
+
"data-slot": "avatar-group",
|
|
70
|
+
className: classes,
|
|
71
|
+
...props
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Счётчик группы аватаров: сколько ещё участников не показано, например «+3».
|
|
76
|
+
* Размер повторяет размер аватаров группы
|
|
77
|
+
* @param props - пропсы счётчика
|
|
78
|
+
* @returns счётчик
|
|
79
|
+
*/
|
|
80
|
+
function AvatarGroupCount({ className, ...props }) {
|
|
81
|
+
const classes = cn("relative", "flex", "size-8", "shrink-0", "items-center", "justify-center", "rounded-full", "bg-muted", "text-sm", "text-muted-foreground", "ring-2", "ring-background", "group-has-data-[size=lg]/avatar-group:size-10", "group-has-data-[size=sm]/avatar-group:size-6", "[&>svg]:size-4", "group-has-data-[size=lg]/avatar-group:[&>svg]:size-5", "group-has-data-[size=sm]/avatar-group:[&>svg]:size-3", className);
|
|
82
|
+
return /* @__PURE__ */ jsx("div", {
|
|
83
|
+
"data-slot": "avatar-group-count",
|
|
84
|
+
className: classes,
|
|
85
|
+
...props
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
export { Avatar$1 as Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { AvatarBadgePropsT, AvatarFallbackPropsT, AvatarGroupCountPropsT, AvatarGroupPropsT, AvatarImagePropsT, AvatarPropsT, avatarVariants } from "./types.js";
|
|
2
|
+
import { Avatar, AvatarBadge, AvatarFallback, AvatarGroup, AvatarGroupCount, AvatarImage } from "./avatar.js";
|
|
3
|
+
export { Avatar, AvatarBadge, type AvatarBadgePropsT, AvatarFallback, type AvatarFallbackPropsT, AvatarGroup, AvatarGroupCount, type AvatarGroupCountPropsT, type AvatarGroupPropsT, AvatarImage, type AvatarImagePropsT, type AvatarPropsT, avatarVariants };
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { PartPropsT } from "../../lib/part-props.js";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
import { Avatar } from "@base-ui/react/avatar";
|
|
5
|
+
/**
|
|
6
|
+
* Стили аватара: размер.
|
|
7
|
+
* Экспортируются, чтобы оформить аватаром другой элемент: avatarVariants({ size: 'lg' }).
|
|
8
|
+
* Рамка рисуется псевдоэлементом поверх изображения и смешивается с ним, чтобы светлые
|
|
9
|
+
* и тёмные фото не сливались с фоном
|
|
10
|
+
*/
|
|
11
|
+
export declare const avatarVariants: (props?: ({
|
|
12
|
+
size?: "default" | "sm" | "lg" | null | undefined;
|
|
13
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
14
|
+
/**
|
|
15
|
+
* Размеры аватара
|
|
16
|
+
*/
|
|
17
|
+
export type AvatarVariantsT = VariantProps<typeof avatarVariants>;
|
|
18
|
+
/**
|
|
19
|
+
* Пропсы аватара
|
|
20
|
+
*/
|
|
21
|
+
export type AvatarPropsT = PartPropsT<Avatar.Root.Props> & {
|
|
22
|
+
/** Размер: sm — 24 px, default — 32 px, lg — 40 px */
|
|
23
|
+
size?: AvatarVariantsT['size'];
|
|
24
|
+
};
|
|
25
|
+
/**
|
|
26
|
+
* Пропсы изображения аватара
|
|
27
|
+
*/
|
|
28
|
+
export type AvatarImagePropsT = PartPropsT<Omit<Avatar.Image.Props, 'onLoadingStatusChange'>> & {
|
|
29
|
+
/** Адрес изображения. Пока оно грузится или если не загрузилось, показывается AvatarFallback */
|
|
30
|
+
src?: string;
|
|
31
|
+
/** Описание изображения для скринридера: имя пользователя */
|
|
32
|
+
alt?: string;
|
|
33
|
+
/** Смена состояния загрузки изображения: idle, loading, loaded, error */
|
|
34
|
+
onLoadingStatusChange?: (status: 'idle' | 'loading' | 'loaded' | 'error') => void;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Пропсы заглушки аватара
|
|
38
|
+
*/
|
|
39
|
+
export type AvatarFallbackPropsT = PartPropsT<Omit<Avatar.Fallback.Props, 'delay'>> & {
|
|
40
|
+
/** Задержка показа в мс: чтобы заглушка не мелькала, если изображение загрузится быстро */
|
|
41
|
+
delay?: number;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Пропсы значка аватара
|
|
45
|
+
*/
|
|
46
|
+
export type AvatarBadgePropsT = ComponentProps<'span'>;
|
|
47
|
+
/**
|
|
48
|
+
* Пропсы группы аватаров
|
|
49
|
+
*/
|
|
50
|
+
export type AvatarGroupPropsT = ComponentProps<'div'>;
|
|
51
|
+
/**
|
|
52
|
+
* Пропсы счётчика группы аватаров
|
|
53
|
+
*/
|
|
54
|
+
export type AvatarGroupCountPropsT = ComponentProps<'div'>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
// src/components/avatar/types.ts
|
|
3
|
+
/**
|
|
4
|
+
* Стили аватара: размер.
|
|
5
|
+
* Экспортируются, чтобы оформить аватаром другой элемент: avatarVariants({ size: 'lg' }).
|
|
6
|
+
* Рамка рисуется псевдоэлементом поверх изображения и смешивается с ним, чтобы светлые
|
|
7
|
+
* и тёмные фото не сливались с фоном
|
|
8
|
+
*/
|
|
9
|
+
const avatarVariants = cva([
|
|
10
|
+
"group/avatar relative flex shrink-0 rounded-full select-none",
|
|
11
|
+
"after:absolute after:inset-0 after:rounded-full after:border after:border-border",
|
|
12
|
+
"after:mix-blend-darken dark:after:mix-blend-lighten"
|
|
13
|
+
], {
|
|
14
|
+
variants: { size: {
|
|
15
|
+
default: "size-8",
|
|
16
|
+
sm: "size-6",
|
|
17
|
+
lg: "size-10"
|
|
18
|
+
} },
|
|
19
|
+
defaultVariants: { size: "default" }
|
|
20
|
+
});
|
|
21
|
+
export { avatarVariants };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BadgePropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Бейдж: короткая метка — статус, категория, счётчик
|
|
4
|
+
* @param props - пропсы бейджа
|
|
5
|
+
* @returns бейдж или дочерний элемент в стилях бейджа (render)
|
|
6
|
+
*/
|
|
7
|
+
export declare function Badge({ className, variant, render, ...props }: BadgePropsT): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { badgeVariants } from "./types.js";
|
|
3
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
5
|
+
// src/components/badge/badge.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Бейдж: короткая метка — статус, категория, счётчик
|
|
8
|
+
* @param props - пропсы бейджа
|
|
9
|
+
* @returns бейдж или дочерний элемент в стилях бейджа (render)
|
|
10
|
+
*/
|
|
11
|
+
function Badge({ className, variant = "default", render, ...props }) {
|
|
12
|
+
const classes = cn(badgeVariants({ variant }), className);
|
|
13
|
+
return useRender({
|
|
14
|
+
defaultTagName: "span",
|
|
15
|
+
render,
|
|
16
|
+
props: mergeProps({
|
|
17
|
+
"data-slot": "badge",
|
|
18
|
+
"data-variant": variant,
|
|
19
|
+
className: classes
|
|
20
|
+
}, props)
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
export { Badge };
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
/**
|
|
4
|
+
* Стили бейджа: вариант оформления.
|
|
5
|
+
* Экспортируются, чтобы оформить бейджем другой элемент: badgeVariants({ variant: 'outline' }).
|
|
6
|
+
* Цвет наведения появляется только у бейджа-ссылки (render={<a />}).
|
|
7
|
+
*/
|
|
8
|
+
export declare const badgeVariants: (props?: ({
|
|
9
|
+
variant?: "default" | "secondary" | "destructive" | "outline" | "ghost" | "link" | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Варианты оформления бейджа
|
|
13
|
+
*/
|
|
14
|
+
export type BadgeVariantsT = VariantProps<typeof badgeVariants>;
|
|
15
|
+
/**
|
|
16
|
+
* Пропсы бейджа
|
|
17
|
+
*/
|
|
18
|
+
export type BadgePropsT = useRender.ComponentProps<'span'> & {
|
|
19
|
+
/** Оформление: основной, второстепенный, опасный, контурный, без фона или ссылка */
|
|
20
|
+
variant?: BadgeVariantsT['variant'];
|
|
21
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
// src/components/badge/types.ts
|
|
3
|
+
/**
|
|
4
|
+
* Стили бейджа: вариант оформления.
|
|
5
|
+
* Экспортируются, чтобы оформить бейджем другой элемент: badgeVariants({ variant: 'outline' }).
|
|
6
|
+
* Цвет наведения появляется только у бейджа-ссылки (render={<a />}).
|
|
7
|
+
*/
|
|
8
|
+
const badgeVariants = cva([
|
|
9
|
+
"group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden",
|
|
10
|
+
"rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all select-none",
|
|
11
|
+
"focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50",
|
|
12
|
+
"aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40",
|
|
13
|
+
"has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5",
|
|
14
|
+
"[&>svg]:pointer-events-none [&>svg]:size-3!"
|
|
15
|
+
], {
|
|
16
|
+
variants: { variant: {
|
|
17
|
+
default: "bg-primary text-primary-foreground [a]:hover:bg-primary/80",
|
|
18
|
+
secondary: "bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80",
|
|
19
|
+
destructive: ["bg-destructive/10 text-destructive [a]:hover:bg-destructive/20", "focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40"],
|
|
20
|
+
outline: "border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground",
|
|
21
|
+
ghost: "hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50",
|
|
22
|
+
link: "text-primary underline-offset-4 hover:underline"
|
|
23
|
+
} },
|
|
24
|
+
defaultVariants: { variant: "default" }
|
|
25
|
+
});
|
|
26
|
+
export { badgeVariants };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BottomNavActionPropsT, BottomNavItemPropsT, BottomNavPropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Нижняя навигация для телефона: пункты разделов и выделенное действие по центру
|
|
4
|
+
* @param props - пропсы навигации
|
|
5
|
+
* @returns навигация
|
|
6
|
+
*/
|
|
7
|
+
export declare function BottomNav({ className, position, render, ...props }: BottomNavPropsT): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
8
|
+
/**
|
|
9
|
+
* Пункт нижней навигации: иконка и подпись. Ссылку рисуют через render={<a href />}
|
|
10
|
+
* @param props - пропсы пункта
|
|
11
|
+
* @returns кнопка или свой элемент в стилях пункта
|
|
12
|
+
*/
|
|
13
|
+
export declare function BottomNavItem({ className, active, render, ...props }: BottomNavItemPropsT): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
14
|
+
/**
|
|
15
|
+
* Выделенное действие нижней навигации: круглая кнопка с иконкой, приподнятая над панелью
|
|
16
|
+
* @param props - пропсы действия
|
|
17
|
+
* @returns кнопка или свой элемент в стилях действия
|
|
18
|
+
*/
|
|
19
|
+
export declare function BottomNavAction({ className, render, ...props }: BottomNavActionPropsT): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { bottomNavActionVariants, bottomNavItemVariants, bottomNavVariants } from "./types.js";
|
|
3
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
5
|
+
// src/components/bottom-nav/bottom-nav.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Нижняя навигация для телефона: пункты разделов и выделенное действие по центру
|
|
8
|
+
* @param props - пропсы навигации
|
|
9
|
+
* @returns навигация
|
|
10
|
+
*/
|
|
11
|
+
function BottomNav({ className, position = "fixed", render, ...props }) {
|
|
12
|
+
const classes = cn(bottomNavVariants({ position }), className);
|
|
13
|
+
return useRender({
|
|
14
|
+
defaultTagName: "nav",
|
|
15
|
+
render,
|
|
16
|
+
props: mergeProps({
|
|
17
|
+
"data-slot": "bottom-nav",
|
|
18
|
+
"data-position": position,
|
|
19
|
+
"className": classes
|
|
20
|
+
}, props)
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Пункт нижней навигации: иконка и подпись. Ссылку рисуют через render={<a href />}
|
|
25
|
+
* @param props - пропсы пункта
|
|
26
|
+
* @returns кнопка или свой элемент в стилях пункта
|
|
27
|
+
*/
|
|
28
|
+
function BottomNavItem({ className, active = false, render, ...props }) {
|
|
29
|
+
const classes = cn(bottomNavItemVariants(), className);
|
|
30
|
+
return useRender({
|
|
31
|
+
defaultTagName: "button",
|
|
32
|
+
render,
|
|
33
|
+
props: mergeProps({
|
|
34
|
+
"type": render ? void 0 : "button",
|
|
35
|
+
"data-slot": "bottom-nav-item",
|
|
36
|
+
"data-active": active || void 0,
|
|
37
|
+
"aria-current": active ? "page" : void 0,
|
|
38
|
+
"className": classes
|
|
39
|
+
}, props)
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Выделенное действие нижней навигации: круглая кнопка с иконкой, приподнятая над панелью
|
|
44
|
+
* @param props - пропсы действия
|
|
45
|
+
* @returns кнопка или свой элемент в стилях действия
|
|
46
|
+
*/
|
|
47
|
+
function BottomNavAction({ className, render, ...props }) {
|
|
48
|
+
const classes = cn(bottomNavActionVariants(), className);
|
|
49
|
+
return useRender({
|
|
50
|
+
defaultTagName: "button",
|
|
51
|
+
render,
|
|
52
|
+
props: mergeProps({
|
|
53
|
+
"type": render ? void 0 : "button",
|
|
54
|
+
"data-slot": "bottom-nav-action",
|
|
55
|
+
"className": classes
|
|
56
|
+
}, props)
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
export { BottomNav, BottomNavAction, BottomNavItem };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { BottomNavActionPropsT, BottomNavItemPropsT, BottomNavPropsT, bottomNavActionVariants, bottomNavItemVariants, bottomNavVariants } from "./types.js";
|
|
2
|
+
import { BottomNav, BottomNavAction, BottomNavItem } from "./bottom-nav.js";
|
|
3
|
+
export { BottomNav, BottomNavAction, type BottomNavActionPropsT, BottomNavItem, type BottomNavItemPropsT, type BottomNavPropsT, bottomNavActionVariants, bottomNavItemVariants, bottomNavVariants };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { bottomNavActionVariants, bottomNavItemVariants, bottomNavVariants } from "./types.js";
|
|
2
|
+
import { BottomNav, BottomNavAction, BottomNavItem } from "./bottom-nav.js";
|
|
3
|
+
export { BottomNav, BottomNavAction, BottomNavItem, bottomNavActionVariants, bottomNavItemVariants, bottomNavVariants };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
/**
|
|
4
|
+
* Стили нижней навигации: положение на странице.
|
|
5
|
+
* Высота 64px плюс безопасная зона снизу (полоска жестов iPhone).
|
|
6
|
+
*/
|
|
7
|
+
export declare const bottomNavVariants: (props?: ({
|
|
8
|
+
position?: "fixed" | "sticky" | "static" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
/**
|
|
11
|
+
* Стили пункта нижней навигации: иконка над подписью, активный пункт выделен цветом.
|
|
12
|
+
* Экспортируются, чтобы оформить пунктом другой элемент.
|
|
13
|
+
*/
|
|
14
|
+
export declare const bottomNavItemVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
15
|
+
/**
|
|
16
|
+
* Стили выделенного действия: круглая кнопка, приподнятая над панелью.
|
|
17
|
+
* Экспортируются, чтобы оформить действием другой элемент.
|
|
18
|
+
*/
|
|
19
|
+
export declare const bottomNavActionVariants: (props?: import("class-variance-authority/types").ClassProp | undefined) => string;
|
|
20
|
+
/**
|
|
21
|
+
* Положение нижней навигации
|
|
22
|
+
*/
|
|
23
|
+
export type BottomNavVariantsT = VariantProps<typeof bottomNavVariants>;
|
|
24
|
+
/**
|
|
25
|
+
* Пропсы нижней навигации
|
|
26
|
+
*/
|
|
27
|
+
export type BottomNavPropsT = useRender.ComponentProps<'nav'> & {
|
|
28
|
+
/**
|
|
29
|
+
* Положение: fixed — прибита к низу экрана, sticky — прилипает к низу прокручиваемого блока,
|
|
30
|
+
* static — в потоке страницы. По умолчанию fixed
|
|
31
|
+
*/
|
|
32
|
+
position?: BottomNavVariantsT['position'];
|
|
33
|
+
};
|
|
34
|
+
/**
|
|
35
|
+
* Пропсы пункта нижней навигации
|
|
36
|
+
*/
|
|
37
|
+
export type BottomNavItemPropsT = useRender.ComponentProps<'button'> & {
|
|
38
|
+
/** Текущий раздел: пункт выделен, у элемента aria-current="page" */
|
|
39
|
+
active?: boolean;
|
|
40
|
+
};
|
|
41
|
+
/**
|
|
42
|
+
* Пропсы выделенного действия нижней навигации.
|
|
43
|
+
* В кнопке только иконка, поэтому подпись для скринридера обязательна: aria-label
|
|
44
|
+
*/
|
|
45
|
+
export type BottomNavActionPropsT = useRender.ComponentProps<'button'>;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
// src/components/bottom-nav/types.ts
|
|
3
|
+
/**
|
|
4
|
+
* Стили нижней навигации: положение на странице.
|
|
5
|
+
* Высота 64px плюс безопасная зона снизу (полоска жестов iPhone).
|
|
6
|
+
*/
|
|
7
|
+
const bottomNavVariants = cva(["z-40 flex h-[calc(--spacing(16)+env(safe-area-inset-bottom))] w-full items-stretch gap-1", "border-t bg-background px-2 pb-[env(safe-area-inset-bottom)] text-foreground"], {
|
|
8
|
+
variants: { position: {
|
|
9
|
+
fixed: "fixed inset-x-0 bottom-0",
|
|
10
|
+
sticky: "sticky bottom-0",
|
|
11
|
+
static: "relative"
|
|
12
|
+
} },
|
|
13
|
+
defaultVariants: { position: "fixed" }
|
|
14
|
+
});
|
|
15
|
+
/**
|
|
16
|
+
* Стили пункта нижней навигации: иконка над подписью, активный пункт выделен цветом.
|
|
17
|
+
* Экспортируются, чтобы оформить пунктом другой элемент.
|
|
18
|
+
*/
|
|
19
|
+
const bottomNavItemVariants = cva([
|
|
20
|
+
"group/bottom-nav-item my-1 flex min-w-0 flex-1 cursor-pointer flex-col items-center justify-center gap-1",
|
|
21
|
+
"rounded-lg px-1 text-xs font-medium whitespace-nowrap text-muted-foreground transition-all outline-none select-none",
|
|
22
|
+
"hover:text-foreground focus-visible:ring-3 focus-visible:ring-ring/50",
|
|
23
|
+
"active:not-aria-disabled:translate-y-px data-active:text-foreground",
|
|
24
|
+
"disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50",
|
|
25
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-5"
|
|
26
|
+
]);
|
|
27
|
+
/**
|
|
28
|
+
* Стили выделенного действия: круглая кнопка, приподнятая над панелью.
|
|
29
|
+
* Экспортируются, чтобы оформить действием другой элемент.
|
|
30
|
+
*/
|
|
31
|
+
const bottomNavActionVariants = cva([
|
|
32
|
+
"flex size-14 shrink-0 cursor-pointer items-center justify-center self-center rounded-full",
|
|
33
|
+
"-translate-y-4 bg-primary text-primary-foreground shadow-lg ring-4 ring-background",
|
|
34
|
+
"transition-all outline-none select-none hover:bg-[color-mix(in_oklch,var(--primary),var(--background)_20%)]",
|
|
35
|
+
"active:scale-95",
|
|
36
|
+
"focus-visible:ring-ring/50",
|
|
37
|
+
"disabled:cursor-not-allowed disabled:bg-[color-mix(in_oklch,var(--primary),var(--background)_50%)]",
|
|
38
|
+
"aria-disabled:cursor-not-allowed aria-disabled:bg-[color-mix(in_oklch,var(--primary),var(--background)_50%)]",
|
|
39
|
+
"disabled:text-[color-mix(in_oklch,var(--primary-foreground),var(--background)_50%)]",
|
|
40
|
+
"aria-disabled:text-[color-mix(in_oklch,var(--primary-foreground),var(--background)_50%)]",
|
|
41
|
+
"disabled:shadow-none aria-disabled:shadow-none",
|
|
42
|
+
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-6"
|
|
43
|
+
]);
|
|
44
|
+
export { bottomNavActionVariants, bottomNavItemVariants, bottomNavVariants };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BoxPropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Контейнер: ограничивает ширину содержимого, центрирует его и добавляет боковые отступы
|
|
4
|
+
* @param props - пропсы контейнера
|
|
5
|
+
* @returns контейнер или свой элемент в стилях контейнера (render)
|
|
6
|
+
*/
|
|
7
|
+
export declare function Box({ className, size, padded, render, ...props }: BoxPropsT): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { boxVariants } from "./types.js";
|
|
3
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
4
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
5
|
+
// src/components/box/box.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Контейнер: ограничивает ширину содержимого, центрирует его и добавляет боковые отступы
|
|
8
|
+
* @param props - пропсы контейнера
|
|
9
|
+
* @returns контейнер или свой элемент в стилях контейнера (render)
|
|
10
|
+
*/
|
|
11
|
+
function Box({ className, size = "xl", padded = true, render, ...props }) {
|
|
12
|
+
const classes = cn(boxVariants({
|
|
13
|
+
size,
|
|
14
|
+
padded
|
|
15
|
+
}), className);
|
|
16
|
+
return useRender({
|
|
17
|
+
defaultTagName: "div",
|
|
18
|
+
render,
|
|
19
|
+
props: mergeProps({
|
|
20
|
+
"data-slot": "box",
|
|
21
|
+
"data-size": size,
|
|
22
|
+
"className": classes
|
|
23
|
+
}, props)
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
export { Box };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
3
|
+
/**
|
|
4
|
+
* Стили контейнера: максимальная ширина по брейкпоинтам Tailwind и боковые отступы.
|
|
5
|
+
* Экспортируются, чтобы ограничить ширину другого элемента: boxVariants({ size: 'md' }).
|
|
6
|
+
*/
|
|
7
|
+
export declare const boxVariants: (props?: ({
|
|
8
|
+
size?: "sm" | "lg" | "md" | "xl" | "2xl" | "full" | null | undefined;
|
|
9
|
+
padded?: boolean | null | undefined;
|
|
10
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
11
|
+
/**
|
|
12
|
+
* Размеры контейнера
|
|
13
|
+
*/
|
|
14
|
+
export type BoxVariantsT = VariantProps<typeof boxVariants>;
|
|
15
|
+
/**
|
|
16
|
+
* Пропсы контейнера
|
|
17
|
+
*/
|
|
18
|
+
export type BoxPropsT = useRender.ComponentProps<'div'> & {
|
|
19
|
+
/** Максимальная ширина: sm — 640px, md — 768px, lg — 1024px, xl — 1280px, 2xl — 1536px, full — без ограничения */
|
|
20
|
+
size?: BoxVariantsT['size'];
|
|
21
|
+
/** Боковые отступы: 16px на телефоне, 24px от sm, 32px от lg. По умолчанию включены */
|
|
22
|
+
padded?: boolean;
|
|
23
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
// src/components/box/types.ts
|
|
3
|
+
/**
|
|
4
|
+
* Стили контейнера: максимальная ширина по брейкпоинтам Tailwind и боковые отступы.
|
|
5
|
+
* Экспортируются, чтобы ограничить ширину другого элемента: boxVariants({ size: 'md' }).
|
|
6
|
+
*/
|
|
7
|
+
const boxVariants = cva("mx-auto w-full", {
|
|
8
|
+
variants: {
|
|
9
|
+
size: {
|
|
10
|
+
"sm": "max-w-(--breakpoint-sm)",
|
|
11
|
+
"md": "max-w-(--breakpoint-md)",
|
|
12
|
+
"lg": "max-w-(--breakpoint-lg)",
|
|
13
|
+
"xl": "max-w-(--breakpoint-xl)",
|
|
14
|
+
"2xl": "max-w-(--breakpoint-2xl)",
|
|
15
|
+
"full": "max-w-none"
|
|
16
|
+
},
|
|
17
|
+
padded: {
|
|
18
|
+
true: "px-4 sm:px-6 lg:px-8",
|
|
19
|
+
false: ""
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
size: "xl",
|
|
24
|
+
padded: true
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
export { boxVariants };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { BreadcrumbEllipsisPropsT, BreadcrumbItemPropsT, BreadcrumbLinkPropsT, BreadcrumbListPropsT, BreadcrumbPagePropsT, BreadcrumbPropsT, BreadcrumbSeparatorPropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Навигационная цепочка: путь к текущей странице по иерархии разделов
|
|
4
|
+
* @param props - пропсы цепочки
|
|
5
|
+
* @returns элемент <nav>
|
|
6
|
+
*/
|
|
7
|
+
export declare function Breadcrumb({ className, label, ...props }: BreadcrumbPropsT): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Список пунктов навигационной цепочки
|
|
10
|
+
* @param props - пропсы списка
|
|
11
|
+
* @returns элемент <ol>
|
|
12
|
+
*/
|
|
13
|
+
export declare function BreadcrumbList({ className, ...props }: BreadcrumbListPropsT): import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Пункт навигационной цепочки: ссылка, текущая страница или многоточие
|
|
16
|
+
* @param props - пропсы пункта
|
|
17
|
+
* @returns элемент <li>
|
|
18
|
+
*/
|
|
19
|
+
export declare function BreadcrumbItem({ className, ...props }: BreadcrumbItemPropsT): import("react").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Ссылка на раздел в навигационной цепочке
|
|
22
|
+
* @param props - пропсы ссылки
|
|
23
|
+
* @returns ссылка или дочерний элемент в стилях ссылки (render)
|
|
24
|
+
*/
|
|
25
|
+
export declare function BreadcrumbLink({ render, className, ...props }: BreadcrumbLinkPropsT): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
26
|
+
/**
|
|
27
|
+
* Текущая страница: последний пункт цепочки, не ссылка
|
|
28
|
+
* @param props - пропсы текущей страницы
|
|
29
|
+
* @returns элемент с aria-current="page"
|
|
30
|
+
*/
|
|
31
|
+
export declare function BreadcrumbPage({ className, ...props }: BreadcrumbPagePropsT): import("react").JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Разделитель между пунктами, по умолчанию шеврон. Скрыт от скринридера
|
|
34
|
+
* @param props - пропсы разделителя; children заменяет иконку
|
|
35
|
+
* @returns элемент <li>
|
|
36
|
+
*/
|
|
37
|
+
export declare function BreadcrumbSeparator({ children, className, ...props }: BreadcrumbSeparatorPropsT): import("react").JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* Многоточие на месте свёрнутых пунктов длинной цепочки
|
|
40
|
+
* @param props - пропсы многоточия
|
|
41
|
+
* @returns иконка многоточия с текстом для скринридера
|
|
42
|
+
*/
|
|
43
|
+
export declare function BreadcrumbEllipsis({ className, label, ...props }: BreadcrumbEllipsisPropsT): import("react").JSX.Element;
|