diff --git a/packages/ui/src/components/input-group/components/input-group-add-ons/components/input-group-add-on-default-add-on/input-group-add-on-default-add-on.component.tsx b/packages/ui/src/components/input-group/components/input-group-add-ons/components/input-group-add-on-default-add-on/input-group-add-on-default-add-on.component.tsx
index e85f4a40a..b9dba30b9 100644
--- a/packages/ui/src/components/input-group/components/input-group-add-ons/components/input-group-add-on-default-add-on/input-group-add-on-default-add-on.component.tsx
+++ b/packages/ui/src/components/input-group/components/input-group-add-ons/components/input-group-add-on-default-add-on/input-group-add-on-default-add-on.component.tsx
@@ -6,12 +6,7 @@ import { type InputGroupAddOnDefaultAddOnProps } from './input-group-add-on-defa
/**
* @private
*/
-export const InputGroupAddOnDefaultAddOn = ({
- position,
- className,
- children,
- ...props
-}: InputGroupAddOnDefaultAddOnProps) => {
+export const InputGroupAddOnDefaultAddOn = ({ className, children, ...props }: InputGroupAddOnDefaultAddOnProps) => {
return (
{size}
- Look I'm a standalone link
+ Look I'm a standalone link
Lorem ipsum dolor{' '}
- look, I'm an inline link
+ look, I'm an inline link
{' '}
sit amet consectetur, adipisicing elit. Libero facilis odit voluptate reprehenderit laborum numquam ex optio
doloribus magni repudiandae vero fugiat iusto tempora debitis sunt laboriosam nobis, ut voluptatum?
diff --git a/packages/ui/src/components/list/components/list-item/list-item.component.tsx b/packages/ui/src/components/list/components/list-item/list-item.component.tsx
index e36f5c722..30cbe60b7 100644
--- a/packages/ui/src/components/list/components/list-item/list-item.component.tsx
+++ b/packages/ui/src/components/list/components/list-item/list-item.component.tsx
@@ -1,6 +1,6 @@
'use client';
-import React, { forwardRef, useContext } from 'react';
+import React, { Ref, forwardRef, useContext } from 'react';
import { useFocusRing } from 'react-aria';
import { ListContext } from '../../list.component.js';
@@ -11,7 +11,7 @@ import { type ListItemProps } from './list-item.types.js';
export function BaseListItem(
{ className, children, href, target, look, type, spacing, icon, ...props }: ListItemProps,
- ref: any,
+ ref: Ref,
) {
const state = useContext(ListContext);
diff --git a/packages/ui/src/components/list/list.stories.tsx b/packages/ui/src/components/list/list.stories.tsx
index 1cf914793..2a8ec8583 100644
--- a/packages/ui/src/components/list/list.stories.tsx
+++ b/packages/ui/src/components/list/list.stories.tsx
@@ -24,7 +24,11 @@ const TYPES = ['bullet', 'link', 'tick', 'cross', 'unstyled', 'icon', 'ordered']
*/
export const Default: Story = {
args: {
- children: [Styled list , Styled list , Styled list ],
+ children: [
+ Styled list ,
+ Styled list ,
+ Styled list ,
+ ],
},
};
diff --git a/packages/ui/src/components/modal/modal.stories.tsx b/packages/ui/src/components/modal/modal.stories.tsx
index 31b2d50db..d65b537a8 100644
--- a/packages/ui/src/components/modal/modal.stories.tsx
+++ b/packages/ui/src/components/modal/modal.stories.tsx
@@ -1,4 +1,4 @@
-import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
+import { type Meta, StoryFn } from '@storybook/react';
import { Fragment, useMemo } from 'react';
import { useOverlayTriggerState } from 'react-stately';
@@ -14,171 +14,136 @@ const meta: Meta = {
};
export default meta;
-type Story = StoryObj;
/**
* > Default usage example
*/
-export const Default: Story = {
- args: {
- children: `
+export const Default = () => {
+ const state = useOverlayTriggerState({});
+ return (
+ <>
+
+ {`
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem corporis saepe sapiente officia inventore eligendi dolores delectus vitae veritatis repudiandae, unde alias, ipsa a consequatur assumenda perferendis, commodi rem voluptates?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem corporis saepe sapiente officia inventore eligendi dolores delectus vitae veritatis repudiandae, unde alias, ipsa a consequatur assumenda perferendis, commodi rem voluptates?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem corporis saepe sapiente officia inventore eligendi dolores delectus vitae veritatis repudiandae, unde alias, ipsa a consequatur assumenda perferendis, commodi rem voluptates?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem corporis saepe sapiente officia inventore eligendi dolores delectus vitae veritatis repudiandae, unde alias, ipsa a consequatur assumenda perferendis, commodi rem voluptates?
Lorem ipsum dolor sit amet consectetur adipisicing elit. Voluptatem corporis saepe sapiente officia inventore eligendi dolores delectus vitae veritatis repudiandae, unde alias, ipsa a consequatur assumenda perferendis, commodi rem voluptates?
- `,
- title: 'Title',
- isDismissable: true,
- },
- render: ({ children, ...props }) => {
- const state = useOverlayTriggerState({});
- return (
- <>
-
- {children}
-
- Open Modal
- >
- );
- },
+ `}
+
+ Open Modal
+ >
+ );
};
/**
* > WithFooter usage example
*/
-export const WithFooter: Story = {
- args: {
- children: `I'm children`,
- title: 'Title',
- isDismissable: true,
- },
- render: ({ children, ...props }) => {
- const state = useOverlayTriggerState({});
+export const WithFooter = () => {
+ const state = useOverlayTriggerState({});
- return (
- <>
-
- {children}
-
-
- Open Modal
- >
- );
- },
+ return (
+ <>
+
+ {`I'm children`}
+
+
+ Open Modal
+ >
+ );
};
/**
* > All sizes usage example
*/
-export const Sizes: Story = {
- args: {
- children: `Type something but keep it simple. Modals should be easy to digest so that the user can quickly get back to what they were doing.`,
- title: 'Title',
- isDismissable: true,
- },
- render: ({ children, ...props }) => {
- const stateSM = useOverlayTriggerState({});
- const stateMD = useOverlayTriggerState({});
- const stateLG = useOverlayTriggerState({});
- const stateFull = useOverlayTriggerState({});
- const stateFluid = useOverlayTriggerState({});
+export const Sizes = () => {
+ const stateSM = useOverlayTriggerState({});
+ const stateMD = useOverlayTriggerState({});
+ const stateLG = useOverlayTriggerState({});
+ const stateFull = useOverlayTriggerState({});
+ const stateFluid = useOverlayTriggerState({});
- const states = useMemo(() => {
- return {
- sm: stateSM,
- md: stateMD,
- lg: stateLG,
- full: stateFull,
- fluid: stateFluid,
- };
- }, [stateSM, stateMD, stateLG, stateFull, stateFluid]);
+ const states = useMemo(() => {
+ return {
+ sm: stateSM,
+ md: stateMD,
+ lg: stateLG,
+ full: stateFull,
+ fluid: stateFluid,
+ };
+ }, [stateSM, stateMD, stateLG, stateFull, stateFluid]);
- return (
-
- {(['sm', 'md', 'lg', 'full', 'fluid'] as const).map(size => (
-
-
- {children}
-
-
- Open Modal {size}
-
- ))}
-
- );
- },
+ return (
+
+ {(['sm', 'md', 'lg', 'full', 'fluid'] as const).map(size => (
+
+
+ {`Type something but keep it simple. Modals should be easy to digest so that the user can quickly get back to what they were doing.`}
+
+
+ Open Modal {size}
+
+ ))}
+
+ );
};
/**
* > Not dismissable example
*/
-export const NotDismissible: Story = {
- args: {
- children: `I'm children`,
- title: 'Title',
- isDismissable: false,
- },
- render: ({ children, ...props }) => {
- const state = useOverlayTriggerState({});
+export const NotDismissible = () => {
+ const state = useOverlayTriggerState({});
- return (
- <>
-
- {children}
-
-
- Open Modal
- >
- );
- },
+ return (
+ <>
+
+ {`I'm children`}
+
+
+ Open Modal
+ >
+ );
};
/**
* > Responsive modal example, fluid on mobile and different sizes on desktop
*/
-export const Responsive: Story = {
- args: {
- children: `I'm children`,
- title: 'Title',
- isDismissable: true,
- },
- render: ({ children, ...props }) => {
- const state = useOverlayTriggerState({});
+export const Responsive = () => {
+ const state = useOverlayTriggerState({});
- return (
- <>
-
- {children}
-
-
- Open Modal
- >
- );
- },
+ return (
+ <>
+
+ {`I'm children`}
+
+
+ Open Modal
+ >
+ );
};
diff --git a/packages/ui/src/components/pagination/components/pagination-item/pagination-item.types.ts b/packages/ui/src/components/pagination/components/pagination-item/pagination-item.types.ts
index 9c73c43b2..e67f143b9 100644
--- a/packages/ui/src/components/pagination/components/pagination-item/pagination-item.types.ts
+++ b/packages/ui/src/components/pagination/components/pagination-item/pagination-item.types.ts
@@ -25,5 +25,7 @@ export type PaginationItemProps = {
/**
* Link component to render
*/
+ // NOTE: any typing below is very hard to replace
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
tag?: 'a' | 'button' | ((...args: any[]) => ReactElement | null);
} & (AnchorHTMLAttributes | ButtonHTMLAttributes);
diff --git a/packages/ui/src/components/pagination/pagination.component.tsx b/packages/ui/src/components/pagination/pagination.component.tsx
index ea0bb47e1..c7cc5ed06 100644
--- a/packages/ui/src/components/pagination/pagination.component.tsx
+++ b/packages/ui/src/components/pagination/pagination.component.tsx
@@ -66,7 +66,7 @@ export function Pagination({
tag: linkComponent || 'a',
href: fowardOnly ? pages[pages.length - 1].href : pages[(current || 0) - 2]?.href,
};
- }, [current, onChange, linkComponent, pages, infinite]);
+ }, [current, infinite, onChange, linkComponent, pages, generateHandleOnClickBackwards]);
const generateHandleOnClickForward = useCallback(
(current: number, infinite: boolean, backwardsOnly: boolean, onChange: (page: number) => unknown) => () => {
@@ -108,7 +108,7 @@ export function Pagination({
tag: linkComponent || 'a',
href: backwardsOnly ? pages[0].href : pages[current || 0]?.href,
};
- }, [current, onChange, linkComponent, pages, infinite]);
+ }, [current, pages, infinite, linkComponent, onChange, generateHandleOnClickForward]);
return (
diff --git a/packages/ui/src/components/pagination/pagination.hooks.ts b/packages/ui/src/components/pagination/pagination.hooks.ts
index c21554fc6..0fbb2c8f5 100644
--- a/packages/ui/src/components/pagination/pagination.hooks.ts
+++ b/packages/ui/src/components/pagination/pagination.hooks.ts
@@ -13,7 +13,7 @@ export const usePagination = ({ defaultCurrent = 1, pages, infinite = false }: P
}
return cannotGoForward ? currentPage : currentPage + 1;
});
- }, [pages]);
+ }, [infinite, pages.length]);
const previous = useCallback(() => {
setCurrentPage(currentPage => {
@@ -23,7 +23,7 @@ export const usePagination = ({ defaultCurrent = 1, pages, infinite = false }: P
}
return cannotGoBackwards ? currentPage : currentPage - 1;
});
- }, [pages]);
+ }, [infinite, pages.length]);
const selectedPage = useMemo(() => {
return pages[currentPage - 1];
diff --git a/packages/ui/src/components/pagination/pagination.stories.tsx b/packages/ui/src/components/pagination/pagination.stories.tsx
index fcc0376a2..46fef6381 100644
--- a/packages/ui/src/components/pagination/pagination.stories.tsx
+++ b/packages/ui/src/components/pagination/pagination.stories.tsx
@@ -1,9 +1,9 @@
import { action } from '@storybook/addon-actions';
-import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
+import { type Meta, StoryFn } from '@storybook/react';
import { useEffect, useState } from 'react';
import { ArrowLeftIcon, ArrowRightIcon } from '../icon/index.js';
-import { Button, PaginationProps } from '../index.js';
+import { Button } from '../index.js';
import { Pagination } from './pagination.component.js';
import { usePagination } from './pagination.hooks.js';
@@ -20,39 +20,32 @@ export default meta;
/**
* > Button usage example
*/
-export const Default: unknown = {
- args: {
- current: 1,
- onChange: action('onChange'),
- pages: [
- {
- text: '1',
- },
- {
- text: '2',
- },
- {
- text: '3',
- },
- ],
- },
- render: (props: PaginationProps) => {
- const [current, setCurrent] = useState(props.current);
- useEffect(() => {
- setCurrent(props.current);
- }, [props.current]);
-
- return (
- {
- setCurrent(value);
- props.onChange?.(value);
- }}
- current={current}
- />
- );
- },
+export const Default = () => {
+ const [current, setCurrent] = useState(1);
+ useEffect(() => {
+ setCurrent(1);
+ }, []);
+
+ return (
+ {
+ setCurrent(value);
+ action('onChange')(value);
+ }}
+ current={current}
+ />
+ );
};
/**
diff --git a/packages/ui/src/components/panel/panel.stories.tsx b/packages/ui/src/components/panel/panel.stories.tsx
index bd98480d1..3302dcd77 100644
--- a/packages/ui/src/components/panel/panel.stories.tsx
+++ b/packages/ui/src/components/panel/panel.stories.tsx
@@ -35,12 +35,12 @@ type Story = StoryObj;
export const Default: Story = {
args: {
children: [
-
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempora officiis officia omnis aperiam voluptate
suscipit, laudantium praesentium quas consequatur placeat, perferendis eligendi saepe in unde sequi dolores
excepturi doloremque autem! Lorem ipsum dolor sit amet, consectetur adipisicing elit.
,
- Panel footer ,
+ Panel footer ,
],
},
};
@@ -52,12 +52,12 @@ export const FaintLook: Story = {
args: {
look: 'faint',
children: [
-
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempora officiis officia omnis aperiam voluptate
suscipit, laudantium praesentium quas consequatur placeat, perferendis eligendi saepe in unde sequi dolores
excepturi doloremque autem! Lorem ipsum dolor sit amet, consectetur adipisicing elit.
,
- Panel footer ,
+ Panel footer ,
],
},
};
@@ -68,7 +68,7 @@ export const FaintLook: Story = {
export const WithTable: Story = {
args: {
children: [
-
+
Caption this table width is: (100%)
@@ -113,12 +113,12 @@ export const WithTable: Story = {
export const WithTableAndBody: Story = {
args: {
children: [
-
+
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Tempora officiis officia omnis aperiam voluptate
suscipit, laudantium praesentium quas consequatur placeat, perferendis eligendi saepe in unde sequi dolores
excepturi doloremque autem! Lorem ipsum dolor sit amet, consectetur adipisicing elit.
,
-
+
Caption this table width is: (100%)
@@ -153,7 +153,7 @@ export const WithTableAndBody: Story = {
Footer goes here and should colSpan all columns
,
- Panel footer ,
+ Panel footer ,
],
},
};
diff --git a/packages/ui/src/components/pass-code-view/pass-code-view.types.ts b/packages/ui/src/components/pass-code-view/pass-code-view.types.ts
index 85305e155..9751f3e2d 100644
--- a/packages/ui/src/components/pass-code-view/pass-code-view.types.ts
+++ b/packages/ui/src/components/pass-code-view/pass-code-view.types.ts
@@ -33,11 +33,11 @@ export type PassCodeViewProps = {
/**
* on click the resend button
*/
- onResend?: () => any;
+ onResend?: () => void;
/**
* on click the update button
*/
- onUpdate?: () => any;
+ onUpdate?: () => void;
/**
* length of the passcode
*/
diff --git a/packages/ui/src/components/pass-code/pass-code.component.tsx b/packages/ui/src/components/pass-code/pass-code.component.tsx
index 3528ddfcf..dbcd78ebf 100644
--- a/packages/ui/src/components/pass-code/pass-code.component.tsx
+++ b/packages/ui/src/components/pass-code/pass-code.component.tsx
@@ -31,7 +31,7 @@ export function PassCode({ length, onComplete, className, ...props }: PassCodePr
onComplete(newPasscode.join(''));
}
},
- [onComplete, inputRefs, passcode],
+ [passcode, length, onComplete],
);
const handlePaste = useCallback(
@@ -47,7 +47,7 @@ export function PassCode({ length, onComplete, className, ...props }: PassCodePr
onComplete(newPasscode.join(''));
}
},
- [passcode],
+ [length, onComplete, passcode],
);
const handleKeyDown = useCallback(
@@ -66,7 +66,7 @@ export function PassCode({ length, onComplete, className, ...props }: PassCodePr
}
}
},
- [inputRefs],
+ [passcode],
);
const handleFocus = useCallback(
diff --git a/packages/ui/src/components/pass-code/pass-code.spec.tsx b/packages/ui/src/components/pass-code/pass-code.spec.tsx
index 6f2760a12..fc99db2f8 100644
--- a/packages/ui/src/components/pass-code/pass-code.spec.tsx
+++ b/packages/ui/src/components/pass-code/pass-code.spec.tsx
@@ -17,7 +17,7 @@ describe('PassCode', () => {
const { container } = render(
{
+ onComplete={() => {
throw new Error('Function not implemented.');
}}
/>,
diff --git a/packages/ui/src/components/popover/components/panel/panel.component.tsx b/packages/ui/src/components/popover/components/panel/panel.component.tsx
index 81b83444d..a33a5f6c5 100644
--- a/packages/ui/src/components/popover/components/panel/panel.component.tsx
+++ b/packages/ui/src/components/popover/components/panel/panel.component.tsx
@@ -3,7 +3,7 @@ import { FocusScope } from 'react-aria';
import { Button } from '../../../button/index.js';
import { CloseIcon } from '../../../icon/index.js';
-import { usePopoverPosition } from '../../popover.hooks.js';
+import { getPopoverPosition } from '../../popover.utils.js';
import { styles as panelStyles } from './panel.styles.js';
import { type PanelProps, Position } from './panel.types.js';
@@ -29,8 +29,8 @@ export function Panel({ state, heading, headingTag: Tag = 'h1', content, placeme
});
useLayoutEffect(() => {
- setPosition(usePopoverPosition(triggerRef, popoverRef, arrowRef, placement));
- }, [state.isOpen]);
+ setPosition(getPopoverPosition(triggerRef, popoverRef, arrowRef, placement));
+ }, [placement, remSize, state.isOpen, triggerRef]);
const getPopoverClass = useCallback(() => {
return {
diff --git a/packages/ui/src/components/popover/popover.component.tsx b/packages/ui/src/components/popover/popover.component.tsx
index dd7c2dceb..f274bb4c5 100644
--- a/packages/ui/src/components/popover/popover.component.tsx
+++ b/packages/ui/src/components/popover/popover.component.tsx
@@ -30,18 +30,18 @@ export function Popover({
const state = useOverlayTriggerState({});
const panelId = useId();
const styles = popoverStyles({});
- const ref = useRef(null);
+ const ref = useRef(null);
const handleClick = useCallback(() => {
onClick();
state.toggle();
- }, [onClick, state.isOpen]);
+ }, [onClick, state]);
const keyHandler = useCallback(
(event: globalThis.KeyboardEvent) => {
if (state.isOpen && event.key === 'Escape') state.close();
},
- [state.isOpen],
+ [state],
);
useEffect(() => {
@@ -49,11 +49,11 @@ export function Popover({
return () => {
window.document.removeEventListener('keydown', keyHandler);
};
- }, [state.isOpen]);
+ }, [keyHandler, state.isOpen]);
useLayoutEffect(() => {
if (open) state.setOpen(true);
- }, [open]);
+ }, [open, state]);
return (
,
popoverRef: RefObject,
arrowRef: RefObject,
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 64238b852..c213a7e09 100644
--- a/packages/ui/src/components/progress-indicator/progress-indicator.stories.tsx
+++ b/packages/ui/src/components/progress-indicator/progress-indicator.stories.tsx
@@ -30,7 +30,7 @@ export const Sizes = () => {
return (
<>
{(['xsmall', 'small', 'medium', 'large', 'xlarge'] as const).map(size => (
-
+
))}
>
);
@@ -44,7 +44,7 @@ export const Inverted = () => {
return (
{(['xsmall', 'small', 'medium', 'large', 'xlarge'] as const).map(size => (
-
+
))}
);
diff --git a/packages/ui/src/components/progress-rope/components/progress-rope-step/progress-rope-step.component.tsx b/packages/ui/src/components/progress-rope/components/progress-rope-step/progress-rope-step.component.tsx
index c008c0a0c..fe2b5d466 100644
--- a/packages/ui/src/components/progress-rope/components/progress-rope-step/progress-rope-step.component.tsx
+++ b/packages/ui/src/components/progress-rope/components/progress-rope-step/progress-rope-step.component.tsx
@@ -14,7 +14,6 @@ export function ProgressRopeStep({
current,
visited,
tag: Tag = 'button',
- type,
size = 'medium',
children,
firstItem,
@@ -41,7 +40,7 @@ export function ProgressRopeStep({
return 'visited';
}
return 'non-visited';
- }, [current, visited]);
+ }, [current, lastItemInRope, visited]);
const { isFocusVisible, focusProps } = useFocusRing();
const styles = progressRopeStyles({
@@ -65,7 +64,7 @@ export function ProgressRopeStep({
return ', complete';
}
return ', not started';
- }, [current, visited]);
+ }, [current, furthest, visited]);
return (
&
+} & Omit &
HTMLAttributes;
diff --git a/packages/ui/src/components/progress-rope/progress-rope.component.tsx b/packages/ui/src/components/progress-rope/progress-rope.component.tsx
index 01263b0ed..ff16cf3c9 100644
--- a/packages/ui/src/components/progress-rope/progress-rope.component.tsx
+++ b/packages/ui/src/components/progress-rope/progress-rope.component.tsx
@@ -68,7 +68,7 @@ export function ProgressRope({
if (newGroupStepIndex !== openedGroupStepIndex) {
setOpenedGroupStepIndex(newGroupStepIndex);
}
- }, [current]);
+ }, [current, mappedData, openedGroupStepIndex]);
return (
@@ -92,7 +92,6 @@ export function ProgressRope({
) : (
= item.index ? item.onClick : undefined}
visited={furthestVisitedStep > item.index}
furthest={furthestVisitedStep === item.index}
diff --git a/packages/ui/src/components/progress-rope/progress-rope.stories.tsx b/packages/ui/src/components/progress-rope/progress-rope.stories.tsx
index f299b640b..437f2914e 100644
--- a/packages/ui/src/components/progress-rope/progress-rope.stories.tsx
+++ b/packages/ui/src/components/progress-rope/progress-rope.stories.tsx
@@ -1,4 +1,4 @@
-import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
+import { type Meta, StoryFn } from '@storybook/react';
import { useCallback, useState } from 'react';
import { ArrowLeftIcon, ArrowRightIcon } from '../icon/index.js';
@@ -15,130 +15,123 @@ const meta: Meta = {
};
export default meta;
-type Story = StoryObj;
/**
* > Default usage example
*/
-export const Default: Story = {
- args: {},
- render: () => {
- const [activeIndex, setActiveIndex] = useState(0);
- const handleClick = useCallback(
- (index: number) => () => {
- setActiveIndex(index);
- },
- [],
- );
- const PROGRESS_ROPE_DATA: ProgressRopeProps['data'] = [
- { text: Step 1
, onClick: handleClick(0) },
- { text: Step 2
, onClick: handleClick(1) },
- { text: Step 3
, onClick: handleClick(2) },
- { text: Step 4
, onClick: handleClick(3) },
- { text: Step 5
, onClick: handleClick(4) },
- { text: Review and Submit
, onClick: handleClick(5) },
- ];
+export const Default = () => {
+ const [activeIndex, setActiveIndex] = useState(0);
+ const handleClick = useCallback(
+ (index: number) => () => {
+ setActiveIndex(index);
+ },
+ [],
+ );
+ const PROGRESS_ROPE_DATA: ProgressRopeProps['data'] = [
+ { text: Step 1
, onClick: handleClick(0) },
+ { text: Step 2
, onClick: handleClick(1) },
+ { text: Step 3
, onClick: handleClick(2) },
+ { text: Step 4
, onClick: handleClick(3) },
+ { text: Step 5
, onClick: handleClick(4) },
+ { text: Review and Submit
, onClick: handleClick(5) },
+ ];
- return (
-
-
-
-
- setActiveIndex(state => --state)}
- >
- prev
- {' '}
- setActiveIndex(state => ++state)}
- >
- next
-
-
- Current: {activeIndex}
-
-
- );
- },
+ return (
+
+
+
+
+ setActiveIndex(state => --state)}
+ >
+ prev
+ {' '}
+ setActiveIndex(state => ++state)}
+ >
+ next
+
+
+ Current: {activeIndex}
+
+
+ );
};
/**
* > Grouping steps story usage example
*/
-export const GroupingSteps: Story = {
- args: {},
- render: () => {
- const [activeIndex, setActiveIndex] = useState(0);
- const handleClick = useCallback(
- (index: number) => () => {
- setActiveIndex(index);
- },
- [],
- );
- const PROGRESS_ROPE_DATA: ProgressRopeProps['data'] = [
- {
- type: 'group',
- text: 'Group 1',
- steps: [
- { text: 'Step 1', onClick: handleClick(0) },
- { text: 'Step 2', onClick: handleClick(1) },
- ],
- },
- {
- type: 'group',
- text: 'Group 2',
- steps: [
- { text: 'Step 3', onClick: handleClick(2) },
- { text: 'Step 4', onClick: handleClick(3) },
- ],
- },
- {
- type: 'group',
- text: 'Group 3',
- steps: [
- { text: 'Step 5', onClick: handleClick(4) },
- { text: 'Step 6', onClick: handleClick(5) },
- { text: 'Step 7', onClick: handleClick(6) },
- ],
- },
- { text: 'Review and Submit', onClick: handleClick(7) },
- ];
+export const GroupingSteps = () => {
+ const [activeIndex, setActiveIndex] = useState(0);
+ const handleClick = useCallback(
+ (index: number) => () => {
+ setActiveIndex(index);
+ },
+ [],
+ );
+ const PROGRESS_ROPE_DATA: ProgressRopeProps['data'] = [
+ {
+ type: 'group',
+ text: 'Group 1',
+ steps: [
+ { text: 'Step 1', onClick: handleClick(0) },
+ { text: 'Step 2', onClick: handleClick(1) },
+ ],
+ },
+ {
+ type: 'group',
+ text: 'Group 2',
+ steps: [
+ { text: 'Step 3', onClick: handleClick(2) },
+ { text: 'Step 4', onClick: handleClick(3) },
+ ],
+ },
+ {
+ type: 'group',
+ text: 'Group 3',
+ steps: [
+ { text: 'Step 5', onClick: handleClick(4) },
+ { text: 'Step 6', onClick: handleClick(5) },
+ { text: 'Step 7', onClick: handleClick(6) },
+ ],
+ },
+ { text: 'Review and Submit', onClick: handleClick(7) },
+ ];
- return (
-
-
-
-
- setActiveIndex(state => --state)}
- >
- prev
- {' '}
- setActiveIndex(state => ++state)}
- >
- next
-
-
- Current: {activeIndex}
-
-
- );
- },
+ return (
+
+
+
+
+ setActiveIndex(state => --state)}
+ >
+ prev
+ {' '}
+ setActiveIndex(state => ++state)}
+ >
+ next
+
+
+ Current: {activeIndex}
+
+
+ );
};
diff --git a/packages/ui/src/components/radio-group/components/radio-group-radio/radio-group-radio.component.tsx b/packages/ui/src/components/radio-group/components/radio-group-radio/radio-group-radio.component.tsx
index cfb6efad3..629825e41 100644
--- a/packages/ui/src/components/radio-group/components/radio-group-radio/radio-group-radio.component.tsx
+++ b/packages/ui/src/components/radio-group/components/radio-group-radio/radio-group-radio.component.tsx
@@ -1,6 +1,6 @@
'use client';
-import React, { forwardRef, useContext, useRef } from 'react';
+import React, { Ref, forwardRef, useContext, useRef } from 'react';
import { VisuallyHidden, useFocusRing, useRadio } from 'react-aria';
import { RadioGroupContext } from '../../radio-group.component.js';
@@ -8,7 +8,7 @@ import { RadioGroupContext } from '../../radio-group.component.js';
import { styles as radioStyles } from './radio-group-radio.styles.js';
import { type RadioGroupRadioProps } from './radio-group-radio.types.js';
-function BaseRadioGroupRadio({ className, hint, label, ...props }: RadioGroupRadioProps, ref: any) {
+function BaseRadioGroupRadio({ className, hint, label, ...props }: RadioGroupRadioProps, ref: Ref) {
const { state, size, orientation } = useContext(RadioGroupContext);
const localRef = useRef(null);
const { inputProps, isSelected, isDisabled } = useRadio({ ...props, children: label }, state, localRef);
diff --git a/packages/ui/src/components/radio-group/radio-group.component.tsx b/packages/ui/src/components/radio-group/radio-group.component.tsx
index 4ee172620..2b643387c 100644
--- a/packages/ui/src/components/radio-group/radio-group.component.tsx
+++ b/packages/ui/src/components/radio-group/radio-group.component.tsx
@@ -90,7 +90,7 @@ export function RadioGroup({
);
const { isFocusVisible, focusProps } = useFocusRing();
const [hiddenOptions, setHiddenOptions] = useState(showAmount > 0);
- const firstNewRadioRef = useRef(null);
+ const firstNewRadioRef = useRef(null);
const revealAmount = radios && radios.length - showAmount;
const styles = radioGroupStyles({ orientation, isFocusVisible });
const panelId = useId();
@@ -112,9 +112,7 @@ export function RadioGroup({
{label}
{hintMessage &&
{hintMessage} }
- {errorMessage && state.validationState === 'invalid' && (
-
- )}
+ {errorMessage && state.isInvalid &&
}
{childrenToRender}
{hiddenOptions && (
diff --git a/packages/ui/src/components/select/select.spec.tsx b/packages/ui/src/components/select/select.spec.tsx
index 4b076742c..817367c76 100644
--- a/packages/ui/src/components/select/select.spec.tsx
+++ b/packages/ui/src/components/select/select.spec.tsx
@@ -12,7 +12,7 @@ describe('Select', () => {
const style = styles({ size: 'medium' });
// TODO: use some variants for test
expect(style).toBe(
- 'form-control bg-no-repeat select-caret disabled:form-control-disabled group-[.add-on-after]:!rounded-r group-[.add-on-after]:rounded-l-none group-[.add-on-before]:!rounded-l group-[.add-on-before]:rounded-r-none group-[.input-group-after]:rounded-r-none group-[.input-group-before]:rounded-l-none group-[.add-on-after]:!border-x group-[.add-on-before]:!border-x group-[.input-group-after]:border-r-0 group-[.input-group-before]:border-l-0 form-control-medium bg-[right_0.75rem_center] pr-[calc(0.5rem+14px+0.75rem)]',
+ 'form-control bg-no-repeat select-caret disabled:form-control-disabled group-first/add-on-before:!rounded-l group-first/add-on-before:rounded-r-none group-first/add-on-before:!border-x group-last/add-on-after:!rounded-r group-last/add-on-after:rounded-l-none group-last/add-on-after:!border-x group-[.input-group-after]:rounded-r-none group-[.input-group-before]:rounded-l-none group-[.input-group-after]:border-r-0 group-[.input-group-before]:border-l-0 form-control-medium bg-[right_0.75rem_center] pr-[calc(0.5rem+14px+0.75rem)]',
);
});
});
diff --git a/packages/ui/src/components/select/select.styles.ts b/packages/ui/src/components/select/select.styles.ts
index 8b8a862b9..9bd85e1cf 100644
--- a/packages/ui/src/components/select/select.styles.ts
+++ b/packages/ui/src/components/select/select.styles.ts
@@ -2,7 +2,7 @@ import { tv } from 'tailwind-variants';
export const styles = tv(
{
- base: 'form-control bg-no-repeat select-caret disabled:form-control-disabled group-[.add-on-after]:!rounded-r group-[.add-on-after]:rounded-l-none group-[.add-on-before]:!rounded-l group-[.add-on-before]:rounded-r-none group-[.input-group-after]:rounded-r-none group-[.input-group-before]:rounded-l-none group-[.add-on-after]:!border-x group-[.add-on-before]:!border-x group-[.input-group-after]:border-r-0 group-[.input-group-before]:border-l-0',
+ base: 'form-control bg-no-repeat select-caret disabled:form-control-disabled group-first/add-on-before:!rounded-l group-first/add-on-before:rounded-r-none group-first/add-on-before:!border-x group-last/add-on-after:!rounded-r group-last/add-on-after:rounded-l-none group-last/add-on-after:!border-x group-[.input-group-after]:rounded-r-none group-[.input-group-before]:rounded-l-none group-[.input-group-after]:border-r-0 group-[.input-group-before]:border-l-0',
variants: {
size: {
small: 'form-control-small bg-[right_0.5625rem_center] pr-[calc(0.5rem+14px+0.5625rem)]',
diff --git a/packages/ui/src/components/selector/components/selector-button-group/components/selector-button-group-option/selector-button-group-option.component.tsx b/packages/ui/src/components/selector/components/selector-button-group/components/selector-button-group-option/selector-button-group-option.component.tsx
index e5495ab4e..11fea8e83 100644
--- a/packages/ui/src/components/selector/components/selector-button-group/components/selector-button-group-option/selector-button-group-option.component.tsx
+++ b/packages/ui/src/components/selector/components/selector-button-group/components/selector-button-group-option/selector-button-group-option.component.tsx
@@ -1,4 +1,4 @@
-import React, { MouseEventHandler, forwardRef, useCallback, useContext } from 'react';
+import React, { MouseEventHandler, Ref, forwardRef, useCallback, useContext } from 'react';
import { mergeProps, useFocusRing } from 'react-aria';
import { FlexiCell } from '../../../../../../index.js';
@@ -21,7 +21,7 @@ function BaseSelectorButtonGroupOption(
id,
...props
}: SelectorButtonGroupOptionProps,
- ref: any,
+ ref: Ref
,
) {
const state = useContext(SelectorButtonContext);
const { isFocusVisible, focusProps } = useFocusRing();
@@ -36,7 +36,7 @@ function BaseSelectorButtonGroupOption(
onClick(event);
state.onClick(id);
},
- [onClick, state.onClick],
+ [id, onClick, state],
);
return (
{
setSelected(id);
},
- [selected, setSelected],
+ [setSelected],
);
const state: SelectorButtonGroupContextState = useMemo(
@@ -42,7 +42,7 @@ export function SelectorButtonGroup({
validationState: errorMessage ? 'invalid' : 'valid',
isDisabled,
}),
- [selected],
+ [errorMessage, handleChange, isDisabled, selected],
);
const { labelProps, fieldProps, descriptionProps, errorMessageProps } = useField({
diff --git a/packages/ui/src/components/selector/components/selector-checkbox-group/components/selector-checkbox-group-option/selector-checkbox-group-option.component.tsx b/packages/ui/src/components/selector/components/selector-checkbox-group/components/selector-checkbox-group-option/selector-checkbox-group-option.component.tsx
index 7b6113988..427772ad8 100644
--- a/packages/ui/src/components/selector/components/selector-checkbox-group/components/selector-checkbox-group-option/selector-checkbox-group-option.component.tsx
+++ b/packages/ui/src/components/selector/components/selector-checkbox-group/components/selector-checkbox-group-option/selector-checkbox-group-option.component.tsx
@@ -1,6 +1,6 @@
'use client';
-import React, { forwardRef, useContext, useRef } from 'react';
+import React, { Ref, forwardRef, useContext, useRef } from 'react';
import { VisuallyHidden, mergeProps, useCheckboxGroupItem, useFocusRing } from 'react-aria';
import { ArrowRightIcon, TickIcon } from '../../../../../../components/icon/index.js';
@@ -22,7 +22,7 @@ function BaseSelectorCheckboxGroupOption(
checkIcon = 'checkbox',
...props
}: SelectorCheckboxGroupOptionProps,
- ref: any,
+ ref: Ref,
) {
const state = useContext(SelectorCheckboxGroupContext);
const localRef = useRef(null);
diff --git a/packages/ui/src/components/selector/components/selector-checkbox-group/selector-checkbox-group.component.tsx b/packages/ui/src/components/selector/components/selector-checkbox-group/selector-checkbox-group.component.tsx
index e77429b76..f260028f4 100644
--- a/packages/ui/src/components/selector/components/selector-checkbox-group/selector-checkbox-group.component.tsx
+++ b/packages/ui/src/components/selector/components/selector-checkbox-group/selector-checkbox-group.component.tsx
@@ -82,9 +82,7 @@ export function SelectorCheckboxGroup(props: SelectorCheckboxGroupProps) {
<>
{label && {label} }
{description && {description} }
- {errorMessage && state.validationState === 'invalid' && (
-
- )}
+ {errorMessage && state.isInvalid && }
{children}
diff --git a/packages/ui/src/components/selector/components/selector-link-group/components/selector-link-group-option/selector-link-group-option.component.tsx b/packages/ui/src/components/selector/components/selector-link-group/components/selector-link-group-option/selector-link-group-option.component.tsx
index 9098e85d4..514e5eed4 100644
--- a/packages/ui/src/components/selector/components/selector-link-group/components/selector-link-group-option/selector-link-group-option.component.tsx
+++ b/packages/ui/src/components/selector/components/selector-link-group/components/selector-link-group-option/selector-link-group-option.component.tsx
@@ -1,6 +1,6 @@
'use client';
-import React, { forwardRef, useContext, useId, useRef } from 'react';
+import React, { Ref, RefObject, forwardRef, useContext, useId, useRef } from 'react';
import { mergeProps, useFocusRing, useLink } from 'react-aria';
import { FlexiCell } from '../../../../../../index.js';
@@ -22,12 +22,12 @@ function BaseSelectorLinkGroupOption(
href,
...props
}: SelectorLinkGroupOptionProps,
- ref: any,
+ ref: Ref,
) {
const id = useId();
const localRef = useRef(ref);
const state = useContext(SelectorLinkContext);
- const { linkProps } = useLink({ ...props }, localRef);
+ const { linkProps } = useLink({ ...props }, localRef as RefObject);
const { isFocusVisible, focusProps } = useFocusRing();
const styles = SelectorLinkGroupOptionStyles({
className,
diff --git a/packages/ui/src/components/selector/components/selector-radio-group/components/selector-radio-group-option/selector-radio-group-option.component.tsx b/packages/ui/src/components/selector/components/selector-radio-group/components/selector-radio-group-option/selector-radio-group-option.component.tsx
index aa8e52eb3..de64ec729 100644
--- a/packages/ui/src/components/selector/components/selector-radio-group/components/selector-radio-group-option/selector-radio-group-option.component.tsx
+++ b/packages/ui/src/components/selector/components/selector-radio-group/components/selector-radio-group-option/selector-radio-group-option.component.tsx
@@ -1,6 +1,6 @@
'use client';
-import React, { forwardRef, useContext, useRef } from 'react';
+import React, { Ref, forwardRef, useContext, useRef } from 'react';
import { VisuallyHidden, mergeProps, useFocusRing, useRadio } from 'react-aria';
import { ArrowRightIcon, TickIcon } from '../../../../../../components/icon/index.js';
@@ -22,7 +22,7 @@ function BaseSelectorRadioGroupOption(
checkIcon = 'checkbox',
...props
}: SelectorRadioGroupOptionProps,
- ref: any,
+ ref: Ref,
) {
const { state } = useContext(SelectorRadioGroupContext);
const localRef = useRef(null);
diff --git a/packages/ui/src/components/selector/components/selector-radio-group/selector-radio-group.component.tsx b/packages/ui/src/components/selector/components/selector-radio-group/selector-radio-group.component.tsx
index fd66011c3..eaae2c5af 100644
--- a/packages/ui/src/components/selector/components/selector-radio-group/selector-radio-group.component.tsx
+++ b/packages/ui/src/components/selector/components/selector-radio-group/selector-radio-group.component.tsx
@@ -89,9 +89,7 @@ export function SelectorRadioGroup({
<>
{label && {label} }
{description && {description} }
- {errorMessage && state.validationState === 'invalid' && (
-
- )}
+ {errorMessage && state.isInvalid && }
{children}
diff --git a/packages/ui/src/components/skip-link/skip-link.component.tsx b/packages/ui/src/components/skip-link/skip-link.component.tsx
index fd9db4a3e..d33977906 100644
--- a/packages/ui/src/components/skip-link/skip-link.component.tsx
+++ b/packages/ui/src/components/skip-link/skip-link.component.tsx
@@ -1,13 +1,13 @@
'use client';
-import React, { forwardRef } from 'react';
+import React, { Ref, forwardRef } from 'react';
import { styles } from './skip-link.styles.js';
import { type SkipLinkProps } from './skip-link.types.js';
-function BaseSkipLink({ className, tag: Tag = 'a', children, ...props }: SkipLinkProps, ref: any) {
+function BaseSkipLink({ className, tag: Tag = 'a', children, ...props }: SkipLinkProps, ref: Ref) {
return (
-
+
{children}
);
diff --git a/packages/ui/src/components/skip-link/skip-link.stories.tsx b/packages/ui/src/components/skip-link/skip-link.stories.tsx
index 7a31e2ad9..4176a67e2 100644
--- a/packages/ui/src/components/skip-link/skip-link.stories.tsx
+++ b/packages/ui/src/components/skip-link/skip-link.stories.tsx
@@ -1,4 +1,4 @@
-import { type Meta, StoryFn, type StoryObj } from '@storybook/react';
+import { type Meta, StoryFn } from '@storybook/react';
import { useRef } from 'react';
import { Button } from '../index.js';
@@ -18,7 +18,7 @@ export default meta;
* > Default usage example
*/
export const Default = () => {
- const skipLinkRef = useRef();
+ const skipLinkRef = useRef(null);
return (
<>
diff --git a/packages/ui/src/components/tabs/components/tabs-tab-panel/tabs-tab-panel.types.ts b/packages/ui/src/components/tabs/components/tabs-tab-panel/tabs-tab-panel.types.ts
index 2158cf7d2..ebd79c392 100644
--- a/packages/ui/src/components/tabs/components/tabs-tab-panel/tabs-tab-panel.types.ts
+++ b/packages/ui/src/components/tabs/components/tabs-tab-panel/tabs-tab-panel.types.ts
@@ -7,7 +7,7 @@ import { styles } from './tabs-tab-panel.styles.js';
type Variants = VariantProps;
-export type TabsTabPanelProps = {
+export type TabsTabPanelProps = {
/**
* Table panel content
*/
diff --git a/packages/ui/src/components/tabs/components/tabs-tab/tabs-tab.component.tsx b/packages/ui/src/components/tabs/components/tabs-tab/tabs-tab.component.tsx
index 11b10157f..1aacc6e3e 100644
--- a/packages/ui/src/components/tabs/components/tabs-tab/tabs-tab.component.tsx
+++ b/packages/ui/src/components/tabs/components/tabs-tab/tabs-tab.component.tsx
@@ -1,12 +1,12 @@
import React, { useRef } from 'react';
-import { mergeProps, useFocusRing, useTab } from 'react-aria';
+import { Key, mergeProps, useFocusRing, useTab } from 'react-aria';
import { styles } from './tabs-tab.styles.js';
import { type TabsTabProps } from './tabs-tab.types.js';
export function TabsTab({ item: { key, rendered }, state, orientation, justify, color, look }: TabsTabProps) {
const ref = useRef(null);
- const { tabProps } = useTab({ key: key as any }, state, ref);
+ const { tabProps } = useTab({ key: key as Key }, state, ref);
const { isFocusVisible, focusProps } = useFocusRing();
return (
;
-export type TabsTabProps
= {
+export type TabsTabProps = {
/**
* Color of tab
*/
diff --git a/packages/ui/src/components/tabs/tabs.component.tsx b/packages/ui/src/components/tabs/tabs.component.tsx
index 0a1135dab..e7961daef 100644
--- a/packages/ui/src/components/tabs/tabs.component.tsx
+++ b/packages/ui/src/components/tabs/tabs.component.tsx
@@ -1,7 +1,7 @@
'use client';
import React, { useRef } from 'react';
-import { AriaLinkOptions, useTabList } from 'react-aria';
+import { AriaLinkOptions, Key, useTabList } from 'react-aria';
import { Item, ItemProps, useTabListState } from 'react-stately';
import { TabsTab, TabsTabPanel } from './components/index.js';
@@ -24,9 +24,9 @@ export function Tabs({
}: TabsProps) {
const state = useTabListState({
...props,
- disabledKeys: disabledKeys as any,
- selectedKey: selectedKey as any,
- defaultSelectedKey: defaultSelectedKey as any,
+ disabledKeys: disabledKeys as Iterable,
+ selectedKey: selectedKey as Key,
+ defaultSelectedKey: defaultSelectedKey as Key,
children,
});
const styles = tabStyles({ orientation, look, sticky });
@@ -35,9 +35,9 @@ export function Tabs({
const { tabListProps } = useTabList(
{
...props,
- disabledKeys: disabledKeys as any,
- selectedKey: selectedKey as any,
- defaultSelectedKey: defaultSelectedKey as any,
+ disabledKeys: disabledKeys as Iterable,
+ selectedKey: selectedKey as Key,
+ defaultSelectedKey: defaultSelectedKey as Key,
orientation,
},
state,
diff --git a/packages/ui/src/components/tabs/tabs.types.ts b/packages/ui/src/components/tabs/tabs.types.ts
index 6f32e4367..c2b146a33 100644
--- a/packages/ui/src/components/tabs/tabs.types.ts
+++ b/packages/ui/src/components/tabs/tabs.types.ts
@@ -7,7 +7,7 @@ import { styles } from './tabs.styles.js';
type Variants = VariantProps;
-export type TabsProps = SpectrumTabsProps & {
+export type TabsProps = SpectrumTabsProps & {
/**
* Children
*/
diff --git a/packages/ui/src/components/well/well.stories.tsx b/packages/ui/src/components/well/well.stories.tsx
index b6fa65b91..58cd65432 100644
--- a/packages/ui/src/components/well/well.stories.tsx
+++ b/packages/ui/src/components/well/well.stories.tsx
@@ -36,7 +36,7 @@ export const Nested: Story = {
};
/**
- * > Tag as
+ * > Tag as ``
*/
export const CustomTag: Story = {
args: {
@@ -46,7 +46,7 @@ export const CustomTag: Story = {
};
/**
- * > Nested tag as
+ * > Nested tag as ``
*/
export const CustomTagNested: Story = {
args: {
@@ -61,11 +61,11 @@ export const CustomTagNested: Story = {
};
/**
- * > Tag as with child , passed as a component
+ * > Tag as `` with child ``, passed as a component
*/
export const ComplexCustomTagNested: Story = {
args: {
tag: 'aside',
- children: Look, I'm in a well ,
+ children: Look, I'm in a well ,
},
};
diff --git a/packages/ui/src/stories/foundation/colours.stories.tsx b/packages/ui/src/stories/foundation/colours.stories.tsx
index 119abfb26..1f34937a4 100644
--- a/packages/ui/src/stories/foundation/colours.stories.tsx
+++ b/packages/ui/src/stories/foundation/colours.stories.tsx
@@ -20,6 +20,7 @@ export default meta;
type Story = StoryObj;
// NOTE: Although unused this needs to be here so all colors load correctly
+// eslint-disable-next-line @typescript-eslint/no-unused-vars
const LOAD_COLORS = {
background: [
'bg-background',
@@ -291,6 +292,8 @@ export const BrandColors: Story = {
'text',
];
const TINTS = ['DEFAULT', 90, 80, 70, 60, 50, 40, 30, 20, 10, 5];
+ // NOTE: Below is ignored as we need global theme value from render
+ // eslint-disable-next-line react-hooks/rules-of-hooks
const [selectedTint, setSelectedTint] = useState('DEFAULT');
const tintString = selectedTint !== 'DEFAULT' ? `-${selectedTint}` : '';
@@ -310,6 +313,8 @@ export const BrandColors: Story = {
{brandColors.map(color => (
+ {/* NOTE: Below disable tailwind classname warning for string interpolation */}
+ {/* eslint-disable-next-line tailwindcss/no-custom-classname */}
{color}
@@ -352,6 +357,8 @@ export const ReservedColors = () => {
{reservedColors.map(color => (
+ {/* NOTE: Below disable tailwind classname warning for string interpolation */}
+ {/* eslint-disable-next-line tailwindcss/no-custom-classname */}
{color}
@@ -419,8 +426,10 @@ export const DataVisualisationColors: Story = {
<>
{dataVisSolidColors.map(color => (
-
+
+ {/* NOTE: Below disable tailwind classname warning for string interpolation */}
+ {/* eslint-disable-next-line tailwindcss/no-custom-classname */}