hys-ui 0.1.0 → 0.2.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 (247) hide show
  1. package/CHANGELOG.md +137 -1
  2. package/README.md +18 -6
  3. package/dist/components/HysAccordion/HysAccordion.vue.js +1 -1
  4. package/dist/components/HysAccordion/HysAccordion2.vue.js +181 -47
  5. package/dist/components/HysAlert/HysAlert.vue.js +14 -14
  6. package/dist/components/HysAnimatedNumber/HysAnimatedNumber.vue.js +23 -20
  7. package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +7 -0
  8. package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +627 -0
  9. package/dist/components/HysAvatar/HysAvatar.vue.js +5 -35
  10. package/dist/components/HysAvatar/HysAvatar2.vue.js +221 -2
  11. package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +7 -0
  12. package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +252 -0
  13. package/dist/components/HysBadge/HysBadge.vue.js +2 -2
  14. package/dist/components/HysBadge/HysBadge2.vue.js +154 -26
  15. package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +5 -38
  16. package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +74 -2
  17. package/dist/components/HysButton/HysButton.vue.js +2 -2
  18. package/dist/components/HysButton/HysButton2.vue.js +29 -28
  19. package/dist/components/HysCalendar/HysCalendar.vue.js +5 -84
  20. package/dist/components/HysCalendar/HysCalendar2.vue.js +803 -2
  21. package/dist/components/HysCard/HysCard.vue.js +1 -1
  22. package/dist/components/HysCard/HysCard2.vue.js +177 -44
  23. package/dist/components/HysCascader/HysCascader.vue.js +5 -182
  24. package/dist/components/HysCascader/HysCascader2.vue.js +760 -2
  25. package/dist/components/HysCascader/HysCascaderColumn.vue.js +7 -0
  26. package/dist/components/HysCascader/HysCascaderColumn2.vue.js +232 -0
  27. package/dist/components/HysCheckbox/HysCheckbox.vue.js +5 -39
  28. package/dist/components/HysCheckbox/HysCheckbox2.vue.js +200 -2
  29. package/dist/components/HysCheckboxGroup/HysCheckboxGroup.vue.js +7 -0
  30. package/dist/components/HysCheckboxGroup/HysCheckboxGroup2.vue.js +237 -0
  31. package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
  32. package/dist/components/HysColorPicker/HysColorPicker2.vue.js +107 -106
  33. package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +52 -51
  34. package/dist/components/HysCommentEditor/HysCommentEditor.vue.js +17 -17
  35. package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
  36. package/dist/components/HysDataGrid/HysDataGrid2.vue.js +397 -390
  37. package/dist/components/HysDatePicker/HysDatePicker.vue.js +268 -139
  38. package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +7 -0
  39. package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +807 -0
  40. package/dist/components/HysDatePicker/HysDatePickerPanel.vue.js +7 -0
  41. package/dist/components/HysDatePicker/HysDatePickerPanel2.vue.js +357 -0
  42. package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +268 -158
  43. package/dist/components/HysDivider/HysDivider.vue.js +2 -2
  44. package/dist/components/HysDivider/HysDivider2.vue.js +33 -13
  45. package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
  46. package/dist/components/HysDrawer/HysDrawer2.vue.js +55 -54
  47. package/dist/components/HysFileManager/HysFileManager.vue.js +5 -63
  48. package/dist/components/HysFileManager/HysFileManager2.vue.js +86 -2
  49. package/dist/components/HysForm/HysForm.vue.js +3 -3
  50. package/dist/components/HysForm/HysForm2.vue.js +580 -92
  51. package/dist/components/HysFormItem/HysFormItem.vue.js +5 -69
  52. package/dist/components/HysFormItem/HysFormItem2.vue.js +521 -2
  53. package/dist/components/HysGantt/HysGantt.vue.js +5 -264
  54. package/dist/components/HysGantt/HysGantt2.vue.js +1399 -2
  55. package/dist/components/HysInput/HysInput.vue.js +2 -2
  56. package/dist/components/HysInput/HysInput2.vue.js +468 -120
  57. package/dist/components/HysMention/HysMention.vue.js +2 -2
  58. package/dist/components/HysMention/HysMention2.vue.js +89 -88
  59. package/dist/components/HysModal/HysModal.vue.js +2 -2
  60. package/dist/components/HysModal/HysModal2.vue.js +35 -35
  61. package/dist/components/HysNotificationCenter/HysNotificationCenter.vue.js +37 -36
  62. package/dist/components/HysNumberInput/HysNumberInput.vue.js +2 -2
  63. package/dist/components/HysNumberInput/HysNumberInput2.vue.js +561 -70
  64. package/dist/components/HysOrgTree/HysOrgTree.vue.js +41 -36
  65. package/dist/components/HysPagination/HysPagination.vue.js +2 -2
  66. package/dist/components/HysPagination/HysPagination2.vue.js +93 -91
  67. package/dist/components/HysPermissionMatrix/HysPermissionMatrix.vue.js +5 -41
  68. package/dist/components/HysPermissionMatrix/HysPermissionMatrix2.vue.js +101 -2
  69. package/dist/components/HysRadio/HysRadio.vue.js +7 -0
  70. package/dist/components/HysRadio/HysRadio2.vue.js +180 -0
  71. package/dist/components/HysRadioGroup/HysRadioGroup.vue.js +5 -40
  72. package/dist/components/HysRadioGroup/HysRadioGroup2.vue.js +205 -2
  73. package/dist/components/HysRating/HysRating.vue.js +1 -1
  74. package/dist/components/HysRating/HysRating2.vue.js +288 -68
  75. package/dist/components/HysResizablePanel/HysResizablePanel.vue.js +46 -28
  76. package/dist/components/HysRichTextEditor/HysRichTextEditor.vue.js +2 -2
  77. package/dist/components/HysRichTextEditor/HysRichTextEditor2.vue.js +87 -67
  78. package/dist/components/HysSearch/HysSearch.vue.js +50 -38
  79. package/dist/components/HysSegmented/HysSegmented.vue.js +5 -58
  80. package/dist/components/HysSegmented/HysSegmented2.vue.js +273 -2
  81. package/dist/components/HysSelect/HysSelect.vue.js +3 -2
  82. package/dist/components/HysSelect/HysSelect2.vue.js +859 -164
  83. package/dist/components/HysSkeleton/HysSkeleton.vue.js +2 -2
  84. package/dist/components/HysSkeleton/HysSkeleton2.vue.js +126 -29
  85. package/dist/components/HysSlider/HysSlider.vue.js +2 -2
  86. package/dist/components/HysSlider/HysSlider2.vue.js +532 -59
  87. package/dist/components/HysSlider/SliderTooltip.vue.js +7 -0
  88. package/dist/components/HysSlider/SliderTooltip2.vue.js +156 -0
  89. package/dist/components/HysSplitPane/HysSplitPane.vue.js +48 -42
  90. package/dist/components/HysSteps/HysSteps.vue.js +2 -2
  91. package/dist/components/HysSteps/HysSteps2.vue.js +111 -36
  92. package/dist/components/HysSwitch/HysSwitch.vue.js +2 -2
  93. package/dist/components/HysSwitch/HysSwitch2.vue.js +235 -42
  94. package/dist/components/HysTable/HysTable.vue.js +1 -1
  95. package/dist/components/HysTable/HysTable2.vue.js +1471 -82
  96. package/dist/components/HysTable/HysTableFilterOptions.vue.js +7 -0
  97. package/dist/components/HysTable/HysTableFilterOptions2.vue.js +133 -0
  98. package/dist/components/HysTabs/HysTabs.vue.js +2 -2
  99. package/dist/components/HysTabs/HysTabs2.vue.js +262 -66
  100. package/dist/components/HysTagInput/HysTagInput.vue.js +43 -42
  101. package/dist/components/HysTextarea/HysTextarea.vue.js +137 -66
  102. package/dist/components/HysToast/HysToast.vue.js +2 -2
  103. package/dist/components/HysToast/HysToast2.vue.js +121 -38
  104. package/dist/components/HysTour/HysTour.vue.js +47 -42
  105. package/dist/components/HysTransfer/HysTransfer.vue.js +5 -207
  106. package/dist/components/HysTransfer/HysTransfer2.vue.js +416 -2
  107. package/dist/components/HysTransfer/HysTransferPanel.vue.js +7 -0
  108. package/dist/components/HysTransfer/HysTransferPanel2.vue.js +454 -0
  109. package/dist/components/HysTree/HysTree.vue.js +2 -3
  110. package/dist/components/HysTree/HysTree2.vue.js +641 -301
  111. package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +5 -129
  112. package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +558 -2
  113. package/dist/components/HysTreeSelect/HysTreeSelectPanel.vue.js +7 -0
  114. package/dist/components/HysTreeSelect/HysTreeSelectPanel2.vue.js +323 -0
  115. package/dist/components/HysUpload/HysUpload.vue.js +2 -2
  116. package/dist/components/HysUpload/HysUpload2.vue.js +97 -78
  117. package/dist/composables/autocomplete.js +50 -0
  118. package/dist/composables/avatar.js +57 -0
  119. package/dist/composables/calendar.js +96 -0
  120. package/dist/composables/cascader.js +79 -0
  121. package/dist/composables/choice.js +38 -0
  122. package/dist/composables/choiceModel.js +67 -0
  123. package/dist/composables/datePicker.js +227 -0
  124. package/dist/composables/formContext.js +94 -3
  125. package/dist/composables/formLayout.js +57 -0
  126. package/dist/composables/formValidation.js +240 -0
  127. package/dist/composables/ganttConflicts.js +143 -0
  128. package/dist/composables/numberInput.js +91 -0
  129. package/dist/composables/rating.js +16 -0
  130. package/dist/composables/selectOptions.js +54 -0
  131. package/dist/composables/table.js +150 -0
  132. package/dist/composables/textInput.js +34 -0
  133. package/dist/composables/toastEscape.js +16 -0
  134. package/dist/composables/transfer.js +63 -0
  135. package/dist/composables/tree.js +118 -0
  136. package/dist/composables/treeSelect.js +71 -0
  137. package/dist/composables/useCascader.js +438 -0
  138. package/dist/composables/useDatePicker.js +425 -0
  139. package/dist/composables/useDialog.js +16 -16
  140. package/dist/composables/useFloating.js +98 -52
  141. package/dist/composables/useGanttDependencies.js +306 -0
  142. package/dist/composables/useGanttHistory.js +157 -0
  143. package/dist/composables/useGanttLabelResize.js +100 -0
  144. package/dist/composables/useHysToast.js +148 -0
  145. package/dist/composables/useTable.js +474 -0
  146. package/dist/composables/useTextareaSize.js +72 -0
  147. package/dist/composables/useTransfer.js +257 -0
  148. package/dist/composables/useTree.js +439 -0
  149. package/dist/composables/useTreeSelect.js +361 -0
  150. package/dist/config.js +18 -15
  151. package/dist/index.js +149 -136
  152. package/dist/style.css +1 -1
  153. package/dist/types/components/HysAccordion/HysAccordion.vue.d.ts +61 -22
  154. package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +201 -0
  155. package/dist/types/components/HysAvatar/HysAvatar.vue.d.ts +28 -15
  156. package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +99 -0
  157. package/dist/types/components/HysBadge/HysBadge.vue.d.ts +41 -4
  158. package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +38 -10
  159. package/dist/types/components/HysButton/HysButton.vue.d.ts +0 -1
  160. package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +119 -29
  161. package/dist/types/components/HysCard/HysCard.vue.d.ts +57 -5
  162. package/dist/types/components/HysCascader/HysCascader.vue.d.ts +129 -41
  163. package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +55 -0
  164. package/dist/types/components/HysCheckbox/HysCheckbox.vue.d.ts +55 -27
  165. package/dist/types/components/HysCheckboxGroup/HysCheckboxGroup.vue.d.ts +73 -0
  166. package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +1 -1
  167. package/dist/types/components/HysDatePicker/HysDatePicker.vue.d.ts +66 -14
  168. package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +90 -0
  169. package/dist/types/components/HysDatePicker/HysDatePickerPanel.vue.d.ts +93 -0
  170. package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +66 -14
  171. package/dist/types/components/HysDivider/HysDivider.vue.d.ts +8 -3
  172. package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +1 -0
  173. package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +8 -4
  174. package/dist/types/components/HysForm/HysForm.vue.d.ts +110 -18
  175. package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +108 -2
  176. package/dist/types/components/HysGantt/HysGantt.vue.d.ts +88 -4
  177. package/dist/types/components/HysInput/HysInput.vue.d.ts +52 -29
  178. package/dist/types/components/HysMention/HysMention.vue.d.ts +2 -2
  179. package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +93 -33
  180. package/dist/types/components/HysOrgTree/HysOrgTree.vue.d.ts +4 -1
  181. package/dist/types/components/HysPagination/HysPagination.vue.d.ts +1 -1
  182. package/dist/types/components/HysPermissionMatrix/HysPermissionMatrix.vue.d.ts +8 -1
  183. package/dist/types/components/HysPopover/HysPopover.vue.d.ts +3 -3
  184. package/dist/types/components/HysProgress/HysProgress.vue.d.ts +1 -1
  185. package/dist/types/components/HysRadio/HysRadio.vue.d.ts +56 -0
  186. package/dist/types/components/HysRadioGroup/HysRadioGroup.vue.d.ts +62 -17
  187. package/dist/types/components/HysRating/HysRating.vue.d.ts +85 -5
  188. package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +6 -0
  189. package/dist/types/components/HysRichTextEditor/HysRichTextEditor.vue.d.ts +4 -4
  190. package/dist/types/components/HysSearch/HysSearch.vue.d.ts +2 -2
  191. package/dist/types/components/HysSegmented/HysSegmented.vue.d.ts +64 -32
  192. package/dist/types/components/HysSelect/HysSelect.vue.d.ts +120 -14
  193. package/dist/types/components/HysSkeleton/HysSkeleton.vue.d.ts +30 -2
  194. package/dist/types/components/HysSlider/HysSlider.vue.d.ts +66 -9
  195. package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +22 -0
  196. package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +6 -0
  197. package/dist/types/components/HysSteps/HysSteps.vue.d.ts +65 -9
  198. package/dist/types/components/HysSwitch/HysSwitch.vue.d.ts +76 -17
  199. package/dist/types/components/HysTable/HysTable.vue.d.ts +206 -32
  200. package/dist/types/components/HysTable/HysTableFilterOptions.vue.d.ts +18 -0
  201. package/dist/types/components/HysTabs/HysTabs.vue.d.ts +76 -23
  202. package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +5 -5
  203. package/dist/types/components/HysTextarea/HysTextarea.vue.d.ts +44 -27
  204. package/dist/types/components/HysToast/HysToast.vue.d.ts +55 -7
  205. package/dist/types/components/HysTour/HysTour.vue.d.ts +5 -3
  206. package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +55 -30
  207. package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +105 -0
  208. package/dist/types/components/HysTree/HysTree.vue.d.ts +140 -73
  209. package/dist/types/components/HysTreeSelect/HysTreeSelect.vue.d.ts +102 -23
  210. package/dist/types/components/HysTreeSelect/HysTreeSelectPanel.vue.d.ts +56 -0
  211. package/dist/types/composables/autocomplete.d.ts +106 -0
  212. package/dist/types/composables/avatar.d.ts +70 -0
  213. package/dist/types/composables/calendar.d.ts +66 -0
  214. package/dist/types/composables/cascader.d.ts +192 -0
  215. package/dist/types/composables/choice.d.ts +110 -0
  216. package/dist/types/composables/choiceModel.d.ts +11 -0
  217. package/dist/types/composables/datePicker.d.ts +247 -0
  218. package/dist/types/composables/formContext.d.ts +138 -8
  219. package/dist/types/composables/formLayout.d.ts +11 -0
  220. package/dist/types/composables/formValidation.d.ts +13 -0
  221. package/dist/types/composables/gantt.d.ts +68 -0
  222. package/dist/types/composables/ganttConflicts.d.ts +30 -0
  223. package/dist/types/composables/numberInput.d.ts +45 -0
  224. package/dist/types/composables/rating.d.ts +18 -0
  225. package/dist/types/composables/segmented.d.ts +15 -0
  226. package/dist/types/composables/selectOptions.d.ts +44 -0
  227. package/dist/types/composables/slider.d.ts +21 -0
  228. package/dist/types/composables/table.d.ts +309 -0
  229. package/dist/types/composables/textInput.d.ts +76 -0
  230. package/dist/types/composables/toastEscape.d.ts +1 -0
  231. package/dist/types/composables/transfer.d.ts +180 -0
  232. package/dist/types/composables/tree.d.ts +237 -0
  233. package/dist/types/composables/treeSelect.d.ts +167 -0
  234. package/dist/types/composables/useCascader.d.ts +162 -0
  235. package/dist/types/composables/useDatePicker.d.ts +79 -0
  236. package/dist/types/composables/useFloating.d.ts +8 -5
  237. package/dist/types/composables/useGanttDependencies.d.ts +83 -0
  238. package/dist/types/composables/useGanttHistory.d.ts +42 -0
  239. package/dist/types/composables/useGanttLabelResize.d.ts +23 -0
  240. package/dist/types/composables/useHysToast.d.ts +50 -0
  241. package/dist/types/composables/useTable.d.ts +60 -0
  242. package/dist/types/composables/useTextareaSize.d.ts +3 -0
  243. package/dist/types/composables/useTransfer.d.ts +58 -0
  244. package/dist/types/composables/useTree.d.ts +77 -0
  245. package/dist/types/composables/useTreeSelect.d.ts +117 -0
  246. package/dist/types/index.d.ts +38 -7
  247. package/package.json +47 -11
@@ -1,43 +1,171 @@
1
- import { defineComponent as y, openBlock as t, createElementBlock as o, mergeProps as c, unref as l, createElementVNode as f, normalizeStyle as b, normalizeClass as n, renderSlot as v, withModifiers as g, createVNode as h, createCommentVNode as s, toDisplayString as B } from "vue";
2
- import { useHysRootAttrs as x } from "../../config.js";
3
- import { X as z } from "lucide-vue-next";
4
- const S = /* @__PURE__ */ y({
1
+ import { defineComponent as E, ref as H, computed as d, onDeactivated as L, onBeforeUnmount as R, onActivated as Z, openBlock as l, createElementBlock as o, mergeProps as q, unref as h, Fragment as x, createElementVNode as M, normalizeStyle as y, normalizeClass as g, renderSlot as i, createTextVNode as S, toDisplayString as v, createCommentVNode as b, withModifiers as w, createBlock as P, nextTick as U } from "vue";
2
+ import { X } from "lucide-vue-next";
3
+ import { useHysRootAttrs as j } from "../../config.js";
4
+ const G = {
5
+ key: 0,
6
+ class: "hys-ui-badge-status-text"
7
+ }, I = ["aria-pressed", "disabled"], J = ["disabled", "aria-label"], K = { key: 0 }, O = ["title"], p = /* @__PURE__ */ E({
5
8
  __name: "HysBadge",
6
9
  props: {
7
10
  tone: { default: "blue" },
8
11
  size: { default: "md" },
9
12
  round: { type: Boolean },
10
13
  closable: { type: Boolean },
14
+ closeText: {},
15
+ closeLabel: { default: "关闭标签" },
11
16
  dot: { type: Boolean },
12
17
  value: {},
13
18
  max: { default: 99 },
14
- showZero: { type: Boolean }
19
+ showZero: { type: Boolean },
20
+ hidden: { type: Boolean },
21
+ color: {},
22
+ offset: {},
23
+ placement: { default: "top-right" },
24
+ badgeStyle: {},
25
+ badgeClass: {},
26
+ status: {},
27
+ text: {},
28
+ title: {},
29
+ effect: { default: "light" },
30
+ checkable: { type: Boolean },
31
+ checked: { type: Boolean, default: void 0 },
32
+ defaultChecked: { type: Boolean, default: !1 },
33
+ disabled: { type: Boolean }
15
34
  },
16
- emits: ["close"],
17
- setup(e, { emit: u }) {
18
- const d = x(), i = u;
19
- return (r, a) => (t(), o("span", c(l(d), { class: "hys-ui-badge-wrap" }), [
20
- f("span", {
21
- class: n(["hys-ui-badge", "hys-ui-badge-" + e.tone]),
22
- style: b({ borderRadius: e.round ? "99px" : void 0, fontSize: e.size === "sm" ? "10px" : void 0 })
23
- }, [
24
- v(r.$slots, "default", {}, void 0, !0),
25
- e.closable ? (t(), o("button", {
35
+ emits: ["close", "update:checked", "change"],
36
+ setup(t, { emit: z }) {
37
+ const e = t, f = z, m = j(), k = H(e.defaultChecked), u = d(() => e.checked ?? k.value), B = d(
38
+ () => typeof e.value == "number" && Number.isFinite(e.value) && e.value > e.max ? e.max + "+" : e.value
39
+ ), N = d(
40
+ () => !e.hidden && (e.dot || e.value !== void 0 && e.value !== "" && (typeof e.value != "number" || Number.isFinite(e.value)) && (e.value !== 0 || e.showZero))
41
+ ), T = d(
42
+ () => e.color ?? {
43
+ blue: "#2563eb",
44
+ green: "#06966c",
45
+ orange: "#b85f06",
46
+ red: "#d92d44",
47
+ purple: "#7945d5",
48
+ gray: "#68778e"
49
+ }[e.tone]
50
+ ), V = d(() => ({
51
+ "--hys-ui-badge-tag-color": T.value,
52
+ borderRadius: e.round ? "99px" : void 0,
53
+ background: e.color && e.effect === "light" && (!e.checkable || u.value) ? `color-mix(in srgb, ${e.color} 12%, transparent)` : void 0,
54
+ color: e.color && e.effect === "light" && (!e.checkable || u.value) ? e.color : void 0
55
+ })), F = d(() => {
56
+ var a, s, r, $;
57
+ return {
58
+ background: e.color,
59
+ "--hys-ui-badge-offset-x": typeof ((a = e.offset) == null ? void 0 : a[0]) == "number" ? e.offset[0] + "px" : (s = e.offset) == null ? void 0 : s[0],
60
+ "--hys-ui-badge-offset-y": typeof ((r = e.offset) == null ? void 0 : r[1]) == "number" ? e.offset[1] + "px" : ($ = e.offset) == null ? void 0 : $[1],
61
+ ...e.badgeStyle
62
+ };
63
+ }), C = d(
64
+ () => e.color ?? {
65
+ success: "#06966c",
66
+ processing: "var(--hys-ui-primary,var(--hys-ui-theme-primary,#2563eb))",
67
+ default: "#8794a8",
68
+ error: "#d92d44",
69
+ warning: "#d9860c"
70
+ }[e.status ?? "default"]
71
+ );
72
+ let c = !0, n = 0;
73
+ async function A(a) {
74
+ if (!c || e.disabled || !e.checkable) return;
75
+ const s = !u.value, r = ++n;
76
+ k.value = s, f("update:checked", s), await U(), c && r === n && u.value === s && f("change", s, a);
77
+ }
78
+ function D(a) {
79
+ e.disabled || f("close", a);
80
+ }
81
+ return L(() => {
82
+ c = !1, n++;
83
+ }), R(() => {
84
+ c = !1, n++;
85
+ }), Z(() => c = !0), (a, s) => (l(), o("span", q(h(m), {
86
+ class: ["hys-ui-badge-wrap", [
87
+ "hys-ui-badge-size-" + t.size,
88
+ { "hys-ui-badge-disabled": t.disabled }
89
+ ]]
90
+ }), [
91
+ t.status ? (l(), o(x, { key: 0 }, [
92
+ M("span", {
93
+ class: g(["hys-ui-badge-status-dot", {
94
+ "hys-ui-badge-processing": t.status === "processing" && h(m)["data-hys-motion"] !== "off"
95
+ }]),
96
+ style: y({ background: C.value, color: C.value }),
97
+ "aria-hidden": "true"
98
+ }, null, 6),
99
+ t.text || a.$slots.default ? (l(), o("span", G, [
100
+ i(a.$slots, "default", {}, () => [
101
+ S(v(t.text), 1)
102
+ ], !0)
103
+ ])) : b("", !0)
104
+ ], 64)) : (l(), o(x, { key: 1 }, [
105
+ a.$slots.default || t.closable || t.checkable ? (l(), o("span", {
26
106
  key: 0,
27
- type: "button",
28
- "aria-label": "关闭标签",
29
- onClick: a[0] || (a[0] = g((m) => i("close", m), ["stop"]))
107
+ class: g(["hys-ui-badge", [
108
+ "hys-ui-badge-" + t.tone,
109
+ "hys-ui-badge-" + t.effect,
110
+ {
111
+ "hys-ui-badge-content": t.dot || t.value !== void 0 || !!a.$slots.content,
112
+ "hys-ui-badge-checkable": t.checkable,
113
+ "hys-ui-badge-checked": t.checkable && u.value
114
+ }
115
+ ]]),
116
+ style: y(V.value)
30
117
  }, [
31
- h(l(z), { size: 12 })
32
- ])) : s("", !0)
33
- ], 6),
34
- e.dot || e.value !== void 0 && (e.value !== 0 || e.showZero) ? (t(), o("sup", {
35
- key: 0,
36
- class: n(["hys-ui-badge-counter", { "hys-ui-badge-dot": e.dot }])
37
- }, B(e.dot ? "" : typeof e.value == "number" && e.value > e.max ? e.max + "+" : e.value), 3)) : s("", !0)
118
+ t.checkable ? (l(), o("button", {
119
+ key: 0,
120
+ type: "button",
121
+ class: "hys-ui-badge-check",
122
+ "aria-pressed": u.value,
123
+ disabled: t.disabled,
124
+ onClick: w(A, ["stop"])
125
+ }, [
126
+ i(a.$slots, "default", {}, void 0, !0)
127
+ ], 8, I)) : i(a.$slots, "default", {}, void 0, !0, 1),
128
+ t.closable ? (l(), o("button", {
129
+ key: 2,
130
+ type: "button",
131
+ class: "hys-ui-badge-close",
132
+ disabled: t.disabled,
133
+ "aria-label": t.closeLabel,
134
+ onClick: w(D, ["stop"])
135
+ }, [
136
+ i(a.$slots, "close-icon", {}, () => [
137
+ t.closeText ? (l(), o("span", K, v(t.closeText), 1)) : (l(), P(h(X), {
138
+ key: 1,
139
+ size: 12,
140
+ "aria-hidden": "true"
141
+ }))
142
+ ], !0)
143
+ ], 8, J)) : b("", !0)
144
+ ], 6)) : b("", !0),
145
+ !t.hidden && (N.value || a.$slots.content) ? (l(), o("sup", {
146
+ key: 1,
147
+ class: g(["hys-ui-badge-counter", [
148
+ t.badgeClass,
149
+ "hys-ui-badge-" + t.placement,
150
+ {
151
+ "hys-ui-badge-dot": t.dot,
152
+ "hys-ui-badge-standalone": !a.$slots.default && !t.closable && !t.checkable
153
+ }
154
+ ]]),
155
+ style: y(F.value),
156
+ title: t.title ?? (t.value === void 0 ? void 0 : String(t.value))
157
+ }, [
158
+ i(a.$slots, "content", {
159
+ value: t.value,
160
+ displayValue: B.value
161
+ }, () => [
162
+ S(v(t.dot ? "" : B.value), 1)
163
+ ], !0)
164
+ ], 14, O)) : b("", !0)
165
+ ], 64))
38
166
  ], 16));
39
167
  }
40
168
  });
41
169
  export {
42
- S as default
170
+ p as default
43
171
  };
@@ -1,40 +1,7 @@
1
- import { defineComponent as u, openBlock as t, createElementBlock as o, mergeProps as m, unref as h, createElementVNode as l, Fragment as d, renderList as f, renderSlot as c, createTextVNode as p, toDisplayString as s, createCommentVNode as y } from "vue";
2
- import { useHysRootAttrs as b } from "../../config.js";
3
- const g = { class: "hys-ui-ex-breadcrumb" }, k = {
4
- key: 0,
5
- "aria-hidden": "true"
6
- }, _ = ["href"], v = ["aria-current"], A = /* @__PURE__ */ u({
7
- __name: "HysBreadcrumb",
8
- props: {
9
- separator: {},
10
- items: {}
11
- },
12
- setup(a) {
13
- const i = b();
14
- return (n, B) => (t(), o("nav", m(h(i), { "aria-label": "面包屑" }), [
15
- l("ol", g, [
16
- (t(!0), o(d, null, f(a.items, (e, r) => (t(), o("li", { key: r }, [
17
- r ? (t(), o("span", k, [
18
- c(n.$slots, "separator", {}, () => [
19
- p(s(a.separator || "/"), 1)
20
- ])
21
- ])) : y("", !0),
22
- e.href && r !== a.items.length - 1 ? c(n.$slots, "link", {
23
- item: e,
24
- index: r
25
- }, () => [
26
- l("a", {
27
- href: e.href
28
- }, s(e.label), 9, _)
29
- ], void 0, 1) : (t(), o("span", {
30
- key: 2,
31
- "aria-current": r === a.items.length - 1 ? "page" : void 0
32
- }, s(e.label), 9, v))
33
- ]))), 128))
34
- ])
35
- ], 16));
36
- }
37
- });
1
+ import o from "./HysBreadcrumb2.vue.js";
2
+ /* empty css */
3
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const c = /* @__PURE__ */ r(o, [["__scopeId", "data-v-fb612ec6"]]);
38
5
  export {
39
- A as default
6
+ c as default
40
7
  };
@@ -1,4 +1,76 @@
1
- import f from "./HysBreadcrumb.vue.js";
1
+ import { defineComponent as y, openBlock as s, createElementBlock as o, mergeProps as k, unref as g, createElementVNode as u, Fragment as i, renderList as p, renderSlot as l, createBlock as B, resolveDynamicComponent as C, createTextVNode as n, toDisplayString as c, createCommentVNode as v } from "vue";
2
+ import { useHysRootAttrs as S } from "../../config.js";
3
+ const $ = ["aria-label"], I = { class: "hys-ui-ex-breadcrumb" }, L = {
4
+ key: 0,
5
+ class: "hys-ui-breadcrumb-separator",
6
+ "aria-hidden": "true"
7
+ }, N = ["href", "target", "rel", "onClick"], R = ["aria-disabled", "aria-current"], D = /* @__PURE__ */ y({
8
+ __name: "HysBreadcrumb",
9
+ props: {
10
+ separator: { default: "/" },
11
+ separatorIcon: {},
12
+ items: {},
13
+ ariaLabel: { default: "面包屑" }
14
+ },
15
+ emits: ["select"],
16
+ setup(a, { emit: d }) {
17
+ const h = d, b = S();
18
+ function f(t) {
19
+ return t.target === "_blank" ? [...new Set((t.rel || "").split(/\s+/).filter(Boolean).concat("noopener", "noreferrer"))].join(" ") : t.rel;
20
+ }
21
+ return (t, V) => (s(), o("nav", k(g(b), { "aria-label": a.ariaLabel }), [
22
+ u("ol", I, [
23
+ (s(!0), o(i, null, p(a.items, (e, r) => (s(), o("li", { key: r }, [
24
+ r && e.showSeparator !== !1 ? (s(), o("span", L, [
25
+ l(t.$slots, "separator", {
26
+ item: e,
27
+ index: r
28
+ }, () => [
29
+ a.separatorIcon ? (s(), B(C(a.separatorIcon), {
30
+ key: 0,
31
+ size: 14
32
+ })) : (s(), o(i, { key: 1 }, [
33
+ n(c(e.separator ?? a.separator), 1)
34
+ ], 64))
35
+ ], !0)
36
+ ])) : v("", !0),
37
+ e.href && !e.disabled && r !== a.items.length - 1 ? l(t.$slots, "link", {
38
+ item: e,
39
+ index: r
40
+ }, () => [
41
+ u("a", {
42
+ href: e.href,
43
+ target: e.target,
44
+ rel: f(e),
45
+ onClick: (m) => h("select", e, r, m)
46
+ }, [
47
+ l(t.$slots, "item", {
48
+ item: e,
49
+ index: r,
50
+ current: !1
51
+ }, () => [
52
+ n(c(e.label), 1)
53
+ ], !0)
54
+ ], 8, N)
55
+ ], !0, 1) : (s(), o("span", {
56
+ key: 2,
57
+ class: "hys-ui-breadcrumb-item",
58
+ "aria-disabled": e.disabled || void 0,
59
+ "aria-current": r === a.items.length - 1 ? "page" : void 0
60
+ }, [
61
+ l(t.$slots, "item", {
62
+ item: e,
63
+ index: r,
64
+ current: r === a.items.length - 1
65
+ }, () => [
66
+ n(c(e.label), 1)
67
+ ], !0)
68
+ ], 8, R))
69
+ ]))), 128))
70
+ ])
71
+ ], 16, $));
72
+ }
73
+ });
2
74
  export {
3
- f as default
75
+ D as default
4
76
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./HysButton2.vue.js";
2
2
  /* empty css */
3
3
  import t from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-b6f996fc"]]);
4
+ const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-646a4efb"]]);
5
5
  export {
6
- p as default
6
+ m as default
7
7
  };
@@ -1,20 +1,21 @@
1
- import { defineComponent as B, ref as $, computed as c, openBlock as a, createBlock as u, resolveDynamicComponent as r, mergeProps as C, unref as d, withCtx as z, createElementBlock as s, renderSlot as i, createVNode as P, createCommentVNode as y } from "vue";
2
- import { LoaderCircle as L } from "lucide-vue-next";
1
+ import { defineComponent as $, ref as z, computed as d, openBlock as i, createBlock as u, resolveDynamicComponent as r, mergeProps as P, unref as s, withCtx as D, createElementBlock as c, renderSlot as a, createVNode as H, createCommentVNode as y } from "vue";
2
+ import { useHysControlState as L } from "../../composables/formContext.js";
3
+ import { LoaderCircle as S } from "lucide-vue-next";
3
4
  import { useHysRootAttrs as w } from "../../config.js";
4
5
  const A = {
5
6
  key: 0,
6
7
  class: "hys-ui-button-icon"
7
- }, D = {
8
+ }, N = {
8
9
  key: 1,
9
10
  class: "hys-ui-button-icon"
10
- }, H = {
11
+ }, R = {
11
12
  key: 2,
12
13
  class: "hys-ui-button-icon"
13
- }, E = /* @__PURE__ */ B({
14
+ }, q = /* @__PURE__ */ $({
14
15
  __name: "HysButton",
15
16
  props: {
16
17
  variant: { default: "primary" },
17
- size: { default: "md" },
18
+ size: {},
18
19
  disabled: { type: Boolean },
19
20
  loading: { type: Boolean },
20
21
  plain: { type: Boolean },
@@ -35,14 +36,14 @@ const A = {
35
36
  ariaLabel: {}
36
37
  },
37
38
  emits: ["click"],
38
- setup(e, { expose: f, emit: h }) {
39
- const n = e, b = h, m = w(), l = $(), o = c(() => n.disabled || n.loading), v = { danger: "#ed4556", success: "#16a46e", warning: "#d9860c", info: "#697b97" }, k = c(() => n.color || v[n.variant] || "var(--hys-ui-primary,var(--hys-ui-theme-primary))");
40
- function g(t) {
39
+ setup(e, { expose: f, emit: b }) {
40
+ const n = e, { disabled: h, size: m } = L(n), v = b, k = w(), l = z(), o = d(() => h.value || n.loading), g = { danger: "#ed4556", success: "#16a46e", warning: "#d9860c", info: "#697b97" }, B = d(() => n.color || g[n.variant] || "var(--hys-ui-primary,var(--hys-ui-theme-primary))");
41
+ function C(t) {
41
42
  if (o.value) {
42
43
  t.preventDefault(), t.stopImmediatePropagation();
43
44
  return;
44
45
  }
45
- b("click", t);
46
+ v("click", t);
46
47
  }
47
48
  return f({ element: l, focus: () => {
48
49
  var t;
@@ -50,12 +51,12 @@ const A = {
50
51
  }, blur: () => {
51
52
  var t;
52
53
  return (t = l.value) == null ? void 0 : t.blur();
53
- } }), (t, N) => (a(), u(r(e.href ? "a" : "button"), C({
54
+ } }), (t, T) => (i(), u(r(e.href ? "a" : "button"), P({
54
55
  ref_key: "element",
55
56
  ref: l
56
- }, d(m), {
57
- class: ["hys-ui-btn", ["hys-ui-btn-" + e.size, "hys-ui-button-" + e.variant, { "hys-ui-button-plain": e.plain, "hys-ui-button-round": e.round, "hys-ui-button-circle": e.circle, "hys-ui-button-block": e.block, "hys-ui-button-dashed": e.dashed, "hys-ui-button-locked": o.value }]],
58
- style: { "--hys-ui-button-color": k.value },
57
+ }, s(k), {
58
+ class: ["hys-ui-btn", ["hys-ui-btn-" + s(m), "hys-ui-button-" + e.variant, { "hys-ui-button-plain": e.plain, "hys-ui-button-round": e.round, "hys-ui-button-circle": e.circle, "hys-ui-button-block": e.block, "hys-ui-button-dashed": e.dashed, "hys-ui-button-locked": o.value }]],
59
+ style: { "--hys-ui-button-color": B.value },
59
60
  type: e.href ? void 0 : e.nativeType || e.type,
60
61
  href: o.value ? void 0 : e.href,
61
62
  role: e.href ? "link" : void 0,
@@ -67,40 +68,40 @@ const A = {
67
68
  "aria-label": e.ariaLabel,
68
69
  tabindex: o.value || !e.focusable ? -1 : void 0,
69
70
  autofocus: e.autofocus,
70
- onClick: g
71
+ onClick: C
71
72
  }), {
72
- default: z(() => [
73
- e.loading ? (a(), s("span", A, [
74
- i(t.$slots, "loading", {}, () => [
75
- P(d(L), {
73
+ default: D(() => [
74
+ e.loading ? (i(), c("span", A, [
75
+ a(t.$slots, "loading", {}, () => [
76
+ H(s(S), {
76
77
  class: "hys-ui-button-spinner",
77
78
  size: 16,
78
79
  "aria-hidden": "true"
79
80
  })
80
81
  ], !0)
81
- ])) : (e.icon || t.$slots.icon) && e.iconPosition === "left" ? (a(), s("span", D, [
82
- i(t.$slots, "icon", {}, () => [
83
- (a(), u(r(e.icon), {
82
+ ])) : (e.icon || t.$slots.icon) && e.iconPosition === "left" ? (i(), c("span", N, [
83
+ a(t.$slots, "icon", {}, () => [
84
+ (i(), u(r(e.icon), {
84
85
  size: 16,
85
86
  "aria-hidden": "true"
86
87
  }))
87
88
  ], !0)
88
89
  ])) : y("", !0),
89
- i(t.$slots, "default", {}, void 0, !0),
90
- !e.loading && (e.icon || t.$slots.icon) && e.iconPosition === "right" ? (a(), s("span", H, [
91
- i(t.$slots, "icon", {}, () => [
92
- (a(), u(r(e.icon), {
90
+ a(t.$slots, "default", {}, void 0, !0),
91
+ !e.loading && (e.icon || t.$slots.icon) && e.iconPosition === "right" ? (i(), c("span", R, [
92
+ a(t.$slots, "icon", {}, () => [
93
+ (i(), u(r(e.icon), {
93
94
  size: 16,
94
95
  "aria-hidden": "true"
95
96
  }))
96
97
  ], !0)
97
98
  ])) : y("", !0),
98
- i(t.$slots, "suffix", {}, void 0, !0)
99
+ a(t.$slots, "suffix", {}, void 0, !0)
99
100
  ]),
100
101
  _: 3
101
102
  }, 16, ["class", "style", "type", "href", "role", "target", "rel", "disabled", "aria-disabled", "aria-busy", "aria-label", "tabindex", "autofocus"]));
102
103
  }
103
104
  });
104
105
  export {
105
- E as default
106
+ q as default
106
107
  };
@@ -1,86 +1,7 @@
1
- import { defineComponent as A, ref as p, computed as C, openBlock as a, createElementBlock as l, mergeProps as F, unref as y, createElementVNode as i, createVNode as $, toDisplayString as c, Fragment as h, renderList as b, renderSlot as N, createTextVNode as R, createCommentVNode as x } from "vue";
2
- import { useHysRootAttrs as z } from "../../config.js";
3
- import { ChevronLeft as B, ChevronRight as E } from "lucide-vue-next";
4
- const H = { class: "hys-ui-ent-toolbar" }, L = { class: "hys-ui-ent-calendar" }, M = ["disabled", "aria-pressed", "onClick"], Y = ["onClick"], G = /* @__PURE__ */ A({
5
- __name: "HysCalendar",
6
- props: {
7
- modelValue: {},
8
- events: {},
9
- disabledDate: { type: Function }
10
- },
11
- emits: ["update:modelValue", "select", "event"],
12
- setup(d, { emit: D }) {
13
- const V = z(), m = D, f = /* @__PURE__ */ new Date(), o = p(f.getFullYear()), r = p(f.getMonth()), S = C(() => `${o.value}年${r.value + 1}月`), w = C(() => {
14
- const n = (new Date(o.value, r.value, 1).getDay() + 6) % 7, t = new Date(o.value, r.value + 1, 0).getDate();
15
- return [...Array(n).fill(null), ...Array.from({ length: t }, (e, v) => v + 1)];
16
- });
17
- function g(n) {
18
- const t = new Date(o.value, r.value + n, 1);
19
- o.value = t.getFullYear(), r.value = t.getMonth();
20
- }
21
- function s(n) {
22
- return `${o.value}-${String(r.value + 1).padStart(2, "0")}-${String(n).padStart(2, "0")}`;
23
- }
24
- return (n, t) => (a(), l("section", F(y(V), { class: "hys-ui-ent-panel" }), [
25
- i("header", H, [
26
- i("button", {
27
- type: "button",
28
- "aria-label": "上个月",
29
- onClick: t[0] || (t[0] = (e) => g(-1))
30
- }, [
31
- $(y(B), {
32
- size: 16,
33
- "aria-hidden": "true"
34
- })
35
- ]),
36
- i("strong", null, c(S.value), 1),
37
- i("button", {
38
- type: "button",
39
- "aria-label": "下个月",
40
- onClick: t[1] || (t[1] = (e) => g(1))
41
- }, [
42
- $(y(E), {
43
- size: 16,
44
- "aria-hidden": "true"
45
- })
46
- ])
47
- ]),
48
- i("div", L, [
49
- (a(), l(h, null, b(["一", "二", "三", "四", "五", "六", "日"], (e) => i("strong", { key: e }, c(e), 1)), 64)),
50
- (a(!0), l(h, null, b(w.value, (e, v) => {
51
- var k;
52
- return a(), l("div", {
53
- key: v,
54
- class: "hys-ui-ent-calendar-day"
55
- }, [
56
- e ? (a(), l("button", {
57
- key: 0,
58
- type: "button",
59
- disabled: (k = d.disabledDate) == null ? void 0 : k.call(d, s(e)),
60
- "aria-pressed": d.modelValue === s(e),
61
- onClick: (u) => {
62
- m("select", s(e)), m("update:modelValue", s(e));
63
- }
64
- }, [
65
- N(n.$slots, "date", {
66
- date: s(e),
67
- day: e
68
- }, () => [
69
- R(c(e), 1)
70
- ])
71
- ], 8, M)) : x("", !0),
72
- (a(!0), l(h, null, b((d.events || []).filter((u) => e && u.date === s(e)), (u) => (a(), l("button", {
73
- type: "button",
74
- key: u.id,
75
- class: "hys-ui-ent-event",
76
- onClick: (P) => m("event", u.id)
77
- }, c(u.title), 9, Y))), 128))
78
- ]);
79
- }), 128))
80
- ])
81
- ], 16));
82
- }
83
- });
1
+ import o from "./HysCalendar2.vue.js";
2
+ /* empty css */
3
+ import r from "../../_virtual/_plugin-vue_export-helper.js";
4
+ const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-1f69497b"]]);
84
5
  export {
85
- G as default
6
+ m as default
86
7
  };