hys-ui 0.1.1 → 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 +111 -0
- package/README.md +3 -1
- package/dist/components/HysAccordion/HysAccordion.vue.js +1 -1
- package/dist/components/HysAccordion/HysAccordion2.vue.js +181 -47
- 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 -27
- 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 -92
- package/dist/components/HysCalendar/HysCalendar2.vue.js +803 -2
- package/dist/components/HysCard/HysCard.vue.js +2 -2
- package/dist/components/HysCard/HysCard2.vue.js +175 -42
- package/dist/components/HysCascader/HysCascader.vue.js +5 -194
- 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 +3 -3
- package/dist/components/HysCheckbox/HysCheckbox2.vue.js +180 -65
- 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/HysDataGrid/HysDataGrid.vue.js +1 -1
- package/dist/components/HysDataGrid/HysDataGrid2.vue.js +399 -392
- 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/HysFileManager/HysFileManager.vue.js +3 -3
- package/dist/components/HysFileManager/HysFileManager2.vue.js +43 -42
- package/dist/components/HysForm/HysForm.vue.js +3 -3
- package/dist/components/HysForm/HysForm2.vue.js +578 -92
- package/dist/components/HysFormItem/HysFormItem.vue.js +5 -85
- package/dist/components/HysFormItem/HysFormItem2.vue.js +521 -2
- package/dist/components/HysGantt/HysGantt.vue.js +1 -1
- package/dist/components/HysGantt/HysGantt2.vue.js +1369 -272
- package/dist/components/HysInput/HysInput.vue.js +2 -2
- package/dist/components/HysInput/HysInput2.vue.js +467 -120
- package/dist/components/HysMention/HysMention.vue.js +2 -2
- package/dist/components/HysMention/HysMention2.vue.js +89 -88
- package/dist/components/HysNumberInput/HysNumberInput.vue.js +2 -2
- package/dist/components/HysNumberInput/HysNumberInput2.vue.js +561 -79
- package/dist/components/HysOrgTree/HysOrgTree.vue.js +29 -26
- package/dist/components/HysPagination/HysPagination.vue.js +1 -1
- package/dist/components/HysPagination/HysPagination2.vue.js +2 -0
- package/dist/components/HysPermissionMatrix/HysPermissionMatrix.vue.js +2 -2
- package/dist/components/HysPermissionMatrix/HysPermissionMatrix2.vue.js +52 -51
- 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 +2 -2
- package/dist/components/HysRadioGroup/HysRadioGroup2.vue.js +190 -65
- package/dist/components/HysRating/HysRating.vue.js +1 -1
- package/dist/components/HysRating/HysRating2.vue.js +288 -68
- package/dist/components/HysRichTextEditor/HysRichTextEditor.vue.js +1 -1
- package/dist/components/HysRichTextEditor/HysRichTextEditor2.vue.js +70 -69
- package/dist/components/HysSearch/HysSearch.vue.js +37 -36
- package/dist/components/HysSegmented/HysSegmented.vue.js +5 -63
- 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 -185
- 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/HysSteps/HysSteps.vue.js +1 -1
- package/dist/components/HysSteps/HysSteps2.vue.js +110 -36
- package/dist/components/HysSwitch/HysSwitch.vue.js +2 -2
- package/dist/components/HysSwitch/HysSwitch2.vue.js +232 -50
- package/dist/components/HysTable/HysTable.vue.js +2 -2
- package/dist/components/HysTable/HysTable2.vue.js +1473 -88
- 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 -68
- package/dist/components/HysTagInput/HysTagInput.vue.js +43 -42
- package/dist/components/HysTextarea/HysTextarea.vue.js +138 -77
- package/dist/components/HysTransfer/HysTransfer.vue.js +5 -223
- 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 -302
- package/dist/components/HysTreeSelect/HysTreeSelect.vue.js +5 -136
- 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 +77 -76
- 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 +92 -7
- 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/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/useFloating.js +97 -51
- package/dist/composables/useGanttDependencies.js +306 -0
- package/dist/composables/useGanttHistory.js +157 -0
- package/dist/composables/useGanttLabelResize.js +100 -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/index.js +149 -139
- 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 -31
- package/dist/types/components/HysCard/HysCard.vue.d.ts +55 -7
- 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 +50 -39
- 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/HysFileManager/HysFileManager.vue.d.ts +2 -2
- 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 +82 -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 -35
- package/dist/types/components/HysOrgTree/HysOrgTree.vue.d.ts +1 -0
- package/dist/types/components/HysPagination/HysPagination.vue.d.ts +1 -1
- package/dist/types/components/HysPermissionMatrix/HysPermissionMatrix.vue.d.ts +2 -2
- 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 +34 -12
- package/dist/types/components/HysRating/HysRating.vue.d.ts +85 -5
- 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 -20
- 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 +1 -1
- package/dist/types/components/HysSteps/HysSteps.vue.d.ts +64 -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 +3 -3
- package/dist/types/components/HysTour/HysTour.vue.d.ts +2 -2
- package/dist/types/components/HysTransfer/HysTransfer.vue.d.ts +55 -40
- 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 +133 -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/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/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 +33 -7
- package/package.json +2 -1
|
@@ -1,44 +1,171 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
const
|
|
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(
|
|
18
|
-
const
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
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", {
|
|
27
106
|
key: 0,
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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)
|
|
31
117
|
}, [
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
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))
|
|
39
166
|
], 16));
|
|
40
167
|
}
|
|
41
168
|
});
|
|
42
169
|
export {
|
|
43
|
-
|
|
170
|
+
p as default
|
|
44
171
|
};
|
|
@@ -1,40 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
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
|
-
|
|
6
|
+
c as default
|
|
40
7
|
};
|
|
@@ -1,4 +1,76 @@
|
|
|
1
|
-
import
|
|
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
|
-
|
|
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
|
|
4
|
+
const m = /* @__PURE__ */ t(o, [["__scopeId", "data-v-646a4efb"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
m as default
|
|
7
7
|
};
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import { defineComponent as
|
|
2
|
-
import {
|
|
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
|
-
},
|
|
8
|
+
}, N = {
|
|
8
9
|
key: 1,
|
|
9
10
|
class: "hys-ui-button-icon"
|
|
10
|
-
},
|
|
11
|
+
}, R = {
|
|
11
12
|
key: 2,
|
|
12
13
|
class: "hys-ui-button-icon"
|
|
13
|
-
},
|
|
14
|
+
}, q = /* @__PURE__ */ $({
|
|
14
15
|
__name: "HysButton",
|
|
15
16
|
props: {
|
|
16
17
|
variant: { default: "primary" },
|
|
17
|
-
size: {
|
|
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:
|
|
39
|
-
const n = e,
|
|
40
|
-
function
|
|
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
|
-
|
|
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,
|
|
54
|
+
} }), (t, T) => (i(), u(r(e.href ? "a" : "button"), P({
|
|
54
55
|
ref_key: "element",
|
|
55
56
|
ref: l
|
|
56
|
-
},
|
|
57
|
-
class: ["hys-ui-btn", ["hys-ui-btn-" +
|
|
58
|
-
style: { "--hys-ui-button-color":
|
|
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:
|
|
71
|
+
onClick: C
|
|
71
72
|
}), {
|
|
72
|
-
default:
|
|
73
|
-
e.loading ? (
|
|
74
|
-
|
|
75
|
-
|
|
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" ? (
|
|
82
|
-
|
|
83
|
-
(
|
|
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
|
-
|
|
90
|
-
!e.loading && (e.icon || t.$slots.icon) && e.iconPosition === "right" ? (
|
|
91
|
-
|
|
92
|
-
(
|
|
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
|
-
|
|
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
|
-
|
|
106
|
+
q as default
|
|
106
107
|
};
|
|
@@ -1,94 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
import
|
|
4
|
-
const
|
|
5
|
-
__name: "HysCalendar",
|
|
6
|
-
props: {
|
|
7
|
-
modelValue: {},
|
|
8
|
-
events: {},
|
|
9
|
-
disabled: { type: Boolean },
|
|
10
|
-
readonly: { type: Boolean },
|
|
11
|
-
disabledDate: { type: Function }
|
|
12
|
-
},
|
|
13
|
-
emits: ["update:modelValue", "select", "event"],
|
|
14
|
-
setup(a, { emit: V }) {
|
|
15
|
-
const S = Y(), N = a, y = V, g = /* @__PURE__ */ new Date(), l = k(g.getFullYear()), o = k(g.getMonth());
|
|
16
|
-
T(() => N.modelValue, (n) => {
|
|
17
|
-
if (!n || !/^\d{4}-\d{2}-\d{2}$/.test(n)) return;
|
|
18
|
-
const t = /* @__PURE__ */ new Date(n + "T00:00:00Z");
|
|
19
|
-
!Number.isNaN(t.getTime()) && t.toISOString().slice(0, 10) === n && (l.value = t.getUTCFullYear(), o.value = t.getUTCMonth());
|
|
20
|
-
}, { immediate: !0 });
|
|
21
|
-
const p = $(() => `${l.value}年${o.value + 1}月`), w = $(() => {
|
|
22
|
-
const n = (new Date(l.value, o.value, 1).getDay() + 6) % 7, t = new Date(l.value, o.value + 1, 0).getDate();
|
|
23
|
-
return [...Array(n).fill(null), ...Array.from({ length: t }, (e, m) => m + 1)];
|
|
24
|
-
});
|
|
25
|
-
function f(n) {
|
|
26
|
-
const t = new Date(l.value, o.value + n, 1);
|
|
27
|
-
l.value = t.getFullYear(), o.value = t.getMonth();
|
|
28
|
-
}
|
|
29
|
-
function s(n) {
|
|
30
|
-
return `${l.value}-${String(o.value + 1).padStart(2, "0")}-${String(n).padStart(2, "0")}`;
|
|
31
|
-
}
|
|
32
|
-
return (n, t) => (r(), i("section", A(v(S), { class: "hys-ui-ent-panel" }), [
|
|
33
|
-
d("header", E, [
|
|
34
|
-
d("button", {
|
|
35
|
-
type: "button",
|
|
36
|
-
"aria-label": "上个月",
|
|
37
|
-
onClick: t[0] || (t[0] = (e) => f(-1))
|
|
38
|
-
}, [
|
|
39
|
-
D(v(x), {
|
|
40
|
-
size: 16,
|
|
41
|
-
"aria-hidden": "true"
|
|
42
|
-
})
|
|
43
|
-
]),
|
|
44
|
-
d("strong", null, c(p.value), 1),
|
|
45
|
-
d("button", {
|
|
46
|
-
type: "button",
|
|
47
|
-
"aria-label": "下个月",
|
|
48
|
-
onClick: t[1] || (t[1] = (e) => f(1))
|
|
49
|
-
}, [
|
|
50
|
-
D(v(z), {
|
|
51
|
-
size: 16,
|
|
52
|
-
"aria-hidden": "true"
|
|
53
|
-
})
|
|
54
|
-
])
|
|
55
|
-
]),
|
|
56
|
-
d("div", H, [
|
|
57
|
-
(r(), i(b, null, h(["一", "二", "三", "四", "五", "六", "日"], (e) => d("strong", { key: e }, c(e), 1)), 64)),
|
|
58
|
-
(r(!0), i(b, null, h(w.value, (e, m) => {
|
|
59
|
-
var C;
|
|
60
|
-
return r(), i("div", {
|
|
61
|
-
key: m,
|
|
62
|
-
class: "hys-ui-ent-calendar-day"
|
|
63
|
-
}, [
|
|
64
|
-
e ? (r(), i("button", {
|
|
65
|
-
key: 0,
|
|
66
|
-
type: "button",
|
|
67
|
-
disabled: a.disabled || ((C = a.disabledDate) == null ? void 0 : C.call(a, s(e))),
|
|
68
|
-
"aria-readonly": a.readonly || void 0,
|
|
69
|
-
"aria-pressed": a.modelValue === s(e),
|
|
70
|
-
onClick: (u) => !a.readonly && (y("select", s(e)), y("update:modelValue", s(e)))
|
|
71
|
-
}, [
|
|
72
|
-
B(n.$slots, "date", {
|
|
73
|
-
date: s(e),
|
|
74
|
-
day: e
|
|
75
|
-
}, () => [
|
|
76
|
-
M(c(e), 1)
|
|
77
|
-
])
|
|
78
|
-
], 8, L)) : R("", !0),
|
|
79
|
-
(r(!0), i(b, null, h((a.events || []).filter((u) => e && u.date === s(e)), (u) => (r(), i("button", {
|
|
80
|
-
type: "button",
|
|
81
|
-
key: u.id,
|
|
82
|
-
class: "hys-ui-ent-event",
|
|
83
|
-
disabled: a.disabled,
|
|
84
|
-
onClick: (I) => y("event", u.id)
|
|
85
|
-
}, c(u.title), 9, U))), 128))
|
|
86
|
-
]);
|
|
87
|
-
}), 128))
|
|
88
|
-
])
|
|
89
|
-
], 16));
|
|
90
|
-
}
|
|
91
|
-
});
|
|
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"]]);
|
|
92
5
|
export {
|
|
93
|
-
|
|
6
|
+
m as default
|
|
94
7
|
};
|