Skip to content

Commit dfa17dc

Browse files
castastrophearamos-adobe
authored andcommitted
build: align tooling with s2-foundations branch
1 parent 38a149a commit dfa17dc

File tree

49 files changed

+13151
-2427
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+13151
-2427
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
- spectrum-two
8+
- s2-foundations-redux
89

910
concurrency: ${{ github.workflow }}-${{ github.ref }}
1011

.storybook/blocks/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,4 @@ export * from "./PropertiesTable.jsx";
1818
export * from "./Swatches.jsx";
1919
export * from "./ThemeContainer.jsx";
2020
export * from "./Typography.jsx";
21+

.storybook/foundations/corner-rounding/template.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { html } from "lit";
22
import { classMap } from "lit/directives/class-map.js";
3-
43
import "./index.css";
54

65
const getSizeModifier = (size) => {

.storybook/foundations/drop-shadow/drop-shadow.stories.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ export default {
77
description:
88
"Drop shadows draw attention and give the appearance of depth. By default, this style is used to show elevation, when content appears on top of other content.",
99
component: "Drop shadow",
10+
<<<<<<< HEAD
1011
tags: ["!dev"],
12+
=======
13+
tags: ["foundation"],
14+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
1115
};
1216

1317
const DropShadowSwatch = ({
@@ -19,9 +23,15 @@ const DropShadowSwatch = ({
1923
class=${classMap({
2024
[rootClass]: true,
2125
[`${rootClass}--${variant}-drop-shadow`]:
26+
<<<<<<< HEAD
2227
typeof variant !== "undefined" && !!isDropShadow,
2328
[`${rootClass}--${variant}-box-shadow`]:
2429
typeof variant !== "undefined" && !isDropShadow,
30+
=======
31+
typeof variant !== undefined && !!isDropShadow,
32+
[`${rootClass}--${variant}-box-shadow`]:
33+
typeof variant !== undefined && !isDropShadow,
34+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
2535
})}
2636
></div>
2737
`;

.storybook/main.js

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ import remarkGfm from 'remark-gfm';
44

55
// Get a list of all the folders in the components directory
66
const componentDir = path.resolve(__dirname, "../components");
7+
<<<<<<< HEAD
78
const components = fs.readdirSync(componentDir, { withFileTypes: true })
9+
=======
10+
const components = fs.readdirSync("../components", { withFileTypes: true })
11+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
812
.filter(dirent => dirent.isDirectory() && fs.existsSync(path.resolve(componentDir, dirent.name, "package.json")))
913
.map(dirent => dirent.name);
1014

@@ -22,7 +26,11 @@ export default {
2226
},
2327
{
2428
directory: "./foundations",
29+
<<<<<<< HEAD
2530
files: "*/*.@(stories.js|mdx)",
31+
=======
32+
files: "**/*.@(stories.js|mdx)",
33+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
2634
titlePrefix: "Foundations",
2735
},
2836
{
@@ -53,6 +61,20 @@ export default {
5361
{
5462
name: "@storybook/addon-docs",
5563
options: {
64+
<<<<<<< HEAD
65+
=======
66+
// Don't need viewports b/c the medium/large contexts are used to support scaling.
67+
viewport: false,
68+
// Don't need backgrounds b/c this is handled by the color contexts.
69+
backgrounds: false,
70+
// Configure separately
71+
docs: false,
72+
},
73+
},
74+
{
75+
name: "@storybook/addon-docs",
76+
options: {
77+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
5678
// Enables JSX support in MDX for projects that aren't configured to handle the format.
5779
configureJSX: true,
5880
// Support markdown in MDX files
@@ -91,6 +113,7 @@ export default {
91113

92114
return mergeConfig(config, {
93115
publicDir: "./assets",
116+
<<<<<<< HEAD
94117
// Add dependencies to pre-optimization
95118
optimizeDeps: {
96119
include: [
@@ -100,6 +123,8 @@ export default {
100123
"@storybook/components",
101124
],
102125
},
126+
=======
127+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
103128
build: {
104129
sourcemap: configType === "DEVELOPMENT",
105130
manifest: true,
@@ -113,6 +138,7 @@ export default {
113138
}
114139
});
115140
},
141+
<<<<<<< HEAD
116142
build: {
117143
test: {
118144
disabledAddons: [
@@ -131,13 +157,23 @@ export default {
131157
reactDocgen: 'react-docgen',
132158
// Not using typescript so disable the check
133159
check: false,
160+
=======
161+
framework: {
162+
name: "@storybook/web-components-vite",
163+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
134164
},
135165
features: {
136166
/* Code splitting flag; load stories on-demand */
137167
storyStoreV7: true,
138168
/* Builds stories.json to help with on-demand loading */
139169
buildStoriesJson: true,
140170
},
171+
<<<<<<< HEAD
172+
=======
173+
docs: {
174+
defaultName: "Docs",
175+
},
176+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
141177
refs: {
142178
"web-components": {
143179
title: "Spectrum web components",

.storybook/manager.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<<<<<<< HEAD
12

23
import { addons } from "@storybook/manager-api";
34
import { create } from "@storybook/theming";
@@ -11,6 +12,15 @@ import pkg from "./package.json";
1112

1213
import "./assets/index.css";
1314

15+
=======
16+
import "@spectrum-css/tokens/dist/index.css";
17+
import { addons } from "@storybook/manager-api";
18+
import { create } from "@storybook/theming";
19+
import "./assets/index.css";
20+
import logo from "./assets/logo.svg";
21+
import pkg from "./package.json";
22+
23+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
1424
const root = document.body ?? document.documentElement;
1525
if (root) root.classList.add("spectrum", "spectrum--light", "spectrum--medium");
1626

@@ -69,6 +79,12 @@ addons.setConfig({
6979
}),
7080
sidebar: {
7181
showRoots: false,
82+
<<<<<<< HEAD
7283
renderLabel: ({ name, type }) => (type === 'story' ? name : startCase(name)) + " 📚",
84+
=======
85+
filters: {
86+
patterns: (item) => !item.id.includes('forced-colors') && ['is-hidden-story'].every((tag) => !item.tags.includes(tag)),
87+
},
88+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
7389
},
7490
});

.storybook/package.json

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,18 @@
11
{
22
"name": "@spectrum-css/preview",
3+
<<<<<<< HEAD
34
"version": "11.0.1-next.1",
45
"description": "A Spectrum CSS preview",
56
"license": "Apache-2.0",
67
"author": "Adobe",
78
"homepage": "https://opensource.adobe.com/spectrum-css/",
9+
=======
10+
"version": "11.0.0",
11+
"description": "A Spectrum CSS preview",
12+
"license": "Apache-2.0",
13+
"author": "Adobe",
14+
"homepage": "https://opensource.adobe.com/spectrum-css/preview",
15+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
816
"type": "module",
917
"exports": {
1018
".": "./preview.js",
@@ -25,6 +33,7 @@
2533
},
2634
"module": "main.js",
2735
"scripts": {
36+
<<<<<<< HEAD
2837
"build": "cross-env NODE_ENV=development storybook build --stats-json --config-dir ."
2938
},
3039
"dependencies": {
@@ -60,12 +69,59 @@
6069
"npm-registry-fetch": "^18.0.2",
6170
"postcss": "^8.5.0",
6271
"prettier": "^3.4.2",
72+
=======
73+
"build": "cross-env NODE_ENV=development storybook build --config-dir . --output-dir ./storybook-static"
74+
},
75+
"dependencies": {
76+
"@adobe/spectrum-css-workflow-icons": "^1.5.4",
77+
"@adobe/spectrum-tokens": "13.0.0-beta.52",
78+
"@spectrum-css/actionbutton": "workspace:^",
79+
"@spectrum-css/button": "workspace:^",
80+
"@spectrum-css/table": "workspace:^",
81+
"@spectrum-css/tokens": "workspace:^",
82+
"@spectrum-css/tokens-legacy": "npm:@spectrum-css/tokens@^14.6.0",
83+
"@spectrum-css/typography": "workspace:^",
84+
"@spectrum-css/ui-icons": "workspace:^",
85+
"@spectrum-css/underlay": "workspace:^"
86+
},
87+
"devDependencies": {
88+
"@babel/core": "^7.26.0",
89+
"@chromaui/addon-visual-tests": "^1.0.0",
90+
"@etchteam/storybook-addon-status": "^5.0.0",
91+
"@storybook/addon-a11y": "^8.4.6",
92+
"@storybook/addon-actions": "^8.4.6",
93+
"@storybook/addon-console": "^3.0.0",
94+
"@storybook/addon-designs": "^8.0.4",
95+
"@storybook/addon-docs": "^8.4.6",
96+
"@storybook/addon-essentials": "^8.4.6",
97+
"@storybook/addon-interactions": "^8.4.6",
98+
"@storybook/blocks": "^8.4.6",
99+
"@storybook/builder-vite": "^8.4.6",
100+
"@storybook/components": "^8.4.6",
101+
"@storybook/core-events": "^8.4.6",
102+
"@storybook/manager-api": "^8.4.6",
103+
"@storybook/preview-api": "^8.4.6",
104+
"@storybook/testing-library": "^0.2.2",
105+
"@storybook/theming": "^8.4.6",
106+
"@storybook/web-components-vite": "^8.4.6",
107+
"@whitespace/storybook-addon-html": "^6.1.1",
108+
"chromatic": "^11.18.1",
109+
"lit": "^3.2.1",
110+
"lodash-es": "^4.17.21",
111+
"npm-registry-fetch": "^18.0.2",
112+
"postcss": "^8.4.49",
113+
"prettier": "^3.2.5",
114+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
63115
"react": "^18.3.1",
64116
"react-dom": "^18.3.1",
65117
"react-syntax-highlighter": "^15.6.1",
66118
"remark-gfm": "^4.0.0",
67119
"rollup-plugin-postcss-lit": "^2.1.0",
120+
<<<<<<< HEAD
68121
"storybook": "^8.4.7",
122+
=======
123+
"storybook": "^8.4.6",
124+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
69125
"vite": "^5.4.11"
70126
},
71127
"keywords": [

.storybook/preview.js

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
<<<<<<< HEAD
12

3+
=======
4+
import { setConsoleOptions } from "@storybook/addon-console";
5+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
26
import {
37
withActions,
48
withArgEvents,
@@ -7,6 +11,7 @@ import {
711
withLanguageWrapper,
812
withReducedMotionWrapper,
913
withTestingPreviewWrapper,
14+
<<<<<<< HEAD
1015
withTextDirectionWrapper,
1116
} from "./decorators";
1217
import { FontLoader, IconLoader } from "./loaders";
@@ -19,6 +24,35 @@ import "@spectrum-css/bundle";
1924

2025
// Import the custom base styles
2126
import "./assets/base.css";
27+
=======
28+
withTextDirectionWrapper
29+
} from "./decorators";
30+
import {
31+
FontLoader,
32+
IconLoader,
33+
} from "./loaders";
34+
import modes from "./modes";
35+
import DocumentationTemplate from "./templates/DocumentationTemplate.mdx";
36+
import {
37+
argTypes,
38+
globalTypes
39+
} from "./types";
40+
41+
import "./assets/base.css";
42+
43+
window.global = window;
44+
45+
const panelExclude = setConsoleOptions({}).panelExclude || [];
46+
setConsoleOptions({
47+
panelExclude: [
48+
...panelExclude,
49+
/deprecated/,
50+
/TypeError/,
51+
/postcss/,
52+
/stylelint/,
53+
],
54+
});
55+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
2256

2357
/** @type import('@storybook/types').StorybookParameters & import('@storybook/types').API_Layout */
2458
export const parameters = {
@@ -58,7 +92,11 @@ export const parameters = {
5892
sort: "requiredFirst",
5993
},
6094
html: {
95+
<<<<<<< HEAD
6196
root: "[data-html-preview]:first-of-type > *",
97+
=======
98+
root: "[data-html-preview]:first-of-type",
99+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
62100
removeComments: true,
63101
prettier: {
64102
tabWidth: 2,
@@ -71,7 +109,10 @@ export const parameters = {
71109
},
72110
},
73111
docs: {
112+
<<<<<<< HEAD
74113
defaultName: "Docs",
114+
=======
115+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
75116
page: DocumentationTemplate,
76117
story: { inline: true },
77118
source: {
@@ -88,12 +129,21 @@ export const parameters = {
88129
color: "#fff",
89130
description: "Should not be used and will not receive updates.",
90131
},
132+
deprecated: {
133+
background: "rgb(211,21,16)",
134+
color: "#fff",
135+
description: "Should not be used and will not receive updates.",
136+
},
91137
},
92138
},
93139
// Set an empty object to avoid the "undefined" value in the ComponentDetails doc block
94140
packageJson: {},
95141
// A list of published npm tags that should not appear in the ComponentDetails doc block
142+
<<<<<<< HEAD
96143
ignoredTags: ["beta"],
144+
=======
145+
ignoredTags: ["beta", "next"],
146+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
97147
};
98148

99149
export default {
@@ -115,6 +165,13 @@ export default {
115165
withActions,
116166
withIconSpriteSheet,
117167
],
168+
<<<<<<< HEAD
118169
loaders: [FontLoader, IconLoader],
170+
=======
171+
loaders: [
172+
FontLoader,
173+
IconLoader,
174+
],
175+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
119176
tags: ["autodocs", "dev"],
120177
};

components/buttongroup/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,18 @@
1717
".": "./dist/index.css",
1818
"./*.md": "./*.md",
1919
"./dist/*": "./dist/*",
20+
<<<<<<< HEAD
2021
"./index.css": "./dist/index.css",
2122
"./metadata.json": "./dist/metadata.json",
2223
"./package.json": "./package.json",
2324
"./stories/*": "./stories/*"
25+
=======
26+
"./index-*.css": "./dist/index-*.css",
27+
"./index.css": "./dist/index.css",
28+
"./metadata.json": "./metadata/metadata.json",
29+
"./metadata/*": "./metadata/*",
30+
"./package.json": "./package.json"
31+
>>>>>>> 24419a94f (build: align tooling with s2-foundations branch)
2432
},
2533
"main": "dist/index.css",
2634
"files": [

0 commit comments

Comments
 (0)