Skip to content

Commit

Permalink
chore: release (s2-foundations) (#3142)
Browse files Browse the repository at this point in the history
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
2 people authored and castastrophe committed Sep 24, 2024
1 parent a137269 commit b4e25d9
Show file tree
Hide file tree
Showing 43 changed files with 398 additions and 446 deletions.
1 change: 1 addition & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@
"sharp-pianos-reply",
"sharp-rice-sing",
"sharp-vans-flow",
"shiny-balloons-remember",
"shiny-peaches-change",
"short-carrots-film",
"silent-carpets-beam",
Expand Down
2 changes: 1 addition & 1 deletion .storybook/blocks/ComponentDetails.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ function processReleaseData(storyMeta, npmData) {
].filter(tag => !ignoredTags.includes(tag));

// Create a robust fallback stack to capture the version number
const fallbackVersion = packageJson?.version ?? storyMeta?.csfFile?.meta?.parameters?.componentVersion;
const fallbackVersion = packageJson?.version;

const mapVersions = new Map();
for (const tag of tags) {
Expand Down
12 changes: 5 additions & 7 deletions .storybook/decorators/context.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,15 @@ export const withContextWrapper = makeDecorator({
rootClass,
staticColor,
} = {},
globals = {},
globals: {
color = "light",
context = "spectrum",
scale = "medium",
},
id,
viewMode,
} = data;

let {
color = "light",
context = "spectrum",
scale = "medium",
} = globals;

const staticColorSettings = {
"black": {
background: "var(--spectrum-docs-static-black-background-color)",
Expand Down
6 changes: 6 additions & 0 deletions .storybook/modes/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,18 @@ const modes = {
},
"Context: Spectrum 1": {
scale: "medium",
color: "light",
textDirection: "ltr",
context: "legacy",
},
"Context: Express": {
scale: "medium",
color: "light",
textDirection: "ltr",
context: "express",
},
"Dark | RTL": {
scale: "medium",
color: "dark",
textDirection: "rtl",
context: "legacy",
Expand Down
5 changes: 0 additions & 5 deletions components/card/metadata/metadata.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
{
"sourceFile": "index.css",
"selectors": [
".spectrum--dark .spectrum-Card",
".spectrum--light .spectrum-Card",
".spectrum--lightest .spectrum-Card",
".spectrum-Card",
".spectrum-Card .spectrum-Divider",
".spectrum-Card--gallery",
Expand Down Expand Up @@ -197,9 +194,7 @@
"--spectrum-animation-duration-100",
"--spectrum-background-base-color",
"--spectrum-background-layer-2-color",
"--spectrum-blue-500-rgb",
"--spectrum-blue-700",
"--spectrum-blue-900-rgb",
"--spectrum-body-color",
"--spectrum-body-line-height",
"--spectrum-body-sans-serif-font-style",
Expand Down
12 changes: 1 addition & 11 deletions components/card/themes/spectrum-two.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
--spectrum-card-focus-indicator-width: var(--spectrum-focus-indicator-thickness);

/* Selected */
--spectrum-card-selected-background-opacity: 0.1; /* table-selected-row-background-opacity does not exist in tokens yet */
--spectrum-card-selected-background-opacity: 0.1;

--spectrum-card-preview-border-width-selected: var(--spectrum-border-width-100);
--spectrum-card-preview-background-color: var(--spectrum-gray-100);
Expand All @@ -77,15 +77,5 @@
/* Quiet/Gallery */
--spectrum-card-content-margin-top-quiet: var(--spectrum-spacing-100);
--spectrum-card-minimum-width-quiet: var(--spectrum-card-minimum-width);

/* TODO: These are placeholder until recursive RGB is available */
.spectrum--light &,
.spectrum--lightest & {
--spectrum-card-selected-background-color-rgb: var(--spectrum-blue-900-rgb);
}

.spectrum--dark & {
--spectrum-card-selected-background-color-rgb: var(--spectrum-blue-500-rgb);
}
}
}
9 changes: 9 additions & 0 deletions components/card/themes/spectrum.css
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,14 @@
--spectrum-card-divider-color: var(--spectrum-gray-300);
--spectrum-card-preview-background-color: var(--spectrum-background-base-color);
--spectrum-card-preview-background-color-hover: var(--spectrum-gray-300);
--spectrum-card-selected-background-color-rgb: var(--spectrum-blue-900-rgb);

.spectrum--dark & {
--spectrum-card-selected-background-color-rgb: var(--spectrum-blue-500-rgb);
}

.spectrum--darkest & {
--spectrum-card-selected-background-color-rgb: var(--spectrum-blue-600-rgb);
}
}
}
4 changes: 3 additions & 1 deletion components/coachindicator/metadata/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,9 @@
"--spectrum-coach-animation-indicator-ring-center-delay-multiple",
"--spectrum-coach-animation-indicator-ring-duration",
"--spectrum-coach-animation-indicator-ring-inner-delay-multiple",
"--spectrum-coach-animation-indicator-ring-outer-delay-multiple"
"--spectrum-coach-animation-indicator-ring-outer-delay-multiple",
"--spectrum-gray-25",
"--spectrum-gray-900"
],
"system-theme": [],
"passthroughs": [],
Expand Down
4 changes: 4 additions & 0 deletions components/coachindicator/themes/spectrum-two.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@
--spectrum-coach-indicator-ring-inline-size: var(--spectrum-coach-indicator-ring-diameter);
--spectrum-coach-indicator-ring-block-size: var(--spectrum-coach-indicator-ring-diameter);

--spectrum-coach-indicator-ring-dark-color: var(--spectrum-gray-900);
--spectrum-coach-indicator-ring-light-color: var(--spectrum-gray-25);

--spectrum-coach-indicator-top: calc((var(--spectrum-coach-indicator-block-size) / 3) - var(--spectrum-coach-indicator-ring-border-size));
--spectrum-coach-indicator-left: calc((var(--spectrum-coach-indicator-inline-size) / 3) - var(--spectrum-coach-indicator-ring-border-size));

Expand All @@ -40,6 +43,7 @@
--spectrum-coach-indicator-animation-keyframe-100-scale: 2;
--spectrum-coach-indicator-animation-keyframe-100-opacity: 0;
--spectrum-coach-indicator-quiet-animation-keyframe-0-scale: 0.8;

&.spectrum-CoachIndicator--quiet {
--spectrum-coach-indicator-quiet-ring-diameter-size: var(--spectrum-coach-indicator-quiet-ring-diameter);
--spectrum-coach-indicator-animation-name: pulse-quiet;
Expand Down
6 changes: 6 additions & 0 deletions components/coachindicator/themes/spectrum.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,9 @@
/* @combine .spectrum.spectrum--legacy */

@import "./spectrum-two.css";

@container style(--system: legacy) {
.spectrum-CoachIndicator {
--spectrum-coach-indicator-ring-light-color: var(--spectrum-gray-50);
}
}
2 changes: 1 addition & 1 deletion components/contextualhelp/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
}

.spectrum-ContextualHelp-heading {
margin-block-end: var(--mod-spectrum-contextual-help-content-spacing, var(--spectrum-contextual-help-content-spacing));
margin-block-end: var(--mod-spectrum-contextual-help-content-spacing, var(--spectrum-contextual-help-content-spacing-default));
font-size: var(--mod-spectrum-contextual-help-heading-size, var(--spectrum-contextual-help-heading-size));
color: var(--highcontrast-contextual-help-heading-color, var(--mod-contextual-help-heading-color, var(--spectrum-contextual-help-heading-color)));
}
Expand Down
4 changes: 1 addition & 3 deletions components/contextualhelp/metadata/metadata.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{
"sourceFile": "index.css",
"selectors": [
".spectrum--large .spectrum-ContextualHelp",
".spectrum-ContextualHelp",
".spectrum-ContextualHelp-button",
".spectrum-ContextualHelp-link",
Expand All @@ -23,6 +22,7 @@
"--spectrum-contextual-help-body-color",
"--spectrum-contextual-help-body-size",
"--spectrum-contextual-help-content-spacing",
"--spectrum-contextual-help-content-spacing-default",
"--spectrum-contextual-help-heading-color",
"--spectrum-contextual-help-heading-size",
"--spectrum-contextual-help-link-spacing",
Expand All @@ -33,8 +33,6 @@
"global": [
"--spectrum-body-color",
"--spectrum-heading-color",
"--spectrum-spacing-100",
"--spectrum-spacing-200",
"--spectrum-spacing-300",
"--spectrum-spacing-400"
],
Expand Down
7 changes: 1 addition & 6 deletions components/contextualhelp/themes/spectrum-two.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,12 @@
.spectrum-ContextualHelp {
/* Layout Variables */
--spectrum-contextual-help-padding: var(--spectrum-spacing-400);
--spectrum-contextual-help-content-spacing: var(--spectrum-spacing-100);
--spectrum-contextual-help-content-spacing-default: var(--spectrum-contextual-help-content-spacing);
--spectrum-contextual-help-link-spacing: var(--spectrum-spacing-300);

/* Typography Variables */
--spectrum-contextual-help-heading-size: var(--spectrum-contextual-help-title-size);
--spectrum-contextual-help-heading-color: var(--spectrum-heading-color);
--spectrum-contextual-help-body-color: var(--spectrum-body-color);

/* Mobile styling */
.spectrum--large & {
--spectrum-contextual-help-content-spacing: var(--spectrum-spacing-200);
}
}
}
9 changes: 6 additions & 3 deletions components/menu/metadata/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@
".spectrum-Menu .spectrum-Menu-itemIcon--workflowIcon",
".spectrum-Menu .spectrum-Menu-itemIcon:not(.spectrum-Menu-chevron, .spectrum-Menu-checkmark)",
".spectrum-Menu li:not(.spectrum-Menu-item, .spectrum-Menu-divider)",
".spectrum-Menu--sizeL",
".spectrum-Menu--sizeS",
".spectrum-Menu--sizeXL",
".spectrum-Menu-back",
".spectrum-Menu-back .spectrum-Menu-sectionHeading",
".spectrum-Menu-back:focus-visible",
Expand Down Expand Up @@ -134,6 +131,10 @@
".spectrum-Menu.is-selectable .spectrum-Menu-item",
".spectrum-Menu.is-selectable .spectrum-Menu-item.is-selected",
".spectrum-Menu.js-focus-within .spectrum-Menu-item--collapsible.is-open[focus-within]",
".spectrum-Menu.spectrum-Menu--sizeL",
".spectrum-Menu.spectrum-Menu--sizeM",
".spectrum-Menu.spectrum-Menu--sizeS",
".spectrum-Menu.spectrum-Menu--sizeXL",
".spectrum-Menu:lang(ja)",
".spectrum-Menu:lang(ko)",
".spectrum-Menu:lang(zh)",
Expand Down Expand Up @@ -342,6 +343,7 @@
"--spectrum-font-size-300",
"--spectrum-font-size-50",
"--spectrum-font-size-75",
"--spectrum-gray-1000",
"--spectrum-gray-900",
"--spectrum-line-height-100",
"--spectrum-navigational-indicator-top-to-back-icon-extra-large",
Expand All @@ -368,6 +370,7 @@
"--spectrum-text-to-visual-200",
"--spectrum-text-to-visual-300",
"--spectrum-text-to-visual-75",
"--spectrum-transparent-black-200-opacity",
"--spectrum-workflow-icon-size-100",
"--spectrum-workflow-icon-size-200",
"--spectrum-workflow-icon-size-300",
Expand Down
Loading

0 comments on commit b4e25d9

Please sign in to comment.