@archytechtor/ui 0.0.0-stage → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +105 -2
- package/dist/components/accordion/accordion.d.ts +25 -0
- package/dist/components/accordion/accordion.js +88 -0
- package/dist/components/accordion/index.d.ts +3 -0
- package/dist/components/accordion/index.js +1 -0
- package/dist/components/accordion/types.d.ts +39 -0
- package/dist/components/alert/alert.d.ts +25 -0
- package/dist/components/alert/alert.js +59 -0
- package/dist/components/alert/index.d.ts +3 -0
- package/dist/components/alert/index.js +3 -0
- package/dist/components/alert/types.d.ts +32 -0
- package/dist/components/alert/types.js +19 -0
- package/dist/components/alert-dialog/alert-dialog.d.ts +73 -0
- package/dist/components/alert-dialog/alert-dialog.js +170 -0
- package/dist/components/alert-dialog/index.d.ts +3 -0
- package/dist/components/alert-dialog/index.js +1 -0
- package/dist/components/alert-dialog/types.d.ts +80 -0
- package/dist/components/aspect-ratio/aspect-ratio.d.ts +8 -0
- package/dist/components/aspect-ratio/aspect-ratio.js +20 -0
- package/dist/components/aspect-ratio/index.d.ts +3 -0
- package/dist/components/aspect-ratio/index.js +1 -0
- package/dist/components/aspect-ratio/types.d.ts +8 -0
- package/dist/components/attachment/attachment.d.ts +57 -0
- package/dist/components/attachment/attachment.js +139 -0
- package/dist/components/attachment/index.d.ts +3 -0
- package/dist/components/attachment/index.js +3 -0
- package/dist/components/attachment/types.d.ts +79 -0
- package/dist/components/attachment/types.js +43 -0
- package/dist/components/avatar/avatar.d.ts +39 -0
- package/dist/components/avatar/avatar.js +88 -0
- package/dist/components/avatar/index.d.ts +3 -0
- package/dist/components/avatar/index.js +3 -0
- package/dist/components/avatar/types.d.ts +54 -0
- package/dist/components/avatar/types.js +21 -0
- package/dist/components/badge/badge.d.ts +7 -0
- package/dist/components/badge/badge.js +23 -0
- package/dist/components/badge/index.d.ts +3 -0
- package/dist/components/badge/index.js +3 -0
- package/dist/components/badge/types.d.ts +21 -0
- package/dist/components/badge/types.js +26 -0
- package/dist/components/bottom-nav/bottom-nav.d.ts +19 -0
- package/dist/components/bottom-nav/bottom-nav.js +59 -0
- package/dist/components/bottom-nav/index.d.ts +3 -0
- package/dist/components/bottom-nav/index.js +3 -0
- package/dist/components/bottom-nav/types.d.ts +45 -0
- package/dist/components/bottom-nav/types.js +44 -0
- package/dist/components/box/box.d.ts +7 -0
- package/dist/components/box/box.js +26 -0
- package/dist/components/box/index.d.ts +3 -0
- package/dist/components/box/index.js +3 -0
- package/dist/components/box/types.d.ts +23 -0
- package/dist/components/box/types.js +27 -0
- package/dist/components/breadcrumb/breadcrumb.d.ts +43 -0
- package/dist/components/breadcrumb/breadcrumb.js +115 -0
- package/dist/components/breadcrumb/index.d.ts +3 -0
- package/dist/components/breadcrumb/index.js +1 -0
- package/dist/components/breadcrumb/types.d.ts +36 -0
- package/dist/components/bubble/bubble.d.ts +25 -0
- package/dist/components/bubble/bubble.js +69 -0
- package/dist/components/bubble/index.d.ts +3 -0
- package/dist/components/bubble/index.js +3 -0
- package/dist/components/bubble/types.d.ts +51 -0
- package/dist/components/bubble/types.js +60 -0
- package/dist/components/button/button.d.ts +7 -0
- package/dist/components/button/button.js +155 -0
- package/dist/components/button/index.d.ts +4 -0
- package/dist/components/button/index.js +4 -0
- package/dist/components/button/types.d.ts +80 -0
- package/dist/components/button/types.js +99 -0
- package/dist/components/button/use-hold-to-confirm.d.ts +25 -0
- package/dist/components/button/use-hold-to-confirm.js +161 -0
- package/dist/components/button-group/button-group.d.ts +20 -0
- package/dist/components/button-group/button-group.js +62 -0
- package/dist/components/button-group/index.d.ts +3 -0
- package/dist/components/button-group/index.js +3 -0
- package/dist/components/button-group/types.d.ts +30 -0
- package/dist/components/button-group/types.js +19 -0
- package/dist/components/calendar/calendar.d.ts +15 -0
- package/dist/components/calendar/calendar.js +157 -0
- package/dist/components/calendar/index.d.ts +3 -0
- package/dist/components/calendar/index.js +1 -0
- package/dist/components/calendar/types.d.ts +21 -0
- package/dist/components/card/card.d.ts +43 -0
- package/dist/components/card/card.js +97 -0
- package/dist/components/card/index.d.ts +3 -0
- package/dist/components/card/index.js +3 -0
- package/dist/components/card/types.d.ts +44 -0
- package/dist/components/card/types.js +19 -0
- package/dist/components/carousel/carousel.d.ts +36 -0
- package/dist/components/carousel/carousel.js +190 -0
- package/dist/components/carousel/index.d.ts +3 -0
- package/dist/components/carousel/index.js +1 -0
- package/dist/components/carousel/types.d.ts +79 -0
- package/dist/components/chart/chart.d.ts +35 -0
- package/dist/components/chart/chart.js +212 -0
- package/dist/components/chart/index.d.ts +3 -0
- package/dist/components/chart/index.js +1 -0
- package/dist/components/chart/types.d.ts +89 -0
- package/dist/components/chart/types.js +7 -0
- package/dist/components/checkbox/checkbox.d.ts +7 -0
- package/dist/components/checkbox/checkbox.js +31 -0
- package/dist/components/checkbox/index.d.ts +3 -0
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/checkbox/types.d.ts +25 -0
- package/dist/components/code-block/code-block.d.ts +49 -0
- package/dist/components/code-block/code-block.js +188 -0
- package/dist/components/code-block/highlighter.d.ts +15 -0
- package/dist/components/code-block/highlighter.js +123 -0
- package/dist/components/code-block/index.d.ts +5 -0
- package/dist/components/code-block/index.js +5 -0
- package/dist/components/code-block/types.d.ts +94 -0
- package/dist/components/code-block/types.js +38 -0
- package/dist/components/code-block/use-highlighted-code.d.ts +9 -0
- package/dist/components/code-block/use-highlighted-code.js +67 -0
- package/dist/components/collapsible/collapsible.d.ts +19 -0
- package/dist/components/collapsible/collapsible.js +44 -0
- package/dist/components/collapsible/index.d.ts +3 -0
- package/dist/components/collapsible/index.js +1 -0
- package/dist/components/collapsible/types.d.ts +26 -0
- package/dist/components/combobox/combobox.d.ts +104 -0
- package/dist/components/combobox/combobox.js +365 -0
- package/dist/components/combobox/index.d.ts +3 -0
- package/dist/components/combobox/index.js +1 -0
- package/dist/components/combobox/types.d.ts +229 -0
- package/dist/components/command/command.d.ts +55 -0
- package/dist/components/command/command.js +179 -0
- package/dist/components/command/index.d.ts +3 -0
- package/dist/components/command/index.js +1 -0
- package/dist/components/command/types.d.ts +69 -0
- package/dist/components/context-menu/context-menu.d.ts +92 -0
- package/dist/components/context-menu/context-menu.js +270 -0
- package/dist/components/context-menu/index.d.ts +3 -0
- package/dist/components/context-menu/index.js +1 -0
- package/dist/components/context-menu/types.d.ts +138 -0
- package/dist/components/data-table/data-table-features.d.ts +21 -0
- package/dist/components/data-table/data-table-features.js +22 -0
- package/dist/components/data-table/data-table.d.ts +69 -0
- package/dist/components/data-table/data-table.js +283 -0
- package/dist/components/data-table/index.d.ts +4 -0
- package/dist/components/data-table/index.js +3 -0
- package/dist/components/data-table/types.d.ts +63 -0
- package/dist/components/date-input/date-input.d.ts +7 -0
- package/dist/components/date-input/date-input.js +147 -0
- package/dist/components/date-input/index.d.ts +3 -0
- package/dist/components/date-input/index.js +1 -0
- package/dist/components/date-input/types.d.ts +27 -0
- package/dist/components/date-picker/date-picker.d.ts +7 -0
- package/dist/components/date-picker/date-picker.js +74 -0
- package/dist/components/date-picker/index.d.ts +3 -0
- package/dist/components/date-picker/index.js +1 -0
- package/dist/components/date-picker/types.d.ts +38 -0
- package/dist/components/date-range-picker/date-range-picker.d.ts +7 -0
- package/dist/components/date-range-picker/date-range-picker.js +89 -0
- package/dist/components/date-range-picker/index.d.ts +3 -0
- package/dist/components/date-range-picker/index.js +1 -0
- package/dist/components/date-range-picker/types.d.ts +43 -0
- package/dist/components/dialog/dialog.d.ts +61 -0
- package/dist/components/dialog/dialog.js +160 -0
- package/dist/components/dialog/index.d.ts +3 -0
- package/dist/components/dialog/index.js +1 -0
- package/dist/components/dialog/types.d.ts +68 -0
- package/dist/components/drawer/drawer.d.ts +69 -0
- package/dist/components/drawer/drawer.js +245 -0
- package/dist/components/drawer/index.d.ts +3 -0
- package/dist/components/drawer/index.js +1 -0
- package/dist/components/drawer/types.d.ts +93 -0
- package/dist/components/dropdown-menu/dropdown-menu.d.ts +92 -0
- package/dist/components/dropdown-menu/dropdown-menu.js +268 -0
- package/dist/components/dropdown-menu/index.d.ts +3 -0
- package/dist/components/dropdown-menu/index.js +1 -0
- package/dist/components/dropdown-menu/types.d.ts +143 -0
- package/dist/components/empty/empty.d.ts +37 -0
- package/dist/components/empty/empty.js +84 -0
- package/dist/components/empty/index.d.ts +3 -0
- package/dist/components/empty/index.js +3 -0
- package/dist/components/empty/types.d.ts +39 -0
- package/dist/components/empty/types.js +13 -0
- package/dist/components/expanded-card/expanded-card.d.ts +43 -0
- package/dist/components/expanded-card/expanded-card.js +352 -0
- package/dist/components/expanded-card/index.d.ts +3 -0
- package/dist/components/expanded-card/index.js +1 -0
- package/dist/components/expanded-card/types.d.ts +52 -0
- package/dist/components/field/field.d.ts +62 -0
- package/dist/components/field/field.js +173 -0
- package/dist/components/field/index.d.ts +3 -0
- package/dist/components/field/index.js +3 -0
- package/dist/components/field/types.d.ts +81 -0
- package/dist/components/field/types.js +21 -0
- package/dist/components/form/form.d.ts +49 -0
- package/dist/components/form/form.js +136 -0
- package/dist/components/form/index.d.ts +3 -0
- package/dist/components/form/index.js +1 -0
- package/dist/components/form/types.d.ts +59 -0
- package/dist/components/grid/grid.d.ts +7 -0
- package/dist/components/grid/grid.js +36 -0
- package/dist/components/grid/index.d.ts +3 -0
- package/dist/components/grid/index.js +3 -0
- package/dist/components/grid/types.d.ts +35 -0
- package/dist/components/grid/types.js +102 -0
- package/dist/components/hover-card/hover-card.d.ts +19 -0
- package/dist/components/hover-card/hover-card.js +63 -0
- package/dist/components/hover-card/index.d.ts +3 -0
- package/dist/components/hover-card/index.js +1 -0
- package/dist/components/hover-card/types.d.ts +27 -0
- package/dist/components/image-gallery/image-gallery.d.ts +8 -0
- package/dist/components/image-gallery/image-gallery.js +294 -0
- package/dist/components/image-gallery/index.d.ts +4 -0
- package/dist/components/image-gallery/index.js +3 -0
- package/dist/components/image-gallery/masonry.d.ts +11 -0
- package/dist/components/image-gallery/masonry.js +62 -0
- package/dist/components/image-gallery/types.d.ts +80 -0
- package/dist/components/input/index.d.ts +3 -0
- package/dist/components/input/index.js +1 -0
- package/dist/components/input/input.d.ts +7 -0
- package/dist/components/input/input.js +18 -0
- package/dist/components/input/types.d.ts +28 -0
- package/dist/components/input-group/index.d.ts +3 -0
- package/dist/components/input-group/index.js +3 -0
- package/dist/components/input-group/input-group.d.ts +37 -0
- package/dist/components/input-group/input-group.js +103 -0
- package/dist/components/input-group/types.d.ts +64 -0
- package/dist/components/input-group/types.js +31 -0
- package/dist/components/input-otp/index.d.ts +3 -0
- package/dist/components/input-otp/index.js +1 -0
- package/dist/components/input-otp/input-otp.d.ts +25 -0
- package/dist/components/input-otp/input-otp.js +76 -0
- package/dist/components/input-otp/types.d.ts +43 -0
- package/dist/components/item/index.d.ts +3 -0
- package/dist/components/item/index.js +3 -0
- package/dist/components/item/item.d.ts +61 -0
- package/dist/components/item/item.js +149 -0
- package/dist/components/item/types.d.ts +75 -0
- package/dist/components/item/types.js +48 -0
- package/dist/components/kbd/index.d.ts +3 -0
- package/dist/components/kbd/index.js +1 -0
- package/dist/components/kbd/kbd.d.ts +13 -0
- package/dist/components/kbd/kbd.js +30 -0
- package/dist/components/kbd/types.d.ts +9 -0
- package/dist/components/label/index.d.ts +3 -0
- package/dist/components/label/index.js +1 -0
- package/dist/components/label/label.d.ts +7 -0
- package/dist/components/label/label.js +17 -0
- package/dist/components/label/types.d.ts +8 -0
- package/dist/components/loader/index.d.ts +3 -0
- package/dist/components/loader/index.js +3 -0
- package/dist/components/loader/loader.d.ts +8 -0
- package/dist/components/loader/loader.js +386 -0
- package/dist/components/loader/types.d.ts +27 -0
- package/dist/components/loader/types.js +58 -0
- package/dist/components/marker/index.d.ts +3 -0
- package/dist/components/marker/index.js +3 -0
- package/dist/components/marker/marker.d.ts +19 -0
- package/dist/components/marker/marker.js +51 -0
- package/dist/components/marker/types.d.ts +30 -0
- package/dist/components/marker/types.js +16 -0
- package/dist/components/menubar/index.d.ts +3 -0
- package/dist/components/menubar/index.js +1 -0
- package/dist/components/menubar/menubar.d.ts +98 -0
- package/dist/components/menubar/menubar.js +284 -0
- package/dist/components/menubar/types.d.ts +146 -0
- package/dist/components/message/index.d.ts +3 -0
- package/dist/components/message/index.js +1 -0
- package/dist/components/message/message.d.ts +37 -0
- package/dist/components/message/message.js +83 -0
- package/dist/components/message/types.d.ts +32 -0
- package/dist/components/message-scroller/index.d.ts +4 -0
- package/dist/components/message-scroller/index.js +3 -0
- package/dist/components/message-scroller/message-scroller-primitive.d.ts +21 -0
- package/dist/components/message-scroller/message-scroller-primitive.js +1349 -0
- package/dist/components/message-scroller/message-scroller.d.ts +39 -0
- package/dist/components/message-scroller/message-scroller.js +103 -0
- package/dist/components/message-scroller/types.d.ts +107 -0
- package/dist/components/money-input/index.d.ts +3 -0
- package/dist/components/money-input/index.js +1 -0
- package/dist/components/money-input/money-input.d.ts +7 -0
- package/dist/components/money-input/money-input.js +143 -0
- package/dist/components/money-input/types.d.ts +20 -0
- package/dist/components/morph-image/index.d.ts +3 -0
- package/dist/components/morph-image/index.js +3 -0
- package/dist/components/morph-image/morph-image.d.ts +8 -0
- package/dist/components/morph-image/morph-image.js +155 -0
- package/dist/components/morph-image/types.d.ts +38 -0
- package/dist/components/morph-image/types.js +18 -0
- package/dist/components/native-select/index.d.ts +3 -0
- package/dist/components/native-select/index.js +3 -0
- package/dist/components/native-select/native-select.d.ts +20 -0
- package/dist/components/native-select/native-select.js +57 -0
- package/dist/components/native-select/types.d.ts +52 -0
- package/dist/components/native-select/types.js +23 -0
- package/dist/components/navigation-menu/index.d.ts +3 -0
- package/dist/components/navigation-menu/index.js +3 -0
- package/dist/components/navigation-menu/navigation-menu.d.ts +50 -0
- package/dist/components/navigation-menu/navigation-menu.js +145 -0
- package/dist/components/navigation-menu/types.d.ts +79 -0
- package/dist/components/navigation-menu/types.js +15 -0
- package/dist/components/number-stepper/index.d.ts +3 -0
- package/dist/components/number-stepper/index.js +3 -0
- package/dist/components/number-stepper/number-stepper.d.ts +9 -0
- package/dist/components/number-stepper/number-stepper.js +223 -0
- package/dist/components/number-stepper/types.d.ts +47 -0
- package/dist/components/number-stepper/types.js +174 -0
- package/dist/components/pagination/index.d.ts +3 -0
- package/dist/components/pagination/index.js +1 -0
- package/dist/components/pagination/pagination.d.ts +43 -0
- package/dist/components/pagination/pagination.js +121 -0
- package/dist/components/pagination/types.d.ts +37 -0
- package/dist/components/phone-input/index.d.ts +3 -0
- package/dist/components/phone-input/index.js +1 -0
- package/dist/components/phone-input/phone-input.d.ts +7 -0
- package/dist/components/phone-input/phone-input.js +54 -0
- package/dist/components/phone-input/types.d.ts +12 -0
- package/dist/components/popover/index.d.ts +3 -0
- package/dist/components/popover/index.js +1 -0
- package/dist/components/popover/popover.d.ts +37 -0
- package/dist/components/popover/popover.js +100 -0
- package/dist/components/popover/types.d.ts +51 -0
- package/dist/components/progress/index.d.ts +3 -0
- package/dist/components/progress/index.js +1 -0
- package/dist/components/progress/progress.d.ts +32 -0
- package/dist/components/progress/progress.js +100 -0
- package/dist/components/progress/types.d.ts +31 -0
- package/dist/components/questionnaire/index.d.ts +3 -0
- package/dist/components/questionnaire/index.js +1 -0
- package/dist/components/questionnaire/questionnaire-primitive.js +1563 -0
- package/dist/components/questionnaire/questionnaire.d.ts +91 -0
- package/dist/components/questionnaire/questionnaire.js +315 -0
- package/dist/components/questionnaire/types.d.ts +203 -0
- package/dist/components/radio-group/index.d.ts +3 -0
- package/dist/components/radio-group/index.js +1 -0
- package/dist/components/radio-group/radio-group.d.ts +13 -0
- package/dist/components/radio-group/radio-group.js +44 -0
- package/dist/components/radio-group/types.d.ts +33 -0
- package/dist/components/reorder-list/index.d.ts +3 -0
- package/dist/components/reorder-list/index.js +1 -0
- package/dist/components/reorder-list/reorder-list.d.ts +19 -0
- package/dist/components/reorder-list/reorder-list.js +279 -0
- package/dist/components/reorder-list/types.d.ts +65 -0
- package/dist/components/resizable/index.d.ts +3 -0
- package/dist/components/resizable/index.js +1 -0
- package/dist/components/resizable/resizable.d.ts +19 -0
- package/dist/components/resizable/resizable.js +44 -0
- package/dist/components/resizable/types.d.ts +89 -0
- package/dist/components/scroll-area/index.d.ts +3 -0
- package/dist/components/scroll-area/index.js +1 -0
- package/dist/components/scroll-area/scroll-area.d.ts +13 -0
- package/dist/components/scroll-area/scroll-area.js +47 -0
- package/dist/components/scroll-area/types.d.ts +19 -0
- package/dist/components/select/index.d.ts +3 -0
- package/dist/components/select/index.js +1 -0
- package/dist/components/select/select.d.ts +61 -0
- package/dist/components/select/select.js +183 -0
- package/dist/components/select/types.d.ts +100 -0
- package/dist/components/separator/index.d.ts +3 -0
- package/dist/components/separator/index.js +1 -0
- package/dist/components/separator/separator.d.ts +7 -0
- package/dist/components/separator/separator.js +20 -0
- package/dist/components/separator/types.d.ts +9 -0
- package/dist/components/sheet/index.d.ts +3 -0
- package/dist/components/sheet/index.js +1 -0
- package/dist/components/sheet/sheet.d.ts +61 -0
- package/dist/components/sheet/sheet.js +155 -0
- package/dist/components/sheet/types.d.ts +69 -0
- package/dist/components/sidebar/index.d.ts +3 -0
- package/dist/components/sidebar/index.js +3 -0
- package/dist/components/sidebar/sidebar.d.ts +145 -0
- package/dist/components/sidebar/sidebar.js +550 -0
- package/dist/components/sidebar/types.d.ts +186 -0
- package/dist/components/sidebar/types.js +42 -0
- package/dist/components/sidebar/use-mobile.js +21 -0
- package/dist/components/skeleton/index.d.ts +3 -0
- package/dist/components/skeleton/index.js +1 -0
- package/dist/components/skeleton/skeleton.d.ts +8 -0
- package/dist/components/skeleton/skeleton.js +18 -0
- package/dist/components/skeleton/types.d.ts +5 -0
- package/dist/components/slider/index.d.ts +3 -0
- package/dist/components/slider/index.js +1 -0
- package/dist/components/slider/slider.d.ts +7 -0
- package/dist/components/slider/slider.js +106 -0
- package/dist/components/slider/types.d.ts +39 -0
- package/dist/components/spinner/index.d.ts +3 -0
- package/dist/components/spinner/index.js +1 -0
- package/dist/components/spinner/spinner.d.ts +7 -0
- package/dist/components/spinner/spinner.js +21 -0
- package/dist/components/spinner/types.d.ts +8 -0
- package/dist/components/stack/index.d.ts +3 -0
- package/dist/components/stack/index.js +3 -0
- package/dist/components/stack/stack.d.ts +7 -0
- package/dist/components/stack/stack.js +29 -0
- package/dist/components/stack/types.d.ts +56 -0
- package/dist/components/stack/types.js +62 -0
- package/dist/components/statistics/index.d.ts +3 -0
- package/dist/components/statistics/index.js +3 -0
- package/dist/components/statistics/statistics.d.ts +31 -0
- package/dist/components/statistics/statistics.js +141 -0
- package/dist/components/statistics/types.d.ts +84 -0
- package/dist/components/statistics/types.js +27 -0
- package/dist/components/switch/index.d.ts +3 -0
- package/dist/components/switch/index.js +3 -0
- package/dist/components/switch/switch.d.ts +7 -0
- package/dist/components/switch/switch.js +32 -0
- package/dist/components/switch/types.d.ts +37 -0
- package/dist/components/switch/types.js +23 -0
- package/dist/components/table/index.d.ts +3 -0
- package/dist/components/table/index.js +1 -0
- package/dist/components/table/table.d.ts +49 -0
- package/dist/components/table/table.js +112 -0
- package/dist/components/table/types.d.ts +33 -0
- package/dist/components/tabs/index.d.ts +3 -0
- package/dist/components/tabs/index.js +3 -0
- package/dist/components/tabs/tabs.d.ts +25 -0
- package/dist/components/tabs/tabs.js +81 -0
- package/dist/components/tabs/types.d.ts +61 -0
- package/dist/components/tabs/types.js +18 -0
- package/dist/components/textarea/index.d.ts +3 -0
- package/dist/components/textarea/index.js +1 -0
- package/dist/components/textarea/textarea.d.ts +7 -0
- package/dist/components/textarea/textarea.js +17 -0
- package/dist/components/textarea/types.d.ts +26 -0
- package/dist/components/toast/index.d.ts +3 -0
- package/dist/components/toast/index.js +1 -0
- package/dist/components/toast/toast.d.ts +63 -0
- package/dist/components/toast/toast.js +321 -0
- package/dist/components/toast/types.d.ts +120 -0
- package/dist/components/toggle/index.d.ts +3 -0
- package/dist/components/toggle/index.js +3 -0
- package/dist/components/toggle/toggle.d.ts +7 -0
- package/dist/components/toggle/toggle.js +32 -0
- package/dist/components/toggle/types.d.ts +35 -0
- package/dist/components/toggle/types.js +37 -0
- package/dist/components/toggle-group/index.d.ts +3 -0
- package/dist/components/toggle-group/index.js +1 -0
- package/dist/components/toggle-group/toggle-group.d.ts +13 -0
- package/dist/components/toggle-group/toggle-group.js +88 -0
- package/dist/components/toggle-group/types.d.ts +52 -0
- package/dist/components/tooltip/index.d.ts +3 -0
- package/dist/components/tooltip/index.js +1 -0
- package/dist/components/tooltip/tooltip.d.ts +25 -0
- package/dist/components/tooltip/tooltip.js +79 -0
- package/dist/components/tooltip/types.d.ts +48 -0
- package/dist/components/trace/index.d.ts +3 -0
- package/dist/components/trace/index.js +1 -0
- package/dist/components/trace/trace.d.ts +52 -0
- package/dist/components/trace/trace.js +132 -0
- package/dist/components/trace/types.d.ts +54 -0
- package/dist/components/typography/index.d.ts +3 -0
- package/dist/components/typography/index.js +3 -0
- package/dist/components/typography/types.d.ts +29 -0
- package/dist/components/typography/types.js +25 -0
- package/dist/components/typography/typography.d.ts +7 -0
- package/dist/components/typography/typography.js +40 -0
- package/dist/components/video-player/index.d.ts +6 -0
- package/dist/components/video-player/index.js +5 -0
- package/dist/components/video-player/types.d.ts +143 -0
- package/dist/components/video-player/use-video-player.js +319 -0
- package/dist/components/video-player/video-player-context.d.ts +45 -0
- package/dist/components/video-player/video-player-context.js +15 -0
- package/dist/components/video-player/video-player-controls.d.ts +38 -0
- package/dist/components/video-player/video-player-controls.js +226 -0
- package/dist/components/video-player/video-player-overlay.d.ts +13 -0
- package/dist/components/video-player/video-player-overlay.js +113 -0
- package/dist/components/video-player/video-player.d.ts +8 -0
- package/dist/components/video-player/video-player.js +139 -0
- package/dist/index.d.ts +259 -0
- package/dist/index.js +124 -0
- package/dist/lib/floating.d.ts +44 -0
- package/dist/lib/focus-source.js +51 -0
- package/dist/lib/format.d.ts +67 -0
- package/dist/lib/format.js +130 -0
- package/dist/lib/locale.d.ts +104 -0
- package/dist/lib/locale.js +103 -0
- package/dist/lib/part-props.d.ts +15 -0
- package/dist/lib/use-controllable-state.js +22 -0
- package/dist/lib/utils.d.ts +9 -0
- package/dist/lib/utils.js +16 -0
- package/dist/styles/index.css +128 -0
- package/dist/styles/theme.css +84 -0
- package/dist/styles/utilities.css +553 -0
- package/package.json +89 -3
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
import { ScrollArea } from "@base-ui/react/scroll-area";
|
|
5
|
+
// src/components/scroll-area/scroll-area.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Область прокрутки: нативная прокрутка с тонкими полосами в стиле интерфейса
|
|
8
|
+
* @param props - пропсы области; размер задаётся className (h-72, w-96)
|
|
9
|
+
* @returns обёртка с видимой областью, вертикальной полосой и углом
|
|
10
|
+
*/
|
|
11
|
+
function ScrollArea$1({ className, children, ...props }) {
|
|
12
|
+
const classes = cn("relative", className);
|
|
13
|
+
return /* @__PURE__ */ jsxs(ScrollArea.Root, {
|
|
14
|
+
"data-slot": "scroll-area",
|
|
15
|
+
className: classes,
|
|
16
|
+
...props,
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ jsx(ScrollArea.Viewport, {
|
|
19
|
+
"data-slot": "scroll-area-viewport",
|
|
20
|
+
className: "size-full rounded-[inherit] transition-[color,box-shadow] outline-none focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1",
|
|
21
|
+
children
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ jsx(ScrollBar, {}),
|
|
24
|
+
/* @__PURE__ */ jsx(ScrollArea.Corner, { "data-slot": "scroll-area-corner" })
|
|
25
|
+
]
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Полоса прокрутки: вертикальная уже есть в ScrollArea, горизонтальную добавляют внутрь ScrollArea
|
|
30
|
+
* @param props - пропсы полосы
|
|
31
|
+
* @returns полоса с ползунком
|
|
32
|
+
*/
|
|
33
|
+
function ScrollBar({ className, orientation = "vertical", ...props }) {
|
|
34
|
+
const classes = cn("flex", "touch-none", "p-px", "transition-colors", "select-none", "data-horizontal:h-2.5", "data-horizontal:flex-col", "data-horizontal:border-t", "data-horizontal:border-t-transparent", "data-vertical:h-full", "data-vertical:w-2.5", "data-vertical:border-l", "data-vertical:border-l-transparent", className);
|
|
35
|
+
return /* @__PURE__ */ jsx(ScrollArea.Scrollbar, {
|
|
36
|
+
"data-slot": "scroll-area-scrollbar",
|
|
37
|
+
"data-orientation": orientation,
|
|
38
|
+
orientation,
|
|
39
|
+
className: classes,
|
|
40
|
+
...props,
|
|
41
|
+
children: /* @__PURE__ */ jsx(ScrollArea.Thumb, {
|
|
42
|
+
"data-slot": "scroll-area-thumb",
|
|
43
|
+
className: "relative flex-1 rounded-full bg-border"
|
|
44
|
+
})
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
export { ScrollArea$1 as ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { PartPropsT } from "../../lib/part-props.js";
|
|
2
|
+
import { ScrollArea } from "@base-ui/react/scroll-area";
|
|
3
|
+
/**
|
|
4
|
+
* Направление полосы прокрутки
|
|
5
|
+
*/
|
|
6
|
+
export type ScrollBarOrientationT = 'vertical' | 'horizontal';
|
|
7
|
+
/**
|
|
8
|
+
* Пропсы области прокрутки
|
|
9
|
+
*/
|
|
10
|
+
export type ScrollAreaPropsT = PartPropsT<ScrollArea.Root.Props>;
|
|
11
|
+
/**
|
|
12
|
+
* Пропсы полосы прокрутки
|
|
13
|
+
*/
|
|
14
|
+
export type ScrollBarPropsT = PartPropsT<Omit<ScrollArea.Scrollbar.Props, 'orientation' | 'children'>> & {
|
|
15
|
+
/** Направление: vertical (по умолчанию, уже есть в ScrollArea) или horizontal */
|
|
16
|
+
orientation?: ScrollBarOrientationT;
|
|
17
|
+
/** Держать полосу в DOM, даже когда прокручивать нечего */
|
|
18
|
+
keepMounted?: boolean;
|
|
19
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SelectContentPropsT, SelectGroupPropsT, SelectItemPropsT, SelectLabelPropsT, SelectOptionI, SelectPropsT, SelectScrollDownButtonPropsT, SelectScrollUpButtonPropsT, SelectSeparatorPropsT, SelectSizeT, SelectTriggerPropsT, SelectValuePropsT } from "./types.js";
|
|
2
|
+
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./select.js";
|
|
3
|
+
export { Select, SelectContent, type SelectContentPropsT, SelectGroup, type SelectGroupPropsT, SelectItem, type SelectItemPropsT, SelectLabel, type SelectLabelPropsT, type SelectOptionI, type SelectPropsT, SelectScrollDownButton, type SelectScrollDownButtonPropsT, SelectScrollUpButton, type SelectScrollUpButtonPropsT, SelectSeparator, type SelectSeparatorPropsT, type SelectSizeT, SelectTrigger, type SelectTriggerPropsT, SelectValue, type SelectValuePropsT };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from "./select.js";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { SelectContentPropsT, SelectGroupPropsT, SelectItemPropsT, SelectLabelPropsT, SelectPropsT, SelectScrollDownButtonPropsT, SelectScrollUpButtonPropsT, SelectSeparatorPropsT, SelectTriggerPropsT, SelectValuePropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Выпадающий список: выбор одного значения из списка
|
|
4
|
+
* @param props - пропсы списка
|
|
5
|
+
* @returns корень без своей разметки
|
|
6
|
+
*/
|
|
7
|
+
export declare function Select({ items, onValueChange, onOpenChange, ...props }: SelectPropsT): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Группа пунктов с подписью SelectLabel
|
|
10
|
+
* @param props - пропсы группы
|
|
11
|
+
* @returns div с role="group"
|
|
12
|
+
*/
|
|
13
|
+
export declare function SelectGroup({ className, ...props }: SelectGroupPropsT): import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Выбранное значение в кнопке: текст выбранного пункта (из items у Select) или подсказка
|
|
16
|
+
* @param props - пропсы значения
|
|
17
|
+
* @returns span
|
|
18
|
+
*/
|
|
19
|
+
export declare function SelectValue({ className, ...props }: SelectValuePropsT): import("react").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Кнопка списка: показывает выбранное значение и открывает список
|
|
22
|
+
* @param props - пропсы кнопки
|
|
23
|
+
* @returns кнопка с role="combobox"
|
|
24
|
+
*/
|
|
25
|
+
export declare function SelectTrigger({ className, size, children, ...props }: SelectTriggerPropsT): import("react").JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Список: рендерится в портале, с кнопками прокрутки
|
|
28
|
+
* @param props - пропсы списка; по умолчанию alignItemWithTrigger, align="center"
|
|
29
|
+
* @returns портал со списком
|
|
30
|
+
*/
|
|
31
|
+
export declare function SelectContent({ className, children, side, sideOffset, align, alignOffset, collisionPadding, arrowPadding, sticky, alignItemWithTrigger, ...props }: SelectContentPropsT): import("react").JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Подпись группы пунктов. Кладётся внутрь SelectGroup
|
|
34
|
+
* @param props - пропсы подписи
|
|
35
|
+
* @returns div
|
|
36
|
+
*/
|
|
37
|
+
export declare function SelectLabel({ className, ...props }: SelectLabelPropsT): import("react").JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* Пункт списка: выбранный отмечен галочкой справа
|
|
40
|
+
* @param props - пропсы пункта
|
|
41
|
+
* @returns div с role="option"
|
|
42
|
+
*/
|
|
43
|
+
export declare function SelectItem({ className, children, ...props }: SelectItemPropsT): import("react").JSX.Element;
|
|
44
|
+
/**
|
|
45
|
+
* Разделитель между группами пунктов
|
|
46
|
+
* @param props - пропсы разделителя
|
|
47
|
+
* @returns div с role="separator"
|
|
48
|
+
*/
|
|
49
|
+
export declare function SelectSeparator({ className, ...props }: SelectSeparatorPropsT): import("react").JSX.Element;
|
|
50
|
+
/**
|
|
51
|
+
* Кнопка прокрутки вверх: видна, когда список длиннее окна. SelectContent рендерит её сам
|
|
52
|
+
* @param props - пропсы кнопки
|
|
53
|
+
* @returns div
|
|
54
|
+
*/
|
|
55
|
+
export declare function SelectScrollUpButton({ className, ...props }: SelectScrollUpButtonPropsT): import("react").JSX.Element;
|
|
56
|
+
/**
|
|
57
|
+
* Кнопка прокрутки вниз: видна, когда список длиннее окна. SelectContent рендерит её сам
|
|
58
|
+
* @param props - пропсы кнопки
|
|
59
|
+
* @returns div
|
|
60
|
+
*/
|
|
61
|
+
export declare function SelectScrollDownButton({ className, ...props }: SelectScrollDownButtonPropsT): import("react").JSX.Element;
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { CheckIcon, ChevronDownIcon, ChevronUpIcon } from "lucide-react";
|
|
4
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
5
|
+
import { Select } from "@base-ui/react/select";
|
|
6
|
+
// src/components/select/select.tsx
|
|
7
|
+
/**
|
|
8
|
+
* Выпадающий список: выбор одного значения из списка
|
|
9
|
+
* @param props - пропсы списка
|
|
10
|
+
* @returns корень без своей разметки
|
|
11
|
+
*/
|
|
12
|
+
function Select$1({ items, onValueChange, onOpenChange, ...props }) {
|
|
13
|
+
/**
|
|
14
|
+
* Выбрано другое значение: наружу только значение
|
|
15
|
+
* @param value - значение пункта
|
|
16
|
+
*/
|
|
17
|
+
const handleValueChange = (value) => onValueChange?.(value);
|
|
18
|
+
/**
|
|
19
|
+
* Список открыли или закрыли: наружу только флаг
|
|
20
|
+
* @param open - открыт ли
|
|
21
|
+
*/
|
|
22
|
+
const handleOpenChange = (open) => onOpenChange?.(open);
|
|
23
|
+
return /* @__PURE__ */ jsx(Select.Root, {
|
|
24
|
+
"data-slot": "select",
|
|
25
|
+
items,
|
|
26
|
+
onValueChange: handleValueChange,
|
|
27
|
+
onOpenChange: handleOpenChange,
|
|
28
|
+
...props
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Группа пунктов с подписью SelectLabel
|
|
33
|
+
* @param props - пропсы группы
|
|
34
|
+
* @returns div с role="group"
|
|
35
|
+
*/
|
|
36
|
+
function SelectGroup({ className, ...props }) {
|
|
37
|
+
const classes = cn("scroll-my-1", "p-1", className);
|
|
38
|
+
return /* @__PURE__ */ jsx(Select.Group, {
|
|
39
|
+
"data-slot": "select-group",
|
|
40
|
+
className: classes,
|
|
41
|
+
...props
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Выбранное значение в кнопке: текст выбранного пункта (из items у Select) или подсказка
|
|
46
|
+
* @param props - пропсы значения
|
|
47
|
+
* @returns span
|
|
48
|
+
*/
|
|
49
|
+
function SelectValue({ className, ...props }) {
|
|
50
|
+
const classes = cn("flex", "flex-1", "text-left", className);
|
|
51
|
+
return /* @__PURE__ */ jsx(Select.Value, {
|
|
52
|
+
"data-slot": "select-value",
|
|
53
|
+
className: classes,
|
|
54
|
+
...props
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Кнопка списка: показывает выбранное значение и открывает список
|
|
59
|
+
* @param props - пропсы кнопки
|
|
60
|
+
* @returns кнопка с role="combobox"
|
|
61
|
+
*/
|
|
62
|
+
function SelectTrigger({ className, size = "default", children, ...props }) {
|
|
63
|
+
const classes = cn("flex", "w-fit", "items-center", "justify-between", "gap-1.5", "rounded-lg", "border", "border-input", "bg-transparent", "py-2", "pr-2", "pl-2.5", "text-sm", "whitespace-nowrap", "transition-colors", "outline-none", "select-none", "data-placeholder:text-muted-foreground", "dark:bg-input/30", "dark:hover:bg-input/50", "focus-visible:border-ring", "focus-visible:ring-3", "focus-visible:ring-ring/50", "aria-invalid:border-destructive", "aria-invalid:ring-3", "aria-invalid:ring-destructive/20", "dark:aria-invalid:border-destructive/50", "dark:aria-invalid:ring-destructive/40", "data-disabled:cursor-not-allowed", "data-disabled:opacity-50", "data-[size=default]:h-8", "data-[size=sm]:h-7", "data-[size=sm]:rounded-[min(var(--radius-md),10px)]", "*:data-[slot=select-value]:line-clamp-1", "*:data-[slot=select-value]:flex", "*:data-[slot=select-value]:items-center", "*:data-[slot=select-value]:gap-1.5", "[&_svg]:pointer-events-none", "[&_svg]:shrink-0", "[&_svg:not([class*=size-])]:size-4", className);
|
|
64
|
+
const icon = /* @__PURE__ */ jsx(ChevronDownIcon, { className: "pointer-events-none size-4 text-muted-foreground" });
|
|
65
|
+
return /* @__PURE__ */ jsxs(Select.Trigger, {
|
|
66
|
+
"data-slot": "select-trigger",
|
|
67
|
+
"data-size": size,
|
|
68
|
+
className: classes,
|
|
69
|
+
...props,
|
|
70
|
+
children: [children, /* @__PURE__ */ jsx(Select.Icon, { render: icon })]
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Список: рендерится в портале, с кнопками прокрутки
|
|
75
|
+
* @param props - пропсы списка; по умолчанию alignItemWithTrigger, align="center"
|
|
76
|
+
* @returns портал со списком
|
|
77
|
+
*/
|
|
78
|
+
function SelectContent({ className, children, side = "bottom", sideOffset = 4, align = "center", alignOffset = 0, collisionPadding, arrowPadding, sticky, alignItemWithTrigger = true, ...props }) {
|
|
79
|
+
const classes = cn("relative", "isolate", "z-50", "max-h-(--available-height)", "w-(--anchor-width)", "min-w-36", "origin-(--transform-origin)", "overflow-x-hidden", "overflow-y-auto", "rounded-lg", "bg-popover", "text-popover-foreground", "shadow-md", "ring-1", "ring-foreground/10", "duration-100", "data-open:animate-in", "data-open:fade-in-0", "data-open:zoom-in-95", "data-closed:animate-out", "data-closed:fade-out-0", "data-closed:zoom-out-95", "data-[side=bottom]:slide-in-from-top-2", "data-[side=left]:slide-in-from-right-2", "data-[side=right]:slide-in-from-left-2", "data-[side=top]:slide-in-from-bottom-2", "data-[align-trigger=true]:animate-none", className);
|
|
80
|
+
const positionerProps = {
|
|
81
|
+
side,
|
|
82
|
+
sideOffset,
|
|
83
|
+
align,
|
|
84
|
+
alignOffset,
|
|
85
|
+
collisionPadding,
|
|
86
|
+
arrowPadding,
|
|
87
|
+
sticky
|
|
88
|
+
};
|
|
89
|
+
return /* @__PURE__ */ jsx(Select.Portal, { children: /* @__PURE__ */ jsx(Select.Positioner, {
|
|
90
|
+
className: "isolate z-50",
|
|
91
|
+
alignItemWithTrigger,
|
|
92
|
+
...positionerProps,
|
|
93
|
+
children: /* @__PURE__ */ jsxs(Select.Popup, {
|
|
94
|
+
"data-slot": "select-content",
|
|
95
|
+
"data-align-trigger": alignItemWithTrigger,
|
|
96
|
+
className: classes,
|
|
97
|
+
...props,
|
|
98
|
+
children: [
|
|
99
|
+
/* @__PURE__ */ jsx(SelectScrollUpButton, {}),
|
|
100
|
+
/* @__PURE__ */ jsx(Select.List, { children }),
|
|
101
|
+
/* @__PURE__ */ jsx(SelectScrollDownButton, {})
|
|
102
|
+
]
|
|
103
|
+
})
|
|
104
|
+
}) });
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* Подпись группы пунктов. Кладётся внутрь SelectGroup
|
|
108
|
+
* @param props - пропсы подписи
|
|
109
|
+
* @returns div
|
|
110
|
+
*/
|
|
111
|
+
function SelectLabel({ className, ...props }) {
|
|
112
|
+
const classes = cn("px-1.5", "py-1", "text-xs", "text-muted-foreground", className);
|
|
113
|
+
return /* @__PURE__ */ jsx(Select.GroupLabel, {
|
|
114
|
+
"data-slot": "select-label",
|
|
115
|
+
className: classes,
|
|
116
|
+
...props
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Пункт списка: выбранный отмечен галочкой справа
|
|
121
|
+
* @param props - пропсы пункта
|
|
122
|
+
* @returns div с role="option"
|
|
123
|
+
*/
|
|
124
|
+
function SelectItem({ className, children, ...props }) {
|
|
125
|
+
const classes = cn("relative", "flex", "w-full", "cursor-default", "items-center", "gap-1.5", "rounded-md", "py-1", "pr-8", "pl-1.5", "text-sm", "outline-hidden", "select-none", "focus:bg-accent", "focus:text-accent-foreground", "not-data-[variant=destructive]:focus:**:text-accent-foreground", "data-disabled:pointer-events-none", "data-disabled:opacity-50", "[&_svg]:pointer-events-none", "[&_svg]:shrink-0", "[&_svg:not([class*=size-])]:size-4", "*:[span]:last:flex", "*:[span]:last:items-center", "*:[span]:last:gap-2", className);
|
|
126
|
+
const indicator = /* @__PURE__ */ jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center" });
|
|
127
|
+
return /* @__PURE__ */ jsxs(Select.Item, {
|
|
128
|
+
"data-slot": "select-item",
|
|
129
|
+
className: classes,
|
|
130
|
+
...props,
|
|
131
|
+
children: [/* @__PURE__ */ jsx(Select.ItemText, {
|
|
132
|
+
className: "flex flex-1 shrink-0 gap-2 whitespace-nowrap",
|
|
133
|
+
children
|
|
134
|
+
}), /* @__PURE__ */ jsx(Select.ItemIndicator, {
|
|
135
|
+
render: indicator,
|
|
136
|
+
children: /* @__PURE__ */ jsx(CheckIcon, { className: "pointer-events-none" })
|
|
137
|
+
})]
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* Разделитель между группами пунктов
|
|
142
|
+
* @param props - пропсы разделителя
|
|
143
|
+
* @returns div с role="separator"
|
|
144
|
+
*/
|
|
145
|
+
function SelectSeparator({ className, ...props }) {
|
|
146
|
+
const classes = cn("pointer-events-none", "-mx-1", "my-1", "h-px", "bg-border", className);
|
|
147
|
+
return /* @__PURE__ */ jsx(Select.Separator, {
|
|
148
|
+
"data-slot": "select-separator",
|
|
149
|
+
className: classes,
|
|
150
|
+
...props
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
/** Классы кнопок прокрутки списка */
|
|
154
|
+
const scrollButtonClasses = "z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*=size-])]:size-4";
|
|
155
|
+
/**
|
|
156
|
+
* Кнопка прокрутки вверх: видна, когда список длиннее окна. SelectContent рендерит её сам
|
|
157
|
+
* @param props - пропсы кнопки
|
|
158
|
+
* @returns div
|
|
159
|
+
*/
|
|
160
|
+
function SelectScrollUpButton({ className, ...props }) {
|
|
161
|
+
const classes = cn(scrollButtonClasses, "top-0", className);
|
|
162
|
+
return /* @__PURE__ */ jsx(Select.ScrollUpArrow, {
|
|
163
|
+
"data-slot": "select-scroll-up-button",
|
|
164
|
+
className: classes,
|
|
165
|
+
...props,
|
|
166
|
+
children: /* @__PURE__ */ jsx(ChevronUpIcon, {})
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Кнопка прокрутки вниз: видна, когда список длиннее окна. SelectContent рендерит её сам
|
|
171
|
+
* @param props - пропсы кнопки
|
|
172
|
+
* @returns div
|
|
173
|
+
*/
|
|
174
|
+
function SelectScrollDownButton({ className, ...props }) {
|
|
175
|
+
const classes = cn(scrollButtonClasses, "bottom-0", className);
|
|
176
|
+
return /* @__PURE__ */ jsx(Select.ScrollDownArrow, {
|
|
177
|
+
"data-slot": "select-scroll-down-button",
|
|
178
|
+
className: classes,
|
|
179
|
+
...props,
|
|
180
|
+
children: /* @__PURE__ */ jsx(ChevronDownIcon, {})
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
export { Select$1 as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { PartPropsT } from "../../lib/part-props.js";
|
|
2
|
+
import { FloatingPropsT } from "../../lib/floating.js";
|
|
3
|
+
import { ReactNode } from "react";
|
|
4
|
+
import { Select } from "@base-ui/react/select";
|
|
5
|
+
/**
|
|
6
|
+
* Пункт списка для подписи выбранного значения
|
|
7
|
+
* @property value - Значение; null — пункт «ничего не выбрано» с текстом-подсказкой
|
|
8
|
+
* @property label - Текст пункта: показывается в кнопке, когда пункт выбран
|
|
9
|
+
*/
|
|
10
|
+
export interface SelectOptionI {
|
|
11
|
+
value: string | null;
|
|
12
|
+
label: ReactNode;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Пропсы выпадающего списка
|
|
16
|
+
*/
|
|
17
|
+
export type SelectPropsT = Omit<Select.Root.Props<string>, 'value' | 'defaultValue' | 'onValueChange' | 'onOpenChange' | 'items' | 'multiple'> & {
|
|
18
|
+
/**
|
|
19
|
+
* Пункты списка: по ним кнопка показывает текст выбранного значения.
|
|
20
|
+
* Массив { value, label } или объект «значение → текст»
|
|
21
|
+
*/
|
|
22
|
+
items?: SelectOptionI[] | Record<string, ReactNode>;
|
|
23
|
+
/** Выбранное значение — контролируемый режим, вместе с onValueChange */
|
|
24
|
+
value?: string | null;
|
|
25
|
+
/** Выбранное значение при первом рендере — неконтролируемый режим */
|
|
26
|
+
defaultValue?: string | null;
|
|
27
|
+
/** Выбрано другое значение */
|
|
28
|
+
onValueChange?: (value: string | null) => void;
|
|
29
|
+
/** Список открыт — контролируемый режим, вместе с onOpenChange */
|
|
30
|
+
open?: boolean;
|
|
31
|
+
/** Список открыт при первом рендере */
|
|
32
|
+
defaultOpen?: boolean;
|
|
33
|
+
/** Список открыли или закрыли: новое состояние */
|
|
34
|
+
onOpenChange?: (open: boolean) => void;
|
|
35
|
+
/** Отключить выбор */
|
|
36
|
+
disabled?: boolean;
|
|
37
|
+
/** Обязательное поле формы */
|
|
38
|
+
required?: boolean;
|
|
39
|
+
/** Имя поля в форме */
|
|
40
|
+
name?: string;
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Пропсы группы
|
|
44
|
+
*/
|
|
45
|
+
export type SelectGroupPropsT = PartPropsT<Select.Group.Props>;
|
|
46
|
+
/**
|
|
47
|
+
* Пропсы выбранного значения
|
|
48
|
+
*/
|
|
49
|
+
export type SelectValuePropsT = PartPropsT<Select.Value.Props> & {
|
|
50
|
+
/** Текст, пока ничего не выбрано */
|
|
51
|
+
placeholder?: ReactNode;
|
|
52
|
+
};
|
|
53
|
+
/**
|
|
54
|
+
* Размер кнопки списка
|
|
55
|
+
*/
|
|
56
|
+
export type SelectSizeT = 'sm' | 'default';
|
|
57
|
+
/**
|
|
58
|
+
* Пропсы кнопки списка
|
|
59
|
+
*/
|
|
60
|
+
export type SelectTriggerPropsT = PartPropsT<Select.Trigger.Props> & {
|
|
61
|
+
/** Размер: default — 32px, sm — 28px */
|
|
62
|
+
size?: SelectSizeT;
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Пропсы списка
|
|
66
|
+
*/
|
|
67
|
+
export type SelectContentPropsT = PartPropsT<Select.Popup.Props> & FloatingPropsT & {
|
|
68
|
+
/**
|
|
69
|
+
* true — выбранный пункт открывается поверх кнопки, как в macOS (по умолчанию);
|
|
70
|
+
* false — список под кнопкой
|
|
71
|
+
*/
|
|
72
|
+
alignItemWithTrigger?: boolean;
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Пропсы подписи группы
|
|
76
|
+
*/
|
|
77
|
+
export type SelectLabelPropsT = PartPropsT<Select.GroupLabel.Props>;
|
|
78
|
+
/**
|
|
79
|
+
* Пропсы пункта
|
|
80
|
+
*/
|
|
81
|
+
export type SelectItemPropsT = PartPropsT<Omit<Select.Item.Props, 'value'>> & {
|
|
82
|
+
/** Значение пункта; null — пункт «ничего не выбрано» */
|
|
83
|
+
value: string | null;
|
|
84
|
+
/** Отключить пункт */
|
|
85
|
+
disabled?: boolean;
|
|
86
|
+
/** Текст для поиска набором букв, если содержимое пункта — не просто текст */
|
|
87
|
+
label?: string;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* Пропсы разделителя
|
|
91
|
+
*/
|
|
92
|
+
export type SelectSeparatorPropsT = PartPropsT<Select.Separator.Props>;
|
|
93
|
+
/**
|
|
94
|
+
* Пропсы кнопки прокрутки вверх
|
|
95
|
+
*/
|
|
96
|
+
export type SelectScrollUpButtonPropsT = PartPropsT<Select.ScrollUpArrow.Props>;
|
|
97
|
+
/**
|
|
98
|
+
* Пропсы кнопки прокрутки вниз
|
|
99
|
+
*/
|
|
100
|
+
export type SelectScrollDownButtonPropsT = PartPropsT<Select.ScrollDownArrow.Props>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Separator } from "./separator.js";
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SeparatorPropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Разделитель: линия между блоками контента — горизонтальная или вертикальная
|
|
4
|
+
* @param props - пропсы разделителя
|
|
5
|
+
* @returns линия-разделитель с role="separator"
|
|
6
|
+
*/
|
|
7
|
+
export declare function Separator({ className, orientation, ...props }: SeparatorPropsT): import("react").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn } from "../../lib/utils.js";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
import { Separator } from "@base-ui/react/separator";
|
|
5
|
+
// src/components/separator/separator.tsx
|
|
6
|
+
/**
|
|
7
|
+
* Разделитель: линия между блоками контента — горизонтальная или вертикальная
|
|
8
|
+
* @param props - пропсы разделителя
|
|
9
|
+
* @returns линия-разделитель с role="separator"
|
|
10
|
+
*/
|
|
11
|
+
function Separator$1({ className, orientation = "horizontal", ...props }) {
|
|
12
|
+
const classes = cn("shrink-0", "bg-border", "data-[orientation=horizontal]:h-px", "data-[orientation=horizontal]:w-full", "data-[orientation=vertical]:w-px", "data-[orientation=vertical]:self-stretch", className);
|
|
13
|
+
return /* @__PURE__ */ jsx(Separator, {
|
|
14
|
+
"data-slot": "separator",
|
|
15
|
+
orientation,
|
|
16
|
+
className: classes,
|
|
17
|
+
...props
|
|
18
|
+
});
|
|
19
|
+
}
|
|
20
|
+
export { Separator$1 as Separator };
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { PartPropsT } from "../../lib/part-props.js";
|
|
2
|
+
import { Separator } from "@base-ui/react/separator";
|
|
3
|
+
/**
|
|
4
|
+
* Пропсы разделителя
|
|
5
|
+
*/
|
|
6
|
+
export type SeparatorPropsT = PartPropsT<Omit<Separator.Props, 'orientation'>> & {
|
|
7
|
+
/** Направление линии: горизонтальная (по умолчанию) или вертикальная */
|
|
8
|
+
orientation?: 'horizontal' | 'vertical';
|
|
9
|
+
};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { SheetClosePropsT, SheetContentPropsT, SheetDescriptionPropsT, SheetFooterPropsT, SheetHeaderPropsT, SheetOverlayPropsT, SheetPortalPropsT, SheetPropsT, SheetSideT, SheetTitlePropsT, SheetTriggerPropsT } from "./types.js";
|
|
2
|
+
import { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger } from "./sheet.js";
|
|
3
|
+
export { Sheet, SheetClose, type SheetClosePropsT, SheetContent, type SheetContentPropsT, SheetDescription, type SheetDescriptionPropsT, SheetFooter, type SheetFooterPropsT, SheetHeader, type SheetHeaderPropsT, SheetOverlay, type SheetOverlayPropsT, SheetPortal, type SheetPortalPropsT, type SheetPropsT, type SheetSideT, SheetTitle, type SheetTitlePropsT, SheetTrigger, type SheetTriggerPropsT };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Sheet, SheetClose, SheetContent, SheetDescription, SheetFooter, SheetHeader, SheetOverlay, SheetPortal, SheetTitle, SheetTrigger } from "./sheet.js";
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { SheetClosePropsT, SheetContentPropsT, SheetDescriptionPropsT, SheetFooterPropsT, SheetHeaderPropsT, SheetOverlayPropsT, SheetPortalPropsT, SheetPropsT, SheetTitlePropsT, SheetTriggerPropsT } from "./types.js";
|
|
2
|
+
/**
|
|
3
|
+
* Боковая панель: окно, которое выезжает с края экрана. Дополняет основное содержимое страницы
|
|
4
|
+
* @param props - пропсы панели
|
|
5
|
+
* @returns корень панели без своей разметки
|
|
6
|
+
*/
|
|
7
|
+
export declare function Sheet({ onOpenChange, ...props }: SheetPropsT): import("react").JSX.Element;
|
|
8
|
+
/**
|
|
9
|
+
* Кнопка открытия панели
|
|
10
|
+
* @param props - пропсы кнопки
|
|
11
|
+
* @returns кнопка с aria-haspopup="dialog"
|
|
12
|
+
*/
|
|
13
|
+
export declare function SheetTrigger(props: SheetTriggerPropsT): import("react").JSX.Element;
|
|
14
|
+
/**
|
|
15
|
+
* Портал: переносит оверлей и панель в конец body
|
|
16
|
+
* @param props - пропсы портала
|
|
17
|
+
* @returns портал
|
|
18
|
+
*/
|
|
19
|
+
export declare function SheetPortal(props: SheetPortalPropsT): import("react").JSX.Element;
|
|
20
|
+
/**
|
|
21
|
+
* Кнопка закрытия панели: любая кнопка внутри панели, которая закрывает её
|
|
22
|
+
* @param props - пропсы кнопки
|
|
23
|
+
* @returns кнопка
|
|
24
|
+
*/
|
|
25
|
+
export declare function SheetClose(props: SheetClosePropsT): import("react").JSX.Element;
|
|
26
|
+
/**
|
|
27
|
+
* Оверлей: затемняет и размывает страницу под панелью
|
|
28
|
+
* @param props - пропсы оверлея
|
|
29
|
+
* @returns полупрозрачный слой на весь экран
|
|
30
|
+
*/
|
|
31
|
+
export declare function SheetOverlay({ className, ...props }: SheetOverlayPropsT): import("react").JSX.Element;
|
|
32
|
+
/**
|
|
33
|
+
* Панель: рендерится в портале поверх оверлея и выезжает с выбранной стороны
|
|
34
|
+
* @param props - пропсы панели
|
|
35
|
+
* @returns портал с оверлеем и панелью
|
|
36
|
+
*/
|
|
37
|
+
export declare function SheetContent({ className, children, side, showCloseButton, closeLabel, ...props }: SheetContentPropsT): import("react").JSX.Element;
|
|
38
|
+
/**
|
|
39
|
+
* Шапка панели: заголовок и описание
|
|
40
|
+
* @param props - пропсы шапки
|
|
41
|
+
* @returns блок
|
|
42
|
+
*/
|
|
43
|
+
export declare function SheetHeader({ className, ...props }: SheetHeaderPropsT): import("react").JSX.Element;
|
|
44
|
+
/**
|
|
45
|
+
* Подвал панели: прижат к низу, кнопки столбиком
|
|
46
|
+
* @param props - пропсы подвала
|
|
47
|
+
* @returns блок
|
|
48
|
+
*/
|
|
49
|
+
export declare function SheetFooter({ className, ...props }: SheetFooterPropsT): import("react").JSX.Element;
|
|
50
|
+
/**
|
|
51
|
+
* Заголовок панели: озвучивается при открытии
|
|
52
|
+
* @param props - пропсы заголовка
|
|
53
|
+
* @returns h2
|
|
54
|
+
*/
|
|
55
|
+
export declare function SheetTitle({ className, ...props }: SheetTitlePropsT): import("react").JSX.Element;
|
|
56
|
+
/**
|
|
57
|
+
* Описание панели: озвучивается после заголовка
|
|
58
|
+
* @param props - пропсы описания
|
|
59
|
+
* @returns p
|
|
60
|
+
*/
|
|
61
|
+
export declare function SheetDescription({ className, ...props }: SheetDescriptionPropsT): import("react").JSX.Element;
|