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,168 +1,278 @@
1
- import { defineComponent as J, ref as s, computed as V, watch as O, openBlock as u, createElementBlock as v, mergeProps as N, unref as o, createElementVNode as r, normalizeClass as $, toDisplayString as b, createVNode as E, createBlock as Q, Teleport as W, withCtx as X, Fragment as R, renderList as Y, createCommentVNode as Z, nextTick as ee } from "vue";
2
- import { useHysRootAttrs as te } from "../../config.js";
3
- import { CalendarDays as ae } from "lucide-vue-next";
4
- import ne from "../HysCalendarNavigation/HysCalendarNavigation.vue.js";
5
- import { useFloating as le } from "../../composables/useFloating.js";
6
- const oe = ["disabled", "aria-label", "aria-expanded"], re = ["aria-label"], ie = {
7
- class: "hys-ui-pf-range-instruction",
8
- role: "status"
9
- }, se = {
10
- class: "hys-ui-pf-calendar-week",
11
- "aria-hidden": "true"
12
- }, ue = { class: "hys-ui-pf-calendar-grid" }, de = ["data-date", "aria-label", "aria-pressed", "aria-current", "disabled", "onMouseenter", "onFocus", "onClick", "onKeydown"], ce = { class: "hys-ui-pf-calendar-footer" }, fe = { class: "hys-ui-pf-range-summary" }, ye = /* @__PURE__ */ J({
1
+ import { defineComponent as v, useSlots as h, ref as c, computed as p, openBlock as k, createBlock as $, mergeProps as g, toHandlers as B, unref as w, createSlots as b, withCtx as l, renderSlot as n, normalizeProps as t, guardReactiveProps as r, mergeDefaults as P } from "vue";
2
+ import V from "../HysDatePicker/HysDatePickerControl.vue.js";
3
+ import { datePickerDefaults as C } from "../../composables/datePicker.js";
4
+ const T = /* @__PURE__ */ v({
5
+ inheritAttrs: !1,
13
6
  __name: "HysDateRangePicker",
14
- props: {
7
+ props: /* @__PURE__ */ P({
15
8
  modelValue: {},
16
- disabled: { type: Boolean },
17
- min: {},
18
- max: {},
9
+ defaultValue: {},
10
+ clearValue: {},
11
+ type: {},
12
+ valueType: {},
13
+ valueFormat: {},
14
+ format: {},
15
+ inputFormats: {},
16
+ disabled: { type: [Boolean, Array] },
17
+ readonly: { type: Boolean },
18
+ size: {},
19
+ status: {},
20
+ bordered: { type: Boolean },
19
21
  placeholder: {},
20
22
  label: {},
23
+ ariaLabel: {},
24
+ name: {},
25
+ form: {},
26
+ autofocus: { type: Boolean },
27
+ min: {},
28
+ max: {},
29
+ disabledDate: { type: Function },
30
+ disabledTime: { type: Function },
31
+ firstDayOfWeek: {},
32
+ firstWeekContainsDate: {},
33
+ weekNumberFormatter: { type: Function },
34
+ disabledWeek: { type: Function },
35
+ weekValidation: {},
36
+ locale: {},
37
+ messages: {},
38
+ showWeekNumbers: { type: Boolean },
39
+ showAdjacentDays: { type: Boolean },
40
+ defaultPickerValue: {},
41
+ panelValue: {},
42
+ mode: {},
43
+ defaultMode: {},
44
+ shortcuts: {},
21
45
  clearable: { type: Boolean },
22
- disabledDate: { type: Function }
23
- },
24
- emits: ["update:modelValue"],
25
- setup(i, { emit: j }) {
26
- const F = te(), a = i, S = j, M = s(), p = s(), { open: U, style: q, show: K, close: g } = le(M, p), d = s(""), C = s(""), c = s(!1), f = s(""), D = V(() => {
27
- const e = c.value ? f.value || d.value : C.value;
28
- return [d.value, e].filter(Boolean).sort();
29
- }), _ = V(() => a.modelValue.filter(Boolean).join(" 至 "));
30
- function z(e) {
31
- return D.value.length === 2 && e >= D.value[0] && e <= D.value[1];
32
- }
33
- function B(e) {
34
- return e === d.value || e === (c.value ? f.value : C.value);
35
- }
36
- const x = /* @__PURE__ */ new Date();
37
- function A(e) {
38
- return [e.getUTCFullYear(), String(e.getUTCMonth() + 1).padStart(2, "0"), String(e.getUTCDate()).padStart(2, "0")].join("-");
39
- }
40
- const T = A(new Date(Date.UTC(x.getFullYear(), x.getMonth(), x.getDate()))), m = s(/* @__PURE__ */ new Date(T + "T00:00:00Z"));
41
- function w(e) {
42
- var n;
43
- return !!(a.min && e < a.min || a.max && e > a.max || (n = a.disabledDate) != null && n.call(a, /* @__PURE__ */ new Date(e + "T00:00:00Z")));
44
- }
45
- const H = V(() => {
46
- const e = new Date(Date.UTC(m.value.getUTCFullYear(), m.value.getUTCMonth(), 1));
47
- return Array.from({ length: 42 }, (n, t) => {
48
- const l = new Date(Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), t - (e.getUTCDay() + 6) % 7 + 1));
49
- return { value: A(l), day: l.getUTCDate(), outside: l.getUTCMonth() !== e.getUTCMonth() };
50
- });
51
- });
52
- async function L() {
53
- var l, h, y;
54
- if (a.disabled) return;
55
- if (U.value) {
56
- g();
57
- return;
58
- }
59
- d.value = a.modelValue[0], C.value = a.modelValue[1], c.value = !1, f.value = "";
60
- let e = a.modelValue[0] || T;
61
- a.min && e < a.min && (e = a.min), a.max && e > a.max && (e = a.max);
62
- const n = /* @__PURE__ */ new Date(e + "T00:00:00Z");
63
- Number.isNaN(n.getTime()) || (m.value = n), await K(), (y = Array.from(((l = p.value) == null ? void 0 : l.querySelectorAll("[data-date]:not(:disabled)")) || []).find((k) => k.dataset.date === e) || ((h = p.value) == null ? void 0 : h.querySelector("[data-date]:not(:disabled)"))) == null || y.focus();
64
- }
65
- function P(e) {
66
- if (a.disabled || w(e)) return;
67
- if (!c.value) {
68
- d.value = e, C.value = "", f.value = e, c.value = !0;
69
- return;
46
+ editable: { type: Boolean },
47
+ inputReadonly: { type: Boolean },
48
+ showOnFocus: { type: Boolean },
49
+ showToday: { type: Boolean },
50
+ showNow: { type: Boolean },
51
+ showFooter: { type: Boolean },
52
+ showConfirm: { type: Boolean },
53
+ showTime: { type: Boolean },
54
+ defaultTime: {},
55
+ hourStep: {},
56
+ minuteStep: {},
57
+ secondStep: {},
58
+ showSeconds: { type: Boolean },
59
+ rangeSeparator: {},
60
+ startPlaceholder: {},
61
+ endPlaceholder: {},
62
+ allowEmpty: {},
63
+ singlePanel: { type: Boolean },
64
+ unlinkPanels: { type: Boolean },
65
+ minRangeDays: {},
66
+ maxRangeDays: {},
67
+ rangeValidation: {},
68
+ maxDates: {},
69
+ open: { type: Boolean },
70
+ defaultOpen: { type: Boolean },
71
+ inline: { type: Boolean },
72
+ placement: {},
73
+ appendTo: { type: [String, Boolean] },
74
+ popupWidth: {},
75
+ popupClass: {},
76
+ popupStyle: {},
77
+ validateEvent: { type: Boolean },
78
+ cellClassName: { type: Function }
79
+ }, C),
80
+ emits: ["update:modelValue", "change", "value-change", "update:open", "visible-change", "update:panelValue", "update:mode", "panelChange", "calendarChange", "clear", "ok", "invalid", "focus", "blur"],
81
+ setup(u, { expose: i, emit: d }) {
82
+ const m = u, f = d;
83
+ h();
84
+ const o = c(), y = Object.fromEntries(
85
+ [
86
+ "update:modelValue",
87
+ "change",
88
+ "value-change",
89
+ "update:open",
90
+ "visible-change",
91
+ "update:panelValue",
92
+ "update:mode",
93
+ "panelChange",
94
+ "calendarChange",
95
+ "clear",
96
+ "ok",
97
+ "invalid",
98
+ "focus",
99
+ "blur"
100
+ ].map((e) => [
101
+ e,
102
+ (...a) => f(e, ...a)
103
+ ])
104
+ );
105
+ return i({
106
+ element: p(() => {
107
+ var e;
108
+ return (e = o.value) == null ? void 0 : e.element;
109
+ }),
110
+ open: p(() => {
111
+ var e;
112
+ return ((e = o.value) == null ? void 0 : e.open) ?? !1;
113
+ }),
114
+ value: p(() => {
115
+ var e;
116
+ return (e = o.value) == null ? void 0 : e.value;
117
+ }),
118
+ draft: p(() => {
119
+ var e;
120
+ return ((e = o.value) == null ? void 0 : e.draft) ?? [];
121
+ }),
122
+ focus: () => {
123
+ var e;
124
+ return (e = o.value) == null ? void 0 : e.focus();
125
+ },
126
+ blur: () => {
127
+ var e;
128
+ return (e = o.value) == null ? void 0 : e.blur();
129
+ },
130
+ show: () => {
131
+ var e;
132
+ return ((e = o.value) == null ? void 0 : e.show()) ?? Promise.resolve(!1);
133
+ },
134
+ hide: (e = !1) => {
135
+ var a;
136
+ return (a = o.value) == null ? void 0 : a.hide(e);
137
+ },
138
+ handleOpen: () => {
139
+ var e;
140
+ return ((e = o.value) == null ? void 0 : e.show()) ?? Promise.resolve(!1);
141
+ },
142
+ handleClose: () => {
143
+ var e;
144
+ return (e = o.value) == null ? void 0 : e.hide();
145
+ },
146
+ clear: () => {
147
+ var e;
148
+ return ((e = o.value) == null ? void 0 : e.clear()) ?? Promise.resolve(!1);
149
+ },
150
+ setValue: (e) => {
151
+ var a;
152
+ return ((a = o.value) == null ? void 0 : a.setValue(e)) ?? Promise.resolve(!1);
153
+ },
154
+ confirm: () => {
155
+ var e;
156
+ return ((e = o.value) == null ? void 0 : e.confirm()) ?? Promise.resolve(!1);
157
+ },
158
+ cancel: () => {
159
+ var e;
160
+ return (e = o.value) == null ? void 0 : e.cancel();
161
+ },
162
+ showMonth: (e) => {
163
+ var a;
164
+ return ((a = o.value) == null ? void 0 : a.showMonth(e)) ?? Promise.resolve(!1);
165
+ },
166
+ setMode: (e) => {
167
+ var a;
168
+ return ((a = o.value) == null ? void 0 : a.setMode(e)) ?? !1;
70
169
  }
71
- const n = [d.value, e].sort();
72
- S("update:modelValue", n), g(!0);
73
- }
74
- async function G(e, n) {
75
- var y, k;
76
- const t = { ArrowLeft: -1, ArrowRight: 1, ArrowUp: -7, ArrowDown: 7 };
77
- if (!(e.key in t)) return;
78
- e.preventDefault();
79
- const l = /* @__PURE__ */ new Date(n + "T00:00:00Z");
80
- l.setUTCDate(l.getUTCDate() + t[e.key]);
81
- const h = A(l);
82
- w(h) || (m.value = l, await ee(), (k = Array.from(((y = p.value) == null ? void 0 : y.querySelectorAll("[data-date]")) || []).find((I) => I.dataset.date === h)) == null || k.focus());
83
- }
84
- return O(() => a.disabled, (e) => {
85
- e && g();
86
- }), (e, n) => (u(), v("div", N(o(F), { class: "hys-ui-pf-date-picker" }), [
87
- r("button", {
88
- ref_key: "trigger",
89
- ref: M,
90
- type: "button",
91
- class: "hys-ui-v4-control hys-ui-pf-select-trigger",
92
- disabled: i.disabled,
93
- "aria-label": i.label || "选择日期范围",
94
- "aria-haspopup": "dialog",
95
- "aria-expanded": o(U),
96
- onClick: L
97
- }, [
98
- r("span", {
99
- class: $({ "hys-ui-pf-placeholder": !_.value })
100
- }, b(_.value || i.placeholder || "开始日期 至 结束日期"), 3),
101
- E(o(ae), {
102
- size: 16,
103
- class: "hys-ui-pf-select-icon",
104
- "aria-hidden": "true"
105
- })
106
- ], 8, oe),
107
- (u(), Q(W, { to: "body" }, [
108
- o(U) ? (u(), v("div", N({ key: 0 }, o(F), {
109
- ref_key: "panel",
110
- ref: p,
111
- class: "hys-ui-v4-menu hys-ui-pf-calendar hys-ui-pf-range-calendar",
112
- style: o(q),
113
- role: "dialog",
114
- "aria-label": i.label || "选择日期范围"
115
- }), [
116
- E(ne, {
117
- month: m.value,
118
- "onUpdate:month": n[0] || (n[0] = (t) => m.value = t),
119
- min: i.min,
120
- max: i.max
121
- }, {
122
- default: X(() => [
123
- r("p", ie, b(c.value ? "请选择结束日期" : "请选择开始日期"), 1),
124
- r("div", se, [
125
- (u(), v(R, null, Y(["一", "二", "三", "四", "五", "六", "日"], (t) => r("span", { key: t }, b(t), 1)), 64))
126
- ]),
127
- r("div", ue, [
128
- (u(!0), v(R, null, Y(H.value, (t) => (u(), v("button", {
129
- key: t.value,
130
- type: "button",
131
- "data-date": t.value,
132
- "aria-label": t.value,
133
- "aria-pressed": B(t.value),
134
- "aria-current": t.value === o(T) ? "date" : void 0,
135
- disabled: w(t.value),
136
- class: $({ "hys-ui-is-outside": t.outside, "hys-ui-is-selected": B(t.value), "hys-ui-is-in-range": z(t.value), "hys-ui-is-today": t.value === o(T) }),
137
- onMouseenter: (l) => !w(t.value) && (f.value = t.value),
138
- onFocus: (l) => f.value = t.value,
139
- onClick: (l) => P(t.value),
140
- onKeydown: (l) => G(l, t.value)
141
- }, b(t.day), 43, de))), 128))
142
- ])
143
- ]),
144
- _: 1
145
- }, 8, ["month", "min", "max"]),
146
- i.clearable ? (u(), v("button", {
147
- key: 0,
148
- type: "button",
149
- class: "hys-ui-v4-option",
150
- onClick: n[1] || (n[1] = (t) => {
151
- S("update:modelValue", ["", ""]), o(g)(!0);
152
- })
153
- }, "清空")) : Z("", !0),
154
- r("div", ce, [
155
- r("span", fe, b(D.value.join(" 至 ") || "请选择日期范围"), 1),
156
- r("button", {
157
- type: "button",
158
- onClick: n[2] || (n[2] = (t) => o(g)(!0))
159
- }, "取消")
160
- ])
161
- ], 16, re)) : Z("", !0)
162
- ]))
163
- ], 16));
170
+ }), (e, a) => (k(), $(V, g({ ...m, ...e.$attrs }, {
171
+ range: !0,
172
+ ref_key: "control",
173
+ ref: o
174
+ }, B(w(y))), b({ _: 2 }, [
175
+ e.$slots.default ? {
176
+ name: "default",
177
+ fn: l((s) => [
178
+ n(e.$slots, "default", t(r(s)))
179
+ ]),
180
+ key: "0"
181
+ } : void 0,
182
+ e.$slots["week-number"] ? {
183
+ name: "week-number",
184
+ fn: l((s) => [
185
+ n(e.$slots, "week-number", t(r(s)))
186
+ ]),
187
+ key: "1"
188
+ } : void 0,
189
+ e.$slots.cell ? {
190
+ name: "cell",
191
+ fn: l((s) => [
192
+ n(e.$slots, "cell", t(r(s)))
193
+ ]),
194
+ key: "2"
195
+ } : void 0,
196
+ e.$slots.header ? {
197
+ name: "header",
198
+ fn: l((s) => [
199
+ n(e.$slots, "header", t(r(s)))
200
+ ]),
201
+ key: "3"
202
+ } : void 0,
203
+ e.$slots.footer ? {
204
+ name: "footer",
205
+ fn: l((s) => [
206
+ n(e.$slots, "footer", t(r(s)))
207
+ ]),
208
+ key: "4"
209
+ } : void 0,
210
+ e.$slots.shortcut ? {
211
+ name: "shortcut",
212
+ fn: l((s) => [
213
+ n(e.$slots, "shortcut", t(r(s)))
214
+ ]),
215
+ key: "5"
216
+ } : void 0,
217
+ e.$slots.prefix ? {
218
+ name: "prefix",
219
+ fn: l(() => [
220
+ n(e.$slots, "prefix")
221
+ ]),
222
+ key: "6"
223
+ } : void 0,
224
+ e.$slots.suffix ? {
225
+ name: "suffix",
226
+ fn: l(() => [
227
+ n(e.$slots, "suffix")
228
+ ]),
229
+ key: "7"
230
+ } : void 0,
231
+ e.$slots["clear-icon"] ? {
232
+ name: "clear-icon",
233
+ fn: l(() => [
234
+ n(e.$slots, "clear-icon")
235
+ ]),
236
+ key: "8"
237
+ } : void 0,
238
+ e.$slots["prev-month"] ? {
239
+ name: "prev-month",
240
+ fn: l(() => [
241
+ n(e.$slots, "prev-month")
242
+ ]),
243
+ key: "9"
244
+ } : void 0,
245
+ e.$slots["next-month"] ? {
246
+ name: "next-month",
247
+ fn: l(() => [
248
+ n(e.$slots, "next-month")
249
+ ]),
250
+ key: "10"
251
+ } : void 0,
252
+ e.$slots["prev-year"] ? {
253
+ name: "prev-year",
254
+ fn: l(() => [
255
+ n(e.$slots, "prev-year")
256
+ ]),
257
+ key: "11"
258
+ } : void 0,
259
+ e.$slots["next-year"] ? {
260
+ name: "next-year",
261
+ fn: l(() => [
262
+ n(e.$slots, "next-year")
263
+ ]),
264
+ key: "12"
265
+ } : void 0,
266
+ e.$slots["range-separator"] ? {
267
+ name: "range-separator",
268
+ fn: l(() => [
269
+ n(e.$slots, "range-separator")
270
+ ]),
271
+ key: "13"
272
+ } : void 0
273
+ ]), 1040));
164
274
  }
165
275
  });
166
276
  export {
167
- ye as default
277
+ T as default
168
278
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./HysDivider2.vue.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const m = /* @__PURE__ */ r(o, [["__scopeId", "data-v-c27000f3"]]);
4
+ const i = /* @__PURE__ */ r(o, [["__scopeId", "data-v-2e2cedc9"]]);
5
5
  export {
6
- m as default
6
+ i as default
7
7
  };
@@ -1,28 +1,48 @@
1
- import { defineComponent as a, openBlock as o, createElementBlock as i, mergeProps as n, unref as d, renderSlot as s, createTextVNode as l, toDisplayString as c, createCommentVNode as u } from "vue";
2
- import { useHysRootAttrs as h } from "../../config.js";
3
- const m = ["aria-orientation"], f = { key: 0 }, k = /* @__PURE__ */ a({
1
+ import { defineComponent as d, computed as s, openBlock as o, createElementBlock as r, mergeProps as l, unref as u, renderSlot as c, createTextVNode as y, toDisplayString as h, createCommentVNode as m } from "vue";
2
+ import { useHysRootAttrs as v } from "../../config.js";
3
+ const f = ["aria-orientation"], g = {
4
+ key: 0,
5
+ class: "hys-ui-divider-text"
6
+ }, M = /* @__PURE__ */ d({
4
7
  __name: "HysDivider",
5
8
  props: {
6
9
  label: {},
7
10
  direction: { default: "horizontal" },
8
11
  dashed: { type: Boolean },
9
- orientation: { default: "center" }
12
+ orientation: { default: "center" },
13
+ borderStyle: {},
14
+ orientationMargin: {},
15
+ plain: { type: Boolean },
16
+ size: { default: "md" }
10
17
  },
11
18
  setup(e) {
12
- const r = h();
13
- return (t, y) => (o(), i("div", n(d(r), {
14
- class: ["hys-ui-ex-divider", ["hys-ui-divider-" + e.direction, "hys-ui-divider-" + e.orientation, { "hys-ui-divider-dashed": e.dashed }]],
19
+ const n = v(), i = e, a = s(() => ({
20
+ "--hys-ui-divider-line": i.borderStyle ?? (i.dashed ? "dashed" : "solid"),
21
+ "--hys-ui-divider-width": i.borderStyle === "double" ? "3px" : "1px",
22
+ "--hys-ui-divider-margin": typeof i.orientationMargin == "number" ? Math.max(0, i.orientationMargin) + "px" : i.orientationMargin
23
+ }));
24
+ return (t, b) => (o(), r("div", l(u(n), {
25
+ class: ["hys-ui-ex-divider", [
26
+ "hys-ui-divider-" + e.direction,
27
+ "hys-ui-divider-" + e.orientation,
28
+ "hys-ui-divider-" + e.size,
29
+ {
30
+ "hys-ui-divider-plain": e.plain,
31
+ "hys-ui-divider-custom-margin": e.orientationMargin !== void 0
32
+ }
33
+ ]],
34
+ style: a.value,
15
35
  role: "separator",
16
36
  "aria-orientation": e.direction
17
37
  }), [
18
- e.label || t.$slots.default ? (o(), i("span", f, [
19
- s(t.$slots, "default", {}, () => [
20
- l(c(e.label), 1)
38
+ e.direction === "horizontal" && (e.label || t.$slots.default) ? (o(), r("span", g, [
39
+ c(t.$slots, "default", {}, () => [
40
+ y(h(e.label), 1)
21
41
  ], !0)
22
- ])) : u("", !0)
23
- ], 16, m));
42
+ ])) : m("", !0)
43
+ ], 16, f));
24
44
  }
25
45
  });
26
46
  export {
27
- k as default
47
+ M as default
28
48
  };
@@ -1,7 +1,7 @@
1
1
  import o from "./HysDrawer2.vue.js";
2
2
  /* empty css */
3
3
  import r from "../../_virtual/_plugin-vue_export-helper.js";
4
- const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-76c29405"]]);
4
+ const p = /* @__PURE__ */ r(o, [["__scopeId", "data-v-8ba9617d"]]);
5
5
  export {
6
6
  p as default
7
7
  };