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.
- package/CHANGELOG.md +137 -1
- package/README.md +18 -6
- package/dist/components/HysAccordion/HysAccordion.vue.js +1 -1
- package/dist/components/HysAccordion/HysAccordion2.vue.js +181 -47
- package/dist/components/HysAlert/HysAlert.vue.js +14 -14
- package/dist/components/HysAnimatedNumber/HysAnimatedNumber.vue.js +23 -20
- package/dist/components/HysAutocomplete/HysAutocomplete.vue.js +7 -0
- package/dist/components/HysAutocomplete/HysAutocomplete2.vue.js +627 -0
- package/dist/components/HysAvatar/HysAvatar.vue.js +5 -35
- package/dist/components/HysAvatar/HysAvatar2.vue.js +221 -2
- package/dist/components/HysAvatarGroup/HysAvatarGroup.vue.js +7 -0
- package/dist/components/HysAvatarGroup/HysAvatarGroup2.vue.js +252 -0
- package/dist/components/HysBadge/HysBadge.vue.js +2 -2
- package/dist/components/HysBadge/HysBadge2.vue.js +154 -26
- package/dist/components/HysBreadcrumb/HysBreadcrumb.vue.js +5 -38
- package/dist/components/HysBreadcrumb/HysBreadcrumb2.vue.js +74 -2
- package/dist/components/HysButton/HysButton.vue.js +2 -2
- package/dist/components/HysButton/HysButton2.vue.js +29 -28
- package/dist/components/HysCalendar/HysCalendar.vue.js +5 -84
- package/dist/components/HysCalendar/HysCalendar2.vue.js +803 -2
- package/dist/components/HysCard/HysCard.vue.js +1 -1
- package/dist/components/HysCard/HysCard2.vue.js +177 -44
- package/dist/components/HysCascader/HysCascader.vue.js +5 -182
- package/dist/components/HysCascader/HysCascader2.vue.js +760 -2
- package/dist/components/HysCascader/HysCascaderColumn.vue.js +7 -0
- package/dist/components/HysCascader/HysCascaderColumn2.vue.js +232 -0
- package/dist/components/HysCheckbox/HysCheckbox.vue.js +5 -39
- package/dist/components/HysCheckbox/HysCheckbox2.vue.js +200 -2
- package/dist/components/HysCheckboxGroup/HysCheckboxGroup.vue.js +7 -0
- package/dist/components/HysCheckboxGroup/HysCheckboxGroup2.vue.js +237 -0
- package/dist/components/HysColorPicker/HysColorPicker.vue.js +2 -2
- package/dist/components/HysColorPicker/HysColorPicker2.vue.js +107 -106
- package/dist/components/HysCommandPalette/HysCommandPalette.vue.js +52 -51
- package/dist/components/HysCommentEditor/HysCommentEditor.vue.js +17 -17
- package/dist/components/HysDataGrid/HysDataGrid.vue.js +1 -1
- package/dist/components/HysDataGrid/HysDataGrid2.vue.js +397 -390
- package/dist/components/HysDatePicker/HysDatePicker.vue.js +268 -139
- package/dist/components/HysDatePicker/HysDatePickerControl.vue.js +7 -0
- package/dist/components/HysDatePicker/HysDatePickerControl2.vue.js +807 -0
- package/dist/components/HysDatePicker/HysDatePickerPanel.vue.js +7 -0
- package/dist/components/HysDatePicker/HysDatePickerPanel2.vue.js +357 -0
- package/dist/components/HysDateRangePicker/HysDateRangePicker.vue.js +268 -158
- package/dist/components/HysDivider/HysDivider.vue.js +2 -2
- package/dist/components/HysDivider/HysDivider2.vue.js +33 -13
- package/dist/components/HysDrawer/HysDrawer.vue.js +1 -1
- package/dist/components/HysDrawer/HysDrawer2.vue.js +55 -54
- package/dist/components/HysFileManager/HysFileManager.vue.js +5 -63
- package/dist/components/HysFileManager/HysFileManager2.vue.js +86 -2
- package/dist/components/HysForm/HysForm.vue.js +3 -3
- package/dist/components/HysForm/HysForm2.vue.js +580 -92
- package/dist/components/HysFormItem/HysFormItem.vue.js +5 -69
- package/dist/components/HysFormItem/HysFormItem2.vue.js +521 -2
- package/dist/components/HysGantt/HysGantt.vue.js +5 -264
- package/dist/components/HysGantt/HysGantt2.vue.js +1399 -2
- package/dist/components/HysInput/HysInput.vue.js +2 -2
- package/dist/components/HysInput/HysInput2.vue.js +468 -120
- package/dist/components/HysMention/HysMention.vue.js +2 -2
- package/dist/components/HysMention/HysMention2.vue.js +89 -88
- package/dist/components/HysModal/HysModal.vue.js +2 -2
- package/dist/components/HysModal/HysModal2.vue.js +35 -35
- package/dist/components/HysNotificationCenter/HysNotificationCenter.vue.js +37 -36
- package/dist/components/HysNumberInput/HysNumberInput.vue.js +2 -2
- package/dist/components/HysNumberInput/HysNumberInput2.vue.js +561 -70
- package/dist/components/HysOrgTree/HysOrgTree.vue.js +41 -36
- package/dist/components/HysPagination/HysPagination.vue.js +2 -2
- package/dist/components/HysPagination/HysPagination2.vue.js +93 -91
- package/dist/components/HysPermissionMatrix/HysPermissionMatrix.vue.js +5 -41
- package/dist/components/HysPermissionMatrix/HysPermissionMatrix2.vue.js +101 -2
- package/dist/components/HysRadio/HysRadio.vue.js +7 -0
- package/dist/components/HysRadio/HysRadio2.vue.js +180 -0
- package/dist/components/HysRadioGroup/HysRadioGroup.vue.js +5 -40
- package/dist/components/HysRadioGroup/HysRadioGroup2.vue.js +205 -2
- package/dist/components/HysRating/HysRating.vue.js +1 -1
- package/dist/components/HysRating/HysRating2.vue.js +288 -68
- package/dist/components/HysResizablePanel/HysResizablePanel.vue.js +46 -28
- package/dist/components/HysRichTextEditor/HysRichTextEditor.vue.js +2 -2
- package/dist/components/HysRichTextEditor/HysRichTextEditor2.vue.js +87 -67
- package/dist/components/HysSearch/HysSearch.vue.js +50 -38
- package/dist/components/HysSegmented/HysSegmented.vue.js +5 -58
- package/dist/components/HysSegmented/HysSegmented2.vue.js +273 -2
- package/dist/components/HysSelect/HysSelect.vue.js +3 -2
- package/dist/components/HysSelect/HysSelect2.vue.js +859 -164
- package/dist/components/HysSkeleton/HysSkeleton.vue.js +2 -2
- package/dist/components/HysSkeleton/HysSkeleton2.vue.js +126 -29
- package/dist/components/HysSlider/HysSlider.vue.js +2 -2
- package/dist/components/HysSlider/HysSlider2.vue.js +532 -59
- package/dist/components/HysSlider/SliderTooltip.vue.js +7 -0
- package/dist/components/HysSlider/SliderTooltip2.vue.js +156 -0
- package/dist/components/HysSplitPane/HysSplitPane.vue.js +48 -42
- package/dist/components/HysSteps/HysSteps.vue.js +2 -2
- package/dist/components/HysSteps/HysSteps2.vue.js +111 -36
- package/dist/components/HysSwitch/HysSwitch.vue.js +2 -2
- package/dist/components/HysSwitch/HysSwitch2.vue.js +235 -42
- package/dist/components/HysTable/HysTable.vue.js +1 -1
- package/dist/components/HysTable/HysTable2.vue.js +1471 -82
- package/dist/components/HysTable/HysTableFilterOptions.vue.js +7 -0
- package/dist/components/HysTable/HysTableFilterOptions2.vue.js +133 -0
- package/dist/components/HysTabs/HysTabs.vue.js +2 -2
- package/dist/components/HysTabs/HysTabs2.vue.js +262 -66
- package/dist/components/HysTagInput/HysTagInput.vue.js +43 -42
- package/dist/components/HysTextarea/HysTextarea.vue.js +137 -66
- package/dist/components/HysToast/HysToast.vue.js +2 -2
- package/dist/components/HysToast/HysToast2.vue.js +121 -38
- package/dist/components/HysTour/HysTour.vue.js +47 -42
- package/dist/components/HysTransfer/HysTransfer.vue.js +5 -207
- package/dist/components/HysTransfer/HysTransfer2.vue.js +416 -2
- package/dist/components/HysTransfer/HysTransferPanel.vue.js +7 -0
- package/dist/components/HysTransfer/HysTransferPanel2.vue.js +454 -0
- package/dist/components/HysTree/HysTree.vue.js +2 -3
- package/dist/components/HysTree/HysTree2.vue.js +641 -301
- package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +5 -129
- package/dist/components/HysTreeSelect/HysTreeSelect2.vue.js +558 -2
- package/dist/components/HysTreeSelect/HysTreeSelectPanel.vue.js +7 -0
- package/dist/components/HysTreeSelect/HysTreeSelectPanel2.vue.js +323 -0
- package/dist/components/HysUpload/HysUpload.vue.js +2 -2
- package/dist/components/HysUpload/HysUpload2.vue.js +97 -78
- package/dist/composables/autocomplete.js +50 -0
- package/dist/composables/avatar.js +57 -0
- package/dist/composables/calendar.js +96 -0
- package/dist/composables/cascader.js +79 -0
- package/dist/composables/choice.js +38 -0
- package/dist/composables/choiceModel.js +67 -0
- package/dist/composables/datePicker.js +227 -0
- package/dist/composables/formContext.js +94 -3
- package/dist/composables/formLayout.js +57 -0
- package/dist/composables/formValidation.js +240 -0
- package/dist/composables/ganttConflicts.js +143 -0
- package/dist/composables/numberInput.js +91 -0
- package/dist/composables/rating.js +16 -0
- package/dist/composables/selectOptions.js +54 -0
- package/dist/composables/table.js +150 -0
- package/dist/composables/textInput.js +34 -0
- package/dist/composables/toastEscape.js +16 -0
- package/dist/composables/transfer.js +63 -0
- package/dist/composables/tree.js +118 -0
- package/dist/composables/treeSelect.js +71 -0
- package/dist/composables/useCascader.js +438 -0
- package/dist/composables/useDatePicker.js +425 -0
- package/dist/composables/useDialog.js +16 -16
- package/dist/composables/useFloating.js +98 -52
- package/dist/composables/useGanttDependencies.js +306 -0
- package/dist/composables/useGanttHistory.js +157 -0
- package/dist/composables/useGanttLabelResize.js +100 -0
- package/dist/composables/useHysToast.js +148 -0
- package/dist/composables/useTable.js +474 -0
- package/dist/composables/useTextareaSize.js +72 -0
- package/dist/composables/useTransfer.js +257 -0
- package/dist/composables/useTree.js +439 -0
- package/dist/composables/useTreeSelect.js +361 -0
- package/dist/config.js +18 -15
- package/dist/index.js +149 -136
- package/dist/style.css +1 -1
- package/dist/types/components/HysAccordion/HysAccordion.vue.d.ts +61 -22
- package/dist/types/components/HysAutocomplete/HysAutocomplete.vue.d.ts +201 -0
- package/dist/types/components/HysAvatar/HysAvatar.vue.d.ts +28 -15
- package/dist/types/components/HysAvatarGroup/HysAvatarGroup.vue.d.ts +99 -0
- package/dist/types/components/HysBadge/HysBadge.vue.d.ts +41 -4
- package/dist/types/components/HysBreadcrumb/HysBreadcrumb.vue.d.ts +38 -10
- package/dist/types/components/HysButton/HysButton.vue.d.ts +0 -1
- package/dist/types/components/HysCalendar/HysCalendar.vue.d.ts +119 -29
- package/dist/types/components/HysCard/HysCard.vue.d.ts +57 -5
- package/dist/types/components/HysCascader/HysCascader.vue.d.ts +129 -41
- package/dist/types/components/HysCascader/HysCascaderColumn.vue.d.ts +55 -0
- package/dist/types/components/HysCheckbox/HysCheckbox.vue.d.ts +55 -27
- package/dist/types/components/HysCheckboxGroup/HysCheckboxGroup.vue.d.ts +73 -0
- package/dist/types/components/HysDataGrid/HysDataGrid.vue.d.ts +1 -1
- package/dist/types/components/HysDatePicker/HysDatePicker.vue.d.ts +66 -14
- package/dist/types/components/HysDatePicker/HysDatePickerControl.vue.d.ts +90 -0
- package/dist/types/components/HysDatePicker/HysDatePickerPanel.vue.d.ts +93 -0
- package/dist/types/components/HysDateRangePicker/HysDateRangePicker.vue.d.ts +66 -14
- package/dist/types/components/HysDivider/HysDivider.vue.d.ts +8 -3
- package/dist/types/components/HysDrawer/HysDrawer.vue.d.ts +1 -0
- package/dist/types/components/HysFileManager/HysFileManager.vue.d.ts +8 -4
- package/dist/types/components/HysForm/HysForm.vue.d.ts +110 -18
- package/dist/types/components/HysFormItem/HysFormItem.vue.d.ts +108 -2
- package/dist/types/components/HysGantt/HysGantt.vue.d.ts +88 -4
- package/dist/types/components/HysInput/HysInput.vue.d.ts +52 -29
- package/dist/types/components/HysMention/HysMention.vue.d.ts +2 -2
- package/dist/types/components/HysNumberInput/HysNumberInput.vue.d.ts +93 -33
- package/dist/types/components/HysOrgTree/HysOrgTree.vue.d.ts +4 -1
- package/dist/types/components/HysPagination/HysPagination.vue.d.ts +1 -1
- package/dist/types/components/HysPermissionMatrix/HysPermissionMatrix.vue.d.ts +8 -1
- package/dist/types/components/HysPopover/HysPopover.vue.d.ts +3 -3
- package/dist/types/components/HysProgress/HysProgress.vue.d.ts +1 -1
- package/dist/types/components/HysRadio/HysRadio.vue.d.ts +56 -0
- package/dist/types/components/HysRadioGroup/HysRadioGroup.vue.d.ts +62 -17
- package/dist/types/components/HysRating/HysRating.vue.d.ts +85 -5
- package/dist/types/components/HysResizablePanel/HysResizablePanel.vue.d.ts +6 -0
- package/dist/types/components/HysRichTextEditor/HysRichTextEditor.vue.d.ts +4 -4
- package/dist/types/components/HysSearch/HysSearch.vue.d.ts +2 -2
- package/dist/types/components/HysSegmented/HysSegmented.vue.d.ts +64 -32
- package/dist/types/components/HysSelect/HysSelect.vue.d.ts +120 -14
- package/dist/types/components/HysSkeleton/HysSkeleton.vue.d.ts +30 -2
- package/dist/types/components/HysSlider/HysSlider.vue.d.ts +66 -9
- package/dist/types/components/HysSlider/SliderTooltip.vue.d.ts +22 -0
- package/dist/types/components/HysSplitPane/HysSplitPane.vue.d.ts +6 -0
- package/dist/types/components/HysSteps/HysSteps.vue.d.ts +65 -9
- package/dist/types/components/HysSwitch/HysSwitch.vue.d.ts +76 -17
- package/dist/types/components/HysTable/HysTable.vue.d.ts +206 -32
- package/dist/types/components/HysTable/HysTableFilterOptions.vue.d.ts +18 -0
- package/dist/types/components/HysTabs/HysTabs.vue.d.ts +76 -23
- package/dist/types/components/HysTagInput/HysTagInput.vue.d.ts +5 -5
- package/dist/types/components/HysTextarea/HysTextarea.vue.d.ts +44 -27
- package/dist/types/components/HysToast/HysToast.vue.d.ts +55 -7
- package/dist/types/components/HysTour/HysTour.vue.d.ts +5 -3
- package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +55 -30
- package/dist/types/components/HysTransfer/HysTransferPanel.vue.d.ts +105 -0
- package/dist/types/components/HysTree/HysTree.vue.d.ts +140 -73
- package/dist/types/components/HysTreeSelect/HysTreeSelect.vue.d.ts +102 -23
- package/dist/types/components/HysTreeSelect/HysTreeSelectPanel.vue.d.ts +56 -0
- package/dist/types/composables/autocomplete.d.ts +106 -0
- package/dist/types/composables/avatar.d.ts +70 -0
- package/dist/types/composables/calendar.d.ts +66 -0
- package/dist/types/composables/cascader.d.ts +192 -0
- package/dist/types/composables/choice.d.ts +110 -0
- package/dist/types/composables/choiceModel.d.ts +11 -0
- package/dist/types/composables/datePicker.d.ts +247 -0
- package/dist/types/composables/formContext.d.ts +138 -8
- package/dist/types/composables/formLayout.d.ts +11 -0
- package/dist/types/composables/formValidation.d.ts +13 -0
- package/dist/types/composables/gantt.d.ts +68 -0
- package/dist/types/composables/ganttConflicts.d.ts +30 -0
- package/dist/types/composables/numberInput.d.ts +45 -0
- package/dist/types/composables/rating.d.ts +18 -0
- package/dist/types/composables/segmented.d.ts +15 -0
- package/dist/types/composables/selectOptions.d.ts +44 -0
- package/dist/types/composables/slider.d.ts +21 -0
- package/dist/types/composables/table.d.ts +309 -0
- package/dist/types/composables/textInput.d.ts +76 -0
- package/dist/types/composables/toastEscape.d.ts +1 -0
- package/dist/types/composables/transfer.d.ts +180 -0
- package/dist/types/composables/tree.d.ts +237 -0
- package/dist/types/composables/treeSelect.d.ts +167 -0
- package/dist/types/composables/useCascader.d.ts +162 -0
- package/dist/types/composables/useDatePicker.d.ts +79 -0
- package/dist/types/composables/useFloating.d.ts +8 -5
- package/dist/types/composables/useGanttDependencies.d.ts +83 -0
- package/dist/types/composables/useGanttHistory.d.ts +42 -0
- package/dist/types/composables/useGanttLabelResize.d.ts +23 -0
- package/dist/types/composables/useHysToast.d.ts +50 -0
- package/dist/types/composables/useTable.d.ts +60 -0
- package/dist/types/composables/useTextareaSize.d.ts +3 -0
- package/dist/types/composables/useTransfer.d.ts +58 -0
- package/dist/types/composables/useTree.d.ts +77 -0
- package/dist/types/composables/useTreeSelect.d.ts +117 -0
- package/dist/types/index.d.ts +38 -7
- package/package.json +47 -11
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { defineComponent as J, ref as A, watch as P, onActivated as K, nextTick as Q, onDeactivated as Z, onBeforeUnmount as ee, openBlock as N, createBlock as te, Teleport as ie, createElementBlock as oe, mergeProps as ne, unref as le, renderSlot as se, createCommentVNode as re } from "vue";
|
|
2
|
+
import { useHysRootAttrs as ae } from "../../config.js";
|
|
3
|
+
const ce = ["id"], fe = /* @__PURE__ */ J({
|
|
4
|
+
__name: "SliderTooltip",
|
|
5
|
+
props: {
|
|
6
|
+
id: {},
|
|
7
|
+
anchor: {},
|
|
8
|
+
container: {},
|
|
9
|
+
placement: {},
|
|
10
|
+
position: {}
|
|
11
|
+
},
|
|
12
|
+
setup(q) {
|
|
13
|
+
const i = q, C = ae(), g = A(), p = A(!0), R = A({ position: "fixed", visibility: "hidden" }), X = A(i.placement);
|
|
14
|
+
let h, x, L = [], S = {}, z;
|
|
15
|
+
function B() {
|
|
16
|
+
if (L = [], S = {}, !i.anchor) return;
|
|
17
|
+
for (let n = i.anchor.parentElement; n; n = n.parentElement) {
|
|
18
|
+
const e = getComputedStyle(n), l = /hidden|clip|auto|scroll/.test(e.overflowX || e.overflow), c = /hidden|clip|auto|scroll/.test(e.overflowY || e.overflow);
|
|
19
|
+
(l || c) && L.push({ element: n, x: l, y: c });
|
|
20
|
+
}
|
|
21
|
+
const t = getComputedStyle(i.anchor);
|
|
22
|
+
for (const n of [
|
|
23
|
+
"--hys-ui-text",
|
|
24
|
+
"--hys-ui-surface",
|
|
25
|
+
"--hys-ui-theme-text",
|
|
26
|
+
"--hys-ui-theme-surface"
|
|
27
|
+
]) {
|
|
28
|
+
const e = t.getPropertyValue(n).trim();
|
|
29
|
+
e && (S[n] = e);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function Y() {
|
|
33
|
+
h = void 0;
|
|
34
|
+
const t = i.anchor, n = g.value;
|
|
35
|
+
if (!p.value || !(t != null && t.isConnected) || !n) return;
|
|
36
|
+
const e = window.visualViewport, l = (e == null ? void 0 : e.offsetLeft) ?? 0, c = (e == null ? void 0 : e.offsetTop) ?? 0, w = (e == null ? void 0 : e.width) ?? (document.documentElement.clientWidth || window.innerWidth), r = (e == null ? void 0 : e.height) ?? (document.documentElement.clientHeight || window.innerHeight), a = l + w, y = c + r, s = 8, u = 8, o = (t.querySelector(".hys-ui-slider-handle") ?? t).getBoundingClientRect();
|
|
37
|
+
let _ = l, W = c, F = a, H = y;
|
|
38
|
+
for (const { element: v, x: G, y: I } of L) {
|
|
39
|
+
const b = v.getBoundingClientRect();
|
|
40
|
+
G && (_ = Math.max(_, b.left + v.clientLeft), F = Math.min(
|
|
41
|
+
F,
|
|
42
|
+
b.left + v.clientLeft + (v.clientWidth || b.width)
|
|
43
|
+
)), I && (W = Math.max(W, b.top + v.clientTop), H = Math.min(
|
|
44
|
+
H,
|
|
45
|
+
b.top + v.clientTop + (v.clientHeight || b.height)
|
|
46
|
+
));
|
|
47
|
+
}
|
|
48
|
+
if (!o.width && !o.height || o.right <= _ || o.left >= F || o.bottom <= W || o.top >= H) {
|
|
49
|
+
R.value = { position: "fixed", visibility: "hidden" };
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
n.style.maxWidth = Math.max(1, w - s * 2) + "px";
|
|
53
|
+
const f = z ?? n.getBoundingClientRect(), O = {
|
|
54
|
+
top: o.top - c - u - s,
|
|
55
|
+
bottom: y - o.bottom - u - s,
|
|
56
|
+
left: o.left - l - u - s,
|
|
57
|
+
right: a - o.right - u - s
|
|
58
|
+
}, U = {
|
|
59
|
+
top: "bottom",
|
|
60
|
+
bottom: "top",
|
|
61
|
+
left: "right",
|
|
62
|
+
right: "left"
|
|
63
|
+
};
|
|
64
|
+
let d = i.placement;
|
|
65
|
+
const D = U[d], $ = d === "top" || d === "bottom" ? f.height : f.width;
|
|
66
|
+
O[d] < $ && O[D] > O[d] && (d = D);
|
|
67
|
+
let E = o.left + (o.width - f.width) / 2, M = o.top + (o.height - f.height) / 2;
|
|
68
|
+
d === "top" ? M = o.top - f.height - u : d === "bottom" ? M = o.bottom + u : d === "left" ? E = o.left - f.width - u : E = o.right + u, E = Math.max(l + s, Math.min(E, a - f.width - s)), M = Math.max(c + s, Math.min(M, y - f.height - s)), X.value = d, R.value = {
|
|
69
|
+
...S,
|
|
70
|
+
position: "fixed",
|
|
71
|
+
left: Math.round(E) + "px",
|
|
72
|
+
top: Math.round(M) + "px",
|
|
73
|
+
maxWidth: Math.max(1, w - s * 2) + "px",
|
|
74
|
+
visibility: "visible"
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function m() {
|
|
78
|
+
p.value && h === void 0 && (h = requestAnimationFrame(Y));
|
|
79
|
+
}
|
|
80
|
+
function T() {
|
|
81
|
+
h !== void 0 && cancelAnimationFrame(h), h = void 0, Y();
|
|
82
|
+
}
|
|
83
|
+
function k() {
|
|
84
|
+
z = void 0, B(), m();
|
|
85
|
+
}
|
|
86
|
+
function V() {
|
|
87
|
+
x == null || x(), x = void 0, h !== void 0 && cancelAnimationFrame(h), h = void 0, z = void 0, L = [];
|
|
88
|
+
}
|
|
89
|
+
function j() {
|
|
90
|
+
var c, w;
|
|
91
|
+
if (V(), !p.value || !i.anchor || !g.value) return;
|
|
92
|
+
B(), window.addEventListener("scroll", m, !0), window.addEventListener("resize", k), (c = window.visualViewport) == null || c.addEventListener("scroll", m), (w = window.visualViewport) == null || w.addEventListener("resize", k);
|
|
93
|
+
const t = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver((r) => {
|
|
94
|
+
var a;
|
|
95
|
+
for (const y of r)
|
|
96
|
+
if (y.target === g.value) {
|
|
97
|
+
const s = (a = y.borderBoxSize) == null ? void 0 : a[0];
|
|
98
|
+
z = s ? { width: s.inlineSize, height: s.blockSize } : void 0;
|
|
99
|
+
}
|
|
100
|
+
T();
|
|
101
|
+
});
|
|
102
|
+
t == null || t.observe(i.anchor), t == null || t.observe(g.value), i.container && (t == null || t.observe(i.container));
|
|
103
|
+
const n = () => {
|
|
104
|
+
var r, a;
|
|
105
|
+
return [
|
|
106
|
+
(r = i.container) == null ? void 0 : r.getAttribute("style"),
|
|
107
|
+
(a = i.container) == null ? void 0 : a.getAttribute("class"),
|
|
108
|
+
C.value["data-hys-theme"]
|
|
109
|
+
].join("|");
|
|
110
|
+
};
|
|
111
|
+
let e = n();
|
|
112
|
+
const l = typeof MutationObserver > "u" ? void 0 : new MutationObserver(() => {
|
|
113
|
+
const r = n();
|
|
114
|
+
r !== e && (e = r, B(), m());
|
|
115
|
+
});
|
|
116
|
+
i.container && (l == null || l.observe(i.container, {
|
|
117
|
+
attributes: !0,
|
|
118
|
+
attributeFilter: ["style", "class", "data-hys-theme"]
|
|
119
|
+
})), x = () => {
|
|
120
|
+
var r, a;
|
|
121
|
+
window.removeEventListener("scroll", m, !0), window.removeEventListener("resize", k), (r = window.visualViewport) == null || r.removeEventListener("scroll", m), (a = window.visualViewport) == null || a.removeEventListener("resize", k), t == null || t.disconnect(), l == null || l.disconnect();
|
|
122
|
+
}, m();
|
|
123
|
+
}
|
|
124
|
+
return P(
|
|
125
|
+
() => [i.anchor, i.container, g.value, p.value],
|
|
126
|
+
j,
|
|
127
|
+
{ flush: "post" }
|
|
128
|
+
), P(() => [i.position, i.placement], T, { flush: "post" }), P(
|
|
129
|
+
() => C.value["data-hys-theme"],
|
|
130
|
+
() => {
|
|
131
|
+
B(), T();
|
|
132
|
+
},
|
|
133
|
+
{ flush: "post" }
|
|
134
|
+
), K(() => {
|
|
135
|
+
p.value = !0, Q(j);
|
|
136
|
+
}), Z(() => {
|
|
137
|
+
p.value = !1, V();
|
|
138
|
+
}), ee(V), (t, n) => (N(), te(ie, { to: "body" }, [
|
|
139
|
+
p.value ? (N(), oe("span", ne({
|
|
140
|
+
key: 0,
|
|
141
|
+
id: q.id,
|
|
142
|
+
ref_key: "panel",
|
|
143
|
+
ref: g
|
|
144
|
+
}, le(C), {
|
|
145
|
+
class: ["hys-ui-slider-tooltip", "hys-ui-slider-tooltip-" + X.value],
|
|
146
|
+
role: "tooltip",
|
|
147
|
+
style: R.value
|
|
148
|
+
}), [
|
|
149
|
+
se(t.$slots, "default", {}, void 0, !0)
|
|
150
|
+
], 16, ce)) : re("", !0)
|
|
151
|
+
]));
|
|
152
|
+
}
|
|
153
|
+
});
|
|
154
|
+
export {
|
|
155
|
+
fe as default
|
|
156
|
+
};
|
|
@@ -1,65 +1,71 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import { useHysRootAttrs as
|
|
3
|
-
const R = { class: "hys-ui-ent-split-first" },
|
|
1
|
+
import { defineComponent as g, ref as M, computed as v, watch as z, onDeactivated as B, onBeforeUnmount as P, openBlock as V, createElementBlock as C, mergeProps as D, unref as I, createElementVNode as h, renderSlot as w } from "vue";
|
|
2
|
+
import { useHysRootAttrs as N } from "../../config.js";
|
|
3
|
+
const R = { class: "hys-ui-ent-split-first" }, F = ["tabindex", "aria-disabled", "aria-orientation", "aria-valuenow", "aria-valuemin", "aria-valuemax"], H = { class: "hys-ui-ent-split-second" }, K = /* @__PURE__ */ g({
|
|
4
4
|
__name: "HysSplitPane",
|
|
5
5
|
props: {
|
|
6
6
|
modelValue: { default: 40 },
|
|
7
7
|
min: { default: 15 },
|
|
8
8
|
max: { default: 85 },
|
|
9
9
|
vertical: { type: Boolean, default: !1 },
|
|
10
|
-
disabled: { type: Boolean }
|
|
10
|
+
disabled: { type: Boolean },
|
|
11
|
+
step: { default: 2 }
|
|
11
12
|
},
|
|
12
|
-
emits: ["update:modelValue"],
|
|
13
|
-
setup(
|
|
14
|
-
const
|
|
15
|
-
let
|
|
13
|
+
emits: ["update:modelValue", "resizeStart", "resizeEnd"],
|
|
14
|
+
setup(l, { emit: E }) {
|
|
15
|
+
const a = l, d = E, x = N(), c = M(), s = v(() => Math.max(0, Math.min(100, Number.isFinite(a.min) ? a.min : 0))), m = v(() => Math.max(s.value, Math.min(100, Number.isFinite(a.max) ? a.max : 100))), p = (e) => Math.max(s.value, Math.min(m.value, Number.isFinite(e) ? e : s.value)), u = v(() => p(a.modelValue));
|
|
16
|
+
let r = () => {
|
|
16
17
|
};
|
|
17
|
-
|
|
18
|
-
function
|
|
19
|
-
if (
|
|
20
|
-
const e = n.
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
18
|
+
z(() => [a.disabled, a.vertical, a.min, a.max], () => r()), B(() => r()), P(() => r());
|
|
19
|
+
function L(e) {
|
|
20
|
+
if (r(), !c.value || a.disabled || e.button !== 0) return;
|
|
21
|
+
const t = e.currentTarget, n = c.value.getBoundingClientRect(), f = a.vertical, y = f ? n.height : n.width;
|
|
22
|
+
if (!y) return;
|
|
23
|
+
e.preventDefault(), t.setPointerCapture(e.pointerId), d("resizeStart");
|
|
24
|
+
const b = (o) => {
|
|
25
|
+
if (a.disabled || o.pointerId !== e.pointerId) return;
|
|
26
|
+
const A = (f ? o.clientY - n.top : o.clientX - n.left) / y * 100;
|
|
27
|
+
d("update:modelValue", Math.round(p(A)));
|
|
28
|
+
}, i = () => {
|
|
29
|
+
var o;
|
|
30
|
+
r = () => {
|
|
31
|
+
}, t.removeEventListener("pointermove", b), t.removeEventListener("pointerup", i), t.removeEventListener("pointercancel", i), t.removeEventListener("lostpointercapture", i), (o = t.hasPointerCapture) != null && o.call(t, e.pointerId) && t.releasePointerCapture(e.pointerId), d("resizeEnd", u.value);
|
|
28
32
|
};
|
|
29
|
-
|
|
33
|
+
r = i, t.addEventListener("pointermove", b), t.addEventListener("pointerup", i), t.addEventListener("pointercancel", i), t.addEventListener("lostpointercapture", i);
|
|
30
34
|
}
|
|
31
|
-
function
|
|
32
|
-
if (
|
|
33
|
-
|
|
34
|
-
|
|
35
|
+
function k(e) {
|
|
36
|
+
if (a.disabled || !["ArrowLeft", "ArrowUp", "ArrowRight", "ArrowDown", "Home", "End"].includes(e.key)) return;
|
|
37
|
+
e.preventDefault();
|
|
38
|
+
const t = (Number.isFinite(a.step) && a.step > 0 ? a.step : 2) * (e.shiftKey ? 5 : 1), n = e.key === "Home" ? s.value : e.key === "End" ? m.value : u.value + (["ArrowRight", "ArrowDown"].includes(e.key) ? t : -t);
|
|
39
|
+
d("update:modelValue", p(n));
|
|
35
40
|
}
|
|
36
|
-
return (
|
|
41
|
+
return (e, t) => (V(), C("div", D(I(x), {
|
|
37
42
|
ref_key: "host",
|
|
38
|
-
ref:
|
|
39
|
-
class: ["hys-ui-ent-split", { "hys-ui-vertical":
|
|
40
|
-
style: { "--hys-ui-split":
|
|
43
|
+
ref: c,
|
|
44
|
+
class: ["hys-ui-ent-split", { "hys-ui-vertical": l.vertical }],
|
|
45
|
+
style: { "--hys-ui-split": u.value + "%" }
|
|
41
46
|
}), [
|
|
42
|
-
|
|
43
|
-
|
|
47
|
+
h("div", R, [
|
|
48
|
+
w(e.$slots, "first")
|
|
44
49
|
]),
|
|
45
|
-
|
|
50
|
+
h("div", {
|
|
46
51
|
class: "hys-ui-ent-split-handle",
|
|
47
52
|
role: "separator",
|
|
48
|
-
tabindex:
|
|
53
|
+
tabindex: l.disabled ? -1 : 0,
|
|
49
54
|
"aria-label": "调整面板比例",
|
|
50
|
-
"aria-
|
|
51
|
-
"aria-
|
|
52
|
-
"aria-
|
|
53
|
-
"aria-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
55
|
+
"aria-disabled": l.disabled || void 0,
|
|
56
|
+
"aria-orientation": l.vertical ? "horizontal" : "vertical",
|
|
57
|
+
"aria-valuenow": u.value,
|
|
58
|
+
"aria-valuemin": s.value,
|
|
59
|
+
"aria-valuemax": m.value,
|
|
60
|
+
onPointerdown: L,
|
|
61
|
+
onKeydown: k
|
|
62
|
+
}, null, 40, F),
|
|
63
|
+
h("div", H, [
|
|
64
|
+
w(e.$slots, "second")
|
|
59
65
|
])
|
|
60
66
|
], 16));
|
|
61
67
|
}
|
|
62
68
|
});
|
|
63
69
|
export {
|
|
64
|
-
|
|
70
|
+
K as default
|
|
65
71
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./HysSteps2.vue.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const s = /* @__PURE__ */ t(o, [["__scopeId", "data-v-aee36fc0"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
s as default
|
|
7
7
|
};
|
|
@@ -1,53 +1,128 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
1
|
+
import { defineComponent as H, ref as N, computed as f, openBlock as a, createElementBlock as i, mergeProps as S, unref as m, Fragment as A, renderList as M, normalizeClass as P, createElementVNode as B, renderSlot as y, createBlock as $, createTextVNode as h, toDisplayString as p, createCommentVNode as C } from "vue";
|
|
2
|
+
import { Check as R, CircleAlert as V } from "lucide-vue-next";
|
|
3
|
+
import { useHysRootAttrs as F } from "../../config.js";
|
|
4
|
+
const K = ["aria-label"], U = ["aria-current"], q = {
|
|
5
|
+
class: "hys-ui-step-marker",
|
|
6
|
+
"aria-hidden": "true"
|
|
7
|
+
}, I = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "hys-ui-step-dot"
|
|
10
|
+
}, O = { class: "hys-ui-step-content" }, T = ["data-step-index", "disabled", "tabindex", "onClick", "onKeydown"], j = { key: 1 }, G = {
|
|
11
|
+
key: 2,
|
|
12
|
+
class: "hys-ui-step-subtitle"
|
|
13
|
+
}, J = {
|
|
14
|
+
key: 3,
|
|
15
|
+
class: "hys-ui-step-description"
|
|
16
|
+
}, Y = /* @__PURE__ */ H({
|
|
5
17
|
__name: "HysSteps",
|
|
6
18
|
props: {
|
|
7
19
|
items: {},
|
|
8
|
-
current: {},
|
|
20
|
+
current: { default: 0 },
|
|
9
21
|
vertical: { type: Boolean },
|
|
10
22
|
clickable: { type: Boolean },
|
|
11
|
-
|
|
23
|
+
disabled: { type: Boolean },
|
|
24
|
+
status: { default: "process" },
|
|
25
|
+
size: { default: "md" },
|
|
26
|
+
labelPlacement: { default: "right" },
|
|
27
|
+
progressDot: { type: Boolean },
|
|
28
|
+
simple: { type: Boolean },
|
|
29
|
+
responsive: { type: Boolean, default: !0 },
|
|
30
|
+
ariaLabel: {}
|
|
12
31
|
},
|
|
13
32
|
emits: ["update:current", "change"],
|
|
14
|
-
setup(
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
"
|
|
33
|
+
setup(s, { emit: D }) {
|
|
34
|
+
const u = s, v = D, L = F(), k = N(), b = f(() => u.items.map((e) => typeof e == "string" ? { title: e } : e)), c = f(() => Number.isFinite(u.current) ? Math.max(-1, Math.min(u.items.length, Math.trunc(u.current))) : 0), o = f(() => b.value.map((e, n) => !u.disabled && !e.disabled ? n : -1).filter((e) => e >= 0));
|
|
35
|
+
function r(e) {
|
|
36
|
+
var n;
|
|
37
|
+
return ((n = b.value[e]) == null ? void 0 : n.status) ?? (e < c.value ? "finish" : e === c.value ? u.status : "wait");
|
|
38
|
+
}
|
|
39
|
+
function g(e) {
|
|
40
|
+
!u.clickable || !o.value.includes(e) || e === c.value || (v("update:current", e), v("change", e));
|
|
41
|
+
}
|
|
42
|
+
function E(e, n) {
|
|
43
|
+
var z, w;
|
|
44
|
+
if (!["ArrowLeft", "ArrowRight", "ArrowUp", "ArrowDown", "Home", "End"].includes(e.key) || !o.value.length) return;
|
|
45
|
+
e.preventDefault();
|
|
46
|
+
const l = ["ArrowLeft", "ArrowUp"].includes(e.key) ? -1 : 1, t = o.value.indexOf(n), d = e.key === "Home" ? 0 : e.key === "End" ? o.value.length - 1 : (t + l + o.value.length) % o.value.length;
|
|
47
|
+
(w = (z = k.value) == null ? void 0 : z.querySelector('[data-step-index="' + o.value[d] + '"]')) == null || w.focus(), g(o.value[d]);
|
|
48
|
+
}
|
|
49
|
+
return (e, n) => (a(), i("ol", S({
|
|
50
|
+
ref_key: "root",
|
|
51
|
+
ref: k
|
|
52
|
+
}, m(L), {
|
|
53
|
+
class: ["hys-ui-ex-steps", ["hys-ui-steps-size-" + s.size, { "hys-ui-steps-vertical": s.vertical, "hys-ui-steps-bottom": s.labelPlacement === "bottom", "hys-ui-steps-dots": s.progressDot, "hys-ui-steps-simple": s.simple, "hys-ui-steps-responsive": s.responsive }]],
|
|
54
|
+
"aria-label": s.ariaLabel || "流程进度"
|
|
19
55
|
}), [
|
|
20
|
-
(
|
|
21
|
-
key:
|
|
22
|
-
class:
|
|
23
|
-
"aria-current":
|
|
56
|
+
(a(!0), i(A, null, M(b.value, (l, t) => (a(), i("li", {
|
|
57
|
+
key: t,
|
|
58
|
+
class: P(["hys-ui-step-" + r(t), { "hys-ui-done": r(t) === "finish", "hys-ui-active": r(t) === "process", "hys-ui-step-disabled": s.disabled || l.disabled }]),
|
|
59
|
+
"aria-current": t === c.value ? "step" : void 0
|
|
24
60
|
}, [
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
61
|
+
B("span", q, [
|
|
62
|
+
y(e.$slots, "icon", {
|
|
63
|
+
item: l,
|
|
64
|
+
index: t,
|
|
65
|
+
status: r(t)
|
|
66
|
+
}, () => [
|
|
67
|
+
s.progressDot ? (a(), i("i", I)) : r(t) === "finish" ? (a(), $(m(R), {
|
|
68
|
+
key: 1,
|
|
69
|
+
size: s.size === "sm" ? 12 : 15
|
|
70
|
+
}, null, 8, ["size"])) : r(t) === "error" ? (a(), $(m(V), {
|
|
71
|
+
key: 2,
|
|
72
|
+
size: s.size === "sm" ? 12 : 15
|
|
73
|
+
}, null, 8, ["size"])) : (a(), i(A, { key: 3 }, [
|
|
74
|
+
h(p(t + 1), 1)
|
|
75
|
+
], 64))
|
|
76
|
+
], !0)
|
|
35
77
|
]),
|
|
36
|
-
|
|
37
|
-
|
|
78
|
+
B("div", O, [
|
|
79
|
+
s.clickable ? (a(), i("button", {
|
|
38
80
|
key: 0,
|
|
39
81
|
type: "button",
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
82
|
+
"data-step-index": t,
|
|
83
|
+
disabled: s.disabled || l.disabled,
|
|
84
|
+
tabindex: (o.value.includes(c.value) ? c.value : o.value[0]) === t ? 0 : -1,
|
|
85
|
+
onClick: (d) => g(t),
|
|
86
|
+
onKeydown: (d) => E(d, t)
|
|
87
|
+
}, [
|
|
88
|
+
y(e.$slots, "title", {
|
|
89
|
+
item: l,
|
|
90
|
+
index: t,
|
|
91
|
+
status: r(t)
|
|
92
|
+
}, () => [
|
|
93
|
+
h(p(l.title), 1)
|
|
94
|
+
], !0)
|
|
95
|
+
], 40, T)) : (a(), i("strong", j, [
|
|
96
|
+
y(e.$slots, "title", {
|
|
97
|
+
item: l,
|
|
98
|
+
index: t,
|
|
99
|
+
status: r(t)
|
|
100
|
+
}, () => [
|
|
101
|
+
h(p(l.title), 1)
|
|
102
|
+
], !0)
|
|
103
|
+
])),
|
|
104
|
+
l.subtitle || e.$slots.subtitle ? (a(), i("small", G, [
|
|
105
|
+
y(e.$slots, "subtitle", {
|
|
106
|
+
item: l,
|
|
107
|
+
index: t
|
|
108
|
+
}, () => [
|
|
109
|
+
h(p(l.subtitle), 1)
|
|
110
|
+
], !0)
|
|
111
|
+
])) : C("", !0),
|
|
112
|
+
!s.simple && (l.description || e.$slots.description) ? (a(), i("div", J, [
|
|
113
|
+
y(e.$slots, "description", {
|
|
114
|
+
item: l,
|
|
115
|
+
index: t,
|
|
116
|
+
status: r(t)
|
|
117
|
+
}, () => [
|
|
118
|
+
h(p(l.description), 1)
|
|
119
|
+
], !0)
|
|
120
|
+
])) : C("", !0)
|
|
46
121
|
])
|
|
47
|
-
], 10,
|
|
48
|
-
], 16));
|
|
122
|
+
], 10, U))), 128))
|
|
123
|
+
], 16, K));
|
|
49
124
|
}
|
|
50
125
|
});
|
|
51
126
|
export {
|
|
52
|
-
|
|
127
|
+
Y as default
|
|
53
128
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./HysSwitch2.vue.js";
|
|
2
2
|
/* empty css */
|
|
3
3
|
import t from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
-
const
|
|
4
|
+
const p = /* @__PURE__ */ t(o, [["__scopeId", "data-v-89733ae0"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|