@indico-data/design-system 3.4.0 → 3.6.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 (95) hide show
  1. package/lib/components/icons/types.d.ts +1 -1
  2. package/lib/docs/BaseColorPalette/BaseColorPalette.d.ts +1 -0
  3. package/lib/docs/BaseColorPalette/BaseColorsPalette.stories.d.ts +6 -0
  4. package/lib/docs/SemanticTokens/ColorSwatch.d.ts +6 -0
  5. package/lib/docs/SemanticTokens/SemanticTokens.stories.d.ts +9 -0
  6. package/lib/index.css +6682 -3683
  7. package/lib/index.d.ts +1 -1
  8. package/lib/index.esm.css +6682 -3683
  9. package/lib/index.esm.js +2 -2
  10. package/lib/index.esm.js.map +1 -1
  11. package/lib/index.js +2 -2
  12. package/lib/index.js.map +1 -1
  13. package/package.json +1 -1
  14. package/src/components/badge/styles/Badge.scss +10 -10
  15. package/src/components/button/styles/Button.scss +7 -7
  16. package/src/components/button/styles/_variables.scss +5 -5
  17. package/src/components/card/styles/Card.scss +11 -13
  18. package/src/components/floatUI/styles/FloatUI.scss +3 -3
  19. package/src/components/forms/checkbox/styles/Checkbox.scss +11 -23
  20. package/src/components/forms/date/datePicker/styles/DatePicker.scss +25 -25
  21. package/src/components/forms/form/styles/Form.scss +19 -53
  22. package/src/components/forms/input/styles/Input.scss +10 -10
  23. package/src/components/forms/numberInput/styles/NumberInput.scss +13 -18
  24. package/src/components/forms/passwordInput/styles/PasswordInput.scss +12 -12
  25. package/src/components/forms/radio/styles/Radio.scss +8 -22
  26. package/src/components/forms/select/styles/Select.scss +38 -54
  27. package/src/components/forms/textarea/styles/Textarea.scss +11 -11
  28. package/src/components/forms/toggle/styles/Toggle.scss +14 -31
  29. package/src/components/icons/Icon.mdx +1 -1
  30. package/src/components/icons/Icon.stories.tsx +10 -9
  31. package/src/components/icons/styles/Icon.scss +2 -0
  32. package/src/components/icons/types.ts +1 -1
  33. package/src/components/menu/styles/Menu.scss +9 -9
  34. package/src/components/modal/styles/Modal.scss +23 -56
  35. package/src/components/pagination/styles/Pagination.scss +1 -1
  36. package/src/components/pill/styles/Pill.scss +8 -6
  37. package/src/components/skeleton/styles/Skeleton.scss +3 -3
  38. package/src/components/stepper/examples/constants.ts +2 -2
  39. package/src/components/stepper/styles/Stepper.scss +25 -71
  40. package/src/components/table/styles/Table.scss +8 -8
  41. package/src/components/tanstackTable/components/ActionBar/ActionBar.scss +3 -3
  42. package/src/components/tanstackTable/components/NoResults/NoResults.scss +3 -3
  43. package/src/components/tanstackTable/styles/table.scss +39 -40
  44. package/src/components/toast/styles/Toast.scss +20 -36
  45. package/src/components/tooltip/Tooltip.tsx +2 -2
  46. package/src/docs/BaseColorPalette/BaseColorPalette.mdx +35 -0
  47. package/src/docs/BaseColorPalette/BaseColorPalette.tsx +51 -0
  48. package/src/docs/BaseColorPalette/BaseColorsPalette.stories.tsx +13 -0
  49. package/src/{stylesAndAnimations/colors → docs/BaseColorPalette}/Swatch.tsx +32 -3
  50. package/src/docs/Primitives.mdx +110 -0
  51. package/src/docs/SemanticTokens/ColorSwatch.tsx +22 -0
  52. package/src/docs/SemanticTokens/SemanticTokens.mdx +53 -0
  53. package/src/docs/SemanticTokens/SemanticTokens.stories.tsx +152 -0
  54. package/src/styles/_borders.scss +16 -19
  55. package/src/styles/_colors.scss +16 -6
  56. package/src/styles/_spacing-utilities.scss +185 -0
  57. package/src/styles/_typography.scss +4 -4
  58. package/src/styles/globals.scss +7 -77
  59. package/src/styles/index.scss +5 -5
  60. package/src/styles/primitives/_borders.scss +27 -0
  61. package/src/styles/primitives/_breakpoints.scss +9 -0
  62. package/src/styles/{variables → primitives}/_colors.scss +26 -52
  63. package/src/styles/primitives/_iconSizes.scss +10 -0
  64. package/src/styles/primitives/_shadows.scss +9 -0
  65. package/src/styles/primitives/_spacing.scss +68 -0
  66. package/src/styles/primitives/_typography.scss +28 -0
  67. package/src/styles/primitives/index.scss +7 -0
  68. package/src/styles/storybook.scss +9 -9
  69. package/src/styles/tokens/_semantic-tokens.scss +172 -0
  70. package/src/styles/variables/index.scss +0 -7
  71. package/src/stylesAndAnimations/borders/BorderColor.tsx +0 -4
  72. package/src/stylesAndAnimations/sizing/Sizing.mdx +4 -1
  73. package/src/stylesAndAnimations/utilityClasses/UtilityClassesData.ts +2 -1
  74. package/lib/stylesAndAnimations/colors/Colors.d.ts +0 -1
  75. package/lib/stylesAndAnimations/colors/Colors.stories.d.ts +0 -6
  76. package/lib/stylesAndAnimations/colors/constants.d.ts +0 -34
  77. package/lib/stylesAndAnimations/colors/index.d.ts +0 -1
  78. package/src/components/tooltip/styles/Tooltip.scss +0 -12
  79. package/src/styles/_gap.scss +0 -18
  80. package/src/styles/_margin.scss +0 -41
  81. package/src/styles/_padding.scss +0 -30
  82. package/src/styles/_sheets.scss +0 -7
  83. package/src/styles/variables/_borders.scss +0 -46
  84. package/src/styles/variables/_gap.scss +0 -19
  85. package/src/styles/variables/_icons.scss +0 -7
  86. package/src/styles/variables/_margin.scss +0 -37
  87. package/src/styles/variables/_padding.scss +0 -19
  88. package/src/styles/variables/_size.scss +0 -19
  89. package/src/stylesAndAnimations/colors/BaseColorPalette.mdx +0 -56
  90. package/src/stylesAndAnimations/colors/Colors.stories.tsx +0 -13
  91. package/src/stylesAndAnimations/colors/Colors.tsx +0 -64
  92. package/src/stylesAndAnimations/colors/constants.ts +0 -280
  93. package/src/stylesAndAnimations/colors/index.ts +0 -1
  94. /package/lib/{stylesAndAnimations/colors → docs/BaseColorPalette}/Swatch.d.ts +0 -0
  95. /package/src/{stylesAndAnimations/colors → docs/BaseColorPalette}/swatches.scss +0 -0
@@ -0,0 +1,35 @@
1
+ import { Canvas, Meta, Controls } from '@storybook/blocks';
2
+ import * as Colors from './BaseColorsPalette.stories';
3
+
4
+ <Meta title="Styling/Base Colors Palette" />
5
+
6
+ # Base Colors Palette
7
+
8
+ Base palette colors are the foundational color values that define the complete color system. These are organized into color families (primary, secondary, red, green, etc.) with consistent scales from light to dark shades.
9
+
10
+ **Do not use these directly in components.** These base palette variables are designed to be referenced by semantic color tokens, which then adapt to different themes.
11
+
12
+ ## Color Structure
13
+
14
+ ### Base Colors
15
+
16
+ - **Primary**: Blue-gray palette (#50647c) - Main brand colors
17
+ - **Secondary**: Blue palette (#1474b8) - Accent and interactive elements
18
+ - **Tertiary**: Gray-blue palette (#6a7798) - Supporting elements
19
+ - **Blue**: Brand and primary actions (#2989ff)
20
+ - **Gray**: Neutral grays (#808080) - Text and backgrounds
21
+ - **Red**: Error and destructive actions (#a3292d)
22
+ - **Pink**: Unique and creative elements (#a3292d)
23
+ - **Orange**: Warning and attention (#994733)
24
+ - **Yellow**: Caution and highlights (#ad871f)
25
+ - **Green**: Success and positive actions (#14b869)
26
+ - **Teal**: Information and data (#29a3a3)
27
+ - **Purple**: Special and premium features (#5c29a3)
28
+ - **White**: Pure white (#ffffff) and white opacity variants
29
+ - **Black**: Pure black (#000000) and black opacity variants
30
+
31
+ ### Color Scale
32
+
33
+ Each color family follows the scale: 50, 100, 150, 200, 250, 300, 400, 450, 500, 550, 600, 700, 800, 900
34
+
35
+ <Canvas of={Colors.Default} />
@@ -0,0 +1,51 @@
1
+ import { Container, Row, Col } from 'react-grid-system';
2
+ import { Swatch } from './Swatch';
3
+
4
+ const colorList = [
5
+ 'primary',
6
+ 'secondary',
7
+ 'tertiary',
8
+ 'blue',
9
+ 'gray',
10
+ 'red',
11
+ 'pink',
12
+ 'orange',
13
+ 'yellow',
14
+ 'green',
15
+ 'teal',
16
+ 'purple',
17
+ 'white',
18
+ 'black',
19
+ ] as const;
20
+
21
+ const colorShades = [50, 100, 150, 200, 250, 300, 400, 450, 500, 550, 600, 700, 800, 900];
22
+
23
+ export const BaseColorPalette = () => {
24
+ return (
25
+ <Container>
26
+ <Row>
27
+ {colorList.map((color) => {
28
+ return (
29
+ <Col sm={6} key={color}>
30
+ <h1 className="text-capitalize my-5">{color}</h1>
31
+ <div className="my-3">
32
+ <Swatch key="base" color={color} colorValue="" />
33
+ </div>
34
+ {colorShades
35
+ .filter((shade) => {
36
+ // White and black don't have 550 shade
37
+ if ((color === 'white' || color === 'black') && shade === 550) {
38
+ return false;
39
+ }
40
+ return true;
41
+ })
42
+ .map((shade) => {
43
+ return <Swatch key={shade} color={color} shade={shade} colorValue="" />;
44
+ })}
45
+ </Col>
46
+ );
47
+ })}
48
+ </Row>
49
+ </Container>
50
+ );
51
+ };
@@ -0,0 +1,13 @@
1
+ import { Meta, StoryObj } from '@storybook/react';
2
+ import { BaseColorPalette } from './BaseColorPalette';
3
+
4
+ const meta: Meta<typeof BaseColorPalette> = {
5
+ title: 'remove/BaseColorPalette',
6
+ component: BaseColorPalette,
7
+ };
8
+
9
+ export default meta;
10
+
11
+ type Story = StoryObj<typeof BaseColorPalette>;
12
+
13
+ export const Default: Story = {};
@@ -13,7 +13,36 @@ export const Swatch = ({ color, shade, colorValue }: Props) => {
13
13
  navigator.clipboard.writeText(value);
14
14
  };
15
15
 
16
- const cssVar = `--pf-${color}-color${shade ? `-${shade}` : ''}`;
16
+ const cssVar =
17
+ color === 'white' || color === 'black'
18
+ ? `--pf-${shade ? `opacity-${color}-${shade}` : `${color}-color`}`
19
+ : `--pf-${color}-color${shade ? `-${shade}` : ''}`;
20
+
21
+ // Get the actual hex value from the CSS variable
22
+ const getHexValue = () => {
23
+ if (typeof window !== 'undefined') {
24
+ const computedStyle = getComputedStyle(document.documentElement);
25
+ return computedStyle.getPropertyValue(cssVar).trim();
26
+ }
27
+ return '';
28
+ };
29
+
30
+ const rawValue = getHexValue();
31
+
32
+ // Convert rgba to readable format
33
+ const formatValue = (value: string) => {
34
+ if (value.startsWith('rgba(')) {
35
+ const match = value.match(/rgba\((\d+),\s*(\d+),\s*(\d+),\s*([\d.]+)\)/);
36
+ if (match) {
37
+ const [, r, g, b, a] = match;
38
+ const opacity = Math.round(parseFloat(a) * 100);
39
+ return `${opacity}%`;
40
+ }
41
+ }
42
+ return value;
43
+ };
44
+
45
+ const hexValue = formatValue(rawValue);
17
46
 
18
47
  return (
19
48
  <Row className="sb__swatch" key={shade ?? colorValue}>
@@ -24,12 +53,12 @@ export const Swatch = ({ color, shade, colorValue }: Props) => {
24
53
  ></div>
25
54
  </Col>
26
55
  <Col xs={1} className="sb__swatch__description">
27
- {colorValue}
56
+ {hexValue}
28
57
  </Col>
29
58
  <Col xs="content">
30
59
  <span
31
60
  className="sb__swatch__hex link-color"
32
- onClick={() => handleCopy(colorValue)}
61
+ onClick={() => handleCopy(hexValue)}
33
62
  style={{ cursor: 'pointer', margin: '0 10px' }}
34
63
  >
35
64
  <Icon className="ml-8" name="fa-copy" />
@@ -0,0 +1,110 @@
1
+ import { Canvas, Meta, Controls } from '@storybook/blocks';
2
+
3
+ <Meta title="Styling/Primitives" />
4
+
5
+ # Primitives
6
+
7
+ Primitives are the foundational design values in the Permafrost design system. These are the raw values for spacing, typography, borders, shadows, icons, and breakpoints.
8
+
9
+ **Figma is the source of truth** for all primitive values. These CSS variables are aligned with the design tokens defined in Figma.
10
+
11
+ **Use these directly in components** for consistent spacing, typography, and styling. These are the building blocks that semantic tokens reference.
12
+
13
+ **Note:** There are also color primitives (base palette colors), but **do not use those directly**. Use semantic color tokens instead, which reference the color primitives and adapt to different themes.
14
+
15
+ ## Spacing
16
+
17
+ Spacing primitives provide consistent spacing values from micro (2px) to 27xl (384px), including negative values.
18
+
19
+ ### Scale
20
+
21
+ - **Micro to 2xl**: 2px → 16px (small spacing)
22
+ - **3xl to 10xl**: 20px → 48px (medium spacing)
23
+ - **11xl to 27xl**: 56px → 384px (large spacing)
24
+ - **Negative values**: Same scale but negative
25
+
26
+ ## Typography
27
+
28
+ ### Font Family
29
+
30
+ - **Primary**: `Noto Sans`
31
+
32
+ ### Font Weights
33
+
34
+ - **Light**: 300
35
+ - **Regular**: 400
36
+ - **Medium**: 500
37
+ - **Semibold**: 600
38
+ - **Bold**: 700
39
+
40
+ ### Font Sizes
41
+
42
+ - **xs to 2xl**: 10px → 18px
43
+ - **3xl to 5xl**: 20px → 30px
44
+ - **6xl to 10xl**: 34px → 96px
45
+
46
+ ## Borders
47
+
48
+ Border primitives define border widths and radius values for consistent component styling.
49
+
50
+ ### Border Widths
51
+
52
+ - **sm**: 1px
53
+ - **md**: 2px
54
+ - **lg**: 4px
55
+ - **xl**: 8px
56
+
57
+ ### Border Radius
58
+
59
+ - **0 to 10xl**: 0px → 80px (standard radius)
60
+ - **full**: 999px (pill shape)
61
+ - **circle**: 50% (perfect circle)
62
+
63
+ ## Shadows
64
+
65
+ Shadow primitives provide consistent elevation and depth through shadow opacity values.
66
+
67
+ ### Shadow Scale
68
+
69
+ - **xs to 2xl**: 0.1 → 0.35 opacity
70
+ - **inner**: 0.2 opacity (inset shadows)
71
+
72
+ ## Icon Sizes
73
+
74
+ Icon size primitives ensure consistent icon scaling across the interface.
75
+
76
+ ### Icon Scale
77
+
78
+ - **xs to 2xl**: 10px → 48px
79
+ - **3xl**: 64px
80
+
81
+ ## Breakpoints
82
+
83
+ Breakpoint primitives define responsive design breakpoints for consistent layouts.
84
+
85
+ ### Breakpoint Scale
86
+
87
+ - **xs**: 480px
88
+ - **sm**: 600px
89
+ - **md**: 768px
90
+ - **lg**: 1280px
91
+ - **xl**: 1440px
92
+ - **2xl**: 1920px
93
+
94
+ ## When to Use Primitives vs Semantic Tokens
95
+
96
+ - **Use Primitives** for: spacing, typography, borders, shadows, icons, breakpoints
97
+ - **Use Semantic Tokens** for: colors (background, font, border, utility colors)
98
+
99
+ The base color palette primitives are the exception - they should be used via semantic color tokens, not directly.
100
+
101
+ ## Source Files
102
+
103
+ All primitive definitions:
104
+
105
+ - [`src/styles/primitives/_spacing.scss`](https://github.com/IndicoDataSolutions/permafrost/blob/main/src/styles/primitives/_spacing.scss)
106
+ - [`src/styles/primitives/_typography.scss`](https://github.com/IndicoDataSolutions/permafrost/blob/main/src/styles/primitives/_typography.scss)
107
+ - [`src/styles/primitives/_borders.scss`](https://github.com/IndicoDataSolutions/permafrost/blob/main/src/styles/primitives/_borders.scss)
108
+ - [`src/styles/primitives/_shadows.scss`](https://github.com/IndicoDataSolutions/permafrost/blob/main/src/styles/primitives/_shadows.scss)
109
+ - [`src/styles/primitives/_iconSizes.scss`](https://github.com/IndicoDataSolutions/permafrost/blob/main/src/styles/primitives/_iconSizes.scss)
110
+ - [`src/styles/primitives/_breakpoints.scss`](https://github.com/IndicoDataSolutions/permafrost/blob/main/src/styles/primitives/_breakpoints.scss)
@@ -0,0 +1,22 @@
1
+ import React from 'react';
2
+
3
+ interface ColorSwatchProps {
4
+ colorVar: string;
5
+ }
6
+
7
+ export const ColorSwatch: React.FC<ColorSwatchProps> = ({ colorVar }) => {
8
+ return (
9
+ <span
10
+ style={{
11
+ display: 'inline-block',
12
+ width: '16px',
13
+ height: '16px',
14
+ borderRadius: '2px',
15
+ marginRight: '8px',
16
+ verticalAlign: 'middle',
17
+ backgroundColor: `var(${colorVar})`,
18
+ border: '1px solid var(--pf-semantic-border-primary)',
19
+ }}
20
+ />
21
+ );
22
+ };
@@ -0,0 +1,53 @@
1
+ import { Canvas, Meta, Controls } from '@storybook/blocks';
2
+ import * as SemanticTokensStories from './SemanticTokens.stories';
3
+ import { ColorSwatch } from './ColorSwatch';
4
+
5
+ <Meta title="Styling/Semantic Tokens" />
6
+
7
+ # Semantic Tokens
8
+
9
+ Semantic tokens let you use colors by meaning instead of specific values. They automatically adapt to light and dark themes, so you get the right color for any theme.
10
+
11
+ The source of truth is Figma, implemented as CSS variables that map to the correct colors for each theme. This means you don't need to worry about hex values—the design system provides the right color automatically.
12
+
13
+ ```css
14
+ /* ❌ Don't think about specific colors */
15
+ .error-message {
16
+ color: var(--pf-red-color-400); /* Not correct for all themes, hard to maintain */
17
+ }
18
+
19
+ /* ✅ Think about what you need */
20
+ .error-message {
21
+ color: var(--pf-semantic-font-error); /* Correct for any theme */
22
+ }
23
+ ```
24
+
25
+ ## Token Mapping
26
+
27
+ All token definitions and theme mappings: [`src/styles/tokens/_semantic-tokens.scss`](https://github.com/IndicoDataSolutions/permafrost/blob/main/src/styles/tokens/_semantic-tokens.scss)
28
+
29
+ ## Available Color Tokens
30
+
31
+ ### Background
32
+
33
+ <Canvas of={SemanticTokensStories.SemanticBackgroundTokens} />
34
+
35
+ ### Border
36
+
37
+ <Canvas of={SemanticTokensStories.SemanticBorderTokens} />
38
+
39
+ ### Font
40
+
41
+ <Canvas of={SemanticTokensStories.SemanticFontTokens} />
42
+
43
+ ### Brand Logo
44
+
45
+ <Canvas of={SemanticTokensStories.SemanticLogoTokens} />
46
+
47
+ ### Elevation
48
+
49
+ <Canvas of={SemanticTokensStories.SemanticElevationTokens} />
50
+
51
+ ### Utility
52
+
53
+ <Canvas of={SemanticTokensStories.SemanticUtilityTokens} />
@@ -0,0 +1,152 @@
1
+ import { Meta } from '@storybook/react';
2
+ import { ColorSwatch } from './ColorSwatch';
3
+ import { Card } from '../../index';
4
+
5
+ const TokenItem = ({ category, variant }: { category: string; variant: string }) => {
6
+ const colorVar = `--pf-semantic-${category}-${variant}`;
7
+ return (
8
+ <div style={{ display: 'flex' }}>
9
+ <div>
10
+ <ColorSwatch colorVar={colorVar} />
11
+ </div>
12
+ <div>
13
+ <code style={{ color: 'var(--pf-semantic-font-soft)' }}>{colorVar}</code>
14
+ </div>
15
+ </div>
16
+ );
17
+ };
18
+
19
+ const backgroundTokens = [
20
+ 'primary',
21
+ 'secondary',
22
+ 'tertiary',
23
+ 'quaternary',
24
+ 'accent',
25
+ 'highlight',
26
+ 'brand-solid',
27
+ 'brand-hover',
28
+ 'inverted',
29
+ ];
30
+
31
+ const borderTokens = [
32
+ 'primary',
33
+ 'secondary',
34
+ 'hover',
35
+ 'soft',
36
+ 'accent',
37
+ 'error',
38
+ 'warning',
39
+ 'pending',
40
+ 'success',
41
+ 'info',
42
+ 'neutral',
43
+ ];
44
+
45
+ const fontTokens = [
46
+ 'regular',
47
+ 'inverted',
48
+ 'soft',
49
+ 'mute',
50
+ 'link',
51
+ 'placeholder',
52
+ 'disabled',
53
+ 'accent',
54
+ 'error',
55
+ 'success',
56
+ ];
57
+
58
+ const logoTokens = ['primary', 'secondary'];
59
+
60
+ const elevationTokens = ['1', '2', '3', '4', '5'];
61
+
62
+ const utilityTokens = [
63
+ 'info-light',
64
+ 'info-default',
65
+ 'info-dark',
66
+ 'warning-light',
67
+ 'warning-default',
68
+ 'warning-dark',
69
+ 'error-light',
70
+ 'error-default',
71
+ 'error-dark',
72
+ 'success-light',
73
+ 'success-default',
74
+ 'success-dark',
75
+ 'neutral-light',
76
+ 'neutral-default',
77
+ 'neutral-dark',
78
+ 'brand-light',
79
+ 'brand-default',
80
+ 'brand-dark',
81
+ 'pending-light',
82
+ 'pending-default',
83
+ 'pending-dark',
84
+ 'orange-light',
85
+ 'orange-default',
86
+ 'orange-dark',
87
+ 'purple-light',
88
+ 'purple-default',
89
+ 'purple-dark',
90
+ 'teal-light',
91
+ 'teal-default',
92
+ 'teal-dark',
93
+ ];
94
+
95
+ export const SemanticBackgroundTokens = () => (
96
+ <>
97
+ <TokenItem category="page" variant="background" />
98
+ {backgroundTokens.map((token) => (
99
+ <TokenItem key={'background-' + token} category="background" variant={token} />
100
+ ))}
101
+ </>
102
+ );
103
+
104
+ export const SemanticBorderTokens = () => (
105
+ <>
106
+ {borderTokens.map((token) => (
107
+ <TokenItem key={'border-' + token} category="border" variant={token} />
108
+ ))}
109
+ </>
110
+ );
111
+
112
+ export const SemanticFontTokens = () => (
113
+ <>
114
+ {fontTokens.map((token) => (
115
+ <TokenItem key={'font-' + token} category="font" variant={token} />
116
+ ))}
117
+ </>
118
+ );
119
+
120
+ export const SemanticLogoTokens = () => (
121
+ <>
122
+ {logoTokens.map((token) => (
123
+ <TokenItem key={'logo-' + token} category="logo" variant={token} />
124
+ ))}
125
+ </>
126
+ );
127
+
128
+ export const SemanticElevationTokens = () => (
129
+ <>
130
+ {elevationTokens.map((token) => (
131
+ <TokenItem key={'elevation-' + token} category="elevation" variant={token} />
132
+ ))}
133
+ </>
134
+ );
135
+
136
+ export const SemanticUtilityTokens = () => (
137
+ <>
138
+ {utilityTokens.map((token) => (
139
+ <TokenItem key={'utility-' + token} category="utility" variant={token} />
140
+ ))}
141
+ </>
142
+ );
143
+
144
+ const meta: Meta<typeof SemanticBackgroundTokens> = {
145
+ title: 'remove/Semantic Tokens',
146
+ component: SemanticBackgroundTokens,
147
+ parameters: {
148
+ layout: 'fullscreen',
149
+ },
150
+ };
151
+
152
+ export default meta;
@@ -1,20 +1,20 @@
1
1
  $sizes: thin, sm, md, lg, 0, xl;
2
- $values: var(--pf-border-thin), var(--pf-border-sm), var(--pf-border-md), var(--pf-border-lg), 0,
3
- var(--pf-border-xl);
2
+ $values: thin, var(--pf-border-sm), var(--pf-border-md), var(--pf-border-lg), 0, var(--pf-border-xl);
4
3
  $directions: ('t', top), ('b', bottom), ('l', left), ('r', right);
5
4
  $styles: dashed, dotted, double, solid;
6
5
  $color-names: 'primary', 'secondary', 'tertiary', 'gray', 'red', 'pink', 'orange', 'yellow', 'green',
7
6
  'teal', 'brand', 'purple';
8
7
  $color-grades: '50', '100', '150', '200', '250', '300', '400', '450', '500', '600', '700', '800',
9
8
  '900';
10
- $radiusSizes: 0, sm, lg, md, xl, pill, circle, shaped;
11
- $radiusValues: var(--pf-rounded-0), var(--pf-rounded-sm), var(--pf-rounded-md), var(--pf-rounded-lg),
12
- var(--pf-rounded-xl), var(--pf-rounded-pill), var(--pf-rounded-circle), var(--pf-rounded-shaped);
9
+ $radiusSizes: 0, sm, lg, md, xl, pill, circle;
10
+ $radiusValues: var(--pf-border-radius-0), var(--pf-border-radius-xxs), var(--pf-border-radius-xs),
11
+ var(--pf-border-radius-md), var(--pf-border-radius-3xl), var(--pf-border-radius-full),
12
+ var(--pf-border-radius-circle);
13
13
 
14
14
  .border {
15
15
  border: solid 1px;
16
- border-color: var(--pf-border-color-primary);
17
- border-radius: var(--pf-rounded);
16
+ border-color: var(--pf-semantic-border-primary);
17
+ border-radius: var(--pf-border-radius-xs);
18
18
  }
19
19
 
20
20
  @each $size, $value in zip($sizes, $values) {
@@ -51,26 +51,26 @@ $radiusValues: var(--pf-rounded-0), var(--pf-rounded-sm), var(--pf-rounded-md),
51
51
 
52
52
  // Utility border color classes (no grades)
53
53
  .border-error {
54
- border-color: var(--pf-border-color-error);
54
+ border-color: var(--pf-semantic-border-error);
55
55
  }
56
56
  .border-warning {
57
- border-color: var(--pf-border-color-warning);
57
+ border-color: var(--pf-semantic-border-warning);
58
58
  }
59
59
  .border-info {
60
- border-color: var(--pf-border-color-info);
60
+ border-color: var(--pf-semantic-border-info);
61
61
  }
62
62
  .border-success {
63
- border-color: var(--pf-border-color-success);
63
+ border-color: var(--pf-semantic-border-success);
64
64
  }
65
65
  .border-neutral {
66
- border-color: var(--pf-border-color-neutral);
66
+ border-color: var(--pf-semantic-border-neutral);
67
67
  }
68
68
  .border-pending {
69
- border-color: var(--pf-border-color-pending);
69
+ border-color: var(--pf-semantic-border-pending);
70
70
  }
71
71
 
72
72
  .rounded {
73
- border-radius: var(--pf-rounded);
73
+ border-radius: var(--pf-border-radius-xs);
74
74
  }
75
75
 
76
76
  @each $size, $value in zip($radiusSizes, $radiusValues) {
@@ -80,11 +80,8 @@ $radiusValues: var(--pf-rounded-0), var(--pf-rounded-sm), var(--pf-rounded-md),
80
80
  }
81
81
 
82
82
  .border-primary {
83
- border-color: var(--pf-border-color-primary);
83
+ border-color: var(--pf-semantic-border-primary);
84
84
  }
85
85
  .border-secondary {
86
- border-color: var(--pf-border-color-secondary);
87
- }
88
- .border-soft-accent {
89
- border-color: var(--pf-border-color-soft-accent);
86
+ border-color: var(--pf-semantic-border-secondary);
90
87
  }
@@ -1,11 +1,13 @@
1
1
  $color-names: 'primary', 'secondary', 'tertiary', 'gray', 'red', 'orange', 'yellow', 'green',
2
- 'purple', 'pink', 'teal', 'blue';
2
+ 'purple', 'pink', 'teal', 'blue', 'white', 'black';
3
+ $opacity-color-names: 'white', 'black';
3
4
  $chromatic-color-names: 'blue', 'purple', 'red', 'yellow', 'gray', 'green', 'pink', 'orange', 'teal';
4
5
  $color-grades: ();
5
6
  @for $i from 1 through 20 {
6
7
  $color-grades: append($color-grades, #{$i * 50}, comma);
7
8
  }
8
- $utility-color-names: 'success', 'info', 'neutral', 'warning', 'error', 'brand';
9
+ $utility-color-names: 'success', 'info', 'neutral', 'warning', 'error', 'brand', 'pending', 'orange',
10
+ 'purple', 'teal';
9
11
 
10
12
  @each $color-name in $color-names {
11
13
  .color-#{$color-name} {
@@ -29,19 +31,27 @@ $utility-color-names: 'success', 'info', 'neutral', 'warning', 'error', 'brand';
29
31
 
30
32
  @each $color-name in $utility-color-names {
31
33
  .color-#{$color-name} {
32
- color: var(--pf-#{$color-name}-color);
34
+ color: var(--pf-semantic-utility-#{$color-name}-default);
33
35
  }
34
36
 
35
37
  .bg-#{$color-name} {
36
- background-color: var(--pf-#{$color-name}-color);
38
+ background-color: var(--pf-semantic-utility-#{$color-name}-default);
39
+ }
40
+ }
41
+
42
+ @each $color-name in $opacity-color-names {
43
+ @each $color-grade in $color-grades {
44
+ .bg-#{$color-name}-#{$color-grade} {
45
+ background-color: var(--pf-opacity-#{$color-name}-#{$color-grade});
46
+ }
37
47
  }
38
48
  }
39
49
 
40
50
  .link-color {
41
- color: var(--pf-link-color);
51
+ color: var(--pf-semantic-font-link);
42
52
  }
43
53
  .active-link-color {
44
- color: var(--pf-active-link-color);
54
+ color: var(--pf-semantic-font-link);
45
55
  }
46
56
 
47
57
  $item-shades-to-color-number: (