@autoafleveren/ui 1.4.7 → 1.4.9
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/types/components/AppDefinitionList/AppDefinitionItem.vue.d.ts +4 -0
- package/dist/types/components/AppDefinitionList/AppDefinitionList.vue.d.ts +4 -0
- package/dist/ui-storybook.css +1 -1
- package/dist/ui.cjs +3 -3
- package/dist/ui.js +38 -31
- package/package.json +3 -3
- package/src/modules/components/AppDefinitionList/AppDefinitionItem.vue +7 -2
- package/src/modules/components/AppDefinitionList/AppDefinitionList.vue +6 -0
- package/src/modules/components/AppSelect/index.ts +2 -2
package/dist/ui.js
CHANGED
|
@@ -8382,25 +8382,27 @@ const LT = ["disabled", "accept", "name"], RT = {
|
|
|
8382
8382
|
_: 3
|
|
8383
8383
|
}, 8, ["show"]));
|
|
8384
8384
|
}
|
|
8385
|
-
}), VT = {
|
|
8386
|
-
key: 0,
|
|
8387
|
-
class: "flex w-full",
|
|
8388
|
-
"data-test-item": ""
|
|
8389
|
-
}, qT = /* @__PURE__ */ ke({
|
|
8385
|
+
}), VT = /* @__PURE__ */ ke({
|
|
8390
8386
|
__name: "AppDefinitionItem",
|
|
8391
8387
|
props: {
|
|
8392
8388
|
title: { default: void 0 },
|
|
8393
8389
|
description: { default: void 0 },
|
|
8394
8390
|
component: { default: void 0 },
|
|
8395
8391
|
componentProperties: { default: void 0 },
|
|
8396
|
-
hideEmptyValues: { type: Boolean, default: !1 }
|
|
8392
|
+
hideEmptyValues: { type: Boolean, default: !1 },
|
|
8393
|
+
itemRowClasses: { default: void 0 },
|
|
8394
|
+
itemCellClasses: { default: void 0 }
|
|
8397
8395
|
},
|
|
8398
8396
|
setup(e) {
|
|
8399
8397
|
const t = e, n = An(), r = j(() => !!n.title || !!t.title), a = j(() => !!n.default || !!t.description || !!t.component);
|
|
8400
|
-
return (o, i) => a.value || !a.value && !o.hideEmptyValues ? (E(), $("div",
|
|
8398
|
+
return (o, i) => a.value || !a.value && !o.hideEmptyValues ? (E(), $("div", {
|
|
8399
|
+
key: 0,
|
|
8400
|
+
class: oe([o.itemRowClasses, "flex w-full"]),
|
|
8401
|
+
"data-test-item": ""
|
|
8402
|
+
}, [
|
|
8401
8403
|
r.value ? (E(), $("dt", {
|
|
8402
8404
|
key: 0,
|
|
8403
|
-
class: oe([{ "w-1/2": a.value || o.component }, "font-bold text-zinc-900"]),
|
|
8405
|
+
class: oe([[o.itemCellClasses, { "w-1/2": a.value || o.component }], "font-bold text-zinc-900"]),
|
|
8404
8406
|
"data-test-title": ""
|
|
8405
8407
|
}, [
|
|
8406
8408
|
ae(o.$slots, "title", {}, () => [
|
|
@@ -8409,7 +8411,7 @@ const LT = ["disabled", "accept", "name"], RT = {
|
|
|
8409
8411
|
], 2)) : J("", !0),
|
|
8410
8412
|
a.value || o.component || o.$slots.default ? (E(), $("dd", {
|
|
8411
8413
|
key: 1,
|
|
8412
|
-
class: oe({ "w-1/2": r.value }),
|
|
8414
|
+
class: oe([o.itemCellClasses, { "w-1/2": r.value }]),
|
|
8413
8415
|
"data-test-description": ""
|
|
8414
8416
|
}, [
|
|
8415
8417
|
ae(o.$slots, "default", {}, () => [
|
|
@@ -8417,26 +8419,30 @@ const LT = ["disabled", "accept", "name"], RT = {
|
|
|
8417
8419
|
]),
|
|
8418
8420
|
(E(), ce(Qe(o.component), it(o.componentProperties, { "data-test-component": "" }), null, 16))
|
|
8419
8421
|
], 2)) : J("", !0)
|
|
8420
|
-
])) : J("", !0);
|
|
8422
|
+
], 2)) : J("", !0);
|
|
8421
8423
|
}
|
|
8422
|
-
}),
|
|
8424
|
+
}), qT = { class: "flex flex-col gap-1.5" }, KQ = /* @__PURE__ */ ke({
|
|
8423
8425
|
__name: "AppDefinitionList",
|
|
8424
8426
|
props: {
|
|
8425
8427
|
items: { default: void 0 },
|
|
8426
|
-
hideEmptyValues: { type: Boolean, default: !1 }
|
|
8428
|
+
hideEmptyValues: { type: Boolean, default: !1 },
|
|
8429
|
+
itemRowClasses: { default: void 0 },
|
|
8430
|
+
itemCellClasses: { default: void 0 }
|
|
8427
8431
|
},
|
|
8428
8432
|
setup(e) {
|
|
8429
|
-
return (t, n) => (E(), $("div",
|
|
8433
|
+
return (t, n) => (E(), $("div", qT, [
|
|
8430
8434
|
ae(t.$slots, "default", {}, () => [
|
|
8431
|
-
t.items ? (E(!0), $(De, { key: 0 }, Ze(t.items, (r, a) => (E(), ce(
|
|
8435
|
+
t.items ? (E(!0), $(De, { key: 0 }, Ze(t.items, (r, a) => (E(), ce(VT, {
|
|
8432
8436
|
key: a,
|
|
8433
8437
|
tabindex: `1${a}`,
|
|
8434
8438
|
title: r.title,
|
|
8435
8439
|
description: r.description,
|
|
8436
8440
|
component: r.component,
|
|
8437
8441
|
"component-properties": r.componentProperties,
|
|
8438
|
-
"hide-empty-values": t.hideEmptyValues
|
|
8439
|
-
|
|
8442
|
+
"hide-empty-values": t.hideEmptyValues,
|
|
8443
|
+
"item-row-classes": t.itemRowClasses,
|
|
8444
|
+
"item-cell-classes": t.itemCellClasses
|
|
8445
|
+
}, null, 8, ["tabindex", "title", "description", "component", "component-properties", "hide-empty-values", "item-row-classes", "item-cell-classes"]))), 128)) : J("", !0)
|
|
8440
8446
|
])
|
|
8441
8447
|
]));
|
|
8442
8448
|
}
|
|
@@ -8457,7 +8463,7 @@ const LT = ["disabled", "accept", "name"], RT = {
|
|
|
8457
8463
|
_: 3
|
|
8458
8464
|
}, 8, ["default-open"]));
|
|
8459
8465
|
}
|
|
8460
|
-
}),
|
|
8466
|
+
}), YT = { class: "ml-auto pl-2" }, JQ = /* @__PURE__ */ ke({
|
|
8461
8467
|
__name: "AppDisclosureButton",
|
|
8462
8468
|
setup(e) {
|
|
8463
8469
|
const t = X(null);
|
|
@@ -8477,7 +8483,7 @@ const LT = ["disabled", "accept", "name"], RT = {
|
|
|
8477
8483
|
}, [
|
|
8478
8484
|
ae(r.$slots, "default")
|
|
8479
8485
|
], 2),
|
|
8480
|
-
F("span",
|
|
8486
|
+
F("span", YT, [
|
|
8481
8487
|
ae(r.$slots, "icon", { open: o }, () => [
|
|
8482
8488
|
Ee(w(B4), {
|
|
8483
8489
|
class: oe([{ "rotate-180": o }, "size-5 text-zinc-900 transition-transform"])
|
|
@@ -8522,28 +8528,29 @@ const LT = ["disabled", "accept", "name"], RT = {
|
|
|
8522
8528
|
}), Cn = [];
|
|
8523
8529
|
for (let e = 0; e < 256; ++e)
|
|
8524
8530
|
Cn.push((e + 256).toString(16).slice(1));
|
|
8525
|
-
function
|
|
8531
|
+
function GT(e, t = 0) {
|
|
8526
8532
|
return (Cn[e[t + 0]] + Cn[e[t + 1]] + Cn[e[t + 2]] + Cn[e[t + 3]] + "-" + Cn[e[t + 4]] + Cn[e[t + 5]] + "-" + Cn[e[t + 6]] + Cn[e[t + 7]] + "-" + Cn[e[t + 8]] + Cn[e[t + 9]] + "-" + Cn[e[t + 10]] + Cn[e[t + 11]] + Cn[e[t + 12]] + Cn[e[t + 13]] + Cn[e[t + 14]] + Cn[e[t + 15]]).toLowerCase();
|
|
8527
8533
|
}
|
|
8528
8534
|
let Gd;
|
|
8529
|
-
const
|
|
8530
|
-
function
|
|
8535
|
+
const KT = new Uint8Array(16);
|
|
8536
|
+
function XT() {
|
|
8531
8537
|
if (!Gd) {
|
|
8532
8538
|
if (typeof crypto > "u" || !crypto.getRandomValues)
|
|
8533
8539
|
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
8534
8540
|
Gd = crypto.getRandomValues.bind(crypto);
|
|
8535
8541
|
}
|
|
8536
|
-
return Gd(
|
|
8542
|
+
return Gd(KT);
|
|
8537
8543
|
}
|
|
8538
|
-
const
|
|
8539
|
-
function
|
|
8540
|
-
if (I0.randomUUID && !e)
|
|
8541
|
-
return I0.randomUUID();
|
|
8544
|
+
const JT = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), I0 = { randomUUID: JT };
|
|
8545
|
+
function QT(e, t, n) {
|
|
8542
8546
|
e = e || {};
|
|
8543
|
-
const r = e.random ?? e.rng?.() ??
|
|
8547
|
+
const r = e.random ?? e.rng?.() ?? XT();
|
|
8544
8548
|
if (r.length < 16)
|
|
8545
8549
|
throw new Error("Random bytes length must be >= 16");
|
|
8546
|
-
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128,
|
|
8550
|
+
return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, GT(r);
|
|
8551
|
+
}
|
|
8552
|
+
function ZT(e, t, n) {
|
|
8553
|
+
return I0.randomUUID && !e ? I0.randomUUID() : QT(e);
|
|
8547
8554
|
}
|
|
8548
8555
|
const eE = { class: "app-input__icon pointer-events-none absolute z-10 mt-px h-5" }, tE = /* @__PURE__ */ ke({
|
|
8549
8556
|
__name: "InputIconSlot",
|
|
@@ -20303,9 +20310,9 @@ const Xt = {
|
|
|
20303
20310
|
multipleLabel: "flex items-center h-full absolute left-0 top-0 pointer-events-none bg-transparent leading-snug pl-3 rtl:left-auto rtl:right-0 rtl:pl-0 rtl:pr-3",
|
|
20304
20311
|
search: "h-full w-full absolute inset-0 outline-hidden focus:ring-0 appearance-none box-border border-0 text-base font-sans bg-white rounded-lg pl-3 rtl:pl-0 rtl:pr-3",
|
|
20305
20312
|
tags: "min-w-0 grow shrink flex flex-wrap items-center mt-1 px-2",
|
|
20306
|
-
tag: "max-w-full bg-zinc-200 text-sm font-semibold py-1 pl-2 rounded-
|
|
20313
|
+
tag: "max-w-full bg-zinc-200 text-sm font-semibold py-1 pl-2 rounded-lg h-7 mr-1 mb-1 flex items-center whitespace-nowrap rtl:pl-0 rtl:pr-2 rtl:mr-0 rtl:ml-1",
|
|
20307
20314
|
tagDisabled: "pr-2 opacity-50 rtl:pl-2",
|
|
20308
|
-
tagRemove: "flex items-center justify-center p-1 mx-0.5 rounded-
|
|
20315
|
+
tagRemove: "flex items-center justify-center p-1 mx-0.5 rounded-lg group",
|
|
20309
20316
|
tagRemoveIcon: "bg-multiselect-remove bg-center bg-no-repeat inline-block w-3 h-3 text-zinc-700",
|
|
20310
20317
|
tagText: "overflow-hidden text-ellipsis whitespace-nowrap",
|
|
20311
20318
|
tagsSearchWrapper: "inline-block relative mx-1 mb-1 grow shrink h-full",
|
|
@@ -44344,7 +44351,7 @@ export {
|
|
|
44344
44351
|
iT as AppConfirm,
|
|
44345
44352
|
tB as AppContextMenu,
|
|
44346
44353
|
nZ as AppDataTable,
|
|
44347
|
-
|
|
44354
|
+
VT as AppDefinitionItem,
|
|
44348
44355
|
KQ as AppDefinitionList,
|
|
44349
44356
|
XQ as AppDisclosure,
|
|
44350
44357
|
JQ as AppDisclosureButton,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@autoafleveren/ui",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.9",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist/*",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"@vuepic/vue-datepicker": "^11.0.2",
|
|
87
87
|
"@vueuse/components": "^13.5.0",
|
|
88
88
|
"@vueuse/core": "^13.5.0",
|
|
89
|
-
"@vueuse/integrations": "^13.
|
|
89
|
+
"@vueuse/integrations": "^13.8.0",
|
|
90
90
|
"date-fns": "^4.1.0",
|
|
91
91
|
"focus-trap": "^7",
|
|
92
92
|
"js-cookie": "^3.0.5",
|
|
@@ -97,7 +97,7 @@
|
|
|
97
97
|
"pusher-js": "^8.4.0",
|
|
98
98
|
"radash": "^12.1.1",
|
|
99
99
|
"tailwindcss": "4.1.11",
|
|
100
|
-
"uuid": "^
|
|
100
|
+
"uuid": "^13.0.0",
|
|
101
101
|
"vite": "^7.0.6",
|
|
102
102
|
"vue": "^3.5.18",
|
|
103
103
|
"vue-docgen-api": "^4.79.2",
|
|
@@ -9,12 +9,16 @@
|
|
|
9
9
|
component?: DefinitionItem['component'];
|
|
10
10
|
componentProperties?: DefinitionItem['componentProperties'];
|
|
11
11
|
hideEmptyValues?: boolean;
|
|
12
|
+
itemRowClasses?: string;
|
|
13
|
+
itemCellClasses?: string;
|
|
12
14
|
}>(), {
|
|
13
15
|
title: undefined,
|
|
14
16
|
description: undefined,
|
|
15
17
|
component: undefined,
|
|
16
18
|
componentProperties: undefined,
|
|
17
19
|
hideEmptyValues: false,
|
|
20
|
+
itemRowClasses: undefined,
|
|
21
|
+
itemCellClasses: undefined,
|
|
18
22
|
});
|
|
19
23
|
|
|
20
24
|
const slots = useSlots();
|
|
@@ -26,12 +30,13 @@
|
|
|
26
30
|
<template>
|
|
27
31
|
<div
|
|
28
32
|
v-if="hasDescription || !hasDescription && !hideEmptyValues"
|
|
33
|
+
:class="itemRowClasses"
|
|
29
34
|
class="flex w-full"
|
|
30
35
|
data-test-item
|
|
31
36
|
>
|
|
32
37
|
<dt
|
|
33
38
|
v-if="hasTitle"
|
|
34
|
-
:class="{ 'w-1/2': hasDescription || component }"
|
|
39
|
+
:class="[itemCellClasses, { 'w-1/2': hasDescription || component }]"
|
|
35
40
|
class="font-bold text-zinc-900"
|
|
36
41
|
data-test-title
|
|
37
42
|
>
|
|
@@ -42,7 +47,7 @@
|
|
|
42
47
|
|
|
43
48
|
<dd
|
|
44
49
|
v-if="hasDescription || component || $slots.default"
|
|
45
|
-
:class="{ 'w-1/2': hasTitle }"
|
|
50
|
+
:class="[itemCellClasses, { 'w-1/2': hasTitle }]"
|
|
46
51
|
data-test-description
|
|
47
52
|
>
|
|
48
53
|
<slot>{{ description }}</slot>
|
|
@@ -6,9 +6,13 @@
|
|
|
6
6
|
withDefaults(defineProps<{
|
|
7
7
|
items?: DefinitionItem[];
|
|
8
8
|
hideEmptyValues?: boolean;
|
|
9
|
+
itemRowClasses?: string;
|
|
10
|
+
itemCellClasses?: string;
|
|
9
11
|
}>(), {
|
|
10
12
|
items: undefined,
|
|
11
13
|
hideEmptyValues: false,
|
|
14
|
+
itemRowClasses: undefined,
|
|
15
|
+
itemCellClasses: undefined,
|
|
12
16
|
});
|
|
13
17
|
</script>
|
|
14
18
|
|
|
@@ -25,6 +29,8 @@
|
|
|
25
29
|
:component="item.component"
|
|
26
30
|
:component-properties="item.componentProperties"
|
|
27
31
|
:hide-empty-values="hideEmptyValues"
|
|
32
|
+
:item-row-classes="itemRowClasses"
|
|
33
|
+
:item-cell-classes="itemCellClasses"
|
|
28
34
|
/>
|
|
29
35
|
</template>
|
|
30
36
|
</slot>
|
|
@@ -10,9 +10,9 @@ export const classes = {
|
|
|
10
10
|
multipleLabel: 'flex items-center h-full absolute left-0 top-0 pointer-events-none bg-transparent leading-snug pl-3 rtl:left-auto rtl:right-0 rtl:pl-0 rtl:pr-3',
|
|
11
11
|
search: 'h-full w-full absolute inset-0 outline-hidden focus:ring-0 appearance-none box-border border-0 text-base font-sans bg-white rounded-lg pl-3 rtl:pl-0 rtl:pr-3',
|
|
12
12
|
tags: 'min-w-0 grow shrink flex flex-wrap items-center mt-1 px-2',
|
|
13
|
-
tag: 'max-w-full bg-zinc-200 text-sm font-semibold py-1 pl-2 rounded-
|
|
13
|
+
tag: 'max-w-full bg-zinc-200 text-sm font-semibold py-1 pl-2 rounded-lg h-7 mr-1 mb-1 flex items-center whitespace-nowrap rtl:pl-0 rtl:pr-2 rtl:mr-0 rtl:ml-1',
|
|
14
14
|
tagDisabled: 'pr-2 opacity-50 rtl:pl-2',
|
|
15
|
-
tagRemove: 'flex items-center justify-center p-1 mx-0.5 rounded-
|
|
15
|
+
tagRemove: 'flex items-center justify-center p-1 mx-0.5 rounded-lg group',
|
|
16
16
|
tagRemoveIcon: 'bg-multiselect-remove bg-center bg-no-repeat inline-block w-3 h-3 text-zinc-700',
|
|
17
17
|
tagText: 'overflow-hidden text-ellipsis whitespace-nowrap',
|
|
18
18
|
tagsSearchWrapper: 'inline-block relative mx-1 mb-1 grow shrink h-full',
|