@archytechtor/ui 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +105 -2
- package/dist/components/accordion/accordion.d.ts +25 -0
- package/dist/components/accordion/accordion.js +88 -0
- package/dist/components/accordion/index.d.ts +3 -0
- package/dist/components/accordion/index.js +1 -0
- package/dist/components/accordion/types.d.ts +39 -0
- package/dist/components/alert/alert.d.ts +25 -0
- package/dist/components/alert/alert.js +59 -0
- package/dist/components/alert/index.d.ts +3 -0
- package/dist/components/alert/index.js +3 -0
- package/dist/components/alert/types.d.ts +32 -0
- package/dist/components/alert/types.js +19 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +73 -0
- package/dist/components/alert-dialog/alert-dialog.js +170 -0
- package/dist/components/alert-dialog/index.d.ts +3 -0
- package/dist/components/alert-dialog/index.js +1 -0
- package/dist/components/alert-dialog/types.d.ts +80 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +8 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +20 -0
- package/dist/components/aspect-ratio/index.d.ts +3 -0
- package/dist/components/aspect-ratio/index.js +1 -0
- package/dist/components/aspect-ratio/types.d.ts +8 -0
- package/dist/components/attachment/attachment.d.ts +57 -0
- package/dist/components/attachment/attachment.js +139 -0
- package/dist/components/attachment/index.d.ts +3 -0
- package/dist/components/attachment/index.js +3 -0
- package/dist/components/attachment/types.d.ts +79 -0
- package/dist/components/attachment/types.js +43 -0
- package/dist/components/avatar/avatar.d.ts +39 -0
- package/dist/components/avatar/avatar.js +88 -0
- package/dist/components/avatar/index.d.ts +3 -0
- package/dist/components/avatar/index.js +3 -0
- package/dist/components/avatar/types.d.ts +54 -0
- package/dist/components/avatar/types.js +21 -0
- package/dist/components/badge/badge.d.ts +7 -0
- package/dist/components/badge/badge.js +23 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.js +3 -0
- package/dist/components/badge/types.d.ts +21 -0
- package/dist/components/badge/types.js +26 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +43 -0
- package/dist/components/breadcrumb/breadcrumb.js +115 -0
- package/dist/components/breadcrumb/index.d.ts +3 -0
- package/dist/components/breadcrumb/index.js +1 -0
- package/dist/components/breadcrumb/types.d.ts +36 -0
- package/dist/components/bubble/bubble.d.ts +25 -0
- package/dist/components/bubble/bubble.js +69 -0
- package/dist/components/bubble/index.d.ts +3 -0
- package/dist/components/bubble/index.js +3 -0
- package/dist/components/bubble/types.d.ts +51 -0
- package/dist/components/bubble/types.js +60 -0
- package/dist/components/button/button.d.ts +7 -0
- package/dist/components/button/button.js +155 -0
- package/dist/components/button/index.d.ts +4 -0
- package/dist/components/button/index.js +4 -0
- package/dist/components/button/types.d.ts +80 -0
- package/dist/components/button/types.js +99 -0
- package/dist/components/button/use-hold-to-confirm.d.ts +25 -0
- package/dist/components/button/use-hold-to-confirm.js +161 -0
- package/dist/components/button-group/button-group.d.ts +20 -0
- package/dist/components/button-group/button-group.js +62 -0
- package/dist/components/button-group/index.d.ts +3 -0
- package/dist/components/button-group/index.js +3 -0
- package/dist/components/button-group/types.d.ts +30 -0
- package/dist/components/button-group/types.js +19 -0
- package/dist/components/calendar/calendar.d.ts +15 -0
- package/dist/components/calendar/calendar.js +157 -0
- package/dist/components/calendar/index.d.ts +3 -0
- package/dist/components/calendar/index.js +1 -0
- package/dist/components/calendar/types.d.ts +21 -0
- package/dist/components/card/card.d.ts +43 -0
- package/dist/components/card/card.js +97 -0
- package/dist/components/card/index.d.ts +3 -0
- package/dist/components/card/index.js +3 -0
- package/dist/components/card/types.d.ts +44 -0
- package/dist/components/card/types.js +19 -0
- package/dist/components/carousel/carousel.d.ts +36 -0
- package/dist/components/carousel/carousel.js +190 -0
- package/dist/components/carousel/index.d.ts +3 -0
- package/dist/components/carousel/index.js +1 -0
- package/dist/components/carousel/types.d.ts +79 -0
- package/dist/components/chart/chart.d.ts +35 -0
- package/dist/components/chart/chart.js +212 -0
- package/dist/components/chart/index.d.ts +3 -0
- package/dist/components/chart/index.js +1 -0
- package/dist/components/chart/types.d.ts +89 -0
- package/dist/components/chart/types.js +7 -0
- package/dist/components/checkbox/checkbox.d.ts +7 -0
- package/dist/components/checkbox/checkbox.js +31 -0
- package/dist/components/checkbox/index.d.ts +3 -0
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/checkbox/types.d.ts +25 -0
- package/dist/components/code-block/code-block.d.ts +49 -0
- package/dist/components/code-block/code-block.js +188 -0
- package/dist/components/code-block/highlighter.d.ts +15 -0
- package/dist/components/code-block/highlighter.js +123 -0
- package/dist/components/code-block/index.d.ts +5 -0
- package/dist/components/code-block/index.js +5 -0
- package/dist/components/code-block/types.d.ts +94 -0
- package/dist/components/code-block/types.js +38 -0
- package/dist/components/code-block/use-highlighted-code.d.ts +9 -0
- package/dist/components/code-block/use-highlighted-code.js +67 -0
- package/dist/components/collapsible/collapsible.d.ts +19 -0
- package/dist/components/collapsible/collapsible.js +44 -0
- package/dist/components/collapsible/index.d.ts +3 -0
- package/dist/components/collapsible/index.js +1 -0
- package/dist/components/collapsible/types.d.ts +26 -0
- package/dist/components/combobox/combobox.d.ts +104 -0
- package/dist/components/combobox/combobox.js +365 -0
- package/dist/components/combobox/index.d.ts +3 -0
- package/dist/components/combobox/index.js +1 -0
- package/dist/components/combobox/types.d.ts +229 -0
- package/dist/components/command/command.d.ts +55 -0
- package/dist/components/command/command.js +179 -0
- package/dist/components/command/index.d.ts +3 -0
- package/dist/components/command/index.js +1 -0
- package/dist/components/command/types.d.ts +69 -0
- package/dist/components/context-menu/context-menu.d.ts +92 -0
- package/dist/components/context-menu/context-menu.js +270 -0
- package/dist/components/context-menu/index.d.ts +3 -0
- package/dist/components/context-menu/index.js +1 -0
- package/dist/components/context-menu/types.d.ts +138 -0
- package/dist/components/data-table/data-table-features.d.ts +21 -0
- package/dist/components/data-table/data-table-features.js +22 -0
- package/dist/components/data-table/data-table.d.ts +69 -0
- package/dist/components/data-table/data-table.js +283 -0
- package/dist/components/data-table/index.d.ts +4 -0
- package/dist/components/data-table/index.js +3 -0
- package/dist/components/data-table/types.d.ts +63 -0
- package/dist/components/date-input/date-input.d.ts +7 -0
- package/dist/components/date-input/date-input.js +147 -0
- package/dist/components/date-input/index.d.ts +3 -0
- package/dist/components/date-input/index.js +1 -0
- package/dist/components/date-input/types.d.ts +27 -0
- package/dist/components/date-picker/date-picker.d.ts +7 -0
- package/dist/components/date-picker/date-picker.js +74 -0
- package/dist/components/date-picker/index.d.ts +3 -0
- package/dist/components/date-picker/index.js +1 -0
- package/dist/components/date-picker/types.d.ts +38 -0
- package/dist/components/date-range-picker/date-range-picker.d.ts +7 -0
- package/dist/components/date-range-picker/date-range-picker.js +89 -0
- package/dist/components/date-range-picker/index.d.ts +3 -0
- package/dist/components/date-range-picker/index.js +1 -0
- package/dist/components/date-range-picker/types.d.ts +43 -0
- package/dist/components/dialog/dialog.d.ts +61 -0
- package/dist/components/dialog/dialog.js +160 -0
- package/dist/components/dialog/index.d.ts +3 -0
- package/dist/components/dialog/index.js +1 -0
- package/dist/components/dialog/types.d.ts +68 -0
- package/dist/components/drawer/drawer.d.ts +69 -0
- package/dist/components/drawer/drawer.js +245 -0
- package/dist/components/drawer/index.d.ts +3 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/drawer/types.d.ts +93 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +92 -0
- package/dist/components/dropdown-menu/dropdown-menu.js +268 -0
- package/dist/components/dropdown-menu/index.d.ts +3 -0
- package/dist/components/dropdown-menu/index.js +1 -0
- package/dist/components/dropdown-menu/types.d.ts +143 -0
- package/dist/components/empty/empty.d.ts +37 -0
- package/dist/components/empty/empty.js +84 -0
- package/dist/components/empty/index.d.ts +3 -0
- package/dist/components/empty/index.js +3 -0
- package/dist/components/empty/types.d.ts +39 -0
- package/dist/components/empty/types.js +13 -0
- package/dist/components/expanded-card/expanded-card.d.ts +43 -0
- package/dist/components/expanded-card/expanded-card.js +352 -0
- package/dist/components/expanded-card/index.d.ts +3 -0
- package/dist/components/expanded-card/index.js +1 -0
- package/dist/components/expanded-card/types.d.ts +52 -0
- package/dist/components/field/field.d.ts +62 -0
- package/dist/components/field/field.js +173 -0
- package/dist/components/field/index.d.ts +3 -0
- package/dist/components/field/index.js +3 -0
- package/dist/components/field/types.d.ts +81 -0
- package/dist/components/field/types.js +21 -0
- package/dist/components/form/form.d.ts +49 -0
- package/dist/components/form/form.js +136 -0
- package/dist/components/form/index.d.ts +3 -0
- package/dist/components/form/index.js +1 -0
- package/dist/components/form/types.d.ts +59 -0
- package/dist/components/hover-card/hover-card.d.ts +19 -0
- package/dist/components/hover-card/hover-card.js +63 -0
- package/dist/components/hover-card/index.d.ts +3 -0
- package/dist/components/hover-card/index.js +1 -0
- package/dist/components/hover-card/types.d.ts +27 -0
- package/dist/components/image-gallery/image-gallery.d.ts +8 -0
- package/dist/components/image-gallery/image-gallery.js +294 -0
- package/dist/components/image-gallery/index.d.ts +4 -0
- package/dist/components/image-gallery/index.js +3 -0
- package/dist/components/image-gallery/masonry.d.ts +11 -0
- package/dist/components/image-gallery/masonry.js +62 -0
- package/dist/components/image-gallery/types.d.ts +80 -0
- package/dist/components/input/index.d.ts +3 -0
- package/dist/components/input/index.js +1 -0
- package/dist/components/input/input.d.ts +7 -0
- package/dist/components/input/input.js +18 -0
- package/dist/components/input/types.d.ts +28 -0
- package/dist/components/input-group/index.d.ts +3 -0
- package/dist/components/input-group/index.js +3 -0
- package/dist/components/input-group/input-group.d.ts +37 -0
- package/dist/components/input-group/input-group.js +103 -0
- package/dist/components/input-group/types.d.ts +64 -0
- package/dist/components/input-group/types.js +31 -0
- package/dist/components/input-otp/index.d.ts +3 -0
- package/dist/components/input-otp/index.js +1 -0
- package/dist/components/input-otp/input-otp.d.ts +25 -0
- package/dist/components/input-otp/input-otp.js +76 -0
- package/dist/components/input-otp/types.d.ts +43 -0
- package/dist/components/item/index.d.ts +3 -0
- package/dist/components/item/index.js +3 -0
- package/dist/components/item/item.d.ts +61 -0
- package/dist/components/item/item.js +149 -0
- package/dist/components/item/types.d.ts +75 -0
- package/dist/components/item/types.js +48 -0
- package/dist/components/kbd/index.d.ts +3 -0
- package/dist/components/kbd/index.js +1 -0
- package/dist/components/kbd/kbd.d.ts +13 -0
- package/dist/components/kbd/kbd.js +30 -0
- package/dist/components/kbd/types.d.ts +9 -0
- package/dist/components/label/index.d.ts +3 -0
- package/dist/components/label/index.js +1 -0
- package/dist/components/label/label.d.ts +7 -0
- package/dist/components/label/label.js +17 -0
- package/dist/components/label/types.d.ts +8 -0
- package/dist/components/loader/index.d.ts +3 -0
- package/dist/components/loader/index.js +3 -0
- package/dist/components/loader/loader.d.ts +8 -0
- package/dist/components/loader/loader.js +386 -0
- package/dist/components/loader/types.d.ts +27 -0
- package/dist/components/loader/types.js +58 -0
- package/dist/components/marker/index.d.ts +3 -0
- package/dist/components/marker/index.js +3 -0
- package/dist/components/marker/marker.d.ts +19 -0
- package/dist/components/marker/marker.js +51 -0
- package/dist/components/marker/types.d.ts +30 -0
- package/dist/components/marker/types.js +16 -0
- package/dist/components/menubar/index.d.ts +3 -0
- package/dist/components/menubar/index.js +1 -0
- package/dist/components/menubar/menubar.d.ts +98 -0
- package/dist/components/menubar/menubar.js +284 -0
- package/dist/components/menubar/types.d.ts +146 -0
- package/dist/components/message/index.d.ts +3 -0
- package/dist/components/message/index.js +1 -0
- package/dist/components/message/message.d.ts +37 -0
- package/dist/components/message/message.js +83 -0
- package/dist/components/message/types.d.ts +32 -0
- package/dist/components/message-scroller/index.d.ts +4 -0
- package/dist/components/message-scroller/index.js +3 -0
- package/dist/components/message-scroller/message-scroller-primitive.d.ts +21 -0
- package/dist/components/message-scroller/message-scroller-primitive.js +1349 -0
- package/dist/components/message-scroller/message-scroller.d.ts +39 -0
- package/dist/components/message-scroller/message-scroller.js +103 -0
- package/dist/components/message-scroller/types.d.ts +107 -0
- package/dist/components/money-input/index.d.ts +3 -0
- package/dist/components/money-input/index.js +1 -0
- package/dist/components/money-input/money-input.d.ts +7 -0
- package/dist/components/money-input/money-input.js +143 -0
- package/dist/components/money-input/types.d.ts +20 -0
- package/dist/components/morph-image/index.d.ts +3 -0
- package/dist/components/morph-image/index.js +3 -0
- package/dist/components/morph-image/morph-image.d.ts +8 -0
- package/dist/components/morph-image/morph-image.js +155 -0
- package/dist/components/morph-image/types.d.ts +38 -0
- package/dist/components/morph-image/types.js +18 -0
- package/dist/components/native-select/index.d.ts +3 -0
- package/dist/components/native-select/index.js +3 -0
- package/dist/components/native-select/native-select.d.ts +20 -0
- package/dist/components/native-select/native-select.js +57 -0
- package/dist/components/native-select/types.d.ts +52 -0
- package/dist/components/native-select/types.js +23 -0
- package/dist/components/navigation-menu/index.d.ts +3 -0
- package/dist/components/navigation-menu/index.js +3 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +50 -0
- package/dist/components/navigation-menu/navigation-menu.js +145 -0
- package/dist/components/navigation-menu/types.d.ts +79 -0
- package/dist/components/navigation-menu/types.js +15 -0
- package/dist/components/number-stepper/index.d.ts +3 -0
- package/dist/components/number-stepper/index.js +3 -0
- package/dist/components/number-stepper/number-stepper.d.ts +9 -0
- package/dist/components/number-stepper/number-stepper.js +223 -0
- package/dist/components/number-stepper/types.d.ts +47 -0
- package/dist/components/number-stepper/types.js +174 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/pagination/index.js +1 -0
- package/dist/components/pagination/pagination.d.ts +43 -0
- package/dist/components/pagination/pagination.js +121 -0
- package/dist/components/pagination/types.d.ts +37 -0
- package/dist/components/phone-input/index.d.ts +3 -0
- package/dist/components/phone-input/index.js +1 -0
- package/dist/components/phone-input/phone-input.d.ts +7 -0
- package/dist/components/phone-input/phone-input.js +54 -0
- package/dist/components/phone-input/types.d.ts +12 -0
- package/dist/components/popover/index.d.ts +3 -0
- package/dist/components/popover/index.js +1 -0
- package/dist/components/popover/popover.d.ts +37 -0
- package/dist/components/popover/popover.js +100 -0
- package/dist/components/popover/types.d.ts +51 -0
- package/dist/components/progress/index.d.ts +3 -0
- package/dist/components/progress/index.js +1 -0
- package/dist/components/progress/progress.d.ts +32 -0
- package/dist/components/progress/progress.js +100 -0
- package/dist/components/progress/types.d.ts +31 -0
- package/dist/components/questionnaire/index.d.ts +3 -0
- package/dist/components/questionnaire/index.js +1 -0
- package/dist/components/questionnaire/questionnaire-primitive.js +1563 -0
- package/dist/components/questionnaire/questionnaire.d.ts +91 -0
- package/dist/components/questionnaire/questionnaire.js +315 -0
- package/dist/components/questionnaire/types.d.ts +203 -0
- package/dist/components/radio-group/index.d.ts +3 -0
- package/dist/components/radio-group/index.js +1 -0
- package/dist/components/radio-group/radio-group.d.ts +13 -0
- package/dist/components/radio-group/radio-group.js +44 -0
- package/dist/components/radio-group/types.d.ts +33 -0
- package/dist/components/reorder-list/index.d.ts +3 -0
- package/dist/components/reorder-list/index.js +1 -0
- package/dist/components/reorder-list/reorder-list.d.ts +19 -0
- package/dist/components/reorder-list/reorder-list.js +279 -0
- package/dist/components/reorder-list/types.d.ts +65 -0
- package/dist/components/resizable/index.d.ts +3 -0
- package/dist/components/resizable/index.js +1 -0
- package/dist/components/resizable/resizable.d.ts +19 -0
- package/dist/components/resizable/resizable.js +44 -0
- package/dist/components/resizable/types.d.ts +89 -0
- package/dist/components/scroll-area/index.d.ts +3 -0
- package/dist/components/scroll-area/index.js +1 -0
- package/dist/components/scroll-area/scroll-area.d.ts +13 -0
- package/dist/components/scroll-area/scroll-area.js +47 -0
- package/dist/components/scroll-area/types.d.ts +19 -0
- package/dist/components/select/index.d.ts +3 -0
- package/dist/components/select/index.js +1 -0
- package/dist/components/select/select.d.ts +61 -0
- package/dist/components/select/select.js +183 -0
- package/dist/components/select/types.d.ts +100 -0
- package/dist/components/separator/index.d.ts +3 -0
- package/dist/components/separator/index.js +1 -0
- package/dist/components/separator/separator.d.ts +7 -0
- package/dist/components/separator/separator.js +20 -0
- package/dist/components/separator/types.d.ts +9 -0
- package/dist/components/sheet/index.d.ts +3 -0
- package/dist/components/sheet/index.js +1 -0
- package/dist/components/sheet/sheet.d.ts +61 -0
- package/dist/components/sheet/sheet.js +155 -0
- package/dist/components/sheet/types.d.ts +69 -0
- package/dist/components/sidebar/index.d.ts +3 -0
- package/dist/components/sidebar/index.js +3 -0
- package/dist/components/sidebar/sidebar.d.ts +145 -0
- package/dist/components/sidebar/sidebar.js +550 -0
- package/dist/components/sidebar/types.d.ts +186 -0
- package/dist/components/sidebar/types.js +42 -0
- package/dist/components/sidebar/use-mobile.js +21 -0
- package/dist/components/skeleton/index.d.ts +3 -0
- package/dist/components/skeleton/index.js +1 -0
- package/dist/components/skeleton/skeleton.d.ts +8 -0
- package/dist/components/skeleton/skeleton.js +18 -0
- package/dist/components/skeleton/types.d.ts +5 -0
- package/dist/components/slider/index.d.ts +3 -0
- package/dist/components/slider/index.js +1 -0
- package/dist/components/slider/slider.d.ts +7 -0
- package/dist/components/slider/slider.js +106 -0
- package/dist/components/slider/types.d.ts +39 -0
- package/dist/components/spinner/index.d.ts +3 -0
- package/dist/components/spinner/index.js +1 -0
- package/dist/components/spinner/spinner.d.ts +7 -0
- package/dist/components/spinner/spinner.js +21 -0
- package/dist/components/spinner/types.d.ts +8 -0
- package/dist/components/switch/index.d.ts +3 -0
- package/dist/components/switch/index.js +3 -0
- package/dist/components/switch/switch.d.ts +7 -0
- package/dist/components/switch/switch.js +32 -0
- package/dist/components/switch/types.d.ts +37 -0
- package/dist/components/switch/types.js +23 -0
- package/dist/components/table/index.d.ts +3 -0
- package/dist/components/table/index.js +1 -0
- package/dist/components/table/table.d.ts +49 -0
- package/dist/components/table/table.js +112 -0
- package/dist/components/table/types.d.ts +33 -0
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/tabs/index.js +3 -0
- package/dist/components/tabs/tabs.d.ts +25 -0
- package/dist/components/tabs/tabs.js +81 -0
- package/dist/components/tabs/types.d.ts +61 -0
- package/dist/components/tabs/types.js +18 -0
- package/dist/components/textarea/index.d.ts +3 -0
- package/dist/components/textarea/index.js +1 -0
- package/dist/components/textarea/textarea.d.ts +7 -0
- package/dist/components/textarea/textarea.js +17 -0
- package/dist/components/textarea/types.d.ts +26 -0
- package/dist/components/toast/index.d.ts +3 -0
- package/dist/components/toast/index.js +1 -0
- package/dist/components/toast/toast.d.ts +63 -0
- package/dist/components/toast/toast.js +321 -0
- package/dist/components/toast/types.d.ts +120 -0
- package/dist/components/toggle/index.d.ts +3 -0
- package/dist/components/toggle/index.js +3 -0
- package/dist/components/toggle/toggle.d.ts +7 -0
- package/dist/components/toggle/toggle.js +32 -0
- package/dist/components/toggle/types.d.ts +35 -0
- package/dist/components/toggle/types.js +37 -0
- package/dist/components/toggle-group/index.d.ts +3 -0
- package/dist/components/toggle-group/index.js +1 -0
- package/dist/components/toggle-group/toggle-group.d.ts +13 -0
- package/dist/components/toggle-group/toggle-group.js +88 -0
- package/dist/components/toggle-group/types.d.ts +52 -0
- package/dist/components/tooltip/index.d.ts +3 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/tooltip/tooltip.d.ts +25 -0
- package/dist/components/tooltip/tooltip.js +79 -0
- package/dist/components/tooltip/types.d.ts +48 -0
- package/dist/components/trace/index.d.ts +3 -0
- package/dist/components/trace/index.js +1 -0
- package/dist/components/trace/trace.d.ts +52 -0
- package/dist/components/trace/trace.js +132 -0
- package/dist/components/trace/types.d.ts +54 -0
- package/dist/components/typography/index.d.ts +3 -0
- package/dist/components/typography/index.js +3 -0
- package/dist/components/typography/types.d.ts +29 -0
- package/dist/components/typography/types.js +25 -0
- package/dist/components/typography/typography.d.ts +7 -0
- package/dist/components/typography/typography.js +40 -0
- package/dist/components/video-player/index.d.ts +6 -0
- package/dist/components/video-player/index.js +5 -0
- package/dist/components/video-player/types.d.ts +143 -0
- package/dist/components/video-player/use-video-player.js +319 -0
- package/dist/components/video-player/video-player-context.d.ts +45 -0
- package/dist/components/video-player/video-player-context.js +15 -0
- package/dist/components/video-player/video-player-controls.d.ts +38 -0
- package/dist/components/video-player/video-player-controls.js +226 -0
- package/dist/components/video-player/video-player-overlay.d.ts +13 -0
- package/dist/components/video-player/video-player-overlay.js +113 -0
- package/dist/components/video-player/video-player.d.ts +8 -0
- package/dist/components/video-player/video-player.js +139 -0
- package/dist/index.d.ts +244 -0
- package/dist/index.js +114 -0
- package/dist/lib/floating.d.ts +44 -0
- package/dist/lib/focus-source.js +51 -0
- package/dist/lib/format.d.ts +67 -0
- package/dist/lib/format.js +130 -0
- package/dist/lib/locale.d.ts +104 -0
- package/dist/lib/locale.js +103 -0
- package/dist/lib/part-props.d.ts +15 -0
- package/dist/lib/use-controllable-state.js +22 -0
- package/dist/lib/utils.d.ts +9 -0
- package/dist/lib/utils.js +16 -0
- package/dist/styles/index.css +126 -0
- package/dist/styles/theme.css +80 -0
- package/dist/styles/utilities.css +553 -0
- package/package.json +89 -3
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { TableBodyPropsT, TableCaptionPropsT, TableCellPropsT, TableFooterPropsT, TableHeadPropsT, TableHeaderPropsT, TablePropsT, TableRowPropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Таблица: обёрнута в контейнер с горизонтальной прокруткой для узких экранов
|
|
4
|
+
* @param props - пропсы таблицы; className применяется к <table>
|
|
5
|
+
* @returns контейнер с таблицей
|
|
6
|
+
*/
|
|
7
|
+
export declare function Table({ className, ...props }: TablePropsT): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Шапка таблицы
|
|
10
|
+
* @param props - пропсы шапки
|
|
11
|
+
* @returns элемент <thead>
|
|
12
|
+
*/
|
|
13
|
+
export declare function TableHeader({ className, ...props }: TableHeaderPropsT): import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Тело таблицы
|
|
16
|
+
* @param props - пропсы тела
|
|
17
|
+
* @returns элемент <tbody>
|
|
18
|
+
*/
|
|
19
|
+
export declare function TableBody({ className, ...props }: TableBodyPropsT): import("react").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Подвал таблицы: итоги
|
|
22
|
+
* @param props - пропсы подвала
|
|
23
|
+
* @returns элемент <tfoot>
|
|
24
|
+
*/
|
|
25
|
+
export declare function TableFooter({ className, ...props }: TableFooterPropsT): import("react").JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Строка таблицы. Выбранная строка — data-state="selected"
|
|
28
|
+
* @param props - пропсы строки
|
|
29
|
+
* @returns элемент <tr>
|
|
30
|
+
*/
|
|
31
|
+
export declare function TableRow({ className, ...props }: TableRowPropsT): import("react").JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Ячейка заголовка столбца
|
|
34
|
+
* @param props - пропсы ячейки
|
|
35
|
+
* @returns элемент <th>
|
|
36
|
+
*/
|
|
37
|
+
export declare function TableHead({ className, ...props }: TableHeadPropsT): import("react").JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* Ячейка таблицы
|
|
40
|
+
* @param props - пропсы ячейки
|
|
41
|
+
* @returns элемент <td>
|
|
42
|
+
*/
|
|
43
|
+
export declare function TableCell({ className, ...props }: TableCellPropsT): import("react").JSX.Element;
|
|
44
|
+
/**
|
|
45
|
+
* Подпись таблицы: выводится под таблицей и объявляется скринридером как её название
|
|
46
|
+
* @param props - пропсы подписи
|
|
47
|
+
* @returns элемент <caption>
|
|
48
|
+
*/
|
|
49
|
+
export declare function TableCaption({ className, ...props }: TableCaptionPropsT): import("react").JSX.Element;
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
// src/components/table/table.tsx
|
|
4
|
+
/**
|
|
5
|
+
* Таблица: обёрнута в контейнер с горизонтальной прокруткой для узких экранов
|
|
6
|
+
* @param props - пропсы таблицы; className применяется к <table>
|
|
7
|
+
* @returns контейнер с таблицей
|
|
8
|
+
*/
|
|
9
|
+
function Table({ className, ...props }) {
|
|
10
|
+
const classes = cn("w-full", "caption-bottom", "text-sm", className);
|
|
11
|
+
return /* @__PURE__ */ jsx("div", {
|
|
12
|
+
"data-slot": "table-container",
|
|
13
|
+
className: "relative w-full overflow-x-auto",
|
|
14
|
+
children: /* @__PURE__ */ jsx("table", {
|
|
15
|
+
"data-slot": "table",
|
|
16
|
+
className: classes,
|
|
17
|
+
...props
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Шапка таблицы
|
|
23
|
+
* @param props - пропсы шапки
|
|
24
|
+
* @returns элемент <thead>
|
|
25
|
+
*/
|
|
26
|
+
function TableHeader({ className, ...props }) {
|
|
27
|
+
const classes = cn("[&_tr]:border-b", className);
|
|
28
|
+
return /* @__PURE__ */ jsx("thead", {
|
|
29
|
+
"data-slot": "table-header",
|
|
30
|
+
className: classes,
|
|
31
|
+
...props
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Тело таблицы
|
|
36
|
+
* @param props - пропсы тела
|
|
37
|
+
* @returns элемент <tbody>
|
|
38
|
+
*/
|
|
39
|
+
function TableBody({ className, ...props }) {
|
|
40
|
+
const classes = cn("[&_tr:last-child]:border-0", className);
|
|
41
|
+
return /* @__PURE__ */ jsx("tbody", {
|
|
42
|
+
"data-slot": "table-body",
|
|
43
|
+
className: classes,
|
|
44
|
+
...props
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Подвал таблицы: итоги
|
|
49
|
+
* @param props - пропсы подвала
|
|
50
|
+
* @returns элемент <tfoot>
|
|
51
|
+
*/
|
|
52
|
+
function TableFooter({ className, ...props }) {
|
|
53
|
+
const classes = cn("border-t", "bg-muted/50", "font-medium", "[&>tr]:last:border-b-0", className);
|
|
54
|
+
return /* @__PURE__ */ jsx("tfoot", {
|
|
55
|
+
"data-slot": "table-footer",
|
|
56
|
+
className: classes,
|
|
57
|
+
...props
|
|
58
|
+
});
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Строка таблицы. Выбранная строка — data-state="selected"
|
|
62
|
+
* @param props - пропсы строки
|
|
63
|
+
* @returns элемент <tr>
|
|
64
|
+
*/
|
|
65
|
+
function TableRow({ className, ...props }) {
|
|
66
|
+
const classes = cn("border-b", "transition-colors", "hover:bg-muted/50", "has-aria-expanded:bg-muted/50", "data-[state=selected]:bg-muted", className);
|
|
67
|
+
return /* @__PURE__ */ jsx("tr", {
|
|
68
|
+
"data-slot": "table-row",
|
|
69
|
+
className: classes,
|
|
70
|
+
...props
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Ячейка заголовка столбца
|
|
75
|
+
* @param props - пропсы ячейки
|
|
76
|
+
* @returns элемент <th>
|
|
77
|
+
*/
|
|
78
|
+
function TableHead({ className, ...props }) {
|
|
79
|
+
const classes = cn("h-10", "px-2", "text-left", "align-middle", "font-medium", "whitespace-nowrap", "text-foreground", "[&:has([role=checkbox])]:pr-0", className);
|
|
80
|
+
return /* @__PURE__ */ jsx("th", {
|
|
81
|
+
"data-slot": "table-head",
|
|
82
|
+
className: classes,
|
|
83
|
+
...props
|
|
84
|
+
});
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Ячейка таблицы
|
|
88
|
+
* @param props - пропсы ячейки
|
|
89
|
+
* @returns элемент <td>
|
|
90
|
+
*/
|
|
91
|
+
function TableCell({ className, ...props }) {
|
|
92
|
+
const classes = cn("p-2", "align-middle", "whitespace-nowrap", "[&:has([role=checkbox])]:pr-0", className);
|
|
93
|
+
return /* @__PURE__ */ jsx("td", {
|
|
94
|
+
"data-slot": "table-cell",
|
|
95
|
+
className: classes,
|
|
96
|
+
...props
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Подпись таблицы: выводится под таблицей и объявляется скринридером как её название
|
|
101
|
+
* @param props - пропсы подписи
|
|
102
|
+
* @returns элемент <caption>
|
|
103
|
+
*/
|
|
104
|
+
function TableCaption({ className, ...props }) {
|
|
105
|
+
const classes = cn("mt-4", "text-sm", "text-muted-foreground", className);
|
|
106
|
+
return /* @__PURE__ */ jsx("caption", {
|
|
107
|
+
"data-slot": "table-caption",
|
|
108
|
+
className: classes,
|
|
109
|
+
...props
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow };
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ComponentProps } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Пропсы таблицы
|
|
4
|
+
*/
|
|
5
|
+
export type TablePropsT = ComponentProps<'table'>;
|
|
6
|
+
/**
|
|
7
|
+
* Пропсы шапки таблицы
|
|
8
|
+
*/
|
|
9
|
+
export type TableHeaderPropsT = ComponentProps<'thead'>;
|
|
10
|
+
/**
|
|
11
|
+
* Пропсы тела таблицы
|
|
12
|
+
*/
|
|
13
|
+
export type TableBodyPropsT = ComponentProps<'tbody'>;
|
|
14
|
+
/**
|
|
15
|
+
* Пропсы подвала таблицы
|
|
16
|
+
*/
|
|
17
|
+
export type TableFooterPropsT = ComponentProps<'tfoot'>;
|
|
18
|
+
/**
|
|
19
|
+
* Пропсы строки таблицы
|
|
20
|
+
*/
|
|
21
|
+
export type TableRowPropsT = ComponentProps<'tr'>;
|
|
22
|
+
/**
|
|
23
|
+
* Пропсы ячейки заголовка таблицы
|
|
24
|
+
*/
|
|
25
|
+
export type TableHeadPropsT = ComponentProps<'th'>;
|
|
26
|
+
/**
|
|
27
|
+
* Пропсы ячейки таблицы
|
|
28
|
+
*/
|
|
29
|
+
export type TableCellPropsT = ComponentProps<'td'>;
|
|
30
|
+
/**
|
|
31
|
+
* Пропсы подписи таблицы
|
|
32
|
+
*/
|
|
33
|
+
export type TableCaptionPropsT = ComponentProps<'caption'>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { TabsContentPropsT, TabsListPropsT, TabsPropsT, TabsTriggerPropsT, tabsListVariants } from "./types.js";
|
|
2
|
+
import { Tabs, TabsContent, TabsList, TabsTrigger } from "./tabs.js";
|
|
3
|
+
export { Tabs, TabsContent, type TabsContentPropsT, TabsList, type TabsListPropsT, type TabsPropsT, TabsTrigger, type TabsTriggerPropsT, tabsListVariants };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { TabsContentPropsT, TabsListPropsT, TabsPropsT, TabsTriggerPropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Вкладки: переключение между панелями содержимого
|
|
4
|
+
* @param props - пропсы вкладок
|
|
5
|
+
* @returns обёртка списка вкладок и панелей
|
|
6
|
+
*/
|
|
7
|
+
export declare function Tabs({ className, orientation, onValueChange, ...props }: TabsPropsT): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Список вкладок: кнопки переключения
|
|
10
|
+
* @param props - пропсы списка
|
|
11
|
+
* @returns элемент с role=tablist
|
|
12
|
+
*/
|
|
13
|
+
export declare function TabsList({ className, variant, children, ...props }: TabsListPropsT): import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Вкладка: кнопка, открывающая панель с тем же value
|
|
16
|
+
* @param props - пропсы вкладки
|
|
17
|
+
* @returns элемент с role=tab
|
|
18
|
+
*/
|
|
19
|
+
export declare function TabsTrigger({ className, ...props }: TabsTriggerPropsT): import("react").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Панель вкладки: содержимое, видимое при выбранной вкладке
|
|
22
|
+
* @param props - пропсы панели
|
|
23
|
+
* @returns элемент с role=tabpanel
|
|
24
|
+
*/
|
|
25
|
+
export declare function TabsContent({ className, ...props }: TabsContentPropsT): import("react").JSX.Element;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { tabsListVariants } from "./types.js";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Tabs } from "@base-ui/react/tabs";
|
|
6
|
+
// src/components/tabs/tabs.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Вкладки: переключение между панелями содержимого
|
|
9
|
+
* @param props - пропсы вкладок
|
|
10
|
+
* @returns обёртка списка вкладок и панелей
|
|
11
|
+
*/
|
|
12
|
+
function Tabs$1({ className, orientation = "horizontal", onValueChange, ...props }) {
|
|
13
|
+
const classes = cn("group/tabs", "flex", "gap-2", "data-horizontal:flex-col", className);
|
|
14
|
+
/**
|
|
15
|
+
* Открыта другая вкладка: наружу только значение
|
|
16
|
+
* @param value - значение вкладки
|
|
17
|
+
*/
|
|
18
|
+
const handleValueChange = (value) => onValueChange?.(value);
|
|
19
|
+
return /* @__PURE__ */ jsx(Tabs.Root, {
|
|
20
|
+
"data-slot": "tabs",
|
|
21
|
+
"data-orientation": orientation,
|
|
22
|
+
orientation,
|
|
23
|
+
className: classes,
|
|
24
|
+
onValueChange: handleValueChange,
|
|
25
|
+
...props
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Список вкладок: кнопки переключения
|
|
30
|
+
* @param props - пропсы списка
|
|
31
|
+
* @returns элемент с role=tablist
|
|
32
|
+
*/
|
|
33
|
+
function TabsList({ className, variant = "default", children, ...props }) {
|
|
34
|
+
const classes = cn(tabsListVariants({ variant }), className);
|
|
35
|
+
return /* @__PURE__ */ jsxs(Tabs.List, {
|
|
36
|
+
"data-slot": "tabs-list",
|
|
37
|
+
"data-variant": variant,
|
|
38
|
+
className: classes,
|
|
39
|
+
...props,
|
|
40
|
+
children: [children, /* @__PURE__ */ jsx(TabsIndicator, {})]
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Индикатор выбранной вкладки: подложка (default) или линия (line). Переезжает к новой вкладке
|
|
45
|
+
* с пружиной; при «уменьшении движения» в системе — без анимации
|
|
46
|
+
* @returns индикатор
|
|
47
|
+
*/
|
|
48
|
+
function TabsIndicator() {
|
|
49
|
+
const classes = cn("pointer-events-none", "absolute", "z-0", "transition-[left,top,width,height]", "duration-[430ms]", "ease-spring", "motion-reduce:transition-none", "group-data-[variant=default]/tabs-list:top-(--active-tab-top)", "group-data-[variant=default]/tabs-list:left-(--active-tab-left)", "group-data-[variant=default]/tabs-list:h-(--active-tab-height)", "group-data-[variant=default]/tabs-list:w-(--active-tab-width)", "group-data-[variant=default]/tabs-list:rounded-md", "group-data-[variant=default]/tabs-list:border", "group-data-[variant=default]/tabs-list:border-transparent", "group-data-[variant=default]/tabs-list:bg-background", "group-data-[variant=default]/tabs-list:shadow-sm", "dark:group-data-[variant=default]/tabs-list:border-input", "dark:group-data-[variant=default]/tabs-list:bg-input/30", "group-data-[variant=line]/tabs-list:bg-foreground", "group-data-horizontal/tabs:group-data-[variant=line]/tabs-list:left-(--active-tab-left)", "group-data-horizontal/tabs:group-data-[variant=line]/tabs-list:w-(--active-tab-width)", "group-data-horizontal/tabs:group-data-[variant=line]/tabs-list:bottom-[calc(var(--active-tab-bottom)-5px)]", "group-data-horizontal/tabs:group-data-[variant=line]/tabs-list:h-0.5", "group-data-vertical/tabs:group-data-[variant=line]/tabs-list:top-(--active-tab-top)", "group-data-vertical/tabs:group-data-[variant=line]/tabs-list:h-(--active-tab-height)", "group-data-vertical/tabs:group-data-[variant=line]/tabs-list:right-[calc(var(--active-tab-right)-4px)]", "group-data-vertical/tabs:group-data-[variant=line]/tabs-list:w-0.5");
|
|
50
|
+
return /* @__PURE__ */ jsx(Tabs.Indicator, {
|
|
51
|
+
"data-slot": "tabs-indicator",
|
|
52
|
+
className: classes
|
|
53
|
+
});
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Вкладка: кнопка, открывающая панель с тем же value
|
|
57
|
+
* @param props - пропсы вкладки
|
|
58
|
+
* @returns элемент с role=tab
|
|
59
|
+
*/
|
|
60
|
+
function TabsTrigger({ className, ...props }) {
|
|
61
|
+
const classes = cn("relative", "inline-flex", "h-[calc(100%-1px)]", "flex-1", "items-center", "justify-center", "gap-1.5", "rounded-md", "border", "border-transparent", "px-1.5", "py-0.5", "text-sm", "font-medium", "whitespace-nowrap", "text-foreground/60", "transition-[color,scale]", "duration-150", "active:scale-[0.98]", "motion-reduce:active:scale-100", "cursor-pointer", "hover:text-foreground", "dark:text-muted-foreground", "dark:hover:text-foreground", "group-data-vertical/tabs:w-full", "group-data-vertical/tabs:justify-start", "focus-visible:border-ring", "focus-visible:ring-[3px]", "focus-visible:ring-ring/50", "focus-visible:outline-1", "focus-visible:outline-ring", "data-disabled:cursor-not-allowed", "data-disabled:opacity-50", "data-disabled:hover:text-foreground/60", "dark:data-disabled:hover:text-muted-foreground", "[&_svg]:pointer-events-none", "[&_svg]:shrink-0", "[&_svg:not([class*=size-])]:size-4", "has-data-[icon=inline-end]:pr-1", "has-data-[icon=inline-start]:pl-1", "z-10", "data-active:text-foreground", "dark:data-active:text-foreground", className);
|
|
62
|
+
return /* @__PURE__ */ jsx(Tabs.Tab, {
|
|
63
|
+
"data-slot": "tabs-trigger",
|
|
64
|
+
className: classes,
|
|
65
|
+
...props
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Панель вкладки: содержимое, видимое при выбранной вкладке
|
|
70
|
+
* @param props - пропсы панели
|
|
71
|
+
* @returns элемент с role=tabpanel
|
|
72
|
+
*/
|
|
73
|
+
function TabsContent({ className, ...props }) {
|
|
74
|
+
const classes = cn("flex-1", "text-sm", "outline-none", className);
|
|
75
|
+
return /* @__PURE__ */ jsx(Tabs.Panel, {
|
|
76
|
+
"data-slot": "tabs-content",
|
|
77
|
+
className: classes,
|
|
78
|
+
...props
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
export { Tabs$1 as Tabs, TabsContent, TabsList, TabsTrigger };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { PartPropsT } from "../../lib/part-props.js";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import { Tabs } from "@base-ui/react/tabs";
|
|
4
|
+
/**
|
|
5
|
+
* Ориентация вкладок: расположение списка и навигация стрелками
|
|
6
|
+
*/
|
|
7
|
+
type TabsOrientationT = 'horizontal' | 'vertical';
|
|
8
|
+
/**
|
|
9
|
+
* Пропсы вкладок
|
|
10
|
+
*/
|
|
11
|
+
export type TabsPropsT = PartPropsT<Omit<Tabs.Root.Props, 'value' | 'defaultValue' | 'onValueChange' | 'orientation'>> & {
|
|
12
|
+
/** Значение открытой вкладки — контролируемый режим, вместе с onValueChange */
|
|
13
|
+
value?: string;
|
|
14
|
+
/** Значение открытой вкладки при первом рендере — неконтролируемый режим */
|
|
15
|
+
defaultValue?: string;
|
|
16
|
+
/** Открыта другая вкладка: её значение */
|
|
17
|
+
onValueChange?: (value: string) => void;
|
|
18
|
+
/** Ориентация: список вкладок сверху (horizontal) или слева (vertical) */
|
|
19
|
+
orientation?: TabsOrientationT;
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Стили списка вкладок: обычный (на подложке) или линия под активной вкладкой.
|
|
23
|
+
* Экспортируются, чтобы оформить списком вкладок другой элемент
|
|
24
|
+
*/
|
|
25
|
+
export declare const tabsListVariants: (props?: ({
|
|
26
|
+
variant?: "line" | "default" | null | undefined;
|
|
27
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
28
|
+
/**
|
|
29
|
+
* Варианты оформления списка вкладок
|
|
30
|
+
*/
|
|
31
|
+
type TabsListVariantsT = VariantProps<typeof tabsListVariants>;
|
|
32
|
+
/**
|
|
33
|
+
* Пропсы списка вкладок
|
|
34
|
+
*/
|
|
35
|
+
export type TabsListPropsT = PartPropsT<Tabs.List.Props> & {
|
|
36
|
+
/** Оформление: на подложке (default) или линия под активной вкладкой (line) */
|
|
37
|
+
variant?: TabsListVariantsT['variant'];
|
|
38
|
+
/** Переход фокуса стрелками: с последней вкладки на первую и обратно. По умолчанию true */
|
|
39
|
+
loopFocus?: boolean;
|
|
40
|
+
/** true — вкладка открывается при фокусе стрелками; false (по умолчанию) — по Enter или Space */
|
|
41
|
+
activateOnFocus?: boolean;
|
|
42
|
+
};
|
|
43
|
+
/**
|
|
44
|
+
* Пропсы вкладки
|
|
45
|
+
*/
|
|
46
|
+
export type TabsTriggerPropsT = PartPropsT<Omit<Tabs.Tab.Props, 'value'>> & {
|
|
47
|
+
/** Значение вкладки: совпадает со value панели, которую она открывает */
|
|
48
|
+
value: string;
|
|
49
|
+
/** Отключить вкладку: не выбирается и пропускается при навигации стрелками */
|
|
50
|
+
disabled?: boolean;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Пропсы панели вкладки
|
|
54
|
+
*/
|
|
55
|
+
export type TabsContentPropsT = PartPropsT<Omit<Tabs.Panel.Props, 'value'>> & {
|
|
56
|
+
/** Значение вкладки, которая открывает панель */
|
|
57
|
+
value: string;
|
|
58
|
+
/** Держать панель в DOM, даже когда вкладка не выбрана: для анимаций и сохранения состояния */
|
|
59
|
+
keepMounted?: boolean;
|
|
60
|
+
};
|
|
61
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
// src/components/tabs/types.ts
|
|
3
|
+
/**
|
|
4
|
+
* Стили списка вкладок: обычный (на подложке) или линия под активной вкладкой.
|
|
5
|
+
* Экспортируются, чтобы оформить списком вкладок другой элемент
|
|
6
|
+
*/
|
|
7
|
+
const tabsListVariants = cva([
|
|
8
|
+
"group/tabs-list relative inline-flex w-fit items-center justify-center rounded-lg p-[3px] text-muted-foreground",
|
|
9
|
+
"group-data-horizontal/tabs:h-8 group-data-vertical/tabs:h-fit group-data-vertical/tabs:flex-col",
|
|
10
|
+
"data-[variant=line]:rounded-none"
|
|
11
|
+
], {
|
|
12
|
+
variants: { variant: {
|
|
13
|
+
default: "bg-muted",
|
|
14
|
+
line: "gap-1 bg-transparent"
|
|
15
|
+
} },
|
|
16
|
+
defaultVariants: { variant: "default" }
|
|
17
|
+
});
|
|
18
|
+
export { tabsListVariants };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Textarea } from "./textarea.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TextareaPropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Многострочное поле ввода: высота подстраивается под текст
|
|
4
|
+
* @param props - пропсы поля
|
|
5
|
+
* @returns элемент textarea
|
|
6
|
+
*/
|
|
7
|
+
export declare function Textarea({ className, ...props }: TextareaPropsT): import("react").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { jsx } from "react/jsx-runtime";
|
|
3
|
+
// src/components/textarea/textarea.tsx
|
|
4
|
+
/**
|
|
5
|
+
* Многострочное поле ввода: высота подстраивается под текст
|
|
6
|
+
* @param props - пропсы поля
|
|
7
|
+
* @returns элемент textarea
|
|
8
|
+
*/
|
|
9
|
+
function Textarea({ className, ...props }) {
|
|
10
|
+
const classes = cn("flex", "field-sizing-content", "min-h-16", "w-full", "rounded-lg", "border", "border-input", "bg-transparent", "px-2.5", "py-2", "text-base", "transition-colors", "outline-none", "placeholder:text-muted-foreground", "focus-visible:border-ring", "focus-visible:ring-3", "focus-visible:ring-ring/50", "disabled:cursor-not-allowed", "disabled:bg-input/50", "disabled:opacity-50", "aria-invalid:border-destructive", "aria-invalid:ring-3", "aria-invalid:ring-destructive/20", "md:text-sm", "dark:bg-input/30", "dark:disabled:bg-input/80", "dark:aria-invalid:border-destructive/50", "dark:aria-invalid:ring-destructive/40", className);
|
|
11
|
+
return /* @__PURE__ */ jsx("textarea", {
|
|
12
|
+
"data-slot": "textarea",
|
|
13
|
+
className: classes,
|
|
14
|
+
...props
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
export { Textarea };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ChangeEvent, ComponentProps } from "react";
|
|
2
|
+
/**
|
|
3
|
+
* Пропсы многострочного поля
|
|
4
|
+
*/
|
|
5
|
+
export type TextareaPropsT = Omit<ComponentProps<'textarea'>, 'value' | 'defaultValue' | 'placeholder' | 'rows' | 'maxLength' | 'disabled' | 'readOnly' | 'required' | 'aria-invalid' | 'onChange'> & {
|
|
6
|
+
/** Значение поля — контролируемый режим, вместе с onChange */
|
|
7
|
+
value?: string;
|
|
8
|
+
/** Значение при первом рендере — неконтролируемый режим */
|
|
9
|
+
defaultValue?: string;
|
|
10
|
+
/** Подсказка, пока поле пустое */
|
|
11
|
+
placeholder?: string;
|
|
12
|
+
/** Начальная высота в строках. По умолчанию высота растёт вместе с текстом */
|
|
13
|
+
rows?: number;
|
|
14
|
+
/** Наибольшее число символов */
|
|
15
|
+
maxLength?: number;
|
|
16
|
+
/** Отключённое состояние: поле нельзя изменить и выделить, оно не отправляется с формой */
|
|
17
|
+
disabled?: boolean;
|
|
18
|
+
/** Только для чтения: текст виден и выделяется, но не меняется */
|
|
19
|
+
readOnly?: boolean;
|
|
20
|
+
/** Обязательное поле: форма не отправится, пока оно пустое */
|
|
21
|
+
required?: boolean;
|
|
22
|
+
/** Ошибка: красная рамка и объявление скринридеру, что значение неверное */
|
|
23
|
+
'aria-invalid'?: boolean;
|
|
24
|
+
/** Текст изменился */
|
|
25
|
+
onChange?: (event: ChangeEvent<HTMLTextAreaElement>) => void;
|
|
26
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ToastActionI, ToastActionPropsT, ToastClosePropsT, ToastContentPropsT, ToastDescriptionPropsT, ToastFunctionT, ToastManagerT, ToastOptionsI, ToastPositionT, ToastPromiseTextsI, ToastPropsT, ToastTitlePropsT, ToastTypeT, ToastViewportPropsT, ToasterPropsT } from "./types.js";
|
|
2
|
+
import { Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastTitle, ToastViewport, Toaster, createToast, createToastManager, toast, useToastManager } from "./toast.js";
|
|
3
|
+
export { Toast, ToastAction, type ToastActionI, type ToastActionPropsT, ToastClose, type ToastClosePropsT, ToastContent, type ToastContentPropsT, ToastDescription, type ToastDescriptionPropsT, type ToastFunctionT, type ToastManagerT, type ToastOptionsI, type ToastPositionT, type ToastPromiseTextsI, type ToastPropsT, ToastTitle, type ToastTitlePropsT, type ToastTypeT, ToastViewport, type ToastViewportPropsT, Toaster, type ToasterPropsT, createToast, createToastManager, toast, useToastManager };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Toast, ToastAction, ToastClose, ToastContent, ToastDescription, ToastTitle, ToastViewport, Toaster, createToast, createToastManager, toast, useToastManager } from "./toast.js";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ToastActionPropsT, ToastClosePropsT, ToastContentPropsT, ToastDescriptionPropsT, ToastFunctionT, ToastManagerT, ToastPropsT, ToastTitlePropsT, ToastViewportPropsT, ToasterPropsT } from "./types.js";
|
|
2
|
+
import { Toast } from "@base-ui/react/toast";
|
|
3
|
+
/** Создать свой менеджер уведомлений: для отдельного Toaster */
|
|
4
|
+
export declare const createToastManager: typeof Toast.createToastManager;
|
|
5
|
+
/**
|
|
6
|
+
* Функция показа уведомлений для менеджера
|
|
7
|
+
* @param manager - менеджер, в который добавляются уведомления
|
|
8
|
+
* @returns toast с методами success, info, warning, error, loading, promise, dismiss
|
|
9
|
+
*/
|
|
10
|
+
export declare function createToast(manager: ToastManagerT): ToastFunctionT;
|
|
11
|
+
/** Показать уведомление в общем Toaster: toast('Текст'), toast.success(...), toast.promise(...) */
|
|
12
|
+
export declare const toast: ToastFunctionT;
|
|
13
|
+
/**
|
|
14
|
+
* Область уведомлений: стопка в углу экрана, раскрывается при наведении
|
|
15
|
+
* @param props - пропсы области
|
|
16
|
+
* @returns область с role="region"
|
|
17
|
+
*/
|
|
18
|
+
export declare function ToastViewport({ className, position, ...props }: ToastViewportPropsT): import("react").JSX.Element;
|
|
19
|
+
/**
|
|
20
|
+
* Уведомление: карточка в стопке; смахивается к краю экрана
|
|
21
|
+
* @param props - пропсы уведомления; toast — объект из useToastManager().toasts
|
|
22
|
+
* @returns карточка уведомления
|
|
23
|
+
*/
|
|
24
|
+
declare function Toast$1({ className, ...props }: ToastPropsT): import("react").JSX.Element;
|
|
25
|
+
/**
|
|
26
|
+
* Содержимое уведомления: иконка, текст и кнопки в строку; у задних карточек стопки скрыто
|
|
27
|
+
* @param props - пропсы содержимого
|
|
28
|
+
* @returns строка содержимого
|
|
29
|
+
*/
|
|
30
|
+
export declare function ToastContent({ className, ...props }: ToastContentPropsT): import("react").JSX.Element;
|
|
31
|
+
/**
|
|
32
|
+
* Заголовок уведомления: по умолчанию — первый аргумент toast()
|
|
33
|
+
* @param props - пропсы заголовка
|
|
34
|
+
* @returns заголовок
|
|
35
|
+
*/
|
|
36
|
+
export declare function ToastTitle({ className, ...props }: ToastTitlePropsT): import("react").JSX.Element;
|
|
37
|
+
/**
|
|
38
|
+
* Описание уведомления: по умолчанию — description из параметров
|
|
39
|
+
* @param props - пропсы описания
|
|
40
|
+
* @returns абзац
|
|
41
|
+
*/
|
|
42
|
+
export declare function ToastDescription({ className, ...props }: ToastDescriptionPropsT): import("react").JSX.Element;
|
|
43
|
+
/**
|
|
44
|
+
* Кнопка действия: по умолчанию — action из параметров, оформлена как Button outline sm
|
|
45
|
+
* @param props - пропсы кнопки
|
|
46
|
+
* @returns кнопка
|
|
47
|
+
*/
|
|
48
|
+
export declare function ToastAction({ className, render, ...props }: ToastActionPropsT): import("react").JSX.Element;
|
|
49
|
+
/**
|
|
50
|
+
* Кнопка закрытия уведомления: крестик
|
|
51
|
+
* @param props - пропсы кнопки
|
|
52
|
+
* @returns кнопка
|
|
53
|
+
*/
|
|
54
|
+
export declare function ToastClose({ className, children, label, render, ...props }: ToastClosePropsT): import("react").JSX.Element;
|
|
55
|
+
/**
|
|
56
|
+
* Контейнер уведомлений: ставится один раз в корень приложения
|
|
57
|
+
* @param props - пропсы контейнера
|
|
58
|
+
* @returns провайдер с областью уведомлений
|
|
59
|
+
*/
|
|
60
|
+
export declare function Toaster({ children, position, toastManager, closeButton, viewportLabel, ...props }: ToasterPropsT): import("react").JSX.Element;
|
|
61
|
+
/** Хук: список уведомлений и методы add, close, update, promise ближайшего Toaster */
|
|
62
|
+
export declare const useToastManager: typeof Toast.useToastManager;
|
|
63
|
+
export { Toast$1 as Toast };
|