@codecademy/styleguide 79.2.2-alpha.554975.0 → 79.2.2-alpha.77bf63.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/CHANGELOG.md CHANGED
@@ -3,7 +3,7 @@
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.2-alpha.554975.0](https://github.com/Codecademy/gamut/compare/@codecademy/styleguide@79.2.1...@codecademy/styleguide@79.2.2-alpha.554975.0) (2026-03-19)
6
+ ### [79.2.2-alpha.77bf63.0](https://github.com/Codecademy/gamut/compare/@codecademy/styleguide@79.2.1...@codecademy/styleguide@79.2.2-alpha.77bf63.0) (2026-03-25)
7
7
 
8
8
  **Note:** Version bump only for package @codecademy/styleguide
9
9
 
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.2-alpha.554975.0",
4
+ "version": "79.2.2-alpha.77bf63.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": "847cb7617e7c3e70abec88941a50bf466226632c"
11
+ "gitHead": "2b9fc62e41c84dbe7c0f25fe7f5b9f22335cc223"
12
12
  }
@@ -136,10 +136,7 @@ Some of our forms require special props be passed directly onto the input compon
136
136
  - `hidden`: Props passed to the hidden input element (used for form submission)
137
137
  - `combobox`: Props passed to the visible react-select input element (useful for data-\* attributes, testing, etc.)
138
138
 
139
- <Callout
140
- text=" These props are passed directly to the underlying elements, so they only
141
- accept `data-*` and `aria-*` attributes to ensure validity."
142
- />
139
+ <Callout text="These props are passed directly to the underlying elements, so they only accept data-* and aria-* attributes to ensure validity." />
143
140
 
144
141
  <Canvas of={SelectDropdownStories.CustomInputProps} />
145
142
 
@@ -75,7 +75,7 @@ Addition pixel offset from center in the direction of the alignment (e.g. top-le
75
75
 
76
76
  ### Individual axis offsets `x` and `y`
77
77
 
78
- Absolute offset values irrespective of the relative position. (e.g. x={-4} will be 4 pixels to the left in every position unlike offset).
78
+ Absolute offset values irrespective of the relative position. (e.g. `x={-4}` will be 4 pixels to the left in every position unlike offset).
79
79
 
80
80
  <Canvas of={PopoverContainerStories.XandY} />
81
81
 
@@ -94,7 +94,7 @@ export const Alignment: React.FC<
94
94
  justifyContent="center"
95
95
  >
96
96
  {alignment.split('-').map((val) => (
97
- <Text as="p" variant="p-small">
97
+ <Text as="p" key={val} variant="p-small">
98
98
  {val}
99
99
  </Text>
100
100
  ))}
@@ -24,7 +24,7 @@ export const parameters = {
24
24
 
25
25
  Use `DelayedRenderWrapper` to wrap around a component that you want to delay rendering for a specified amount of time.
26
26
 
27
- The `delay` prop accepts a number in milliseconds. If a `delay` {'>'} 0 is provided, `DelayedRenderWrapper` will use a `setTimeout()` to determine when to render its children. If `delay` is 0 or not provided, it will render its children immediately.
27
+ The `delay` prop accepts a number in milliseconds. If a `delay` value greater than 0 is provided, `DelayedRenderWrapper` will use a `setTimeout()` to determine when to render its children. If `delay` is 0 or not provided, it will render its children immediately.
28
28
 
29
29
  ## Playground
30
30
 
@@ -154,6 +154,7 @@ For spacing between components and sections use these as a guide. Each of these
154
154
  >
155
155
  {sizes.map((size) => (
156
156
  <Box
157
+ key={`box-${size}`}
157
158
  width={`${size}px`}
158
159
  height={`${size}px`}
159
160
  display="inline-block"
@@ -161,7 +162,7 @@ For spacing between components and sections use these as a guide. Each of these
161
162
  />
162
163
  ))}
163
164
  {sizes.map((size) => (
164
- <Box textAlign="center" fontSize={14}>
165
+ <Box key={`label-${size}`} textAlign="center" fontSize={14}>
165
166
  {size}
166
167
  </Box>
167
168
  ))}
@@ -499,6 +499,7 @@ export const defaultColumns = [
499
499
  ];
500
500
 
501
501
  export const getPropRows = (key: keyof typeof ALL_PROPS) =>
502
+ // eslint-disable-next-line import/namespace -- dynamic keyof on namespace import
502
503
  Object.entries(ALL_PROPS[key]).map(([prop, config]) => ({
503
504
  id: prop,
504
505
  ...config,
@@ -50,7 +50,13 @@ export const renderColumnChildren = (
50
50
  {...props}
51
51
  rowspan={span ? span[i] : undefined}
52
52
  >
53
- <Example>{`${props?.size?.toString()}`}</Example>
53
+ <Example>
54
+ {props?.size !== undefined &&
55
+ props.size !== null &&
56
+ (typeof props.size === 'string' || typeof props.size === 'number')
57
+ ? String(props.size)
58
+ : ''}
59
+ </Example>
54
60
  </Column>
55
61
  ));
56
62
  };
@@ -153,7 +153,7 @@ type BreakpointArray<T> = [
153
153
  T?, // sm
154
154
  T?, // md
155
155
  T?, // lg
156
- T? // xl
156
+ T?, // xl
157
157
  T?, // c_xs
158
158
  T?, // c_sm
159
159
  T?, // c_md
@@ -170,16 +170,13 @@ type SystemProp<T> = T | BreakpointMap<T> | BreakpointArray<T>;
170
170
  import { Box } from '@codecademy/gamut';
171
171
 
172
172
  // Object Syntax
173
- <Box width={{ _: "100%", sm: "50%" }} />
173
+ <Box width={{ _: '100%', sm: '50%' }} />
174
174
 
175
175
  // Array Syntax
176
- <Box width={["100%", ,"50%"]} />
176
+ <Box width={['100%', , '50%']} />
177
177
  ```
178
178
 
179
- <Callout
180
- text="If you wish to skip a breakpoint in using the
181
- array shorthand you may specify undefined at the index."
182
- />
179
+ <Callout text="If you wish to skip a breakpoint when using the array shorthand you may specify undefined at the index." />
183
180
 
184
181
  ## Real-world use cases
185
182
 
@@ -77,7 +77,7 @@ const ComponentRow = ({ array }: { array: typeof colTitles }) => {
77
77
  const badgeVariant = status === 'New' ? 'accent' : 'tertiary';
78
78
 
79
79
  return (
80
- <BorderRow size="xl">
80
+ <BorderRow key={title} size="xl">
81
81
  <FlexBox alignItems="center" flexWrap="wrap" pl={8}>
82
82
  <Text mr={8} variant="title-sm">
83
83
  {!skipTitle && title} {component}
@@ -110,7 +110,7 @@ const FeatureRow = ({
110
110
  <Text fontWeight="bold">{title}</Text>
111
111
  </ListCol>
112
112
  {features.map((details) => (
113
- <DetailRow size="xl">
113
+ <DetailRow key={details} size="xl">
114
114
  <Text>{details}</Text>
115
115
  </DetailRow>
116
116
  ))}
@@ -48,6 +48,7 @@ export const Alignments: Story = {
48
48
  return (
49
49
  <IconButton
50
50
  icon={SparkleIcon}
51
+ key={alignment}
51
52
  tip={alignment}
52
53
  tipProps={{ alignment }}
53
54
  />
@@ -12,7 +12,7 @@ const ListRowRenderer: React.FC<ListRowRendererProps> = ({ inputs }) => {
12
12
  <>
13
13
  {inputs.map(({ name, counterpart }) => {
14
14
  return (
15
- <ListRow>
15
+ <ListRow key={name}>
16
16
  <ListCol size="lg" type="header">
17
17
  <Text as="code" ml={8}>
18
18
  {name}
@@ -65,7 +65,7 @@ const ListExample: React.FC = (args) => {
65
65
  return (
66
66
  <List {...args}>
67
67
  {rows.map(({ name, ship }) => (
68
- <ListRow>
68
+ <ListRow key={name}>
69
69
  <ListCol size="md" type="header">
70
70
  {name}
71
71
  </ListCol>
@@ -99,7 +99,7 @@ export const Table: Story = {
99
99
  export const Plain: Story = {
100
100
  args: { spacing: 'condensed', variant: 'plain' },
101
101
  render: (args) => (
102
- <Box width={1}>
102
+ <Box bg="red" width={1}>
103
103
  <ListExample {...args} />
104
104
  </Box>
105
105
  ),
@@ -157,7 +157,7 @@ const ListCardExample: React.FC = (args) => {
157
157
  return (
158
158
  <List {...args}>
159
159
  {rows.map(({ name, ship, role }) => (
160
- <ListRow>
160
+ <ListRow key={name}>
161
161
  <ListCol fill>
162
162
  <Text truncate="ellipsis" truncateLines={1} variant="title-lg">
163
163
  {name}
@@ -218,7 +218,7 @@ const ColumnExample: React.FC<ListProps> = (args) => {
218
218
  return (
219
219
  <List {...args}>
220
220
  {sizes.map((size: 'content' | 'sm' | 'md' | 'lg' | 'xl') => (
221
- <ListRow>
221
+ <ListRow key={size}>
222
222
  <ListCol size={size}>
223
223
  <Box bg="background-selected" flex={1} height={1} p={8}>
224
224
  {size}