maz-ui 3.47.2-beta.11 → 3.47.2-beta.12
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.
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'vue';
|
|
2
2
|
import type { Color } from './types';
|
|
3
3
|
export type { Color };
|
|
4
|
-
export interface MazTextareaProps<T extends string | undefined> {
|
|
4
|
+
export interface MazTextareaProps<T extends string | undefined | null> {
|
|
5
5
|
/** Style attribut of the component root element */
|
|
6
6
|
style?: HTMLAttributes['style'];
|
|
7
7
|
/** Class attribut of the component root element */
|
|
@@ -59,9 +59,9 @@ export interface MazTextareaProps<T extends string | undefined> {
|
|
|
59
59
|
*/
|
|
60
60
|
appendJustify?: 'start' | 'end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
|
61
61
|
}
|
|
62
|
-
declare const _default: <T extends string | undefined>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
62
|
+
declare const _default: <T extends string | undefined | null>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
63
63
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
64
|
-
readonly onInput?: ((value?:
|
|
64
|
+
readonly onInput?: ((value?: T | undefined) => any) | undefined;
|
|
65
65
|
readonly onBlur?: ((value: FocusEvent) => any) | undefined;
|
|
66
66
|
readonly onChange?: ((value: Event) => any) | undefined;
|
|
67
67
|
readonly onFocus?: ((value: FocusEvent) => any) | undefined;
|
|
@@ -75,7 +75,7 @@ declare const _default: <T extends string | undefined>(__VLS_props: NonNullable<
|
|
|
75
75
|
};
|
|
76
76
|
emit: {
|
|
77
77
|
(event: "update:model-value", value?: T): void;
|
|
78
|
-
(event: "input", value?:
|
|
78
|
+
(event: "input", value?: T): void;
|
|
79
79
|
(event: "focus", value: FocusEvent): void;
|
|
80
80
|
(event: "blur", value: FocusEvent): void;
|
|
81
81
|
(event: "change", value: Event): void;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import './assets/MazTextarea.css';var I = Object.defineProperty;
|
|
2
|
-
var M = (
|
|
3
|
-
var z = (
|
|
2
|
+
var M = (r, o, t) => o in r ? I(r, o, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[o] = t;
|
|
3
|
+
var z = (r, o, t) => M(r, typeof o != "symbol" ? o + "" : o, t);
|
|
4
4
|
import { useId as R, computed as n, defineComponent as N, ref as w, onMounted as U, onBeforeUnmount as C, useSlots as H, openBlock as l, createElementBlock as i, normalizeClass as B, unref as p, normalizeStyle as A, renderSlot as k, createTextVNode as D, toDisplayString as T, createCommentVNode as m, withDirectives as J, createElementVNode as O, mergeProps as _, toHandlers as j, vModelText as P } from "vue";
|
|
5
5
|
function G({
|
|
6
|
-
componentName:
|
|
6
|
+
componentName: r,
|
|
7
7
|
providedId: o
|
|
8
8
|
}) {
|
|
9
9
|
const t = R();
|
|
10
|
-
return n(() => o ?? `${
|
|
10
|
+
return n(() => o ?? `${r}-${t}`);
|
|
11
11
|
}
|
|
12
|
-
function K(
|
|
12
|
+
function K(r, o) {
|
|
13
13
|
let t;
|
|
14
|
-
return function(...
|
|
14
|
+
return function(...a) {
|
|
15
15
|
clearTimeout(t), t = setTimeout(() => {
|
|
16
|
-
|
|
16
|
+
r.apply(this, a);
|
|
17
17
|
}, o);
|
|
18
18
|
};
|
|
19
19
|
}
|
|
@@ -67,8 +67,8 @@ const W = ["for"], X = ["for"], Y = { key: 1 }, Z = { key: 2 }, x = ["id", "plac
|
|
|
67
67
|
appendJustify: { default: "end" }
|
|
68
68
|
},
|
|
69
69
|
emits: ["update:model-value", "input", "focus", "blur", "change"],
|
|
70
|
-
setup(
|
|
71
|
-
const t =
|
|
70
|
+
setup(r, { emit: o }) {
|
|
71
|
+
const t = r, a = o;
|
|
72
72
|
let s;
|
|
73
73
|
const u = G({
|
|
74
74
|
componentName: "MazTextarea",
|
|
@@ -82,21 +82,21 @@ const W = ["for"], X = ["for"], Y = { key: 1 }, Z = { key: 2 }, x = ["id", "plac
|
|
|
82
82
|
const h = n({
|
|
83
83
|
get: () => t.modelValue,
|
|
84
84
|
set: (e) => {
|
|
85
|
-
|
|
85
|
+
a("update:model-value", e), a("input", e);
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
88
|
function S(e) {
|
|
89
|
-
|
|
89
|
+
a("focus", e), d.value = !0;
|
|
90
90
|
}
|
|
91
91
|
function V(e) {
|
|
92
|
-
|
|
92
|
+
a("blur", e), d.value = !1;
|
|
93
93
|
}
|
|
94
94
|
function $(e) {
|
|
95
|
-
|
|
95
|
+
a("change", e);
|
|
96
96
|
}
|
|
97
|
-
const
|
|
97
|
+
const v = H(), f = n(() => t.label || t.hint || !!v.label), L = n(
|
|
98
98
|
() => f.value && (d.value || E.value || !!t.placeholder)
|
|
99
|
-
),
|
|
99
|
+
), b = n(() => !!v.append), y = n(() => {
|
|
100
100
|
if (t.error)
|
|
101
101
|
return "maz-border-danger";
|
|
102
102
|
if (t.success)
|
|
@@ -178,7 +178,7 @@ const W = ["for"], X = ["for"], Y = { key: 1 }, Z = { key: 2 }, x = ["id", "plac
|
|
|
178
178
|
name: e.name,
|
|
179
179
|
disabled: e.disabled,
|
|
180
180
|
required: e.required,
|
|
181
|
-
class: { "--has-append":
|
|
181
|
+
class: { "--has-append": b.value }
|
|
182
182
|
}, j({
|
|
183
183
|
blur: V,
|
|
184
184
|
focus: S,
|
|
@@ -186,17 +186,17 @@ const W = ["for"], X = ["for"], Y = { key: 1 }, Z = { key: 2 }, x = ["id", "plac
|
|
|
186
186
|
}, !0)), null, 16, x), [
|
|
187
187
|
[P, h.value]
|
|
188
188
|
]),
|
|
189
|
-
|
|
189
|
+
b.value ? (l(), i("div", ee, [
|
|
190
190
|
k(e.$slots, "append", {}, void 0, !0)
|
|
191
191
|
])) : m("v-if", !0)
|
|
192
192
|
], 14, W));
|
|
193
193
|
}
|
|
194
|
-
}), oe = (
|
|
195
|
-
const t =
|
|
196
|
-
for (const [
|
|
197
|
-
t[
|
|
194
|
+
}), oe = (r, o) => {
|
|
195
|
+
const t = r.__vccOpts || r;
|
|
196
|
+
for (const [a, s] of o)
|
|
197
|
+
t[a] = s;
|
|
198
198
|
return t;
|
|
199
|
-
}, ne = /* @__PURE__ */ oe(te, [["__scopeId", "data-v-
|
|
199
|
+
}, ne = /* @__PURE__ */ oe(te, [["__scopeId", "data-v-2fd1ae37"]]);
|
|
200
200
|
export {
|
|
201
201
|
ne as default
|
|
202
202
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
.m-textarea[data-v-
|
|
1
|
+
.m-textarea[data-v-2fd1ae37]{position:relative;display:-webkit-box;display:-ms-flexbox;display:flex;min-height:6.25rem;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;vertical-align:top;color:var(--maz-color-text)}.m-textarea[data-v-2fd1ae37]:not(.--background-transparent){background-color:var(--maz-color-bg)}.m-textarea[data-v-2fd1ae37]:not(.--background-transparent):is([class~=dark] *){background-color:var(--maz-color-bg-light)}.m-textarea.--border[data-v-2fd1ae37]{border-width:var(--maz-border-width);border-style:solid}.m-textarea.--border[data-v-2fd1ae37]:not(.--has-border-style){border-color:var(--maz-border-color)}.m-textarea.--border[data-v-2fd1ae37]:not(.--has-border-style):is([class~=dark] *){border-color:var(--maz-color-bg-lighter)}.m-textarea.--padding[data-v-2fd1ae37]{padding:.75rem 1rem}.m-textarea.--rounded-sm[data-v-2fd1ae37]{border-radius:.125rem}.m-textarea.--rounded-md[data-v-2fd1ae37]{border-radius:.375rem}.m-textarea.--rounded-lg[data-v-2fd1ae37]{border-radius:.5rem}.m-textarea.--rounded-xl[data-v-2fd1ae37]{border-radius:.75rem}.m-textarea.--rounded-full[data-v-2fd1ae37]{border-radius:9999px}.m-textarea.--rounded[data-v-2fd1ae37]{border-radius:var(--maz-border-radius)}.m-textarea.--has-label[data-v-2fd1ae37]{padding-top:1.5rem}.m-textarea__append[data-v-2fd1ae37]{display:-webkit-inline-box;display:-ms-inline-flexbox;display:inline-flex;-webkit-box-pack:var(--append-justify);-ms-flex-pack:var(--append-justify);justify-content:var(--append-justify)}.m-textarea textarea[data-v-2fd1ae37]{width:100%;resize:vertical;background-color:transparent;outline:2px solid transparent;outline-offset:2px}.m-textarea textarea.--has-append[data-v-2fd1ae37]{padding-bottom:1rem}.m-textarea.--is-disabled textarea[data-v-2fd1ae37]{cursor:not-allowed;border-color:var(--maz-border-color);background-color:var(--maz-color-bg-lighter);color:var(--maz-color-muted)}.m-textarea.--is-disabled textarea[data-v-2fd1ae37]:is([class~=dark] *){border-color:var(--maz-color-bg-lighter)}.m-textarea__label[data-v-2fd1ae37]{pointer-events:none;position:absolute;display:block;width:-webkit-max-content;width:-moz-max-content;width:max-content;-webkit-transform-origin:top left;transform-origin:top left;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;left:1rem;top:.75rem;line-height:1.5rem;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-transition:-webkit-transform .2s cubic-bezier(0,0,.2,1) 0ms;transition:-webkit-transform .2s cubic-bezier(0,0,.2,1) 0ms;transition:transform .2s cubic-bezier(0,0,.2,1) 0ms;transition:transform .2s cubic-bezier(0,0,.2,1) 0ms,-webkit-transform .2s cubic-bezier(0,0,.2,1) 0ms}.m-textarea__label.--should-up[data-v-2fd1ae37]{-webkit-transform:scale(.8) translateY(-.65rem);transform:scale(.8) translateY(-.65rem)}.m-textarea__label[data-v-2fd1ae37]:not(.--has-state){color:var(--maz-color-muted)}
|
package/nuxt/index.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type HTMLAttributes } from 'vue';
|
|
2
2
|
import type { Color } from './types';
|
|
3
3
|
export type { Color };
|
|
4
|
-
export interface MazTextareaProps<T extends string | undefined> {
|
|
4
|
+
export interface MazTextareaProps<T extends string | undefined | null> {
|
|
5
5
|
/** Style attribut of the component root element */
|
|
6
6
|
style?: HTMLAttributes['style'];
|
|
7
7
|
/** Class attribut of the component root element */
|
|
@@ -59,9 +59,9 @@ export interface MazTextareaProps<T extends string | undefined> {
|
|
|
59
59
|
*/
|
|
60
60
|
appendJustify?: 'start' | 'end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
|
|
61
61
|
}
|
|
62
|
-
declare const _default: <T extends string | undefined>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
62
|
+
declare const _default: <T extends string | undefined | null>(__VLS_props: NonNullable<Awaited<typeof __VLS_setup>>["props"], __VLS_ctx?: __VLS_PrettifyLocal<Pick<NonNullable<Awaited<typeof __VLS_setup>>, "attrs" | "emit" | "slots">>, __VLS_expose?: NonNullable<Awaited<typeof __VLS_setup>>["expose"], __VLS_setup?: Promise<{
|
|
63
63
|
props: __VLS_PrettifyLocal<Pick<Partial<{}> & Omit<{
|
|
64
|
-
readonly onInput?: ((value?:
|
|
64
|
+
readonly onInput?: ((value?: T | undefined) => any) | undefined;
|
|
65
65
|
readonly onBlur?: ((value: FocusEvent) => any) | undefined;
|
|
66
66
|
readonly onChange?: ((value: Event) => any) | undefined;
|
|
67
67
|
readonly onFocus?: ((value: FocusEvent) => any) | undefined;
|
|
@@ -75,7 +75,7 @@ declare const _default: <T extends string | undefined>(__VLS_props: NonNullable<
|
|
|
75
75
|
};
|
|
76
76
|
emit: {
|
|
77
77
|
(event: "update:model-value", value?: T): void;
|
|
78
|
-
(event: "input", value?:
|
|
78
|
+
(event: "input", value?: T): void;
|
|
79
79
|
(event: "focus", value: FocusEvent): void;
|
|
80
80
|
(event: "blur", value: FocusEvent): void;
|
|
81
81
|
(event: "change", value: Event): void;
|