@codecademy/styleguide 78.5.6-alpha.ea1cbb.0 → 78.5.6-alpha.eca584.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.
Files changed (34) hide show
  1. package/.storybook/components/Elements/Markdown.tsx +1 -0
  2. package/CHANGELOG.md +1 -1
  3. package/package.json +2 -2
  4. package/src/lib/Atoms/FormElements/FormGroup/FormGroup.mdx +6 -0
  5. package/src/lib/Atoms/FormElements/FormGroup/FormGroup.stories.tsx +45 -4
  6. package/src/lib/Atoms/FormInputs/Checkbox/Checkbox.mdx +7 -1
  7. package/src/lib/Atoms/FormInputs/Checkbox/Checkbox.stories.tsx +21 -1
  8. package/src/lib/Atoms/FormInputs/Radio/Radio.mdx +8 -0
  9. package/src/lib/Atoms/FormInputs/Radio/Radio.stories.tsx +38 -4
  10. package/src/lib/Foundations/System/About.mdx +1 -1
  11. package/src/lib/Foundations/System/Props.mdx +230 -0
  12. package/src/lib/Foundations/System/ResponsiveProperties/ResponsiveProperties.mdx +3 -3
  13. package/src/lib/Foundations/System/ResponsiveProperties/ResponsiveProperties.stories.tsx +0 -1
  14. package/src/lib/Foundations/shared/elements.tsx +4 -16
  15. package/src/lib/Layouts/Boxes/Box/Box.stories.tsx +0 -1
  16. package/src/lib/Molecules/Tips/InfoTip/InfoTip.mdx +24 -8
  17. package/src/lib/Molecules/Tips/InfoTip/InfoTip.stories.tsx +86 -34
  18. package/src/lib/Organisms/ConnectedForm/ConnectedFormGroup/ConnectedFormGroup.mdx +19 -0
  19. package/src/lib/Organisms/ConnectedForm/ConnectedFormGroup/ConnectedFormGroup.stories.tsx +73 -0
  20. package/src/lib/Organisms/GridForm/Fields.mdx +19 -0
  21. package/src/lib/Organisms/GridForm/Fields.stories.tsx +62 -1
  22. package/src/lib/Organisms/GridForm/Layout.mdx +1 -1
  23. package/src/lib/Foundations/System/Props/About.mdx +0 -81
  24. package/src/lib/Foundations/System/Props/Background.mdx +0 -30
  25. package/src/lib/Foundations/System/Props/Border.mdx +0 -33
  26. package/src/lib/Foundations/System/Props/Color.mdx +0 -28
  27. package/src/lib/Foundations/System/Props/Flex.mdx +0 -28
  28. package/src/lib/Foundations/System/Props/Grid.mdx +0 -31
  29. package/src/lib/Foundations/System/Props/Layout.mdx +0 -34
  30. package/src/lib/Foundations/System/Props/List.mdx +0 -38
  31. package/src/lib/Foundations/System/Props/Positioning.mdx +0 -29
  32. package/src/lib/Foundations/System/Props/Shadow.mdx +0 -31
  33. package/src/lib/Foundations/System/Props/Space.mdx +0 -28
  34. package/src/lib/Foundations/System/Props/Typography.mdx +0 -28
@@ -1,31 +0,0 @@
1
- import { Meta } from '@storybook/blocks';
2
-
3
- import { AboutHeader, TokenTable } from '~styleguide/blocks';
4
-
5
- import { defaultColumns, getPropRows } from '../../shared/elements';
6
-
7
- export const parameters = {
8
- title: 'Grid',
9
- subtitle: 'Grid specific properties',
10
- status: 'current',
11
- };
12
-
13
- <Meta title="Foundations/System/Props/Grid" />
14
-
15
- <AboutHeader {...parameters} />
16
-
17
- Grid props give you powerful control over CSS Grid layouts. Define grid templates, control auto-placement behavior, and set gaps between grid items. These properties make it straightforward to create complex, responsive grid layouts with precise control over both container and item positioning.
18
-
19
- ```tsx
20
- import styled from '@emotion/styled';
21
- import { system } from '@codecademy/gamut-styles';
22
-
23
- const GridExample = styled.div(system.grid);
24
-
25
- <GridExample
26
- gridTemplateColumns="max-content 1fr max-content"
27
- columnGap={32}
28
- />;
29
- ```
30
-
31
- <TokenTable rows={getPropRows('grid')} columns={defaultColumns} />
@@ -1,34 +0,0 @@
1
- import { Meta } from '@storybook/blocks';
2
-
3
- import { AboutHeader, TokenTable } from '~styleguide/blocks';
4
-
5
- import { defaultColumns, getPropRows } from '../../shared/elements';
6
-
7
- export const parameters = {
8
- title: 'Layout',
9
- subtitle:
10
- 'Props for handling dimensions and other layout specific properties.',
11
- status: 'updating',
12
- };
13
-
14
- <Meta title="Foundations/System/Props/Layout" />
15
-
16
- <AboutHeader {...parameters} />
17
-
18
- Layout props control the visual structure and dimensions of elements. These properties determine how components take up space, their display behavior, and how they align within their containers. Use these props to set widths, heights, overflow behavior, and container types for responsive layouts.
19
-
20
- ```tsx
21
- import styled from '@emotion/styled';
22
- import { system } from '@codecademy/gamut-styles';
23
-
24
- const LayoutExample = styled.div(system.layout);
25
-
26
- <LayoutExample
27
- display="flex"
28
- width="50%"
29
- height="300px"
30
- verticalAlign="middle"
31
- />;
32
- ```
33
-
34
- <TokenTable rows={getPropRows('layout')} columns={defaultColumns} />
@@ -1,38 +0,0 @@
1
- import { Meta } from '@storybook/blocks';
2
-
3
- import { AboutHeader, LinkTo, TokenTable } from '~styleguide/blocks';
4
-
5
- import { defaultColumns, getPropRows } from '../../shared/elements';
6
-
7
- export const parameters = {
8
- title: 'List',
9
- subtitle:
10
- 'Props for adjusting list styles when rendering a component as a `ul` or `ol`',
11
- status: 'current',
12
- };
13
-
14
- <Meta title="Foundations/System/Props/List" />
15
-
16
- <AboutHeader {...parameters} />
17
-
18
- List props control the appearance of ordered and unordered lists when components are rendered as `ul` or `ol` elements. These properties let you customize bullet styles, list positioning, and even use custom images as list markers, giving you full control over list presentation.
19
-
20
- For more advanced list features, refer to the <LinkTo id="Organisms/Lists & Tables/List">List component</LinkTo>.
21
-
22
- ```tsx
23
- import styled from '@emotion/styled';
24
- import { system } from '@codecademy/gamut-styles';
25
-
26
- const ListExample = styled.div(system.list);
27
-
28
- <ListExample
29
- as="ul"
30
- listStyleType="square"
31
- listStylePosition="inside"
32
- listStyleImage="none"
33
- >
34
- <ListExample as="li">a list item</ListExample>
35
- </ListExample>;
36
- ```
37
-
38
- <TokenTable rows={getPropRows('list')} columns={defaultColumns} />
@@ -1,29 +0,0 @@
1
- import { Meta } from '@storybook/blocks';
2
-
3
- import { AboutHeader, TokenTable } from '~styleguide/blocks';
4
-
5
- import { defaultColumns, getPropRows } from '../../shared/elements';
6
-
7
- export const parameters = {
8
- title: 'Positioning',
9
- subtitle:
10
- 'Props that affect stacking and position contexts. Like `top`, `position` and `opacity`.',
11
- status: 'updating',
12
- };
13
-
14
- <Meta title="Foundations/System/Props/Positioning" />
15
-
16
- <AboutHeader {...parameters} />
17
-
18
- Positioning props control how elements are positioned within their parent containers and manage their stacking order. Use these properties to create fixed headers, absolute overlays, sticky navigation, and control layering with z-index. The `inset` shorthand provides a convenient way to set all four position values at once.
19
-
20
- ```tsx
21
- import styled from '@emotion/styled';
22
- import { system } from '@codecademy/gamut-styles';
23
-
24
- const PositioningExample = styled.div(system.positioning);
25
-
26
- <PositioningExample position="absolute" zIndex={2} top="0" left="0" />;
27
- ```
28
-
29
- <TokenTable rows={getPropRows('positioning')} columns={defaultColumns} />
@@ -1,31 +0,0 @@
1
- import { Meta } from '@storybook/blocks';
2
-
3
- import { AboutHeader, TokenTable } from '~styleguide/blocks';
4
-
5
- import { defaultColumns, getPropRows } from '../../shared/elements';
6
-
7
- export const parameters = {
8
- title: 'Shadow',
9
- subtitle: 'Props for box and text shadows.',
10
- status: 'current',
11
- };
12
-
13
- <Meta title="Foundations/System/Props/Shadow" />
14
-
15
- <AboutHeader {...parameters} />
16
-
17
- Shadow props add depth and visual interest to your components through box and text shadows. These properties accept standard CSS shadow syntax, allowing you to create subtle elevation effects or dramatic visual depth. Use shadows consistently to establish visual hierarchy in your interface.
18
-
19
- ```tsx
20
- import styled from '@emotion/styled';
21
- import { system } from '@codecademy/gamut-styles';
22
-
23
- const ShadowExample = styled.div(system.shadow);
24
-
25
- <ShadowExample
26
- boxShadow="0 0 4px rgba(0, 0, 0, .15)"
27
- textShadow="0 0 4px rgba(0, 0, 0, .15)"
28
- />;
29
- ```
30
-
31
- <TokenTable rows={getPropRows('shadows')} columns={defaultColumns} />
@@ -1,28 +0,0 @@
1
- import { Meta } from '@storybook/blocks';
2
-
3
- import { AboutHeader, TokenTable } from '~styleguide/blocks';
4
-
5
- import { defaultColumns, getPropRows } from '../../shared/elements';
6
-
7
- export const parameters = {
8
- title: 'Space',
9
- subtitle: 'Props for maintaining specific vertical and horizontal rhythms',
10
- status: 'updating',
11
- };
12
-
13
- <Meta title="Foundations/System/Props/Space" />
14
-
15
- <AboutHeader {...parameters} />
16
-
17
- Space props provide a consistent way to apply margin and padding throughout your application. All spacing values reference the theme's spacing scale, ensuring visual consistency and making it easy to create responsive spacing patterns using array syntax.
18
-
19
- ```tsx
20
- import styled from '@emotion/styled';
21
- import { system } from '@codecademy/gamut-styles';
22
-
23
- const SpaceExample = styled.div(system.space);
24
-
25
- <SpaceExample p={8} my={[16, 24, 32]} />;
26
- ```
27
-
28
- <TokenTable rows={getPropRows('space')} columns={defaultColumns} />
@@ -1,28 +0,0 @@
1
- import { Meta } from '@storybook/blocks';
2
-
3
- import { AboutHeader, TokenTable } from '~styleguide/blocks';
4
-
5
- import { defaultColumns, getPropRows } from '../../shared/elements';
6
-
7
- export const parameters = {
8
- title: 'Typography',
9
- subtitle: 'Props for text manipulation',
10
- status: 'current',
11
- };
12
-
13
- <Meta title="Foundations/System/Props/Typography" />
14
-
15
- <AboutHeader {...parameters} />
16
-
17
- Typography props give you fine-grained control over text styling and appearance. These properties connect to the theme's typography scales for font families, sizes, weights, and line heights, making it simple to maintain typographic consistency across your application while allowing for custom text transformations and decorations.
18
-
19
- ```tsx
20
- import styled from '@emotion/styled';
21
- import { system } from '@codecademy/gamut-styles';
22
-
23
- const TextExample = styled.p(system.typography);
24
-
25
- <TextExample fontSize={16} fontFamily="accent" textTransform="uppercase" />;
26
- ```
27
-
28
- <TokenTable rows={getPropRows('typography')} columns={defaultColumns} />