diff --git a/packages/odyssey-storybook/.storybook/components/ThemeTable.tsx b/packages/odyssey-storybook/.storybook/components/ThemeTable.tsx
new file mode 100644
index 0000000000..08192b2e34
--- /dev/null
+++ b/packages/odyssey-storybook/.storybook/components/ThemeTable.tsx
@@ -0,0 +1,78 @@
+/*!
+ * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
+ *
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and limitations under the License.
+ */
+
+/* eslint-disable import/no-extraneous-dependencies */
+import React from "react";
+import type { Theme, ThemeReducer } from "@okta/odyssey-react-theme";
+import { tokens } from "@okta/odyssey-react-theme/dist/ThemeProvider/context";
+import type { ThemeKey } from "@okta/odyssey-react-theme/dist/ThemeProvider/context";
+import { Table, Text } from "@okta/odyssey-react";
+/* eslint-enable import/no-extraneous-dependencies */
+import type { ReactNode } from "react";
+
+type ThemeTableProps = {
+ componentThemeReducer: ThemeReducer;
+};
+
+const ThemeTable = ({ componentThemeReducer }: ThemeTableProps): ReactNode => {
+ const remappedTokens: { [key: string]: string } = {};
+ for (const [k] of Object.entries(tokens)) {
+ remappedTokens[k] = k;
+ }
+ const componentVariables = componentThemeReducer(
+ remappedTokens as unknown as Theme
+ );
+
+ function getTokenValue(tokenName: string | number): string | number | null {
+ let tokenValue = null;
+ let p: ThemeKey;
+ for (p in tokens) {
+ if (p === tokenName) {
+ tokenValue = tokens[p];
+ }
+ }
+ return tokenValue;
+ }
+
+ return (
+
+
+
+ Variable Name
+ Token Value
+
+
+
+
+ {Object.keys(componentVariables).map((variable) => (
+
+
+ {variable}
+
+
+ {componentVariables[variable]}
+
+
+
+ {getTokenValue(componentVariables[variable])
+ ? `(${getTokenValue(componentVariables[variable])})`
+ : ""}
+
+
+
+ ))}
+
+
+ );
+};
+
+export { ThemeTable };
diff --git a/packages/odyssey-storybook/.storybook/components/TokenTables.tsx b/packages/odyssey-storybook/.storybook/components/TokenTables.tsx
new file mode 100644
index 0000000000..1e002260d9
--- /dev/null
+++ b/packages/odyssey-storybook/.storybook/components/TokenTables.tsx
@@ -0,0 +1,240 @@
+/*!
+ * Copyright (c) 2022-present, Okta, Inc. and/or its affiliates. All rights reserved.
+ * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
+ *
+ * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *
+ * See the License for the specific language governing permissions and limitations under the License.
+ */
+
+/* eslint-disable import/no-extraneous-dependencies */
+import React, { useState, useEffect } from "react";
+import * as Tokens from "@okta/odyssey-design-tokens";
+import { Table, Text } from "@okta/odyssey-react";
+/* eslint-enable import/no-extraneous-dependencies */
+import type { ReactNode } from "react";
+
+type FontWeight = 400 | 600;
+
+type Token = {
+ name: string;
+ value: string | number;
+};
+
+type TableData = {
+ name: string;
+ values: Array;
+};
+
+type TokenName = keyof typeof Tokens;
+
+const TokenTables = (): ReactNode => {
+ const [tables, setTables] = useState>([]);
+
+ useEffect(() => {
+ const tokenKeys = Object.keys(Tokens);
+ const tempTables: Array = [];
+ let currentType: string;
+ let currentValues: Array;
+ tokenKeys.forEach((tokenName) => {
+ const parts = tokenName.match(/[A-Z][a-z]+/g);
+ if (!parts) return;
+
+ let tokenType = parts[0];
+ if (parts[0] === "Color") {
+ tokenType = `${parts[1]} ${parts[0]}s`;
+ }
+
+ if (tokenType !== currentType) {
+ currentValues = [];
+ tempTables.push({ name: tokenType, values: currentValues });
+ currentType = tokenType;
+ }
+
+ currentValues.push({
+ name: tokenName,
+ value: Tokens[tokenName as TokenName],
+ });
+ });
+
+ tempTables
+ .find((table) => table.name === "Palette Colors")
+ ?.values.sort((a: Token, b: Token) => {
+ const nameA = a.name.toUpperCase();
+ const nameB = b.name.toUpperCase();
+ if (nameA < nameB) {
+ return -1;
+ }
+ if (nameA > nameB) {
+ return 1;
+ }
+ return 0;
+ });
+
+ setTables(tempTables);
+ }, [setTables]);
+
+ const renderBorder = (token: Token) => (
+
+ );
+
+ const renderColor = (val: string | number) => (
+
+ );
+
+ const renderColorText = (val: string | number) => (
+
+ Aa
+
+ );
+
+ const renderSpace = (val: string | number) => (
+
+ );
+
+ const renderFont = (token: Token) => (
+
+ Waltz, bad nymph, for quick jigs vex!
+
+ );
+
+ const renderFocus = (val: string | number) => (
+
+ );
+
+ const renderShadow = (val: string | number) => (
+
+ );
+
+ function getDisplayedValue(tableName: string, val: string | number) {
+ if (!tableName.includes("Colors") || tableName === "Palette Colors") {
+ return val;
+ }
+ const tokenValue = tables
+ .find((table) => table.name === "Palette Colors")
+ ?.values.find((value) => value.value === val) ?? { name: "" };
+ return tokenValue.name;
+ }
+
+ return (
+ <>
+ {tables.map((table) => (
+
+
+
+ Token Name
+ Example
+ Value
+
+
+
+ {table.values.map((token: Token) => (
+
+
+ {token.name}
+
+
+ {token.name.includes("Border") &&
+ !token.name.includes("ColorBorder") &&
+ renderBorder(token)}
+ {token.name.includes("Color") &&
+ !token.name.includes("ColorText") &&
+ renderColor(token.value)}
+ {token.name.includes("ColorText") &&
+ renderColorText(token.value)}
+ {token.name.includes("Space") && renderSpace(token.value)}
+ {token.name.includes("Font") && renderFont(token)}
+ {token.name.includes("Focus") &&
+ !token.name.includes("ColorFocus") &&
+ renderFocus(token.value)}
+ {token.name.includes("Shadow") && renderShadow(token.value)}
+
+
+
+ {getDisplayedValue(table.name, token.value)}
+
+
+
+ ))}
+
+
+ ))}
+ >
+ );
+};
+
+export { TokenTables };
diff --git a/packages/odyssey-storybook/src/components/Banner/Banner.mdx b/packages/odyssey-storybook/src/components/Banner/Banner.mdx
index bc88739cb5..c4be4952b3 100644
--- a/packages/odyssey-storybook/src/components/Banner/Banner.mdx
+++ b/packages/odyssey-storybook/src/components/Banner/Banner.mdx
@@ -1,4 +1,6 @@
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/Banner/Banner.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
# Banner
@@ -20,7 +22,9 @@ They are best used to indicate global states or errors that effect an entire pro
Use Info Banners to surface neutral information or broad announcements to users.
-
+
+
+
### Danger
@@ -28,7 +32,9 @@ Use Danger Banners to inform users that a system-wide error has occurred. You ma
Include guidance to make sure users know what steps to take to address the error or avoid the threat.
-
+
+
+
### Caution
@@ -36,7 +42,9 @@ Use Caution Banners to inform users of tasks or processes that may need their at
When using the Caution variant, ensure the user does not need more context than you can give in the space available.
-
+
+
+
## Usage
@@ -68,10 +76,12 @@ Banners support dismissal for messages that do not persist or only require a one
Banner content should be succinct and direct. When including an action, be sure the link text clearly indicates where it leads.
-## Arguments
+## Props
+
+
## References
diff --git a/packages/odyssey-storybook/src/components/Box/Box.mdx b/packages/odyssey-storybook/src/components/Box/Box.mdx
index cd9d70aed8..6208f1549a 100644
--- a/packages/odyssey-storybook/src/components/Box/Box.mdx
+++ b/packages/odyssey-storybook/src/components/Box/Box.mdx
@@ -1,4 +1,6 @@
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/Box/Box.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
# Box
@@ -20,6 +22,8 @@ A simple `` component might look like this:
+
+
## Behavior
Box uses an `as="abbr"` polymorphic API to ensure semantic elements can be used as necessary. This helps improve the quality of the resulting DOM output. This improves outcomes for accessibility, testing, use-ability, and long term maintenance.
diff --git a/packages/odyssey-storybook/src/components/Button/Button.mdx b/packages/odyssey-storybook/src/components/Button/Button.mdx
index 3279d3d42b..74796ed91c 100644
--- a/packages/odyssey-storybook/src/components/Button/Button.mdx
+++ b/packages/odyssey-storybook/src/components/Button/Button.mdx
@@ -1,4 +1,6 @@
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/Button/Button.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
# Button
@@ -24,19 +26,25 @@ Use our default Button for primary actions in a view. For example, “Save”.
It's ideal to have one Primary Button per view. However, it's okay to have more than one Primary Button as long that they are equal in priority.
-
+
+
+
### Secondary
This is ideal for a secondary actions to compliment the Primary Button. Like the Primary Button, use this Button sparingly to provide focus to the user.
-
+
+
+
### Danger
Use Danger Buttons for scenarios where a user may be deleting information or making a decision that can not be reversed.
-
+
+
+
### Clear
@@ -44,7 +52,9 @@ Use Clear Buttons for interactions that change visible UI but don't submit data.
They pair well with Primary and Secondary Buttons.
-
+
+
+
### Dismiss
@@ -52,7 +62,9 @@ The Dismiss Button should only be used for dismissing UI. Typically, this Button
The Dismiss Button has unique padding and will inherit the text color of it's parent UI.
-
+
+
+
## Sizes
@@ -64,19 +76,25 @@ In order to provide a sufficient click area, all Button labels have a minimum wi
Small Buttons are best used for actions within Table rows. Their font-size is descreased while keeping padding proportional to our medium size.
-
+
+
+
### Medium
Our default size, medium Buttons are built for use in most contexts.
-
+
+
+
### Large
Large Buttons incease their padding, but not their font size. They're intended for single-interaction UIs like logging in.
-
+
+
+
### Full-width
@@ -84,7 +102,9 @@ Full-width Buttons are intended for single-interaction UIs. These are often widg
Use this variant when you desire the Button to be full-width regardless of screen size.
-
+
+
+
## States
@@ -160,22 +180,28 @@ When using multiple words, use sentence case. Capitalize only the first letter a
Icons can be added to any of our Button variants to increase clarity or add flair. Icons will be laid out automatically based on language direction.
-
+
+
+
#### Icon-only usability
We recommend pairing icon-only Buttons with our Tooltip. While this is not required, it will increase clarity for sighted users.
-
+
+
+
## Accessibility
Color is not a clear affordance for all users, please use clear, concise copy to label Buttons. Good rules of thumb: use three or less words to describe your action and start your label with a verb (e.g. "Access report" vs "Report PDF").
-## Arguments
+## Props
+
+
## References
### Related components
diff --git a/packages/odyssey-storybook/src/components/Checkbox/Checkbox.mdx b/packages/odyssey-storybook/src/components/Checkbox/Checkbox.mdx
index 05cc60f00f..a5e2b2fedf 100644
--- a/packages/odyssey-storybook/src/components/Checkbox/Checkbox.mdx
+++ b/packages/odyssey-storybook/src/components/Checkbox/Checkbox.mdx
@@ -1,4 +1,6 @@
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/Checkbox/Checkbox.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
# Checkbox
@@ -12,7 +14,9 @@ Checkboxes appear as a square shaped UI accompanied by a caption. Checkboxes can
Users can click a Checkbox to make a choice and click it again to deselect an option. They allow users to select one or more options of something.
-
+
+
+
## States
@@ -22,7 +26,9 @@ Checkboxes support several states: enabled, hover, focus, disabled, invalid, req
Checkboxes in their "unchecked" state are considered enabled. They are ready for user interaction.
-
+
+
+
### Hover
@@ -48,7 +54,9 @@ Disabled inputs are unavailable for interaction and cannot be focused. They can
Checkboxes are disabled individually. The values of disabled inputs will not be submitted.
-
+
+
+
### Invalid
@@ -58,7 +66,9 @@ When indicating a validation error, please use a Field Error label to indicate t
Unlike Radio Buttons, Checkboxes validate individually, not as a group.
-
+
+
+
### Required
@@ -74,8 +84,12 @@ In the case of nested checkboxes, an indeterminate state may be required.
Note that this state is visual-only and will be submitted as either "checked" or "unchecked" depending on the design of your UI.
-
+
+
+
-## Arguments
+## Props
+
+
diff --git a/packages/odyssey-storybook/src/components/CircularLoadIndicator/CircularLoadIndicator.mdx b/packages/odyssey-storybook/src/components/CircularLoadIndicator/CircularLoadIndicator.mdx
new file mode 100644
index 0000000000..1bcc6e4aba
--- /dev/null
+++ b/packages/odyssey-storybook/src/components/CircularLoadIndicator/CircularLoadIndicator.mdx
@@ -0,0 +1,15 @@
+import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/CircularLoadIndicator/CircularLoadIndicator.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
+
+# CircularLoadIndicator
+
+
+
+
+
+## Props
+
+
+
+
diff --git a/packages/odyssey-storybook/src/components/CircularLoadIndicator/CircularLoadIndicator.stories.tsx b/packages/odyssey-storybook/src/components/CircularLoadIndicator/CircularLoadIndicator.stories.tsx
index 19f36181fe..8a2e0033b5 100644
--- a/packages/odyssey-storybook/src/components/CircularLoadIndicator/CircularLoadIndicator.stories.tsx
+++ b/packages/odyssey-storybook/src/components/CircularLoadIndicator/CircularLoadIndicator.stories.tsx
@@ -17,10 +17,16 @@ import {
CircularLoadIndicatorProps,
} from "@okta/odyssey-react";
import { CircularLoadIndicator as Source } from "../../../../odyssey-react/src";
+import CircularLoadIndicatorMdx from "./CircularLoadIndicator.mdx";
export default {
title: `Components/CircularLoadIndicator`,
component: Source,
+ parameters: {
+ docs: {
+ page: CircularLoadIndicatorMdx,
+ },
+ },
};
const Template: Story = () => (
diff --git a/packages/odyssey-storybook/src/components/Field/Field.mdx b/packages/odyssey-storybook/src/components/Field/Field.mdx
index 94480714e2..18b5629a50 100644
--- a/packages/odyssey-storybook/src/components/Field/Field.mdx
+++ b/packages/odyssey-storybook/src/components/Field/Field.mdx
@@ -1,4 +1,6 @@
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/Field/Field.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
# Field
@@ -52,6 +54,8 @@ All errors require a visible or SR-only "Error:" label. This labeling is not han
+
+
## Variants
While their appearance is identical, Field supports single and grouped inputs by offering an `as=" foo"` polymorphic API.
diff --git a/packages/odyssey-storybook/src/components/FieldGroup/FieldGroup.mdx b/packages/odyssey-storybook/src/components/FieldGroup/FieldGroup.mdx
new file mode 100644
index 0000000000..552d352caf
--- /dev/null
+++ b/packages/odyssey-storybook/src/components/FieldGroup/FieldGroup.mdx
@@ -0,0 +1,15 @@
+import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/FieldGroup/FieldGroup.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
+
+# FieldGroup
+
+
+
+
+
+## Props
+
+
+
+
diff --git a/packages/odyssey-storybook/src/components/FieldGroup/FieldGroup.stories.tsx b/packages/odyssey-storybook/src/components/FieldGroup/FieldGroup.stories.tsx
index e0441d2372..dc0a9b569e 100644
--- a/packages/odyssey-storybook/src/components/FieldGroup/FieldGroup.stories.tsx
+++ b/packages/odyssey-storybook/src/components/FieldGroup/FieldGroup.stories.tsx
@@ -20,10 +20,16 @@ import {
TextInput,
} from "@okta/odyssey-react";
import { FieldGroup as Source } from "../../../../odyssey-react/src";
+import FieldGroupMdx from "./FieldGroup.mdx";
export default {
title: `Components/FieldGroup`,
component: Source,
+ parameters: {
+ docs: {
+ page: FieldGroupMdx,
+ },
+ },
argTypes: {
children: {
control: { type: null },
diff --git a/packages/odyssey-storybook/src/components/Form/Form.mdx b/packages/odyssey-storybook/src/components/Form/Form.mdx
new file mode 100644
index 0000000000..6ac32d49eb
--- /dev/null
+++ b/packages/odyssey-storybook/src/components/Form/Form.mdx
@@ -0,0 +1,15 @@
+import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/Form/Form.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
+
+# Form
+
+
+
+
+
+## Props
+
+
+
+
diff --git a/packages/odyssey-storybook/src/components/Form/Form.stories.tsx b/packages/odyssey-storybook/src/components/Form/Form.stories.tsx
index 87a5bb6427..2b33b3d2e5 100644
--- a/packages/odyssey-storybook/src/components/Form/Form.stories.tsx
+++ b/packages/odyssey-storybook/src/components/Form/Form.stories.tsx
@@ -21,10 +21,16 @@ import {
Button,
} from "@okta/odyssey-react";
import { Form as Source } from "../../../../odyssey-react/src";
+import FormMdx from "./Form.mdx";
export default {
title: `Components/Form`,
component: Source,
+ parameters: {
+ docs: {
+ page: FormMdx,
+ },
+ },
argTypes: {
children: {
control: { type: null },
diff --git a/packages/odyssey-storybook/src/components/Heading/Heading.mdx b/packages/odyssey-storybook/src/components/Heading/Heading.mdx
new file mode 100644
index 0000000000..24b820dc8e
--- /dev/null
+++ b/packages/odyssey-storybook/src/components/Heading/Heading.mdx
@@ -0,0 +1,18 @@
+import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/Heading/Heading.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
+
+# Heading
+
+Heading are used to describe the main idea of a page, a section, or content that follows it.
+By default, header tags (h1 through h6) use the corresponding visual size.
+
+
+
+
+
+## Props
+
+
+
+
diff --git a/packages/odyssey-storybook/src/components/Heading/Heading.stories.tsx b/packages/odyssey-storybook/src/components/Heading/Heading.stories.tsx
index c1116d8d07..d2fbeb2520 100644
--- a/packages/odyssey-storybook/src/components/Heading/Heading.stories.tsx
+++ b/packages/odyssey-storybook/src/components/Heading/Heading.stories.tsx
@@ -14,10 +14,16 @@ import React from "react";
import { Story } from "@storybook/react";
import { Heading, HeadingProps } from "@okta/odyssey-react";
import { Heading as Source } from "../../../../odyssey-react/src";
+import HeadingMdx from "./Heading.mdx";
export default {
title: `Components/Heading`,
component: Source,
+ parameters: {
+ docs: {
+ page: HeadingMdx,
+ },
+ },
argTypes: {
children: {
control: { type: "string" },
diff --git a/packages/odyssey-storybook/src/components/Infobox/Infobox.mdx b/packages/odyssey-storybook/src/components/Infobox/Infobox.mdx
index b2ba8fe588..88d1c257b2 100644
--- a/packages/odyssey-storybook/src/components/Infobox/Infobox.mdx
+++ b/packages/odyssey-storybook/src/components/Infobox/Infobox.mdx
@@ -1,4 +1,6 @@
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/Infobox/Infobox.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
# Infobox
@@ -18,7 +20,9 @@ This component may be present on load or triggered by different types of events,
Use Infoboxes for communicating important guidance to the user. When using the Info variant, consider if plain copy will suffice on the page itself first. Reserve this component for "can’t miss" instructions.
-
+
+
+
### Danger
@@ -26,7 +30,9 @@ Use Danger Infoboxes to inform users that an error has occurred. You may also in
Include guidance to make sure users know what steps to take to address the error or avoid data loss.
-
+
+
+
### Caution
@@ -34,13 +40,17 @@ Use Caution Infoboxes to inform users of tasks or processes that need their atte
When using the Caution variant, ensure the user does not need more context than you can give in the space available.
-
+
+
+
### Success
Use Success Infoboxes for reporting successful actions, processes, or states to the user.
-
+
+
+
## Usage
@@ -86,10 +96,12 @@ Both Title and Content are optional, but at least one of them is required.
When deploying Infoboxes, two `role`s may apply. Danger variants should utilize the `alert` role, as their contents represent immediate risk or failure. Success and Caution variants are better suited to the `status` role, which provides a less urgent announcement on appearance. The Info variant does not require a `role`, as it represents plain content.
-## Arguments
+## Props
+
+
## References
diff --git a/packages/odyssey-storybook/src/components/Link/Link.mdx b/packages/odyssey-storybook/src/components/Link/Link.mdx
index 1abc7dad5c..df89705e7e 100644
--- a/packages/odyssey-storybook/src/components/Link/Link.mdx
+++ b/packages/odyssey-storybook/src/components/Link/Link.mdx
@@ -1,4 +1,6 @@
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/Link/Link.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
# Link
@@ -19,7 +21,9 @@ Use an external link when:
- The destination of the link aids in the completion of a task on the current tab (e.g. help documentation)
- Opening the link in the current tab would result in loss of data or task interruption (e.g. completing a long form)
-
+
+
+
## States
@@ -51,7 +55,9 @@ Icons may be included in standalone links. They are not supported within paragra
Icon layout is automatic, based on language direction.
-
+
+
+
### Mailto
@@ -67,10 +73,12 @@ Links in Odyssey are not underlined. They maintain a minimum 3:1 contrast ratio
Links should display a visible affordance when users interact via keyboard. Odyssey preserves the default `:focus` state for each browser.
-## Arguments
+## Props
+
+
## References
### Further reading
diff --git a/packages/odyssey-storybook/src/components/List/List.mdx b/packages/odyssey-storybook/src/components/List/List.mdx
new file mode 100644
index 0000000000..97e553c34d
--- /dev/null
+++ b/packages/odyssey-storybook/src/components/List/List.mdx
@@ -0,0 +1,35 @@
+import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/List/List.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
+
+# List
+
+List provides ordered, unordered, description, and unstyled list UI.
+
+
+
+
+
+## Props
+
+
+
+
+
+## Stories
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/packages/odyssey-storybook/src/components/List/List.stories.tsx b/packages/odyssey-storybook/src/components/List/List.stories.tsx
index cb1dcf91fa..2cabdccd70 100644
--- a/packages/odyssey-storybook/src/components/List/List.stories.tsx
+++ b/packages/odyssey-storybook/src/components/List/List.stories.tsx
@@ -23,10 +23,16 @@ import {
Text,
} from "@okta/odyssey-react";
import { List as Source } from "../../../../odyssey-react/src";
+import ListMdx from "./List.mdx";
export default {
title: `Components/List`,
component: Source,
+ parameters: {
+ docs: {
+ page: ListMdx,
+ },
+ },
};
const Template: Story = ({ listType, unstyled }) => (
diff --git a/packages/odyssey-storybook/src/components/Modal/Modal.mdx b/packages/odyssey-storybook/src/components/Modal/Modal.mdx
index 365bb84509..12759f8f3b 100644
--- a/packages/odyssey-storybook/src/components/Modal/Modal.mdx
+++ b/packages/odyssey-storybook/src/components/Modal/Modal.mdx
@@ -1,4 +1,6 @@
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/Modal/Modal.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
# Modal
@@ -66,10 +68,12 @@ For convenience, users can exit the modal in a few ways:
For users happy with their new context, we ensure their attention isn't misdirected. Scrolling on the main content becomes locked, and we inform the browser to lock the `tabindex` to the modal context. This way, regardless of input method, a user's interactions are limited to their new scope.
-## Arguments
+## Props
+
+
## Further reading
- [How To Make Modal Windows Better For Everyone](https://www.smashingmagazine.com/2014/09/making-modal-windows-better-for-everyone/) - Scott O'Hara (2014)
diff --git a/packages/odyssey-storybook/src/components/Radio/Radio.mdx b/packages/odyssey-storybook/src/components/Radio/Radio.mdx
index eff834dcf6..01b6aaa45d 100644
--- a/packages/odyssey-storybook/src/components/Radio/Radio.mdx
+++ b/packages/odyssey-storybook/src/components/Radio/Radio.mdx
@@ -1,4 +1,6 @@
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/Radio/RadioButton.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
# Radio
@@ -12,7 +14,9 @@ Radios appear as a ring shaped UI accompanied by a caption that allows the user
Radio Buttons allow users to select one option from a set. Users can click a Radio to make a choice; selecting another will deselect the last.
-
+
+
+
## States
@@ -22,7 +26,9 @@ There are fives Checkbox states: enabled, hover, focus, disabled, invalid, and o
Radio Buttons in their "unchecked" state are considered enabled. They are ready for user interaction.
-
+
+
+
### Hover
@@ -48,7 +54,9 @@ Disabled inputs are unavailable for interaction and cannot be focused. They can
Radios are disabled by option.
-
+
+
+
### Optional
@@ -64,8 +72,12 @@ When indicating a validation error, please use a Field Error label to indicate t
Unlike Checkboxes, Radios validate as a group, not individually.
-
+
+
+
-## Arguments
+## Props
+
+
diff --git a/packages/odyssey-storybook/src/components/Select/Select.mdx b/packages/odyssey-storybook/src/components/Select/Select.mdx
index 3385c0dee6..42b8143463 100644
--- a/packages/odyssey-storybook/src/components/Select/Select.mdx
+++ b/packages/odyssey-storybook/src/components/Select/Select.mdx
@@ -1,4 +1,6 @@
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/Select/Select.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
# Select
@@ -16,7 +18,9 @@ Odyssey also supports a Multi-Select variant that allows users to select many va
To support expected functionality and behaviors, Select relies on the Choices.js library. Odyssey provides fallback styling when Choices.js isn't available.
-
+
+
+
## Variants
@@ -26,13 +30,17 @@ Odyssey provides support for both single and multi-value Selects.
The default Select allows users to choose a single value from a list of options. Selecting another option will replace the first.
-
+
+
+
### Multi-Select
The Multi-Select variant allows users to choose more than one value from the list of options.
-
+
+
+
## States
@@ -62,13 +70,17 @@ Disabled inputs are unavailable for interaction and cannot be focused. They can
The values of disabled inputs will not be submitted.
-
+
+
+
### Optional
Odyssey assumes inputs are required by default. Optional inputs should be used to indicate when data is not required for the user to complete a task.
-
+
+
+
### Invalid
@@ -92,12 +104,16 @@ Select inputs should not have a default selected unless a majority of users will
Options may be grouped within the Select list to help guide users. When doing this, consider that Choices will ignore any ungrouped items.
-
+
+
+
-## Arguments
+## Props
+
+
## References
### Further Reading
diff --git a/packages/odyssey-storybook/src/components/Status/Status.mdx b/packages/odyssey-storybook/src/components/Status/Status.mdx
index 3284fe835c..eed724d08b 100644
--- a/packages/odyssey-storybook/src/components/Status/Status.mdx
+++ b/packages/odyssey-storybook/src/components/Status/Status.mdx
@@ -1,4 +1,6 @@
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/Status/Status.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
# Status
@@ -22,25 +24,33 @@ Neutral Statuses are gray and should be used to indicate states like "Paused", "
This is the default variant.
-
+
+
+
### Success
Success Statuses are green and should be used to indicate states like "Complete", "Active", or "Service operational".
-
+
+
+
### Caution
Caution Statuses are yellow and should be used to indicate states like "Attention suggested" or "Service degradation".
-
+
+
+
### Danger
Danger Statuses are red and should be used to indicate states like "Error", "Failure", or "Service disruption".
-
+
+
+
## Usage
@@ -64,8 +74,12 @@ Statuses content should provide a quick overview. Limit Status descriptor and la
Where necessary, labels may be hidden. If a label is not present, ensure the Status copy communicates appropriate context. Even if the label is hidden, it must be populated to ensure context for users of assistive technology.
-
+
+
+
-## Arguments
+## Props
+
+
diff --git a/packages/odyssey-storybook/src/components/Tab/Tab.mdx b/packages/odyssey-storybook/src/components/Tab/Tab.mdx
index 00e7cfff16..155f0712b1 100644
--- a/packages/odyssey-storybook/src/components/Tab/Tab.mdx
+++ b/packages/odyssey-storybook/src/components/Tab/Tab.mdx
@@ -1,4 +1,6 @@
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/Tabs/Tabs.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
# Tab
@@ -14,7 +16,9 @@ Users interact with Tab as they would a button, the main difference is the outco
Additionally, the tab element is keyboard-navigable (See [Accessibility: Keyboard Support](#keyboard-support))
-
+
+
+
## Usage
@@ -132,10 +136,12 @@ Use Tab sparingly. Limit the Tab component to one per page, and refrain from inc
-## Arguments
+## Props
+
+
## References
### Further Reading
diff --git a/packages/odyssey-storybook/src/components/Table/Table.mdx b/packages/odyssey-storybook/src/components/Table/Table.mdx
index c041d5394e..f1f38fbf15 100644
--- a/packages/odyssey-storybook/src/components/Table/Table.mdx
+++ b/packages/odyssey-storybook/src/components/Table/Table.mdx
@@ -1,4 +1,6 @@
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/Tabs/Tabs.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
# Table
@@ -24,7 +26,9 @@ Finally, when a descending heading is clicked, it should swap to unsorted.
When any column becomes sorted, the previously active column should return to an unsorted state.
-
+
+
+
## States
@@ -33,7 +37,9 @@ When any column becomes sorted, the previously active column should return to an
If no data is returned - whether due to filtering or an empty data set - be sure to provide a null state for your users. If you can detect why no data was returned, make that clear in the tfoot.
The data-null attribute will ensure the table styling is adjusted.
-
+
+
+
## Usage
@@ -53,7 +59,9 @@ If you need to group rows by a shared data point, we also support using rowspan
Note: spanning multiple rows or columns may cause issues for assistive technologies.
-
+
+
+
## Content guidelines
@@ -138,6 +146,8 @@ Try to refrain from using complicated table layouts that rely on colspan or rows
This same advice applies to nested tables or hidden rows as well. They can introduce problems that make your table inaccessible for some users.
-## Arguments
+## Props
+
+
diff --git a/packages/odyssey-storybook/src/components/TagList/TagList.mdx b/packages/odyssey-storybook/src/components/TagList/TagList.mdx
index 54d6ea4547..05d3e04f13 100644
--- a/packages/odyssey-storybook/src/components/TagList/TagList.mdx
+++ b/packages/odyssey-storybook/src/components/TagList/TagList.mdx
@@ -1,4 +1,6 @@
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/TagList/TagList.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
# TagList
@@ -18,7 +20,9 @@ As stated above, tags are for describing an entity or object, not representing o
For example, "Shuttle" may be an individual type of spaceship that has the tags "Winged", "Reusable", and "NASA".
-
+
+
+
### Describe an object, don’t be the object
@@ -28,6 +32,8 @@ Use tags as descriptors paired with a particular object. These descriptors may b
**STORY MISSING**
-## Arguments
+## Props
+
+
diff --git a/packages/odyssey-storybook/src/components/Text/Text.mdx b/packages/odyssey-storybook/src/components/Text/Text.mdx
index 61c8a336db..7c9d454316 100644
--- a/packages/odyssey-storybook/src/components/Text/Text.mdx
+++ b/packages/odyssey-storybook/src/components/Text/Text.mdx
@@ -1,4 +1,6 @@
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/Text/Text.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
import { Text } from "../../../../odyssey-react/src";
@@ -12,6 +14,8 @@ Text is a bounded polymorphic component used to insert various styled HTML eleme
+
+
## Variants
### span (default)
diff --git a/packages/odyssey-storybook/src/components/TextArea/TextArea.mdx b/packages/odyssey-storybook/src/components/TextArea/TextArea.mdx
new file mode 100644
index 0000000000..c857880f2f
--- /dev/null
+++ b/packages/odyssey-storybook/src/components/TextArea/TextArea.mdx
@@ -0,0 +1,27 @@
+import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/TextArea/TextArea.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
+
+# TextArea
+
+TextArea allows users to edit and input data.
+
+
+
+
+
+## Props
+
+
+
+
+
+## Stories
+
+
+
+
+
+
+
+
diff --git a/packages/odyssey-storybook/src/components/TextArea/TextArea.stories.tsx b/packages/odyssey-storybook/src/components/TextArea/TextArea.stories.tsx
index e90eefaee5..be28f3c0fc 100644
--- a/packages/odyssey-storybook/src/components/TextArea/TextArea.stories.tsx
+++ b/packages/odyssey-storybook/src/components/TextArea/TextArea.stories.tsx
@@ -14,10 +14,16 @@ import React from "react";
import type { Story } from "@storybook/react";
import { TextArea, TextAreaProps } from "@okta/odyssey-react";
import { TextArea as Source } from "../../../../odyssey-react/src";
+import TextAreaMdx from "./TextArea.mdx";
export default {
title: `Components/TextArea`,
component: Source,
+ parameters: {
+ docs: {
+ page: TextAreaMdx,
+ },
+ },
args: {
label: "Field Label",
defaultValue: " ",
diff --git a/packages/odyssey-storybook/src/components/Toast/Toast.mdx b/packages/odyssey-storybook/src/components/Toast/Toast.mdx
index 6f5c3da985..e44e92f03e 100644
--- a/packages/odyssey-storybook/src/components/Toast/Toast.mdx
+++ b/packages/odyssey-storybook/src/components/Toast/Toast.mdx
@@ -1,4 +1,6 @@
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/Toast/Toast.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
# Toast
@@ -166,6 +168,8 @@ Do not use Danger Toasts for in-page errors such as invalid form fields. Instead
-## Arguments
+## Props
+
+
diff --git a/packages/odyssey-storybook/src/components/Tooltip/Tooltip.mdx b/packages/odyssey-storybook/src/components/Tooltip/Tooltip.mdx
index bb3cca4a80..8d333ade0d 100644
--- a/packages/odyssey-storybook/src/components/Tooltip/Tooltip.mdx
+++ b/packages/odyssey-storybook/src/components/Tooltip/Tooltip.mdx
@@ -1,4 +1,6 @@
import { Canvas, Story, ArgsTable } from "@storybook/addon-docs";
+import { theme } from "@okta/odyssey-react/dist/components/Tooltip/Tooltip.theme";
+import { ThemeTable } from "../../../.storybook/components/ThemeTable";
# Tooltip
@@ -65,7 +67,9 @@ When positioning a Tooltip, ensure:
- Placement doesn't interfere with the object of interest or relevant information.
- The Tooltip is always visible when activated, not cropped or off-page.
-
+
+
+
## Content
@@ -106,6 +110,8 @@ Consider fallback alternatives on a case-by-case basis.
When possible, provide inline text that becomes visible on touchscreen devices. Otherwise, a fixed-position fallback is provided for mobile devices.
-## Arguments
+## Props
+
+
diff --git a/packages/odyssey-storybook/src/guidelines/Color.stories.mdx b/packages/odyssey-storybook/src/guidelines/Color.mdx
similarity index 100%
rename from packages/odyssey-storybook/src/guidelines/Color.stories.mdx
rename to packages/odyssey-storybook/src/guidelines/Color.mdx
diff --git a/packages/odyssey-storybook/src/guidelines/Tokens.stories.mdx b/packages/odyssey-storybook/src/guidelines/Tokens.stories.mdx
index a6903b1925..5976bb56b3 100644
--- a/packages/odyssey-storybook/src/guidelines/Tokens.stories.mdx
+++ b/packages/odyssey-storybook/src/guidelines/Tokens.stories.mdx
@@ -1,4 +1,5 @@
import { Meta } from "@storybook/addon-docs/blocks";
+import { TokenTables } from "../../.storybook/components/TokenTables";
@@ -6,243 +7,4 @@ import { Meta } from "@storybook/addon-docs/blocks";
Design Tokens abstract Base elements into names that are commonly understood. They are then used together to build components.
-
- Semantic Colors
-
-
-
- Token Name
- Example
- Value
-
-
-
-
-
-
- $color-primary-light
-
-
-
-
-
- Blue 300
-
-
-
- $color-primary-base
-
-
-
-
- Blue 500
-
-
-
- $color-primary-dark
-
-
-
-
- Blue 900
-
-
-
- $color-danger-light
-
-
-
-
- Red 300
-
-
-
- $color-danger-base
-
-
-
-
- Red 500
-
-
-
- $color-danger-dark
-
-
-
-
- Red 900
-
-
-
-
-
-
- Focus Ring
-
-
-
- Token Name
- Example
- Value
-
-
-
-
-
- $focus-ring-primary
-
-
-
-
- Blue 300
-
-
-
- $focus-ring-danger
-
-
-
-
- Red 300
-
-
-
-
-
-
- Type
-
-
-
- Token Name
- Example
- Value
-
-
-
-
-
- $text-body
-
-
- Aa
-
- Gray 900
-
-
-
- $text-danger
-
-
- Aa
-
- Red 500
-
-
-
- $text-heading
-
-
- Aa
-
- Gray 900
-
-
-
- $text-sub
-
-
- Aa
-
- Gray 600
-
-
-
-
-
-
- Spacing
-
-
-
- Token Name
- Example
- Value
- Pixels
-
-
-
-
-
- $spacing-xl
-
-
-
-
-
-
-
-
-
-
-
-
-
- $spacing-l
-
-
-
-
-
-
-
-
-
-
-
-
-
- $spacing-m
-
-
-
-
-
-
-
-
-
-
-
-
-
- $spacing-s
-
-
-
-
-
-
-
-
-
-
-
-
-
- $spacing-xs
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
diff --git a/packages/odyssey-storybook/src/guidelines/Typography.stories.mdx b/packages/odyssey-storybook/src/guidelines/Typography.mdx
similarity index 100%
rename from packages/odyssey-storybook/src/guidelines/Typography.stories.mdx
rename to packages/odyssey-storybook/src/guidelines/Typography.mdx