Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(ui-icons): s2 assets sourced from repo #2642

Closed
wants to merge 42 commits into from
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
e465991
feat(tokens): use 13.0.0-beta.5
pfulton Dec 11, 2023
4ef4710
feat(tokens): use 13.0.0-beta.8
pfulton Jan 8, 2024
ed94f9d
feat(tokens): use 13.0.0-beta.9
pfulton Jan 11, 2024
043d33c
feat(actiongroup)!: migrate to S2 (#2453)
mdt2 Feb 2, 2024
e13442b
feat(buttongroup)!: migrate to S2 (#2457)
jenndiaz Feb 2, 2024
73c835e
feat(tokens)!: use 13.0.0-beta.13
pfulton Feb 2, 2024
e3fe897
chore(release): release
pfulton Feb 6, 2024
0f338e8
feat(tokens)!: use spectrum-tokens 13.0.0-beta.16
pfulton Feb 22, 2024
1cb7c9c
chore(actiongroup,buttongroup): specify s2 tokens for peerdeps
pfulton Feb 26, 2024
fb1ae3a
feat(closebutton)!: migrate to S2 (#2564)
mdt2 Mar 7, 2024
ed610c8
chore: s2 grays component-level migration (#2583)
pfulton Mar 7, 2024
7c76f53
fix(closebutton): use correct casing for class names
pfulton Mar 8, 2024
3cbd193
fix(commons): remove renamed mods marked for deprecation (#2580)
jawinn Mar 8, 2024
03e7a3f
feat(fieldlabel)!: s2 migration (#2569)
jawinn Mar 11, 2024
dc6644a
chore(tokens): use spectrum-tokens v13.0.0-beta.19
pfulton Mar 11, 2024
a417d5d
chore(tokens): manual version bump for 14.0.0-next.1
pfulton Mar 12, 2024
5610a68
chore(release): release
pfulton Mar 12, 2024
07d3f73
feat(downstate): docs + implementation for example components (#2520)
mdt2 Mar 19, 2024
d38df73
fix(button): resolve merge issue
pfulton Mar 19, 2024
75c8ec8
feat(tokens): use spectrum-tokens 13.0.0-beta.21 (#2597)
pfulton Mar 19, 2024
c44051e
chore(release): release
pfulton Mar 21, 2024
9327c42
chore: rebase against main and update components to use prerelease to…
pfulton Mar 28, 2024
e75d1f9
feat(cornerrounding): add custom token and foundations documentation …
jenndiaz Mar 28, 2024
baace32
fix(storybook): body classes for story and docs pages (#2617)
mdt2 Apr 1, 2024
c18ca80
docs: update migration guide headings (#2638)
jawinn Apr 4, 2024
0fe54f4
feat(opacitycheckerboard): S2, small t-shirt size squares (#2610)
mdt2 Apr 8, 2024
9530e01
feat(tokens): use spectrum-tokens at v13.0.0-beta.24 (#2650)
mdt2 Apr 9, 2024
1398dd0
chore(tokens): manual version bump for prerelease
pfulton Apr 9, 2024
975e0bc
feat: add example gradients for static black and white (#2637)
jawinn Apr 11, 2024
7ad5df6
chore(tokens): use spectrum-tokens@13.0.0-beta.27
pfulton Apr 12, 2024
48f6b2f
chore(release): release
pfulton Apr 12, 2024
16dc834
feat(switch): s2 migration (#2651)
mdt2 Apr 15, 2024
8db2fae
chore: prerelease mode for changesets
pfulton Apr 19, 2024
7aff2e6
chore(tokens): use @adobe/spectrum-tokens@13.0.0-beta.30 (#2678)
pfulton Apr 19, 2024
d64d450
chore: remove darkest as SB option (#2679)
pfulton Apr 19, 2024
44e2291
chore: release (next) (#2680)
github-actions[bot] Apr 19, 2024
5f53aa9
chore: run branch through format; update pathing and fix errors (#2700)
castastrophe Apr 26, 2024
2b6c140
chore: release (next) (#2706)
github-actions[bot] Apr 26, 2024
ae7aedd
chore: fix linting conflict vs. format
castastrophe Apr 26, 2024
6a98ebd
feat(downstate): docs + implementation for example components (#2520)
mdt2 Mar 19, 2024
d7671a6
feat: add example gradients for static black and white (#2637)
jawinn Apr 11, 2024
50f09e4
refactor(ui-icons): s2 migration of assets
castastrophe Apr 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .changeset/perfect-dogs-smash.md
@@ -0,0 +1,5 @@
---
"@spectrum-css/button": patch
---

chore: run branch through formatter
106 changes: 106 additions & 0 deletions .changeset/pre.json
@@ -0,0 +1,106 @@
{
"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": [
"perfect-dogs-smash",
"pretty-parents-drum"
]
}
5 changes: 5 additions & 0 deletions .changeset/pretty-parents-drum.md
@@ -0,0 +1,5 @@
---
"@spectrum-css/tokens": patch
---

use spectrum-tokens@13.0.0-beta.30
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,12 +1,13 @@
dist
dist-site

!tokens/dist
!ui-icons/dist

# Recommended update re:https://docs.netlify.com/integrations/frameworks/eleventy/
**/node_modules/**

temp
.npmrc*
.nx
.env
.tmp
Expand Down
3 changes: 3 additions & 0 deletions .npmrc
@@ -0,0 +1,3 @@
@a4u:registry=https://artifactory.corp.adobe.com/artifactory/api/npm/npm-a4u-release/
//artifactory.corp.adobe.com/artifactory/api/npm/npm-a4u-release/:always-auth=true
access=public
5 changes: 5 additions & 0 deletions .storybook/CHANGELOG.md
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
7 changes: 7 additions & 0 deletions .storybook/assets/base.css
Expand Up @@ -22,6 +22,13 @@ 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 */
Expand Down
25 changes: 17 additions & 8 deletions .storybook/decorators/contextsWrapper.js
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
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
@@ -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);
};
@@ -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 = {};