diff --git a/packages/core/stories/accordion/accordion.qa.stories.tsx b/packages/core/stories/accordion/accordion.qa.stories.tsx index 623395a2c14..b5465566c61 100644 --- a/packages/core/stories/accordion/accordion.qa.stories.tsx +++ b/packages/core/stories/accordion/accordion.qa.stories.tsx @@ -12,7 +12,7 @@ import { Meta, StoryFn } from "@storybook/react"; import { QAContainer, QAContainerProps } from "docs/components"; export default { - title: "Core/Accordion/QA", + title: "Core/Accordion/Accordion QA", component: Accordion, } as Meta; diff --git a/packages/core/stories/avatar/avatar.qa.stories.tsx b/packages/core/stories/avatar/avatar.qa.stories.tsx new file mode 100644 index 00000000000..c09d975450c --- /dev/null +++ b/packages/core/stories/avatar/avatar.qa.stories.tsx @@ -0,0 +1,21 @@ +import { Avatar } from "@salt-ds/core"; +import { Meta, StoryFn } from "@storybook/react"; +import { QAContainer, QAContainerProps } from "docs/components"; +import persona1 from "../assets/avatar.png"; + +export default { + title: "Core/Avatar/Avatar QA", + component: Avatar, +} as Meta; + +export const AllVariantsGrid: StoryFn = (props) => ( + + + + + +); + +AllVariantsGrid.parameters = { + chromatic: { disableSnapshot: false }, +}; diff --git a/packages/core/stories/banner/banner.qa.stories.tsx b/packages/core/stories/banner/banner.qa.stories.tsx index d16f29d4dd1..095bb3f86dc 100644 --- a/packages/core/stories/banner/banner.qa.stories.tsx +++ b/packages/core/stories/banner/banner.qa.stories.tsx @@ -13,7 +13,7 @@ import { Meta, StoryFn } from "@storybook/react"; import { CloseIcon } from "@salt-ds/icons"; export default { - title: "Core/Banner/QA", + title: "Core/Banner/Banner QA", component: Banner, } as Meta; diff --git a/packages/core/stories/button/button.qa.stories.tsx b/packages/core/stories/button/button.qa.stories.tsx index 7bb1a6e7a56..ab340c4dd08 100644 --- a/packages/core/stories/button/button.qa.stories.tsx +++ b/packages/core/stories/button/button.qa.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryFn } from "@storybook/react"; import { QAContainer, QAContainerProps } from "docs/components"; export default { - title: "Core/Button/QA", + title: "Core/Button/Button QA", component: Button, // Manually specify onClick action to test Actions panel // react-docgen-typescript-loader doesn't support detecting interface extension diff --git a/packages/core/stories/card/card.qa.stories.tsx b/packages/core/stories/card/card.qa.stories.tsx index fab83c11fca..b492b6fddc3 100644 --- a/packages/core/stories/card/card.qa.stories.tsx +++ b/packages/core/stories/card/card.qa.stories.tsx @@ -3,7 +3,7 @@ import { Meta, StoryFn } from "@storybook/react"; import { QAContainer, QAContainerProps } from "docs/components"; export default { - title: "Core/Card/QA", + title: "Core/Card/Card QA", component: Card, } as Meta; diff --git a/packages/core/stories/checkbox/checkbox.qa.stories.tsx b/packages/core/stories/checkbox/checkbox.qa.stories.tsx index 821e20d433c..571dd91a924 100644 --- a/packages/core/stories/checkbox/checkbox.qa.stories.tsx +++ b/packages/core/stories/checkbox/checkbox.qa.stories.tsx @@ -3,7 +3,7 @@ import { Checkbox, CheckboxGroup, CheckboxGroupProps } from "@salt-ds/core"; import { QAContainer, QAContainerProps } from "docs/components"; export default { - title: "Core/Checkbox/QA", + title: "Core/Checkbox/Checkbox QA", component: Checkbox, } as Meta; diff --git a/packages/core/stories/form-field/form-field.qa.stories.tsx b/packages/core/stories/form-field/form-field.qa.stories.tsx new file mode 100644 index 00000000000..496520ca690 --- /dev/null +++ b/packages/core/stories/form-field/form-field.qa.stories.tsx @@ -0,0 +1,25 @@ +import { FormField, FormFieldLabel, FormFieldHelperText } from "@salt-ds/core"; +import { Meta, StoryFn } from "@storybook/react"; +import { QAContainer, QAContainerProps } from "docs/components"; + +export default { + title: "Core/Form Field/Form Field QA", + component: FormField, +} as Meta; + +export const AllVariantsGrid: StoryFn = (props) => ( + + + Form Field label + Helper text + + + Form Field label + Helper text + + +); + +AllVariantsGrid.parameters = { + chromatic: { disableSnapshot: false }, +}; diff --git a/packages/core/stories/input/input.qa.stories.tsx b/packages/core/stories/input/input.qa.stories.tsx new file mode 100644 index 00000000000..a970e6dc02d --- /dev/null +++ b/packages/core/stories/input/input.qa.stories.tsx @@ -0,0 +1,91 @@ +import { Button, Input, Text } from "@salt-ds/core"; +import { Meta, StoryFn } from "@storybook/react"; +import { QAContainer, QAContainerProps } from "docs/components"; +import { + CloseIcon, + CreditCardIcon, + FilterClearIcon, + FlagIcon, +} from "@salt-ds/icons"; + +export default { + title: "Core/Input/Input QA", + component: Input, +} as Meta; + +export const AllVariantsGrid: StoryFn = (props) => ( + + + + + + } + endAdornment={ + <> + % + + + } + defaultValue={"Static adornments"} + /> + + + + } + endAdornment={ + + } + defaultValue={"Button adornments"} + /> + + + + + + } + endAdornment={ + <> + % + + + } + defaultValue={"Static adornments"} + /> + + + + } + endAdornment={ + + } + defaultValue={"Button adornments"} + /> + + + + + + } + endAdornment={} + defaultValue={"Error with adornments"} + validationStatus="error" + /> + +); + +AllVariantsGrid.parameters = { + chromatic: { disableSnapshot: false }, +}; diff --git a/packages/core/stories/link/link.qa.stories.tsx b/packages/core/stories/link/link.qa.stories.tsx new file mode 100644 index 00000000000..3e62b43720b --- /dev/null +++ b/packages/core/stories/link/link.qa.stories.tsx @@ -0,0 +1,37 @@ +import { Link } from "@salt-ds/core"; +import { Meta, StoryFn } from "@storybook/react"; +import { QAContainer, QAContainerProps } from "docs/components"; + +export default { + title: "Core/Link/Link QA", + component: Link, +} as Meta; + +export const AllVariantsGrid: StoryFn = (props) => ( + + Link + + Link target blank + +
+ + Strong and small truncation example + +
+ + Secondary Link + + + Secondary Link target blank + +
+ + Strong and small truncation example + +
+
+); + +AllVariantsGrid.parameters = { + chromatic: { disableSnapshot: false }, +}; diff --git a/packages/core/stories/multiline-input/multiline-input.qa.stories.tsx b/packages/core/stories/multiline-input/multiline-input.qa.stories.tsx new file mode 100644 index 00000000000..565468bed24 --- /dev/null +++ b/packages/core/stories/multiline-input/multiline-input.qa.stories.tsx @@ -0,0 +1,140 @@ +import { Button, MultilineInput, Text } from "@salt-ds/core"; +import { + FilterClearIcon, + FlagIcon, + HelpSolidIcon, + PinSolidIcon, + SendIcon, +} from "@salt-ds/icons"; +import { Meta, StoryFn } from "@storybook/react"; +import { QAContainer, QAContainerProps } from "docs/components"; + +export default { + title: "Core/Multiline Input/MultilineInput QA", + component: MultilineInput, +} as Meta; + +export const AllVariantsGrid: StoryFn = (props) => ( + + + + + + £} + endAdornment={ + <> + GBP + + + + } + /> + + + + + + + + + £} + endAdornment={ + <> + GBP + + + + } + /> + + + + + } + endAdornment={} + validationStatus="success" + defaultValue="Success" + /> + } + endAdornment={ + <> + % + + + } + validationStatus="error" + defaultValue="Error" + /> + + + } + endAdornment={} + validationStatus="success" + defaultValue="Success bordered" + bordered + /> + } + endAdornment={ + <> + % + + + } + validationStatus="error" + defaultValue="Error bordered" + bordered + /> + + +); + +AllVariantsGrid.parameters = { + chromatic: { disableSnapshot: false }, +}; diff --git a/packages/core/stories/multiline-input/multiline-input.stories.tsx b/packages/core/stories/multiline-input/multiline-input.stories.tsx index ff900943234..4f950a77a94 100644 --- a/packages/core/stories/multiline-input/multiline-input.stories.tsx +++ b/packages/core/stories/multiline-input/multiline-input.stories.tsx @@ -1,5 +1,3 @@ -import clsx from "clsx"; -import { ChangeEvent, useState } from "react"; import { Button, FlowLayout, Label, MultilineInput, Text } from "@salt-ds/core"; import { BankCheckSolidIcon, @@ -13,6 +11,7 @@ import { UserBadgeIcon, } from "@salt-ds/icons"; import { Meta, StoryFn } from "@storybook/react"; +import { ChangeEvent, useState } from "react"; export default { title: "Core/Multiline Input", diff --git a/packages/core/stories/panel/panel.qa.stories.tsx b/packages/core/stories/panel/panel.qa.stories.tsx index 097a6892b8b..b3ddcdd4a46 100644 --- a/packages/core/stories/panel/panel.qa.stories.tsx +++ b/packages/core/stories/panel/panel.qa.stories.tsx @@ -3,7 +3,7 @@ import { Panel } from "@salt-ds/core"; import { QAContainer, QAContainerProps } from "docs/components"; export default { - title: "Core/Panel/QA", + title: "Core/Panel/Panel QA", component: Panel, } as Meta; diff --git a/packages/core/stories/radio-button/radio-button.qa.stories.tsx b/packages/core/stories/radio-button/radio-button.qa.stories.tsx index 58cbb574b16..533e9fa4cbd 100644 --- a/packages/core/stories/radio-button/radio-button.qa.stories.tsx +++ b/packages/core/stories/radio-button/radio-button.qa.stories.tsx @@ -7,7 +7,7 @@ import { Meta, StoryFn } from "@storybook/react"; import { QAContainer, QAContainerProps } from "docs/components"; export default { - title: "Core/Radio Button/QA", + title: "Core/Radio Button/Radio Button QA", component: RadioButton, } as Meta; diff --git a/packages/core/stories/spinner/spinner.qa.stories.css b/packages/core/stories/spinner/spinner.qa.stories.css new file mode 100644 index 00000000000..2ad100ecba5 --- /dev/null +++ b/packages/core/stories/spinner/spinner.qa.stories.css @@ -0,0 +1,3 @@ +.noSpin.saltSpinner .saltSpinner-spinner { + animation: none; +} diff --git a/packages/core/stories/spinner/spinner.qa.stories.tsx b/packages/core/stories/spinner/spinner.qa.stories.tsx new file mode 100644 index 00000000000..d21de1970e9 --- /dev/null +++ b/packages/core/stories/spinner/spinner.qa.stories.tsx @@ -0,0 +1,22 @@ +import { Spinner } from "@salt-ds/core"; +import { Meta, StoryFn } from "@storybook/react"; +import { QAContainer, QAContainerProps } from "docs/components"; +import "./spinner.qa.stories.css"; + +export default { + title: "Core/Spinner/Spinner QA", + component: Spinner, +} as Meta; + +export const AllVariantsGrid: StoryFn = (props) => ( + + + + + + +); + +AllVariantsGrid.parameters = { + chromatic: { disableSnapshot: false }, +}; diff --git a/packages/core/stories/spinner/spinner.stories.tsx b/packages/core/stories/spinner/spinner.stories.tsx index 0ef92b2b69a..05592f51f0b 100644 --- a/packages/core/stories/spinner/spinner.stories.tsx +++ b/packages/core/stories/spinner/spinner.stories.tsx @@ -1,16 +1,8 @@ -import { useEffect, useState } from "react"; -import { - Button, - Card, - GridItem, - FlexLayout, - GridLayout, - H1, - Spinner, -} from "@salt-ds/core"; +import { Button, Card, GridItem, GridLayout, H1, Spinner } from "@salt-ds/core"; import { CoffeeIcon } from "@salt-ds/icons"; import { Meta, StoryFn } from "@storybook/react"; import { AllRenderer } from "docs/components"; +import { useEffect, useState } from "react"; export default { title: "Core/Spinner", diff --git a/packages/core/stories/status-indicator/status-indicator.qa.stories.tsx b/packages/core/stories/status-indicator/status-indicator.qa.stories.tsx new file mode 100644 index 00000000000..91faf852cf3 --- /dev/null +++ b/packages/core/stories/status-indicator/status-indicator.qa.stories.tsx @@ -0,0 +1,26 @@ +import { StatusIndicator } from "@salt-ds/core"; +import { Meta, StoryFn } from "@storybook/react"; +import { QAContainer, QAContainerProps } from "docs/components"; + +export default { + title: "Core/Status Indicator/Status Indicator QA", + component: StatusIndicator, +} as Meta; + +export const AllVariantsGrid: StoryFn = (props) => ( + + + + + + + + + + + +); + +AllVariantsGrid.parameters = { + chromatic: { disableSnapshot: false }, +}; diff --git a/packages/core/stories/switch/switch.qa.stories.tsx b/packages/core/stories/switch/switch.qa.stories.tsx index 90b04cc1158..bef371786a7 100644 --- a/packages/core/stories/switch/switch.qa.stories.tsx +++ b/packages/core/stories/switch/switch.qa.stories.tsx @@ -3,7 +3,7 @@ import { Meta, StoryFn } from "@storybook/react"; import { QAContainer, QAContainerProps } from "docs/components"; export default { - title: "Core/Switch/QA", + title: "Core/Switch/Switch QA", component: Switch, } as Meta; diff --git a/packages/core/stories/text/text.qa.stories.tsx b/packages/core/stories/text/text.qa.stories.tsx new file mode 100644 index 00000000000..04cfd995a69 --- /dev/null +++ b/packages/core/stories/text/text.qa.stories.tsx @@ -0,0 +1,64 @@ +import { + Display1, + Display2, + Display3, + H1, + H2, + H3, + H4, + Label, + Text, +} from "@salt-ds/core"; +import { Meta, StoryFn } from "@storybook/react"; +import { QAContainer, QAContainerProps } from "docs/components"; + +export default { + title: "Core/Text/Text QA", + component: Text, +} as Meta; + +export const AllVariantsGrid: StoryFn = (props) => ( + + + Primary strong and small text + + + Primary disabled strong and small text + + + + Secondary strong and small text + + + Secondary disabled strong and small text + + + Display 1 strong and small text + + + Display 2 strong and small text + + + Display 3 strong and small text + +

+ H1 strong and small text +

+

+ H2 strong and small text +

+

+ H3 strong and small text +

+

+ H4 strong and small text +

+ +
+); + +AllVariantsGrid.parameters = { + chromatic: { disableSnapshot: false }, +}; diff --git a/packages/core/stories/toast/toast.qa.stories.tsx b/packages/core/stories/toast/toast.qa.stories.tsx index 43e309b94bd..6cf68152d17 100644 --- a/packages/core/stories/toast/toast.qa.stories.tsx +++ b/packages/core/stories/toast/toast.qa.stories.tsx @@ -4,7 +4,7 @@ import { QAContainer, QAContainerProps } from "docs/components"; import { CloseIcon } from "@salt-ds/icons"; export default { - title: "Core/Toast/QA", + title: "Core/Toast/Toast QA", component: Toast, } as Meta; diff --git a/packages/core/stories/toggle-button-group/toggle-button-group.qa.stories.tsx b/packages/core/stories/toggle-button-group/toggle-button-group.qa.stories.tsx new file mode 100644 index 00000000000..9fbe905463a --- /dev/null +++ b/packages/core/stories/toggle-button-group/toggle-button-group.qa.stories.tsx @@ -0,0 +1,46 @@ +import { ToggleButton, ToggleButtonGroup } from "@salt-ds/core"; +import { AppSwitcherIcon, FolderClosedIcon, VisibleIcon } from "@salt-ds/icons"; +import { Meta, StoryFn } from "@storybook/react"; +import { QAContainer, QAContainerProps } from "docs/components"; + +export default { + title: "Core/Toggle Button Group/ToggleButton Group QA", + component: ToggleButtonGroup, +} as Meta; + +export const AllVariantsGrid: StoryFn = (props) => ( + + + + + All + + + + Active + + + + Archived + + + + + + All + + + + Active + + + + Archived + + + +); + +AllVariantsGrid.parameters = { + chromatic: { disableSnapshot: false }, +}; diff --git a/packages/core/stories/toggle-button/toggle-button.qa.stories.tsx b/packages/core/stories/toggle-button/toggle-button.qa.stories.tsx new file mode 100644 index 00000000000..3cef8579cbc --- /dev/null +++ b/packages/core/stories/toggle-button/toggle-button.qa.stories.tsx @@ -0,0 +1,34 @@ +import { ToggleButton } from "@salt-ds/core"; +import { Meta, StoryFn } from "@storybook/react"; +import { QAContainer, QAContainerProps } from "docs/components"; +import { FavoriteSolidIcon, HomeIcon } from "@salt-ds/icons"; + +export default { + title: "Core/Toggle Button/Toggle Button QA", + component: ToggleButton, +} as Meta; + +export const AllVariantsGrid: StoryFn = (props) => ( + + + + + AND + + Home + + + + + + AND + + + Home + + +); + +AllVariantsGrid.parameters = { + chromatic: { disableSnapshot: false }, +}; diff --git a/packages/core/stories/tooltip/tooltip.qa.stories.tsx b/packages/core/stories/tooltip/tooltip.qa.stories.tsx index 7c7a37e38a2..76fecf48209 100644 --- a/packages/core/stories/tooltip/tooltip.qa.stories.tsx +++ b/packages/core/stories/tooltip/tooltip.qa.stories.tsx @@ -4,7 +4,7 @@ import { Meta, StoryFn } from "@storybook/react"; import { InfoSolidIcon } from "@salt-ds/icons"; export default { - title: "Core/Tooltip/QA", + title: "Core/Tooltip/Tooltip QA", component: Tooltip, } as Meta;