Skip to content

Commit 3b245c5

Browse files
bal 4329 (#3406)
* feat(ui): enhance SearchableDropdown and SelectField components - Improve accessibility by modifying state handling in SearchableDropdown - Refactor SelectField options mapping for clarity and update dependencies - Ensure SelectField does not disable by default and adds disablePortal attribute * fix(SelectField): make disabled prop dynamic - Update disabled prop to use dynamic value instead of static false * chore(release): bump versions and update dependencies - Update @ballerine/ui to version 0.7.164 across multiple packages - Bump versions for @ballerine/backoffice-v2, @ballerine/kyb-app, and others - Ensure all related dependencies are synchronized with the new UI version
1 parent b59bc58 commit 3b245c5

File tree

16 files changed

+51015
-18949
lines changed

16 files changed

+51015
-18949
lines changed

apps/backoffice-v2/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
# @ballerine/backoffice-v2
22

3+
## 0.7.164
4+
5+
### Patch Changes
6+
7+
- version bump
8+
- Updated dependencies
9+
- @ballerine/ui@0.7.164
10+
- @ballerine/react-pdf-toolkit@1.2.127
11+
312
## 0.7.163
413

514
### Patch Changes

apps/backoffice-v2/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ballerine/backoffice-v2",
3-
"version": "0.7.163",
3+
"version": "0.7.164",
44
"description": "Ballerine - Backoffice",
55
"homepage": "https://github.com/ballerine-io/ballerine",
66
"type": "module",
@@ -52,8 +52,8 @@
5252
"preview": "vite preview"
5353
},
5454
"dependencies": {
55-
"@ballerine/react-pdf-toolkit": "^1.2.126",
56-
"@ballerine/ui": "0.7.163",
55+
"@ballerine/react-pdf-toolkit": "^1.2.127",
56+
"@ballerine/ui": "0.7.164",
5757
"@ballerine/blocks": "0.2.47",
5858
"@ballerine/common": "0.9.113",
5959
"@ballerine/workflow-browser-sdk": "0.6.137",

apps/kyb-app/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# kyb-app
22

3+
## 0.3.195
4+
5+
### Patch Changes
6+
7+
- version bump
8+
- Updated dependencies
9+
- @ballerine/ui@0.7.164
10+
311
## 0.3.194
412

513
### Patch Changes

apps/kyb-app/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@ballerine/kyb-app",
33
"private": true,
4-
"version": "0.3.194",
4+
"version": "0.3.195",
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
@@ -18,7 +18,7 @@
1818
"dependencies": {
1919
"@ballerine/blocks": "0.2.47",
2020
"@ballerine/common": "^0.9.113",
21-
"@ballerine/ui": "0.7.163",
21+
"@ballerine/ui": "0.7.164",
2222
"@ballerine/workflow-browser-sdk": "0.6.137",
2323
"@lukemorales/query-key-factory": "^1.0.3",
2424
"@radix-ui/react-icons": "^1.3.0",

apps/workflows-dashboard/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,13 @@
11
# @ballerine/workflows-dashboard
22

3+
## 0.2.47
4+
5+
### Patch Changes
6+
7+
- version bump
8+
- Updated dependencies
9+
- @ballerine/ui@0.7.164
10+
311
## 0.2.46
412

513
### Patch Changes

apps/workflows-dashboard/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@ballerine/workflows-dashboard",
33
"private": false,
4-
"version": "0.2.46",
4+
"version": "0.2.47",
55
"type": "module",
66
"scripts": {
77
"spellcheck": "cspell \"*\"",
@@ -17,7 +17,7 @@
1717
},
1818
"dependencies": {
1919
"@ballerine/common": "^0.9.109",
20-
"@ballerine/ui": "^0.7.158",
20+
"@ballerine/ui": "^0.7.164",
2121
"@lukemorales/query-key-factory": "^1.0.3",
2222
"@radix-ui/react-avatar": "^1.0.3",
2323
"@radix-ui/react-dialog": "1.0.4",

packages/react-pdf-toolkit/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @ballerine/react-pdf-toolkit
22

3+
## 1.2.127
4+
5+
### Patch Changes
6+
7+
- Updated dependencies
8+
- @ballerine/ui@0.7.164
9+
310
## 1.2.126
411

512
### Patch Changes

packages/react-pdf-toolkit/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@ballerine/react-pdf-toolkit",
33
"private": false,
4-
"version": "1.2.126",
4+
"version": "1.2.127",
55
"types": "./dist/build.d.ts",
66
"main": "./dist/react-pdf-toolkit.js",
77
"module": "./dist/react-pdf-toolkit.mjs",
@@ -27,7 +27,7 @@
2727
},
2828
"dependencies": {
2929
"@ballerine/config": "^1.1.44",
30-
"@ballerine/ui": "0.7.163",
30+
"@ballerine/ui": "0.7.164",
3131
"@react-pdf/renderer": "^3.1.14",
3232
"@sinclair/typebox": "^0.31.7",
3333
"ajv": "^8.12.0",

packages/ui/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @ballerine/ui
22

3+
## 0.7.164
4+
5+
### Patch Changes
6+
7+
- version bump
8+
39
## 0.7.163
410

511
### Patch Changes

packages/ui/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@ballerine/ui",
33
"private": false,
4-
"version": "0.7.163",
4+
"version": "0.7.164",
55
"type": "module",
66
"main": "dist/index.js",
77
"types": "dist/index.d.ts",

packages/ui/src/components/atoms/SearchableDropdown/SearchableDropdown.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ export const SearchableDropdown = ({
5151
if (selectedOption) {
5252
onChange(selectedOption.value);
5353
}
54+
5455
setOpen(false);
5556
},
5657
[onChange, options],
@@ -70,6 +71,7 @@ export const SearchableDropdown = ({
7071
const handleOpenChange = useCallback(
7172
(isOpen: boolean) => {
7273
setOpen(isOpen);
74+
7375
if (!isOpen) {
7476
setIsFocused(false);
7577
onBlur?.();
@@ -97,7 +99,7 @@ export const SearchableDropdown = ({
9799
>
98100
{selectedOption ? selectedOption.label : placeholder}
99101
</span>
100-
<ChevronsUpDown className="ml-2 h-4 w-4 opacity-50" />
102+
<ChevronsUpDown className="ml-2 size-4 opacity-50" />
101103
</Button>
102104
</PopoverTrigger>
103105
<PopoverContent
@@ -131,7 +133,7 @@ export const SearchableDropdown = ({
131133
{option.label}
132134
<Check
133135
className={ctw(
134-
'ml-auto h-4 w-4',
136+
'ml-auto size-4',
135137
value === option.value ? 'opacity-100' : 'opacity-0',
136138
)}
137139
/>

packages/ui/src/components/organisms/DynamicForm/components/RSJVInputAdaters/TextInputAdapter/components/SelectField/SelectField.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,23 @@ export const SelectField = ({
1616
}: WithTestId<FieldProps<string>>) => {
1717
const options = useMemo((): ISearchableDropdownOption[] => {
1818
if (Array.isArray(schema.enum)) {
19-
return schema.enum.map((value, index) => {
20-
return {
21-
label: schema.enumNames ? schema.enumNames[index] : value,
22-
value: value as string,
23-
};
24-
});
19+
return schema.enum.map((value, index) => ({
20+
label: (uiSchema?.['ui:enumNames']?.[index] as string) ?? value,
21+
value: value as string,
22+
}));
2523
}
2624

27-
if (!Array.isArray(schema.oneOf)) return [];
25+
if (!Array.isArray(schema.oneOf)) {
26+
return [];
27+
}
2828

2929
return (schema.oneOf as TOneOfItem[]).map(item => {
3030
return {
3131
label: item.title as string,
3232
value: item.const as string,
3333
};
3434
}) as ISearchableDropdownOption[];
35-
}, [schema.oneOf, schema.enumNames, schema.enum]);
35+
}, [schema.enum, schema.oneOf, uiSchema]);
3636

3737
const handleBlur = useCallback(() => {
3838
// @ts-ignore
@@ -48,6 +48,7 @@ export const SelectField = ({
4848
value={formData}
4949
disabled={disabled}
5050
testId={testId}
51+
disablePortal
5152
textInputClassName="placeholder:text-gray-400"
5253
onChange={onChange}
5354
onBlur={handleBlur}

0 commit comments

Comments
 (0)