Skip to content

Commit ac05392

Browse files
castastrophejawinnpfulton
authored andcommitted
chore: run branch through format; update pathing and fix errors (#2700)
* feat(fieldlabel)!: s2 migration (#2569) BREAKING CHANGE: uses Spectrum 2 tokens Also: * feat(fieldlabel): medium as default and 100 sizing tokens - Use the correct "100" sized tokens for medium. - Make medium styles the default, to conform with existing pattern. .spectrum-FieldLabel--sizeM class removed as it is no longer necessary. * feat(fieldlabel): use correct font size tokens The font-size tokens used for large and extra large needed to be shifted up to match the s2 spec. * refactor(fieldlabel): remove deprecated mods Remove renamed mods marked as deprecated for S2 release. * docs(fieldlabel): spectrum 2 noted in migration notes Updates some docs and adds migration notes. Clarifies some docs around "left" and "right", and fixes duplicate ID warnings from examples code. * docs(fieldlabel): form - docs update and regenerate mods Add migration guide section to "Form", that currently lives within the Field label component. Regenerates mods to include the removal of deprecated renamed mods. * fix(fieldlabel): rename mod property referencing global token A mod custom property was referencing a global token instead of the component itself. Renames this and adds a note to the migration guide. * feat(fieldlabel): use correct sizing tokens Use correct tokens for some large and extra large custom properties, to matching with design. * style(fieldlabel): applying linter formatting adjustments Run linter fix on the fieldlabel component, which rearranges a few declarations. * docs(fieldlabel): document asterisk icon size Add documentation about asterisk UI icon sizes specified on the design. These sizes are already handled in the Storybook template, but were not really explained to the user. * feat(fieldlabel): black and white static color variants Add classes for static colors, as defined on the designs. And adds examples of these variants to the documentation. * build(fieldlabel): specify s2 tokens release for dependency Use Spectrum 2 version of tokens package in dependencies list. * chore: rebase against main and update components to use prerelease tokens * chore: run branch through format; update pathing and fix errors * chore: add changeset for css update --------- Co-authored-by: Josh Winn <965114+jawinn@users.noreply.github.com> Co-authored-by: Patrick Fulton <pfulton@adobe.com>
1 parent 9e6bc5c commit ac05392

File tree

8 files changed

+49
-22
lines changed

8 files changed

+49
-22
lines changed

components/button/stories/button.stories.js

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
11
<<<<<<< HEAD
2+
<<<<<<< HEAD
3+
=======
24
=======
5+
import { withDownStateDimensionCapture } from "@spectrum-css/preview/decorators";
6+
7+
>>>>>>> 8e36ef037 (chore: run branch through format; update pathing and fix errors (#2700))
38
import { html } from "lit";
49
import { styleMap } from "lit/directives/style-map.js";
5-
import { when } from "lit/directives/when.js";
6-
import { withDownStateDimensionCapture } from "../../../.storybook/decorators";
710

811
>>>>>>> 8e9945253 (feat(downstate): docs + implementation for example components (#2520))
912
import { default as IconStories } from "@spectrum-css/icon/stories/icon.stories.js";
@@ -21,7 +24,6 @@ import { ButtonsWithIconOptions, TextOverflowTemplate, TextWrapTemplate, Treatme
2124
export default {
2225
title: "Button",
2326
component: "Button",
24-
decorators: [withDownStateDimensionCapture('.spectrum-Button:not(:disabled)')],
2527
argTypes: {
2628
size: size(["s", "m", "l", "xl"]),
2729
label: {
@@ -108,7 +110,34 @@ export default {
108110
metadata,
109111
},
110112
decorators: [
113+
<<<<<<< HEAD
111114
withDownStateDimensionCapture,
115+
=======
116+
withDownStateDimensionCapture(".spectrum-Button:not(:disabled)"),
117+
(Story, context) => html`
118+
<style>
119+
.spectrum-Detail { display: inline-block; }
120+
.spectrum-Typography > div {
121+
border: 1px solid var(--spectrum-gray-200);
122+
border-radius: 4px;
123+
padding: 0 10px 10px;
124+
/* Why seafoam? Because it separates it from the component styles. */
125+
--mod-detail-font-color: var(--spectrum-seafoam-900);
126+
}
127+
</style>
128+
<div
129+
style=${styleMap({
130+
display: "flex",
131+
flexDirection: "column",
132+
alignItems: "flex-start",
133+
gap: "10px",
134+
"--mod-detail-margin-end": "6px",
135+
})}
136+
>
137+
${Story(context)}
138+
</div>
139+
`,
140+
>>>>>>> 8e36ef037 (chore: run branch through format; update pathing and fix errors (#2700))
112141
],
113142
tags: ["!autodocs", "migrated"],
114143
};

components/checkbox/package.json

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,6 @@
4545
"design system",
4646
"adobe"
4747
],
48-
"peerDependencies": {
49-
"@spectrum-css/icon": ">=7",
50-
"@spectrum-css/tokens": ">=14.0.0-next.3"
51-
},
5248
"publishConfig": {
5349
"access": "public"
5450
},

components/dial/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@
4343
"design system",
4444
"adobe"
4545
],
46-
"peerDependencies": {
47-
"@spectrum-css/tokens": ">=14.0.0-next.3"
48-
},
4946
"publishConfig": {
5047
"access": "public"
5148
},

components/divider/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@
4343
"design system",
4444
"adobe"
4545
],
46-
"peerDependencies": {
47-
"@spectrum-css/tokens": ">=14.0.0-next.3"
48-
},
4946
"publishConfig": {
5047
"access": "public"
5148
},

components/fieldlabel/stories/template.js

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,18 @@ export const Template = ({
6464
${when(isRequired, () => icon)}
6565
</label>
6666
`;
67+
68+
// When using the static color variants, wrap the label in an example element with a background color.
69+
return !staticColor
70+
? labelMarkup
71+
: html`
72+
<div
73+
style=${styleMap({
74+
padding: "1rem",
75+
backgroundColor: staticColor === "white" ? "rgb(15, 121, 125)" : staticColor === "black" ? "rgb(181, 209, 211)" : undefined,
76+
})}
77+
</div>
78+
${labelMarkup}
79+
</div>
80+
`;
6781
};

components/opacitycheckerboard/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@
4343
"design system",
4444
"adobe"
4545
],
46-
"peerDependencies": {
47-
"@spectrum-css/tokens": ">=14.0.0-next.3"
48-
},
4946
"publishConfig": {
5047
"access": "public"
5148
},

components/page/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@
2121
"stories/template.js",
2222
"metadata/mods.md"
2323
],
24+
"peerDependencies": {
25+
"@spectrum-css/tokens": ">=14.0.0-next.3"
26+
},
2427
"keywords": [
2528
"spectrum",
2629
"css",
2730
"design system",
2831
"adobe"
2932
],
30-
"peerDependencies": {
31-
"@spectrum-css/tokens": ">=14.0.0-next.3"
32-
},
3333
"publishConfig": {
3434
"access": "public"
3535
}

components/progresscircle/package.json

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,6 @@
4343
"design system",
4444
"adobe"
4545
],
46-
"peerDependencies": {
47-
"@spectrum-css/tokens": ">=14.0.0-next.3"
48-
},
4946
"publishConfig": {
5047
"access": "public"
5148
},

0 commit comments

Comments
 (0)