@soybeanjs/ui 0.29.0-beta.6 → 0.29.0-beta.7

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.
@@ -14,10 +14,10 @@ declare const __VLS_base: import("vue").DefineComponent<BacktopProps, {}, {}, {}
14
14
  onChange?: ((visible: boolean) => any) | undefined;
15
15
  }>, {
16
16
  icon: string;
17
- color: ThemeColor;
18
17
  size: ThemeSize;
19
- shape: ButtonShape;
18
+ color: ThemeColor;
20
19
  variant: ButtonVariant;
20
+ shape: ButtonShape;
21
21
  shadow: ButtonShadow;
22
22
  fitContent: boolean;
23
23
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
@@ -4,8 +4,8 @@ import { ButtonIconProps } from "./types.js";
4
4
  //#region src/components/button/button-icon.vue.d.ts
5
5
  declare const __VLS_export: import("vue").DefineComponent<ButtonIconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonIconProps> & Readonly<{}>, {
6
6
  color: ThemeColor;
7
- shape: ButtonShape;
8
7
  variant: ButtonVariant;
8
+ shape: ButtonShape;
9
9
  fitContent: boolean;
10
10
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
11
11
  declare const _default: typeof __VLS_export;
@@ -11,9 +11,9 @@ type __VLS_Slots = {} & {
11
11
  default?: (props: typeof __VLS_14) => any;
12
12
  };
13
13
  declare const __VLS_base: import("vue").DefineComponent<ButtonLinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<ButtonLinkProps> & Readonly<{}>, {
14
- replace: boolean;
15
14
  variant: ButtonVariant;
16
15
  disabled: boolean;
16
+ replace: boolean;
17
17
  external: boolean;
18
18
  viewTransition: boolean;
19
19
  noRel: boolean;
@@ -12,8 +12,8 @@ declare const __VLS_export: import("vue").DefineComponent<ColorSliderProps, {},
12
12
  "onUpdate:color"?: ((value: import("@soybeanjs/headless/types").NormalizedColor) => any) | undefined;
13
13
  onChangeEnd?: ((value: string) => any) | undefined;
14
14
  }>, {
15
- color: ThemeColor;
16
15
  size: ThemeSize;
16
+ color: ThemeColor;
17
17
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
18
18
  declare const _default: typeof __VLS_export;
19
19
  //#endregion
@@ -1 +1 @@
1
- import{themeSizeMap as e}from"../../theme/config.js";import"../../theme/index.js";import t from"../dialog/dialog-provider.js";import n from"../progress/progress-provider.js";import r from"../toast/toast-provider.js";import{provideConfigProviderContext as i}from"./context.js";import a from"../icon/icon.js";import{createBlock as o,createCommentVNode as s,createVNode as c,defineComponent as l,guardReactiveProps as u,h as d,mergeProps as f,normalizeProps as p,openBlock as m,renderSlot as h,shallowRef as g,unref as _,watch as v,watchEffect as y,withCtx as b}from"vue";import{useOmitProps as x}from"@soybeanjs/headless/composables";import{useStyleTag as S}from"@vueuse/core";import{ConfigProvider as C}from"@soybeanjs/headless/config-provider";import{isClient as w,transformPropsToContext as T}from"@soybeanjs/headless/shared";import{createShadcnTheme as E}from"@soybeanjs/shadcn-theme";const D=l({name:`SConfigProvider`,__name:`config-provider`,props:{theme:{default:()=>({})},size:{default:`md`},iconify:{default:()=>({width:`1.25em`,height:`1.25em`})},progress:{},toast:{},customToast:{type:Boolean},dir:{},locale:{},nonce:{},tooltip:{},iconRender:{},messages:{}},setup(l){let D=l,O=x(D,[`iconRender`,`theme`,`size`,`iconify`,`progress`,`toast`,`customToast`]),k=D.iconRender??(e=>d(a,{icon:e,ssr:import.meta.env.SSR}));i({...T(D),iconRender:k});let A=g(``),j=()=>{let{getCss:e}=E(D.theme);A.value=e(D.theme,D.theme.radius)};return S(A,{id:`__SoybeanUI_theme`}),y(()=>{if(!w)return;let t=e[D.size??`md`];document.documentElement.style.fontSize=`${t}px`},{flush:`post`}),v(()=>D.theme,()=>{w&&j()},{deep:!0,flush:`post`,immediate:!0}),(e,i)=>(m(),o(_(C),f(_(O),{"icon-render":_(k)}),{default:b(()=>[h(e.$slots,`default`),D.customToast?s(`v-if`,!0):(m(),o(r,p(f({key:0},D.toast)),null,16)),c(t),c(n,p(u(D.progress)),null,16)]),_:3},16,[`icon-render`]))}});export{D as default};
1
+ import e from"../dialog/dialog-provider.js";import t from"../progress/progress-provider.js";import n from"../toast/toast-provider.js";import{provideConfigProviderContext as r}from"./context.js";import i from"../icon/icon.js";import{createBlock as a,createCommentVNode as o,createVNode as s,defineComponent as c,guardReactiveProps as l,h as u,mergeProps as d,normalizeProps as f,openBlock as p,renderSlot as m,shallowRef as h,unref as g,watch as _,watchEffect as v,withCtx as y}from"vue";import{useOmitProps as b}from"@soybeanjs/headless/composables";import{useStyleTag as x}from"@vueuse/core";import{ConfigProvider as S}from"@soybeanjs/headless/config-provider";import{isClient as C,transformPropsToContext as w}from"@soybeanjs/headless/shared";import{createShadcnTheme as T}from"@soybeanjs/shadcn-theme";const E=c({name:`SConfigProvider`,__name:`config-provider`,props:{theme:{default:()=>({})},size:{default:`md`},iconify:{default:()=>({width:`1.25em`,height:`1.25em`})},progress:{},toast:{},customToast:{type:Boolean},dir:{},locale:{},nonce:{},tooltip:{},iconRender:{},messages:{}},setup(c){let E=c,D=b(E,[`iconRender`,`theme`,`size`,`iconify`,`progress`,`toast`,`customToast`]),O=E.iconRender??(e=>u(i,{icon:e,ssr:import.meta.env.SSR}));r({...w(E),iconRender:O});let k=h(``),A=()=>{let{getCss:e}=T(E.theme);k.value=e(E.theme)};return x(k,{id:`__SoybeanUI_theme`}),v(()=>{if(!C)return;let e=E.size??`md`;document.documentElement.dataset.size=e},{flush:`post`}),_(()=>E.theme,()=>{C&&A()},{deep:!0,flush:`post`,immediate:!0}),(r,i)=>(p(),a(g(S),d(g(D),{"icon-render":g(O)}),{default:y(()=>[m(r.$slots,`default`),E.customToast?o(`v-if`,!0):(p(),a(n,f(d({key:0},E.toast)),null,16)),s(e),s(t,f(l(E.progress)),null,16)]),_:3},16,[`icon-render`]))}});export{E as default};
@@ -1,6 +1,5 @@
1
1
  import { ThemeSize } from "../../theme/types.js";
2
2
  import { ConfigProviderProps, IconifyOptions } from "./types.js";
3
-
4
3
  //#region src/components/config-provider/config-provider.vue.d.ts
5
4
  declare var __VLS_8: {};
6
5
  type __VLS_Slots = {} & {
@@ -10,8 +10,8 @@ type __VLS_Slots = {} & {
10
10
  default?: (props: typeof __VLS_8) => any;
11
11
  };
12
12
  declare const __VLS_base: import("vue").DefineComponent<LinkProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<LinkProps> & Readonly<{}>, {
13
- replace: boolean;
14
13
  disabled: boolean;
14
+ replace: boolean;
15
15
  external: boolean;
16
16
  viewTransition: boolean;
17
17
  noRel: boolean;
@@ -12,13 +12,13 @@ type __VLS_Slots = {} & {
12
12
  default?: (props: typeof __VLS_8) => any;
13
13
  };
14
14
  declare const __VLS_base: import("vue").DefineComponent<SplitterPanelProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
15
- resize: (size: number, prevSize: number | undefined) => any;
16
15
  collapse: () => any;
17
16
  expand: () => any;
17
+ resize: (size: number, prevSize: number | undefined) => any;
18
18
  }, string, import("vue").PublicProps, Readonly<SplitterPanelProps> & Readonly<{
19
- onResize?: ((size: number, prevSize: number | undefined) => any) | undefined;
20
19
  onCollapse?: (() => any) | undefined;
21
20
  onExpand?: (() => any) | undefined;
21
+ onResize?: ((size: number, prevSize: number | undefined) => any) | undefined;
22
22
  }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
23
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
24
24
  declare const _default: typeof __VLS_export;
@@ -92,8 +92,8 @@ declare const alertVariants: import("@soybeanjs/cva").SCVResult<"icon" | "title"
92
92
  };
93
93
  };
94
94
  }>, {
95
- color?: "info" | "success" | "warning" | "primary" | "destructive" | "carbon" | "secondary" | "accent" | undefined;
96
95
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
96
+ color?: "info" | "success" | "warning" | "primary" | "destructive" | "carbon" | "secondary" | "accent" | undefined;
97
97
  variant?: "pure" | "outline" | "soft" | "ghost" | "solid" | undefined;
98
98
  }>;
99
99
  type AlertVariants = VariantProps<typeof alertVariants>;
@@ -63,8 +63,8 @@ declare const badgeVariants: import("@soybeanjs/cva").SCVResult<"content" | "roo
63
63
  };
64
64
  };
65
65
  }>, {
66
- color?: "info" | "success" | "warning" | "primary" | "destructive" | "carbon" | "secondary" | "accent" | undefined;
67
66
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
67
+ color?: "info" | "success" | "warning" | "primary" | "destructive" | "carbon" | "secondary" | "accent" | undefined;
68
68
  position?: "top-right" | "bottom-right" | "top-left" | "bottom-left" | undefined;
69
69
  }>;
70
70
  type BadgeVariants = VariantProps<typeof badgeVariants>;
@@ -47,10 +47,10 @@ declare const buttonVariants: import("@soybeanjs/cva").CVResult<NoInfer<{
47
47
  false: string;
48
48
  };
49
49
  }>, {
50
- color?: "info" | "success" | "warning" | "primary" | "destructive" | "carbon" | "secondary" | "accent" | undefined;
51
50
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
52
- shape?: "auto" | "rounded" | "square" | "circle" | undefined;
51
+ color?: "info" | "success" | "warning" | "primary" | "destructive" | "carbon" | "secondary" | "accent" | undefined;
53
52
  variant?: "link" | "pure" | "outline" | "soft" | "ghost" | "solid" | "dashed" | "plain" | undefined;
53
+ shape?: "auto" | "rounded" | "square" | "circle" | undefined;
54
54
  shadow?: "sm" | "md" | "lg" | "none" | undefined;
55
55
  fitContent?: boolean | undefined;
56
56
  }>;
@@ -77,8 +77,8 @@ declare const checkboxVariants: import("@soybeanjs/cva").SCVResult<"label" | "ro
77
77
  };
78
78
  };
79
79
  }>, {
80
- color?: "info" | "success" | "warning" | "primary" | "destructive" | "carbon" | "secondary" | "accent" | undefined;
81
80
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
81
+ color?: "info" | "success" | "warning" | "primary" | "destructive" | "carbon" | "secondary" | "accent" | undefined;
82
82
  shape?: "rounded" | "square" | undefined;
83
83
  orientation?: "horizontal" | "vertical" | undefined;
84
84
  }>;
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from "@soybeanjs/cva";
2
2
 
3
3
  //#region src/styles/pagination.d.ts
4
- declare const paginationVariants: import("@soybeanjs/cva").SCVResult<"list" | "next" | "first" | "last" | "ellipsis" | "root" | "prev" | "listItem", NoInfer<{
4
+ declare const paginationVariants: import("@soybeanjs/cva").SCVResult<"list" | "next" | "root" | "first" | "last" | "ellipsis" | "prev" | "listItem", NoInfer<{
5
5
  size: {
6
6
  xs: {
7
7
  list: "gap-0.75 text-2xs";
@@ -62,8 +62,8 @@ declare const paginationVariants: import("@soybeanjs/cva").SCVResult<"list" | "n
62
62
  };
63
63
  }>, {
64
64
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
65
- shape?: "rounded" | "square" | undefined;
66
65
  variant?: "pure" | "outline" | "soft" | "solid" | undefined;
66
+ shape?: "rounded" | "square" | undefined;
67
67
  actionAsSelected?: boolean | undefined;
68
68
  }>;
69
69
  type PaginationVariants = VariantProps<typeof paginationVariants>;
@@ -85,8 +85,8 @@ declare const radioGroupVariants: import("@soybeanjs/cva").SCVResult<"label" | "
85
85
  };
86
86
  };
87
87
  }>, {
88
- color?: "info" | "success" | "warning" | "primary" | "destructive" | "carbon" | "secondary" | "accent" | undefined;
89
88
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
89
+ color?: "info" | "success" | "warning" | "primary" | "destructive" | "carbon" | "secondary" | "accent" | undefined;
90
90
  variant?: "outline" | "dot" | undefined;
91
91
  orientation?: "horizontal" | "vertical" | undefined;
92
92
  }>;
@@ -20,8 +20,8 @@ declare const skeletonVariants: import("@soybeanjs/cva").CVResult<NoInfer<{
20
20
  };
21
21
  }>, {
22
22
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
23
- animated?: boolean | undefined;
24
23
  shape?: "auto" | "rounded" | undefined;
24
+ animated?: boolean | undefined;
25
25
  }>;
26
26
  type SkeletonVariants = VariantProps<typeof skeletonVariants>;
27
27
  type SkeletonShape = NonNullable<SkeletonVariants['shape']>;
@@ -65,8 +65,8 @@ declare const switchVariants: import("@soybeanjs/cva").SCVResult<"root" | "contr
65
65
  };
66
66
  };
67
67
  }>, {
68
- color?: "info" | "success" | "warning" | "primary" | "destructive" | "carbon" | "secondary" | "accent" | undefined;
69
68
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
69
+ color?: "info" | "success" | "warning" | "primary" | "destructive" | "carbon" | "secondary" | "accent" | undefined;
70
70
  shape?: "rounded" | "square" | undefined;
71
71
  }>;
72
72
  type SwitchVariants = VariantProps<typeof switchVariants>;
@@ -1,7 +1,7 @@
1
1
  import { VariantProps } from "@soybeanjs/cva";
2
2
 
3
3
  //#region src/styles/table.d.ts
4
- declare const tableVariants: import("@soybeanjs/cva").SCVResult<"header" | "content" | "footer" | "fixed" | "scroll" | "body" | "head" | "cell" | "row" | "root" | "resizeHandle" | "sortTrigger" | "filterInput" | "treeCell" | "treeToggle" | "treeTogglePlaceholder" | "selection" | "filterTrigger" | "filterPopup" | "filterSearch" | "filterOptions" | "filterOption" | "filterOptionLabel" | "filterFooter" | "filterCount" | "filterAction" | "filterEmpty" | "radioIndicator" | "radioRoot", NoInfer<{
4
+ declare const tableVariants: import("@soybeanjs/cva").SCVResult<"header" | "content" | "footer" | "fixed" | "root" | "resizeHandle" | "body" | "head" | "scroll" | "cell" | "row" | "sortTrigger" | "filterInput" | "treeCell" | "treeToggle" | "treeTogglePlaceholder" | "selection" | "filterTrigger" | "filterPopup" | "filterSearch" | "filterOptions" | "filterOption" | "filterOptionLabel" | "filterFooter" | "filterCount" | "filterAction" | "filterEmpty" | "radioIndicator" | "radioRoot", NoInfer<{
5
5
  size: {
6
6
  xs: {
7
7
  root: "text-2xs";
@@ -113,8 +113,8 @@ declare const tableVariants: import("@soybeanjs/cva").SCVResult<"header" | "cont
113
113
  };
114
114
  }>, {
115
115
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
116
- rounded?: boolean | undefined;
117
116
  variant?: "default" | "simple" | undefined;
117
+ rounded?: boolean | undefined;
118
118
  bordered?: boolean | undefined;
119
119
  striped?: boolean | undefined;
120
120
  }>;
@@ -33,10 +33,10 @@ declare const tagVariants: import("@soybeanjs/cva").CVResult<NoInfer<{
33
33
  rounded: string;
34
34
  };
35
35
  }>, {
36
- color?: "info" | "success" | "warning" | "primary" | "destructive" | "carbon" | "secondary" | "accent" | undefined;
37
36
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
38
- shape?: "auto" | "rounded" | undefined;
37
+ color?: "info" | "success" | "warning" | "primary" | "destructive" | "carbon" | "secondary" | "accent" | undefined;
39
38
  variant?: "pure" | "outline" | "soft" | "ghost" | "solid" | "raw" | undefined;
39
+ shape?: "auto" | "rounded" | undefined;
40
40
  }>;
41
41
  type TagVariants = VariantProps<typeof tagVariants>;
42
42
  type TagVariant = NonNullable<TagVariants['variant']>;
@@ -68,8 +68,8 @@ declare const toggleGroupVariants: import("@soybeanjs/cva").SCVResult<"root" | "
68
68
  };
69
69
  };
70
70
  }>, {
71
- color?: "info" | "success" | "warning" | "primary" | "destructive" | "carbon" | "secondary" | "accent" | undefined;
72
71
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
72
+ color?: "info" | "success" | "warning" | "primary" | "destructive" | "carbon" | "secondary" | "accent" | undefined;
73
73
  variant?: "outline" | "soft" | "ghost" | undefined;
74
74
  orientation?: "horizontal" | "vertical" | undefined;
75
75
  }>;
@@ -32,10 +32,10 @@ declare const toggleVariants: import("@soybeanjs/cva").CVResult<NoInfer<{
32
32
  circle: string;
33
33
  };
34
34
  }>, {
35
- color?: "info" | "success" | "warning" | "primary" | "destructive" | "carbon" | "secondary" | "accent" | undefined;
36
35
  size?: "xs" | "sm" | "md" | "lg" | "xl" | "2xl" | undefined;
37
- shape?: "auto" | "rounded" | "square" | "circle" | undefined;
36
+ color?: "info" | "success" | "warning" | "primary" | "destructive" | "carbon" | "secondary" | "accent" | undefined;
38
37
  variant?: "outline" | "soft" | "ghost" | undefined;
38
+ shape?: "auto" | "rounded" | "square" | "circle" | undefined;
39
39
  }>;
40
40
  type ToggleVariants = VariantProps<typeof toggleVariants>;
41
41
  type ToggleVariant = NonNullable<ToggleVariants['variant']>;
package/dist/styles.css CHANGED
@@ -396,6 +396,34 @@ body {
396
396
  button {
397
397
  background-color: transparent;
398
398
  }
399
+ :root {
400
+ font-size: 16px;
401
+ }
402
+
403
+ :root[data-size="xs"] {
404
+ font-size: 12px;
405
+ }
406
+
407
+ :root[data-size="sm"] {
408
+ font-size: 14px;
409
+ }
410
+
411
+ :root[data-size="md"] {
412
+ font-size: 16px;
413
+ }
414
+
415
+ :root[data-size="lg"] {
416
+ font-size: 18px;
417
+ }
418
+
419
+ :root[data-size="xl"] {
420
+ font-size: 20px;
421
+ }
422
+
423
+ :root[data-size="2xl"] {
424
+ font-size: 24px;
425
+ }
426
+
399
427
  :root {
400
428
  --radius: 0.625rem;
401
429
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@soybeanjs/ui",
3
- "version": "0.29.0-beta.6",
3
+ "version": "0.29.0-beta.7",
4
4
  "description": "SoybeanUI is built on top of SoybeanHeadless, providing a collection of styled components for Vue 3.",
5
5
  "homepage": "https://github.com/soybeanjs/soybean-ui",
6
6
  "bugs": {
@@ -47,17 +47,16 @@
47
47
  "@iconify/vue": "^5.0.1",
48
48
  "@soybeanjs/cva": "^0.0.9",
49
49
  "@soybeanjs/hooks": "^0.3.0",
50
- "@soybeanjs/shadcn-theme": "^0.3.4",
51
50
  "@soybeanjs/utils": "^0.1.1",
52
- "@soybeanjs/headless": "^0.29.0-beta.6"
51
+ "@soybeanjs/headless": "^0.29.0-beta.7",
52
+ "@soybeanjs/shadcn-theme": "^0.29.0-beta.7"
53
53
  },
54
54
  "devDependencies": {
55
55
  "@nuxt/kit": "^4.4.8",
56
- "@soybeanjs/unocss-shadcn": "^0.7.0",
57
- "@types/node": "^25.9.2",
56
+ "@types/node": "^25.9.3",
58
57
  "@unocss/cli": "^66.7.0",
59
58
  "@vue/test-utils": "^2.4.11",
60
- "axe-core": "^4.12.0",
59
+ "axe-core": "^4.12.1",
61
60
  "happy-dom": "^20.10.2",
62
61
  "nuxt": "^4.4.8",
63
62
  "typescript": "^6.0.3",
@@ -66,9 +65,10 @@
66
65
  "unplugin-vue": "^7.2.0",
67
66
  "unplugin-vue-components": "^32.1.0",
68
67
  "vitest": "npm:@voidzero-dev/vite-plus-test@latest",
69
- "vue": "^3.5.35",
68
+ "vue": "^3.5.38",
70
69
  "vue-router": "^5.1.0",
71
- "vue-tsc": "^3.3.4"
70
+ "vue-tsc": "^3.3.4",
71
+ "@soybeanjs/unocss-shadcn": "^0.29.0-beta.7"
72
72
  },
73
73
  "peerDependencies": {
74
74
  "@nuxt/kit": "^4.3.0",