diff --git a/apps/browser/src/platform/popup/layout/popup-layout.mdx b/apps/browser/src/platform/popup/layout/popup-layout.mdx
index 5723bef44b1..b93c649d695 100644
--- a/apps/browser/src/platform/popup/layout/popup-layout.mdx
+++ b/apps/browser/src/platform/popup/layout/popup-layout.mdx
@@ -100,9 +100,7 @@ Usage example:
### Transparent header
-
-
-
+
Common interactive elements to insert into the `end` slot are:
@@ -113,9 +111,7 @@ Common interactive elements to insert into the `end` slot are:
### Notice
-
-
-
+
Common interactive elements to insert into the `full-width-notice` slot are:
@@ -160,29 +156,21 @@ View the story source code to see examples of how to construct these types of pa
Example of wrapping an extension page in the `popup-tab-navigation` component.
-
-
-
+
## Extension Page
Examples of using just the `popup-page` component, without and with a footer.
-
-
-
+
-
-
-
+
## Popped out
When the browser extension is popped out, the "popout" button should not be passed to the header.
-
-
-
+
# Other stories
@@ -190,14 +178,10 @@ When the browser extension is popped out, the "popout" button should not be pass
An example of how to center the default content.
-
-
-
+
## Loading
An example of what the loading state looks like.
-
-
-
+
diff --git a/libs/components/src/avatar/avatar.mdx b/libs/components/src/avatar/avatar.mdx
index 0f3f6f06a9b..627ba526ed9 100644
--- a/libs/components/src/avatar/avatar.mdx
+++ b/libs/components/src/avatar/avatar.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
+import { Meta, Canvas, Primary, Controls } from "@storybook/addon-docs";
import * as stories from "./avatar.stories";
@@ -18,15 +18,15 @@ visual indicator to recognize which of a personal or work account a user is logg
### Large: 64px
-
+
### Default: 48px
-
+
### Small 28px
-
+
## Background color
@@ -37,9 +37,9 @@ priority:
- ID
- Text, usually set to the user's Name field
-
+
Use the user 'ID' field if `Name` is not defined.
-
+
## Outline
@@ -47,7 +47,7 @@ If the avatar is displayed on one of the theme's `background` color variables or
display the avatar with a 1 pixel `secondary-600` border to meet WCAG AA graphic contrast guidelines
for interactive elements.
-
+
## Avatar as a button
diff --git a/libs/components/src/badge/badge.mdx b/libs/components/src/badge/badge.mdx
index fb2dceb0fa8..55f32183899 100644
--- a/libs/components/src/badge/badge.mdx
+++ b/libs/components/src/badge/badge.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
+import { Meta, Canvas, Primary, Controls } from "@storybook/addon-docs";
import * as stories from "./badge.stories";
@@ -31,39 +31,39 @@ The story below uses the `` element to demonstrate all the possible stat
The primary badge is used to indicate an active status (example: device management page) or provide
additional information (example: type of emergency access granted).
-
+
### Secondary
The secondary badge style is typically is a default badge style. It is often used to indicate
neutral information.
-
+
### Success
The success badge is used to indicate a positive status, OR to indicate a feature requires a Premium
subscription. See [Premium Badge](?path=/docs/web-premium-badge--docs)
-
+
### Danger
The danger badge is used to indicate a negative status.
-
+
### Warning
The warning badge is used to indicate a status waiting on an additional action from the active user.
-
+
### Info
The info badge is used to indicate a low emphasis informative information.
-
+
## Badges as counters
diff --git a/libs/components/src/banner/banner.mdx b/libs/components/src/banner/banner.mdx
index d5b6a3b5279..67fb796a548 100644
--- a/libs/components/src/banner/banner.mdx
+++ b/libs/components/src/banner/banner.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Controls, Canvas, Primary } from "@storybook/addon-docs";
+import { Meta, Controls, Canvas, Primary } from "@storybook/addon-docs";
import * as stories from "./banner.stories";
@@ -31,25 +31,25 @@ Use the following guidelines to help choose the correct type of banner.
### Premium
-
+
Used primarily to encourage user to upgrade to premium.
### Info
-
+
Used to communicate release notes, server maintenance or other informative event.
### Warning
-
+
Used to alert the user of outdated info or versions.
### Danger
-
+
Rarely used, but may be used to alert users over critical messages or very outdated versions.
diff --git a/libs/components/src/breadcrumbs/breadcrumbs.mdx b/libs/components/src/breadcrumbs/breadcrumbs.mdx
index 9dd23c530d1..1ea0aff8c36 100644
--- a/libs/components/src/breadcrumbs/breadcrumbs.mdx
+++ b/libs/components/src/breadcrumbs/breadcrumbs.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
+import { Meta, Canvas, Primary, Controls } from "@storybook/addon-docs";
import * as stories from "./breadcrumbs.stories";
@@ -23,7 +23,7 @@ See [Header with Breadcrumbs](?path=/story/web-header--with-breadcrumbs).
When a user is 1 level deep into a tree, the top level is displayed as a single link above the page
title.
-
+
### Second Level
@@ -31,7 +31,7 @@ When a user is 2 or more levels deep into a tree, the top level is displayed fol
icon, and the following pages.
-
+
### Overflow
@@ -42,7 +42,7 @@ When a user is several levels deep into a tree, the top level or 2 are displayed
When the user selects the icon button, a menu opens displaying
the pages between the top level and the previous page.
-
+
### Small screens
diff --git a/libs/components/src/button/button.mdx b/libs/components/src/button/button.mdx
index 33e4aed19f7..21c992982d8 100644
--- a/libs/components/src/button/button.mdx
+++ b/libs/components/src/button/button.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
+import { Meta, Canvas, Primary, Controls } from "@storybook/addon-docs";
import * as stories from "./button.stories";
@@ -43,14 +43,14 @@ There are 3 main styles for the button: Primary, Secondary, and Danger.
### Primary
-
+
Use the primary button styling for all Primary call to actions. An action is "primary" if it relates
to the main purpose of a page. There should never be 2 primary styled buttons next to each other.
### Secondary
-
+
The secondary styling should be used for secondary calls to action. An action is "secondary" if it
relates indirectly to the purpose of a page. There may be multiple secondary buttons next to each
@@ -58,20 +58,20 @@ other; however, generally there should only be 1 or 2 calls to action per page.
### Danger
-
+
Use the danger styling only in settings when the user may preform a permanent action.
## Disabled UI
-
+
## Block
Typically button widths expand with their text. In some causes though buttons may need to be block
where the width is fixed and the text wraps to 2 lines if exceeding the button’s width.
-
+
## Accessibility
@@ -96,7 +96,7 @@ Both submit and async action buttons use a loading button state while an action
button is preforming a long running task in the background like a server API call, be sure to review
the [Async Actions Directive](?path=/story/component-library-async-actions-overview--page).
-
+
### appA11yTitle
diff --git a/libs/components/src/callout/callout.mdx b/libs/components/src/callout/callout.mdx
index 3fdb53943b4..160b1e1cc33 100644
--- a/libs/components/src/callout/callout.mdx
+++ b/libs/components/src/callout/callout.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
+import { Meta, Canvas, Primary, Controls } from "@storybook/addon-docs";
import * as stories from "./callout.stories";
@@ -28,7 +28,7 @@ Use the success callout to communicate a positive messaging to the user.
The success callout may also be used for the information related to a premium membership. In this
case, replace the icon with
-
+
### Info
@@ -39,7 +39,7 @@ information.
**Example:** in the Domain Claiming modal, an info callout is used to tell the user the domain will
automatically be checked.
-
+
### Warning
@@ -49,7 +49,7 @@ irreversible results.
**Example:** the warning callout is used before the change master password and encryption key form
to alert the user that they will be logged out.
-
+
### Danger
@@ -59,7 +59,7 @@ not reversible.
The danger callout can also be used to alert the user of an error or errors, such as a server side
errors after form submit or failed communication request.
-
+
## Accessibility
diff --git a/libs/components/src/chip-select/chip-select.mdx b/libs/components/src/chip-select/chip-select.mdx
index 90bc7556209..d569158b75a 100644
--- a/libs/components/src/chip-select/chip-select.mdx
+++ b/libs/components/src/chip-select/chip-select.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Primary, Controls, Canvas } from "@storybook/addon-docs";
+import { Meta, Primary, Controls, Canvas } from "@storybook/addon-docs";
import * as stories from "./chip-select.stories";
@@ -12,9 +12,7 @@ import { ChipSelectComponent } from "@bitwarden/components";
`` is a select element that is commonly used to filter items in lists or tables.
-
-
-
+
## Options
@@ -91,9 +89,7 @@ const options = [
];
```
-
-
-
+
## Placeholder Content
diff --git a/libs/components/src/color-password/color-password.mdx b/libs/components/src/color-password/color-password.mdx
index d01c81b0073..8f3746715e1 100644
--- a/libs/components/src/color-password/color-password.mdx
+++ b/libs/components/src/color-password/color-password.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
+import { Meta, Canvas, Primary, Controls } from "@storybook/addon-docs";
import * as stories from "./color-password.stories";
@@ -18,15 +18,15 @@ the logic for displaying letters as `text-main`, numbers as `primary`, and speci
The password count option is used in the Login type form. It is used to highlight each character's
position in the password string.
-
+
## Wrapped Password
When the password length is longer than the container's width, it should wrap as shown below.
-
+
-
+
## Accessibility
diff --git a/libs/components/src/dialog/dialog/dialog.mdx b/libs/components/src/dialog/dialog/dialog.mdx
index c05bdd45445..1806958210e 100644
--- a/libs/components/src/dialog/dialog/dialog.mdx
+++ b/libs/components/src/dialog/dialog/dialog.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
+import { Meta, Canvas, Primary, Controls } from "@storybook/addon-docs";
import * as stories from "./dialog.stories";
@@ -35,7 +35,7 @@ Use the large size for dialogs that have many interactive elements or tabbed con
`max-w-3xl` 48rem
-
+
### Default
@@ -46,7 +46,7 @@ Use the Default size for most dialogs that require some content and a few intera
`max-w-xl` 36rem
-
+
### Small
@@ -54,31 +54,31 @@ Use the Default size for most dialogs that require some content and a few intera
`max-w-sm` 24rem
-
+
## Long Title
If a dialog's title is too long to fully display. It should be truncated and on hover shown in a
tooltip.
-
+
## Loading
Similar to a page loading state, a Dialog that takes more than a few seconds to load should use a
loading state.
-
+
## Tab Content
Use tabs to separate related content within a dialog.
-
+
## Background Color
The `background` input can be set to `alt` to change the background color. This is useful for
dialogs that contain multiple card sections.
-
+
diff --git a/libs/components/src/dialog/dialogs.mdx b/libs/components/src/dialog/dialogs.mdx
index b5861aefe5c..63df0bfc131 100644
--- a/libs/components/src/dialog/dialogs.mdx
+++ b/libs/components/src/dialog/dialogs.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Source } from "@storybook/addon-docs";
+import { Meta, Canvas, Source } from "@storybook/addon-docs";
import * as stories from "./dialog.service.stories";
@@ -30,7 +30,7 @@ dialog should become scrollable.
A backdrop should be used to hide the content below the dialog. Use `#000000` with `30% opacity`.
-
+
## Accessibility
diff --git a/libs/components/src/dialog/simple-dialog/simple-dialog.mdx b/libs/components/src/dialog/simple-dialog/simple-dialog.mdx
index d188b3598e4..e3ed2fcf698 100644
--- a/libs/components/src/dialog/simple-dialog/simple-dialog.mdx
+++ b/libs/components/src/dialog/simple-dialog/simple-dialog.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
+import { Meta, Canvas, Primary, Controls } from "@storybook/addon-docs";
import * as stories from "./simple-dialog.stories";
@@ -48,4 +48,4 @@ the simple dialog's type is specified.
Simple dialogs can support scrolling content if necessary, but typically with larger quantities of
content a [Dialog component](?path=/docs/component-library-dialogs-dialog--docs).
-
+
diff --git a/libs/components/src/disclosure/disclosure.mdx b/libs/components/src/disclosure/disclosure.mdx
index 8df8e7025b8..2fcff6f5982 100644
--- a/libs/components/src/disclosure/disclosure.mdx
+++ b/libs/components/src/disclosure/disclosure.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
+import { Meta, Canvas, Primary, Controls } from "@storybook/addon-docs";
import * as stories from "./disclosure.stories";
@@ -34,7 +34,7 @@ To compose a disclosure and trigger:
click button to hide this content
```
-
+
diff --git a/libs/components/src/drawer/drawer.mdx b/libs/components/src/drawer/drawer.mdx
index 0098ce64ea9..57d618cfe95 100644
--- a/libs/components/src/drawer/drawer.mdx
+++ b/libs/components/src/drawer/drawer.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
+import { Meta, Canvas, Primary, Controls } from "@storybook/addon-docs";
import * as stories from "./drawer.stories";
@@ -83,13 +83,13 @@ directive:
Only one drawer can be open at a time, and they do not stack. If a drawer is already open, opening
another will close and replace the one already open.
-
+
## Headless
Omitting `bit-drawer-header` and `bit-drawer-body` allows for fully customizable content.
-
+
## Accessibility
@@ -117,4 +117,4 @@ Omitting `bit-drawer-header` and `bit-drawer-body` allows for fully customizable
## Kitchen Sink
-
+
diff --git a/libs/components/src/form/forms.mdx b/libs/components/src/form/forms.mdx
index fbb3a20e518..e3baf200f96 100644
--- a/libs/components/src/form/forms.mdx
+++ b/libs/components/src/form/forms.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Source } from "@storybook/addon-docs";
+import { Meta, Canvas, Source } from "@storybook/addon-docs";
import * as formStories from "./form.stories";
import * as fieldStories from "../form-field/form-field.stories";
@@ -17,7 +17,7 @@ Component Library forms should always be built using [Angular Reactive Forms][re
[ADR-0001][adr-0001] for a background to this decision. In practice this means that forms should
always use the native `form` element and bind a `formGroup`.
-
+
@@ -69,25 +69,25 @@ is too long, such as info link buttons or badges.
#### Default with required attribute
-
+
#### Password Toggle
-
+
### Search
-
+
### Selects
#### Searchable single select (default)
-
+
#### Multi-select
-
+
### Radio group
@@ -113,11 +113,11 @@ using a radio group for more than 5 options even if the options require addition
#### Block
-
+
#### Inline
-
+
### Checkbox
@@ -140,7 +140,7 @@ If a checkbox group has more than 4 options a
#### Single checkbox
-
+
## Accessibility
diff --git a/libs/components/src/icon-button/icon-button.mdx b/libs/components/src/icon-button/icon-button.mdx
index a45160d7884..85164717de7 100644
--- a/libs/components/src/icon-button/icon-button.mdx
+++ b/libs/components/src/icon-button/icon-button.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
+import { Meta, Canvas, Primary, Controls } from "@storybook/addon-docs";
import * as stories from "./icon-button.stories";
@@ -38,48 +38,48 @@ button component styles.
Used for general icon buttons appearing on the theme’s main `background`
-
+
### Muted
Used for low emphasis icon buttons appearing on the theme’s main `background`
-
+
### Contrast
Used on a theme’s colored or contrasting backgrounds such as in the navigation or on toasts and
banners.
-
+
### Danger
Danger is used for “trash” actions throughout the experience, most commonly in the bottom right of
the dialog component.
-
+
### Primary
Used in place of the main button component if no text is used. This allows the button to display
square.
-
+
### Secondary
Used in place of the main button component if no text is used. This allows the button to display
square.
-
+
### Light
Used on a background that is dark in both light theme and dark theme. Example: end user navigation
styles.
-
+
**Note:** Main and contrast styles appear on backgrounds where using `primary-700` as a focus
indicator does not meet WCAG graphic contrast guidelines.
@@ -93,11 +93,11 @@ with less padding around the icon, such as in the navigation component.
### Small
-
+
### Default
-
+
## Accessibility
diff --git a/libs/components/src/item/item.mdx b/libs/components/src/item/item.mdx
index ab39e738b26..d3e6065487a 100644
--- a/libs/components/src/item/item.mdx
+++ b/libs/components/src/item/item.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
+import { Meta, Canvas, Primary, Controls } from "@storybook/addon-docs";
import * as stories from "./item.stories";
@@ -15,14 +15,14 @@ import { ItemModule } from "@bitwarden/components";
It is a generic container that can be used for either standalone content, an alternative to tables,
or to list nav links.
-
+
Items used within a parent `bit-layout` component will not have a border radius, since the
`bit-layout` background is white.
-
+
@@ -49,7 +49,7 @@ The content can be a button, anchor, or static container.
```
-
+
### Content Slots
@@ -82,7 +82,7 @@ The content can be a button, anchor, or static container.
```
-
+
## Secondary Actions
@@ -129,19 +129,19 @@ This can be changed by passing `[truncate]="false"` to the `bit-item-content`.
### Truncation (Default)
-
+
### Wrap
-
+
## Item Groups
Groups of items can be associated by wrapping them in the ``.
-
+
-
+
### A11y
@@ -162,4 +162,4 @@ Use `aria-label` or `aria-labelledby` to give groups an accessible name.
### Virtual Scrolling
-
+
diff --git a/libs/components/src/menu/menu.mdx b/libs/components/src/menu/menu.mdx
index 67c276cf372..d77dc0a7d7b 100644
--- a/libs/components/src/menu/menu.mdx
+++ b/libs/components/src/menu/menu.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
+import { Meta, Canvas, Primary, Controls } from "@storybook/addon-docs";
import * as stories from "./menu.stories";
@@ -9,7 +9,7 @@ import * as stories from "./menu.stories";
Menus are used to help organize related options. Menus are most often used for item options in
tables.
-
+
diff --git a/libs/components/src/popover/popover.mdx b/libs/components/src/popover/popover.mdx
index 7b47b160ddc..17762acbdfb 100644
--- a/libs/components/src/popover/popover.mdx
+++ b/libs/components/src/popover/popover.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
+import { Meta, Canvas, Primary, Controls } from "@storybook/addon-docs";
import * as stories from "./popover.stories";
@@ -66,7 +66,7 @@ not work because there is not enough space to open the Popover to the right. The
The first position that "fits" is `left-start`, and therefore that is where the Popover will open.
-
+
### Manually Setting a Position
@@ -77,7 +77,7 @@ Popover's trigger element, such as:
Open Popover
```
-
+
Note that if the user resizes the page and the Popover no longer fits in the viewport, the Popover
component will fall back to the list of default positions to find the best position.
diff --git a/libs/components/src/progress/progress.mdx b/libs/components/src/progress/progress.mdx
index 185d6214f1f..9a75f8ae1fa 100644
--- a/libs/components/src/progress/progress.mdx
+++ b/libs/components/src/progress/progress.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
+import { Meta, Canvas, Primary, Controls } from "@storybook/addon-docs";
import * as stories from "./progress.stories";
@@ -19,14 +19,14 @@ allows those who may not be familiar with the pattern to be able to read and dig
It also allows assistive technology to accurately describe the indicator to those who may be unable
to see part or all of the indicator.
-
+
## Text label
When measuring something other than progress, such as password strength, update the label to fit the
context of the implementation.
-
+
### Strength indicator styles
diff --git a/libs/components/src/section/section.mdx b/libs/components/src/section/section.mdx
index 52672ad59fb..92798420479 100644
--- a/libs/components/src/section/section.mdx
+++ b/libs/components/src/section/section.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story, Primary, Controls, Canvas } from "@storybook/addon-docs";
+import { Meta, Primary, Controls, Canvas } from "@storybook/addon-docs";
import * as stories from "./section.stories";
@@ -26,9 +26,7 @@ the `disableMargin` input.
```
-
-
-
+
## Section Header
@@ -61,16 +59,12 @@ padding to align the header with the border radius of the card/item.
```
-
-
-
+
If placed inside of a section without a `bit-card` or `bit-item`, or with a `bit-card`/`bit-item`
that is not a descendant of the immediate next sibling, the padding is not applied.
-
-
-
+
### Section Header Content Slots
@@ -89,14 +83,10 @@ Anything passed to the default slot will display as part of the title. The title
Title suffixes (typically an icon or icon button) can be added as well. A gap is automatically
applied between the children of the default slot.
-
-
-
+
#### End slot
The `end` slot will typically be used for text or an icon button.
-
-
-
+
diff --git a/libs/components/src/stories/compact-mode.mdx b/libs/components/src/stories/compact-mode.mdx
index 800bc34cf6a..3cffd45847a 100644
--- a/libs/components/src/stories/compact-mode.mdx
+++ b/libs/components/src/stories/compact-mode.mdx
@@ -1,4 +1,4 @@
-import { Meta, Story } from "@storybook/addon-docs";
+import { Meta, Story, Canvas } from "@storybook/addon-docs";
import * as itemStories from "../item/item.stories";
import * as popupLayoutStories from "../../../../apps/browser/src/platform/popup/layout/popup-layout.stories";
@@ -42,4 +42,4 @@ However, styling with the Tailwind variant should be used when possible as it is
### [Item](?path=/story/component-library-item--compact-mode)
-
+
diff --git a/libs/components/src/tabs/tabs.mdx b/libs/components/src/tabs/tabs.mdx
index 3be98e34257..bab5fbb52c4 100644
--- a/libs/components/src/tabs/tabs.mdx
+++ b/libs/components/src/tabs/tabs.mdx
@@ -1,6 +1,7 @@
-import { Meta, Story, Primary, Controls } from "@storybook/addon-docs";
+import { Meta, Canvas, Primary, Controls } from "@storybook/addon-docs";
import * as stories from "./tabs.stories";
+import * as dialogStories from "../dialog/dialog/dialog.stories";
@@ -17,17 +18,17 @@ and 1rem of padding on the left and right.
## Content Tabs
-
+
## Navigation Tabs
-
+
## Content tabs in dialogs
Tabs can be used in dialogs to separate related content.
-
+
## Accessibility
diff --git a/libs/components/src/typography/typography.mdx b/libs/components/src/typography/typography.mdx
index 11b37bb53b4..d8439481dbc 100644
--- a/libs/components/src/typography/typography.mdx
+++ b/libs/components/src/typography/typography.mdx
@@ -22,4 +22,4 @@ For headings, note that the semantic element and the text style may not always b
Semantically, I am an h2, but I use h5 styles.
```
-
+