@soybeanjs/ui 0.13.8 → 0.15.0-beta.1
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/README.md +79 -147
- package/README.zh-CN.md +79 -147
- package/dist/components/accordion/accordion.js +1 -1
- package/dist/components/accordion/accordion.vue.d.ts +6 -34
- package/dist/components/accordion/index.d.ts +3 -3
- package/dist/components/accordion/types.d.ts +6 -25
- package/dist/components/affix/affix.js +1 -0
- package/dist/components/affix/affix.vue.d.ts +22 -0
- package/dist/components/affix/index.d.ts +4 -0
- package/dist/components/affix/index.js +1 -0
- package/dist/components/affix/types.d.ts +15 -0
- package/dist/components/affix/variants.js +1 -0
- package/dist/components/alert/alert.js +1 -1
- package/dist/components/alert/alert.vue.d.ts +4 -4
- package/dist/components/alert/variants.d.ts +3 -3
- package/dist/components/alert-dialog/alert-dialog-cancel.vue.d.ts +4 -4
- package/dist/components/alert-dialog/alert-dialog-confirm.vue.d.ts +4 -4
- package/dist/components/alert-dialog/alert-dialog.vue.d.ts +6 -6
- package/dist/components/anchor/anchor-item.js +1 -0
- package/dist/components/anchor/anchor.js +1 -0
- package/dist/components/anchor/anchor.vue.d.ts +23 -0
- package/dist/components/anchor/context.js +1 -0
- package/dist/components/anchor/index.d.ts +4 -0
- package/dist/components/anchor/index.js +1 -0
- package/dist/components/anchor/types.d.ts +34 -0
- package/dist/components/anchor/variants.js +1 -0
- package/dist/components/autocomplete/autocomplete-group-option.js +1 -0
- package/dist/components/autocomplete/autocomplete-option.js +1 -0
- package/dist/components/autocomplete/autocomplete-single-option.js +1 -0
- package/dist/components/autocomplete/autocomplete.js +1 -0
- package/dist/components/autocomplete/autocomplete.vue.d.ts +47 -0
- package/dist/components/autocomplete/context.js +1 -0
- package/dist/components/autocomplete/index.d.ts +4 -0
- package/dist/components/autocomplete/index.js +1 -0
- package/dist/components/autocomplete/shared.js +1 -0
- package/dist/components/autocomplete/types.d.ts +94 -0
- package/dist/components/autocomplete/variants.js +1 -0
- package/dist/components/avatar/avatar.vue.d.ts +7 -7
- package/dist/components/badge/badge.vue.d.ts +4 -4
- package/dist/components/badge/variants.d.ts +3 -3
- package/dist/components/bottom-sheet/bottom-sheet-close.js +1 -0
- package/dist/components/bottom-sheet/bottom-sheet-close.vue.d.ts +18 -0
- package/dist/components/bottom-sheet/bottom-sheet.js +1 -0
- package/dist/components/bottom-sheet/bottom-sheet.vue.d.ts +72 -0
- package/dist/components/bottom-sheet/index.d.ts +3 -0
- package/dist/components/bottom-sheet/index.js +1 -0
- package/dist/components/bottom-sheet/types.d.ts +31 -0
- package/dist/components/bottom-sheet/variants.js +1 -0
- package/dist/components/breadcrumb/breadcrumb.vue.d.ts +3 -3
- package/dist/components/button/button-group.vue.d.ts +6 -6
- package/dist/components/button/button-icon.vue.d.ts +3 -3
- package/dist/components/button/button-link.vue.d.ts +4 -4
- package/dist/components/button/button-loading.vue.d.ts +3 -3
- package/dist/components/button/button.vue.d.ts +4 -4
- package/dist/components/button/variants.d.ts +3 -3
- package/dist/components/card/card-collapsible-trigger.vue.d.ts +3 -3
- package/dist/components/card/card.js +1 -1
- package/dist/components/card/card.vue.d.ts +3 -3
- package/dist/components/carousel/carousel-content.js +1 -0
- package/dist/components/carousel/carousel-content.vue.d.ts +18 -0
- package/dist/components/carousel/carousel-item.js +1 -0
- package/dist/components/carousel/carousel-item.vue.d.ts +18 -0
- package/dist/components/carousel/carousel-next.js +1 -0
- package/dist/components/carousel/carousel-next.vue.d.ts +22 -0
- package/dist/components/carousel/carousel-previous.js +1 -0
- package/dist/components/carousel/carousel-previous.vue.d.ts +22 -0
- package/dist/components/carousel/carousel.js +1 -0
- package/dist/components/carousel/carousel.vue.d.ts +15 -0
- package/dist/components/carousel/index.d.ts +8 -0
- package/dist/components/carousel/index.js +1 -0
- package/dist/components/carousel/types.d.ts +10 -0
- package/dist/components/carousel/variants.js +1 -0
- package/dist/components/checkbox/checkbox-card-group.vue.d.ts +3 -3
- package/dist/components/checkbox/checkbox-card.vue.d.ts +8 -8
- package/dist/components/checkbox/checkbox-group.vue.d.ts +3 -3
- package/dist/components/checkbox/checkbox.vue.d.ts +12 -12
- package/dist/components/checkbox/variants.d.ts +3 -3
- package/dist/components/collapsible/collapsible.vue.d.ts +4 -4
- package/dist/components/color-area/color-area.js +1 -0
- package/dist/components/color-area/color-area.vue.d.ts +19 -0
- package/dist/components/color-area/index.d.ts +4 -0
- package/dist/components/color-area/index.js +1 -0
- package/dist/components/color-area/types.d.ts +14 -0
- package/dist/components/color-area/variants.js +1 -0
- package/dist/components/color-field/color-field.js +1 -0
- package/dist/components/color-field/color-field.vue.d.ts +15 -0
- package/dist/components/color-field/index.d.ts +4 -0
- package/dist/components/color-field/index.js +1 -0
- package/dist/components/color-field/types.d.ts +13 -0
- package/dist/components/color-field/variants.js +1 -0
- package/dist/components/color-picker/color-picker.js +1 -0
- package/dist/components/color-picker/color-picker.vue.d.ts +55 -0
- package/dist/components/color-picker/index.d.ts +2 -0
- package/dist/components/color-picker/index.js +1 -0
- package/dist/components/color-picker/shared.js +1 -0
- package/dist/components/color-picker/types.d.ts +47 -0
- package/dist/components/color-picker/variants.js +1 -0
- package/dist/components/color-slider/color-slider.js +1 -0
- package/dist/components/color-slider/color-slider.vue.d.ts +23 -0
- package/dist/components/color-slider/index.d.ts +4 -0
- package/dist/components/color-slider/index.js +1 -0
- package/dist/components/color-slider/types.d.ts +16 -0
- package/dist/components/color-swatch/color-swatch.js +1 -0
- package/dist/components/color-swatch/color-swatch.vue.d.ts +18 -0
- package/dist/components/color-swatch/index.d.ts +5 -0
- package/dist/components/color-swatch/index.js +1 -0
- package/dist/components/color-swatch/types.d.ts +16 -0
- package/dist/components/color-swatch/variants.d.ts +108 -0
- package/dist/components/color-swatch/variants.js +1 -0
- package/dist/components/color-swatch-picker/color-swatch-picker.js +1 -0
- package/dist/components/color-swatch-picker/color-swatch-picker.vue.d.ts +39 -0
- package/dist/components/color-swatch-picker/index.d.ts +5 -0
- package/dist/components/color-swatch-picker/index.js +1 -0
- package/dist/components/color-swatch-picker/types.d.ts +20 -0
- package/dist/components/color-swatch-picker/variants.d.ts +153 -0
- package/dist/components/color-swatch-picker/variants.js +1 -0
- package/dist/components/combobox/combobox-group-option.js +1 -0
- package/dist/components/combobox/combobox-option.js +1 -0
- package/dist/components/combobox/combobox-single-option.js +1 -0
- package/dist/components/combobox/combobox.js +1 -0
- package/dist/components/combobox/combobox.vue.d.ts +76 -0
- package/dist/components/combobox/index.d.ts +4 -0
- package/dist/components/combobox/index.js +1 -0
- package/dist/components/combobox/shared.js +1 -0
- package/dist/components/combobox/types.d.ts +68 -0
- package/dist/components/combobox/variants.js +1 -0
- package/dist/components/command/command.vue.d.ts +8 -8
- package/dist/components/config-provider/config-provider.js +1 -1
- package/dist/components/config-provider/config-provider.vue.d.ts +7 -7
- package/dist/components/config-provider/context.js +1 -1
- package/dist/components/config-provider/types.d.ts +14 -2
- package/dist/components/context-menu/context-menu-checkbox.js +1 -1
- package/dist/components/context-menu/context-menu-checkbox.vue.d.ts +14 -21
- package/dist/components/context-menu/context-menu-radio.js +1 -1
- package/dist/components/context-menu/context-menu-radio.vue.d.ts +14 -21
- package/dist/components/context-menu/context-menu-wrapper.js +1 -1
- package/dist/components/context-menu/context-menu-wrapper.vue.d.ts +16 -16
- package/dist/components/context-menu/context-menu.js +1 -1
- package/dist/components/context-menu/context-menu.vue.d.ts +13 -21
- package/dist/components/context-menu/index.d.ts +5 -7
- package/dist/components/context-menu/types.d.ts +14 -42
- package/dist/components/dialog/dialog-close.vue.d.ts +2 -2
- package/dist/components/dialog/dialog-pure.vue.d.ts +12 -12
- package/dist/components/dialog/dialog.vue.d.ts +12 -12
- package/dist/components/drawer/drawer-close.vue.d.ts +2 -2
- package/dist/components/drawer/drawer.vue.d.ts +12 -12
- package/dist/components/dropdown-menu/dropdown-menu-checkbox.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-checkbox.vue.d.ts +14 -21
- package/dist/components/dropdown-menu/dropdown-menu-radio.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-radio.vue.d.ts +14 -21
- package/dist/components/dropdown-menu/dropdown-menu-wrapper.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-wrapper.vue.d.ts +16 -16
- package/dist/components/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.vue.d.ts +13 -21
- package/dist/components/dropdown-menu/index.d.ts +2 -4
- package/dist/components/dropdown-menu/index.js +1 -1
- package/dist/components/dropdown-menu/types.d.ts +14 -38
- package/dist/components/editable/editable.js +1 -0
- package/dist/components/editable/editable.vue.d.ts +85 -0
- package/dist/components/editable/index.d.ts +4 -0
- package/dist/components/editable/index.js +1 -0
- package/dist/components/editable/types.d.ts +20 -0
- package/dist/components/editable/variants.js +1 -0
- package/dist/components/empty/empty.js +1 -0
- package/dist/components/empty/empty.vue.d.ts +21 -0
- package/dist/components/empty/index.d.ts +5 -0
- package/dist/components/empty/index.js +1 -0
- package/dist/components/empty/types.d.ts +20 -0
- package/dist/components/empty/variants.d.ts +57 -0
- package/dist/components/empty/variants.js +1 -0
- package/dist/components/form/form-field-base.vue.d.ts +3 -3
- package/dist/components/form/form.vue.d.ts +2 -2
- package/dist/components/form/use-form.d.ts +22 -22
- package/dist/components/form/variants.js +1 -1
- package/dist/components/hover-card/hover-card.js +1 -0
- package/dist/components/hover-card/hover-card.vue.d.ts +35 -0
- package/dist/components/hover-card/index.d.ts +4 -0
- package/dist/components/hover-card/index.js +1 -0
- package/dist/components/hover-card/types.d.ts +22 -0
- package/dist/components/hover-card/variants.js +1 -0
- package/dist/components/icon/icon.vue.d.ts +2 -2
- package/dist/components/icon/types.d.ts +3 -4
- package/dist/components/input/input.vue.d.ts +4 -4
- package/dist/components/input-number/input-number.vue.d.ts +4 -4
- package/dist/components/kbd/kbd.vue.d.ts +3 -3
- package/dist/components/kbd/variants.d.ts +3 -3
- package/dist/components/label/label.vue.d.ts +2 -2
- package/dist/components/layout/layout-trigger.vue.d.ts +2 -2
- package/dist/components/layout/layout.vue.d.ts +4 -4
- package/dist/components/link/link.vue.d.ts +4 -4
- package/dist/components/list/list-item.vue.d.ts +2 -2
- package/dist/components/list/list.vue.d.ts +2 -2
- package/dist/components/menu/context.js +1 -1
- package/dist/components/menu/index.d.ts +2 -7
- package/dist/components/menu/index.js +1 -1
- package/dist/components/menu/types.d.ts +9 -86
- package/dist/components/menu/variants.js +1 -1
- package/dist/components/menubar/index.d.ts +2 -0
- package/dist/components/menubar/index.js +1 -0
- package/dist/components/menubar/menubar.js +1 -0
- package/dist/components/menubar/menubar.vue.d.ts +32 -0
- package/dist/components/menubar/types.d.ts +17 -0
- package/dist/components/menubar/variants.js +1 -0
- package/dist/components/navigation-menu/navigation-menu.vue.d.ts +13 -13
- package/dist/components/page-tabs/page-tabs.vue.d.ts +4 -4
- package/dist/components/page-tabs/types.d.ts +1 -1
- package/dist/components/page-tabs/variants.d.ts +3 -3
- package/dist/components/pagination/pagination.js +1 -1
- package/dist/components/pagination/pagination.vue.d.ts +4 -4
- package/dist/components/pagination/variants.d.ts +3 -3
- package/dist/components/password/password.vue.d.ts +4 -4
- package/dist/components/popconfirm/popconfirm-cancel.js +1 -1
- package/dist/components/popconfirm/popconfirm-cancel.vue.d.ts +4 -4
- package/dist/components/popconfirm/popconfirm-confirm.js +1 -1
- package/dist/components/popconfirm/popconfirm-confirm.vue.d.ts +4 -4
- package/dist/components/popconfirm/popconfirm.vue.d.ts +14 -14
- package/dist/components/popover/popover.js +1 -1
- package/dist/components/popover/popover.vue.d.ts +11 -11
- package/dist/components/progress/context.d.ts +5 -0
- package/dist/components/progress/context.js +1 -0
- package/dist/components/progress/index.d.ts +8 -0
- package/dist/components/progress/index.js +1 -0
- package/dist/components/progress/loading-bar.js +1 -0
- package/dist/components/progress/loading-bar.vue.d.ts +25 -0
- package/dist/components/progress/progress-circle.js +1 -0
- package/dist/components/progress/progress-circle.vue.d.ts +29 -0
- package/dist/components/progress/progress.js +1 -0
- package/dist/components/progress/progress.vue.d.ts +30 -0
- package/dist/components/progress/shared.d.ts +7 -0
- package/dist/components/progress/shared.js +1 -0
- package/dist/components/progress/types.d.ts +43 -0
- package/dist/components/progress/variants.js +1 -0
- package/dist/components/radio-group/radio-card-group.vue.d.ts +3 -3
- package/dist/components/radio-group/radio-card.vue.d.ts +2 -2
- package/dist/components/radio-group/radio-group.vue.d.ts +3 -3
- package/dist/components/radio-group/radio.vue.d.ts +2 -2
- package/dist/components/radio-group/variants.d.ts +3 -3
- package/dist/components/scroll-area/index.d.ts +4 -0
- package/dist/components/scroll-area/index.js +1 -0
- package/dist/components/scroll-area/scroll-area.js +1 -0
- package/dist/components/scroll-area/scroll-area.vue.d.ts +18 -0
- package/dist/components/scroll-area/types.d.ts +15 -0
- package/dist/components/scroll-area/variants.js +1 -0
- package/dist/components/segment/segment.vue.d.ts +3 -3
- package/dist/components/select/select.vue.d.ts +8 -8
- package/dist/components/separator/separator.vue.d.ts +5 -5
- package/dist/components/separator/variants.d.ts +3 -3
- package/dist/components/skeleton/index.d.ts +3 -0
- package/dist/components/skeleton/index.js +1 -0
- package/dist/components/skeleton/skeleton.js +1 -0
- package/dist/components/skeleton/skeleton.vue.d.ts +20 -0
- package/dist/components/skeleton/types.d.ts +16 -0
- package/dist/components/skeleton/variants.d.ts +60 -0
- package/dist/components/skeleton/variants.js +1 -0
- package/dist/components/slider/index.d.ts +4 -0
- package/dist/components/slider/index.js +1 -0
- package/dist/components/slider/slider.js +1 -0
- package/dist/components/slider/slider.vue.d.ts +28 -0
- package/dist/components/slider/types.d.ts +16 -0
- package/dist/components/slider/variants.js +1 -0
- package/dist/components/spinner/index.d.ts +2 -0
- package/dist/components/spinner/index.js +1 -0
- package/dist/components/spinner/spinner.js +1 -0
- package/dist/components/spinner/spinner.vue.d.ts +10 -0
- package/dist/components/spinner/types.d.ts +19 -0
- package/dist/components/spinner/variants.js +1 -0
- package/dist/components/splitter/index.d.ts +5 -0
- package/dist/components/splitter/index.js +1 -0
- package/dist/components/splitter/splitter-group.js +1 -0
- package/dist/components/splitter/splitter-group.vue.d.ts +22 -0
- package/dist/components/splitter/splitter-panel.js +1 -0
- package/dist/components/splitter/splitter-panel.vue.d.ts +32 -0
- package/dist/components/splitter/splitter-resize-handle.js +1 -0
- package/dist/components/splitter/splitter-resize-handle.vue.d.ts +415 -0
- package/dist/components/splitter/types.d.ts +12 -0
- package/dist/components/splitter/variants.js +1 -0
- package/dist/components/stepper/index.d.ts +4 -0
- package/dist/components/stepper/index.js +1 -0
- package/dist/components/stepper/stepper.js +1 -0
- package/dist/components/stepper/stepper.vue.d.ts +121 -0
- package/dist/components/stepper/types.d.ts +26 -0
- package/dist/components/stepper/variants.js +1 -0
- package/dist/components/switch/switch.vue.d.ts +22 -22
- package/dist/components/switch/variants.d.ts +3 -3
- package/dist/components/table/hooks.d.ts +19 -19
- package/dist/components/table/hooks.js +1 -1
- package/dist/components/table/index.d.ts +1 -1
- package/dist/components/table/table-filter-popover.js +1 -0
- package/dist/components/table/table-radio.js +1 -1
- package/dist/components/table/table.js +1 -1
- package/dist/components/table/table.vue.d.ts +10 -6
- package/dist/components/table/types.d.ts +25 -83
- package/dist/components/table/variants.js +1 -1
- package/dist/components/tabs/tabs.vue.d.ts +3 -3
- package/dist/components/tabs/variants.d.ts +3 -3
- package/dist/components/tag/tag.vue.d.ts +4 -4
- package/dist/components/tag/variants.d.ts +3 -3
- package/dist/components/tags-input/index.d.ts +5 -0
- package/dist/components/tags-input/index.js +1 -0
- package/dist/components/tags-input/tags-input-item-delete.js +1 -0
- package/dist/components/tags-input/tags-input-item-delete.vue.d.ts +18 -0
- package/dist/components/tags-input/tags-input.js +1 -0
- package/dist/components/tags-input/tags-input.vue.d.ts +29 -0
- package/dist/components/tags-input/types.d.ts +12 -0
- package/dist/components/tags-input/variants.js +1 -0
- package/dist/components/textarea/textarea.vue.d.ts +4 -4
- package/dist/components/textarea/variants.d.ts +3 -3
- package/dist/components/toast/index.d.ts +4 -5
- package/dist/components/toast/index.js +1 -1
- package/dist/components/toast/styles.js +274 -0
- package/dist/components/toast/toaster.js +1 -0
- package/dist/components/toast/toaster.vue.d.ts +22 -0
- package/dist/components/toast/types.d.ts +5 -55
- package/dist/components/toast/variants.js +1 -1
- package/dist/components/toggle/index.d.ts +3 -0
- package/dist/components/toggle/index.js +1 -0
- package/dist/components/toggle/toggle.js +1 -0
- package/dist/components/toggle/toggle.vue.d.ts +30 -0
- package/dist/components/toggle/types.d.ts +14 -0
- package/dist/components/toggle/variants.d.ts +100 -0
- package/dist/components/toggle/variants.js +1 -0
- package/dist/components/toggle-group/index.d.ts +6 -0
- package/dist/components/toggle-group/index.js +1 -0
- package/dist/components/toggle-group/toggle-group-item.js +1 -0
- package/dist/components/toggle-group/toggle-group-item.vue.d.ts +22 -0
- package/dist/components/toggle-group/toggle-group.js +1 -0
- package/dist/components/toggle-group/toggle-group.vue.d.ts +24 -0
- package/dist/components/toggle-group/types.d.ts +15 -0
- package/dist/components/toggle-group/variants.d.ts +216 -0
- package/dist/components/toggle-group/variants.js +1 -0
- package/dist/components/toolbar/index.d.ts +4 -0
- package/dist/components/toolbar/index.js +1 -0
- package/dist/components/toolbar/toolbar.js +1 -0
- package/dist/components/toolbar/toolbar.vue.d.ts +18 -0
- package/dist/components/toolbar/types.d.ts +9 -0
- package/dist/components/toolbar/variants.js +1 -0
- package/dist/components/tooltip/tooltip.vue.d.ts +7 -7
- package/dist/components/tree/tree-virtualizer.vue.d.ts +7 -7
- package/dist/components/tree/tree.vue.d.ts +5 -5
- package/dist/components/tree-menu/tree-menu-option-slot.js +1 -1
- package/dist/components/tree-menu/tree-menu-styled-item.vue.d.ts +2 -2
- package/dist/components/tree-menu/tree-menu.vue.d.ts +3 -3
- package/dist/components/tree-menu/types.d.ts +1 -1
- package/dist/components/tree-menu/variants.js +1 -1
- package/dist/components/virtualizer/virtualizer.vue.d.ts +5 -5
- package/dist/constants/components.d.ts +27 -0
- package/dist/constants/components.js +1 -1
- package/dist/index.d.ts +179 -94
- package/dist/index.js +1 -1
- package/dist/nuxt/index.d.ts +2 -2
- package/dist/resolver/index.d.ts +2 -2
- package/dist/styles.css +600 -111
- package/dist/theme/config.js +1 -1
- package/package.json +21 -18
- package/dist/components/menu/menu-checkbox-options.js +0 -1
- package/dist/components/menu/menu-checkbox-options.vue.d.ts +0 -28
- package/dist/components/menu/menu-item-slot.js +0 -1
- package/dist/components/menu/menu-option.js +0 -1
- package/dist/components/menu/menu-option.vue.d.ts +0 -48
- package/dist/components/menu/menu-options.js +0 -1
- package/dist/components/menu/menu-options.vue.d.ts +0 -48
- package/dist/components/menu/menu-radio-options.js +0 -1
- package/dist/components/menu/menu-radio-options.vue.d.ts +0 -28
- package/dist/components/menu/shared.js +0 -1
- package/dist/components/table/shared.js +0 -1
- package/dist/components/toast/context.d.ts +0 -5
- package/dist/components/toast/context.js +0 -1
- package/dist/components/toast/shared.js +0 -1
- package/dist/components/toast/toast-provider.js +0 -1
- package/dist/components/toast/toast.js +0 -1
- package/dist/components/toast/toast.vue.d.ts +0 -21
- package/dist/components/toast/variants.d.ts +0 -60
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ThemeSize } from "../../theme/types.js";
|
|
2
|
+
import { ClassValue, TagsInputRootEmits, TagsInputRootProps, TagsInputUi } from "@soybeanjs/headless";
|
|
3
|
+
|
|
4
|
+
//#region src/components/tags-input/types.d.ts
|
|
5
|
+
interface TagsInputProps<T = string> extends TagsInputRootProps<T> {
|
|
6
|
+
class?: ClassValue;
|
|
7
|
+
size?: ThemeSize;
|
|
8
|
+
ui?: Partial<TagsInputUi>;
|
|
9
|
+
}
|
|
10
|
+
type TagsInputEmits<T = string> = TagsInputRootEmits<T>;
|
|
11
|
+
//#endregion
|
|
12
|
+
export { TagsInputEmits, TagsInputProps };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{root:[`flex w-full flex-wrap items-center rounded-md border border-input bg-background shadow-xs transition-[color,box-shadow]`,`focus-within:border-ring focus-within:ring-3 focus-within:ring-ring/50`,`data-[invalid]:border-destructive data-[invalid]:ring-3 data-[invalid]:ring-destructive/20`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],item:[`inline-flex items-center rounded-md bg-secondary ring-offset-background transition-[box-shadow,background-color]`,`data-[state=active]:ring-2 data-[state=active]:ring-ring data-[state=active]:ring-offset-2`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`],itemText:`rounded bg-transparent`,itemDelete:[`inline-flex items-center justify-center rounded bg-transparent text-muted-foreground transition-colors`,`hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`],input:[`min-w-24 flex-1 bg-transparent text-foreground outline-none`,`placeholder:text-muted-foreground disabled:cursor-not-allowed`],clear:[`inline-flex items-center justify-center rounded-md text-muted-foreground transition-colors`,`hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`]},variants:{size:{xs:{root:`gap-1 px-1.5 py-1 text-2xs`,item:`min-h-5 gap-0.5`,itemText:`px-1.5 py-0.5 text-2xs`,itemDelete:`me-0.5 size-4`,input:`min-h-5 px-1 text-2xs`,clear:`size-4 text-xs`},sm:{root:`gap-1.5 px-2 py-1 text-xs`,item:`min-h-5 gap-0.75`,itemText:`px-1.5 py-0.5 text-xs`,itemDelete:`me-0.5 size-4`,input:`min-h-5 px-1 text-xs`,clear:`size-4 text-xs`},md:{root:`gap-2 px-2 py-1 text-sm`,item:`min-h-5 gap-1`,itemText:`px-2 py-0.5 text-sm`,itemDelete:`me-1 size-4`,input:`min-h-5 px-1 text-sm`,clear:`size-4 text-sm`},lg:{root:`gap-2 px-2.5 py-1.5 text-base`,item:`min-h-6 gap-1`,itemText:`px-2 py-0.5 text-base`,itemDelete:`me-1 size-4.5`,input:`min-h-6 px-1 text-base`,clear:`size-4.5 text-base`},xl:{root:`gap-2.5 px-3 py-2 text-lg`,item:`min-h-7 gap-1.5`,itemText:`px-2.5 py-1 text-lg`,itemDelete:`me-1 size-5`,input:`min-h-7 px-1.5 text-lg`,clear:`size-5 text-lg`},"2xl":{root:`gap-3 px-3.5 py-2.5 text-xl`,item:`min-h-8 gap-1.5`,itemText:`px-3 py-1 text-xl`,itemDelete:`me-1.5 size-5.5`,input:`min-h-8 px-1.5 text-xl`,clear:`size-5.5 text-xl`}}},defaultVariants:{size:`md`}});export{t as tagsInputVariants};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TextareaProps } from "./types.js";
|
|
2
|
-
import * as vue from "vue";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
3
|
|
|
4
4
|
//#region src/components/textarea/textarea.vue.d.ts
|
|
5
5
|
declare var __VLS_28: {
|
|
@@ -11,11 +11,11 @@ type __VLS_Slots = {} & {
|
|
|
11
11
|
} & {
|
|
12
12
|
footer?: (props: typeof __VLS_30) => any;
|
|
13
13
|
};
|
|
14
|
-
declare const __VLS_base: vue.DefineComponent<TextareaProps, {}, {}, {}, {}, vue.ComponentOptionsMixin, vue.ComponentOptionsMixin, {
|
|
14
|
+
declare const __VLS_base: _$vue.DefineComponent<TextareaProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
15
15
|
"update:modelValue": (value: string) => any;
|
|
16
|
-
}, string, vue.PublicProps, Readonly<TextareaProps> & Readonly<{
|
|
16
|
+
}, string, _$vue.PublicProps, Readonly<TextareaProps> & Readonly<{
|
|
17
17
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
18
|
-
}>, {}, {}, {}, {}, string, vue.ComponentProvideOptions, false, {}, any>;
|
|
18
|
+
}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
19
19
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
20
20
|
declare const _default: typeof __VLS_export;
|
|
21
21
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import * as tailwind_variants0 from "tailwind-variants";
|
|
1
|
+
import * as _$tailwind_variants0 from "tailwind-variants";
|
|
2
2
|
import { VariantProps } from "tailwind-variants";
|
|
3
3
|
|
|
4
4
|
//#region src/components/textarea/variants.d.ts
|
|
5
|
-
declare const textareaVariants: tailwind_variants0.TVReturnType<{
|
|
5
|
+
declare const textareaVariants: _$tailwind_variants0.TVReturnType<{
|
|
6
6
|
size: {
|
|
7
7
|
xs: {
|
|
8
8
|
root: string;
|
|
@@ -118,7 +118,7 @@ declare const textareaVariants: tailwind_variants0.TVReturnType<{
|
|
|
118
118
|
control: string[];
|
|
119
119
|
counter: string;
|
|
120
120
|
clearable: string;
|
|
121
|
-
}, tailwind_variants0.TVReturnType<{
|
|
121
|
+
}, _$tailwind_variants0.TVReturnType<{
|
|
122
122
|
size: {
|
|
123
123
|
xs: {
|
|
124
124
|
root: string;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { _default } from "./
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export { SToastAction, SToastClose };
|
|
1
|
+
import { SwipeDirection, ToastPosition, ToastType, ToasterProps } from "./types.js";
|
|
2
|
+
import { _default } from "./toaster.vue.js";
|
|
3
|
+
import { toast } from "@soybeanjs/headless/toast";
|
|
4
|
+
export { toast };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./
|
|
1
|
+
import"./toaster.js";import{toast as e}from"@soybeanjs/headless/toast";export{e as toast};
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
var e=`[data-slot='toast'] {
|
|
2
|
+
--y: translateY(100%);
|
|
3
|
+
--lift: 1;
|
|
4
|
+
--lift-amount: calc(var(--lift) * var(--gap));
|
|
5
|
+
z-index: var(--z-index);
|
|
6
|
+
transform: var(--y);
|
|
7
|
+
overflow-wrap: anywhere;
|
|
8
|
+
|
|
9
|
+
transition:
|
|
10
|
+
transform 400ms,
|
|
11
|
+
opacity 400ms,
|
|
12
|
+
height 400ms,
|
|
13
|
+
box-shadow 200ms;
|
|
14
|
+
|
|
15
|
+
box-shadow: 0 4px 12px hsl(var(--foreground) / 0.1);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
[data-slot='toast']:focus-visible {
|
|
19
|
+
box-shadow:
|
|
20
|
+
0 4px 12px hsl(var(--foreground) / 0.1),
|
|
21
|
+
0 0 0 2px hsl(var(--foreground) / 0.2);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
[data-slot='toast'][data-swiping='true'] {
|
|
25
|
+
transform: var(--y) translateY(var(--swipe-amount-y, 0px)) translateX(var(--swipe-amount-x, 0px));
|
|
26
|
+
transition: none;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
[data-slot='toast'][data-swiping='true']::before {
|
|
30
|
+
content: '';
|
|
31
|
+
position: absolute;
|
|
32
|
+
inset-inline: -100%;
|
|
33
|
+
height: 100%;
|
|
34
|
+
z-index: -1;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
[data-slot='toast'][data-y-position='top'][data-swiping='true']::before {
|
|
38
|
+
bottom: 50%;
|
|
39
|
+
transform: scaleY(3) translateY(50%);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
[data-slot='toast'][data-y-position='bottom'][data-swiping='true']::before {
|
|
43
|
+
top: 50%;
|
|
44
|
+
transform: scaleY(3) translateY(-50%);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
[data-slot='toast'][data-swiping='false'][data-removed='true']::before {
|
|
48
|
+
content: '';
|
|
49
|
+
position: absolute;
|
|
50
|
+
inset: 0;
|
|
51
|
+
transform: scaleY(2);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
[data-slot='toast'][data-expanded='true']::after {
|
|
55
|
+
content: '';
|
|
56
|
+
position: absolute;
|
|
57
|
+
inset-inline-start: 0;
|
|
58
|
+
height: calc(var(--gap) + 1px);
|
|
59
|
+
bottom: 100%;
|
|
60
|
+
width: 100%;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
[data-slot='toast'][data-mounted='true'] {
|
|
64
|
+
--y: translateY(0);
|
|
65
|
+
opacity: 1;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
[data-slot='toast'][data-expanded='false'][data-front='false'] {
|
|
69
|
+
--scale: var(--toasts-before) * 0.05 + 1;
|
|
70
|
+
--y: translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));
|
|
71
|
+
height: var(--front-toast-height);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
[data-slot='toast'][data-expanded='false'][data-front='false'] > * {
|
|
75
|
+
opacity: 0;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
[data-slot='toast'][data-visible='false'] {
|
|
79
|
+
opacity: 0;
|
|
80
|
+
pointer-events: none;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
[data-slot='toast'][data-mounted='true'][data-expanded='true'] {
|
|
84
|
+
--y: translateY(calc(var(--lift) * var(--offset)));
|
|
85
|
+
height: var(--initial-height);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
[data-slot='toast'][data-removed='true'][data-front='true'][data-swipe-out='false'] {
|
|
89
|
+
--y: translateY(calc(var(--lift) * -100%));
|
|
90
|
+
opacity: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
[data-slot='toast'][data-removed='true'][data-front='false'][data-swipe-out='false'][data-expanded='true'] {
|
|
94
|
+
--y: translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));
|
|
95
|
+
opacity: 0;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
[data-slot='toast'][data-removed='true'][data-front='false'][data-swipe-out='false'][data-expanded='false'] {
|
|
99
|
+
--y: translateY(40%);
|
|
100
|
+
opacity: 0;
|
|
101
|
+
transition:
|
|
102
|
+
transform 500ms,
|
|
103
|
+
opacity 200ms;
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
[data-slot='toast'][data-removed='true'][data-front='false']::before {
|
|
107
|
+
height: calc(var(--initial-height) + 20%);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
[data-slot='toast'][data-swiped='true'] {
|
|
111
|
+
-webkit-user-select: none;
|
|
112
|
+
user-select: none;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
[data-slot='toast'][data-swipe-out='true'][data-y-position='bottom'],
|
|
116
|
+
[data-slot='toast'][data-swipe-out='true'][data-y-position='top'] {
|
|
117
|
+
animation-duration: 200ms;
|
|
118
|
+
animation-timing-function: ease-out;
|
|
119
|
+
animation-fill-mode: forwards;
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
[data-slot='toast'][data-swipe-out='true'][data-swipe-direction='left'] {
|
|
123
|
+
animation-name: swipe-out-left;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
[data-slot='toast'][data-swipe-out='true'][data-swipe-direction='right'] {
|
|
127
|
+
animation-name: swipe-out-right;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
[data-slot='toast'][data-swipe-out='true'][data-swipe-direction='up'] {
|
|
131
|
+
animation-name: swipe-out-up;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
[data-slot='toast'][data-swipe-out='true'][data-swipe-direction='down'] {
|
|
135
|
+
animation-name: swipe-out-down;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
[data-slot='toast'][data-rich-color='true'][data-type='success'] {
|
|
139
|
+
background-color: hsl(var(--success-100));
|
|
140
|
+
border-color: hsl(var(--success));
|
|
141
|
+
color: hsl(var(--success-foreground));
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
[data-slot='toast'][data-rich-color='true'][data-type='info'] {
|
|
145
|
+
background-color: hsl(var(--info-100));
|
|
146
|
+
border-color: hsl(var(--info));
|
|
147
|
+
color: hsl(var(--info-foreground));
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
[data-slot='toast'][data-rich-color='true'][data-type='warning'] {
|
|
151
|
+
background-color: hsl(var(--warning-100));
|
|
152
|
+
border-color: hsl(var(--warning));
|
|
153
|
+
color: hsl(var(--warning-foreground));
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
[data-slot='toast'][data-rich-color='true'][data-type='error'] {
|
|
157
|
+
background-color: hsl(var(--destructive-100));
|
|
158
|
+
border-color: hsl(var(--destructive));
|
|
159
|
+
color: hsl(var(--destructive-foreground));
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
[data-slot='toast'][data-inverted='true'] {
|
|
163
|
+
background-color: hsl(var(--carbon));
|
|
164
|
+
border-color: hsl(var(--carbon));
|
|
165
|
+
color: hsl(var(--carbon-foreground));
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
[data-slot='toast'] > * {
|
|
169
|
+
transition: opacity 400ms;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
@keyframes swipe-out-left {
|
|
173
|
+
from {
|
|
174
|
+
transform: var(--y) translateX(var(--swipe-amount-x));
|
|
175
|
+
opacity: 1;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
to {
|
|
179
|
+
transform: var(--y) translateX(calc(var(--swipe-amount-x) - 100%));
|
|
180
|
+
opacity: 0;
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
@keyframes swipe-out-right {
|
|
185
|
+
from {
|
|
186
|
+
transform: var(--y) translateX(var(--swipe-amount-x));
|
|
187
|
+
opacity: 1;
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
to {
|
|
191
|
+
transform: var(--y) translateX(calc(var(--swipe-amount-x) + 100%));
|
|
192
|
+
opacity: 0;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@keyframes swipe-out-up {
|
|
197
|
+
from {
|
|
198
|
+
transform: var(--y) translateY(var(--swipe-amount-y));
|
|
199
|
+
opacity: 1;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
to {
|
|
203
|
+
transform: var(--y) translateY(calc(var(--swipe-amount-y) - 100%));
|
|
204
|
+
opacity: 0;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@keyframes swipe-out-down {
|
|
209
|
+
from {
|
|
210
|
+
transform: var(--y) translateY(var(--swipe-amount-y));
|
|
211
|
+
opacity: 1;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
to {
|
|
215
|
+
transform: var(--y) translateY(calc(var(--swipe-amount-y) + 100%));
|
|
216
|
+
opacity: 0;
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
@keyframes sonner-fade-in {
|
|
221
|
+
0% {
|
|
222
|
+
opacity: 0;
|
|
223
|
+
transform: scale(0.8);
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
100% {
|
|
227
|
+
opacity: 1;
|
|
228
|
+
transform: scale(1);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
@keyframes sonner-fade-out {
|
|
233
|
+
0% {
|
|
234
|
+
opacity: 1;
|
|
235
|
+
transform: scale(1);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
100% {
|
|
239
|
+
opacity: 0;
|
|
240
|
+
transform: scale(0.8);
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
@media (max-width: 600px) {
|
|
245
|
+
[data-slot='toaster'] {
|
|
246
|
+
width: 100%;
|
|
247
|
+
inset-inline-start: var(--mobile-offset-left);
|
|
248
|
+
inset-inline-end: var(--mobile-offset-right);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
[data-slot='toaster'] [data-slot='toast'] {
|
|
252
|
+
inset-inline: 0;
|
|
253
|
+
width: calc(100% - var(--mobile-offset-left) * 2);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
[data-slot='toaster'][data-x-position='left'] {
|
|
257
|
+
inset-inline-start: var(--mobile-offset-left);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
[data-slot='toaster'][data-y-position='bottom'] {
|
|
261
|
+
bottom: var(--mobile-offset-bottom);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
[data-slot='toaster'][data-y-position='top'] {
|
|
265
|
+
top: var(--mobile-offset-top);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
[data-slot='toaster'][data-x-position='center'] {
|
|
269
|
+
inset-inline-start: var(--mobile-offset-left);
|
|
270
|
+
inset-inline-end: var(--mobile-offset-right);
|
|
271
|
+
transform: none;
|
|
272
|
+
}
|
|
273
|
+
}
|
|
274
|
+
`;export{e as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import{miniSizeMap as t}from"../../theme/config.js";import"../../theme/index.js";import n from"../button/button.js";import{toastVariants as r}from"./variants.js";import i from"./styles.js";import a from"../icon/icon.js";import{computed as o,createBlock as s,createTextVNode as c,createVNode as l,defineComponent as u,h as d,mergeProps as f,openBlock as p,renderSlot as m,toDisplayString as h,unref as g,withCtx as _}from"vue";import{useOmitProps as v}from"@soybeanjs/headless/composables";import{Primitive as y,Toaster as b,provideToastUi as x}from"@soybeanjs/headless";const S=u({name:`SToaster`,__name:`toaster`,props:{size:{},ui:{},id:{},dir:{},hotkey:{},customAriaLabel:{},containerAriaLabel:{},position:{},defaultExpanded:{type:Boolean},duration:{},gap:{},offset:{},visibleCounts:{},swipeDirections:{},showIcon:{type:Boolean,default:!0},showClose:{type:Boolean,default:!0},icons:{},iconRender:{type:Function,default:e=>d(a,{icon:e})},buttonRender:{},toastProps:{},wrapperProps:{},contentProps:{},titleProps:{},descriptionProps:{},iconProps:{},footerProps:{},actionProps:{},cancelProps:{},closeProps:{}},setup(a){let u=a,S=v(u,[`size`,`ui`,`icons`,`buttonRender`]),C=o(()=>e(r({size:u.size}),u.ui)),w={info:`lucide:info`,success:`lucide:circle-check`,warning:`lucide:circle-alert`,error:`lucide:circle-x`,close:`lucide:x`,loading:`svg-spinners:270-ring`},T=o(()=>({...w,...u.icons})),E=(e,r)=>u.buttonRender?u.buttonRender(e,r):d(n,{size:t[u.size??`md`],variant:r===`action`?`solid`:`pure`,color:`primary`},{default:()=>e});return x(C),(e,t)=>(p(),s(g(b),f(g(S),{icons:T.value,"button-render":E}),{default:_(()=>[m(e.$slots,`default`),l(g(y),{id:`__SoybeanUI_toastStyle`,as:`style`},{default:_(()=>[c(h(g(i)),1)]),_:1})]),_:3},16,[`icons`]))}});export{S as default};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ToasterProps } from "./types.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
|
|
4
|
+
//#region src/components/toast/toaster.vue.d.ts
|
|
5
|
+
declare var __VLS_8: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_8) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: _$vue.DefineComponent<ToasterProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {}, string, _$vue.PublicProps, Readonly<ToasterProps> & Readonly<{}>, {
|
|
10
|
+
iconRender: (name: string) => _$vue.VNode;
|
|
11
|
+
showIcon: boolean;
|
|
12
|
+
showClose: boolean;
|
|
13
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
14
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
15
|
+
declare const _default: typeof __VLS_export;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
|
21
|
+
//#endregion
|
|
22
|
+
export { _default };
|
|
@@ -1,60 +1,10 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { ToastPosition } from "
|
|
3
|
-
import { VNode } from "vue";
|
|
4
|
-
import { ClassValue, PropsToContext, ToastDescriptionProps, ToastProviderProps, ToastRootProps, ToastTitleProps, ToastUi, ToastViewportProps } from "@soybeanjs/headless";
|
|
1
|
+
import { ThemeSize } from "../../theme/types.js";
|
|
2
|
+
import { SwipeDirection, ToastPosition, ToastType, ToastUi, ToasterProps } from "@soybeanjs/headless";
|
|
5
3
|
|
|
6
4
|
//#region src/components/toast/types.d.ts
|
|
7
|
-
|
|
8
|
-
type ToastExtendedTheme = ToastUi & Record<ToastExtraSlot, ClassValue>;
|
|
9
|
-
interface ToastProviderProps$1 extends ToastProviderProps {
|
|
10
|
-
ui?: Partial<ToastExtendedTheme>;
|
|
11
|
-
/**
|
|
12
|
-
* The maximum number of toasts that can be displayed at the same time.
|
|
13
|
-
*
|
|
14
|
-
* @defaultValue 3
|
|
15
|
-
*/
|
|
16
|
-
limits?: number;
|
|
17
|
-
/**
|
|
18
|
-
* The delay time before removing the toast.
|
|
19
|
-
*
|
|
20
|
-
* @defaultValue 5000 (ms)
|
|
21
|
-
*/
|
|
22
|
-
removeDelay?: number;
|
|
23
|
-
/**
|
|
24
|
-
* The position of the toast.
|
|
25
|
-
*
|
|
26
|
-
* @defaultValue 'top-right'
|
|
27
|
-
*/
|
|
28
|
-
position?: ToastPosition;
|
|
29
|
-
viewportProps?: ToastViewportProps;
|
|
30
|
-
}
|
|
31
|
-
type ToastColor = 'default' | ThemeColor;
|
|
32
|
-
type ToastType = Extract<ThemeColor, 'destructive' | 'success' | 'warning' | 'info'>;
|
|
33
|
-
interface ToastProps extends ToastRootProps {
|
|
34
|
-
class?: ClassValue;
|
|
5
|
+
interface ToasterProps$1 extends ToasterProps {
|
|
35
6
|
size?: ThemeSize;
|
|
36
|
-
ui?:
|
|
37
|
-
type?: ToastType;
|
|
38
|
-
color?: ToastColor;
|
|
39
|
-
/**
|
|
40
|
-
* The position of the toast.
|
|
41
|
-
*
|
|
42
|
-
* @defaultValue 'top-right'
|
|
43
|
-
*/
|
|
44
|
-
position?: ToastPosition;
|
|
45
|
-
showIcon?: boolean;
|
|
46
|
-
titleProps?: ToastTitleProps;
|
|
47
|
-
descriptionProps?: ToastDescriptionProps;
|
|
48
|
-
}
|
|
49
|
-
interface UseToastOptions extends Pick<ToastProps, 'size' | 'ui' | 'type' | 'color' | 'showIcon' | 'duration' | 'forceMount' | 'liveType' | 'position'> {
|
|
50
|
-
title?: string | VNode;
|
|
51
|
-
description?: string | VNode;
|
|
52
|
-
content?: VNode;
|
|
53
|
-
onClose?: () => void;
|
|
54
|
-
}
|
|
55
|
-
interface UseToastReturn extends Record<ToastType, (options: Omit<UseToastOptions, 'type'>) => void> {
|
|
56
|
-
(options: UseToastOptions): void;
|
|
57
|
-
clear: () => void;
|
|
7
|
+
ui?: ToastUi;
|
|
58
8
|
}
|
|
59
9
|
//#endregion
|
|
60
|
-
export {
|
|
10
|
+
export { type SwipeDirection, type ToastPosition, type ToastType, ToasterProps$1 as ToasterProps };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tv as e}from"tailwind-variants";const t=e({slots:{
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{toaster:[`fixed z-[--z-index] list-none outline-none transition-transform-400 ease`,`data-[x-position=right]:end-[--offset-right] data-[x-position=left]:start-[--offset-left] data-[x-position=center]:left-1/2 data-[x-position=center]:-translate-x-1/2`,`data-[y-position=top]:top-[--offset-top] data-[y-position=bottom]:bottom-[--offset-bottom]`],toast:[`group absolute w-full rounded-md bg-popover text-popover-foreground border border-transparent opacity-0 outline-none touch-none`,`data-[y-position=top]:top-0 data-[y-position=top]:[--y:translateY(-100%)]`,`data-[y-position=bottom]:[--lift:-1] data-[y-position=bottom]:bottom-0`,`data-[x-position=left]:start-0 data-[x-position=right]:end-0`],wrapper:`flex flex-col items-stretch`,content:``,title:`flex items-center font-semibold`,description:`text-muted-foreground`,icon:[`group-data-[type=info]:text-info group-data-[type=success]:text-success group-data-[type=warning]:text-warning group-data-[type=error]:text-destructive`],footer:`flex justify-end items-center`,action:``,cancel:``,close:[`absolute w-fit rounded-md bg-transparent text-accent-foreground hover:bg-accent-foreground/10 active:bg-accent-foreground/20`,`focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-offset-background focus-visible:ring-accent-foreground/20`,`group-data-[inverted=true]:text-accent group-data-[inverted=true]:hover:bg-accent/15`]},variants:{size:{xs:{toaster:`w-80 text-2xs`,toast:`p-3`,wrapper:`gap-1`,title:`gap-1.25`,footer:`gap-1.25`,close:`top-1 end-1 p-0.75`},sm:{toaster:`w-85 text-xs`,toast:`p-3.5`,wrapper:`gap-1.25`,title:`gap-1.5`,footer:`gap-1.5`,close:`top-1.25 end-1.25 p-0.875`},md:{toaster:`w-90 text-sm`,toast:`p-4`,wrapper:`gap-1.5`,title:`gap-2`,footer:`gap-2`,close:`top-1.5 end-1.5 p-1`},lg:{toaster:`w-95 text-base`,toast:`p-4.5`,wrapper:`gap-1.75`,title:`gap-2.5`,footer:`gap-2.5`,close:`top-1.75 end-1.75 p-1.25`},xl:{toaster:`w-100 text-lg`,toast:`p-5`,wrapper:`gap-2`,title:`gap-3`,footer:`gap-3`,close:`top-2 end-2 p-1.5`},"2xl":{toaster:`w-110 text-xl`,toast:`p-6`,wrapper:`gap-2.5`,title:`gap-4`,footer:`gap-4`,close:`top-2.5 end-2.5 p-1.75`}}},defaultVariants:{size:`md`}});export{t as toastVariants};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./toggle.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{cn as e}from"../../theme/merge.js";import"../../theme/index.js";import{toggleVariants as t}from"./variants.js";import{computed as n,createBlock as r,defineComponent as i,guardReactiveProps as a,mergeProps as o,normalizeProps as s,openBlock as c,renderSlot as l,unref as u,withCtx as d}from"vue";import{useOmitProps as f}from"@soybeanjs/headless/composables";import{Toggle as p}from"@soybeanjs/headless";const m=i({name:`SToggle`,__name:`toggle`,props:{class:{},color:{},size:{},variant:{},shape:{},defaultValue:{type:Boolean},modelValue:{type:Boolean,default:void 0},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`],setup(i,{emit:m}){let h=i,g=m,_=f(h,[`class`,`color`,`variant`,`size`,`shape`]),v=n(()=>e(t({color:h.color,variant:h.variant,size:h.size,shape:h.shape}),h.class));return(e,t)=>(c(),r(u(p),o(u(_),{class:v.value,"onUpdate:modelValue":t[0]||=e=>g(`update:modelValue`,e)}),{default:d(t=>[l(e.$slots,`default`,s(a(t)))]),_:3},16,[`class`]))}});export{m as default};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ToggleProps as ToggleProps$1 } from "./types.js";
|
|
2
|
+
import * as _$vue from "vue";
|
|
3
|
+
import * as _$_soybeanjs_headless0 from "@soybeanjs/headless";
|
|
4
|
+
|
|
5
|
+
//#region src/components/toggle/toggle.vue.d.ts
|
|
6
|
+
declare var __VLS_10: {
|
|
7
|
+
modelValue: boolean;
|
|
8
|
+
pressed: boolean;
|
|
9
|
+
state: _$_soybeanjs_headless0.ToggleState;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
};
|
|
12
|
+
type __VLS_Slots = {} & {
|
|
13
|
+
default?: (props: typeof __VLS_10) => any;
|
|
14
|
+
};
|
|
15
|
+
declare const __VLS_base: _$vue.DefineComponent<ToggleProps$1, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
16
|
+
"update:modelValue": (value: boolean) => any;
|
|
17
|
+
}, string, _$vue.PublicProps, Readonly<ToggleProps$1> & Readonly<{
|
|
18
|
+
"onUpdate:modelValue"?: ((value: boolean) => any) | undefined;
|
|
19
|
+
}>, {
|
|
20
|
+
modelValue: boolean;
|
|
21
|
+
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
22
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
23
|
+
declare const _default: typeof __VLS_export;
|
|
24
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
25
|
+
new (): {
|
|
26
|
+
$slots: S;
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
//#endregion
|
|
30
|
+
export { _default };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ThemeColor, ThemeSize } from "../../theme/types.js";
|
|
2
|
+
import { ToggleShape, ToggleVariant } from "./variants.js";
|
|
3
|
+
import { ClassValue, ToggleEmits, ToggleProps } from "@soybeanjs/headless";
|
|
4
|
+
|
|
5
|
+
//#region src/components/toggle/types.d.ts
|
|
6
|
+
interface ToggleProps$1 extends ToggleProps {
|
|
7
|
+
class?: ClassValue;
|
|
8
|
+
color?: ThemeColor;
|
|
9
|
+
size?: ThemeSize;
|
|
10
|
+
variant?: ToggleVariant;
|
|
11
|
+
shape?: ToggleShape;
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { type ToggleEmits, ToggleProps$1 as ToggleProps };
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import * as _$tailwind_variants0 from "tailwind-variants";
|
|
2
|
+
import { VariantProps } from "tailwind-variants";
|
|
3
|
+
|
|
4
|
+
//#region src/components/toggle/variants.d.ts
|
|
5
|
+
declare const toggleVariants: _$tailwind_variants0.TVReturnType<{
|
|
6
|
+
color: {
|
|
7
|
+
primary: string;
|
|
8
|
+
destructive: string;
|
|
9
|
+
success: string;
|
|
10
|
+
warning: string;
|
|
11
|
+
info: string;
|
|
12
|
+
carbon: string;
|
|
13
|
+
secondary: string;
|
|
14
|
+
accent: string;
|
|
15
|
+
};
|
|
16
|
+
variant: {
|
|
17
|
+
outline: string;
|
|
18
|
+
soft: string;
|
|
19
|
+
ghost: string;
|
|
20
|
+
};
|
|
21
|
+
size: {
|
|
22
|
+
xs: string;
|
|
23
|
+
sm: string;
|
|
24
|
+
md: string;
|
|
25
|
+
lg: string;
|
|
26
|
+
xl: string;
|
|
27
|
+
'2xl': string;
|
|
28
|
+
};
|
|
29
|
+
shape: {
|
|
30
|
+
auto: string;
|
|
31
|
+
rounded: string;
|
|
32
|
+
square: string;
|
|
33
|
+
circle: string;
|
|
34
|
+
};
|
|
35
|
+
}, undefined, string[], {
|
|
36
|
+
color: {
|
|
37
|
+
primary: string;
|
|
38
|
+
destructive: string;
|
|
39
|
+
success: string;
|
|
40
|
+
warning: string;
|
|
41
|
+
info: string;
|
|
42
|
+
carbon: string;
|
|
43
|
+
secondary: string;
|
|
44
|
+
accent: string;
|
|
45
|
+
};
|
|
46
|
+
variant: {
|
|
47
|
+
outline: string;
|
|
48
|
+
soft: string;
|
|
49
|
+
ghost: string;
|
|
50
|
+
};
|
|
51
|
+
size: {
|
|
52
|
+
xs: string;
|
|
53
|
+
sm: string;
|
|
54
|
+
md: string;
|
|
55
|
+
lg: string;
|
|
56
|
+
xl: string;
|
|
57
|
+
'2xl': string;
|
|
58
|
+
};
|
|
59
|
+
shape: {
|
|
60
|
+
auto: string;
|
|
61
|
+
rounded: string;
|
|
62
|
+
square: string;
|
|
63
|
+
circle: string;
|
|
64
|
+
};
|
|
65
|
+
}, undefined, _$tailwind_variants0.TVReturnType<{
|
|
66
|
+
color: {
|
|
67
|
+
primary: string;
|
|
68
|
+
destructive: string;
|
|
69
|
+
success: string;
|
|
70
|
+
warning: string;
|
|
71
|
+
info: string;
|
|
72
|
+
carbon: string;
|
|
73
|
+
secondary: string;
|
|
74
|
+
accent: string;
|
|
75
|
+
};
|
|
76
|
+
variant: {
|
|
77
|
+
outline: string;
|
|
78
|
+
soft: string;
|
|
79
|
+
ghost: string;
|
|
80
|
+
};
|
|
81
|
+
size: {
|
|
82
|
+
xs: string;
|
|
83
|
+
sm: string;
|
|
84
|
+
md: string;
|
|
85
|
+
lg: string;
|
|
86
|
+
xl: string;
|
|
87
|
+
'2xl': string;
|
|
88
|
+
};
|
|
89
|
+
shape: {
|
|
90
|
+
auto: string;
|
|
91
|
+
rounded: string;
|
|
92
|
+
square: string;
|
|
93
|
+
circle: string;
|
|
94
|
+
};
|
|
95
|
+
}, undefined, string[], unknown, unknown, undefined>>;
|
|
96
|
+
type ToggleVariants = VariantProps<typeof toggleVariants>;
|
|
97
|
+
type ToggleVariant = NonNullable<ToggleVariants['variant']>;
|
|
98
|
+
type ToggleShape = NonNullable<ToggleVariants['shape']>;
|
|
99
|
+
//#endregion
|
|
100
|
+
export { ToggleShape, ToggleVariant };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({base:[`inline-flex items-center justify-center rounded-md whitespace-nowrap font-medium transition-all-150`,`focus-visible:outline-none focus-visible:ring-3 focus-visible:ring-offset-background`,`data-[disabled]:cursor-not-allowed data-[disabled]:opacity-50`,`[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*=size-])]:size-4`],variants:{color:{primary:`focus-visible:ring-primary/30`,destructive:`focus-visible:ring-destructive/30`,success:`focus-visible:ring-success/30`,warning:`focus-visible:ring-warning/30`,info:`focus-visible:ring-info/30`,carbon:`focus-visible:ring-carbon/30`,secondary:`focus-visible:ring-secondary-foreground/20`,accent:`focus-visible:ring-accent-foreground/20`},variant:{outline:`border border-border bg-background text-foreground hover:bg-accent data-[state=on]:bg-accent`,soft:`bg-accent data-[state=off]:hover:bg-accent`,ghost:`bg-transparent data-[state=off]:hover:bg-accent`},size:{xs:`gap-1 h-6 px-1.5 text-2xs`,sm:`gap-2 h-7 px-2 text-xs`,md:`gap-3 h-8 px-4 text-sm`,lg:`gap-4 h-9 px-6 text-base`,xl:`gap-5 h-10 px-8 text-lg`,"2xl":`gap-6 h-12 px-10 text-xl`},shape:{auto:`rounded-md`,rounded:`rounded-full`,square:`h-8 w-8 p-0 gap-0 rounded-md`,circle:`h-8 w-8 p-0 gap-0 rounded-full`}},compoundVariants:[{color:`primary`,variant:`soft`,class:`data-[state=on]:bg-primary/20 data-[state=on]:text-primary`},{color:`destructive`,variant:`soft`,class:`data-[state=on]:bg-destructive/20 data-[state=on]:text-destructive`},{color:`success`,variant:`soft`,class:`data-[state=on]:bg-success/20 data-[state=on]:text-success`},{color:`warning`,variant:`soft`,class:`data-[state=on]:bg-warning/20 data-[state=on]:text-warning`},{color:`info`,variant:`soft`,class:`data-[state=on]:bg-info/20 data-[state=on]:text-info`},{color:`carbon`,variant:`soft`,class:`data-[state=on]:bg-carbon/20 data-[state=on]:text-carbon`},{color:`secondary`,variant:`soft`,class:`data-[state=on]:bg-secondary-foreground/10 data-[state=on]:text-secondary-foreground`},{color:`accent`,variant:`soft`,class:`data-[state=on]:bg-accent-foreground/10 data-[state=on]:text-accent-foreground`},{color:`primary`,variant:`ghost`,class:`data-[state=on]:bg-primary/20 data-[state=on]:text-primary`},{color:`destructive`,variant:`ghost`,class:`data-[state=on]:bg-destructive/20 data-[state=on]:text-destructive`},{color:`success`,variant:`ghost`,class:`data-[state=on]:bg-success/20 data-[state=on]:text-success`},{color:`warning`,variant:`ghost`,class:`data-[state=on]:bg-warning/20 data-[state=on]:text-warning`},{color:`info`,variant:`ghost`,class:`data-[state=on]:bg-info/20 data-[state=on]:text-info`},{color:`carbon`,variant:`ghost`,class:`data-[state=on]:bg-carbon/20 data-[state=on]:text-carbon`},{color:`secondary`,variant:`ghost`,class:`data-[state=on]:bg-secondary-foreground/10 data-[state=on]:text-secondary-foreground`},{color:`accent`,variant:`ghost`,class:`data-[state=on]:bg-accent-foreground/10 data-[state=on]:text-accent-foreground`},{size:`xs`,shape:[`square`,`circle`],class:`w-6`},{size:`sm`,shape:[`square`,`circle`],class:`w-7`},{size:`md`,shape:[`square`,`circle`],class:`w-8`},{size:`lg`,shape:[`square`,`circle`],class:`w-9`},{size:`xl`,shape:[`square`,`circle`],class:`w-10`},{size:`2xl`,shape:[`square`,`circle`],class:`w-12`}],defaultVariants:{color:`accent`,variant:`ghost`,size:`md`,shape:`auto`}});export{t as toggleVariants};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ToggleGroupVariant } from "./variants.js";
|
|
2
|
+
import { ToggleGroupEmits, ToggleGroupProps } from "./types.js";
|
|
3
|
+
import { _default } from "./toggle-group.vue.js";
|
|
4
|
+
import { _default as _default$1 } from "./toggle-group-item.vue.js";
|
|
5
|
+
import { ToggleGroupItemProps as ToggleGroupItemProps$1, ToggleGroupRootEmits, ToggleGroupRootProps, ToggleGroupUi, ToggleGroupUiSlot } from "@soybeanjs/headless/toggle-group";
|
|
6
|
+
export { type ToggleGroupItemProps$1 as ToggleGroupItemProps, type ToggleGroupRootEmits, type ToggleGroupRootProps, type ToggleGroupUi, type ToggleGroupUiSlot };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import"./toggle-group.js";import"./toggle-group-item.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{createBlock as e,defineComponent as t,mergeProps as n,openBlock as r,renderSlot as i,unref as a,withCtx as o}from"vue";import{useOmitProps as s}from"@soybeanjs/headless/composables";import{ToggleGroupItem as c}from"@soybeanjs/headless";const l=t({name:`SToggleGroupItem`,__name:`toggle-group-item`,props:{value:{},disabled:{type:Boolean},type:{},asChild:{type:Boolean},as:{}},setup(t){let l=t,u=s(l,[`class`]);return(t,s)=>(r(),e(a(c),n(a(u),{class:l.class}),{default:o(()=>[i(t.$slots,`default`)]),_:3},16,[`class`]))}});export{l as default};
|