vunor 0.3.1 → 0.4.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 +8 -1
- package/dist/AppLayout.mjs +17 -68
- package/dist/AppToasts.d.mts +3 -0
- package/dist/AppToasts.mjs +59 -76
- package/dist/Button.d.mts +26 -10
- package/dist/Button.mjs +95 -60
- package/dist/ButtonBase.mjs +26 -40
- package/dist/Calendar.d.mts +14 -2
- package/dist/Calendar.mjs +37 -85
- package/dist/Card.mjs +6 -25
- package/dist/CardHeader.mjs +3 -12
- package/dist/Checkbox.d.mts +7 -2
- package/dist/Checkbox.mjs +37 -45
- package/dist/Combobox.d.mts +24 -8
- package/dist/Combobox.mjs +274 -350
- package/dist/DatePicker.d.mts +18 -4
- package/dist/DatePicker.mjs +93 -216
- package/dist/DatePickerBase.d.mts +21 -8
- package/dist/DatePickerBase.mjs +108 -257
- package/dist/DatePickerPopup.d.mts +27 -2
- package/dist/DatePickerPopup.mjs +62 -13
- package/dist/DelayedSwitch.mjs +3 -14
- package/dist/DevTools.mjs +377 -388
- package/dist/Dialog.d.mts +8 -3
- package/dist/Dialog.mjs +77 -107
- package/dist/Icon.mjs +1 -4
- package/dist/InnerLoading.mjs +1 -4
- package/dist/Input.mjs +35 -126
- package/dist/InputBase.mjs +28 -93
- package/dist/LoadingIndicator.mjs +1 -5
- package/dist/Menu.mjs +44 -65
- package/dist/MenuItem.mjs +4 -16
- package/dist/OverflowContainer.mjs +9 -11
- package/dist/Pagination.mjs +11 -29
- package/dist/Popover.d.mts +39 -11
- package/dist/Popover.mjs +80 -99
- package/dist/ProgressBar.d.mts +9 -2
- package/dist/ProgressBar.mjs +11 -27
- package/dist/RadioGroup.d.mts +2 -1
- package/dist/RadioGroup.mjs +33 -47
- package/dist/Select.d.mts +24 -7
- package/dist/Select.mjs +94 -186
- package/dist/SelectBase.d.mts +26 -11
- package/dist/SelectBase.mjs +59 -83
- package/dist/Slider.d.mts +6 -1
- package/dist/Slider.mjs +34 -103
- package/dist/Tabs.mjs +13 -49
- package/dist/forward-root-DPGTBptG.js +125 -0
- package/dist/nuxt.mjs +36 -1
- package/dist/theme.d.mts +1 -1
- package/dist/theme.mjs +22 -5
- package/dist/{utils-6bTTIoaw.js → utils-BCBGEM10.js} +30 -1
- package/dist/utils.mjs +1 -1
- package/dist/vite.d.mts +13 -4
- package/dist/vite.mjs +5 -0
- package/package.json +24 -9
- package/dist/utils-Z0nPSAzb.js +0 -42
package/dist/Dialog.d.mts
CHANGED
|
@@ -7,7 +7,10 @@ interface TFooterButton {
|
|
|
7
7
|
}
|
|
8
8
|
type __VLS_Props = {
|
|
9
9
|
defaultOpen?: boolean;
|
|
10
|
+
/** Styles the overlay as a modal backdrop. The dialog itself is always modal. */
|
|
10
11
|
modal?: boolean;
|
|
12
|
+
/** Forwarded to Reka `DialogContent`. */
|
|
13
|
+
disableOutsidePointerEvents?: boolean;
|
|
11
14
|
rounded?: boolean;
|
|
12
15
|
title?: string;
|
|
13
16
|
focusFirstSelector?: string;
|
|
@@ -39,13 +42,15 @@ type __VLS_Slots = {} & {
|
|
|
39
42
|
footer?: (props: typeof __VLS_64) => any;
|
|
40
43
|
};
|
|
41
44
|
declare const __VLS_base: import("vue").DefineComponent<__VLS_PublicProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
42
|
-
"update:open": (value: boolean
|
|
45
|
+
"update:open": (value: boolean) => any;
|
|
43
46
|
} & {
|
|
44
|
-
|
|
47
|
+
"footer-click": (button: string, event: MouseEvent) => any;
|
|
45
48
|
}, string, import("vue").PublicProps, Readonly<__VLS_PublicProps> & Readonly<{
|
|
46
|
-
|
|
49
|
+
"onUpdate:open"?: ((value: boolean) => any) | undefined;
|
|
50
|
+
"onFooter-click"?: ((button: string, event: MouseEvent) => any) | undefined;
|
|
47
51
|
}>, {
|
|
48
52
|
level: "h1" | "h2" | "h3" | "h4" | "h5" | "h6" | "subheading" | "body-l" | "body" | "body-s" | "callout";
|
|
53
|
+
disableOutsidePointerEvents: boolean;
|
|
49
54
|
focusFirstSelector: string;
|
|
50
55
|
contentClass: TVueCssClass;
|
|
51
56
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
package/dist/Dialog.mjs
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { n as useForwardToRoot, r as useModelState } from "./forward-root-DPGTBptG.js";
|
|
2
|
+
import { ErrorCodes, Fragment, callWithAsyncErrorHandling, camelize, computed, createBlock, createCommentVNode, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, mergeModels, mergeProps, nextTick, normalizeClass, onMounted, openBlock, ref, renderList, renderSlot, toDisplayString, toHandlerKey, unref, useAttrs, useModel, watch, withCtx } from "vue";
|
|
2
3
|
import { DialogClose, DialogContent, DialogOverlay, DialogPortal, DialogRoot, DialogTitle } from "reka-ui";
|
|
3
4
|
import VuButton from "vunor/Button";
|
|
4
5
|
import VuIcon from "vunor/Icon";
|
|
@@ -12,99 +13,35 @@ const _hoisted_3 = { class: "dialog-footer" };
|
|
|
12
13
|
//#endregion
|
|
13
14
|
//#region src/components/Dialog/Dialog.vue
|
|
14
15
|
var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
16
|
+
inheritAttrs: false,
|
|
15
17
|
__name: "Dialog",
|
|
16
18
|
props: /* @__PURE__ */ mergeModels({
|
|
17
|
-
defaultOpen: {
|
|
19
|
+
defaultOpen: { type: Boolean },
|
|
20
|
+
modal: { type: Boolean },
|
|
21
|
+
disableOutsidePointerEvents: {
|
|
18
22
|
type: Boolean,
|
|
19
|
-
|
|
20
|
-
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
},
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
class: {
|
|
39
|
-
type: [
|
|
40
|
-
String,
|
|
41
|
-
Array,
|
|
42
|
-
Object
|
|
43
|
-
],
|
|
44
|
-
required: false
|
|
45
|
-
},
|
|
46
|
-
overlayClass: {
|
|
47
|
-
type: [
|
|
48
|
-
String,
|
|
49
|
-
Array,
|
|
50
|
-
Object
|
|
51
|
-
],
|
|
52
|
-
required: false
|
|
53
|
-
},
|
|
54
|
-
contentClass: {
|
|
55
|
-
type: [
|
|
56
|
-
String,
|
|
57
|
-
Array,
|
|
58
|
-
Object
|
|
59
|
-
],
|
|
60
|
-
required: false,
|
|
61
|
-
default: "px-$card-spacing py-$m flex-grow-1 overflow-auto"
|
|
62
|
-
},
|
|
63
|
-
closeButton: {
|
|
23
|
+
default: void 0
|
|
24
|
+
},
|
|
25
|
+
rounded: { type: Boolean },
|
|
26
|
+
title: {},
|
|
27
|
+
focusFirstSelector: { default: "input" },
|
|
28
|
+
class: {},
|
|
29
|
+
overlayClass: {},
|
|
30
|
+
contentClass: { default: "px-$card-spacing py-$m flex-grow-1 overflow-auto" },
|
|
31
|
+
closeButton: { type: Boolean },
|
|
32
|
+
footerButtons: {},
|
|
33
|
+
level: { default: "h4" },
|
|
34
|
+
onEscapeKeyDown: {},
|
|
35
|
+
onPointerDownOutside: {},
|
|
36
|
+
onFocusOutside: {},
|
|
37
|
+
onInteractOutside: {},
|
|
38
|
+
onOpenAutoFocus: {},
|
|
39
|
+
onCloseAutoFocus: {}
|
|
40
|
+
}, {
|
|
41
|
+
"open": {
|
|
64
42
|
type: Boolean,
|
|
65
|
-
|
|
66
|
-
},
|
|
67
|
-
footerButtons: {
|
|
68
|
-
type: Array,
|
|
69
|
-
required: false
|
|
70
|
-
},
|
|
71
|
-
level: {
|
|
72
|
-
type: String,
|
|
73
|
-
required: false,
|
|
74
|
-
default: "h4"
|
|
43
|
+
default: void 0
|
|
75
44
|
},
|
|
76
|
-
onEscapeKeyDown: {
|
|
77
|
-
type: Function,
|
|
78
|
-
required: false,
|
|
79
|
-
skipCheck: true
|
|
80
|
-
},
|
|
81
|
-
onPointerDownOutside: {
|
|
82
|
-
type: Function,
|
|
83
|
-
required: false,
|
|
84
|
-
skipCheck: true
|
|
85
|
-
},
|
|
86
|
-
onFocusOutside: {
|
|
87
|
-
type: Function,
|
|
88
|
-
required: false,
|
|
89
|
-
skipCheck: true
|
|
90
|
-
},
|
|
91
|
-
onInteractOutside: {
|
|
92
|
-
type: Function,
|
|
93
|
-
required: false,
|
|
94
|
-
skipCheck: true
|
|
95
|
-
},
|
|
96
|
-
onOpenAutoFocus: {
|
|
97
|
-
type: Function,
|
|
98
|
-
required: false,
|
|
99
|
-
skipCheck: true
|
|
100
|
-
},
|
|
101
|
-
onCloseAutoFocus: {
|
|
102
|
-
type: Function,
|
|
103
|
-
required: false,
|
|
104
|
-
skipCheck: true
|
|
105
|
-
}
|
|
106
|
-
}, {
|
|
107
|
-
"open": { type: Boolean },
|
|
108
45
|
"openModifiers": {}
|
|
109
46
|
}),
|
|
110
47
|
emits: /* @__PURE__ */ mergeModels(["footer-click"], ["update:open"]),
|
|
@@ -112,7 +49,38 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
112
49
|
const open = useModel(__props, "open");
|
|
113
50
|
const internalOpen = ref(false);
|
|
114
51
|
const props = __props;
|
|
52
|
+
const isOpen = useModelState(open, DialogRoot, "defaultOpen", props);
|
|
53
|
+
const contentProps = useForwardToRoot(DialogContent, props, void 0, [
|
|
54
|
+
"forceMount",
|
|
55
|
+
"asChild",
|
|
56
|
+
"as"
|
|
57
|
+
]);
|
|
115
58
|
const emit = __emit;
|
|
59
|
+
const instance = getCurrentInstance();
|
|
60
|
+
const firedOnce = /* @__PURE__ */ new Set();
|
|
61
|
+
function emitFooterLabel(event, ...args) {
|
|
62
|
+
const listeners = instance?.vnode.props ?? {};
|
|
63
|
+
let handlerName = toHandlerKey(event);
|
|
64
|
+
let handler = listeners[handlerName];
|
|
65
|
+
if (!handler) {
|
|
66
|
+
handlerName = toHandlerKey(camelize(event));
|
|
67
|
+
handler = listeners[handlerName];
|
|
68
|
+
}
|
|
69
|
+
const call = (fn) => callWithAsyncErrorHandling(fn, instance, ErrorCodes.COMPONENT_EVENT_HANDLER, args);
|
|
70
|
+
if (handler) call(handler);
|
|
71
|
+
const onceHandler = listeners[`${handlerName}Once`];
|
|
72
|
+
if (onceHandler && !firedOnce.has(handlerName)) {
|
|
73
|
+
firedOnce.add(handlerName);
|
|
74
|
+
call(onceHandler);
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
const FOOTER_LISTENER = /^on(FooterClick|Footer-click-)/;
|
|
78
|
+
const attrs = useAttrs();
|
|
79
|
+
function cardAttrs() {
|
|
80
|
+
const keys = Object.keys(attrs);
|
|
81
|
+
if (!keys.some((key) => FOOTER_LISTENER.test(key))) return attrs;
|
|
82
|
+
return Object.fromEntries(keys.filter((key) => !FOOTER_LISTENER.test(key)).map((k) => [k, attrs[k]]));
|
|
83
|
+
}
|
|
116
84
|
async function applyFocusFirstSelector() {
|
|
117
85
|
await nextTick();
|
|
118
86
|
const input = root.value?.$el?.querySelector(props.focusFirstSelector);
|
|
@@ -133,12 +101,12 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
133
101
|
});
|
|
134
102
|
const root = ref();
|
|
135
103
|
function emitFooterClick(btn, event) {
|
|
136
|
-
|
|
137
|
-
emit(
|
|
104
|
+
emitFooterLabel(`footer-click-${btn.toLowerCase().replace(/\s*/g, "")}`, event);
|
|
105
|
+
emit("footer-click", btn, event);
|
|
138
106
|
}
|
|
139
107
|
const closing = ref(false);
|
|
140
|
-
watch(
|
|
141
|
-
if (
|
|
108
|
+
watch(isOpen, () => {
|
|
109
|
+
if (isOpen.value) {
|
|
142
110
|
internalOpen.value = true;
|
|
143
111
|
closing.value = false;
|
|
144
112
|
applyFocusFirstSelector();
|
|
@@ -150,10 +118,10 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
150
118
|
}
|
|
151
119
|
});
|
|
152
120
|
function onUpdateOpen(newValue) {
|
|
153
|
-
|
|
121
|
+
isOpen.value = newValue;
|
|
154
122
|
}
|
|
155
123
|
onMounted(() => {
|
|
156
|
-
internalOpen.value =
|
|
124
|
+
internalOpen.value = isOpen.value;
|
|
157
125
|
applyFocusFirstSelector();
|
|
158
126
|
});
|
|
159
127
|
return (_ctx, _cache) => {
|
|
@@ -166,7 +134,7 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
166
134
|
default: withCtx(() => [createVNode(unref(DialogOverlay), {
|
|
167
135
|
class: normalizeClass(unref(mergeCssClasses)({ "dialog-overlay": __props.modal }, __props.overlayClass)),
|
|
168
136
|
"data-closing": closing.value ? "" : void 0
|
|
169
|
-
}, null, 8, ["class", "data-closing"]), createVNode(unref(DialogContent), {
|
|
137
|
+
}, null, 8, ["class", "data-closing"]), createVNode(unref(DialogContent), mergeProps(unref(contentProps), {
|
|
170
138
|
"as-child": "",
|
|
171
139
|
onEscapeKeyDown: __props.onEscapeKeyDown,
|
|
172
140
|
onPointerDownOutside: __props.onPointerDownOutside,
|
|
@@ -174,16 +142,19 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
174
142
|
onInteractOutside: __props.onInteractOutside,
|
|
175
143
|
onOpenAutoFocus: __props.onOpenAutoFocus,
|
|
176
144
|
onCloseAutoFocus: __props.onCloseAutoFocus
|
|
177
|
-
}, {
|
|
178
|
-
default: withCtx(() => [createVNode(VuCard, {
|
|
145
|
+
}), {
|
|
146
|
+
default: withCtx(() => [createVNode(VuCard, mergeProps({
|
|
147
|
+
...closing.value ? { "data-closing": "" } : {},
|
|
148
|
+
...cardAttrs(),
|
|
149
|
+
"aria-describedby": _ctx.$attrs["aria-describedby"]
|
|
150
|
+
}, {
|
|
179
151
|
ref_key: "root",
|
|
180
152
|
ref: root,
|
|
181
153
|
level: __props.level,
|
|
182
154
|
"no-padding": "",
|
|
183
155
|
rounded: __props.rounded,
|
|
184
|
-
class:
|
|
185
|
-
|
|
186
|
-
}, {
|
|
156
|
+
class: ["dialog-card", props.class]
|
|
157
|
+
}), {
|
|
187
158
|
default: withCtx(() => [
|
|
188
159
|
__props.title || _ctx.$slots.header || _ctx.$slots.title ? (openBlock(), createBlock(unref(DialogTitle), {
|
|
189
160
|
key: 0,
|
|
@@ -198,9 +169,9 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
198
169
|
}, {
|
|
199
170
|
default: withCtx(() => [createElementVNode("button", _hoisted_2, [createVNode(VuIcon, { name: "i--close" })])]),
|
|
200
171
|
_: 1
|
|
201
|
-
})) : createCommentVNode("
|
|
172
|
+
})) : createCommentVNode("", true)])])]),
|
|
202
173
|
_: 3
|
|
203
|
-
})) : createCommentVNode("
|
|
174
|
+
})) : createCommentVNode("", true),
|
|
204
175
|
createElementVNode("section", { class: normalizeClass(__props.contentClass) }, [renderSlot(_ctx.$slots, "default")], 2),
|
|
205
176
|
_footerButtons.value?.length || _ctx.$slots.footer ? renderSlot(_ctx.$slots, "footer", { key: 1 }, () => [createElementVNode("footer", _hoisted_3, [(openBlock(true), createElementBlock(Fragment, null, renderList(_footerButtons.value, (button) => {
|
|
206
177
|
return openBlock(), createElementBlock(Fragment, null, [!button.closeDialog ? (openBlock(), createBlock(VuButton, {
|
|
@@ -231,17 +202,16 @@ var Dialog_default = /* @__PURE__ */ defineComponent({
|
|
|
231
202
|
])]),
|
|
232
203
|
_: 2
|
|
233
204
|
}, 1024))], 64);
|
|
234
|
-
}), 256))])]) : createCommentVNode("
|
|
205
|
+
}), 256))])]) : createCommentVNode("", true)
|
|
235
206
|
]),
|
|
236
207
|
_: 3
|
|
237
|
-
},
|
|
208
|
+
}, 16, [
|
|
238
209
|
"level",
|
|
239
210
|
"rounded",
|
|
240
|
-
"data-closing",
|
|
241
211
|
"class"
|
|
242
212
|
])]),
|
|
243
213
|
_: 3
|
|
244
|
-
},
|
|
214
|
+
}, 16, [
|
|
245
215
|
"onEscapeKeyDown",
|
|
246
216
|
"onPointerDownOutside",
|
|
247
217
|
"onFocusOutside",
|
package/dist/Icon.mjs
CHANGED
|
@@ -3,10 +3,7 @@ import { createElementBlock, defineComponent, normalizeClass, openBlock } from "
|
|
|
3
3
|
//#region src/components/Icon/Icon.vue
|
|
4
4
|
var Icon_default = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "Icon",
|
|
6
|
-
props: { name: {
|
|
7
|
-
type: String,
|
|
8
|
-
required: true
|
|
9
|
-
} },
|
|
6
|
+
props: { name: {} },
|
|
10
7
|
setup(__props) {
|
|
11
8
|
return (_ctx, _cache) => {
|
|
12
9
|
return openBlock(), createElementBlock("div", { class: normalizeClass([__props.name, "icon-color icon-size"]) }, null, 2);
|
package/dist/InnerLoading.mjs
CHANGED
|
@@ -6,10 +6,7 @@ const _hoisted_1 = { class: "inner-loading" };
|
|
|
6
6
|
//#region src/components/Loading/InnerLoading.vue
|
|
7
7
|
var InnerLoading_default = /* @__PURE__ */ defineComponent({
|
|
8
8
|
__name: "InnerLoading",
|
|
9
|
-
props: { size: {
|
|
10
|
-
type: String,
|
|
11
|
-
required: false
|
|
12
|
-
} },
|
|
9
|
+
props: { size: {} },
|
|
13
10
|
setup(__props) {
|
|
14
11
|
return (_ctx, _cache) => {
|
|
15
12
|
return openBlock(), createElementBlock("div", _hoisted_1, [renderSlot(_ctx.$slots, "default", {}, () => [createVNode(VuLoadingIndicator, { size: __props.size }, null, 8, ["size"])])]);
|
package/dist/Input.mjs
CHANGED
|
@@ -25,129 +25,38 @@ const _hoisted_7 = {
|
|
|
25
25
|
var Input_default = /* @__PURE__ */ defineComponent({
|
|
26
26
|
__name: "Input",
|
|
27
27
|
props: /* @__PURE__ */ mergeModels({
|
|
28
|
-
iconBefore: {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
},
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
},
|
|
57
|
-
|
|
58
|
-
type: Function,
|
|
59
|
-
required: false
|
|
60
|
-
},
|
|
61
|
-
onClick: {
|
|
62
|
-
type: Function,
|
|
63
|
-
required: false
|
|
64
|
-
},
|
|
65
|
-
onBlur: {
|
|
66
|
-
type: Function,
|
|
67
|
-
required: false
|
|
68
|
-
},
|
|
69
|
-
onFocus: {
|
|
70
|
-
type: Function,
|
|
71
|
-
required: false
|
|
72
|
-
},
|
|
73
|
-
label: {
|
|
74
|
-
type: String,
|
|
75
|
-
required: false
|
|
76
|
-
},
|
|
77
|
-
design: {
|
|
78
|
-
type: String,
|
|
79
|
-
required: false
|
|
80
|
-
},
|
|
81
|
-
iconPrepend: {
|
|
82
|
-
type: String,
|
|
83
|
-
required: false
|
|
84
|
-
},
|
|
85
|
-
iconAppend: {
|
|
86
|
-
type: String,
|
|
87
|
-
required: false
|
|
88
|
-
},
|
|
89
|
-
groupItem: {
|
|
90
|
-
type: Boolean,
|
|
91
|
-
required: false
|
|
92
|
-
},
|
|
93
|
-
autoGrow: {
|
|
94
|
-
type: Boolean,
|
|
95
|
-
required: false
|
|
96
|
-
},
|
|
97
|
-
active: {
|
|
98
|
-
type: Boolean,
|
|
99
|
-
required: false
|
|
100
|
-
},
|
|
101
|
-
loading: {
|
|
102
|
-
type: Boolean,
|
|
103
|
-
required: false
|
|
104
|
-
},
|
|
105
|
-
noUnderline: {
|
|
106
|
-
type: Boolean,
|
|
107
|
-
required: false
|
|
108
|
-
},
|
|
109
|
-
onAppendClick: {
|
|
110
|
-
type: Function,
|
|
111
|
-
required: false
|
|
112
|
-
},
|
|
113
|
-
onPrependClick: {
|
|
114
|
-
type: Function,
|
|
115
|
-
required: false
|
|
116
|
-
},
|
|
117
|
-
placeholder: {
|
|
118
|
-
type: String,
|
|
119
|
-
required: false
|
|
120
|
-
},
|
|
121
|
-
type: {
|
|
122
|
-
type: String,
|
|
123
|
-
required: false
|
|
124
|
-
},
|
|
125
|
-
rows: {
|
|
126
|
-
type: Number,
|
|
127
|
-
required: false
|
|
128
|
-
},
|
|
129
|
-
required: {
|
|
130
|
-
type: Boolean,
|
|
131
|
-
required: false
|
|
132
|
-
},
|
|
133
|
-
maxlength: {
|
|
134
|
-
type: Number,
|
|
135
|
-
required: false
|
|
136
|
-
},
|
|
137
|
-
disabled: {
|
|
138
|
-
type: Boolean,
|
|
139
|
-
required: false
|
|
140
|
-
},
|
|
141
|
-
readonly: {
|
|
142
|
-
type: Boolean,
|
|
143
|
-
required: false
|
|
144
|
-
},
|
|
145
|
-
autocomplete: {
|
|
146
|
-
type: String,
|
|
147
|
-
required: false
|
|
148
|
-
}
|
|
28
|
+
iconBefore: {},
|
|
29
|
+
iconAfter: {},
|
|
30
|
+
error: { type: [String, Boolean] },
|
|
31
|
+
hint: {},
|
|
32
|
+
groupTemplate: { default: "repeat(1, 1fr)" },
|
|
33
|
+
stackLabel: { type: Boolean },
|
|
34
|
+
onBeforeClick: {},
|
|
35
|
+
onAfterClick: {},
|
|
36
|
+
onClick: {},
|
|
37
|
+
onBlur: {},
|
|
38
|
+
onFocus: {},
|
|
39
|
+
label: {},
|
|
40
|
+
design: {},
|
|
41
|
+
iconPrepend: {},
|
|
42
|
+
iconAppend: {},
|
|
43
|
+
groupItem: { type: Boolean },
|
|
44
|
+
autoGrow: { type: Boolean },
|
|
45
|
+
active: { type: Boolean },
|
|
46
|
+
loading: { type: Boolean },
|
|
47
|
+
noUnderline: { type: Boolean },
|
|
48
|
+
onAppendClick: {},
|
|
49
|
+
onPrependClick: {},
|
|
50
|
+
placeholder: {},
|
|
51
|
+
type: {},
|
|
52
|
+
rows: {},
|
|
53
|
+
required: { type: Boolean },
|
|
54
|
+
maxlength: {},
|
|
55
|
+
disabled: { type: Boolean },
|
|
56
|
+
readonly: { type: Boolean },
|
|
57
|
+
autocomplete: {}
|
|
149
58
|
}, {
|
|
150
|
-
"modelValue": {
|
|
59
|
+
"modelValue": {},
|
|
151
60
|
"modelModifiers": {}
|
|
152
61
|
}),
|
|
153
62
|
emits: /* @__PURE__ */ mergeModels([
|
|
@@ -181,12 +90,12 @@ var Input_default = /* @__PURE__ */ defineComponent({
|
|
|
181
90
|
}, [renderSlot(_ctx.$slots, "before", {}, () => [createElementVNode("div", {
|
|
182
91
|
class: "i8-icon-wrap",
|
|
183
92
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("beforeClick", $event))
|
|
184
|
-
}, [createVNode(VuIcon, { name: __props.iconBefore }, null, 8, ["name"])])])], 2)) : createCommentVNode("
|
|
93
|
+
}, [createVNode(VuIcon, { name: __props.iconBefore }, null, 8, ["name"])])])], 2)) : createCommentVNode("", true),
|
|
185
94
|
createElementVNode("div", _hoisted_3, [
|
|
186
95
|
!!__props.label && __props.stackLabel ? (openBlock(), createElementBlock("div", _hoisted_4, [createVNode(VuLabel, null, {
|
|
187
96
|
default: withCtx(() => [createTextVNode(toDisplayString(__props.label), 1)]),
|
|
188
97
|
_: 1
|
|
189
|
-
})])) : createCommentVNode("
|
|
98
|
+
})])) : createCommentVNode("", true),
|
|
190
99
|
createElementVNode("div", {
|
|
191
100
|
class: normalizeClass(["w-full", { "cursor-pointer": !!__props.onClick }]),
|
|
192
101
|
style: normalizeStyle({
|
|
@@ -221,7 +130,7 @@ var Input_default = /* @__PURE__ */ defineComponent({
|
|
|
221
130
|
key: "3"
|
|
222
131
|
} : void 0
|
|
223
132
|
]), 1040, ["modelValue"])])], 6),
|
|
224
|
-
createElementVNode("div", { class: normalizeClass(__props.stackLabel ? "i8-hint-wrapper-stack" : "i8-hint-wrapper") }, [__props.hint || __props.error ? (openBlock(), createElementBlock("div", _hoisted_5, [_ctx.$slots.error || typeof __props.error === "string" && __props.error.length ? renderSlot(_ctx.$slots, "error", { key: 0 }, () => [createElementVNode("span", _hoisted_6, toDisplayString(__props.error), 1)]) : !!__props.hint || _ctx.$slots.hint ? renderSlot(_ctx.$slots, "hint", { key: 1 }, () => [createElementVNode("span", null, toDisplayString(__props.hint), 1)]) : createCommentVNode("
|
|
133
|
+
createElementVNode("div", { class: normalizeClass(__props.stackLabel ? "i8-hint-wrapper-stack" : "i8-hint-wrapper") }, [__props.hint || __props.error ? (openBlock(), createElementBlock("div", _hoisted_5, [_ctx.$slots.error || typeof __props.error === "string" && __props.error.length ? renderSlot(_ctx.$slots, "error", { key: 0 }, () => [createElementVNode("span", _hoisted_6, toDisplayString(__props.error), 1)]) : !!__props.hint || _ctx.$slots.hint ? renderSlot(_ctx.$slots, "hint", { key: 1 }, () => [createElementVNode("span", null, toDisplayString(__props.hint), 1)]) : createCommentVNode("", true)])) : createCommentVNode("", true), !!__props.maxlength || _ctx.$slots.counter ? (openBlock(), createElementBlock("div", _hoisted_7, [renderSlot(_ctx.$slots, "counter", {}, () => [createTextVNode(toDisplayString(String(modelValue.value || "").length || 0) + "/" + toDisplayString(__props.maxlength), 1)])])) : createCommentVNode("", true)], 2)
|
|
225
134
|
]),
|
|
226
135
|
_ctx.$slots.after || !!__props.iconAfter ? (openBlock(), createElementBlock("div", {
|
|
227
136
|
key: 1,
|
|
@@ -229,7 +138,7 @@ var Input_default = /* @__PURE__ */ defineComponent({
|
|
|
229
138
|
}, [renderSlot(_ctx.$slots, "after", {}, () => [createElementVNode("div", {
|
|
230
139
|
class: "i8-icon-wrap",
|
|
231
140
|
onClick: _cache[3] || (_cache[3] = ($event) => emit("afterClick", $event))
|
|
232
|
-
}, [createVNode(VuIcon, { name: __props.iconAfter }, null, 8, ["name"])])])], 2)) : createCommentVNode("
|
|
141
|
+
}, [createVNode(VuIcon, { name: __props.iconAfter }, null, 8, ["name"])])])], 2)) : createCommentVNode("", true)
|
|
233
142
|
])], 10, _hoisted_1);
|
|
234
143
|
};
|
|
235
144
|
}
|
package/dist/InputBase.mjs
CHANGED
|
@@ -25,94 +25,29 @@ const _hoisted_7 = { class: "i8-loading" };
|
|
|
25
25
|
var InputBase_default = /* @__PURE__ */ defineComponent({
|
|
26
26
|
__name: "InputBase",
|
|
27
27
|
props: /* @__PURE__ */ mergeModels({
|
|
28
|
-
label: {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
},
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
}
|
|
49
|
-
autoGrow: {
|
|
50
|
-
type: Boolean,
|
|
51
|
-
required: false
|
|
52
|
-
},
|
|
53
|
-
active: {
|
|
54
|
-
type: Boolean,
|
|
55
|
-
required: false
|
|
56
|
-
},
|
|
57
|
-
loading: {
|
|
58
|
-
type: Boolean,
|
|
59
|
-
required: false
|
|
60
|
-
},
|
|
61
|
-
noUnderline: {
|
|
62
|
-
type: Boolean,
|
|
63
|
-
required: false
|
|
64
|
-
},
|
|
65
|
-
onAppendClick: {
|
|
66
|
-
type: Function,
|
|
67
|
-
required: false
|
|
68
|
-
},
|
|
69
|
-
onPrependClick: {
|
|
70
|
-
type: Function,
|
|
71
|
-
required: false
|
|
72
|
-
},
|
|
73
|
-
onBlur: {
|
|
74
|
-
type: Function,
|
|
75
|
-
required: false
|
|
76
|
-
},
|
|
77
|
-
onFocus: {
|
|
78
|
-
type: Function,
|
|
79
|
-
required: false
|
|
80
|
-
},
|
|
81
|
-
placeholder: {
|
|
82
|
-
type: String,
|
|
83
|
-
required: false
|
|
84
|
-
},
|
|
85
|
-
type: {
|
|
86
|
-
type: String,
|
|
87
|
-
required: false
|
|
88
|
-
},
|
|
89
|
-
rows: {
|
|
90
|
-
type: Number,
|
|
91
|
-
required: false,
|
|
92
|
-
default: 3
|
|
93
|
-
},
|
|
94
|
-
required: {
|
|
95
|
-
type: Boolean,
|
|
96
|
-
required: false
|
|
97
|
-
},
|
|
98
|
-
maxlength: {
|
|
99
|
-
type: Number,
|
|
100
|
-
required: false
|
|
101
|
-
},
|
|
102
|
-
disabled: {
|
|
103
|
-
type: Boolean,
|
|
104
|
-
required: false
|
|
105
|
-
},
|
|
106
|
-
readonly: {
|
|
107
|
-
type: Boolean,
|
|
108
|
-
required: false
|
|
109
|
-
},
|
|
110
|
-
autocomplete: {
|
|
111
|
-
type: String,
|
|
112
|
-
required: false
|
|
113
|
-
}
|
|
28
|
+
label: {},
|
|
29
|
+
design: { default: "flat" },
|
|
30
|
+
iconPrepend: {},
|
|
31
|
+
iconAppend: {},
|
|
32
|
+
groupItem: { type: Boolean },
|
|
33
|
+
autoGrow: { type: Boolean },
|
|
34
|
+
active: { type: Boolean },
|
|
35
|
+
loading: { type: Boolean },
|
|
36
|
+
noUnderline: { type: Boolean },
|
|
37
|
+
onAppendClick: {},
|
|
38
|
+
onPrependClick: {},
|
|
39
|
+
onBlur: {},
|
|
40
|
+
onFocus: {},
|
|
41
|
+
placeholder: {},
|
|
42
|
+
type: {},
|
|
43
|
+
rows: { default: 3 },
|
|
44
|
+
required: { type: Boolean },
|
|
45
|
+
maxlength: {},
|
|
46
|
+
disabled: { type: Boolean },
|
|
47
|
+
readonly: { type: Boolean },
|
|
48
|
+
autocomplete: {}
|
|
114
49
|
}, {
|
|
115
|
-
"modelValue": {
|
|
50
|
+
"modelValue": {},
|
|
116
51
|
"modelModifiers": {}
|
|
117
52
|
}),
|
|
118
53
|
emits: /* @__PURE__ */ mergeModels([
|
|
@@ -165,15 +100,15 @@ var InputBase_default = /* @__PURE__ */ defineComponent({
|
|
|
165
100
|
"data-active": focused.value || __props.active
|
|
166
101
|
}), {
|
|
167
102
|
default: withCtx(() => [
|
|
168
|
-
!__props.noUnderline ? (openBlock(), createElementBlock("span", _hoisted_1)) : createCommentVNode("
|
|
169
|
-
!!_ctx.$slots.overlay ? (openBlock(), createElementBlock("span", _hoisted_2, [renderSlot(_ctx.$slots, "overlay")])) : createCommentVNode("
|
|
103
|
+
!__props.noUnderline ? (openBlock(), createElementBlock("span", _hoisted_1)) : createCommentVNode("", true),
|
|
104
|
+
!!_ctx.$slots.overlay ? (openBlock(), createElementBlock("span", _hoisted_2, [renderSlot(_ctx.$slots, "overlay")])) : createCommentVNode("", true),
|
|
170
105
|
_ctx.$slots.prepend || !!__props.iconPrepend ? (openBlock(), createElementBlock("div", {
|
|
171
106
|
key: 2,
|
|
172
107
|
class: normalizeClass(["i8-prepend", { "i8-icon-clickable": !!__props.onPrependClick }])
|
|
173
108
|
}, [renderSlot(_ctx.$slots, "prepend", mergeProps(unref(attrs), { dataHasValue: hasValue.value }), () => [createElementVNode("div", {
|
|
174
109
|
class: "i8-icon-wrap",
|
|
175
110
|
onClick: _cache[0] || (_cache[0] = ($event) => emit("prependClick", $event))
|
|
176
|
-
}, [createVNode(VuIcon, { name: __props.iconPrepend }, null, 8, ["name"])])])], 2)) : createCommentVNode("
|
|
111
|
+
}, [createVNode(VuIcon, { name: __props.iconPrepend }, null, 8, ["name"])])])], 2)) : createCommentVNode("", true),
|
|
177
112
|
createElementVNode("div", _hoisted_3, [!!__props.label ? (openBlock(), createElementBlock("div", {
|
|
178
113
|
key: 0,
|
|
179
114
|
class: "i8-label-wrapper",
|
|
@@ -183,7 +118,7 @@ var InputBase_default = /* @__PURE__ */ defineComponent({
|
|
|
183
118
|
key: 0,
|
|
184
119
|
class: "i8-label",
|
|
185
120
|
"data-required": __props.required
|
|
186
|
-
}, toDisplayString(__props.label), 9, _hoisted_5)) : createCommentVNode("
|
|
121
|
+
}, toDisplayString(__props.label), 9, _hoisted_5)) : createCommentVNode("", true)], 8, _hoisted_4)) : createCommentVNode("", true), renderSlot(_ctx.$slots, "default", mergeProps(unref(inputAttrs), {
|
|
187
122
|
onFocus,
|
|
188
123
|
onBlur
|
|
189
124
|
}), () => [__props.type === "textarea" ? (openBlock(), createElementBlock("div", _hoisted_6, [withDirectives(createElementVNode("textarea", mergeProps(unref(inputAttrs), {
|
|
@@ -202,14 +137,14 @@ var InputBase_default = /* @__PURE__ */ defineComponent({
|
|
|
202
137
|
_ctx.$slots.append || !!__props.iconAppend || __props.loading ? (openBlock(), createElementBlock("div", {
|
|
203
138
|
key: 3,
|
|
204
139
|
class: normalizeClass(["i8-append", { "i8-icon-clickable": !!__props.onAppendClick }])
|
|
205
|
-
}, [createElementVNode("div", _hoisted_7, [__props.loading ? (openBlock(), createBlock(VuLoadingIndicator, { key: 0 })) : createCommentVNode("
|
|
140
|
+
}, [createElementVNode("div", _hoisted_7, [__props.loading ? (openBlock(), createBlock(VuLoadingIndicator, { key: 0 })) : createCommentVNode("", true)]), _ctx.$slots.append || !!__props.iconAppend ? renderSlot(_ctx.$slots, "append", mergeProps({ key: 0 }, unref(attrs), {
|
|
206
141
|
dataHasValue: hasValue.value,
|
|
207
142
|
emitClick: (event) => emit("appendClick", event),
|
|
208
143
|
iconAppend: __props.iconAppend
|
|
209
144
|
}), () => [createElementVNode("div", {
|
|
210
145
|
class: "i8-icon-wrap",
|
|
211
146
|
onClick: _cache[3] || (_cache[3] = ($event) => emit("appendClick", $event))
|
|
212
|
-
}, [createVNode(VuIcon, { name: __props.iconAppend }, null, 8, ["name"])])]) : createCommentVNode("
|
|
147
|
+
}, [createVNode(VuIcon, { name: __props.iconAppend }, null, 8, ["name"])])]) : createCommentVNode("", true)], 2)) : createCommentVNode("", true)
|
|
213
148
|
]),
|
|
214
149
|
_: 3
|
|
215
150
|
}, 16, [
|