@soybeanjs/ui 0.21.0 → 0.22.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
CHANGED
|
@@ -142,13 +142,13 @@ import '@soybeanjs/ui/styles.css'; // pre-built UnoCSS stylesheet
|
|
|
142
142
|
If you contribute new public components, exports, or API descriptions, keep generated surfaces in sync through the official scripts instead of editing generated files by hand.
|
|
143
143
|
|
|
144
144
|
```bash
|
|
145
|
-
pnpm
|
|
146
|
-
pnpm
|
|
147
|
-
pnpm
|
|
148
|
-
pnpm
|
|
149
|
-
pnpm
|
|
150
|
-
pnpm translate
|
|
151
|
-
pnpm translate
|
|
145
|
+
pnpm sui headless # sync headless component names and namespaced exports
|
|
146
|
+
pnpm sui ui # sync ui component names
|
|
147
|
+
pnpm sui api # regenerate docs api json and locale baseline data
|
|
148
|
+
pnpm sui api-locales # refresh api locale template data only
|
|
149
|
+
pnpm sui changelog # regenerate docs changelog json and locale baseline data
|
|
150
|
+
pnpm sui api-translate -- --locale zh-CN
|
|
151
|
+
pnpm sui changelog-translate -- --locale zh-CN
|
|
152
152
|
```
|
|
153
153
|
|
|
154
154
|
The docs site now renders component docs through `UsageCode`, `PlaygroundGallery`, and `ComponentApi`. Component detail pages and `/releases` also read generated changelog data from `docs/src/generated/changelog/` and `docs/src/generated/changelog-locales/`.
|
package/README.zh-CN.md
CHANGED
|
@@ -142,13 +142,13 @@ import '@soybeanjs/ui/styles.css'; // 预构建的 UnoCSS 样式表
|
|
|
142
142
|
如果您在仓库内新增公共组件、调整导出入口或修改 API 描述,请通过官方脚本同步生成产物,而不是手动编辑生成文件。
|
|
143
143
|
|
|
144
144
|
```bash
|
|
145
|
-
pnpm
|
|
146
|
-
pnpm
|
|
147
|
-
pnpm
|
|
148
|
-
pnpm
|
|
149
|
-
pnpm
|
|
150
|
-
pnpm translate
|
|
151
|
-
pnpm translate
|
|
145
|
+
pnpm sui headless # 同步 headless 组件名称与命名空间导出
|
|
146
|
+
pnpm sui ui # 同步 ui 组件名称
|
|
147
|
+
pnpm sui api # 重新生成 docs api json 与 locale 英文基线数据
|
|
148
|
+
pnpm sui api-locales # 仅刷新 api locale 模板数据
|
|
149
|
+
pnpm sui changelog # 重新生成 docs changelog json 与 locale 英文基线数据
|
|
150
|
+
pnpm sui api-translate -- --locale zh-CN
|
|
151
|
+
pnpm sui changelog-translate -- --locale zh-CN
|
|
152
152
|
```
|
|
153
153
|
|
|
154
154
|
当前文档站默认通过 `UsageCode`、`PlaygroundGallery` 与 `ComponentApi` 渲染组件文档;组件详情页与 `/releases` 还会消费 `docs/src/generated/changelog/` 和 `docs/src/generated/changelog-locales/` 下的版本日志生成数据。
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{accordionVariants as t}from"./variants.js";import{computed as n,createBlock as r,createSlots as i,defineComponent as a,guardReactiveProps as o,mergeProps as s,normalizeProps as c,openBlock as l,renderList as u,renderSlot as d,toHandlers as f,unref as p,useSlots as m,withCtx as h}from"vue";import{AccordionCompact as g,provideAccordionUi as _}from"@soybeanjs/headless/accordion";import{useForwardListeners as v,useOmitProps as y}from"@soybeanjs/headless/composables";import{keysOf as b}from"@soybeanjs/utils";const x=a({name:`SAccordion`,__name:`accordion`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},items:{},itemProps:{},headerProps:{},triggerProps:{},contentProps:{},descriptionProps:{},collapsible:{type:Boolean},dir:{},disabled:{type:Boolean},orientation:{},unmountOnHide:{type:Boolean},modelValue:{},defaultValue:{},multiple:{},
|
|
1
|
+
import{mergeVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import{accordionVariants as t}from"./variants.js";import{computed as n,createBlock as r,createSlots as i,defineComponent as a,guardReactiveProps as o,mergeProps as s,normalizeProps as c,openBlock as l,renderList as u,renderSlot as d,toHandlers as f,unref as p,useSlots as m,withCtx as h}from"vue";import{AccordionCompact as g,provideAccordionUi as _}from"@soybeanjs/headless/accordion";import{useForwardListeners as v,useOmitProps as y}from"@soybeanjs/headless/composables";import{keysOf as b}from"@soybeanjs/utils";const x=a({name:`SAccordion`,__name:`accordion`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},items:{},itemProps:{},headerProps:{},triggerProps:{},contentProps:{},descriptionProps:{},collapsible:{type:Boolean,default:!0},dir:{},disabled:{type:Boolean},orientation:{},unmountOnHide:{type:Boolean,default:!0},modelValue:{},defaultValue:{},multiple:{},selectionBehavior:{}},emits:[`update:modelValue`],setup(a,{emit:x}){let S=a,C=x,w=m(),T=y(S,[`class`,`size`,`ui`]),E=v(C),D=n(()=>b(w).filter(e=>e!==`item`));return _(n(()=>e(t({size:S.size}),S.ui,{root:S.class}))),(e,t)=>(l(),r(p(g),s(p(T),f(p(E))),i({item:h(t=>[d(e.$slots,`item`,c(o(t)))]),_:2},[u(D.value,t=>({name:t,fn:h(n=>[d(e.$slots,t,c(o(n)))])}))]),1040))}});export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{mergeVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import t from"../calendar/calendar.js";import{dateFieldVariants as n}from"../date-field/variants.js";import{datePickerVariants as r}from"./variants.js";import{computed as i,createBlock as a,createVNode as o,defineComponent as s,mergeProps 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{DatePickerCompact as h,provideDatePickerUi as g}from"@soybeanjs/headless/date-picker";const _=s({name:`SDatePicker`,__name:`date-picker`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},calendarUi:{},dateFieldProps:{},placement:{},showArrow:{type:Boolean},triggerProps:{},portalProps:{},positionerProps:{},popupProps:{},arrowProps:{},closeProps:{},disabled:{type:Boolean},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean},headerProps:{},headingProps:{},prevProps:{},nextProps:{},gridProps:{},gridHeadProps:{},gridBodyProps:{},gridRowProps:{},headCellProps:{},cellProps:{},cellTriggerProps:{},dir:{},locale:{},modelValue:{},defaultValue:{},multiple:{
|
|
1
|
+
import{mergeVariants as e}from"../../theme/shared.js";import"../../theme/index.js";import t from"../calendar/calendar.js";import{dateFieldVariants as n}from"../date-field/variants.js";import{datePickerVariants as r}from"./variants.js";import{computed as i,createBlock as a,createVNode as o,defineComponent as s,mergeProps 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{DatePickerCompact as h,provideDatePickerUi as g}from"@soybeanjs/headless/date-picker";const _=s({name:`SDatePicker`,__name:`date-picker`,props:{class:{type:[Boolean,null,String,Object,Array]},size:{},ui:{},calendarUi:{},dateFieldProps:{},placement:{},showArrow:{type:Boolean},triggerProps:{},portalProps:{},positionerProps:{},popupProps:{},arrowProps:{},closeProps:{},disabled:{type:Boolean},open:{type:Boolean,default:void 0},defaultOpen:{type:Boolean},modal:{type:Boolean},headerProps:{},headingProps:{},prevProps:{},nextProps:{},gridProps:{},gridHeadProps:{},gridBodyProps:{},gridRowProps:{},headCellProps:{},cellProps:{},cellTriggerProps:{},dir:{},locale:{},modelValue:{},defaultValue:{},multiple:{},placeholder:{},defaultPlaceholder:{},readonly:{type:Boolean},pagedNavigation:{type:Boolean},preventDeselect:{type:Boolean},weekStartsOn:{},weekdayFormat:{},calendarLabel:{},fixedWeeks:{type:Boolean},maxValue:{},minValue:{},numberOfMonths:{},initialFocus:{type:Boolean},isDateDisabled:{},isDateUnavailable:{},nextPage:{},prevPage:{},disableDaysOutsideCurrentView:{type:Boolean},asChild:{type:Boolean},as:{}},emits:[`update:open`,`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`openAutoFocus`,`closeAutoFocus`,`update:modelValue`,`update:placeholder`],setup(s,{emit:_}){let v=s,y=_,b=m(v,[`class`,`size`,`ui`]),x=p(y);return g(i(()=>{let t=r({size:v.size}),i=n({size:v.size});return e(Object.assign(t,i),v.ui,{root:v.class})})),(e,n)=>(l(),a(d(h),c(d(b),u(d(x))),{default:f(({calendarProps:e,close:n,onUpdateModelValue:r,onUpdatePlaceholder:i})=>[o(t,c(e,{size:s.size,ui:s.calendarUi,"onUpdate:modelValue":e=>{r(e),n()},"onUpdate:placeholder":i}),null,16,[`size`,`ui`,`onUpdate:modelValue`,`onUpdate:placeholder`])]),_:1},16))}});export{_ as default};
|
|
@@ -6,8 +6,8 @@ import { PageTabsOptionData } from "@soybeanjs/headless/page-tabs";
|
|
|
6
6
|
//#region src/components/page-tabs/page-tabs.vue.d.ts
|
|
7
7
|
declare const __VLS_export: <T extends PageTabsOptionData = PageTabsOptionData>(__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
8
|
props: _$vue.PublicProps & __VLS_PrettifyLocal<PageTabsProps<T> & {
|
|
9
|
-
onContextmenu?: ((tab: T) => any) | undefined;
|
|
10
9
|
onClick?: ((tab: T) => any) | undefined;
|
|
10
|
+
onContextmenu?: ((tab: T) => any) | undefined;
|
|
11
11
|
onClose?: ((tab: T) => any) | undefined;
|
|
12
12
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
13
13
|
"onUpdate:items"?: ((items: T[]) => any) | undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@soybeanjs/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.22.0",
|
|
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": {
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"tailwind-variants": "^3.2.2",
|
|
58
58
|
"valibot": "^1.4.0",
|
|
59
59
|
"zod": "^4.4.3",
|
|
60
|
-
"@soybeanjs/headless": "^0.
|
|
60
|
+
"@soybeanjs/headless": "^0.22.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
63
|
"@soybeanjs/cli": "^1.7.2",
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
"@vitest/coverage-v8": "^4.1.6",
|
|
72
72
|
"@vue/test-utils": "^2.4.10",
|
|
73
73
|
"axe-core": "^4.11.4",
|
|
74
|
+
"cac": "^7.0.0",
|
|
74
75
|
"eslint": "^10.3.0",
|
|
75
76
|
"happy-dom": "^20.9.0",
|
|
76
77
|
"lint-staged": "^17.0.4",
|
|
@@ -103,7 +104,7 @@
|
|
|
103
104
|
"*": "oxlint . --fix && oxfmt"
|
|
104
105
|
},
|
|
105
106
|
"scripts": {
|
|
106
|
-
"build": "pnpm build:headless && pnpm build:ui && pnpm build:css",
|
|
107
|
+
"build": "pnpm build:headless && pnpm build:ui && pnpm build:css && pnpm sui skills",
|
|
107
108
|
"build:css": "unocss build",
|
|
108
109
|
"build:docs": "pnpm --filter @soybeanjs/ui-docs build",
|
|
109
110
|
"build:headless": "pnpm --filter @soybeanjs/headless build",
|
|
@@ -115,24 +116,16 @@
|
|
|
115
116
|
"dev:docs": "pnpm --filter @soybeanjs/ui-docs dev",
|
|
116
117
|
"lint": "oxlint --fix && eslint --fix headless/ src/",
|
|
117
118
|
"fmt": "oxfmt",
|
|
118
|
-
"gen:api": "tsx scripts/api.ts && tsx scripts/api-i18n.ts && oxfmt docs/src/generated/api/",
|
|
119
|
-
"gen:api:i18n": "tsx scripts/api-i18n.ts",
|
|
120
|
-
"gen:changelog": "tsx scripts/changelog.ts && tsx scripts/changelog-i18n.ts && oxfmt docs/src/generated/changelog/ docs/src/generated/changelog-locales/",
|
|
121
|
-
"translate:api:i18n": "tsx scripts/api-i18n-translate.ts",
|
|
122
|
-
"translate:changelog:i18n": "tsx scripts/changelog-i18n-translate.ts",
|
|
123
|
-
"translate:locale": "tsx scripts/locale-translate.ts",
|
|
124
|
-
"gen:headless": "tsx scripts/headless.ts && oxfmt headless/src/constants/components.ts headless/src/namespaced/index.ts",
|
|
125
|
-
"gen:ui": "tsx scripts/ui.ts && oxfmt src/constants/components.ts",
|
|
126
119
|
"preview": "vite preview",
|
|
127
120
|
"preview:docs": "pnpm --filter @soybeanjs/ui-docs preview",
|
|
128
121
|
"publish-pkg": "pnpm publish -r --access public",
|
|
129
122
|
"release": "soy release",
|
|
123
|
+
"sui": "tsx scripts/cli.ts",
|
|
130
124
|
"test": "vitest run",
|
|
131
125
|
"test:coverage": "vitest run --coverage",
|
|
132
126
|
"test:ui": "vitest --ui",
|
|
133
127
|
"test:watch": "vitest watch",
|
|
134
128
|
"typecheck": "vue-tsc --noEmit --skipLibCheck",
|
|
135
|
-
"unstub": "tsx scripts/stub.ts --reset",
|
|
136
129
|
"upkg": "soy ncu"
|
|
137
130
|
}
|
|
138
131
|
}
|