@soybeanjs/ui 0.0.2-beta.12 → 0.0.2-beta.13

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.
Files changed (125) hide show
  1. package/README.md +38 -10
  2. package/dist/components/accordion/accordion.vue.d.ts +3 -3
  3. package/dist/components/alert/alert.js +1 -1
  4. package/dist/components/alert/alert.vue.d.ts +4 -4
  5. package/dist/components/alert-dialog/alert-dialog-action.js +1 -1
  6. package/dist/components/alert-dialog/alert-dialog-action.vue.d.ts +3 -3
  7. package/dist/components/alert-dialog/alert-dialog-cancel.js +1 -1
  8. package/dist/components/alert-dialog/alert-dialog-cancel.vue.d.ts +3 -3
  9. package/dist/components/alert-dialog/alert-dialog.js +1 -1
  10. package/dist/components/alert-dialog/alert-dialog.vue.d.ts +6 -5
  11. package/dist/components/alert-dialog/types.d.ts +12 -1
  12. package/dist/components/avatar/avatar.vue.d.ts +7 -7
  13. package/dist/components/badge/badge.vue.d.ts +4 -4
  14. package/dist/components/breadcrumb/breadcrumb.vue.d.ts +3 -3
  15. package/dist/components/button/button-group.js +1 -1
  16. package/dist/components/button/button-group.vue.d.ts +6 -6
  17. package/dist/components/button/button-icon.js +1 -1
  18. package/dist/components/button/button-icon.vue.d.ts +4 -4
  19. package/dist/components/button/button-link.vue.d.ts +4 -4
  20. package/dist/components/button/button-loading.js +1 -1
  21. package/dist/components/button/button-loading.vue.d.ts +3 -3
  22. package/dist/components/button/button.vue.d.ts +4 -4
  23. package/dist/components/card/card.vue.d.ts +3 -3
  24. package/dist/components/checkbox/checkbox-card-group.vue.d.ts +3 -3
  25. package/dist/components/checkbox/checkbox-card.vue.d.ts +8 -8
  26. package/dist/components/checkbox/checkbox-group.vue.d.ts +3 -3
  27. package/dist/components/checkbox/checkbox.vue.d.ts +12 -12
  28. package/dist/components/collapsible/collapsible.vue.d.ts +6 -6
  29. package/dist/components/command/command.vue.d.ts +7 -7
  30. package/dist/components/config-provider/config-provider.js +1 -1
  31. package/dist/components/config-provider/config-provider.vue.d.ts +7 -7
  32. package/dist/components/config-provider/context.js +1 -1
  33. package/dist/components/config-provider/types.d.ts +2 -0
  34. package/dist/components/context-menu/context-menu-checkbox.vue.d.ts +9 -9
  35. package/dist/components/context-menu/context-menu-radio.vue.d.ts +9 -9
  36. package/dist/components/context-menu/context-menu-wrapper.vue.d.ts +13 -13
  37. package/dist/components/context-menu/context-menu.vue.d.ts +9 -9
  38. package/dist/components/dialog/context.d.ts +8 -0
  39. package/dist/components/dialog/context.js +1 -0
  40. package/dist/components/dialog/dialog-close.js +1 -1
  41. package/dist/components/dialog/dialog-close.vue.d.ts +2 -2
  42. package/dist/components/dialog/dialog-provider.js +1 -0
  43. package/dist/components/dialog/dialog-pure.js +1 -1
  44. package/dist/components/dialog/dialog-pure.vue.d.ts +12 -12
  45. package/dist/components/dialog/dialog.js +1 -1
  46. package/dist/components/dialog/dialog.vue.d.ts +12 -12
  47. package/dist/components/dialog/index.d.ts +2 -1
  48. package/dist/components/dialog/types.d.ts +26 -3
  49. package/dist/components/drawer/drawer-close.js +1 -1
  50. package/dist/components/drawer/drawer-close.vue.d.ts +2 -2
  51. package/dist/components/drawer/drawer.js +1 -1
  52. package/dist/components/drawer/drawer.vue.d.ts +12 -12
  53. package/dist/components/dropdown-menu/dropdown-menu-checkbox.vue.d.ts +9 -9
  54. package/dist/components/dropdown-menu/dropdown-menu-radio.vue.d.ts +9 -9
  55. package/dist/components/dropdown-menu/dropdown-menu-wrapper.vue.d.ts +13 -13
  56. package/dist/components/dropdown-menu/dropdown-menu.vue.d.ts +9 -9
  57. package/dist/components/form/form-field-array.vue.d.ts +2 -2
  58. package/dist/components/form/form-field.vue.d.ts +2 -2
  59. package/dist/components/form/form.vue.d.ts +2 -2
  60. package/dist/components/icon/icon.vue.d.ts +4 -4
  61. package/dist/components/input/input.vue.d.ts +4 -4
  62. package/dist/components/kbd/kbd.vue.d.ts +3 -3
  63. package/dist/components/label/label.vue.d.ts +2 -2
  64. package/dist/components/layout/layout-trigger.vue.d.ts +2 -2
  65. package/dist/components/layout/layout.vue.d.ts +4 -4
  66. package/dist/components/link/link.vue.d.ts +4 -4
  67. package/dist/components/list/list-item.vue.d.ts +2 -2
  68. package/dist/components/list/list.vue.d.ts +2 -2
  69. package/dist/components/menu/menu-checkbox-options.vue.d.ts +3 -3
  70. package/dist/components/menu/menu-option.vue.d.ts +9 -9
  71. package/dist/components/menu/menu-options.vue.d.ts +9 -9
  72. package/dist/components/menu/menu-radio-options.vue.d.ts +3 -3
  73. package/dist/components/navigation-menu/navigation-menu.vue.d.ts +11 -11
  74. package/dist/components/number-input/number-input.vue.d.ts +4 -4
  75. package/dist/components/pagination/pagination.vue.d.ts +4 -4
  76. package/dist/components/password/password.vue.d.ts +4 -4
  77. package/dist/components/popover/popover.vue.d.ts +13 -13
  78. package/dist/components/radio-group/radio-card-group.vue.d.ts +3 -3
  79. package/dist/components/radio-group/radio-card.vue.d.ts +2 -2
  80. package/dist/components/radio-group/radio-group.vue.d.ts +3 -3
  81. package/dist/components/radio-group/radio.vue.d.ts +2 -2
  82. package/dist/components/segment/segment.vue.d.ts +3 -3
  83. package/dist/components/select/select.vue.d.ts +7 -7
  84. package/dist/components/separator/separator.vue.d.ts +5 -5
  85. package/dist/components/switch/switch.vue.d.ts +19 -19
  86. package/dist/components/tabs/tabs.vue.d.ts +3 -3
  87. package/dist/components/tag/tag.vue.d.ts +4 -4
  88. package/dist/components/textarea/textarea.vue.d.ts +4 -4
  89. package/dist/components/toast/context.d.ts +8 -0
  90. package/dist/components/toast/context.js +1 -0
  91. package/dist/components/toast/index.d.ts +5 -0
  92. package/dist/components/toast/index.js +1 -0
  93. package/dist/components/toast/shared.js +1 -0
  94. package/dist/components/toast/toast-provider.js +1 -0
  95. package/dist/components/toast/toast.js +1 -0
  96. package/dist/components/toast/toast.vue.d.ts +21 -0
  97. package/dist/components/toast/types.d.ts +60 -0
  98. package/dist/components/tooltip/tooltip.vue.d.ts +9 -9
  99. package/dist/components/tree/tree-virtualizer.vue.d.ts +5 -5
  100. package/dist/components/tree/tree.vue.d.ts +5 -5
  101. package/dist/components/tree-menu/tree-menu-item-wrapper.vue.d.ts +2 -2
  102. package/dist/components/tree-menu/tree-menu-item.js +1 -1
  103. package/dist/components/tree-menu/tree-menu.vue.d.ts +3 -3
  104. package/dist/components/virtualizer/virtualizer.vue.d.ts +3 -3
  105. package/dist/constants/components.d.ts +1 -0
  106. package/dist/constants/components.js +1 -1
  107. package/dist/index.d.ts +13 -8
  108. package/dist/index.js +1 -1
  109. package/dist/styles.css +1 -14
  110. package/dist/theme/index.d.ts +1 -0
  111. package/dist/theme/shared.d.ts +1 -0
  112. package/dist/theme/shared.js +1 -1
  113. package/dist/variants/alert.d.ts +3 -3
  114. package/dist/variants/badge.d.ts +3 -3
  115. package/dist/variants/button.d.ts +3 -3
  116. package/dist/variants/checkbox.d.ts +3 -3
  117. package/dist/variants/pagination.d.ts +3 -3
  118. package/dist/variants/radio-group.d.ts +3 -3
  119. package/dist/variants/separator.d.ts +3 -3
  120. package/dist/variants/switch.d.ts +3 -3
  121. package/dist/variants/tag.d.ts +3 -3
  122. package/dist/variants/textarea.d.ts +3 -3
  123. package/dist/variants/toast.d.ts +61 -0
  124. package/dist/variants/toast.js +1 -0
  125. package/package.json +14 -13
package/README.md CHANGED
@@ -2,6 +2,35 @@
2
2
 
3
3
  SoybeanUI is built on top of SoybeanHeadless, providing a collection of styled components for Vue 3.
4
4
 
5
+ ## Installation
6
+
7
+ ```bash
8
+ pnpm add @soybeanjs/ui
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ - import styles
14
+
15
+ ```ts
16
+ import '@soybeanjs/ui/styles.css';
17
+ ```
18
+
19
+ - use with `unplugin-vue-components`
20
+
21
+ ```ts
22
+ import Components from 'unplugin-vue-components/vite';
23
+ import UiResolver from '@soybeanjs/ui/resolver';
24
+
25
+ export default defineConfig({
26
+ plugins: [
27
+ Components({
28
+ resolvers: [UiResolver()]
29
+ })
30
+ ]
31
+ });
32
+ ```
33
+
5
34
  ## Roadmap
6
35
 
7
36
  ### Components
@@ -47,13 +76,13 @@ SoybeanUI is built on top of SoybeanHeadless, providing a collection of styled c
47
76
  | 33 | 1 | Popover | ✅ Completed | | |
48
77
  | 34 | 1 | RadioGroup | ✅ Completed | | ✨ support radio card |
49
78
  | 35 | 1 | Segment | ✅ Completed | | |
50
- | 36 | 1 | Select | ✅ Completed | | support virtualized |
79
+ | 36 | 1 | Select | ✅ Completed | | |
51
80
  | 37 | 1 | Separator | ✅ Completed | Divider | |
52
- | 38 | 1 | Switch | ✅ Completed | | support switch card |
81
+ | 38 | 1 | Switch | ✅ Completed | | support switch card |
53
82
  | 39 | 1 | Tabs | ✅ Completed | | |
54
83
  | 40 | 1 | Tag | ✅ Completed | Badge(shadcn-ui) | |
55
- | 41 | 1 | Textarea | ✅ Completed | | support auto size |
56
- | 42 | 1 | Toast | | Sonner | |
84
+ | 41 | 1 | Textarea | ✅ Completed | | support auto size |
85
+ | 42 | 1 | Toast | ✅ Completed | Sonner | migrant from vue-sonner |
57
86
  | 43 | 1 | Tooltip | ✅ Completed | | |
58
87
  | 44 | 1 | Tree | ✅ Completed | | ✨ support virtualized |
59
88
  | 45 | 1 | TreeMenu | ✅ Completed | | |
@@ -123,7 +152,7 @@ SoybeanUI is built on top of SoybeanHeadless, providing a collection of styled c
123
152
 
124
153
  ### Utilities
125
154
 
126
- 10 / total: 14
155
+ 12 / total: 13
127
156
 
128
157
  | No. | Priority | Name | Status | 📝 Note |
129
158
  | --- | -------- | ------------------- | ------------ | -------------- |
@@ -136,8 +165,7 @@ SoybeanUI is built on top of SoybeanHeadless, providing a collection of styled c
136
165
  | 7 | 1 | useDismissableLayer | ✅ Completed | |
137
166
  | 8 | 1 | useFocusGuards | ✅ Completed | |
138
167
  | 9 | 1 | useFocusScope | ✅ Completed | |
139
- | 10 | 1 | useMessage | | |
140
- | 11 | 1 | useModal | | |
141
- | 12 | 1 | useNotification | | |
142
- | 13 | 1 | usePresence | ✅ Completed | |
143
- | 14 | 2 | useLoadingBar | | |
168
+ | 10 | 1 | usePresence | ✅ Completed | |
169
+ | 11 | 1 | useDialog | ✅ Completed | |
170
+ | 12 | 1 | useToast | ✅ Completed | |
171
+ | 13 | 2 | useLoadingBar | | |
@@ -1,11 +1,11 @@
1
1
  import { AccordionOptionData, AccordionProps } from "./types.js";
2
- import * as vue172 from "vue";
2
+ import * as vue31 from "vue";
3
3
 
4
4
  //#region src/components/accordion/accordion.vue.d.ts
5
5
  declare const __VLS_export: <T extends AccordionOptionData = AccordionOptionData, M extends boolean = false>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
6
6
  props: __VLS_PrettifyLocal<AccordionProps<T, M> & {
7
7
  "onUpdate:modelValue"?: ((value: M extends true ? string[] : string) => any) | undefined;
8
- }> & vue172.PublicProps;
8
+ }> & vue31.PublicProps;
9
9
  expose: (exposed: {}) => void;
10
10
  attrs: any;
11
11
  slots: {
@@ -39,7 +39,7 @@ declare const __VLS_export: <T extends AccordionOptionData = AccordionOptionData
39
39
  }) => any;
40
40
  };
41
41
  emit: (evt: "update:modelValue", value: M extends true ? string[] : string) => void;
42
- }>) => vue172.VNode & {
42
+ }>) => vue31.VNode & {
43
43
  __ctx?: Awaited<typeof __VLS_setup>;
44
44
  };
45
45
  declare const _default: typeof __VLS_export;
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import t from"../icon/icon.js";import{alertVariants as n}from"../../variants/alert.js";import r from"../button/button-icon.js";import{computed as i,createBlock as a,createCommentVNode as o,createTextVNode as s,createVNode as c,defineComponent as l,guardReactiveProps as u,mergeProps as d,normalizeClass as f,normalizeProps as p,openBlock as m,renderSlot as h,toDisplayString as g,unref as _,useSlots as v,withCtx as y}from"vue";import{AlertClose as b,AlertContent as x,AlertDescription as S,AlertRoot as C,AlertTitle as w,provideAlertThemeContext as T}from"@soybeanjs/headless";var E=l({name:`SAlert`,__name:`alert`,props:{size:{},color:{},variant:{},ui:{},title:{},description:{},icon:{},closable:{type:Boolean},contentProps:{},titleProps:{},descriptionProps:{},closeProps:{},open:{type:Boolean,default:void 0}},emits:[`update:open`],setup(l,{emit:E}){let D=l,O=E,k=v(),A=i(()=>e(n({size:D.size,color:D.color,variant:D.variant}),D.ui));return T({ui:A}),(e,n)=>(m(),a(_(C),{open:l.open,"onUpdate:open":n[0]||=e=>O(`update:open`,e)},{default:y(()=>[h(e.$slots,`leading`,{},()=>[l.icon?(m(),a(t,{key:0,icon:l.icon,class:f(A.value.icon)},null,8,[`icon`,`class`])):o(`v-if`,!0)]),c(_(x),p(u(l.contentProps)),{default:y(()=>[_(k).title||l.title?(m(),a(_(w),p(d({key:0},l.titleProps)),{default:y(()=>[h(e.$slots,`title`,{},()=>[s(g(l.title),1)])]),_:3},16)):o(`v-if`,!0),_(k).description||l.description?(m(),a(_(S),p(d({key:1},l.descriptionProps)),{default:y(()=>[h(e.$slots,`description`,{},()=>[s(g(l.description),1)])]),_:3},16)):o(`v-if`,!0),h(e.$slots,`default`)]),_:3},16),h(e.$slots,`trailing`),l.closable?(m(),a(_(b),d({key:0},l.closeProps,{"as-child":``}),{default:y(()=>[h(e.$slots,`close`,{},()=>[c(r,{icon:`lucide:x`,size:l.size},null,8,[`size`])])]),_:3},16)):o(`v-if`,!0)]),_:3},8,[`open`]))}});export{E as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import t from"../button/button-icon.js";import n from"../icon/icon.js";import{alertVariants as r}from"../../variants/alert.js";import{computed as i,createBlock as a,createCommentVNode as o,createTextVNode as s,createVNode as c,defineComponent as l,guardReactiveProps as u,mergeProps as d,normalizeClass as f,normalizeProps as p,openBlock as m,renderSlot as h,toDisplayString as g,unref as _,useSlots as v,withCtx as y}from"vue";import{AlertClose as b,AlertContent as x,AlertDescription as S,AlertRoot as C,AlertTitle as w,provideAlertThemeContext as T}from"@soybeanjs/headless";var E=l({name:`SAlert`,__name:`alert`,props:{size:{},color:{},variant:{},ui:{},title:{},description:{},icon:{},closable:{type:Boolean},contentProps:{},titleProps:{},descriptionProps:{},closeProps:{},open:{type:Boolean,default:void 0}},emits:[`update:open`],setup(l,{emit:E}){let D=l,O=E,k=v(),A=i(()=>e(r({size:D.size,color:D.color,variant:D.variant}),D.ui));return T({ui:A}),(e,r)=>(m(),a(_(C),{open:l.open,"onUpdate:open":r[0]||=e=>O(`update:open`,e)},{default:y(()=>[h(e.$slots,`leading`,{},()=>[l.icon?(m(),a(n,{key:0,icon:l.icon,class:f(A.value.icon)},null,8,[`icon`,`class`])):o(`v-if`,!0)]),c(_(x),p(u(l.contentProps)),{default:y(()=>[_(k).title||l.title?(m(),a(_(w),p(d({key:0},l.titleProps)),{default:y(()=>[h(e.$slots,`title`,{},()=>[s(g(l.title),1)])]),_:3},16)):o(`v-if`,!0),_(k).description||l.description?(m(),a(_(S),p(d({key:1},l.descriptionProps)),{default:y(()=>[h(e.$slots,`description`,{},()=>[s(g(l.description),1)])]),_:3},16)):o(`v-if`,!0),h(e.$slots,`default`)]),_:3},16),h(e.$slots,`trailing`),l.closable?(m(),a(_(b),d({key:0},l.closeProps,{"as-child":``}),{default:y(()=>[h(e.$slots,`close`,{},()=>[c(t,{icon:`lucide:x`,size:l.size},null,8,[`size`])])]),_:3},16)):o(`v-if`,!0)]),_:3},8,[`open`]))}});export{E as default};
@@ -1,5 +1,5 @@
1
1
  import { AlertProps } from "./types.js";
2
- import * as vue163 from "vue";
2
+ import * as vue72 from "vue";
3
3
 
4
4
  //#region src/components/alert/alert.vue.d.ts
5
5
  declare var __VLS_10: {}, __VLS_26: {}, __VLS_33: {}, __VLS_35: {}, __VLS_37: {}, __VLS_44: {};
@@ -16,13 +16,13 @@ type __VLS_Slots = {} & {
16
16
  } & {
17
17
  close?: (props: typeof __VLS_44) => any;
18
18
  };
19
- declare const __VLS_base: vue163.DefineComponent<AlertProps, {}, {}, {}, {}, vue163.ComponentOptionsMixin, vue163.ComponentOptionsMixin, {
19
+ declare const __VLS_base: vue72.DefineComponent<AlertProps, {}, {}, {}, {}, vue72.ComponentOptionsMixin, vue72.ComponentOptionsMixin, {
20
20
  "update:open": (open: boolean) => any;
21
- }, string, vue163.PublicProps, Readonly<AlertProps> & Readonly<{
21
+ }, string, vue72.PublicProps, Readonly<AlertProps> & Readonly<{
22
22
  "onUpdate:open"?: ((open: boolean) => any) | undefined;
23
23
  }>, {
24
24
  open: boolean;
25
- }, {}, {}, {}, string, vue163.ComponentProvideOptions, false, {}, any>;
25
+ }, {}, {}, {}, string, vue72.ComponentProvideOptions, false, {}, any>;
26
26
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
27
27
  declare const _default: typeof __VLS_export;
28
28
  type __VLS_WithSlots<T, S> = T & {
@@ -1 +1 @@
1
- import{useSizeContext as e}from"../../theme/context.js";import t from"../button/button.js";import{createBlock as n,createTextVNode as r,createVNode as i,defineComponent as a,mergeProps as o,openBlock as s,renderSlot as c,toDisplayString as l,unref as u,withCtx as d}from"vue";import{useOmitProps as f}from"@soybeanjs/headless/composables";import{DialogClose as p}from"@soybeanjs/headless";var m=a({name:`SAlertDialogAction`,__name:`alert-dialog-action`,props:{text:{default:`Confirm`},color:{},size:{},variant:{},shape:{},shadow:{},fitContent:{type:Boolean},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a){let m=f(a,[`text`]),{size:h}=e(`AlertDialogAction`);return(e,f)=>(s(),n(u(p),{"as-child":``},{default:d(()=>[c(e.$slots,`content`,{},()=>[i(t,o(u(m),{size:u(h)}),{default:d(()=>[c(e.$slots,`default`,{},()=>[r(l(a.text),1)])]),_:3},16,[`size`])])]),_:3}))}});export{m as default};
1
+ import{useSizeContext as e}from"../../theme/context.js";import t from"../button/button.js";import{createBlock as n,createTextVNode as r,createVNode as i,defineComponent as a,mergeProps as o,openBlock as s,renderSlot as c,toDisplayString as l,unref as u,withCtx as d}from"vue";import{useOmitProps as f}from"@soybeanjs/headless/composables";import{AlertDialogClose as p}from"@soybeanjs/headless";var m=a({name:`SAlertDialogAction`,__name:`alert-dialog-action`,props:{text:{default:`Confirm`},beforeClose:{},color:{},size:{},variant:{},shape:{},shadow:{},fitContent:{type:Boolean},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a){let m=f(a,[`text`]),{size:h}=e(`AlertDialogAction`);return(e,f)=>(s(),n(u(p),{"as-child":``,"before-close":a.beforeClose},{default:d(()=>[c(e.$slots,`content`,{},()=>[i(t,o(u(m),{size:u(h)}),{default:d(()=>[c(e.$slots,`default`,{},()=>[r(l(a.text),1)])]),_:3},16,[`size`])])]),_:3},8,[`before-close`]))}});export{m as default};
@@ -1,5 +1,5 @@
1
1
  import { AlertDialogActionProps } from "./types.js";
2
- import * as vue188 from "vue";
2
+ import * as vue89 from "vue";
3
3
 
4
4
  //#region src/components/alert-dialog/alert-dialog-action.vue.d.ts
5
5
  declare var __VLS_7: {}, __VLS_13: {};
@@ -8,9 +8,9 @@ type __VLS_Slots = {} & {
8
8
  } & {
9
9
  default?: (props: typeof __VLS_13) => any;
10
10
  };
11
- declare const __VLS_base: vue188.DefineComponent<AlertDialogActionProps, {}, {}, {}, {}, vue188.ComponentOptionsMixin, vue188.ComponentOptionsMixin, {}, string, vue188.PublicProps, Readonly<AlertDialogActionProps> & Readonly<{}>, {
11
+ declare const __VLS_base: vue89.DefineComponent<AlertDialogActionProps, {}, {}, {}, {}, vue89.ComponentOptionsMixin, vue89.ComponentOptionsMixin, {}, string, vue89.PublicProps, Readonly<AlertDialogActionProps> & Readonly<{}>, {
12
12
  text: string;
13
- }, {}, {}, {}, string, vue188.ComponentProvideOptions, false, {}, any>;
13
+ }, {}, {}, {}, string, vue89.ComponentProvideOptions, false, {}, any>;
14
14
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
15
  declare const _default: typeof __VLS_export;
16
16
  type __VLS_WithSlots<T, S> = T & {
@@ -1 +1 @@
1
- import{useSizeContext as e}from"../../theme/context.js";import t from"../button/button.js";import{createBlock as n,createTextVNode as r,createVNode as i,defineComponent as a,mergeProps as o,openBlock as s,renderSlot as c,toDisplayString as l,unref as u,withCtx as d}from"vue";import{useOmitProps as f}from"@soybeanjs/headless/composables";import{AlertDialogClose as p}from"@soybeanjs/headless";var m=a({name:`SAlertDialogCancel`,__name:`alert-dialog-cancel`,props:{text:{default:`Cancel`},color:{},size:{},variant:{default:`plain`},shape:{},shadow:{},fitContent:{type:Boolean},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a){let m=f(a,[`text`]),{size:h}=e(`AlertDialogCancel`);return(e,f)=>(s(),n(u(p),{"as-child":``},{default:d(()=>[c(e.$slots,`content`,{},()=>[i(t,o(u(m),{size:u(h)}),{default:d(()=>[c(e.$slots,`default`,{},()=>[r(l(a.text),1)])]),_:3},16,[`size`])])]),_:3}))}});export{m as default};
1
+ import{useSizeContext as e}from"../../theme/context.js";import t from"../button/button.js";import{createBlock as n,createTextVNode as r,createVNode as i,defineComponent as a,mergeProps as o,openBlock as s,renderSlot as c,toDisplayString as l,unref as u,withCtx as d}from"vue";import{useOmitProps as f}from"@soybeanjs/headless/composables";import{AlertDialogClose as p}from"@soybeanjs/headless";var m=a({name:`SAlertDialogCancel`,__name:`alert-dialog-cancel`,props:{text:{default:`Cancel`},beforeClose:{},color:{},size:{},variant:{default:`plain`},shape:{},shadow:{},fitContent:{type:Boolean},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a){let m=f(a,[`text`]),{size:h}=e(`AlertDialogCancel`);return(e,f)=>(s(),n(u(p),{"as-child":``,"before-close":a.beforeClose},{default:d(()=>[c(e.$slots,`content`,{},()=>[i(t,o(u(m),{size:u(h)}),{default:d(()=>[c(e.$slots,`default`,{},()=>[r(l(a.text),1)])]),_:3},16,[`size`])])]),_:3},8,[`before-close`]))}});export{m as default};
@@ -1,7 +1,7 @@
1
1
  import { ButtonVariant } from "../../variants/button.js";
2
2
  import { AlertDialogCancelProps } from "./types.js";
3
3
  import "../button/index.js";
4
- import * as vue200 from "vue";
4
+ import * as vue84 from "vue";
5
5
 
6
6
  //#region src/components/alert-dialog/alert-dialog-cancel.vue.d.ts
7
7
  declare var __VLS_7: {}, __VLS_13: {};
@@ -10,10 +10,10 @@ type __VLS_Slots = {} & {
10
10
  } & {
11
11
  default?: (props: typeof __VLS_13) => any;
12
12
  };
13
- declare const __VLS_base: vue200.DefineComponent<AlertDialogCancelProps, {}, {}, {}, {}, vue200.ComponentOptionsMixin, vue200.ComponentOptionsMixin, {}, string, vue200.PublicProps, Readonly<AlertDialogCancelProps> & Readonly<{}>, {
13
+ declare const __VLS_base: vue84.DefineComponent<AlertDialogCancelProps, {}, {}, {}, {}, vue84.ComponentOptionsMixin, vue84.ComponentOptionsMixin, {}, string, vue84.PublicProps, Readonly<AlertDialogCancelProps> & Readonly<{}>, {
14
14
  text: string;
15
15
  variant: ButtonVariant;
16
- }, {}, {}, {}, string, vue200.ComponentProvideOptions, false, {}, any>;
16
+ }, {}, {}, {}, string, vue84.ComponentProvideOptions, false, {}, any>;
17
17
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
18
18
  declare const _default: typeof __VLS_export;
19
19
  type __VLS_WithSlots<T, S> = T & {
@@ -1 +1 @@
1
- import{mergeSlotVariants as e}from"../../theme/shared.js";import{provideSizeContext as t}from"../../theme/context.js";import n from"../icon/icon.js";import{dialogVariants as r}from"../../variants/dialog.js";import{computed as i,createBlock as a,createCommentVNode as o,createTextVNode as s,createVNode as c,defineComponent as l,guardReactiveProps as u,mergeProps as d,normalizeClass as f,normalizeProps as p,openBlock as m,renderSlot as h,toDisplayString as g,toHandlers as _,unref as v,useSlots as y,withCtx as b}from"vue";import{useForwardListeners as x,useOmitProps as S}from"@soybeanjs/headless/composables";import{AlertDialogContent as C,AlertDialogDescription as w,AlertDialogFooter as T,AlertDialogHeader as E,AlertDialogOverlay as D,AlertDialogPortal as O,AlertDialogRoot as k,AlertDialogTitle as A,AlertDialogTrigger as j,provideDialogThemeContext as M}from"@soybeanjs/headless";var N=l({name:`SAlertDialog`,__name:`alert-dialog`,props:{type:{},size:{},ui:{},title:{},description:{},triggerProps:{},contentProps:{},headerProps:{},footerProps:{},titleProps:{},descriptionProps:{},overlayProps:{},portalProps:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1}},emits:[`update:open`],setup(l,{emit:N}){let P=l,F=S(P,[`size`,`ui`,`type`,`title`,`description`,`triggerProps`,`contentProps`,`headerProps`,`footerProps`,`titleProps`,`descriptionProps`,`overlayProps`,`portalProps`]),I=N,L=y(),R=x(I),z=i(()=>e(r({size:P.size}),P.ui)),B={destructive:{icon:`lucide:circle-x`,class:`text-destructive`},success:{icon:`lucide:circle-check`,class:`text-success`},warning:{icon:`lucide:circle-alert`,class:`text-warning`},info:{icon:`lucide:info`,class:`text-info`}},V=i(()=>P.type?B[P.type]:null);return M({ui:z}),t(()=>P.size),(e,t)=>(m(),a(v(k),d(v(F),{"onUpdate:open":t[0]||=e=>I(`update:open`,e)}),{default:b(t=>[c(v(j),d(l.triggerProps,{size:l.size}),{default:b(()=>[h(e.$slots,`trigger`)]),_:3},16,[`size`]),c(v(O),p(u(l.portalProps)),{default:b(()=>[c(v(D),p(u(l.overlayProps)),null,16),c(v(C),d(l.contentProps,_(v(R))),{default:b(()=>[c(v(E),p(u(l.headerProps)),{default:b(()=>[c(v(A),p(u(l.titleProps)),{default:b(()=>[V.value?(m(),a(n,{key:0,icon:V.value.icon,class:f(V.value.class)},null,8,[`icon`,`class`])):o(`v-if`,!0),h(e.$slots,`title`,p(u(t)),()=>[s(g(l.title),1)])]),_:2},1040),v(L).description||l.description?(m(),a(v(w),p(d({key:0},l.descriptionProps)),{default:b(()=>[h(e.$slots,`description`,p(u(t)),()=>[s(g(l.description),1)])]),_:2},1040)):o(`v-if`,!0)]),_:2},1040),h(e.$slots,`default`,p(u(t))),v(L).footer?(m(),a(v(T),p(d({key:0},l.footerProps)),{default:b(()=>[h(e.$slots,`footer`,p(u(t)))]),_:2},1040)):o(`v-if`,!0)]),_:2},1040)]),_:2},1040)]),_:3},16))}});export{N as default};
1
+ import{mergeSlotVariants as e}from"../../theme/shared.js";import{provideSizeContext as t}from"../../theme/context.js";import{dialogVariants as n}from"../../variants/dialog.js";import r from"../icon/icon.js";import{computed as i,createBlock as a,createCommentVNode as o,createTextVNode as s,createVNode as c,defineComponent as l,guardReactiveProps as u,mergeProps as d,normalizeClass as f,normalizeProps as p,openBlock as m,renderSlot as h,toDisplayString as g,toHandlers as _,unref as v,useSlots as y,withCtx as b}from"vue";import{useForwardListeners as x,useOmitProps as S}from"@soybeanjs/headless/composables";import{AlertDialogContent as C,AlertDialogDescription as w,AlertDialogFooter as T,AlertDialogHeader as E,AlertDialogOverlay as D,AlertDialogPortal as O,AlertDialogRoot as k,AlertDialogTitle as A,AlertDialogTrigger as j,provideDialogThemeContext as M}from"@soybeanjs/headless";var N=l({name:`SAlertDialog`,__name:`alert-dialog`,props:{type:{},showIcon:{type:Boolean,default:!0},size:{},ui:{},title:{},description:{},triggerProps:{},contentProps:{},headerProps:{},footerProps:{},titleProps:{},descriptionProps:{},overlayProps:{},portalProps:{},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean,default:!1}},emits:[`update:open`],setup(l,{emit:N}){let P=l,F=S(P,[`size`,`ui`,`type`,`title`,`description`,`triggerProps`,`contentProps`,`headerProps`,`footerProps`,`titleProps`,`descriptionProps`,`overlayProps`,`portalProps`]),I=N,L=y(),R=x(I),z=i(()=>e(n({size:P.size}),P.ui)),B={destructive:{icon:`lucide:circle-x`,class:`text-destructive`},success:{icon:`lucide:circle-check`,class:`text-success`},warning:{icon:`lucide:circle-alert`,class:`text-warning`},info:{icon:`lucide:info`,class:`text-info`}},V=i(()=>P.type?B[P.type]:null);return M({ui:z}),t(()=>P.size),(e,t)=>(m(),a(v(k),d(v(F),{"onUpdate:open":t[0]||=e=>I(`update:open`,e)}),{default:b(t=>[c(v(j),d(l.triggerProps,{size:l.size}),{default:b(()=>[h(e.$slots,`trigger`)]),_:3},16,[`size`]),c(v(O),p(u(l.portalProps)),{default:b(()=>[c(v(D),p(u(l.overlayProps)),null,16),c(v(C),d(l.contentProps,_(v(R))),{default:b(()=>[c(v(E),p(u(l.headerProps)),{default:b(()=>[c(v(A),p(u(l.titleProps)),{default:b(()=>[l.showIcon&&V.value?(m(),a(r,{key:0,icon:V.value.icon,class:f(V.value.class)},null,8,[`icon`,`class`])):o(`v-if`,!0),h(e.$slots,`title`,p(u(t)),()=>[s(g(l.title),1)])]),_:2},1040),v(L).description||l.description?(m(),a(v(w),p(d({key:0},l.descriptionProps)),{default:b(()=>[h(e.$slots,`description`,p(u(t)),()=>[s(g(l.description),1)])]),_:2},1040)):o(`v-if`,!0)]),_:2},1040),h(e.$slots,`default`,p(u(t))),v(L).footer?(m(),a(v(T),p(d({key:0},l.footerProps)),{default:b(()=>[h(e.$slots,`footer`,p(u(t)))]),_:2},1040)):o(`v-if`,!0)]),_:2},1040)]),_:2},1040)]),_:3},16))}});export{N as default};
@@ -1,5 +1,5 @@
1
1
  import { AlertDialogProps } from "./types.js";
2
- import * as vue195 from "vue";
2
+ import * as vue79 from "vue";
3
3
 
4
4
  //#region src/components/alert-dialog/alert-dialog.vue.d.ts
5
5
  declare var __VLS_15: {}, __VLS_46: {
@@ -26,14 +26,15 @@ type __VLS_Slots = {} & {
26
26
  } & {
27
27
  footer?: (props: typeof __VLS_62) => any;
28
28
  };
29
- declare const __VLS_base: vue195.DefineComponent<AlertDialogProps, {}, {}, {}, {}, vue195.ComponentOptionsMixin, vue195.ComponentOptionsMixin, {
29
+ declare const __VLS_base: vue79.DefineComponent<AlertDialogProps, {}, {}, {}, {}, vue79.ComponentOptionsMixin, vue79.ComponentOptionsMixin, {
30
30
  "update:open": (value: boolean) => any;
31
- }, string, vue195.PublicProps, Readonly<AlertDialogProps> & Readonly<{
31
+ }, string, vue79.PublicProps, Readonly<AlertDialogProps> & Readonly<{
32
32
  "onUpdate:open"?: ((value: boolean) => any) | undefined;
33
33
  }>, {
34
- defaultOpen: boolean;
35
34
  open: boolean;
36
- }, {}, {}, {}, string, vue195.ComponentProvideOptions, false, {}, any>;
35
+ defaultOpen: boolean;
36
+ showIcon: boolean;
37
+ }, {}, {}, {}, string, vue79.ComponentProvideOptions, false, {}, any>;
37
38
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
38
39
  declare const _default: typeof __VLS_export;
39
40
  type __VLS_WithSlots<T, S> = T & {
@@ -2,12 +2,13 @@ import { ThemeColor } from "../../theme/types.js";
2
2
  import "../../theme/index.js";
3
3
  import { DialogProps } from "../dialog/types.js";
4
4
  import { ButtonProps as ButtonProps$1 } from "../button/types.js";
5
- import { AlertDialogRootEmits } from "@soybeanjs/headless";
5
+ import { AlertDialogRootEmits, MaybePromise } from "@soybeanjs/headless";
6
6
 
7
7
  //#region src/components/alert-dialog/types.d.ts
8
8
  type AlertDialogType = Extract<ThemeColor, 'destructive' | 'success' | 'warning' | 'info'>;
9
9
  interface AlertDialogProps extends Omit<DialogProps, 'modal' | 'closable'> {
10
10
  type?: AlertDialogType;
11
+ showIcon?: boolean;
11
12
  }
12
13
  type AlertDialogEmits = AlertDialogRootEmits;
13
14
  interface AlertDialogCancelProps extends ButtonProps$1 {
@@ -17,6 +18,11 @@ interface AlertDialogCancelProps extends ButtonProps$1 {
17
18
  * @defaultValue 'Cancel'
18
19
  */
19
20
  text?: string;
21
+ /**
22
+ * Called before the dialog is closed. Can be used to prevent the dialog from closing.
23
+ * @returns A boolean or a promise that resolves to a boolean. if returns `false`, the dialog will not close.
24
+ */
25
+ beforeClose?: () => MaybePromise<boolean | void>;
20
26
  }
21
27
  interface AlertDialogActionProps extends ButtonProps$1 {
22
28
  /**
@@ -25,6 +31,11 @@ interface AlertDialogActionProps extends ButtonProps$1 {
25
31
  * @defaultValue 'Confirm'
26
32
  */
27
33
  text?: string;
34
+ /**
35
+ * Called before the dialog is closed. Can be used to prevent the dialog from closing.
36
+ * @returns A boolean or a promise that resolves to a boolean. if returns `false`, the dialog will not close.
37
+ */
38
+ beforeClose?: () => MaybePromise<boolean | void>;
28
39
  }
29
40
  //#endregion
30
41
  export { AlertDialogActionProps, AlertDialogCancelProps, AlertDialogEmits, AlertDialogProps, AlertDialogType };
@@ -1,6 +1,6 @@
1
1
  import { AvatarProps } from "./types.js";
2
- import * as vue6 from "vue";
3
- import * as _soybeanjs_headless0 from "@soybeanjs/headless";
2
+ import * as vue164 from "vue";
3
+ import * as _soybeanjs_headless67 from "@soybeanjs/headless";
4
4
 
5
5
  //#region src/components/avatar/avatar.vue.d.ts
6
6
  declare var __VLS_7: {}, __VLS_9: {}, __VLS_24: {};
@@ -11,11 +11,11 @@ type __VLS_Slots = {} & {
11
11
  } & {
12
12
  fallback?: (props: typeof __VLS_24) => any;
13
13
  };
14
- declare const __VLS_base: vue6.DefineComponent<AvatarProps, {}, {}, {}, {}, vue6.ComponentOptionsMixin, vue6.ComponentOptionsMixin, {
15
- loadingStatusChange: (status: _soybeanjs_headless0.ImageLoadingStatus) => any;
16
- }, string, vue6.PublicProps, Readonly<AvatarProps> & Readonly<{
17
- onLoadingStatusChange?: ((status: _soybeanjs_headless0.ImageLoadingStatus) => any) | undefined;
18
- }>, {}, {}, {}, {}, string, vue6.ComponentProvideOptions, false, {}, any>;
14
+ declare const __VLS_base: vue164.DefineComponent<AvatarProps, {}, {}, {}, {}, vue164.ComponentOptionsMixin, vue164.ComponentOptionsMixin, {
15
+ loadingStatusChange: (status: _soybeanjs_headless67.ImageLoadingStatus) => any;
16
+ }, string, vue164.PublicProps, Readonly<AvatarProps> & Readonly<{
17
+ onLoadingStatusChange?: ((status: _soybeanjs_headless67.ImageLoadingStatus) => any) | undefined;
18
+ }>, {}, {}, {}, {}, string, vue164.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,5 +1,5 @@
1
1
  import { BadgeProps } from "./types.js";
2
- import * as vue107 from "vue";
2
+ import * as vue154 from "vue";
3
3
 
4
4
  //#region src/components/badge/badge.vue.d.ts
5
5
  declare var __VLS_10: {}, __VLS_17: {};
@@ -8,13 +8,13 @@ type __VLS_Slots = {} & {
8
8
  } & {
9
9
  content?: (props: typeof __VLS_17) => any;
10
10
  };
11
- declare const __VLS_base: vue107.DefineComponent<BadgeProps, {}, {}, {}, {}, vue107.ComponentOptionsMixin, vue107.ComponentOptionsMixin, {
11
+ declare const __VLS_base: vue154.DefineComponent<BadgeProps, {}, {}, {}, {}, vue154.ComponentOptionsMixin, vue154.ComponentOptionsMixin, {
12
12
  "update:open": (open: boolean) => any;
13
- }, string, vue107.PublicProps, Readonly<BadgeProps> & Readonly<{
13
+ }, string, vue154.PublicProps, Readonly<BadgeProps> & Readonly<{
14
14
  "onUpdate:open"?: ((open: boolean) => any) | undefined;
15
15
  }>, {
16
16
  open: boolean;
17
- }, {}, {}, {}, string, vue107.ComponentProvideOptions, false, {}, any>;
17
+ }, {}, {}, {}, string, vue154.ComponentProvideOptions, false, {}, any>;
18
18
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
19
  declare const _default: typeof __VLS_export;
20
20
  type __VLS_WithSlots<T, S> = T & {
@@ -1,11 +1,11 @@
1
1
  import { BreadcrumbEmits, BreadcrumbOptionData, BreadcrumbProps } from "./types.js";
2
- import * as vue193 from "vue";
2
+ import * as vue188 from "vue";
3
3
 
4
4
  //#region src/components/breadcrumb/breadcrumb.vue.d.ts
5
5
  declare const __VLS_export: <T extends BreadcrumbOptionData = BreadcrumbOptionData>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
6
6
  props: __VLS_PrettifyLocal<BreadcrumbProps<T> & {
7
7
  onClick?: ((item: T) => any) | undefined;
8
- }> & vue193.PublicProps;
8
+ }> & vue188.PublicProps;
9
9
  expose: (exposed: {}) => void;
10
10
  attrs: any;
11
11
  slots: {
@@ -40,7 +40,7 @@ declare const __VLS_export: <T extends BreadcrumbOptionData = BreadcrumbOptionDa
40
40
  separator?: (props: {}) => any;
41
41
  };
42
42
  emit: BreadcrumbEmits<T>;
43
- }>) => vue193.VNode & {
43
+ }>) => vue188.VNode & {
44
44
  __ctx?: Awaited<typeof __VLS_setup>;
45
45
  };
46
46
  declare const _default: typeof __VLS_export;
@@ -1 +1 @@
1
- import{useConfigProvider as e}from"../config-provider/context.js";import{buttonGroupVariants as t}from"../../variants/button.js";import{provideButtonGroupContext 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{Primitive as f}from"@soybeanjs/headless";import{transformPropsToContext as p}from"@soybeanjs/headless/shared";var m=a({name:`SButtonGroup`,__name:`button-group`,props:{orientation:{default:`horizontal`},dir:{default:`ltr`},color:{},size:{},variant:{},shape:{},shadow:{},fitContent:{type:Boolean},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a){let m=a,h=d(m,[`orientation`,`color`,`size`,`variant`,`shape`,`shadow`,`disabled`]),g=e(`ButtonGroup`),_=r(()=>t({orientation:m.orientation})),v=r(()=>m.dir??g.dir.value);return n(p(m,[`color`,`size`,`variant`,`shape`,`shadow`,`fitContent`,`disabled`])),(e,t)=>(s(),i(l(f),o(l(h),{class:_.value,dir:v.value}),{default:u(()=>[c(e.$slots,`default`)]),_:3},16,[`class`,`dir`]))}});export{m as default};
1
+ import{buttonGroupVariants as e}from"../../variants/button.js";import{provideButtonGroupContext as t}from"./context.js";import{useConfigProvider as n}from"../config-provider/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{Primitive as f}from"@soybeanjs/headless";import{transformPropsToContext as p}from"@soybeanjs/headless/shared";var m=a({name:`SButtonGroup`,__name:`button-group`,props:{orientation:{default:`horizontal`},dir:{default:`ltr`},color:{},size:{},variant:{},shape:{},shadow:{},fitContent:{type:Boolean},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(a){let m=a,h=d(m,[`orientation`,`color`,`size`,`variant`,`shape`,`shadow`,`disabled`]),g=n(`ButtonGroup`),_=r(()=>e({orientation:m.orientation})),v=r(()=>m.dir??g.dir.value);return t(p(m,[`color`,`size`,`variant`,`shape`,`shadow`,`fitContent`,`disabled`])),(e,t)=>(s(),i(l(f),o(l(h),{class:_.value,dir:v.value}),{default:u(()=>[c(e.$slots,`default`)]),_:3},16,[`class`,`dir`]))}});export{m as default};
@@ -1,16 +1,16 @@
1
1
  import { ButtonGroupProps } from "./types.js";
2
- import * as vue220 from "vue";
3
- import * as _soybeanjs_headless87 from "@soybeanjs/headless";
2
+ import * as vue215 from "vue";
3
+ import * as _soybeanjs_headless74 from "@soybeanjs/headless";
4
4
 
5
5
  //#region src/components/button/button-group.vue.d.ts
6
6
  declare var __VLS_7: {};
7
7
  type __VLS_Slots = {} & {
8
8
  default?: (props: typeof __VLS_7) => any;
9
9
  };
10
- declare const __VLS_base: vue220.DefineComponent<ButtonGroupProps, {}, {}, {}, {}, vue220.ComponentOptionsMixin, vue220.ComponentOptionsMixin, {}, string, vue220.PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {
11
- orientation: _soybeanjs_headless87.DataOrientation;
12
- dir: _soybeanjs_headless87.Direction;
13
- }, {}, {}, {}, string, vue220.ComponentProvideOptions, false, {}, any>;
10
+ declare const __VLS_base: vue215.DefineComponent<ButtonGroupProps, {}, {}, {}, {}, vue215.ComponentOptionsMixin, vue215.ComponentOptionsMixin, {}, string, vue215.PublicProps, Readonly<ButtonGroupProps> & Readonly<{}>, {
11
+ dir: _soybeanjs_headless74.Direction;
12
+ orientation: _soybeanjs_headless74.DataOrientation;
13
+ }, {}, {}, {}, string, vue215.ComponentProvideOptions, false, {}, any>;
14
14
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
15
15
  declare const _default: typeof __VLS_export;
16
16
  type __VLS_WithSlots<T, S> = T & {
@@ -1 +1 @@
1
- import e from"../icon/icon.js";import t from"./button.js";import{createBlock as n,createVNode as r,defineComponent as i,guardReactiveProps as a,mergeProps as o,normalizeProps as s,openBlock as c,unref as l,withCtx as u}from"vue";import{useOmitProps as d}from"@soybeanjs/headless/composables";var f=i({name:`SButtonIcon`,__name:`button-icon`,props:{icon:{},iconProps:{},color:{default:`accent`},size:{},variant:{default:`ghost`},shape:{default:`square`},shadow:{},fitContent:{type:Boolean,default:!0},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(i){let f=d(i,[`icon`,`iconProps`]);return(d,p)=>(c(),n(t,s(a(l(f))),{default:u(()=>[r(e,o({icon:i.icon},i.iconProps),null,16,[`icon`])]),_:1},16))}});export{f as default};
1
+ import e from"./button.js";import t from"../icon/icon.js";import{createBlock as n,createVNode as r,defineComponent as i,guardReactiveProps as a,mergeProps as o,normalizeProps as s,openBlock as c,unref as l,withCtx as u}from"vue";import{useOmitProps as d}from"@soybeanjs/headless/composables";var f=i({name:`SButtonIcon`,__name:`button-icon`,props:{icon:{},iconProps:{},color:{default:`accent`},size:{},variant:{default:`ghost`},shape:{default:`square`},shadow:{},fitContent:{type:Boolean,default:!0},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(i){let f=d(i,[`icon`,`iconProps`]);return(d,p)=>(c(),n(e,s(a(l(f))),{default:u(()=>[r(t,o({icon:i.icon},i.iconProps),null,16,[`icon`])]),_:1},16))}});export{f as default};
@@ -2,15 +2,15 @@ import { ThemeColor } from "../../theme/types.js";
2
2
  import { ButtonShape, ButtonVariant } from "../../variants/button.js";
3
3
  import { ButtonIconProps } from "./types.js";
4
4
  import "../../index.js";
5
- import * as vue215 from "vue";
5
+ import * as vue210 from "vue";
6
6
 
7
7
  //#region src/components/button/button-icon.vue.d.ts
8
- declare const __VLS_export: vue215.DefineComponent<ButtonIconProps, {}, {}, {}, {}, vue215.ComponentOptionsMixin, vue215.ComponentOptionsMixin, {}, string, vue215.PublicProps, Readonly<ButtonIconProps> & Readonly<{}>, {
8
+ declare const __VLS_export: vue210.DefineComponent<ButtonIconProps, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {}, string, vue210.PublicProps, Readonly<ButtonIconProps> & Readonly<{}>, {
9
9
  color: ThemeColor;
10
- shape: ButtonShape;
11
10
  variant: ButtonVariant;
11
+ shape: ButtonShape;
12
12
  fitContent: boolean;
13
- }, {}, {}, {}, string, vue215.ComponentProvideOptions, false, {}, any>;
13
+ }, {}, {}, {}, string, vue210.ComponentProvideOptions, false, {}, any>;
14
14
  declare const _default: typeof __VLS_export;
15
15
  //#endregion
16
16
  export { _default };
@@ -1,22 +1,22 @@
1
1
  import { ButtonVariant } from "../../variants/button.js";
2
2
  import { ButtonLinkProps } from "./types.js";
3
- import * as vue225 from "vue";
3
+ import * as vue205 from "vue";
4
4
 
5
5
  //#region src/components/button/button-link.vue.d.ts
6
6
  declare var __VLS_10: {};
7
7
  type __VLS_Slots = {} & {
8
8
  default?: (props: typeof __VLS_10) => any;
9
9
  };
10
- declare const __VLS_base: vue225.DefineComponent<ButtonLinkProps, {}, {}, {}, {}, vue225.ComponentOptionsMixin, vue225.ComponentOptionsMixin, {}, string, vue225.PublicProps, Readonly<ButtonLinkProps> & Readonly<{}>, {
10
+ declare const __VLS_base: vue205.DefineComponent<ButtonLinkProps, {}, {}, {}, {}, vue205.ComponentOptionsMixin, vue205.ComponentOptionsMixin, {}, string, vue205.PublicProps, Readonly<ButtonLinkProps> & Readonly<{}>, {
11
+ disabled: boolean;
11
12
  replace: boolean;
12
13
  variant: ButtonVariant;
13
- disabled: boolean;
14
14
  viewTransition: boolean;
15
15
  external: boolean;
16
16
  noRel: boolean;
17
17
  prefetch: boolean;
18
18
  noPrefetch: boolean;
19
- }, {}, {}, {}, string, vue225.ComponentProvideOptions, false, {}, any>;
19
+ }, {}, {}, {}, string, vue205.ComponentProvideOptions, false, {}, any>;
20
20
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
21
  declare const _default: typeof __VLS_export;
22
22
  type __VLS_WithSlots<T, S> = T & {
@@ -1 +1 @@
1
- import e from"../icon/icon.js";import t from"./button.js";import{computed as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createElementVNode as o,createVNode as s,defineComponent as c,mergeProps as l,openBlock as u,ref as d,renderSlot as f,toDisplayString as p,unref as m,useAttrs as h,watchEffect as g,withCtx as _}from"vue";import{useOmitProps as v}from"@soybeanjs/headless/composables";const y={key:0,style:{display:`contents`}},b={style:{position:`absolute`,inset:`0`,"justify-content":`center`,"align-items":`center`,display:`flex`,gap:`0.25rem`,"z-index":`1`}},x={key:0},S={style:{visibility:`hidden`,display:`contents`}};var C=c({name:`SButtonLoading`,inheritAttrs:!1,__name:`button-loading`,props:{loading:{type:Boolean},loadingText:{},loadingDuration:{},autoLoading:{type:Boolean},loadingIcon:{default:`svg-spinners:270-ring`},loadingIconProps:{},loadingPosition:{default:`start`},color:{},size:{},variant:{},shape:{},shadow:{},fitContent:{type:Boolean},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(c){let C=c,w=h(),T=d(!1),E=n(()=>C.disabled||T.value),D=async e=>{C.autoLoading&&(T.value=!0);try{(Array.isArray(w.onClick)?w.onClick:[w.onClick]).forEach(t=>t?.(e))}finally{C.autoLoading&&(C.loadingDuration&&await new Promise(e=>{setTimeout(e,C.loadingDuration)}),T.value=!1)}},O=v(C,[`loading`,`loadingText`,`loadingDuration`,`autoLoading`,`loadingIcon`,`loadingIconProps`,`loadingPosition`],w,{onClick:D});return g(()=>{T.value=C.loading}),(n,d)=>(u(),r(t,l(m(O),{disabled:E.value,style:{position:`relative`},onClick:D}),{leading:_(()=>[T.value&&c.loadingPosition===`start`?(u(),r(e,l({key:0,icon:c.loadingIcon},c.loadingIconProps),null,16,[`icon`])):f(n.$slots,`leading`,{key:1})]),trailing:_(()=>[T.value&&c.loadingPosition===`end`?(u(),r(e,l({key:0,icon:c.loadingIcon},c.loadingIconProps),null,16,[`icon`])):f(n.$slots,`trailing`,{key:1})]),default:_(()=>[T.value&&c.loadingPosition===`center`?(u(),a(`span`,y,[o(`span`,b,[s(e,l({icon:c.loadingIcon},c.loadingIconProps),null,16,[`icon`]),c.loadingText?(u(),a(`span`,x,p(c.loadingText),1)):i(`v-if`,!0)]),o(`span`,S,[f(n.$slots,`default`,{loading:T.value})])])):f(n.$slots,`default`,{key:1,loading:T.value})]),_:3},16,[`disabled`]))}});export{C as default};
1
+ import e from"./button.js";import t from"../icon/icon.js";import{computed as n,createBlock as r,createCommentVNode as i,createElementBlock as a,createElementVNode as o,createVNode as s,defineComponent as c,mergeProps as l,openBlock as u,ref as d,renderSlot as f,toDisplayString as p,unref as m,useAttrs as h,watchEffect as g,withCtx as _}from"vue";import{useOmitProps as v}from"@soybeanjs/headless/composables";const y={key:0,style:{display:`contents`}},b={style:{position:`absolute`,inset:`0`,"justify-content":`center`,"align-items":`center`,display:`flex`,gap:`0.25rem`,"z-index":`1`}},x={key:0},S={style:{visibility:`hidden`,display:`contents`}};var C=c({name:`SButtonLoading`,inheritAttrs:!1,__name:`button-loading`,props:{loading:{type:Boolean},loadingText:{},loadingDuration:{},autoLoading:{type:Boolean},loadingIcon:{default:`svg-spinners:270-ring`},loadingIconProps:{},loadingPosition:{default:`start`},color:{},size:{},variant:{},shape:{},shadow:{},fitContent:{type:Boolean},disabled:{type:Boolean},asChild:{type:Boolean},as:{}},setup(c){let C=c,w=h(),T=d(!1),E=n(()=>C.disabled||T.value),D=async e=>{C.autoLoading&&(T.value=!0);try{(Array.isArray(w.onClick)?w.onClick:[w.onClick]).forEach(t=>t?.(e))}finally{C.autoLoading&&(C.loadingDuration&&await new Promise(e=>{setTimeout(e,C.loadingDuration)}),T.value=!1)}},O=v(C,[`loading`,`loadingText`,`loadingDuration`,`autoLoading`,`loadingIcon`,`loadingIconProps`,`loadingPosition`],w,{onClick:D});return g(()=>{T.value=C.loading}),(n,d)=>(u(),r(e,l(m(O),{disabled:E.value,style:{position:`relative`},onClick:D}),{leading:_(()=>[T.value&&c.loadingPosition===`start`?(u(),r(t,l({key:0,icon:c.loadingIcon},c.loadingIconProps),null,16,[`icon`])):f(n.$slots,`leading`,{key:1})]),trailing:_(()=>[T.value&&c.loadingPosition===`end`?(u(),r(t,l({key:0,icon:c.loadingIcon},c.loadingIconProps),null,16,[`icon`])):f(n.$slots,`trailing`,{key:1})]),default:_(()=>[T.value&&c.loadingPosition===`center`?(u(),a(`span`,y,[o(`span`,b,[s(t,l({icon:c.loadingIcon},c.loadingIconProps),null,16,[`icon`]),c.loadingText?(u(),a(`span`,x,p(c.loadingText),1)):i(`v-if`,!0)]),o(`span`,S,[f(n.$slots,`default`,{loading:T.value})])])):f(n.$slots,`default`,{key:1,loading:T.value})]),_:3},16,[`disabled`]))}});export{C as default};
@@ -1,5 +1,5 @@
1
1
  import { ButtonLoadingProps } from "./types.js";
2
- import * as vue210 from "vue";
2
+ import * as vue195 from "vue";
3
3
  import { Align } from "@soybeanjs/headless";
4
4
 
5
5
  //#region src/components/button/button-loading.vue.d.ts
@@ -17,10 +17,10 @@ type __VLS_Slots = {} & {
17
17
  } & {
18
18
  trailing?: (props: typeof __VLS_29) => any;
19
19
  };
20
- declare const __VLS_base: vue210.DefineComponent<ButtonLoadingProps, {}, {}, {}, {}, vue210.ComponentOptionsMixin, vue210.ComponentOptionsMixin, {}, string, vue210.PublicProps, Readonly<ButtonLoadingProps> & Readonly<{}>, {
20
+ declare const __VLS_base: vue195.DefineComponent<ButtonLoadingProps, {}, {}, {}, {}, vue195.ComponentOptionsMixin, vue195.ComponentOptionsMixin, {}, string, vue195.PublicProps, Readonly<ButtonLoadingProps> & Readonly<{}>, {
21
21
  loadingIcon: string;
22
22
  loadingPosition: Align;
23
- }, {}, {}, {}, string, vue210.ComponentProvideOptions, false, {}, any>;
23
+ }, {}, {}, {}, string, vue195.ComponentProvideOptions, false, {}, any>;
24
24
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
25
  declare const _default: typeof __VLS_export;
26
26
  type __VLS_WithSlots<T, S> = T & {
@@ -1,5 +1,5 @@
1
1
  import { ButtonProps } from "./types.js";
2
- import * as vue205 from "vue";
2
+ import * as vue200 from "vue";
3
3
 
4
4
  //#region src/components/button/button.vue.d.ts
5
5
  declare var __VLS_10: {}, __VLS_12: {}, __VLS_14: {};
@@ -10,11 +10,11 @@ type __VLS_Slots = {} & {
10
10
  } & {
11
11
  trailing?: (props: typeof __VLS_14) => any;
12
12
  };
13
- declare const __VLS_base: vue205.DefineComponent<ButtonProps, {}, {}, {}, {}, vue205.ComponentOptionsMixin, vue205.ComponentOptionsMixin, {
13
+ declare const __VLS_base: vue200.DefineComponent<ButtonProps, {}, {}, {}, {}, vue200.ComponentOptionsMixin, vue200.ComponentOptionsMixin, {
14
14
  click: (event: MouseEvent) => any;
15
- }, string, vue205.PublicProps, Readonly<ButtonProps> & Readonly<{
15
+ }, string, vue200.PublicProps, Readonly<ButtonProps> & Readonly<{
16
16
  onClick?: ((event: MouseEvent) => any) | undefined;
17
- }>, {}, {}, {}, {}, string, vue205.ComponentProvideOptions, false, {}, any>;
17
+ }>, {}, {}, {}, {}, string, vue200.ComponentProvideOptions, false, {}, any>;
18
18
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
19
19
  declare const _default: typeof __VLS_export;
20
20
  type __VLS_WithSlots<T, S> = T & {
@@ -1,5 +1,5 @@
1
1
  import { CardProps } from "./types.js";
2
- import * as vue117 from "vue";
2
+ import * as vue190 from "vue";
3
3
 
4
4
  //#region src/components/card/card.vue.d.ts
5
5
  type Slots = {
@@ -14,9 +14,9 @@ type Slots = {
14
14
  description: () => any;
15
15
  };
16
16
  type __VLS_Slots = Slots;
17
- declare const __VLS_base: vue117.DefineComponent<CardProps, {}, {}, {}, {}, vue117.ComponentOptionsMixin, vue117.ComponentOptionsMixin, {}, string, vue117.PublicProps, Readonly<CardProps> & Readonly<{}>, {
17
+ declare const __VLS_base: vue190.DefineComponent<CardProps, {}, {}, {}, {}, vue190.ComponentOptionsMixin, vue190.ComponentOptionsMixin, {}, string, vue190.PublicProps, Readonly<CardProps> & Readonly<{}>, {
18
18
  scrollable: boolean;
19
- }, {}, {}, {}, string, vue117.ComponentProvideOptions, false, {}, any>;
19
+ }, {}, {}, {}, string, vue190.ComponentProvideOptions, false, {}, any>;
20
20
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
21
21
  declare const _default: typeof __VLS_export;
22
22
  type __VLS_WithSlots<T, S> = T & {
@@ -1,17 +1,17 @@
1
1
  import { CheckboxCardGroupOptionData, CheckboxCardGroupProps } from "./types.js";
2
- import * as vue127 from "vue";
2
+ import * as vue290 from "vue";
3
3
  import { DefinedValue } from "@soybeanjs/headless";
4
4
 
5
5
  //#region src/components/checkbox/checkbox-card-group.vue.d.ts
6
6
  declare const __VLS_export: <T extends DefinedValue = DefinedValue, S extends CheckboxCardGroupOptionData<T> = CheckboxCardGroupOptionData<T>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
7
7
  props: __VLS_PrettifyLocal<CheckboxCardGroupProps<T, S> & {
8
8
  "onUpdate:modelValue"?: ((value: T[]) => any) | undefined;
9
- }> & vue127.PublicProps;
9
+ }> & vue290.PublicProps;
10
10
  expose: (exposed: {}) => void;
11
11
  attrs: any;
12
12
  slots: {};
13
13
  emit: (evt: "update:modelValue", value: T[]) => void;
14
- }>) => vue127.VNode & {
14
+ }>) => vue290.VNode & {
15
15
  __ctx?: Awaited<typeof __VLS_setup>;
16
16
  };
17
17
  declare const _default: typeof __VLS_export;
@@ -1,6 +1,6 @@
1
1
  import { CheckboxCardProps } from "./types.js";
2
- import * as vue122 from "vue";
3
- import * as _soybeanjs_headless35 from "@soybeanjs/headless";
2
+ import * as vue292 from "vue";
3
+ import * as _soybeanjs_headless152 from "@soybeanjs/headless";
4
4
 
5
5
  //#region src/components/checkbox/checkbox-card.vue.d.ts
6
6
  declare var __VLS_19: {
@@ -11,13 +11,13 @@ type __VLS_Slots = {} & {
11
11
  } & {
12
12
  description?: (props: typeof __VLS_26) => any;
13
13
  };
14
- declare const __VLS_base: vue122.DefineComponent<CheckboxCardProps, {}, {}, {}, {}, vue122.ComponentOptionsMixin, vue122.ComponentOptionsMixin, {
15
- "update:modelValue": (value: _soybeanjs_headless35.CheckedState | null) => any;
16
- }, string, vue122.PublicProps, Readonly<CheckboxCardProps> & Readonly<{
17
- "onUpdate:modelValue"?: ((value: _soybeanjs_headless35.CheckedState | null) => any) | undefined;
14
+ declare const __VLS_base: vue292.DefineComponent<CheckboxCardProps, {}, {}, {}, {}, vue292.ComponentOptionsMixin, vue292.ComponentOptionsMixin, {
15
+ "update:modelValue": (value: _soybeanjs_headless152.CheckedState | null) => any;
16
+ }, string, vue292.PublicProps, Readonly<CheckboxCardProps> & Readonly<{
17
+ "onUpdate:modelValue"?: ((value: _soybeanjs_headless152.CheckedState | null) => any) | undefined;
18
18
  }>, {
19
- modelValue: _soybeanjs_headless35.CheckedState | null;
20
- }, {}, {}, {}, string, vue122.ComponentProvideOptions, false, {}, any>;
19
+ modelValue: _soybeanjs_headless152.CheckedState | null;
20
+ }, {}, {}, {}, string, vue292.ComponentProvideOptions, false, {}, any>;
21
21
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
22
  declare const _default: typeof __VLS_export;
23
23
  type __VLS_WithSlots<T, S> = T & {
@@ -1,17 +1,17 @@
1
1
  import { CheckboxGroupOptionData, CheckboxGroupProps } from "./types.js";
2
- import * as vue129 from "vue";
2
+ import * as vue283 from "vue";
3
3
  import { DefinedValue } from "@soybeanjs/headless";
4
4
 
5
5
  //#region src/components/checkbox/checkbox-group.vue.d.ts
6
6
  declare const __VLS_export: <T extends DefinedValue = DefinedValue, S extends CheckboxGroupOptionData<T> = CheckboxGroupOptionData<T>>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
7
7
  props: __VLS_PrettifyLocal<CheckboxGroupProps<T, S> & {
8
8
  "onUpdate:modelValue"?: ((value: T[]) => any) | undefined;
9
- }> & vue129.PublicProps;
9
+ }> & vue283.PublicProps;
10
10
  expose: (exposed: {}) => void;
11
11
  attrs: any;
12
12
  slots: {};
13
13
  emit: (evt: "update:modelValue", value: T[]) => void;
14
- }>) => vue129.VNode & {
14
+ }>) => vue283.VNode & {
15
15
  __ctx?: Awaited<typeof __VLS_setup>;
16
16
  };
17
17
  declare const _default: typeof __VLS_export;