@payfit/unity-components 3.15.21 → 3.15.23
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/esm/core/components/select-list/SelectList.d.ts +5 -0
- package/dist/esm/core/components/select-list/SelectList.js +28 -28
- package/dist/esm/core/components/select-list/parts/SelectListSearchInput.d.ts +4 -1
- package/dist/esm/core/components/select-list/parts/SelectListSearchInput.js +2 -1
- package/package.json +8 -7
|
@@ -27,6 +27,11 @@ export interface SelectListProps<TType extends object = object> extends Omit<Ari
|
|
|
27
27
|
* @default undefined - Auto-shows when items >= 10
|
|
28
28
|
*/
|
|
29
29
|
showSearch?: boolean;
|
|
30
|
+
/**
|
|
31
|
+
* Contextual placeholder shown when the search input is displayed.
|
|
32
|
+
* Does not replace the translated accessible search label.
|
|
33
|
+
*/
|
|
34
|
+
searchPlaceholder?: string;
|
|
30
35
|
/**
|
|
31
36
|
* Additional CSS classes to apply to the list container. Use this to customize height or other container styles.
|
|
32
37
|
*/
|
|
@@ -20,48 +20,48 @@ var v = c({ slots: {
|
|
|
20
20
|
list: "uy:overflow-y-auto uy:mt-100 uy:max-h-[300px]",
|
|
21
21
|
selectedListBox: "uy:bg-surface-neutral uy:border-b uy:border-border-neutral uy:py-100 uy:data-[empty=true]:border-0 uy:data-[is-last=true]:border-0 uy:data-[is-last=true]:py-0"
|
|
22
22
|
} });
|
|
23
|
-
function y({ items: o, children: c, value: y, onChange: b, className: x, showSearch: S = !1,
|
|
24
|
-
let { contains:
|
|
25
|
-
items:
|
|
26
|
-
selectedKeys:
|
|
27
|
-
onSelectionChange:
|
|
28
|
-
selectionMode:
|
|
29
|
-
selectionBehavior:
|
|
30
|
-
label:
|
|
31
|
-
className:
|
|
32
|
-
"data-is-last": !
|
|
33
|
-
}),
|
|
34
|
-
...
|
|
35
|
-
className:
|
|
36
|
-
items:
|
|
37
|
-
selectedKeys:
|
|
38
|
-
onSelectionChange:
|
|
23
|
+
function y({ items: o, children: c, value: y, onChange: b, className: x, showSearch: S = !1, searchPlaceholder: C, sortSelectedFirst: w = !1, selectedSectionLabel: T = "Selected", ...E }, D) {
|
|
24
|
+
let { contains: O } = g({ sensitivity: "base" }), { wrapper: k, inputContainer: A, list: j, separator: M, selectedListBox: N } = v(), [P, F] = t(y, b), I = s(() => (Array.isArray(o) ? o.length : Array.from(o).length) >= 10 || S, [o, S]), L = n(o, P, w), R = s(() => L.remainingItems ? !L.remainingItems[Symbol.iterator]().next().done : !1, [L.remainingItems]), z = /* @__PURE__ */ u(r, {
|
|
25
|
+
items: L.selectedItems,
|
|
26
|
+
selectedKeys: P,
|
|
27
|
+
onSelectionChange: F,
|
|
28
|
+
selectionMode: E.selectionMode,
|
|
29
|
+
selectionBehavior: E.selectionBehavior,
|
|
30
|
+
label: T,
|
|
31
|
+
className: N(),
|
|
32
|
+
"data-is-last": !R
|
|
33
|
+
}), B = /* @__PURE__ */ u(m, {
|
|
34
|
+
...E,
|
|
35
|
+
className: j({ className: x }),
|
|
36
|
+
items: L.remainingItems,
|
|
37
|
+
selectedKeys: P,
|
|
38
|
+
onSelectionChange: F,
|
|
39
39
|
renderEmptyState: i,
|
|
40
40
|
children: /* @__PURE__ */ u(p, {
|
|
41
|
-
items:
|
|
41
|
+
items: L.remainingItems,
|
|
42
42
|
children: c
|
|
43
43
|
})
|
|
44
44
|
});
|
|
45
45
|
return /* @__PURE__ */ u("div", {
|
|
46
|
-
ref:
|
|
47
|
-
className:
|
|
48
|
-
children:
|
|
49
|
-
filter:
|
|
46
|
+
ref: D,
|
|
47
|
+
className: k(),
|
|
48
|
+
children: I ? /* @__PURE__ */ d(h, {
|
|
49
|
+
filter: O,
|
|
50
50
|
children: [
|
|
51
51
|
/* @__PURE__ */ d("div", {
|
|
52
|
-
className:
|
|
52
|
+
className: A(),
|
|
53
53
|
"data-dd-privacy": "mask",
|
|
54
|
-
children: [/* @__PURE__ */ u(a, {}), /* @__PURE__ */ u(f, { className:
|
|
54
|
+
children: [/* @__PURE__ */ u(a, { placeholder: C }), /* @__PURE__ */ u(f, { className: M() })]
|
|
55
55
|
}),
|
|
56
|
-
|
|
57
|
-
|
|
56
|
+
z,
|
|
57
|
+
R && /* @__PURE__ */ u(_, {
|
|
58
58
|
...e,
|
|
59
|
-
children:
|
|
59
|
+
children: B
|
|
60
60
|
})
|
|
61
61
|
]
|
|
62
|
-
}) : /* @__PURE__ */ d(l, { children: [
|
|
62
|
+
}) : /* @__PURE__ */ d(l, { children: [z, R && /* @__PURE__ */ u(_, {
|
|
63
63
|
...e,
|
|
64
|
-
children:
|
|
64
|
+
children: B
|
|
65
65
|
})] })
|
|
66
66
|
});
|
|
67
67
|
}
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
type SelectListSearchInputProps = {
|
|
2
|
+
placeholder?: string;
|
|
3
|
+
};
|
|
4
|
+
declare const SelectListSearchInput: import('react').ForwardRefExoticComponent<SelectListSearchInputProps & import('react').RefAttributes<HTMLDivElement>>;
|
|
2
5
|
export { SelectListSearchInput };
|
|
@@ -10,7 +10,7 @@ import { SearchField as c } from "react-aria-components/SearchField";
|
|
|
10
10
|
var l = r({ slots: {
|
|
11
11
|
base: "uy:flex uy:gap-100 uy:items-center uy:transition-colors uy:py-125 uy:sm:py-100 uy:px-150 uy:rounded-100 uy:sm:rounded-75 uy:bg-surface-form-high-enabled uy:focus-within:outline-utility-focus-ring uy:focus-within:outline-2 uy:focus-within:outline-offset-2 uy:text-content-form-active uy:typography-body",
|
|
12
12
|
input: "uy:flex-grow uy:outline-none uy:[&::-webkit-search-cancel-button]:hidden"
|
|
13
|
-
} }), u = n((n, r) => {
|
|
13
|
+
} }), u = n(({ placeholder: n }, r) => {
|
|
14
14
|
let u = o(), { base: d, input: f } = l();
|
|
15
15
|
return /* @__PURE__ */ a(c, {
|
|
16
16
|
className: d(),
|
|
@@ -23,6 +23,7 @@ var l = r({ slots: {
|
|
|
23
23
|
color: "content.neutral.lowest"
|
|
24
24
|
}),
|
|
25
25
|
/* @__PURE__ */ i(s, {
|
|
26
|
+
placeholder: n,
|
|
26
27
|
"aria-label": u.formatMessage({
|
|
27
28
|
id: "unity:component:common:search:label",
|
|
28
29
|
defaultMessage: "Search"
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@payfit/unity-components",
|
|
3
|
-
"version": "3.15.
|
|
3
|
+
"version": "3.15.23",
|
|
4
4
|
"module": "./dist/esm/index.js",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -103,7 +103,7 @@
|
|
|
103
103
|
"@formatjs/intl": "4.1.12",
|
|
104
104
|
"@internationalized/date": "3.12.4",
|
|
105
105
|
"minimatch": "10.2.5",
|
|
106
|
-
"@payfit/unity-illustrations": "3.15.
|
|
106
|
+
"@payfit/unity-illustrations": "3.15.23",
|
|
107
107
|
"@radix-ui/react-avatar": "1.2.7",
|
|
108
108
|
"@radix-ui/react-slot": "1.4.0",
|
|
109
109
|
"@react-aria/interactions": "3.28.1",
|
|
@@ -132,8 +132,8 @@
|
|
|
132
132
|
"zod": "4.6.5"
|
|
133
133
|
},
|
|
134
134
|
"peerDependencies": {
|
|
135
|
-
"@payfit/unity-icons": "3.15.
|
|
136
|
-
"@payfit/unity-themes": "3.15.
|
|
135
|
+
"@payfit/unity-icons": "3.15.23",
|
|
136
|
+
"@payfit/unity-themes": "3.15.23",
|
|
137
137
|
"@storybook/react-vite": "^10",
|
|
138
138
|
"@tanstack/react-query": "^5",
|
|
139
139
|
"@tanstack/form-core": "1.33.5",
|
|
@@ -157,9 +157,9 @@
|
|
|
157
157
|
"@payfit/storybook-addon-console-errors": "0.0.0-use.local",
|
|
158
158
|
"@payfit/storybook-addon-datadog-rum": "0.0.0-use.local",
|
|
159
159
|
"@payfit/storybook-config": "0.0.0-use.local",
|
|
160
|
-
"@payfit/unity-icons": "3.15.
|
|
161
|
-
"@payfit/unity-illustrations": "3.15.
|
|
162
|
-
"@payfit/unity-themes": "3.15.
|
|
160
|
+
"@payfit/unity-icons": "3.15.23",
|
|
161
|
+
"@payfit/unity-illustrations": "3.15.23",
|
|
162
|
+
"@payfit/unity-themes": "3.15.23",
|
|
163
163
|
"@payfit/vite-configs": "0.0.0-use.local",
|
|
164
164
|
"@storybook/addon-a11y": "10.6.1",
|
|
165
165
|
"@storybook/addon-designs": "11.1.4",
|
|
@@ -175,6 +175,7 @@
|
|
|
175
175
|
"@tanstack/react-form-devtools": "0.2.34",
|
|
176
176
|
"@tanstack/react-query": "5.104.1",
|
|
177
177
|
"@tanstack/react-store": "0.11.1",
|
|
178
|
+
"@tanstack/react-table": "9.3.1",
|
|
178
179
|
"@tanstack/react-router": "1.170.44",
|
|
179
180
|
"@tanstack/react-router-devtools": "1.167.2",
|
|
180
181
|
"@tanstack/react-virtual": "3.14.14",
|