Skip to content

Commit 27f967c

Browse files
committed
Merge branch 'main' into kl-gm-963
2 parents 8c59d34 + 7e1e4c2 commit 27f967c

File tree

12 files changed

+91
-44
lines changed

12 files changed

+91
-44
lines changed

packages/gamut-kit/CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
### [0.6.522](https://github.com/Codecademy/gamut/compare/@codecademy/[email protected]...@codecademy/[email protected]) (2025-07-16)
7+
8+
**Note:** Version bump only for package @codecademy/gamut-kit
9+
610
### [0.6.521](https://github.com/Codecademy/gamut/compare/@codecademy/[email protected]...@codecademy/[email protected]) (2025-07-11)
711

812
**Note:** Version bump only for package @codecademy/gamut-kit

packages/gamut-kit/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"name": "@codecademy/gamut-kit",
33
"description": "Styleguide & Component library for Codecademy",
4-
"version": "0.6.521",
4+
"version": "0.6.522",
55
"author": "Codecademy Engineering <[email protected]>",
66
"dependencies": {
7-
"@codecademy/gamut": "65.1.0",
7+
"@codecademy/gamut": "66.0.0",
88
"@codecademy/gamut-icons": "9.46.1",
99
"@codecademy/gamut-illustrations": "0.54.5",
1010
"@codecademy/gamut-patterns": "0.10.11",

packages/gamut/CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [66.0.0](https://github.com/Codecademy/gamut/compare/@codecademy/[email protected]...@codecademy/[email protected]) (2025-07-16)
7+
8+
### ⚠ BREAKING CHANGES
9+
10+
- **List:** Add spacing system props to List & remove deprecated props
11+
12+
### Features
13+
14+
- **List:** Add spacing system props to List & remove deprecated props ([097e9eb](https://github.com/Codecademy/gamut/commit/097e9ebbc0b81f211642372fdbda38aeddfded78))
15+
616
## [65.1.0](https://github.com/Codecademy/gamut/compare/@codecademy/[email protected]...@codecademy/[email protected]) (2025-07-11)
717

818
### Features

packages/gamut/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@codecademy/gamut",
33
"description": "Styleguide & Component library for Codecademy",
4-
"version": "65.1.0",
4+
"version": "66.0.0",
55
"author": "Codecademy Engineering <[email protected]>",
66
"dependencies": {
77
"@codecademy/gamut-icons": "9.46.1",

packages/gamut/src/DataList/DataGrid.tsx

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { system } from '@codecademy/gamut-styles';
2+
import { StyleProps } from '@codecademy/variance';
13
import { ComponentProps, useMemo } from 'react';
24

35
import { List } from '../List';
@@ -14,7 +16,10 @@ export interface DataGridProps<
1416
Cols extends ColumnConfig<Row>[]
1517
> extends MarshaledColProps,
1618
DataListControls<Row, IdKey, Cols>,
17-
Omit<ComponentProps<typeof List>, 'header' | 'id'> {
19+
Omit<
20+
ComponentProps<typeof List>,
21+
'header' | 'id' | 'rowBreakpoint' | keyof StyleProps<typeof system.space>
22+
> {
1823
/** Whether the data inside is loading and should be indicated to the user somehow */
1924
loading?: boolean;
2025
/** Whether an additional header element should be added */
@@ -49,7 +54,7 @@ export function DataGrid<
4954
emptyMessage,
5055
hideSelectAll = false,
5156
scrollToTopOnUpdate = false,
52-
...rest
57+
id,
5358
} = props;
5459

5560
const empty = rows.length === 0;
@@ -96,7 +101,6 @@ export function DataGrid<
96101
<ListStateContext.Provider value={{ query }}>
97102
<ListControlContext.Provider value={listControls}>
98103
<List
99-
{...rest}
100104
as="table"
101105
emptyMessage={emptyMessage ?? <EmptyRows />}
102106
header={
@@ -110,6 +114,8 @@ export function DataGrid<
110114
) : null
111115
}
112116
height={height}
117+
id={id}
118+
loading={loading}
113119
minHeight={minHeight}
114120
scrollToTopOnUpdate={scrollToTopOnUpdate}
115121
scrollable={scrollable}

packages/gamut/src/List/List.tsx

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,8 @@ export interface ListProps extends AllListProps<ComponentProps<typeof ListEl>> {
2626
/** A custom message to override the default empty message */
2727
emptyMessage?: React.ReactNode;
2828
/**
29-
* @deprecated Use overflow instead!
30-
* Whether the List container should have overflow hidden.
29+
* How the List container should handle overflow.
3130
*/
32-
overflowHidden?: boolean;
3331
overflow?: BoxProps['overflow'];
3432
}
3533

@@ -49,9 +47,9 @@ export const List = forwardRef<HTMLUListElement, ListProps>(
4947
children,
5048
header,
5149
emptyMessage,
52-
overflowHidden = false,
5350
overflow = 'auto',
5451
scrollToTopOnUpdate = false,
52+
...rest
5553
},
5654
ref
5755
) => {
@@ -85,7 +83,12 @@ export const List = forwardRef<HTMLUListElement, ListProps>(
8583
});
8684

8785
const listContent = (
88-
<ListEl as={isTable ? 'tbody' : as} ref={ref} variant={value.variant}>
86+
<ListEl
87+
as={isTable ? 'tbody' : as}
88+
ref={ref}
89+
variant={value.variant}
90+
{...rest}
91+
>
8992
{children}
9093
</ListEl>
9194
);
@@ -126,7 +129,7 @@ export const List = forwardRef<HTMLUListElement, ListProps>(
126129
<ListWrapper
127130
id={id}
128131
maxHeight={height}
129-
overflow={overflowHidden ? 'hidden' : overflow}
132+
overflow={overflow}
130133
position="relative"
131134
ref={wrapperRef}
132135
scrollable={!isEmpty && showShadow}

packages/gamut/src/List/elements.tsx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,13 @@ const listVariants = variant({
4747

4848
export interface ListProps
4949
extends StyleProps<typeof listVariants>,
50-
StyleProps<typeof spacingVariants> {}
50+
StyleProps<typeof spacingVariants>,
51+
StyleProps<typeof system.space> {}
5152

52-
export const ListEl = styled(
53-
'ul',
54-
styledOptions<'ul'>()
55-
)<ListProps>(listVariants);
53+
export const ListEl = styled('ul', styledOptions<'ul'>())<ListProps>(
54+
listVariants,
55+
system.space
56+
);
5657

5758
const rowStates = states({
5859
isOl: {

packages/styleguide/CHANGELOG.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,20 @@
33
All notable changes to this project will be documented in this file.
44
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
55

6+
## [77.0.0](https://github.com/Codecademy/gamut/compare/@codecademy/[email protected]...@codecademy/[email protected]) (2025-07-16)
7+
8+
### ⚠ BREAKING CHANGES
9+
10+
- **List:** Add spacing system props to List & remove deprecated props
11+
12+
### Features
13+
14+
- **List:** Add spacing system props to List & remove deprecated props ([097e9eb](https://github.com/Codecademy/gamut/commit/097e9ebbc0b81f211642372fdbda38aeddfded78))
15+
16+
### [76.1.1](https://github.com/Codecademy/gamut/compare/@codecademy/[email protected]...@codecademy/[email protected]) (2025-07-15)
17+
18+
**Note:** Version bump only for package @codecademy/styleguide
19+
620
## [76.1.0](https://github.com/Codecademy/gamut/compare/@codecademy/[email protected]...@codecademy/[email protected]) (2025-07-11)
721

822
### Features

packages/styleguide/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@codecademy/styleguide",
33
"description": "Styleguide & Component library for codecademy.com",
4-
"version": "76.1.0",
4+
"version": "77.0.0",
55
"author": "Codecademy Engineering",
66
"license": "MIT",
77
"publishConfig": {

packages/styleguide/src/lib/Organisms/Lists & Tables/List/List.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,12 @@ An entire row can be made interactive to expand the row content. Check over the
305305

306306
<Canvas of={ListStories.ExpandedRowGuide} />
307307

308+
## System props
309+
310+
List has access to the [space system props](https://gamut.codecademy.com/?path=/docs/foundations-system-props--docs#space) for controlling the spacing around the List component. These props can be used to control the margin and padding of the List.
311+
312+
<Canvas of={ListStories.SpaceSystemProps} />
313+
308314
## Playground
309315

310316
<Canvas sourceState="shown" of={ListStories.Default} />

0 commit comments

Comments
 (0)