@codecademy/styleguide 79.2.3-alpha.03730f.0 → 79.2.3-alpha.36b8c2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.ts +6 -8
- package/.storybook/preview.ts +4 -21
- package/CHANGELOG.md +5 -2
- package/package.json +2 -2
- package/project.json +2 -1
- package/src/lib/Organisms/ConnectedForm/ConnectedForm/ConnectedForm.stories.tsx +1 -1
- package/src/lib/Organisms/ConnectedForm/ConnectedFormGroup/ConnectedFormGroup.stories.tsx +1 -1
- package/src/lib/Organisms/ConnectedForm/SubmitButton/SubmitButton.stories.tsx +1 -1
- package/src/lib/Organisms/GridForm/Buttons.stories.tsx +1 -1
- package/src/lib/Organisms/GridForm/Fields.stories.tsx +1 -1
- package/src/lib/Organisms/GridForm/Layout.stories.tsx +1 -1
- package/src/lib/Organisms/GridForm/States.stories.tsx +1 -1
- package/src/lib/Organisms/GridForm/Usage.stories.tsx +1 -1
package/.storybook/main.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// This file has been automatically migrated to valid ESM format by Storybook.
|
|
2
|
-
import { fileURLToPath } from
|
|
3
|
-
import { createRequire } from
|
|
2
|
+
import { fileURLToPath } from 'node:url';
|
|
3
|
+
import { createRequire } from 'node:module';
|
|
4
4
|
import type { StorybookConfig } from '@storybook/react-webpack5';
|
|
5
5
|
import { resolve, dirname, join } from 'node:path';
|
|
6
6
|
|
|
@@ -9,9 +9,6 @@ const __dirname = dirname(__filename);
|
|
|
9
9
|
const require = createRequire(import.meta.url);
|
|
10
10
|
|
|
11
11
|
const config: StorybookConfig = {
|
|
12
|
-
features: {
|
|
13
|
-
developmentModeForBuild: true,
|
|
14
|
-
},
|
|
15
12
|
stories: [
|
|
16
13
|
'../src/lib/**/*.@(mdx)',
|
|
17
14
|
'../src/lib/**/*.stories.@(js|jsx|ts|tsx|mdx)',
|
|
@@ -19,7 +16,10 @@ const config: StorybookConfig = {
|
|
|
19
16
|
staticDirs: ['../src/static'],
|
|
20
17
|
addons: [
|
|
21
18
|
getAbsolutePath('@storybook/addon-webpack5-compiler-babel'),
|
|
22
|
-
|
|
19
|
+
// the @nx/react storybook plugin is just a subdirectory of the @nx/react package
|
|
20
|
+
// so getting the absolute path of the package.json won't work. they do expose
|
|
21
|
+
// a require export though, so we can just use that directly
|
|
22
|
+
require.resolve('@nx/react/plugins/storybook'),
|
|
23
23
|
getAbsolutePath('@storybook/addon-links'),
|
|
24
24
|
getAbsolutePath('@storybook/addon-docs'),
|
|
25
25
|
getAbsolutePath('@storybook/addon-a11y'),
|
|
@@ -69,8 +69,6 @@ const config: StorybookConfig = {
|
|
|
69
69
|
__dirname,
|
|
70
70
|
'../../gamut-illustrations/src'
|
|
71
71
|
),
|
|
72
|
-
// Dist bundles use Rolldown `require("react")` shims that break under Storybook's
|
|
73
|
-
// webpack iframe build; source resolves through normal ESM imports.
|
|
74
72
|
'@codecademy/gamut-icons$': resolve(__dirname, '../../gamut-icons/src'),
|
|
75
73
|
'@codecademy/gamut-patterns$': resolve(
|
|
76
74
|
__dirname,
|
package/.storybook/preview.ts
CHANGED
|
@@ -30,7 +30,7 @@ const preview: Preview = {
|
|
|
30
30
|
test: 'todo',
|
|
31
31
|
},
|
|
32
32
|
backgrounds: {
|
|
33
|
-
|
|
33
|
+
disable: true,
|
|
34
34
|
},
|
|
35
35
|
deepControls: { enabled: true },
|
|
36
36
|
docs: {
|
|
@@ -89,16 +89,6 @@ const preview: Preview = {
|
|
|
89
89
|
},
|
|
90
90
|
viewport: {
|
|
91
91
|
options: {
|
|
92
|
-
responsive: {
|
|
93
|
-
name: 'Responsive',
|
|
94
|
-
type: 'desktop',
|
|
95
|
-
// Storybook 10 requires `styles` on every viewport; missing it breaks the
|
|
96
|
-
// iframe wrapper (e.g. "can't access property 'width', … is undefined").
|
|
97
|
-
styles: {
|
|
98
|
-
width: '100%',
|
|
99
|
-
height: '100%',
|
|
100
|
-
},
|
|
101
|
-
},
|
|
102
92
|
xs: {
|
|
103
93
|
name: `XS - ${breakpoints.xs}`,
|
|
104
94
|
styles: {
|
|
@@ -139,16 +129,9 @@ const preview: Preview = {
|
|
|
139
129
|
},
|
|
140
130
|
type: 'desktop',
|
|
141
131
|
},
|
|
142
|
-
}
|
|
132
|
+
},
|
|
143
133
|
},
|
|
144
134
|
},
|
|
145
|
-
|
|
146
|
-
initialGlobals: {
|
|
147
|
-
viewport: {
|
|
148
|
-
value: 'responsive',
|
|
149
|
-
isRotated: false
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
135
|
};
|
|
153
136
|
|
|
154
137
|
export const globalTypes = {
|
|
@@ -160,8 +143,8 @@ export const globalTypes = {
|
|
|
160
143
|
icon: 'circlehollow',
|
|
161
144
|
// Array of plain string values or MenuItem shape (see below)
|
|
162
145
|
items: [
|
|
163
|
-
{ value: 'light', icon: 'circlehollow', title: '
|
|
164
|
-
{ value: 'dark', icon: 'circle', title: '
|
|
146
|
+
{ value: 'light', icon: 'circlehollow', title: 'Light' },
|
|
147
|
+
{ value: 'dark', icon: 'circle', title: 'Dark' },
|
|
165
148
|
],
|
|
166
149
|
// Property that specifies if the name of the item will be displayed
|
|
167
150
|
showName: true,
|
package/CHANGELOG.md
CHANGED
|
@@ -3,9 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
-
### [79.2.3-alpha.
|
|
6
|
+
### [79.2.3-alpha.36b8c2.0](https://github.com/Codecademy/gamut/compare/@codecademy/styleguide@79.2.2...@codecademy/styleguide@79.2.3-alpha.36b8c2.0) (2026-03-20)
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- consistent title casing ([de25bb3](https://github.com/Codecademy/gamut/commit/de25bb3700607314c18b7487e4dec39aafa8922b))
|
|
11
|
+
- remove responsive viewport option ([27378f9](https://github.com/Codecademy/gamut/commit/27378f9105f184e3f79705b018c08d88ac26d9ac))
|
|
9
12
|
|
|
10
13
|
### [79.2.2](https://github.com/Codecademy/gamut/compare/@codecademy/styleguide@79.2.1...@codecademy/styleguide@79.2.2) (2026-03-19)
|
|
11
14
|
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codecademy/styleguide",
|
|
3
3
|
"description": "Styleguide & Component library for codecademy.com",
|
|
4
|
-
"version": "79.2.3-alpha.
|
|
4
|
+
"version": "79.2.3-alpha.36b8c2.0",
|
|
5
5
|
"author": "Codecademy Engineering",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"publishConfig": {
|
|
8
8
|
"access": "public"
|
|
9
9
|
},
|
|
10
10
|
"repository": "git@github.com:Codecademy/gamut.git",
|
|
11
|
-
"gitHead": "
|
|
11
|
+
"gitHead": "a556865605c54b47668a9e65dd8a14f97f447e41"
|
|
12
12
|
}
|
package/project.json
CHANGED
|
@@ -33,11 +33,12 @@
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
},
|
|
36
|
-
"test": {
|
|
36
|
+
"storybook-test": {
|
|
37
37
|
"executor": "nx:run-commands",
|
|
38
38
|
"dependsOn": ["build-storybook"],
|
|
39
39
|
"options": {
|
|
40
40
|
"cwd": "{workspaceRoot}",
|
|
41
|
+
"forwardAllArgs": false,
|
|
41
42
|
"command": "start-server-and-test \"http-server dist/storybook/styleguide -p 6007 --silent\" http://127.0.0.1:6007 \"test-storybook --url http://127.0.0.1:6007 --config-dir packages/styleguide/.storybook\""
|
|
42
43
|
}
|
|
43
44
|
}
|
|
@@ -12,9 +12,9 @@ import {
|
|
|
12
12
|
useConnectedForm,
|
|
13
13
|
} from '@codecademy/gamut';
|
|
14
14
|
import { MiniArrowRightIcon, TerminalIcon } from '@codecademy/gamut-icons';
|
|
15
|
-
import { action } from 'storybook/actions';
|
|
16
15
|
import type { Meta } from '@storybook/react';
|
|
17
16
|
import { useState } from 'react';
|
|
17
|
+
import { action } from 'storybook/actions';
|
|
18
18
|
|
|
19
19
|
const meta: Meta<typeof ConnectedForm> = {
|
|
20
20
|
component: ConnectedForm,
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
Text,
|
|
8
8
|
useConnectedForm,
|
|
9
9
|
} from '@codecademy/gamut';
|
|
10
|
-
import { action } from 'storybook/actions';
|
|
11
10
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
11
|
+
import { action } from 'storybook/actions';
|
|
12
12
|
import type { TypeWithDeepControls } from 'storybook-addon-deep-controls';
|
|
13
13
|
|
|
14
14
|
import { infotipNestedArgTypes } from '~styleguide/argTypes';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ConnectedForm, FlexBox, SubmitButton, Text } from '@codecademy/gamut';
|
|
2
|
-
import { action } from 'storybook/actions';
|
|
3
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { action } from 'storybook/actions';
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof SubmitButton> = {
|
|
6
6
|
component: SubmitButton,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FormGroup, GridForm, Input, Text } from '@codecademy/gamut';
|
|
2
|
-
import { action } from 'storybook/actions';
|
|
3
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { action } from 'storybook/actions';
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof GridForm> = {
|
|
6
6
|
component: GridForm,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GridForm, Markdown } from '@codecademy/gamut';
|
|
2
|
-
import { action } from 'storybook/actions';
|
|
3
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { action } from 'storybook/actions';
|
|
4
4
|
|
|
5
5
|
const meta: Meta<typeof GridForm> = {
|
|
6
6
|
component: GridForm,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { GridForm } from '@codecademy/gamut';
|
|
2
|
-
import { action } from 'storybook/actions';
|
|
3
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
4
3
|
import { useState } from 'react';
|
|
4
|
+
import { action } from 'storybook/actions';
|
|
5
5
|
|
|
6
6
|
const meta: Meta<typeof GridForm> = {
|
|
7
7
|
component: GridForm,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { GridForm } from '@codecademy/gamut';
|
|
2
|
-
import { action } from 'storybook/actions';
|
|
3
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
|
+
import { action } from 'storybook/actions';
|
|
4
4
|
import type { TypeWithDeepControls } from 'storybook-addon-deep-controls';
|
|
5
5
|
|
|
6
6
|
const meta: TypeWithDeepControls<Meta<typeof GridForm>> = {
|