@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
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 archytechtor
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,106 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @archytechtor/ui
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Библиотека React-компонентов на Base UI и Tailwind CSS v4 для русскоязычных проектов
|
|
4
|
+
(локализации нет: даты, время, телефоны и денежные суммы только в российских форматах, RTL-вёрстка не поддерживается).
|
|
5
|
+
Все тексты по умолчанию на русском, каждый переопределяется пропом.
|
|
6
|
+
|
|
7
|
+
## Установка
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pnpm add @archytechtor/ui
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npm install @archytechtor/ui
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
yarn add @archytechtor/ui
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Playground со всеми компонентами: https://archytechtor-ui.web.app/
|
|
22
|
+
|
|
23
|
+
## Зависимости
|
|
24
|
+
|
|
25
|
+
Обязательные peer-зависимости: `react` и `react-dom` версии 19+, `tailwindcss` версии 4+.
|
|
26
|
+
Всё остальное (`@base-ui/react`, `recharts`, `react-day-picker`, `react-hook-form` и другие)
|
|
27
|
+
ставится вместе с пакетом, дополнительно ничего устанавливать не нужно.
|
|
28
|
+
|
|
29
|
+
## Подключение стилей
|
|
30
|
+
|
|
31
|
+
В глобальном CSS приложения:
|
|
32
|
+
|
|
33
|
+
```css
|
|
34
|
+
@import "tailwindcss";
|
|
35
|
+
@import "@archytechtor/ui/styles.css";
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Темизация
|
|
39
|
+
|
|
40
|
+
Цвета, радиусы и прочие токены задаются CSS-переменными в OKLCH. Чтобы изменить тему,
|
|
41
|
+
переопределите нужные переменные:
|
|
42
|
+
|
|
43
|
+
```css
|
|
44
|
+
:root {
|
|
45
|
+
--primary: oklch(0.72 0.12 350);
|
|
46
|
+
--radius: 0.75rem;
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Тёмная тема включается классом `.dark` на корневом элементе:
|
|
51
|
+
|
|
52
|
+
```html
|
|
53
|
+
<html class="dark">
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Шрифты
|
|
57
|
+
|
|
58
|
+
Шрифты не поставляются: компоненты берут `font-sans` и `font-mono` из вашего Tailwind.
|
|
59
|
+
Установите шрифт с поддержкой кириллицы (например, Inter) и задайте переменные в `@theme`:
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
pnpm add @fontsource-variable/inter
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
```css
|
|
66
|
+
@import "tailwindcss";
|
|
67
|
+
@import "@archytechtor/ui/styles.css";
|
|
68
|
+
@import "@fontsource-variable/inter";
|
|
69
|
+
|
|
70
|
+
@theme {
|
|
71
|
+
--font-sans: "Inter Variable", ui-sans-serif, system-ui, sans-serif;
|
|
72
|
+
--font-mono: ui-monospace, "SFMono-Regular", Menlo, monospace;
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
В Next.js вместо этого можно подключить `next/font` и присвоить его переменную в `--font-sans`.
|
|
77
|
+
|
|
78
|
+
## Использование
|
|
79
|
+
|
|
80
|
+
Через общий вход:
|
|
81
|
+
|
|
82
|
+
```tsx
|
|
83
|
+
import { Button } from "@archytechtor/ui";
|
|
84
|
+
|
|
85
|
+
export const Example = () => <Button>Сохранить</Button>;
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Или точечно, по компонентам:
|
|
89
|
+
|
|
90
|
+
```tsx
|
|
91
|
+
import { Dialog, DialogContent, DialogTrigger } from "@archytechtor/ui/dialog";
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
У каждой части компонента есть `className` и атрибут `data-slot="<компонент>-<часть>"`
|
|
95
|
+
для стилизации снаружи. Вместо `asChild` используется проп `render`.
|
|
96
|
+
|
|
97
|
+
## Компоненты
|
|
98
|
+
|
|
99
|
+
accordion, alert, alert-dialog, aspect-ratio, attachment, avatar, badge, breadcrumb, bubble,
|
|
100
|
+
button, button-group, calendar, card, carousel, chart, checkbox, code-block, collapsible,
|
|
101
|
+
combobox, command, context-menu, data-table, date-input, date-picker, date-range-picker,
|
|
102
|
+
dialog, drawer, dropdown-menu, empty, field, form, hover-card, input, input-group, input-otp,
|
|
103
|
+
item, kbd, label, marker, menubar, message, message-scroller, money-input, native-select,
|
|
104
|
+
navigation-menu, number-stepper, pagination, phone-input, popover, progress, questionnaire,
|
|
105
|
+
radio-group, resizable, scroll-area, select, separator, sheet, sidebar, skeleton, slider,
|
|
106
|
+
spinner, switch, table, tabs, textarea, toast, toggle, toggle-group, tooltip, trace, typography.
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AccordionContentPropsT, AccordionItemPropsT, AccordionPropsT, AccordionTriggerPropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Аккордеон: вертикальный список секций, которые раскрываются по нажатию на заголовок
|
|
4
|
+
* @param props - пропсы аккордеона
|
|
5
|
+
* @returns обёртка секций
|
|
6
|
+
*/
|
|
7
|
+
export declare function Accordion({ className, onValueChange, ...props }: AccordionPropsT): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Секция аккордеона: заголовок и раскрываемое содержимое
|
|
10
|
+
* @param props - пропсы секции
|
|
11
|
+
* @returns обёртка секции
|
|
12
|
+
*/
|
|
13
|
+
export declare function AccordionItem({ className, ...props }: AccordionItemPropsT): import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Заголовок секции: кнопка, которая раскрывает и скрывает содержимое
|
|
16
|
+
* @param props - пропсы заголовка
|
|
17
|
+
* @returns заголовок h3 с кнопкой и стрелкой
|
|
18
|
+
*/
|
|
19
|
+
export declare function AccordionTrigger({ className, children, ...props }: AccordionTriggerPropsT): import("react").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Содержимое секции: раскрывается с анимацией высоты
|
|
22
|
+
* @param props - пропсы содержимого; className применяется к внутреннему блоку с отступами
|
|
23
|
+
* @returns раскрываемый блок
|
|
24
|
+
*/
|
|
25
|
+
export declare function AccordionContent({ className, children, ...props }: AccordionContentPropsT): import("react").JSX.Element;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { Accordion } from "@base-ui/react/accordion";
|
|
4
|
+
import { ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
5
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
6
|
+
// src/components/accordion/accordion.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Аккордеон: вертикальный список секций, которые раскрываются по нажатию на заголовок
|
|
9
|
+
* @param props - пропсы аккордеона
|
|
10
|
+
* @returns обёртка секций
|
|
11
|
+
*/
|
|
12
|
+
function Accordion$1({ className, onValueChange, ...props }) {
|
|
13
|
+
const classes = cn("flex", "w-full", "flex-col", className);
|
|
14
|
+
/**
|
|
15
|
+
* Изменился набор открытых секций: наружу только значения
|
|
16
|
+
* @param value - значения открытых секций
|
|
17
|
+
*/
|
|
18
|
+
const handleValueChange = (value) => onValueChange?.(value);
|
|
19
|
+
return /* @__PURE__ */ jsx(Accordion.Root, {
|
|
20
|
+
"data-slot": "accordion",
|
|
21
|
+
className: classes,
|
|
22
|
+
onValueChange: handleValueChange,
|
|
23
|
+
...props
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Секция аккордеона: заголовок и раскрываемое содержимое
|
|
28
|
+
* @param props - пропсы секции
|
|
29
|
+
* @returns обёртка секции
|
|
30
|
+
*/
|
|
31
|
+
function AccordionItem({ className, ...props }) {
|
|
32
|
+
const classes = cn("not-last:border-b", className);
|
|
33
|
+
return /* @__PURE__ */ jsx(Accordion.Item, {
|
|
34
|
+
"data-slot": "accordion-item",
|
|
35
|
+
className: classes,
|
|
36
|
+
...props
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Заголовок секции: кнопка, которая раскрывает и скрывает содержимое
|
|
41
|
+
* @param props - пропсы заголовка
|
|
42
|
+
* @returns заголовок h3 с кнопкой и стрелкой
|
|
43
|
+
*/
|
|
44
|
+
function AccordionTrigger({ className, children, ...props }) {
|
|
45
|
+
const classes = cn("group/accordion-trigger", "relative", "flex", "flex-1", "items-start", "justify-between", "rounded-lg", "border", "border-transparent", "py-2.5", "text-left", "text-sm", "font-medium", "transition-all", "outline-none", "cursor-pointer", "hover:underline", "data-disabled:cursor-not-allowed", "data-disabled:opacity-50", "data-disabled:hover:no-underline", "focus-visible:border-ring", "focus-visible:ring-3", "focus-visible:ring-ring/50", "focus-visible:after:border-ring", "**:data-[slot=accordion-trigger-icon]:ml-auto", "**:data-[slot=accordion-trigger-icon]:size-4", "**:data-[slot=accordion-trigger-icon]:text-muted-foreground", className);
|
|
46
|
+
return /* @__PURE__ */ jsx(Accordion.Header, {
|
|
47
|
+
"data-slot": "accordion-header",
|
|
48
|
+
className: "flex",
|
|
49
|
+
children: /* @__PURE__ */ jsxs(Accordion.Trigger, {
|
|
50
|
+
"data-slot": "accordion-trigger",
|
|
51
|
+
className: classes,
|
|
52
|
+
...props,
|
|
53
|
+
children: [
|
|
54
|
+
children,
|
|
55
|
+
/* @__PURE__ */ jsx(ChevronDownIcon, {
|
|
56
|
+
"data-slot": "accordion-trigger-icon",
|
|
57
|
+
"aria-hidden": true,
|
|
58
|
+
className: cn("pointer-events-none", "shrink-0", "group-aria-expanded/accordion-trigger:hidden")
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ jsx(ChevronUpIcon, {
|
|
61
|
+
"data-slot": "accordion-trigger-icon",
|
|
62
|
+
"aria-hidden": true,
|
|
63
|
+
className: cn("pointer-events-none", "hidden", "shrink-0", "group-aria-expanded/accordion-trigger:inline")
|
|
64
|
+
})
|
|
65
|
+
]
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Содержимое секции: раскрывается с анимацией высоты
|
|
71
|
+
* @param props - пропсы содержимого; className применяется к внутреннему блоку с отступами
|
|
72
|
+
* @returns раскрываемый блок
|
|
73
|
+
*/
|
|
74
|
+
function AccordionContent({ className, children, ...props }) {
|
|
75
|
+
const panelClasses = cn("h-(--accordion-panel-height)", "overflow-hidden", "text-sm", "transition-[height]", "duration-200", "ease-out", "data-starting-style:h-0", "data-ending-style:h-0");
|
|
76
|
+
const classes = cn("pt-0", "pb-2.5", "[&_a]:underline", "[&_a]:underline-offset-3", "[&_a]:hover:text-foreground", "[&_p:not(:last-child)]:mb-4", className);
|
|
77
|
+
return /* @__PURE__ */ jsx(Accordion.Panel, {
|
|
78
|
+
"data-slot": "accordion-content",
|
|
79
|
+
className: panelClasses,
|
|
80
|
+
...props,
|
|
81
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
82
|
+
"data-slot": "accordion-content-inner",
|
|
83
|
+
className: classes,
|
|
84
|
+
children
|
|
85
|
+
})
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
export { Accordion$1 as Accordion, AccordionContent, AccordionItem, AccordionTrigger };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { AccordionContentPropsT, AccordionItemPropsT, AccordionPropsT, AccordionTriggerPropsT } from "./types.js";
|
|
2
|
+
import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./accordion.js";
|
|
3
|
+
export { Accordion, AccordionContent, type AccordionContentPropsT, AccordionItem, type AccordionItemPropsT, type AccordionPropsT, AccordionTrigger, type AccordionTriggerPropsT };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "./accordion.js";
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { PartPropsT } from "../../lib/part-props.js";
|
|
2
|
+
import { Accordion } from "@base-ui/react/accordion";
|
|
3
|
+
/**
|
|
4
|
+
* Пропсы аккордеона
|
|
5
|
+
*/
|
|
6
|
+
export type AccordionPropsT = PartPropsT<Omit<Accordion.Root.Props, 'value' | 'defaultValue' | 'onValueChange' | 'orientation' | 'loopFocus'>> & {
|
|
7
|
+
/** Значения открытых секций — контролируемый режим, вместе с onValueChange */
|
|
8
|
+
value?: string[];
|
|
9
|
+
/** Значения открытых секций при первом рендере — неконтролируемый режим */
|
|
10
|
+
defaultValue?: string[];
|
|
11
|
+
/** Изменился набор открытых секций: значения открытых */
|
|
12
|
+
onValueChange?: (value: string[]) => void;
|
|
13
|
+
/** Можно открыть несколько секций сразу. По умолчанию false — открыта одна */
|
|
14
|
+
multiple?: boolean;
|
|
15
|
+
/** Отключить все секции */
|
|
16
|
+
disabled?: boolean;
|
|
17
|
+
/** Держать содержимое закрытых секций в DOM: для поиска по странице и своих анимаций */
|
|
18
|
+
keepMounted?: boolean;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Пропсы секции аккордеона
|
|
22
|
+
*/
|
|
23
|
+
export type AccordionItemPropsT = PartPropsT<Omit<Accordion.Item.Props, 'value'>> & {
|
|
24
|
+
/** Значение секции: попадает в value аккордеона, когда секция открыта */
|
|
25
|
+
value: string;
|
|
26
|
+
/** Отключить секцию: не открывается и не закрывается */
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Пропсы заголовка секции
|
|
31
|
+
*/
|
|
32
|
+
export type AccordionTriggerPropsT = PartPropsT<Accordion.Trigger.Props>;
|
|
33
|
+
/**
|
|
34
|
+
* Пропсы содержимого секции
|
|
35
|
+
*/
|
|
36
|
+
export type AccordionContentPropsT = PartPropsT<Accordion.Panel.Props> & {
|
|
37
|
+
/** Держать содержимое в DOM, даже когда секция закрыта: для поиска по странице и своих анимаций */
|
|
38
|
+
keepMounted?: boolean;
|
|
39
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { AlertActionPropsT, AlertDescriptionPropsT, AlertPropsT, AlertTitlePropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Уведомление: заметное сообщение для пользователя, объявляется скринридером (role="alert")
|
|
4
|
+
* @param props - пропсы уведомления
|
|
5
|
+
* @returns уведомление
|
|
6
|
+
*/
|
|
7
|
+
export declare function Alert({ className, variant, ...props }: AlertPropsT): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Заголовок уведомления
|
|
10
|
+
* @param props - пропсы заголовка
|
|
11
|
+
* @returns заголовок
|
|
12
|
+
*/
|
|
13
|
+
export declare function AlertTitle({ className, ...props }: AlertTitlePropsT): import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Описание уведомления: подробности под заголовком
|
|
16
|
+
* @param props - пропсы описания
|
|
17
|
+
* @returns описание
|
|
18
|
+
*/
|
|
19
|
+
export declare function AlertDescription({ className, ...props }: AlertDescriptionPropsT): import("react").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Действие в правом верхнем углу уведомления: кнопка
|
|
22
|
+
* @param props - пропсы действия
|
|
23
|
+
* @returns блок действия
|
|
24
|
+
*/
|
|
25
|
+
export declare function AlertAction({ className, ...props }: AlertActionPropsT): import("react").JSX.Element;
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { cn } from "../../lib/utils.js";
|
|
2
|
+
import { alertVariants } from "./types.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
// src/components/alert/alert.tsx
|
|
5
|
+
/**
|
|
6
|
+
* Уведомление: заметное сообщение для пользователя, объявляется скринридером (role="alert")
|
|
7
|
+
* @param props - пропсы уведомления
|
|
8
|
+
* @returns уведомление
|
|
9
|
+
*/
|
|
10
|
+
function Alert({ className, variant = "default", ...props }) {
|
|
11
|
+
const classes = cn(alertVariants({ variant }), className);
|
|
12
|
+
return /* @__PURE__ */ jsx("div", {
|
|
13
|
+
"data-slot": "alert",
|
|
14
|
+
"data-variant": variant,
|
|
15
|
+
role: "alert",
|
|
16
|
+
className: classes,
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Заголовок уведомления
|
|
22
|
+
* @param props - пропсы заголовка
|
|
23
|
+
* @returns заголовок
|
|
24
|
+
*/
|
|
25
|
+
function AlertTitle({ className, ...props }) {
|
|
26
|
+
const classes = cn("font-medium", "group-has-[>svg]/alert:col-start-2", "[&_a]:underline", "[&_a]:underline-offset-3", "[&_a]:hover:text-foreground", className);
|
|
27
|
+
return /* @__PURE__ */ jsx("div", {
|
|
28
|
+
"data-slot": "alert-title",
|
|
29
|
+
className: classes,
|
|
30
|
+
...props
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Описание уведомления: подробности под заголовком
|
|
35
|
+
* @param props - пропсы описания
|
|
36
|
+
* @returns описание
|
|
37
|
+
*/
|
|
38
|
+
function AlertDescription({ className, ...props }) {
|
|
39
|
+
const classes = cn("text-sm", "text-balance", "text-muted-foreground", "md:text-pretty", "[&_a]:underline", "[&_a]:underline-offset-3", "[&_a]:hover:text-foreground", "[&_p:not(:last-child)]:mb-4", className);
|
|
40
|
+
return /* @__PURE__ */ jsx("div", {
|
|
41
|
+
"data-slot": "alert-description",
|
|
42
|
+
className: classes,
|
|
43
|
+
...props
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
* Действие в правом верхнем углу уведомления: кнопка
|
|
48
|
+
* @param props - пропсы действия
|
|
49
|
+
* @returns блок действия
|
|
50
|
+
*/
|
|
51
|
+
function AlertAction({ className, ...props }) {
|
|
52
|
+
const classes = cn("absolute", "top-2", "right-2", className);
|
|
53
|
+
return /* @__PURE__ */ jsx("div", {
|
|
54
|
+
"data-slot": "alert-action",
|
|
55
|
+
className: classes,
|
|
56
|
+
...props
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
export { Alert, AlertAction, AlertDescription, AlertTitle };
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { AlertActionPropsT, AlertDescriptionPropsT, AlertPropsT, AlertTitlePropsT, alertVariants } from "./types.js";
|
|
2
|
+
import { Alert, AlertAction, AlertDescription, AlertTitle } from "./alert.js";
|
|
3
|
+
export { Alert, AlertAction, type AlertActionPropsT, AlertDescription, type AlertDescriptionPropsT, type AlertPropsT, AlertTitle, type AlertTitlePropsT, alertVariants };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { VariantProps } from "class-variance-authority";
|
|
2
|
+
import { ComponentProps } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Стили уведомления: вариант оформления.
|
|
5
|
+
* Иконка первым дочерним элементом занимает левую колонку, заголовок и описание — правую.
|
|
6
|
+
*/
|
|
7
|
+
export declare const alertVariants: (props?: ({
|
|
8
|
+
variant?: "default" | "destructive" | null | undefined;
|
|
9
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
10
|
+
/**
|
|
11
|
+
* Варианты оформления уведомления
|
|
12
|
+
*/
|
|
13
|
+
export type AlertVariantsT = VariantProps<typeof alertVariants>;
|
|
14
|
+
/**
|
|
15
|
+
* Пропсы уведомления
|
|
16
|
+
*/
|
|
17
|
+
export type AlertPropsT = ComponentProps<'div'> & {
|
|
18
|
+
/** Оформление: обычное или ошибка */
|
|
19
|
+
variant?: AlertVariantsT['variant'];
|
|
20
|
+
};
|
|
21
|
+
/**
|
|
22
|
+
* Пропсы заголовка уведомления
|
|
23
|
+
*/
|
|
24
|
+
export type AlertTitlePropsT = ComponentProps<'div'>;
|
|
25
|
+
/**
|
|
26
|
+
* Пропсы описания уведомления
|
|
27
|
+
*/
|
|
28
|
+
export type AlertDescriptionPropsT = ComponentProps<'div'>;
|
|
29
|
+
/**
|
|
30
|
+
* Пропсы действия уведомления
|
|
31
|
+
*/
|
|
32
|
+
export type AlertActionPropsT = ComponentProps<'div'>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { cva } from "class-variance-authority";
|
|
2
|
+
// src/components/alert/types.ts
|
|
3
|
+
/**
|
|
4
|
+
* Стили уведомления: вариант оформления.
|
|
5
|
+
* Иконка первым дочерним элементом занимает левую колонку, заголовок и описание — правую.
|
|
6
|
+
*/
|
|
7
|
+
const alertVariants = cva([
|
|
8
|
+
"group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm",
|
|
9
|
+
"has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18",
|
|
10
|
+
"has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2",
|
|
11
|
+
"*:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*=size-])]:size-4"
|
|
12
|
+
], {
|
|
13
|
+
variants: { variant: {
|
|
14
|
+
default: "bg-card text-card-foreground",
|
|
15
|
+
destructive: ["bg-card text-destructive", "*:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current"]
|
|
16
|
+
} },
|
|
17
|
+
defaultVariants: { variant: "default" }
|
|
18
|
+
});
|
|
19
|
+
export { alertVariants };
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { AlertDialogActionPropsT, AlertDialogCancelPropsT, AlertDialogContentPropsT, AlertDialogDescriptionPropsT, AlertDialogFooterPropsT, AlertDialogHeaderPropsT, AlertDialogMediaPropsT, AlertDialogOverlayPropsT, AlertDialogPortalPropsT, AlertDialogPropsT, AlertDialogTitlePropsT, AlertDialogTriggerPropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Диалог подтверждения: прерывает работу и ждёт ответа. Не закрывается кликом мимо окна
|
|
4
|
+
* @param props - пропсы диалога
|
|
5
|
+
* @returns корень диалога без своей разметки
|
|
6
|
+
*/
|
|
7
|
+
export declare function AlertDialog({ onOpenChange, ...props }: AlertDialogPropsT): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Кнопка открытия диалога. Свою кнопку — через render={<Button />}
|
|
10
|
+
* @param props - пропсы кнопки
|
|
11
|
+
* @returns кнопка с aria-haspopup="dialog"
|
|
12
|
+
*/
|
|
13
|
+
export declare function AlertDialogTrigger(props: AlertDialogTriggerPropsT): import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Портал: переносит оверлей и окно в конец body
|
|
16
|
+
* @param props - пропсы портала
|
|
17
|
+
* @returns портал
|
|
18
|
+
*/
|
|
19
|
+
export declare function AlertDialogPortal(props: AlertDialogPortalPropsT): import("react").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Оверлей: затемняет и размывает страницу под диалогом
|
|
22
|
+
* @param props - пропсы оверлея
|
|
23
|
+
* @returns полупрозрачный слой на весь экран
|
|
24
|
+
*/
|
|
25
|
+
export declare function AlertDialogOverlay({ className, ...props }: AlertDialogOverlayPropsT): import("react").JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Окно диалога: рендерится в портале поверх оверлея, по центру экрана
|
|
28
|
+
* @param props - пропсы окна
|
|
29
|
+
* @returns портал с оверлеем и окном
|
|
30
|
+
*/
|
|
31
|
+
export declare function AlertDialogContent({ className, size, ...props }: AlertDialogContentPropsT): import("react").JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Шапка диалога: иконка, заголовок и описание. В размере sm и на узком экране — по центру
|
|
34
|
+
* @param props - пропсы шапки
|
|
35
|
+
* @returns блок
|
|
36
|
+
*/
|
|
37
|
+
export declare function AlertDialogHeader({ className, ...props }: AlertDialogHeaderPropsT): import("react").JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* Подвал диалога: кнопки отмены и действия
|
|
40
|
+
* @param props - пропсы подвала
|
|
41
|
+
* @returns блок с серым фоном и разделителем
|
|
42
|
+
*/
|
|
43
|
+
export declare function AlertDialogFooter({ className, ...props }: AlertDialogFooterPropsT): import("react").JSX.Element;
|
|
44
|
+
/**
|
|
45
|
+
* Иконка диалога: квадрат с иконкой над заголовком или слева от него
|
|
46
|
+
* @param props - пропсы иконки
|
|
47
|
+
* @returns блок
|
|
48
|
+
*/
|
|
49
|
+
export declare function AlertDialogMedia({ className, ...props }: AlertDialogMediaPropsT): import("react").JSX.Element;
|
|
50
|
+
/**
|
|
51
|
+
* Заголовок диалога: озвучивается при открытии
|
|
52
|
+
* @param props - пропсы заголовка
|
|
53
|
+
* @returns h2
|
|
54
|
+
*/
|
|
55
|
+
export declare function AlertDialogTitle({ className, ...props }: AlertDialogTitlePropsT): import("react").JSX.Element;
|
|
56
|
+
/**
|
|
57
|
+
* Описание диалога: озвучивается после заголовка
|
|
58
|
+
* @param props - пропсы описания
|
|
59
|
+
* @returns p
|
|
60
|
+
*/
|
|
61
|
+
export declare function AlertDialogDescription({ className, ...props }: AlertDialogDescriptionPropsT): import("react").JSX.Element;
|
|
62
|
+
/**
|
|
63
|
+
* Кнопка действия: подтверждает и закрывает диалог
|
|
64
|
+
* @param props - пропсы кнопки
|
|
65
|
+
* @returns кнопка
|
|
66
|
+
*/
|
|
67
|
+
export declare function AlertDialogAction({ variant, size, ...props }: AlertDialogActionPropsT): import("react").JSX.Element;
|
|
68
|
+
/**
|
|
69
|
+
* Кнопка отмены: закрывает диалог без действия
|
|
70
|
+
* @param props - пропсы кнопки
|
|
71
|
+
* @returns кнопка
|
|
72
|
+
*/
|
|
73
|
+
export declare function AlertDialogCancel({ variant, size, ...props }: AlertDialogCancelPropsT): import("react").JSX.Element;
|