- {(['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