Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
d669cad
feat(tokens): use 13.0.0-beta.5
pfulton Dec 11, 2023
0aa513a
feat(tokens): use 13.0.0-beta.8
pfulton Jan 8, 2024
07288a5
feat(tokens): use 13.0.0-beta.9
pfulton Jan 11, 2024
5c63236
feat(actiongroup)!: migrate to S2 (#2453)
Feb 2, 2024
d86f546
feat(buttongroup)!: migrate to S2 (#2457)
jenndiaz Feb 2, 2024
84b5782
feat(tokens)!: use 13.0.0-beta.13
pfulton Feb 2, 2024
84f5d56
chore(release): release
pfulton Feb 6, 2024
a944f02
feat(tokens)!: use spectrum-tokens 13.0.0-beta.16
pfulton Feb 22, 2024
3f93a1c
chore(actiongroup,buttongroup): specify s2 tokens for peerdeps
pfulton Feb 26, 2024
226fe51
feat(closebutton)!: migrate to S2 (#2564)
Mar 7, 2024
4aab1e6
chore: s2 grays component-level migration (#2583)
pfulton Mar 7, 2024
417899c
fix(closebutton): use correct casing for class names
pfulton Mar 8, 2024
29165d2
fix(commons): remove renamed mods marked for deprecation (#2580)
jawinn Mar 8, 2024
e37daed
feat(fieldlabel)!: s2 migration (#2569)
jawinn Mar 11, 2024
4d8f0e0
chore(tokens): use spectrum-tokens v13.0.0-beta.19
pfulton Mar 11, 2024
d1e35b1
chore(tokens): manual version bump for 14.0.0-next.1
pfulton Mar 12, 2024
532db71
chore(release): release
pfulton Mar 12, 2024
edd8382
feat(downstate): docs + implementation for example components (#2520)
Mar 19, 2024
f9712d1
fix(button): resolve merge issue
pfulton Mar 19, 2024
96a6ff7
feat(tokens): use spectrum-tokens 13.0.0-beta.21 (#2597)
pfulton Mar 19, 2024
a3248be
chore(release): release
pfulton Mar 21, 2024
ef2fb76
chore: rebase against main and update components to use prerelease to…
pfulton Mar 28, 2024
aaf738d
feat(cornerrounding): add custom token and foundations documentation …
jenndiaz Mar 28, 2024
b3fdaa7
fix(storybook): body classes for story and docs pages (#2617)
Apr 1, 2024
d4e4bad
docs: update migration guide headings (#2638)
jawinn Apr 4, 2024
5415aaa
feat(opacitycheckerboard): S2, small t-shirt size squares (#2610)
Apr 8, 2024
5628c92
feat(tokens): use spectrum-tokens at v13.0.0-beta.24 (#2650)
Apr 9, 2024
f8fc7bc
chore(tokens): manual version bump for prerelease
pfulton Apr 9, 2024
408fbb7
feat: add example gradients for static black and white (#2637)
jawinn Apr 11, 2024
9bbb488
chore(tokens): use spectrum-tokens@13.0.0-beta.27
pfulton Apr 12, 2024
ff0645a
chore(release): release
pfulton Apr 12, 2024
357218a
feat(switch): s2 migration (#2651)
Apr 15, 2024
bfaea04
chore: prerelease mode for changesets
pfulton Apr 19, 2024
861b1e1
chore(tokens): use @adobe/spectrum-tokens@13.0.0-beta.30 (#2678)
pfulton Apr 19, 2024
9af0ec0
chore: remove darkest as SB option (#2679)
pfulton Apr 19, 2024
06d2ecf
chore: release (next) (#2680)
github-actions[bot] Apr 19, 2024
5122de8
chore: run branch through format; update pathing and fix errors (#2700)
castastrophe Apr 26, 2024
9252338
chore: release (next) (#2706)
github-actions[bot] Apr 26, 2024
fb29aab
chore: fix linting conflict vs. format
castastrophe Apr 26, 2024
3559678
feat(button): migrate to Spectrum 2 (#2600)
jawinn May 1, 2024
e0e0fd2
chore: release s2 button (next) (#2722)
github-actions[bot] May 1, 2024
c6a6f60
feat(helptext): s2 migration
May 1, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/great-cows-cheat.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@spectrum-css/helptext": major
---

feat(helptext): s2 migration

Help text now uses Spectrum 2 tokens and specifications. This includes updates to heights and spacing, icons and icon sizes, colors, and fonts.
15 changes: 15 additions & 0 deletions .changeset/nine-kings-repair.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
"@spectrum-css/button": major
---

#### Spectrum 2 migration
Button now uses Spectrum 2 tokens and specifications, which includes many color changes to all variants. A few other notable changes:
- Outline buttons are no longer available in accent and negative options — use the filled variant instead.
- Medium size is now the default. The class `.spectrum-Button--sizeM` is now unnecessary for this size, and has been removed.
- The `.spectrum-Button--fill` class is no longer needed and has been removed.

The following `--mod` custom properties have been renamed:
- `--mod-line-height-100` has been renamed to `--mod-button-line-height`
- `--mod-sans-font-family-stack` has been renamed to `--mod-button-font-family`
- `--mod-animation-duration-100` has been renamed to `--mod-button-animation-duration`
- `--mod-bold-font-weight` has been renamed to `--mod-button-font-weight`
5 changes: 5 additions & 0 deletions .changeset/perfect-dogs-smash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@spectrum-css/button": patch
---

chore: run branch through formatter
107 changes: 107 additions & 0 deletions .changeset/pre.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
{
"mode": "pre",
"tag": "next",
"initialVersions": {
"@spectrum-tools/gh-action-file-diff": "2.0.5",
"@spectrum-css/preview": "8.1.0-next.1",
"@spectrum-css/accordion": "4.2.7-next.2",
"@spectrum-css/actionbar": "7.2.5-next.2",
"@spectrum-css/actionbutton": "5.2.7-next.2",
"@spectrum-css/actiongroup": "5.0.0-next.3",
"@spectrum-css/actionmenu": "5.1.4-next.2",
"@spectrum-css/alertbanner": "1.1.42-next.2",
"@spectrum-css/alertdialog": "1.2.5-next.2",
"@spectrum-css/asset": "4.0.1-next.2",
"@spectrum-css/assetcard": "3.1.5-next.2",
"@spectrum-css/assetlist": "5.2.5-next.2",
"@spectrum-css/avatar": "6.1.6-next.2",
"@spectrum-css/badge": "3.2.6-next.2",
"@spectrum-css/breadcrumb": "8.2.6-next.2",
"@spectrum-css/button": "14.0.0-next.4",
"@spectrum-css/buttongroup": "7.0.0-next.3",
"@spectrum-css/calendar": "4.2.6-next.2",
"@spectrum-css/card": "7.0.3-next.2",
"@spectrum-css/checkbox": "14.0.0-next.4",
"@spectrum-css/clearbutton": "5.1.5-next.2",
"@spectrum-css/closebutton": "5.0.0-next.2",
"@spectrum-css/coachindicator": "1.1.6-next.2",
"@spectrum-css/coachmark": "6.1.6-next.2",
"@spectrum-css/colorarea": "4.1.6-next.2",
"@spectrum-css/colorhandle": "7.1.5-next.2",
"@spectrum-css/colorloupe": "4.2.5-next.2",
"@spectrum-css/colorslider": "5.1.6-next.2",
"@spectrum-css/colorwheel": "3.1.6-next.2",
"@spectrum-css/combobox": "2.1.7-next.2",
"@spectrum-css/commons": "9.1.4-next.1",
"@spectrum-css/contextualhelp": "2.1.6-next.2",
"@spectrum-css/datepicker": "2.1.5-next.2",
"@spectrum-css/dial": "2.2.5-next.2",
"@spectrum-css/dialog": "9.2.5-next.2",
"@spectrum-css/divider": "2.2.6-next.2",
"@spectrum-css/dropindicator": "4.1.5-next.2",
"@spectrum-css/dropzone": "5.2.6-next.2",
"@spectrum-css/fieldgroup": "4.2.5-next.2",
"@spectrum-css/fieldlabel": "8.0.0-next.2",
"@spectrum-css/floatingactionbutton": "1.2.6-next.2",
"@spectrum-css/helptext": "4.1.6-next.2",
"@spectrum-css/icon": "6.0.6-next.2",
"@spectrum-css/illustratedmessage": "6.1.6-next.2",
"@spectrum-css/infieldbutton": "4.2.5-next.2",
"@spectrum-css/inlinealert": "7.1.7-next.2",
"@spectrum-css/link": "4.2.6-next.2",
"@spectrum-css/logicbutton": "3.3.5-next.2",
"@spectrum-css/menu": "6.1.6-next.2",
"@spectrum-css/miller": "5.1.5-next.2",
"@spectrum-css/modal": "4.2.7-next.2",
"@spectrum-css/opacitycheckerboard": "1.1.6-next.2",
"@spectrum-css/page": "7.1.5-next.2",
"@spectrum-css/pagination": "7.1.7-next.2",
"@spectrum-css/picker": "7.2.8-next.2",
"@spectrum-css/pickerbutton": "4.1.6-next.2",
"@spectrum-css/popover": "6.2.6-next.2",
"@spectrum-css/progressbar": "3.1.6-next.2",
"@spectrum-css/progresscircle": "2.2.4-next.2",
"@spectrum-css/radio": "8.1.6-next.2",
"@spectrum-css/rating": "4.2.5-next.2",
"@spectrum-css/search": "6.2.5-next.2",
"@spectrum-css/sidenav": "4.2.5-next.2",
"@spectrum-css/site": "4.2.5-next.2",
"@spectrum-css/slider": "4.3.6-next.2",
"@spectrum-css/splitview": "4.2.5-next.2",
"@spectrum-css/statuslight": "6.1.7-next.2",
"@spectrum-css/steplist": "4.1.5-next.2",
"@spectrum-css/stepper": "5.1.6-next.2",
"@spectrum-css/swatch": "5.1.6-next.2",
"@spectrum-css/swatchgroup": "2.1.6-next.2",
"@spectrum-css/switch": "4.2.6-next.2",
"@spectrum-css/table": "5.2.6-next.2",
"@spectrum-css/tabs": "4.1.5-next.2",
"@spectrum-css/tag": "8.1.6-next.2",
"@spectrum-css/taggroup": "4.1.6-next.2",
"@spectrum-css/textfield": "6.1.7-next.2",
"@spectrum-css/thumbnail": "5.2.5-next.2",
"@spectrum-css/toast": "9.1.26-next.2",
"@spectrum-css/tooltip": "5.3.6-next.2",
"@spectrum-css/tray": "2.2.8-next.2",
"@spectrum-css/treeview": "9.2.7-next.2",
"@spectrum-css/typography": "5.1.6-next.2",
"@spectrum-css/underlay": "3.2.5-next.2",
"@spectrum-css/well": "4.1.5-next.2",
"@spectrum-css/generator": "3.0.0",
"conventional-changelog-spectrum": "1.0.2",
"postcss-combininator": "2.0.0",
"postcss-custom-properties-mapping": "2.0.0",
"postcss-splitinator": "2.0.0",
"@spectrum-tools/stylelint-no-missing-var": "1.3.1",
"@spectrum-tools/stylelint-no-unknown-custom-properties": "1.3.2",
"@spectrum-tools/stylelint-no-unused-custom-properties": "1.3.1",
"@spectrum-tools/documentation": "1.0.0",
"@spectrum-css/tokens": "14.0.0-next.6",
"@spectrum-css/ui-icons": "1.1.2"
},
"changesets": [
"nine-kings-repair",
"perfect-dogs-smash",
"pretty-parents-drum"
]
}
5 changes: 5 additions & 0 deletions .changeset/pretty-parents-drum.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@spectrum-css/tokens": patch
---

use spectrum-tokens@13.0.0-beta.30
5 changes: 5 additions & 0 deletions .storybook/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,12 @@ This component has been deprecated. Use an action bar to allow users to perform
##7.4.2
🗓
2024-02-06
<a name="7.4.2-next.0"></a>
##7.4.2-next.0
🗓
2024-02-06 • 📝 [Commits](https://github.com/adobe/spectrum-css/compare/@spectrum-css/preview@7.4.1...@spectrum-css/preview@7.4.2-next.0)

**Note:** Spectrum 2 next version
**Note:** Version bump only for package @spectrum-css/preview

<a name="7.4.1"></a>
Expand Down
15 changes: 15 additions & 0 deletions .storybook/assets/base.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,28 @@ body {
}

.spectrum {
/* ---- Storybook only custom properties ---- */
/* Gradient that changes with the color theme. */
--spectrum-examples-gradient: linear-gradient(45deg, var(--spectrum-magenta-1500), var(--spectrum-blue-1500));
/* Gradients that do not change with the color theme, for use in static color backgrounds. */
--spectrum-examples-gradient-static-black: linear-gradient(45deg, rgb(255, 241, 246), rgb(238, 245, 255));
--spectrum-examples-gradient-static-white: linear-gradient(45deg, rgb(64, 0, 22), rgb(14, 24, 67));

background-color: var(--spectrum-background-layer-1-color);

/* @todo: add back the text color and update VRTs */
/* color: var(--spectrum-neutral-content-color-default); */
-webkit-tap-highlight-color: rgba(0, 0, 0, 0%);
}

.spectrum .spectrum-examples-static-black {
background: var(--spectrum-examples-gradient-static-black);
}

.spectrum .spectrum-examples-static-white {
background: var(--spectrum-examples-gradient-static-white)
}

/* Hide the SVG elements that only include references */
svg:has(symbol):not(:has(use)) {
display: none;
Expand Down
25 changes: 17 additions & 8 deletions .storybook/decorators/contextsWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export const withContextWrapper = makeDecorator({
name: "withContextWrapper",
parameterName: "context",
wrapper: (StoryFn, context) => {
const { args, argTypes, viewMode } = context;
const { args, argTypes, id, viewMode } = context;

const getDefaultValue = (type) => {
if (!type) return null;
Expand All @@ -27,11 +27,17 @@ export const withContextWrapper = makeDecorator({
/** @type string */
const scale = args.scale ? args.scale : getDefaultValue(argTypes.scale) ?? "medium";

const colors = ["light", "dark", "darkest"];
const colors = ["light", "dark"];
const scales = ["medium", "large"];

useEffect(() => {
const container = viewMode === "docs" && !window.isChromatic() ? document.querySelector('#root-inner') ?? document.body : document.body;
const container =
viewMode === "docs" &&
!window.isChromatic() &&
!id.includes("foundation")
? document.querySelector("#root-inner") ?? document.body
: document.body;

container.classList.toggle("spectrum", true);

container.classList.toggle("spectrum--express", isExpress);
Expand All @@ -44,12 +50,15 @@ export const withContextWrapper = makeDecorator({
container.classList.toggle(`spectrum--${s}`, s === scale);
}

// Change background color when demonstrating static color options.
if (args.staticColor === "black") {
container.style.backgroundColor = "rgb(181, 209, 211)";
} else if (args.staticColor === "white") {
container.style.backgroundColor = "rgb(15, 121, 125)";
} else {
container.style.removeProperty("background-color");
container.style.background = "var(--spectrum-examples-gradient-static-black)";
}
else if (args.staticColor === "white") {
container.style.background = "var(--spectrum-examples-gradient-static-white)";
}
else {
container.style.removeProperty("background");
}
}, [color, scale, isExpress, args.staticColor]);

Expand Down
1 change: 1 addition & 0 deletions .storybook/decorators/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { makeDecorator, useEffect } from "@storybook/preview-api";
import { html } from "lit";

export { withContextWrapper } from "./contextsWrapper.js";
export { withDownStateDimensionCapture } from "./withDownStateDimensionCapture.js";
export { withTestingPreviewWrapper } from "./withTestingPreviewWrapper.js";

/**
Expand Down
19 changes: 19 additions & 0 deletions .storybook/decorators/withDownStateDimensionCapture.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
export const withDownStateDimensionCapture = (selector) => (Story, context) => {
const captureDownStateDimensions = () => {
const components = document.querySelectorAll(selector);
components.forEach((component) => {
const { width, height } = component.getBoundingClientRect();
component.style.setProperty('--spectrum-downstate-width', `${width}px`);
component.style.setProperty('--spectrum-downstate-height', `${height}px`);
});
};

document.addEventListener("DOMContentLoaded", () => {
// Wait to make sure the story is fully rendered (otherwise width/height can be wrong)
setTimeout(() => {
captureDownStateDimensions();
}, 100);
});

return Story(context);
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
import { html } from "lit";
import { Template } from "../../../components/actionbutton/stories/template";

export default {
title: "Foundations/Corner rounding",
description:
"The action button component represents an action a user can take.",
component: "ActionButton",
args: {
rootClass: "spectrum-ActionButton",
},
parameters: {
actions: {
handles: ["click .spectrum-ActionButton:not([disabled])"],
},
},
tags: ['foundation'],
};

const ActionButton = ({
...args
}) => {
return html`
<div style="padding: 1rem 0;">
${Template({
...args,
iconName: undefined,
})}
</div>
`;
};

const ActionButtonTable = ({ ...args }) => {
return html`
<table class="spectrum-Foundations-Example-CornerRounding-table">
<thead>
<tr>
<th scope="col">Token</th>
<th scope="col" style="padding: 0 2rem;">Value</th>
<th scope="col">Medium example</th>
</tr>
</thead>
<tbody>
<tr>
<td>--spectrum-corner-radius-medium-size-extra-small</td>
<td style="padding: 0 2rem;">6px</td>
<td>
${ActionButton({
...args,
label: "Extra Small",
size: "xs"
})}
</td>
</tr>
<tr>
<td>--spectrum-corner-radius-medium-size-small</td>
<td style="padding: 0 2rem;">7px</td>
<td>
${ActionButton({
...args,
label: "Small",
size: "s"
})}
</td>
</tr>
<tr>
<td>--spectrum-corner-radius-medium-size-medium</td>
<td style="padding: 0 2rem;">8px</td>
<td>
${ActionButton({
...args,
label: "Medium",
size: "m"
})}
</td>
</tr>
<tr>
<td>--spectrum-corner-radius-medium-size-large</td>
<td style="padding: 0 2rem;">9px</td>
<td>
${ActionButton({
...args,
label: "Large",
size: "l"
})}
</td>
</tr>
<tr>
<td>--spectrum-corner-radius-medium-size-extra-large</td>
<td style="padding: 0 2rem;">10px</td>
<td>
${ActionButton({
...args,
label: "Extra Large",
size: "xl"
})}
</td>
</tr>
</tbody>
</table>
`;
};

export const ActionButtonExamples = ActionButtonTable.bind({});
ActionButtonExamples.args = {};
Loading