@soybeanjs/ui 0.17.0 → 0.18.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/README.md +27 -5
- package/README.zh-CN.md +27 -5
- package/dist/components/accordion/accordion.js +1 -1
- package/dist/components/accordion/types.d.ts +3 -3
- package/dist/components/affix/affix.js +1 -1
- package/dist/components/affix/types.d.ts +2 -2
- package/dist/components/alert/alert.js +1 -1
- package/dist/components/alert/types.d.ts +4 -4
- package/dist/components/anchor/anchor.js +1 -1
- package/dist/components/anchor/types.d.ts +3 -3
- package/dist/components/autocomplete/autocomplete.js +1 -1
- package/dist/components/autocomplete/types.d.ts +3 -3
- package/dist/components/avatar/avatar.js +1 -1
- package/dist/components/avatar/avatar.vue.d.ts +2 -8
- package/dist/components/avatar/types.d.ts +4 -24
- package/dist/components/backtop/backtop.js +1 -1
- package/dist/components/backtop/backtop.vue.d.ts +2 -2
- package/dist/components/backtop/types.d.ts +2 -2
- package/dist/components/backtop/variants.js +1 -1
- package/dist/components/badge/badge.js +1 -1
- package/dist/components/badge/badge.vue.d.ts +2 -6
- package/dist/components/badge/types.d.ts +4 -12
- package/dist/components/badge/variants.js +1 -1
- package/dist/components/bottom-sheet/bottom-sheet.js +1 -1
- package/dist/components/bottom-sheet/types.d.ts +3 -3
- package/dist/components/breadcrumb/breadcrumb.js +1 -1
- package/dist/components/breadcrumb/types.d.ts +3 -3
- package/dist/components/button/button-group.js +1 -1
- package/dist/components/button/button-icon.js +1 -1
- package/dist/components/button/button-link.js +1 -1
- package/dist/components/button/button-link.vue.d.ts +1 -1
- package/dist/components/button/button-loading.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/button/button.vue.d.ts +2 -2
- package/dist/components/button/types.d.ts +5 -5
- package/dist/components/calendar/calendar.js +1 -1
- package/dist/components/calendar/types.d.ts +3 -3
- package/dist/components/card/card.js +1 -1
- package/dist/components/card/types.d.ts +1 -1
- package/dist/components/carousel/carousel.js +1 -1
- package/dist/components/carousel/carousel.vue.d.ts +16 -19
- package/dist/components/carousel/index.d.ts +1 -5
- package/dist/components/carousel/index.js +1 -1
- package/dist/components/carousel/types.d.ts +22 -7
- package/dist/components/carousel/variants.js +1 -1
- package/dist/components/checkbox/checkbox-card-group.js +1 -1
- package/dist/components/checkbox/checkbox-card.js +1 -1
- package/dist/components/checkbox/checkbox-group.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/checkbox/types.d.ts +8 -8
- package/dist/components/clipboard/clipboard.js +1 -1
- package/dist/components/clipboard/clipboard.vue.d.ts +2 -2
- package/dist/components/clipboard/types.d.ts +1 -1
- package/dist/components/collapsible/types.d.ts +2 -2
- package/dist/components/color-area/color-area.js +1 -1
- package/dist/components/color-area/types.d.ts +4 -4
- package/dist/components/color-field/color-field.js +1 -1
- package/dist/components/color-field/types.d.ts +3 -3
- package/dist/components/color-picker/color-picker.js +1 -1
- package/dist/components/color-picker/types.d.ts +13 -13
- package/dist/components/color-slider/color-slider.js +1 -1
- package/dist/components/color-slider/types.d.ts +4 -4
- package/dist/components/color-swatch/color-swatch.js +1 -1
- package/dist/components/color-swatch/types.d.ts +2 -2
- package/dist/components/color-swatch-picker/color-swatch-picker.js +1 -1
- package/dist/components/color-swatch-picker/types.d.ts +6 -6
- package/dist/components/combobox/combobox.js +1 -1
- package/dist/components/combobox/types.d.ts +3 -3
- package/dist/components/command/command.js +1 -1
- package/dist/components/command/types.d.ts +3 -3
- package/dist/components/config-provider/config-provider.vue.d.ts +1 -1
- package/dist/components/config-provider/types.d.ts +1 -1
- package/dist/components/context-menu/context-menu-checkbox.js +1 -1
- package/dist/components/context-menu/context-menu-radio.js +1 -1
- package/dist/components/context-menu/context-menu-wrapper.js +1 -1
- package/dist/components/context-menu/context-menu.js +1 -1
- package/dist/components/context-menu/index.d.ts +4 -4
- package/dist/components/context-menu/index.js +1 -1
- package/dist/components/context-menu/types.d.ts +11 -11
- package/dist/components/date-field/date-field.js +1 -1
- package/dist/components/date-field/types.d.ts +2 -2
- package/dist/components/date-picker/date-picker.js +1 -1
- package/dist/components/date-picker/types.d.ts +3 -3
- package/dist/components/date-range-field/date-range-field.js +1 -1
- package/dist/components/date-range-field/types.d.ts +5 -5
- package/dist/components/date-range-picker/date-range-picker.js +1 -1
- package/dist/components/date-range-picker/types.d.ts +5 -5
- package/dist/components/dialog/dialog.js +1 -1
- package/dist/components/dialog/types.d.ts +3 -3
- package/dist/components/drawer/drawer.js +1 -1
- package/dist/components/drawer/types.d.ts +3 -3
- package/dist/components/dropdown-menu/dropdown-menu-checkbox.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-radio.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu-wrapper.js +1 -1
- package/dist/components/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/components/dropdown-menu/types.d.ts +11 -11
- package/dist/components/editable/editable.js +1 -1
- package/dist/components/editable/types.d.ts +9 -9
- package/dist/components/empty/empty.js +1 -1
- package/dist/components/empty/empty.vue.d.ts +2 -8
- package/dist/components/empty/index.d.ts +1 -2
- package/dist/components/empty/types.d.ts +11 -40
- package/dist/components/empty/variants.js +1 -1
- package/dist/components/form/form-field-array.js +1 -0
- package/dist/components/form/form-field-base.js +1 -1
- package/dist/components/form/form-field-base.vue.d.ts +3 -16
- package/dist/components/form/form-field.js +1 -0
- package/dist/components/form/form.js +1 -1
- package/dist/components/form/form.vue.d.ts +2 -2
- package/dist/components/form/index.d.ts +1 -1
- package/dist/components/form/types.d.ts +20 -123
- package/dist/components/form/use-form.d.ts +3 -41
- package/dist/components/form/use-form.js +1 -1
- package/dist/components/form/variants.js +1 -1
- package/dist/components/hover-card/hover-card.js +1 -1
- package/dist/components/hover-card/types.d.ts +7 -7
- package/dist/components/icon/types.d.ts +1 -1
- package/dist/components/input/index.d.ts +4 -2
- package/dist/components/input/index.js +1 -1
- package/dist/components/input/input.js +1 -1
- package/dist/components/input/input.vue.d.ts +2 -7
- package/dist/components/input/types.d.ts +10 -20
- package/dist/components/input/variants.js +1 -1
- package/dist/components/input-number/input-number.js +1 -1
- package/dist/components/input-number/types.d.ts +5 -5
- package/dist/components/input-otp/input-otp.js +1 -1
- package/dist/components/input-otp/types.d.ts +3 -3
- package/dist/components/kbd/kbd.js +1 -1
- package/dist/components/kbd/types.d.ts +1 -1
- package/dist/components/label/label.js +1 -1
- package/dist/components/label/types.d.ts +1 -1
- package/dist/components/layout/layout-classic.js +1 -1
- package/dist/components/layout/layout.js +1 -1
- package/dist/components/layout/types.d.ts +6 -6
- package/dist/components/link/link.js +1 -1
- package/dist/components/link/types.d.ts +1 -1
- package/dist/components/list/list.js +1 -1
- package/dist/components/list/types.d.ts +5 -5
- package/dist/components/menu/types.d.ts +1 -1
- package/dist/components/menubar/menubar.js +1 -1
- package/dist/components/menubar/types.d.ts +3 -3
- package/dist/components/month-picker/month-picker.js +1 -1
- package/dist/components/month-picker/types.d.ts +5 -5
- package/dist/components/month-range-picker/month-range-picker.js +1 -1
- package/dist/components/month-range-picker/types.d.ts +5 -5
- package/dist/components/navigation-menu/navigation-menu.js +1 -1
- package/dist/components/navigation-menu/types.d.ts +20 -20
- package/dist/components/page-tabs/page-tabs.js +1 -1
- package/dist/components/page-tabs/page-tabs.vue.d.ts +1 -1
- package/dist/components/page-tabs/types.d.ts +6 -6
- package/dist/components/pagination/pagination.js +1 -1
- package/dist/components/pagination/types.d.ts +9 -9
- package/dist/components/password/password.js +1 -1
- package/dist/components/password/types.d.ts +2 -2
- package/dist/components/popconfirm/popconfirm-cancel.js +1 -1
- package/dist/components/popconfirm/popconfirm-confirm.js +1 -1
- package/dist/components/popconfirm/popconfirm.js +1 -1
- package/dist/components/popconfirm/types.d.ts +26 -26
- package/dist/components/popover/popover.js +1 -1
- package/dist/components/popover/types.d.ts +8 -8
- package/dist/components/progress/progress-circle.js +1 -1
- package/dist/components/progress/progress.js +1 -1
- package/dist/components/progress/types.d.ts +5 -5
- package/dist/components/radio-group/radio-card-group.js +1 -1
- package/dist/components/radio-group/radio-card.js +1 -1
- package/dist/components/radio-group/radio-group.js +1 -1
- package/dist/components/radio-group/types.d.ts +12 -12
- package/dist/components/range-calendar/range-calendar.js +1 -1
- package/dist/components/range-calendar/types.d.ts +16 -16
- package/dist/components/scroll-area/scroll-area.js +1 -1
- package/dist/components/scroll-area/types.d.ts +7 -7
- package/dist/components/segment/segment.js +1 -1
- package/dist/components/segment/types.d.ts +3 -3
- package/dist/components/select/select.js +1 -1
- package/dist/components/select/types.d.ts +3 -3
- package/dist/components/separator/separator.js +1 -1
- package/dist/components/separator/types.d.ts +2 -2
- package/dist/components/skeleton/skeleton.js +1 -1
- package/dist/components/skeleton/types.d.ts +1 -1
- package/dist/components/slider/slider.js +1 -1
- package/dist/components/slider/types.d.ts +5 -5
- package/dist/components/spinner/spinner.js +1 -1
- package/dist/components/spinner/types.d.ts +2 -2
- package/dist/components/splitter/splitter-group.js +1 -1
- package/dist/components/splitter/splitter-panel.js +1 -1
- package/dist/components/splitter/splitter-panel.vue.d.ts +2 -2
- package/dist/components/splitter/splitter-resize-handle.vue.d.ts +2 -2
- package/dist/components/splitter/types.d.ts +6 -6
- package/dist/components/stepper/stepper.js +1 -1
- package/dist/components/stepper/types.d.ts +10 -10
- package/dist/components/switch/switch.js +1 -1
- package/dist/components/switch/types.d.ts +4 -4
- package/dist/components/table/table.js +1 -1
- package/dist/components/table/table.vue.d.ts +2 -2
- package/dist/components/table/types.d.ts +8 -8
- package/dist/components/tabs/tabs.js +1 -1
- package/dist/components/tabs/types.d.ts +3 -3
- package/dist/components/tag/tag.js +1 -1
- package/dist/components/tag/types.d.ts +1 -1
- package/dist/components/tags-input/tags-input.js +1 -1
- package/dist/components/tags-input/types.d.ts +2 -2
- package/dist/components/textarea/textarea.js +1 -1
- package/dist/components/textarea/types.d.ts +3 -3
- package/dist/components/time-field/time-field.js +1 -1
- package/dist/components/time-field/types.d.ts +5 -5
- package/dist/components/time-picker/time-picker.js +1 -1
- package/dist/components/time-picker/types.d.ts +5 -5
- package/dist/components/time-range-field/time-range-field.js +1 -1
- package/dist/components/time-range-field/types.d.ts +5 -5
- package/dist/components/time-range-picker/time-range-picker.js +1 -1
- package/dist/components/time-range-picker/types.d.ts +5 -5
- package/dist/components/toast/types.d.ts +1 -1
- package/dist/components/toggle/toggle.js +1 -1
- package/dist/components/toggle/types.d.ts +1 -1
- package/dist/components/toggle-group/toggle-group.js +1 -1
- package/dist/components/toggle-group/types.d.ts +2 -2
- package/dist/components/toolbar/toolbar.js +1 -1
- package/dist/components/toolbar/types.d.ts +1 -1
- package/dist/components/tooltip/tooltip.js +1 -1
- package/dist/components/tooltip/types.d.ts +7 -7
- package/dist/components/tree/tree.js +1 -1
- package/dist/components/tree/types.d.ts +4 -4
- package/dist/components/tree-menu/tree-menu-styled-item.js +1 -1
- package/dist/components/tree-menu/tree-menu.js +1 -1
- package/dist/components/tree-menu/types.d.ts +21 -21
- package/dist/components/virtualizer/types.d.ts +3 -3
- package/dist/components/year-picker/types.d.ts +5 -5
- package/dist/components/year-picker/year-picker.js +1 -1
- package/dist/components/year-range-picker/types.d.ts +5 -5
- package/dist/components/year-range-picker/year-range-picker.js +1 -1
- package/dist/constants/components.d.ts +18 -18
- package/dist/constants/components.js +1 -1
- package/dist/index.d.ts +107 -111
- package/dist/index.js +1 -1
- package/dist/styles.css +77 -52
- package/package.json +10 -6
- package/dist/components/carousel/carousel-content.js +0 -1
- package/dist/components/carousel/carousel-content.vue.d.ts +0 -18
- package/dist/components/carousel/carousel-item.js +0 -1
- package/dist/components/carousel/carousel-item.vue.d.ts +0 -18
- package/dist/components/carousel/carousel-next.js +0 -1
- package/dist/components/carousel/carousel-next.vue.d.ts +0 -23
- package/dist/components/carousel/carousel-previous.js +0 -1
- package/dist/components/carousel/carousel-previous.vue.d.ts +0 -23
- package/dist/components/empty/variants.d.ts +0 -57
- package/dist/components/form/context.js +0 -1
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Alignment.d.ts +0 -4
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Animations.d.ts +0 -11
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Axis.d.ts +0 -16
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Counter.d.ts +0 -9
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/DragHandler.d.ts +0 -13
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/DragTracker.d.ts +0 -4
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/EmblaCarousel.d.ts +0 -31
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Engine.d.ts +0 -67
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/EventHandler.d.ts +0 -29
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/EventStore.d.ts +0 -10
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Limit.d.ts +0 -13
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/NodeRects.d.ts +0 -11
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Options.d.ts +0 -43
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/OptionsHandler.d.ts +0 -11
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/PercentOfView.d.ts +0 -6
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Plugins.d.ts +0 -20
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ResizeHandler.d.ts +0 -11
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollBody.d.ts +0 -14
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollBounds.d.ts +0 -8
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollContain.d.ts +0 -4
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollLooper.d.ts +0 -6
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollProgress.d.ts +0 -6
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollTarget.d.ts +0 -12
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/ScrollTo.d.ts +0 -7
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlideFocus.d.ts +0 -10
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlideLooper.d.ts +0 -19
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlideRegistry.d.ts +0 -6
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlidesHandler.d.ts +0 -11
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlidesInView.d.ts +0 -9
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/SlidesToScroll.d.ts +0 -7
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Translate.d.ts +0 -8
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/Vector1d.d.ts +0 -9
- package/dist/node_modules/.pnpm/embla-carousel@8.6.0/node_modules/embla-carousel/esm/components/utils.d.ts +0 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cn as e}from"../../theme/merge.js";import"../../theme/index.js";import{buttonVariants as t}from"./variants.js";import{useButtonGroupContext as n}from"./context.js";import{computed as r,createBlock as i,defineComponent as a,mergeProps as o,openBlock as s,renderSlot as c,unref as l,withCtx as u}from"vue";import{useOmitProps as d}from"@soybeanjs/headless/composables";import{Button as f}from"@soybeanjs/headless/button";const p=a({name:`SButton`,__name:`button`,props:{class:{},color:{},size:{},variant:{},shape:{},shadow:{},fitContent:{type:Boolean},type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`click`],setup(a,{emit:p}){let m=a,h=p,g=n(),_=d(m,[`class`,`size`,`color`,`variant`,`shape`,`shadow`,`disabled`,`fitContent`]),v=r(()=>{let{size:n,color:r,variant:i,shape:a,shadow:o,fitContent:s}=g||{};return e(t({size:m.size||n?.value,color:m.color||r?.value,variant:m.variant||i?.value,shape:m.shape||a?.value,shadow:m.shadow||o?.value,fitContent:m.fitContent||s?.value}),m.class)}),y=r(()=>m.disabled||g?.disabled.value);return(e,t)=>(s(),i(l(f),o(l(_),{class:v.value,disabled:y.value,onClick:t[0]||=e=>h(`click`,e)}),{default:u(()=>[c(e.$slots,`leading`),c(e.$slots,`default`),c(e.$slots,`trailing`)]),_:3},16,[`class`,`disabled`]))}});export{p as default};
|
|
1
|
+
import{cn as e}from"../../theme/merge.js";import"../../theme/index.js";import{buttonVariants as t}from"./variants.js";import{useButtonGroupContext as n}from"./context.js";import{computed as r,createBlock as i,defineComponent as a,mergeProps as o,openBlock as s,renderSlot as c,unref as l,withCtx as u}from"vue";import{useOmitProps as d}from"@soybeanjs/headless/composables";import{Button as f}from"@soybeanjs/headless/button";const p=a({name:`SButton`,__name:`button`,props:{class:{type:[Boolean,null,String,Object,Array]},color:{},size:{},variant:{},shape:{},shadow:{},fitContent:{type:Boolean},type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`click`],setup(a,{emit:p}){let m=a,h=p,g=n(),_=d(m,[`class`,`size`,`color`,`variant`,`shape`,`shadow`,`disabled`,`fitContent`]),v=r(()=>{let{size:n,color:r,variant:i,shape:a,shadow:o,fitContent:s}=g||{};return e(t({size:m.size||n?.value,color:m.color||r?.value,variant:m.variant||i?.value,shape:m.shape||a?.value,shadow:m.shadow||o?.value,fitContent:m.fitContent||s?.value}),m.class)}),y=r(()=>m.disabled||g?.disabled.value);return(e,t)=>(s(),i(l(f),o(l(_),{class:v.value,disabled:y.value,onClick:t[0]||=e=>h(`click`,e)}),{default:u(()=>[c(e.$slots,`leading`),c(e.$slots,`default`),c(e.$slots,`trailing`)]),_:3},16,[`class`,`disabled`]))}});export{p as default};
|
|
@@ -11,9 +11,9 @@ type __VLS_Slots = {} & {
|
|
|
11
11
|
trailing?: (props: typeof __VLS_14) => any;
|
|
12
12
|
};
|
|
13
13
|
declare const __VLS_base: _$vue.DefineComponent<ButtonProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
14
|
-
click: (event:
|
|
14
|
+
click: (event: PointerEvent) => any;
|
|
15
15
|
}, string, _$vue.PublicProps, Readonly<ButtonProps> & Readonly<{
|
|
16
|
-
onClick?: ((event:
|
|
16
|
+
onClick?: ((event: PointerEvent) => any) | undefined;
|
|
17
17
|
}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
18
18
|
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
19
|
declare const _default: typeof __VLS_export;
|
|
@@ -7,7 +7,7 @@ import { Align, ClassValue, DataOrientation, Direction, PropsToContext } from "@
|
|
|
7
7
|
|
|
8
8
|
//#region src/components/button/types.d.ts
|
|
9
9
|
/**
|
|
10
|
-
*
|
|
10
|
+
* Properties for the Button component.
|
|
11
11
|
*/
|
|
12
12
|
interface ButtonProps$1 extends ButtonProps {
|
|
13
13
|
/**
|
|
@@ -40,7 +40,7 @@ interface ButtonProps$1 extends ButtonProps {
|
|
|
40
40
|
fitContent?: boolean;
|
|
41
41
|
}
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* Properties for the ButtonIcon component.
|
|
44
44
|
*/
|
|
45
45
|
interface ButtonIconProps extends ButtonProps$1 {
|
|
46
46
|
/** The icon name of iconify. */
|
|
@@ -53,7 +53,7 @@ interface ButtonIconProps extends ButtonProps$1 {
|
|
|
53
53
|
iconProps?: Partial<IconProps>;
|
|
54
54
|
}
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* Properties for the ButtonLoading component.
|
|
57
57
|
*/
|
|
58
58
|
interface ButtonLoadingProps extends ButtonProps$1 {
|
|
59
59
|
/**
|
|
@@ -97,11 +97,11 @@ interface ButtonLoadingProps extends ButtonProps$1 {
|
|
|
97
97
|
loadingPosition?: Align;
|
|
98
98
|
}
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
100
|
+
* Properties for the ButtonLink component.
|
|
101
101
|
*/
|
|
102
102
|
type ButtonLinkProps = ButtonProps$1 & LinkProps;
|
|
103
103
|
/**
|
|
104
|
-
*
|
|
104
|
+
* Properties for the ButtonGroup component.
|
|
105
105
|
*/
|
|
106
106
|
interface ButtonGroupProps extends ButtonProps$1 {
|
|
107
107
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeBaseVariants as e,mergeSlotVariants as t}from"../../theme/shared.js";import{miniSizeMap as n}from"../../theme/config.js";import"../../theme/index.js";import{buttonVariants as r}from"../button/variants.js";import i from"../icon/icon.js";import a from"../select/select.js";import{calendarVariants as o}from"./variants.js";import{computed as s,createBlock as c,createSlots as l,createTextVNode as u,createVNode as d,defineComponent as f,guardReactiveProps as p,mergeProps as m,normalizeProps as h,openBlock as g,renderSlot as _,toDisplayString as v,toHandlers as y,unref as b,withCtx as x}from"vue";import{useForwardListeners as S,useOmitProps as C}from"@soybeanjs/headless/composables";import{CalendarCompact as w,provideCalendarUi as T}from"@soybeanjs/headless/calendar";const E=f({name:`SCalendar`,__name:`calendar`,props:{class:{},size:{},ui:{},headerProps:{},headingProps:{},prevProps:{},nextProps:{},gridProps:{},gridHeadProps:{},gridBodyProps:{},gridRowProps:{},headCellProps:{},cellProps:{},cellTriggerProps:{},defaultValue:{},defaultPlaceholder:{},placeholder:{},pagedNavigation:{type:Boolean},preventDeselect:{type:Boolean},weekStartsOn:{},weekdayFormat:{},calendarLabel:{},fixedWeeks:{type:Boolean},maxValue:{},minValue:{},locale:{},numberOfMonths:{},disabled:{type:Boolean},readonly:{type:Boolean},initialFocus:{type:Boolean},isDateDisabled:{type:Function},isDateUnavailable:{type:Function},dir:{},nextPage:{type:Function},prevPage:{type:Function},modelValue:{},multiple:{},disableDaysOutsideCurrentView:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`,`update:placeholder`],setup(f,{emit:E}){let D=f,O=E,k=C(D,[`class`,`size`,`ui`]),A=S(O),j=s(()=>t(e(o({size:D.size}),{prev:r({size:D.size,color:`accent`,variant:`pure`,fitContent:!0}),next:r({size:D.size,color:`accent`,variant:`pure`,fitContent:!0})}),D.ui,{root:D.class})),M=s(()=>n[D.size||`md`]);return T(j),(e,t)=>(g(),c(b(w),m(b(k),y(b(A))),l({prev:x(t=>[_(e.$slots,`prev`,h(p(t)),()=>[d(i,{icon:`lucide:chevron-left`})])]),next:x(t=>[_(e.$slots,`next`,h(p(t)),()=>[d(i,{icon:`lucide:chevron-right`})])]),"head-cell":x(t=>[_(e.$slots,`head-cell`,h(p(t)),()=>[u(v(t.label),1)])]),day:x(t=>[_(e.$slots,`day`,h(p(t)),()=>[u(v(t.dayValue),1)])]),default:x(t=>[_(e.$slots,`default`,h(p(t)))]),_:2},[e.$slots.heading?{name:`heading`,fn:x(t=>[_(e.$slots,`heading`,h(p(t)))]),key:`0`}:{name:`heading`,fn:x(e=>[d(a,{size:M.value,disabled:f.disabled,clearable:!1,items:e.monthOptions,"model-value":e.selectedMonth,"trigger-props":{"aria-label":`Select month`},ui:{trigger:`w-fit`},"onUpdate:modelValue":e.onMonthChange},null,8,[`size`,`disabled`,`items`,`model-value`,`onUpdate:modelValue`]),d(a,{size:M.value,disabled:f.disabled,clearable:!1,items:e.yearOptions,"model-value":e.selectedYear,"trigger-props":{"aria-label":`Select year`},ui:{popup:`max-h-72`,trigger:`w-fit`},"onUpdate:modelValue":e.onYearChange},null,8,[`size`,`disabled`,`items`,`model-value`,`onUpdate:modelValue`])]),key:`1`}]),1040))}});export{E as default};
|
|
1
|
+
import{mergeBaseVariants as e,mergeSlotVariants as t}from"../../theme/shared.js";import{miniSizeMap as n}from"../../theme/config.js";import"../../theme/index.js";import{buttonVariants as r}from"../button/variants.js";import i from"../icon/icon.js";import a from"../select/select.js";import{calendarVariants as o}from"./variants.js";import{computed as s,createBlock as c,createSlots as l,createTextVNode as u,createVNode as d,defineComponent as f,guardReactiveProps as p,mergeProps as m,normalizeProps as h,openBlock as g,renderSlot as _,toDisplayString as v,toHandlers as y,unref as b,withCtx as x}from"vue";import{useForwardListeners as S,useOmitProps as C}from"@soybeanjs/headless/composables";import{CalendarCompact as w,provideCalendarUi as T}from"@soybeanjs/headless/calendar";const E=f({name:`SCalendar`,__name:`calendar`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},headerProps:{},headingProps:{},prevProps:{},nextProps:{},gridProps:{},gridHeadProps:{},gridBodyProps:{},gridRowProps:{},headCellProps:{},cellProps:{},cellTriggerProps:{},defaultValue:{},defaultPlaceholder:{},placeholder:{},pagedNavigation:{type:Boolean},preventDeselect:{type:Boolean},weekStartsOn:{},weekdayFormat:{},calendarLabel:{},fixedWeeks:{type:Boolean},maxValue:{},minValue:{},locale:{},numberOfMonths:{},disabled:{type:Boolean},readonly:{type:Boolean},initialFocus:{type:Boolean},isDateDisabled:{type:Function},isDateUnavailable:{type:Function},dir:{},nextPage:{type:Function},prevPage:{type:Function},modelValue:{},multiple:{},disableDaysOutsideCurrentView:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`update:modelValue`,`update:placeholder`],setup(f,{emit:E}){let D=f,O=E,k=C(D,[`class`,`size`,`ui`]),A=S(O),j=s(()=>t(e(o({size:D.size}),{prev:r({size:D.size,color:`accent`,variant:`pure`,fitContent:!0}),next:r({size:D.size,color:`accent`,variant:`pure`,fitContent:!0})}),D.ui,{root:D.class})),M=s(()=>n[D.size||`md`]);return T(j),(e,t)=>(g(),c(b(w),m(b(k),y(b(A))),l({prev:x(t=>[_(e.$slots,`prev`,h(p(t)),()=>[d(i,{icon:`lucide:chevron-left`})])]),next:x(t=>[_(e.$slots,`next`,h(p(t)),()=>[d(i,{icon:`lucide:chevron-right`})])]),"head-cell":x(t=>[_(e.$slots,`head-cell`,h(p(t)),()=>[u(v(t.label),1)])]),day:x(t=>[_(e.$slots,`day`,h(p(t)),()=>[u(v(t.dayValue),1)])]),default:x(t=>[_(e.$slots,`default`,h(p(t)))]),_:2},[e.$slots.heading?{name:`heading`,fn:x(t=>[_(e.$slots,`heading`,h(p(t)))]),key:`0`}:{name:`heading`,fn:x(e=>[d(a,{size:M.value,disabled:f.disabled,clearable:!1,items:e.monthOptions,"model-value":e.selectedMonth,"trigger-props":{"aria-label":`Select month`},ui:{trigger:`w-fit`},"onUpdate:modelValue":e.onMonthChange},null,8,[`size`,`disabled`,`items`,`model-value`,`onUpdate:modelValue`]),d(a,{size:M.value,disabled:f.disabled,clearable:!1,items:e.yearOptions,"model-value":e.selectedYear,"trigger-props":{"aria-label":`Select year`},ui:{popup:`max-h-72`,trigger:`w-fit`},"onUpdate:modelValue":e.onYearChange},null,8,[`size`,`disabled`,`items`,`model-value`,`onUpdate:modelValue`])]),key:`1`}]),1040))}});export{E as default};
|
|
@@ -4,7 +4,7 @@ import { ClassValue } from "@soybeanjs/headless/types";
|
|
|
4
4
|
|
|
5
5
|
//#region src/components/calendar/types.d.ts
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Properties for the Calendar component.
|
|
8
8
|
*/
|
|
9
9
|
interface CalendarProps<M extends boolean = false> extends CalendarCompactProps<M> {
|
|
10
10
|
/**
|
|
@@ -21,11 +21,11 @@ interface CalendarProps<M extends boolean = false> extends CalendarCompactProps<
|
|
|
21
21
|
ui?: Partial<CalendarUi>;
|
|
22
22
|
}
|
|
23
23
|
/**
|
|
24
|
-
*
|
|
24
|
+
* Events for the Calendar component.
|
|
25
25
|
*/
|
|
26
26
|
type CalendarEmits<M extends boolean = false> = CalendarCompactEmits<M>;
|
|
27
27
|
/**
|
|
28
|
-
* Slots for the
|
|
28
|
+
* Slots for the Calendar component.
|
|
29
29
|
*/
|
|
30
30
|
type CalendarSlots<M extends boolean = false> = CalendarCompactSlots<M>;
|
|
31
31
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{cardVariants as t}from"./variants.js";import{computed as n,createBlock as r,createSlots as i,defineComponent as a,guardReactiveProps as o,normalizeProps as s,openBlock as c,renderSlot as l,unref as u,useSlots as d,withCtx as f}from"vue";import{useOmitProps as p}from"@soybeanjs/headless/composables";import{CardCompact as m,provideCardUi as h}from"@soybeanjs/headless/card";const g=a({name:`SCard`,__name:`card`,props:{class:{},size:{},ui:{},scrollable:{type:Boolean,default:!0},split:{type:Boolean},title:{},description:{},headerProps:{},contentProps:{},footerProps:{},titleRootProps:{},titleProps:{},descriptionProps:{},defaultOpen:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},disabled:{type:Boolean},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a){let g=a,_=p(g,[`class`,`size`,`ui`,`scrollable`,`split`]),v=d();return h(n(()=>e(t({size:g.size,scrollable:g.scrollable,split:g.split}),g.ui,{root:g.class}))),(e,t)=>(c(),r(u(m),s(o(u(_))),i({default:f(()=>[l(e.$slots,`default`)]),_:2},[v.header?{name:`header`,fn:f(()=>[l(e.$slots,`header`)]),key:`0`}:void 0,v[`title-leading`]?{name:`title-leading`,fn:f(()=>[l(e.$slots,`title-leading`)]),key:`1`}:void 0,v.title?{name:`title`,fn:f(()=>[l(e.$slots,`title`)]),key:`2`}:void 0,v[`title-trailing`]?{name:`title-trailing`,fn:f(()=>[l(e.$slots,`title-trailing`)]),key:`3`}:void 0,v.extra?{name:`extra`,fn:f(()=>[l(e.$slots,`extra`)]),key:`4`}:void 0,v.description?{name:`description`,fn:f(()=>[l(e.$slots,`description`)]),key:`5`}:void 0,v.footer?{name:`footer`,fn:f(()=>[l(e.$slots,`footer`)]),key:`6`}:void 0]),1040))}});export{g as default};
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{cardVariants as t}from"./variants.js";import{computed as n,createBlock as r,createSlots as i,defineComponent as a,guardReactiveProps as o,normalizeProps as s,openBlock as c,renderSlot as l,unref as u,useSlots as d,withCtx as f}from"vue";import{useOmitProps as p}from"@soybeanjs/headless/composables";import{CardCompact as m,provideCardUi as h}from"@soybeanjs/headless/card";const g=a({name:`SCard`,__name:`card`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},scrollable:{type:Boolean,default:!0},split:{type:Boolean},title:{},description:{},headerProps:{},contentProps:{},footerProps:{},titleRootProps:{},titleProps:{},descriptionProps:{},defaultOpen:{type:Boolean,default:!0},open:{type:Boolean,default:void 0},disabled:{type:Boolean},unmountOnHide:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a){let g=a,_=p(g,[`class`,`size`,`ui`,`scrollable`,`split`]),v=d();return h(n(()=>e(t({size:g.size,scrollable:g.scrollable,split:g.split}),g.ui,{root:g.class}))),(e,t)=>(c(),r(u(m),s(o(u(_))),i({default:f(()=>[l(e.$slots,`default`)]),_:2},[v.header?{name:`header`,fn:f(()=>[l(e.$slots,`header`)]),key:`0`}:void 0,v[`title-leading`]?{name:`title-leading`,fn:f(()=>[l(e.$slots,`title-leading`)]),key:`1`}:void 0,v.title?{name:`title`,fn:f(()=>[l(e.$slots,`title`)]),key:`2`}:void 0,v[`title-trailing`]?{name:`title-trailing`,fn:f(()=>[l(e.$slots,`title-trailing`)]),key:`3`}:void 0,v.extra?{name:`extra`,fn:f(()=>[l(e.$slots,`extra`)]),key:`4`}:void 0,v.description?{name:`description`,fn:f(()=>[l(e.$slots,`description`)]),key:`5`}:void 0,v.footer?{name:`footer`,fn:f(()=>[l(e.$slots,`footer`)]),key:`6`}:void 0]),1040))}});export{g as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeSlotVariants as
|
|
1
|
+
import{mergeBaseVariants as e,mergeSlotVariants as t}from"../../theme/shared.js";import"../../theme/index.js";import{buttonVariants as n}from"../button/variants.js";import{carouselVariants as r}from"./variants.js";import{computed as i,createBlock as a,createSlots as o,defineComponent as s,guardReactiveProps as c,mergeProps as l,normalizeProps as u,openBlock as d,renderList as f,renderSlot as p,toHandlers as m,unref as h,useSlots as g,withCtx as _}from"vue";import{useForwardListeners as v,useOmitProps as y}from"@soybeanjs/headless/composables";import{keysOf as b}from"@soybeanjs/utils";import{CarouselCompact as x,provideCarouselUi as S}from"@soybeanjs/headless/carousel";const C=s({name:`SCarousel`,__name:`carousel`,props:{class:{type:[Boolean,null,String,Object,Array]},ui:{},size:{},floatNav:{type:Boolean},slides:{},contentProps:{},containerProps:{},itemProps:{},controlProps:{},navigationProps:{},previousProps:{},nextProps:{},dir:{},orientation:{},options:{},plugins:{}},emits:[`init`],setup(s,{emit:C}){let w=s,T=C,E=g(),D=y(w,[`class`,`ui`,`size`,`floatNav`]),O=v(T),k=i(()=>b(E).filter(e=>e!==`item`));return S(i(()=>t(e(r({size:w.size,orientation:w.orientation,floatNav:w.floatNav}),{previous:n({size:w.size,color:`accent`,variant:`pure`,shape:`circle`,fitContent:!0}),next:n({size:w.size,color:`accent`,variant:`pure`,shape:`circle`,fitContent:!0})}),w.ui,{root:w.class}))),(e,t)=>(d(),a(h(x),l(h(D),m(h(O))),o({item:_(t=>[p(e.$slots,`item`,u(c(t)))]),_:2},[f(k.value,t=>({name:t,fn:_(n=>[p(e.$slots,t,u(c(n)))])}))]),1040))}});export{C as default};
|
|
@@ -1,26 +1,23 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { CarouselProps } from "./types.js";
|
|
1
|
+
import { CarouselProps, CarouselSlots } from "./types.js";
|
|
3
2
|
import * as _$vue from "vue";
|
|
4
|
-
import
|
|
3
|
+
import { DefinedValue } from "@soybeanjs/headless/types";
|
|
4
|
+
import * as _$embla_carousel0 from "embla-carousel";
|
|
5
5
|
|
|
6
6
|
//#region src/components/carousel/carousel.vue.d.ts
|
|
7
|
-
declare
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
declare const __VLS_export: <T extends DefinedValue = DefinedValue>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_exposed?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
8
|
+
props: _$vue.PublicProps & __VLS_PrettifyLocal<CarouselProps<T> & {
|
|
9
|
+
onInit?: ((carousel: _$embla_carousel0.EmblaCarouselType) => any) | undefined;
|
|
10
|
+
}> & (typeof globalThis extends {
|
|
11
|
+
__VLS_PROPS_FALLBACK: infer P;
|
|
12
|
+
} ? P : {});
|
|
13
|
+
expose: (exposed: {}) => void;
|
|
14
|
+
attrs: any;
|
|
15
|
+
slots: CarouselSlots<T>;
|
|
16
|
+
emit: (evt: "init", carousel: _$embla_carousel0.EmblaCarouselType) => void;
|
|
17
|
+
}>) => _$vue.VNode & {
|
|
18
|
+
__ctx?: Awaited<typeof __VLS_setup>;
|
|
10
19
|
};
|
|
11
|
-
declare const __VLS_base: _$vue.DefineComponent<CarouselProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
12
|
-
initApi: (api: EmblaCarouselType) => any;
|
|
13
|
-
}, string, _$vue.PublicProps, Readonly<CarouselProps> & Readonly<{
|
|
14
|
-
onInitApi?: ((api: EmblaCarouselType) => any) | undefined;
|
|
15
|
-
}>, {
|
|
16
|
-
orientation: _$_soybeanjs_headless0.DataOrientation;
|
|
17
|
-
}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
18
|
-
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
19
20
|
declare const _default: typeof __VLS_export;
|
|
20
|
-
type
|
|
21
|
-
new (): {
|
|
22
|
-
$slots: S;
|
|
23
|
-
};
|
|
24
|
-
};
|
|
21
|
+
type __VLS_PrettifyLocal<T> = (T extends any ? { [K in keyof T]: T[K] } : { [K in keyof T as K]: T[K] }) & {};
|
|
25
22
|
//#endregion
|
|
26
23
|
export { _default };
|
|
@@ -1,7 +1,3 @@
|
|
|
1
|
-
import { CarouselEmits, CarouselProps } from "./types.js";
|
|
1
|
+
import { CarouselEmits, CarouselProps, CarouselSlots } from "./types.js";
|
|
2
2
|
import { _default } from "./carousel.vue.js";
|
|
3
|
-
import { _default as _default$1 } from "./carousel-content.vue.js";
|
|
4
|
-
import { _default as _default$2 } from "./carousel-item.vue.js";
|
|
5
|
-
import { _default as _default$3 } from "./carousel-previous.vue.js";
|
|
6
|
-
import { _default as _default$4 } from "./carousel-next.vue.js";
|
|
7
3
|
export * from "@soybeanjs/headless/carousel";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"./carousel.js";
|
|
1
|
+
import"./carousel.js";
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { ThemeSize } from "../../theme/types.js";
|
|
2
|
+
import { CarouselCompactEmits, CarouselCompactProps, CarouselCompactSlots, CarouselUi } from "@soybeanjs/headless/carousel";
|
|
3
|
+
import { ClassValue, DefinedValue } from "@soybeanjs/headless/types";
|
|
3
4
|
|
|
4
5
|
//#region src/components/carousel/types.d.ts
|
|
5
6
|
/**
|
|
6
|
-
*
|
|
7
|
+
* Properties for the Carousel component.
|
|
7
8
|
*/
|
|
8
|
-
interface CarouselProps extends
|
|
9
|
+
interface CarouselProps<T extends DefinedValue = DefinedValue> extends CarouselCompactProps<T> {
|
|
9
10
|
/**
|
|
10
11
|
* Additional class names applied to the root element.
|
|
11
12
|
*/
|
|
@@ -14,10 +15,24 @@ interface CarouselProps extends CarouselRootProps {
|
|
|
14
15
|
* Per-slot class overrides for the component.
|
|
15
16
|
*/
|
|
16
17
|
ui?: Partial<CarouselUi>;
|
|
18
|
+
/**
|
|
19
|
+
* The size of the carousel, which determines the spacing and sizing of its elements.
|
|
20
|
+
*/
|
|
21
|
+
size?: ThemeSize;
|
|
22
|
+
/**
|
|
23
|
+
* Whether to use floating navigation, which positions the navigation controls outside of the carousel content and allows them to float over the content.
|
|
24
|
+
*
|
|
25
|
+
* This is useful for carousels with a lot of content or when you want to maximize the space available for the slides.
|
|
26
|
+
*/
|
|
27
|
+
floatNav?: boolean;
|
|
17
28
|
}
|
|
18
29
|
/**
|
|
19
|
-
*
|
|
30
|
+
* Events for the Carousel component.
|
|
31
|
+
*/
|
|
32
|
+
type CarouselEmits = CarouselCompactEmits;
|
|
33
|
+
/**
|
|
34
|
+
* Slots for the Carousel component.
|
|
20
35
|
*/
|
|
21
|
-
type
|
|
36
|
+
type CarouselSlots<T extends DefinedValue = DefinedValue> = CarouselCompactSlots<T>;
|
|
22
37
|
//#endregion
|
|
23
|
-
export { CarouselEmits, CarouselProps };
|
|
38
|
+
export { CarouselEmits, CarouselProps, CarouselSlots };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`relative`,content:`overflow-hidden`,container:`flex
|
|
1
|
+
import{tv as e}from"tailwind-variants";const t=e({slots:{root:`group relative`,content:`overflow-hidden`,container:`flex`,item:`min-w-0 shrink-0 grow-0 basis-full`,control:`flex justify-between items-center`,navigation:`flex`,previous:`group-data-[orientation=vertical]:rotate-90 rtl:rotate-180`,next:`group-data-[orientation=vertical]:rotate-90 rtl:rotate-180`},variants:{size:{xs:{root:`text-2xs`,navigation:`gap-1 py-1`},sm:{root:`text-xs`,navigation:`gap-1.25 py-1.25`},md:{root:`text-sm`,navigation:`gap-1.5 py-1.5`},lg:{root:`text-base`,navigation:`gap-2 py-2`},xl:{root:`text-lg`,navigation:`gap-2.5 py-2.5`},"2xl":{root:`text-xl`,navigation:`gap-3 py-3`}},orientation:{horizontal:{},vertical:{container:`flex-col h-full`}},floatNav:{true:{navigation:`p-0`,previous:`absolute`,next:`absolute`}}},compoundVariants:[{orientation:`horizontal`,floatNav:!0,class:{previous:`top-1/2 -translate-y-1/2`,next:`top-1/2 -translate-y-1/2`}},{orientation:`vertical`,floatNav:!0,class:{previous:`start-1/2 -translate-x-1/2`,next:`start-1/2 -translate-x-1/2`}},{size:`xs`,floatNav:!0,orientation:`horizontal`,class:{previous:`-start-9`,next:`-end-9`}},{size:`sm`,floatNav:!0,orientation:`horizontal`,class:{previous:`-start-10.5`,next:`-end-10.5`}},{size:`md`,floatNav:!0,orientation:`horizontal`,class:{previous:`-start-12`,next:`-end-12`}},{size:`lg`,floatNav:!0,orientation:`horizontal`,class:{previous:`-start-13.5`,next:`-end-13.5`}},{size:`xl`,floatNav:!0,orientation:`horizontal`,class:{previous:`-start-15`,next:`-end-15`}},{size:`2xl`,floatNav:!0,orientation:`horizontal`,class:{previous:`-start-18`,next:`-end-18`}},{size:`xs`,floatNav:!0,orientation:`vertical`,class:{previous:`-top-9`,next:`-bottom-9`}},{size:`sm`,floatNav:!0,orientation:`vertical`,class:{previous:`-top-10.5`,next:`-bottom-10.5`}},{size:`md`,floatNav:!0,orientation:`vertical`,class:{previous:`-top-12`,next:`-bottom-12`}},{size:`lg`,floatNav:!0,orientation:`vertical`,class:{previous:`-top-13.5`,next:`-bottom-13.5`}},{size:`xl`,floatNav:!0,orientation:`vertical`,class:{previous:`-top-15`,next:`-bottom-15`}},{size:`2xl`,floatNav:!0,orientation:`vertical`,class:{previous:`-top-18`,next:`-bottom-18`}}],defaultVariants:{size:`md`,orientation:`horizontal`,floatNav:!0}});export{t as carouselVariants};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{checkboxCardVariants as t}from"./variants.js";import{computed as n,createBlock as r,defineComponent as i,mergeProps as a,openBlock as o,unref as s}from"vue";import{useOmitProps as c}from"@soybeanjs/headless/composables";import{CheckboxCardGroupCompact as l,provideCheckboxCardUi as u}from"@soybeanjs/headless/checkbox";const d=i({name:`SCheckboxCardGroup`,__name:`checkbox-card-group`,props:{class:{},ui:{},color:{},size:{},shape:{},items:{},rootProps:{},controlProps:{},indicatorProps:{},labelProps:{},modelValue:{},defaultValue:{},rovingFocus:{type:Boolean},disabled:{type:Boolean},orientation:{},dir:{},loop:{type:Boolean},name:{},required:{type:Boolean}},emits:[`update:modelValue`],setup(i,{emit:d}){let f=i,p=d,m=c(f,[`class`,`ui`,`color`,`size`,`shape`]),h=n(()=>e(t({color:f.color,size:f.size,shape:f.shape}),f.ui,{groupRoot:f.class}));return u(h),(e,t)=>(o(),r(s(l),a(s(m),{"content-class":h.value.content,"text-content-class":h.value.textContent,"icon-class":h.value.icon,"description-class":h.value.description,"onUpdate:modelValue":t[0]||=e=>p(`update:modelValue`,e)}),null,16,[`content-class`,`text-content-class`,`icon-class`,`description-class`]))}});export{d as default};
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{checkboxCardVariants as t}from"./variants.js";import{computed as n,createBlock as r,defineComponent as i,mergeProps as a,openBlock as o,unref as s}from"vue";import{useOmitProps as c}from"@soybeanjs/headless/composables";import{CheckboxCardGroupCompact as l,provideCheckboxCardUi as u}from"@soybeanjs/headless/checkbox";const d=i({name:`SCheckboxCardGroup`,__name:`checkbox-card-group`,props:{class:{type:[Boolean,null,String,Object,Array]},ui:{},color:{},size:{},shape:{},items:{},rootProps:{},controlProps:{},indicatorProps:{},labelProps:{},modelValue:{},defaultValue:{},rovingFocus:{type:Boolean},disabled:{type:Boolean},orientation:{},dir:{},loop:{type:Boolean},name:{},required:{type:Boolean}},emits:[`update:modelValue`],setup(i,{emit:d}){let f=i,p=d,m=c(f,[`class`,`ui`,`color`,`size`,`shape`]),h=n(()=>e(t({color:f.color,size:f.size,shape:f.shape}),f.ui,{groupRoot:f.class}));return u(h),(e,t)=>(o(),r(s(l),a(s(m),{"content-class":h.value.content,"text-content-class":h.value.textContent,"icon-class":h.value.icon,"description-class":h.value.description,"onUpdate:modelValue":t[0]||=e=>p(`update:modelValue`,e)}),null,16,[`content-class`,`text-content-class`,`icon-class`,`description-class`]))}});export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{checkboxCardVariants as t}from"./variants.js";import{computed as n,createBlock as r,defineComponent as i,mergeProps as a,openBlock as o,renderSlot as s,unref as c,withCtx as l}from"vue";import{useOmitProps as u}from"@soybeanjs/headless/composables";import{CheckboxCardCompact as d,provideCheckboxCardUi as f}from"@soybeanjs/headless/checkbox";const p=i({name:`SCheckboxCard`,__name:`checkbox-card`,props:{class:{},ui:{},color:{},size:{},shape:{},icon:{},description:{},label:{},controlProps:{},indicatorProps:{},labelProps:{},id:{},modelValue:{type:[Boolean,String,null],default:void 0},defaultValue:{type:[Boolean,String]},value:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:[`update:modelValue`],setup(i,{emit:p}){let m=i,h=p,g=u(m,[`class`,`ui`,`color`,`size`,`shape`]);return f(n(()=>e(t({color:m.color,size:m.size,shape:m.shape}),m.ui,{root:m.class}))),(e,t)=>(o(),r(c(d),a(c(g),{"onUpdate:modelValue":t[0]||=e=>h(`update:modelValue`,e)}),{description:l(()=>[s(e.$slots,`description`)]),default:l(()=>[s(e.$slots,`default`)]),_:3},16))}});export{p as default};
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{checkboxCardVariants as t}from"./variants.js";import{computed as n,createBlock as r,defineComponent as i,mergeProps as a,openBlock as o,renderSlot as s,unref as c,withCtx as l}from"vue";import{useOmitProps as u}from"@soybeanjs/headless/composables";import{CheckboxCardCompact as d,provideCheckboxCardUi as f}from"@soybeanjs/headless/checkbox";const p=i({name:`SCheckboxCard`,__name:`checkbox-card`,props:{class:{type:[Boolean,null,String,Object,Array]},ui:{},color:{},size:{},shape:{},icon:{},description:{},label:{},controlProps:{},indicatorProps:{},labelProps:{},id:{},modelValue:{type:[Boolean,String,null],default:void 0},defaultValue:{type:[Boolean,String]},value:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:[`update:modelValue`],setup(i,{emit:p}){let m=i,h=p,g=u(m,[`class`,`ui`,`color`,`size`,`shape`]);return f(n(()=>e(t({color:m.color,size:m.size,shape:m.shape}),m.ui,{root:m.class}))),(e,t)=>(o(),r(c(d),a(c(g),{"onUpdate:modelValue":t[0]||=e=>h(`update:modelValue`,e)}),{description:l(()=>[s(e.$slots,`description`)]),default:l(()=>[s(e.$slots,`default`)]),_:3},16))}});export{p as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{checkboxVariants as t}from"./variants.js";import{computed as n,createBlock as r,defineComponent as i,mergeProps as a,openBlock as o,unref as s}from"vue";import{useOmitProps as c}from"@soybeanjs/headless/composables";import{CheckboxGroupCompact as l,provideCheckboxUi as u}from"@soybeanjs/headless/checkbox";const d=i({name:`SCheckboxGroup`,__name:`checkbox-group`,props:{class:{},ui:{},color:{},size:{},shape:{},items:{},rootProps:{},controlProps:{},indicatorProps:{},labelProps:{},modelValue:{},defaultValue:{},rovingFocus:{type:Boolean},disabled:{type:Boolean},orientation:{},dir:{},loop:{type:Boolean},name:{},required:{type:Boolean}},emits:[`update:modelValue`],setup(i,{emit:d}){let f=i,p=d,m=c(f,[`class`,`ui`,`color`,`size`,`shape`]);return u(n(()=>e(t({color:f.color,size:f.size,shape:f.shape,orientation:f.orientation}),f.ui,{groupRoot:f.class}))),(e,t)=>(o(),r(s(l),a(s(m),{"onUpdate:modelValue":t[0]||=e=>p(`update:modelValue`,e)}),null,16))}});export{d as default};
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{checkboxVariants as t}from"./variants.js";import{computed as n,createBlock as r,defineComponent as i,mergeProps as a,openBlock as o,unref as s}from"vue";import{useOmitProps as c}from"@soybeanjs/headless/composables";import{CheckboxGroupCompact as l,provideCheckboxUi as u}from"@soybeanjs/headless/checkbox";const d=i({name:`SCheckboxGroup`,__name:`checkbox-group`,props:{class:{type:[Boolean,null,String,Object,Array]},ui:{},color:{},size:{},shape:{},items:{},rootProps:{},controlProps:{},indicatorProps:{},labelProps:{},modelValue:{},defaultValue:{},rovingFocus:{type:Boolean},disabled:{type:Boolean},orientation:{},dir:{},loop:{type:Boolean},name:{},required:{type:Boolean}},emits:[`update:modelValue`],setup(i,{emit:d}){let f=i,p=d,m=c(f,[`class`,`ui`,`color`,`size`,`shape`]);return u(n(()=>e(t({color:f.color,size:f.size,shape:f.shape,orientation:f.orientation}),f.ui,{groupRoot:f.class}))),(e,t)=>(o(),r(s(l),a(s(m),{"onUpdate:modelValue":t[0]||=e=>p(`update:modelValue`,e)}),null,16))}});export{d as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{checkboxVariants as t}from"./variants.js";import{computed as n,createBlock as r,defineComponent as i,mergeProps as a,openBlock as o,renderSlot as s,unref as c,withCtx as l}from"vue";import{useOmitProps as u}from"@soybeanjs/headless/composables";import{CheckboxCompact as d,provideCheckboxUi as f}from"@soybeanjs/headless/checkbox";const p=i({name:`SCheckbox`,__name:`checkbox`,props:{class:{},ui:{},color:{},size:{},shape:{},label:{},controlProps:{},indicatorProps:{},labelProps:{},id:{},modelValue:{type:[Boolean,String,null],default:void 0},defaultValue:{type:[Boolean,String]},value:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:[`update:modelValue`],setup(i,{emit:p}){let m=i,h=p,g=u(m,[`class`,`ui`,`color`,`size`,`shape`]);return f(n(()=>e(t({color:m.color,size:m.size,shape:m.shape}),m.ui,{root:m.class}))),(e,t)=>(o(),r(c(d),a(c(g),{"onUpdate:modelValue":t[0]||=e=>h(`update:modelValue`,e)}),{default:l(()=>[s(e.$slots,`default`)]),_:3},16))}});export{p as default};
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{checkboxVariants as t}from"./variants.js";import{computed as n,createBlock as r,defineComponent as i,mergeProps as a,openBlock as o,renderSlot as s,unref as c,withCtx as l}from"vue";import{useOmitProps as u}from"@soybeanjs/headless/composables";import{CheckboxCompact as d,provideCheckboxUi as f}from"@soybeanjs/headless/checkbox";const p=i({name:`SCheckbox`,__name:`checkbox`,props:{class:{type:[Boolean,null,String,Object,Array]},ui:{},color:{},size:{},shape:{},label:{},controlProps:{},indicatorProps:{},labelProps:{},id:{},modelValue:{type:[Boolean,String,null],default:void 0},defaultValue:{type:[Boolean,String]},value:{},disabled:{type:Boolean},name:{},required:{type:Boolean}},emits:[`update:modelValue`],setup(i,{emit:p}){let m=i,h=p,g=u(m,[`class`,`ui`,`color`,`size`,`shape`]);return f(n(()=>e(t({color:m.color,size:m.size,shape:m.shape}),m.ui,{root:m.class}))),(e,t)=>(o(),r(c(d),a(c(g),{"onUpdate:modelValue":t[0]||=e=>h(`update:modelValue`,e)}),{default:l(()=>[s(e.$slots,`default`)]),_:3},16))}});export{p as default};
|
|
@@ -5,7 +5,7 @@ import { ClassValue, DefinedValue } from "@soybeanjs/headless/types";
|
|
|
5
5
|
|
|
6
6
|
//#region src/components/checkbox/types.d.ts
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Properties for the Checkbox component.
|
|
9
9
|
*/
|
|
10
10
|
interface CheckboxProps extends CheckboxCompactProps {
|
|
11
11
|
/**
|
|
@@ -30,11 +30,11 @@ interface CheckboxProps extends CheckboxCompactProps {
|
|
|
30
30
|
shape?: CheckboxShape;
|
|
31
31
|
}
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
33
|
+
* Events for the Checkbox component.
|
|
34
34
|
*/
|
|
35
35
|
type CheckboxEmits = CheckboxCompactEmits;
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Properties for the CheckboxCard component.
|
|
38
38
|
*/
|
|
39
39
|
interface CheckboxCardProps extends CheckboxCardCompactProps {
|
|
40
40
|
/**
|
|
@@ -67,11 +67,11 @@ interface CheckboxCardProps extends CheckboxCardCompactProps {
|
|
|
67
67
|
description?: string;
|
|
68
68
|
}
|
|
69
69
|
/**
|
|
70
|
-
*
|
|
70
|
+
* Events for the CheckboxCard component.
|
|
71
71
|
*/
|
|
72
72
|
type CheckboxCardEmits = CheckboxCardCompactEmits;
|
|
73
73
|
/**
|
|
74
|
-
*
|
|
74
|
+
* Properties for the CheckboxGroup component.
|
|
75
75
|
*/
|
|
76
76
|
interface CheckboxGroupProps<T extends CheckboxGroupOptionData = CheckboxGroupOptionData> extends CheckboxGroupCompactProps<T> {
|
|
77
77
|
/**
|
|
@@ -96,11 +96,11 @@ interface CheckboxGroupProps<T extends CheckboxGroupOptionData = CheckboxGroupOp
|
|
|
96
96
|
shape?: CheckboxShape;
|
|
97
97
|
}
|
|
98
98
|
/**
|
|
99
|
-
*
|
|
99
|
+
* Events for the CheckboxGroup component.
|
|
100
100
|
*/
|
|
101
101
|
type CheckboxGroupEmits<T extends DefinedValue = DefinedValue> = CheckboxGroupCompactEmits<T>;
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
103
|
+
* Properties for the CheckboxCardGroup component.
|
|
104
104
|
*/
|
|
105
105
|
interface CheckboxCardGroupProps<T extends CheckboxCardGroupOptionData = CheckboxCardGroupOptionData> extends CheckboxCardGroupCompactProps<T> {
|
|
106
106
|
/**
|
|
@@ -125,7 +125,7 @@ interface CheckboxCardGroupProps<T extends CheckboxCardGroupOptionData = Checkbo
|
|
|
125
125
|
shape?: CheckboxShape;
|
|
126
126
|
}
|
|
127
127
|
/**
|
|
128
|
-
*
|
|
128
|
+
* Events for the CheckboxCardGroup component.
|
|
129
129
|
*/
|
|
130
130
|
type CheckboxCardGroupEmits<T extends DefinedValue = DefinedValue> = CheckboxCardGroupCompactEmits<T>;
|
|
131
131
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cn as e}from"../../theme/merge.js";import"../../theme/index.js";import{buttonVariants as t}from"../button/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,toHandlers as u,unref as d,withCtx as f}from"vue";import{useForwardListeners as p,useOmitProps as m}from"@soybeanjs/headless/composables";import{Clipboard as h}from"@soybeanjs/headless/clipboard";const g=i({name:`SClipboard`,__name:`clipboard`,props:{class:{},color:{},size:{},variant:{},shape:{},fitContent:{type:Boolean},value:{},copiedDuration:{},legacy:{type:Boolean},copyIcon:{},copiedIcon:{},copyText:{},copiedText:{},type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`click`,`copied`,`copyError`],setup(i,{emit:g}){let _=i,v=p(g),y=m(_,[`class`,`color`,`size`,`variant`,`shape`,`fitContent`]),b=n(()=>e(t({color:_.color,size:_.size,variant:_.variant,shape:_.shape,fitContent:_.fitContent}),_.class));return(e,t)=>(c(),r(d(h),o(d(y),{class:b.value},u(d(v))),{leading:f(t=>[l(e.$slots,`leading`,s(a(t)))]),default:f(t=>[l(e.$slots,`default`,s(a(t)))]),trailing:f(t=>[l(e.$slots,`trailing`,s(a(t)))]),_:3},16,[`class`]))}});export{g as default};
|
|
1
|
+
import{cn as e}from"../../theme/merge.js";import"../../theme/index.js";import{buttonVariants as t}from"../button/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,toHandlers as u,unref as d,withCtx as f}from"vue";import{useForwardListeners as p,useOmitProps as m}from"@soybeanjs/headless/composables";import{Clipboard as h}from"@soybeanjs/headless/clipboard";const g=i({name:`SClipboard`,__name:`clipboard`,props:{class:{type:[Boolean,null,String,Object,Array]},color:{},size:{},variant:{},shape:{},fitContent:{type:Boolean},value:{},copiedDuration:{},legacy:{type:Boolean},copyIcon:{},copiedIcon:{},copyText:{},copiedText:{},type:{},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`click`,`copied`,`copyError`],setup(i,{emit:g}){let _=i,v=p(g),y=m(_,[`class`,`color`,`size`,`variant`,`shape`,`fitContent`]),b=n(()=>e(t({color:_.color,size:_.size,variant:_.variant,shape:_.shape,fitContent:_.fitContent}),_.class));return(e,t)=>(c(),r(d(h),o(d(y),{class:b.value},u(d(v))),{leading:f(t=>[l(e.$slots,`leading`,s(a(t)))]),default:f(t=>[l(e.$slots,`default`,s(a(t)))]),trailing:f(t=>[l(e.$slots,`trailing`,s(a(t)))]),_:3},16,[`class`]))}});export{g as default};
|
|
@@ -36,11 +36,11 @@ type __VLS_Slots = {} & {
|
|
|
36
36
|
trailing?: (props: typeof __VLS_15) => any;
|
|
37
37
|
};
|
|
38
38
|
declare const __VLS_base: _$vue.DefineComponent<ClipboardProps, {}, {}, {}, {}, _$vue.ComponentOptionsMixin, _$vue.ComponentOptionsMixin, {
|
|
39
|
-
click: (event:
|
|
39
|
+
click: (event: PointerEvent) => any;
|
|
40
40
|
copied: (value: string) => any;
|
|
41
41
|
copyError: (error: unknown) => any;
|
|
42
42
|
}, string, _$vue.PublicProps, Readonly<ClipboardProps> & Readonly<{
|
|
43
|
-
onClick?: ((event:
|
|
43
|
+
onClick?: ((event: PointerEvent) => any) | undefined;
|
|
44
44
|
onCopied?: ((value: string) => any) | undefined;
|
|
45
45
|
onCopyError?: ((error: unknown) => any) | undefined;
|
|
46
46
|
}>, {}, {}, {}, {}, string, _$vue.ComponentProvideOptions, false, {}, any>;
|
|
@@ -3,7 +3,7 @@ import { CollapsibleRootEmits, CollapsibleRootProps, CollapsibleUi } from "@soyb
|
|
|
3
3
|
|
|
4
4
|
//#region src/components/collapsible/types.d.ts
|
|
5
5
|
/**
|
|
6
|
-
*
|
|
6
|
+
* Properties for the Collapsible component.
|
|
7
7
|
*/
|
|
8
8
|
interface CollapsibleProps extends CollapsibleRootProps {
|
|
9
9
|
/**
|
|
@@ -16,7 +16,7 @@ interface CollapsibleProps extends CollapsibleRootProps {
|
|
|
16
16
|
ui?: Partial<CollapsibleUi>;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
|
-
*
|
|
19
|
+
* Events for the Collapsible component.
|
|
20
20
|
*/
|
|
21
21
|
type CollapsibleEmits = CollapsibleRootEmits;
|
|
22
22
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{colorAreaVariants as t}from"./variants.js";import{computed as n,createBlock as r,createVNode as i,defineComponent as a,guardReactiveProps as o,mergeProps as s,normalizeProps as c,openBlock as l,toHandlers as u,unref as d,withCtx as f}from"vue";import{useForwardListeners as p,useOmitProps as m}from"@soybeanjs/headless/composables";import{ColorAreaArea as h,ColorAreaRoot as g,ColorAreaThumb as _,provideColorAreaUi as v}from"@soybeanjs/headless/color-area";const y=a({name:`SColorArea`,__name:`color-area`,props:{class:{},size:{},ui:{},areaProps:{},thumbProps:{},modelValue:{},defaultValue:{},colorSpace:{},format:{},xChannel:{},yChannel:{},disabled:{type:Boolean},xName:{},yName:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`update:color`,`change`,`changeEnd`],setup(a,{emit:y}){let b=a,x=p(y),S=m(b,[`class`,`size`,`ui`,`areaProps`,`thumbProps`,`onChange`]);return v(n(()=>e(t({size:b.size}),b.ui,{root:b.class}))),(e,t)=>(l(),r(d(g),s(d(S),u(d(x))),{default:f(()=>[i(d(h),c(o(a.areaProps)),{default:f(()=>[i(d(_),c(o(a.thumbProps)),null,16)]),_:1},16)]),_:1},16))}});export{y as default};
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{colorAreaVariants as t}from"./variants.js";import{computed as n,createBlock as r,createVNode as i,defineComponent as a,guardReactiveProps as o,mergeProps as s,normalizeProps as c,openBlock as l,toHandlers as u,unref as d,withCtx as f}from"vue";import{useForwardListeners as p,useOmitProps as m}from"@soybeanjs/headless/composables";import{ColorAreaArea as h,ColorAreaRoot as g,ColorAreaThumb as _,provideColorAreaUi as v}from"@soybeanjs/headless/color-area";const y=a({name:`SColorArea`,__name:`color-area`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},areaProps:{},thumbProps:{},modelValue:{},defaultValue:{},colorSpace:{},format:{},xChannel:{},yChannel:{},disabled:{type:Boolean},xName:{},yName:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`update:color`,`change`,`changeEnd`],setup(a,{emit:y}){let b=a,x=p(y),S=m(b,[`class`,`size`,`ui`,`areaProps`,`thumbProps`,`onChange`]);return v(n(()=>e(t({size:b.size}),b.ui,{root:b.class}))),(e,t)=>(l(),r(d(g),s(d(S),u(d(x))),{default:f(()=>[i(d(h),c(o(a.areaProps)),{default:f(()=>[i(d(_),c(o(a.thumbProps)),null,16)]),_:1},16)]),_:1},16))}});export{y as default};
|
|
@@ -4,7 +4,7 @@ import { ClassValue } from "@soybeanjs/headless/types";
|
|
|
4
4
|
|
|
5
5
|
//#region src/components/color-area/types.d.ts
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Properties for the ColorArea component.
|
|
8
8
|
*/
|
|
9
9
|
interface ColorAreaProps extends ColorAreaRootProps {
|
|
10
10
|
/**
|
|
@@ -20,16 +20,16 @@ interface ColorAreaProps extends ColorAreaRootProps {
|
|
|
20
20
|
*/
|
|
21
21
|
ui?: Partial<ColorAreaUi>;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Properties forwarded to the area element.
|
|
24
24
|
*/
|
|
25
25
|
areaProps?: ColorAreaAreaProps;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Properties forwarded to the thumb element.
|
|
28
28
|
*/
|
|
29
29
|
thumbProps?: ColorAreaThumbProps;
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
|
-
*
|
|
32
|
+
* Events for the ColorArea component.
|
|
33
33
|
*/
|
|
34
34
|
type ColorAreaEmits = ColorAreaRootEmits;
|
|
35
35
|
//#endregion
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{colorFieldVariants as t}from"./variants.js";import{computed as n,createBlock as r,createVNode as i,defineComponent as a,guardReactiveProps as o,mergeProps as s,normalizeProps as c,openBlock as l,toHandlers as u,unref as d,useAttrs as f,withCtx as p}from"vue";import{useForwardListeners as m,useOmitProps as h}from"@soybeanjs/headless/composables";import{ColorFieldInput as g,ColorFieldRoot as _,provideColorFieldUi as v}from"@soybeanjs/headless/color-field";const y=a({name:`SColorField`,inheritAttrs:!1,__name:`color-field`,props:{class:{},size:{},ui:{},inputProps:{},modelValue:{},defaultValue:{},colorSpace:{},channel:{},format:{},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},disableWheelChange:{type:Boolean},step:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`update:color`],setup(a,{emit:y}){let b=a,x=y,S=f(),C=m(x),w=h(b,[`class`,`size`,`ui`,`inputProps`]);return v(n(()=>e(t({size:b.size}),b.ui,{root:b.class}))),(e,t)=>(l(),r(d(_),s(d(w),u(d(C))),{default:p(()=>[i(d(g),c(o({...a.inputProps,...d(S)})),null,16)]),_:1},16))}});export{y as default};
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{colorFieldVariants as t}from"./variants.js";import{computed as n,createBlock as r,createVNode as i,defineComponent as a,guardReactiveProps as o,mergeProps as s,normalizeProps as c,openBlock as l,toHandlers as u,unref as d,useAttrs as f,withCtx as p}from"vue";import{useForwardListeners as m,useOmitProps as h}from"@soybeanjs/headless/composables";import{ColorFieldInput as g,ColorFieldRoot as _,provideColorFieldUi as v}from"@soybeanjs/headless/color-field";const y=a({name:`SColorField`,inheritAttrs:!1,__name:`color-field`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},inputProps:{},modelValue:{},defaultValue:{},colorSpace:{},channel:{},format:{},placeholder:{},disabled:{type:Boolean},readonly:{type:Boolean},disableWheelChange:{type:Boolean},step:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`update:color`],setup(a,{emit:y}){let b=a,x=y,S=f(),C=m(x),w=h(b,[`class`,`size`,`ui`,`inputProps`]);return v(n(()=>e(t({size:b.size}),b.ui,{root:b.class}))),(e,t)=>(l(),r(d(_),s(d(w),u(d(C))),{default:p(()=>[i(d(g),c(o({...a.inputProps,...d(S)})),null,16)]),_:1},16))}});export{y as default};
|
|
@@ -4,7 +4,7 @@ import { ClassValue } from "@soybeanjs/headless/types";
|
|
|
4
4
|
|
|
5
5
|
//#region src/components/color-field/types.d.ts
|
|
6
6
|
/**
|
|
7
|
-
*
|
|
7
|
+
* Properties for the ColorField component.
|
|
8
8
|
*/
|
|
9
9
|
interface ColorFieldProps extends ColorFieldRootProps {
|
|
10
10
|
/**
|
|
@@ -20,12 +20,12 @@ interface ColorFieldProps extends ColorFieldRootProps {
|
|
|
20
20
|
*/
|
|
21
21
|
ui?: Partial<ColorFieldUi>;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Properties forwarded to the input element.
|
|
24
24
|
*/
|
|
25
25
|
inputProps?: ColorFieldInputProps;
|
|
26
26
|
}
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* Events for the ColorField component.
|
|
29
29
|
*/
|
|
30
30
|
type ColorFieldEmits = ColorFieldRootEmits;
|
|
31
31
|
//#endregion
|
|
@@ -1 +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 r from"../color-area/color-area.js";import i from"../color-field/color-field.js";import a from"../color-slider/color-slider.js";import o from"../color-swatch-picker/color-swatch-picker.js";import s from"../color-swatch/color-swatch.js";import c from"../popover/popover.js";import l from"../segment/segment.js";import{COLOR_PICKER_FORMATS as u,DEFAULT_COLOR_PICKER_SWATCHES as d,resolveColorPickerFormat as f}from"./shared.js";import{colorPickerVariants as p}from"./variants.js";import{computed as m,createBlock as h,createCommentVNode as g,createElementBlock as _,createElementVNode as v,createVNode as y,defineComponent as b,mergeProps as x,normalizeClass as S,openBlock as C,renderSlot as w,shallowRef as T,toDisplayString as E,unref as D,watch as O,withCtx as k}from"vue";import{useControllableState as A,usePickProps as j}from"@soybeanjs/headless/composables";import{areColorsEqual as M,formatColor as N,toColorObject as P}from"@soybeanjs/headless/shared";const F=b({name:`SColorPicker`,__name:`color-picker`,props:{class:{},size:{},ui:{},modelValue:{default:void 0},defaultValue:{default:`#7f007f`},format:{default:void 0},defaultFormat:{default:void 0},disabled:{type:Boolean,default:!1},colorSpace:{default:`hsl`},showAlpha:{type:Boolean,default:!0},showFields:{type:Boolean,default:!0},showSwatches:{type:Boolean,default:!0},swatches:{default:()=>d},triggerButtonProps:{},areaProps:{},hueSliderProps:{},alphaSliderProps:{},alphaFieldProps:{},hexFieldProps:{},fieldProps:{},swatchPickerProps:{},swatchProps:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!1},placement:{default:`bottom`},showArrow:{type:Boolean,default:!0},positionerProps:{},popupProps:{},triggerProps:{},closeProps:{},portalProps:{},arrowProps:{}},emits:[`update:modelValue`,`update:color`,`update:format`,`update:open`,`change`],setup(d,{emit:b}){let F=d,I=b,L=A(()=>F.format,e=>{I(`update:format`,e)},f(F.defaultFormat,F.modelValue??F.defaultValue)),R=T(F.modelValue??F.defaultValue),z=T(),B=m(()=>e(p({size:F.size}),F.ui,{popup:F.class})),V=m(()=>t[F.size??`md`]),H=m(()=>N(R.value,`hex`)),U=m(()=>f(L.value,R.value)),W=m(()=>N(R.value,U.value)),G=m(()=>U.value.toUpperCase()),K=m(()=>U.value===`hex`?F.hexFieldProps:F.fieldProps),q=m(()=>F.alphaFieldProps??F.fieldProps),J=m(()=>u.map(e=>({value:e,label:e.toUpperCase()}))),Y=m(()=>F.colorSpace===`oklch`?`chroma`:`saturation`),X=m(()=>F.colorSpace===`hsv`?`brightness`:`lightness`),Z=j(F,[`open`,`defaultOpen`,`modal`,`placement`,`showArrow`,`positionerProps`,`popupProps`,`triggerProps`,`closeProps`,`portalProps`,`arrowProps`]);O(()=>F.modelValue,e=>{e!=null&&(typeof e==`string`&&e===z.value||M(e,R.value)||(R.value=e))},{immediate:!0});function Q(e){let t=F.colorSpace;return P(e,t)}function $(e){let t=N(e,U.value);R.value=e,z.value=t,I(`update:modelValue`,t),I(`update:color`,Q(e)),I(`change`,t)}function ee(e){U.value!==e&&(L.value=e)}function te(e){$(e)}function ne(e){typeof e==`string`&&$(e)}return(e,t)=>(C(),h(c,x(D(Z),{class:B.value.popup,size:d.size,"onUpdate:open":t[0]||=e=>I(`update:open`,e)}),{trigger:k(()=>[w(e.$slots,`trigger`,{color:R.value,hex:H.value,value:W.value,format:U.value},()=>[y(n,x(d.triggerButtonProps,{size:d.size,disabled:d.disabled,color:`accent`,variant:`pure`}),{default:k(()=>[y(s,x(d.swatchProps,{class:B.value.triggerSwatch,color:H.value,size:V.value,shape:`circle`}),null,16,[`class`,`color`,`size`]),v(`span`,{class:S(B.value.triggerValue)},E(W.value),3)]),_:1},16,[`size`,`disabled`])])]),default:k(()=>[v(`div`,{class:S(B.value.content)},[y(l,{class:S(B.value.segment),"model-value":U.value,items:J.value,size:d.size,fill:`full`,disabled:d.disabled,"onUpdate:modelValue":ee},null,8,[`class`,`model-value`,`items`,`size`,`disabled`]),y(r,x(d.areaProps,{class:B.value.area,"model-value":R.value,"color-space":d.colorSpace,"x-channel":Y.value,"y-channel":X.value,disabled:d.disabled,"onUpdate:color":$}),null,16,[`class`,`model-value`,`color-space`,`x-channel`,`y-channel`,`disabled`]),v(`div`,{class:S(B.value.sliderSwatch)},[v(`div`,{class:S(B.value.sliderRoot)},[y(a,x(d.hueSliderProps,{size:d.size,"model-value":R.value,channel:`hue`,"color-space":d.colorSpace,disabled:d.disabled,"onUpdate:color":$}),null,16,[`size`,`model-value`,`color-space`,`disabled`]),d.showAlpha?(C(),h(a,x({key:0},d.alphaSliderProps,{size:d.size,"model-value":R.value,channel:`alpha`,"color-space":d.colorSpace,disabled:d.disabled,"onUpdate:color":$}),null,16,[`size`,`model-value`,`color-space`,`disabled`])):g(`v-if`,!0)],2),y(s,x(d.swatchProps,{size:d.size,color:H.value,class:B.value.swatch}),null,16,[`size`,`color`,`class`])],2),d.showFields?(C(),_(`div`,{key:0,class:S(B.value.fields)},[y(i,x(K.value,{size:d.size,class:B.value.field,"model-value":H.value,format:U.value,placeholder:G.value,disabled:d.disabled,"onUpdate:modelValue":te}),null,16,[`size`,`class`,`model-value`,`format`,`placeholder`,`disabled`]),d.showAlpha?(C(),h(i,x({key:0},q.value,{size:d.size,class:B.value.alphaField,"model-value":R.value,channel:`alpha`,"color-space":d.colorSpace,disabled:d.disabled,"onUpdate:color":$}),null,16,[`size`,`class`,`model-value`,`color-space`,`disabled`])):g(`v-if`,!0)],2)):g(`v-if`,!0),d.showSwatches&&d.swatches.length?(C(),h(o,x({key:1},d.swatchPickerProps,{size:d.size,class:B.value.swatches,colors:d.swatches,"model-value":H.value,disabled:d.disabled,"onUpdate:modelValue":ne}),null,16,[`size`,`class`,`colors`,`model-value`,`disabled`])):g(`v-if`,!0)],2)]),_:3},16,[`class`,`size`]))}});export{F as default};
|
|
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 r from"../color-area/color-area.js";import i from"../color-field/color-field.js";import a from"../color-slider/color-slider.js";import o from"../color-swatch-picker/color-swatch-picker.js";import s from"../color-swatch/color-swatch.js";import c from"../popover/popover.js";import l from"../segment/segment.js";import{COLOR_PICKER_FORMATS as u,DEFAULT_COLOR_PICKER_SWATCHES as d,resolveColorPickerFormat as f}from"./shared.js";import{colorPickerVariants as p}from"./variants.js";import{computed as m,createBlock as h,createCommentVNode as g,createElementBlock as _,createElementVNode as v,createVNode as y,defineComponent as b,mergeProps as x,normalizeClass as S,openBlock as C,renderSlot as w,shallowRef as T,toDisplayString as E,unref as D,watch as O,withCtx as k}from"vue";import{useControllableState as A,usePickProps as j}from"@soybeanjs/headless/composables";import{areColorsEqual as M,formatColor as N,toColorObject as P}from"@soybeanjs/headless/shared";const F=b({name:`SColorPicker`,__name:`color-picker`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},modelValue:{default:void 0},defaultValue:{default:`#7f007f`},format:{default:void 0},defaultFormat:{default:void 0},disabled:{type:Boolean,default:!1},colorSpace:{default:`hsl`},showAlpha:{type:Boolean,default:!0},showFields:{type:Boolean,default:!0},showSwatches:{type:Boolean,default:!0},swatches:{default:()=>d},triggerButtonProps:{},areaProps:{},hueSliderProps:{},alphaSliderProps:{},alphaFieldProps:{},hexFieldProps:{},fieldProps:{},swatchPickerProps:{},swatchProps:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1},modal:{type:Boolean,default:!1},placement:{default:`bottom`},showArrow:{type:Boolean,default:!0},positionerProps:{},popupProps:{},triggerProps:{},closeProps:{},portalProps:{},arrowProps:{}},emits:[`update:modelValue`,`update:color`,`update:format`,`update:open`,`change`],setup(d,{emit:b}){let F=d,I=b,L=A(()=>F.format,e=>{I(`update:format`,e)},f(F.defaultFormat,F.modelValue??F.defaultValue)),R=T(F.modelValue??F.defaultValue),z=T(),B=m(()=>e(p({size:F.size}),F.ui,{popup:F.class})),V=m(()=>t[F.size??`md`]),H=m(()=>N(R.value,`hex`)),U=m(()=>f(L.value,R.value)),W=m(()=>N(R.value,U.value)),G=m(()=>U.value.toUpperCase()),K=m(()=>U.value===`hex`?F.hexFieldProps:F.fieldProps),q=m(()=>F.alphaFieldProps??F.fieldProps),J=m(()=>u.map(e=>({value:e,label:e.toUpperCase()}))),Y=m(()=>F.colorSpace===`oklch`?`chroma`:`saturation`),X=m(()=>F.colorSpace===`hsv`?`brightness`:`lightness`),Z=j(F,[`open`,`defaultOpen`,`modal`,`placement`,`showArrow`,`positionerProps`,`popupProps`,`triggerProps`,`closeProps`,`portalProps`,`arrowProps`]);O(()=>F.modelValue,e=>{e!=null&&(typeof e==`string`&&e===z.value||M(e,R.value)||(R.value=e))},{immediate:!0});function Q(e){let t=F.colorSpace;return P(e,t)}function $(e){let t=N(e,U.value);R.value=e,z.value=t,I(`update:modelValue`,t),I(`update:color`,Q(e)),I(`change`,t)}function ee(e){U.value!==e&&(L.value=e)}function te(e){$(e)}function ne(e){typeof e==`string`&&$(e)}return(e,t)=>(C(),h(c,x(D(Z),{class:B.value.popup,size:d.size,"onUpdate:open":t[0]||=e=>I(`update:open`,e)}),{trigger:k(()=>[w(e.$slots,`trigger`,{color:R.value,hex:H.value,value:W.value,format:U.value},()=>[y(n,x(d.triggerButtonProps,{size:d.size,disabled:d.disabled,color:`accent`,variant:`pure`}),{default:k(()=>[y(s,x(d.swatchProps,{class:B.value.triggerSwatch,color:H.value,size:V.value,shape:`circle`}),null,16,[`class`,`color`,`size`]),v(`span`,{class:S(B.value.triggerValue)},E(W.value),3)]),_:1},16,[`size`,`disabled`])])]),default:k(()=>[v(`div`,{class:S(B.value.content)},[y(l,{class:S(B.value.segment),"model-value":U.value,items:J.value,size:d.size,fill:`full`,disabled:d.disabled,"onUpdate:modelValue":ee},null,8,[`class`,`model-value`,`items`,`size`,`disabled`]),y(r,x(d.areaProps,{class:B.value.area,"model-value":R.value,"color-space":d.colorSpace,"x-channel":Y.value,"y-channel":X.value,disabled:d.disabled,"onUpdate:color":$}),null,16,[`class`,`model-value`,`color-space`,`x-channel`,`y-channel`,`disabled`]),v(`div`,{class:S(B.value.sliderSwatch)},[v(`div`,{class:S(B.value.sliderRoot)},[y(a,x(d.hueSliderProps,{size:d.size,"model-value":R.value,channel:`hue`,"color-space":d.colorSpace,disabled:d.disabled,"onUpdate:color":$}),null,16,[`size`,`model-value`,`color-space`,`disabled`]),d.showAlpha?(C(),h(a,x({key:0},d.alphaSliderProps,{size:d.size,"model-value":R.value,channel:`alpha`,"color-space":d.colorSpace,disabled:d.disabled,"onUpdate:color":$}),null,16,[`size`,`model-value`,`color-space`,`disabled`])):g(`v-if`,!0)],2),y(s,x(d.swatchProps,{size:d.size,color:H.value,class:B.value.swatch}),null,16,[`size`,`color`,`class`])],2),d.showFields?(C(),_(`div`,{key:0,class:S(B.value.fields)},[y(i,x(K.value,{size:d.size,class:B.value.field,"model-value":H.value,format:U.value,placeholder:G.value,disabled:d.disabled,"onUpdate:modelValue":te}),null,16,[`size`,`class`,`model-value`,`format`,`placeholder`,`disabled`]),d.showAlpha?(C(),h(i,x({key:0},q.value,{size:d.size,class:B.value.alphaField,"model-value":R.value,channel:`alpha`,"color-space":d.colorSpace,disabled:d.disabled,"onUpdate:color":$}),null,16,[`size`,`class`,`model-value`,`color-space`,`disabled`])):g(`v-if`,!0)],2)):g(`v-if`,!0),d.showSwatches&&d.swatches.length?(C(),h(o,x({key:1},d.swatchPickerProps,{size:d.size,class:B.value.swatches,colors:d.swatches,"model-value":H.value,disabled:d.disabled,"onUpdate:modelValue":ne}),null,16,[`size`,`class`,`colors`,`model-value`,`disabled`])):g(`v-if`,!0)],2)]),_:3},16,[`class`,`size`]))}});export{F as default};
|
|
@@ -11,15 +11,15 @@ import { ClassValue, UiClass } from "@soybeanjs/headless/types";
|
|
|
11
11
|
|
|
12
12
|
//#region src/components/color-picker/types.d.ts
|
|
13
13
|
/**
|
|
14
|
-
* Available UI slots for the
|
|
14
|
+
* Available UI slots for the ColorPicker component.
|
|
15
15
|
*/
|
|
16
16
|
type ColorPickerUiSlot = 'popup' | 'content' | 'trigger' | 'triggerSwatch' | 'triggerValue' | 'formatSelect' | 'area' | 'slider' | 'alphaRow' | 'alphaSwatch' | 'fields' | 'hexField' | 'field' | 'alphaField' | 'swatches';
|
|
17
17
|
/**
|
|
18
|
-
* UI class overrides for the
|
|
18
|
+
* UI class overrides for the ColorPicker component.
|
|
19
19
|
*/
|
|
20
20
|
type ColorPickerUi = UiClass<ColorPickerUiSlot>;
|
|
21
21
|
/**
|
|
22
|
-
*
|
|
22
|
+
* Properties for the ColorPicker component.
|
|
23
23
|
*/
|
|
24
24
|
interface ColorPickerProps extends Pick<PopoverProps, 'open' | 'defaultOpen' | 'modal' | 'placement' | 'showArrow' | 'positionerProps' | 'popupProps' | 'triggerProps' | 'closeProps' | 'portalProps' | 'arrowProps'> {
|
|
25
25
|
/**
|
|
@@ -75,44 +75,44 @@ interface ColorPickerProps extends Pick<PopoverProps, 'open' | 'defaultOpen' | '
|
|
|
75
75
|
*/
|
|
76
76
|
swatches?: string[];
|
|
77
77
|
/**
|
|
78
|
-
*
|
|
78
|
+
* Properties forwarded to the trigger button element.
|
|
79
79
|
*/
|
|
80
80
|
triggerButtonProps?: ButtonProps;
|
|
81
81
|
/**
|
|
82
|
-
*
|
|
82
|
+
* Properties forwarded to the area element.
|
|
83
83
|
*/
|
|
84
84
|
areaProps?: Omit<ColorAreaProps, 'modelValue' | 'defaultValue' | 'disabled' | 'colorSpace' | 'format' | 'xChannel' | 'yChannel' | 'onChange' | 'onChangeEnd'>;
|
|
85
85
|
/**
|
|
86
|
-
*
|
|
86
|
+
* Properties forwarded to the hue slider element.
|
|
87
87
|
*/
|
|
88
88
|
hueSliderProps?: Omit<ColorSliderProps, 'modelValue' | 'defaultValue' | 'channel' | 'colorSpace' | 'disabled' | 'format' | 'onChange' | 'onChangeEnd'>;
|
|
89
89
|
/**
|
|
90
|
-
*
|
|
90
|
+
* Properties forwarded to the alpha slider element.
|
|
91
91
|
*/
|
|
92
92
|
alphaSliderProps?: Omit<ColorSliderProps, 'modelValue' | 'defaultValue' | 'channel' | 'colorSpace' | 'disabled' | 'format' | 'onChange' | 'onChangeEnd'>;
|
|
93
93
|
/**
|
|
94
|
-
*
|
|
94
|
+
* Properties forwarded to the alpha field element.
|
|
95
95
|
*/
|
|
96
96
|
alphaFieldProps?: Omit<ColorFieldProps, 'modelValue' | 'defaultValue' | 'disabled' | 'channel' | 'colorSpace' | 'format'>;
|
|
97
97
|
/**
|
|
98
|
-
*
|
|
98
|
+
* Properties forwarded to the hex field element.
|
|
99
99
|
*/
|
|
100
100
|
hexFieldProps?: Omit<ColorFieldProps, 'modelValue' | 'defaultValue' | 'disabled' | 'channel' | 'colorSpace' | 'format'>;
|
|
101
101
|
/**
|
|
102
|
-
*
|
|
102
|
+
* Properties forwarded to the field element.
|
|
103
103
|
*/
|
|
104
104
|
fieldProps?: Omit<ColorFieldProps, 'modelValue' | 'defaultValue' | 'disabled' | 'channel' | 'colorSpace' | 'format'>;
|
|
105
105
|
/**
|
|
106
|
-
*
|
|
106
|
+
* Properties forwarded to the swatch picker element.
|
|
107
107
|
*/
|
|
108
108
|
swatchPickerProps?: Omit<ColorSwatchPickerProps, 'modelValue' | 'defaultValue' | 'colors' | 'disabled'>;
|
|
109
109
|
/**
|
|
110
|
-
*
|
|
110
|
+
* Properties forwarded to the swatch element.
|
|
111
111
|
*/
|
|
112
112
|
swatchProps?: Omit<ColorSwatchProps, 'class' | 'color' | 'size'>;
|
|
113
113
|
}
|
|
114
114
|
/**
|
|
115
|
-
*
|
|
115
|
+
* Events for the ColorPicker component.
|
|
116
116
|
*/
|
|
117
117
|
type ColorPickerEmits = {
|
|
118
118
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{sliderVariants as t}from"../slider/variants.js";import{computed as n,createBlock as r,createVNode as i,defineComponent as a,guardReactiveProps as o,mergeProps as s,normalizeProps as c,openBlock as l,toHandlers as u,unref as d,withCtx as f}from"vue";import{useForwardListeners as p,useOmitProps as m}from"@soybeanjs/headless/composables";import{ColorSliderRoot as h,ColorSliderThumb as g,ColorSliderTrack as _,provideColorSliderUi as v}from"@soybeanjs/headless/color-slider";const y=a({name:`SColorSlider`,__name:`color-slider`,props:{class:{},color:{default:`accent`},size:{default:`md`},ui:{},trackProps:{},thumbProps:{},modelValue:{},defaultValue:{},colorSpace:{},channel:{},format:{},orientation:{},dir:{},inverted:{type:Boolean},disabled:{type:Boolean},step:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`update:color`,`change`,`changeEnd`],setup(a,{emit:y}){let b=a,x=p(y),S=m(b,[`class`,`size`,`ui`,`trackProps`,`thumbProps`,`onChange`]);return v(n(()=>e(t({color:b.color,size:b.size}),b.ui,{root:b.class}))),(e,t)=>(l(),r(d(h),s(d(S),u(d(x))),{default:f(()=>[i(d(_),c(o(a.trackProps)),null,16),i(d(g),c(o(a.thumbProps)),null,16)]),_:1},16))}});export{y as default};
|
|
1
|
+
import{mergeSlotVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{sliderVariants as t}from"../slider/variants.js";import{computed as n,createBlock as r,createVNode as i,defineComponent as a,guardReactiveProps as o,mergeProps as s,normalizeProps as c,openBlock as l,toHandlers as u,unref as d,withCtx as f}from"vue";import{useForwardListeners as p,useOmitProps as m}from"@soybeanjs/headless/composables";import{ColorSliderRoot as h,ColorSliderThumb as g,ColorSliderTrack as _,provideColorSliderUi as v}from"@soybeanjs/headless/color-slider";const y=a({name:`SColorSlider`,__name:`color-slider`,props:{class:{type:[Boolean,null,String,Object,Array]},color:{default:`accent`},size:{default:`md`},ui:{},trackProps:{},thumbProps:{},modelValue:{},defaultValue:{},colorSpace:{},channel:{},format:{},orientation:{},dir:{},inverted:{type:Boolean},disabled:{type:Boolean},step:{},asChild:{type:Boolean},as:{},name:{},required:{type:Boolean}},emits:[`update:modelValue`,`update:color`,`change`,`changeEnd`],setup(a,{emit:y}){let b=a,x=p(y),S=m(b,[`class`,`size`,`ui`,`trackProps`,`thumbProps`,`onChange`]);return v(n(()=>e(t({color:b.color,size:b.size}),b.ui,{root:b.class}))),(e,t)=>(l(),r(d(h),s(d(S),u(d(x))),{default:f(()=>[i(d(_),c(o(a.trackProps)),null,16),i(d(g),c(o(a.thumbProps)),null,16)]),_:1},16))}});export{y as default};
|