@westpac/ui 1.2.0 → 1.2.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/CHANGELOG.md +6 -0
- package/dist/component-type.json +1 -1
- package/dist/components/autocomplete/autocomplete.component.js +1 -1
- package/dist/components/autocomplete/components/autocomplete-list-box/autocomplete-list-box.component.js +1 -1
- package/dist/css/westpac-ui.css +11 -0
- package/dist/css/westpac-ui.min.css +11 -0
- package/package.json +3 -3
- package/src/components/autocomplete/autocomplete.component.tsx +3 -1
- package/src/components/autocomplete/components/autocomplete-list-box/autocomplete-list-box.component.tsx +5 -1
|
@@ -125,7 +125,7 @@ function Autocomplete({ size = 'medium', invalid = false, isDisabled, footer, po
|
|
|
125
125
|
portalContainer: portalContainer,
|
|
126
126
|
triggerRef: outerRef
|
|
127
127
|
}, React.createElement("div", {
|
|
128
|
-
className: "bg-background-white px-3 py-2 text-text-muted"
|
|
128
|
+
className: "bg-background-white px-3 py-2 text-text-muted first:rounded-t-xl only:rounded-xl"
|
|
129
129
|
}, noOptionsMessage), footer && React.createElement("div", {
|
|
130
130
|
className: "rounded-b border-t border-t-border-muted-soft bg-background-white px-3 py-2 text-text-muted"
|
|
131
131
|
}, footer)), state.isOpen && React.createElement(AutocompletePopover, {
|
|
@@ -8,7 +8,7 @@ export function AutocompleteListBox(props) {
|
|
|
8
8
|
return React.createElement("ul", {
|
|
9
9
|
...listBoxProps,
|
|
10
10
|
ref: listBoxRef,
|
|
11
|
-
className: "w-full overflow-hidden rounded-xl
|
|
11
|
+
className: "w-full overflow-hidden outline-none first:rounded-t-xl only:rounded-xl"
|
|
12
12
|
}, [
|
|
13
13
|
...state.collection
|
|
14
14
|
].map((item)=>item.type === 'section' ? React.createElement(AutocompleteListBoxSection, {
|
package/dist/css/westpac-ui.css
CHANGED
|
@@ -4121,6 +4121,12 @@
|
|
|
4121
4121
|
will-change: opacity;
|
|
4122
4122
|
}
|
|
4123
4123
|
}
|
|
4124
|
+
.first\:rounded-t-xl {
|
|
4125
|
+
&:first-child {
|
|
4126
|
+
border-top-left-radius: var(--border-radius-6);
|
|
4127
|
+
border-top-right-radius: var(--border-radius-6);
|
|
4128
|
+
}
|
|
4129
|
+
}
|
|
4124
4130
|
.first\:pt-0 {
|
|
4125
4131
|
&:first-child {
|
|
4126
4132
|
padding-top: calc(0.375rem * 0);
|
|
@@ -4143,6 +4149,11 @@
|
|
|
4143
4149
|
padding-bottom: calc(0.375rem * 0);
|
|
4144
4150
|
}
|
|
4145
4151
|
}
|
|
4152
|
+
.only\:rounded-xl {
|
|
4153
|
+
&:only-child {
|
|
4154
|
+
border-radius: var(--border-radius-6);
|
|
4155
|
+
}
|
|
4156
|
+
}
|
|
4146
4157
|
.even\:bg-surface-muted-faint {
|
|
4147
4158
|
&:nth-child(even) {
|
|
4148
4159
|
background-color: var(--surface-muted-faint);
|
|
@@ -4121,6 +4121,12 @@
|
|
|
4121
4121
|
will-change: opacity;
|
|
4122
4122
|
}
|
|
4123
4123
|
}
|
|
4124
|
+
.first\:rounded-t-xl {
|
|
4125
|
+
&:first-child {
|
|
4126
|
+
border-top-left-radius: var(--border-radius-6);
|
|
4127
|
+
border-top-right-radius: var(--border-radius-6);
|
|
4128
|
+
}
|
|
4129
|
+
}
|
|
4124
4130
|
.first\:pt-0 {
|
|
4125
4131
|
&:first-child {
|
|
4126
4132
|
padding-top: calc(0.375rem * 0);
|
|
@@ -4143,6 +4149,11 @@
|
|
|
4143
4149
|
padding-bottom: calc(0.375rem * 0);
|
|
4144
4150
|
}
|
|
4145
4151
|
}
|
|
4152
|
+
.only\:rounded-xl {
|
|
4153
|
+
&:only-child {
|
|
4154
|
+
border-radius: var(--border-radius-6);
|
|
4155
|
+
}
|
|
4156
|
+
}
|
|
4146
4157
|
.even\:bg-surface-muted-faint {
|
|
4147
4158
|
&:nth-child(even) {
|
|
4148
4159
|
background-color: var(--surface-muted-faint);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@westpac/ui",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"sideEffects": false,
|
|
6
6
|
"type": "module",
|
|
@@ -253,10 +253,10 @@
|
|
|
253
253
|
"typescript": "^5.5.4",
|
|
254
254
|
"vite": "^7.1.12",
|
|
255
255
|
"vitest": "^3.2.4",
|
|
256
|
-
"@westpac/eslint-config": "~1.1.0",
|
|
257
256
|
"@westpac/style-config": "~1.0.2",
|
|
258
257
|
"@westpac/test-config": "~0.0.0",
|
|
259
|
-
"@westpac/ts-config": "~0.0.0"
|
|
258
|
+
"@westpac/ts-config": "~0.0.0",
|
|
259
|
+
"@westpac/eslint-config": "~1.1.0"
|
|
260
260
|
},
|
|
261
261
|
"dependencies": {
|
|
262
262
|
"@internationalized/date": "~3.10.0",
|
|
@@ -153,7 +153,9 @@ function Autocomplete<T extends object>(
|
|
|
153
153
|
portalContainer={portalContainer}
|
|
154
154
|
triggerRef={outerRef}
|
|
155
155
|
>
|
|
156
|
-
<div className="bg-background-white px-3 py-2 text-text-muted">
|
|
156
|
+
<div className="bg-background-white px-3 py-2 text-text-muted first:rounded-t-xl only:rounded-xl">
|
|
157
|
+
{noOptionsMessage}
|
|
158
|
+
</div>
|
|
157
159
|
{footer && (
|
|
158
160
|
<div className="rounded-b border-t border-t-border-muted-soft bg-background-white px-3 py-2 text-text-muted">
|
|
159
161
|
{footer}
|
|
@@ -15,7 +15,11 @@ export function AutocompleteListBox(props: AutocompleteListBoxProps) {
|
|
|
15
15
|
const { listBoxProps } = useListBox(props, state, listBoxRef);
|
|
16
16
|
|
|
17
17
|
return (
|
|
18
|
-
<ul
|
|
18
|
+
<ul
|
|
19
|
+
{...listBoxProps}
|
|
20
|
+
ref={listBoxRef}
|
|
21
|
+
className="w-full overflow-hidden outline-none first:rounded-t-xl only:rounded-xl"
|
|
22
|
+
>
|
|
19
23
|
{[...state.collection].map(item =>
|
|
20
24
|
item.type === 'section' ? (
|
|
21
25
|
<AutocompleteListBoxSection key={item.key} section={item} state={state} />
|