@codecademy/styleguide 79.2.2-alpha.e93e89.0 → 79.2.2

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,9 +3,11 @@
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.e93e89.0](https://github.com/Codecademy/gamut/compare/@codecademy/styleguide@79.2.1...@codecademy/styleguide@79.2.2-alpha.e93e89.0) (2026-03-18)
6
+ ### [79.2.2](https://github.com/Codecademy/gamut/compare/@codecademy/styleguide@79.2.1...@codecademy/styleguide@79.2.2) (2026-03-19)
7
7
 
8
- **Note:** Version bump only for package @codecademy/styleguide
8
+ ### Bug Fixes
9
+
10
+ - **DataList:** Padding on first column and alignment for headers ([1b55acd](https://github.com/Codecademy/gamut/commit/1b55acdaba8c33be5e3cc7a19b0c9a3b50987ab5))
9
11
 
10
12
  ### [79.2.1](https://github.com/Codecademy/gamut/compare/@codecademy/styleguide@79.2.0...@codecademy/styleguide@79.2.1) (2026-03-17)
11
13
 
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.e93e89.0",
4
+ "version": "79.2.2",
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": "597c47b90e8bb7ebae7c00c214c0ef0887bcb8a5"
11
+ "gitHead": "c486633c23501b9b843e23c8aef1bd2c8f238ba1"
12
12
  }
@@ -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 bg="red" width={1}>
102
+ <Box width={1}>
103
103
  <ListExample {...args} />
104
104
  </Box>
105
105
  ),
@@ -1,26 +0,0 @@
1
- import { Canvas, Controls, Meta } from '@storybook/blocks';
2
-
3
- import { ComponentHeader } from '~styleguide/blocks';
4
-
5
- import * as CalendarStories from './Calendar.stories';
6
-
7
- export const parameters = {
8
- title: 'DatePicker/Calendar',
9
- subtitle: `Calendar grid with header (month/year + prev/next), body (day grid), and footer (Clear, Today, quick actions). Used inside DatePickerCalendar.`,
10
- status: 'current',
11
- source: {
12
- repo: 'gamut',
13
- githubLink:
14
- 'https://github.com/Codecademy/gamut/blob/main/packages/gamut/src/DatePicker/Calendar',
15
- },
16
- };
17
-
18
- <Meta of={CalendarStories} />
19
-
20
- <ComponentHeader {...parameters} />
21
-
22
- ## Playground
23
-
24
- <Canvas sourceState="shown" of={CalendarStories.Default} />
25
-
26
- <Controls />
@@ -1,53 +0,0 @@
1
- import {
2
- Calendar,
3
- CalendarBody,
4
- CalendarFooter,
5
- CalendarHeader,
6
- } from '@codecademy/gamut';
7
- import type { Meta, StoryObj } from '@storybook/react';
8
- import { useId, useState } from 'react';
9
-
10
- const meta: Meta<typeof Calendar> = {
11
- component: Calendar,
12
- title: 'Molecules/DatePicker/Calendar',
13
- };
14
-
15
- export default meta;
16
-
17
- type Story = StoryObj<typeof Calendar>;
18
-
19
- export const Default: Story = {
20
- render: function CalendarStory() {
21
- const headingId = useId();
22
- const [visibleDate, setVisibleDate] = useState(() => new Date());
23
- const [selectedDate, setSelectedDate] = useState<Date | null>(null);
24
- const [focusedDate, setFocusedDate] = useState<Date | null>(
25
- () => new Date()
26
- );
27
-
28
- return (
29
- <Calendar>
30
- <CalendarHeader
31
- currentMonthYear={visibleDate}
32
- headingId={headingId}
33
- locale="en-US"
34
- onCurrentMonthYearChange={setVisibleDate}
35
- />
36
- <CalendarBody
37
- focusedDate={focusedDate}
38
- labelledById={headingId}
39
- locale="en-US"
40
- selectedDate={selectedDate}
41
- visibleDate={visibleDate}
42
- onDateSelect={setSelectedDate}
43
- onFocusedDateChange={setFocusedDate}
44
- onVisibleDateChange={setVisibleDate}
45
- />
46
- <CalendarFooter
47
- onCurrentMonthYearChange={setVisibleDate}
48
- onSelectedDateChange={setSelectedDate}
49
- />
50
- </Calendar>
51
- );
52
- },
53
- };
@@ -1,122 +0,0 @@
1
- import {
2
- Box,
3
- DatePicker,
4
- DatePickerCalendar,
5
- DatePickerInput,
6
- PopoverContainer,
7
- useDatePicker,
8
- } from '@codecademy/gamut';
9
- import type { Meta, StoryObj } from '@storybook/react';
10
- import { useRef, useState } from 'react';
11
-
12
- const meta: Meta<typeof DatePicker> = {
13
- component: DatePicker,
14
- title: 'Molecules/DatePicker/DatePicker',
15
- };
16
-
17
- export default meta;
18
-
19
- type Story = StoryObj<typeof DatePicker>;
20
-
21
- export const Default: Story = {
22
- render: function DatePickerStory() {
23
- const [selectedDate, setSelectedDate] = useState<Date | null>(null);
24
- return (
25
- <Box>
26
- <DatePicker
27
- label="Date"
28
- locale="de-DE"
29
- selectedDate={selectedDate}
30
- setSelectedDate={setSelectedDate}
31
- translations={{ clear: 'Löschen' }}
32
- />
33
- </Box>
34
- );
35
- },
36
- };
37
-
38
- export const WithInitialDate: Story = {
39
- render: function DatePickerStory() {
40
- const [selectedDate, setSelectedDate] = useState<Date | null>(
41
- () => new Date(2026, 1, 15)
42
- );
43
- return (
44
- <DatePicker
45
- label="Date"
46
- selectedDate={selectedDate}
47
- setSelectedDate={setSelectedDate}
48
- />
49
- );
50
- },
51
- };
52
-
53
- /** Range mode: two inputs for start and end date. First calendar click sets start, second sets end. */
54
- export const Range: Story = {
55
- render: function DatePickerStory() {
56
- const [startDate, setStartDate] = useState<Date | null>(null);
57
- const [endDate, setEndDate] = useState<Date | null>(null);
58
- return (
59
- <Box>
60
- <DatePicker
61
- endDate={endDate}
62
- endLabel="End date"
63
- mode="range"
64
- setEndDate={setEndDate}
65
- setStartDate={setStartDate}
66
- startDate={startDate}
67
- startLabel="Start date"
68
- />
69
- </Box>
70
- );
71
- },
72
- };
73
-
74
- /**
75
- * Composed usage: DatePicker with children provides shared state via context.
76
- * The child uses useDatePicker() to get open/close and inputRef, then composes
77
- * DatePickerInput and DatePickerCalendar with a custom PopoverContainer layout.
78
- */
79
- export const ComposedWithContext: Story = {
80
- render: function DatePickerStory() {
81
- const [selectedDate, setSelectedDate] = useState<Date | null>(null);
82
- return (
83
- <Box p={32}>
84
- <DatePicker
85
- label="Start date"
86
- selectedDate={selectedDate}
87
- setSelectedDate={setSelectedDate}
88
- >
89
- <ComposedDatePickerLayout />
90
- </DatePicker>
91
- </Box>
92
- );
93
- },
94
- };
95
-
96
- function ComposedDatePickerLayout() {
97
- const { isCalendarOpen, openCalendar, closeCalendar, calendarDialogId } =
98
- useDatePicker();
99
- const inputRef = useRef<HTMLInputElement | null>(null);
100
-
101
- return (
102
- <>
103
- <Box width="fit-content" onClick={openCalendar}>
104
- <DatePickerInput ref={inputRef} />
105
- </Box>
106
- <PopoverContainer
107
- alignment="bottom-left"
108
- allowPageInteraction
109
- focusOnProps={{ autoFocus: false, focusLock: false }}
110
- invertAxis="x"
111
- isOpen={isCalendarOpen}
112
- offset={10}
113
- targetRef={inputRef}
114
- onRequestClose={closeCalendar}
115
- >
116
- <div aria-label="Choose date" id={calendarDialogId} role="dialog">
117
- <DatePickerCalendar dialogId={calendarDialogId} />
118
- </div>
119
- </PopoverContainer>
120
- </>
121
- );
122
- }