@mureka-fe/ui 1.1.7 → 2.0.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/dist/llms.txt +22 -17
- package/dist/src/components/tag/Tag.vue.d.ts +8 -19
- package/dist/src/components/tag/Tag.vue.d.ts.map +1 -1
- package/dist/src/components/tag/__docs__/demos/basic.demo.vue.d.ts.map +1 -1
- package/dist/src/components/tag/__docs__/demos/{preset.demo.vue.d.ts → disabled.demo.vue.d.ts} +1 -1
- package/dist/src/components/tag/__docs__/demos/disabled.demo.vue.d.ts.map +1 -0
- package/dist/src/components/tag/__docs__/demos/icon.demo.vue.d.ts.map +1 -1
- package/dist/src/components/tag/__docs__/demos/variant.demo.vue.d.ts.map +1 -1
- package/dist/src/components/tag/__docs__/meta.d.ts.map +1 -1
- package/dist/src/components/tag/index.d.ts +1 -1
- package/dist/src/components/tag/index.d.ts.map +1 -1
- package/dist/src/components/tag/tag.types.d.ts +8 -34
- package/dist/src/components/tag/tag.types.d.ts.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/ui.js +470 -589
- package/dist/ui.umd.cjs +1 -1
- package/package.json +1 -1
- package/dist/src/components/tag/__docs__/demos/preset.demo.vue.d.ts.map +0 -1
- package/dist/src/components/tag/__docs__/demos/size.demo.vue.d.ts +0 -3
- package/dist/src/components/tag/__docs__/demos/size.demo.vue.d.ts.map +0 -1
package/dist/llms.txt
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @mureka-fe/ui
|
|
1
|
+
# @mureka-fe/ui v2.0.0
|
|
2
2
|
|
|
3
3
|
> AI/LLM-readable reference for the @mureka-fe/ui Vue 3 component library.
|
|
4
4
|
> Read this file before writing UI in a project that depends on this package.
|
|
@@ -20,7 +20,7 @@ import { MuButton, MuModal } from '@mureka-fe/ui';
|
|
|
20
20
|
| Button 按钮 | `button` | 用于触发即时操作,支持主次层级、反色外观、危险状态、胶囊形状与图标模式。 |
|
|
21
21
|
| Message 消息提示 | `message` | 全局展示操作反馈信息,不打断用户操作。 |
|
|
22
22
|
| Dialog 弹窗 | `modal` | 用于承载需要中断当前流程的确认、编辑、危险操作以及结果反馈对话框。提供 form 与 feedback 两种排版形态。 |
|
|
23
|
-
| Tag 标签 | `tag` |
|
|
23
|
+
| Tag 标签 | `tag` | 用于筛选、分类、模式切换等轻量选择场景;新版 MuTag 是交互式 button。 |
|
|
24
24
|
| Switch 开关 | `switch` | 用于切换开/关状态,支持受控与非受控、自定义值、异步切换拦截、自定义文案和图标。 |
|
|
25
25
|
| Radio 单选 | `radio` | 用于在一组选项中选择单个值,支持受控与非受控、横向/纵向排列、禁用态和独立使用。 |
|
|
26
26
|
| Tabs 标签页 | `tabs` | 用于在同级内容或模式之间切换,支持 line 与 segment 两种视觉形态、三档尺寸、图标插槽和等宽布局。 |
|
|
@@ -60,6 +60,7 @@ export type {
|
|
|
60
60
|
TabsVariant,
|
|
61
61
|
} from './components/tabs';
|
|
62
62
|
export { MuTag } from './components/tag';
|
|
63
|
+
export type { TagProps, TagVariant } from './components/tag';
|
|
63
64
|
```
|
|
64
65
|
|
|
65
66
|
## Components
|
|
@@ -194,35 +195,39 @@ Status: stable · Since 1.0.0 · Category: 反馈
|
|
|
194
195
|
|
|
195
196
|
### Tag 标签 `tag`
|
|
196
197
|
|
|
197
|
-
Status: stable · Since 1.0.0 · Category:
|
|
198
|
+
Status: stable · Since 1.0.0 · Category: 选择
|
|
198
199
|
|
|
199
|
-
|
|
200
|
+
用于筛选、分类、模式切换等轻量选择场景;新版 MuTag 是交互式 button。
|
|
200
201
|
|
|
201
202
|
#### Usage notes
|
|
202
203
|
|
|
203
|
-
-
|
|
204
|
-
-
|
|
205
|
-
- **图标插槽** —
|
|
206
|
-
-
|
|
207
|
-
- **Variant 对照** — tonal 表示半透明底加弱描边,避免将 soft 与 outline 作为可叠加语义。
|
|
204
|
+
- **基础 Variant** — outline、solid 与 soft 分别对应设计稿中的 Text、Button Label 与 All 三组形态。
|
|
205
|
+
- **受控选中** — 通过 v-model:selected 控制选中态;组件只抛出下一次 selected 值,不维护内部状态。
|
|
206
|
+
- **图标插槽** — prefix 与 suffix 仅用于图标,图标尺寸固定 14px 并继承 currentColor。
|
|
207
|
+
- **禁用状态** — disabled 会禁用 button 交互,并在当前视觉状态上统一叠加弱化效果。
|
|
208
208
|
|
|
209
209
|
#### Props
|
|
210
210
|
|
|
211
211
|
| name | type | default | description |
|
|
212
212
|
| --- | --- | --- | --- |
|
|
213
|
-
|
|
|
214
|
-
|
|
|
215
|
-
|
|
|
216
|
-
|
|
217
|
-
|
|
213
|
+
| variant | 'outline' \| 'solid' \| 'soft' | 'outline' | 定义标签视觉形态。尺寸、圆角和默认颜色由 variant 固定映射。 |
|
|
214
|
+
| selected | boolean | false | 选中态。组件为纯受控,点击时仅抛出 update:selected。 |
|
|
215
|
+
| disabled | boolean | false | 禁用交互,设置后不会触发 click 或 update:selected。 |
|
|
216
|
+
|
|
217
|
+
#### Events
|
|
218
|
+
|
|
219
|
+
| name | signature | description |
|
|
220
|
+
| --- | --- | --- |
|
|
221
|
+
| update:selected | (selected: boolean) => void | 点击可用标签时抛出下一次 selected 值,用于 v-model:selected。 |
|
|
222
|
+
| click | (event: MouseEvent) => void | 点击可用标签时触发,触发顺序早于 update:selected。 |
|
|
218
223
|
|
|
219
224
|
#### Slots
|
|
220
225
|
|
|
221
226
|
| name | type | default | description |
|
|
222
227
|
| --- | --- | --- | --- |
|
|
223
|
-
| default | VNode | -- |
|
|
224
|
-
| prefix | VNode | -- |
|
|
225
|
-
| suffix | VNode | -- |
|
|
228
|
+
| default | VNode | -- | 标签文本内容。 |
|
|
229
|
+
| prefix | VNode | -- | 前置图标插槽,只放非交互图标。 |
|
|
230
|
+
| suffix | VNode | -- | 后置图标插槽,只放非交互图标。 |
|
|
226
231
|
|
|
227
232
|
### Switch 开关 `switch`
|
|
228
233
|
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { TagProps } from './tag.types';
|
|
1
2
|
declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
|
|
2
3
|
type __VLS_Slots = {} & {
|
|
3
4
|
prefix?: (props: typeof __VLS_1) => any;
|
|
@@ -6,25 +7,13 @@ type __VLS_Slots = {} & {
|
|
|
6
7
|
} & {
|
|
7
8
|
suffix?: (props: typeof __VLS_5) => any;
|
|
8
9
|
};
|
|
9
|
-
declare const __VLS_component: import("vue").DefineComponent<import("
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
tone: "yellow";
|
|
17
|
-
variant?: "outline";
|
|
18
|
-
}), {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("./tag.types").TagPresetProps | (import("./tag.types").TagBaseCommonProps & {
|
|
19
|
-
tone?: "neutral";
|
|
20
|
-
variant?: "soft" | "outline" | "tonal";
|
|
21
|
-
}) | (import("./tag.types").TagBaseCommonProps & {
|
|
22
|
-
tone: "cyan";
|
|
23
|
-
variant?: "solid" | "outline" | "tonal";
|
|
24
|
-
}) | (import("./tag.types").TagBaseCommonProps & {
|
|
25
|
-
tone: "yellow";
|
|
26
|
-
variant?: "outline";
|
|
27
|
-
})> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const __VLS_component: import("vue").DefineComponent<TagProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
click: (event: MouseEvent) => any;
|
|
12
|
+
"update:selected": (selected: boolean) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<TagProps> & Readonly<{
|
|
14
|
+
onClick?: ((event: MouseEvent) => any) | undefined;
|
|
15
|
+
"onUpdate:selected"?: ((selected: boolean) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
28
17
|
declare const _default: __VLS_WithSlots<typeof __VLS_component, __VLS_Slots>;
|
|
29
18
|
export default _default;
|
|
30
19
|
type __VLS_WithSlots<T, S> = T & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tag.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/tag/Tag.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tag.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/tag/Tag.vue"],"names":[],"mappings":"AA6LA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AA4F5C,QAAA,IAAI,OAAO,IAAU,EAAE,OAAO,IAAU,EAAE,OAAO,IAAW,CAAE;AAC9D,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC3C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,GAC5C;IAAE,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAwB9C,QAAA,MAAM,eAAe;;;;;;kFAOnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAQ1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"basic.demo.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tag/__docs__/demos/basic.demo.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"basic.demo.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tag/__docs__/demos/basic.demo.vue"],"names":[],"mappings":";AA+FA,wBAKG"}
|
package/dist/src/components/tag/__docs__/demos/{preset.demo.vue.d.ts → disabled.demo.vue.d.ts}
RENAMED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
declare const _default: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<{}> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
2
2
|
export default _default;
|
|
3
|
-
//# sourceMappingURL=
|
|
3
|
+
//# sourceMappingURL=disabled.demo.vue.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"disabled.demo.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tag/__docs__/demos/disabled.demo.vue"],"names":[],"mappings":";AAuGA,wBAKG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon.demo.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tag/__docs__/demos/icon.demo.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"icon.demo.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tag/__docs__/demos/icon.demo.vue"],"names":[],"mappings":";AA4MA,wBAKG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variant.demo.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tag/__docs__/demos/variant.demo.vue"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"variant.demo.vue.d.ts","sourceRoot":"","sources":["../../../../../../src/components/tag/__docs__/demos/variant.demo.vue"],"names":[],"mappings":";AA+IA,wBAKG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../../../src/components/tag/__docs__/meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,QAAA,MAAM,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"meta.d.ts","sourceRoot":"","sources":["../../../../../src/components/tag/__docs__/meta.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAEzE,QAAA,MAAM,IAAI,EAAE,gBA4FX,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { default as MuTag } from './Tag.vue';
|
|
2
|
-
export type { ResolvedTagProps,
|
|
2
|
+
export type { ResolvedTagProps, TagProps, TagVariant } from './tag.types';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,WAAW,CAAC;AAC7C,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/components/tag/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,KAAK,EAAE,MAAM,WAAW,CAAC;AAC7C,YAAY,EAAE,gBAAgB,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1,39 +1,13 @@
|
|
|
1
|
-
export type
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
preset: TagPreset;
|
|
8
|
-
tone?: never;
|
|
9
|
-
variant?: never;
|
|
10
|
-
size?: never;
|
|
11
|
-
shape?: never;
|
|
12
|
-
};
|
|
13
|
-
export type TagBaseCommonProps = {
|
|
14
|
-
preset?: undefined;
|
|
15
|
-
size?: TagSize;
|
|
16
|
-
shape?: TagShape;
|
|
17
|
-
};
|
|
18
|
-
export type TagBaseProps = (TagBaseCommonProps & {
|
|
19
|
-
tone?: 'neutral';
|
|
20
|
-
variant?: 'soft' | 'outline' | 'tonal';
|
|
21
|
-
}) | (TagBaseCommonProps & {
|
|
22
|
-
tone: 'cyan';
|
|
23
|
-
variant?: 'solid' | 'outline' | 'tonal';
|
|
24
|
-
}) | (TagBaseCommonProps & {
|
|
25
|
-
tone: 'yellow';
|
|
26
|
-
variant?: 'outline';
|
|
27
|
-
});
|
|
28
|
-
export type TagProps = TagPresetProps | TagBaseProps;
|
|
29
|
-
export type ResolvedTagTone = TagTone | 'blue' | 'pink';
|
|
1
|
+
export type TagVariant = 'outline' | 'solid' | 'soft';
|
|
2
|
+
export interface TagProps {
|
|
3
|
+
variant?: TagVariant;
|
|
4
|
+
selected?: boolean;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
30
7
|
export interface ResolvedTagProps {
|
|
31
|
-
mode: 'base' | 'preset';
|
|
32
|
-
preset?: TagPreset;
|
|
33
|
-
tone: ResolvedTagTone;
|
|
34
8
|
variant: TagVariant;
|
|
35
|
-
|
|
36
|
-
|
|
9
|
+
selected: boolean;
|
|
10
|
+
disabled: boolean;
|
|
37
11
|
}
|
|
38
12
|
export declare function resolveTagProps(props?: TagProps): ResolvedTagProps;
|
|
39
13
|
export declare function getTagClassNames(props?: TagProps): string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tag.types.d.ts","sourceRoot":"","sources":["../../../../src/components/tag/tag.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"tag.types.d.ts","sourceRoot":"","sources":["../../../../src/components/tag/tag.types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,UAAU,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAC;AAEtD,MAAM,WAAW,QAAQ;IACvB,OAAO,CAAC,EAAE,UAAU,CAAC;IACrB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,UAAU,CAAC;IACpB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACnB;AAYD,wBAAgB,eAAe,CAAC,KAAK,GAAE,QAAa,GAAG,gBAAgB,CAMtE;AAED,wBAAgB,gBAAgB,CAAC,KAAK,GAAE,QAAa,GAAG,MAAM,EAAE,CAa/D"}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -10,4 +10,5 @@ export type { SwitchBeforeChange, SwitchProps, SwitchSize, SwitchType, SwitchVal
|
|
|
10
10
|
export { MuTab, MuTabs } from './components/tabs';
|
|
11
11
|
export type { TabProps, TabValue, TabsAppearance, TabsLayout, TabsProps, TabsSize, TabsVariant, } from './components/tabs';
|
|
12
12
|
export { MuTag } from './components/tag';
|
|
13
|
+
export type { TagProps, TagVariant } from './components/tag';
|
|
13
14
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/src/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAE5B,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACnE,YAAY,EAAE,oBAAoB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAY,EACV,mBAAmB,EACnB,eAAe,EACf,UAAU,EACV,UAAU,GACX,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAC/C,YAAY,EACV,kBAAkB,EAClB,WAAW,EACX,UAA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