+ const COLORS = ['danger', 'faint', 'hero', 'info', 'neutral', 'primary', 'success', 'warning'] as const;
+ const INVERTED_COLORS = [
+ 'danger-inverted',
+ 'faint-inverted',
+ 'hero-inverted',
+ 'info-inverted',
+ 'neutral-inverted',
+ 'primary-inverted',
+ 'success-inverted',
+ 'warning-inverted',
+ ] as const;
+
+ return (
+
+
+
+ Examples showing pill style badge
+
+
-
-
- Examples showing basic style badge
-
-
-
+
+
+ Examples showing basic style badge
+
+
+
+
+
+ Label
+ New
+
+
+
+
+ Label
+
+ New
+
+
+
-
+
+ Product feature
+
+
+ New
+
- );
- };
+
+ );
+};
```
diff --git a/packages/ui/CHANGELOG.md b/packages/ui/CHANGELOG.md
index 6edaa7b41..535020f94 100644
--- a/packages/ui/CHANGELOG.md
+++ b/packages/ui/CHANGELOG.md
@@ -1,5 +1,13 @@
# @westpac/ui
+## 0.28.0
+
+### Minor Changes
+
+- 6f96072: fixed button groups hover glitch; updated footer story shield margin; updated space below alert title; updated search icon size in automcomplete
+- 23dad1b: Updated the appearance and svg of progress indicator component; updated visual bugs in header and badge;
+- 94d6345: added icons - arrow circle icons
+
## 0.27.0
### Minor Changes
diff --git a/packages/ui/assets/icons/filled/arrow-back-circle-filled.svg b/packages/ui/assets/icons/filled/arrow-back-circle-filled.svg
new file mode 100644
index 000000000..ffed4eed0
--- /dev/null
+++ b/packages/ui/assets/icons/filled/arrow-back-circle-filled.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/packages/ui/assets/icons/filled/arrow-down-circle-filled.svg b/packages/ui/assets/icons/filled/arrow-down-circle-filled.svg
new file mode 100644
index 000000000..ed7bd4c68
--- /dev/null
+++ b/packages/ui/assets/icons/filled/arrow-down-circle-filled.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/packages/ui/assets/icons/filled/arrow-forward-circle-filled.svg b/packages/ui/assets/icons/filled/arrow-forward-circle-filled.svg
new file mode 100644
index 000000000..c8e95979a
--- /dev/null
+++ b/packages/ui/assets/icons/filled/arrow-forward-circle-filled.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/packages/ui/assets/icons/filled/arrow-up-circle-filled.svg b/packages/ui/assets/icons/filled/arrow-up-circle-filled.svg
new file mode 100644
index 000000000..e0efd0539
--- /dev/null
+++ b/packages/ui/assets/icons/filled/arrow-up-circle-filled.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/packages/ui/assets/icons/outlined/arrow-back-circle-outlined.svg b/packages/ui/assets/icons/outlined/arrow-back-circle-outlined.svg
new file mode 100644
index 000000000..2bf62ae15
--- /dev/null
+++ b/packages/ui/assets/icons/outlined/arrow-back-circle-outlined.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/packages/ui/assets/icons/outlined/arrow-down-circle-outlined.svg b/packages/ui/assets/icons/outlined/arrow-down-circle-outlined.svg
new file mode 100644
index 000000000..398381861
--- /dev/null
+++ b/packages/ui/assets/icons/outlined/arrow-down-circle-outlined.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/packages/ui/assets/icons/outlined/arrow-forward-circle-outlined.svg b/packages/ui/assets/icons/outlined/arrow-forward-circle-outlined.svg
new file mode 100644
index 000000000..2cf19a356
--- /dev/null
+++ b/packages/ui/assets/icons/outlined/arrow-forward-circle-outlined.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/packages/ui/assets/icons/outlined/arrow-up-circle-outlined.svg b/packages/ui/assets/icons/outlined/arrow-up-circle-outlined.svg
new file mode 100644
index 000000000..1cf2fc49d
--- /dev/null
+++ b/packages/ui/assets/icons/outlined/arrow-up-circle-outlined.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/packages/ui/package.json b/packages/ui/package.json
index 622d13e0a..e6c97a34d 100644
--- a/packages/ui/package.json
+++ b/packages/ui/package.json
@@ -1,6 +1,6 @@
{
"name": "@westpac/ui",
- "version": "0.27.0",
+ "version": "0.28.0",
"license": "MIT",
"sideEffects": false,
"type": "module",
diff --git a/packages/ui/src/components/badge/badge.stories.tsx b/packages/ui/src/components/badge/badge.stories.tsx
index 3373ccb0c..4420afed5 100644
--- a/packages/ui/src/components/badge/badge.stories.tsx
+++ b/packages/ui/src/components/badge/badge.stories.tsx
@@ -131,12 +131,14 @@ export const Soft = () => (
export const Links = () => (
);
diff --git a/packages/ui/src/components/header/header.component.tsx b/packages/ui/src/components/header/header.component.tsx
index bd8c43fb4..ef3c4b8c0 100644
--- a/packages/ui/src/components/header/header.component.tsx
+++ b/packages/ui/src/components/header/header.component.tsx
@@ -103,7 +103,7 @@ export function Header({
+ {look === 'filled' ? (
+
+ ) : (
+
+
+
+
+ )}
+
+ );
+}
diff --git a/packages/ui/src/components/icon/components/arrow-down-circle-icon.tsx b/packages/ui/src/components/icon/components/arrow-down-circle-icon.tsx
new file mode 100644
index 000000000..732e25c56
--- /dev/null
+++ b/packages/ui/src/components/icon/components/arrow-down-circle-icon.tsx
@@ -0,0 +1,37 @@
+import React, { Fragment } from 'react';
+
+import { Icon } from '../icon.component.js';
+import { type IconProps } from '../icon.types.js';
+
+export function ArrowDownCircleIcon({
+ look = 'filled',
+ 'aria-label': ariaLabel = 'Arrow Down Circle',
+ copyrightYear = '2023',
+ ...props
+}: IconProps) {
+ return (
+
+ {look === 'filled' ? (
+
+ ) : (
+
+
+
+
+ )}
+
+ );
+}
diff --git a/packages/ui/src/components/icon/components/arrow-forward-circle-icon.tsx b/packages/ui/src/components/icon/components/arrow-forward-circle-icon.tsx
new file mode 100644
index 000000000..1a13c772d
--- /dev/null
+++ b/packages/ui/src/components/icon/components/arrow-forward-circle-icon.tsx
@@ -0,0 +1,37 @@
+import React, { Fragment } from 'react';
+
+import { Icon } from '../icon.component.js';
+import { type IconProps } from '../icon.types.js';
+
+export function ArrowForwardCircleIcon({
+ look = 'filled',
+ 'aria-label': ariaLabel = 'Arrow Forward Circle',
+ copyrightYear = '2023',
+ ...props
+}: IconProps) {
+ return (
+
+ {look === 'filled' ? (
+
+ ) : (
+
+
+
+
+ )}
+
+ );
+}
diff --git a/packages/ui/src/components/icon/components/arrow-up-circle-icon.tsx b/packages/ui/src/components/icon/components/arrow-up-circle-icon.tsx
new file mode 100644
index 000000000..d9b0510a1
--- /dev/null
+++ b/packages/ui/src/components/icon/components/arrow-up-circle-icon.tsx
@@ -0,0 +1,37 @@
+import React, { Fragment } from 'react';
+
+import { Icon } from '../icon.component.js';
+import { type IconProps } from '../icon.types.js';
+
+export function ArrowUpCircleIcon({
+ look = 'filled',
+ 'aria-label': ariaLabel = 'Arrow Up Circle',
+ copyrightYear = '2023',
+ ...props
+}: IconProps) {
+ return (
+
+ {look === 'filled' ? (
+
+ ) : (
+
+
+
+
+ )}
+
+ );
+}
diff --git a/packages/ui/src/components/icon/index.ts b/packages/ui/src/components/icon/index.ts
index ac21c7978..3ff55bb38 100755
--- a/packages/ui/src/components/icon/index.ts
+++ b/packages/ui/src/components/icon/index.ts
@@ -6,10 +6,14 @@ export { AlertIcon } from './components/alert-icon.js';
export { AndroidIcon } from './components/android-icon.js';
export { AppleIcon } from './components/apple-icon.js';
export { ArchiveBoxIcon } from './components/archive-box-icon.js';
+export { ArrowBackCircleIcon } from './components/arrow-back-circle-icon.js';
+export { ArrowDownCircleIcon } from './components/arrow-down-circle-icon.js';
export { ArrowForkIcon } from './components/arrow-fork-icon.js';
+export { ArrowForwardCircleIcon } from './components/arrow-forward-circle-icon.js';
export { ArrowLeftIcon } from './components/arrow-left-icon.js';
export { ArrowRightIcon } from './components/arrow-right-icon.js';
export { ArrowSplitIcon } from './components/arrow-split-icon.js';
+export { ArrowUpCircleIcon } from './components/arrow-up-circle-icon.js';
export { AtmIcon } from './components/atm-icon.js';
export { AttacheCaseIcon } from './components/attache-case-icon.js';
export { AustraliaIcon } from './components/australia-icon.js';
diff --git a/packages/ui/src/components/progress-indicator/progress-indicator.component.tsx b/packages/ui/src/components/progress-indicator/progress-indicator.component.tsx
index 35330fe4d..8a37f3ba3 100644
--- a/packages/ui/src/components/progress-indicator/progress-indicator.component.tsx
+++ b/packages/ui/src/components/progress-indicator/progress-indicator.component.tsx
@@ -1,21 +1,67 @@
-import React from 'react';
+import React, { useId } from 'react';
import { Icon } from '../icon/icon.component.js';
+import { Label } from '../label/label.component.js';
-import { styles } from './progress-indicator.styles.js';
+import { styles as ProgressIndicatorStyles } from './progress-indicator.styles.js';
import { ProgressIndicatorProps } from './progress-indicator.types.js';
export function ProgressIndicator({
- className,
- children,
color = 'hero',
+ label,
size = 'medium',
+ icon: EmbedIcon,
+ className,
'aria-label': ariaLabel = 'Loading',
...props
}: ProgressIndicatorProps) {
+ const styles = ProgressIndicatorStyles({
+ size,
+ color,
+ });
+
+ const id = useId();
+
+ const sizeMap: Record = {
+ xlarge: { strokeWidth: 4 },
+ large: { strokeWidth: 4 },
+ medium: { strokeWidth: 15 },
+ small: { strokeWidth: 20 },
+ xsmall: { strokeWidth: 30 },
+ };
+
+ const strokeHalfWidth = sizeMap[size.toString()].strokeWidth / 2;
+
return (
-
- {children}
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ <>
+
+
+ >
+
+
+ {EmbedIcon && size === 'large' &&
}
+
+ {label && size === 'large' &&
{label} }
+
);
}
diff --git a/packages/ui/src/components/progress-indicator/progress-indicator.scenarios.stories.tsx b/packages/ui/src/components/progress-indicator/progress-indicator.scenarios.stories.tsx
index 8ba9152ac..5d9e1c307 100644
--- a/packages/ui/src/components/progress-indicator/progress-indicator.scenarios.stories.tsx
+++ b/packages/ui/src/components/progress-indicator/progress-indicator.scenarios.stories.tsx
@@ -25,7 +25,7 @@ type Story = StoryObj;
* >Default usage example
*/
export const Default: Story = {
- args: { size: 'xlarge' },
+ args: { size: 'large' },
};
/**
diff --git a/packages/ui/src/components/progress-indicator/progress-indicator.stories.tsx b/packages/ui/src/components/progress-indicator/progress-indicator.stories.tsx
index d555cb6eb..5774a3132 100644
--- a/packages/ui/src/components/progress-indicator/progress-indicator.stories.tsx
+++ b/packages/ui/src/components/progress-indicator/progress-indicator.stories.tsx
@@ -1,5 +1,7 @@
import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
+import { FingerprintIcon, PadlockIcon, PadlockTickIcon } from '../icon/index.js';
+
import { ProgressIndicator } from './progress-indicator.component.js';
const meta: Meta = {
@@ -19,7 +21,7 @@ type Story = StoryObj;
* > Default usage example
*/
export const Default: Story = {
- args: { size: 'xlarge' },
+ args: { size: 'large' },
};
/**
@@ -28,11 +30,11 @@ export const Default: Story = {
export const Sizes = () => {
return (
- <>
- {(['xsmall', 'small', 'medium', 'large', 'xlarge'] as const).map(size => (
-
+
+ {(['xsmall', 'small', 'medium', 'large'] as const).map(size => (
+
))}
- >
+
);
};
@@ -42,10 +44,36 @@ export const Sizes = () => {
export const Inverted = () => {
return (
-
- {(['xsmall', 'small', 'medium', 'large', 'xlarge'] as const).map(size => (
-
+
+ {(['xsmall', 'small', 'medium', 'large'] as const).map(size => (
+
))}
);
};
+
+/**
+ * > Large indicator with embedded icon example
+ */
+
+export const Icon = () => {
+ return (
+
+ );
+};
+
+/**
+ * > Large indicator with label example
+ */
+export const Label = () => {
+ return (
+
+ );
+};
diff --git a/packages/ui/src/components/progress-indicator/progress-indicator.styles.ts b/packages/ui/src/components/progress-indicator/progress-indicator.styles.ts
index e509dee05..65992931d 100644
--- a/packages/ui/src/components/progress-indicator/progress-indicator.styles.ts
+++ b/packages/ui/src/components/progress-indicator/progress-indicator.styles.ts
@@ -2,7 +2,43 @@ import { tv } from 'tailwind-variants';
export const styles = tv(
{
- base: 'box-border inline-block animate-[spin_0.7s_linear_infinite] rounded-full border border-r-0',
+ slots: {
+ icon: 'absolute inset-0 m-auto',
+ base: 'animate-[spin_0.7s_linear_infinite]',
+ container: 'flex flex-col items-center',
+ label: 'typography-body-9 mt-1.5',
+ },
+ variants: {
+ size: {
+ xsmall: { base: 'h-2 w-2' },
+ small: { base: 'h-3 w-3' },
+ medium: { base: 'h-4 w-4' },
+ large: { base: 'h-15 w-15' },
+ xlarge: { base: 'h-15 w-15' },
+ },
+ color: {
+ success: { label: 'text-success' },
+ info: { label: 'text-info' },
+ warning: { label: 'text-warning' },
+ danger: { label: 'text-danger' },
+ system: { label: 'text-system' },
+ white: { label: 'text-white' },
+ black: { label: 'text-black' },
+ background: { label: 'text-background' },
+ border: { label: 'text-border' },
+ borderDark: { label: 'text-borderDark' },
+ focus: { label: 'text-focus' },
+ heading: { label: 'text-heading' },
+ hero: { label: 'text-hero' },
+ light: { label: 'text-light' },
+ link: { label: 'text-link' },
+ muted: { label: 'text-muted' },
+ neutral: { label: 'text-neutral' },
+ pop: { label: 'text-pop' },
+ primary: { label: 'text-primary' },
+ text: { label: 'text-text' },
+ },
+ },
},
{ responsiveVariants: ['xsl', 'sm', 'md', 'lg', 'xl'] },
);
diff --git a/packages/ui/src/components/progress-indicator/progress-indicator.types.ts b/packages/ui/src/components/progress-indicator/progress-indicator.types.ts
index 5455001ba..7c13550e9 100644
--- a/packages/ui/src/components/progress-indicator/progress-indicator.types.ts
+++ b/packages/ui/src/components/progress-indicator/progress-indicator.types.ts
@@ -1,3 +1,19 @@
+import { ReactNode } from 'react';
+
import { IconProps } from '../icon/icon.types.js';
-export type ProgressIndicatorProps = IconProps;
+export type ProgressIndicatorProps = Omit
& {
+ /**
+ * children prop
+ * @default false
+ */
+ children?: ReactNode;
+ /**
+ * Icon embedded in progress indicator
+ */
+ icon?: (props: IconProps) => JSX.Element;
+ /**
+ * Label placed below progress indicator
+ */
+ label?: string;
+};
diff --git a/packages/ui/src/stories/foundation/typography.stories.tsx b/packages/ui/src/stories/foundation/typography.stories.tsx
index db798396d..a4d7e8323 100644
--- a/packages/ui/src/stories/foundation/typography.stories.tsx
+++ b/packages/ui/src/stories/foundation/typography.stories.tsx
@@ -42,7 +42,7 @@ export const BrandFont = () => {
{ className: 'typography-brand-11', fontSize: fourteenPixel, lineHeight: twentyPixel },
];
return (
-
+
GEL brand typography tokens