@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,103 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { Button } from "../button/button.js";
|
|
4
|
+
import { Input } from "../input/input.js";
|
|
5
|
+
import { Textarea } from "../textarea/textarea.js";
|
|
6
|
+
import { inputGroupAddonVariants, inputGroupButtonVariants } from "./types.js";
|
|
7
|
+
import { jsx } from "react/jsx-runtime";
|
|
8
|
+
// src/components/input-group/input-group.tsx
|
|
9
|
+
/**
|
|
10
|
+
* Группа поля: поле ввода с иконками, текстом и кнопками внутри общей рамки
|
|
11
|
+
* @param props - пропсы группы
|
|
12
|
+
* @returns div с role="group"
|
|
13
|
+
*/
|
|
14
|
+
function InputGroup({ className, ...props }) {
|
|
15
|
+
const classes = cn("group/input-group", "relative", "flex", "h-8", "w-full", "min-w-0", "items-center", "rounded-lg", "border", "border-input", "transition-colors", "outline-none", "has-[>textarea]:h-auto", "dark:bg-input/30", "keyboard:has-[[data-slot=input-group-control]:focus-visible]:border-ring", "keyboard:has-[[data-slot=input-group-control]:focus-visible]:ring-3", "keyboard:has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50", "has-[[data-slot][aria-invalid=true]]:border-destructive", "has-[[data-slot][aria-invalid=true]]:ring-3", "has-[[data-slot][aria-invalid=true]]:ring-destructive/20", "dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40", "has-[[data-slot=input-group-control]:disabled]:bg-input/50", "has-[[data-slot=input-group-control]:disabled]:opacity-50", "dark:has-[[data-slot=input-group-control]:disabled]:bg-input/80", "keyboard:in-data-[slot=combobox-content]:focus-within:border-inherit", "keyboard:in-data-[slot=combobox-content]:focus-within:ring-0", "has-[>[data-align=block-end]]:h-auto", "has-[>[data-align=block-end]]:flex-col", "has-[>[data-align=block-start]]:h-auto", "has-[>[data-align=block-start]]:flex-col", "has-[>[data-align=block-end]]:[&>input]:pt-3", "has-[>[data-align=block-start]]:[&>input]:pb-3", "has-[>[data-align=inline-end]]:[&>input]:pr-1.5", "has-[>[data-align=inline-start]]:[&>input]:pl-1.5", className);
|
|
16
|
+
return /* @__PURE__ */ jsx("div", {
|
|
17
|
+
"data-slot": "input-group",
|
|
18
|
+
role: "group",
|
|
19
|
+
className: classes,
|
|
20
|
+
...props
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Дополнение: иконка, текст или кнопки внутри рамки. Нажатие ставит фокус в поле
|
|
25
|
+
* @param props - пропсы дополнения
|
|
26
|
+
* @returns div с role="group"
|
|
27
|
+
*/
|
|
28
|
+
function InputGroupAddon({ className, align = "inline-start", onClick, ...props }) {
|
|
29
|
+
const classes = cn(inputGroupAddonVariants({ align }), className);
|
|
30
|
+
/**
|
|
31
|
+
* Нажатие мимо кнопок ставит фокус в поле группы
|
|
32
|
+
* @param event - событие нажатия
|
|
33
|
+
*/
|
|
34
|
+
const focusInput = (event) => {
|
|
35
|
+
onClick?.(event);
|
|
36
|
+
const target = event.target;
|
|
37
|
+
if (event.defaultPrevented || target.closest("button")) return;
|
|
38
|
+
event.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
39
|
+
};
|
|
40
|
+
return /* @__PURE__ */ jsx("div", {
|
|
41
|
+
role: "group",
|
|
42
|
+
"data-slot": "input-group-addon",
|
|
43
|
+
"data-align": align,
|
|
44
|
+
className: classes,
|
|
45
|
+
onClick: focusInput,
|
|
46
|
+
...props
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Кнопка в группе: компактная, по умолчанию ghost
|
|
51
|
+
* @param props - пропсы кнопки; по умолчанию type="button", variant="ghost", size="xs"
|
|
52
|
+
* @returns кнопка
|
|
53
|
+
*/
|
|
54
|
+
function InputGroupButton({ className, type = "button", variant = "ghost", size = "xs", ...props }) {
|
|
55
|
+
const classes = cn(inputGroupButtonVariants({ size }), className);
|
|
56
|
+
return /* @__PURE__ */ jsx(Button, {
|
|
57
|
+
type,
|
|
58
|
+
"data-size": size,
|
|
59
|
+
variant,
|
|
60
|
+
className: classes,
|
|
61
|
+
...props
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Текст в группе: префикс или суффикс поля (₽, https://, @example.ru)
|
|
66
|
+
* @param props - пропсы текста
|
|
67
|
+
* @returns span
|
|
68
|
+
*/
|
|
69
|
+
function InputGroupText({ className, ...props }) {
|
|
70
|
+
const classes = cn("flex", "items-center", "gap-2", "text-sm", "text-muted-foreground", "[&_svg]:pointer-events-none", "[&_svg:not([class*=size-])]:size-4", className);
|
|
71
|
+
return /* @__PURE__ */ jsx("span", {
|
|
72
|
+
"data-slot": "input-group-text",
|
|
73
|
+
className: classes,
|
|
74
|
+
...props
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
/**
|
|
78
|
+
* Поле в группе: Input без своей рамки, рамку рисует группа
|
|
79
|
+
* @param props - пропсы поля
|
|
80
|
+
* @returns input
|
|
81
|
+
*/
|
|
82
|
+
function InputGroupInput({ className, ...props }) {
|
|
83
|
+
const classes = cn("flex-1", "rounded-none", "border-0", "bg-transparent", "shadow-none", "ring-0", "focus-visible:ring-0", "disabled:bg-transparent", "aria-invalid:ring-0", "dark:bg-transparent", "dark:disabled:bg-transparent", className);
|
|
84
|
+
return /* @__PURE__ */ jsx(Input, {
|
|
85
|
+
"data-slot": "input-group-control",
|
|
86
|
+
className: classes,
|
|
87
|
+
...props
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Многострочное поле в группе: Textarea без своей рамки
|
|
92
|
+
* @param props - пропсы поля
|
|
93
|
+
* @returns textarea
|
|
94
|
+
*/
|
|
95
|
+
function InputGroupTextarea({ className, ...props }) {
|
|
96
|
+
const classes = cn("flex-1", "resize-none", "rounded-none", "border-0", "bg-transparent", "py-2", "shadow-none", "ring-0", "focus-visible:ring-0", "disabled:bg-transparent", "aria-invalid:ring-0", "dark:bg-transparent", "dark:disabled:bg-transparent", className);
|
|
97
|
+
return /* @__PURE__ */ jsx(Textarea, {
|
|
98
|
+
"data-slot": "input-group-control",
|
|
99
|
+
className: classes,
|
|
100
|
+
...props
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
export { InputGroup, InputGroupAddon, InputGroupButton, InputGroupInput, InputGroupText, InputGroupTextarea };
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { ButtonPropsT } from "../button/types.js";
|
|
2
|
+
import { InputPropsT } from "../input/types.js";
|
|
3
|
+
import { TextareaPropsT } from "../textarea/types.js";
|
|
4
|
+
import { VariantProps } from "class-variance-authority";
|
|
5
|
+
import { ComponentProps } from "react";
|
|
6
|
+
/**
|
|
7
|
+
* Пропсы группы поля
|
|
8
|
+
*/
|
|
9
|
+
export type InputGroupPropsT = ComponentProps<'div'>;
|
|
10
|
+
/**
|
|
11
|
+
* Стили дополнения: где оно стоит относительно поля
|
|
12
|
+
*/
|
|
13
|
+
export declare const inputGroupAddonVariants: (props?: ({
|
|
14
|
+
align?: "inline-start" | "inline-end" | "block-start" | "block-end" | null | undefined;
|
|
15
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
16
|
+
/**
|
|
17
|
+
* Варианты стилей дополнения
|
|
18
|
+
*/
|
|
19
|
+
type InputGroupAddonVariantsT = VariantProps<typeof inputGroupAddonVariants>;
|
|
20
|
+
/**
|
|
21
|
+
* Положение дополнения: inline — слева или справа в строке, block — сверху или снизу
|
|
22
|
+
*/
|
|
23
|
+
export type InputGroupAlignT = NonNullable<InputGroupAddonVariantsT['align']>;
|
|
24
|
+
/**
|
|
25
|
+
* Пропсы дополнения
|
|
26
|
+
*/
|
|
27
|
+
export type InputGroupAddonPropsT = ComponentProps<'div'> & {
|
|
28
|
+
/** Положение: inline-start — слева, inline-end — справа, block-start — сверху, block-end — снизу */
|
|
29
|
+
align?: InputGroupAlignT;
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Стили кнопки в группе: размер
|
|
33
|
+
*/
|
|
34
|
+
export declare const inputGroupButtonVariants: (props?: ({
|
|
35
|
+
size?: "sm" | "xs" | "icon-xs" | "icon-sm" | null | undefined;
|
|
36
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
37
|
+
/**
|
|
38
|
+
* Варианты стилей кнопки в группе
|
|
39
|
+
*/
|
|
40
|
+
type InputGroupButtonVariantsT = VariantProps<typeof inputGroupButtonVariants>;
|
|
41
|
+
/**
|
|
42
|
+
* Размер кнопки в группе
|
|
43
|
+
*/
|
|
44
|
+
export type InputGroupButtonSizeT = NonNullable<InputGroupButtonVariantsT['size']>;
|
|
45
|
+
/**
|
|
46
|
+
* Пропсы кнопки в группе
|
|
47
|
+
*/
|
|
48
|
+
export type InputGroupButtonPropsT = Omit<ButtonPropsT, 'size'> & {
|
|
49
|
+
/** Размер: xs и sm — с текстом, icon-xs и icon-sm — только иконка */
|
|
50
|
+
size?: InputGroupButtonSizeT;
|
|
51
|
+
};
|
|
52
|
+
/**
|
|
53
|
+
* Пропсы текста в группе
|
|
54
|
+
*/
|
|
55
|
+
export type InputGroupTextPropsT = ComponentProps<'span'>;
|
|
56
|
+
/**
|
|
57
|
+
* Пропсы поля в группе
|
|
58
|
+
*/
|
|
59
|
+
export type InputGroupInputPropsT = InputPropsT;
|
|
60
|
+
/**
|
|
61
|
+
* Пропсы многострочного поля в группе
|
|
62
|
+
*/
|
|
63
|
+
export type InputGroupTextareaPropsT = TextareaPropsT;
|
|
64
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
// src/components/input-group/types.ts
|
|
3
|
+
/**
|
|
4
|
+
* Стили дополнения: где оно стоит относительно поля
|
|
5
|
+
*/
|
|
6
|
+
const inputGroupAddonVariants = cva([
|
|
7
|
+
"flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none",
|
|
8
|
+
"group-data-[disabled=true]/input-group:opacity-50",
|
|
9
|
+
"[&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*=size-])]:size-4"
|
|
10
|
+
], {
|
|
11
|
+
variants: { align: {
|
|
12
|
+
"inline-start": "order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]",
|
|
13
|
+
"inline-end": "order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]",
|
|
14
|
+
"block-start": "order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2",
|
|
15
|
+
"block-end": "order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2"
|
|
16
|
+
} },
|
|
17
|
+
defaultVariants: { align: "inline-start" }
|
|
18
|
+
});
|
|
19
|
+
/**
|
|
20
|
+
* Стили кнопки в группе: размер
|
|
21
|
+
*/
|
|
22
|
+
const inputGroupButtonVariants = cva("flex items-center gap-2 text-sm shadow-none", {
|
|
23
|
+
variants: { size: {
|
|
24
|
+
"xs": "h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*=size-])]:size-3.5",
|
|
25
|
+
"sm": "",
|
|
26
|
+
"icon-xs": "size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0",
|
|
27
|
+
"icon-sm": "size-8 p-0 has-[>svg]:p-0"
|
|
28
|
+
} },
|
|
29
|
+
defaultVariants: { size: "xs" }
|
|
30
|
+
});
|
|
31
|
+
export { inputGroupAddonVariants, inputGroupButtonVariants };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { InputOTPGroupPropsT, InputOTPPropsT, InputOTPSeparatorPropsT, InputOTPSlotPropsT, InputOTPValidationT } from "./types.js";
|
|
2
|
+
import { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from "./input-otp.js";
|
|
3
|
+
export { InputOTP, InputOTPGroup, type InputOTPGroupPropsT, type InputOTPPropsT, InputOTPSeparator, type InputOTPSeparatorPropsT, InputOTPSlot, type InputOTPSlotPropsT, type InputOTPValidationT };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot } from "./input-otp.js";
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { InputOTPGroupPropsT, InputOTPPropsT, InputOTPSeparatorPropsT, InputOTPSlotPropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Поле одноразового кода: ячейки по символу, вставка кода целиком, автозаполнение из СМС
|
|
4
|
+
* @param props - пропсы поля; maxLength — длина кода, дочерние InputOTPGroup и InputOTPSlot — ячейки
|
|
5
|
+
* @returns поле
|
|
6
|
+
*/
|
|
7
|
+
export declare function InputOTP({ className, maxLength, validationType, onValueChange, onComplete, ...props }: InputOTPPropsT): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Группа ячеек: ячейки стоят вплотную с общей рамкой
|
|
10
|
+
* @param props - пропсы группы
|
|
11
|
+
* @returns div
|
|
12
|
+
*/
|
|
13
|
+
export declare function InputOTPGroup({ className, ...props }: InputOTPGroupPropsT): import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Ячейка: поле для одного символа кода, активная подсвечена рамкой
|
|
16
|
+
* @param props - пропсы ячейки
|
|
17
|
+
* @returns input
|
|
18
|
+
*/
|
|
19
|
+
export declare function InputOTPSlot({ index, className, ...props }: InputOTPSlotPropsT): import("react").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Разделитель между группами ячеек: короткая черта
|
|
22
|
+
* @param props - пропсы разделителя
|
|
23
|
+
* @returns div с role="separator"
|
|
24
|
+
*/
|
|
25
|
+
export declare function InputOTPSeparator(props: InputOTPSeparatorPropsT): import("react").JSX.Element;
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { MinusIcon } from "lucide-react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { OTPField } from "@base-ui/react/otp-field";
|
|
6
|
+
// src/components/input-otp/input-otp.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Поле одноразового кода: ячейки по символу, вставка кода целиком, автозаполнение из СМС
|
|
9
|
+
* @param props - пропсы поля; maxLength — длина кода, дочерние InputOTPGroup и InputOTPSlot — ячейки
|
|
10
|
+
* @returns поле
|
|
11
|
+
*/
|
|
12
|
+
function InputOTP({ className, maxLength, validationType = "numeric", onValueChange, onComplete, ...props }) {
|
|
13
|
+
const classes = cn("flex", "items-center", "gap-2", "has-disabled:opacity-50", className);
|
|
14
|
+
/**
|
|
15
|
+
* Код изменился: наружу только значение
|
|
16
|
+
* @param value - код
|
|
17
|
+
*/
|
|
18
|
+
const handleValueChange = (value) => onValueChange?.(value);
|
|
19
|
+
/**
|
|
20
|
+
* Код введён целиком: наружу только значение
|
|
21
|
+
* @param value - код
|
|
22
|
+
*/
|
|
23
|
+
const handleValueComplete = (value) => onComplete?.(value);
|
|
24
|
+
return /* @__PURE__ */ jsx(OTPField.Root, {
|
|
25
|
+
"data-slot": "input-otp",
|
|
26
|
+
length: maxLength,
|
|
27
|
+
validationType,
|
|
28
|
+
autoComplete: "one-time-code",
|
|
29
|
+
className: classes,
|
|
30
|
+
onValueChange: handleValueChange,
|
|
31
|
+
onValueComplete: handleValueComplete,
|
|
32
|
+
...props
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Группа ячеек: ячейки стоят вплотную с общей рамкой
|
|
37
|
+
* @param props - пропсы группы
|
|
38
|
+
* @returns div
|
|
39
|
+
*/
|
|
40
|
+
function InputOTPGroup({ className, ...props }) {
|
|
41
|
+
const classes = cn("flex", "items-center", "rounded-lg", "has-aria-invalid:border-destructive", "has-aria-invalid:ring-3", "has-aria-invalid:ring-destructive/20", "dark:has-aria-invalid:ring-destructive/40", className);
|
|
42
|
+
return /* @__PURE__ */ jsx("div", {
|
|
43
|
+
"data-slot": "input-otp-group",
|
|
44
|
+
className: classes,
|
|
45
|
+
...props
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Ячейка: поле для одного символа кода, активная подсвечена рамкой
|
|
50
|
+
* @param props - пропсы ячейки
|
|
51
|
+
* @returns input
|
|
52
|
+
*/
|
|
53
|
+
function InputOTPSlot({ index, className, ...props }) {
|
|
54
|
+
const classes = cn("relative", "flex", "size-8", "items-center", "justify-center", "border-y", "border-r", "border-input", "bg-transparent", "text-center", "text-sm", "caret-foreground", "transition-all", "outline-none", "first:rounded-l-lg", "first:border-l", "last:rounded-r-lg", "dark:bg-input/30", "focus:z-10", "focus-visible:border-ring", "focus-visible:ring-3", "focus-visible:ring-ring/50", "aria-invalid:border-destructive", "focus-visible:aria-invalid:border-destructive", "focus-visible:aria-invalid:ring-destructive/20", "dark:focus-visible:aria-invalid:ring-destructive/40", "disabled:cursor-not-allowed", className);
|
|
55
|
+
return /* @__PURE__ */ jsx(OTPField.Input, {
|
|
56
|
+
"data-slot": "input-otp-slot",
|
|
57
|
+
"data-index": index,
|
|
58
|
+
className: classes,
|
|
59
|
+
...props
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Разделитель между группами ячеек: короткая черта
|
|
64
|
+
* @param props - пропсы разделителя
|
|
65
|
+
* @returns div с role="separator"
|
|
66
|
+
*/
|
|
67
|
+
function InputOTPSeparator(props) {
|
|
68
|
+
return /* @__PURE__ */ jsx("div", {
|
|
69
|
+
"data-slot": "input-otp-separator",
|
|
70
|
+
role: "separator",
|
|
71
|
+
className: "flex items-center [&_svg:not([class*=size-])]:size-4",
|
|
72
|
+
...props,
|
|
73
|
+
children: /* @__PURE__ */ jsx(MinusIcon, {})
|
|
74
|
+
});
|
|
75
|
+
}
|
|
76
|
+
export { InputOTP, InputOTPGroup, InputOTPSeparator, InputOTPSlot };
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { PartPropsT } from "../../lib/part-props.js";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
import { OTPField } from "@base-ui/react/otp-field";
|
|
4
|
+
/**
|
|
5
|
+
* Какие символы можно вводить: numeric — цифры, alpha — буквы, alphanumeric — цифры и буквы, none — любые
|
|
6
|
+
*/
|
|
7
|
+
export type InputOTPValidationT = 'numeric' | 'alpha' | 'alphanumeric' | 'none';
|
|
8
|
+
/**
|
|
9
|
+
* Пропсы поля одноразового кода
|
|
10
|
+
*/
|
|
11
|
+
export type InputOTPPropsT = PartPropsT<Omit<OTPField.Root.Props, 'length' | 'onValueChange' | 'onValueComplete'>> & {
|
|
12
|
+
/** Длина кода: сколько ячеек */
|
|
13
|
+
maxLength: number;
|
|
14
|
+
/** Какие символы можно вводить. По умолчанию numeric — только цифры */
|
|
15
|
+
validationType?: InputOTPValidationT;
|
|
16
|
+
/** Код — контролируемый режим, вместе с onValueChange */
|
|
17
|
+
value?: string;
|
|
18
|
+
/** Код при первом рендере — неконтролируемый режим */
|
|
19
|
+
defaultValue?: string;
|
|
20
|
+
/** Код изменился */
|
|
21
|
+
onValueChange?: (value: string) => void;
|
|
22
|
+
/** Код введён целиком */
|
|
23
|
+
onComplete?: (value: string) => void;
|
|
24
|
+
/** Отключить поле */
|
|
25
|
+
disabled?: boolean;
|
|
26
|
+
/** Скрыть символы точками, как пароль */
|
|
27
|
+
mask?: boolean;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Пропсы группы ячеек
|
|
31
|
+
*/
|
|
32
|
+
export type InputOTPGroupPropsT = ComponentProps<'div'>;
|
|
33
|
+
/**
|
|
34
|
+
* Пропсы ячейки
|
|
35
|
+
*/
|
|
36
|
+
export type InputOTPSlotPropsT = PartPropsT<OTPField.Input.Props> & {
|
|
37
|
+
/** Номер символа в коде, с нуля. Ячейки нумеруются по порядку сами, проп оставлен для читаемости разметки */
|
|
38
|
+
index?: number;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Пропсы разделителя
|
|
42
|
+
*/
|
|
43
|
+
export type InputOTPSeparatorPropsT = ComponentProps<'div'>;
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { ItemActionsPropsT, ItemContentPropsT, ItemDescriptionPropsT, ItemFooterPropsT, ItemGroupPropsT, ItemHeaderPropsT, ItemMediaPropsT, ItemPropsT, ItemSeparatorPropsT, ItemTitlePropsT, itemMediaVariants, itemVariants } from "./types.js";
|
|
2
|
+
import { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle } from "./item.js";
|
|
3
|
+
export { Item, ItemActions, type ItemActionsPropsT, ItemContent, type ItemContentPropsT, ItemDescription, type ItemDescriptionPropsT, ItemFooter, type ItemFooterPropsT, ItemGroup, type ItemGroupPropsT, ItemHeader, type ItemHeaderPropsT, ItemMedia, type ItemMediaPropsT, type ItemPropsT, ItemSeparator, type ItemSeparatorPropsT, ItemTitle, type ItemTitlePropsT, itemMediaVariants, itemVariants };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { itemMediaVariants, itemVariants } from "./types.js";
|
|
2
|
+
import { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle } from "./item.js";
|
|
3
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle, itemMediaVariants, itemVariants };
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ItemActionsPropsT, ItemContentPropsT, ItemDescriptionPropsT, ItemFooterPropsT, ItemGroupPropsT, ItemHeaderPropsT, ItemMediaPropsT, ItemPropsT, ItemSeparatorPropsT, ItemTitlePropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Группа элементов: список с role="list"
|
|
4
|
+
* @param props - пропсы группы
|
|
5
|
+
* @returns список элементов
|
|
6
|
+
*/
|
|
7
|
+
export declare function ItemGroup({ className, ...props }: ItemGroupPropsT): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Разделитель между элементами группы
|
|
10
|
+
* @param props - пропсы разделителя
|
|
11
|
+
* @returns горизонтальная линия
|
|
12
|
+
*/
|
|
13
|
+
export declare function ItemSeparator({ className, ...props }: ItemSeparatorPropsT): import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Элемент: строка списка с медиа, заголовком, описанием и действиями
|
|
16
|
+
* @param props - пропсы элемента
|
|
17
|
+
* @returns элемент или дочерний элемент в его стилях (render)
|
|
18
|
+
*/
|
|
19
|
+
export declare function Item({ className, variant, size, render, ...props }: ItemPropsT): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
|
|
20
|
+
/**
|
|
21
|
+
* Медиа элемента: иконка, аватар или изображение слева
|
|
22
|
+
* @param props - пропсы медиа
|
|
23
|
+
* @returns блок медиа
|
|
24
|
+
*/
|
|
25
|
+
export declare function ItemMedia({ className, variant, ...props }: ItemMediaPropsT): import("react").JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Содержимое элемента: заголовок и описание
|
|
28
|
+
* @param props - пропсы содержимого
|
|
29
|
+
* @returns колонка содержимого
|
|
30
|
+
*/
|
|
31
|
+
export declare function ItemContent({ className, ...props }: ItemContentPropsT): import("react").JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Заголовок элемента: одна строка
|
|
34
|
+
* @param props - пропсы заголовка
|
|
35
|
+
* @returns заголовок
|
|
36
|
+
*/
|
|
37
|
+
export declare function ItemTitle({ className, ...props }: ItemTitlePropsT): import("react").JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* Описание элемента: до двух строк приглушённым текстом
|
|
40
|
+
* @param props - пропсы описания
|
|
41
|
+
* @returns описание
|
|
42
|
+
*/
|
|
43
|
+
export declare function ItemDescription({ className, ...props }: ItemDescriptionPropsT): import("react").JSX.Element;
|
|
44
|
+
/**
|
|
45
|
+
* Действия элемента: кнопки, иконка перехода справа
|
|
46
|
+
* @param props - пропсы действий
|
|
47
|
+
* @returns блок действий
|
|
48
|
+
*/
|
|
49
|
+
export declare function ItemActions({ className, ...props }: ItemActionsPropsT): import("react").JSX.Element;
|
|
50
|
+
/**
|
|
51
|
+
* Шапка элемента: строка во всю ширину над содержимым
|
|
52
|
+
* @param props - пропсы шапки
|
|
53
|
+
* @returns шапка
|
|
54
|
+
*/
|
|
55
|
+
export declare function ItemHeader({ className, ...props }: ItemHeaderPropsT): import("react").JSX.Element;
|
|
56
|
+
/**
|
|
57
|
+
* Подвал элемента: строка во всю ширину под содержимым
|
|
58
|
+
* @param props - пропсы подвала
|
|
59
|
+
* @returns подвал
|
|
60
|
+
*/
|
|
61
|
+
export declare function ItemFooter({ className, ...props }: ItemFooterPropsT): import("react").JSX.Element;
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { Separator } from "../separator/separator.js";
|
|
3
|
+
import { itemMediaVariants, itemVariants } from "./types.js";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
import { mergeProps } from "@base-ui/react/merge-props";
|
|
6
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
7
|
+
// src/components/item/item.tsx
|
|
8
|
+
/**
|
|
9
|
+
* Группа элементов: список с role="list"
|
|
10
|
+
* @param props - пропсы группы
|
|
11
|
+
* @returns список элементов
|
|
12
|
+
*/
|
|
13
|
+
function ItemGroup({ className, ...props }) {
|
|
14
|
+
const classes = cn("group/item-group", "flex", "w-full", "flex-col", "gap-4", "has-data-[size=sm]:gap-2.5", "has-data-[size=xs]:gap-2", className);
|
|
15
|
+
return /* @__PURE__ */ jsx("div", {
|
|
16
|
+
role: "list",
|
|
17
|
+
"data-slot": "item-group",
|
|
18
|
+
className: classes,
|
|
19
|
+
...props
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Разделитель между элементами группы
|
|
24
|
+
* @param props - пропсы разделителя
|
|
25
|
+
* @returns горизонтальная линия
|
|
26
|
+
*/
|
|
27
|
+
function ItemSeparator({ className, ...props }) {
|
|
28
|
+
const classes = cn("my-2", className);
|
|
29
|
+
return /* @__PURE__ */ jsx(Separator, {
|
|
30
|
+
"data-slot": "item-separator",
|
|
31
|
+
orientation: "horizontal",
|
|
32
|
+
className: classes,
|
|
33
|
+
...props
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Элемент: строка списка с медиа, заголовком, описанием и действиями
|
|
38
|
+
* @param props - пропсы элемента
|
|
39
|
+
* @returns элемент или дочерний элемент в его стилях (render)
|
|
40
|
+
*/
|
|
41
|
+
function Item({ className, variant = "default", size = "default", render, ...props }) {
|
|
42
|
+
const classes = cn(itemVariants({
|
|
43
|
+
variant,
|
|
44
|
+
size
|
|
45
|
+
}), className);
|
|
46
|
+
return useRender({
|
|
47
|
+
defaultTagName: "div",
|
|
48
|
+
render,
|
|
49
|
+
props: mergeProps({
|
|
50
|
+
"data-slot": "item",
|
|
51
|
+
"data-variant": variant,
|
|
52
|
+
"data-size": size,
|
|
53
|
+
className: classes
|
|
54
|
+
}, props)
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Медиа элемента: иконка, аватар или изображение слева
|
|
59
|
+
* @param props - пропсы медиа
|
|
60
|
+
* @returns блок медиа
|
|
61
|
+
*/
|
|
62
|
+
function ItemMedia({ className, variant = "default", ...props }) {
|
|
63
|
+
const classes = cn(itemMediaVariants({ variant }), className);
|
|
64
|
+
return /* @__PURE__ */ jsx("div", {
|
|
65
|
+
"data-slot": "item-media",
|
|
66
|
+
"data-variant": variant,
|
|
67
|
+
className: classes,
|
|
68
|
+
...props
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Содержимое элемента: заголовок и описание
|
|
73
|
+
* @param props - пропсы содержимого
|
|
74
|
+
* @returns колонка содержимого
|
|
75
|
+
*/
|
|
76
|
+
function ItemContent({ className, ...props }) {
|
|
77
|
+
const classes = cn("flex", "flex-1", "flex-col", "gap-1", "group-data-[size=xs]/item:gap-0", "[&+[data-slot=item-content]]:flex-none", className);
|
|
78
|
+
return /* @__PURE__ */ jsx("div", {
|
|
79
|
+
"data-slot": "item-content",
|
|
80
|
+
className: classes,
|
|
81
|
+
...props
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Заголовок элемента: одна строка
|
|
86
|
+
* @param props - пропсы заголовка
|
|
87
|
+
* @returns заголовок
|
|
88
|
+
*/
|
|
89
|
+
function ItemTitle({ className, ...props }) {
|
|
90
|
+
const classes = cn("line-clamp-1", "flex", "w-fit", "items-center", "gap-2", "text-sm", "leading-snug", "font-medium", "underline-offset-4", className);
|
|
91
|
+
return /* @__PURE__ */ jsx("div", {
|
|
92
|
+
"data-slot": "item-title",
|
|
93
|
+
className: classes,
|
|
94
|
+
...props
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Описание элемента: до двух строк приглушённым текстом
|
|
99
|
+
* @param props - пропсы описания
|
|
100
|
+
* @returns описание
|
|
101
|
+
*/
|
|
102
|
+
function ItemDescription({ className, ...props }) {
|
|
103
|
+
const classes = cn("line-clamp-2", "text-left", "text-sm", "leading-normal", "font-normal", "text-muted-foreground", "group-data-[size=xs]/item:text-xs", "[&>a]:underline", "[&>a]:underline-offset-4", "[&>a:hover]:text-primary", className);
|
|
104
|
+
return /* @__PURE__ */ jsx("p", {
|
|
105
|
+
"data-slot": "item-description",
|
|
106
|
+
className: classes,
|
|
107
|
+
...props
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Действия элемента: кнопки, иконка перехода справа
|
|
112
|
+
* @param props - пропсы действий
|
|
113
|
+
* @returns блок действий
|
|
114
|
+
*/
|
|
115
|
+
function ItemActions({ className, ...props }) {
|
|
116
|
+
const classes = cn("flex", "items-center", "gap-2", className);
|
|
117
|
+
return /* @__PURE__ */ jsx("div", {
|
|
118
|
+
"data-slot": "item-actions",
|
|
119
|
+
className: classes,
|
|
120
|
+
...props
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
/**
|
|
124
|
+
* Шапка элемента: строка во всю ширину над содержимым
|
|
125
|
+
* @param props - пропсы шапки
|
|
126
|
+
* @returns шапка
|
|
127
|
+
*/
|
|
128
|
+
function ItemHeader({ className, ...props }) {
|
|
129
|
+
const classes = cn("flex", "basis-full", "items-center", "justify-between", "gap-2", className);
|
|
130
|
+
return /* @__PURE__ */ jsx("div", {
|
|
131
|
+
"data-slot": "item-header",
|
|
132
|
+
className: classes,
|
|
133
|
+
...props
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
/**
|
|
137
|
+
* Подвал элемента: строка во всю ширину под содержимым
|
|
138
|
+
* @param props - пропсы подвала
|
|
139
|
+
* @returns подвал
|
|
140
|
+
*/
|
|
141
|
+
function ItemFooter({ className, ...props }) {
|
|
142
|
+
const classes = cn("flex", "basis-full", "items-center", "justify-between", "gap-2", className);
|
|
143
|
+
return /* @__PURE__ */ jsx("div", {
|
|
144
|
+
"data-slot": "item-footer",
|
|
145
|
+
className: classes,
|
|
146
|
+
...props
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
export { Item, ItemActions, ItemContent, ItemDescription, ItemFooter, ItemGroup, ItemHeader, ItemMedia, ItemSeparator, ItemTitle };
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { SeparatorPropsT } from "../separator/types.js";
|
|
2
|
+
import { VariantProps } from "class-variance-authority";
|
|
3
|
+
import { ComponentProps } from "react";
|
|
4
|
+
import { useRender } from "@base-ui/react/use-render";
|
|
5
|
+
/**
|
|
6
|
+
* Стили элемента списка: вариант оформления и размер.
|
|
7
|
+
* Ссылка (render={<a />}) подсвечивается фоном при наведении
|
|
8
|
+
*/
|
|
9
|
+
export declare const itemVariants: (props?: ({
|
|
10
|
+
variant?: "default" | "outline" | "muted" | null | undefined;
|
|
11
|
+
size?: "default" | "sm" | "xs" | null | undefined;
|
|
12
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
13
|
+
/**
|
|
14
|
+
* Стили медиа элемента: без оформления, иконка или изображение
|
|
15
|
+
*/
|
|
16
|
+
export declare const itemMediaVariants: (props?: ({
|
|
17
|
+
variant?: "image" | "default" | "icon" | null | undefined;
|
|
18
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
19
|
+
/**
|
|
20
|
+
* Варианты оформления и размеры элемента
|
|
21
|
+
*/
|
|
22
|
+
type ItemVariantsT = VariantProps<typeof itemVariants>;
|
|
23
|
+
/**
|
|
24
|
+
* Варианты медиа элемента
|
|
25
|
+
*/
|
|
26
|
+
type ItemMediaVariantsT = VariantProps<typeof itemMediaVariants>;
|
|
27
|
+
/**
|
|
28
|
+
* Пропсы группы элементов
|
|
29
|
+
*/
|
|
30
|
+
export type ItemGroupPropsT = ComponentProps<'div'>;
|
|
31
|
+
/**
|
|
32
|
+
* Пропсы разделителя между элементами
|
|
33
|
+
*/
|
|
34
|
+
export type ItemSeparatorPropsT = SeparatorPropsT;
|
|
35
|
+
/**
|
|
36
|
+
* Пропсы элемента
|
|
37
|
+
*/
|
|
38
|
+
export type ItemPropsT = useRender.ComponentProps<'div'> & {
|
|
39
|
+
/** Оформление: default — без рамки и фона, outline — с рамкой, muted — с приглушённым фоном */
|
|
40
|
+
variant?: ItemVariantsT['variant'];
|
|
41
|
+
/** Размер: default, sm или xs — компактнее отступы и медиа */
|
|
42
|
+
size?: ItemVariantsT['size'];
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Пропсы медиа элемента
|
|
46
|
+
*/
|
|
47
|
+
export type ItemMediaPropsT = ComponentProps<'div'> & {
|
|
48
|
+
/** Оформление: default — без оформления, icon — иконка 16px, image — изображение 40px со скруглением */
|
|
49
|
+
variant?: ItemMediaVariantsT['variant'];
|
|
50
|
+
};
|
|
51
|
+
/**
|
|
52
|
+
* Пропсы содержимого элемента
|
|
53
|
+
*/
|
|
54
|
+
export type ItemContentPropsT = ComponentProps<'div'>;
|
|
55
|
+
/**
|
|
56
|
+
* Пропсы заголовка элемента
|
|
57
|
+
*/
|
|
58
|
+
export type ItemTitlePropsT = ComponentProps<'div'>;
|
|
59
|
+
/**
|
|
60
|
+
* Пропсы описания элемента
|
|
61
|
+
*/
|
|
62
|
+
export type ItemDescriptionPropsT = ComponentProps<'p'>;
|
|
63
|
+
/**
|
|
64
|
+
* Пропсы действий элемента
|
|
65
|
+
*/
|
|
66
|
+
export type ItemActionsPropsT = ComponentProps<'div'>;
|
|
67
|
+
/**
|
|
68
|
+
* Пропсы шапки элемента
|
|
69
|
+
*/
|
|
70
|
+
export type ItemHeaderPropsT = ComponentProps<'div'>;
|
|
71
|
+
/**
|
|
72
|
+
* Пропсы подвала элемента
|
|
73
|
+
*/
|
|
74
|
+
export type ItemFooterPropsT = ComponentProps<'div'>;
|
|
75
|
+
export {};
|