@appquality/unguess-design-system 4.0.39 β 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 +26 -0
- package/build/index.d.ts +3 -1
- package/build/index.js +53 -47
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,29 @@
|
|
|
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
|
+
|
|
15
|
+
# v4.0.40 (Tue Jun 17 2025)
|
|
16
|
+
|
|
17
|
+
#### π Bug Fix
|
|
18
|
+
|
|
19
|
+
- feat: Add listboxAppendToNode prop to MultiSelect for enhanced flexib⦠[#527](https://github.com/AppQuality/unguess-design-system/pull/527) ([@d-beezee](https://github.com/d-beezee))
|
|
20
|
+
|
|
21
|
+
#### Authors: 1
|
|
22
|
+
|
|
23
|
+
- [@d-beezee](https://github.com/d-beezee)
|
|
24
|
+
|
|
25
|
+
---
|
|
26
|
+
|
|
1
27
|
# v4.0.39 (Wed May 21 2025)
|
|
2
28
|
|
|
3
29
|
#### π Bug Fix
|
package/build/index.d.ts
CHANGED
|
@@ -5419,11 +5419,12 @@ 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, }: 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;
|
|
5426
5426
|
options: Item_2[];
|
|
5427
|
+
listboxAppendToNode?: Element | DocumentFragment;
|
|
5427
5428
|
selectedItems?: Item_2[];
|
|
5428
5429
|
onChange?: (selectedItems: Item_2[], newItem?: string) => Promise<void>;
|
|
5429
5430
|
creatable?: boolean;
|
|
@@ -5436,6 +5437,7 @@ declare type MultiSelectProps = {
|
|
|
5436
5437
|
addNew?: (value: string) => string;
|
|
5437
5438
|
showMore?: (value: number) => string;
|
|
5438
5439
|
};
|
|
5440
|
+
disabled?: boolean;
|
|
5439
5441
|
};
|
|
5440
5442
|
|
|
5441
5443
|
/**
|
package/build/index.js
CHANGED
|
@@ -76351,74 +76351,80 @@ const ntt = (e) => /* @__PURE__ */ W.createElement("svg", { width: 16, height: 1
|
|
|
76351
76351
|
i18n: r,
|
|
76352
76352
|
maxItems: i,
|
|
76353
76353
|
size: o,
|
|
76354
|
-
menuHeight: a
|
|
76354
|
+
menuHeight: a,
|
|
76355
|
+
listboxAppendToNode: s,
|
|
76356
|
+
disabled: l
|
|
76355
76357
|
}) => {
|
|
76356
|
-
const [
|
|
76358
|
+
const [d, h] = Ue(""), [m, y] = Ue(e);
|
|
76357
76359
|
return Ye(() => {
|
|
76358
|
-
const
|
|
76359
|
-
(
|
|
76360
|
+
const w = e.filter(
|
|
76361
|
+
(C) => C.label.trim().toLowerCase().indexOf(d.trim().toLowerCase()) !== -1
|
|
76360
76362
|
);
|
|
76361
|
-
|
|
76362
|
-
}, [
|
|
76363
|
+
y(w);
|
|
76364
|
+
}, [d, e]), /* @__PURE__ */ M.jsxs(ef, { children: [
|
|
76363
76365
|
/* @__PURE__ */ M.jsx(Wp, { hidden: !0, children: (r == null ? void 0 : r.label) ?? "Multiselect" }),
|
|
76364
76366
|
/* @__PURE__ */ M.jsxs(
|
|
76365
76367
|
ps,
|
|
76366
76368
|
{
|
|
76367
|
-
|
|
76368
|
-
|
|
76369
|
+
isDisabled: l,
|
|
76370
|
+
renderValue: ({ selection: w }) => {
|
|
76371
|
+
if (!w || Array.isArray(w) && w.length === 0)
|
|
76369
76372
|
return /* @__PURE__ */ M.jsx("div", { style: { color: Ie.palette.grey[400] }, children: (r == null ? void 0 : r.placeholder) ?? "Select items..." });
|
|
76370
76373
|
},
|
|
76371
|
-
renderExpandTags: r != null && r.showMore ? (
|
|
76374
|
+
renderExpandTags: r != null && r.showMore ? (w) => r.showMore ? r.showMore(w) : "" : void 0,
|
|
76375
|
+
listboxAppendToNode: s,
|
|
76372
76376
|
maxHeight: "auto",
|
|
76373
76377
|
isCompact: o !== "medium",
|
|
76374
76378
|
isMultiselectable: !0,
|
|
76375
76379
|
maxTags: i,
|
|
76376
|
-
inputValue:
|
|
76377
|
-
selectionValue: e.filter((
|
|
76380
|
+
inputValue: d,
|
|
76381
|
+
selectionValue: e.filter((w) => w.selected).map((w) => w.id.toString()),
|
|
76378
76382
|
listboxMaxHeight: a ?? "200px",
|
|
76379
76383
|
isAutocomplete: !0,
|
|
76380
|
-
onChange: ({ type:
|
|
76381
|
-
var
|
|
76382
|
-
if (
|
|
76383
|
-
|
|
76384
|
-
|
|
76385
|
-
|
|
76386
|
-
|
|
76387
|
-
|
|
76388
|
-
const
|
|
76389
|
-
|
|
76390
|
-
|
|
76391
|
-
|
|
76392
|
-
|
|
76393
|
-
|
|
76394
|
-
|
|
76395
|
-
|
|
76396
|
-
|
|
76397
|
-
|
|
76398
|
-
|
|
76399
|
-
|
|
76400
|
-
|
|
76401
|
-
|
|
76402
|
-
|
|
76403
|
-
|
|
76404
|
-
|
|
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
|
+
}
|
|
76405
76411
|
}
|
|
76406
76412
|
},
|
|
76407
76413
|
children: [
|
|
76408
|
-
e.map((
|
|
76414
|
+
e.map((w) => /* @__PURE__ */ M.jsx(
|
|
76409
76415
|
ho,
|
|
76410
76416
|
{
|
|
76411
|
-
isHidden: !
|
|
76412
|
-
value:
|
|
76413
|
-
label:
|
|
76414
|
-
isSelected:
|
|
76417
|
+
isHidden: !m.some((C) => C.id === w.id),
|
|
76418
|
+
value: w.id.toString(),
|
|
76419
|
+
label: w.label,
|
|
76420
|
+
isSelected: w.selected,
|
|
76415
76421
|
tagProps: {
|
|
76416
76422
|
isPill: !0
|
|
76417
76423
|
}
|
|
76418
76424
|
},
|
|
76419
|
-
|
|
76425
|
+
w.id
|
|
76420
76426
|
)),
|
|
76421
|
-
|
|
76427
|
+
m.length === 0 && !n && /* @__PURE__ */ M.jsx(
|
|
76422
76428
|
ho,
|
|
76423
76429
|
{
|
|
76424
76430
|
isDisabled: !0,
|
|
@@ -76426,17 +76432,17 @@ const ntt = (e) => /* @__PURE__ */ W.createElement("svg", { width: 16, height: 1
|
|
|
76426
76432
|
label: (r == null ? void 0 : r.noMatches) ?? "No matches found"
|
|
76427
76433
|
}
|
|
76428
76434
|
),
|
|
76429
|
-
n &&
|
|
76430
|
-
(
|
|
76435
|
+
n && d.length > 0 && !m.find(
|
|
76436
|
+
(w) => w.label.toLowerCase() === d.toLowerCase()
|
|
76431
76437
|
) ? /* @__PURE__ */ M.jsxs(M.Fragment, { children: [
|
|
76432
76438
|
/* @__PURE__ */ M.jsx(Oc, {}),
|
|
76433
76439
|
/* @__PURE__ */ M.jsx(
|
|
76434
76440
|
ho,
|
|
76435
76441
|
{
|
|
76436
76442
|
tagProps: { isPill: !0 },
|
|
76437
|
-
value:
|
|
76443
|
+
value: d,
|
|
76438
76444
|
icon: /* @__PURE__ */ M.jsx(ntt, {}),
|
|
76439
|
-
label: r != null && r.addNew ? r.addNew(
|
|
76445
|
+
label: r != null && r.addNew ? r.addNew(d) : `Want to add "${d}"?`
|
|
76440
76446
|
}
|
|
76441
76447
|
)
|
|
76442
76448
|
] }) : null
|