@defaultusr/dai-ui 1.2.2 → 1.2.3
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/main.js +24 -25
- package/dist/types/unocss.preset.d.ts +5 -1
- package/dist/unocss.preset.js +10 -9
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { useFormControl as
|
|
1
|
+
import { useFormControl as P, Combobox as te, ComboboxInput as oe, injectCombobox as ae, ComboboxOptions as le, ComboboxOption as ie, PopoverDialog as ne, MenuItems as se, MenuItem as re, Tab as de, TabList as ue } from "vue-composable-ui";
|
|
2
2
|
import { Menu as Nt, Popover as Ut, TabContainer as Xt, TabPanel as Dt } from "vue-composable-ui";
|
|
3
|
-
import { reactive as ce, watch as T, onUnmounted as R, defineComponent as v, createElementBlock as u, openBlock as i, renderSlot as b, createTextVNode as z, toDisplayString as k, normalizeClass as w, createBlock as p, createCommentVNode as y, createElementVNode as d, computed as _, createVNode as V, normalizeProps as fe, guardReactiveProps as me, withCtx as f, Transition as
|
|
3
|
+
import { reactive as ce, watch as T, onUnmounted as R, defineComponent as v, createElementBlock as u, openBlock as i, renderSlot as b, createTextVNode as z, toDisplayString as k, normalizeClass as w, createBlock as p, createCommentVNode as y, createElementVNode as d, computed as _, createVNode as V, normalizeProps as fe, guardReactiveProps as me, withCtx as f, Transition as A, mergeModels as C, useModel as B, useId as q, useTemplateRef as L, mergeProps as $, unref as n, inject as ve, Fragment as I, ref as U, onMounted as O, withDirectives as X, renderList as D, vModelSelect as he, vModelText as pe, vModelRadio as be, resolveDynamicComponent as ye, nextTick as ge, normalizeStyle as N, Teleport as Z, TransitionGroup as we, withModifiers as ke } from "vue";
|
|
4
4
|
import './assets/main.css';function $e(e, ...t) {
|
|
5
5
|
let o = [];
|
|
6
6
|
const l = ce(t);
|
|
@@ -85,7 +85,6 @@ const xe = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
85
85
|
class: "dai-form-control__validation-message",
|
|
86
86
|
role: "alert"
|
|
87
87
|
}, S = /* @__PURE__ */ v({
|
|
88
|
-
inheritAttrs: !1,
|
|
89
88
|
__name: "formControl",
|
|
90
89
|
props: {
|
|
91
90
|
labelPosition: { default: "above" },
|
|
@@ -134,7 +133,7 @@ const xe = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
134
133
|
text: e.hint,
|
|
135
134
|
class: "dai-form-control__hint"
|
|
136
135
|
}, null, 8, ["text"])) : y("", !0),
|
|
137
|
-
V(
|
|
136
|
+
V(A, { name: "dai-form-control__validation-message-transition" }, {
|
|
138
137
|
default: f(() => [
|
|
139
138
|
e.validationMessage ? (i(), u("div", Ce, [
|
|
140
139
|
s[0] || (s[0] = d("svg", {
|
|
@@ -182,12 +181,12 @@ const xe = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
182
181
|
}),
|
|
183
182
|
emits: ["update:modelValue"],
|
|
184
183
|
setup(e) {
|
|
185
|
-
const t = e, o = B(e, "modelValue"), l = t.id || q(), a = L("formElement"), { isValid: s, validationMessage: r, validate: g } =
|
|
184
|
+
const t = e, o = B(e, "modelValue"), l = t.id || q(), a = L("formElement"), { isValid: s, validationMessage: r, validate: g } = P(
|
|
186
185
|
a,
|
|
187
186
|
t.validators,
|
|
188
187
|
t.showValidationError
|
|
189
188
|
);
|
|
190
|
-
return T(o, () => g()), (h, m) => (i(), p(S, $(t, {
|
|
189
|
+
return T(o, () => g(), { flush: "post" }), (h, m) => (i(), p(S, $(t, {
|
|
191
190
|
labelFor: n(l),
|
|
192
191
|
validationMessage: e.showValidationError ? "" : n(r),
|
|
193
192
|
invalid: !n(s),
|
|
@@ -268,7 +267,7 @@ const xe = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
268
267
|
}), Te = /* @__PURE__ */ v({
|
|
269
268
|
__name: "comboboxOptions",
|
|
270
269
|
setup(e) {
|
|
271
|
-
return (t, o) => (i(), p(
|
|
270
|
+
return (t, o) => (i(), p(A, {
|
|
272
271
|
"enter-from-class": "dai-combobox-options--anim",
|
|
273
272
|
"leave-to-class": "dai-combobox-options--anim"
|
|
274
273
|
}, {
|
|
@@ -283,12 +282,12 @@ const xe = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
283
282
|
_: 3
|
|
284
283
|
}));
|
|
285
284
|
}
|
|
286
|
-
}),
|
|
285
|
+
}), Pe = {
|
|
287
286
|
key: 0,
|
|
288
287
|
class: "dai-combobox-option__check",
|
|
289
288
|
xmlns: "http://www.w3.org/2000/svg",
|
|
290
289
|
viewBox: "0 0 16 16"
|
|
291
|
-
},
|
|
290
|
+
}, Ae = /* @__PURE__ */ v({
|
|
292
291
|
__name: "comboboxOption",
|
|
293
292
|
props: {
|
|
294
293
|
value: {}
|
|
@@ -303,7 +302,7 @@ const xe = { class: "dai-label" }, F = /* @__PURE__ */ v({
|
|
|
303
302
|
isActive: l,
|
|
304
303
|
isSelected: a
|
|
305
304
|
}),
|
|
306
|
-
a ? (i(), u("svg",
|
|
305
|
+
a ? (i(), u("svg", Pe, [...o[0] || (o[0] = [
|
|
307
306
|
d("path", {
|
|
308
307
|
fill: "currentColor",
|
|
309
308
|
"fill-rule": "evenodd",
|
|
@@ -382,7 +381,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
382
381
|
set(M) {
|
|
383
382
|
return r.value && (r.value.files = M), M;
|
|
384
383
|
}
|
|
385
|
-
}), r = L("formElement"), { isValid: g, validationMessage: h, validate: m } =
|
|
384
|
+
}), r = L("formElement"), { isValid: g, validationMessage: h, validate: m } = P(
|
|
386
385
|
r,
|
|
387
386
|
t.validators,
|
|
388
387
|
t.showValidationError
|
|
@@ -522,7 +521,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
522
521
|
}),
|
|
523
522
|
emits: ["update:modelValue"],
|
|
524
523
|
setup(e) {
|
|
525
|
-
const t = e, o = t.id || q(), l = B(e, "modelValue"), a = L("formElement"), { isValid: s, validationMessage: r, validate: g } =
|
|
524
|
+
const t = e, o = t.id || q(), l = B(e, "modelValue"), a = L("formElement"), { isValid: s, validationMessage: r, validate: g } = P(
|
|
526
525
|
a,
|
|
527
526
|
t.validators,
|
|
528
527
|
t.showValidationError
|
|
@@ -607,7 +606,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
607
606
|
V(n(qe), { placeholder: e.placeholder }, null, 8, ["placeholder"]),
|
|
608
607
|
V(n(Te), null, {
|
|
609
608
|
default: f(() => [
|
|
610
|
-
(i(!0), u(I, null, D(e.options, (s) => (i(), p(n(
|
|
609
|
+
(i(!0), u(I, null, D(e.options, (s) => (i(), p(n(Ae), {
|
|
611
610
|
key: s[e.optionValue],
|
|
612
611
|
value: s[e.optionValue]
|
|
613
612
|
}, {
|
|
@@ -637,7 +636,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
637
636
|
}),
|
|
638
637
|
emits: ["update:modelValue"],
|
|
639
638
|
setup(e) {
|
|
640
|
-
const t = e, o = t.id || q(), l = B(e, "modelValue"), a = L("formElement"), { isValid: s, validationMessage: r, validate: g } =
|
|
639
|
+
const t = e, o = t.id || q(), l = B(e, "modelValue"), a = L("formElement"), { isValid: s, validationMessage: r, validate: g } = P(
|
|
641
640
|
a,
|
|
642
641
|
t.validators,
|
|
643
642
|
t.showValidationError
|
|
@@ -693,7 +692,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
693
692
|
}),
|
|
694
693
|
emits: ["update:modelValue"],
|
|
695
694
|
setup(e) {
|
|
696
|
-
const t = e, o = t.id || q(), l = t.value || o, a = B(e, "modelValue"), s = L("formElement"), { isValid: r } =
|
|
695
|
+
const t = e, o = t.id || q(), l = t.value || o, a = B(e, "modelValue"), s = L("formElement"), { isValid: r } = P(
|
|
697
696
|
s,
|
|
698
697
|
t.validators,
|
|
699
698
|
t.showValidationError
|
|
@@ -776,7 +775,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
776
775
|
}),
|
|
777
776
|
emits: ["update:modelValue"],
|
|
778
777
|
setup(e) {
|
|
779
|
-
const t = e, o = B(e, "modelValue"), l = q(), a = L("formElement"), { isValid: s } =
|
|
778
|
+
const t = e, o = B(e, "modelValue"), l = q(), a = L("formElement"), { isValid: s } = P(
|
|
780
779
|
a,
|
|
781
780
|
t.validators,
|
|
782
781
|
t.showValidationError
|
|
@@ -945,7 +944,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
945
944
|
}), zt = /* @__PURE__ */ v({
|
|
946
945
|
__name: "popoverDialog",
|
|
947
946
|
setup(e) {
|
|
948
|
-
return (t, o) => (i(), p(
|
|
947
|
+
return (t, o) => (i(), p(A, {
|
|
949
948
|
"enter-from-class": "dai-popover-dialog--anim",
|
|
950
949
|
"leave-to-class": "dai-popover-dialog--anim"
|
|
951
950
|
}, {
|
|
@@ -963,7 +962,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
963
962
|
}), Lt = /* @__PURE__ */ v({
|
|
964
963
|
__name: "menuItems",
|
|
965
964
|
setup(e) {
|
|
966
|
-
return (t, o) => (i(), p(
|
|
965
|
+
return (t, o) => (i(), p(A, {
|
|
967
966
|
"enter-from-class": "dai-menu-items--anim",
|
|
968
967
|
"leave-to-class": "dai-menu-items--anim"
|
|
969
968
|
}, {
|
|
@@ -1022,7 +1021,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1022
1021
|
_: 3
|
|
1023
1022
|
}, 8, ["id", "aria-controls", "value"]));
|
|
1024
1023
|
}
|
|
1025
|
-
}),
|
|
1024
|
+
}), Pt = /* @__PURE__ */ v({
|
|
1026
1025
|
__name: "tabList",
|
|
1027
1026
|
setup(e) {
|
|
1028
1027
|
const t = L("tablist"), o = L("slider"), l = U({});
|
|
@@ -1055,7 +1054,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1055
1054
|
_: 3
|
|
1056
1055
|
}, 512));
|
|
1057
1056
|
}
|
|
1058
|
-
}), lt = ["id"],
|
|
1057
|
+
}), lt = ["id"], At = /* @__PURE__ */ v({
|
|
1059
1058
|
inheritAttrs: !1,
|
|
1060
1059
|
__name: "offcanvas",
|
|
1061
1060
|
props: /* @__PURE__ */ C({
|
|
@@ -1086,7 +1085,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1086
1085
|
}), R(() => {
|
|
1087
1086
|
window.removeEventListener("click", s);
|
|
1088
1087
|
}), (r, g) => (i(), p(Z, { to: "body" }, [
|
|
1089
|
-
V(
|
|
1088
|
+
V(A, {
|
|
1090
1089
|
appear: "",
|
|
1091
1090
|
"enter-from-class": "nui-offcanvas--animate-hidden",
|
|
1092
1091
|
"enter-to-class": "nui-offcanvas--animate-shown",
|
|
@@ -1334,7 +1333,7 @@ const K = /* @__PURE__ */ je(Ie, [["render", Fe]]), Se = ["id", "type", "pattern
|
|
|
1334
1333
|
return T(t, (l) => {
|
|
1335
1334
|
l ? document.body.classList.add("overflow-hidden") : document.body.classList.remove("overflow-hidden");
|
|
1336
1335
|
}), (l, a) => (i(), p(Z, { to: "body" }, [
|
|
1337
|
-
V(
|
|
1336
|
+
V(A, {
|
|
1338
1337
|
appear: "",
|
|
1339
1338
|
name: "modal",
|
|
1340
1339
|
duration: { enter: 300, leave: 200 }
|
|
@@ -1368,7 +1367,7 @@ export {
|
|
|
1368
1367
|
ze as Combobox,
|
|
1369
1368
|
qe as ComboboxButton,
|
|
1370
1369
|
kt as ComboboxInput,
|
|
1371
|
-
|
|
1370
|
+
Ae as ComboboxOption,
|
|
1372
1371
|
Te as ComboboxOptions,
|
|
1373
1372
|
H as Hint,
|
|
1374
1373
|
$t as Input,
|
|
@@ -1379,7 +1378,7 @@ export {
|
|
|
1379
1378
|
Ot as Modal,
|
|
1380
1379
|
mt as Notification,
|
|
1381
1380
|
jt as NotificationQueue,
|
|
1382
|
-
|
|
1381
|
+
At as Offcanvas,
|
|
1383
1382
|
Ut as Popover,
|
|
1384
1383
|
zt as PopoverDialog,
|
|
1385
1384
|
It as Progressbar,
|
|
@@ -1389,7 +1388,7 @@ export {
|
|
|
1389
1388
|
Ct as Switch,
|
|
1390
1389
|
Tt as Tab,
|
|
1391
1390
|
Xt as TabContainer,
|
|
1392
|
-
|
|
1391
|
+
Pt as TabList,
|
|
1393
1392
|
Dt as TabPanel,
|
|
1394
1393
|
Bt as Textarea,
|
|
1395
1394
|
$e as useClassList
|
|
@@ -1,3 +1,7 @@
|
|
|
1
1
|
import { PresetWind4Options } from "@unocss/preset-wind4";
|
|
2
|
-
|
|
2
|
+
import { presetAttributify } from "@unocss/preset-attributify";
|
|
3
|
+
type PresetDaiUiOptions = PresetWind4Options & {
|
|
4
|
+
attributify?: Parameters<typeof presetAttributify>[0];
|
|
5
|
+
};
|
|
6
|
+
declare const _default: import("@unocss/core").PresetFactory<object, PresetDaiUiOptions>;
|
|
3
7
|
export default _default;
|
package/dist/unocss.preset.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { definePreset as t } from "@unocss/core";
|
|
2
2
|
import { theme as r, presetWind4 as s } from "@unocss/preset-wind4";
|
|
3
3
|
import { presetAttributify as i } from "@unocss/preset-attributify";
|
|
4
|
-
import { presetIcons as
|
|
5
|
-
import
|
|
4
|
+
import { presetIcons as a } from "@unocss/preset-icons";
|
|
5
|
+
import n from "@unocss/transformer-variant-group";
|
|
6
6
|
import c from "@unocss/transformer-directives";
|
|
7
|
-
const y = t((
|
|
7
|
+
const y = t((e) => ({
|
|
8
8
|
presets: [
|
|
9
9
|
//presetWind(options),
|
|
10
|
-
s(
|
|
10
|
+
s(e),
|
|
11
11
|
//presetForms(),
|
|
12
12
|
i({
|
|
13
13
|
prefix: "un-",
|
|
14
|
-
prefixedOnly: !0
|
|
14
|
+
prefixedOnly: !0,
|
|
15
|
+
...e?.attributify
|
|
15
16
|
}),
|
|
16
|
-
|
|
17
|
+
a({
|
|
17
18
|
scale: 1.2,
|
|
18
19
|
warn: !0
|
|
19
20
|
})
|
|
20
21
|
],
|
|
21
|
-
transformers: [
|
|
22
|
+
transformers: [n(), c()],
|
|
22
23
|
theme: {
|
|
23
24
|
colors: {
|
|
24
25
|
primary: r.colors.indigo,
|
|
@@ -122,8 +123,8 @@ const y = t((o) => ({
|
|
|
122
123
|
active: "active=true"
|
|
123
124
|
}
|
|
124
125
|
},
|
|
125
|
-
extendTheme: (
|
|
126
|
-
|
|
126
|
+
extendTheme: (o) => {
|
|
127
|
+
o.colors.dark = o.colors.slate;
|
|
127
128
|
},
|
|
128
129
|
name: "dai-ui-preset"
|
|
129
130
|
// it supports most of the configuration you could have in the root config
|