@strands.gg/accui 2.10.9 → 2.11.1
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/accui.css +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +250 -134
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -92,7 +92,7 @@ const _hoisted_4$G = {
|
|
|
92
92
|
viewBox: "0 0 20 20",
|
|
93
93
|
"aria-hidden": "true"
|
|
94
94
|
};
|
|
95
|
-
const _hoisted_5$
|
|
95
|
+
const _hoisted_5$A = ["d"];
|
|
96
96
|
const _hoisted_6$v = { class: "alert-text-container" };
|
|
97
97
|
const _hoisted_7$s = {
|
|
98
98
|
key: 0,
|
|
@@ -146,7 +146,7 @@ const _sfc_main$$ = /* @__PURE__ */ defineComponent({
|
|
|
146
146
|
"fill-rule": "evenodd",
|
|
147
147
|
d: iconPath.value,
|
|
148
148
|
"clip-rule": "evenodd"
|
|
149
|
-
}, null, 8, _hoisted_5$
|
|
149
|
+
}, null, 8, _hoisted_5$A)
|
|
150
150
|
]))
|
|
151
151
|
]),
|
|
152
152
|
createElementVNode("div", _hoisted_6$v, [
|
|
@@ -197,7 +197,7 @@ const _hoisted_1$S = {
|
|
|
197
197
|
const _hoisted_2$K = ["width", "height"];
|
|
198
198
|
const _hoisted_3$H = ["d"];
|
|
199
199
|
const _hoisted_4$F = ["stroke-width"];
|
|
200
|
-
const _hoisted_5$
|
|
200
|
+
const _hoisted_5$z = ["stroke-width"];
|
|
201
201
|
const _hoisted_6$u = ["width", "height"];
|
|
202
202
|
const _hoisted_7$r = {
|
|
203
203
|
key: 3,
|
|
@@ -266,7 +266,7 @@ const _sfc_main$_ = /* @__PURE__ */ defineComponent({
|
|
|
266
266
|
"stroke-linecap": "round",
|
|
267
267
|
"stroke-linejoin": "round",
|
|
268
268
|
class: "loader-animated-path"
|
|
269
|
-
}, null, 8, _hoisted_5$
|
|
269
|
+
}, null, 8, _hoisted_5$z)
|
|
270
270
|
], 8, _hoisted_2$K))
|
|
271
271
|
])) : _ctx.variant === "circle" ? (openBlock(), createElementBlock("div", {
|
|
272
272
|
key: 1,
|
|
@@ -807,9 +807,12 @@ const _hoisted_4$D = {
|
|
|
807
807
|
key: 0,
|
|
808
808
|
class: "ui-card-subtitle"
|
|
809
809
|
};
|
|
810
|
-
const _hoisted_5$
|
|
811
|
-
const _hoisted_6$t = {
|
|
810
|
+
const _hoisted_5$y = {
|
|
812
811
|
key: 1,
|
|
812
|
+
class: "ui-card-content"
|
|
813
|
+
};
|
|
814
|
+
const _hoisted_6$t = {
|
|
815
|
+
key: 2,
|
|
813
816
|
class: "ui-card-footer"
|
|
814
817
|
};
|
|
815
818
|
const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
@@ -852,9 +855,9 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
852
855
|
renderSlot(_ctx.$slots, "actions", {}, void 0, true)
|
|
853
856
|
], true)
|
|
854
857
|
])) : createCommentVNode("", true),
|
|
855
|
-
|
|
858
|
+
_ctx.$slots["default"] ? (openBlock(), createElementBlock("div", _hoisted_5$y, [
|
|
856
859
|
renderSlot(_ctx.$slots, "default", {}, void 0, true)
|
|
857
|
-
]),
|
|
860
|
+
])) : createCommentVNode("", true),
|
|
858
861
|
_ctx.$slots["footer"] ? (openBlock(), createElementBlock("div", _hoisted_6$t, [
|
|
859
862
|
renderSlot(_ctx.$slots, "footer", {}, void 0, true)
|
|
860
863
|
])) : createCommentVNode("", true)
|
|
@@ -862,7 +865,7 @@ const _sfc_main$U = /* @__PURE__ */ defineComponent({
|
|
|
862
865
|
};
|
|
863
866
|
}
|
|
864
867
|
});
|
|
865
|
-
const StrandsUiCard = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-
|
|
868
|
+
const StrandsUiCard = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["__scopeId", "data-v-ba390c1d"]]);
|
|
866
869
|
/**
|
|
867
870
|
* @license lucide-vue-next v0.542.0 - ISC
|
|
868
871
|
*
|
|
@@ -1429,7 +1432,7 @@ const _hoisted_4$C = {
|
|
|
1429
1432
|
key: 2,
|
|
1430
1433
|
class: "input-trailing-icon"
|
|
1431
1434
|
};
|
|
1432
|
-
const _hoisted_5$
|
|
1435
|
+
const _hoisted_5$x = {
|
|
1433
1436
|
key: 3,
|
|
1434
1437
|
class: "input-trailing-icon"
|
|
1435
1438
|
};
|
|
@@ -1437,18 +1440,21 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
1437
1440
|
__name: "UiInput.Text",
|
|
1438
1441
|
props: {
|
|
1439
1442
|
type: { default: "text" },
|
|
1440
|
-
modelValue: {},
|
|
1441
|
-
placeholder: {},
|
|
1442
|
-
disabled: { type: Boolean, default: false },
|
|
1443
|
-
readonly: { type: Boolean, default: false },
|
|
1444
|
-
required: { type: Boolean, default: false },
|
|
1445
1443
|
min: {},
|
|
1446
1444
|
max: {},
|
|
1447
1445
|
step: {},
|
|
1448
1446
|
autocomplete: {},
|
|
1449
1447
|
spellcheck: { type: Boolean, default: true },
|
|
1448
|
+
label: {},
|
|
1449
|
+
helpText: {},
|
|
1450
|
+
modelValue: {},
|
|
1451
|
+
placeholder: {},
|
|
1452
|
+
disabled: { type: Boolean, default: false },
|
|
1453
|
+
readonly: { type: Boolean, default: false },
|
|
1454
|
+
required: { type: Boolean, default: false },
|
|
1455
|
+
fullWidth: { type: Boolean },
|
|
1450
1456
|
inputId: {},
|
|
1451
|
-
error: { type: Boolean, default: false },
|
|
1457
|
+
error: { type: [Boolean, String, Error], default: false },
|
|
1452
1458
|
size: { default: "md" }
|
|
1453
1459
|
},
|
|
1454
1460
|
emits: ["update:modelValue", "blur", "focus", "keydown"],
|
|
@@ -1567,14 +1573,14 @@ const _sfc_main$T = /* @__PURE__ */ defineComponent({
|
|
|
1567
1573
|
]),
|
|
1568
1574
|
_: 1
|
|
1569
1575
|
})
|
|
1570
|
-
])) : hasTrailingIcon.value ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
1576
|
+
])) : hasTrailingIcon.value ? (openBlock(), createElementBlock("div", _hoisted_5$x, [
|
|
1571
1577
|
renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
|
|
1572
1578
|
])) : createCommentVNode("", true)
|
|
1573
1579
|
], 2);
|
|
1574
1580
|
};
|
|
1575
1581
|
}
|
|
1576
1582
|
});
|
|
1577
|
-
const UiInputText = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-
|
|
1583
|
+
const UiInputText = /* @__PURE__ */ _export_sfc(_sfc_main$T, [["__scopeId", "data-v-94fe77ac"]]);
|
|
1578
1584
|
const _hoisted_1$M = {
|
|
1579
1585
|
key: 0,
|
|
1580
1586
|
class: "input-leading-icon"
|
|
@@ -1587,19 +1593,22 @@ const _hoisted_3$D = {
|
|
|
1587
1593
|
const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
1588
1594
|
__name: "UiInput.Textarea",
|
|
1589
1595
|
props: {
|
|
1590
|
-
modelValue: {},
|
|
1591
|
-
placeholder: {},
|
|
1592
|
-
disabled: { type: Boolean, default: false },
|
|
1593
|
-
readonly: { type: Boolean, default: false },
|
|
1594
|
-
required: { type: Boolean, default: false },
|
|
1595
1596
|
rows: { default: 3 },
|
|
1596
1597
|
cols: {},
|
|
1597
1598
|
maxlength: {},
|
|
1598
1599
|
autocomplete: {},
|
|
1599
1600
|
spellcheck: { type: Boolean, default: true },
|
|
1600
1601
|
resizable: { type: Boolean, default: true },
|
|
1602
|
+
label: {},
|
|
1603
|
+
helpText: {},
|
|
1604
|
+
modelValue: {},
|
|
1605
|
+
placeholder: {},
|
|
1606
|
+
disabled: { type: Boolean, default: false },
|
|
1607
|
+
readonly: { type: Boolean, default: false },
|
|
1608
|
+
required: { type: Boolean, default: false },
|
|
1609
|
+
fullWidth: { type: Boolean },
|
|
1601
1610
|
inputId: {},
|
|
1602
|
-
error: { type: Boolean, default: false },
|
|
1611
|
+
error: { type: [Boolean, String, Error], default: false },
|
|
1603
1612
|
size: { default: "md" }
|
|
1604
1613
|
},
|
|
1605
1614
|
emits: ["update:modelValue", "blur", "focus", "keydown"],
|
|
@@ -1681,7 +1690,7 @@ const _sfc_main$S = /* @__PURE__ */ defineComponent({
|
|
|
1681
1690
|
};
|
|
1682
1691
|
}
|
|
1683
1692
|
});
|
|
1684
|
-
const UiInputTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-
|
|
1693
|
+
const UiInputTextarea = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["__scopeId", "data-v-2f7d46c6"]]);
|
|
1685
1694
|
function useFloatingPosition(options) {
|
|
1686
1695
|
const {
|
|
1687
1696
|
trigger,
|
|
@@ -1894,7 +1903,7 @@ const _hoisted_4$B = {
|
|
|
1894
1903
|
key: 0,
|
|
1895
1904
|
class: "input-select-text"
|
|
1896
1905
|
};
|
|
1897
|
-
const _hoisted_5$
|
|
1906
|
+
const _hoisted_5$w = {
|
|
1898
1907
|
key: 1,
|
|
1899
1908
|
class: "input-select-placeholder"
|
|
1900
1909
|
};
|
|
@@ -1925,18 +1934,23 @@ const _hoisted_14$l = {
|
|
|
1925
1934
|
const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
1926
1935
|
__name: "UiInput.Select",
|
|
1927
1936
|
props: {
|
|
1928
|
-
modelValue: {},
|
|
1929
1937
|
options: { default: () => [] },
|
|
1930
|
-
placeholder: {},
|
|
1931
|
-
disabled: { type: Boolean, default: false },
|
|
1932
1938
|
multiple: { type: Boolean, default: false },
|
|
1933
1939
|
searchable: { type: Boolean, default: false },
|
|
1934
1940
|
allowInsert: { type: Boolean, default: false },
|
|
1935
1941
|
maxDropdownHeight: { default: 400 },
|
|
1936
1942
|
noOptionsText: { default: "No options available" },
|
|
1937
1943
|
searchPlaceholder: { default: "" },
|
|
1944
|
+
label: {},
|
|
1945
|
+
helpText: {},
|
|
1946
|
+
modelValue: {},
|
|
1947
|
+
placeholder: {},
|
|
1948
|
+
disabled: { type: Boolean, default: false },
|
|
1949
|
+
readonly: { type: Boolean },
|
|
1950
|
+
required: { type: Boolean },
|
|
1951
|
+
fullWidth: { type: Boolean },
|
|
1938
1952
|
inputId: {},
|
|
1939
|
-
error: { type: Boolean, default: false },
|
|
1953
|
+
error: { type: [Boolean, String, Error], default: false },
|
|
1940
1954
|
size: { default: "md" }
|
|
1941
1955
|
},
|
|
1942
1956
|
emits: ["update:modelValue", "blur", "focus"],
|
|
@@ -2088,7 +2102,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
2088
2102
|
}
|
|
2089
2103
|
};
|
|
2090
2104
|
const isOptionSelected = (option) => {
|
|
2091
|
-
if (option.value.startsWith("__insert__")) {
|
|
2105
|
+
if (option.value && typeof option.value === "string" && option.value.startsWith("__insert__")) {
|
|
2092
2106
|
return false;
|
|
2093
2107
|
}
|
|
2094
2108
|
return selectedValues.value.includes(option.value);
|
|
@@ -2097,7 +2111,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
2097
2111
|
if (option.disabled) return;
|
|
2098
2112
|
if (props.multiple) {
|
|
2099
2113
|
const newValue = [...selectedValues.value];
|
|
2100
|
-
if (option.value.startsWith("__insert__")) {
|
|
2114
|
+
if (option.value && typeof option.value === "string" && option.value.startsWith("__insert__")) {
|
|
2101
2115
|
const newItemValue = option.value.replace("__insert__", "");
|
|
2102
2116
|
if (!newValue.includes(newItemValue)) {
|
|
2103
2117
|
newValue.push(newItemValue);
|
|
@@ -2243,7 +2257,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
2243
2257
|
"aria-controls": dropdownId.value
|
|
2244
2258
|
}, [
|
|
2245
2259
|
createElementVNode("div", _hoisted_3$C, [
|
|
2246
|
-
displayValue.value ? (openBlock(), createElementBlock("span", _hoisted_4$B, toDisplayString(displayValue.value), 1)) : (openBlock(), createElementBlock("span", _hoisted_5$
|
|
2260
|
+
displayValue.value ? (openBlock(), createElementBlock("span", _hoisted_4$B, toDisplayString(displayValue.value), 1)) : (openBlock(), createElementBlock("span", _hoisted_5$w, toDisplayString(_ctx.placeholder || "Select an option..."), 1))
|
|
2247
2261
|
]),
|
|
2248
2262
|
createElementVNode("div", {
|
|
2249
2263
|
class: normalizeClass(["input-select-arrow", { "input-select-arrow-open": dropdownState.value.isOpen }])
|
|
@@ -2289,7 +2303,11 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
2289
2303
|
class: "input-dropdown-options",
|
|
2290
2304
|
style: normalizeStyle({ maxHeight: `${_ctx.maxDropdownHeight}px` })
|
|
2291
2305
|
}, [
|
|
2292
|
-
filteredOptions.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_9$n,
|
|
2306
|
+
filteredOptions.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_9$n, [
|
|
2307
|
+
renderSlot(_ctx.$slots, "zero-state", {}, () => [
|
|
2308
|
+
createTextVNode(toDisplayString(_ctx.noOptionsText), 1)
|
|
2309
|
+
], true)
|
|
2310
|
+
])) : createCommentVNode("", true),
|
|
2293
2311
|
(openBlock(true), createElementBlock(Fragment$1, null, renderList(filteredOptions.value, (option, index) => {
|
|
2294
2312
|
return openBlock(), createElementBlock("div", {
|
|
2295
2313
|
key: option.value,
|
|
@@ -2297,7 +2315,7 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
2297
2315
|
"input-dropdown-option--selected": isOptionSelected(option),
|
|
2298
2316
|
"input-dropdown-option--highlighted": index === dropdownState.value.highlightedIndex,
|
|
2299
2317
|
"input-dropdown-option--disabled": option.disabled,
|
|
2300
|
-
"input-dropdown-option--insert": option.value.startsWith("__insert__")
|
|
2318
|
+
"input-dropdown-option--insert": option.value && typeof option.value === "string" && option.value.startsWith("__insert__")
|
|
2301
2319
|
}]),
|
|
2302
2320
|
onClick: ($event) => selectOption(option),
|
|
2303
2321
|
onMouseenter: ($event) => dropdownState.value.highlightedIndex = index,
|
|
@@ -2320,12 +2338,12 @@ const _sfc_main$R = /* @__PURE__ */ defineComponent({
|
|
|
2320
2338
|
};
|
|
2321
2339
|
}
|
|
2322
2340
|
});
|
|
2323
|
-
const UiInputSelect = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-
|
|
2341
|
+
const UiInputSelect = /* @__PURE__ */ _export_sfc(_sfc_main$R, [["__scopeId", "data-v-830c63a5"]]);
|
|
2324
2342
|
const _hoisted_1$K = { class: "input-leading-icon" };
|
|
2325
2343
|
const _hoisted_2$E = ["src"];
|
|
2326
2344
|
const _hoisted_3$B = ["id", "accept", "multiple", "disabled", "required"];
|
|
2327
2345
|
const _hoisted_4$A = { class: "input-file-content" };
|
|
2328
|
-
const _hoisted_5$
|
|
2346
|
+
const _hoisted_5$v = {
|
|
2329
2347
|
key: 0,
|
|
2330
2348
|
class: "input-file-prompt"
|
|
2331
2349
|
};
|
|
@@ -2353,16 +2371,21 @@ const _hoisted_14$k = {
|
|
|
2353
2371
|
const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
2354
2372
|
__name: "UiInput.File",
|
|
2355
2373
|
props: {
|
|
2356
|
-
modelValue: {},
|
|
2357
2374
|
accept: {},
|
|
2358
2375
|
multiple: { type: Boolean, default: false },
|
|
2359
2376
|
maxFileSize: { default: 10 * 1024 * 1024 },
|
|
2360
2377
|
dragDropText: {},
|
|
2361
2378
|
selectedText: {},
|
|
2379
|
+
label: {},
|
|
2380
|
+
helpText: {},
|
|
2381
|
+
modelValue: {},
|
|
2382
|
+
placeholder: {},
|
|
2362
2383
|
disabled: { type: Boolean, default: false },
|
|
2384
|
+
readonly: { type: Boolean },
|
|
2363
2385
|
required: { type: Boolean, default: false },
|
|
2386
|
+
fullWidth: { type: Boolean },
|
|
2364
2387
|
inputId: {},
|
|
2365
|
-
error: { type: Boolean, default: false },
|
|
2388
|
+
error: { type: [Boolean, String, Error], default: false },
|
|
2366
2389
|
size: { default: "md" }
|
|
2367
2390
|
},
|
|
2368
2391
|
emits: ["update:modelValue", "file-error", "blur", "focus"],
|
|
@@ -2561,7 +2584,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
2561
2584
|
onFocus: handleFocus
|
|
2562
2585
|
}, null, 40, _hoisted_3$B),
|
|
2563
2586
|
createElementVNode("div", _hoisted_4$A, [
|
|
2564
|
-
selectedFiles.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
2587
|
+
selectedFiles.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_5$v, [
|
|
2565
2588
|
createElementVNode("div", _hoisted_6$r, toDisplayString(_ctx.dragDropText || "Click to select or drag and drop"), 1),
|
|
2566
2589
|
_ctx.accept ? (openBlock(), createElementBlock("div", _hoisted_7$p, toDisplayString(_ctx.accept), 1)) : createCommentVNode("", true)
|
|
2567
2590
|
])) : (openBlock(), createElementBlock("div", _hoisted_8$n, [
|
|
@@ -2596,7 +2619,7 @@ const _sfc_main$Q = /* @__PURE__ */ defineComponent({
|
|
|
2596
2619
|
};
|
|
2597
2620
|
}
|
|
2598
2621
|
});
|
|
2599
|
-
const UiInputFile = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-
|
|
2622
|
+
const UiInputFile = /* @__PURE__ */ _export_sfc(_sfc_main$Q, [["__scopeId", "data-v-249075fe"]]);
|
|
2600
2623
|
const _hoisted_1$J = { class: "tabs-wrapper" };
|
|
2601
2624
|
const _hoisted_2$D = {
|
|
2602
2625
|
key: 0,
|
|
@@ -2607,7 +2630,7 @@ const _hoisted_4$z = {
|
|
|
2607
2630
|
key: 1,
|
|
2608
2631
|
class: "tabs-after"
|
|
2609
2632
|
};
|
|
2610
|
-
const _hoisted_5$
|
|
2633
|
+
const _hoisted_5$u = ["aria-labelledby"];
|
|
2611
2634
|
const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
2612
2635
|
__name: "UiTabs",
|
|
2613
2636
|
props: {
|
|
@@ -2992,7 +3015,7 @@ const _sfc_main$P = /* @__PURE__ */ defineComponent({
|
|
|
2992
3015
|
id: "tabpanel"
|
|
2993
3016
|
}, [
|
|
2994
3017
|
renderSlot(_ctx.$slots, "content", { activeTab: activeTab.value }, void 0, true)
|
|
2995
|
-
], 10, _hoisted_5$
|
|
3018
|
+
], 10, _hoisted_5$u)) : createCommentVNode("", true)
|
|
2996
3019
|
], 2);
|
|
2997
3020
|
};
|
|
2998
3021
|
}
|
|
@@ -3073,7 +3096,7 @@ const _hoisted_4$y = {
|
|
|
3073
3096
|
key: 0,
|
|
3074
3097
|
class: "datetime-picker-value"
|
|
3075
3098
|
};
|
|
3076
|
-
const _hoisted_5$
|
|
3099
|
+
const _hoisted_5$t = {
|
|
3077
3100
|
key: 1,
|
|
3078
3101
|
class: "datetime-picker-placeholder"
|
|
3079
3102
|
};
|
|
@@ -3452,26 +3475,14 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
3452
3475
|
_ctx.type === "date" ? (openBlock(), createBlock(unref(Calendar), { key: 0 })) : _ctx.type === "time" ? (openBlock(), createBlock(unref(Clock), { key: 1 })) : (openBlock(), createBlock(unref(CalendarClock), { key: 2 }))
|
|
3453
3476
|
]),
|
|
3454
3477
|
createElementVNode("div", _hoisted_3$z, [
|
|
3455
|
-
displayValue.value ? (openBlock(), createElementBlock("span", _hoisted_4$y, toDisplayString(displayValue.value), 1)) : (openBlock(), createElementBlock("span", _hoisted_5$
|
|
3478
|
+
displayValue.value ? (openBlock(), createElementBlock("span", _hoisted_4$y, toDisplayString(displayValue.value), 1)) : (openBlock(), createElementBlock("span", _hoisted_5$t, toDisplayString(_ctx.placeholder || getDefaultPlaceholder()), 1))
|
|
3456
3479
|
]),
|
|
3457
3480
|
_ctx.modelValue && !_ctx.disabled && !_ctx.readonly ? (openBlock(), createElementBlock("div", {
|
|
3458
3481
|
key: 0,
|
|
3459
3482
|
class: "datetime-picker-trailing-icon",
|
|
3460
3483
|
onClick: withModifiers(clearValue, ["stop"])
|
|
3461
3484
|
}, [
|
|
3462
|
-
createVNode(
|
|
3463
|
-
color: "danger",
|
|
3464
|
-
variant: "ghost",
|
|
3465
|
-
size: "sm",
|
|
3466
|
-
icon: "",
|
|
3467
|
-
squircle: "",
|
|
3468
|
-
"aria-label": "Clear value"
|
|
3469
|
-
}, {
|
|
3470
|
-
icon: withCtx(() => [
|
|
3471
|
-
createVNode(unref(X))
|
|
3472
|
-
]),
|
|
3473
|
-
_: 1
|
|
3474
|
-
})
|
|
3485
|
+
createVNode(unref(X))
|
|
3475
3486
|
])) : (openBlock(), createElementBlock("div", _hoisted_6$q, [
|
|
3476
3487
|
createVNode(unref(ChevronDown))
|
|
3477
3488
|
]))
|
|
@@ -3707,21 +3718,24 @@ const _sfc_main$N = /* @__PURE__ */ defineComponent({
|
|
|
3707
3718
|
};
|
|
3708
3719
|
}
|
|
3709
3720
|
});
|
|
3710
|
-
const UiDateTimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-
|
|
3721
|
+
const UiDateTimePicker = /* @__PURE__ */ _export_sfc(_sfc_main$N, [["__scopeId", "data-v-f688c330"]]);
|
|
3711
3722
|
const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
3712
3723
|
__name: "UiInput.Date",
|
|
3713
3724
|
props: {
|
|
3725
|
+
min: {},
|
|
3726
|
+
max: {},
|
|
3727
|
+
format: { default: "iso" },
|
|
3728
|
+
label: {},
|
|
3729
|
+
helpText: {},
|
|
3714
3730
|
modelValue: {},
|
|
3715
3731
|
placeholder: {},
|
|
3716
3732
|
disabled: { type: Boolean, default: false },
|
|
3717
3733
|
readonly: { type: Boolean, default: false },
|
|
3718
3734
|
required: { type: Boolean, default: false },
|
|
3719
|
-
|
|
3720
|
-
max: {},
|
|
3735
|
+
fullWidth: { type: Boolean },
|
|
3721
3736
|
inputId: {},
|
|
3722
|
-
error: { type: Boolean, default: false },
|
|
3723
|
-
size: { default: "md" }
|
|
3724
|
-
format: { default: "iso" }
|
|
3737
|
+
error: { type: [Boolean, String, Error], default: false },
|
|
3738
|
+
size: { default: "md" }
|
|
3725
3739
|
},
|
|
3726
3740
|
emits: ["update:modelValue", "change", "blur", "focus", "keydown"],
|
|
3727
3741
|
setup(__props, { emit: __emit }) {
|
|
@@ -3742,7 +3756,7 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
3742
3756
|
required: _ctx.required,
|
|
3743
3757
|
min: _ctx.min,
|
|
3744
3758
|
max: _ctx.max,
|
|
3745
|
-
error: _ctx.error,
|
|
3759
|
+
error: Boolean(_ctx.error),
|
|
3746
3760
|
size: _ctx.size,
|
|
3747
3761
|
format: _ctx.format,
|
|
3748
3762
|
"onUpdate:modelValue": handleUpdate,
|
|
@@ -3754,16 +3768,19 @@ const _sfc_main$M = /* @__PURE__ */ defineComponent({
|
|
|
3754
3768
|
const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
3755
3769
|
__name: "UiInput.Time",
|
|
3756
3770
|
props: {
|
|
3771
|
+
is24Hour: { type: Boolean, default: true },
|
|
3772
|
+
minuteStep: { default: 1 },
|
|
3773
|
+
label: {},
|
|
3774
|
+
helpText: {},
|
|
3757
3775
|
modelValue: {},
|
|
3758
3776
|
placeholder: {},
|
|
3759
3777
|
disabled: { type: Boolean, default: false },
|
|
3760
3778
|
readonly: { type: Boolean, default: false },
|
|
3761
3779
|
required: { type: Boolean, default: false },
|
|
3780
|
+
fullWidth: { type: Boolean },
|
|
3762
3781
|
inputId: {},
|
|
3763
|
-
error: { type: Boolean, default: false },
|
|
3764
|
-
size: { default: "md" }
|
|
3765
|
-
is24Hour: { type: Boolean, default: true },
|
|
3766
|
-
minuteStep: { default: 1 }
|
|
3782
|
+
error: { type: [Boolean, String, Error], default: false },
|
|
3783
|
+
size: { default: "md" }
|
|
3767
3784
|
},
|
|
3768
3785
|
emits: ["update:modelValue", "change", "blur", "focus", "keydown"],
|
|
3769
3786
|
setup(__props, { emit: __emit }) {
|
|
@@ -3782,7 +3799,7 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
3782
3799
|
disabled: _ctx.disabled,
|
|
3783
3800
|
readonly: _ctx.readonly,
|
|
3784
3801
|
required: _ctx.required,
|
|
3785
|
-
error: _ctx.error,
|
|
3802
|
+
error: Boolean(_ctx.error),
|
|
3786
3803
|
size: _ctx.size,
|
|
3787
3804
|
is24Hour: _ctx.is24Hour,
|
|
3788
3805
|
minuteStep: _ctx.minuteStep,
|
|
@@ -3795,19 +3812,22 @@ const _sfc_main$L = /* @__PURE__ */ defineComponent({
|
|
|
3795
3812
|
const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
3796
3813
|
__name: "UiInput.DateTime",
|
|
3797
3814
|
props: {
|
|
3815
|
+
min: {},
|
|
3816
|
+
max: {},
|
|
3817
|
+
format: { default: "iso" },
|
|
3818
|
+
is24Hour: { type: Boolean, default: true },
|
|
3819
|
+
minuteStep: { default: 1 },
|
|
3820
|
+
label: {},
|
|
3821
|
+
helpText: {},
|
|
3798
3822
|
modelValue: {},
|
|
3799
3823
|
placeholder: {},
|
|
3800
3824
|
disabled: { type: Boolean, default: false },
|
|
3801
3825
|
readonly: { type: Boolean, default: false },
|
|
3802
3826
|
required: { type: Boolean, default: false },
|
|
3803
|
-
|
|
3804
|
-
max: {},
|
|
3827
|
+
fullWidth: { type: Boolean },
|
|
3805
3828
|
inputId: {},
|
|
3806
|
-
error: { type: Boolean, default: false },
|
|
3807
|
-
size: { default: "md" }
|
|
3808
|
-
format: { default: "iso" },
|
|
3809
|
-
is24Hour: { type: Boolean, default: true },
|
|
3810
|
-
minuteStep: { default: 1 }
|
|
3829
|
+
error: { type: [Boolean, String, Error], default: false },
|
|
3830
|
+
size: { default: "md" }
|
|
3811
3831
|
},
|
|
3812
3832
|
emits: ["update:modelValue", "change", "blur", "focus", "keydown"],
|
|
3813
3833
|
setup(__props, { emit: __emit }) {
|
|
@@ -3828,7 +3848,7 @@ const _sfc_main$K = /* @__PURE__ */ defineComponent({
|
|
|
3828
3848
|
required: _ctx.required,
|
|
3829
3849
|
min: _ctx.min,
|
|
3830
3850
|
max: _ctx.max,
|
|
3831
|
-
error: _ctx.error,
|
|
3851
|
+
error: Boolean(_ctx.error),
|
|
3832
3852
|
size: _ctx.size,
|
|
3833
3853
|
format: _ctx.format,
|
|
3834
3854
|
is24Hour: _ctx.is24Hour,
|
|
@@ -24795,26 +24815,31 @@ const _hoisted_1$G = { class: "input-richtext-toolbar" };
|
|
|
24795
24815
|
const _hoisted_2$B = { class: "input-richtext-group" };
|
|
24796
24816
|
const _hoisted_3$y = { class: "input-richtext-group" };
|
|
24797
24817
|
const _hoisted_4$x = { class: "input-richtext-group" };
|
|
24798
|
-
const _hoisted_5$
|
|
24818
|
+
const _hoisted_5$s = { class: "input-richtext-group" };
|
|
24799
24819
|
const _hoisted_6$p = { class: "input-richtext-group" };
|
|
24800
24820
|
const _hoisted_7$n = { class: "input-richtext-editor-wrapper" };
|
|
24801
24821
|
const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
24802
24822
|
__name: "UiInput.RichText",
|
|
24803
24823
|
props: {
|
|
24824
|
+
minHeight: { default: "200px" },
|
|
24825
|
+
maxHeight: { default: "400px" },
|
|
24826
|
+
label: {},
|
|
24827
|
+
helpText: {},
|
|
24804
24828
|
modelValue: {},
|
|
24805
24829
|
placeholder: { default: "Start typing..." },
|
|
24806
24830
|
disabled: { type: Boolean, default: false },
|
|
24807
24831
|
readonly: { type: Boolean, default: false },
|
|
24832
|
+
required: { type: Boolean },
|
|
24833
|
+
fullWidth: { type: Boolean },
|
|
24808
24834
|
inputId: {},
|
|
24809
|
-
error: { type: Boolean, default: false },
|
|
24810
|
-
|
|
24811
|
-
maxHeight: { default: "400px" }
|
|
24835
|
+
error: { type: [Boolean, String, Error], default: false },
|
|
24836
|
+
size: {}
|
|
24812
24837
|
},
|
|
24813
24838
|
emits: ["update:modelValue", "blur", "focus"],
|
|
24814
24839
|
setup(__props, { emit: __emit }) {
|
|
24815
24840
|
useCssVars((_ctx) => ({
|
|
24816
|
-
"
|
|
24817
|
-
"
|
|
24841
|
+
"653355e8": _ctx.minHeight,
|
|
24842
|
+
"c14982c4": _ctx.maxHeight
|
|
24818
24843
|
}));
|
|
24819
24844
|
const props = __props;
|
|
24820
24845
|
const emit = __emit;
|
|
@@ -25040,7 +25065,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
25040
25065
|
spacing: "28px",
|
|
25041
25066
|
margin: "4px"
|
|
25042
25067
|
}),
|
|
25043
|
-
createElementVNode("div", _hoisted_5$
|
|
25068
|
+
createElementVNode("div", _hoisted_5$s, [
|
|
25044
25069
|
createVNode(StrandsUiButton, {
|
|
25045
25070
|
color: unref(editor)?.isActive("bulletList") ? "primary" : "secondary",
|
|
25046
25071
|
size: "sm",
|
|
@@ -25159,7 +25184,7 @@ const _sfc_main$J = /* @__PURE__ */ defineComponent({
|
|
|
25159
25184
|
};
|
|
25160
25185
|
}
|
|
25161
25186
|
});
|
|
25162
|
-
const UiInputRichText = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-
|
|
25187
|
+
const UiInputRichText = /* @__PURE__ */ _export_sfc(_sfc_main$J, [["__scopeId", "data-v-18a35d5d"]]);
|
|
25163
25188
|
const _hoisted_1$F = { class: "pincode-inputs" };
|
|
25164
25189
|
const _hoisted_2$A = {
|
|
25165
25190
|
key: 0,
|
|
@@ -25170,22 +25195,27 @@ const _hoisted_4$w = {
|
|
|
25170
25195
|
key: 1,
|
|
25171
25196
|
class: "pincode-divider"
|
|
25172
25197
|
};
|
|
25173
|
-
const _hoisted_5$
|
|
25198
|
+
const _hoisted_5$r = {
|
|
25174
25199
|
key: 1,
|
|
25175
25200
|
class: "pincode-icon pincode-icon-trailing"
|
|
25176
25201
|
};
|
|
25177
25202
|
const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
25178
25203
|
__name: "UiInput.Pincode",
|
|
25179
25204
|
props: {
|
|
25180
|
-
modelValue: {},
|
|
25181
25205
|
maxLength: { default: 6 },
|
|
25182
25206
|
variant: { default: "numeric" },
|
|
25183
25207
|
divider: {},
|
|
25208
|
+
label: {},
|
|
25209
|
+
helpText: {},
|
|
25210
|
+
modelValue: {},
|
|
25211
|
+
placeholder: {},
|
|
25184
25212
|
disabled: { type: Boolean },
|
|
25185
25213
|
readonly: { type: Boolean },
|
|
25186
|
-
|
|
25187
|
-
|
|
25188
|
-
inputId: {}
|
|
25214
|
+
required: { type: Boolean },
|
|
25215
|
+
fullWidth: { type: Boolean },
|
|
25216
|
+
inputId: {},
|
|
25217
|
+
error: { type: [Boolean, String, Error] },
|
|
25218
|
+
size: { default: "md" }
|
|
25189
25219
|
},
|
|
25190
25220
|
emits: ["update:modelValue", "blur", "focus", "complete"],
|
|
25191
25221
|
setup(__props, { emit: __emit }) {
|
|
@@ -25385,7 +25415,7 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
25385
25415
|
}, dividerProps.value, { class: "pincode-custom-divider" }), null, 16)) : shouldShowDivider(index) ? (openBlock(), createElementBlock("span", _hoisted_4$w, toDisplayString(dividerCharacter.value), 1)) : createCommentVNode("", true)
|
|
25386
25416
|
], 64);
|
|
25387
25417
|
}), 128)),
|
|
25388
|
-
_ctx.$slots["trailing-icon"] ? (openBlock(), createElementBlock("div", _hoisted_5$
|
|
25418
|
+
_ctx.$slots["trailing-icon"] ? (openBlock(), createElementBlock("div", _hoisted_5$r, [
|
|
25389
25419
|
renderSlot(_ctx.$slots, "trailing-icon", {}, void 0, true)
|
|
25390
25420
|
])) : createCommentVNode("", true)
|
|
25391
25421
|
])
|
|
@@ -25393,18 +25423,17 @@ const _sfc_main$I = /* @__PURE__ */ defineComponent({
|
|
|
25393
25423
|
};
|
|
25394
25424
|
}
|
|
25395
25425
|
});
|
|
25396
|
-
const UiInputPincode = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-
|
|
25397
|
-
const _hoisted_1$E =
|
|
25398
|
-
const _hoisted_2$z =
|
|
25399
|
-
const _hoisted_3$w = {
|
|
25426
|
+
const UiInputPincode = /* @__PURE__ */ _export_sfc(_sfc_main$I, [["__scopeId", "data-v-481de9a3"]]);
|
|
25427
|
+
const _hoisted_1$E = ["for"];
|
|
25428
|
+
const _hoisted_2$z = {
|
|
25400
25429
|
key: 0,
|
|
25401
25430
|
class: "input-required"
|
|
25402
25431
|
};
|
|
25403
|
-
const
|
|
25432
|
+
const _hoisted_3$w = {
|
|
25404
25433
|
key: 10,
|
|
25405
25434
|
class: "input-error-text"
|
|
25406
25435
|
};
|
|
25407
|
-
const
|
|
25436
|
+
const _hoisted_4$v = {
|
|
25408
25437
|
key: 11,
|
|
25409
25438
|
class: "input-help-text"
|
|
25410
25439
|
};
|
|
@@ -25412,16 +25441,19 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
25412
25441
|
__name: "UiInput",
|
|
25413
25442
|
props: {
|
|
25414
25443
|
type: {},
|
|
25415
|
-
modelValue: {},
|
|
25416
|
-
placeholder: {},
|
|
25417
|
-
disabled: { type: Boolean },
|
|
25418
|
-
readonly: { type: Boolean },
|
|
25419
|
-
required: { type: Boolean },
|
|
25420
25444
|
min: {},
|
|
25421
25445
|
max: {},
|
|
25422
25446
|
step: {},
|
|
25423
25447
|
autocomplete: {},
|
|
25424
25448
|
spellcheck: { type: Boolean },
|
|
25449
|
+
label: {},
|
|
25450
|
+
helpText: {},
|
|
25451
|
+
modelValue: {},
|
|
25452
|
+
placeholder: {},
|
|
25453
|
+
disabled: { type: Boolean },
|
|
25454
|
+
readonly: { type: Boolean },
|
|
25455
|
+
required: { type: Boolean },
|
|
25456
|
+
fullWidth: { type: Boolean },
|
|
25425
25457
|
inputId: {},
|
|
25426
25458
|
error: { type: [Boolean, String, Error] },
|
|
25427
25459
|
size: {},
|
|
@@ -25447,9 +25479,7 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
25447
25479
|
maxHeight: {},
|
|
25448
25480
|
maxLength: {},
|
|
25449
25481
|
variant: {},
|
|
25450
|
-
divider: {}
|
|
25451
|
-
label: {},
|
|
25452
|
-
helpText: {}
|
|
25482
|
+
divider: {}
|
|
25453
25483
|
},
|
|
25454
25484
|
emits: ["update:modelValue", "blur", "focus", "keydown", "file-error", "complete"],
|
|
25455
25485
|
setup(__props, { emit: __emit }) {
|
|
@@ -25480,19 +25510,24 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
25480
25510
|
emit("complete", value);
|
|
25481
25511
|
};
|
|
25482
25512
|
return (_ctx, _cache) => {
|
|
25483
|
-
return openBlock(), createElementBlock("div",
|
|
25513
|
+
return openBlock(), createElementBlock("div", {
|
|
25514
|
+
class: normalizeClass(["input-container", {
|
|
25515
|
+
"input-container--full-width": props.fullWidth,
|
|
25516
|
+
[`input-container--${props.size || "md"}`]: true
|
|
25517
|
+
}])
|
|
25518
|
+
}, [
|
|
25484
25519
|
props.label ? (openBlock(), createElementBlock("label", {
|
|
25485
25520
|
key: 0,
|
|
25486
25521
|
for: inputId.value,
|
|
25487
25522
|
class: "input-label"
|
|
25488
25523
|
}, [
|
|
25489
25524
|
createTextVNode(toDisplayString(props.label) + " ", 1),
|
|
25490
|
-
props.required ? (openBlock(), createElementBlock("span",
|
|
25491
|
-
], 8,
|
|
25525
|
+
props.required ? (openBlock(), createElementBlock("span", _hoisted_2$z, "*")) : createCommentVNode("", true)
|
|
25526
|
+
], 8, _hoisted_1$E)) : createCommentVNode("", true),
|
|
25492
25527
|
isTextInput.value ? (openBlock(), createBlock(UiInputText, {
|
|
25493
25528
|
key: 1,
|
|
25494
25529
|
"model-value": _ctx.modelValue,
|
|
25495
|
-
type: _ctx.type
|
|
25530
|
+
type: _ctx.type,
|
|
25496
25531
|
placeholder: _ctx.placeholder,
|
|
25497
25532
|
disabled: _ctx.disabled,
|
|
25498
25533
|
readonly: _ctx.readonly,
|
|
@@ -25711,12 +25746,12 @@ const _sfc_main$H = /* @__PURE__ */ defineComponent({
|
|
|
25711
25746
|
key: "1"
|
|
25712
25747
|
} : void 0
|
|
25713
25748
|
]), 1032, ["model-value", "max-length", "variant", "divider", "disabled", "readonly", "input-id", "error", "size"])) : createCommentVNode("", true),
|
|
25714
|
-
props.error && props.error !== true ? (openBlock(), createElementBlock("p",
|
|
25715
|
-
]);
|
|
25749
|
+
props.error && props.error !== true ? (openBlock(), createElementBlock("p", _hoisted_3$w, toDisplayString(typeof props.error === "string" ? props.error : props.error?.message || String(props.error)), 1)) : props.helpText ? (openBlock(), createElementBlock("p", _hoisted_4$v, toDisplayString(props.helpText), 1)) : createCommentVNode("", true)
|
|
25750
|
+
], 2);
|
|
25716
25751
|
};
|
|
25717
25752
|
}
|
|
25718
25753
|
});
|
|
25719
|
-
const StrandsUiInput = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-
|
|
25754
|
+
const StrandsUiInput = /* @__PURE__ */ _export_sfc(_sfc_main$H, [["__scopeId", "data-v-7c0f388a"]]);
|
|
25720
25755
|
const _hoisted_1$D = ["disabled", "aria-disabled"];
|
|
25721
25756
|
const _hoisted_2$y = ["href", "target", "rel", "aria-disabled"];
|
|
25722
25757
|
const _sfc_main$G = /* @__PURE__ */ defineComponent({
|
|
@@ -27428,7 +27463,7 @@ const _sfc_main$C = /* @__PURE__ */ defineComponent({
|
|
|
27428
27463
|
};
|
|
27429
27464
|
}
|
|
27430
27465
|
});
|
|
27431
|
-
const UiModal = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-
|
|
27466
|
+
const UiModal = /* @__PURE__ */ _export_sfc(_sfc_main$C, [["__scopeId", "data-v-680be964"]]);
|
|
27432
27467
|
const tailwindColors = {
|
|
27433
27468
|
"#000000": {
|
|
27434
27469
|
label: "Black"
|
|
@@ -30684,11 +30719,27 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
30684
30719
|
stickyColumns: { default: () => [] }
|
|
30685
30720
|
},
|
|
30686
30721
|
emits: ["rowClick", "rowSelect", "sort", "columnReorder", "cellUpdate"],
|
|
30687
|
-
setup(__props, { emit: __emit }) {
|
|
30722
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
30688
30723
|
const props = __props;
|
|
30689
30724
|
const emit = __emit;
|
|
30690
30725
|
const slots = useSlots();
|
|
30691
30726
|
const tableRef = ref(null);
|
|
30727
|
+
const internalData = ref([...props.data]);
|
|
30728
|
+
const internalColumns = ref([...props.columns]);
|
|
30729
|
+
watch(() => props.data, (newData) => {
|
|
30730
|
+
internalData.value = [...newData];
|
|
30731
|
+
}, { deep: true });
|
|
30732
|
+
watch(() => props.columns, (newColumns) => {
|
|
30733
|
+
internalColumns.value = [...newColumns];
|
|
30734
|
+
}, { deep: true });
|
|
30735
|
+
const restoreData = () => {
|
|
30736
|
+
internalData.value = [...props.data];
|
|
30737
|
+
modifiedCells.value.clear();
|
|
30738
|
+
cellValues.value.clear();
|
|
30739
|
+
};
|
|
30740
|
+
const restoreColumns = () => {
|
|
30741
|
+
internalColumns.value = [...props.columns];
|
|
30742
|
+
};
|
|
30692
30743
|
const sortKey = ref("");
|
|
30693
30744
|
const sortOrder = ref("asc");
|
|
30694
30745
|
const filters = ref({});
|
|
@@ -30696,6 +30747,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
30696
30747
|
const groupBy = ref("");
|
|
30697
30748
|
const expandedRows = ref(/* @__PURE__ */ new Set());
|
|
30698
30749
|
const selectedRows = ref(/* @__PURE__ */ new Set());
|
|
30750
|
+
const modifiedCells = ref(/* @__PURE__ */ new Set());
|
|
30751
|
+
const cellValues = ref(/* @__PURE__ */ new Map());
|
|
30699
30752
|
const draggedColumnIndex = ref(null);
|
|
30700
30753
|
const dragOverColumnIndex = ref(null);
|
|
30701
30754
|
const isDragging = ref(false);
|
|
@@ -30745,12 +30798,12 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
30745
30798
|
};
|
|
30746
30799
|
};
|
|
30747
30800
|
const processedRows = computed(() => {
|
|
30748
|
-
let rows = [...
|
|
30801
|
+
let rows = [...internalData.value];
|
|
30749
30802
|
if (props.filterable && Object.keys(filters.value).length > 0) {
|
|
30750
30803
|
rows = rows.filter((row) => {
|
|
30751
30804
|
return Object.entries(filters.value).every(([key, filterValue]) => {
|
|
30752
30805
|
if (!filterValue || filterValue === "") return true;
|
|
30753
|
-
const column =
|
|
30806
|
+
const column = internalColumns.value.find((col) => col.key === key);
|
|
30754
30807
|
const cellValue = getCellValue(row, key, column);
|
|
30755
30808
|
const cellStr = String(cellValue || "").toLowerCase();
|
|
30756
30809
|
if (Array.isArray(filterValue)) {
|
|
@@ -30760,8 +30813,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
30760
30813
|
});
|
|
30761
30814
|
});
|
|
30762
30815
|
}
|
|
30763
|
-
if (sortKey.value && (props.sortable ||
|
|
30764
|
-
const sortColumn =
|
|
30816
|
+
if (sortKey.value && (props.sortable || internalColumns.value.find((col) => col.key === sortKey.value)?.sortable)) {
|
|
30817
|
+
const sortColumn = internalColumns.value.find((col) => col.key === sortKey.value);
|
|
30765
30818
|
rows.sort((a, b) => {
|
|
30766
30819
|
const aVal = getCellValue(a, sortKey.value, sortColumn);
|
|
30767
30820
|
const bVal = getCellValue(b, sortKey.value, sortColumn);
|
|
@@ -30825,13 +30878,18 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
30825
30878
|
return column.key === "actions" && hasSlot;
|
|
30826
30879
|
};
|
|
30827
30880
|
const getFilterOptions = (column) => {
|
|
30828
|
-
if (column.filterOptions)
|
|
30881
|
+
if (column.filterOptions) {
|
|
30882
|
+
if (Array.isArray(column.filterOptions) && column.filterOptions.length > 0 && typeof column.filterOptions[0] === "object" && column.filterOptions[0] !== null && "label" in column.filterOptions[0]) {
|
|
30883
|
+
return column.filterOptions;
|
|
30884
|
+
}
|
|
30885
|
+
return column.filterOptions.map((value) => ({ label: String(value), value: String(value) }));
|
|
30886
|
+
}
|
|
30829
30887
|
const uniqueValues = /* @__PURE__ */ new Set();
|
|
30830
|
-
|
|
30888
|
+
internalData.value.forEach((row) => {
|
|
30831
30889
|
const value = getCellValue(row, column.key, column);
|
|
30832
30890
|
if (value != null) uniqueValues.add(String(value));
|
|
30833
30891
|
});
|
|
30834
|
-
return Array.from(uniqueValues).sort();
|
|
30892
|
+
return Array.from(uniqueValues).sort().map((value) => ({ label: value, value }));
|
|
30835
30893
|
};
|
|
30836
30894
|
const toggleFilter = (columnKey) => {
|
|
30837
30895
|
showFilters.value[columnKey] = !showFilters.value[columnKey];
|
|
@@ -30859,7 +30917,26 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
30859
30917
|
emit("rowClick", row, index);
|
|
30860
30918
|
};
|
|
30861
30919
|
const handleCellUpdate = (row, columnKey, newValue, rowIndex) => {
|
|
30862
|
-
|
|
30920
|
+
const actualIndex = internalData.value.findIndex((r) => r === row);
|
|
30921
|
+
if (actualIndex === -1) return;
|
|
30922
|
+
const cellKey = `${actualIndex}-${columnKey}`;
|
|
30923
|
+
if (!cellValues.value.has(cellKey)) {
|
|
30924
|
+
const originalValue2 = getCellValue(row, columnKey);
|
|
30925
|
+
cellValues.value.set(cellKey, originalValue2);
|
|
30926
|
+
}
|
|
30927
|
+
const keys2 = columnKey.split(".");
|
|
30928
|
+
let target = internalData.value[actualIndex];
|
|
30929
|
+
for (let i = 0; i < keys2.length - 1; i++) {
|
|
30930
|
+
target = target[keys2[i]];
|
|
30931
|
+
}
|
|
30932
|
+
target[keys2[keys2.length - 1]] = newValue;
|
|
30933
|
+
const originalValue = cellValues.value.get(cellKey);
|
|
30934
|
+
if (newValue !== originalValue) {
|
|
30935
|
+
modifiedCells.value.add(cellKey);
|
|
30936
|
+
} else {
|
|
30937
|
+
modifiedCells.value.delete(cellKey);
|
|
30938
|
+
}
|
|
30939
|
+
emit("cellUpdate", row, columnKey, newValue, actualIndex);
|
|
30863
30940
|
};
|
|
30864
30941
|
const handleDragStart = (event, columnIndex) => {
|
|
30865
30942
|
if (!props.reorderable) return;
|
|
@@ -30904,9 +30981,10 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
30904
30981
|
if (!props.reorderable || draggedColumnIndex.value === null) return;
|
|
30905
30982
|
const fromIndex = draggedColumnIndex.value;
|
|
30906
30983
|
if (fromIndex !== targetIndex) {
|
|
30907
|
-
const newColumns = [...
|
|
30984
|
+
const newColumns = [...internalColumns.value];
|
|
30908
30985
|
const draggedColumn = newColumns.splice(fromIndex, 1)[0];
|
|
30909
30986
|
newColumns.splice(targetIndex, 0, draggedColumn);
|
|
30987
|
+
internalColumns.value = newColumns;
|
|
30910
30988
|
emit("columnReorder", fromIndex, targetIndex, newColumns);
|
|
30911
30989
|
}
|
|
30912
30990
|
cleanupDragState();
|
|
@@ -30923,6 +31001,14 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
30923
31001
|
dragStartX.value = 0;
|
|
30924
31002
|
currentDragX.value = 0;
|
|
30925
31003
|
};
|
|
31004
|
+
__expose({
|
|
31005
|
+
internalData,
|
|
31006
|
+
internalColumns,
|
|
31007
|
+
restoreData,
|
|
31008
|
+
restoreColumns,
|
|
31009
|
+
modifiedCells,
|
|
31010
|
+
cellValues
|
|
31011
|
+
});
|
|
30926
31012
|
const getGroupIndex = (rowIndex) => {
|
|
30927
31013
|
let groupCount = 0;
|
|
30928
31014
|
for (let i = 0; i <= rowIndex; i++) {
|
|
@@ -30949,8 +31035,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
30949
31035
|
]),
|
|
30950
31036
|
style: normalizeStyle(tableStyle.value)
|
|
30951
31037
|
}, [
|
|
30952
|
-
|
|
30953
|
-
(openBlock(true), createElementBlock(Fragment$1, null, renderList(
|
|
31038
|
+
internalColumns.value.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_2$r, [
|
|
31039
|
+
(openBlock(true), createElementBlock(Fragment$1, null, renderList(internalColumns.value, (column, index) => {
|
|
30954
31040
|
return openBlock(), createElementBlock("div", {
|
|
30955
31041
|
key: `header-${index}`,
|
|
30956
31042
|
class: normalizeClass([
|
|
@@ -31025,7 +31111,6 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
31025
31111
|
type: column.filterType,
|
|
31026
31112
|
options: column.filterType === "select" ? getFilterOptions(column) : void 0,
|
|
31027
31113
|
placeholder: `Filter ${column.label}...`,
|
|
31028
|
-
class: "ui-table-filter-field",
|
|
31029
31114
|
onClick: _cache[0] || (_cache[0] = withModifiers(() => {
|
|
31030
31115
|
}, ["stop"]))
|
|
31031
31116
|
}, null, 8, ["modelValue", "onUpdate:modelValue", "type", "options", "placeholder"])
|
|
@@ -31059,7 +31144,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
31059
31144
|
]),
|
|
31060
31145
|
onClick: ($event) => handleRowClick(row, rowIndex)
|
|
31061
31146
|
}, [
|
|
31062
|
-
(openBlock(true), createElementBlock(Fragment$1, null, renderList(
|
|
31147
|
+
(openBlock(true), createElementBlock(Fragment$1, null, renderList(internalColumns.value, (column, colIndex) => {
|
|
31063
31148
|
return openBlock(), createElementBlock("div", {
|
|
31064
31149
|
key: `cell-${rowIndex}-${colIndex}`,
|
|
31065
31150
|
class: normalizeClass([
|
|
@@ -31067,6 +31152,8 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
31067
31152
|
"ui-table-body-cell",
|
|
31068
31153
|
{
|
|
31069
31154
|
[`ui-table-cell--align-${column.align || "left"}`]: column.align,
|
|
31155
|
+
"ui-table-cell--editable": column.editable,
|
|
31156
|
+
"ui-table-cell--modified": modifiedCells.value.has(`${internalData.value.findIndex((r) => r === row)}-${column.key}`),
|
|
31070
31157
|
"ui-table-cell--sticky": column.sticky || stickyColumns.value.includes(column.key) || isActionsColumn(column),
|
|
31071
31158
|
"ui-table-cell--actions": isActionsColumn(column),
|
|
31072
31159
|
"ui-table-cell--dragging": draggedColumnIndex.value === colIndex,
|
|
@@ -31094,11 +31181,40 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
31094
31181
|
key: 0,
|
|
31095
31182
|
modelValue: getCellValue(row, column.key, column),
|
|
31096
31183
|
type: column.filterType || "text",
|
|
31097
|
-
|
|
31184
|
+
size: "sm",
|
|
31185
|
+
options: column.filterType === "select" ? getFilterOptions(column) : void 0,
|
|
31186
|
+
"full-width": "",
|
|
31187
|
+
"onUpdate:modelValue": (newValue) => handleCellUpdate(row, column.key, newValue),
|
|
31098
31188
|
onClick: _cache[3] || (_cache[3] = withModifiers(() => {
|
|
31099
31189
|
}, ["stop"])),
|
|
31100
|
-
|
|
31101
|
-
|
|
31190
|
+
onMousedown: _cache[4] || (_cache[4] = withModifiers(() => {
|
|
31191
|
+
}, ["stop"]))
|
|
31192
|
+
}, createSlots({ _: 2 }, [
|
|
31193
|
+
_ctx.$slots["input-leading-icon"] ? {
|
|
31194
|
+
name: "leading-icon",
|
|
31195
|
+
fn: withCtx(() => [
|
|
31196
|
+
renderSlot(_ctx.$slots, "input-leading-icon", {
|
|
31197
|
+
row,
|
|
31198
|
+
column,
|
|
31199
|
+
rowIndex,
|
|
31200
|
+
colIndex
|
|
31201
|
+
}, void 0, true)
|
|
31202
|
+
]),
|
|
31203
|
+
key: "0"
|
|
31204
|
+
} : void 0,
|
|
31205
|
+
_ctx.$slots["input-trailing-icon"] ? {
|
|
31206
|
+
name: "trailing-icon",
|
|
31207
|
+
fn: withCtx(() => [
|
|
31208
|
+
renderSlot(_ctx.$slots, "input-trailing-icon", {
|
|
31209
|
+
row,
|
|
31210
|
+
column,
|
|
31211
|
+
rowIndex,
|
|
31212
|
+
colIndex
|
|
31213
|
+
}, void 0, true)
|
|
31214
|
+
]),
|
|
31215
|
+
key: "1"
|
|
31216
|
+
} : void 0
|
|
31217
|
+
]), 1032, ["modelValue", "type", "options", "onUpdate:modelValue"])) : (openBlock(), createElementBlock("span", _hoisted_18$b, toDisplayString(getCellValue(row, column.key, column)), 1))
|
|
31102
31218
|
], true)
|
|
31103
31219
|
], 14, _hoisted_17$c);
|
|
31104
31220
|
}), 128))
|
|
@@ -31123,14 +31239,14 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
31123
31239
|
}), 128)),
|
|
31124
31240
|
processedRows.value.length === 0 ? (openBlock(), createElementBlock("div", _hoisted_21$8, [
|
|
31125
31241
|
renderSlot(_ctx.$slots, "empty", {}, () => [
|
|
31126
|
-
_cache[
|
|
31242
|
+
_cache[5] || (_cache[5] = createElementVNode("div", { class: "ui-table-empty-content" }, [
|
|
31127
31243
|
createElementVNode("span", null, "No data available")
|
|
31128
31244
|
], -1))
|
|
31129
31245
|
], true)
|
|
31130
31246
|
])) : createCommentVNode("", true)
|
|
31131
31247
|
]),
|
|
31132
31248
|
hasFooterSlots.value ? (openBlock(), createElementBlock("div", _hoisted_22$6, [
|
|
31133
|
-
(openBlock(true), createElementBlock(Fragment$1, null, renderList(
|
|
31249
|
+
(openBlock(true), createElementBlock(Fragment$1, null, renderList(internalColumns.value, (column, index) => {
|
|
31134
31250
|
return openBlock(), createElementBlock("div", {
|
|
31135
31251
|
key: `footer-${index}`,
|
|
31136
31252
|
class: normalizeClass([
|
|
@@ -31156,7 +31272,7 @@ const _sfc_main$x = /* @__PURE__ */ defineComponent({
|
|
|
31156
31272
|
};
|
|
31157
31273
|
}
|
|
31158
31274
|
});
|
|
31159
|
-
const UiTable = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-
|
|
31275
|
+
const UiTable = /* @__PURE__ */ _export_sfc(_sfc_main$x, [["__scopeId", "data-v-f4818507"]]);
|
|
31160
31276
|
const _hoisted_1$u = { class: "ui-hero-content" };
|
|
31161
31277
|
const _hoisted_2$q = {
|
|
31162
31278
|
key: 0,
|