@appquality/unguess-design-system 4.0.40 → 4.0.41
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/CHANGELOG.md +14 -0
- package/build/index.d.ts +2 -1
- package/build/index.js +51 -47
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# v4.0.41 (Thu Jun 19 2025)
|
|
2
|
+
|
|
3
|
+
#### 🐛 Bug Fix
|
|
4
|
+
|
|
5
|
+
- Add disabled to multiselect [#530](https://github.com/AppQuality/unguess-design-system/pull/530) ([@sinatragianpaolo](https://github.com/sinatragianpaolo) [@d-beezee](https://github.com/d-beezee))
|
|
6
|
+
- feat: Implement disabled state for MultiSelect component to prevent interactions [#529](https://github.com/AppQuality/unguess-design-system/pull/529) ([@sinatragianpaolo](https://github.com/sinatragianpaolo))
|
|
7
|
+
|
|
8
|
+
#### Authors: 2
|
|
9
|
+
|
|
10
|
+
- [@d-beezee](https://github.com/d-beezee)
|
|
11
|
+
- Gianpaolo Sinatra ([@sinatragianpaolo](https://github.com/sinatragianpaolo))
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
1
15
|
# v4.0.40 (Tue Jun 17 2025)
|
|
2
16
|
|
|
3
17
|
#### 🐛 Bug Fix
|
package/build/index.d.ts
CHANGED
|
@@ -5419,7 +5419,7 @@ export declare const ModalFullScreen: {
|
|
|
5419
5419
|
FooterItem: ForwardRefExoticComponent<HTMLAttributes<HTMLSpanElement> & RefAttributes<HTMLSpanElement>>;
|
|
5420
5420
|
};
|
|
5421
5421
|
|
|
5422
|
-
export declare const MultiSelect: ({ options, onChange, creatable, i18n, maxItems, size, menuHeight, listboxAppendToNode, }: MultiSelectProps) => JSX_2.Element;
|
|
5422
|
+
export declare const MultiSelect: ({ options, onChange, creatable, i18n, maxItems, size, menuHeight, listboxAppendToNode, disabled }: MultiSelectProps) => JSX_2.Element;
|
|
5423
5423
|
|
|
5424
5424
|
declare type MultiSelectProps = {
|
|
5425
5425
|
maxItems?: number;
|
|
@@ -5437,6 +5437,7 @@ declare type MultiSelectProps = {
|
|
|
5437
5437
|
addNew?: (value: string) => string;
|
|
5438
5438
|
showMore?: (value: number) => string;
|
|
5439
5439
|
};
|
|
5440
|
+
disabled?: boolean;
|
|
5440
5441
|
};
|
|
5441
5442
|
|
|
5442
5443
|
/**
|
package/build/index.js
CHANGED
|
@@ -76352,75 +76352,79 @@ const ntt = (e) => /* @__PURE__ */ W.createElement("svg", { width: 16, height: 1
|
|
|
76352
76352
|
maxItems: i,
|
|
76353
76353
|
size: o,
|
|
76354
76354
|
menuHeight: a,
|
|
76355
|
-
listboxAppendToNode: s
|
|
76355
|
+
listboxAppendToNode: s,
|
|
76356
|
+
disabled: l
|
|
76356
76357
|
}) => {
|
|
76357
|
-
const [
|
|
76358
|
+
const [d, h] = Ue(""), [m, y] = Ue(e);
|
|
76358
76359
|
return Ye(() => {
|
|
76359
|
-
const
|
|
76360
|
-
(
|
|
76360
|
+
const w = e.filter(
|
|
76361
|
+
(C) => C.label.trim().toLowerCase().indexOf(d.trim().toLowerCase()) !== -1
|
|
76361
76362
|
);
|
|
76362
|
-
|
|
76363
|
-
}, [
|
|
76363
|
+
y(w);
|
|
76364
|
+
}, [d, e]), /* @__PURE__ */ M.jsxs(ef, { children: [
|
|
76364
76365
|
/* @__PURE__ */ M.jsx(Wp, { hidden: !0, children: (r == null ? void 0 : r.label) ?? "Multiselect" }),
|
|
76365
76366
|
/* @__PURE__ */ M.jsxs(
|
|
76366
76367
|
ps,
|
|
76367
76368
|
{
|
|
76368
|
-
|
|
76369
|
-
|
|
76369
|
+
isDisabled: l,
|
|
76370
|
+
renderValue: ({ selection: w }) => {
|
|
76371
|
+
if (!w || Array.isArray(w) && w.length === 0)
|
|
76370
76372
|
return /* @__PURE__ */ M.jsx("div", { style: { color: Ie.palette.grey[400] }, children: (r == null ? void 0 : r.placeholder) ?? "Select items..." });
|
|
76371
76373
|
},
|
|
76372
|
-
renderExpandTags: r != null && r.showMore ? (
|
|
76374
|
+
renderExpandTags: r != null && r.showMore ? (w) => r.showMore ? r.showMore(w) : "" : void 0,
|
|
76373
76375
|
listboxAppendToNode: s,
|
|
76374
76376
|
maxHeight: "auto",
|
|
76375
76377
|
isCompact: o !== "medium",
|
|
76376
76378
|
isMultiselectable: !0,
|
|
76377
76379
|
maxTags: i,
|
|
76378
|
-
inputValue:
|
|
76379
|
-
selectionValue: e.filter((
|
|
76380
|
+
inputValue: d,
|
|
76381
|
+
selectionValue: e.filter((w) => w.selected).map((w) => w.id.toString()),
|
|
76380
76382
|
listboxMaxHeight: a ?? "200px",
|
|
76381
76383
|
isAutocomplete: !0,
|
|
76382
|
-
onChange: ({ type:
|
|
76383
|
-
var
|
|
76384
|
-
if (
|
|
76385
|
-
|
|
76386
|
-
|
|
76387
|
-
|
|
76388
|
-
|
|
76389
|
-
|
|
76390
|
-
const
|
|
76391
|
-
|
|
76392
|
-
|
|
76393
|
-
|
|
76394
|
-
|
|
76395
|
-
|
|
76396
|
-
|
|
76397
|
-
|
|
76398
|
-
|
|
76399
|
-
|
|
76400
|
-
|
|
76401
|
-
|
|
76402
|
-
|
|
76403
|
-
|
|
76404
|
-
|
|
76405
|
-
|
|
76406
|
-
|
|
76384
|
+
onChange: ({ type: w, inputValue: C, selectionValue: E }) => {
|
|
76385
|
+
var I;
|
|
76386
|
+
if (!l) {
|
|
76387
|
+
if (w === "input:change") {
|
|
76388
|
+
h(C || "");
|
|
76389
|
+
return;
|
|
76390
|
+
}
|
|
76391
|
+
if (t && (w === "fn:setSelectionValue" || w === "option:click" || w === "input:keyDown:Enter") && Array.isArray(E)) {
|
|
76392
|
+
const L = E.map((_) => {
|
|
76393
|
+
const $ = e.find((F) => F.id === parseInt(_));
|
|
76394
|
+
return $ ? {
|
|
76395
|
+
...$,
|
|
76396
|
+
selected: !0
|
|
76397
|
+
} : {
|
|
76398
|
+
id: void 0,
|
|
76399
|
+
label: _,
|
|
76400
|
+
selected: !0
|
|
76401
|
+
};
|
|
76402
|
+
}), k = L.filter((_) => _.id), R = (I = L.find((_) => !_.id)) == null ? void 0 : I.label;
|
|
76403
|
+
t(
|
|
76404
|
+
e.map((_) => ({
|
|
76405
|
+
..._,
|
|
76406
|
+
selected: k.some(($) => $.id === _.id)
|
|
76407
|
+
})),
|
|
76408
|
+
R || void 0
|
|
76409
|
+
).then(() => h(""));
|
|
76410
|
+
}
|
|
76407
76411
|
}
|
|
76408
76412
|
},
|
|
76409
76413
|
children: [
|
|
76410
|
-
e.map((
|
|
76414
|
+
e.map((w) => /* @__PURE__ */ M.jsx(
|
|
76411
76415
|
ho,
|
|
76412
76416
|
{
|
|
76413
|
-
isHidden: !
|
|
76414
|
-
value:
|
|
76415
|
-
label:
|
|
76416
|
-
isSelected:
|
|
76417
|
+
isHidden: !m.some((C) => C.id === w.id),
|
|
76418
|
+
value: w.id.toString(),
|
|
76419
|
+
label: w.label,
|
|
76420
|
+
isSelected: w.selected,
|
|
76417
76421
|
tagProps: {
|
|
76418
76422
|
isPill: !0
|
|
76419
76423
|
}
|
|
76420
76424
|
},
|
|
76421
|
-
|
|
76425
|
+
w.id
|
|
76422
76426
|
)),
|
|
76423
|
-
|
|
76427
|
+
m.length === 0 && !n && /* @__PURE__ */ M.jsx(
|
|
76424
76428
|
ho,
|
|
76425
76429
|
{
|
|
76426
76430
|
isDisabled: !0,
|
|
@@ -76428,17 +76432,17 @@ const ntt = (e) => /* @__PURE__ */ W.createElement("svg", { width: 16, height: 1
|
|
|
76428
76432
|
label: (r == null ? void 0 : r.noMatches) ?? "No matches found"
|
|
76429
76433
|
}
|
|
76430
76434
|
),
|
|
76431
|
-
n &&
|
|
76432
|
-
(
|
|
76435
|
+
n && d.length > 0 && !m.find(
|
|
76436
|
+
(w) => w.label.toLowerCase() === d.toLowerCase()
|
|
76433
76437
|
) ? /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
|
|
76434
76438
|
/* @__PURE__ */ M.jsx(Oc, {}),
|
|
76435
76439
|
/* @__PURE__ */ M.jsx(
|
|
76436
76440
|
ho,
|
|
76437
76441
|
{
|
|
76438
76442
|
tagProps: { isPill: !0 },
|
|
76439
|
-
value:
|
|
76443
|
+
value: d,
|
|
76440
76444
|
icon: /* @__PURE__ */ M.jsx(ntt, {}),
|
|
76441
|
-
label: r != null && r.addNew ? r.addNew(
|
|
76445
|
+
label: r != null && r.addNew ? r.addNew(d) : `Want to add "${d}"?`
|
|
76442
76446
|
}
|
|
76443
76447
|
)
|
|
76444
76448
|
] }) : null
|