diff --git a/packages/stacks-docs/_data/components/activity-indicator.json b/packages/stacks-docs/_data/components/activity-indicator.json
index e476674582..6cae2ff92a 100644
--- a/packages/stacks-docs/_data/components/activity-indicator.json
+++ b/packages/stacks-docs/_data/components/activity-indicator.json
@@ -1,29 +1,30 @@
{
- "indicator": [
+ "classes": [
{
- "class": ".s-activity-indicator",
- "applies": "N/A",
+ "code": ".s-activity-indicator",
"description": "Base activity indicator element with theme-aware coloring"
},
{
- "class": ".s-activity-indicator__success",
+ "code": ".s-activity-indicator__success",
"applies": ".s-activity-indicator",
"description": "Styles the activity indicator in a success state"
},
{
- "class": ".s-activity-indicator__warning",
+ "code": ".s-activity-indicator__warning",
"applies": ".s-activity-indicator",
"description": "Styles the activity indicator in a warning state"
},
{
- "class": ".s-activity-indicator__danger",
+ "code": ".s-activity-indicator__danger",
"applies": ".s-activity-indicator",
"description": "Styles the activity indicator in a danger state"
},
{
- "class": ".s-activity-indicator__sm",
+ "code": ".s-activity-indicator__sm",
"applies": ".s-activity-indicator",
"description": "Styles the activity indicator in a small size"
}
- ]
+ ],
+ "examples": ["", "3", "12", "370", "new"],
+ "variants": ["success", "warning", "danger"]
}
\ No newline at end of file
diff --git a/packages/stacks-docs/_data/components/avatars-component.json b/packages/stacks-docs/_data/components/avatars.json
similarity index 67%
rename from packages/stacks-docs/_data/components/avatars-component.json
rename to packages/stacks-docs/_data/components/avatars.json
index 48c749b715..b0ced834c5 100644
--- a/packages/stacks-docs/_data/components/avatars-component.json
+++ b/packages/stacks-docs/_data/components/avatars.json
@@ -1,59 +1,60 @@
{
"classes": [
{
- "class": ".s-avatar",
- "applies": "N/A",
+ "code": ".s-avatar",
"description": "The base avatar at 16px."
},
{
- "class": ".s-avatar--image",
- "applies": "N/A",
+ "code": ".s-avatar--image",
+ "parent": ".s-avatar",
"description": "A child element for displaying a user’s profile image."
},
{
- "class": ".s-avatar--letter",
- "applies": "N/A",
+ "code": ".s-avatar--letter",
+ "parent": ".s-avatar",
"description": "A child element for displaying an abbreviated Team name."
},
{
- "class": ".s-avatar--badge",
- "applies": "N/A",
+ "code": ".s-avatar--badge",
+ "parent": ".s-avatar",
"description": "A child element that provides positioning to the shield on Team avatars."
},
{
- "class": ".s-avatar--indicator",
- "applies": "N/A",
+ "code": ".s-avatar--indicator",
+ "parent": ".s-avatar",
"description": "A child element that provides positioning to the activity indicator on user's avatars."
},
{
- "class": ".s-avatar__24",
+ "code": ".s-avatar__24",
"applies": ".s-avatar",
"description": "Adds the proper border radius and scaling at 24px."
},
{
- "class": ".s-avatar__32",
+ "code": ".s-avatar__32",
"applies": ".s-avatar",
"description": "Adds the proper border radius and scaling at 32px."
},
{
- "class": ".s-avatar__48",
+ "code": ".s-avatar__48",
"applies": ".s-avatar",
"description": "Adds the proper border radius and scaling at 48px."
},
{
- "class": ".s-avatar__64",
+ "code": ".s-avatar__64",
"applies": ".s-avatar",
"description": "Adds the proper border radius and scaling at 64px."
},
{
- "class": ".s-avatar__96",
+ "code": ".s-avatar__96",
"applies": ".s-avatar",
"description": "Adds the proper border radius and scaling at 96px."
},
{
- "class": ".s-avatar__128",
+ "code": ".s-avatar__128",
"applies": ".s-avatar",
"description": "Adds the proper border radius and scaling at 128px."
}
- ]
+ ],
+ "examples": [16, 24, 32, 48, 64, 96, 128],
+ "teamBgs": ["blue-400", "theme-primary", "png"]
}
\ No newline at end of file
diff --git a/packages/stacks-docs/_data/components/badges.json b/packages/stacks-docs/_data/components/badges.json
index 509087a062..c25e35c27f 100644
--- a/packages/stacks-docs/_data/components/badges.json
+++ b/packages/stacks-docs/_data/components/badges.json
@@ -1,11 +1,87 @@
{
+ "classes": [
+ {
+ "code": ".s-badge",
+ "description": "Base badge element."
+ },
+ {
+ "code": ".s-badge__gold",
+ "applies": ".s-badge",
+ "description": "Badge indicating a gold award."
+ },
+ {
+ "code": ".s-badge__silver",
+ "applies": ".s-badge",
+ "description": "Badge indicating a silver award."
+ },
+ {
+ "code": ".s-badge__bronze",
+ "applies": ".s-badge",
+ "description": "Badge indicating a bronze award."
+ },
+ {
+ "code": ".s-badge__important",
+ "applies": ".s-badge",
+ "description": "Applies important styling to the badge."
+ },
+ {
+ "code": ".s-badge__squared",
+ "applies": ".s-badge",
+ "description": "Applies a background color to the badge's icon."
+ },
+ {
+ "code": ".s-badge__info",
+ "applies": ".s-badge",
+ "description": "Badge indicating an info status."
+ },
+ {
+ "code": ".s-badge__warning",
+ "applies": ".s-badge",
+ "description": "Badge indicating a warning status."
+ },
+ {
+ "code": ".s-badge__danger",
+ "applies": ".s-badge",
+ "description": "Badge indicating a danger status."
+ },
+ {
+ "code": ".s-badge__critical",
+ "applies": ".s-badge",
+ "description": "Badge indicating a critical status."
+ },
+ {
+ "code": ".s-badge__tonal",
+ "applies": ".s-badge",
+ "description": "Badge indicating a tonal status."
+ },
+ {
+ "code": ".s-badge__success",
+ "applies": ".s-badge",
+ "description": "Badge indicating a success status."
+ },
+ {
+ "code": ".s-badge__featured",
+ "applies": ".s-badge",
+ "description": "Badge indicating a featured status."
+ },
+ {
+ "code": ".s-badge__sm",
+ "applies": ".s-badge",
+ "description": "Applies a small size to the badge."
+ },
+ {
+ "code": ".s-badge__lg",
+ "applies": ".s-badge",
+ "description": "Applies a large size to the badge."
+ }
+ ],
"achievement": [
{
"title": "Achievement",
"classes": [
{
"title": "Gold",
- "class": "s-bling__gold",
+ "bling": "gold",
"label": "Great Question",
"html": "s-badge",
"repType": "gold",
@@ -13,7 +89,7 @@
},
{
"title": "Silver",
- "class": "s-bling__silver",
+ "bling": "silver",
"label": "Favorite Question",
"html": "s-badge",
"repType": "silver",
@@ -21,7 +97,7 @@
},
{
"title": "Bronze",
- "class": "s-bling__bronze",
+ "bling": "bronze",
"label": "Altruist",
"html": "s-badge",
"repType": "bronze",
@@ -36,7 +112,7 @@
"classes": [
{
"title": "Gold",
- "class": "s-badge__gold",
+ "code": "s-badge__gold",
"repType": "gold",
"html": "s-badge s-badge__gold",
"label": "python",
@@ -44,7 +120,7 @@
},
{
"title": "Silver",
- "class": "s-badge__silver",
+ "code": "s-badge__silver",
"repType": "silver",
"html": "s-badge s-badge__silver",
"label": "css",
@@ -52,7 +128,7 @@
},
{
"title": "Bronze",
- "class": "s-badge__bronze",
+ "code": "s-badge__bronze",
"repType": "bronze",
"html": "s-badge s-badge__bronze",
"label": "javascript",
@@ -74,7 +150,7 @@
},
{
"title": "Info",
- "class": "s-badge__info",
+ "code": "s-badge__info",
"icon": "Compose",
"html": "s-badge s-badge__info",
"label": "Draft",
@@ -82,7 +158,7 @@
},
{
"title": "Warning",
- "class": "s-badge__warning",
+ "code": "s-badge__warning",
"icon": "Eye",
"html": "s-badge s-badge__warning",
"label": "Review",
@@ -90,7 +166,7 @@
},
{
"title": "Danger",
- "class": "s-badge__danger",
+ "code": "s-badge__danger",
"icon": "Flag",
"html": "s-badge s-badge__danger",
"label": "Closed",
@@ -98,7 +174,7 @@
},
{
"title": "Critical",
- "class": "s-badge__critical",
+ "code": "s-badge__critical",
"icon": "Challenge",
"html": "s-badge s-badge__critical",
"label": "Deleted",
@@ -106,7 +182,7 @@
},
{
"title": "Tonal",
- "class": "s-badge__tonal",
+ "code": "s-badge__tonal",
"icon": "Key",
"html": "s-badge s-badge__tonal",
"label": "Pinned",
@@ -114,7 +190,7 @@
},
{
"title": "Success",
- "class": "s-badge__success",
+ "code": "s-badge__success",
"icon": "Check",
"html": "s-badge s-badge__success",
"label": "Success",
@@ -122,7 +198,7 @@
},
{
"title": "Featured",
- "class": "s-badge__featured",
+ "code": "s-badge__featured",
"icon": "Star",
"html": "s-badge s-badge__featured",
"label": "New",
@@ -134,12 +210,12 @@
"squared": [
{
"title": "Squared",
- "class": "s-badge__squared",
+ "code": "s-badge__squared",
"classes": [
{
"title": "Success",
"icon": "Check",
- "class": "s-badge__success",
+ "code": "s-badge__success",
"html": "s-badge s-badge__squared s-badge__success",
"label": "Accepted answer",
"description": "Success badge styling in squared variant."
@@ -147,7 +223,7 @@
{
"title": "Featured",
"icon": "VoteUp",
- "class": "s-badge__featured",
+ "code": "s-badge__featured",
"html": "s-badge s-badge__squared s-badge__featured",
"label": "Earn badge",
"description": "Featured badge styling in squared variant."
@@ -162,26 +238,26 @@
{
"title": "Warning",
"icon": "Notification",
- "html": "s-badge s-badge__squared s-badge__warning s-badge__important",
+ "classes": "s-badge__squared s-badge__warning s-badge__important",
"label": "Needs attention",
"description": "Warning badge styling in squared variant with important styling."
},
{
"title": "Danger",
"icon": "VoteUp",
- "html": "s-badge s-badge__danger s-badge__important",
+ "classes": "s-badge__danger s-badge__important",
"label": "Ending soon",
"description": "Danger badge styling with important styling."
},
{
"title": "Critical",
- "html": "s-badge s-badge__critical s-badge__important",
+ "classes": "s-badge__critical s-badge__important",
"label": "Spam",
"description": "Critical badge styling with important styling."
},
{
"title": "Info",
- "html": "s-badge s-badge__info s-badge__important",
+ "classes": "s-badge__info s-badge__important",
"label": "+100",
"description": "Info badge styling in small size with important styling."
}
@@ -194,43 +270,37 @@
"classes": [
{
"title": "Admin",
- "class": "s-badge__admin",
- "html": "s-badge s-badge__admin",
+ "modifier": "admin",
"label": "Admin",
"description": "Badge indicating user is an admin."
},
{
"title": "Moderator",
- "class": "s-badge__moderator",
- "html": "s-badge s-badge__moderator",
+ "modifier": "moderator",
"label": "Moderator",
"description": "Badge indicating user is an moderator."
},
{
"title": "Staff",
- "class": "s-badge__staff",
- "html": "s-badge s-badge__staff",
+ "modifier": "staff",
"label": "Staff",
"description": "Badge indicating user is staff."
},
{
"title": "AI",
- "class": "s-badge__ai",
- "html": "s-badge s-badge__ai",
+ "modifier": "ai",
"label": "AI",
"description": "Badge indicating content is AI generated."
},
{
"title": "Bot",
- "class": "s-badge__bot",
- "html": "s-badge s-badge__bot",
+ "modifier": "bot",
"label": "Bot",
"description": "Badge indicating user is a bot."
},
{
"title": "New",
- "class": "s-badge__new",
- "html": "s-badge s-badge__new",
+ "modifier": "new",
"label": "New",
"description": "Badge indicating new user"
}
@@ -243,21 +313,19 @@
"classes": [
{
"title": "Small",
- "class": "s-badge__sm",
- "html": "s-badge s-badge__sm s-badge__success",
+ "modifier": "sm",
"label": "Small",
"description": "The badge in small size."
},
{
"title": "Default",
- "html": "s-badge s-badge__warning",
+ "modifier": "",
"label": "Default",
"description": "The badge in default size."
},
{
"title": "Large",
- "class": "s-badge__lg",
- "html": "s-badge s-badge__lg s-badge__danger",
+ "modifier": "lg",
"label": "Large",
"description": "The badge in large size."
}
diff --git a/packages/stacks-docs/_data/components/banners.json b/packages/stacks-docs/_data/components/banners.json
index b40e208cca..11be21fbee 100644
--- a/packages/stacks-docs/_data/components/banners.json
+++ b/packages/stacks-docs/_data/components/banners.json
@@ -1,54 +1,116 @@
{
- "system": [
+ "classes": [
{
- "class": ".s-banner",
- "applies": "N/A",
+ "code": ".s-banner",
"description": "Base banner parent class. This defaults to a system banner style."
},
{
- "class": ".s-banner--dismiss",
- "applies": ".s-banner",
+ "code": ".s-banner--actions",
+ "parent": ".s-banner",
+ "description": "Container styling for banner actions including the dismiss button."
+ },
+ {
+ "code": ".s-banner--dismiss",
+ "parent": ".s-banner",
"description": "Applies to child button element within the banner to position it appropriately."
},
{
- "class": ".s-banner--actions",
+ "code": ".s-banner__important",
"applies": ".s-banner",
- "description": "Container styling for banner actions including the dismiss button."
+ "description": "Applies an important visual style. This should be used for time-sensitive, pressing information that needs to be noticed by the user."
},
{
- "class": ".s-banner__info",
+ "code": ".s-banner__info",
"applies": ".s-banner",
"description": "Applies info (blue) visual styles."
},
{
- "class": ".s-banner__success",
+ "code": ".s-banner__success",
"applies": ".s-banner",
"description": "Applies success (green) visual styles."
},
{
- "class": ".s-banner__warning",
+ "code": ".s-banner__warning",
"applies": ".s-banner",
"description": "Applies warning (yellow) visual styles."
},
{
- "class": ".s-banner__danger",
+ "code": ".s-banner__danger",
"applies": ".s-banner",
"description": "Applies danger (red) visual styles."
},
{
- "class": ".s-banner__featured",
+ "code": ".s-banner__featured",
"applies": ".s-banner",
"description": "Applies featured (purple) visual styles."
},
{
- "class": ".s-banner__activity",
+ "code": ".s-banner__activity",
"applies": ".s-banner",
"description": "Applies activity (pink) visual styles."
},
{
- "class": ".s-banner__important",
+ "code": ".is-pinned",
"applies": ".s-banner",
- "description": "Emboldens the above visual styles by strengthening the background saturation. This should be used for time-sensitive, pressing information that needs to be noticed by the user."
+ "description": "Pins the banner to the top of the browser window."
+ }
+ ],
+ "attributes": [
+ {
+ "code": "data-controller=\"s-banner\"",
+ "primaryContext": "Controller element",
+ "description": "Wires up the element to the banner controller. This may be a .s-banner element or a wrapper element."
+ },
+ {
+ "code": "data-s-banner-target=\"banner\"",
+ "primaryContext": ".s-banner element",
+ "description": "Wires up the element that is to be shown/hidden"
+ },
+ {
+ "code": "data-s-banner-remove-when-hidden=\"true\"",
+ "primaryContext": "Controller element",
+ "description": "(optional) Removes the banner from the DOM entirely when it is hidden"
+ }
+ ],
+ "events": [
+ {
+ "code": "s-banner:show",
+ "primaryContext": "Banner target",
+ "description": "Fires immediately before showing the banner. Calling .preventDefault() cancels the display of the banner."
+ },
+ {
+ "code": "s-banner:shown",
+ "primaryContext": "Banner target",
+ "description": "Fires after the banner has been visually shown"
+ },
+ {
+ "code": "s-banner:hide",
+ "primaryContext": "Banner target",
+ "description": "Fires immediately before hiding the banner. Calling .preventDefault() cancels the removal of the banner."
+ },
+ {
+ "code": "s-banner:hidden",
+ "primaryContext": "Banner target",
+ "description": "Fires after the banner has been visually hidden"
+ }
+ ],
+ "eventDetails": [
+ {
+ "code": "dispatcher",
+ "primaryContext": "Banner target",
+ "description": "Contains the Element that initiated the event. For instance, the button clicked to show, the element clicked outside the banner that caused it to hide, etc."
+ }
+ ],
+ "helpers": [
+ {
+ "code": "Stacks.showBanner",
+ "primaryContext": "Element: the element the data-controller=\"s-banner\" attribute is on",
+ "description": "Helper to manually show an s-banner element via external JS"
+ },
+ {
+ "code": "Stacks.hideBanner",
+ "primaryContext": "Element: the element the data-controller=\"s-banner\" attribute is on",
+ "description": "Helper to manually hide an s-banner element via external JS"
}
]
}
\ No newline at end of file
diff --git a/packages/stacks-docs/_data/atomic/bling.json b/packages/stacks-docs/_data/components/bling.json
similarity index 55%
rename from packages/stacks-docs/_data/atomic/bling.json
rename to packages/stacks-docs/_data/components/bling.json
index 932e910ebe..697270c82e 100644
--- a/packages/stacks-docs/_data/atomic/bling.json
+++ b/packages/stacks-docs/_data/components/bling.json
@@ -1,4 +1,50 @@
{
+ "classes": [
+ {
+ "code": ".s-bling",
+ "description": "Base bling element."
+ },
+ {
+ "code": ".s-bling__gold",
+ "applies": ".s-bling",
+ "description": "Gold bling element."
+ },
+ {
+ "code": ".s-bling__silver",
+ "applies": ".s-bling",
+ "description": "Silver bling element."
+ },
+ {
+ "code": ".s-bling__bronze",
+ "applies": ".s-bling",
+ "description": "Bronze bling element."
+ },
+ {
+ "code": ".s-bling__activity",
+ "applies": ".s-bling",
+ "description": "Activity bling element."
+ },
+ {
+ "code": ".s-bling__filled",
+ "applies": ".s-bling",
+ "description": "Filled bling element."
+ },
+ {
+ "code": ".s-bling__rep",
+ "applies": ".s-bling",
+ "description": "Reputation bling element."
+ },
+ {
+ "code": ".s-bling__sm",
+ "applies": ".s-bling",
+ "description": "Small bling element."
+ },
+ {
+ "code": ".s-bling__lg",
+ "applies": ".s-bling",
+ "description": "Large bling element."
+ }
+ ],
"title": "Bling",
"variants": ["default", "rep", "activity", "gold", "silver", "bronze"],
"sizes": ["sm", "default", "lg"],
diff --git a/packages/stacks-docs/_data/components/breadcrumbs.json b/packages/stacks-docs/_data/components/breadcrumbs.json
index 891c7f6780..9b40c0c299 100644
--- a/packages/stacks-docs/_data/components/breadcrumbs.json
+++ b/packages/stacks-docs/_data/components/breadcrumbs.json
@@ -1,23 +1,22 @@
{
"classes": [
{
- "class": ".s-breadcrumbs",
- "applies": "N/A",
+ "code": ".s-breadcrumbs",
"description": "Base parent container for breadcrumbs"
},
{
- "class": ".s-breadcrumbs--item",
- "applies": ".s-breadcrumbs",
+ "code": ".s-breadcrumbs--item",
+ "parent": ".s-breadcrumbs",
"description": "Individual breadcrumb element containing a link and a divider"
},
{
- "class": ".s-breadcrumbs--link",
- "applies": ".s-breadcrumbs--item",
+ "code": ".s-breadcrumbs--link",
+ "parent": ".s-breadcrumbs--item",
"description": "Breadcrumb link element"
},
{
- "class": ".s-breadcrumbs--divider",
- "applies": ".s-breadcrumbs--item",
+ "code": ".s-breadcrumbs--divider",
+ "parent": ".s-breadcrumbs--item",
"description": "Breadcrumb divider element"
}
]
diff --git a/packages/stacks-docs/_data/components/button-groups.json b/packages/stacks-docs/_data/components/button-groups.json
index 11ee7a5c00..fbdee95c75 100644
--- a/packages/stacks-docs/_data/components/button-groups.json
+++ b/packages/stacks-docs/_data/components/button-groups.json
@@ -1,8 +1,7 @@
{
"classes": [
{
- "class": ".s-btn-group",
- "applies": "N/A",
+ "code": ".s-btn-group",
"description": "Base button group style."
}
],
diff --git a/packages/stacks-docs/_data/components/buttons.json b/packages/stacks-docs/_data/components/buttons.json
index a26062cb88..f4a11471e9 100644
--- a/packages/stacks-docs/_data/components/buttons.json
+++ b/packages/stacks-docs/_data/components/buttons.json
@@ -1,4 +1,85 @@
{
+ "classes": [
+ {
+ "code": ".s-btn",
+ "description": "Base button element"
+ },
+ {
+ "code": ".s-btn--badge",
+ "parent": ".s-btn",
+ "description": "Badge container for the button"
+ },
+ {
+ "code": ".s-btn__clear",
+ "applies": ".s-btn",
+ "description": "Clear button variant"
+ },
+ {
+ "code": ".s-btn__danger",
+ "applies": ".s-btn",
+ "description": "Danger button variant"
+ },
+ {
+ "code": ".s-btn__featured",
+ "applies": ".s-btn",
+ "description": "Featured button variant"
+ },
+ {
+ "code": ".s-btn__tonal",
+ "applies": ".s-btn",
+ "description": "Tonal button variant"
+ },
+ {
+ "code": ".s-btn__dropdown",
+ "applies": ".s-btn",
+ "description": "Dropdown button variant"
+ },
+ {
+ "code": ".s-btn__icon",
+ "applies": ".s-btn",
+ "description": "Icon button variant"
+ },
+ {
+ "code": ".s-btn__link",
+ "applies": ".s-btn",
+ "description": "Link button variant"
+ },
+ {
+ "code": ".s-btn__unset",
+ "applies": ".s-btn",
+ "description": "Unset button variant"
+ },
+ {
+ "code": ".s-btn__facebook",
+ "applies": ".s-btn",
+ "description": "Facebook button variant"
+ },
+ {
+ "code": ".s-btn__github",
+ "applies": ".s-btn",
+ "description": "GitHub button variant"
+ },
+ {
+ "code": ".s-btn__google",
+ "applies": ".s-btn",
+ "description": "Google button variant"
+ },
+ {
+ "code": ".s-btn__xs",
+ "applies": ".s-btn",
+ "description": "Extra small button variant"
+ },
+ {
+ "code": ".s-btn__sm",
+ "applies": ".s-btn",
+ "description": "Small button variant"
+ },
+ {
+ "code": ".s-btn__lg",
+ "applies": ".s-btn",
+ "description": "Large button variant"
+ }
+ ],
"base": [
{
"title": "Base",
diff --git a/packages/stacks-docs/_data/components/cards.json b/packages/stacks-docs/_data/components/cards.json
new file mode 100644
index 0000000000..fac8316d2a
--- /dev/null
+++ b/packages/stacks-docs/_data/components/cards.json
@@ -0,0 +1,13 @@
+{
+ "classes": [
+ {
+ "code": ".s-card",
+ "description": "Base card style."
+ },
+ {
+ "code": ".s-card__muted",
+ "applies": ".s-card",
+ "description": "Muted card style."
+ }
+ ]
+}
\ No newline at end of file
diff --git a/packages/stacks-docs/_data/components/checkbox_radio.json b/packages/stacks-docs/_data/components/checkbox_radio.json
index 1ec9b19c02..adce85156c 100644
--- a/packages/stacks-docs/_data/components/checkbox_radio.json
+++ b/packages/stacks-docs/_data/components/checkbox_radio.json
@@ -1,4 +1,26 @@
{
+ "checkbox-classes": [
+ {
+ "code": ".s-checkbox",
+ "description": "Base checkbox style."
+ },
+ {
+ "code": ".s-checkbox__checkmark",
+ "applies": ".s-checkbox",
+ "description": "Checkmark style."
+ }
+ ],
+ "radio-classes": [
+ {
+ "code": ".s-radio",
+ "description": "Base radio style."
+ },
+ {
+ "code": ".s-radio__checkmark",
+ "applies": ".s-radio",
+ "description": "Checkmark style."
+ }
+ ],
"checkbox": [
{
"description": "Unchecked checkbox.",
diff --git a/packages/stacks-docs/_data/components/code-blocks.json b/packages/stacks-docs/_data/components/code-blocks.json
index ceda5424a9..da6d1b1de0 100644
--- a/packages/stacks-docs/_data/components/code-blocks.json
+++ b/packages/stacks-docs/_data/components/code-blocks.json
@@ -1,19 +1,18 @@
{
"classes": [
{
- "class": ".s-code-block",
- "applies": "N/A",
- "description": "Adds proper styling to pre-formatted code."
+ "code": ".s-code-block",
+ "description": "Base code block style."
},
{
- "class": ".linenums",
+ "code": ".linenums",
"applies": ".s-code-block",
"description": "Adds a line numbers column to the code block."
},
{
- "class": ".linenums:<n>",
+ "code": ".linenums:<n>",
"applies": ".s-code-block",
- "description": "Adds a line numbers column to the code block starting at a number <n>."
+ "description": "Adds a line numbers column to the code block starting at a number <n>."
}
]
}
diff --git a/packages/stacks-docs/_data/components/empty-states.json b/packages/stacks-docs/_data/components/empty-states.json
new file mode 100644
index 0000000000..d531405502
--- /dev/null
+++ b/packages/stacks-docs/_data/components/empty-states.json
@@ -0,0 +1,8 @@
+{
+ "classes": [
+ {
+ "code": ".s-empty-state",
+ "description": "Base empty state style."
+ }
+ ]
+}
\ No newline at end of file
diff --git a/packages/stacks-docs/_data/components/expandable.json b/packages/stacks-docs/_data/components/expandable.json
new file mode 100644
index 0000000000..ddd1527443
--- /dev/null
+++ b/packages/stacks-docs/_data/components/expandable.json
@@ -0,0 +1,18 @@
+{
+ "classes": [
+ {
+ "code": ".s-expandable",
+ "description": "Container for the expandable content. Include an id attribute to be referenced by the expandable control."
+ },
+ {
+ "code": ".s-expandable--content",
+ "parent": ".s-expandable",
+ "description": "Class for the expandable content. This is the content that will be shown and hidden when the expandable is toggled."
+ },
+ {
+ "code": ".is-expanded",
+ "applies": ".s-expandable",
+ "description": "Expanded state class."
+ }
+ ]
+}
\ No newline at end of file
diff --git a/packages/stacks-docs/_data/components/inputs.json b/packages/stacks-docs/_data/components/inputs.json
index 4920754b54..e92daf982c 100644
--- a/packages/stacks-docs/_data/components/inputs.json
+++ b/packages/stacks-docs/_data/components/inputs.json
@@ -1,298 +1,54 @@
{
- "validation": [
+ "classes": [
{
- "class": ".has-warning",
- "description": "Used to warn users that the value they’ve entered has a potential problem, but it doesn’t block them from proceeding."
+ "code": ".s-input",
+ "description": "Base input style."
},
{
- "class": ".has-error",
- "description": "Used to alert users that the value they’ve entered is incorrect, not filled in, or has a problem which will block them from proceeding."
+ "code": ".s-input__creditcard",
+ "applies": ".s-input",
+ "description": "Adds a credit card icon to the input."
},
{
- "class": ".has-success",
- "description": "Used to notify users that the value they’ve entered is fine or has been submitted successfully."
- }
- ],
- "input": [
- {
- "sizes": [
- {
- "name": "Small",
- "size": "13px",
- "class": "s-input__sm"
- },
- {
- "name": "Default",
- "size": "14px",
- "class": "N/A"
- },
- {
- "name": "Large",
- "size": "18px",
- "class": "s-input__lg"
- }
- ]
+ "code": ".s-input__search",
+ "applies": ".s-input",
+ "description": "Adds a search icon to the input."
},
{
- "types": [
- {
- "name": "color",
- "html5": true,
- "description": "Allows user to select a color and returns the hex value for that color. The color picker used is native to the OS or the browser."
- },
- {
- "name": "date",
- "html5": true,
- "description": "Allows user to enter a date (year, month, and day) without a time."
- },
- {
- "name": "datetime-local",
- "html5": true,
- "description": "Allows user to enter a date (year, month, and day) and a time, with no time zone."
- },
- {
- "name": "email",
- "html5": true,
- "description": "Allows user to enter an email address. Some mobile devices will deliver custom keyboards specifically for entering email addresses."
- },
- {
- "name": "file",
- "html5": false,
- "description": "Allows user to select a file. To define the type of files that can be selected, use the accept=\"\" attribute."
- },
- {
- "name": "month",
- "html5": true,
- "description": "Allows user to enter a month and year with no time zone."
- },
- {
- "name": "number",
- "html5": true,
- "description": "Limits user to entering only numbers. Some mobile devices will deliver a custom keyboard."
- },
- {
- "name": "password",
- "html5": false,
- "description": "Single-line text input whose value is obsecured. Use the minlength and maxlength attributes to specify the value length."
- },
- {
- "name": "range",
- "html5": true,
- "description": "Allows user to enter a number who exact value isn't important."
- },
- {
- "name": "search",
- "html5": true,
- "description": "Single-line text input for entering search strings. Some mobile devices will deliver a custom keyboard."
- },
- {
- "name": "tel",
- "html5": true,
- "description": "Allows user to enter a telephone number. Some mobile devices will deliver a custom keyboard."
- },
- {
- "name": "text",
- "html5": false,
- "description": "Single-line text input field."
- },
- {
- "name": "time",
- "html5": true,
- "description": "Allows user to enter a time value with no time zone."
- },
- {
- "name": "url",
- "html5": true,
- "description": "Allows user to enter a website URL. Some mobile devices will deliver a custom keyboard."
- },
- {
- "name": "week",
- "html5": true,
- "description": "Allows user to enter a date consisting of a week-year number and a week number with no time zone."
- }
- ]
+ "code": ".s-input__sm",
+ "applies": ".s-input",
+ "description": "Apply a small size."
},
{
- "attributes": [
- {
- "name": "accept",
- "html5": false,
- "description": "If the type is file, then this attribute will indicate the file types that will be accepted. The value must be a comma-separated list."
- },
- {
- "name": "autocomplete",
- "html5": true,
- "description": "Indicates if the control value can be automatically completed by the browser. For a full list of possible values, please visit MDN Inputs page."
- },
- {
- "name": "autofocus",
- "html5": true,
- "description": "Lets you specify which form control should have input focus on page load. Only one element can have this attribute and it cannot be set on hidden elements."
- },
- {
- "name": "capture",
- "html5": false,
- "description": "If the type is file, then this Boolean attribute will indicate that the capture of media directly from the device's environment using a media capture mechanicism is preferred (e.g. taking a photo using a camera)."
- },
- {
- "name": "disabled",
- "html5": false,
- "description": "Boolean attribute that indicates the input is not available for interaction."
- },
- {
- "name": "form",
- "html5": true,
- "description": "This attribute associates the form element with the input element. The input value must be the form's id value within the same document. If this isn't specified, the input will use the closest ancestor form element. This attribute allows you to place inputs anywhere on the page, not just as a descendant within a form element. An input can only be associated with one form."
- },
- {
- "name": "max",
- "html5": true,
- "description": "Maximum numeric or date-time value for this item, which cannot be lesser than the minimum value."
- },
- {
- "name": "maxlength",
- "html5": true,
- "description": "If type is text, email, search, password, tel, or url; this attribute sets the maximum number of characters that can be entered."
- },
- {
- "name": "min",
- "html5": true,
- "description": "Minimum numeric or date-time value for this item, which cannot be greater than the minimum value."
- },
- {
- "name": "minlength",
- "html5": true,
- "description": "If type is text, email, search, password, tel, or url; this attribute sets the minimum number of characters that must be entered."
- },
- {
- "name": "multiple",
- "html5": true,
- "description": "If type is email or file, this attribute allows for more than one value."
- },
- {
- "name": "name",
- "html5": false,
- "description": "Name of the control which is submitted with the form data."
- },
- {
- "name": "placeholder",
- "html5": true,
- "description": "Provides a hint to the user of what can be entered into the control."
- },
- {
- "name": "readonly",
- "html5": true,
- "description": "Indicates that the control cannot be modified by the user. This is ignored if the type attribute is hidden, range, color, checkbox, radio, or a button type."
- },
- {
- "name": "required",
- "html5": true,
- "description": "Specifies that the user must provide a value for this control before submitting the form. This is ignored if the type attribute is hidden, image, or a button type."
- },
- {
- "name": "selectionDirection",
- "html5": true,
- "description": "Specifies the direction in which a selection occurs."
- },
- {
- "name": "selectionEnd",
- "html5": false,
- "description": "The offset into the element's text content of the last selected character. If there's no selection, this value indicates the offset to the character following the current text input cursor position (that is, the position the next character typed would occupy)."
- },
- {
- "name": "selectionStart",
- "html5": false,
- "description": "The offset into the element's text content of the first selected character. If there's no selection, this value indicates the offset to the character following the current text input cursor position (that is, the position the next character typed would occupy)."
- },
- {
- "name": "size",
- "html5": false,
- "description": "The control's initial size."
- },
- {
- "name": "spellcheck",
- "html5": true,
- "description": "Setting the value to true indicates that the element needs to have its spelling and grammar checked."
- },
- {
- "name": "step",
- "html5": true,
- "description": "Works with min and max attributes to limit the increments at which a numeric or date-time value can be set."
- },
- {
- "name": "tabindex",
- "html5": true,
- "description": "Position of the element in the tab navigation order for the current document."
- },
- {
- "name": "value",
- "html5": false,
- "description": "Initial value for the control."
- }
- ]
+ "code": ".s-input__lg",
+ "applies": ".s-input",
+ "description": "Apply a large size."
}
],
- "textarea": [
+ "sizes": [
{
- "sizes": [
- {
- "name": "Small",
- "size": "13px",
- "class": "s-textarea__sm"
- },
- {
- "name": "Default",
- "size": "14px",
- "class": "N/A"
- },
- {
- "name": "Large",
- "size": "18px",
- "class": "s-textarea__lg"
- }
- ]
- }
- ],
- "select": [
+ "primaryContext": "Small",
+ "secondaryContext": "13px",
+ "code": ".s-input__sm",
+ "description": ""
+ },
+ {
+ "primaryContext": "Default",
+ "secondaryContext": "14px",
+ "description": ""
+ },
{
- "sizes": [
- {
- "name": "Small",
- "size": "13px",
- "class": "s-select__sm"
- },
- {
- "name": "Default",
- "size": "14px",
- "class": "N/A"
- },
- {
- "name": "Large",
- "size": "18px",
- "class": "s-select__lg"
- }
- ]
+ "primaryContext": "Large",
+ "secondaryContext": "18px",
+ "code": ".s-input__lg",
+ "description": ""
}
],
- "label": [
+ "required": [
{
- "sizes": [
- {
- "name": "Small",
- "size": "14px",
- "class": "s-label__sm"
- },
- {
- "name": "Default",
- "size": "16px",
- "class": "N/A"
- },
- {
- "name": "Large",
- "size": "22px",
- "class": "s-label__lg"
- }
- ]
+ "code": ".s-required-symbol",
+ "secondaryContext": "abbr element enclosing the asterisk",
+ "description": "Used to style the asterisk indicating that a specific field is required."
}
]
}
\ No newline at end of file
diff --git a/packages/stacks-docs/_data/components/labels.json b/packages/stacks-docs/_data/components/labels.json
new file mode 100644
index 0000000000..7dd3f1ae97
--- /dev/null
+++ b/packages/stacks-docs/_data/components/labels.json
@@ -0,0 +1,37 @@
+{
+ "classes": [
+ {
+ "code": ".s-label",
+ "description": "Base label style."
+ },
+ {
+ "code": ".s-label__sm",
+ "applies": ".s-label",
+ "description": "Apply a small size."
+ },
+ {
+ "code": ".s-label__lg",
+ "applies": ".s-label",
+ "description": "Apply a large size."
+ }
+ ],
+ "sizes": [
+ {
+ "code": ".s-label__sm",
+ "secondaryContext": "14px",
+ "primaryContext": "Small",
+ "description": ""
+ },
+ {
+ "secondaryContext": "16px",
+ "primaryContext": "Default",
+ "description": ""
+ },
+ {
+ "code": ".s-label__lg",
+ "secondaryContext": "22px",
+ "primaryContext": "Large",
+ "description": ""
+ }
+ ]
+}
\ No newline at end of file
diff --git a/packages/stacks-docs/_data/components/link-previews.json b/packages/stacks-docs/_data/components/link-previews.json
index 510b985493..a358bc60db 100644
--- a/packages/stacks-docs/_data/components/link-previews.json
+++ b/packages/stacks-docs/_data/components/link-previews.json
@@ -1,59 +1,81 @@
{
"classes": [
{
- "class": ".s-link-preview",
- "parent": "N/A",
+ "code": ".s-link-preview",
"description": "Base parent container for link previews"
},
{
- "class": ".s-link-preview--header",
+ "code": ".s-link-preview--header",
"parent": ".s-link-preview",
"description": "Top section containing the title and details"
},
{
- "class": ".s-link-preview--icon",
- "parent": ".s-link-preview--header",
- "description": "Logo of the third party link. Use the @Svg.Helper."
- },
- {
- "class": ".s-link-preview--title",
- "parent": ".s-link-preview--header",
- "description": "Title of the linked file"
- },
- {
- "class": ".s-link-preview--details",
- "parent": ".s-link-preview--header",
- "description": "Details and meta data of the linked file"
- },
- {
- "class": ".s-link-preview--body",
+ "code": ".s-link-preview--body",
"parent": ".s-link-preview",
"description": "Middle section containing the body of the linked file whose expected content is rich text or markdown"
},
{
- "class": ".s-link-preview--code",
+ "code": ".s-link-preview--code",
"parent": ".s-link-preview",
"description": "Middle section containing the body of the linked file whose expected content is code"
},
{
- "class": ".s-link-preview--footer",
+ "code": ".s-link-preview--footer",
"parent": ".s-link-preview",
"description": "Bottom section containing URL details"
},
{
- "class": ".s-link-preview--url",
+ "code": ".s-link-preview--icon",
+ "parent": ".s-link-preview--header",
+ "description": "Logo of the third party link. Use the @Svg.Helper."
+ },
+ {
+ "code": ".s-link-preview--title",
+ "parent": ".s-link-preview--header",
+ "description": "Title of the linked file."
+ },
+ {
+ "code": ".s-link-preview--details",
+ "parent": ".s-link-preview--header",
+ "description": "Details and meta data of the linked file."
+ },
+ {
+ "code": ".s-link-preview--url",
"parent": ".s-link-preview--footer",
- "description": "URL of the linked file"
+ "description": "URL of the linked file."
},
{
- "class": ".s-link-preview--misc",
+ "code": ".s-link-preview--misc",
"parent": ".s-link-preview--footer",
"description": "(optional) A small catch-all for anything you might need. This page contains a few use cases."
},
{
- "class": ".linenums",
+ "code": ".linenums",
"parent": ".s-link-preview--code",
"description": "Added to the pre of the preview block to properly display line numbers"
}
- ]
+ ],
+ "examples": {
+ "base": {
+ "title": "Using hooks for a simple fetch request and breaking the rules of hooks, unsure how?",
+ "description": "Use for links whose expected body is rich text or markdown like Jira issues or Slack messages. Wherever possible, it’s best practice to support basic markdown formatting (bold, italics, line breaks, lists, etc.)",
+ "details": "Issue submitted by Ricky Otero on s-link-preview--body class with s-link-preview--code.",
+ "details": "Located in StackExchange / Stacks",
+ "code": "use strict;\n\nmodule.exports = function(grunt) {\n grunt.initConfig({\n pkg: grunt.file.readJSON('package.json'),\n version: '<%= pkg.version %>',\n\n // Shell commands for use in Grunt tasks\n shell: {\n eleventyBuild: {\n command: 'npx @11ty/eleventy',\n options: {\n stderr: false,\n execOptions: {\n cwd: 'docs'\n }\n }\n }\n }\n });\n\n grunt.loadNpmTasks('grunt-contrib-uglify');\n\n grunt.registerTask('default', ['uglify']);\n};",
+ "url": "https://github.com/StackExchange/Stacks/blob/develop/Gruntfile.js",
+ "misc": "(truncated)"
+ }
+ }
}
\ No newline at end of file
diff --git a/packages/stacks-docs/_data/components/links.json b/packages/stacks-docs/_data/components/links.json
index ec624fcdcd..2ef10caf76 100644
--- a/packages/stacks-docs/_data/components/links.json
+++ b/packages/stacks-docs/_data/components/links.json
@@ -1,86 +1,84 @@
{
- "single-links": [
+ "link-classes": [
{
- "class": ".s-link",
- "applies": "N/A",
+ "code": ".s-link",
"description": "Base link style that is used almost universally."
},
{
- "class": ".s-link__grayscale",
+ "code": ".s-link__grayscale",
"applies": ".s-link",
"description": "A link style modification with our default text color."
},
{
- "class": ".s-link__muted",
+ "code": ".s-link__muted",
"applies": ".s-link",
"description": "Applies a visually muted style to the base style."
},
{
- "class": ".s-link__danger",
+ "code": ".s-link__danger",
"applies": ".s-link",
"description": "Applies an important, destructive red to the base style."
},
{
- "class": ".s-link__inherit",
+ "code": ".s-link__inherit",
"applies": ".s-link",
"description": "Applies the parent element’s text color."
},
{
- "class": ".s-link__underlined",
+ "code": ".s-link__underlined",
"applies": ".s-link",
"description": "Adds an underline to the link’s text."
},
{
- "class": ".s-link__dropdown",
+ "code": ".s-link__dropdown",
"applies": ".s-link",
"description": "Applies a caret for dropdowns and additional interactivity."
}
],
- "descendent-anchors": [
+ "anchors-classes": [
{
- "class": ".s-anchors",
+ "code": ".s-anchors",
"name": "base",
- "applies": "N/A",
"description": "A consistent link style is applied to all descendent anchors.",
"exampleClasses": ""
},
{
- "class": ".s-anchors__default",
+ "code": ".s-anchors__default",
"applies": ".s-anchors",
"name": "default",
"description": "All descendent links receive s-link’s default styling.",
"exampleClasses": ""
},
{
- "class": ".s-anchors__grayscale",
+ "code": ".s-anchors__grayscale",
"applies": ".s-anchors",
"name": "grayscale",
"description": "Applies gray styling to all descendent links.",
"exampleClasses": "fc-orange-500"
},
{
- "class": ".s-anchors__muted",
+ "code": ".s-anchors__muted",
"applies": ".s-anchors",
"name": "muted",
"description": "Applies a visually muted style to all descendent links.",
"exampleClasses": ""
},
{
- "class": ".s-anchors__danger",
+ "code": ".s-anchors__danger",
"applies": ".s-anchors",
"name": "danger",
"description": "Applies an important, destructive red to all descendent links.",
"exampleClasses": ""
},
{
- "class": ".s-anchors__underlined",
+ "code": ".s-anchors__underlined",
"applies": ".s-anchors",
"name": "underlined",
"description": "Applies an underline to all descendent links.",
"exampleClasses": ""
},
{
- "class": ".s-anchors__inherit",
+ "code": ".s-anchors__inherit",
"applies": ".s-anchors",
"name": "inherit",
"description": "Applies the parent element’s text color to all descendent links.",
diff --git a/packages/stacks-docs/_data/components/loader.json b/packages/stacks-docs/_data/components/loader.json
index 05abfa09a8..6bde8f7915 100644
--- a/packages/stacks-docs/_data/components/loader.json
+++ b/packages/stacks-docs/_data/components/loader.json
@@ -1,25 +1,40 @@
{
"classes": [
{
- "class": ".s-loader",
- "applies": "N/A",
+ "code": ".s-loader",
"description": "Base class for the loader component"
},
{
- "class": ".s-loader--sr-text",
- "applies": ".s-loader",
- "description": "Child necessary to render the center loader block and renders the accessible text"
+ "code": ".s-loader--sr-text",
+ "parent": ".s-loader",
+ "description": "Necessary to render the center loader block and renders the accessible text"
},
{
- "class": ".s-loader__sm",
+ "code": ".s-loader__sm",
"applies": ".s-loader",
"description": "A small variant of the loader component"
},
{
- "class": ".s-loader__lg",
+ "code": ".s-loader__lg",
"applies": ".s-loader",
"description": "A large variant of the loader component"
}
],
+ "sizes-classes": [
+ {
+ "code": ".s-loader__sm",
+ "applies": ".s-loader",
+ "description": "
.s-modal",
- "description": "Adds styling for potentially dangerous actions"
+ "code": ".s-modal--dialog",
+ "parent": ".s-modal",
+ "description": "Creates a container that holds the modal dialog with proper padding and shadows."
},
{
- "class": ".s-modal--dialog",
- "applies": "Child of .s-modal",
- "description": "Creates a container that holds the modal dialog with proper padding and shadows"
+ "code": ".s-modal--body",
+ "parent": ".s-modal--dialog",
+ "description": "Adds proper styling to the modal dialog’s body text."
},
{
- "class": ".s-modal--header",
- "applies": "Child of .s-modal--dialog",
- "description": "Adds proper styling to the modal dialog’s header"
+ "code": ".s-modal--close",
+ "parent": ".s-modal--dialog",
+ "description": "Used to dismiss a modal."
},
{
- "class": ".s-modal--body",
- "applies": "Child of .s-modal--dialog",
- "description": "Adds proper styling to the modal dialog’s body text"
+ "code": ".s-modal--header",
+ "parent": ".s-modal--dialog",
+ "description": "Adds proper styling to the modal dialog’s header."
},
{
- "class": ".s-modal--footer",
- "applies": "Child of .s-modal--dialog",
+ "code": ".s-modal--footer",
+ "parent": ".s-modal--dialog",
"description": "Adds the desired spacing to the row of button actions."
},
{
- "class": ".s-modal--close",
- "applies": "Child of .s-modal--dialog",
- "description": "Used to dismiss a modal"
+ "code": ".s-modal__danger",
+ "applies": ".s-modal",
+ "description": "Adds styling for potentially dangerous actions."
},
{
- "class": ".s-modal__full",
- "applies": ".s-modal--dialog",
- "description": "Makes the .s-modal--dialog container take up as much of the screen as possible."
+ "code": ".s-modal__full",
+ "applies": ".s-modal--dialog",
+ "description": "Makes the container take up as much of the screen as possible."
+ }
+ ],
+ "attributes": [
+ {
+ "code": "data-controller=\"s-modal\"",
+ "primaryContext": "Controller element",
+ "description": "Wires up the element to the modal controller. This may be a .s-modal element or a wrapper element."
+ },
+ {
+ "code": "data-s-modal-target=\"modal\"",
+ "primaryContext": ".s-modal element",
+ "description": "Wires up the element that is to be shown/hidden"
+ },
+ {
+ "code": "data-s-modal-target=\"initialFocus\"",
+ "primaryContext": "Any child focusable element",
+ "description": "Designates which element to focus on modal show. If absent, defaults to the first focusable element within the modal."
+ },
+ {
+ "code": "data-action=\"s-modal#toggle\"",
+ "primaryContext": "Any child focusable element",
+ "description": "Wires up the element that is to be shown/hidden"
+ },
+ {
+ "code": "data-action=\"s-modal#hide\"",
+ "primaryContext": "Any child focusable element",
+ "description": "Wires up the element that is to be shown/hidden"
+ },
+ {
+ "code": "data-s-modal-return-element=\"[css selector]\"",
+ "primaryContext": "Controller element",
+ "description": "Designates the element to return focus to when the modal is closed. If left unset, focus is not altered on close."
+ },
+ {
+ "code": "data-s-modal-remove-when-hidden=\"true\"",
+ "primaryContext": "Controller element",
+ "description": "Removes the modal from the DOM entirely when it is hidden"
+ }
+ ],
+ "events": [
+ {
+ "code": "s-modal:show",
+ "primaryContext": "Modal target",
+ "description": "Fires immediately before showing the modal. Calling .preventDefault() cancels the display of the modal."
+ },
+ {
+ "code": "s-modal:shown",
+ "primaryContext": "Modal target",
+ "description": "Fires after the modal has been visually shown"
+ },
+ {
+ "code": "s-modal:hide",
+ "primaryContext": "Modal target",
+ "description": "Fires immediately before hiding the modal. Calling .preventDefault() cancels the removal of the modal."
+ },
+ {
+ "code": "s-modal:hidden",
+ "primaryContext": "Modal target",
+ "description": "Fires after the modal has been visually hidden"
+ }
+ ],
+ "eventDetails": [
+ {
+ "code": "dispatcher",
+ "primaryContext": "Modal target",
+ "description": "Contains the Element that initiated the event. For instance, the button clicked to show, the element clicked outside the modal that caused it to hide, etc."
+ },
+ {
+ "code": "returnElement",
+ "primaryContext": "Modal target",
+ "description": "Contains the Element to return focus to on hide. If a value is set to this property inside an event listener, it will be updated on the controller as well."
+ }
+ ],
+ "helpers": [
+ {
+ "code": "Stacks.showModal",
+ "primaryContext": "Controller element",
+ "description": "Helper to manually show an s-modal element via external JS"
+ },
+ {
+ "code": "Stacks.hideModal",
+ "primaryContext": "Controller element",
+ "description": "Helper to manually hide an s-modal element via external JS"
+ }
+ ],
+ "accessibility": [
+ {
+ "code": "aria-describedby=\"[id]\"",
+ "primaryContext": "Modal target",
+ "description": "Supply the modal’s summary copy id. Assistive technologies (such as screen readers) use this to attribute to associate static text with a widget, element groups, headings, definitions, etc. (Source)"
+ },
+ {
+ "code": "aria-hidden=\"[state]\"",
+ "primaryContext": "Modal target",
+ "description": "Informs assistive technologies (such as screen readers) if they should ignore the element. This should not be confused with the HTML5 hidden attribute which tells the browser to not display an element. (Source)"
+ },
+ {
+ "code": "aria-label=\"[text]\"",
+ "primaryContext": "Modal target",
+ "description": "Labels the element for assistive technologies (such as screen readers). (Source)"
+ },
+ {
+ "code": "aria-labelledby=\"[id]\"",
+ "primaryContext": "Modal target",
+ "description": "Supply the modal’s title id here. Assistive technologies (such as screen readers) use this to attribute to catalog the document objects correctly. (Source)"
+ },
+ {
+ "code": "role=\"dialog\"",
+ "primaryContext": "Modal target",
+ "description": "Identifies dialog elements for assistive technologies (Source)"
+ },
+ {
+ "code": "role=\"document\"",
+ "primaryContext": "Modal target",
+ "description": "Helps assistive technologies to switch their reading mode from the larger document to a focused dialog window. (Source)"
+ }
+ ],
+ "sizes": [
+ {
+ "code": ".s-modal__full",
+ "secondaryContext": "100% - 48px"
}
]
}
diff --git a/packages/stacks-docs/_data/components/navigation.json b/packages/stacks-docs/_data/components/navigation.json
index e60d4e5e79..dcec6f281c 100644
--- a/packages/stacks-docs/_data/components/navigation.json
+++ b/packages/stacks-docs/_data/components/navigation.json
@@ -1,54 +1,53 @@
{
"classes": [
{
- "class": ".s-navigation",
- "applies": "N/A",
- "description": "Base parent container for navigation"
+ "code": ".s-navigation",
+ "description": "Base parent container for navigation."
},
{
- "class": ".s-navigation__vertical",
- "applies": ".s-navigation",
- "description": "Renders the navigation vertically"
- },
- {
- "class": ".s-navigation__scroll",
- "applies": ".s-navigation",
- "description": "When the navigation items overflow the width of the component, enable horizontal scrolling. By default, navigation items will wrap. This should not be applied to vertical navigations."
+ "code": ".s-navigation--item",
+ "parent": ".s-navigation",
+ "description": "The individual item in a navigation"
},
{
- "class": ".s-navigation__sm",
- "applies": ".s-navigation",
- "description": "Tightens up the overall spacing and reduces the text size"
+ "code": ".s-navigation--avatar",
+ "parent": ".s-navigation--item",
+ "description": "Applies styling to the avatar of the navigation item"
},
{
- "class": ".s-navigation--item",
- "applies": "Child of .s-navigation",
- "description": "The individual item in a navigation"
+ "code": ".s-navigation--icon",
+ "parent": ".s-navigation--item",
+ "description": "Applies styling to the icon of the navigation item"
},
{
- "class": ".s-navigation--item-text",
- "applies": "Child of .s-navigation--item",
+ "code": ".s-navigation--item-text",
+ "parent": ".s-navigation--item",
"description": "The element meant to contain the text of the navigation item"
},
{
- "class": ".s-navigation--icon",
- "applies": "Child of .s-navigation--item",
- "description": "Applies styling to the icon of the navigation item"
+ "code": ".s-navigation__scroll",
+ "applies": ".s-navigation",
+ "description": "When the navigation items overflow the width of the component, enable horizontal scrolling. By default, navigation items will wrap. This should not be applied to vertical navigations."
},
{
- "class": ".s-navigation--avatar",
- "applies": "Child of .s-navigation--item",
- "description": "Applies styling to the avatar of the navigation item"
+ "code": ".s-navigation__sm",
+ "applies": ".s-navigation",
+ "description": "Tightens up the overall spacing and reduces the text size"
},
{
- "class": ".is-selected",
- "applies": ".s-navigation--item",
- "description": "Applies to a navigation item that’s currently selected / active"
+ "code": ".s-navigation__vertical",
+ "applies": ".s-navigation",
+ "description": "Renders the navigation vertically."
},
{
- "class": ".s-navigation--item__dropdown",
- "applies": ".s-navigation--item",
+ "code": ".s-navigation--item__dropdown",
+ "applies": ".s-navigation--item",
"description": "Adds a small caret that indicates a dropdown"
+ },
+ {
+ "code": ".is-selected",
+ "applies": ".s-navigation--item",
+ "description": "Applies to a navigation item that’s currently selected / active"
}
],
"navigation-attributes": [
diff --git a/packages/stacks-docs/_data/components/notices.json b/packages/stacks-docs/_data/components/notices.json
index 59a24206d8..e100c35b7f 100644
--- a/packages/stacks-docs/_data/components/notices.json
+++ b/packages/stacks-docs/_data/components/notices.json
@@ -1,136 +1,206 @@
{
- "base": [
+ "classes": [
{
- "type": "default",
- "icon": "Help"
- },
- {
- "type": "info",
- "icon": "Info"
+ "code": ".s-notice",
+ "primaryContext": ".s-toast when rendered as a toast",
+ "description": "Base notice parent class."
},
{
- "type": "success",
- "icon": "Check"
+ "code": ".s-notice--actions",
+ "parent": ".s-notice",
+ "description": "Container styling for notice actions including the dismiss button."
},
{
- "type": "warning",
- "icon": "Alert"
+ "code": ".s-notice--dismiss",
+ "parent": ".s-notice",
+ "description": "Applies to child button element within the notice to position it appropriately."
},
{
- "type": "danger",
- "icon": "AlertFill"
+ "code": ".s-notice__activity",
+ "applies": ".s-notice",
+ "description": "Applies activity (pink) visual styles."
},
{
- "type": "featured",
- "icon": "Star"
+ "code": ".s-notice__danger",
+ "applies": ".s-notice",
+ "description": "Applies danger (red) visual styles."
},
{
- "type": "activity",
- "icon": "Notification"
- }
- ],
- "visual": [
- {
- "class": ".s-notice",
- "applies": "N/A",
- "description": "Default style used to separate notices from the main content."
+ "code": ".s-notice__featured",
+ "applies": ".s-notice",
+ "description": "Applies featured (purple) visual styles."
},
{
- "class": ".s-notice--dismiss",
+ "code": ".s-notice__important",
"applies": ".s-notice",
- "description": "Applies to child button element within the banner to position it appropriately."
+ "description": "Applies an important visual style. This should be used for time-sensitive, pressing information that needs to be noticed by the user."
},
{
- "class": ".s-notice--actions",
+ "code": ".s-notice__info",
"applies": ".s-notice",
- "description": "Container styling for notice actions including the dismiss button."
+ "description": "Applies info (blue) visual styles."
},
{
- "class": ".s-notice__info",
+ "code": ".s-notice__success",
"applies": ".s-notice",
- "description": "Visual style for information notices."
+ "description": "Applies success (green) visual styles."
},
{
- "class": ".s-notice__success",
+ "code": ".s-notice__warning",
"applies": ".s-notice",
- "description": "Visual style for success notices."
+ "description": "Applies warning (yellow) visual styles."
},
{
- "class": ".s-notice__warning",
- "applies": ".s-notice",
- "description": "Visual style for warning notices."
+ "code": ".s-toast",
+ "description": "Parent of .s-notice. See the Toast section for more information."
+ }
+ ],
+ "base": [
+ {
+ "type": "default",
+ "icon": "Help"
},
{
- "class": ".s-notice__danger",
- "applies": ".s-notice",
- "description": "Visual style for danger notices."
+ "type": "info",
+ "icon": "Info"
},
{
- "class": ".s-notice__featured",
- "applies": ".s-notice",
- "description": "Visual style for featured notices."
+ "type": "success",
+ "icon": "Check"
},
{
- "class": ".s-notice__activity",
- "applies": ".s-notice",
- "description": "Visual style for activity notices."
+ "type": "warning",
+ "icon": "Alert"
},
{
- "class": ".s-notice__important",
- "applies": ".s-notice",
- "description": "Emboldens the above visual styles by strengthening the background saturation. This should be used for time-sensitive, pressing information that needs to be noticed by the user."
- }
- ],
- "behavior": [
+ "type": "danger",
+ "icon": "AlertFill"
+ },
{
- "type": "Inline",
- "class": ".s-notice",
- "applies": "N/A",
- "description": "Notice inserted within the content area."
+ "type": "featured",
+ "icon": "Star"
},
{
- "type": "Toast",
- "class": ".s-toast",
- "applies": "Container",
- "description": "Adds a container to properly fix a floating toast notice to the top-center of the page. These toasts typically disappear after a set time (i.e. 3 seconds)"
+ "type": "activity",
+ "icon": "Notification"
}
],
- "access": [
+ "accessibility": [
{
- "item": "aria-labelledby=\"[id]\"",
+ "code": "aria-labelledby=\"[id]\"",
"applies": ".s-toast",
"description": "Used to reference the alert message within the dialog. If you are using .s-toast, this must be applied.",
"url": "https://www.w3.org/TR/wai-aria-1.1/#aria-labelledby"
},
{
- "item": "aria-hidden=\"[state]\"",
+ "code": "aria-hidden=\"[state]\"",
"applies": ".s-toast",
"description": "Informs assistive technologies (such as screen readers) if they should ignore the element. When applied to .s-toast, Stacks will use this attribute to show or hide the toast.",
"url": "https://www.w3.org/TR/wai-aria-1.1/#aria-hidden"
},
{
- "item": "aria-label=\"[text]\"",
+ "code": "aria-label=\"[text]\"",
"applies": ".s-btn",
"description": "Labels the element for assistive technologies (such as screen readers). This should be used on any button that does not contain text content.",
"url": "https://www.w3.org/TR/wai-aria-1.1/#aria-label"
},
{
- "item": "role=\"alert\"",
+ "code": "role=\"alert\"",
"applies": ".s-notice",
"description": "A form of live region which contains important, usually time-sensitive, information. Elements with an alert role have an implicit aria-live value of assertive and implicit aria-atomic value of true.",
"url": "https://www.w3.org/TR/wai-aria-1.1/#alert"
},
{
- "item": "role=\"alertdialog\"",
+ "code": "role=\"alertdialog\"",
"applies": ".s-toast",
"description": "The wrapping content area of an alert. Elements with the alertdialog role must use the aria-describedby attribute to reference the alert message within the dialog.",
"url": "https://www.w3.org/TR/wai-aria-1.1/#alertdialog"
},
{
- "item": "role=\"status\"",
+ "code": "role=\"status\"",
"applies": ".s-notice",
"description": "A form of live region which contains advisory information but isn't important enough to justify an alert role. Elements with a status role have an implicit aria-live value of polite and implicit aria-atomic value of true. If the element controlling the status appears in a different area of the page, you must make the relationship explicit with the aria-controls attribute.",
"url": "https://www.w3.org/TR/wai-aria-1.1/#status"
}
- ]
+ ],
+ "javascript": {
+ "attributes": [
+ {
+ "code": "data-controller=\"s-toast\"",
+ "secondaryContext": "Controller element",
+ "description": "Wires up the element to the toast controller. This may be a .s-toast element or a wrapper element."
+ },
+ {
+ "code": "data-s-toast-target=\"toast\"",
+ "secondaryContext": "Controller element",
+ "description": "Wires up the element that is to be shown/hidden"
+ },
+ {
+ "code": "data-s-toast-target=\"initialFocus\"",
+ "secondaryContext": "Any child focusable element",
+ "description": "Designates which element to focus on toast show. If absent, defaults to the first focusable element within the toast."
+ },
+ {
+ "code": "data-action=\"s-toast#toggle\"",
+ "secondaryContext": "Toggling element",
+ "description": "Wires up the element to toggle the visibility of a toast"
+ },
+ {
+ "code": "data-s-toast-return-element=\"[css selector]\"",
+ "secondaryContext": "Controller element",
+ "description": "(optional) Designates the element to return focus to when the toast is closed. If left unset, focus is not altered on close."
+ },
+ {
+ "code": "data-s-toast-remove-when-hidden=\"true\"",
+ "secondaryContext": "Controller element",
+ "description": "(optional) Removes the toast from the DOM entirely when it is hidden"
+ }
+ ],
+ "events": [
+ {
+ "code": "s-toast:show",
+ "secondaryContext": "Toast target",
+ "description": "Fires immediately before showing the toast. Calling .preventDefault() cancels the display of the toast."
+ },
+ {
+ "code": "s-toast:shown",
+ "secondaryContext": "Toast target",
+ "description": "Fires after the toast has been visually shown"
+ },
+ {
+ "code": "s-toast:hide",
+ "secondaryContext": "Toast target",
+ "description": "Fires immediately before hiding the toast. Calling .preventDefault() cancels the removal of the toast."
+ },
+ {
+ "code": "s-toast:hidden",
+ "secondaryContext": "Toast target",
+ "description": "Fires after the toast has been visually hidden"
+ }
+ ],
+ "eventDetails": [
+ {
+ "code": "dispatcher",
+ "applies": "s-toast:*",
+ "description": "Contains the Element that initiated the event. For instance, the button clicked to show, the element clicked outside the toast that caused it to hide, etc."
+ },
+ {
+ "code": "returnElement",
+ "applies": "s-toast:show,Element to return focus to on hide. If a value is set to this property inside an event listener, it will be updated on the controller as well."
+ }
+ ],
+ "helpers": [
+ {
+ "code": "Stacks.showToast",
+ "secondaryContext": "element",
+ "description": "Helper to manually show an s-toast element via external JS"
+ },
+ {
+ "code": "Stacks.hideToast",
+ "secondaryContext": "element",
+ "description": "Helper to manually hide an s-toast element via external JS"
+ }
+ ]
+ }
}
diff --git a/packages/stacks-docs/_data/components/page-titles.json b/packages/stacks-docs/_data/components/page-titles.json
new file mode 100644
index 0000000000..3455997ee7
--- /dev/null
+++ b/packages/stacks-docs/_data/components/page-titles.json
@@ -0,0 +1,32 @@
+{
+ "classes": [
+ {
+ "code": ".s-page-title",
+ "description": "Base class for the page title component."
+ },
+ {
+ "code": ".s-page-title--actions",
+ "parent": ".s-page-title",
+ "description": "Contains the page actions."
+ },
+ {
+ "code": ".s-page-title--text",
+ "parent": ".s-page-title",
+ "description": "Contains the page title and description."
+ },
+ {
+ "code": ".s-page-title--description",
+ "parent": ".s-page-title--text",
+ "description": "Contains the page description."
+ },
+ {
+ "code": ".s-page-title--header",
+ "parent": ".s-page-title--text",
+ "description": "Contains the page title."
+ }
+ ],
+ "example": {
+ "title": "Page title",
+ "description": "Optional description de Finibus Bonorum et Malorum with an optional link."
+ }
+}
\ No newline at end of file
diff --git a/packages/stacks-docs/_data/components/pagination-component.json b/packages/stacks-docs/_data/components/pagination-component.json
index b9785252ee..163eb554ea 100644
--- a/packages/stacks-docs/_data/components/pagination-component.json
+++ b/packages/stacks-docs/_data/components/pagination-component.json
@@ -1,29 +1,58 @@
{
"classes": [
{
- "class": ".s-pagination",
- "applies": "N/A",
- "description": "Base pagination style that is used universally."
+ "code": ".s-pagination",
+ "description": "Base pagination style."
},
{
- "class": ".s-pagination--item",
- "applies": "N/A",
- "description": "A child element that’s used as a link and labeled with the page number."
+ "code": ".s-pagination--item",
+ "parent": ".s-pagination",
+ "description": "A child element that's used as a link and labeled with the page number."
},
{
- "class": ".is-selected",
+ "code": ".s-pagination--item__clear",
"applies": ".s-pagination--item",
- "description": "Active state that’s applied to the current page."
+ "description": "Clears the background and removes any interactivity. Used for ellipses and descriptions."
},
{
- "class": ".s-pagination--item__nav",
+ "code": ".s-pagination--item__nav",
"applies": ".s-pagination--item",
"description": "Styles the Next or Previous button with a circular background and fixed dimensions. Typically used with an icon to indicate navigation to the next page."
},
{
- "class": ".s-pagination--item__clear",
+ "code": ".is-selected",
"applies": ".s-pagination--item",
- "description": "Clears the background and removes any interactivity. Used for ellipses and descriptions."
+ "description": "Active state that's applied to the current page."
+ }
+ ],
+ "examples": {
+ "base": {
+ "nextButton": true,
+ "previousButton": true,
+ "items": [
+ {
+ "page": 1,
+ "classes": "is-selected"
+ },
+ {
+ "page": 2
+ },
+ {
+ "page": 3
+ },
+ {
+ "page": 4
+ },
+ {
+ "page": 5
+ },
+ {
+ "page": "…"
+ },
+ {
+ "page": 122386
+ }
+ ]
}
- ]
-}
\ No newline at end of file
+ }
+}
diff --git a/packages/stacks-docs/_data/components/popovers.json b/packages/stacks-docs/_data/components/popovers.json
index b14c792a3a..8cd3b0d536 100644
--- a/packages/stacks-docs/_data/components/popovers.json
+++ b/packages/stacks-docs/_data/components/popovers.json
@@ -1,29 +1,166 @@
{
- "automatic": [
+ "classes": [
{
- "class": ".s-popover",
- "applies": "N/A",
+ "code": ".s-popover",
"description": "Base parent container for popovers"
},
{
- "class": ".s-popover__tooltip",
- "applies": ".s-popover",
+ "code": ".s-popover--close",
+ "parent": ".s-popover",
+ "description": "Used to dismiss a popover"
+ },
+ {
+ "code": ".s-popover--content",
+ "parent": ".s-popover",
+ "description": "Wrapper around the popover content to apply appropriate overflow styles"
+ },
+ {
+ "code": ".s-popover__tooltip",
+ "applies": ".s-popover",
"description": "Removes minimum size constraints to support shorter tooltip text"
},
{
- "class": ".is-visible",
- "applies": ".s-popover",
+ "code": ".is-visible",
+ "applies": ".s-popover",
"description": "This class toggles the popover visibility"
+ }
+ ],
+ "interactiveAttributes": [
+ {
+ "code": "id=\"{POPOVER_ID}\"",
+ "applies": ".s-popover",
+ "description": "A unique id that the popover’s toggling element can target. Matches the value of [aria-controls] on the toggling element."
},
{
- "class": ".s-popover--close",
- "applies": "Child of .s-popover",
- "description": "Used to dismiss a popover"
+ "code": "data-controller=\"s-popover\"",
+ "secondaryContext": "Controller element",
+ "description": "Wires up the element to the popover controller. This may be a toggling element or a wrapper element."
},
{
- "class": ".s-popover--content",
- "applies": "Child of .s-popover",
- "description": "Wrapper around the popover content to apply appropriate overflow styles"
+ "code": "data-s-popover-reference-selector=\"[css selector]\"",
+ "secondaryContext": "Controller element",
+ "description": "(optional) Designates the element to use as the popover reference. If left unset, the value defaults to the controller element."
+ },
+ {
+ "code": "aria-controls=\"{POPOVER_ID}\"",
+ "secondaryContext": "Reference element",
+ "description": "Associates the element to the desired popover element."
+ },
+ {
+ "code": "data-action=\"s-popover#toggle\"",
+ "secondaryContext": "Toggling element",
+ "description": "Wires up the element to toggle the visibility of a generic popover."
+ },
+ {
+ "code": "data-s-popover-toggle-class=\"[class list]\"",
+ "secondaryContext": "Controller element",
+ "description": "Adds an optional space-delineated list of classes to be toggled on the originating element when the popover is shown or hidden."
+ },
+ {
+ "code": "data-s-popover-placement=\"[placement]\"",
+ "secondaryContext": "Controller element",
+ "description": "Dictates where to place the popover in relation to the reference element. By default, the placement value is bottom. Accepted placements are auto, top, right, bottom, left. Each placement can take an additional -start and -end variation."
+ },
+ {
+ "code": "data-s-popover-auto-show=\"[true|false]\"",
+ "secondaryContext": "Controller element",
+ "description": "(optional) If true, the popover will appear immediately when the Stacks controller is first connected. This should be used in place of .is-visible for displaying popovers on load as it will prevent the popover from appearing before it has been correctly positioned."
+ },
+ {
+ "code": "data-s-popover-hide-on-outside-click=\"[always|never|if-in-viewport|after-dismissal]\"",
+ "secondaryContext": "Controller element",
+ "description": "(optional) Default: alwaysalways, the popover will appear disappear when outside clicks occur.if-in-viewport, the popover will only disappear when outside clicks occur if the popover is in the viewport.never, the popover will not disappear on outside clicks and will only be dismissed through other means, e.g. data-target=\"s-popover#hide\".after-dismissal, the popover will not disappear on outside clicks unless it has been dismissed some other way at least once.Element that initiated the event. For instance, the button clicked to show, the element clicked outside the popover that caused it to hide, etc."
+ }
+ ],
+ "tooltipHoverAttributes": [
+ {
+ "code": "id=\"{POPOVER_ID}\"",
+ "applies": ".s-popover",
+ "description": "A unique id that the popover’s toggling element can target. Matches the value of [aria-describedby] on the toggling element."
+ },
+ {
+ "code": "data-controller=\"s-tooltip\"",
+ "secondaryContext": "Controller element",
+ "description": "Wires up the element to the tooltip controller."
+ },
+ {
+ "code": "data-s-tooltip-reference-selector=\"[css selector]\"",
+ "secondaryContext": "Controller element",
+ "description": "(optional) Designates the element to use as the tooltip reference. If left unset, the value defaults to the controller element."
+ },
+ {
+ "code": "aria-describedby=\"{POPOVER_ID}\"",
+ "secondaryContext": "Reference element",
+ "description": "Associates the element to the desired popover element."
+ },
+ {
+ "code": "title=\"{TITLE}\"",
+ "secondaryContext": "Controller element",
+ "description": "If aria-describedby is not present or valid, and the title attribute exists, the title will be removed from the element and be used to create a popover immediately after the element. All content will be escaped and inserted as text."
+ },
+ {
+ "code": "data-s-tooltip-html-title=\"{TITLE}\"",
+ "secondaryContext": "Controller element",
+ "description": "Acts the exact same as the title attribute, but inserts the raw text directly as html. If both this and the title attribute exist on the element, this attribute will be used."
+ },
+ {
+ "code": "data-s-tooltip-placement=\"[placement]\"",
+ "secondaryContext": "Controller element",
+ "description": "Dictates where to place the tooltip in relation to the reference element. By default, the placement value is bottom. Accepted placements are auto, top, right, bottom, left. Each placement can take an additional -start and -end variation."
+ }
+ ],
+ "tooltipHoverEvents": [
+ {
+ "code": "s-tooltip:show",
+ "secondaryContext": "Controller element",
+ "description": "Default preventable Fires immediately before showing and positioning the tooltip. This fires before the tooltip is first displayed to the user, and can be used to create or initialize the tooltip element. Calling .preventDefault() cancels the display of the popover."
+ },
+ {
+ "code": "s-tooltip:shown",
+ "secondaryContext": "Controller element",
+ "description": "Fires immediately after showing the tooltip."
+ },
+ {
+ "code": "s-tooltip:hide",
+ "secondaryContext": "Controller element",
+ "description": "Default preventable Fires immediately before hiding the tooltip. Calling .preventDefault() prevents the removal of the tooltip."
+ },
+ {
+ "code": "s-tooltip:hidden",
+ "secondaryContext": "Controller element",
+ "description": "Fires immediately after hiding the tooltip."
+ }
+ ],
+ "tooltipDispatchedEvents": [
+ {
+ "code": "dispatcher",
+ "applies": "s-tooltip:*",
+ "description": "Contains the Element that initiated the event. For instance, the element hovered over to show, etc."
}
]
}
\ No newline at end of file
diff --git a/packages/stacks-docs/_data/components/post-summary.json b/packages/stacks-docs/_data/components/post-summary.json
index eb7d0604f4..85e09dcf66 100644
--- a/packages/stacks-docs/_data/components/post-summary.json
+++ b/packages/stacks-docs/_data/components/post-summary.json
@@ -1,109 +1,108 @@
{
"classes": [
{
- "class": ".s-post-summary",
- "applies": "N/A",
+ "code": ".s-post-summary",
"description": "Base parent container for a post summary"
},
{
- "class": ".s-post-summary__answered",
- "applies": ".s-post-summary",
- "description": "Adds the styling necessary for a question with accepted answers"
+ "code": ".s-post-summary--answers",
+ "parent": ".s-post-summary",
+ "description": "Container for the post summary answers"
},
{
- "class": ".s-post-summary__deleted",
- "applies": ".s-post-summary",
- "description": "Adds the styling necessary for a deleted post"
+ "code": ".s-post-summary--content",
+ "parent": ".s-post-summary",
+ "description": "Container for the post summary content"
},
{
- "class": ".s-post-summary--sm-hide",
- "applies": ".s-post-summary",
- "description": "Hides the stats container on small screens"
+ "code": ".s-post-summary--stats",
+ "parent": ".s-post-summary",
+ "description": "Container for the post summary stats"
},
{
- "class": ".s-post-summary--sm-show",
- "applies": ".s-post-summary",
- "description": "Shows the stats container on small screens"
+ "code": ".s-post-summary--tags",
+ "parent": ".s-post-summary",
+ "description": "Container for the post summary tags"
},
{
- "class": ".s-post-summary--answers",
- "applies": ".s-post-summary",
- "description": "Container for the post summary answers"
+ "code": ".s-post-summary--title",
+ "parent": ".s-post-summary",
+ "description": "Container for the post summary title"
},
{
- "class": ".s-post-summary--answer",
- "applies": ".s-post-summary--answers",
+ "code": ".s-post-summary--answer",
+ "parent": ".s-post-summary--answers",
"description": "Container for the post summary answer"
},
{
- "class": ".s-post-summary--answer__accepted",
- "applies": ".s-post-summary--answer",
- "description": "Adds the styling necessary for an accepted answer"
- },
- {
- "class": ".s-post-summary--content",
- "applies": ".s-post-summary",
- "description": "Container for the post summary content"
- },
- {
- "class": ".s-post-summary--content-meta",
- "applies": ".s-post-summary--content",
+ "code": ".s-post-summary--content-meta",
+ "parent": ".s-post-summary--content",
"description": "A container for post meta data, things like tags and user cards."
},
{
- "class": ".s-post-summary--content-type",
- "applies": ".s-post-summary--content",
+ "code": ".s-post-summary--content-type",
+ "parent": ".s-post-summary--content",
"description": "Container for the post summary content type"
},
{
- "class": ".s-post-summary--excerpt",
- "applies": ".s-post-summary--content",
+ "code": ".s-post-summary--excerpt",
+ "parent": ".s-post-summary--content",
"description": "Container for the post summary excerpt"
},
{
- "class": ".s-post-summary--stats",
- "applies": ".s-post-summary",
- "description": "Container for the post summary stats"
- },
- {
- "class": ".s-post-summary--stats-answers",
- "applies": ".s-post-summary--stats",
+ "code": ".s-post-summary--stats-answers",
+ "parent": ".s-post-summary--stats",
"description": "Container for the post summary answers"
},
{
- "class": ".s-post-summary--stats-bounty",
- "applies": ".s-post-summary--stats",
+ "code": ".s-post-summary--stats-bounty",
+ "parent": ".s-post-summary--stats",
"description": "Container for the post summary bounty"
},
{
- "class": ".s-post-summary--stats-item",
- "applies": ".s-post-summary--stats",
+ "code": ".s-post-summary--stats-item",
+ "parent": ".s-post-summary--stats",
"description": "A genericcontainer for views, comments, read time, and other meta data which prepends a separator icon."
},
{
- "class": ".s-post-summary--stats-votes",
- "applies": ".s-post-summary--stats",
+ "code": ".s-post-summary--stats-votes",
+ "parent": ".s-post-summary--stats",
"description": "Container for the post summary votes"
},
{
- "class": ".s-post-summary--tags",
- "applies": ".s-post-summary",
- "description": "Container for the post summary tags"
+ "code": ".s-post-summary--title-link",
+ "parent": ".s-post-summary--title",
+ "description": "Link styling for the post summary title"
+ },
+ {
+ "code": ".s-post-summary--title-icon",
+ "parent": ".s-post-summary--title",
+ "description": "Icon styling for the post summary title"
+ },
+ {
+ "code": ".s-post-summary--sm-hide",
+ "applies": ".s-post-summary > *",
+ "description": "Hides the stats container on small screens."
},
{
- "class": ".s-post-summary--title",
+ "code": ".s-post-summary--sm-show",
+ "applies": ".s-post-summary > *",
+ "description": "Shows the stats container on small screens."
+ },
+ {
+ "code": ".s-post-summary__answered",
"applies": ".s-post-summary",
- "description": "Container for the post summary title"
+ "description": "Adds the styling necessary for a question with accepted answers"
},
{
- "class": ".s-post-summary--title-link",
- "applies": ".s-post-summary--title",
- "description": "Link styling for the post summary title"
+ "code": ".s-post-summary__deleted",
+ "applies": ".s-post-summary",
+ "description": "Adds the styling necessary for a deleted post"
},
{
- "class": ".s-post-summary--title-icon",
- "applies": ".s-post-summary--title",
- "description": "Icon styling for the post summary title"
+ "code": ".s-post-summary--answer__accepted",
+ "applies": ".s-post-summary--answer",
+ "description": "Adds the styling necessary for an accepted answer"
}
],
"answered": {
diff --git a/packages/stacks-docs/_data/components/progress-bars.json b/packages/stacks-docs/_data/components/progress-bars.json
new file mode 100644
index 0000000000..e3fadca7d5
--- /dev/null
+++ b/packages/stacks-docs/_data/components/progress-bars.json
@@ -0,0 +1,120 @@
+{
+ "classes": [
+ {
+ "code": ".s-progress",
+ "description": "The parent class for all progress bars."
+ },
+ {
+ "code": ".s-progress--bar",
+ "parent": ".s-progress",
+ "description": "Shows the user’s current progress to accomplishing a goal with a background color."
+ },
+ {
+ "code": ".s-progress--label",
+ "parent": ".s-progress",
+ "description": "Used to describe what progress bar is tracking."
+ },
+ {
+ "code": ".s-progress--bar__left",
+ "parent": ".s-progress--step",
+ "description": "Draws a line on the left side of a step."
+ },
+ {
+ "code": ".s-progress--bar__right",
+ "parent": ".s-progress--step",
+ "description": "Draws a line on the right side of a step."
+ },
+ {
+ "code": ".s-progress--step",
+ "parent": ".s-progress--stepped",
+ "description": "Wrapper for each individual step."
+ },
+ {
+ "code": ".s-progress__badge",
+ "applies": ".s-progress",
+ "description": "Styles the progress bar as a badge."
+ },
+ {
+ "code": ".s-progress__brand",
+ "applies": ".s-progress",
+ "description": "Applies the brand color to the progress bar."
+ },
+ {
+ "code": ".s-progress__circular",
+ "applies": ".s-progress",
+ "description": "Styles the progress bar as a circular progress bar."
+ },
+ {
+ "code": ".s-progress__info",
+ "applies": ".s-progress",
+ "description": "Applies the info color to the progress bar."
+ },
+ {
+ "code": ".s-progress__privilege",
+ "applies": ".s-progress",
+ "description": "Used to display a privilege progress bar."
+ },
+ {
+ "code": ".s-progress__segmented",
+ "applies": ".s-progress",
+ "description": "Styles the progress bar as a segmented progress bar."
+ },
+ {
+ "code": ".s-progress__stepped",
+ "applies": ".s-progress",
+ "description": "Styles the progress bar as a stepped progress bar."
+ },
+ {
+ "code": ".s-progress__gold",
+ "applies": ".s-progress__badge",
+ "description": "Styles the progress bar as a gold badge."
+ },
+ {
+ "code": ".s-progress__silver",
+ "applies": ".s-progress__badge",
+ "description": "Styles the progress bar as a silver badge."
+ },
+ {
+ "code": ".s-progress__bronze",
+ "applies": ".s-progress__badge",
+ "description": "Styles the progress bar as a bronze badge."
+ },
+ {
+ "code": ".is-active",
+ "applies": ".s-progress--step",
+ "description": "Styles the active step."
+ },
+ {
+ "code": ".is-completed",
+ "applies": ".s-progress--step",
+ "description": "Styles the completed step."
+ }
+ ],
+ "parameters": [
+ {
+ "code": "role=\"progressbar\"",
+ "applies": ".s-progress--bar",
+ "description": "This parameter communicates that element is displaying progress status that takes a long time or consists of several steps. (Source)"
+ },
+ {
+ "code": "aria-valuemin",
+ "applies": ".s-progress--bar",
+ "description": "This parameter defines the minimum allowed value for the progress bar. (Source)"
+ },
+ {
+ "code": "aria-valuemax",
+ "applies": ".s-progress--bar",
+ "description": "This parameter defines the maximum allowed value for the progress bar. (Source)"
+ },
+ {
+ "code": "aria-valuenow",
+ "applies": ".s-progress--bar",
+ "description": "This parameter defines the current value for the progress bar. (Source)"
+ },
+ {
+ "code": "style=\"width: [value]%\"",
+ "applies": ".s-progress--bar",
+ "description": "This parameter sets the width of the progress bar as a percentage. The value is the aria-valuenow value displayed as a percentage."
+ }
+ ]
+}
\ No newline at end of file
diff --git a/packages/stacks-docs/_data/components/prose.json b/packages/stacks-docs/_data/components/prose.json
index faaaea6041..b88ac2c96b 100644
--- a/packages/stacks-docs/_data/components/prose.json
+++ b/packages/stacks-docs/_data/components/prose.json
@@ -1,12 +1,11 @@
{
"classes": [
{
- "class": ".s-prose",
- "applies": "N/A",
+ "code": ".s-prose",
"description": "Adds proper styling for rendered Markdown."
},
{
- "class": ".s-prose__sm",
+ "code": ".s-prose__sm",
"applies": ".s-prose",
"description": "Decreases the base font size and line height."
}
diff --git a/packages/stacks-docs/_data/components/select.json b/packages/stacks-docs/_data/components/select.json
new file mode 100644
index 0000000000..67534c4556
--- /dev/null
+++ b/packages/stacks-docs/_data/components/select.json
@@ -0,0 +1,52 @@
+{
+ "classes": [
+ {
+ "code": ".s-select",
+ "description": "Base select style."
+ },
+ {
+ "code": ".s-select__sm",
+ "applies": ".s-select",
+ "description": "Apply a small size."
+ },
+ {
+ "code": ".s-select__lg",
+ "applies": ".s-select",
+ "description": "Apply a large size."
+ },
+ {
+ "code": ".has-error",
+ "applies": ".s-select",
+ "description": "Apply an error state."
+ },
+ {
+ "code": ".has-success",
+ "applies": ".s-select",
+ "description": "Apply a success state."
+ },
+ {
+ "code": ".has-warning",
+ "applies": ".s-select",
+ "description": "Apply a warning state."
+ }
+ ],
+ "sizes": [
+ {
+ "primaryContext": "Small",
+ "secondaryContext": "13px",
+ "code": ".s-select__sm",
+ "description": ""
+ },
+ {
+ "primaryContext": "Default",
+ "secondaryContext": "14px",
+ "description": ""
+ },
+ {
+ "primaryContext": "Large",
+ "secondaryContext": "18px",
+ "code": ".s-select__lg",
+ "description": ""
+ }
+ ]
+}
diff --git a/packages/stacks-docs/_data/components/sidebar-widgets.json b/packages/stacks-docs/_data/components/sidebar-widgets.json
new file mode 100644
index 0000000000..6705a368aa
--- /dev/null
+++ b/packages/stacks-docs/_data/components/sidebar-widgets.json
@@ -0,0 +1,23 @@
+{
+ "classes": [
+ {
+ "code": ".s-sidebarwidget",
+ "description": "Base sidebar widget style."
+ },
+ {
+ "code": ".s-sidebarwidget--content",
+ "parent": ".s-sidebarwidget",
+ "description": "Container for the sidebar widget content."
+ },
+ {
+ "code": ".s-sidebarwidget--header",
+ "parent": ".s-sidebarwidget",
+ "description": "Container for the sidebar widget header."
+ },
+ {
+ "code": ".s-sidebarwidget--footer",
+ "parent": ".s-sidebarwidget",
+ "description": "Container for the sidebar widget footer."
+ }
+ ]
+}
diff --git a/packages/stacks-docs/_data/components/tables.json b/packages/stacks-docs/_data/components/tables.json
index 3b68ebb323..21e5080e66 100644
--- a/packages/stacks-docs/_data/components/tables.json
+++ b/packages/stacks-docs/_data/components/tables.json
@@ -1,94 +1,145 @@
{
+ "classes": [
+ {
+ "code": ".s-table-container",
+ "description": "Container for the table."
+ },
+ {
+ "code": ".s-table",
+ "parent": ".s-table-container",
+ "description": "Base table style."
+ },
+ {
+ "code": ".s-table--cell:n",
+ "parent": ".s-table > tr > td",
+ "description": "Table cell width in 12 evenly divided columns. Replace :n with the number of columns the cell should span."
+ },
+ {
+ "code": ".s-table__b0",
+ "applies": ".s-table",
+ "description": "Removes all table cell borders."
+ },
+ {
+ "code": ".s-table__bx",
+ "applies": ".s-table",
+ "description": "Shows only horizontal table cell borders. Good for tables with lots of data that can be sorted and filtered."
+ },
+ {
+ "code": ".s-table__bx-simple",
+ "applies": ".s-table",
+ "description": "Removes most of the default borders and backgrounds. Good for tables without much data that don't need to be sorted or filtered."
+ },
+ {
+ "code": ".s-table__sortable",
+ "applies": ".s-table",
+ "description": "Applies styling to imply the table is sortable."
+ },
+ {
+ "code": ".s-table__stripes",
+ "applies": ".s-table",
+ "description": "Apply zebra striping to the table."
+ },
+ {
+ "code": ".s-table__sm",
+ "applies": ".s-table",
+ "description": "Apply a condensed sizing to the table."
+ },
+ {
+ "code": ".s-table__lg",
+ "applies": ".s-table",
+ "description": "Apply a large sizing to the table."
+ }
+ ],
"widths": [
{
- "class": ".s-table--cell1",
- "output": "8.3333333%"
+ "code": ".s-table--cell1",
+ "primaryContext": "8.3333333%"
},
{
- "class": ".s-table--cell2",
- "output": "16.6666667%"
+ "code": ".s-table--cell2",
+ "primaryContext": "16.6666667%"
},
{
- "class": ".s-table--cell3",
- "output": "25%"
+ "code": ".s-table--cell3",
+ "primaryContext": "25%"
},
{
- "class": ".s-table--cell4",
- "output": "33.3333333%"
+ "code": ".s-table--cell4",
+ "primaryContext": "33.3333333%"
},
{
- "class": ".s-table--cell5",
- "output": "41.6666667%"
+ "code": ".s-table--cell5",
+ "primaryContext": "41.6666667%"
},
{
- "class": ".s-table--cell6",
- "output": "50%"
+ "code": ".s-table--cell6",
+ "primaryContext": "50%"
},
{
- "class": ".s-table--cell7",
- "output": "58.3333333%"
+ "code": ".s-table--cell7",
+ "primaryContext": "58.3333333%"
},
{
- "class": ".s-table--cell8",
- "output": "66.6666667%"
+ "code": ".s-table--cell8",
+ "primaryContext": "66.6666667%"
},
{
- "class": ".s-table--cell9",
- "output": "75%"
+ "code": ".s-table--cell9",
+ "primaryContext": "75%"
},
{
- "class": ".s-table--cell10",
- "output": "83.3333333%"
+ "code": ".s-table--cell10",
+ "primaryContext": "83.3333333%"
},
{
- "class": ".s-table--cell11",
- "output": "91.6666667%"
+ "code": ".s-table--cell11",
+ "primaryContext": "91.6666667%"
},
{
- "class": ".s-table--cell12",
- "output": "100%"
+ "code": ".s-table--cell12",
+ "primaryContext": "100%"
}
],
"data-attributes": [
{
- "attribute": "data-controller=\"s-table\"",
+ "code": "data-controller=\"s-table\"",
"applies": "table",
"description": "Wires up the table to the JS controller"
},
{
- "attribute": "data-s-table-target=\"column\"",
+ "code": "data-s-table-target=\"column\"",
"applies": "th",
"description": "Marks this is a sortable column for the purpose of modifying arrow icons"
},
{
- "attribute": "data-action=\"click->s-table#sort\"",
+ "code": "data-action=\"click->s-table#sort\"",
"applies": "button",
"description": "Causes a click on the header cell to sort by this column"
},
{
- "attribute": "data-s-table-sort-to=\"top\"",
+ "code": "data-s-table-sort-to=\"top\"",
"applies": "tr",
"description": "Forces the sorting of a row to the top"
},
{
- "attribute": "data-s-table-sort-to=\"bottom\"",
+ "code": "data-s-table-sort-to=\"bottom\"",
"applies": "tr",
"description": "Forces the sorting of a row to the bottom"
},
{
- "attribute": "data-s-table-sort-val=\"[x]\"",
+ "code": "data-s-table-sort-val=\"[x]\"",
"applies": "td",
"description": "Optionally use a custom value for sorting instead of the cell’s text content"
}
],
"atomic": [
{
- "class": ".tl-auto",
- "output": "table-layout: auto;"
+ "code": ".tl-auto",
+ "primaryContext": "table-layout: auto;"
},
{
- "class": ".tl-fixed",
- "output": "table-layout: fixed;"
+ "code": ".tl-fixed",
+ "primaryContext": "table-layout: fixed;"
}
]
}
diff --git a/packages/stacks-docs/_data/components/tag.json b/packages/stacks-docs/_data/components/tag.json
new file mode 100644
index 0000000000..dfa2aa131f
--- /dev/null
+++ b/packages/stacks-docs/_data/components/tag.json
@@ -0,0 +1 @@
+{"classes":[{"class":".s-tag","description":"Base tag style that is used almost universally."},{"class":".s-tag__moderator","applies":".s-tag","description":"Exclusively used within Meta communities by moderators (and employees) to assign unique statuses to questions."},{"class":".s-tag__required","applies":".s-tag","description":"Exclusively used within Meta communities to denote the post type. One of these tags are required on all Meta posts."},{"class":".s-tag__ignored","applies":".s-tag","description":"Prepends an icon to indicate the tag is ignored."},{"class":".s-tag__watched","applies":".s-tag","description":"Prepends an icon to indicate the tag is watched."},{"class":".s-tag--dismiss","description":"A child element within .s-tag for a clear or dismiss action icon. When using this element, it should be rendered as a button containing the icon and the parent .s-tag should be rendered as a span element."},{"class":".s-tag--sponsor","description":"A child element within .s-tag that correctly positions a tag's sponsor logo."}],"sizes":[{"class":"s-tag__sm"},{"class":"N/A"},{"class":"s-tag__lg"}]}
diff --git a/packages/stacks-docs/_data/components/tags-component.json b/packages/stacks-docs/_data/components/tags-component.json
index edd7083660..9b25e2d433 100644
--- a/packages/stacks-docs/_data/components/tags-component.json
+++ b/packages/stacks-docs/_data/components/tags-component.json
@@ -1,50 +1,64 @@
{
"classes": [
{
- "class": ".s-tag",
- "applies": "N/A",
+ "code": ".s-tag",
"description": "Base tag style that is used almost universally."
},
{
- "class": ".s-tag__moderator",
+ "code": ".s-tag--dismiss",
+ "parent": ".s-tag",
+ "description": "For a clear or dismiss action icon. When using this element, it should be rendered as a button containing the icon and the parent .s-tag should be rendered as a span element."
+ },
+ {
+ "code": ".s-tag--sponsor",
+ "parent": ".s-tag",
+ "description": "Correctly positions a tag’s sponsor logo."
+ },
+ {
+ "code": ".s-tag__moderator",
"applies": ".s-tag",
"description": "Exclusively used within Meta communities by moderators (and employees) to assign unique statuses to questions."
},
{
- "class": ".s-tag__required",
+ "code": ".s-tag__required",
"applies": ".s-tag",
"description": "Exclusively used within Meta communities to denote the post type. One of these tags are required on all Meta posts."
},
{
- "class": ".s-tag__ignored",
+ "code": ".s-tag__ignored",
"applies": ".s-tag",
"description": "Prepends an icon to indicate the tag is ignored."
},
{
- "class": ".s-tag__watched",
+ "code": ".s-tag__watched",
"applies": ".s-tag",
"description": "Prepends an icon to indicate the tag is watched."
},
{
- "class": ".s-tag--dismiss",
- "applies": "N/A",
- "description": "A child element within .s-tag for a clear or dismiss action icon. When using this element, it should be rendered as a button containing the icon and the parent .s-tag should be rendered as a span element."
+ "code": ".s-tag__sm",
+ "applies": ".s-tag",
+ "description": "Apply a small size to the tag."
},
{
- "class": ".s-tag--sponsor",
- "applies": "N/A",
- "description": "A child element within .s-tag that correctly positions a tag’s sponsor logo."
+ "code": ".s-tag__lg",
+ "applies": ".s-tag",
+ "description": "Apply a large size to the tag."
}
],
"sizes": [
{
- "class": "s-tag__sm"
+ "code": ".s-tag__sm",
+ "applies": ".s-tag",
+ "description": "css"
},
{
- "class": "N/A"
+ "applies": ".s-tag",
+ "description": "css"
},
{
- "class": "s-tag__lg"
+ "code": ".s-tag__lg",
+ "applies": ".s-tag",
+ "description": "css"
}
]
}
diff --git a/packages/stacks-docs/_data/components/textareas.json b/packages/stacks-docs/_data/components/textareas.json
new file mode 100644
index 0000000000..eb81c83693
--- /dev/null
+++ b/packages/stacks-docs/_data/components/textareas.json
@@ -0,0 +1,44 @@
+{
+ "classes": [
+ {
+ "code": ".s-textarea",
+ "description": "Base textarea style."
+ },
+ {
+ "code": ".s-textarea__sm",
+ "applies": ".s-textarea",
+ "description": "Apply a small size."
+ },
+ {
+ "code": ".s-textarea__lg",
+ "applies": ".s-textarea",
+ "description": "Apply a large size."
+ }
+ ],
+ "sizes": [
+ {
+ "primaryContext": "Small",
+ "secondaryContext": "13px",
+ "code": ".s-textarea__sm",
+ "description": ""
+ },
+ {
+ "primaryContext": "Default",
+ "secondaryContext": "14px",
+ "description": ""
+ },
+ {
+ "primaryContext": "Large",
+ "secondaryContext": "18px",
+ "code": ".s-textarea__lg",
+ "description": ""
+ }
+ ],
+ "required": [
+ {
+ "code": ".s-required-symbol",
+ "secondaryContext": "abbr element enclosing the asterisk",
+ "description": "Used to style the asterisk indicating that a specific field is required."
+ }
+ ]
+}
\ No newline at end of file
diff --git a/packages/stacks-docs/_data/components/toggle-switch.json b/packages/stacks-docs/_data/components/toggle-switch.json
new file mode 100644
index 0000000000..5ce97f8c64
--- /dev/null
+++ b/packages/stacks-docs/_data/components/toggle-switch.json
@@ -0,0 +1,13 @@
+{
+ "classes": [
+ {
+ "code": ".s-toggle-switch",
+ "description": "Base toggle switch style."
+ },
+ {
+ "code": ".s-toggle-switch__multiple",
+ "applies": ".s-toggle-switch",
+ "description": "Used to style toggle switches with three or more options."
+ }
+ ]
+}
\ No newline at end of file
diff --git a/packages/stacks-docs/_data/components/topbar.json b/packages/stacks-docs/_data/components/topbar.json
index 1a7adbb775..291872153d 100644
--- a/packages/stacks-docs/_data/components/topbar.json
+++ b/packages/stacks-docs/_data/components/topbar.json
@@ -1,76 +1,78 @@
-[
- {
- "class": ".s-topbar",
- "description": "Base class"
- },
- {
- "class": ".s-topbar__light",
- "applies": "`.s-topbar`",
- "description": "Forced light theme"
- },
- {
- "class": ".s-topbar__dark",
- "applies": "`.s-topbar`",
- "description": "Forced dark theme"
- },
- {
- "class": ".s-topbar--skip-link",
- "description": "Applied to an anchor tag for bypassing the top-level navigation links and jump to the main content on a page. [See WCAG Technique G1](https://www.w3.org/WAI/WCAG22/Techniques/general/G1)",
- "applies": "Child of `.s-topbar`"
- },
- {
- "class": ".s-topbar--container",
- "description": "Add **atomic** `classes` here to customize internal content width; defaults to `.wmx12`",
- "applies": "Child of `.s-topbar`"
- },
- {
- "class": ".s-topbar--logo",
- "description": "The logo. Can apply `.is-selected` to this",
- "applies": "Child of `.s-topbar`"
- },
- {
- "class": ".s-topbar--menu-btn",
- "description": "Hamburger menu icon. Add `.is-selected` to turn it into an X",
- "applies": "Child of `.s-topbar`"
- },
- {
- "class": ".s-topbar--content",
- "description": "Contains `li > .s-topbar--item` elements that don’t look like anything in particular",
- "applies": "Child of `.s-topbar`"
- },
- {
- "class": ".s-topbar--item",
- "description": "A topbar item element with hover, active and focused styling. Can add `.is-selected`",
- "applies": "Child of `.s-topbar--content > li`"
- },
- {
- "class": ".s-topbar--item__unset",
- "description": "This class excludes the `.s-topbar--item` from any automatic styling. This is useful for calls to action, e.g. buttons or log in links",
- "applies": "`.s-topbar--item`"
- },
- {
- "class": ".s-topbar--navigation",
- "description": "Apply to `nav` to ensure proper layout",
- "applies": "Parent of `.s-topbar--container`"
- },
- {
- "class": ".s-topbar--notice",
- "description": "A badge-styled notice that stands out. Add `.is-unread` to make it stand out more",
- "applies": "Child of `.s-topbar`"
- },
- {
- "class": ".s-topbar--searchbar",
- "description": "Contains a search input and an optional `.s-select`. Hides itself on mobile.",
- "applies": "Child of `.s-topbar`"
- },
- {
- "class": ".s-topbar--searchbar--input-group",
- "description": "Holds the search input + icon",
- "applies": "Child of `.s-topbar--searchbar`"
- },
- {
- "class": ".s-topbar--searchbar__open",
- "applies": "`.s-topbar--searchbar`",
- "description": "On mobile, this class shows the search input below the topbar. Toggle this class with a button"
- }
-]
+{
+ "classes": [
+ {
+ "code": ".s-topbar",
+ "description": "Base class"
+ },
+ {
+ "code": ".s-topbar--container",
+ "parent": ".s-topbar",
+ "description": "Add atomic classes here to customize internal content width; defaults to `.wmx12`"
+ },
+ {
+ "code": ".s-topbar--skip-link",
+ "parent": ".s-topbar",
+ "description": "Applied to an anchor tag for bypassing the top-level navigation links and jump to the main content on a page. See WCAG Technique G1"
+ },
+ {
+ "code": ".s-topbar--logo",
+ "parent": ".s-topbar--container",
+ "description": "The logo. Can apply .is-selected to this"
+ },
+ {
+ "code": ".s-topbar--menu-btn",
+ "parent": ".s-topbar--container",
+ "description": "Hamburger menu icon. Add .is-selected to turn it into an X"
+ },
+ {
+ "code": ".s-topbar--navigation",
+ "parent": ".s-topbar--container",
+ "description": "Apply to nav to ensure proper layout."
+ },
+ {
+ "code": ".s-topbar--notice",
+ "parent": ".s-topbar--container",
+ "description": "A badge-styled notice that stands out. Add .is-unread to make it stand out more."
+ },
+ {
+ "code": ".s-topbar--searchbar",
+ "parent": ".s-topbar--container",
+ "description": "Contains a search input and an optional `.s-select`. Hides itself on mobile."
+ },
+ {
+ "code": ".s-topbar--content",
+ "parent": ".s-topbar--navigation",
+ "description": "Contains li > .s-topbar--item elements that don’t look like anything in particular"
+ },
+ {
+ "code": ".s-topbar--item",
+ "parent": ".s-topbar--content > li",
+ "description": "A topbar item element with hover, active and focused styling. Can add `.is-selected`"
+ },
+ {
+ "code": ".s-topbar--searchbar--input-group",
+ "parent": ".s-topbar--searchbar",
+ "description": "Holds the search input + icon."
+ },
+ {
+ "code": ".s-topbar--item__unset",
+ "applies": ".s-topbar--item",
+ "description": "This class excludes the .s-topbar--item from any automatic styling. This is useful for calls to action, e.g. buttons or log in links."
+ },
+ {
+ "code": ".s-topbar--searchbar__open",
+ "applies": ".s-topbar--searchbar",
+ "description": "On mobile, this class shows the search input below the topbar. Toggle this class with a button."
+ },
+ {
+ "code": ".s-topbar__light",
+ "applies": ".s-topbar",
+ "description": "Applies a forced light theme"
+ },
+ {
+ "code": ".s-topbar__dark",
+ "applies": ".s-topbar",
+ "description": "Applies a forced dark theme"
+ }
+ ]
+}
diff --git a/packages/stacks-docs/_data/components/uploader-component.json b/packages/stacks-docs/_data/components/uploader-component.json
deleted file mode 100644
index 59744aebc4..0000000000
--- a/packages/stacks-docs/_data/components/uploader-component.json
+++ /dev/null
@@ -1,59 +0,0 @@
-{
- "classes": [
- {
- "class": ".s-uploader",
- "applies": "N/A",
- "description": "Base uploader element"
- },
- {
- "class": ".is-active",
- "applies": ".s-uploader",
- "description": "Active styling for uploader element. Added on dragenter or when input has value."
- },
- {
- "class": ".is-disabled",
- "applies": ".s-uploader",
- "description": "Appropriately styles the uploader when it is disabled. Don’t forget to also add the disabled attribute on the input itself."
- },
- {
- "class": ".has-error",
- "applies": ".s-uploader",
- "description": "Adds error styling to the component."
- },
- {
- "class": ".has-success",
- "applies": ".s-uploader",
- "description": "Adds success styling to the component."
- },
- {
- "class": ".has-warning",
- "applies": ".s-uploader",
- "description": "Adds warning styling to the component."
- },
- {
- "class": ".s-uploader--container",
- "applies": "Child of .s-uploader",
- "description": "Container for the visual elements of the uploader."
- },
- {
- "class": ".s-uploader--input",
- "applies": "Child of .s-uploader",
- "description": "Adds proper styling to the uploader's file input. Visually hidden."
- },
- {
- "class": ".s-uploader--previews",
- "applies": "Child of .s-uploader--container",
- "description": "Container for selected item(s) preview."
- },
- {
- "class": ".s-uploader--preview",
- "applies": "Child of .s-uploader--previews",
- "description": "An image or string to preview a selected file."
- },
- {
- "class": ".s-uploader--reset",
- "applies": "Child of .s-uploader--container",
- "description": "Used to reset the uploader."
- }
- ]
-}
diff --git a/packages/stacks-docs/_data/components/uploader.json b/packages/stacks-docs/_data/components/uploader.json
new file mode 100644
index 0000000000..17965b9b8f
--- /dev/null
+++ b/packages/stacks-docs/_data/components/uploader.json
@@ -0,0 +1,105 @@
+{
+ "classes": [
+ {
+ "code": ".s-uploader",
+ "description": "Base uploader element"
+ },
+ {
+ "code": ".s-uploader--container",
+ "parent": ".s-uploader",
+ "description": "Container for the visual elements of the uploader."
+ },
+ {
+ "code": ".s-uploader--input",
+ "parent": ".s-uploader--container",
+ "description": "Adds proper styling to the uploader's file input. Visually hidden."
+ },
+ {
+ "code": ".s-uploader--previews",
+ "parent": ".s-uploader--container",
+ "description": "Container for selected item(s) preview."
+ },
+ {
+ "code": ".s-uploader--reset",
+ "parent": ".s-uploader--container",
+ "description": "Used to reset the uploader."
+ },
+ {
+ "code": ".s-uploader--preview",
+ "parent": ".s-uploader--previews",
+ "description": "An image or string to preview a selected file."
+ },
+ {
+ "code": ".is-active",
+ "applies": ".s-uploader",
+ "description": "Active styling for uploader element. Added on dragenter or when input has value."
+ },
+ {
+ "code": ".is-disabled",
+ "applies": ".s-uploader",
+ "description": "Appropriately styles the uploader when it is disabled. Don’t forget to also add the disabled attribute on the input itself."
+ },
+ {
+ "code": ".has-error",
+ "applies": ".s-uploader",
+ "description": "Adds error styling to the component."
+ },
+ {
+ "code": ".has-success",
+ "applies": ".s-uploader",
+ "description": "Adds success styling to the component."
+ },
+ {
+ "code": ".has-warning",
+ "applies": ".s-uploader",
+ "description": "Adds warning styling to the component."
+ }
+ ],
+ "attributes": [
+ {
+ "code": "data-controller=\"s-uploader\"",
+ "secondaryContext": "Controller element",
+ "description": "Wires up the element to the uploader controller. This may be a .s-uploader element or a wrapper element."
+ },
+ {
+ "code": "data-target=\"s-uploader.uploader\"",
+ "applies": ".s-uploader",
+ "description": "Wires up the element containing input, previews, and reset targets."
+ },
+ {
+ "code": "data-s-uploader-target=\"input\"",
+ "applies": ".s-uploader--input",
+ "description": "Designates the file input element."
+ },
+ {
+ "code": "data-target=\"s-uploader.previews\"",
+ "applies": ".s-uploader--previews",
+ "description": "Designates the element to act as a container to file preview(s)."
+ },
+ {
+ "code": "data-action=\"input->s-uploader#handleInput\"",
+ "applies": "input[type=file]",
+ "description": "Wires up the element to provide files for preview on change."
+ },
+ {
+ "code": "data-action=\"click->s-uploader#reset\"",
+ "secondaryContext": "Any child element",
+ "description": "Wires up the element to reset the uploader to its initial state."
+ },
+ {
+ "code": "data-s-uploader-show-on-input",
+ "secondaryContext": "Any child element",
+ "description": "Toggles element visibility. Shows when input has value."
+ },
+ {
+ "code": "data-s-uploader-hide-on-input",
+ "secondaryContext": "Any child element",
+ "description": "Toggles element visibility. Hides when input has value."
+ },
+ {
+ "code": "data-s-uploader-enable-on-input",
+ "secondaryContext": "Any child element",
+ "description": "Toggles element disabled state. Disables when input has no value."
+ }
+ ]
+}
diff --git a/packages/stacks-docs/_data/components/user-card.json b/packages/stacks-docs/_data/components/user-cards.json
similarity index 85%
rename from packages/stacks-docs/_data/components/user-card.json
rename to packages/stacks-docs/_data/components/user-cards.json
index f9480e792d..2838391492 100644
--- a/packages/stacks-docs/_data/components/user-card.json
+++ b/packages/stacks-docs/_data/components/user-cards.json
@@ -1,54 +1,58 @@
{
"classes": [
{
- "class": ".s-user-card",
- "applies": "N/A",
+ "code": ".s-user-card",
"description": "Base user card container that applies the basic style."
},
{
- "class": ".s-user-card--group",
- "applies": "N/A",
- "description": "A container for group elements."
- },
- {
- "class": ".s-user-card--group__split",
- "applies": "Modifier for .s-user-card--group",
- "description": "Inserts a separator between each element."
- },
- {
- "class": ".s-user-card--column",
- "applies": "N/A",
+ "code": ".s-user-card--column",
+ "applies": ".s-user-card > *",
"description": "A container for column elements."
},
{
- "class": ".s-user-card--row",
- "applies": "N/A",
+ "code": ".s-user-card--row",
+ "applies": ".s-user-card > *",
"description": "A container for row elements."
},
{
- "class": ".s-user-card--bio",
- "applies": "N/A",
+ "code": ".s-user-card--group",
+ "applies": ".s-user-card > *",
+ "description": "A container for group elements."
+ },
+ {
+ "code": ".s-user-card--bio",
"description": "Container for the user's bio."
},
{
- "class": ".s-user-card--recognition",
- "applies": "N/A",
+ "code": ".s-user-card--recognition",
"description": "Container for recognition by a collective."
},
{
- "class": ".s-user-card--rep",
- "applies": "N/A",
+ "code": ".s-user-card--rep",
"description": "Container for the user's reputation."
},
{
- "class": ".s-user-card--time",
- "applies": "N/A",
+ "code": ".s-user-card--time",
"description": "Container for the user's timestamp."
},
{
- "class": ".s-user-card--username",
- "applies": "N/A",
+ "code": ".s-user-card--username",
"description": "Container for the user's username."
+ },
+ {
+ "code": ".s-user-card__sm",
+ "applies": ".s-user-card",
+ "description": "Use the small variant for space-constrained areas, such as post summaries, or to establish visual hierarchy for secondary content like comments and replies."
+ },
+ {
+ "code": ".s-user-card__lg",
+ "applies": ".s-user-card",
+ "description": "Use the large variant when space permits and more detailed information is desired."
+ },
+ {
+ "code": ".s-user-card--group__split",
+ "applies": ".s-user-card--group",
+ "description": "Inserts a separator between each element."
}
],
"base": [
@@ -179,7 +183,7 @@
"bronze": 4,
"badges": [
{
- "class": "s-badge__moderator",
+ "code": "s-badge__moderator",
"text": "Mod"
}
],
@@ -204,18 +208,17 @@
],
"sizes": [
{
- "size": "small",
- "class": ".s-user-card__sm",
+ "code": ".s-user-card__sm",
+ "secondaryContext": "small",
"description": "Use the small variant for space-constrained areas, such as post summaries, or to establish visual hierarchy for secondary content like comments and replies."
},
{
- "size": "default",
- "class": "N/A",
+ "item": "N/A",
"description": "Use the default variant when the user needs a more primary focus of the content. This style features a larger avatar to establish top-level hierarchy like question and answer authors."
},
{
- "size": "large",
- "class": ".s-user-card__lg",
+ "code": ".s-user-card__lg",
+ "secondaryContext": "large",
"description": "Use the large variant when space permits and more detailed information is desired"
}
],
@@ -313,18 +316,17 @@
],
"states": [
{
- "name": "Original Poster",
- "class": "s-user-card--username__op",
+ "primaryContext": "Original Poster",
+ "code": ".s-user-card--username__op",
"description": "This label identifies the author of the primary post (such as the Question asker) when they appear in secondary contexts, like comment threads."
},
{
- "name": "New Contributor",
- "class": "N/A",
+ "primaryContext": "New Contributor",
"description": "This label appears on a user's first-ever question or answer to signal that they are new to the platform."
},
{
- "name": "Deleted user",
- "class": "s-user-card__deleted",
+ "primaryContext": "Deleted user",
+ "code": ".s-user-card__deleted",
"description": "When a user is deleted, we still need to show their name, but we strip the meta data."
}
],
@@ -414,13 +416,12 @@
],
"additional-bling": [
{
- "name": "Recognized Member",
- "class": "s-user-card--recognition-additional-bling",
+ "code": ".s-user-card--recognition-additional-bling",
+ "primaryContext": "Recognized Member",
"description": "This label appears on within a Collective question post to signal that they are a Recognized Member."
},
{
- "name": "Awarded",
- "class": "N/A",
+ "primaryContext": "Awarded",
"description": "This icon appears next to a user when they are within the top 3 positions of a Collective’s leaderboard."
}
]
diff --git a/packages/stacks-docs/_data/components/vote.json b/packages/stacks-docs/_data/components/vote.json
index b69212a0a2..fb4359995f 100644
--- a/packages/stacks-docs/_data/components/vote.json
+++ b/packages/stacks-docs/_data/components/vote.json
@@ -1,44 +1,43 @@
{
"classes": [
{
- "class": ".s-vote",
- "applies": "N/A",
+ "code": ".s-vote",
"description": "Base vote component."
},
{
- "class": ".s-vote__expanded",
- "applies": ".s-vote",
- "description": "Expanded vote style that shows upvote and downvote counts separately."
+ "code": ".s-vote--btn",
+ "parent": ".s-vote",
+ "description": "Vote button."
},
{
- "class": ".s-vote__horizontal",
- "applies": ".s-vote",
- "description": "Horizontal vote style that arranges buttons and counts in a row. This layout does not officially support downvoting or expanded vote count."
+ "code": ".s-vote--votes",
+ "parent": ".s-vote",
+ "description": "Container for vote counts."
},
{
- "class": ".s-vote--btn",
- "applies": ".s-vote",
- "description": "Vote button."
+ "code": ".s-vote--downvotes",
+ "parent": ".s-vote--votes",
+ "description": "Downvote count."
},
{
- "class": ".s-vote--votes",
- "applies": ".s-vote",
- "description": "Container for vote counts."
+ "code": ".s-vote--total",
+ "parent": ".s-vote--votes",
+ "description": "Total vote count."
},
{
- "class": ".s-vote--upvotes",
- "applies": ".s-vote--votes",
+ "code": ".s-vote--upvotes",
+ "parent": ".s-vote--votes",
"description": "Upvote count."
},
{
- "class": ".s-vote--total",
- "applies": ".s-vote--votes",
- "description": "Total vote count."
+ "code": ".s-vote__expanded",
+ "applies": ".s-vote",
+ "description": "Expanded vote style that shows upvote and downvote counts separately."
},
{
- "class": ".s-vote--downvotes",
- "applies": ".s-vote--votes",
- "description": "Downvote count."
+ "code": ".s-vote__horizontal",
+ "applies": ".s-vote",
+ "description": "Horizontal vote style that arranges buttons and counts in a row. This layout does not officially support downvoting or expanded vote count."
}
],
"groups": {
diff --git a/packages/stacks-docs/_data/validation-classes.json b/packages/stacks-docs/_data/validation-classes.json
new file mode 100644
index 0000000000..f7822de560
--- /dev/null
+++ b/packages/stacks-docs/_data/validation-classes.json
@@ -0,0 +1,17 @@
+[
+ {
+ "code": ".has-warning",
+ "primaryContext": "Parent element",
+ "description": "Used to warn users that the value they’ve entered has a potential problem, but it doesn’t block them from proceeding."
+ },
+ {
+ "code": ".has-error",
+ "primaryContext": "Parent element",
+ "description": "Used to alert users that the value they’ve entered is incorrect, not filled in, or has a problem which will block them from proceeding."
+ },
+ {
+ "code": ".has-success",
+ "primaryContext": "Parent element",
+ "description": "Used to notify users that the value they’ve entered is fine or has been submitted successfully."
+ }
+]
\ No newline at end of file
diff --git a/packages/stacks-docs/_includes/docs-table.html b/packages/stacks-docs/_includes/docs-table.html
new file mode 100644
index 0000000000..9cc160b14c
--- /dev/null
+++ b/packages/stacks-docs/_includes/docs-table.html
@@ -0,0 +1,152 @@
+{% comment %}
+ Reusable classes reference table (Class | Applied to | Description).
+ Set docsItems in parent scope. Column header classes default as below; override by
+ setting classColClasses, appliesColClasses, or descriptionColClasses before including.
+
+ Usage:
+ {% assign docsItems = itemType.items %}
+ {% include "docs-table.html" %}
+ Override one column: {% assign appliesColClasses = "s-table--cell4" %}
+{% endcomment %}
+
+{% if tableId == nil %}
+ {% assign tableId = "docs-table" %}
+{% endif %}
+
+{% comment %}Default column th classes{% endcomment %}
+{% if col1Classes == nil %}
+ {% assign col1Classes = "s-table--cell3" %}
+{% endif %}
+{% if col2Classes == nil %}
+ {% assign col2Classes = "s-table--cell2" %}
+{% endif %}
+{% if col3Classes == nil %}
+ {% assign col3Classes = "s-table--cell2" %}
+{% endif %}
+{% if col4Classes == nil %}
+ {% assign col4Classes = "" %}
+{% endif %}
+
+{% comment %}Default column th headings{% endcomment %}
+{% if col1Heading == nil %}
+ {% assign col1Heading = "Class" %}
+{% endif %}
+{% if col2Heading == nil %}
+ {% assign col2Heading = "Parent" %}
+{% endif %}
+{% if col3Heading == nil %}
+ {% assign col3Heading = "Modifies" %}
+{% endif %}
+{% if col4Heading == nil %}
+ {% assign col4Heading = "Description" %}
+{% endif %}
+
+{% if expandableBtnText == nil %}
+ {% assign expandableBtnText = "Show all classes" %}
+{% endif %}
+{% assign expandableClassesTable = expandableClassesTable | default: false %}
+
+{% if expandableClassesTable %}
+
+{% endif %}
+
+
+{% assign tableId = nil %}
+{% assign col1Classes = nil %}
+{% assign col2Classes = nil %}
+{% assign col3Classes = nil %}
+{% assign col4Classes = nil %}
+{% assign col1Heading = nil %}
+{% assign col2Heading = nil %}
+{% assign col3Heading = nil %}
+{% assign col4Heading = nil %}
+{% assign expandableBtnText = nil %}
+{% assign expandableClassesTable = nil %}
diff --git a/packages/stacks-docs/assets/js/global.navigation.js b/packages/stacks-docs/assets/js/global.navigation.js
index 0a090de58a..ca6df65ff3 100644
--- a/packages/stacks-docs/assets/js/global.navigation.js
+++ b/packages/stacks-docs/assets/js/global.navigation.js
@@ -8,6 +8,19 @@ $(document).ready(function() {
e.preventDefault();
});
+ // Docs table "Show all classes" - use delegation so it works after sidebar nav AJAX load
+ $(document).on("click", ".js-docs-table-expand", function() {
+ var button = $(this);
+ var tableId = button.attr("aria-controls");
+ var table = tableId ? document.getElementById(tableId) : null;
+ if (table) {
+ button.addClass("d-none");
+ button.attr("aria-expanded", "true");
+ table.classList.remove("v-truncate", "v-truncate-fade", "overflow-auto");
+ table.classList.add("overflow-x-auto");
+ }
+ });
+
function regenerateMenu () {
// Hide the navigation if we've opened it
hamburgerBtn.removeClass("is-selected");
diff --git a/packages/stacks-docs/assets/less/stacks-documentation.less b/packages/stacks-docs/assets/less/stacks-documentation.less
index adfc54f394..629f9d6611 100644
--- a/packages/stacks-docs/assets/less/stacks-documentation.less
+++ b/packages/stacks-docs/assets/less/stacks-documentation.less
@@ -93,7 +93,6 @@ h2, h3 {
background-color: var(--black-150);
border: var(--su1) solid var(--black-200);
border-radius: var(--su2);
- color: var(--green-600);
font-family: var(--ff-mono);
overflow-wrap: break-word;
margin: var(--sun1);
@@ -172,7 +171,7 @@ h2, h3 {
color: var(--black-500);
- font-size: var(--fs-body3);
+ font-size: var(--fs-body2);
line-height: 1.5;
margin-bottom: var(--su16);
margin-top: 0;
@@ -235,10 +234,6 @@ h2, h3 {
--_dt-c: var(--green-400);
}
- code {
- font-size: 1em;
- }
-
min-width: var(--su344);
}
diff --git a/packages/stacks-docs/product/components/activity-indicator.html b/packages/stacks-docs/product/components/activity-indicator.html
index 6012439c2c..2d959746d4 100644
--- a/packages/stacks-docs/product/components/activity-indicator.html
+++ b/packages/stacks-docs/product/components/activity-indicator.html
@@ -7,31 +7,14 @@
tags: components
---
-{% assign examples = " ,3,12,370,new" | split: "," %}
-
| Class | -Applied to | -Description | -
|---|---|---|
{{ item.class }} |
- {% if item.applies == "N/A" %}{{ item.applies }}{% else %}{{ item.applies }}{% endif %} |
- {{ item.description }} | -
| Class | -Applied to | -Description | -
|---|---|---|
{{ item.class }} |
- {{ item.applies }} |
- {{ item.description }} | -
- 16px
- default
- |
-
-
- |
- |
- 24px
- .s-avatar__24
- |
-
-
- |
- |
- 32px
- .s-avatar__32
- |
-
-
- |
- |
- 48px
- .s-avatar__48
- |
-
-
- |
- |
- 64px
- .s-avatar__64
- |
-
-
- |
- |
- 96px
- .s-avatar__96
- |
-
-
- |
- |
- 128px
- .s-avatar__128
- |
-
-
- |
- |
| + | + | + |
|---|---|---|
+ {{ example }}px
+ |
+
+ {% if example == "16" %}default{% else %}.s-avatar__{{ example }}{% endif %}
+ |
+
+
+ |
+
- 16px
- default
- |
-
-
-
-
- Online
- |
- |
- 24px
- .s-avatar__24
- |
-
-
-
-
- Online
- |
- |
| + | + | + |
|---|---|---|
+ {{ example }}px
+ |
+
+ {% if example == 16 %}default{% else %}.s-avatar__{{ example }}{% endif %}
+ |
+
+
+
+
+ Online
+ |
+
- 16px
- default
- |
-
-
-
-
- {% icon "ShieldXSm", "native s-avatar--badge" %}
-
- Hum
-
- |
-
-
-
-
- {% icon "ShieldXSm", "native s-avatar--badge" %}
-
- Hum
-
- |
-
-
-
-
- Hum
-
- |
- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- 24px
- .s-avatar__24
- |
- - - - Hum - {% icon "ShieldXSm", "native s-avatar--badge" %} - - | -- - - Hum - {% icon "ShieldXSm", "native s-avatar--badge" %} - - | -
-
- |
- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- 32px
- .s-avatar__32
- |
- - - - Hum - {% icon "ShieldXSm", "native s-avatar--badge" %} - - | -- - - Hum - {% icon "ShieldXSm", "native s-avatar--badge" %} - - | -
-
- |
- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- 48px
- .s-avatar__48
- |
- - - - Hum - {% icon "ShieldXSm", "native s-avatar--badge" %} - - | -- - - Hum - {% icon "ShieldXSm", "native s-avatar--badge" %} - - | -
-
- |
- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- 64px
- .s-avatar__64
- |
- - - - Hum - {% icon "ShieldXSm", "native s-avatar--badge" %} - - | -- - - Hum - {% icon "ShieldXSm", "native s-avatar--badge" %} - - | -
-
- |
- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- 96px
- .s-avatar__96
- |
- - - - Hum - {% icon "ShieldXSm", "native s-avatar--badge" %} - - | -- - - Hum - {% icon "ShieldXSm", "native s-avatar--badge" %} - - | -
-
- |
- ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
- 128px
- .s-avatar__128
- |
- - - - Hum - {% icon "ShieldXSm", "native s-avatar--badge" %} - - | -- - - Hum - {% icon "ShieldXSm", "native s-avatar--badge" %} - - | -
-
- |
-
| + | + | + | + | + |
|---|---|---|---|---|
+ {{ example }}px
+ |
+
+ {% if example == "16" %}default{% else %}.s-avatar__{{ example }}{% endif %}
+ |
+ {% for bgColor in avatars.teamBgs %}
+
+ {% if example == 16 %}
+
+
+ {% if bgColor == "png" %}
+
+ Hum
+
+ {% else %}
+
+ {% if bgColor == "png" %}
+ |
+ {% endfor %}
+
.s-badge >
- {% if type.class != nil %}
- .{{ type.class }}
- {% endif %}
- .s-badge
- {% if type.class != nil %}
- .{{ type.class }}
+ {% if type.code != nil %}
+ .{{ type.code }}
+ {% else %}
+ N/A
{% endif %}
.s-badge
- {% if type.class != nil %}
- .{{ type.class }}
- {% endif %}
- {% if badge.class != nil %}
- .{{ badge.class }}
+ {% if type.code != nil %}
+ .{{ type.code }}
+ {% else %}
+ N/A
{% endif %}
.s-badge
- {% if type.class != nil %}
- .{{ type.class }}
+ {% if badge.code != nil %}
+ .{{ badge.code }}
+ {% else %}
+ N/A
{% endif %}
- {% if badge.class != nil %}
- .{{ badge.class }}
+ {% if type.code != nil %}
+ .{{ type.code }}
+ {% else %}
+ N/A
{% endif %}
.{{ class }}
{% endfor %}
@@ -444,13 +446,12 @@
{% for type in types %}
.s-badge
- {% if type.class != nil %}
- .{{ type.class }}
+ {% if type.modifier != nil %}
+ .s-badge__{{ type.modifier }}
{% endif %}
.s-badge
- {% if type.class != nil %}
- .{{ type.class }}
+ {% if type.modifier != nil %}
+ .s-badge__{{ type.modifier }}
{% endif %}
System banners are used for system messaging. They are full-width notices placed in one of two locations:
.is-pinned..is-pinned.Since system banners are a type of notice, you can use the following notice visual styles in conjunction with .s-banner:
Refer to the Classes section for more information on how to apply the correct styles to the banner.
| Class | -Applies to | -Description | -
|---|---|---|
{{ item.class }} |
- {% if item.applies == "N/A" %}{{ item.applies }}{% else %}{{ item.applies }}{% endif %} |
- {{ item.description }} | -
The .s-banner component includes a controller to show and hide the banner programitically. While it is optional, at least including the functionality to close the banner is recommended.
| Attribute | -Applied to | -Description | -
|---|---|---|
data-controller="s-banner" |
- Controller element | -Wires up the element to the banner controller. This may be a .s-banner element or a wrapper element. |
-
data-s-banner-target="banner" |
- .s-banner element | -Wires up the element that is to be shown/hidden | -
data-s-banner-remove-when-hidden="true" |
- Controller element | -Optional Removes the banner from the DOM entirely when it is hidden | -
| Event | -Element | -Description | -
|---|---|---|
s-banner:show |
- Banner target | -Default preventable Fires immediately before showing the banner. Calling .preventDefault() cancels the display of the banner. |
-
s-banner:shown |
- Banner target | -Fires after the banner has been visually shown | -
s-banner:hide |
- Banner target | -Default preventable Fires immediately before hiding the banner. Calling .preventDefault() cancels the removal of the banner. |
-
s-banner:hidden |
- Banner target | -Fires after the banner has been visually hidden | -
| event.detail | -Applicable events | -Description | -
|---|---|---|
dispatcher |
- s-banner:* |
- Contains the Element that initiated the event. For instance, the button clicked to show, the element clicked outside the banner that caused it to hide, etc. |
-
| Function | -Parameters | -Description | -
|---|---|---|
Stacks.showBanner |
-
- element: the element the data-controller="s-banner" attribute is on - |
- Helper to manually show an s-banner element via external JS | -
Stacks.hideBanner |
-
- element: the element the data-controller="s-banner" attribute is on - |
- Helper to manually hide an s-banner element via external JS | -
The .s-banner component includes a controller to show and hide the banner programitically. While it is optional, at least including the functionality to close the banner is recommended.
Use the clear bling variant only when its associated color is already present in the component, such as within a colored tag badge or alongside a filled element.
diff --git a/packages/stacks-docs/product/components/breadcrumbs.html b/packages/stacks-docs/product/components/breadcrumbs.html index 16576359c3..d8e975a573 100644 --- a/packages/stacks-docs/product/components/breadcrumbs.html +++ b/packages/stacks-docs/product/components/breadcrumbs.html @@ -5,29 +5,16 @@ description: Breadcrumbs are used to provide context for the currently-viewed page. tags: components --- +| Class | -Parent | -Description | -
|---|---|---|
{{ item.class }} |
- {{ item.applies }} |
- {{ item.description }} | -
Breadcrumbs show users where they are within a site’s hierarchy. Breadcrumbs help orient the user and allow for navigation to previous page levels. It can be appropriate to use a breadcrumb when:
diff --git a/packages/stacks-docs/product/components/button-groups.html b/packages/stacks-docs/product/components/button-groups.html index 6821683192..e7a4e704a5 100644 --- a/packages/stacks-docs/product/components/button-groups.html +++ b/packages/stacks-docs/product/components/button-groups.html @@ -5,29 +5,16 @@ description: Button groups are a collection of buttons. This component is used in our questions view, and is frequently used in conjunction with other form elements such as search fields and sorting dropdowns. If the content you’re interacting with is a simple paring down or filter of the current view, it’s appropriate to use the.s-btn-group component. Add the class .is-selected and the aria-current attribute with the appropriate value to show the currently selected button.
tags: components
---
+
| Class | -Applied to | -Description | -
|---|---|---|
{{ item.class }} |
- {{ item.applies }} |
- {{ item.description }} | -
Stacks provides 3 different button styles:
@@ -462,7 +470,7 @@The base card styling applies a border and padding to the card.
diff --git a/packages/stacks-docs/product/components/checkbox.html b/packages/stacks-docs/product/components/checkbox.html index 6e07623089..68d36fe476 100644 --- a/packages/stacks-docs/product/components/checkbox.html +++ b/packages/stacks-docs/product/components/checkbox.html @@ -6,6 +6,15 @@ description: Checkable inputs that visually allow for multiple options or true/false values. tags: components --- + +Checkboxes use the same validation states as inputs.
{% header "h3", "Validation classes" %} -| Class | -Description | -
|---|---|
{{ state.class }} |
- {{ state.description }} | -
| Class | -Applies to | -Output | -
|---|---|---|
{{ item.class }} |
- {{ item.applies }} |
- {{ item.description }} | -
diff --git a/packages/stacks-docs/product/components/expandable.html b/packages/stacks-docs/product/components/expandable.html
index 4a2e7759ad..e9eb23e314 100644
--- a/packages/stacks-docs/product/components/expandable.html
+++ b/packages/stacks-docs/product/components/expandable.html
@@ -5,6 +5,16 @@
description: An expandable, sometimes called an accordion, is an element that can be hidden / revealed with a sliding transition.
tags: components
---
+
+ Inputs are normally paired with a label, but there are times when they can be used without a label. Placeholder text should primarily be used as a content prompt and only provided when needed. Labels or instructions must be provided when content requires user input. For any input field within a form that is required for successful data submission, provide the asterisk Stacks includes a special Validation states provides the user feedback based on their interaction (or lack of interaction) with an input. These styles are applied by applying the appropriate class to the wrapping parent container.
@@ -311,31 +295,13 @@ Labels inform users what information is being asked of them. They should be written in sentence case. Link previews automatically appear when you pasting a link into a post, providing a glimpse of what’s been linked to. This approach has been popularized by Slack, Twitter, Facebook, etc. Link previews should be tailored to fit the content received from each third party. It might be appropriate to use atomic utility classes for further customization, but Stacks provides a few reusable patterns:* as a symbol and a legend advising the meaning of the symbol before the first use..s-required-symbol class to ensure the symbol (asterisk) is clearly visible.
-
-
+ {% assign docsItems = inputs.required %}
+ {% assign col2Heading = "" %}
+ {% assign col3Heading = "Applies" %}
+ {% assign col3Classes = "s-table--cell4" %}
+ {% include "docs-table.html" %}
+
{% highlight html %}
*
{% endhighlight %}
@@ -152,26 +152,10 @@
-
-
-
- Class
- Applies
- Definition
-
-
-
-
- .s-required-symbol
- abbr element enclosing the asteriskUsed to style the asterisk indicating that a specific field is required.
-
-
-
-
-
-
-
- {% for state in inputs.validation %}
- Class
- Applies
- Definition
-
-
- {% endfor %}
-
-
- {{ state.class }}Parent wrapper for input
- {{ state.description }}
-
-
-
-
-
-
-
- {% for item in inputs.input %}
- {% assign size = item.sizes %}
- {% for item in size %}
- Name
- Size
- Class
- Example
-
-
- {% endfor %}
- {% endfor %}
-
- {{ item.name }}
- {{ item.size }}
- {% if item.class == "N/A" %}{{ item.class }}{% else %}
- .{{ item.class }}{% endif %}
-
-
-
-
-
-
-
- {% for item in inputs.label %}
- {% assign size = item.sizes %}
- {% for item in size %}
- Name
- Size
- Class
- Example
-
-
- {% endfor %}
- {% endfor %}
-
- {{ item.name }}
- {{ item.size }}
- {% if item.class == "N/A" %}{{ item.class }}{% else %}
- .{{ item.class }}{% endif %}
-
-
-
-
-
-
-
- {% for item in link-previews.classes %}
- Class
- Parent
- Description
-
-
- {% endfor %}
-
-
- {{ item.class }}
- {{ item.parent }}{{ item.description }}
-
I'm trying to create a simple fetch with hooks from an AWS database. At the moment it errors out and the only reason I can see is because it breaks the rules of hooks but I'm not sure how. It's at the top level of this functional component and it's not called inside an event handler.
-The result of this call (an array of user data), needs to be exported as a function and called in another file.
-If anyone can spot something I have missed and can highlighted how I'm breaking the rules of hooks I'd be grateful!
-Thanks!
+ {% for item in baseExample.body %} +{{ item }}
+ {% endfor %}a element by default. In addition, we provide .s-link and its variations. In rare situations, .s-link can be applied to n button while maintaining the look of an anchor.
tags: components
---
+
+{% header "h2", "Links" %}
| Class | -Applied to | -Description | -
|---|---|---|
{{ item.class }} |
- {{ item.applies }} |
- {{ item.description }} | -
Any link with adjacent static text cannot use color alone to differentiate it as a link. If a link is next to static text and the only visual indication that it’s a link is the color of the text, it will require an underline in addition to the color. Reference WCAG SC 1.4.1 for more details.
+{% header "h2", "Anchors" %}| Class | -Applied to | -Description | -
|---|---|---|
{{ item.class }} |
- {{ item.applies }} |
- {{ item.description }} | -
Sometimes you need to give all <a> elements inside a container or component the same color, even
when it‘s impractical or even impossible to give each anchor element an s-link class (e.g. because the markup is generated from Markdown).
In this case, you can add the s-anchors class together with one of the modifiers
@@ -101,7 +74,7 @@
| Class | -Applied to | -Description | -
|---|---|---|
- {{ item.class }}
- |
-
- {% if item.applies == "N/A" %}
- {{ item.applies }}
- {% else %}
- {{ item.applies }}
- {% endif %}
- |
- {{ item.description }} | -
| Class | -Applied to | -Example | -
|---|---|---|
- {% if size == "" %}
- .s-loader
- {% else %}
- .{{ size }}
- {%endif %}
- |
-
- {% if size == "" %}
- N/A
- {% else %}
- .s-loader
- {% endif %}
- |
-
-
-
- Loading…
- |
-
| Class | -Parent | -Description | -
|---|---|---|
{{ item.class }} |
- {{ item.applies }} |
- {{ item.description }} | -
- A menu displays a list of choices temporarily, and usually represent tasks or actions. Don’t confuse menus for navigation. -
+A menu displays a list of choices temporarily, and usually represent tasks or actions. Don’t confuse menus for navigation.
{% header "h3", "Basic" %} -- At its most basic, a menu is a simple styled list of contextual actions. Because they’re contextual, it’s strongly recommended that a menu is contained within a popover or a card. When placed in various containers, you’ll need to either account for the padding on the container, or use negative margins on the menu component itself. -
+At its most basic, a menu is a simple styled list of contextual actions. Because they’re contextual, it’s strongly recommended that a menu is contained within a popover or a card. When placed in various containers, you’ll need to either account for the padding on the container, or use negative margins on the menu component itself.
+| Class | -Applies to | -Description | -
|---|---|---|
{{ item.class }} |
- {{ item.applies }} | -{{ item.description }} | -
| Attribute | -Applied to | -Description | -
|---|---|---|
data-controller="s-modal" |
- Controller element | -Wires up the element to the modal controller. This may be a .s-modal element or a wrapper element. |
-
data-s-modal-target="modal" |
- .s-modal element | -Wires up the element that is to be shown/hidden | -
data-s-modal-target="initialFocus" |
- Any child focusable element | -Optional Designates which element to focus on modal show. If absent, defaults to the first focusable element within the modal. | -
data-action="s-modal#toggle" |
- Toggling element | -Wires up the element to toggle the visibility of a modal | -
data-s-modal-return-element="[css selector]" |
- Controller element | -Optional Designates the element to return focus to when the modal is closed. If left unset, focus is not altered on close. | -
data-s-modal-remove-when-hidden="true" |
- Controller element | -Optional Removes the modal from the DOM entirely when it is hidden | -
| Event | -Element | -Description | -
|---|---|---|
s-modal:show |
- Modal target | -Default preventable Fires immediately before showing the modal. Calling .preventDefault() cancels the display of the modal. |
-
s-modal:shown |
- Modal target | -Fires after the modal has been visually shown | -
s-modal:hide |
- Modal target | -Default preventable Fires immediately before hiding the modal. Calling .preventDefault() cancels the removal of the modal. |
-
s-modal:hidden |
- Modal target | -Fires after the modal has been visually hidden | -
| event.detail | -Applicable events | -Description | -
|---|---|---|
dispatcher |
- s-modal:* |
- Contains the Element that initiated the event. For instance, the button clicked to show, the element clicked outside the modal that caused it to hide, etc. |
-
returnElement |
- s-modal:show, s-modal:hide |
- Contains the Element to return focus to on hide. If a value is set to this property inside an event listener, it will be updated on the controller as well. |
-
| Function | -Parameters | -Description | -
|---|---|---|
Stacks.showModal |
-
- element: the element the data-controller="s-modal" attribute is on - |
- Helper to manually show an s-modal element via external JS | -
Stacks.hideModal |
-
- element: the element the data-controller="s-modal" attribute is on - |
- Helper to manually hide an s-modal element via external JS | -
Modals are designed with accessibility in mind by default. When a modal is open, navigation with the keyboard will be constrained to only those elements within the modal.
To ensure maximum compatibility, all a tags must have href attributes and any default focusable items you don’t want focusable must have their tabindex set to -1.
| Item | -Applied to | -Description | -
|---|---|---|
aria-describedby="[id]" |
- .s-modal |
- Supply the modal’s summary copy id. Assistive technologies (such as screen readers) use this to attribute to associate static text with a widget, element groups, headings, definitions, etc. (Source) | -
aria-hidden="[state]" |
- .s-modal |
- Informs assistive technologies (such as screen readers) if they should ignore the element. This should not be confused with the HTML5 hidden attribute which tells the browser to not display an element. (Source) | -
aria-label="[text]" |
- .s-modal--close |
- Labels the element for assistive technologies (such as screen readers). (Source) | -
aria-labelledby="[id]" |
- .s-modal |
- Supply the modal’s title id here. Assistive technologies (such as screen readers) use this to attribute to catalog the document objects correctly. (Source) | -
role="dialog" |
- .s-modal |
- Identifies dialog elements for assistive technologies (Source) | -
role="document" |
- .s-modal--dialog |
- Helps assistive technologies to switch their reading mode from the larger document to a focused dialog window. (Source) | -
Most modal dialogs look good by default, but may need some combination of .ws[x] or .wmx[x] classes applied to .s-modal--dialog. Additionally, the following class is available for modals:
| Class | -Value | -Pixels (13px base) | -Pixels (15px base) | -
|---|---|---|---|
.s-modal__full |
- 100% - 48px | -N/A | -N/A | -
| Class | -Applies to | -Description | -
|---|---|---|
{{ item.class }} |
- {{ item.applies }} | -{{ item.description }} | -
| Item | -Applied to | -Description | -
|---|---|---|
{{ item.item }} |
-
- {% if item.applies == "N/A" %}
- {{ item.applies }}
- {% else %}
- {% assign class = item.applies | split: " " %}
-
- {% for name in class %}
- {{ name }}
- {% endfor %}
- {% endif %}
- |
- {{ item.description }} (Source) | -
| Attribute | -Applied to | -Description | -
|---|---|---|
data-controller="s-toast" |
- Controller element | -Wires up the element to the toast controller. This may be a .s-toast element or a wrapper element. |
-
data-s-toast-target="toast" |
- .s-toast element | -Wires up the element that is to be shown/hidden | -
data-s-toast-target="initialFocus" |
- Any child focusable element | -Optional Designates which element to focus on toast show. If absent, defaults to the first focusable element within the toast. | -
data-action="s-toast#toggle" |
- Toggling element | -Wires up the element to toggle the visibility of a toast | -
data-s-toast-return-element="[css selector]" |
- Controller element | -Optional Designates the element to return focus to when the toast is closed. If left unset, focus is not altered on close. | -
data-s-toast-remove-when-hidden="true" |
- Controller element | -Optional Removes the toast from the DOM entirely when it is hidden | -
| Event | -Element | -Description | -
|---|---|---|
s-toast:show |
- Toast target | -Default preventable Fires immediately before showing the toast. Calling .preventDefault() cancels the display of the toast. |
-
s-toast:shown |
- Toast target | -Fires after the toast has been visually shown | -
s-toast:hide |
- Toast target | -Default preventable Fires immediately before hiding the toast. Calling .preventDefault() cancels the removal of the toast. |
-
s-toast:hidden |
- Toast target | -Fires after the toast has been visually hidden | -
| event.detail | -Applicable events | -Description | -
|---|---|---|
dispatcher |
- s-toast:* |
- Contains the Element that initiated the event. For instance, the button clicked to show, the element clicked outside the toast that caused it to hide, etc. |
-
returnElement |
- s-toast:show, s-toast:hide |
- Contains the Element to return focus to on hide. If a value is set to this property inside an event listener, it will be updated on the controller as well. |
-
| Function | -Parameters | -Description | -
|---|---|---|
Stacks.showToast |
-
- element: the element the data-controller="s-toast" attribute is on - |
- Helper to manually show an s-toast element via external JS | -
Stacks.hideToast |
-
- element: the element the data-controller="s-toast" attribute is on - |
- Helper to manually hide an s-toast element via external JS | -
| Class | -Applied to | -Description | -
|---|---|---|
{{ item.class }} |
-
- {% if item.applies == "N/A" %}
- {{ item.applies }}
- {% else %}
- {% assign class = item.applies | split: " " %}
-
- {% for name in class %}
- {{ name }}
- {% endfor %}
- {% endif %}
- |
- {{ item.description }} | -
Default notice variations
- {% header "h3", "Styling child links" %} + {% header "h3", "Styling child links" %}We recommend using descendent anchor classes, typically .s-anchors.s-anchors__inherit.s-anchors__underlined for notices containing links generated from markdown when you cannot manually generate the inner html.
| Behavior | -Class | -Applied to | -Description | -
|---|---|---|---|
| {{ item.type }} - | {{ item.class }} |
-
- {% if item.applies == "N/A" %}
- {{ item.applies }}
- {% else %}
- {% assign class = item.applies | split: " " %}
+ {% header "h2", "Toast" %}
+ {% tip "warning" %}
+ We are phasing out Toasts due to significant accessibility barriers. Avoid this component for new features. Instead, prioritize integrated alternatives—such as component state changes or inline messages—to provide accessible feedback directly where the user is focused.
+ {% endtip %}
- {% for name in class %}
- {{ name }}
- {% endfor %}
- {% endif %}
- |
- {{ item.description }} | -
- Floating notices, but aligned to the top and center of the page and they disappear after a set time.
+ Toasts are floating notices that are aligned to the center top of the page. They disappear after a set time.
Visibility is changed with animation by toggling between aria-hidden="true" and aria-hidden="false".
When including a dismiss button the .s-notice--dismiss class should be applied to the button for toast-specific styling.
-
+ The following helpers are available to manually show and hide a toast notice. +
+ {% assign docsItems = notices.javascript.helpers %} + {% assign col1Heading = "Function" %} + {% assign col2Heading = "" %} + {% assign col3Heading = "Parameters" %} + {% assign tableId = "docs-javascript-helpers-table" %} + {% include "docs-table.html" %} + + + + + \ No newline at end of file diff --git a/packages/stacks-docs/product/components/page-titles.html b/packages/stacks-docs/product/components/page-titles.html index c1ff2c9307..8123de2148 100644 --- a/packages/stacks-docs/product/components/page-titles.html +++ b/packages/stacks-docs/product/components/page-titles.html @@ -6,43 +6,20 @@ ---| Component | -Description | -
|---|---|
| Page title | -Title of the page. Refer to the content section of Stacks for things like word choice, naming, and capitalization. | -
| Description Optional | -Additional context for content and actions on the page. | -
| Actions Optional | -Free-form area to include buttons, filters, or other HTML content. | -
| Breadcrumbs Optional | -Breadcrumbs can be included to provide context for the currently-viewed page. | -
- These components should be used in the admin sections of our private Q&A products. -
- {% header "h3", "Base Styles" %} -- The base style for pages that don’t need further description beyond the page title and don’t have any actions for filters. -
+ {% header "h2", "Classes" %} + {% assign docsItems = page-titles.classes %} + {% assign col1Classes = "s-table--cell4" %} + {% assign col2Classes = "s-table--cell3" %} + {% assign col3Heading = "" %} + {% include "docs-table.html" %} +The base style for pages that don’t need further description beyond the page title and don’t have any actions for filters.
+ {% assign example = page-titles.example %} +- A summary of a page’s content. Helpful for large pages with multiple actions. -
+A summary of a page’s content. Helpful for large pages with multiple actions.
Optional description de Finibus Bonorum et Malorum with an optional link.
+{{ example.description }}
- When a page title includes actions, they are located at the far end of the component. This area is free-form, so we can include any markups we'd like, from single button to a d-flex of custom filters and text. -
+When a page title includes actions, they are located at the far end of the component. This area is free-form, so we can include any markups we'd like, from single button to a d-flex of custom filters and text.
Optional description de Finibus Bonorum et Malorum with an optional link.
+{{ example.description }}
- Breadcrumbs are used to provide context for the currently-viewed page and reduce the number of actions a website visitor needs to take in order to get to a higher-level page. Breadcrumbs should not be used for single-level sections that have no logical grouping. -
+Breadcrumbs are used to provide context for the currently-viewed page and reduce the number of actions a website visitor needs to take in order to get to a higher-level page. Breadcrumbs should not be used for single-level sections that have no logical grouping.
Optional description de Finibus Bonorum et Malorum with an optional link.
| Class | -Applied to | -Description | -
|---|---|---|
{{ item.class }} |
- {{ item.applies }} |
- {{ item.description }} | -