diff --git a/.changeset/poor-deers-jog.md b/.changeset/poor-deers-jog.md
new file mode 100644
index 00000000000..a845151cc84
--- /dev/null
+++ b/.changeset/poor-deers-jog.md
@@ -0,0 +1,2 @@
+---
+---
diff --git a/.github/issue_template.md b/.github/issue_template.md
index fb1544bb7e7..376ef87d8c4 100644
--- a/.github/issue_template.md
+++ b/.github/issue_template.md
@@ -1,3 +1,3 @@
# PLEASE DO NOT ADD ISSUES HERE.
-We have a dedicated Github Repo for any issues and discussions: https://github.com/cultureamp/kaizen-discourse
\ No newline at end of file
+We have a dedicated Github Repo for any issues and discussions: https://github.com/cultureamp/kaizen-discourse
diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md
index 7c0ec96d8a9..ec50259b421 100644
--- a/.github/pull_request_template.md
+++ b/.github/pull_request_template.md
@@ -1,12 +1,14 @@
## Important: Request PR reviews on Slack
+
Please reach out to the design system team on Slack in `#prod_design_system` for PR reviews. GitHub notifications (e.g. from tagging a person) are not actively monitored.
## Why
+
-
## What
+
diff --git a/.prettierignore b/.prettierignore
index 7e829838221..2db2d063332 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -6,18 +6,24 @@
!*.ts
!*.tsx
!*.js
+!*.cjs
!*.mjs
+!*.md
+!*.mdx
!*.json
!*.yaml
!*.yml
-!*.scss
!*.css
+!*.scss
# Explicitly ignore...
+devbox.lock
pnpm-lock.yaml
+**/CHANGELOG.md
**/node_modules/
/docs/storybook-static/
-/docs/utils/tailwind.css
-/packages/**/dist
-/packages/components/locales
-/packages/design-tokens/css
+/packages/**/dist/
+/packages/components/locales/
+/packages/design-tokens/css/
+/packages/design-tokens/less/
+/packages/design-tokens/sass/
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 62f187563a1..ca0f588073a 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -12,9 +12,9 @@ Before creating an issue, search existing [Issues](https://github.com/cultureamp
To create a new issue for changes to design documentation or missing documentation:
1. Visit [Issues](https://github.com/cultureamp/kaizen-discourse/issues/) and click the "**New issue**" button.
-3. Give the issue a **title** framed as a problem, e.g. "There's no date picker guidance".
-4. Give the issue a **description** that provides enough information that people can act on it without including any sensitive information, e.g. "As a designer, I want to know how to position coach marks because I'm designing an onboarding workflow."
-5. Click **Submit**. Add a "Label" of "content" for design system content and "discussion" if you want feedback.
+2. Give the issue a **title** framed as a problem, e.g. "There's no date picker guidance".
+3. Give the issue a **description** that provides enough information that people can act on it without including any sensitive information, e.g. "As a designer, I want to know how to position coach marks because I'm designing an onboarding workflow."
+4. Click **Submit**. Add a "Label" of "content" for design system content and "discussion" if you want feedback.
### Editing design documentation
@@ -24,15 +24,15 @@ You can edit Kaizen Site documentation using GitHub's interface.
2. **Edit**: Click the pencil icon to "Edit this file".
3. **Preview**: Makes your changes to the content and click "Preview changes" to see how they look.
4. **Commit**:
- - Under "Commit changes", write a commit message starting with `docs:`, such as `docs: update typography documentation`.
- - Create a new branch for this commit and start a pull request, e.g. `di/update-typography-guidelines`.
- - Click the "Commit changes" button. This will start a pull request.
+ - Under "Commit changes", write a commit message starting with `docs:`, such as `docs: update typography documentation`.
+ - Create a new branch for this commit and start a pull request, e.g. `di/update-typography-guidelines`.
+ - Click the "Commit changes" button. This will start a pull request.
5. **Create PR**: Click the "Create pull request" button. Add someone as a reviewer or let #prod_design_systems know.
6. **PR description and branch preview**:
- - Give your PR **a description** to help reviewers quickly understand why you've made the changes you have made and give feedback.
- - Where it says "No description provided", look for an "**Edit**" action (in the unlabeled icon dropdown).
- - If there is an **open Issue** for your changes, link to it in the description by writing `#` and writing the number or title of the Issue. You can find the Issue number or title by searching for it in [Issues](https://github.com/cultureamp/kaizen-discourse/issues).
- - It's convenient for reviewers if you add a link to your "**branch preview**", which shows how your changes will look on the Kaizen Site after it has automatically been built (within a few minutes of opening the PR). The branch preview link will use your branch name like this: (branch-name), which you can find in the "Checks" section of the page (likely under "Show all checks" > Branch preview: "Details").
+ - Give your PR **a description** to help reviewers quickly understand why you've made the changes you have made and give feedback.
+ - Where it says "No description provided", look for an "**Edit**" action (in the unlabeled icon dropdown).
+ - If there is an **open Issue** for your changes, link to it in the description by writing `#` and writing the number or title of the Issue. You can find the Issue number or title by searching for it in [Issues](https://github.com/cultureamp/kaizen-discourse/issues).
+ - It's convenient for reviewers if you add a link to your "**branch preview**", which shows how your changes will look on the Kaizen Site after it has automatically been built (within a few minutes of opening the PR). The branch preview link will use your branch name like this: (branch-name), which you can find in the "Checks" section of the page (likely under "Show all checks" > Branch preview: "Details").
Once it's approved, click "Squash and merge" to publish your changes. Share the link to the updated documentation on #updates_design_systems for awareness.
@@ -53,7 +53,7 @@ Every code contribution **should strive to** have:
To update a component in code:
-- Ask for a code review from a design systems advocate (an "advocado"), #prod_design_systems, or someone in your team who is experienced with Kaizen*
+- Ask for a code review from a design systems advocate (an "advocado"), #prod_design_systems, or someone in your team who is experienced with Kaizen\*
- Notify the front-end engineering practice (#pract_front_end_eng) of any possible breaking changes
- Notify the QA practice of any possible breaking changes
@@ -77,7 +77,7 @@ To release a new version of a package, create a pull request that:
- Modifies only the package(s) you wish to release ([see below](#updating-multiple-packages))
- Has a Changeset file ([see below](#creating-a-changeset))
- - This step is optional, but recommended. Exceptions are for things like docs or tooling changes.
+ - This step is optional, but recommended. Exceptions are for things like docs or tooling changes.
Once that pull request is merged into main, a Changeset PR will automatically be created with the details of your change, and once the Changeset PR is merged, an automated release process will be triggered and the newly published package version will be available on the npm public registry.
@@ -110,7 +110,6 @@ Creating a changeset is straight forward:
A changeset `md` file will be added to your branch which you are free to modify the details of if necessary.
-
#### Description
The `description` should be a short (less than ~60 characters) summary of changes introduced in the release. This summary will be included in the CHANGELOG (see the [releases page](https://github.com/cultureamp/kaizen-design-system/releases)), along with the commit type, a link to the pull request which triggered the release, and a detailed summary of any breaking changes.
@@ -156,6 +155,7 @@ Refer to the [docs folder](docs) for code guidelines and patterns.
To generate a new component and package, new component within an existing package, or a subcomponent,
run the following command and follow the prompts:
+
```
pnpm plop
```
diff --git a/README.md b/README.md
index e3cdf198dbe..967daf8a8ed 100644
--- a/README.md
+++ b/README.md
@@ -34,9 +34,11 @@ To learn more, see the designer section of the [Contributing guidelines](./CONTR
## Getting started
### Setup
+
Set up access to private Culture Amp packages on your laptop. You will need to update `~/.npmrc` with a Github token linked to your account. Refer to the [instructions here](https://cultureamp.atlassian.net/wiki/spaces/TV/pages/2776629375/Working+with+our+private+GitHub+package+registry).
### Local development
+
Ensure devbox is setup as per [https://cultureamp.atlassian.net/wiki/spaces/DE/pages/3342434338/Devbox+setup](https://cultureamp.atlassian.net/wiki/spaces/DE/pages/3342434338/Devbox+setup)
Install and start processes (this start an interactive UI in your terminal) `devbox services up`
@@ -56,17 +58,17 @@ While the main site is located at , all branches in t
It's dangerous to go alone! Take these:
-Command | Summary
-:- | :-
-`pnpm storybook` | Develop components locally using Storybook
-`STORIES=path/to/package pnpm storybook` | Develop just one package at a time using Storybook (builds faster!)
-`pnpm compile` | Run all typechecks
-`pnpm lint` | Run all linters
-`pnpm lint:fix` | Run all linters, fixing violations
-`pnpm plop` | Add a new component/subcomponent
-`pnpm test` | Run all [Jest](https://jestjs.io/) tests
-`pnpm storybook:test` | Run tests on all Storybook stories
-`pnpm reset` | Reinstall all dependencies
+| Command | Summary |
+| :--------------------------------------- | :------------------------------------------------------------------ |
+| `pnpm storybook` | Develop components locally using Storybook |
+| `STORIES=path/to/package pnpm storybook` | Develop just one package at a time using Storybook (builds faster!) |
+| `pnpm compile` | Run all typechecks |
+| `pnpm lint` | Run all linters |
+| `pnpm lint:fix` | Run all linters, fixing violations |
+| `pnpm plop` | Add a new component/subcomponent |
+| `pnpm test` | Run all [Jest](https://jestjs.io/) tests |
+| `pnpm storybook:test` | Run tests on all Storybook stories |
+| `pnpm reset` | Reinstall all dependencies |
## Bugs and discussions
diff --git a/docs/pages/app-starter.mdx b/docs/pages/app-starter.mdx
index 94989e643ef..07174d1109c 100644
--- a/docs/pages/app-starter.mdx
+++ b/docs/pages/app-starter.mdx
@@ -1,6 +1,6 @@
-import { Meta, Unstyled } from "@storybook/blocks"
-import { InlineNotification } from "~components/Notification"
-import { LinkTo } from "../components/LinkTo"
+import { Meta, Unstyled } from '@storybook/blocks'
+import { InlineNotification } from '~components/Notification'
+import { LinkTo } from '../components/LinkTo'
@@ -11,18 +11,23 @@ This guide is all about how to introduce the Kaizen Design System to your app.
Whilst the Kaizen Design System mainly focuses on the more atomic components in your app, some of the components have a high level of complexity requiring various global components to be present in order for them to function.
- You won't need to apply any of the below if you have the latest next-template.
+
+ You won't need to apply any of the below if you have the latest{' '}
+ next-template.
+
## 1. Add the KaizenProvider
The KaizenProvider feeds your entire app with Kaizen defaults so it's important that it goes at the very root of your application.
+
```tsx
-import { KaizenProvider } from "@kaizen/components";
-
+import { KaizenProvider } from '@kaizen/components'
+;
```
+
Be sure to read the KaizenProvider documentation for migration tips and in case your app requires any further config, but generally this should be it!
## 2. Add unified-home's @culturamp/i18n-react-intl webpack plugin to your webpack config
@@ -45,6 +50,7 @@ Whether or not you are already familiar with Tailwind, you'll want to take a loo
For the convenience of your app, we've compiled all the necessary styles for our components into a single stylesheet to make it easy to set and forget.
This includes:
+
- CSS variables (design tokens)
- [Normalize.css](https://github.com/necolas/normalize.css)
- Font assets
@@ -56,19 +62,26 @@ Add this stylesheet at the top of your global styles imports of your app.
Note: If you are using Storybook, you will also need to add it in your `preview.ts`.
```js
-import "@kaizen/components/dist/styles.css"
-import "tailwind.css"
+import '@kaizen/components/dist/styles.css'
+import 'tailwind.css'
```
## 5. Link to Google Material Symbols CDN
-*Note that this step is required as long as you use any Kaizen component that contains an Icon, not just if you use (Future) Icon directly.*
+_Note that this step is required as long as you use any Kaizen component that contains an Icon, not just if you use (Future) Icon directly._
Our (Future) Icons (introduced in `@kaizen/components@1.67.0`) are sourced from [Google Material Symbols](https://fonts.google.com/icons).
You will need to add the following to your Storybook `preview-head.html` and to the `` of your apps.
```html
-
-
-
+
+
+
```
diff --git a/docs/pages/welcome.mdx b/docs/pages/welcome.mdx
index e9c97bef867..3b515b96781 100644
--- a/docs/pages/welcome.mdx
+++ b/docs/pages/welcome.mdx
@@ -1,4 +1,4 @@
-import { Meta } from "@storybook/blocks"
+import { Meta } from '@storybook/blocks'
@@ -16,7 +16,8 @@ You can find a comprehensive overview of how to get your code base started on ou
The Kaizen Design System Team is here to support the usage of the library via #prod_design_system channel on Slack.
-Here's a few things to reach out to us for *before contribution*:
+Here's a few things to reach out to us for _before contribution_:
+
- Any bugs with the existing components
- A missing feature in a component
- Trouble finding something
diff --git a/packages/components/codemods/README.md b/packages/components/codemods/README.md
index a52382655c1..200bb3296a5 100644
--- a/packages/components/codemods/README.md
+++ b/packages/components/codemods/README.md
@@ -1,5 +1,5 @@
-
# Kaizen codemods
+
This directory is a collection of codemods that can be executed via CLI with the `kaizen-codemod` command.
## Prerequisites
@@ -18,6 +18,7 @@ DIR - the directory to run the codemod for. Note that node_modules are excluded.
CODEMOD_NAME - the name of the codemod (refer to list below).
Example:
+
```
pnpm kaizen-codemod src migrateWellVariantToColor
```
diff --git a/packages/components/src/Avatar/_docs/Avatar.mdx b/packages/components/src/Avatar/_docs/Avatar.mdx
index 008be70d4e2..213e6a0eafd 100644
--- a/packages/components/src/Avatar/_docs/Avatar.mdx
+++ b/packages/components/src/Avatar/_docs/Avatar.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as AvatarStories from "./Avatar.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as AvatarStories from './Avatar.stories'
@@ -13,7 +13,6 @@ import * as AvatarStories from "./Avatar.stories"
/>
-
## Overview
diff --git a/packages/components/src/AvatarGroup/_docs/AvatarGroup.mdx b/packages/components/src/AvatarGroup/_docs/AvatarGroup.mdx
index 1d1580ed4dd..047bddda450 100644
--- a/packages/components/src/AvatarGroup/_docs/AvatarGroup.mdx
+++ b/packages/components/src/AvatarGroup/_docs/AvatarGroup.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as AvatarGroupStories from "./AvatarGroup.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as AvatarGroupStories from './AvatarGroup.stories'
diff --git a/packages/components/src/Badge/_docs/Badge.mdx b/packages/components/src/Badge/_docs/Badge.mdx
index b342c076af0..8d3f76c428c 100644
--- a/packages/components/src/Badge/_docs/Badge.mdx
+++ b/packages/components/src/Badge/_docs/Badge.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as BadgeStories from "./Badge.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as BadgeStories from './Badge.stories'
diff --git a/packages/components/src/Brand/_docs/Brand.mdx b/packages/components/src/Brand/_docs/Brand.mdx
index 1c21e981c29..03f147b1a4e 100644
--- a/packages/components/src/Brand/_docs/Brand.mdx
+++ b/packages/components/src/Brand/_docs/Brand.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as BrandStories from "./Brand.stories"
+import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as BrandStories from './Brand.stories'
@@ -13,7 +13,6 @@ import * as BrandStories from "./Brand.stories"
/>
-
## Overview
diff --git a/packages/components/src/BrandMoment/_docs/BrandMoment.mdx b/packages/components/src/BrandMoment/_docs/BrandMoment.mdx
index d65d353c7a5..f960e99f852 100644
--- a/packages/components/src/BrandMoment/_docs/BrandMoment.mdx
+++ b/packages/components/src/BrandMoment/_docs/BrandMoment.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as BrandMoment from "./BrandMoment.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as BrandMoment from './BrandMoment.stories'
diff --git a/packages/components/src/ButtonGroup/_docs/ButtonGroup.mdx b/packages/components/src/ButtonGroup/_docs/ButtonGroup.mdx
index 7e98812433d..cd5629e7885 100644
--- a/packages/components/src/ButtonGroup/_docs/ButtonGroup.mdx
+++ b/packages/components/src/ButtonGroup/_docs/ButtonGroup.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as ButtonGroupStories from "./ButtonGroup.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as ButtonGroupStories from './ButtonGroup.stories'
diff --git a/packages/components/src/Calendar/CalendarRange/_docs/CalendarRange.mdx b/packages/components/src/Calendar/CalendarRange/_docs/CalendarRange.mdx
index 04fe8514238..7b9c92c9350 100644
--- a/packages/components/src/Calendar/CalendarRange/_docs/CalendarRange.mdx
+++ b/packages/components/src/Calendar/CalendarRange/_docs/CalendarRange.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as CalendarRangeStories from "./CalendarRange.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as CalendarRangeStories from './CalendarRange.stories'
diff --git a/packages/components/src/Calendar/CalendarSingle/_docs/CalendarSingle.mdx b/packages/components/src/Calendar/CalendarSingle/_docs/CalendarSingle.mdx
index 3efde157fe1..fc79c1167d0 100644
--- a/packages/components/src/Calendar/CalendarSingle/_docs/CalendarSingle.mdx
+++ b/packages/components/src/Calendar/CalendarSingle/_docs/CalendarSingle.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as CalendarSingleStories from "./CalendarSingle.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as CalendarSingleStories from './CalendarSingle.stories'
diff --git a/packages/components/src/Card/_docs/Card.mdx b/packages/components/src/Card/_docs/Card.mdx
index d4914cb4f8f..b13748edf89 100644
--- a/packages/components/src/Card/_docs/Card.mdx
+++ b/packages/components/src/Card/_docs/Card.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as CardStories from "./Card.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as CardStories from './Card.stories'
@@ -23,8 +23,9 @@ The `Card` component is a flexible container used to wrap primary content. It ha
## API
### Colors
+
### Elevation
-
+
diff --git a/packages/components/src/Checkbox/Checkbox/_docs/Checkbox.mdx b/packages/components/src/Checkbox/Checkbox/_docs/Checkbox.mdx
index 22e4be63e1f..0fe1a1a5ebd 100644
--- a/packages/components/src/Checkbox/Checkbox/_docs/Checkbox.mdx
+++ b/packages/components/src/Checkbox/Checkbox/_docs/Checkbox.mdx
@@ -1,7 +1,7 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import { LinkTo } from "~storybook/components/LinkTo"
-import * as CheckboxStories from "./Checkbox.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import { LinkTo } from '~storybook/components/LinkTo'
+import * as CheckboxStories from './Checkbox.stories'
@@ -20,6 +20,5 @@ A primitive, not to be used alone.
Commonly used via CheckboxField or CheckboxGroup.
-
diff --git a/packages/components/src/Checkbox/CheckboxField/_docs/CheckboxField.mdx b/packages/components/src/Checkbox/CheckboxField/_docs/CheckboxField.mdx
index adf64efc9a6..bf52e79aebb 100644
--- a/packages/components/src/Checkbox/CheckboxField/_docs/CheckboxField.mdx
+++ b/packages/components/src/Checkbox/CheckboxField/_docs/CheckboxField.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as CheckboxFieldStories from "./CheckboxField.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as CheckboxFieldStories from './CheckboxField.stories'
@@ -25,7 +25,9 @@ A checkbox field includes a checkable input and its label. Checkbox fields are u
## API
### No Bottom Margin
+
Removes the margin from below the Checkbox Field.
**Note** This is a bit of an antiquated pattern, we advise you to keep this on by default and use flex containers to apply spacing
+
diff --git a/packages/components/src/Checkbox/CheckboxGroup/_docs/CheckboxGroup.mdx b/packages/components/src/Checkbox/CheckboxGroup/_docs/CheckboxGroup.mdx
index b4e9231134e..6c7f16e9dfa 100644
--- a/packages/components/src/Checkbox/CheckboxGroup/_docs/CheckboxGroup.mdx
+++ b/packages/components/src/Checkbox/CheckboxGroup/_docs/CheckboxGroup.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as CheckboxGroupStories from "./CheckboxGroup.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as CheckboxGroupStories from './CheckboxGroup.stories'
@@ -25,6 +25,7 @@ A checkbox group contains checkbox fields that let people select zero or more op
## API
### No Bottom Margin
+
Removes the margin from below the Checkbox Field.
**Note** This is a bit of an antiquated pattern, we advise you to keep this on by default and use flex containers to apply spacing
diff --git a/packages/components/src/Collapsible/Collapsible/_docs/Collapsible.mdx b/packages/components/src/Collapsible/Collapsible/_docs/Collapsible.mdx
index eab6a31a5f1..7e6cea2fa82 100644
--- a/packages/components/src/Collapsible/Collapsible/_docs/Collapsible.mdx
+++ b/packages/components/src/Collapsible/Collapsible/_docs/Collapsible.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as CollapsibleStories from "./Collapsible.stories"
+import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as CollapsibleStories from './Collapsible.stories'
diff --git a/packages/components/src/Collapsible/CollapsibleGroup/_docs/CollapsibleGroup.mdx b/packages/components/src/Collapsible/CollapsibleGroup/_docs/CollapsibleGroup.mdx
index f3fe76c5817..793dbdd3851 100644
--- a/packages/components/src/Collapsible/CollapsibleGroup/_docs/CollapsibleGroup.mdx
+++ b/packages/components/src/Collapsible/CollapsibleGroup/_docs/CollapsibleGroup.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as CollapsibleGroupStories from "./CollapsibleGroup.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as CollapsibleGroupStories from './CollapsibleGroup.stories'
@@ -28,10 +28,11 @@ Collapsibles are used to collapse and expand content inline on a page. This lets
The `CollapsibleGroup` exposes some of the top level `Collapsible` props so you can apply them to all Collapsibles within the Group.
- - `sticky`
- - `noSectionPadding`
- - `lazyLoad`
- - `onToggle`
+- `sticky`
+- `noSectionPadding`
+- `lazyLoad`
+- `onToggle`
### Separated
+
diff --git a/packages/components/src/Collapsible/ExpertAdviceCollapsible/_docs/ExpertAdviceCollapsible.mdx b/packages/components/src/Collapsible/ExpertAdviceCollapsible/_docs/ExpertAdviceCollapsible.mdx
index a643e9c25c1..e9d29978ba9 100644
--- a/packages/components/src/Collapsible/ExpertAdviceCollapsible/_docs/ExpertAdviceCollapsible.mdx
+++ b/packages/components/src/Collapsible/ExpertAdviceCollapsible/_docs/ExpertAdviceCollapsible.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as ExpertAdviceCollapsibleStories from "./ExpertAdviceCollapsible.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as ExpertAdviceCollapsibleStories from './ExpertAdviceCollapsible.stories'
diff --git a/packages/components/src/Container/_docs/Container.mdx b/packages/components/src/Container/_docs/Container.mdx
index 0c0de2505ab..ab5cf8763ab 100644
--- a/packages/components/src/Container/_docs/Container.mdx
+++ b/packages/components/src/Container/_docs/Container.mdx
@@ -1,7 +1,7 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import { LinkTo } from "~storybook/components/LinkTo"
-import * as ContainerStories from "./Container.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import { LinkTo } from '~storybook/components/LinkTo'
+import * as ContainerStories from './Container.stories'
@@ -23,5 +23,7 @@ Wraps your entire page.
## Use Case
+
Usually wraps a Content component.
+
diff --git a/packages/components/src/Content/_docs/Content.mdx b/packages/components/src/Content/_docs/Content.mdx
index 91d5b182a37..0e2479e2c18 100644
--- a/packages/components/src/Content/_docs/Content.mdx
+++ b/packages/components/src/Content/_docs/Content.mdx
@@ -1,7 +1,7 @@
-import { Canvas, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import { LinkTo } from "~storybook/components/LinkTo"
-import * as ContentStories from "./Content.stories"
+import { Canvas, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import { LinkTo } from '~storybook/components/LinkTo'
+import * as ContentStories from './Content.stories'
@@ -22,5 +22,7 @@ Wraps your content at a **page level** in the standard minimum width and margins
## Use Case
+
Usually wrapped in a Container
+
diff --git a/packages/components/src/DatePicker/_docs/DatePicker.mdx b/packages/components/src/DatePicker/_docs/DatePicker.mdx
index 134f8d7746d..1dd7838fd27 100644
--- a/packages/components/src/DatePicker/_docs/DatePicker.mdx
+++ b/packages/components/src/DatePicker/_docs/DatePicker.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as DatePickerStories from "./DatePicker.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as DatePickerStories from './DatePicker.stories'
diff --git a/packages/components/src/DateRangePicker/_docs/DateRangePicker.mdx b/packages/components/src/DateRangePicker/_docs/DateRangePicker.mdx
index c1bba04a2e7..8432e18ce64 100644
--- a/packages/components/src/DateRangePicker/_docs/DateRangePicker.mdx
+++ b/packages/components/src/DateRangePicker/_docs/DateRangePicker.mdx
@@ -1,6 +1,6 @@
-import { Canvas, DocsStory, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as DateRangePickerStories from "./DateRangePicker.stories"
+import { Canvas, DocsStory, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as DateRangePickerStories from './DateRangePicker.stories'
@@ -24,7 +24,6 @@ Date range picker form field.
-
## Responsive behaviour
As both the `DatePicker` and `DateRangePicker` use the `CalendarPopover` component under the hood, they share the same responsive behaviour. You can read more on this [here](/docs/components-date-controls-datepicker--docs#responsive-behaviour).
diff --git a/packages/components/src/Divider/_docs/Divider.mdx b/packages/components/src/Divider/_docs/Divider.mdx
index e90a1fed2e0..97cec54b93e 100644
--- a/packages/components/src/Divider/_docs/Divider.mdx
+++ b/packages/components/src/Divider/_docs/Divider.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as DividerStories from "./Divider.stories"
+import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as DividerStories from './Divider.stories'
diff --git a/packages/components/src/EmptyState/_docs/EmptyState.mdx b/packages/components/src/EmptyState/_docs/EmptyState.mdx
index f5923f08f74..ef6c1f7c045 100644
--- a/packages/components/src/EmptyState/_docs/EmptyState.mdx
+++ b/packages/components/src/EmptyState/_docs/EmptyState.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as EmptyStateStories from "./EmptyState.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as EmptyStateStories from './EmptyState.stories'
diff --git a/packages/components/src/ErrorPage/_docs/ErrorPage.mdx b/packages/components/src/ErrorPage/_docs/ErrorPage.mdx
index 24746c6d4ab..19f6f62266b 100644
--- a/packages/components/src/ErrorPage/_docs/ErrorPage.mdx
+++ b/packages/components/src/ErrorPage/_docs/ErrorPage.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as ErrorPageStories from "./ErrorPage.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as ErrorPageStories from './ErrorPage.stories'
diff --git a/packages/components/src/FieldGroup/_docs/FieldGroup.mdx b/packages/components/src/FieldGroup/_docs/FieldGroup.mdx
index 8f134f75df2..4abf52de295 100644
--- a/packages/components/src/FieldGroup/_docs/FieldGroup.mdx
+++ b/packages/components/src/FieldGroup/_docs/FieldGroup.mdx
@@ -1,7 +1,7 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import { LinkTo } from "~storybook/components/LinkTo"
-import * as FieldGroupStories from "./FieldGroup.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import { LinkTo } from '~storybook/components/LinkTo'
+import * as FieldGroupStories from './FieldGroup.stories'
@@ -24,9 +24,11 @@ A simple wrapper to wrap form field components and their related siblings. This
## API
### Inline
+
Changes the FieldGroup to an inline element with no bottom margin. This can be seen in the `Slider`component. You can see inline vs block scope in the following stories:
#### Inline
+
#### Default (block)
diff --git a/packages/components/src/FieldMessage/_docs/FieldMessage.mdx b/packages/components/src/FieldMessage/_docs/FieldMessage.mdx
index e27699f21fb..61d07858c0b 100644
--- a/packages/components/src/FieldMessage/_docs/FieldMessage.mdx
+++ b/packages/components/src/FieldMessage/_docs/FieldMessage.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as FieldMessageStories from "./FieldMessage.stories"
+import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as FieldMessageStories from './FieldMessage.stories'
@@ -36,7 +36,6 @@ Simple `string`s will be wrapped in a `p` tag with the default `small` text styl
Note that when using this for helper text, the component should not recieve `status` - this is reserved for validation messages.
-
### Status
`status` can used to create form validation message that provide additional context to a form field's state, ie: `error`, `caution` or `success`.
diff --git a/packages/components/src/Filter/Filter/_docs/Filter.mdx b/packages/components/src/Filter/Filter/_docs/Filter.mdx
index 6da9b7f29a9..de0971d5f4c 100644
--- a/packages/components/src/Filter/Filter/_docs/Filter.mdx
+++ b/packages/components/src/Filter/Filter/_docs/Filter.mdx
@@ -1,7 +1,7 @@
-import { Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation, NoClipCanvas } from "~storybook/components"
-import { LinkTo } from "~storybook/components/LinkTo"
-import * as FilterStories from "./Filter.stories"
+import { Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation, NoClipCanvas } from '~storybook/components'
+import { LinkTo } from '~storybook/components/LinkTo'
+import * as FilterStories from './Filter.stories'
@@ -14,11 +14,12 @@ import * as FilterStories from "./Filter.stories"
/>
-
+
## Overview
These components are mainly used for constructing Filter components (eg. FilterSelect):
+
- FilterButton for the renderTrigger
- `FilterContents` to wrap the contents within a Filter
@@ -51,7 +52,6 @@ type TriggerButtonProps = {
onClick: () => void // Calls `setIsOpen(!isOpen)`
isOpen: boolean // The value from the `isOpen` prop
}
-
```
If a `ref` is provided to the FilterButton it will be used, otherwise a fallback `ref`
@@ -61,16 +61,14 @@ will be created (this is required to tie the trigger to the popover).
type FilterTriggerRef = {
ref: { triggerRef?: React.RefObject }
}
-
```
#### Simple Filter
```tsx
- (
-
- )}
+}
/>
```
@@ -79,11 +77,12 @@ type FilterTriggerRef = {
#### Removable Filter
```tsx
- (
)}
/>
diff --git a/packages/components/src/Filter/FilterBar/_docs/FilterBar.mdx b/packages/components/src/Filter/FilterBar/_docs/FilterBar.mdx
index 8f538cec7b9..2777dac0a5c 100644
--- a/packages/components/src/Filter/FilterBar/_docs/FilterBar.mdx
+++ b/packages/components/src/Filter/FilterBar/_docs/FilterBar.mdx
@@ -1,7 +1,7 @@
-import { Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation, NoClipCanvas } from "~storybook/components"
-import { LinkTo } from "~storybook/components/LinkTo"
-import * as FilterBarStories from "./FilterBar.stories"
+import { Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation, NoClipCanvas } from '~storybook/components'
+import { LinkTo } from '~storybook/components/LinkTo'
+import * as FilterBarStories from './FilterBar.stories'
@@ -37,7 +37,7 @@ We also provide a `Filters` type which can accept the same generic to provide im
`ValuesMap` should be in the shape of `{ [filterId]: filterValueType }`.
```tsx
-import { FilterBar, Filters } from "@kaizen/components"
+import { FilterBar, Filters } from '@kaizen/components'
type ValuesMap = {
filterId1: string
@@ -45,21 +45,15 @@ type ValuesMap = {
}
const [values, setValues] = useState>({
- filterId1: "default-value"
+ filterId1: 'default-value',
})
const filters = [
- { id: "filterId1", ...rest },
- { id: "filterId2", ...rest },
+ { id: 'filterId1', ...rest },
+ { id: 'filterId2', ...rest },
] satisfies Filters
-return (
-
- filters={filters}
- values={values}
- onValuesChange={setValues}
- />
-)
+return filters={filters} values={values} onValuesChange={setValues} />
```
### `filters`
@@ -71,7 +65,7 @@ The `filters` prop is an array of attributes used to create the list of filters.
We provide a `Filters` type you can use for improved type safety.
```tsx
-import { FilterBar, Filters, DateRange, FilterMultiSelect } from "@kaizen/components"
+import { FilterBar, Filters, DateRange, FilterMultiSelect } from '@kaizen/components'
type ValuesMap = {
filterId1: string
@@ -81,13 +75,13 @@ type ValuesMap = {
const filters = [
{
- id: "filterId1",
- name: "Filter 1",
+ id: 'filterId1',
+ name: 'Filter 1',
Component: ,
},
{
- id: "filterId2",
- name: "Filter 2",
+ id: 'filterId2',
+ name: 'Filter 2',
Component: (
{/* Compose your structure using subcomponents of FilterMultiSelect */}
@@ -96,11 +90,11 @@ const filters = [
),
},
{
- id: "filterId3",
- name: "Filter 3",
+ id: 'filterId3',
+ name: 'Filter 3',
Component: ,
isRemovable: true,
- isUsableWhen: state => state.filterId1.value !== undefined
+ isUsableWhen: (state) => state.filterId1.value !== undefined,
},
] satisfies Filters
```
@@ -133,6 +127,7 @@ Provided Filter components are built on top of their base component, and have th
If the component comes with an `onChange` (or similar) prop, it will be made optional and it can be used for additional actions (eg. adding analytics).
Available Filter components:
+
- `` - extends FilterDatePicker
- `selectedDate` is omitted
- `onDateChange` is now optional
@@ -176,23 +171,28 @@ type ValuesMap = {
const filters = [
{
- id: "coffee",
- name: "Coffee",
- Component: ,
+ id: 'coffee',
+ name: 'Coffee',
+ Component: (
+
+ ),
},
{
- id: "milk",
- name: "Milk",
+ id: 'milk',
+ name: 'Milk',
Component: ,
- isUsableWhen: state => state.coffee.value === "latte",
+ isUsableWhen: (state) => state.coffee.value === 'latte',
},
] satisfies Filters
```
The `state` arg will provide you with the following attributes for all the filters (mapped to the keys of the `ValuesMap`):
+
```
id: keyof ValuesMap
name: string
@@ -201,6 +201,7 @@ isActive: boolean
```
When a dependent filter has not met its condition (not _Usable_):
+
- it will be removed from the FilterBar
- if it has a value, the value will be cleared
@@ -223,12 +224,10 @@ type ValuesMap = {
// @note: Unless you are providing a default value for all the filters,
// you will want to wrap it in Partial.
const [values, setValues] = useState>({
- filterId1: "default-value"
+ filterId1: 'default-value',
})
-return (
- values={values} {...rest} />
-)
+return values={values} {...rest} />
```
### `onValuesChange`
@@ -247,6 +246,7 @@ Filters that do not meet their condition will not be shown amongst the Active Fi
See [filter attribute `isUsableWhen`](#isusablewhen-state-filtersstatevaluesmap--boolean) for api.
This example shows the following dependencies:
+
- **Milk** is only usable when **Coffee** _is Latte_
- `isUsableWhen: state => state.coffee.value === "latte"`
- An initial value of _Full Cream_ is passed in, but immediately cleared
@@ -283,10 +283,10 @@ type Values = {
* Using `getFilterState` as dependency source is known
*/
const ExampleDependentFilter = () => {
- const { getFilterState } = useFilterBarContext()
- const sourceFilter = getFilterState("source")
+ const { getFilterState } = useFilterBarContext()
+ const sourceFilter = getFilterState('source')
const items = retrieveItems(sourceFilter.value)
- return ( id="dependent" items={items} />)
+ return id="dependent" items={items} />
}
/**
@@ -301,13 +301,13 @@ const ExampleDependentFilter = (props: {
const { getActiveFilterValues } = useFilterBarContext()
const activeValues = getActiveFilterValues()
const items = props.retrieveItemsCallback(activeValues)
- return ( id={props.id} items={items} />)
+ return id={props.id} items={items} />
}
const CustomFilterBar = () => {
const filters = [
- { id: "source", ...rest },
- { id: "dependent", Component: , ...rest },
+ { id: 'source', ...rest },
+ { id: 'dependent', Component: , ...rest },
] satisfies Filters
return filters={filters} {...rest} />
@@ -331,6 +331,7 @@ Out of the box, we do not make assumptions about your state management tool, so
the types to match the expected format of your chosen query param library.
The following example uses the
+
serialize-query-params
and query-string
packages.
@@ -357,14 +358,14 @@ type Values = {
}
const CycleFilter = () => {
- const { openFilter } = useFilterBarContext()
+ const { openFilter } = useFilterBarContext()
return (
{
- if (key === "custom") openFilter("customRange")
+ items={[{ value: 'custom', label: 'Custom Range' }]}
+ onSelectionChange={(key) => {
+ if (key === 'custom') openFilter('customRange')
}}
/>
)
@@ -372,8 +373,8 @@ const CycleFilter = () => {
const CustomFilterBar = () => {
const filters = [
- { id: "cycle", Component: , ...rest },
- { id: "customRange", isUsableWhen: state => state.cycle.value === "custom", ...rest },
+ { id: 'cycle', Component: , ...rest },
+ { id: 'customRange', isUsableWhen: (state) => state.cycle.value === 'custom', ...rest },
] satisfies Filters
return filters={filters} {...rest} />
diff --git a/packages/components/src/Filter/FilterButton/_docs/filter-buttons.mdx b/packages/components/src/Filter/FilterButton/_docs/filter-buttons.mdx
index df00af24985..245489a57f8 100644
--- a/packages/components/src/Filter/FilterButton/_docs/filter-buttons.mdx
+++ b/packages/components/src/Filter/FilterButton/_docs/filter-buttons.mdx
@@ -1,7 +1,7 @@
-import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
-import { KAIOInstallation, ResourceLinks } from "~storybook/components"
-import * as FilterButtonExamples from "./FilterButton.stories"
-import * as FilterButtonRemovableExamples from "./FilterButtonRemovable.stories"
+import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
+import { KAIOInstallation, ResourceLinks } from '~storybook/components'
+import * as FilterButtonExamples from './FilterButton.stories'
+import * as FilterButtonRemovableExamples from './FilterButtonRemovable.stories'
@@ -14,7 +14,7 @@ import * as FilterButtonRemovableExamples from "./FilterButtonRemovable.stories"
Trigger buttons for use by components using the `` abstraction.
-
+
## Filter Button
diff --git a/packages/components/src/Filter/FilterDatePicker/_docs/FilterDatePicker.mdx b/packages/components/src/Filter/FilterDatePicker/_docs/FilterDatePicker.mdx
index 79efb5eed6e..c36db05fac3 100644
--- a/packages/components/src/Filter/FilterDatePicker/_docs/FilterDatePicker.mdx
+++ b/packages/components/src/Filter/FilterDatePicker/_docs/FilterDatePicker.mdx
@@ -1,6 +1,6 @@
-import { Controls, Description, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation, NoClipCanvas } from "~storybook/components"
-import * as FilterDPStories from "./FilterDatePicker.stories"
+import { Controls, Description, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation, NoClipCanvas } from '~storybook/components'
+import * as FilterDPStories from './FilterDatePicker.stories'
@@ -18,23 +18,28 @@ Date Picker to use for Filtering by a single date.
## Playground
+
## API
### Render Trigger
+
### Description
+
### Extend Input Props
+
### Validation
+
diff --git a/packages/components/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.mdx b/packages/components/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.mdx
index 62e92d175ca..e7366ccd50d 100644
--- a/packages/components/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.mdx
+++ b/packages/components/src/Filter/FilterDateRangePicker/_docs/FilterDateRangePicker.mdx
@@ -1,6 +1,6 @@
-import { Controls, Description, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation, NoClipCanvas } from "~storybook/components"
-import * as FilterDRPStories from "./FilterDateRangePicker.stories"
+import { Controls, Description, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation, NoClipCanvas } from '~storybook/components'
+import * as FilterDRPStories from './FilterDateRangePicker.stories'
@@ -18,27 +18,33 @@ Date Range Picker to use for Filtering.
## Playground
+
## API
### Render Trigger
+
### Selected Range
+
### Description
+
### Extend Input Props
+
### Validation
+
diff --git a/packages/components/src/Filter/FilterMultiSelect/_docs/FilterMultiSelect.mdx b/packages/components/src/Filter/FilterMultiSelect/_docs/FilterMultiSelect.mdx
index 4fd7c987fbd..537c6e99399 100644
--- a/packages/components/src/Filter/FilterMultiSelect/_docs/FilterMultiSelect.mdx
+++ b/packages/components/src/Filter/FilterMultiSelect/_docs/FilterMultiSelect.mdx
@@ -1,6 +1,6 @@
-import { Controls, Meta, Canvas } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation, NoClipCanvas } from "~storybook/components"
-import * as FilterMultiSelectStories from "./FilterMultiSelect.stories"
+import { Controls, Meta, Canvas } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation, NoClipCanvas } from '~storybook/components'
+import * as FilterMultiSelectStories from './FilterMultiSelect.stories'
@@ -35,42 +35,63 @@ The FilterMultiSelect is a component relies heavily on consumer implemntation. I
The following is an example of how you may create an async FilterMultiSelect using `@tanstack/react-query`.
```tsx
-import { QueryClientProvider, QueryClient, useInfiniteQuery, useQueryClient, keepPreviousData } from "@tanstack/react-query"
+import {
+ QueryClientProvider,
+ QueryClient,
+ useInfiniteQuery,
+ useQueryClient,
+ keepPreviousData,
+} from '@tanstack/react-query'
const AsyncExample = () => {
const client = new QueryClient()
const [open, setOpen] = useState(false)
const [selectedPeople, setSelectedPeople] = useState([])
- const [searchState, setSearchState] = useState("")
+ const [searchState, setSearchState] = useState('')
const queryClient = useQueryClient()
- const fetchSWAPI = async ({ pageParam }): Promise<{ results: Array<{ name: string; url: string }>; next: string }> => {
+ const fetchSWAPI = async ({
+ pageParam,
+ }): Promise<{ results: Array<{ name: string; url: string }>; next: string }> => {
const res = await fetch(`https://swapi.dev/api/people/?page=${pageParam}&search=${searchState}`)
return res.json()
}
- const { data, isLoading, fetchNextPage, isFetchingNextPage, hasNextPage, isRefetching } = useInfiniteQuery({
- enabled: true,
- initialPageParam: "1",
- queryKey: ["startrek-sg1", searchState],
- queryFn: fetchSWAPI,
- placeholderData: keepPreviousData,
- getNextPageParam: lastPage => {
- if (!lastPage.next) return undefined
- const url = new URL(lastPage.next)
- const params = new URLSearchParams(url.searchParams)
- return params.get("page")
- },
- })
-
- const cachedPeople = queryClient.getQueriesData({ queryKey: ["startrek-sg1"] }).flatMap(([, cachedData]) => cachedData?.pages ?? []).flatMap(page => page.results).map(item => ({ label: item.name, value: item.url }))
- const currentPeople = React.useMemo(() => data?.pages.flatMap(res => res.results).flatMap(person => ({ label: person.name, value: person.url })) || [], [data])
+ const { data, isLoading, fetchNextPage, isFetchingNextPage, hasNextPage, isRefetching } =
+ useInfiniteQuery({
+ enabled: true,
+ initialPageParam: '1',
+ queryKey: ['startrek-sg1', searchState],
+ queryFn: fetchSWAPI,
+ placeholderData: keepPreviousData,
+ getNextPageParam: (lastPage) => {
+ if (!lastPage.next) return undefined
+ const url = new URL(lastPage.next)
+ const params = new URLSearchParams(url.searchParams)
+ return params.get('page')
+ },
+ })
+
+ const cachedPeople = queryClient
+ .getQueriesData({ queryKey: ['startrek-sg1'] })
+ .flatMap(([, cachedData]) => cachedData?.pages ?? [])
+ .flatMap((page) => page.results)
+ .map((item) => ({ label: item.name, value: item.url }))
+ const currentPeople = React.useMemo(
+ () =>
+ data?.pages
+ .flatMap((res) => res.results)
+ .flatMap((person) => ({ label: person.name, value: person.url })) || [],
+ [data],
+ )
// Expose the selected items and float them to the top
- const mergedPeople = [...currentPeople, ...cachedPeople].filter((item, index, a) => a.findIndex(currItem => currItem.value === item.value) === index)
+ const mergedPeople = [...currentPeople, ...cachedPeople].filter(
+ (item, index, a) => a.findIndex((currItem) => currItem.value === item.value) === index,
+ )
// Only show the current filtered people when there is a search query
- const items = searchState !== "" ? currentPeople : Array.from(mergedPeople)
+ const items = searchState !== '' ? currentPeople : Array.from(mergedPeople)
const filteredCount = currentPeople.length
const totalCount = cachedPeople.length
@@ -81,11 +102,16 @@ const AsyncExample = () => {
isLoading={isLoading}
loadingSkeleton={}
items={items}
- trigger={() => }
+ trigger={() => (
+
+ )}
onSearchInputChange={setSearchState}
onOpenChange={setOpen}
onSelectionChange={(keys): void => {
- if (keys === "all") return
+ if (keys === 'all') return
setSelectedPeople(Array.from(keys) as string[])
}}
isOpen={open}
@@ -93,24 +119,49 @@ const AsyncExample = () => {
>
{(): JSX.Element => (
<>
-
+
{({ selectedItems, unselectedItems, hasNoItems }) => (
<>
- {hasNoItems
- ? No results found for {searchState}.
- : searchState !== ""
- ? Showing {filteredCount} of {totalCount}
- : hasNextPage && There are a lot of options. Narrow them further by searching for a more precise term.
- }
-
- {item => }
+ {hasNoItems ? (
+
+ No results found for {searchState}.
+
+ ) : searchState !== '' ? (
+
+ Showing {filteredCount} of {totalCount}
+
+ ) : (
+ hasNextPage && (
+
+ There are a lot of options. Narrow them further by searching for a more
+ precise term.
+
+ )
+ )}
+
+ {(item) => }
- {unselectedItems.length > 0 && selectedItems.length > 0 && }
-
- {item => }
+ {unselectedItems.length > 0 && selectedItems.length > 0 && (
+
+ )}
+
+ {(item) => }
- {hasNextPage && }
+ {hasNextPage && (
+
+ )}
>
)}
diff --git a/packages/components/src/Filter/FilterSelect/_docs/FilterSelect.mdx b/packages/components/src/Filter/FilterSelect/_docs/FilterSelect.mdx
index ed63ed658a7..a984bc575ca 100644
--- a/packages/components/src/Filter/FilterSelect/_docs/FilterSelect.mdx
+++ b/packages/components/src/Filter/FilterSelect/_docs/FilterSelect.mdx
@@ -1,7 +1,7 @@
-import { Canvas, Controls, Description, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation, NoClipCanvas } from "~storybook/components"
-import * as FilterSelectStickerSheet from "./FilterSelect.stickersheet.stories"
-import * as FilterSelectStories from "./FilterSelect.stories"
+import { Canvas, Controls, Description, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation, NoClipCanvas } from '~storybook/components'
+import * as FilterSelectStickerSheet from './FilterSelect.stickersheet.stories'
+import * as FilterSelectStories from './FilterSelect.stories'
diff --git a/packages/components/src/GuidanceBlock/_docs/GuidanceBlock.mdx b/packages/components/src/GuidanceBlock/_docs/GuidanceBlock.mdx
index f9e5b17fcbf..4af86280dcb 100644
--- a/packages/components/src/GuidanceBlock/_docs/GuidanceBlock.mdx
+++ b/packages/components/src/GuidanceBlock/_docs/GuidanceBlock.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as GuidanceBlockStories from "./GuidanceBlock.stories"
+import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as GuidanceBlockStories from './GuidanceBlock.stories'
diff --git a/packages/components/src/Heading/_docs/Heading.mdx b/packages/components/src/Heading/_docs/Heading.mdx
index 6ed89e7197a..c6e35871956 100644
--- a/packages/components/src/Heading/_docs/Heading.mdx
+++ b/packages/components/src/Heading/_docs/Heading.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as HeadingStories from "./Heading.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as HeadingStories from './Heading.stories'
@@ -15,6 +15,7 @@ import * as HeadingStories from "./Heading.stories"
## Overview
+
Renders a heading element `h1-h6` and applies styling for headings.
@@ -38,4 +39,3 @@ Use this variant only for the title within the composable header. [See documenta
Defaults to `h1` element.
-
diff --git a/packages/components/src/Icon/_docs/Icon.mdx b/packages/components/src/Icon/_docs/Icon.mdx
index 6ca4f889e3a..042ff9e0e3d 100644
--- a/packages/components/src/Icon/_docs/Icon.mdx
+++ b/packages/components/src/Icon/_docs/Icon.mdx
@@ -1,21 +1,19 @@
-import { Canvas, Controls, Meta, Story } from "@storybook/blocks"
-import { ResourceLinks } from "~storybook/components"
-import * as IconStories from "./Icon.docs.stories"
+import { Canvas, Controls, Meta, Story } from '@storybook/blocks'
+import { ResourceLinks } from '~storybook/components'
+import * as IconStories from './Icon.docs.stories'
# Icon
-
+
## Installation
Each icon is imported separately, for example if you'd like the `AddIcon` you will use the following import.
```js
-import { AddIcon } from "@kaizen/components"
+import { AddIcon } from '@kaizen/components'
```
See: Reference for all icons available to import.
diff --git a/packages/components/src/Illustration/Scene/BrandMomentCaptureIntro/_docs/BrandMomentCaptureIntro.mdx b/packages/components/src/Illustration/Scene/BrandMomentCaptureIntro/_docs/BrandMomentCaptureIntro.mdx
index ab5b9749dca..e6fcdd98c9f 100644
--- a/packages/components/src/Illustration/Scene/BrandMomentCaptureIntro/_docs/BrandMomentCaptureIntro.mdx
+++ b/packages/components/src/Illustration/Scene/BrandMomentCaptureIntro/_docs/BrandMomentCaptureIntro.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as BrandMomentCaptureIntroStories from "./BrandMomentCaptureIntro.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as BrandMomentCaptureIntroStories from './BrandMomentCaptureIntro.stories'
@@ -18,6 +18,7 @@ import * as BrandMomentCaptureIntroStories from "./BrandMomentCaptureIntro.stori
## Overview
Functionally similar to an animation Scene illustration but has 3 different states based on the properties passed in:
+
- An initial animation that is only ever played once, never looping.
- An ambient animation that can be looped.
- A static image that is not animated.
@@ -28,13 +29,19 @@ Functionally similar to an animation Scene illustration but has 3 different stat
## API
### Single animation
+
Will trigger the animation once.
+
### Looped animation
+
Will render the a looped animation. Should be used with `isAnimated` to render the "initial" intro animation.
+
### Autoplay disabled
+
If false will render the animation paused. This can be re-enabled clicking the pause sign on hover.
+
diff --git a/packages/components/src/Illustration/Scene/_docs/Scene.mdx b/packages/components/src/Illustration/Scene/_docs/Scene.mdx
index 421b6a3a5b0..5f24a922fdb 100644
--- a/packages/components/src/Illustration/Scene/_docs/Scene.mdx
+++ b/packages/components/src/Illustration/Scene/_docs/Scene.mdx
@@ -1,7 +1,7 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as Stickersheets from "./Scene.stickersheet.stories"
-import * as SceneStories from "./Scene.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as Stickersheets from './Scene.stickersheet.stories'
+import * as SceneStories from './Scene.stories'
@@ -12,10 +12,7 @@ import * as SceneStories from "./Scene.stories"
/>
-
-
+
## Overview
diff --git a/packages/components/src/Illustration/Spot/_docs/Spot.mdx b/packages/components/src/Illustration/Spot/_docs/Spot.mdx
index c8f77ee3ee1..d66e8071df8 100644
--- a/packages/components/src/Illustration/Spot/_docs/Spot.mdx
+++ b/packages/components/src/Illustration/Spot/_docs/Spot.mdx
@@ -1,7 +1,7 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as StickerSheetStories from "./Spot.stickersheet.stories"
-import * as SpotIllustrationStories from "./Spot.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as StickerSheetStories from './Spot.stickersheet.stories'
+import * as SpotIllustrationStories from './Spot.stories'
diff --git a/packages/components/src/Input/Input/_docs/Input.mdx b/packages/components/src/Input/Input/_docs/Input.mdx
index 97f987ee4c0..3644aeba3d0 100644
--- a/packages/components/src/Input/Input/_docs/Input.mdx
+++ b/packages/components/src/Input/Input/_docs/Input.mdx
@@ -1,7 +1,7 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import { LinkTo } from "~storybook/components/LinkTo"
-import * as InputStories from "./Input.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import { LinkTo } from '~storybook/components/LinkTo'
+import * as InputStories from './Input.stories'
@@ -24,13 +24,17 @@ An input of different types. Usually part of compositions such as
### Status
+
### Icon adornments
+
### Reversed
+
diff --git a/packages/components/src/Input/InputRange/_docs/InputRange.mdx b/packages/components/src/Input/InputRange/_docs/InputRange.mdx
index ea394ba5774..fc84c282243 100644
--- a/packages/components/src/Input/InputRange/_docs/InputRange.mdx
+++ b/packages/components/src/Input/InputRange/_docs/InputRange.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as InputRangeStories from "./InputRange.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as InputRangeStories from './InputRange.stories'
diff --git a/packages/components/src/Input/InputSearch/_docs/InputSearch.mdx b/packages/components/src/Input/InputSearch/_docs/InputSearch.mdx
index 5b878cd8c88..20c5a5ae5d6 100644
--- a/packages/components/src/Input/InputSearch/_docs/InputSearch.mdx
+++ b/packages/components/src/Input/InputSearch/_docs/InputSearch.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as InputSearchStories from "./InputSearch.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as InputSearchStories from './InputSearch.stories'
@@ -23,6 +23,7 @@ A range of things.
## API
## Showing the clear button
+
Adding text will automatically show the clear button.
diff --git a/packages/components/src/KaizenProvider/_docs/KaizenProvider.mdx b/packages/components/src/KaizenProvider/_docs/KaizenProvider.mdx
index 205db1579d0..c422974d76d 100644
--- a/packages/components/src/KaizenProvider/_docs/KaizenProvider.mdx
+++ b/packages/components/src/KaizenProvider/_docs/KaizenProvider.mdx
@@ -1,9 +1,9 @@
-import { Meta } from "@storybook/blocks"
-import { Diff } from "~storybook/components"
-import migrationBonus from "./code-diffs/migration-bonus.diff?raw"
-import migrationFETBonus from "./code-diffs/migration-fe-template-bonus.diff?raw"
-import migrationFETToV1 from "./code-diffs/migration-fe-template-to-v1.diff?raw"
-import migrationToV1 from "./code-diffs/migration-to-v1.diff?raw"
+import { Meta } from '@storybook/blocks'
+import { Diff } from '~storybook/components'
+import migrationBonus from './code-diffs/migration-bonus.diff?raw'
+import migrationFETBonus from './code-diffs/migration-fe-template-bonus.diff?raw'
+import migrationFETToV1 from './code-diffs/migration-fe-template-to-v1.diff?raw'
+import migrationToV1 from './code-diffs/migration-to-v1.diff?raw'
@@ -11,19 +11,19 @@ import migrationToV1 from "./code-diffs/migration-to-v1.diff?raw"
Provides the necessary global contexts for all Kaizen components, as well as any global level Kaizen component/wrappers.
-
## Usage
Ideally, there should only be one `KaizenProvider` that should wrap your entire application.
```jsx
-import { KaizenProvider } from "@kaizen/components";
-
+import { KaizenProvider } from '@kaizen/components'
+;
```
### Internationalization support
+
- [Internationalization in Kaizen](/story/components-kaizen-provider-internationalization-in-kaizen--docs)
## Migrating to KaizenProvider v1.0
diff --git a/packages/components/src/KaizenProvider/_docs/internationalization-in-kaizen.mdx b/packages/components/src/KaizenProvider/_docs/internationalization-in-kaizen.mdx
index 9ae32437027..054d0aa1128 100644
--- a/packages/components/src/KaizenProvider/_docs/internationalization-in-kaizen.mdx
+++ b/packages/components/src/KaizenProvider/_docs/internationalization-in-kaizen.mdx
@@ -1,5 +1,5 @@
-import { Meta } from "@storybook/blocks"
-import { LinkTo } from "~storybook/components/LinkTo"
+import { Meta } from '@storybook/blocks'
+import { LinkTo } from '~storybook/components/LinkTo'
@@ -38,13 +38,13 @@ There is a slight difference in the implementation of the `KaizenProvider`, depe
For more information on `@cultureamp/i18n-react-intl`, see their docs here.
Note: This will work with StaticIntlProvider or DynamicIntlProvider.
-```tsx
-import { DynamicIntlProvider } from "@cultureamp/i18n-react-intl"
-import { KaizenProvider } from "@kaizen/components"
-
+```tsx
+import { DynamicIntlProvider } from '@cultureamp/i18n-react-intl'
+import { KaizenProvider } from '@kaizen/components'
+;
-
+
```
@@ -54,9 +54,8 @@ import { KaizenProvider } from "@kaizen/components"
In these cases, you'll need to pass the current locale as a prop to the `KaizenProvider`, so it knows which language is currently active.
```tsx
-import { KaizenProvider } from "@kaizen/components"
-
-
-
+import { KaizenProvider } from '@kaizen/components'
+;
+
```
diff --git a/packages/components/src/Label/_docs/Label.mdx b/packages/components/src/Label/_docs/Label.mdx
index 23d9ff0c3d2..e3d500fc2dc 100644
--- a/packages/components/src/Label/_docs/Label.mdx
+++ b/packages/components/src/Label/_docs/Label.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as LabelStories from "./Label.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as LabelStories from './Label.stories'
@@ -23,12 +23,15 @@ Atomic `Label` component for use in `Field` components.
## API
### Variants
+
### Types
+
### Position
+
By default, your label text will always sit to the right of the inline form control (ie. in RTL terms, the "end").
Using the `labelPosition` you can flip the label text to sit to the left (ie. in RTL terms, the "start").
@@ -37,6 +40,7 @@ Note: this only works when you have an inline form control passed in via `childr
### Label text
+
Adds text to your form control. `labelText` styling greatly depends on how you compose and what `labelType` you apply, please see Composing below for examples.
@@ -48,7 +52,9 @@ There are two different ways to utilise the `Label` component depending on the t
The main difference is that when dealing with an inline form control, the form control is passed as children.
#### Inline form controls
+
#### Block form controls
+
diff --git a/packages/components/src/LabelledMessage/_docs/LabelledMessage.mdx b/packages/components/src/LabelledMessage/_docs/LabelledMessage.mdx
index cb5639e925a..bc1f5ab17f8 100644
--- a/packages/components/src/LabelledMessage/_docs/LabelledMessage.mdx
+++ b/packages/components/src/LabelledMessage/_docs/LabelledMessage.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as LabelledMessageStories from "./LabelledMessage.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as LabelledMessageStories from './LabelledMessage.stories'
diff --git a/packages/components/src/LikertScaleLegacy/_docs/LikertScaleLegacy.mdx b/packages/components/src/LikertScaleLegacy/_docs/LikertScaleLegacy.mdx
index 5f9ce93b9f5..dd6277afdb5 100644
--- a/packages/components/src/LikertScaleLegacy/_docs/LikertScaleLegacy.mdx
+++ b/packages/components/src/LikertScaleLegacy/_docs/LikertScaleLegacy.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as LikertScaleLegacyStories from "./LikertScaleLegacy.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as LikertScaleLegacyStories from './LikertScaleLegacy.stories'
diff --git a/packages/components/src/Loading/LoadingGraphic/_docs/LoadingGraphic.mdx b/packages/components/src/Loading/LoadingGraphic/_docs/LoadingGraphic.mdx
index ffe1a397dd6..f49cbf652a1 100644
--- a/packages/components/src/Loading/LoadingGraphic/_docs/LoadingGraphic.mdx
+++ b/packages/components/src/Loading/LoadingGraphic/_docs/LoadingGraphic.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation, LinkTo } from "~storybook/components"
-import * as LoadingGraphicStories from "./LoadingGraphic.stories"
+import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation, LinkTo } from '~storybook/components'
+import * as LoadingGraphicStories from './LoadingGraphic.stories'
@@ -19,9 +19,9 @@ import * as LoadingGraphicStories from "./LoadingGraphic.stories"
Loading skeleton for graphics
(Icon,
+
Avatar,
-Spot Illustration,
-Scene Illustration).
+Spot Illustration, Scene Illustration).
diff --git a/packages/components/src/Loading/LoadingHeading/_docs/LoadingHeading.mdx b/packages/components/src/Loading/LoadingHeading/_docs/LoadingHeading.mdx
index 9b2bf5594db..b6badb66a3b 100644
--- a/packages/components/src/Loading/LoadingHeading/_docs/LoadingHeading.mdx
+++ b/packages/components/src/Loading/LoadingHeading/_docs/LoadingHeading.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation, LinkTo } from "~storybook/components"
-import * as LoadingHeadingStories from "./LoadingHeading.stories"
+import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation, LinkTo } from '~storybook/components'
+import * as LoadingHeadingStories from './LoadingHeading.stories'
diff --git a/packages/components/src/Loading/LoadingInput/_docs/LoadingInput.mdx b/packages/components/src/Loading/LoadingInput/_docs/LoadingInput.mdx
index ab4e9b92375..895bf47b02c 100644
--- a/packages/components/src/Loading/LoadingInput/_docs/LoadingInput.mdx
+++ b/packages/components/src/Loading/LoadingInput/_docs/LoadingInput.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation, LinkTo } from "~storybook/components"
-import * as LoadingInputStories from "./LoadingInput.stories"
+import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation, LinkTo } from '~storybook/components'
+import * as LoadingInputStories from './LoadingInput.stories'
diff --git a/packages/components/src/Loading/LoadingParagraph/_docs/LoadingParagraph.mdx b/packages/components/src/Loading/LoadingParagraph/_docs/LoadingParagraph.mdx
index d9621fa7659..0c1ff981479 100644
--- a/packages/components/src/Loading/LoadingParagraph/_docs/LoadingParagraph.mdx
+++ b/packages/components/src/Loading/LoadingParagraph/_docs/LoadingParagraph.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation, LinkTo } from "~storybook/components"
-import * as LoadingParagraphStories from "./LoadingParagraph.stories"
+import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation, LinkTo } from '~storybook/components'
+import * as LoadingParagraphStories from './LoadingParagraph.stories'
diff --git a/packages/components/src/Loading/LoadingSpinner/_docs/LoadingSpinner.mdx b/packages/components/src/Loading/LoadingSpinner/_docs/LoadingSpinner.mdx
index d8ca623f94a..01b4e7f20ad 100644
--- a/packages/components/src/Loading/LoadingSpinner/_docs/LoadingSpinner.mdx
+++ b/packages/components/src/Loading/LoadingSpinner/_docs/LoadingSpinner.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as LoadingSpinnerStories from "./LoadingSpinner.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as LoadingSpinnerStories from './LoadingSpinner.stories'
@@ -44,4 +44,3 @@ Below is an example of how to apply the current color tokens used in designs.
Generally use `"md"` (default value) unless spinner is inside a form field, in which case use `sm`. The `xs` size is for buttons or content dense layouts.
-
diff --git a/packages/components/src/Modal/ConfirmationModal/_docs/ConfirmationModal.mdx b/packages/components/src/Modal/ConfirmationModal/_docs/ConfirmationModal.mdx
index 35b542f3a18..370be9c9247 100644
--- a/packages/components/src/Modal/ConfirmationModal/_docs/ConfirmationModal.mdx
+++ b/packages/components/src/Modal/ConfirmationModal/_docs/ConfirmationModal.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as ConfirmationModalStories from "./ConfirmationModal.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as ConfirmationModalStories from './ConfirmationModal.stories'
diff --git a/packages/components/src/Modal/ContextModal/_docs/ContextModal.mdx b/packages/components/src/Modal/ContextModal/_docs/ContextModal.mdx
index f926d995385..0e3949dd48e 100644
--- a/packages/components/src/Modal/ContextModal/_docs/ContextModal.mdx
+++ b/packages/components/src/Modal/ContextModal/_docs/ContextModal.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as ContextModalStories from "./ContextModal.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as ContextModalStories from './ContextModal.stories'
@@ -28,10 +28,13 @@ May be useful for first time users. Heavily optional. Visual aid is good. Primar
### Layout
#### Portrait (Default)
+
#### Landscape
+
### Unpadded
+
diff --git a/packages/components/src/Modal/GenericModal/_docs/GenericModal.mdx b/packages/components/src/Modal/GenericModal/_docs/GenericModal.mdx
index cf3aed3e618..f57b545709d 100644
--- a/packages/components/src/Modal/GenericModal/_docs/GenericModal.mdx
+++ b/packages/components/src/Modal/GenericModal/_docs/GenericModal.mdx
@@ -1,7 +1,7 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import { LinkTo } from "~storybook/components/LinkTo"
-import * as GenericModal from "./GenericModal.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import { LinkTo } from '~storybook/components/LinkTo'
+import * as GenericModal from './GenericModal.stories'
@@ -17,6 +17,7 @@ import * as GenericModal from "./GenericModal.stories"
## Overview
Usually part of compositions such as
+
Confirmation Modal,
Road block Modal,
Context Modal
diff --git a/packages/components/src/Modal/InputEditModal/_docs/InputEditModal.mdx b/packages/components/src/Modal/InputEditModal/_docs/InputEditModal.mdx
index 028d1425aad..5fe948ade55 100644
--- a/packages/components/src/Modal/InputEditModal/_docs/InputEditModal.mdx
+++ b/packages/components/src/Modal/InputEditModal/_docs/InputEditModal.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as InputEditModalStories from "./InputEditModal.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as InputEditModalStories from './InputEditModal.stories'
@@ -36,4 +36,3 @@ There are instances, such as single input modals, where shifting focus may not i
As both the button and input label have clear intent and the focus does not skip past crucial content, this should provide enough context for an end user.
-
diff --git a/packages/components/src/MultiSelect/_docs/MultiSelect.mdx b/packages/components/src/MultiSelect/_docs/MultiSelect.mdx
index 203ff81e1d3..70adadcce93 100644
--- a/packages/components/src/MultiSelect/_docs/MultiSelect.mdx
+++ b/packages/components/src/MultiSelect/_docs/MultiSelect.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as MultiSelectStories from "./MultiSelect.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as MultiSelectStories from './MultiSelect.stories'
@@ -33,7 +33,6 @@ export type MultiSelectOption = {
// Used for "value" attribute in option - must be unique
value: string | number
}
-
```
diff --git a/packages/components/src/Notification/GlobalNotification/_docs/GlobalNotification.mdx b/packages/components/src/Notification/GlobalNotification/_docs/GlobalNotification.mdx
index df7ff25b2b8..241ac9198dc 100644
--- a/packages/components/src/Notification/GlobalNotification/_docs/GlobalNotification.mdx
+++ b/packages/components/src/Notification/GlobalNotification/_docs/GlobalNotification.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta, Description} from "@storybook/blocks"
-import { KAIOInstallation, ResourceLinks } from "~storybook/components"
-import * as GlobalNotificationExamples from "./GlobalNotification.stories"
+import { Canvas, Controls, Meta, Description } from '@storybook/blocks'
+import { KAIOInstallation, ResourceLinks } from '~storybook/components'
+import * as GlobalNotificationExamples from './GlobalNotification.stories'
diff --git a/packages/components/src/Notification/InlineNotification/_docs/InlineNotification.mdx b/packages/components/src/Notification/InlineNotification/_docs/InlineNotification.mdx
index d4b950130d1..bcd4266fa9c 100644
--- a/packages/components/src/Notification/InlineNotification/_docs/InlineNotification.mdx
+++ b/packages/components/src/Notification/InlineNotification/_docs/InlineNotification.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta, Description} from "@storybook/blocks"
-import { KAIOInstallation, ResourceLinks } from "~storybook/components"
-import * as InlineNotificationExamples from "./InlineNotification.stories"
+import { Canvas, Controls, Meta, Description } from '@storybook/blocks'
+import { KAIOInstallation, ResourceLinks } from '~storybook/components'
+import * as InlineNotificationExamples from './InlineNotification.stories'
@@ -25,7 +25,6 @@ import * as InlineNotificationExamples from "./InlineNotification.stories"
-
### persistent
diff --git a/packages/components/src/Notification/ToastNotification/_docs/ToastNotification.mdx b/packages/components/src/Notification/ToastNotification/_docs/ToastNotification.mdx
index 5007f983be6..274620eebfd 100644
--- a/packages/components/src/Notification/ToastNotification/_docs/ToastNotification.mdx
+++ b/packages/components/src/Notification/ToastNotification/_docs/ToastNotification.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation, LinkTo } from "~storybook/components"
-import * as ToastNotificationStories from "./ToastNotification.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation, LinkTo } from '~storybook/components'
+import * as ToastNotificationStories from './ToastNotification.stories'
diff --git a/packages/components/src/Pagination/_docs/Pagination.mdx b/packages/components/src/Pagination/_docs/Pagination.mdx
index 3c1abace61f..5668d37a0b9 100644
--- a/packages/components/src/Pagination/_docs/Pagination.mdx
+++ b/packages/components/src/Pagination/_docs/Pagination.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as PaginationStories from "./Pagination.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as PaginationStories from './Pagination.stories'
diff --git a/packages/components/src/Pagination/subcomponents/DirectionalLink/_docs/DirectionalLink.mdx b/packages/components/src/Pagination/subcomponents/DirectionalLink/_docs/DirectionalLink.mdx
index f36cd1b89b6..bc3d0025b36 100644
--- a/packages/components/src/Pagination/subcomponents/DirectionalLink/_docs/DirectionalLink.mdx
+++ b/packages/components/src/Pagination/subcomponents/DirectionalLink/_docs/DirectionalLink.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation, LinkTo } from "~storybook/components"
-import * as DirectionalLinkStories from "./DirectionalLink.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation, LinkTo } from '~storybook/components'
+import * as DirectionalLinkStories from './DirectionalLink.stories'
diff --git a/packages/components/src/Pagination/subcomponents/PaginationLink/_docs/PaginationLink.mdx b/packages/components/src/Pagination/subcomponents/PaginationLink/_docs/PaginationLink.mdx
index ad2f0065e6c..0467e634dc2 100644
--- a/packages/components/src/Pagination/subcomponents/PaginationLink/_docs/PaginationLink.mdx
+++ b/packages/components/src/Pagination/subcomponents/PaginationLink/_docs/PaginationLink.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation, LinkTo } from "~storybook/components"
-import * as PaginationLinkStories from "./PaginationLink.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation, LinkTo } from '~storybook/components'
+import * as PaginationLinkStories from './PaginationLink.stories'
diff --git a/packages/components/src/Popover/_docs/Popover.mdx b/packages/components/src/Popover/_docs/Popover.mdx
index e5db930fa74..b40dcf4567a 100644
--- a/packages/components/src/Popover/_docs/Popover.mdx
+++ b/packages/components/src/Popover/_docs/Popover.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as PopoverStories from "./Popover.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as PopoverStories from './Popover.stories'
@@ -30,12 +30,14 @@ User can interact with popover content, including selecting text or clicking lin
```jsx
const [referenceElementRef, Popover] = usePopover()
-return (<>
-
- Hello world
->)
+return (
+ <>
+
+ Hello world
+ >
+)
```
The purpose of this hook is to abstract away some of the awkwardness with the
@@ -43,4 +45,4 @@ requirement of passing in refs with popper. We need to use `useState` instead
of `useRef`, which may not be immediately intuitive.
The popper documentation to help provide more context:
- https://popper.js.org/react-popper/v2/hook/
+https://popper.js.org/react-popper/v2/hook/
diff --git a/packages/components/src/ProgressBar/_docs/ProgressBar.mdx b/packages/components/src/ProgressBar/_docs/ProgressBar.mdx
index 1081821a86b..9e6cd94c494 100644
--- a/packages/components/src/ProgressBar/_docs/ProgressBar.mdx
+++ b/packages/components/src/ProgressBar/_docs/ProgressBar.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as ProgressBarStories from "./ProgressBar.stories"
+import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as ProgressBarStories from './ProgressBar.stories'
@@ -46,5 +46,4 @@ While `value` and `max` can be used to represent progress as either a percentage
Due to the optional `label` prop, the progress bar does not have an accessible name. You can provide context for assistive technologies with aria attributes such as `aria-label` or `aria-labelledby`.
-
diff --git a/packages/components/src/Radio/Radio/_docs/Radio.mdx b/packages/components/src/Radio/Radio/_docs/Radio.mdx
index 83ea7ec3ce5..d06781eaf85 100644
--- a/packages/components/src/Radio/Radio/_docs/Radio.mdx
+++ b/packages/components/src/Radio/Radio/_docs/Radio.mdx
@@ -1,7 +1,7 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import { LinkTo } from "~storybook/components/LinkTo"
-import * as RadioStories from "./Radio.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import { LinkTo } from '~storybook/components/LinkTo'
+import * as RadioStories from './Radio.stories'
diff --git a/packages/components/src/Radio/RadioField/_docs/RadioField.mdx b/packages/components/src/Radio/RadioField/_docs/RadioField.mdx
index 4718809dcab..3ab6a927a37 100644
--- a/packages/components/src/Radio/RadioField/_docs/RadioField.mdx
+++ b/packages/components/src/Radio/RadioField/_docs/RadioField.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as RadioFieldStories from "./RadioField.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as RadioFieldStories from './RadioField.stories'
diff --git a/packages/components/src/Radio/RadioGroup/_docs/RadioGroup.mdx b/packages/components/src/Radio/RadioGroup/_docs/RadioGroup.mdx
index 3edfac75346..65294147bed 100644
--- a/packages/components/src/Radio/RadioGroup/_docs/RadioGroup.mdx
+++ b/packages/components/src/Radio/RadioGroup/_docs/RadioGroup.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as RadioGroupStories from "./RadioGroup.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as RadioGroupStories from './RadioGroup.stories'
diff --git a/packages/components/src/RichTextEditor/EditableRichTextContent/_docs/EditableRichTextContent.mdx b/packages/components/src/RichTextEditor/EditableRichTextContent/_docs/EditableRichTextContent.mdx
index 9e8fb63768d..34297e4d4ba 100644
--- a/packages/components/src/RichTextEditor/EditableRichTextContent/_docs/EditableRichTextContent.mdx
+++ b/packages/components/src/RichTextEditor/EditableRichTextContent/_docs/EditableRichTextContent.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as EditableRichTextContentStories from "./EditableRichTextContent.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as EditableRichTextContentStories from './EditableRichTextContent.stories'
@@ -26,12 +26,11 @@ The `EditableRichTextContent` indicates interactivity similar to a `text` or `te
This differs from the [RichTextContent](/docs/components-richtexteditor-richtextcontent--docs) component, which is used to render `RichTextEditor` content as read-only text.
-
```tsx
-const [editMode, setEditMode] = useState(false);
-const [rteData, setRTEData] = useState([]);
+const [editMode, setEditMode] = useState(false)
+const [rteData, setRTEData] = useState([])
-const handleOnChange: RichTextEditorProps["onChange"] = editorState =>
+const handleOnChange: RichTextEditorProps['onChange'] = (editorState) =>
setRTEData(editorState.toJSON().doc.content)
if (editMode) {
@@ -43,9 +42,7 @@ if (editMode) {
)
}
-return (
- setEditMode(true)} />
-)
+return setEditMode(true)} />
```
diff --git a/packages/components/src/RichTextEditor/RichTextContent/_docs/RichTextContent.mdx b/packages/components/src/RichTextEditor/RichTextContent/_docs/RichTextContent.mdx
index d694755239b..07664a70d75 100644
--- a/packages/components/src/RichTextEditor/RichTextContent/_docs/RichTextContent.mdx
+++ b/packages/components/src/RichTextEditor/RichTextContent/_docs/RichTextContent.mdx
@@ -1,6 +1,6 @@
-import { Canvas, Controls, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as RichTextContentStories from "./RichTextContent.stories"
+import { Canvas, Controls, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as RichTextContentStories from './RichTextContent.stories'
@@ -20,7 +20,6 @@ To render rich content as it appears in the [RichTextEditor](/docs/components-ri
-
## Usage
A common use case of `RichTextContent` is to display user generated output as read-only text.
@@ -28,4 +27,3 @@ A common use case of `RichTextContent` is to display user generated output as re
This should not be used out of the box to toggle between active and inactive states of the `RichTextEditor`. Instead we recommend using the [EditableRichTextContent](/docs/components-richtexteditor-editablerichtextcontent--docs#usage) pattern, which indicates interactivity to the user and ensures compliance with WCAG guidelines.
-
diff --git a/packages/components/src/RichTextEditor/RichTextEditor/_docs/RichTextEditor.mdx b/packages/components/src/RichTextEditor/RichTextEditor/_docs/RichTextEditor.mdx
index d73977c5993..761951c3680 100644
--- a/packages/components/src/RichTextEditor/RichTextEditor/_docs/RichTextEditor.mdx
+++ b/packages/components/src/RichTextEditor/RichTextEditor/_docs/RichTextEditor.mdx
@@ -1,8 +1,8 @@
-import { Canvas, Controls, DocsStory, Meta } from "@storybook/blocks"
-import { ResourceLinks, KAIOInstallation } from "~storybook/components"
-import * as EditableRichTextContentStories from "../../EditableRichTextContent/_docs/EditableRichTextContent.stories"
-import * as RichTextContentStories from "../../RichTextContent/_docs/RichTextContent.stories"
-import * as RichTextEditorStories from "./RichTextEditor.stories"
+import { Canvas, Controls, DocsStory, Meta } from '@storybook/blocks'
+import { ResourceLinks, KAIOInstallation } from '~storybook/components'
+import * as EditableRichTextContentStories from '../../EditableRichTextContent/_docs/EditableRichTextContent.stories'
+import * as RichTextContentStories from '../../RichTextContent/_docs/RichTextContent.stories'
+import * as RichTextEditorStories from './RichTextEditor.stories'
@@ -40,7 +40,6 @@ With all controls, the Kaizen `RichTextEditor` can create and render formatted t
-
### The EditorContentArray and defaultValue
The `defaultValue` is the initial content of the `RichTextEditor`. It accepts an array of objects in the [ProseMirror's rich text format](https://cultureamp.atlassian.net/wiki/spaces/TV/pages/3380543671/ProseMirror+rich+formatted+text+data+format).
@@ -64,13 +63,14 @@ For example: if your `defaultValue` contains bolded text, you must pass bold int
```
### Data errors and onDataError
+
When content is passed to the `defaultValue` that does not match to the `RichTextEditor`'s [schema](https://github.com/cultureamp/kaizen-design-system/blob/main/packages/components/src/RichTextEditor/RichTextEditor/schema.ts), the component will throw and render a generic error.
This will also throw if you have passed in an `EditorContentArray` that contains data that cannot map to the `controls` provided to the component.
-