@nmorph/nmorph-ui-kit 2.2.36 → 2.2.38
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/dist/components/basic/nmorph-button/NmorphButton.vue2.js +8 -8
- package/dist/components/basic/nmorph-icon/NmorphIcon.vue2.js +3 -3
- package/dist/components/basic/nmorph-layout/NmorphLayout.vue2.js +14 -13
- package/dist/components/basic/nmorph-link/NmorphLink.vue2.js +1 -1
- package/dist/components/basic/nmorph-scroll/NmorphScroll.css +1 -0
- package/dist/components/basic/nmorph-scroll/NmorphScroll.vue.js +6 -4
- package/dist/components/basic/nmorph-scroll/NmorphScroll.vue2.js +1 -0
- package/dist/components/basic/nmorph-space/NmorphSpace.vue2.js +15 -19
- package/dist/components/data/nmorph-avatar/NmorphAvatar.css +1 -1
- package/dist/components/data/nmorph-avatar/NmorphAvatar.vue2.js +5 -5
- package/dist/components/data/nmorph-badge/NmorphBadge.vue2.js +37 -36
- package/dist/components/data/nmorph-calendar/NmorphCalendar.vue2.js +41 -40
- package/dist/components/data/nmorph-card/NmorphCard.vue2.js +19 -15
- package/dist/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue2.js +5 -9
- package/dist/components/data/nmorph-empty/NmorphEmpty.vue.js +3 -3
- package/dist/components/data/nmorph-empty/NmorphEmpty.vue2.js +17 -14
- package/dist/components/data/nmorph-image/NmorphImage.css +1 -0
- package/dist/components/data/nmorph-image/NmorphImage.vue.js +14 -12
- package/dist/components/data/nmorph-image/NmorphImage.vue2.js +3 -2
- package/dist/components/data/nmorph-image-preview/NmorphImagePreview.vue2.js +36 -35
- package/dist/components/data/nmorph-pagination/NmorphPagination.vue2.js +1 -1
- package/dist/components/data/nmorph-progress/NmorphProgress.vue2.js +19 -18
- package/dist/components/data/nmorph-qr-code/NmorphQRCode.vue2.js +20 -19
- package/dist/components/data/nmorph-skeleton/NmorphSkeleton.vue2.js +1 -1
- package/dist/components/data/nmorph-table/NmorphTable.vue2.js +39 -43
- package/dist/components/data/nmorph-virtual-list/NmorphVirtualList.vue2.js +34 -33
- package/dist/components/feedback/nmorph-alert/NmorphAlert.vue2.js +1 -1
- package/dist/components/feedback/nmorph-callout/NmorphCallout.vue2.js +7 -6
- package/dist/components/feedback/nmorph-dialog/NmorphDialog.css +1 -1
- package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue.js +25 -20
- package/dist/components/feedback/nmorph-dialog/NmorphDialog.vue2.js +37 -37
- package/dist/components/feedback/nmorph-drawer/NmorphDrawer.vue2.js +22 -21
- package/dist/components/feedback/nmorph-tooltip/NmorphTooltip.vue2.js +26 -25
- package/dist/components/form/nmorph-autocomplete/NmorphAutocomplete.vue2.js +65 -71
- package/dist/components/form/nmorph-checkbox/NmorphCheckbox.css +1 -1
- package/dist/components/form/nmorph-checkbox/NmorphCheckbox.vue2.js +30 -28
- package/dist/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue2.js +25 -20
- package/dist/components/form/nmorph-color-picker/NmorphColorPicker.vue2.js +43 -42
- package/dist/components/form/nmorph-date-picker/NmorphDatePicker.vue2.js +53 -40
- package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue.js +20 -16
- package/dist/components/form/nmorph-file-upload/NmorphFileUpload.vue2.js +113 -86
- package/dist/components/form/nmorph-form/NmorphForm.vue2.js +9 -9
- package/dist/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue2.js +33 -24
- package/dist/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue2.js +1 -1
- package/dist/components/form/nmorph-form/use-form-item-input.js +29 -8
- package/dist/components/form/nmorph-number-input/NmorphNumberInput.vue2.js +42 -39
- package/dist/components/form/nmorph-otp-input/NmorphOTPInput.vue2.js +66 -62
- package/dist/components/form/nmorph-radio/NmorphRadio.css +1 -1
- package/dist/components/form/nmorph-radio/NmorphRadio.vue2.js +1 -1
- package/dist/components/form/nmorph-radio-group/NmorphRadioGroup.vue2.js +24 -22
- package/dist/components/form/nmorph-select/NmorphSelect.css +1 -1
- package/dist/components/form/nmorph-select/NmorphSelect.vue2.js +83 -81
- package/dist/components/form/nmorph-select/components/nmorph-select-option/NmorphSelectOption.vue2.js +4 -4
- package/dist/components/form/nmorph-select-button/NmorphSelectButton.vue2.js +28 -25
- package/dist/components/form/nmorph-select-button/components/nmorph-select-button-item/NmorphSelectButtonItem.vue2.js +1 -1
- package/dist/components/form/nmorph-slider/NmorphSlider.vue2.js +51 -49
- package/dist/components/form/nmorph-switch/NmorphSwitch.vue2.js +35 -33
- package/dist/components/form/nmorph-text-input/NmorphTextInput.css +1 -0
- package/dist/components/form/nmorph-text-input/NmorphTextInput.vue.js +5 -3
- package/dist/components/form/nmorph-text-input/NmorphTextInput.vue2.js +37 -35
- package/dist/components/form/nmorph-textarea/NmorphTextarea.vue.js +1 -1
- package/dist/components/form/nmorph-textarea/NmorphTextarea.vue2.js +30 -26
- package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue.js +1 -1
- package/dist/components/form/nmorph-time-picker/NmorphTimePicker.vue2.js +68 -66
- package/dist/components/navigation/nmorph-backtop/NmorphBacktop.vue2.js +1 -1
- package/dist/components/navigation/nmorph-dropdown/NmorphDropdown.vue2.js +32 -31
- package/dist/components/navigation/nmorph-tabs/NmorphTabs.vue2.js +1 -1
- package/dist/components/others/nmorph-overlay/NmorphOverlay.vue2.js +1 -1
- package/dist/hooks/use-common-styles.js +18 -278
- package/dist/hooks/use-field-validation.js +71 -42
- package/dist/hooks/use-form-validation.js +62 -24
- package/dist/hooks/use-virtual-list.js +38 -32
- package/dist/index.umd.js +26 -286
- package/dist/package.json.js +1 -1
- package/dist/src/components/basic/nmorph-button/NmorphButton.vue.d.ts +2 -2
- package/dist/src/components/basic/nmorph-link/NmorphLink.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-avatar/NmorphAvatar.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-badge/NmorphBadge.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-collapse/components/nmorph-collapse-item/NmorphCollapseItem.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-empty/NmorphEmpty.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-pagination/NmorphPagination.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-progress/NmorphProgress.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-table/NmorphTable.vue.d.ts +1 -1
- package/dist/src/components/data/nmorph-tag-list/components/nmorph-tag-item/NmorphTagItem.vue.d.ts +1 -1
- package/dist/src/components/feedback/nmorph-callout/NmorphCallout.vue.d.ts +1 -1
- package/dist/src/components/feedback/nmorph-dialog/NmorphDialog.vue.d.ts +4 -4
- package/dist/src/components/form/nmorph-autocomplete/NmorphAutocomplete.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-checkbox-group/NmorphCheckboxGroup.vue.d.ts +3 -3
- package/dist/src/components/form/nmorph-color-picker/NmorphColorPicker.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-date-picker/NmorphDatePicker.vue.d.ts +3 -3
- package/dist/src/components/form/nmorph-file-upload/NmorphFileUpload.vue.d.ts +6 -3
- package/dist/src/components/form/nmorph-file-upload/types.d.ts +4 -0
- package/dist/src/components/form/nmorph-form/components/nmorph-form-item/NmorphFormItem.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-form/components/nmorph-form-item/inner-components/nmorph-error-box/NmorphErrorBox.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-form/types.d.ts +15 -5
- package/dist/src/components/form/nmorph-form/use-form-item-input.d.ts +10 -0
- package/dist/src/components/form/nmorph-number-input/NmorphNumberInput.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-otp-input/NmorphOTPInput.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-radio-group/NmorphRadioGroup.vue.d.ts +3 -3
- package/dist/src/components/form/nmorph-select/NmorphSelect.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-select-button/NmorphSelectButton.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-text-input/NmorphTextInput.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-textarea/NmorphTextarea.vue.d.ts +1 -1
- package/dist/src/components/form/nmorph-time-picker/NmorphTimePicker.vue.d.ts +1 -1
- package/dist/src/hooks/use-field-validation.d.ts +15 -0
- package/dist/src/hooks/use-form-validation.d.ts +5 -0
- package/dist/src/hooks/use-virtual-list.d.ts +6 -0
- package/dist/src/types/index.d.ts +2 -1
- package/dist/src/utils/common.d.ts +5 -0
- package/dist/src/utils/create-modifiers.d.ts +4 -2
- package/dist/style.css +1 -1
- package/dist/utils/common.js +9 -3
- package/dist/utils/create-modifiers.js +6 -6
- package/package.json +1 -1
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import './NmorphTimePicker.css';
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
import { NmorphComponentHeight as
|
|
4
|
-
import { useI18n as
|
|
5
|
-
import { useModifiers as
|
|
6
|
-
import {
|
|
7
|
-
import
|
|
8
|
-
import
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
|
|
2
|
+
import { defineComponent as te, ref as y, computed as n, watch as oe } from "vue";
|
|
3
|
+
import { NmorphComponentHeight as O } from "../../../types/index.js";
|
|
4
|
+
import { useI18n as re } from "vue-i18n";
|
|
5
|
+
import { useModifiers as H } from "../../../utils/create-modifiers.js";
|
|
6
|
+
import { toCssSize as ne } from "../../../utils/common.js";
|
|
7
|
+
import { useFormItemInput as le, useFormItemModel as ue } from "../nmorph-form/use-form-item-input.js";
|
|
8
|
+
import se from "../../../assets/icons/clock.svg.js";
|
|
9
|
+
import ae from "../../../assets/icons/circle-close.svg.js";
|
|
10
|
+
import ie from "../../basic/nmorph-icon/NmorphIcon.vue.js";
|
|
11
|
+
import de from "../../navigation/nmorph-dropdown/NmorphDropdown.vue.js";
|
|
12
|
+
const Ne = /* @__PURE__ */ te({
|
|
12
13
|
__name: "NmorphTimePicker",
|
|
13
14
|
props: {
|
|
14
15
|
modelValue: { type: [String, null], required: !1, default: null },
|
|
@@ -30,86 +31,87 @@ const Se = /* @__PURE__ */ ee({
|
|
|
30
31
|
tabindex: { type: Number, required: !1 }
|
|
31
32
|
},
|
|
32
33
|
emits: ["update:model-value", "focus", "blur"],
|
|
33
|
-
setup(
|
|
34
|
-
const t =
|
|
34
|
+
setup(M, { expose: k, emit: B }) {
|
|
35
|
+
const t = M, m = B, { t: I } = re(), { id: P, name: $, autocomplete: z, tabindex: D } = le(t), { modelValue: s, updateModelValue: p } = ue(
|
|
36
|
+
t,
|
|
37
|
+
(e) => m("update:model-value", e),
|
|
38
|
+
null
|
|
39
|
+
), a = y(!1), f = y(!1), x = y(null), c = (e) => String(e).padStart(2, "0"), h = (e) => Math.max(1, Math.floor(Number.isFinite(e) ? e : 1)), i = (e) => {
|
|
35
40
|
if (!e) return null;
|
|
36
41
|
const o = e.match(/^(\d{1,2}):(\d{2})(?::(\d{2}))?$/);
|
|
37
42
|
if (!o) return null;
|
|
38
|
-
const r = Number(o[1]),
|
|
39
|
-
return r > 23 ||
|
|
40
|
-
},
|
|
41
|
-
const o = `${
|
|
42
|
-
return t.showSeconds ? `${o}:${
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
()
|
|
46
|
-
(
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
const h = (e) => {
|
|
52
|
-
const o = f(e);
|
|
53
|
-
return !!(y.value && o < f(y.value) || N.value && o > f(N.value));
|
|
43
|
+
const r = Number(o[1]), g = Number(o[2]), d = Number(o[3] || 0);
|
|
44
|
+
return r > 23 || g > 59 || d > 59 ? null : { hour: r, minute: g, second: d };
|
|
45
|
+
}, N = (e) => {
|
|
46
|
+
const o = `${c(e.hour)}:${c(e.minute)}`;
|
|
47
|
+
return t.showSeconds ? `${o}:${c(e.second)}` : o;
|
|
48
|
+
}, v = (e) => e.hour * 3600 + e.minute * 60 + e.second, q = n(() => i(t.minTime)), T = n(() => i(t.maxTime)), C = n(() => i(s.value)), u = y(C.value || { hour: 0, minute: 0, second: 0 }), _ = n(() => t.placeholder || I("pickATime"));
|
|
49
|
+
oe(s, (e) => {
|
|
50
|
+
const o = i(e);
|
|
51
|
+
o && (u.value = o);
|
|
52
|
+
});
|
|
53
|
+
const S = (e) => {
|
|
54
|
+
const o = v(e);
|
|
55
|
+
return !!(q.value && o < v(q.value) || T.value && o > v(T.value));
|
|
54
56
|
}, b = (e, o, r) => {
|
|
55
|
-
const
|
|
56
|
-
for (let l = 0; l <= o; l +=
|
|
57
|
-
return d.add(u.value[e]), Array.from(d).filter((l) => l >= 0 && l <= o).sort((l,
|
|
58
|
-
const
|
|
57
|
+
const g = h(r), d = /* @__PURE__ */ new Set();
|
|
58
|
+
for (let l = 0; l <= o; l += g) d.add(l);
|
|
59
|
+
return d.add(u.value[e]), Array.from(d).filter((l) => l >= 0 && l <= o).sort((l, w) => l - w).map((l) => {
|
|
60
|
+
const w = { ...u.value, [e]: l };
|
|
59
61
|
return {
|
|
60
|
-
label:
|
|
62
|
+
label: c(l),
|
|
61
63
|
value: l,
|
|
62
|
-
disabled:
|
|
64
|
+
disabled: S(w)
|
|
63
65
|
};
|
|
64
66
|
});
|
|
65
|
-
},
|
|
67
|
+
}, F = n(() => b("hour", 23, t.hourStep)), A = n(() => b("minute", 59, t.minuteStep)), R = n(() => b("second", 59, t.secondStep)), U = (e, o) => {
|
|
66
68
|
const r = { ...u.value, [e]: o };
|
|
67
|
-
|
|
68
|
-
}, U = () => {
|
|
69
|
-
s("update:model-value", null), a.value = !1;
|
|
69
|
+
S(r) || (u.value = r, p(N(r)));
|
|
70
70
|
}, j = () => {
|
|
71
|
-
a.value = !1;
|
|
71
|
+
p(null), a.value = !1;
|
|
72
72
|
}, E = () => {
|
|
73
|
-
|
|
73
|
+
a.value = !1;
|
|
74
74
|
}, G = () => {
|
|
75
|
-
|
|
75
|
+
t.disabled || (a.value = !a.value);
|
|
76
76
|
}, J = () => {
|
|
77
|
-
|
|
78
|
-
}, K = (
|
|
77
|
+
f.value = !0, m("focus");
|
|
78
|
+
}, K = () => {
|
|
79
|
+
f.value = !1, m("blur");
|
|
80
|
+
}, L = (e) => {
|
|
79
81
|
const o = e.target, r = i(o.value);
|
|
80
|
-
!r ||
|
|
81
|
-
},
|
|
82
|
-
() => t.showSeconds ?
|
|
83
|
-
),
|
|
84
|
-
() =>
|
|
85
|
-
nmorph: [
|
|
82
|
+
!r || S(r) || (u.value = r, p(N(r)));
|
|
83
|
+
}, Q = n(() => s.value || _.value), W = n(
|
|
84
|
+
() => t.showSeconds ? h(t.secondStep) : h(t.minuteStep) * 60
|
|
85
|
+
), X = n(() => t.clearable && !!s.value && !t.disabled), Y = n(
|
|
86
|
+
() => H({
|
|
87
|
+
nmorph: [O[t.height]],
|
|
86
88
|
"nmorph-time-picker": [
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
t.disabled && "disabled",
|
|
90
|
+
a.value && "open",
|
|
91
|
+
f.value && "focus",
|
|
92
|
+
!s.value && "placeholder"
|
|
91
93
|
]
|
|
92
94
|
})
|
|
93
|
-
),
|
|
94
|
-
() =>
|
|
95
|
-
nmorph: [
|
|
95
|
+
), Z = n(
|
|
96
|
+
() => H({
|
|
97
|
+
nmorph: [O[t.height]]
|
|
96
98
|
})
|
|
97
|
-
),
|
|
98
|
-
...t.width !== void 0 && { "--width":
|
|
99
|
+
), ee = n(() => ({
|
|
100
|
+
...t.width !== void 0 && { "--width": ne(t.width) }
|
|
99
101
|
}));
|
|
100
|
-
|
|
101
|
-
const
|
|
102
|
-
return
|
|
102
|
+
k({ inputDOMRef: x });
|
|
103
|
+
const V = { props: t, emit: m, t: I, id: P, name: $, autocomplete: z, tabindex: D, modelValue: s, updateModelValue: p, open: a, focused: f, inputDOMRef: x, pad: c, normalizeStep: h, parseTime: i, formatTime: N, timeToSeconds: v, minTimeParts: q, maxTimeParts: T, modelTimeParts: C, pickerValue: u, placeholderText: _, isOutsideRange: S, getUnitOptions: b, hourOptions: F, minuteOptions: A, secondOptions: R, selectUnit: U, clearHandler: j, closeHandler: E, toggleOpen: G, focusHandler: J, blurHandler: K, nativeInputHandler: L, displayValue: Q, inputStep: W, showClearButton: X, modifiers: Y, optionHeightModifiers: Z, styles: ee, get NmorphDropdown() {
|
|
104
|
+
return de;
|
|
103
105
|
}, get NmorphIcon() {
|
|
104
|
-
return
|
|
106
|
+
return ie;
|
|
105
107
|
}, get NmorphIconCircleClose() {
|
|
106
|
-
return
|
|
108
|
+
return ae;
|
|
107
109
|
}, get NmorphIconClock() {
|
|
108
|
-
return
|
|
110
|
+
return se;
|
|
109
111
|
} };
|
|
110
|
-
return Object.defineProperty(
|
|
112
|
+
return Object.defineProperty(V, "__isScriptSetup", { enumerable: !1, value: !0 }), V;
|
|
111
113
|
}
|
|
112
114
|
});
|
|
113
115
|
export {
|
|
114
|
-
|
|
116
|
+
Ne as default
|
|
115
117
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import './NmorphDropdown.css';
|
|
2
|
-
import { defineComponent as w, ref as q, toRef as
|
|
3
|
-
import { useModifiers as
|
|
2
|
+
import { defineComponent as w, ref as q, toRef as t, computed as l, watch as v } from "vue";
|
|
3
|
+
import { useModifiers as b } from "../../../utils/create-modifiers.js";
|
|
4
|
+
import { toCssSize as d } from "../../../utils/common.js";
|
|
4
5
|
import { usePlacement as x } from "../../../hooks/use-placement.js";
|
|
5
6
|
import O from "../../others/nmorph-overlay/NmorphOverlay.vue.js";
|
|
6
|
-
const
|
|
7
|
+
const B = /* @__PURE__ */ w({
|
|
7
8
|
__name: "NmorphDropdown",
|
|
8
9
|
props: {
|
|
9
10
|
open: { type: Boolean, required: !0 },
|
|
@@ -25,46 +26,46 @@ const k = /* @__PURE__ */ w({
|
|
|
25
26
|
hideShadow: { type: Boolean, required: !1, default: !1 }
|
|
26
27
|
},
|
|
27
28
|
emits: ["on-outside-click", "on-escape-keydown"],
|
|
28
|
-
setup(
|
|
29
|
-
|
|
30
|
-
const e =
|
|
31
|
-
initialPlacement:
|
|
29
|
+
setup(p, { expose: f, emit: m }) {
|
|
30
|
+
f();
|
|
31
|
+
const e = p, r = m, i = q(null), { placementCoords: o, placementReady: n, adjustPlacement: a } = x({
|
|
32
|
+
initialPlacement: t(e, "placement"),
|
|
32
33
|
contentDOMElement: i,
|
|
33
|
-
relativeElement:
|
|
34
|
-
yOffset:
|
|
35
|
-
xOffset:
|
|
36
|
-
enabled:
|
|
37
|
-
}),
|
|
38
|
-
() =>
|
|
39
|
-
"nmorph-dropdown": [
|
|
34
|
+
relativeElement: t(e, "relativeElement"),
|
|
35
|
+
yOffset: t(e, "yOffset"),
|
|
36
|
+
xOffset: t(e, "xOffset"),
|
|
37
|
+
enabled: t(e, "open")
|
|
38
|
+
}), c = l(
|
|
39
|
+
() => b({
|
|
40
|
+
"nmorph-dropdown": [!e.open && "closed", e.hideShadow && "hide-shadow"]
|
|
40
41
|
})
|
|
41
|
-
),
|
|
42
|
-
() => e.fillWidth && e.relativeElement ? `${e.relativeElement.clientWidth}px` :
|
|
43
|
-
), h =
|
|
44
|
-
"--nmorph-dropdown-width":
|
|
45
|
-
"--nmorph-dropdown-min-width":
|
|
46
|
-
"--nmorph-dropdown-max-width":
|
|
47
|
-
left:
|
|
48
|
-
top:
|
|
49
|
-
visibility: e.open &&
|
|
42
|
+
), s = l(
|
|
43
|
+
() => e.fillWidth && e.relativeElement ? `${e.relativeElement.clientWidth}px` : d(e.width)
|
|
44
|
+
), h = l(() => ({
|
|
45
|
+
"--nmorph-dropdown-width": s.value,
|
|
46
|
+
"--nmorph-dropdown-min-width": d(e.minWidth) || "auto",
|
|
47
|
+
"--nmorph-dropdown-max-width": d(e.maxWidth) || "none",
|
|
48
|
+
left: o.value.x,
|
|
49
|
+
top: o.value.y,
|
|
50
|
+
visibility: e.open && n.value ? "visible" : "hidden"
|
|
50
51
|
}));
|
|
51
|
-
|
|
52
|
+
v(
|
|
52
53
|
() => e.open,
|
|
53
|
-
(
|
|
54
|
-
|
|
54
|
+
(y) => {
|
|
55
|
+
y && a();
|
|
55
56
|
},
|
|
56
57
|
{ flush: "post" }
|
|
57
58
|
);
|
|
58
|
-
const
|
|
59
|
-
|
|
59
|
+
const u = { props: e, emit: r, dropdownDOMRef: i, placementCoords: o, placementReady: n, adjustPlacement: a, modifiers: c, width: s, dropdownStyle: h, outsideClickHandler: () => {
|
|
60
|
+
r("on-outside-click");
|
|
60
61
|
}, escapeHandler: () => {
|
|
61
|
-
|
|
62
|
+
r("on-escape-keydown");
|
|
62
63
|
}, get NmorphOverlay() {
|
|
63
64
|
return O;
|
|
64
65
|
} };
|
|
65
|
-
return Object.defineProperty(
|
|
66
|
+
return Object.defineProperty(u, "__isScriptSetup", { enumerable: !1, value: !0 }), u;
|
|
66
67
|
}
|
|
67
68
|
});
|
|
68
69
|
export {
|
|
69
|
-
|
|
70
|
+
B as default
|
|
70
71
|
};
|
|
@@ -22,7 +22,7 @@ const L = /* @__PURE__ */ _({
|
|
|
22
22
|
() => t.zIndex
|
|
23
23
|
), w = i(
|
|
24
24
|
() => F({
|
|
25
|
-
"nmorph-overlay": [
|
|
25
|
+
"nmorph-overlay": [t.show && "show", t.transparent && "transparent"]
|
|
26
26
|
})
|
|
27
27
|
), k = i(() => t.disabledTeleport || !t.show || typeof document > "u"), x = () => {
|
|
28
28
|
s("on-outside-click");
|
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
import { nmorphCombined as
|
|
2
|
-
const
|
|
3
|
-
"nmorph-body-4":
|
|
4
|
-
"nmorph-body-3":
|
|
5
|
-
"nmorph-body-2":
|
|
1
|
+
import { nmorphCombined as i, nmorphInset as s, nmorphOutset as h, title1 as d, title2 as l, title3 as p, title4 as c, body1 as e, body2 as b, body3 as r, body4 as m } from "../utils/theme-style.js";
|
|
2
|
+
const v = {
|
|
3
|
+
"nmorph-body-4": m,
|
|
4
|
+
"nmorph-body-3": r,
|
|
5
|
+
"nmorph-body-2": b,
|
|
6
6
|
"nmorph-body-1": e,
|
|
7
|
-
"nmorph-title-4":
|
|
8
|
-
"nmorph-title-3":
|
|
7
|
+
"nmorph-title-4": c,
|
|
8
|
+
"nmorph-title-3": p,
|
|
9
9
|
"nmorph-title-2": l,
|
|
10
|
-
"nmorph-title-1":
|
|
11
|
-
"nmorph--shadow-outset":
|
|
12
|
-
"nmorph--shadow-inset":
|
|
13
|
-
"nmorph--shadow-combined":
|
|
14
|
-
},
|
|
10
|
+
"nmorph-title-1": d,
|
|
11
|
+
"nmorph--shadow-outset": h,
|
|
12
|
+
"nmorph--shadow-inset": s,
|
|
13
|
+
"nmorph--shadow-combined": i
|
|
14
|
+
}, u = () => {
|
|
15
15
|
let t = `
|
|
16
16
|
:root {
|
|
17
17
|
--font-size-tiny: 10px;
|
|
@@ -284,7 +284,7 @@ const u = {
|
|
|
284
284
|
}
|
|
285
285
|
|
|
286
286
|
.nmorph--thin-component.nmorph-native-input {
|
|
287
|
-
${
|
|
287
|
+
${r()}
|
|
288
288
|
}
|
|
289
289
|
|
|
290
290
|
.nmorph-native-input:focus {
|
|
@@ -316,212 +316,6 @@ const u = {
|
|
|
316
316
|
}
|
|
317
317
|
}
|
|
318
318
|
|
|
319
|
-
.nmorph-avatar {
|
|
320
|
-
position: relative;
|
|
321
|
-
overflow: hidden;
|
|
322
|
-
display: flex;
|
|
323
|
-
align-items: center;
|
|
324
|
-
justify-content: center;
|
|
325
|
-
}
|
|
326
|
-
|
|
327
|
-
.nmorph-avatar--circle {
|
|
328
|
-
border-radius: var(--border-radius-circular);
|
|
329
|
-
}
|
|
330
|
-
|
|
331
|
-
.nmorph-avatar--square {
|
|
332
|
-
border-radius: var(--default-border-radius);
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
.nmorph-avatar > .nmorph-image {
|
|
336
|
-
position: absolute;
|
|
337
|
-
--width: var(--nmorph-avatar-size);
|
|
338
|
-
--height: var(--nmorph-avatar-size);
|
|
339
|
-
padding: var(--nmorph-avatar-image-padding);
|
|
340
|
-
border-radius: var(--nmorph-avatar-radius);
|
|
341
|
-
}
|
|
342
|
-
|
|
343
|
-
.nmorph-avatar.nmorph--shadow-combined {
|
|
344
|
-
border: var(--nmorph-avatar-frame-border) solid var(--nmorph-main-color);
|
|
345
|
-
background: var(--nmorph-main-color);
|
|
346
|
-
box-shadow: var(--nmorph-shadow-combined-dark);
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
.nmorph-avatar > .nmorph-image > img {
|
|
350
|
-
border-radius: var(--nmorph-avatar-image-radius);
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
.nmorph-avatar__initials {
|
|
354
|
-
color: var(--nmorph-text-color);
|
|
355
|
-
font-weight: 600;
|
|
356
|
-
line-height: 1;
|
|
357
|
-
}
|
|
358
|
-
|
|
359
|
-
.nmorph-avatar--preview {
|
|
360
|
-
cursor: pointer;
|
|
361
|
-
}
|
|
362
|
-
|
|
363
|
-
.nmorph-avatar--preview:hover > .nmorph-image {
|
|
364
|
-
filter: brightness(0.8);
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
.nmorph-image {
|
|
368
|
-
--width: auto;
|
|
369
|
-
--height: 100%;
|
|
370
|
-
width: var(--width);
|
|
371
|
-
height: var(--height);
|
|
372
|
-
display: flex;
|
|
373
|
-
align-items: center;
|
|
374
|
-
justify-content: center;
|
|
375
|
-
}
|
|
376
|
-
|
|
377
|
-
.nmorph-image.nmorph--shadow-combined {
|
|
378
|
-
border: var(--nmorph-image-frame-border) solid var(--nmorph-main-color);
|
|
379
|
-
}
|
|
380
|
-
|
|
381
|
-
.nmorph-image img {
|
|
382
|
-
width: 100%;
|
|
383
|
-
height: 100%;
|
|
384
|
-
object-fit: var(--nmorph-image-fit);
|
|
385
|
-
}
|
|
386
|
-
|
|
387
|
-
.nmorph-image__loading,
|
|
388
|
-
.nmorph-image__load-failed {
|
|
389
|
-
padding: 1rem;
|
|
390
|
-
}
|
|
391
|
-
|
|
392
|
-
.nmorph-image--hide img {
|
|
393
|
-
width: 0;
|
|
394
|
-
height: 0;
|
|
395
|
-
opacity: 0;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
.nmorph-text-input {
|
|
399
|
-
display: flex;
|
|
400
|
-
flex: 1 1 auto;
|
|
401
|
-
flex-direction: column;
|
|
402
|
-
align-items: flex-start;
|
|
403
|
-
min-width: 0;
|
|
404
|
-
--prepend-icon-indent: 8px;
|
|
405
|
-
--prepend-icon-size: 14px;
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
.nmorph-text-input__input-side {
|
|
409
|
-
position: relative;
|
|
410
|
-
display: flex;
|
|
411
|
-
align-items: center;
|
|
412
|
-
justify-content: flex-end;
|
|
413
|
-
width: 100%;
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
.nmorph-text-input__prepend-icon {
|
|
417
|
-
position: absolute;
|
|
418
|
-
left: 0;
|
|
419
|
-
z-index: 1;
|
|
420
|
-
display: flex;
|
|
421
|
-
align-items: center;
|
|
422
|
-
justify-content: center;
|
|
423
|
-
width: var(--prepend-icon-size);
|
|
424
|
-
min-width: var(--prepend-icon-size);
|
|
425
|
-
height: var(--prepend-icon-size);
|
|
426
|
-
min-height: var(--prepend-icon-size);
|
|
427
|
-
margin-left: var(--prepend-icon-indent);
|
|
428
|
-
pointer-events: none;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
.nmorph-text-input__prepend-icon svg,
|
|
432
|
-
.nmorph-text-input__prepend-icon .nmorph-icon,
|
|
433
|
-
.nmorph-text-input__prepend-icon .nmorph-icon__content {
|
|
434
|
-
width: 100%;
|
|
435
|
-
min-width: 100%;
|
|
436
|
-
height: 100%;
|
|
437
|
-
min-height: 100%;
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
.nmorph-text-input__prepend-icon svg {
|
|
441
|
-
fill: var(--nmorph-text-color);
|
|
442
|
-
stroke-width: 0;
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
.nmorph-text-input__prepend-icon path {
|
|
446
|
-
stroke: var(--nmorph-text-color);
|
|
447
|
-
}
|
|
448
|
-
|
|
449
|
-
.nmorph-text-input input {
|
|
450
|
-
width: 100%;
|
|
451
|
-
height: var(--height);
|
|
452
|
-
text-indent: var(--nmorph-text-input-indentation);
|
|
453
|
-
border: none;
|
|
454
|
-
border-radius: var(--default-border-radius);
|
|
455
|
-
${r()}
|
|
456
|
-
}
|
|
457
|
-
|
|
458
|
-
.nmorph-text-input--with-action input {
|
|
459
|
-
padding-right: calc(var(--height) + var(--indentation-03));
|
|
460
|
-
}
|
|
461
|
-
|
|
462
|
-
.nmorph-text-input input:focus {
|
|
463
|
-
${n()}
|
|
464
|
-
background: var(--nmorph-accent-color);
|
|
465
|
-
outline: none;
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
.nmorph-text-input.nmorph--focused .nmorph-text-input__prepend-icon svg {
|
|
469
|
-
fill: var(--nmorph-focus-text-color);
|
|
470
|
-
}
|
|
471
|
-
|
|
472
|
-
.nmorph-text-input.nmorph--focused .nmorph-text-input__prepend-icon path {
|
|
473
|
-
stroke: var(--nmorph-focus-text-color);
|
|
474
|
-
}
|
|
475
|
-
|
|
476
|
-
.nmorph-text-input input:-webkit-autofill,
|
|
477
|
-
.nmorph-text-input input:-webkit-autofill:hover,
|
|
478
|
-
.nmorph-text-input input:-webkit-autofill:active {
|
|
479
|
-
-webkit-text-fill-color: var(--nmorph-text-color);
|
|
480
|
-
caret-color: var(--nmorph-text-color);
|
|
481
|
-
box-shadow: var(--nmorph-shadow-inset), inset 0 0 0 1000px var(--nmorph-main-color);
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
.nmorph-text-input input:-webkit-autofill:focus {
|
|
485
|
-
-webkit-text-fill-color: var(--nmorph-focus-text-color);
|
|
486
|
-
caret-color: var(--nmorph-focus-text-color);
|
|
487
|
-
box-shadow: var(--nmorph-shadow-outset), inset 0 0 0 1000px var(--nmorph-accent-color);
|
|
488
|
-
outline: none;
|
|
489
|
-
}
|
|
490
|
-
|
|
491
|
-
.nmorph-text-input input:disabled {
|
|
492
|
-
cursor: not-allowed;
|
|
493
|
-
opacity: 0.6;
|
|
494
|
-
}
|
|
495
|
-
|
|
496
|
-
.nmorph-text-input__password-btn {
|
|
497
|
-
position: absolute;
|
|
498
|
-
right: 0;
|
|
499
|
-
height: 100%;
|
|
500
|
-
}
|
|
501
|
-
|
|
502
|
-
.nmorph-text-input__password-btn .nmorph-button__content {
|
|
503
|
-
padding: var(--indentation-03);
|
|
504
|
-
}
|
|
505
|
-
|
|
506
|
-
.nmorph-text-input.nmorph-button.nmorph--thin-component .nmorph-text-input__password-btn {
|
|
507
|
-
margin-top: var(--indentation-00);
|
|
508
|
-
}
|
|
509
|
-
|
|
510
|
-
.nmorph-text-input.nmorph-button.nmorph--thin-component .nmorph-text-input__password-btn .nmorph-button {
|
|
511
|
-
--height: var(--thin-component);
|
|
512
|
-
}
|
|
513
|
-
|
|
514
|
-
.nmorph-text-input.nmorph-button.nmorph--focused .nmorph-text-input__password-btn .nmorph-icon {
|
|
515
|
-
--color: var(--nmorph-white-color);
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
.nmorph-text-input.nmorph-button.nmorph--focused
|
|
519
|
-
.nmorph-text-input__password-btn
|
|
520
|
-
.nmorph-button:not(:disabled, [loading='true']):hover
|
|
521
|
-
.nmorph-icon {
|
|
522
|
-
--color: var(--nmorph-white-color);
|
|
523
|
-
}
|
|
524
|
-
|
|
525
319
|
.list-enter-active,
|
|
526
320
|
.list-leave-active {
|
|
527
321
|
transition: all var(--transition-02) ease;
|
|
@@ -563,74 +357,20 @@ const u = {
|
|
|
563
357
|
}
|
|
564
358
|
}
|
|
565
359
|
|
|
566
|
-
.nmorph-scroll {
|
|
567
|
-
--thumb-color: var(--nmorph-scroll-thumb-color, var(--nmorph-text-color));
|
|
568
|
-
color-scheme: var(--nmorph-scroll-color-scheme, light);
|
|
569
|
-
}
|
|
570
|
-
|
|
571
|
-
@-moz-document url-prefix() {
|
|
572
|
-
.nmorph-scroll {
|
|
573
|
-
scrollbar-color: var(--thumb-color) transparent;
|
|
574
|
-
scrollbar-width: thin;
|
|
575
|
-
}
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
.nmorph-scroll::-webkit-scrollbar {
|
|
579
|
-
width: var(--bar-width);
|
|
580
|
-
height: var(--bar-height);
|
|
581
|
-
background-color: transparent;
|
|
582
|
-
cursor: pointer;
|
|
583
|
-
transition: width ease-in-out 0.2s;
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
.nmorph-scroll::-webkit-scrollbar-button,
|
|
587
|
-
.nmorph-scroll::-webkit-scrollbar-button:single-button,
|
|
588
|
-
.nmorph-scroll::-webkit-scrollbar-button:double-button,
|
|
589
|
-
.nmorph-scroll::-webkit-scrollbar-button:vertical:start:decrement,
|
|
590
|
-
.nmorph-scroll::-webkit-scrollbar-button:vertical:end:increment,
|
|
591
|
-
.nmorph-scroll::-webkit-scrollbar-button:horizontal:start:decrement,
|
|
592
|
-
.nmorph-scroll::-webkit-scrollbar-button:horizontal:end:increment {
|
|
593
|
-
display: none !important;
|
|
594
|
-
width: 0 !important;
|
|
595
|
-
min-width: 0 !important;
|
|
596
|
-
max-width: 0 !important;
|
|
597
|
-
height: 0 !important;
|
|
598
|
-
min-height: 0 !important;
|
|
599
|
-
max-height: 0 !important;
|
|
600
|
-
border: 0 !important;
|
|
601
|
-
background: transparent !important;
|
|
602
|
-
background-image: none !important;
|
|
603
|
-
-webkit-appearance: none;
|
|
604
|
-
appearance: none;
|
|
605
|
-
}
|
|
606
|
-
|
|
607
|
-
.nmorph-scroll::-webkit-scrollbar-track {
|
|
608
|
-
border-radius: var(--border-radius-40);
|
|
609
|
-
${r()}
|
|
610
|
-
}
|
|
611
|
-
|
|
612
|
-
.nmorph-scroll::-webkit-scrollbar-thumb {
|
|
613
|
-
background-color: var(--thumb-color);
|
|
614
|
-
border-radius: var(--border-radius-40);
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
.nmorph-scroll::-webkit-scrollbar-corner {
|
|
618
|
-
background-color: transparent;
|
|
619
|
-
}
|
|
620
360
|
`;
|
|
621
|
-
for (const [
|
|
361
|
+
for (const [a, n] of Object.entries(v))
|
|
622
362
|
t += `
|
|
623
|
-
.${
|
|
624
|
-
${
|
|
363
|
+
.${a} {
|
|
364
|
+
${n()}
|
|
625
365
|
}
|
|
626
366
|
`;
|
|
627
367
|
return t;
|
|
628
368
|
}, g = () => {
|
|
629
369
|
if (typeof document > "u" || document.getElementById("nmorph-common-styles")) return;
|
|
630
370
|
const o = document.createElement("style");
|
|
631
|
-
o.id = "nmorph-common-styles", o.innerHTML =
|
|
371
|
+
o.id = "nmorph-common-styles", o.innerHTML = u(), document.head.appendChild(o);
|
|
632
372
|
};
|
|
633
373
|
export {
|
|
634
|
-
|
|
374
|
+
u as getCommonStyles,
|
|
635
375
|
g as useCommonStyles
|
|
636
376
|
};
|