yc-agent-ui 1.0.0 → 1.1.1

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 (238) hide show
  1. package/README.md +22 -0
  2. package/es/components/dialog-form/index.d.ts +4 -4
  3. package/es/components/dialog-form/src/index.vue.d.ts +4 -4
  4. package/es/components/display-item/index.d.ts +15 -15
  5. package/es/components/display-item/src/index.vue.d.ts +13 -13
  6. package/es/components/drawer-form/index.d.ts +4 -4
  7. package/es/components/drawer-form/src/index.vue.d.ts +4 -4
  8. package/es/components/form/index.d.ts +8 -8
  9. package/es/components/form/src/form-content.vue.d.ts +8 -8
  10. package/es/components/form/src/index.vue.d.ts +8 -8
  11. package/es/components/form-item/index.d.ts +6 -6
  12. package/es/components/form-item/src/index.vue.d.ts +6 -6
  13. package/es/components/index.d.ts +4 -0
  14. package/es/components/page/index.d.ts +172 -172
  15. package/es/components/page/src/index.vue.d.ts +60 -60
  16. package/es/components/search/index.d.ts +52 -52
  17. package/es/components/search/src/index.vue.d.ts +20 -20
  18. package/es/components/table/src/table-column.vue.d.ts +34 -34
  19. package/es/components/yc-controls/capability.d.ts +4 -0
  20. package/es/components/yc-controls/index.d.ts +17 -0
  21. package/es/components/yc-controls/src/choice-cards.vue.d.ts +16 -0
  22. package/es/components/yc-controls/src/segmented.vue.d.ts +16 -0
  23. package/es/components/yc-controls/src/switch-row.vue.d.ts +13 -0
  24. package/es/components/yc-controls/src/type.d.ts +39 -0
  25. package/es/components/yc-feedback/capability.d.ts +4 -0
  26. package/es/components/yc-feedback/index.d.ts +21 -0
  27. package/es/components/yc-feedback/src/banner.vue.d.ts +22 -0
  28. package/es/components/yc-feedback/src/empty-state.vue.d.ts +20 -0
  29. package/es/components/yc-feedback/src/key-value-list.vue.d.ts +22 -0
  30. package/es/components/yc-feedback/src/timeline.vue.d.ts +7 -0
  31. package/es/components/yc-feedback/src/type.d.ts +46 -0
  32. package/es/components/yc-input/capability.d.ts +4 -0
  33. package/es/components/yc-input/index.d.ts +21 -0
  34. package/es/components/yc-input/src/input.vue.d.ts +50 -0
  35. package/es/components/yc-input/src/money-input.vue.d.ts +26 -0
  36. package/es/components/yc-input/src/stepper-input.vue.d.ts +18 -0
  37. package/es/components/yc-input/src/textarea.vue.d.ts +35 -0
  38. package/es/components/yc-input/src/type.d.ts +82 -0
  39. package/es/components/yc-plus-page/src/index.vue.d.ts +176 -176
  40. package/es/components/yc-property-table/capability.d.ts +4 -0
  41. package/es/components/yc-property-table/index.d.ts +30 -0
  42. package/es/components/yc-property-table/src/asset-table.vue.d.ts +17 -0
  43. package/es/components/yc-property-table/src/bill-table.vue.d.ts +18 -0
  44. package/es/components/yc-property-table/src/device-table.vue.d.ts +17 -0
  45. package/es/components/yc-property-table/src/order-table.vue.d.ts +18 -0
  46. package/es/components/yc-property-table/src/property-table.vue.d.ts +91 -0
  47. package/es/components/yc-property-table/src/type.d.ts +214 -0
  48. package/es/hooks/usePlusFormReset.d.ts +48 -48
  49. package/es/index.css +16 -16
  50. package/es/index.mjs +4 -0
  51. package/es/packages/components/chart/index.mjs +36 -36
  52. package/es/packages/components/index.mjs +4 -0
  53. package/es/packages/components/table/capability.mjs +10 -29
  54. package/es/packages/components/utils/index.mjs +1 -1
  55. package/es/packages/components/yc-card/capability.mjs +53 -13
  56. package/es/packages/components/yc-controls/capability.mjs +100 -0
  57. package/es/packages/components/yc-controls/index.mjs +13 -0
  58. package/es/packages/components/yc-controls/src/choice-cards.vue.mjs +5 -0
  59. package/es/packages/components/yc-controls/src/choice-cards2.vue.mjs +157 -0
  60. package/es/packages/components/yc-controls/src/segmented.vue.mjs +5 -0
  61. package/es/packages/components/yc-controls/src/segmented2.vue.mjs +78 -0
  62. package/es/packages/components/yc-controls/src/switch-row.vue.mjs +5 -0
  63. package/es/packages/components/yc-controls/src/switch-row2.vue.mjs +95 -0
  64. package/es/packages/components/yc-controls/src/type.mjs +1 -0
  65. package/es/packages/components/yc-feedback/capability.mjs +109 -0
  66. package/es/packages/components/yc-feedback/index.mjs +16 -0
  67. package/es/packages/components/yc-feedback/src/banner.vue.mjs +5 -0
  68. package/es/packages/components/yc-feedback/src/banner2.vue.mjs +230 -0
  69. package/es/packages/components/yc-feedback/src/empty-state.vue.mjs +5 -0
  70. package/es/packages/components/yc-feedback/src/empty-state2.vue.mjs +97 -0
  71. package/es/packages/components/yc-feedback/src/key-value-list.vue.mjs +5 -0
  72. package/es/packages/components/yc-feedback/src/key-value-list2.vue.mjs +194 -0
  73. package/es/packages/components/yc-feedback/src/timeline.vue.mjs +5 -0
  74. package/es/packages/components/yc-feedback/src/timeline2.vue.mjs +134 -0
  75. package/es/packages/components/yc-feedback/src/type.mjs +1 -0
  76. package/es/packages/components/yc-input/capability.mjs +112 -0
  77. package/es/packages/components/yc-input/index.mjs +16 -0
  78. package/es/packages/components/yc-input/src/input.vue.mjs +5 -0
  79. package/es/packages/components/yc-input/src/input2.vue.mjs +427 -0
  80. package/es/packages/components/yc-input/src/money-input.vue.mjs +5 -0
  81. package/es/packages/components/yc-input/src/money-input2.vue.mjs +242 -0
  82. package/es/packages/components/yc-input/src/stepper-input.vue.mjs +5 -0
  83. package/es/packages/components/yc-input/src/stepper-input2.vue.mjs +211 -0
  84. package/es/packages/components/yc-input/src/textarea.vue.mjs +5 -0
  85. package/es/packages/components/yc-input/src/textarea2.vue.mjs +158 -0
  86. package/es/packages/components/yc-input/src/type.mjs +1 -0
  87. package/es/packages/components/yc-property-table/capability.mjs +350 -0
  88. package/es/packages/components/yc-property-table/index.mjs +24 -0
  89. package/es/packages/components/yc-property-table/src/asset-table.vue.mjs +5 -0
  90. package/es/packages/components/yc-property-table/src/asset-table2.vue.mjs +405 -0
  91. package/es/packages/components/yc-property-table/src/bill-table.vue.mjs +5 -0
  92. package/es/packages/components/yc-property-table/src/bill-table2.vue.mjs +654 -0
  93. package/es/packages/components/yc-property-table/src/device-table.vue.mjs +5 -0
  94. package/es/packages/components/yc-property-table/src/device-table2.vue.mjs +324 -0
  95. package/es/packages/components/yc-property-table/src/order-table.vue.mjs +5 -0
  96. package/es/packages/components/yc-property-table/src/order-table2.vue.mjs +363 -0
  97. package/es/packages/components/yc-property-table/src/property-table.vue.mjs +5 -0
  98. package/es/packages/components/yc-property-table/src/property-table2.vue.mjs +1228 -0
  99. package/es/packages/components/yc-property-table/src/type.mjs +1 -0
  100. package/es/packages/registry/load.mjs +21 -5
  101. package/es/version.d.ts +1 -1
  102. package/es/version.mjs +1 -1
  103. package/index.css +6 -6
  104. package/index.js +64731 -57876
  105. package/index.min.css +5 -5
  106. package/index.min.js +32 -32
  107. package/index.min.mjs +33 -33
  108. package/index.mjs +64681 -57863
  109. package/lib/components/dialog-form/index.d.ts +4 -4
  110. package/lib/components/dialog-form/src/index.vue.d.ts +4 -4
  111. package/lib/components/display-item/index.d.ts +15 -15
  112. package/lib/components/display-item/src/index.vue.d.ts +13 -13
  113. package/lib/components/drawer-form/index.d.ts +4 -4
  114. package/lib/components/drawer-form/src/index.vue.d.ts +4 -4
  115. package/lib/components/form/index.d.ts +8 -8
  116. package/lib/components/form/src/form-content.vue.d.ts +8 -8
  117. package/lib/components/form/src/index.vue.d.ts +8 -8
  118. package/lib/components/form-item/index.d.ts +6 -6
  119. package/lib/components/form-item/src/index.vue.d.ts +6 -6
  120. package/lib/components/index.d.ts +4 -0
  121. package/lib/components/page/index.d.ts +172 -172
  122. package/lib/components/page/src/index.vue.d.ts +60 -60
  123. package/lib/components/search/index.d.ts +52 -52
  124. package/lib/components/search/src/index.vue.d.ts +20 -20
  125. package/lib/components/table/src/table-column.vue.d.ts +34 -34
  126. package/lib/components/yc-controls/capability.d.ts +4 -0
  127. package/lib/components/yc-controls/index.d.ts +17 -0
  128. package/lib/components/yc-controls/src/choice-cards.vue.d.ts +16 -0
  129. package/lib/components/yc-controls/src/segmented.vue.d.ts +16 -0
  130. package/lib/components/yc-controls/src/switch-row.vue.d.ts +13 -0
  131. package/lib/components/yc-controls/src/type.d.ts +39 -0
  132. package/lib/components/yc-feedback/capability.d.ts +4 -0
  133. package/lib/components/yc-feedback/index.d.ts +21 -0
  134. package/lib/components/yc-feedback/src/banner.vue.d.ts +22 -0
  135. package/lib/components/yc-feedback/src/empty-state.vue.d.ts +20 -0
  136. package/lib/components/yc-feedback/src/key-value-list.vue.d.ts +22 -0
  137. package/lib/components/yc-feedback/src/timeline.vue.d.ts +7 -0
  138. package/lib/components/yc-feedback/src/type.d.ts +46 -0
  139. package/lib/components/yc-input/capability.d.ts +4 -0
  140. package/lib/components/yc-input/index.d.ts +21 -0
  141. package/lib/components/yc-input/src/input.vue.d.ts +50 -0
  142. package/lib/components/yc-input/src/money-input.vue.d.ts +26 -0
  143. package/lib/components/yc-input/src/stepper-input.vue.d.ts +18 -0
  144. package/lib/components/yc-input/src/textarea.vue.d.ts +35 -0
  145. package/lib/components/yc-input/src/type.d.ts +82 -0
  146. package/lib/components/yc-plus-page/src/index.vue.d.ts +176 -176
  147. package/lib/components/yc-property-table/capability.d.ts +4 -0
  148. package/lib/components/yc-property-table/index.d.ts +30 -0
  149. package/lib/components/yc-property-table/src/asset-table.vue.d.ts +17 -0
  150. package/lib/components/yc-property-table/src/bill-table.vue.d.ts +18 -0
  151. package/lib/components/yc-property-table/src/device-table.vue.d.ts +17 -0
  152. package/lib/components/yc-property-table/src/order-table.vue.d.ts +18 -0
  153. package/lib/components/yc-property-table/src/property-table.vue.d.ts +91 -0
  154. package/lib/components/yc-property-table/src/type.d.ts +214 -0
  155. package/lib/hooks/usePlusFormReset.d.ts +48 -48
  156. package/lib/index.css +13 -13
  157. package/lib/index.js +176 -135
  158. package/lib/packages/components/index.js +172 -131
  159. package/lib/packages/components/table/capability.js +10 -29
  160. package/lib/packages/components/yc-card/capability.js +53 -13
  161. package/lib/packages/components/yc-controls/capability.js +104 -0
  162. package/lib/packages/components/yc-controls/index.js +23 -0
  163. package/lib/packages/components/yc-controls/src/choice-cards.vue.js +9 -0
  164. package/lib/packages/components/yc-controls/src/choice-cards2.vue.js +161 -0
  165. package/lib/packages/components/yc-controls/src/segmented.vue.js +9 -0
  166. package/lib/packages/components/yc-controls/src/segmented2.vue.js +82 -0
  167. package/lib/packages/components/yc-controls/src/switch-row.vue.js +9 -0
  168. package/lib/packages/components/yc-controls/src/switch-row2.vue.js +99 -0
  169. package/lib/packages/components/yc-controls/src/type.js +2 -0
  170. package/lib/packages/components/yc-feedback/capability.js +113 -0
  171. package/lib/packages/components/yc-feedback/index.js +28 -0
  172. package/lib/packages/components/yc-feedback/src/banner.vue.js +9 -0
  173. package/lib/packages/components/yc-feedback/src/banner2.vue.js +234 -0
  174. package/lib/packages/components/yc-feedback/src/empty-state.vue.js +9 -0
  175. package/lib/packages/components/yc-feedback/src/empty-state2.vue.js +101 -0
  176. package/lib/packages/components/yc-feedback/src/key-value-list.vue.js +9 -0
  177. package/lib/packages/components/yc-feedback/src/key-value-list2.vue.js +198 -0
  178. package/lib/packages/components/yc-feedback/src/timeline.vue.js +9 -0
  179. package/lib/packages/components/yc-feedback/src/timeline2.vue.js +138 -0
  180. package/lib/packages/components/yc-feedback/src/type.js +2 -0
  181. package/lib/packages/components/yc-input/capability.js +116 -0
  182. package/lib/packages/components/yc-input/index.js +28 -0
  183. package/lib/packages/components/yc-input/src/input.vue.js +9 -0
  184. package/lib/packages/components/yc-input/src/input2.vue.js +431 -0
  185. package/lib/packages/components/yc-input/src/money-input.vue.js +9 -0
  186. package/lib/packages/components/yc-input/src/money-input2.vue.js +246 -0
  187. package/lib/packages/components/yc-input/src/stepper-input.vue.js +9 -0
  188. package/lib/packages/components/yc-input/src/stepper-input2.vue.js +215 -0
  189. package/lib/packages/components/yc-input/src/textarea.vue.js +9 -0
  190. package/lib/packages/components/yc-input/src/textarea2.vue.js +162 -0
  191. package/lib/packages/components/yc-input/src/type.js +2 -0
  192. package/lib/packages/components/yc-property-table/capability.js +354 -0
  193. package/lib/packages/components/yc-property-table/index.js +43 -0
  194. package/lib/packages/components/yc-property-table/src/asset-table.vue.js +9 -0
  195. package/lib/packages/components/yc-property-table/src/asset-table2.vue.js +409 -0
  196. package/lib/packages/components/yc-property-table/src/bill-table.vue.js +9 -0
  197. package/lib/packages/components/yc-property-table/src/bill-table2.vue.js +658 -0
  198. package/lib/packages/components/yc-property-table/src/device-table.vue.js +9 -0
  199. package/lib/packages/components/yc-property-table/src/device-table2.vue.js +328 -0
  200. package/lib/packages/components/yc-property-table/src/order-table.vue.js +9 -0
  201. package/lib/packages/components/yc-property-table/src/order-table2.vue.js +367 -0
  202. package/lib/packages/components/yc-property-table/src/property-table.vue.js +9 -0
  203. package/lib/packages/components/yc-property-table/src/property-table2.vue.js +1232 -0
  204. package/lib/packages/components/yc-property-table/src/type.js +2 -0
  205. package/lib/packages/registry/load.js +21 -5
  206. package/lib/version.d.ts +1 -1
  207. package/lib/version.js +1 -1
  208. package/locale/en.js +1 -1
  209. package/locale/en.min.js +1 -1
  210. package/locale/en.min.mjs +1 -1
  211. package/locale/en.mjs +1 -1
  212. package/locale/ja.js +1 -1
  213. package/locale/ja.min.js +1 -1
  214. package/locale/ja.min.mjs +1 -1
  215. package/locale/ja.mjs +1 -1
  216. package/locale/ko.js +1 -1
  217. package/locale/ko.min.js +1 -1
  218. package/locale/ko.min.mjs +1 -1
  219. package/locale/ko.mjs +1 -1
  220. package/locale/zh-cn.js +1 -1
  221. package/locale/zh-cn.min.js +1 -1
  222. package/locale/zh-cn.min.mjs +1 -1
  223. package/locale/zh-cn.mjs +1 -1
  224. package/locale/zh-tw.js +1 -1
  225. package/locale/zh-tw.min.js +1 -1
  226. package/locale/zh-tw.min.mjs +1 -1
  227. package/locale/zh-tw.mjs +1 -1
  228. package/package.json +1 -1
  229. package/theme-chalk/index.css +6 -6
  230. package/theme-chalk/plus-yc-controls.css +1 -0
  231. package/theme-chalk/plus-yc-feedback.css +1 -0
  232. package/theme-chalk/plus-yc-input.css +1 -0
  233. package/theme-chalk/plus-yc-property-table.css +1 -0
  234. package/theme-chalk/src/index.scss +4 -0
  235. package/theme-chalk/src/yc-controls.scss +316 -0
  236. package/theme-chalk/src/yc-feedback.scss +452 -0
  237. package/theme-chalk/src/yc-input.scss +473 -0
  238. package/theme-chalk/src/yc-property-table.scss +1700 -0
@@ -8,34 +8,74 @@ const YcCardGalleryDemo = defineComponent({
8
8
  return () => h(
9
9
  _sfc_main,
10
10
  {
11
- palette: "03",
12
- variant: "glass",
13
- padding: 12,
14
- height: 148
11
+ background: "#ffffff",
12
+ padding: 14,
13
+ radius: 8,
14
+ style: { border: "1px solid #e2e8f0" }
15
15
  },
16
16
  {
17
17
  default: () => [
18
18
  h(
19
19
  "div",
20
- { style: { fontSize: "12px", color: "#4b5563" } },
21
- "\u91D1\u78A7\u82B1\u56ED \xB7 \u672C\u6708\u5E94\u6536"
20
+ {
21
+ style: {
22
+ display: "flex",
23
+ alignItems: "center",
24
+ justifyContent: "space-between",
25
+ fontSize: "12px",
26
+ color: "#64748b"
27
+ }
28
+ },
29
+ [
30
+ h("span", "\u91D1\u78A7\u82B1\u56ED \xB7 \u672C\u671F\u5B9E\u6536\u6C47\u603B"),
31
+ h(
32
+ "span",
33
+ {
34
+ style: {
35
+ fontFamily: "ui-monospace, SFMono-Regular, Menlo, monospace",
36
+ fontSize: "11px",
37
+ color: "#475569",
38
+ background: "#f8fafc",
39
+ border: "1px solid #e2e8f0",
40
+ borderRadius: "4px",
41
+ padding: "1px 6px"
42
+ }
43
+ },
44
+ "2026-11"
45
+ )
46
+ ]
22
47
  ),
23
48
  h(
24
49
  "div",
25
50
  {
26
51
  style: {
27
- marginTop: "8px",
28
- fontSize: "22px",
29
- fontWeight: "700",
30
- color: "#1f2937"
52
+ marginTop: "10px",
53
+ fontSize: "24px",
54
+ fontWeight: "650",
55
+ letterSpacing: "-0.02em",
56
+ fontVariantNumeric: "tabular-nums",
57
+ color: "#0f172a"
31
58
  }
32
59
  },
33
- "\xA5128,460"
60
+ "\xA5 128,460.00"
34
61
  ),
35
62
  h(
36
63
  "div",
37
- { style: { marginTop: "6px", fontSize: "12px", color: "#059669" } },
38
- "\u8F83\u4E0A\u6708 +8.2%"
64
+ {
65
+ style: {
66
+ marginTop: "10px",
67
+ paddingTop: "9px",
68
+ borderTop: "1px solid #f1f5f9",
69
+ display: "flex",
70
+ justifyContent: "space-between",
71
+ fontSize: "12px",
72
+ color: "#64748b"
73
+ }
74
+ },
75
+ [
76
+ h("span", "\u5F53\u671F\u6536\u7F34\u7387 94.6%"),
77
+ h("span", { style: { color: "#15803d", fontWeight: "500" } }, "\u73AF\u6BD4 +2.4%")
78
+ ]
39
79
  )
40
80
  ]
41
81
  }
@@ -0,0 +1,100 @@
1
+ import { defineComponent, ref, h } from 'vue';
2
+ import { YcSegmented, YcSwitchRow, YcChoiceCards } from './index.mjs';
3
+
4
+ const YcSegmentedGalleryDemo = defineComponent({
5
+ name: "YcSegmentedGalleryDemo",
6
+ setup() {
7
+ const view = ref("unpaid");
8
+ return () => h(YcSegmented, {
9
+ modelValue: view.value,
10
+ "onUpdate:modelValue": (val) => {
11
+ view.value = String(val);
12
+ },
13
+ block: true,
14
+ options: [
15
+ { label: "\u5168\u90E8", value: "all", count: 48 },
16
+ { label: "\u5F85\u7F34", value: "unpaid", count: 12 },
17
+ { label: "\u903E\u671F", value: "overdue", count: 3 },
18
+ { label: "\u5DF2\u7ED3\u6E05", value: "paid" }
19
+ ]
20
+ });
21
+ }
22
+ });
23
+ const YcSwitchRowGalleryDemo = defineComponent({
24
+ name: "YcSwitchRowGalleryDemo",
25
+ setup() {
26
+ const autoRemind = ref(true);
27
+ const lateFee = ref(false);
28
+ return () => h("div", { class: "yc-controls-demo-stack" }, [
29
+ h(YcSwitchRow, {
30
+ modelValue: autoRemind.value,
31
+ "onUpdate:modelValue": (v) => {
32
+ autoRemind.value = v;
33
+ },
34
+ title: "\u8D26\u5355\u5230\u671F\u81EA\u52A8\u63D0\u9192",
35
+ badge: "\u4F01\u5FAE",
36
+ description: "\u8D26\u5355\u5230\u671F\u524D 3 \u5929\u5411\u4E1A\u4E3B\u63A8\u9001\u4F01\u5FAE\u7F34\u8D39\u5361\u7247"
37
+ }),
38
+ h(YcSwitchRow, {
39
+ modelValue: lateFee.value,
40
+ "onUpdate:modelValue": (v) => {
41
+ lateFee.value = v;
42
+ },
43
+ title: "\u903E\u671F\u81EA\u52A8\u8BA1\u6536\u8FDD\u7EA6\u91D1",
44
+ description: "\u8D85\u8FC7\u5BBD\u9650\u671F\u540E\u6309\u5408\u540C\u65E5\u8D39\u7387\u8BA1\u5165\u4E0B\u671F\u5E94\u6536"
45
+ })
46
+ ]);
47
+ }
48
+ });
49
+ const YcChoiceCardsGalleryDemo = defineComponent({
50
+ name: "YcChoiceCardsGalleryDemo",
51
+ setup() {
52
+ const cycle = ref("quarter");
53
+ return () => h(YcChoiceCards, {
54
+ modelValue: cycle.value,
55
+ "onUpdate:modelValue": (v) => {
56
+ if (!Array.isArray(v)) cycle.value = String(v);
57
+ },
58
+ label: "\u7269\u4E1A\u8D39\u51FA\u8D26\u5468\u671F",
59
+ options: [
60
+ {
61
+ value: "month",
62
+ title: "\u6309\u6708\u51FA\u8D26",
63
+ meta: "\u6BCF\u6708 1 \u65E5",
64
+ description: "\u9002\u5408\u5546\u94FA\u4E0E\u4E34\u79DF\u516C\u5BD3\uFF0C\u73B0\u91D1\u6D41\u56DE\u6B3E\u5E73\u7A33"
65
+ },
66
+ {
67
+ value: "quarter",
68
+ title: "\u6309\u5B63\u51FA\u8D26",
69
+ meta: "\u63A8\u8350",
70
+ description: "\u4F4F\u5B85\u9879\u76EE\u5E38\u7528\u53E3\u5F84\uFF0C\u517C\u987E\u50AC\u7F34\u9891\u6B21\u4E0E\u6536\u7F34\u7387"
71
+ }
72
+ ]
73
+ });
74
+ }
75
+ });
76
+ const capability = {
77
+ install: [YcSegmented, YcSwitchRow, YcChoiceCards],
78
+ gallery: [
79
+ {
80
+ id: "yc-segmented",
81
+ title: "YcSegmented \u5206\u6BB5\u5207\u6362",
82
+ categories: ["\u6811\u4E0E\u5BFC\u822A"],
83
+ component: YcSegmentedGalleryDemo
84
+ },
85
+ {
86
+ id: "yc-switch-row",
87
+ title: "YcSwitchRow \u5F00\u5173\u914D\u7F6E\u884C",
88
+ categories: ["\u8868\u5355\u5F55\u5165"],
89
+ component: YcSwitchRowGalleryDemo
90
+ },
91
+ {
92
+ id: "yc-choice-cards",
93
+ title: "YcChoiceCards \u5361\u7247\u5355\u9009\u7EC4",
94
+ categories: ["\u8868\u5355\u5F55\u5165"],
95
+ component: YcChoiceCardsGalleryDemo
96
+ }
97
+ ]
98
+ };
99
+
100
+ export { capability as default };
@@ -0,0 +1,13 @@
1
+ import { withInstall } from '../../utils/src/component.mjs';
2
+ import _sfc_main from './src/segmented2.vue.mjs';
3
+ import _sfc_main$1 from './src/switch-row2.vue.mjs';
4
+ import _sfc_main$2 from './src/choice-cards2.vue.mjs';
5
+
6
+ const YcSegmented = withInstall(_sfc_main);
7
+ const ReSegmented = YcSegmented;
8
+ const YcSwitchRow = withInstall(_sfc_main$1);
9
+ const ReSwitchRow = YcSwitchRow;
10
+ const YcChoiceCards = withInstall(_sfc_main$2);
11
+ const ReChoiceCards = YcChoiceCards;
12
+
13
+ export { ReChoiceCards, ReSegmented, ReSwitchRow, YcChoiceCards, YcSegmented, YcSwitchRow, YcSegmented as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './choice-cards2.vue.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,157 @@
1
+ import { defineComponent, openBlock, createElementBlock, normalizeClass, toDisplayString, createCommentVNode, createElementVNode, Fragment, renderList } from 'vue';
2
+
3
+ const _hoisted_1 = {
4
+ key: 0,
5
+ class: "yc-choice-cards__label"
6
+ };
7
+ const _hoisted_2 = ["role"];
8
+ const _hoisted_3 = ["role", "aria-checked", "disabled", "onClick"];
9
+ const _hoisted_4 = { class: "yc-choice-card__top" };
10
+ const _hoisted_5 = { class: "yc-choice-card__title" };
11
+ const _hoisted_6 = { class: "yc-choice-card__right" };
12
+ const _hoisted_7 = {
13
+ key: 0,
14
+ class: "yc-choice-card__meta"
15
+ };
16
+ const _hoisted_8 = {
17
+ key: 0,
18
+ viewBox: "0 0 24 24",
19
+ width: "10",
20
+ height: "10",
21
+ fill: "none",
22
+ stroke: "currentColor",
23
+ "stroke-width": "3",
24
+ "stroke-linecap": "round",
25
+ "stroke-linejoin": "round"
26
+ };
27
+ const _hoisted_9 = {
28
+ key: 0,
29
+ class: "yc-choice-card__desc"
30
+ };
31
+ var _sfc_main = /* @__PURE__ */ defineComponent({
32
+ ...{
33
+ name: "YcChoiceCards"
34
+ },
35
+ __name: "choice-cards",
36
+ props: {
37
+ modelValue: {},
38
+ options: { default: () => [] },
39
+ multiple: { type: Boolean, default: false },
40
+ columns: { default: 1 },
41
+ label: {},
42
+ disabled: { type: Boolean, default: false }
43
+ },
44
+ emits: ["update:modelValue", "change"],
45
+ setup(__props, { emit: __emit }) {
46
+ const props = __props;
47
+ const emit = __emit;
48
+ const isSelected = (val) => {
49
+ if (props.multiple) {
50
+ return Array.isArray(props.modelValue) && props.modelValue.includes(val);
51
+ }
52
+ return props.modelValue === val;
53
+ };
54
+ const select = (opt) => {
55
+ if (props.disabled || opt.disabled) return;
56
+ if (props.multiple) {
57
+ const cur = Array.isArray(props.modelValue) ? [...props.modelValue] : [];
58
+ const idx = cur.indexOf(opt.value);
59
+ if (idx >= 0) cur.splice(idx, 1);
60
+ else cur.push(opt.value);
61
+ emit("update:modelValue", cur);
62
+ emit("change", cur);
63
+ return;
64
+ }
65
+ emit("update:modelValue", opt.value);
66
+ emit("change", opt.value);
67
+ };
68
+ return (_ctx, _cache) => {
69
+ return openBlock(), createElementBlock(
70
+ "div",
71
+ {
72
+ class: normalizeClass(["yc-choice-cards", { "is-disabled": __props.disabled }])
73
+ },
74
+ [
75
+ __props.label ? (openBlock(), createElementBlock(
76
+ "div",
77
+ _hoisted_1,
78
+ toDisplayString(__props.label),
79
+ 1
80
+ /* TEXT */
81
+ )) : createCommentVNode("v-if", true),
82
+ createElementVNode("div", {
83
+ class: normalizeClass(["yc-choice-cards__grid", `cols-${__props.columns}`]),
84
+ role: __props.multiple ? "group" : "radiogroup"
85
+ }, [
86
+ (openBlock(true), createElementBlock(
87
+ Fragment,
88
+ null,
89
+ renderList(__props.options, (opt) => {
90
+ return openBlock(), createElementBlock("button", {
91
+ key: String(opt.value),
92
+ type: "button",
93
+ class: normalizeClass(["yc-choice-card", { "is-selected": isSelected(opt.value), "is-disabled": __props.disabled || opt.disabled }]),
94
+ role: __props.multiple ? "checkbox" : "radio",
95
+ "aria-checked": isSelected(opt.value),
96
+ disabled: __props.disabled || opt.disabled,
97
+ onClick: ($event) => select(opt)
98
+ }, [
99
+ createElementVNode("div", _hoisted_4, [
100
+ createElementVNode(
101
+ "span",
102
+ _hoisted_5,
103
+ toDisplayString(opt.title),
104
+ 1
105
+ /* TEXT */
106
+ ),
107
+ createElementVNode("div", _hoisted_6, [
108
+ opt.meta ? (openBlock(), createElementBlock(
109
+ "span",
110
+ _hoisted_7,
111
+ toDisplayString(opt.meta),
112
+ 1
113
+ /* TEXT */
114
+ )) : createCommentVNode("v-if", true),
115
+ createElementVNode(
116
+ "span",
117
+ {
118
+ class: normalizeClass(["yc-choice-card__indicator", { "is-checkbox": __props.multiple }])
119
+ },
120
+ [
121
+ isSelected(opt.value) ? (openBlock(), createElementBlock("svg", _hoisted_8, [..._cache[0] || (_cache[0] = [
122
+ createElementVNode(
123
+ "path",
124
+ { d: "M20 6 9 17l-5-5" },
125
+ null,
126
+ -1
127
+ /* CACHED */
128
+ )
129
+ ])])) : createCommentVNode("v-if", true)
130
+ ],
131
+ 2
132
+ /* CLASS */
133
+ )
134
+ ])
135
+ ]),
136
+ opt.description ? (openBlock(), createElementBlock(
137
+ "p",
138
+ _hoisted_9,
139
+ toDisplayString(opt.description),
140
+ 1
141
+ /* TEXT */
142
+ )) : createCommentVNode("v-if", true)
143
+ ], 10, _hoisted_3);
144
+ }),
145
+ 128
146
+ /* KEYED_FRAGMENT */
147
+ ))
148
+ ], 10, _hoisted_2)
149
+ ],
150
+ 2
151
+ /* CLASS */
152
+ );
153
+ };
154
+ }
155
+ });
156
+
157
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './segmented2.vue.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,78 @@
1
+ import { defineComponent, openBlock, createElementBlock, normalizeClass, Fragment, renderList, createElementVNode, toDisplayString, createCommentVNode } from 'vue';
2
+
3
+ const _hoisted_1 = ["aria-selected", "disabled", "onClick"];
4
+ const _hoisted_2 = { class: "yc-segmented__label" };
5
+ const _hoisted_3 = {
6
+ key: 0,
7
+ class: "yc-segmented__count"
8
+ };
9
+ var _sfc_main = /* @__PURE__ */ defineComponent({
10
+ ...{
11
+ name: "YcSegmented"
12
+ },
13
+ __name: "segmented",
14
+ props: {
15
+ modelValue: {},
16
+ options: { default: () => [] },
17
+ size: { default: "default" },
18
+ block: { type: Boolean, default: false },
19
+ disabled: { type: Boolean, default: false }
20
+ },
21
+ emits: ["update:modelValue", "change"],
22
+ setup(__props, { emit: __emit }) {
23
+ const props = __props;
24
+ const emit = __emit;
25
+ const select = (opt) => {
26
+ if (props.disabled || opt.disabled || opt.value === props.modelValue) return;
27
+ emit("update:modelValue", opt.value);
28
+ emit("change", opt.value);
29
+ };
30
+ return (_ctx, _cache) => {
31
+ return openBlock(), createElementBlock(
32
+ "div",
33
+ {
34
+ class: normalizeClass(["yc-segmented", [`is-size-${__props.size}`, { "is-block": __props.block, "is-disabled": __props.disabled }]]),
35
+ role: "tablist"
36
+ },
37
+ [
38
+ (openBlock(true), createElementBlock(
39
+ Fragment,
40
+ null,
41
+ renderList(__props.options, (opt) => {
42
+ return openBlock(), createElementBlock("button", {
43
+ key: String(opt.value),
44
+ type: "button",
45
+ role: "tab",
46
+ class: normalizeClass(["yc-segmented__item", { "is-active": __props.modelValue === opt.value }]),
47
+ "aria-selected": __props.modelValue === opt.value,
48
+ disabled: __props.disabled || opt.disabled,
49
+ onClick: ($event) => select(opt)
50
+ }, [
51
+ createElementVNode(
52
+ "span",
53
+ _hoisted_2,
54
+ toDisplayString(opt.label),
55
+ 1
56
+ /* TEXT */
57
+ ),
58
+ opt.count !== void 0 ? (openBlock(), createElementBlock(
59
+ "span",
60
+ _hoisted_3,
61
+ toDisplayString(opt.count),
62
+ 1
63
+ /* TEXT */
64
+ )) : createCommentVNode("v-if", true)
65
+ ], 10, _hoisted_1);
66
+ }),
67
+ 128
68
+ /* KEYED_FRAGMENT */
69
+ ))
70
+ ],
71
+ 2
72
+ /* CLASS */
73
+ );
74
+ };
75
+ }
76
+ });
77
+
78
+ export { _sfc_main as default };
@@ -0,0 +1,5 @@
1
+ import _sfc_main from './switch-row2.vue.mjs';
2
+
3
+
4
+
5
+ export { _sfc_main as default };
@@ -0,0 +1,95 @@
1
+ import { defineComponent, openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createCommentVNode, withModifiers } from 'vue';
2
+
3
+ const _hoisted_1 = { class: "yc-switch-row__body" };
4
+ const _hoisted_2 = { class: "yc-switch-row__head" };
5
+ const _hoisted_3 = { class: "yc-switch-row__title" };
6
+ const _hoisted_4 = {
7
+ key: 0,
8
+ class: "yc-switch-row__badge"
9
+ };
10
+ const _hoisted_5 = {
11
+ key: 0,
12
+ class: "yc-switch-row__desc"
13
+ };
14
+ const _hoisted_6 = ["aria-checked", "disabled"];
15
+ var _sfc_main = /* @__PURE__ */ defineComponent({
16
+ ...{
17
+ name: "YcSwitchRow"
18
+ },
19
+ __name: "switch-row",
20
+ props: {
21
+ modelValue: { type: Boolean, default: false },
22
+ title: {},
23
+ description: {},
24
+ badge: {},
25
+ disabled: { type: Boolean, default: false },
26
+ bordered: { type: Boolean, default: true }
27
+ },
28
+ emits: ["update:modelValue", "change"],
29
+ setup(__props, { emit: __emit }) {
30
+ const props = __props;
31
+ const emit = __emit;
32
+ const toggle = () => {
33
+ if (props.disabled) return;
34
+ const next = !props.modelValue;
35
+ emit("update:modelValue", next);
36
+ emit("change", next);
37
+ };
38
+ return (_ctx, _cache) => {
39
+ return openBlock(), createElementBlock(
40
+ "div",
41
+ {
42
+ class: normalizeClass(["yc-switch-row", { "is-bordered": __props.bordered, "is-disabled": __props.disabled, "is-checked": !!__props.modelValue }]),
43
+ onClick: toggle
44
+ },
45
+ [
46
+ createElementVNode("div", _hoisted_1, [
47
+ createElementVNode("div", _hoisted_2, [
48
+ createElementVNode(
49
+ "span",
50
+ _hoisted_3,
51
+ toDisplayString(__props.title),
52
+ 1
53
+ /* TEXT */
54
+ ),
55
+ __props.badge ? (openBlock(), createElementBlock(
56
+ "span",
57
+ _hoisted_4,
58
+ toDisplayString(__props.badge),
59
+ 1
60
+ /* TEXT */
61
+ )) : createCommentVNode("v-if", true)
62
+ ]),
63
+ __props.description ? (openBlock(), createElementBlock(
64
+ "p",
65
+ _hoisted_5,
66
+ toDisplayString(__props.description),
67
+ 1
68
+ /* TEXT */
69
+ )) : createCommentVNode("v-if", true)
70
+ ]),
71
+ createElementVNode("button", {
72
+ type: "button",
73
+ role: "switch",
74
+ class: normalizeClass(["yc-switch-track", { "is-checked": !!__props.modelValue }]),
75
+ "aria-checked": !!__props.modelValue,
76
+ disabled: __props.disabled,
77
+ onClick: withModifiers(toggle, ["stop"])
78
+ }, [..._cache[0] || (_cache[0] = [
79
+ createElementVNode(
80
+ "span",
81
+ { class: "yc-switch-thumb" },
82
+ null,
83
+ -1
84
+ /* CACHED */
85
+ )
86
+ ])], 10, _hoisted_6)
87
+ ],
88
+ 2
89
+ /* CLASS */
90
+ );
91
+ };
92
+ }
93
+ });
94
+
95
+ export { _sfc_main as default };
@@ -0,0 +1,109 @@
1
+ import { defineComponent, h } from 'vue';
2
+ import { YcBanner, YcTimeline, YcEmptyState, YcKeyValueList } from './index.mjs';
3
+
4
+ const YcBannerGalleryDemo = defineComponent({
5
+ name: "YcBannerGalleryDemo",
6
+ setup() {
7
+ return () => h("div", { class: "yc-feedback-demo-stack" }, [
8
+ h(YcBanner, {
9
+ tone: "warning",
10
+ title: "\u6708\u672B\u8D22\u52A1\u624E\u8D26\u7A97\u53E3\u5373\u5C06\u5173\u95ED",
11
+ description: "\u4ECA\u65E5 22:00 \u540E\u6536\u94F6\u6D41\u6C34\u5C06\u81EA\u52A8\u8BA1\u5165\u4E0B\u6708\u8D26\u671F",
12
+ actionText: "\u6838\u5BF9\u672A\u9500\u6D41\u6C34"
13
+ }),
14
+ h(YcBanner, {
15
+ tone: "neutral",
16
+ title: "\u4F01\u5FAE\u50AC\u7F34\u56DE\u6267\u5DF2\u540C\u6B65",
17
+ description: "\u672C\u6279\u6B21\u5171\u89E6\u8FBE 142 \u6237\uFF0C\u5DF2\u8BFB 118 \u6237",
18
+ closable: true
19
+ })
20
+ ]);
21
+ }
22
+ });
23
+ const YcTimelineGalleryDemo = defineComponent({
24
+ name: "YcTimelineGalleryDemo",
25
+ setup() {
26
+ return () => h(YcTimeline, {
27
+ items: [
28
+ {
29
+ id: 1,
30
+ title: "\u73B0\u573A\u7EF4\u4FEE\u5B8C\u6BD5\uFF0C\u5F85\u4E1A\u4E3B\u9A8C\u6536\u7B7E\u5B57",
31
+ time: "14:28",
32
+ actor: "\u5DE5\u7A0B\u90E8 \u5468\u5E08\u5085",
33
+ note: "\u5DF2\u66F4\u6362 DN25 \u51CF\u538B\u9600\u5E76\u8BD5\u538B 30 \u5206\u949F",
34
+ state: "current"
35
+ },
36
+ {
37
+ id: 2,
38
+ title: "\u7EF4\u4FEE\u5DE5\u5355\u5DF2\u63A5\u5355\u6D3E\u5DE5",
39
+ time: "11:05",
40
+ actor: "\u5BA2\u670D\u53F0 \u6797\u654F",
41
+ state: "done"
42
+ },
43
+ {
44
+ id: 3,
45
+ title: "\u4E1A\u4E3B\u63D0\u4EA4\u62A5\u4FEE\u7533\u8BF7",
46
+ time: "10:52",
47
+ actor: "3\u680B1\u5355\u5143 802\u5BA4",
48
+ state: "done"
49
+ }
50
+ ]
51
+ });
52
+ }
53
+ });
54
+ const YcEmptyStateGalleryDemo = defineComponent({
55
+ name: "YcEmptyStateGalleryDemo",
56
+ setup() {
57
+ return () => h(YcEmptyState, {
58
+ title: "\u5F53\u524D\u7B5B\u9009\u6761\u4EF6\u4E0B\u6682\u65E0\u6B20\u8D39\u8D26\u5355",
59
+ description: "\u53EF\u5207\u6362\u8D26\u671F\u8303\u56F4\uFF0C\u6216\u624B\u52A8\u5F55\u5165\u4E34\u65F6\u5E94\u6536\u8D39\u7528",
60
+ actionText: "\u65B0\u5EFA\u5E94\u6536\u5355"
61
+ });
62
+ }
63
+ });
64
+ const YcKeyValueListGalleryDemo = defineComponent({
65
+ name: "YcKeyValueListGalleryDemo",
66
+ setup() {
67
+ return () => h(YcKeyValueList, {
68
+ title: "\u6536\u6B3E\u6838\u9500\u51ED\u8BC1",
69
+ subtitle: "\u94F6\u884C\u94F6\u4F01\u76F4\u8FDE\u81EA\u52A8\u5BF9\u8D26",
70
+ items: [
71
+ { label: "\u51ED\u8BC1\u5355\u53F7", value: "RCV-20261125-0084", mono: true, copyable: true },
72
+ { label: "\u5173\u8054\u623F\u53F7", value: "1\u680B2\u5355\u5143 1202\u5BA4" },
73
+ { label: "\u5B9E\u6536\u91D1\u989D", value: "\xA5 1,354.50", mono: true },
74
+ { label: "\u5165\u8D26\u72B6\u6001", value: "\u5DF2\u6838\u9500\u5165\u8D26", tone: "success" }
75
+ ]
76
+ });
77
+ }
78
+ });
79
+ const capability = {
80
+ install: [YcBanner, YcTimeline, YcEmptyState, YcKeyValueList],
81
+ gallery: [
82
+ {
83
+ id: "yc-banner",
84
+ title: "YcBanner \u5355\u636E\u63D0\u793A\u6761",
85
+ categories: ["\u64CD\u4F5C\u4E0E\u53CD\u9988"],
86
+ component: YcBannerGalleryDemo
87
+ },
88
+ {
89
+ id: "yc-timeline",
90
+ title: "YcTimeline \u8282\u70B9\u6D41\u8F6C\u8F74",
91
+ categories: ["\u64CD\u4F5C\u4E0E\u53CD\u9988"],
92
+ component: YcTimelineGalleryDemo
93
+ },
94
+ {
95
+ id: "yc-empty-state",
96
+ title: "YcEmptyState \u7EBF\u6846\u7A7A\u72B6\u6001",
97
+ categories: ["\u64CD\u4F5C\u4E0E\u53CD\u9988"],
98
+ component: YcEmptyStateGalleryDemo
99
+ },
100
+ {
101
+ id: "yc-key-value-list",
102
+ title: "YcKeyValueList \u51ED\u8BC1\u952E\u503C\u5361",
103
+ categories: ["\u5361\u7247\u4E0E\u5C55\u793A"],
104
+ component: YcKeyValueListGalleryDemo
105
+ }
106
+ ]
107
+ };
108
+
109
+ export { capability as default };
@@ -0,0 +1,16 @@
1
+ import { withInstall } from '../../utils/src/component.mjs';
2
+ import _sfc_main from './src/banner2.vue.mjs';
3
+ import _sfc_main$1 from './src/timeline2.vue.mjs';
4
+ import _sfc_main$2 from './src/empty-state2.vue.mjs';
5
+ import _sfc_main$3 from './src/key-value-list2.vue.mjs';
6
+
7
+ const YcBanner = withInstall(_sfc_main);
8
+ const ReBanner = YcBanner;
9
+ const YcTimeline = withInstall(_sfc_main$1);
10
+ const ReTimeline = YcTimeline;
11
+ const YcEmptyState = withInstall(_sfc_main$2);
12
+ const ReEmptyState = YcEmptyState;
13
+ const YcKeyValueList = withInstall(_sfc_main$3);
14
+ const ReKeyValueList = YcKeyValueList;
15
+
16
+ export { ReBanner, ReEmptyState, ReKeyValueList, ReTimeline, YcBanner, YcEmptyState, YcKeyValueList, YcTimeline, YcBanner as default };