@yunlefun/vue 0.3.0 → 0.4.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.
Files changed (60) hide show
  1. package/README.md +2 -0
  2. package/components/YlfAccordion.vue +1 -1
  3. package/components/YlfAvatar.vue +2 -1
  4. package/components/YlfDialog.vue +23 -2
  5. package/components/YlfDropdownMenu.vue +20 -9
  6. package/components/YlfPopover.vue +5 -2
  7. package/components/YlfProgress.vue +29 -5
  8. package/components/YlfRadioGroup.vue +20 -2
  9. package/components/YlfSegmentedControl.vue +1 -1
  10. package/components/YlfSelect.vue +8 -2
  11. package/components/YlfSlider.vue +32 -2
  12. package/components/YlfTabs.vue +1 -1
  13. package/components/YlfTooltip.vue +5 -2
  14. package/components/accordion/demo.vue +1 -1
  15. package/components/accordion/index.md +2 -0
  16. package/components/avatar/index.md +3 -1
  17. package/components/checkbox/demo.vue +10 -9
  18. package/components/checkbox/index.md +2 -0
  19. package/components/dialog/index.md +9 -6
  20. package/components/dropdown-menu/index.md +9 -3
  21. package/components/popover/demo.vue +1 -1
  22. package/components/popover/index.md +8 -5
  23. package/components/progress/index.md +3 -1
  24. package/components/radio/demo.vue +1 -1
  25. package/components/radio/index.md +2 -0
  26. package/components/segmented-control/index.md +1 -1
  27. package/components/select/index.md +6 -0
  28. package/components/slider/demo.vue +2 -2
  29. package/components/slider/index.md +15 -7
  30. package/components/switch/index.md +2 -0
  31. package/components/tabs/index.md +2 -0
  32. package/components/tooltip/index.md +9 -5
  33. package/dist/components/YlfAccordion.vue.d.ts +35 -0
  34. package/dist/components/YlfAiPromptLauncher.vue.d.ts +25 -0
  35. package/dist/components/YlfAvatar.vue.d.ts +14 -0
  36. package/dist/components/YlfBadge.vue.d.ts +29 -0
  37. package/dist/components/YlfBottomMenu.vue.d.ts +19 -0
  38. package/dist/components/YlfBottomMenuItem.vue.d.ts +22 -0
  39. package/dist/components/YlfButton.vue.d.ts +48 -0
  40. package/dist/components/YlfCard.vue.d.ts +28 -0
  41. package/dist/components/YlfCheckbox.vue.d.ts +18 -0
  42. package/dist/components/YlfDialog.vue.d.ts +37 -0
  43. package/dist/components/YlfDropdownMenu.vue.d.ts +34 -0
  44. package/dist/components/YlfLogo.vue.d.ts +13 -0
  45. package/dist/components/YlfPopover.vue.d.ts +31 -0
  46. package/dist/components/YlfProgress.vue.d.ts +17 -0
  47. package/dist/components/YlfRadioGroup.vue.d.ts +24 -0
  48. package/dist/components/YlfSegmentedControl.vue.d.ts +35 -0
  49. package/dist/components/YlfSelect.vue.d.ts +43 -0
  50. package/dist/components/YlfSeparator.vue.d.ts +16 -0
  51. package/dist/components/YlfSlider.vue.d.ts +29 -0
  52. package/dist/components/YlfSwitch.vue.d.ts +24 -0
  53. package/dist/components/YlfTabs.vue.d.ts +32 -0
  54. package/dist/components/YlfTooltip.vue.d.ts +26 -0
  55. package/dist/components/ai-prompt.d.ts +33 -0
  56. package/dist/components/ai-provider-logos.d.ts +3 -0
  57. package/dist/components/bottom-menu/index.d.ts +20 -0
  58. package/dist/components/segmented-control.d.ts +8 -0
  59. package/dist/components/theme.d.ts +4 -0
  60. package/package.json +6 -2
@@ -26,7 +26,7 @@ const options = [
26
26
  { value: 'grid', label: '网格视图' },
27
27
  { value: 'list', label: '列表视图' },
28
28
  ] as const
29
- const icons = { grid: 'i-lucide-grid-2x2', list: 'i-lucide-list' }
29
+ const icons = { grid: 'i-ri-grid-line', list: 'i-ri-list-check' }
30
30
  </script>
31
31
 
32
32
  <template>
@@ -43,3 +43,9 @@ const options = [
43
43
  ## 工作台密度与图标
44
44
 
45
45
  `size="sm"` 使用 34px 高度、紧凑文字与 10px 圆角,适合排序、项目范围等工具栏控件;默认 `md` 保持 44px 表单尺寸。触摸设备中紧凑选择器与选项仍至少 44px。`#icon` 和 `#indicator` 可传入应用已有的 UnoCSS / Iconify 图标;未提供时保留内置 SVG。
46
+
47
+ ## 表单与局部主题
48
+
49
+ `name?: string` 和 `required?: boolean`(默认 `false`)传给底层表单控件。放在 `<form>` 内时,选择值进入原生 `FormData`;禁用字段不提交。`id`、`aria-label`、`aria-labelledby`、`class` 和事件传给触发按钮。使用实际字段名称作为可访问名称,例如 `aria-label="主题颜色"` 或关联的 `<label for>`。
50
+
51
+ `portalTo?: string | HTMLElement` 指定已存在的浮层容器,例如 `portal-to="#settings-portals"`。容器应位于页面相同的 `.ylf-theme-light` / `.ylf-theme-dark` 边界中。不传时保留 Reka UI 的 ConfigProvider 配置,最终回退到 `body`。
@@ -8,13 +8,13 @@ const range = ref([20, 70])
8
8
  <template>
9
9
  <div class="flex flex-col gap-6">
10
10
  <div class="flex flex-col gap-2">
11
- <YlfSlider v-model="single" />
11
+ <YlfSlider v-model="single" label="音量" />
12
12
  <p class="m-0 text-sm op-70">
13
13
  单值:{{ single[0] }}
14
14
  </p>
15
15
  </div>
16
16
  <div class="flex flex-col gap-2">
17
- <YlfSlider v-model="range" />
17
+ <YlfSlider v-model="range" label="价格区间" :thumb-labels="['最低价格', '最高价格']" />
18
18
  <p class="m-0 text-sm op-70">
19
19
  区间:{{ range[0] }} – {{ range[1] }}
20
20
  </p>
@@ -7,10 +7,18 @@ title_zh: 滑块
7
7
 
8
8
  ## Props
9
9
 
10
- | 属性 | 说明 | 类型 | 默认值 |
11
- | ---------- | ------ | ---------- | ------- |
12
- | `v-model` | 当前值 | `number[]` | `[50]` |
13
- | `min` | 最小值 | `number` | `0` |
14
- | `max` | 最大值 | `number` | `100` |
15
- | `step` | 步长 | `number` | `1` |
16
- | `disabled` | 禁用 | `boolean` | `false` |
10
+ | 属性 | 说明 | 类型 | 默认值 |
11
+ | ------------- | ------------------------ | ------------------- | ------- |
12
+ | `v-model` | 当前值 | `number[]` | `[50]` |
13
+ | `min` | 最小值 | `number` | `0` |
14
+ | `max` | 最大值 | `number` | `100` |
15
+ | `step` | 步长 | `number` | `1` |
16
+ | `disabled` | 禁用 | `boolean` | `false` |
17
+ | `label` | 单值或整组用途名称 | `string` | `数值` |
18
+ | `thumbLabels` | 按顺序指定每个滑块的名称 | `readonly string[]` | — |
19
+
20
+ 单值使用 `label="音量"`;区间使用 `:thumb-labels="['最低价格', '最高价格']"`。未指定端点名称时,使用 `label` 和顺序编号。方向键按 `step` 调整,Home / End 到达边界;禁用时滑块不进入键盘焦点顺序。触摸设备提供至少 44px 的操作区域,减少动态效果时关闭过渡。
21
+
22
+ ## Events
23
+
24
+ `valueCommit` 在一次拖动或键盘调整完成时回传 `number[]`。需要在交互完成后保存数据时,使用 `@value-commit`;界面状态继续使用 `v-model`。
@@ -16,3 +16,5 @@ title_zh: 开关
16
16
  | `disabled` | 禁用 | `boolean` | `false` |
17
17
 
18
18
  `tone` 接受 `blue | sun | cyan | coral | pink | green`,默认 `blue`(晴空蓝),只在 `accent` 下生效。旧 `aurora` 值映射到 `accent`。同一流程中的同类状态使用同一种颜色。
19
+
20
+ 通过 `aria-label` 或关联的 `<label for>` 提供用途名称。Space / Enter 切换状态,禁用时不响应操作。`name`、`value` 和 `required` 透传给 Reka UI,用于原生表单提交。
@@ -16,3 +16,5 @@ title_zh: 标签页
16
16
  ## Slots
17
17
 
18
18
  每个标签的内容用 `value` 同名插槽提供,如 `#cloud`、`#fun`。
19
+
20
+ `items` 支持只读数组。标签和内容面板的 ARIA 关联由 Reka UI 管理;方向键、Home / End 改变焦点并自动选中,跳过禁用项。切换普通筛选条件而不展示关联面板时使用 Segmented Control。
@@ -7,11 +7,15 @@ title_zh: 文字提示
7
7
 
8
8
  ## Props
9
9
 
10
- | 属性 | 说明 | 类型 | 默认值 |
11
- | --------- | ---------- | -------------------------------- | ------ |
12
- | `content` | 提示文字 | `string` | — |
13
- | `side` | 方向 | `top \| right \| bottom \| left` | `top` |
14
- | `delay` | 延迟(ms) | `number` | `300` |
10
+ | 属性 | 说明 | 类型 | 默认值 |
11
+ | ---------- | ---------------------- | -------------------------------- | ----------------------- |
12
+ | `content` | 提示文字 | `string` | — |
13
+ | `side` | 方向 | `top \| right \| bottom \| left` | `top` |
14
+ | `delay` | 延迟(ms) | `number` | `300` |
15
+ | `disabled` | 关闭提示 | `boolean` | `false` |
16
+ | `portalTo` | 已存在的主题内浮层容器 | `string \| HTMLElement` | ConfigProvider / `body` |
17
+
18
+ `id`、`class`、`aria-label`、`data-*` 和事件传给触发元素。仅图标按钮仍需可访问名称,不能只依赖 Tooltip 内容。局部主题中使用 `portal-to` 保持提示与触发器处于同一主题。
15
19
 
16
20
  ## Slots
17
21
 
@@ -0,0 +1,35 @@
1
+ interface AccordionItemData {
2
+ value: string;
3
+ title: string;
4
+ content?: string;
5
+ disabled?: boolean;
6
+ }
7
+ type __VLS_Props = {
8
+ items: readonly AccordionItemData[];
9
+ type?: 'single' | 'multiple';
10
+ collapsible?: boolean;
11
+ };
12
+ type __VLS_ModelProps = {
13
+ modelValue?: string | string[];
14
+ };
15
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
16
+ declare var __VLS_33: string, __VLS_34: {};
17
+ type __VLS_Slots = {} & {
18
+ [K in NonNullable<typeof __VLS_33>]?: (props: typeof __VLS_34) => any;
19
+ };
20
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
+ "update:modelValue": (value: string | string[] | undefined) => any;
22
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
23
+ "onUpdate:modelValue"?: ((value: string | string[] | undefined) => any) | undefined;
24
+ }>, {
25
+ type: "single" | "multiple";
26
+ collapsible: boolean;
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
29
+ declare const _default: typeof __VLS_export;
30
+ export default _default;
31
+ type __VLS_WithSlots<T, S> = T & {
32
+ new (): {
33
+ $slots: S;
34
+ };
35
+ };
@@ -0,0 +1,25 @@
1
+ import type { AiPromptLaunch, AiPromptLaunchResult, AiPromptOptions, AiProviderId } from './ai-prompt';
2
+ type __VLS_Props = {
3
+ prompt: string;
4
+ providers?: readonly AiProviderId[];
5
+ disabled?: boolean;
6
+ locale?: 'zh-CN' | 'en';
7
+ options?: AiPromptOptions;
8
+ /** Optional host adapter, e.g. a validated desktop IPC call. */
9
+ launch?: AiPromptLaunch;
10
+ /** Optional native clipboard adapter. */
11
+ copyText?: (text: string) => Promise<void>;
12
+ };
13
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
14
+ result: (result: AiPromptLaunchResult) => any;
15
+ busy: (value: boolean) => any;
16
+ manualCopy: (prompt: string) => any;
17
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
18
+ onResult?: ((result: AiPromptLaunchResult) => any) | undefined;
19
+ onBusy?: ((value: boolean) => any) | undefined;
20
+ onManualCopy?: ((prompt: string) => any) | undefined;
21
+ }>, {
22
+ locale: "zh-CN" | "en";
23
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const _default: typeof __VLS_export;
25
+ export default _default;
@@ -0,0 +1,14 @@
1
+ type __VLS_Props = {
2
+ src?: string;
3
+ alt?: string;
4
+ /** 图片加载失败/缺省时显示的文字(如姓名首字) */
5
+ fallback?: string;
6
+ size?: 'sm' | 'md' | 'lg';
7
+ };
8
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
9
+ fallback: string;
10
+ alt: string;
11
+ size: "sm" | "md" | "lg";
12
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
@@ -0,0 +1,29 @@
1
+ import type { YlfAccentTone, YlfColorAppearance } from './theme';
2
+ type BadgeVariant = 'featured' | 'accent' | 'aurora' | 'brand' | 'neutral' | 'success' | 'warning' | 'danger' | 'info';
3
+ type __VLS_Props = {
4
+ variant?: BadgeVariant;
5
+ /** 仅 accent 变体使用 */
6
+ tone?: YlfAccentTone;
7
+ /** accent 与状态变体的强调程度 */
8
+ appearance?: YlfColorAppearance;
9
+ /** 胶囊圆角 */
10
+ round?: boolean;
11
+ };
12
+ declare var __VLS_1: {};
13
+ type __VLS_Slots = {} & {
14
+ default?: (props: typeof __VLS_1) => any;
15
+ };
16
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
17
+ round: boolean;
18
+ variant: BadgeVariant;
19
+ tone: YlfAccentTone;
20
+ appearance: YlfColorAppearance;
21
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
22
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
25
+ type __VLS_WithSlots<T, S> = T & {
26
+ new (): {
27
+ $slots: S;
28
+ };
29
+ };
@@ -0,0 +1,19 @@
1
+ type __VLS_Props = {
2
+ /** 浮起阴影 */
3
+ shadow?: boolean;
4
+ };
5
+ declare var __VLS_1: {};
6
+ type __VLS_Slots = {} & {
7
+ default?: (props: typeof __VLS_1) => any;
8
+ };
9
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
10
+ shadow: boolean;
11
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
13
+ declare const _default: typeof __VLS_export;
14
+ export default _default;
15
+ type __VLS_WithSlots<T, S> = T & {
16
+ new (): {
17
+ $slots: S;
18
+ };
19
+ };
@@ -0,0 +1,22 @@
1
+ import type { BottomMenuItem } from './bottom-menu';
2
+ type __VLS_Props = {
3
+ active: boolean;
4
+ item: BottomMenuItem;
5
+ };
6
+ declare var __VLS_1: {};
7
+ type __VLS_Slots = {} & {
8
+ default?: (props: typeof __VLS_1) => any;
9
+ };
10
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ click: (...args: any[]) => void;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
13
+ onClick?: ((...args: any[]) => any) | undefined;
14
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
18
+ type __VLS_WithSlots<T, S> = T & {
19
+ new (): {
20
+ $slots: S;
21
+ };
22
+ };
@@ -0,0 +1,48 @@
1
+ import type { YlfAccentTone, YlfColorAppearance } from './theme';
2
+ type ButtonVariant = 'primary' | 'accent' | 'aurora' | 'secondary' | 'soft' | 'ghost' | 'success' | 'warning' | 'danger';
3
+ type ButtonSize = 'sm' | 'md' | 'lg';
4
+ type __VLS_Props = {
5
+ variant?: ButtonVariant;
6
+ /** 仅 accent 变体使用,默认晴空蓝 */
7
+ tone?: YlfAccentTone;
8
+ /** accent 与状态变体的强调程度 */
9
+ appearance?: YlfColorAppearance;
10
+ size?: ButtonSize;
11
+ /** 胶囊圆角,默认开启(云是软的) */
12
+ round?: boolean;
13
+ /** 占满整行宽度 */
14
+ block?: boolean;
15
+ disabled?: boolean;
16
+ loading?: boolean;
17
+ /** 渲染标签,如 'a' */
18
+ tag?: string;
19
+ };
20
+ declare var __VLS_10: {}, __VLS_12: {};
21
+ type __VLS_Slots = {} & {
22
+ icon?: (props: typeof __VLS_10) => any;
23
+ } & {
24
+ default?: (props: typeof __VLS_12) => any;
25
+ };
26
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
27
+ click: (e: MouseEvent) => any;
28
+ }, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
29
+ onClick?: ((e: MouseEvent) => any) | undefined;
30
+ }>, {
31
+ disabled: boolean;
32
+ round: boolean;
33
+ size: ButtonSize;
34
+ variant: ButtonVariant;
35
+ tone: YlfAccentTone;
36
+ appearance: YlfColorAppearance;
37
+ block: boolean;
38
+ loading: boolean;
39
+ tag: string;
40
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
41
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
42
+ declare const _default: typeof __VLS_export;
43
+ export default _default;
44
+ type __VLS_WithSlots<T, S> = T & {
45
+ new (): {
46
+ $slots: S;
47
+ };
48
+ };
@@ -0,0 +1,28 @@
1
+ import type { YlfAccentTone } from './theme';
2
+ type CardVariant = 'soft' | 'glass' | 'accent' | 'tinted' | 'gradient';
3
+ type __VLS_Props = {
4
+ variant?: CardVariant;
5
+ tone?: YlfAccentTone;
6
+ /** 悬停时轻轻抬升 */
7
+ hoverable?: boolean;
8
+ /** 内边距,接受任意 CSS 值 */
9
+ padding?: string;
10
+ };
11
+ declare var __VLS_1: {};
12
+ type __VLS_Slots = {} & {
13
+ default?: (props: typeof __VLS_1) => any;
14
+ };
15
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
16
+ variant: CardVariant;
17
+ tone: YlfAccentTone;
18
+ hoverable: boolean;
19
+ padding: string;
20
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
21
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
22
+ declare const _default: typeof __VLS_export;
23
+ export default _default;
24
+ type __VLS_WithSlots<T, S> = T & {
25
+ new (): {
26
+ $slots: S;
27
+ };
28
+ };
@@ -0,0 +1,18 @@
1
+ type __VLS_Props = {
2
+ disabled?: boolean;
3
+ /** 表单提交值 */
4
+ value?: string;
5
+ };
6
+ type __VLS_ModelProps = {
7
+ modelValue?: boolean | 'indeterminate';
8
+ };
9
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
11
+ "update:modelValue": (value: boolean | "indeterminate") => any;
12
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
13
+ "onUpdate:modelValue"?: ((value: boolean | "indeterminate") => any) | undefined;
14
+ }>, {
15
+ disabled: boolean;
16
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
17
+ declare const _default: typeof __VLS_export;
18
+ export default _default;
@@ -0,0 +1,37 @@
1
+ type __VLS_Props = {
2
+ title?: string;
3
+ description?: string;
4
+ /** 没有可见标题时供屏幕阅读器使用 */
5
+ accessibleTitle?: string;
6
+ /** Existing container in the same theme boundary. */
7
+ portalTo?: string | HTMLElement;
8
+ };
9
+ type __VLS_ModelProps = {
10
+ 'open'?: boolean;
11
+ };
12
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
13
+ declare var __VLS_14: {}, __VLS_39: {}, __VLS_59: {}, __VLS_61: {};
14
+ type __VLS_Slots = {} & {
15
+ trigger?: (props: typeof __VLS_14) => any;
16
+ } & {
17
+ title?: (props: typeof __VLS_39) => any;
18
+ } & {
19
+ description?: (props: typeof __VLS_59) => any;
20
+ } & {
21
+ default?: (props: typeof __VLS_61) => any;
22
+ };
23
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
24
+ "update:open": (value: boolean) => any;
25
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
26
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
27
+ }>, {
28
+ accessibleTitle: string;
29
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
30
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
31
+ declare const _default: typeof __VLS_export;
32
+ export default _default;
33
+ type __VLS_WithSlots<T, S> = T & {
34
+ new (): {
35
+ $slots: S;
36
+ };
37
+ };
@@ -0,0 +1,34 @@
1
+ type __VLS_Props = {
2
+ items: readonly MenuItem[];
3
+ portalTo?: string | HTMLElement;
4
+ };
5
+ interface MenuItem {
6
+ label?: string;
7
+ value?: string;
8
+ disabled?: boolean;
9
+ /** 渲染成分隔线 */
10
+ separator?: boolean;
11
+ }
12
+ type __VLS_ModelProps = {
13
+ 'open'?: boolean;
14
+ };
15
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
16
+ declare var __VLS_14: {};
17
+ type __VLS_Slots = {} & {
18
+ trigger?: (props: typeof __VLS_14) => any;
19
+ };
20
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
21
+ select: (value: string) => any;
22
+ "update:open": (value: boolean) => any;
23
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
24
+ onSelect?: ((value: string) => any) | undefined;
25
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
26
+ }>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
27
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;
30
+ type __VLS_WithSlots<T, S> = T & {
31
+ new (): {
32
+ $slots: S;
33
+ };
34
+ };
@@ -0,0 +1,13 @@
1
+ type __VLS_Props = {
2
+ size?: 'sm' | 'md' | 'lg';
3
+ layout?: 'vertical' | 'horizontal';
4
+ /** 是否显示「云乐坊」文字 */
5
+ wordmark?: boolean;
6
+ };
7
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
8
+ size: "sm" | "md" | "lg";
9
+ layout: "vertical" | "horizontal";
10
+ wordmark: boolean;
11
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
12
+ declare const _default: typeof __VLS_export;
13
+ export default _default;
@@ -0,0 +1,31 @@
1
+ type __VLS_Props = {
2
+ side?: 'top' | 'right' | 'bottom' | 'left';
3
+ align?: 'start' | 'center' | 'end';
4
+ portalTo?: string | HTMLElement;
5
+ };
6
+ type __VLS_ModelProps = {
7
+ 'open'?: boolean;
8
+ };
9
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
10
+ declare var __VLS_14: {}, __VLS_28: {};
11
+ type __VLS_Slots = {} & {
12
+ trigger?: (props: typeof __VLS_14) => any;
13
+ } & {
14
+ default?: (props: typeof __VLS_28) => any;
15
+ };
16
+ declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
17
+ "update:open": (value: boolean) => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
19
+ "onUpdate:open"?: ((value: boolean) => any) | undefined;
20
+ }>, {
21
+ side: "top" | "right" | "bottom" | "left";
22
+ align: "start" | "center" | "end";
23
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
24
+ declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
25
+ declare const _default: typeof __VLS_export;
26
+ export default _default;
27
+ type __VLS_WithSlots<T, S> = T & {
28
+ new (): {
29
+ $slots: S;
30
+ };
31
+ };
@@ -0,0 +1,17 @@
1
+ import type { YlfAccentTone } from './theme';
2
+ type __VLS_Props = {
3
+ /** null means that progress is unknown. */
4
+ value?: number | null;
5
+ max?: number;
6
+ /** 进度条填充:brand 主色或 accent 纯色;aurora 是 accent 的旧别名 */
7
+ variant?: 'brand' | 'accent' | 'aurora';
8
+ tone?: YlfAccentTone;
9
+ };
10
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
11
+ value: number | null;
12
+ variant: "brand" | "accent" | "aurora";
13
+ tone: YlfAccentTone;
14
+ max: number;
15
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
16
+ declare const _default: typeof __VLS_export;
17
+ export default _default;
@@ -0,0 +1,24 @@
1
+ interface RadioOption {
2
+ label: string;
3
+ value: string;
4
+ disabled?: boolean;
5
+ }
6
+ type __VLS_Props = {
7
+ options: readonly RadioOption[];
8
+ disabled?: boolean;
9
+ orientation?: 'vertical' | 'horizontal';
10
+ };
11
+ type __VLS_ModelProps = {
12
+ modelValue?: string;
13
+ };
14
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
15
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ "update:modelValue": (value: string | undefined) => any;
17
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
18
+ "onUpdate:modelValue"?: ((value: string | undefined) => any) | undefined;
19
+ }>, {
20
+ disabled: boolean;
21
+ orientation: "vertical" | "horizontal";
22
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
23
+ declare const _default: typeof __VLS_export;
24
+ export default _default;
@@ -0,0 +1,35 @@
1
+ import type { YlfSegmentedOption } from './segmented-control';
2
+ declare const __VLS_export: <T extends string = string>(__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<{
3
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<({
4
+ options: readonly YlfSegmentedOption<T>[];
5
+ /** Accessible name of the group, including for icon-only controls. */
6
+ label: string;
7
+ size?: "sm" | "md";
8
+ iconOnly?: boolean;
9
+ disabled?: boolean;
10
+ } & {
11
+ modelValue: T;
12
+ }) & {
13
+ "onUpdate:modelValue"?: ((value: T) => any) | undefined;
14
+ }> & (typeof globalThis extends {
15
+ __VLS_PROPS_FALLBACK: infer P;
16
+ } ? P : {});
17
+ expose: (exposed: {}) => void;
18
+ attrs: any;
19
+ slots: {
20
+ icon?: (props: {
21
+ option: YlfSegmentedOption<T>;
22
+ selected: boolean;
23
+ }) => unknown;
24
+ };
25
+ emit: (event: "update:modelValue", value: T) => void;
26
+ }>) => import("vue").VNode & {
27
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
28
+ };
29
+ declare const _default: typeof __VLS_export;
30
+ export default _default;
31
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
32
+ [K in keyof T]: T[K];
33
+ } : {
34
+ [K in keyof T as K]: T[K];
35
+ }) & {};
@@ -0,0 +1,43 @@
1
+ declare const __VLS_export: <T extends string = string>(__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<{
2
+ props: import("vue").PublicProps & __VLS_PrettifyLocal<({
3
+ /** color 可使用 CSS 色值或公共 token,例如 var(--ylf-accent-blue) */
4
+ options: readonly {
5
+ label: string;
6
+ value: T;
7
+ disabled?: boolean;
8
+ color?: string;
9
+ }[];
10
+ /** Compact workbench or comfortable form density. */
11
+ size?: "sm" | "md";
12
+ placeholder?: string;
13
+ disabled?: boolean;
14
+ /** Native form field name and validation. */
15
+ name?: string;
16
+ required?: boolean;
17
+ /** Existing container in the same theme boundary. */
18
+ portalTo?: string | HTMLElement;
19
+ } & {
20
+ modelValue?: T;
21
+ }) & {
22
+ "onUpdate:modelValue"?: ((value: T | undefined) => any) | undefined;
23
+ }> & (typeof globalThis extends {
24
+ __VLS_PROPS_FALLBACK: infer P;
25
+ } ? P : {});
26
+ expose: (exposed: {}) => void;
27
+ attrs: any;
28
+ slots: {
29
+ icon?: (props: {}) => any;
30
+ } & {
31
+ indicator?: (props: {}) => any;
32
+ };
33
+ emit: (event: "update:modelValue", value: T | undefined) => void;
34
+ }>) => import("vue").VNode & {
35
+ __ctx?: NonNullable<Awaited<typeof __VLS_setup>>;
36
+ };
37
+ declare const _default: typeof __VLS_export;
38
+ export default _default;
39
+ type __VLS_PrettifyLocal<T> = (T extends any ? {
40
+ [K in keyof T]: T[K];
41
+ } : {
42
+ [K in keyof T as K]: T[K];
43
+ }) & {};
@@ -0,0 +1,16 @@
1
+ import type { YlfAccentTone } from './theme';
2
+ type __VLS_Props = {
3
+ orientation?: 'horizontal' | 'vertical';
4
+ /** 仅装饰(不被屏幕阅读器作为分节朗读) */
5
+ decorative?: boolean;
6
+ variant?: 'neutral' | 'brand' | 'accent' | 'spectrum';
7
+ tone?: YlfAccentTone;
8
+ };
9
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
10
+ orientation: "horizontal" | "vertical";
11
+ variant: "neutral" | "brand" | "accent" | "spectrum";
12
+ tone: YlfAccentTone;
13
+ decorative: boolean;
14
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
15
+ declare const _default: typeof __VLS_export;
16
+ export default _default;
@@ -0,0 +1,29 @@
1
+ type __VLS_Props = {
2
+ min?: number;
3
+ max?: number;
4
+ step?: number;
5
+ disabled?: boolean;
6
+ /** Accessible name for a single value or the range as a whole. */
7
+ label?: string;
8
+ /** Per-thumb accessible names, such as minimum and maximum price. */
9
+ thumbLabels?: readonly string[];
10
+ };
11
+ type __VLS_ModelProps = {
12
+ modelValue?: number[];
13
+ };
14
+ type __VLS_PublicProps = __VLS_Props & __VLS_ModelProps;
15
+ declare const __VLS_export: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
16
+ "update:modelValue": (value: number[]) => any;
17
+ valueCommit: (value: number[]) => any;
18
+ }, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
19
+ "onUpdate:modelValue"?: ((value: number[]) => any) | undefined;
20
+ onValueCommit?: ((value: number[]) => any) | undefined;
21
+ }>, {
22
+ disabled: boolean;
23
+ label: string;
24
+ max: number;
25
+ min: number;
26
+ step: number;
27
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
28
+ declare const _default: typeof __VLS_export;
29
+ export default _default;