@codecademy/styleguide 79.2.0-alpha.d6e3a2.0 → 79.2.0-alpha.ed9688.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.
@@ -183,12 +183,13 @@ export const globalTypes = {
183
183
  },
184
184
  direction: {
185
185
  name: 'Direction',
186
- description: 'Text direction for the page',
186
+ description: 'Text direction (LTR or RTL)',
187
187
  defaultValue: 'ltr',
188
188
  toolbar: {
189
+ icon: 'arrowright',
189
190
  items: [
190
- { value: 'ltr', icon: 'arrowright', title: 'Left-To-Right' },
191
- { value: 'rtl', icon: 'arrowleft', title: 'Right-To-Left' },
191
+ { value: 'ltr', title: 'Left-to-Right (LTR)', icon: 'arrowright' },
192
+ { value: 'rtl', title: 'Right-to-Left (RTL)', icon: 'arrowleft' },
192
193
  ],
193
194
  showName: true,
194
195
  },
@@ -68,9 +68,8 @@ export const withEmotion = (Story: any, context: GlobalsContext) => {
68
68
  alwaysSetVariables
69
69
  bg={themeBackground[colorMode]}
70
70
  ref={storyRef}
71
- dir={direction}
72
71
  >
73
- {Story()}
72
+ <div dir={direction}>{Story()}</div>
74
73
  </Background>
75
74
  </GamutProvider>
76
75
  );
@@ -86,9 +85,8 @@ export const withEmotion = (Story: any, context: GlobalsContext) => {
86
85
  alwaysSetVariables
87
86
  bg={themeBackground[colorMode]}
88
87
  ref={storyRef}
89
- dir={direction}
90
88
  >
91
- {Story()}
89
+ <div dir={direction}>{Story()}</div>
92
90
  </Background>
93
91
  </GamutProvider>
94
92
  );
package/CHANGELOG.md CHANGED
@@ -3,10 +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.0-alpha.d6e3a2.0](https://github.com/Codecademy/gamut/compare/@codecademy/styleguide@79.1.2...@codecademy/styleguide@79.2.0-alpha.d6e3a2.0) (2026-03-04)
6
+ ## [79.2.0-alpha.ed9688.0](https://github.com/Codecademy/gamut/compare/@codecademy/styleguide@79.1.2...@codecademy/styleguide@79.2.0-alpha.ed9688.0) (2026-03-05)
7
7
 
8
8
  ### Features
9
9
 
10
+ - Layout related logical CSS props ([#3267](https://github.com/Codecademy/gamut/issues/3267)) ([b43cbf1](https://github.com/Codecademy/gamut/commit/b43cbf1256fbf292a141c77a3251fd95f0085a04))
10
11
  - Updates to ThemeProvider, tokens, and transform to allow Logical vs Physical prop resolution ([#3234](https://github.com/Codecademy/gamut/issues/3234)) ([7efbb9a](https://github.com/Codecademy/gamut/commit/7efbb9aabcd07dc6429432d007eaa5603ac1d70c))
11
12
  - Updates to ThemeProvider, tokens, and transform to allow Logical vs Physical prop resolution ([#3234](https://github.com/Codecademy/gamut/issues/3234)) ([567a6ae](https://github.com/Codecademy/gamut/commit/567a6aeffb3e8628db4b5c9a37dab965b716d969))
12
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.0-alpha.d6e3a2.0",
4
+ "version": "79.2.0-alpha.ed9688.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": "c06701eef88df7b0714f999676f9e32760abb6c6"
11
+ "gitHead": "149f648579774f0f7be4f3ba4e759bd039b8a3ce"
12
12
  }
@@ -11,7 +11,7 @@ const meta: Meta<typeof PopoverContainer> = {
11
11
  inline: true,
12
12
  x: 0,
13
13
  y: 0,
14
- // offset: 20,
14
+ offset: 20,
15
15
  },
16
16
  argTypes: {
17
17
  targetRef: {
@@ -12,7 +12,7 @@ export const parameters = {
12
12
  status: 'updating',
13
13
  };
14
14
 
15
- <Meta title="Foundations/System/Props/Layout" />
15
+ <Meta title="Foundations/System/Props/Layout" of={LayoutStories} />
16
16
 
17
17
  <AboutHeader {...parameters} />
18
18
 
@@ -42,4 +42,14 @@ const LayoutExample = styled.div(system.layout);
42
42
  />;
43
43
  ```
44
44
 
45
+ ## Examples
46
+
47
+ ### Width
48
+
49
+ <Canvas of={LayoutStories.WidthExample} />
50
+
51
+ ### Direction
52
+
53
+ <Canvas of={LayoutStories.DirectionExample} />
54
+
45
55
  <TokenTable rows={getPropRows('layout')} columns={defaultColumns} />
@@ -47,3 +47,39 @@ export const OverflowYExample: Story = {
47
47
  </Box>
48
48
  ),
49
49
  };
50
+
51
+ export const WidthExample: Story = {
52
+ render: () => (
53
+ <Box bg="background-selected" p={16}>
54
+ <Box
55
+ bg="primary"
56
+ color="background-contrast"
57
+ height="300px"
58
+ p={16}
59
+ width="50%"
60
+ >
61
+ This box has <Markdown text="`width='50%' and height='300px'`." />{' '}
62
+ Inspect the box to see the rendered CSS property.
63
+ </Box>
64
+ </Box>
65
+ ),
66
+ };
67
+
68
+ export const DirectionExample: Story = {
69
+ render: () => (
70
+ <Box display="flex" flexDirection="row" gap={16}>
71
+ <Box bg="background-selected" p={16} width="50%">
72
+ <Box bg="primary" color="background-contrast" direction="ltr" p={16}>
73
+ <Markdown text="`direction='ltr'`." /> Left-to-right text direction
74
+ (default for English).
75
+ </Box>
76
+ </Box>
77
+ <Box bg="background-selected" p={16} width="50%">
78
+ <Box bg="primary" color="background-contrast" direction="rtl" p={16}>
79
+ <Markdown text="`direction='rtl'`." /> Right-to-left text direction
80
+ (used for Arabic, Hebrew, etc.).
81
+ </Box>
82
+ </Box>
83
+ </Box>
84
+ ),
85
+ };