@itguy614/clean-ui 1.2.1 → 1.3.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/README.md +12 -0
- package/dist/clean-ui.css +1 -1
- package/dist/components/CuiAccordion.vue.js +2 -2
- package/dist/components/CuiAlert.vue.d.ts +3 -5
- package/dist/components/CuiAlert.vue.d.ts.map +1 -1
- package/dist/components/CuiAlert.vue.js +1 -1
- package/dist/components/CuiAlert.vue2.js +54 -50
- package/dist/components/CuiBadge.vue.js +3 -3
- package/dist/components/CuiBadge.vue2.js +23 -23
- package/dist/components/CuiBanner.vue.d.ts +15 -10
- package/dist/components/CuiBanner.vue.d.ts.map +1 -1
- package/dist/components/CuiBanner.vue.js +5 -80
- package/dist/components/CuiBanner.vue2.js +90 -2
- package/dist/components/CuiButton.vue.d.ts +9 -0
- package/dist/components/CuiButton.vue.d.ts.map +1 -1
- package/dist/components/CuiButton.vue.js +1 -1
- package/dist/components/CuiButton.vue2.js +77 -83
- package/dist/components/CuiButtonGroup.vue.d.ts +4 -2
- package/dist/components/CuiButtonGroup.vue.d.ts.map +1 -1
- package/dist/components/CuiButtonGroup.vue.js +1 -1
- package/dist/components/CuiButtonGroup.vue2.js +18 -9
- package/dist/components/CuiCard.vue.d.ts.map +1 -1
- package/dist/components/CuiCard.vue.js +5 -33
- package/dist/components/CuiCard.vue2.js +32 -2
- package/dist/components/CuiCardBody.vue.d.ts.map +1 -1
- package/dist/components/CuiCardBody.vue.js +5 -18
- package/dist/components/CuiCardBody.vue2.js +18 -2
- package/dist/components/CuiCardFooter.vue.d.ts.map +1 -1
- package/dist/components/CuiCardFooter.vue.js +5 -30
- package/dist/components/CuiCardFooter.vue2.js +25 -2
- package/dist/components/CuiCardHeader.vue.d.ts +5 -4
- package/dist/components/CuiCardHeader.vue.d.ts.map +1 -1
- package/dist/components/CuiCardHeader.vue.js +5 -49
- package/dist/components/CuiCardHeader.vue2.js +40 -2
- package/dist/components/CuiCardMedia.vue.d.ts.map +1 -1
- package/dist/components/CuiCardMedia.vue.js +3 -3
- package/dist/components/CuiCardMedia.vue2.js +6 -6
- package/dist/components/CuiCheckbox.vue.d.ts +2 -2
- package/dist/components/CuiCheckbox.vue.d.ts.map +1 -1
- package/dist/components/CuiCheckbox.vue.js +1 -1
- package/dist/components/CuiCheckbox.vue2.js +46 -34
- package/dist/components/CuiCheckboxGroup.vue.d.ts +2 -2
- package/dist/components/CuiCheckboxGroup.vue.d.ts.map +1 -1
- package/dist/components/CuiCheckboxGroup.vue.js +2 -2
- package/dist/components/CuiCheckboxGroup.vue2.js +45 -35
- package/dist/components/CuiCodeBlock.vue.d.ts.map +1 -1
- package/dist/components/CuiCodeBlock.vue.js +14 -11
- package/dist/components/CuiColorPicker.vue.d.ts +2 -2
- package/dist/components/CuiColorPicker.vue.d.ts.map +1 -1
- package/dist/components/CuiColorPicker.vue.js +117 -104
- package/dist/components/CuiCombobox.vue.d.ts +2 -2
- package/dist/components/CuiCombobox.vue.d.ts.map +1 -1
- package/dist/components/CuiCombobox.vue.js +5 -330
- package/dist/components/CuiCombobox.vue2.js +331 -2
- package/dist/components/CuiConfirmDialog.vue.d.ts +5 -4
- package/dist/components/CuiConfirmDialog.vue.d.ts.map +1 -1
- package/dist/components/CuiConfirmDialog.vue.js +84 -73
- package/dist/components/CuiContextMenu.vue.d.ts +40 -1
- package/dist/components/CuiContextMenu.vue.d.ts.map +1 -1
- package/dist/components/CuiContextMenu.vue.js +1 -1
- package/dist/components/CuiContextMenu.vue2.js +149 -91
- package/dist/components/CuiCopyButton.vue.d.ts.map +1 -1
- package/dist/components/CuiCopyButton.vue.js +5 -61
- package/dist/components/CuiCopyButton.vue2.js +68 -2
- package/dist/components/CuiDataGridCardView.vue.d.ts.map +1 -1
- package/dist/components/CuiDataGridCardView.vue.js +10 -9
- package/dist/components/CuiDataGridColumnManager.vue.d.ts.map +1 -1
- package/dist/components/CuiDataGridColumnManager.vue.js +12 -11
- package/dist/components/CuiDataGridPagination.vue.d.ts.map +1 -1
- package/dist/components/CuiDataGridPagination.vue.js +9 -8
- package/dist/components/CuiDataGridSearch.vue.d.ts.map +1 -1
- package/dist/components/CuiDataGridSearch.vue.js +12 -9
- package/dist/components/CuiDataGridTable.vue.d.ts.map +1 -1
- package/dist/components/CuiDataGridTable.vue.js +1 -0
- package/dist/components/CuiDataGridViewManager.vue.d.ts.map +1 -1
- package/dist/components/CuiDataGridViewManager.vue.js +17 -17
- package/dist/components/CuiDatePicker.vue.d.ts +2 -2
- package/dist/components/CuiDatePicker.vue.d.ts.map +1 -1
- package/dist/components/CuiDatePicker.vue.js +257 -173
- package/dist/components/CuiDateRangePicker.vue.d.ts +2 -2
- package/dist/components/CuiDateRangePicker.vue.d.ts.map +1 -1
- package/dist/components/CuiDateRangePicker.vue.js +262 -179
- package/dist/components/CuiDivider.vue.d.ts.map +1 -1
- package/dist/components/CuiDivider.vue.js +17 -13
- package/dist/components/CuiDropdownMenu.vue.js +2 -2
- package/dist/components/CuiDropdownRadioGroup.vue.d.ts +4 -1
- package/dist/components/CuiDropdownRadioGroup.vue.d.ts.map +1 -1
- package/dist/components/CuiDropdownRadioGroup.vue.js +27 -14
- package/dist/components/CuiDropdownSub.vue.js +2 -2
- package/dist/components/CuiEmptyState.vue.d.ts +5 -4
- package/dist/components/CuiEmptyState.vue.d.ts.map +1 -1
- package/dist/components/CuiEmptyState.vue.js +1 -1
- package/dist/components/CuiEmptyState.vue2.js +30 -24
- package/dist/components/CuiFieldset.vue.d.ts.map +1 -1
- package/dist/components/CuiFieldset.vue.js +1 -1
- package/dist/components/CuiFieldset.vue2.js +21 -21
- package/dist/components/CuiFileUpload.vue.d.ts +2 -2
- package/dist/components/CuiFileUpload.vue.d.ts.map +1 -1
- package/dist/components/CuiFileUpload.vue.js +70 -57
- package/dist/components/CuiFormField.vue.d.ts.map +1 -1
- package/dist/components/CuiFormField.vue.js +2 -2
- package/dist/components/CuiFormField.vue2.js +48 -42
- package/dist/components/CuiInput.vue.d.ts +2 -2
- package/dist/components/CuiInput.vue.d.ts.map +1 -1
- package/dist/components/CuiInput.vue.js +1 -1
- package/dist/components/CuiInput.vue2.js +97 -85
- package/dist/components/CuiInputStepper.vue.d.ts +2 -2
- package/dist/components/CuiInputStepper.vue.d.ts.map +1 -1
- package/dist/components/CuiInputStepper.vue.js +5 -187
- package/dist/components/CuiInputStepper.vue2.js +237 -2
- package/dist/components/CuiKbd.vue.d.ts.map +1 -1
- package/dist/components/CuiKbd.vue.js +6 -5
- package/dist/components/CuiMaskedInput.vue.d.ts +9 -3
- package/dist/components/CuiMaskedInput.vue.d.ts.map +1 -1
- package/dist/components/CuiMaskedInput.vue.js +132 -117
- package/dist/components/CuiModal.vue.d.ts +10 -2
- package/dist/components/CuiModal.vue.d.ts.map +1 -1
- package/dist/components/CuiModal.vue.js +2 -2
- package/dist/components/CuiModal.vue2.js +48 -44
- package/dist/components/CuiModalBody.vue.d.ts.map +1 -1
- package/dist/components/CuiModalBody.vue.js +16 -13
- package/dist/components/CuiModalFooter.vue.d.ts.map +1 -1
- package/dist/components/CuiModalFooter.vue.js +3 -2
- package/dist/components/CuiModalHeader.vue.d.ts +13 -4
- package/dist/components/CuiModalHeader.vue.d.ts.map +1 -1
- package/dist/components/CuiModalHeader.vue.js +54 -42
- package/dist/components/CuiPagination.vue.js +2 -2
- package/dist/components/CuiPopover.vue.d.ts.map +1 -1
- package/dist/components/CuiPopover.vue.js +81 -76
- package/dist/components/CuiRadio.vue.d.ts +2 -4
- package/dist/components/CuiRadio.vue.d.ts.map +1 -1
- package/dist/components/CuiRadio.vue.js +2 -2
- package/dist/components/CuiRadio.vue2.js +88 -74
- package/dist/components/CuiRadioGroup.vue.d.ts +2 -2
- package/dist/components/CuiRadioGroup.vue.d.ts.map +1 -1
- package/dist/components/CuiRadioGroup.vue.js +3 -3
- package/dist/components/CuiRadioGroup.vue2.js +47 -37
- package/dist/components/CuiRating.vue.d.ts.map +1 -1
- package/dist/components/CuiRating.vue.js +15 -14
- package/dist/components/CuiResizablePanels.vue.d.ts.map +1 -1
- package/dist/components/CuiResizablePanels.vue.js +10 -9
- package/dist/components/CuiSelect.vue.d.ts +2 -2
- package/dist/components/CuiSelect.vue.d.ts.map +1 -1
- package/dist/components/CuiSelect.vue.js +2 -2
- package/dist/components/CuiSelect.vue2.js +161 -151
- package/dist/components/CuiSkeleton.vue.js +2 -2
- package/dist/components/CuiSkeleton.vue2.js +10 -10
- package/dist/components/CuiSlideover.vue.d.ts +2 -2
- package/dist/components/CuiSlideover.vue.d.ts.map +1 -1
- package/dist/components/CuiSlideover.vue.js +34 -30
- package/dist/components/CuiSlider.vue.d.ts +2 -2
- package/dist/components/CuiSlider.vue.d.ts.map +1 -1
- package/dist/components/CuiSlider.vue.js +67 -54
- package/dist/components/CuiSpinner.vue.d.ts.map +1 -1
- package/dist/components/CuiSpinner.vue.js +5 -4
- package/dist/components/CuiTable.vue.d.ts.map +1 -1
- package/dist/components/CuiTable.vue.js +4 -1
- package/dist/components/CuiTableBody.vue.d.ts.map +1 -1
- package/dist/components/CuiTableBody.vue.js +6 -6
- package/dist/components/CuiTableCell.vue.d.ts.map +1 -1
- package/dist/components/CuiTableCell.vue.js +11 -10
- package/dist/components/CuiTableFoot.vue.d.ts.map +1 -1
- package/dist/components/CuiTableFoot.vue.js +7 -7
- package/dist/components/CuiTableHead.vue.d.ts.map +1 -1
- package/dist/components/CuiTableHead.vue.js +7 -7
- package/dist/components/CuiTabs.vue.d.ts.map +1 -1
- package/dist/components/CuiTabs.vue.js +1 -1
- package/dist/components/CuiTabs.vue2.js +1 -0
- package/dist/components/CuiTagInput.vue.d.ts +2 -2
- package/dist/components/CuiTagInput.vue.d.ts.map +1 -1
- package/dist/components/CuiTagInput.vue.js +5 -294
- package/dist/components/CuiTagInput.vue2.js +277 -2
- package/dist/components/CuiTextarea.vue.d.ts +2 -2
- package/dist/components/CuiTextarea.vue.d.ts.map +1 -1
- package/dist/components/CuiTextarea.vue.js +4 -4
- package/dist/components/CuiTextarea.vue2.js +73 -59
- package/dist/components/CuiTimePicker.vue.d.ts +2 -2
- package/dist/components/CuiTimePicker.vue.d.ts.map +1 -1
- package/dist/components/CuiTimePicker.vue.js +173 -95
- package/dist/components/CuiTimeline.vue.d.ts.map +1 -1
- package/dist/components/CuiTimeline.vue.js +6 -5
- package/dist/components/CuiTimelineItem.vue.d.ts.map +1 -1
- package/dist/components/CuiTimelineItem.vue.js +11 -10
- package/dist/components/CuiToast.vue.d.ts +8 -10
- package/dist/components/CuiToast.vue.d.ts.map +1 -1
- package/dist/components/CuiToast.vue.js +2 -2
- package/dist/components/CuiToast.vue2.js +69 -67
- package/dist/components/CuiToggle.vue.d.ts +2 -2
- package/dist/components/CuiToggle.vue.d.ts.map +1 -1
- package/dist/components/CuiToggle.vue.js +2 -2
- package/dist/components/CuiToggle.vue2.js +71 -59
- package/dist/components/CuiToggleGroup.vue.d.ts +2 -2
- package/dist/components/CuiToggleGroup.vue.d.ts.map +1 -1
- package/dist/components/CuiToggleGroup.vue.js +2 -2
- package/dist/components/CuiToggleGroup.vue2.js +45 -35
- package/dist/components/CuiTooltip.vue.d.ts.map +1 -1
- package/dist/components/CuiTooltip.vue.js +2 -2
- package/dist/components/CuiTooltip.vue2.js +47 -44
- package/dist/components/CuiTransferList.vue.d.ts.map +1 -1
- package/dist/components/CuiTransferList.vue.js +31 -30
- package/dist/components/CuiTreeNode.vue.d.ts +9 -2
- package/dist/components/CuiTreeNode.vue.d.ts.map +1 -1
- package/dist/components/CuiTreeNode.vue.js +5 -179
- package/dist/components/CuiTreeNode.vue2.js +198 -2
- package/dist/components/CuiTreeView.vue.d.ts +33 -5
- package/dist/components/CuiTreeView.vue.d.ts.map +1 -1
- package/dist/components/CuiTreeView.vue.js +187 -44
- package/dist/composables/useCalendarKeyboard.d.ts +48 -0
- package/dist/composables/useCalendarKeyboard.d.ts.map +1 -0
- package/dist/composables/useCalendarKeyboard.js +91 -0
- package/dist/composables/useFieldDescribedBy.d.ts +30 -0
- package/dist/composables/useFieldDescribedBy.d.ts.map +1 -0
- package/dist/composables/useFieldDescribedBy.js +11 -0
- package/dist/composables/useMessages.d.ts.map +1 -1
- package/dist/composables/useMessages.js +6 -6
- package/dist/composables/usePopover.d.ts.map +1 -1
- package/dist/composables/usePopover.js +10 -0
- package/dist/composables/useScrollShadows.d.ts +3 -0
- package/dist/composables/useScrollShadows.d.ts.map +1 -1
- package/dist/composables/useScrollShadows.js +15 -12
- package/dist/composables/useTheme.d.ts.map +1 -1
- package/dist/composables/useTheme.js +25 -21
- package/dist/icons/builtin.d.ts.map +1 -1
- package/dist/icons/builtin.js +38 -37
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +185 -182
- package/dist/messages.d.ts +39 -4
- package/dist/messages.d.ts.map +1 -1
- package/dist/messages.js +8 -7
- package/dist/types/common.d.ts +90 -0
- package/dist/types/common.d.ts.map +1 -1
- package/dist/utils/colorIconMap.d.ts +47 -3
- package/dist/utils/colorIconMap.d.ts.map +1 -1
- package/dist/utils/colorIconMap.js +20 -5
- package/dist/utils/date.d.ts +13 -0
- package/dist/utils/date.d.ts.map +1 -1
- package/dist/utils/date.js +46 -40
- package/dist/utils/sizing.d.ts +26 -1
- package/dist/utils/sizing.d.ts.map +1 -1
- package/dist/utils/sizing.js +22 -21
- package/dist/version.js +1 -1
- package/package.json +1 -2
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as H, computed as T, ref as J, watch as K, useTemplateRef as N, withDirectives as O, openBlock as Q, createBlock as U, createSlots as W, withCtx as g, renderSlot as C, vShow as X, nextTick as Y } from "vue";
|
|
2
2
|
import _ from "./CuiInput.vue.js";
|
|
3
|
-
const
|
|
3
|
+
const le = /* @__PURE__ */ H({
|
|
4
4
|
__name: "CuiMaskedInput",
|
|
5
5
|
props: {
|
|
6
6
|
modelValue: { default: "" },
|
|
@@ -12,83 +12,89 @@ const ne = /* @__PURE__ */ J({
|
|
|
12
12
|
error: { type: Boolean, default: !1 },
|
|
13
13
|
errorMessage: {},
|
|
14
14
|
readonly: { type: Boolean, default: !1 },
|
|
15
|
+
name: {},
|
|
16
|
+
autocomplete: {},
|
|
17
|
+
id: {},
|
|
18
|
+
ariaDescribedby: {},
|
|
19
|
+
ariaLabelledby: {},
|
|
20
|
+
ariaRequired: { type: Boolean },
|
|
15
21
|
hidden: { type: Boolean, default: !1 },
|
|
16
22
|
color: { default: "primary" },
|
|
17
23
|
size: { default: "md" },
|
|
18
24
|
disabled: { type: Boolean, default: !1 }
|
|
19
25
|
},
|
|
20
26
|
emits: ["update:modelValue", "update:formattedValue"],
|
|
21
|
-
setup(
|
|
22
|
-
const f =
|
|
27
|
+
setup(r, { expose: D, emit: $ }) {
|
|
28
|
+
const f = r, B = $, F = {
|
|
23
29
|
"#": { pattern: /[0-9]/ },
|
|
24
30
|
A: { pattern: /[a-zA-Z]/ },
|
|
25
31
|
"*": { pattern: /[a-zA-Z0-9]/ }
|
|
26
|
-
},
|
|
32
|
+
}, z = T(() => ({ ...F, ...f.tokens })), c = T(() => {
|
|
27
33
|
const e = [];
|
|
28
34
|
let t = 0;
|
|
29
|
-
for (let
|
|
30
|
-
const
|
|
31
|
-
if (
|
|
32
|
-
|
|
35
|
+
for (let l = 0; l < f.mask.length; l++) {
|
|
36
|
+
const n = f.mask[l];
|
|
37
|
+
if (n === "\\" && l + 1 < f.mask.length) {
|
|
38
|
+
l++, e.push({ index: t, isToken: !1, char: f.mask[l] }), t++;
|
|
33
39
|
continue;
|
|
34
40
|
}
|
|
35
|
-
const
|
|
36
|
-
|
|
41
|
+
const o = z.value[n];
|
|
42
|
+
o ? e.push({ index: t, isToken: !0, char: n, pattern: o.pattern }) : e.push({ index: t, isToken: !1, char: n }), t++;
|
|
37
43
|
}
|
|
38
44
|
return e;
|
|
39
|
-
}), v =
|
|
45
|
+
}), v = T(() => c.value.filter((e) => e.isToken));
|
|
40
46
|
function d(e) {
|
|
41
|
-
let t = 0,
|
|
42
|
-
for (const
|
|
43
|
-
|
|
44
|
-
return
|
|
47
|
+
let t = 0, l = "";
|
|
48
|
+
for (const n of c.value)
|
|
49
|
+
n.isToken ? t < e.length ? (l += e[t], t++) : l += f.fillChar : l += n.char;
|
|
50
|
+
return l;
|
|
45
51
|
}
|
|
46
52
|
function P(e) {
|
|
47
|
-
var
|
|
53
|
+
var l;
|
|
48
54
|
let t = "";
|
|
49
|
-
for (const
|
|
50
|
-
if (
|
|
51
|
-
const
|
|
52
|
-
|
|
55
|
+
for (const n of c.value)
|
|
56
|
+
if (n.isToken && n.index < e.length) {
|
|
57
|
+
const o = e[n.index];
|
|
58
|
+
o !== f.fillChar && ((l = n.pattern) != null && l.test(o)) && (t += o);
|
|
53
59
|
}
|
|
54
60
|
return t;
|
|
55
61
|
}
|
|
56
62
|
function E(e) {
|
|
57
|
-
var
|
|
58
|
-
let t = "",
|
|
59
|
-
for (const
|
|
60
|
-
if (
|
|
61
|
-
(
|
|
63
|
+
var n;
|
|
64
|
+
let t = "", l = 0;
|
|
65
|
+
for (const o of e) {
|
|
66
|
+
if (l >= v.value.length) break;
|
|
67
|
+
(n = v.value[l].pattern) != null && n.test(o) && (t += o, l++);
|
|
62
68
|
}
|
|
63
69
|
return t;
|
|
64
70
|
}
|
|
65
|
-
const
|
|
66
|
-
|
|
71
|
+
const u = J(d(f.modelValue));
|
|
72
|
+
K(
|
|
67
73
|
() => f.modelValue,
|
|
68
74
|
(e) => {
|
|
69
75
|
const t = E(e);
|
|
70
|
-
|
|
76
|
+
u.value = d(t);
|
|
71
77
|
}
|
|
72
78
|
);
|
|
73
|
-
const
|
|
74
|
-
function
|
|
79
|
+
const q = T(() => u.value);
|
|
80
|
+
function y(e) {
|
|
75
81
|
let t = 0;
|
|
76
|
-
for (const
|
|
77
|
-
if (
|
|
78
|
-
if (t === e) return
|
|
82
|
+
for (const l of c.value)
|
|
83
|
+
if (l.isToken) {
|
|
84
|
+
if (t === e) return l.index;
|
|
79
85
|
t++;
|
|
80
86
|
}
|
|
81
87
|
return c.value.length;
|
|
82
88
|
}
|
|
83
|
-
function
|
|
89
|
+
function b(e) {
|
|
84
90
|
for (const t of c.value)
|
|
85
91
|
if (t.isToken && t.index >= e) return t.index;
|
|
86
92
|
return c.value.length;
|
|
87
93
|
}
|
|
88
|
-
const
|
|
94
|
+
const w = N("maskedInputRef");
|
|
89
95
|
function I() {
|
|
90
96
|
var e;
|
|
91
|
-
return (e =
|
|
97
|
+
return (e = w.value) == null ? void 0 : e.el;
|
|
92
98
|
}
|
|
93
99
|
function p(e) {
|
|
94
100
|
Y(() => {
|
|
@@ -96,127 +102,136 @@ const ne = /* @__PURE__ */ J({
|
|
|
96
102
|
t && t.setSelectionRange(e, e);
|
|
97
103
|
});
|
|
98
104
|
}
|
|
99
|
-
function
|
|
105
|
+
function A(e) {
|
|
100
106
|
e.preventDefault();
|
|
101
107
|
const t = I();
|
|
102
108
|
if (!t) return;
|
|
103
|
-
const
|
|
109
|
+
const l = t.selectionStart ?? 0, n = t.selectionEnd ?? l, o = P(u.value);
|
|
104
110
|
if (e.inputType === "insertText" && e.data) {
|
|
105
|
-
let
|
|
106
|
-
for (const
|
|
107
|
-
if (
|
|
108
|
-
|
|
111
|
+
let s = 0;
|
|
112
|
+
for (const h of c.value) {
|
|
113
|
+
if (h.index >= l) break;
|
|
114
|
+
h.isToken && s++;
|
|
109
115
|
}
|
|
110
|
-
const
|
|
111
|
-
if (!
|
|
112
|
-
let
|
|
113
|
-
if (
|
|
114
|
-
const
|
|
115
|
-
|
|
116
|
+
const i = S(e.data, s);
|
|
117
|
+
if (!i) return;
|
|
118
|
+
let a = o;
|
|
119
|
+
if (l !== n) {
|
|
120
|
+
const h = k(l), G = k(n);
|
|
121
|
+
a = a.slice(0, h) + a.slice(G), s = h;
|
|
116
122
|
}
|
|
117
|
-
|
|
118
|
-
const
|
|
119
|
-
p(
|
|
123
|
+
a = a.slice(0, s) + i + a.slice(s), a = a.slice(0, v.value.length), u.value = d(a), x(a);
|
|
124
|
+
const m = s + i.length, R = y(m);
|
|
125
|
+
p(b(R));
|
|
120
126
|
} else if (e.inputType === "deleteContentBackward" || e.inputType === "deleteContentForward") {
|
|
121
|
-
let
|
|
122
|
-
if (
|
|
127
|
+
let s = k(l), i = k(n);
|
|
128
|
+
if (l === n)
|
|
123
129
|
if (e.inputType === "deleteContentBackward")
|
|
124
|
-
if (
|
|
125
|
-
|
|
130
|
+
if (s > 0)
|
|
131
|
+
s--;
|
|
126
132
|
else
|
|
127
133
|
return;
|
|
128
|
-
else if (
|
|
129
|
-
|
|
134
|
+
else if (i < o.length)
|
|
135
|
+
i++;
|
|
130
136
|
else
|
|
131
137
|
return;
|
|
132
|
-
const
|
|
133
|
-
|
|
134
|
-
const
|
|
135
|
-
e.inputType === "deleteContentBackward" ? p(
|
|
138
|
+
const a = o.slice(0, s) + o.slice(i);
|
|
139
|
+
u.value = d(a), x(a);
|
|
140
|
+
const m = y(s);
|
|
141
|
+
e.inputType === "deleteContentBackward" ? p(m) : p(b(m));
|
|
136
142
|
} else if (e.inputType === "insertFromPaste") {
|
|
137
|
-
const
|
|
138
|
-
let
|
|
139
|
-
if (
|
|
140
|
-
const
|
|
141
|
-
|
|
143
|
+
const s = e.data ?? "";
|
|
144
|
+
let i = k(l), a = o;
|
|
145
|
+
if (l !== n) {
|
|
146
|
+
const h = k(n);
|
|
147
|
+
a = a.slice(0, i) + a.slice(h);
|
|
142
148
|
}
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
const R =
|
|
146
|
-
p(
|
|
149
|
+
const m = M(s, i);
|
|
150
|
+
a = a.slice(0, i) + m + a.slice(i), a = a.slice(0, v.value.length), u.value = d(a), x(a);
|
|
151
|
+
const R = i + m.length;
|
|
152
|
+
p(y(R));
|
|
147
153
|
}
|
|
148
154
|
}
|
|
149
155
|
function k(e) {
|
|
150
156
|
let t = 0;
|
|
151
|
-
for (const
|
|
152
|
-
if (
|
|
153
|
-
|
|
157
|
+
for (const l of c.value) {
|
|
158
|
+
if (l.index >= e) break;
|
|
159
|
+
l.isToken && t++;
|
|
154
160
|
}
|
|
155
161
|
return t;
|
|
156
162
|
}
|
|
157
163
|
function S(e, t) {
|
|
158
|
-
var
|
|
159
|
-
let
|
|
160
|
-
for (const
|
|
161
|
-
if (
|
|
162
|
-
(
|
|
164
|
+
var o;
|
|
165
|
+
let l = "", n = t;
|
|
166
|
+
for (const s of e) {
|
|
167
|
+
if (n >= v.value.length) break;
|
|
168
|
+
(o = v.value[n].pattern) != null && o.test(s) && (l += s, n++);
|
|
163
169
|
}
|
|
164
|
-
return
|
|
170
|
+
return l;
|
|
165
171
|
}
|
|
166
|
-
function
|
|
172
|
+
function M(e, t) {
|
|
167
173
|
return S(e, t);
|
|
168
174
|
}
|
|
169
|
-
function
|
|
175
|
+
function x(e) {
|
|
170
176
|
B("update:modelValue", e), B("update:formattedValue", d(e));
|
|
171
177
|
}
|
|
172
178
|
function V() {
|
|
173
|
-
const e = P(
|
|
174
|
-
return e.length === 0 ?
|
|
179
|
+
const e = P(u.value);
|
|
180
|
+
return e.length === 0 ? b(0) : y(e.length);
|
|
175
181
|
}
|
|
176
|
-
function
|
|
182
|
+
function L() {
|
|
177
183
|
const e = I();
|
|
178
184
|
if (!e) return;
|
|
179
|
-
const t = e.selectionStart ?? 0,
|
|
180
|
-
if (t >
|
|
181
|
-
p(
|
|
185
|
+
const t = e.selectionStart ?? 0, l = V();
|
|
186
|
+
if (t > l)
|
|
187
|
+
p(l);
|
|
182
188
|
else {
|
|
183
|
-
const
|
|
184
|
-
|
|
189
|
+
const n = b(t);
|
|
190
|
+
n > l ? p(l) : n !== t && p(n);
|
|
185
191
|
}
|
|
186
192
|
}
|
|
187
|
-
function
|
|
188
|
-
|
|
193
|
+
function Z() {
|
|
194
|
+
u.value = d(""), x(""), p(b(0));
|
|
189
195
|
}
|
|
190
|
-
function
|
|
191
|
-
(!
|
|
196
|
+
function j() {
|
|
197
|
+
(!u.value || u.value === d("")) && (u.value = d("")), p(V());
|
|
192
198
|
}
|
|
193
|
-
return
|
|
194
|
-
el:
|
|
195
|
-
formattedValue:
|
|
196
|
-
focus
|
|
197
|
-
|
|
198
|
-
|
|
199
|
+
return D({
|
|
200
|
+
el: w,
|
|
201
|
+
formattedValue: q,
|
|
202
|
+
// Forwards FocusOptions, as CuiInput.focus() and the native focus() both do —
|
|
203
|
+
// callers need { preventScroll } when restoring focus from an overlay (#112).
|
|
204
|
+
focus: (e) => {
|
|
205
|
+
var t;
|
|
206
|
+
return (t = w.value) == null ? void 0 : t.focus(e);
|
|
199
207
|
},
|
|
200
208
|
blur: () => {
|
|
201
209
|
var e;
|
|
202
|
-
return (e =
|
|
210
|
+
return (e = w.value) == null ? void 0 : e.blur();
|
|
203
211
|
}
|
|
204
212
|
}), (e, t) => O((Q(), U(_, {
|
|
213
|
+
class: "cui-masked-input",
|
|
205
214
|
ref: "maskedInputRef",
|
|
206
|
-
|
|
215
|
+
id: r.id,
|
|
216
|
+
name: r.name,
|
|
217
|
+
autocomplete: r.autocomplete,
|
|
218
|
+
"aria-describedby": r.ariaDescribedby,
|
|
219
|
+
"aria-required": r.ariaRequired || void 0,
|
|
220
|
+
"aria-labelledby": r.ariaLabelledby,
|
|
221
|
+
"model-value": u.value,
|
|
207
222
|
type: "text",
|
|
208
|
-
placeholder:
|
|
209
|
-
color:
|
|
210
|
-
size:
|
|
211
|
-
clearable:
|
|
212
|
-
error:
|
|
213
|
-
"error-message":
|
|
214
|
-
disabled:
|
|
215
|
-
readonly:
|
|
216
|
-
onBeforeinput:
|
|
217
|
-
onClick:
|
|
218
|
-
onFocusin:
|
|
219
|
-
onClear:
|
|
223
|
+
placeholder: r.placeholder,
|
|
224
|
+
color: r.color,
|
|
225
|
+
size: r.size,
|
|
226
|
+
clearable: r.clearable,
|
|
227
|
+
error: r.error,
|
|
228
|
+
"error-message": r.errorMessage,
|
|
229
|
+
disabled: r.disabled,
|
|
230
|
+
readonly: r.readonly,
|
|
231
|
+
onBeforeinput: A,
|
|
232
|
+
onClick: L,
|
|
233
|
+
onFocusin: j,
|
|
234
|
+
onClear: Z
|
|
220
235
|
}, W({ _: 2 }, [
|
|
221
236
|
e.$slots.prefix ? {
|
|
222
237
|
name: "prefix",
|
|
@@ -246,11 +261,11 @@ const ne = /* @__PURE__ */ J({
|
|
|
246
261
|
]),
|
|
247
262
|
key: "3"
|
|
248
263
|
} : void 0
|
|
249
|
-
]), 1032, ["model-value", "placeholder", "color", "size", "clearable", "error", "error-message", "disabled", "readonly"])), [
|
|
250
|
-
[X, !
|
|
264
|
+
]), 1032, ["id", "name", "autocomplete", "aria-describedby", "aria-required", "aria-labelledby", "model-value", "placeholder", "color", "size", "clearable", "error", "error-message", "disabled", "readonly"])), [
|
|
265
|
+
[X, !r.hidden]
|
|
251
266
|
]);
|
|
252
267
|
}
|
|
253
268
|
});
|
|
254
269
|
export {
|
|
255
|
-
|
|
270
|
+
le as default
|
|
256
271
|
};
|
|
@@ -1,9 +1,17 @@
|
|
|
1
1
|
import type { BackdropBlur } from "./CuiBackdrop.vue";
|
|
2
|
-
import type { HideableProps, CuiRounded } from "../types/common";
|
|
2
|
+
import type { HideableProps, CuiRounded, TitleAsProps } from "../types/common";
|
|
3
3
|
export type ModalSize = "sm" | "md" | "lg" | "xl" | "full";
|
|
4
|
-
export interface CuiModalProps extends HideableProps {
|
|
4
|
+
export interface CuiModalProps extends HideableProps, TitleAsProps {
|
|
5
5
|
/** Controls modal visibility (v-model:visible) */
|
|
6
6
|
visible?: boolean;
|
|
7
|
+
/**
|
|
8
|
+
* id of the element naming this dialog, for sub-component mode.
|
|
9
|
+
*
|
|
10
|
+
* Simple mode (the `title` prop) wires this up on its own. A wrapper that assembles its
|
|
11
|
+
* own header — `CuiConfirmDialog` does — has no `title` for the modal to name itself
|
|
12
|
+
* from, and so had no accessible name at all (#158).
|
|
13
|
+
*/
|
|
14
|
+
ariaLabelledby?: string;
|
|
7
15
|
/** Modal width — named size or custom CSS value */
|
|
8
16
|
size?: ModalSize | string;
|
|
9
17
|
/** Title text (rendered in header) */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CuiModal.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiModal.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CuiModal.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiModal.vue"],"names":[],"mappings":"AAmNA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACtD,OAAO,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/E,MAAM,MAAM,SAAS,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;AAE3D,MAAM,WAAW,aAAc,SAAQ,aAAa,EAAE,YAAY;IAChE,kDAAkD;IAClD,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;;;;OAMG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,mDAAmD;IACnD,IAAI,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1B,sCAAsC;IACtC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oDAAoD;IACpD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,8BAA8B;IAC9B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,4CAA4C;IAC5C,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,uBAAuB;IACvB,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,oBAAoB;IACpB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,qBAAqB;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yBAAyB;IACzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,wBAAwB;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oBAAoB;IACpB,OAAO,CAAC,EAAE,UAAU,CAAC;CACtB;AA0LD,QAAA,IAAI,QAAQ,IAAW,EAAE,QAAQ,IAAY,CAAE;AAC/C,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,GAC7C;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,QAAQ,KAAK,GAAG,CAAA;CAAE,CAAC;AAiChD,QAAA,MAAM,eAAe;;;;;;;;UAnPZ,SAAS,GAAG,MAAM;aAoBf,UAAU;aA9BV,OAAO;gBAcJ,OAAO;iBAIN,OAAO;mBAFL,OAAO;qBAIL,MAAM;kBAET,YAAY;mBAEX,MAAM;6EA6OtB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import o from "./CuiModal.vue2.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-e3823333"]]);
|
|
5
5
|
export {
|
|
6
|
-
|
|
6
|
+
p as default
|
|
7
7
|
};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { defineComponent as x, useTemplateRef as z, computed as N, openBlock as i, createBlock as O, Teleport as $, unref as l, withDirectives as E, createElementBlock as
|
|
2
|
-
import { useOverlay as
|
|
3
|
-
import
|
|
4
|
-
import
|
|
5
|
-
import
|
|
6
|
-
const
|
|
1
|
+
import { defineComponent as x, useTemplateRef as z, computed as N, openBlock as i, createBlock as O, Teleport as $, unref as l, withDirectives as E, createElementBlock as u, normalizeClass as m, createVNode as d, createElementVNode as b, normalizeStyle as M, Fragment as S, withCtx as V, renderSlot as f, vShow as A, createCommentVNode as I } from "vue";
|
|
2
|
+
import { useOverlay as R } from "../composables/useOverlay.js";
|
|
3
|
+
import G from "./CuiBackdrop.vue.js";
|
|
4
|
+
import K from "./CuiModalHeader.vue.js";
|
|
5
|
+
import L from "./CuiModalBody.vue.js";
|
|
6
|
+
const T = { class: "cui-modal-container" }, W = ["aria-labelledby"], H = /* @__PURE__ */ x({
|
|
7
7
|
__name: "CuiModal",
|
|
8
8
|
props: {
|
|
9
9
|
visible: { type: Boolean, default: !1 },
|
|
10
|
+
ariaLabelledby: {},
|
|
10
11
|
size: { default: "md" },
|
|
11
12
|
title: {},
|
|
12
13
|
persistent: { type: Boolean, default: !1 },
|
|
@@ -18,24 +19,25 @@ const A = { class: "cui-modal-container" }, D = ["aria-labelledby"], J = /* @__P
|
|
|
18
19
|
backdropImage: {},
|
|
19
20
|
backdropGradient: {},
|
|
20
21
|
rounded: { default: "md" },
|
|
21
|
-
hidden: { type: Boolean, default: !1 }
|
|
22
|
+
hidden: { type: Boolean, default: !1 },
|
|
23
|
+
titleAs: {}
|
|
22
24
|
},
|
|
23
25
|
emits: ["update:visible", "close"],
|
|
24
|
-
setup(e, { emit:
|
|
25
|
-
const
|
|
26
|
+
setup(e, { emit: v }) {
|
|
27
|
+
const t = e, y = {
|
|
26
28
|
none: "0",
|
|
27
|
-
sm: "0.25rem",
|
|
28
|
-
md: "var(--cui-button-radius, 0.375rem)",
|
|
29
|
-
lg: "0.5rem",
|
|
29
|
+
sm: "var(--cui-radius-sm, 0.25rem)",
|
|
30
|
+
md: "var(--cui-button-radius, var(--cui-radius-md, 0.375rem))",
|
|
31
|
+
lg: "var(--cui-radius-lg, 0.5rem)",
|
|
30
32
|
full: "9999px"
|
|
31
|
-
},
|
|
32
|
-
open: () =>
|
|
33
|
-
dialogRef:
|
|
34
|
-
persistent: () =>
|
|
35
|
-
allowNested: () =>
|
|
36
|
-
onUpdateOpen: (
|
|
37
|
-
onClose: () =>
|
|
38
|
-
}),
|
|
33
|
+
}, r = v, p = z("dialogEl"), { isVisible: k, isAnimating: o, closeOverlay: g, onBackdropClick: C, onKeydown: n } = R({
|
|
34
|
+
open: () => t.visible,
|
|
35
|
+
dialogRef: p,
|
|
36
|
+
persistent: () => t.persistent,
|
|
37
|
+
allowNested: () => t.allowNested,
|
|
38
|
+
onUpdateOpen: (a) => r("update:visible", a),
|
|
39
|
+
onClose: () => r("close")
|
|
40
|
+
}), B = {
|
|
39
41
|
sm: "24rem",
|
|
40
42
|
// 384px
|
|
41
43
|
md: "32rem",
|
|
@@ -45,16 +47,16 @@ const A = { class: "cui-modal-container" }, D = ["aria-labelledby"], J = /* @__P
|
|
|
45
47
|
xl: "64rem",
|
|
46
48
|
// 1024px
|
|
47
49
|
full: "calc(100vw - 2rem)"
|
|
48
|
-
},
|
|
49
|
-
return (
|
|
50
|
-
l(
|
|
50
|
+
}, h = N(() => B[t.size] ?? t.size), s = `cui-modal-title-${Math.random().toString(36).slice(2, 8)}`;
|
|
51
|
+
return (a, c) => (i(), O($, { to: "body" }, [
|
|
52
|
+
l(k) ? E((i(), u("div", {
|
|
51
53
|
key: 0,
|
|
52
|
-
class: m(["cui-modal-overlay", { "cui-modal-overlay--visible": l(
|
|
53
|
-
onKeydown:
|
|
54
|
-
(...w) => l(
|
|
54
|
+
class: m(["cui-modal-overlay", { "cui-modal-overlay--visible": l(o) }]),
|
|
55
|
+
onKeydown: c[0] || (c[0] = //@ts-ignore
|
|
56
|
+
(...w) => l(n) && l(n)(...w))
|
|
55
57
|
}, [
|
|
56
|
-
d(
|
|
57
|
-
visible: l(
|
|
58
|
+
d(G, {
|
|
59
|
+
visible: l(o),
|
|
58
60
|
opacity: e.backdropOpacity,
|
|
59
61
|
blur: e.backdropBlur,
|
|
60
62
|
color: e.backdropColor,
|
|
@@ -62,37 +64,39 @@ const A = { class: "cui-modal-container" }, D = ["aria-labelledby"], J = /* @__P
|
|
|
62
64
|
gradient: e.backdropGradient,
|
|
63
65
|
onClick: l(C)
|
|
64
66
|
}, null, 8, ["visible", "opacity", "blur", "color", "image", "gradient", "onClick"]),
|
|
65
|
-
|
|
66
|
-
|
|
67
|
+
b("div", T, [
|
|
68
|
+
b("div", {
|
|
67
69
|
ref: "dialogEl",
|
|
68
|
-
class: m(["cui-modal", { "cui-modal--visible": l(
|
|
69
|
-
style: M({ maxWidth:
|
|
70
|
+
class: m(["cui-modal", { "cui-modal--visible": l(o) }]),
|
|
71
|
+
style: M({ maxWidth: h.value, borderRadius: y[e.rounded] }),
|
|
70
72
|
role: "dialog",
|
|
71
73
|
"aria-modal": "true",
|
|
72
|
-
"aria-labelledby": e.title ?
|
|
74
|
+
"aria-labelledby": e.ariaLabelledby ?? (e.title ? s : void 0),
|
|
73
75
|
tabindex: "-1"
|
|
74
76
|
}, [
|
|
75
|
-
e.title ? (i(),
|
|
76
|
-
d(
|
|
77
|
+
e.title ? (i(), u(S, { key: 0 }, [
|
|
78
|
+
d(K, {
|
|
77
79
|
title: e.title,
|
|
80
|
+
"title-as": e.titleAs,
|
|
81
|
+
"title-id": s,
|
|
78
82
|
"no-close-button": e.noCloseButton,
|
|
79
|
-
onClose: l(
|
|
80
|
-
}, null, 8, ["title", "no-close-button", "onClose"]),
|
|
81
|
-
d(
|
|
83
|
+
onClose: l(g)
|
|
84
|
+
}, null, 8, ["title", "title-as", "no-close-button", "onClose"]),
|
|
85
|
+
d(L, null, {
|
|
82
86
|
default: V(() => [
|
|
83
|
-
f(
|
|
87
|
+
f(a.$slots, "default", {}, void 0, !0)
|
|
84
88
|
]),
|
|
85
89
|
_: 3
|
|
86
90
|
})
|
|
87
|
-
], 64)) : f(
|
|
88
|
-
], 14,
|
|
91
|
+
], 64)) : f(a.$slots, "default", {}, void 0, !0, 1)
|
|
92
|
+
], 14, W)
|
|
89
93
|
])
|
|
90
94
|
], 34)), [
|
|
91
|
-
[
|
|
92
|
-
]) :
|
|
95
|
+
[A, !e.hidden]
|
|
96
|
+
]) : I("", !0)
|
|
93
97
|
]));
|
|
94
98
|
}
|
|
95
99
|
});
|
|
96
100
|
export {
|
|
97
|
-
|
|
101
|
+
H as default
|
|
98
102
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CuiModalBody.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiModalBody.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CuiModalBody.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiModalBody.vue"],"names":[],"mappings":"AA8DA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,iBAAkB,SAAQ,aAAa;IACtD,6BAA6B;IAC7B,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AA6DD,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAyB/C,QAAA,MAAM,eAAe;;eAzFP,OAAO;6EAgGnB,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,21 +1,24 @@
|
|
|
1
|
-
import { defineComponent as
|
|
1
|
+
import { defineComponent as f, withDirectives as y, openBlock as o, createElementBlock as l, createElementVNode as S, unref as e, normalizeStyle as t, renderSlot as p, createCommentVNode as a, vShow as v } from "vue";
|
|
2
2
|
import { useScrollShadows as h, scrollShadowTopStyle as w, scrollShadowBottomStyle as g } from "../composables/useScrollShadows.js";
|
|
3
|
-
const x = {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
3
|
+
const x = {
|
|
4
|
+
class: "cui-modal-body",
|
|
5
|
+
style: {
|
|
6
|
+
position: "relative",
|
|
7
|
+
display: "flex",
|
|
8
|
+
flexDirection: "column",
|
|
9
|
+
flex: "1 1 auto",
|
|
10
|
+
minHeight: "0",
|
|
11
|
+
overflow: "hidden"
|
|
12
|
+
}
|
|
13
|
+
}, C = /* @__PURE__ */ f({
|
|
11
14
|
__name: "CuiModalBody",
|
|
12
15
|
props: {
|
|
13
16
|
noPadding: { type: Boolean, default: !1 },
|
|
14
17
|
hidden: { type: Boolean, default: !1 }
|
|
15
18
|
},
|
|
16
19
|
setup(n) {
|
|
17
|
-
const { canScrollUp: d, canScrollDown: c, onScroll:
|
|
18
|
-
return (u,
|
|
20
|
+
const { canScrollUp: d, canScrollDown: c, onScroll: i, onMount: s } = h();
|
|
21
|
+
return (u, r) => y((o(), l("div", x, [
|
|
19
22
|
S("div", {
|
|
20
23
|
ref: e(s),
|
|
21
24
|
style: t({
|
|
@@ -27,8 +30,8 @@ const x = { style: {
|
|
|
27
30
|
lineHeight: "1.6",
|
|
28
31
|
color: "var(--cui-text-secondary)"
|
|
29
32
|
}),
|
|
30
|
-
onScroll:
|
|
31
|
-
(...
|
|
33
|
+
onScroll: r[0] || (r[0] = //@ts-ignore
|
|
34
|
+
(...m) => e(i) && e(i)(...m))
|
|
32
35
|
}, [
|
|
33
36
|
p(u.$slots, "default")
|
|
34
37
|
], 36),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CuiModalFooter.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiModalFooter.vue"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"CuiModalFooter.vue.d.ts","sourceRoot":"","sources":["../../src/components/CuiModalFooter.vue"],"names":[],"mappings":"AA0CA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAErD,MAAM,WAAW,mBAAoB,SAAQ,aAAa;IACxD,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS,CAAC;CACjD;AA8CD,QAAA,IAAI,OAAO,IAAW,CAAE;AACxB,KAAK,WAAW,GAAG,EAAE,GACnB;IAAE,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,OAAO,KAAK,GAAG,CAAA;CAAE,CAAC;AAqB/C,QAAA,MAAM,eAAe;;WAtEX,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,SAAS;6EA6E/C,CAAC;wBACkB,eAAe,CAAC,OAAO,eAAe,EAAE,WAAW,CAAC;AAAzE,wBAA0E;AAa1E,KAAK,eAAe,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAChC,QAAO;QACN,MAAM,EAAE,CAAC,CAAC;KAEV,CAAA;CACD,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as n, withDirectives as
|
|
1
|
+
import { defineComponent as n, withDirectives as l, openBlock as c, createElementBlock as i, normalizeStyle as r, renderSlot as s, vShow as o } from "vue";
|
|
2
2
|
const f = /* @__PURE__ */ n({
|
|
3
3
|
__name: "CuiModalFooter",
|
|
4
4
|
props: {
|
|
@@ -12,7 +12,8 @@ const f = /* @__PURE__ */ n({
|
|
|
12
12
|
center: "center",
|
|
13
13
|
between: "space-between"
|
|
14
14
|
};
|
|
15
|
-
return (a, d) =>
|
|
15
|
+
return (a, d) => l((c(), i("div", {
|
|
16
|
+
class: "cui-modal-footer",
|
|
16
17
|
style: r({
|
|
17
18
|
display: "flex",
|
|
18
19
|
alignItems: "center",
|