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,232 @@
|
|
|
1
|
+
import { defineComponent as O, ref as B, computed as h, watch as Q, onBeforeUnmount as X, onDeactivated as Y, onActivated as Z, openBlock as u, createElementBlock as f, normalizeStyle as $, normalizeClass as W, createElementVNode as C, Fragment as p, renderList as _, createBlock as F, withModifiers as w, createCommentVNode as A, renderSlot as T, mergeProps as y, createTextVNode as E, toDisplayString as V, createVNode as K, unref as z, nextTick as ee } from "vue";
|
|
2
|
+
import { RotateCw as ae, LoaderCircle as le, ChevronRight as ie, Check as te } from "lucide-vue-next";
|
|
3
|
+
import de from "../HysCheckbox/HysCheckbox.vue.js";
|
|
4
|
+
import oe from "../HysRadio/HysRadio.vue.js";
|
|
5
|
+
const ce = ["data-size", "data-cascader-level", "role", "aria-label", "aria-multiselectable"], se = ["data-cascader-key", "role", "aria-checked", "aria-selected", "aria-disabled", "aria-expanded", "aria-haspopup", "aria-current", "tabindex", "onFocus", "onClick", "onPointerenter", "onKeydown"], ne = ["title"], ue = ["aria-label", "disabled", "onClick"], re = {
|
|
6
|
+
key: 3,
|
|
7
|
+
class: "hys-ui-cascader-expand"
|
|
8
|
+
}, he = ["disabled", "aria-label", "onClick"], xe = /* @__PURE__ */ O({
|
|
9
|
+
__name: "HysCascaderColumn",
|
|
10
|
+
props: {
|
|
11
|
+
rows: {},
|
|
12
|
+
level: {},
|
|
13
|
+
label: {},
|
|
14
|
+
activeKey: {},
|
|
15
|
+
multiple: { type: Boolean },
|
|
16
|
+
strict: { type: Boolean },
|
|
17
|
+
showPrefix: { type: Boolean, default: !0 },
|
|
18
|
+
disabled: { type: Boolean },
|
|
19
|
+
search: { type: Boolean },
|
|
20
|
+
size: {},
|
|
21
|
+
virtual: { type: Boolean },
|
|
22
|
+
itemHeight: { default: 36 },
|
|
23
|
+
listHeight: { default: 256 },
|
|
24
|
+
overscan: { default: 4 },
|
|
25
|
+
columnWidth: { default: 180 },
|
|
26
|
+
context: {},
|
|
27
|
+
hasChildren: {},
|
|
28
|
+
error: {},
|
|
29
|
+
retryText: {},
|
|
30
|
+
expandLabel: {}
|
|
31
|
+
},
|
|
32
|
+
emits: ["choose", "expand", "hover", "keyboard", "scroll", "retry"],
|
|
33
|
+
setup(e, { expose: R, emit: D }) {
|
|
34
|
+
const l = e, s = D, v = B(), m = B(0), H = B(), g = /* @__PURE__ */ new Map(), n = h(
|
|
35
|
+
() => Number.isFinite(l.itemHeight) ? Math.max(24, Math.min(240, l.itemHeight)) : 36
|
|
36
|
+
), b = h(
|
|
37
|
+
() => Number.isFinite(l.listHeight) ? Math.max(80, Math.min(1200, l.listHeight)) : 256
|
|
38
|
+
), N = h(
|
|
39
|
+
() => Number.isFinite(l.overscan) ? Math.max(0, Math.min(30, Math.floor(l.overscan))) : 4
|
|
40
|
+
), P = h(
|
|
41
|
+
() => l.virtual ? Math.max(0, Math.floor(m.value / n.value) - N.value) : 0
|
|
42
|
+
), I = h(
|
|
43
|
+
() => l.virtual ? Math.min(
|
|
44
|
+
l.rows.length,
|
|
45
|
+
Math.ceil((m.value + b.value) / n.value) + N.value
|
|
46
|
+
) : l.rows.length
|
|
47
|
+
), q = h(() => l.rows.slice(P.value, I.value)), L = h(
|
|
48
|
+
() => {
|
|
49
|
+
var t, i;
|
|
50
|
+
return ((t = l.rows.find(
|
|
51
|
+
(a) => a.value === (H.value ?? l.activeKey) && !a.disabled
|
|
52
|
+
)) == null ? void 0 : t.value) ?? ((i = l.rows.find((a) => !a.disabled)) == null ? void 0 : i.value);
|
|
53
|
+
}
|
|
54
|
+
);
|
|
55
|
+
let x = 0, M = 0, k = !0;
|
|
56
|
+
function j(t, i) {
|
|
57
|
+
i instanceof HTMLElement ? g.set(t, i) : g.delete(t);
|
|
58
|
+
}
|
|
59
|
+
function G(t) {
|
|
60
|
+
k && (l.virtual && !x && (x = requestAnimationFrame(() => {
|
|
61
|
+
var i;
|
|
62
|
+
x = 0, m.value = ((i = v.value) == null ? void 0 : i.scrollTop) ?? 0;
|
|
63
|
+
})), s("scroll", t));
|
|
64
|
+
}
|
|
65
|
+
async function J(t) {
|
|
66
|
+
var U;
|
|
67
|
+
const i = t ?? L.value, a = l.rows.findIndex((c) => c.value === i && !c.disabled);
|
|
68
|
+
if (a < 0 || l.disabled || !k) return;
|
|
69
|
+
const d = ++M;
|
|
70
|
+
H.value = i;
|
|
71
|
+
const o = v.value;
|
|
72
|
+
if (!o) return;
|
|
73
|
+
if (l.virtual) {
|
|
74
|
+
const c = a * n.value;
|
|
75
|
+
c < o.scrollTop ? o.scrollTop = c : c + n.value > o.scrollTop + b.value && (o.scrollTop = c + n.value - b.value), m.value = o.scrollTop;
|
|
76
|
+
}
|
|
77
|
+
if ((U = g.get(i)) != null && U.isConnected || await ee(), !k || d !== M || l.disabled) return;
|
|
78
|
+
const r = g.get(i);
|
|
79
|
+
if (r && !l.virtual) {
|
|
80
|
+
const c = r.offsetTop;
|
|
81
|
+
c < o.scrollTop ? o.scrollTop = c : c + r.offsetHeight > o.scrollTop + o.clientHeight && (o.scrollTop = c + r.offsetHeight - o.clientHeight);
|
|
82
|
+
}
|
|
83
|
+
r == null || r.focus({ preventScroll: !0 });
|
|
84
|
+
}
|
|
85
|
+
Q(
|
|
86
|
+
() => l.rows,
|
|
87
|
+
() => {
|
|
88
|
+
if (v.value) {
|
|
89
|
+
const t = Math.max(0, l.rows.length * n.value - b.value);
|
|
90
|
+
m.value > t && (m.value = t, v.value.scrollTop = t);
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
function S() {
|
|
95
|
+
k = !1, M++, cancelAnimationFrame(x), x = 0;
|
|
96
|
+
}
|
|
97
|
+
return X(S), Y(S), Z(() => k = !0), R({ focus: J, element: v }), (t, i) => (u(), f("div", {
|
|
98
|
+
ref_key: "port",
|
|
99
|
+
ref: v,
|
|
100
|
+
class: W(["hys-ui-cascader-column hys-ui-v4-level", {
|
|
101
|
+
"hys-ui-cascader-column-virtual": e.virtual,
|
|
102
|
+
"hys-ui-cascader-results": e.search
|
|
103
|
+
}]),
|
|
104
|
+
"data-size": e.size,
|
|
105
|
+
"data-cascader-level": e.level,
|
|
106
|
+
role: e.search ? "listbox" : "menu",
|
|
107
|
+
"aria-label": e.label,
|
|
108
|
+
"aria-multiselectable": e.search && e.multiple || void 0,
|
|
109
|
+
style: $({
|
|
110
|
+
maxHeight: b.value + "px",
|
|
111
|
+
height: e.virtual ? b.value + "px" : void 0,
|
|
112
|
+
minWidth: e.search ? "0" : typeof e.columnWidth == "number" ? e.columnWidth + "px" : e.columnWidth,
|
|
113
|
+
"--hys-ui-cascader-item-height": n.value + "px"
|
|
114
|
+
}),
|
|
115
|
+
onScroll: G
|
|
116
|
+
}, [
|
|
117
|
+
C("div", {
|
|
118
|
+
class: "hys-ui-cascader-space",
|
|
119
|
+
style: $(e.virtual ? { height: e.rows.length * n.value + "px" } : void 0)
|
|
120
|
+
}, [
|
|
121
|
+
C("div", {
|
|
122
|
+
class: "hys-ui-cascader-rows",
|
|
123
|
+
style: $(
|
|
124
|
+
e.virtual ? {
|
|
125
|
+
position: "absolute",
|
|
126
|
+
top: P.value * n.value + "px",
|
|
127
|
+
insetInline: 0
|
|
128
|
+
} : void 0
|
|
129
|
+
)
|
|
130
|
+
}, [
|
|
131
|
+
(u(!0), f(p, null, _(q.value, (a) => (u(), f("div", {
|
|
132
|
+
key: a.value,
|
|
133
|
+
ref_for: !0,
|
|
134
|
+
ref: (d) => j(a.value, d),
|
|
135
|
+
"data-cascader-key": a.value,
|
|
136
|
+
role: e.search ? "option" : e.multiple ? "menuitemcheckbox" : e.strict ? "menuitemradio" : "menuitem",
|
|
137
|
+
"aria-checked": !e.search && (e.multiple || e.strict) ? e.context(a).indeterminate ? "mixed" : e.context(a).checked : void 0,
|
|
138
|
+
"aria-selected": e.search ? e.context(a).checked : void 0,
|
|
139
|
+
"aria-disabled": e.disabled || a.disabled || void 0,
|
|
140
|
+
"aria-expanded": !e.search && e.hasChildren(a) ? e.context(a).expanded : void 0,
|
|
141
|
+
"aria-haspopup": !e.search && e.hasChildren(a) ? "menu" : void 0,
|
|
142
|
+
"aria-current": !e.search && e.activeKey === a.value ? "true" : void 0,
|
|
143
|
+
tabindex: !e.disabled && !a.disabled && L.value === a.value ? 0 : -1,
|
|
144
|
+
class: W(["hys-ui-cascader-option", {
|
|
145
|
+
"hys-ui-cascader-option-active": e.activeKey === a.value,
|
|
146
|
+
"hys-ui-cascader-option-checked": e.context(a).checked,
|
|
147
|
+
"hys-ui-cascader-option-disabled": a.disabled,
|
|
148
|
+
"hys-ui-cascader-option-fixed": e.virtual
|
|
149
|
+
}]),
|
|
150
|
+
onFocus: (d) => H.value = a.value,
|
|
151
|
+
onClick: (d) => !e.disabled && !a.disabled && s("choose", a, d),
|
|
152
|
+
onPointerenter: (d) => !e.disabled && !a.disabled && s("hover", a),
|
|
153
|
+
onPointerleave: i[2] || (i[2] = (d) => s("hover", null)),
|
|
154
|
+
onKeydown: (d) => s("keyboard", d, a, e.level)
|
|
155
|
+
}, [
|
|
156
|
+
e.multiple && e.showPrefix ? (u(), F(de, {
|
|
157
|
+
key: 0,
|
|
158
|
+
"model-value": e.context(a).checked,
|
|
159
|
+
indeterminate: e.context(a).indeterminate,
|
|
160
|
+
disabled: e.disabled || a.disabled,
|
|
161
|
+
size: e.size,
|
|
162
|
+
tabindex: -1,
|
|
163
|
+
"aria-hidden": "true",
|
|
164
|
+
onClick: i[0] || (i[0] = w(() => {
|
|
165
|
+
}, ["stop"])),
|
|
166
|
+
"onUpdate:modelValue": (d) => s("choose", a, void 0, d === !0)
|
|
167
|
+
}, null, 8, ["model-value", "indeterminate", "disabled", "size", "onUpdate:modelValue"])) : e.strict && e.showPrefix ? (u(), F(oe, {
|
|
168
|
+
key: 1,
|
|
169
|
+
"model-value": e.context(a).checked ? a.value : null,
|
|
170
|
+
value: a.value,
|
|
171
|
+
disabled: e.disabled || a.disabled,
|
|
172
|
+
size: e.size,
|
|
173
|
+
tabindex: -1,
|
|
174
|
+
"aria-hidden": "true",
|
|
175
|
+
onClick: i[1] || (i[1] = w(() => {
|
|
176
|
+
}, ["stop"])),
|
|
177
|
+
"onUpdate:modelValue": (d) => s("choose", a, void 0, !0)
|
|
178
|
+
}, null, 8, ["model-value", "value", "disabled", "size", "onUpdate:modelValue"])) : A("", !0),
|
|
179
|
+
C("span", {
|
|
180
|
+
class: "hys-ui-cascader-option-label",
|
|
181
|
+
title: e.search ? e.context(a).label : a.label
|
|
182
|
+
}, [
|
|
183
|
+
e.search ? T(t.$slots, "suggestion", y({ ref_for: !0 }, e.context(a)), () => [
|
|
184
|
+
E(V(e.context(a).label), 1)
|
|
185
|
+
], !0, 0) : T(t.$slots, "option", y({ ref_for: !0 }, e.context(a)), () => [
|
|
186
|
+
E(V(a.label), 1)
|
|
187
|
+
], !0, 1)
|
|
188
|
+
], 8, ne),
|
|
189
|
+
e.error(a) ? (u(), f("button", {
|
|
190
|
+
key: 2,
|
|
191
|
+
type: "button",
|
|
192
|
+
class: "hys-ui-cascader-expand hys-ui-cascader-retry",
|
|
193
|
+
"aria-label": e.retryText + " " + a.label,
|
|
194
|
+
disabled: e.disabled,
|
|
195
|
+
onClick: w((d) => s("retry", a), ["stop"])
|
|
196
|
+
}, [
|
|
197
|
+
K(z(ae), { size: 14 }),
|
|
198
|
+
C("span", null, V(e.retryText), 1)
|
|
199
|
+
], 8, ue)) : e.context(a).loading ? (u(), f("span", re, [
|
|
200
|
+
T(t.$slots, "loading", y({ ref_for: !0 }, e.context(a)), () => [
|
|
201
|
+
K(z(le), {
|
|
202
|
+
size: 15,
|
|
203
|
+
class: "hys-ui-icon-spin"
|
|
204
|
+
})
|
|
205
|
+
], !0)
|
|
206
|
+
])) : !e.search && e.hasChildren(a) ? (u(), f("button", {
|
|
207
|
+
key: 4,
|
|
208
|
+
type: "button",
|
|
209
|
+
class: "hys-ui-cascader-expand",
|
|
210
|
+
tabindex: "-1",
|
|
211
|
+
disabled: e.disabled || a.disabled,
|
|
212
|
+
"aria-label": e.expandLabel(a),
|
|
213
|
+
onClick: w((d) => s("expand", a), ["stop"])
|
|
214
|
+
}, [
|
|
215
|
+
T(t.$slots, "expand-icon", y({ ref_for: !0 }, e.context(a)), () => [
|
|
216
|
+
K(z(ie), { size: 15 })
|
|
217
|
+
], !0)
|
|
218
|
+
], 8, he)) : !e.multiple && !e.strict && e.context(a).checked ? (u(), F(z(te), {
|
|
219
|
+
key: 5,
|
|
220
|
+
size: 15,
|
|
221
|
+
class: "hys-ui-cascader-selected-icon",
|
|
222
|
+
"aria-hidden": "true"
|
|
223
|
+
})) : A("", !0)
|
|
224
|
+
], 42, se))), 128))
|
|
225
|
+
], 4)
|
|
226
|
+
], 4)
|
|
227
|
+
], 46, ce));
|
|
228
|
+
}
|
|
229
|
+
});
|
|
230
|
+
export {
|
|
231
|
+
xe as default
|
|
232
|
+
};
|
|
@@ -1,41 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
props: {
|
|
6
|
-
modelValue: { type: Boolean },
|
|
7
|
-
label: {},
|
|
8
|
-
disabled: { type: Boolean },
|
|
9
|
-
ariaLabel: {},
|
|
10
|
-
readonly: { type: Boolean },
|
|
11
|
-
name: {},
|
|
12
|
-
value: {},
|
|
13
|
-
required: { type: Boolean },
|
|
14
|
-
indeterminate: { type: Boolean }
|
|
15
|
-
},
|
|
16
|
-
emits: ["update:modelValue", "change"],
|
|
17
|
-
setup(e, { emit: i }) {
|
|
18
|
-
const o = k(), a = i;
|
|
19
|
-
return (r, t) => (n(), d("label", c(u(o), { class: "hys-ui-check-label" }), [
|
|
20
|
-
s("input", {
|
|
21
|
-
type: "checkbox",
|
|
22
|
-
name: e.name,
|
|
23
|
-
value: e.value,
|
|
24
|
-
required: e.required,
|
|
25
|
-
"aria-label": e.ariaLabel,
|
|
26
|
-
indeterminate: e.indeterminate,
|
|
27
|
-
"aria-checked": e.indeterminate ? "mixed" : e.modelValue,
|
|
28
|
-
checked: e.modelValue,
|
|
29
|
-
disabled: e.disabled || e.readonly,
|
|
30
|
-
onChange: t[0] || (t[0] = (l) => {
|
|
31
|
-
a("update:modelValue", l.target.checked), a("change", l.target.checked);
|
|
32
|
-
})
|
|
33
|
-
}, null, 40, f),
|
|
34
|
-
e.label ? (n(), d("span", g, b(e.label), 1)) : h("", !0),
|
|
35
|
-
y(r.$slots, "default")
|
|
36
|
-
], 16));
|
|
37
|
-
}
|
|
38
|
-
});
|
|
1
|
+
import o from "./HysCheckbox2.vue.js";
|
|
2
|
+
/* empty css */
|
|
3
|
+
import f from "../../_virtual/_plugin-vue_export-helper.js";
|
|
4
|
+
const m = /* @__PURE__ */ f(o, [["__scopeId", "data-v-a00fdf5f"]]);
|
|
39
5
|
export {
|
|
40
|
-
|
|
6
|
+
m as default
|
|
41
7
|
};
|
|
@@ -1,4 +1,202 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { defineComponent as Z, useAttrs as p, inject as M, ref as _, useId as ee, computed as n, watch as ae, onMounted as te, onActivated as le, onDeactivated as ie, onBeforeUnmount as re, openBlock as V, createElementBlock as g, mergeProps as O, unref as r, createElementVNode as H, normalizeClass as ue, renderSlot as K, createBlock as oe, resolveDynamicComponent as ne, createCommentVNode as z, toDisplayString as R } from "vue";
|
|
2
|
+
import { Minus as de, Check as se } from "lucide-vue-next";
|
|
3
|
+
import { fieldKey as ce, useHysControlState as ve } from "../../composables/formContext.js";
|
|
4
|
+
import { checkboxGroupKey as fe, isChoice as be } from "../../composables/choice.js";
|
|
5
|
+
import { useHysRootAttrs as me } from "../../config.js";
|
|
6
|
+
import { useChoiceModel as ye, useChoiceNativeReset as he } from "../../composables/choiceModel.js";
|
|
7
|
+
const ke = ["data-status", "data-indeterminate"], Ae = ["id", "name", "form", "value", "required", "aria-label", "aria-readonly", "aria-invalid", "aria-describedby", "indeterminate", "aria-checked", "checked", "disabled", "tabindex"], xe = {
|
|
8
|
+
key: 0,
|
|
9
|
+
class: "hys-ui-checkbox-label"
|
|
10
|
+
}, Be = ["id"], qe = /* @__PURE__ */ Z({
|
|
11
|
+
inheritAttrs: !1,
|
|
12
|
+
__name: "HysCheckbox",
|
|
13
|
+
props: {
|
|
14
|
+
modelValue: { default: void 0 },
|
|
15
|
+
defaultValue: { default: void 0 },
|
|
16
|
+
label: {},
|
|
17
|
+
disabled: { type: Boolean },
|
|
18
|
+
ariaLabel: {},
|
|
19
|
+
readonly: { type: Boolean },
|
|
20
|
+
name: {},
|
|
21
|
+
form: {},
|
|
22
|
+
value: { type: [String, Number, Boolean], default: void 0 },
|
|
23
|
+
trueValue: { type: [String, Number, Boolean], default: void 0 },
|
|
24
|
+
falseValue: { type: [String, Number, Boolean], default: void 0 },
|
|
25
|
+
required: { type: Boolean },
|
|
26
|
+
indeterminate: { type: Boolean },
|
|
27
|
+
tabindex: {},
|
|
28
|
+
size: {},
|
|
29
|
+
border: { type: Boolean, default: void 0 },
|
|
30
|
+
button: { type: Boolean, default: void 0 },
|
|
31
|
+
buttonStyle: {},
|
|
32
|
+
autofocus: { type: Boolean },
|
|
33
|
+
focusable: { type: Boolean, default: !0 },
|
|
34
|
+
status: {},
|
|
35
|
+
error: {}
|
|
36
|
+
},
|
|
37
|
+
emits: ["update:modelValue", "change", "focus", "blur"],
|
|
38
|
+
setup(l, { expose: $, emit: I }) {
|
|
39
|
+
const a = l, h = I, k = p(), e = M(fe, void 0), d = M(ce, void 0), F = me(), s = _(), { disabled: G, size: P } = ve(a), x = ye(
|
|
40
|
+
a,
|
|
41
|
+
() => a.defaultValue ?? a.falseValue ?? !1,
|
|
42
|
+
(t, i) => Array.isArray(t) && Array.isArray(i) ? t.length === i.length && t.every((m, u) => m === i[u]) : t === i
|
|
43
|
+
), c = x.current, j = ee(), o = n(
|
|
44
|
+
() => e && a.value !== void 0 ? e.values.value.includes(a.value) : Array.isArray(c.value) ? a.value !== void 0 && c.value.includes(a.value) : c.value === (a.trueValue ?? !0)
|
|
45
|
+
), B = n(() => a.readonly || (e == null ? void 0 : e.readonly.value)), U = n(() => !!a.disabled || !!a.readonly), A = n(
|
|
46
|
+
() => G.value || (e == null ? void 0 : e.disabled.value) || !!(e && a.value !== void 0 && e.isLimited(a.value))
|
|
47
|
+
), S = n(
|
|
48
|
+
() => a.size ?? (e == null ? void 0 : e.size.value) ?? P.value
|
|
49
|
+
), W = n(() => a.button ?? (e == null ? void 0 : e.button.value) ?? !1), J = n(() => a.border ?? (e == null ? void 0 : e.border.value) ?? !1), Q = n(
|
|
50
|
+
() => a.buttonStyle ? a.buttonStyle === "solid" : (e == null ? void 0 : e.solid.value) ?? !1
|
|
51
|
+
), C = n(
|
|
52
|
+
() => {
|
|
53
|
+
var t, i;
|
|
54
|
+
return a.error || a.status === "error" || !e && ((t = d == null ? void 0 : d.invalid) != null && t.value) ? "error" : a.status ?? (e == null ? void 0 : e.status.value) ?? ((i = d == null ? void 0 : d.status) == null ? void 0 : i.value);
|
|
55
|
+
}
|
|
56
|
+
), q = (t) => t === "id" || t === "form" || t === "autofocus" || t.startsWith("aria-"), T = () => Object.fromEntries(Object.entries(k).filter(([t]) => !q(t))), X = () => Object.fromEntries(Object.entries(k).filter(([t]) => q(t)));
|
|
57
|
+
function v() {
|
|
58
|
+
s.value && (s.value.checked = o.value, s.value.indeterminate = !!a.indeterminate);
|
|
59
|
+
}
|
|
60
|
+
async function w(t) {
|
|
61
|
+
if (!x.isLive() || A.value || B.value)
|
|
62
|
+
return v(), !1;
|
|
63
|
+
if (e && a.value !== void 0) {
|
|
64
|
+
if (t === o.value)
|
|
65
|
+
return v(), !1;
|
|
66
|
+
const u = e.toggle(a.value, t);
|
|
67
|
+
h("change", t);
|
|
68
|
+
const y = await u;
|
|
69
|
+
return v(), y;
|
|
70
|
+
}
|
|
71
|
+
const i = Array.isArray(c.value) ? t ? [
|
|
72
|
+
.../* @__PURE__ */ new Set([
|
|
73
|
+
...c.value,
|
|
74
|
+
...a.value === void 0 ? [] : [a.value]
|
|
75
|
+
])
|
|
76
|
+
] : c.value.filter((u) => u !== a.value) : t ? a.trueValue ?? !0 : a.falseValue ?? !1;
|
|
77
|
+
if (Array.isArray(i) && Array.isArray(c.value) && i.length === c.value.length && i.every(
|
|
78
|
+
(u, y) => u === c.value[y]
|
|
79
|
+
) || !Array.isArray(i) && i === c.value)
|
|
80
|
+
return v(), !1;
|
|
81
|
+
const m = await x.commit(
|
|
82
|
+
i,
|
|
83
|
+
(u) => h("update:modelValue", u),
|
|
84
|
+
(u) => h("change", u),
|
|
85
|
+
!0
|
|
86
|
+
);
|
|
87
|
+
return v(), m;
|
|
88
|
+
}
|
|
89
|
+
function Y(t) {
|
|
90
|
+
w(t.target.checked);
|
|
91
|
+
}
|
|
92
|
+
let b;
|
|
93
|
+
function D() {
|
|
94
|
+
e && !b && (b = e.register({
|
|
95
|
+
input: s,
|
|
96
|
+
value: n(() => be(a.value) ? a.value : void 0),
|
|
97
|
+
locked: U,
|
|
98
|
+
disabled: n(() => !!a.disabled)
|
|
99
|
+
}));
|
|
100
|
+
}
|
|
101
|
+
function N() {
|
|
102
|
+
b == null || b(), b = void 0;
|
|
103
|
+
}
|
|
104
|
+
return ae([o, () => a.indeterminate], v, { flush: "post" }), he(
|
|
105
|
+
s,
|
|
106
|
+
x.reset,
|
|
107
|
+
v,
|
|
108
|
+
() => a.form ?? (e == null ? void 0 : e.form.value)
|
|
109
|
+
), te(() => {
|
|
110
|
+
var t;
|
|
111
|
+
v(), D(), a.autofocus && !A.value && ((t = s.value) == null || t.focus());
|
|
112
|
+
}), le(D), ie(N), re(N), $({
|
|
113
|
+
input: s,
|
|
114
|
+
checked: o,
|
|
115
|
+
focus: (t) => {
|
|
116
|
+
var i;
|
|
117
|
+
A.value || (i = s.value) == null || i.focus(t);
|
|
118
|
+
},
|
|
119
|
+
blur: () => {
|
|
120
|
+
var t;
|
|
121
|
+
return (t = s.value) == null ? void 0 : t.blur();
|
|
122
|
+
},
|
|
123
|
+
toggle: () => w(!o.value)
|
|
124
|
+
}), (t, i) => {
|
|
125
|
+
var m, u, y, E, L;
|
|
126
|
+
return V(), g("label", O({ ...r(F), ...T() }, {
|
|
127
|
+
class: ["hys-ui-check-label", [
|
|
128
|
+
"hys-ui-checkbox-" + S.value,
|
|
129
|
+
{
|
|
130
|
+
"hys-ui-checkbox-disabled": A.value,
|
|
131
|
+
"hys-ui-checkbox-readonly": B.value,
|
|
132
|
+
"hys-ui-checkbox-bordered": J.value,
|
|
133
|
+
"hys-ui-checkbox-button": W.value,
|
|
134
|
+
"hys-ui-checkbox-solid": Q.value,
|
|
135
|
+
"hys-ui-checkbox-selected": o.value || l.indeterminate,
|
|
136
|
+
"hys-ui-checkbox-error": C.value === "error"
|
|
137
|
+
}
|
|
138
|
+
]],
|
|
139
|
+
"data-status": C.value,
|
|
140
|
+
"data-indeterminate": l.indeterminate || void 0,
|
|
141
|
+
onMousedown: i[3] || (i[3] = (f) => !l.focusable && f.preventDefault())
|
|
142
|
+
}), [
|
|
143
|
+
H("input", O({
|
|
144
|
+
ref_key: "input",
|
|
145
|
+
ref: s
|
|
146
|
+
}, X(), {
|
|
147
|
+
class: "hys-ui-checkbox-native",
|
|
148
|
+
type: "checkbox",
|
|
149
|
+
id: r(k).id || (r(e) || (m = r(d)) == null ? void 0 : m.id.value),
|
|
150
|
+
"data-hys-ui-field-managed": "",
|
|
151
|
+
name: r(e) ? void 0 : l.name,
|
|
152
|
+
form: l.form || ((u = r(e)) == null ? void 0 : u.form.value),
|
|
153
|
+
value: l.value === void 0 ? l.trueValue === void 0 ? "on" : String(l.trueValue) : String(l.value),
|
|
154
|
+
required: r(e) ? void 0 : l.required || ((y = r(d)) == null ? void 0 : y.required.value),
|
|
155
|
+
"aria-label": l.ariaLabel || r(k)["aria-label"] || l.label || (!l.label && !t.$slots.default && !r(e) ? (E = r(d)) == null ? void 0 : E.label.value : void 0),
|
|
156
|
+
"aria-readonly": B.value || void 0,
|
|
157
|
+
"aria-invalid": C.value === "error" || void 0,
|
|
158
|
+
"aria-describedby": [
|
|
159
|
+
r(k)["aria-describedby"],
|
|
160
|
+
l.error ? r(j) : void 0,
|
|
161
|
+
r(e) || (L = r(d)) == null ? void 0 : L.describedBy.value
|
|
162
|
+
].filter(Boolean).join(" ") || void 0,
|
|
163
|
+
indeterminate: l.indeterminate,
|
|
164
|
+
"aria-checked": l.indeterminate ? "mixed" : o.value,
|
|
165
|
+
checked: o.value,
|
|
166
|
+
disabled: A.value,
|
|
167
|
+
tabindex: l.focusable ? l.tabindex : -1,
|
|
168
|
+
onClick: i[0] || (i[0] = (f) => B.value && f.preventDefault()),
|
|
169
|
+
onChange: Y,
|
|
170
|
+
onFocus: i[1] || (i[1] = (f) => h("focus", f)),
|
|
171
|
+
onBlur: i[2] || (i[2] = (f) => h("blur", f))
|
|
172
|
+
}), null, 16, Ae),
|
|
173
|
+
H("span", {
|
|
174
|
+
class: ue(["hys-ui-checkbox-box", { "hys-ui-checkbox-checked": o.value || l.indeterminate }]),
|
|
175
|
+
"aria-hidden": "true"
|
|
176
|
+
}, [
|
|
177
|
+
K(t.$slots, "icon", {
|
|
178
|
+
checked: o.value,
|
|
179
|
+
indeterminate: l.indeterminate
|
|
180
|
+
}, () => [
|
|
181
|
+
o.value || l.indeterminate ? (V(), oe(ne(l.indeterminate ? r(de) : r(se)), {
|
|
182
|
+
key: 0,
|
|
183
|
+
size: S.value === "sm" ? 11 : S.value === "lg" ? 15 : 13,
|
|
184
|
+
"stroke-width": 2.4
|
|
185
|
+
}, null, 8, ["size"])) : z("", !0)
|
|
186
|
+
], !0)
|
|
187
|
+
], 2),
|
|
188
|
+
l.label ? (V(), g("span", xe, R(l.label), 1)) : z("", !0),
|
|
189
|
+
K(t.$slots, "default", {}, void 0, !0),
|
|
190
|
+
l.error ? (V(), g("small", {
|
|
191
|
+
key: 1,
|
|
192
|
+
id: r(j),
|
|
193
|
+
class: "hys-ui-checkbox-error-text",
|
|
194
|
+
role: "alert"
|
|
195
|
+
}, R(l.error), 9, Be)) : z("", !0)
|
|
196
|
+
], 16, ke);
|
|
197
|
+
};
|
|
198
|
+
}
|
|
199
|
+
});
|
|
2
200
|
export {
|
|
3
|
-
|
|
201
|
+
qe as default
|
|
4
202
|
};
|