Skip to content

Commit 847baa9

Browse files
authored
chore: update component version metadata (#2114)
1 parent 6d4a3f4 commit 847baa9

Some content is hidden

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

46 files changed

+81
-83
lines changed

.storybook/preview.tsx

+17-19
Original file line numberDiff line numberDiff line change
@@ -25,35 +25,35 @@ export const decorators = [
2525
),
2626
];
2727

28-
function createInitialReleaseConfig(usingLabel: string) {
28+
function createComponentVersion(usingLabel: string) {
2929
return {
30-
[`intro-${usingLabel}`]: {
30+
[`api-${usingLabel}`]: {
3131
styles: {
3232
backgroundColor: '#ffffff',
3333
borderColor: '#000000',
3434
color: '#000000',
3535
},
36-
title: `Introduced: ${usingLabel}`,
36+
title: `Component API Version: ${usingLabel}`,
3737
tooltip: {
38-
title: `Introduced in v${usingLabel}`,
39-
desc: `This component was introduced in EDS Design version ${usingLabel}`,
38+
title: `Code / API v${usingLabel}`,
39+
desc: `This component's API version is at ${usingLabel}`,
4040
},
4141
},
4242
};
4343
}
4444

45-
function createCurrentReleaseConfig(usingLabel: string) {
45+
function createThemeVersion(usingLabel: string) {
4646
return {
47-
[`current-${usingLabel}`]: {
47+
[`theme-${usingLabel}`]: {
4848
styles: {
4949
backgroundColor: '#ffffff',
5050
borderColor: '#000000',
5151
color: '#000000',
5252
},
53-
title: `Current: ${usingLabel}`,
53+
title: `Theme Version: ${usingLabel}`,
5454
tooltip: {
55-
title: `Current version v${usingLabel}`,
56-
desc: `This component corresponds to EDS Design version ${usingLabel}`,
55+
title: `Current Theme version v${usingLabel}`,
56+
desc: `This component's theme corresponds to Edu Design System Version is at ${usingLabel}`,
5757
},
5858
},
5959
};
@@ -79,15 +79,13 @@ export const parameters: Preview['parameters'] = {
7979
],
8080
},
8181
badgesConfig: {
82-
...createInitialReleaseConfig('2.0'),
83-
...createInitialReleaseConfig('1.3'),
84-
...createInitialReleaseConfig('1.2'),
85-
...createInitialReleaseConfig('1.1'),
86-
...createInitialReleaseConfig('1.0'),
87-
...createCurrentReleaseConfig('1.0'),
88-
...createCurrentReleaseConfig('1.3'),
89-
...createCurrentReleaseConfig('2.0'),
90-
...createCurrentReleaseConfig('2.1'),
82+
...createComponentVersion('2.0'),
83+
...createComponentVersion('1.3'),
84+
...createComponentVersion('1.2'),
85+
...createComponentVersion('1.1'),
86+
...createComponentVersion('1.0'),
87+
...createThemeVersion('1.0'),
88+
...createThemeVersion('2.0'),
9189
implementationExample: {
9290
styles: {
9391
backgroundColor: '#ffffff',

src/components/Accordion/Accordion.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export default {
1212
// TODO: add subcomponents like Badge has
1313
parameters: {
1414
layout: 'centered',
15-
badges: ['intro-1.2', 'current-2.0'],
15+
badges: ['api-2.0', 'theme-2.0'],
1616
controls: { sort: 'requiredFirst' },
1717
},
1818
args: {

src/components/AppNotification/AppNotification.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default {
1414
component: AppNotification,
1515
parameters: {
1616
layout: 'centered',
17-
badges: ['intro-2.0', 'current-2.0'],
17+
badges: ['api-2.0', 'theme-2.0'],
1818
},
1919
args: {
2020
title: 'This is an AppNotification title',

src/components/Avatar/Avatar.stories.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ export default {
55
title: 'Components/Avatar',
66
component: Avatar,
77
parameters: {
8-
badges: ['intro-1.3', 'current-1.3'],
8+
badges: ['api-1.3', 'theme-1.0'],
99
layout: 'centered',
1010
},
1111
} as Meta<typeof Avatar>;

src/components/Badge/Badge.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export default {
1313
},
1414
parameters: {
1515
layout: 'centered',
16-
badges: ['intro-1.2', 'current-1.3'],
16+
badges: ['api-1.3', 'theme-1.0'],
1717
},
1818
argTypes: {
1919
children: {

src/components/Breadcrumbs/Breadcrumbs.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default {
2121
},
2222
parameters: {
2323
layout: 'centered',
24-
badges: ['intro-1.0', 'current-1.3'],
24+
badges: ['api-1.3', 'theme-1.0'],
2525
},
2626
argTypes: {
2727
children: {

src/components/Button/Button.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ export default {
2121
},
2222
parameters: {
2323
layout: 'centered',
24-
badges: ['intro-1.0', 'current-2.0'],
24+
badges: ['api-2.0', 'theme-2.0'],
2525
},
2626
} as Meta<ButtonProps>;
2727

src/components/ButtonGroup/ButtonGroup.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export default {
2424
},
2525
},
2626
parameters: {
27-
badges: ['intro-1.0', 'current-2.0'],
27+
badges: ['api-2.0', 'theme-2.0'],
2828
},
2929
decorators: [(Story) => <div className="p-8">{Story()}</div>],
3030
} as Meta<typeof ButtonGroup>;

src/components/Card/Card.stories.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default {
1414
component: Card,
1515
parameters: {
1616
layout: 'centered',
17-
badges: ['intro-1.0', 'current-2.0'],
17+
badges: ['api-2.0', 'theme-2.0'],
1818
},
1919
decorators: [(Story) => <div className="p-8">{Story()}</div>],
2020
args: {
@@ -378,7 +378,7 @@ export const WhileDragging: Story = {
378378
*/
379379
export const CancelMembership: Story = {
380380
parameters: {
381-
badges: ['intro-1.0', 'current-2.0', 'implementationExample'],
381+
badges: ['api-1.0', 'theme-2.0', 'implementationExample'],
382382
},
383383
args: {
384384
children: (

src/components/Checkbox/Checkbox.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const meta: Meta<typeof Checkbox> = {
1111
},
1212
parameters: {
1313
layout: 'centered',
14-
badges: ['intro-1.0', 'current-2.0'],
14+
badges: ['api-2.0', 'theme-2.0'],
1515
},
1616

1717
decorators: [(Story) => <div className="p-8">{Story()}</div>],

src/components/DataTable/DataTable.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default {
3232
'DataTable.DataCell': DataTableDataCell,
3333
},
3434
parameters: {
35-
badges: [BADGE.BETA, 'intro-1.0', 'current-1.0'],
35+
badges: [BADGE.BETA, 'api-1.0', 'theme-2.0'],
3636
chromatic: {
3737
viewports: [
3838
chromaticViewports.ipadMini,

src/components/FieldLabel/FieldLabel.stories.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default {
1010
},
1111
parameters: {
1212
layout: 'centered',
13-
badges: ['intro-2.0', 'current-2.0'],
13+
badges: ['api-2.0', 'theme-2.0'],
1414
},
1515
} as Meta<typeof FieldLabel>;
1616

src/components/FieldNote/FieldNote.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default {
1010
component: FieldNote,
1111
parameters: {
1212
layout: 'centered',
13-
badges: ['intro-1.0', 'current-2.0'],
13+
badges: ['api-2.0', 'theme-2.0'],
1414
},
1515
} as Meta<typeof FieldNote>;
1616

src/components/Fieldset/Fieldset.stories.tsx

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default {
99
component: Fieldset,
1010
parameters: {
1111
layout: 'centered',
12-
badges: ['intro-1.0', 'current-2.0'],
12+
badges: ['api-2.0', 'theme-2.0'],
1313
},
1414
// TODO: fix up the sub-component documentation for Fieldset.Legend
1515
subcomponents: {
@@ -122,7 +122,7 @@ export const FieldsetLegendWithSubtitle: StoryObj<LegendArgs> = {
122122
* ```
123123
*/
124124
export const WithCheckboxes: StoryObj<Args> = {
125-
parameters: { badges: ['intro-1.3', 'current-2.0', 'implementationExample'] },
125+
parameters: { badges: ['api-1.3', 'theme-2.0', 'implementationExample'] },
126126
args: {
127127
fieldNote: 'Attached field note to field set',
128128
children: (
@@ -157,7 +157,7 @@ export const WithCheckboxes: StoryObj<Args> = {
157157
};
158158

159159
export const WithDisabledCheckboxes: StoryObj<Args> = {
160-
parameters: { badges: ['intro-1.3', 'current-2.0', 'implementationExample'] },
160+
parameters: { badges: ['api-1.3', 'theme-2.0', 'implementationExample'] },
161161
args: {
162162
fieldNote: 'Attached field note to field set',
163163
isDisabled: true,
@@ -166,7 +166,7 @@ export const WithDisabledCheckboxes: StoryObj<Args> = {
166166
};
167167

168168
export const WithErrorCheckboxes: StoryObj<Args> = {
169-
parameters: { badges: ['intro-1.3', 'current-2.0', 'implementationExample'] },
169+
parameters: { badges: ['api-1.3', 'theme-2.0', 'implementationExample'] },
170170
args: {
171171
fieldNote: 'Attached field note to field set',
172172
status: 'critical',
@@ -175,7 +175,7 @@ export const WithErrorCheckboxes: StoryObj<Args> = {
175175
};
176176

177177
export const WithRadioButton: StoryObj<Args> = {
178-
parameters: { badges: ['intro-1.3', 'current-2.0', 'implementationExample'] },
178+
parameters: { badges: ['api-1.3', 'theme-2.0', 'implementationExample'] },
179179
args: {
180180
fieldNote: 'Attached field note to field set',
181181
children: (
@@ -210,7 +210,7 @@ export const WithRadioButton: StoryObj<Args> = {
210210
};
211211

212212
export const WithDisabledRadioButton: StoryObj<Args> = {
213-
parameters: { badges: ['intro-1.3', 'current-2.0', 'implementationExample'] },
213+
parameters: { badges: ['api-1.3', 'theme-2.0', 'implementationExample'] },
214214
args: {
215215
fieldNote: 'Attached field note to field set',
216216
isDisabled: true,
@@ -219,7 +219,7 @@ export const WithDisabledRadioButton: StoryObj<Args> = {
219219
};
220220

221221
export const WithErrorRadioButton: StoryObj<Args> = {
222-
parameters: { badges: ['intro-1.3', 'current-2.0', 'implementationExample'] },
222+
parameters: { badges: ['api-1.3', 'theme-2.0', 'implementationExample'] },
223223
args: {
224224
fieldNote: 'Attached field note to field set',
225225
status: 'critical',

src/components/Heading/Heading.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default {
88
component: Heading,
99
parameters: {
1010
layout: 'centered',
11-
badges: ['intro-1.0', 'current-2.0'],
11+
badges: ['api-1.3', 'theme-1.0'],
1212
},
1313
} as Meta<Args>;
1414

src/components/HorizontalStepper/HorizontalStepper.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ export default {
1414
},
1515
parameters: {
1616
layout: 'centered',
17-
badges: ['intro-1.0', 'current-1.3'],
17+
badges: ['api-1.3', 'theme-1.0'],
1818
},
1919

2020
decorators: [(Story) => <div className="m-4">{Story()}</div>],

src/components/Hr/Hr.stories.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
component: Hr,
88
parameters: {
99
layout: 'centered',
10-
badges: ['intro-1.0', 'current-1.3'],
10+
badges: ['api-1.3', 'theme-1.0'],
1111
},
1212
args: {
1313
className: 'w-96',

src/components/Icon/Icon.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const meta: Meta<typeof Icon> = {
1313
component: Icon,
1414
parameters: {
1515
layout: 'centered',
16-
badges: ['intro-1.0', 'current-2.0'],
16+
badges: ['api-2.0', 'theme-2.0'],
1717
},
1818
argTypes: {
1919
name: {

src/components/InlineNotification/InlineNotification.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default {
88
component: InlineNotification,
99
parameters: {
1010
layout: 'centered',
11-
badges: ['intro-1.0', 'current-2.0'],
11+
badges: ['api-2.0', 'theme-2.0'],
1212
},
1313
args: {
1414
title: 'Inline notifications lorem ipsum text',

src/components/InputChip/InputChip.stories.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
title: 'Components/InputChip',
88
component: InputChip,
99
parameters: {
10-
badges: ['intro-1.0', 'current-1.0'],
10+
badges: ['api-1.0', 'theme-2.0'],
1111
},
1212
argTypes: {
1313
onClick: {

src/components/InputField/InputField.stories.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const meta: Meta<typeof InputField> = {
1212
component: InputField,
1313
parameters: {
1414
layout: 'centered',
15-
badges: ['intro-1.0', 'current-2.0'],
15+
badges: ['api-2.0', 'theme-2.0'],
1616
backgrounds: {
1717
default: 'background-utility-inverse-high-emphasis',
1818
},
@@ -345,7 +345,7 @@ export const WithBothMaxAndRecommendedLength: Story = {
345345
*/
346346
export const TabularInput: Story = {
347347
parameters: {
348-
badges: ['intro-1.1', 'implementationExample'],
348+
badges: ['api-2.0', 'implementationExample'],
349349
},
350350
render: (args) => (
351351
<Table>

src/components/Label/Label.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export default {
99
component: Label,
1010
parameters: {
1111
layout: 'centered',
12-
badges: ['intro-1.0', 'current-1.3'],
12+
badges: ['api-2.0', 'theme-2.0'],
1313
},
1414
} as Meta<Args>;
1515

src/components/Link/Link.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default {
77
component: Link,
88
parameters: {
99
layout: 'centered',
10-
badges: ['intro-1.0', 'current-2.0'],
10+
badges: ['api-2.0', 'theme-2.0'],
1111
},
1212
args: {
1313
children: 'Link',

src/components/LoadingIndicator/LoadingIndicator.stories.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export default {
88
component: LoadingIndicator,
99
parameters: {
1010
layout: 'centered',
11-
badges: ['intro-1.2', 'current-2.0'],
11+
badges: ['api-2.0', 'theme-2.0'],
1212
},
1313
} as Meta<Args>;
1414

src/components/Menu/Menu.stories.tsx

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default {
1616
component: Menu,
1717
// TODO: Add sub-components section
1818
parameters: {
19-
badges: ['intro-1.2', 'current-2.0'],
19+
badges: ['api-2.0', 'theme-2.0'],
2020
layout: 'centered',
2121
},
2222
argTypes: {
@@ -224,7 +224,7 @@ export const WithCustomSecondaryButton: Story = {
224224
*/
225225
export const MenuWithAvatarButton: Story = {
226226
parameters: {
227-
badges: ['intro-1.3', 'implementationExample'],
227+
badges: ['api-2.0', 'implementationExample'],
228228
},
229229
args: {
230230
children: (
@@ -289,7 +289,7 @@ export const MenuWithIconButton: StoryObj<MenuProps & { iconName: IconName }> =
289289
iconName: 'dots-vertical',
290290
},
291291
parameters: {
292-
badges: ['intro-1.2', 'implementationExample'],
292+
badges: ['api-2.0', 'implementationExample'],
293293
},
294294
render: ({ iconName }) => (
295295
<Menu>

src/components/Modal/Modal.stories.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default {
1515
// The modal is initially closed for most of these stories,
1616
// which renders testing it for visual regressions unhelpful.
1717
chromatic: { disableSnapshot: true },
18-
badges: ['intro-1.0', 'current-2.1'],
18+
badges: ['api-2.0', 'theme-2.0'],
1919
},
2020
tags: ['autodocs'],
2121
decorators: [(Story) => <div className="p-8">{Story()}</div>],

0 commit comments

Comments
 (0)