@westpac/ui 1.2.0 → 1.3.0
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 +13 -0
- package/assets/icons/filled/sort-filled.svg +3 -0
- package/assets/icons/outlined/sort-outlined.svg +3 -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/components/bottom-sheet/components/bottom-sheet-modal/bottom-sheet-modal.styles.js +1 -1
- package/dist/components/date-picker/components/popover/popover.styles.js +1 -1
- package/dist/components/icon/components/sort-icon.d.ts +2 -0
- package/dist/components/icon/components/sort-icon.js +12 -0
- package/dist/components/icon/index.d.ts +1 -0
- package/dist/components/icon/index.js +1 -0
- package/dist/components/modal/components/modal-backdrop/modal-backdrop.styles.js +1 -1
- package/dist/css/westpac-ui.css +14 -9
- package/dist/css/westpac-ui.min.css +14 -9
- package/package.json +1 -1
- package/src/components/autocomplete/autocomplete.component.tsx +3 -1
- package/src/components/autocomplete/components/autocomplete-list-box/autocomplete-list-box.component.tsx +5 -1
- package/src/components/bottom-sheet/components/bottom-sheet-modal/bottom-sheet-modal.styles.ts +1 -1
- package/src/components/date-picker/components/popover/popover.styles.ts +1 -1
- package/src/components/icon/components/sort-icon.tsx +20 -0
- package/src/components/icon/index.ts +1 -0
- package/src/components/modal/components/modal-backdrop/modal-backdrop.styles.ts +1 -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/components/bottom-sheet/components/bottom-sheet-modal/bottom-sheet-modal.styles.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { tv } from 'tailwind-variants';
|
|
2
2
|
export const styles = tv({
|
|
3
3
|
slots: {
|
|
4
|
-
underlay: 'fixed inset-0 flex animate-fadeIn flex-col justify-end bg-black/
|
|
4
|
+
underlay: 'fixed inset-0 flex animate-fadeIn flex-col justify-end bg-black/65 transition-all md:items-center md:justify-center',
|
|
5
5
|
motionWrapper: 'flex flex-col',
|
|
6
6
|
modal: 'flex w-full flex-col'
|
|
7
7
|
}
|
|
@@ -10,7 +10,7 @@ export const styles = tv({
|
|
|
10
10
|
variants: {
|
|
11
11
|
showAsBottomSheet: {
|
|
12
12
|
true: {
|
|
13
|
-
underlay: 'animate-fadeIn bg-black/
|
|
13
|
+
underlay: 'animate-fadeIn bg-black/65',
|
|
14
14
|
popover: '!fixed inset-x-0 !top-auto !bottom-0 !left-0 animate-slideUp overflow-auto rounded-t-3xl px-[8%] pb-3',
|
|
15
15
|
header: 'mx-[-8vw] flex items-center justify-between border-b border-b-border-muted-soft px-3.5 py-2',
|
|
16
16
|
headerLabel: 'typography-body-10 text-text-body'
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Icon } from '../icon.component.js';
|
|
3
|
+
export function SortIcon({ look = 'filled', 'aria-label': ariaLabel = 'Sort', copyrightYear = '2026', ...props }) {
|
|
4
|
+
return React.createElement(Icon, {
|
|
5
|
+
"aria-label": ariaLabel,
|
|
6
|
+
copyrightYear: copyrightYear,
|
|
7
|
+
...props
|
|
8
|
+
}, React.createElement("path", {
|
|
9
|
+
d: "M18.3643 14.6367L12 21.001L5.63574 14.6367L7.0498 13.2227L12 18.1729L16.9492 13.2227L18.3643 14.6367ZM18.3643 9.36426L16.9502 10.7783L12 5.82812L7.05078 10.7783L5.63672 9.36426L12 3L18.3643 9.36426Z",
|
|
10
|
+
fill: "currentColor"
|
|
11
|
+
}));
|
|
12
|
+
}
|
|
@@ -210,6 +210,7 @@ export { ShoppingBasketIcon } from './components/shopping-basket-icon.js';
|
|
|
210
210
|
export { SimCardIcon } from './components/sim-card-icon.js';
|
|
211
211
|
export { SlackIcon } from './components/slack-icon.js';
|
|
212
212
|
export { SmsIcon } from './components/sms-icon.js';
|
|
213
|
+
export { SortIcon } from './components/sort-icon.js';
|
|
213
214
|
export { SpaIcon } from './components/spa-icon.js';
|
|
214
215
|
export { StarHalfIcon } from './components/star-half-icon.js';
|
|
215
216
|
export { StarRateIcon } from './components/star-rate-icon.js';
|
|
@@ -210,6 +210,7 @@ export { ShoppingBasketIcon } from './components/shopping-basket-icon.js';
|
|
|
210
210
|
export { SimCardIcon } from './components/sim-card-icon.js';
|
|
211
211
|
export { SlackIcon } from './components/slack-icon.js';
|
|
212
212
|
export { SmsIcon } from './components/sms-icon.js';
|
|
213
|
+
export { SortIcon } from './components/sort-icon.js';
|
|
213
214
|
export { SpaIcon } from './components/spa-icon.js';
|
|
214
215
|
export { StarHalfIcon } from './components/star-half-icon.js';
|
|
215
216
|
export { StarRateIcon } from './components/star-rate-icon.js';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { tv } from 'tailwind-variants';
|
|
2
2
|
export const styles = tv({
|
|
3
3
|
slots: {
|
|
4
|
-
base: 'fixed inset-0 flex animate-fadeIn justify-center bg-black/
|
|
4
|
+
base: 'fixed inset-0 flex animate-fadeIn justify-center bg-black/65 px-4',
|
|
5
5
|
modal: 'relative top-[5vh] z-10 size-fit max-w-full animate-fadeInDown'
|
|
6
6
|
},
|
|
7
7
|
variants: {
|
package/dist/css/westpac-ui.css
CHANGED
|
@@ -1989,16 +1989,10 @@
|
|
|
1989
1989
|
background-color: color-mix(in oklab, var(--color-black, #000) 5%, transparent);
|
|
1990
1990
|
}
|
|
1991
1991
|
}
|
|
1992
|
-
.bg-black\/
|
|
1993
|
-
background-color: color-mix(in srgb, #000
|
|
1992
|
+
.bg-black\/65 {
|
|
1993
|
+
background-color: color-mix(in srgb, #000 65%, transparent);
|
|
1994
1994
|
@supports (color: color-mix(in lab, red, red)) {
|
|
1995
|
-
background-color: color-mix(in oklab, var(--color-black, #000)
|
|
1996
|
-
}
|
|
1997
|
-
}
|
|
1998
|
-
.bg-black\/50 {
|
|
1999
|
-
background-color: color-mix(in srgb, #000 50%, transparent);
|
|
2000
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
2001
|
-
background-color: color-mix(in oklab, var(--color-black, #000) 50%, transparent);
|
|
1995
|
+
background-color: color-mix(in oklab, var(--color-black, #000) 65%, transparent);
|
|
2002
1996
|
}
|
|
2003
1997
|
}
|
|
2004
1998
|
.bg-border-danger {
|
|
@@ -4121,6 +4115,12 @@
|
|
|
4121
4115
|
will-change: opacity;
|
|
4122
4116
|
}
|
|
4123
4117
|
}
|
|
4118
|
+
.first\:rounded-t-xl {
|
|
4119
|
+
&:first-child {
|
|
4120
|
+
border-top-left-radius: var(--border-radius-6);
|
|
4121
|
+
border-top-right-radius: var(--border-radius-6);
|
|
4122
|
+
}
|
|
4123
|
+
}
|
|
4124
4124
|
.first\:pt-0 {
|
|
4125
4125
|
&:first-child {
|
|
4126
4126
|
padding-top: calc(0.375rem * 0);
|
|
@@ -4143,6 +4143,11 @@
|
|
|
4143
4143
|
padding-bottom: calc(0.375rem * 0);
|
|
4144
4144
|
}
|
|
4145
4145
|
}
|
|
4146
|
+
.only\:rounded-xl {
|
|
4147
|
+
&:only-child {
|
|
4148
|
+
border-radius: var(--border-radius-6);
|
|
4149
|
+
}
|
|
4150
|
+
}
|
|
4146
4151
|
.even\:bg-surface-muted-faint {
|
|
4147
4152
|
&:nth-child(even) {
|
|
4148
4153
|
background-color: var(--surface-muted-faint);
|
|
@@ -1989,16 +1989,10 @@
|
|
|
1989
1989
|
background-color: color-mix(in oklab, var(--color-black, #000) 5%, transparent);
|
|
1990
1990
|
}
|
|
1991
1991
|
}
|
|
1992
|
-
.bg-black\/
|
|
1993
|
-
background-color: color-mix(in srgb, #000
|
|
1992
|
+
.bg-black\/65 {
|
|
1993
|
+
background-color: color-mix(in srgb, #000 65%, transparent);
|
|
1994
1994
|
@supports (color: color-mix(in lab, red, red)) {
|
|
1995
|
-
background-color: color-mix(in oklab, var(--color-black, #000)
|
|
1996
|
-
}
|
|
1997
|
-
}
|
|
1998
|
-
.bg-black\/50 {
|
|
1999
|
-
background-color: color-mix(in srgb, #000 50%, transparent);
|
|
2000
|
-
@supports (color: color-mix(in lab, red, red)) {
|
|
2001
|
-
background-color: color-mix(in oklab, var(--color-black, #000) 50%, transparent);
|
|
1995
|
+
background-color: color-mix(in oklab, var(--color-black, #000) 65%, transparent);
|
|
2002
1996
|
}
|
|
2003
1997
|
}
|
|
2004
1998
|
.bg-border-danger {
|
|
@@ -4121,6 +4115,12 @@
|
|
|
4121
4115
|
will-change: opacity;
|
|
4122
4116
|
}
|
|
4123
4117
|
}
|
|
4118
|
+
.first\:rounded-t-xl {
|
|
4119
|
+
&:first-child {
|
|
4120
|
+
border-top-left-radius: var(--border-radius-6);
|
|
4121
|
+
border-top-right-radius: var(--border-radius-6);
|
|
4122
|
+
}
|
|
4123
|
+
}
|
|
4124
4124
|
.first\:pt-0 {
|
|
4125
4125
|
&:first-child {
|
|
4126
4126
|
padding-top: calc(0.375rem * 0);
|
|
@@ -4143,6 +4143,11 @@
|
|
|
4143
4143
|
padding-bottom: calc(0.375rem * 0);
|
|
4144
4144
|
}
|
|
4145
4145
|
}
|
|
4146
|
+
.only\:rounded-xl {
|
|
4147
|
+
&:only-child {
|
|
4148
|
+
border-radius: var(--border-radius-6);
|
|
4149
|
+
}
|
|
4150
|
+
}
|
|
4146
4151
|
.even\:bg-surface-muted-faint {
|
|
4147
4152
|
&:nth-child(even) {
|
|
4148
4153
|
background-color: var(--surface-muted-faint);
|
package/package.json
CHANGED
|
@@ -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} />
|
package/src/components/bottom-sheet/components/bottom-sheet-modal/bottom-sheet-modal.styles.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { tv } from 'tailwind-variants';
|
|
|
3
3
|
export const styles = tv({
|
|
4
4
|
slots: {
|
|
5
5
|
underlay:
|
|
6
|
-
'fixed inset-0 flex animate-fadeIn flex-col justify-end bg-black/
|
|
6
|
+
'fixed inset-0 flex animate-fadeIn flex-col justify-end bg-black/65 transition-all md:items-center md:justify-center',
|
|
7
7
|
motionWrapper: 'flex flex-col',
|
|
8
8
|
modal: 'flex w-full flex-col',
|
|
9
9
|
},
|
|
@@ -11,7 +11,7 @@ export const styles = tv({
|
|
|
11
11
|
variants: {
|
|
12
12
|
showAsBottomSheet: {
|
|
13
13
|
true: {
|
|
14
|
-
underlay: 'animate-fadeIn bg-black/
|
|
14
|
+
underlay: 'animate-fadeIn bg-black/65',
|
|
15
15
|
popover:
|
|
16
16
|
'!fixed inset-x-0 !top-auto !bottom-0 !left-0 animate-slideUp overflow-auto rounded-t-3xl px-[8%] pb-3',
|
|
17
17
|
header: 'mx-[-8vw] flex items-center justify-between border-b border-b-border-muted-soft px-3.5 py-2',
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
|
|
3
|
+
import { Icon } from '../icon.component.js';
|
|
4
|
+
import { type IconProps } from '../icon.types.js';
|
|
5
|
+
|
|
6
|
+
export function SortIcon({
|
|
7
|
+
look = 'filled',
|
|
8
|
+
'aria-label': ariaLabel = 'Sort',
|
|
9
|
+
copyrightYear = '2026',
|
|
10
|
+
...props
|
|
11
|
+
}: IconProps) {
|
|
12
|
+
return (
|
|
13
|
+
<Icon aria-label={ariaLabel} copyrightYear={copyrightYear} {...props}>
|
|
14
|
+
<path
|
|
15
|
+
d="M18.3643 14.6367L12 21.001L5.63574 14.6367L7.0498 13.2227L12 18.1729L16.9492 13.2227L18.3643 14.6367ZM18.3643 9.36426L16.9502 10.7783L12 5.82812L7.05078 10.7783L5.63672 9.36426L12 3L18.3643 9.36426Z"
|
|
16
|
+
fill="currentColor"
|
|
17
|
+
/>
|
|
18
|
+
</Icon>
|
|
19
|
+
);
|
|
20
|
+
}
|
|
@@ -210,6 +210,7 @@ export { ShoppingBasketIcon } from './components/shopping-basket-icon.js';
|
|
|
210
210
|
export { SimCardIcon } from './components/sim-card-icon.js';
|
|
211
211
|
export { SlackIcon } from './components/slack-icon.js';
|
|
212
212
|
export { SmsIcon } from './components/sms-icon.js';
|
|
213
|
+
export { SortIcon } from './components/sort-icon.js';
|
|
213
214
|
export { SpaIcon } from './components/spa-icon.js';
|
|
214
215
|
export { StarHalfIcon } from './components/star-half-icon.js';
|
|
215
216
|
export { StarRateIcon } from './components/star-rate-icon.js';
|
|
@@ -2,7 +2,7 @@ import { tv } from 'tailwind-variants';
|
|
|
2
2
|
|
|
3
3
|
export const styles = tv({
|
|
4
4
|
slots: {
|
|
5
|
-
base: 'fixed inset-0 flex animate-fadeIn justify-center bg-black/
|
|
5
|
+
base: 'fixed inset-0 flex animate-fadeIn justify-center bg-black/65 px-4',
|
|
6
6
|
modal: 'relative top-[5vh] z-10 size-fit max-w-full animate-fadeInDown',
|
|
7
7
|
},
|
|
8
8
|
variants: {
|