@indico-data/design-system 2.49.0 → 2.51.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 (83) hide show
  1. package/lib/components/tanstackTable/TankstackTable.types.d.ts +40 -0
  2. package/lib/components/tanstackTable/TanstackTable.stories.d.ts +15 -0
  3. package/lib/components/tanstackTable/TanstakTable.d.ts +4 -0
  4. package/lib/components/tanstackTable/__tests__/TanstackTable.test.d.ts +1 -0
  5. package/lib/components/tanstackTable/__tests__/__mocks__/test-mock-data.d.ts +8 -0
  6. package/lib/components/tanstackTable/components/ActionBar/ActionBar.d.ts +17 -0
  7. package/lib/components/tanstackTable/components/ActionBar/ActionBar.stories.d.ts +10 -0
  8. package/lib/components/tanstackTable/components/ActionBar/__tests__/ActionBar.test.d.ts +1 -0
  9. package/lib/components/tanstackTable/components/ActionBar/index.d.ts +1 -0
  10. package/lib/components/tanstackTable/components/NoResults/NoResults.d.ts +7 -0
  11. package/lib/components/tanstackTable/components/NoResults/__tests__/NoResult.test.d.ts +1 -0
  12. package/lib/components/tanstackTable/components/NoResults/index.d.ts +1 -0
  13. package/lib/components/tanstackTable/components/TableBody/TableBody.d.ts +12 -0
  14. package/lib/components/tanstackTable/components/TableBody/index.d.ts +1 -0
  15. package/lib/components/tanstackTable/components/TableHeader/TableHeader.d.ts +6 -0
  16. package/lib/components/tanstackTable/components/TableHeader/index.d.ts +1 -0
  17. package/lib/components/tanstackTable/components/TablePagination/TablePagination.d.ts +9 -0
  18. package/lib/components/tanstackTable/components/TablePagination/__tests__/TablePagination.test.d.ts +1 -0
  19. package/lib/components/tanstackTable/components/TablePagination/index.d.ts +1 -0
  20. package/lib/components/tanstackTable/docs/pinnedColumns/PinnedColumn.stories.d.ts +7 -0
  21. package/lib/components/tanstackTable/docs/withRowClick/WithRowClick.stories.d.ts +7 -0
  22. package/lib/components/tanstackTable/helpers.d.ts +830 -0
  23. package/lib/components/tanstackTable/index.d.ts +2 -0
  24. package/lib/components/tanstackTable/mock-data/mock-data.d.ts +14 -0
  25. package/lib/components/tanstackTable/mock-data/table-configuration.d.ts +3 -0
  26. package/lib/components/tanstackTable/useTanstackTable.d.ts +16 -0
  27. package/lib/index.css +407 -80
  28. package/lib/index.d.ts +62 -17
  29. package/lib/index.esm.css +407 -80
  30. package/lib/index.esm.js +20455 -56
  31. package/lib/index.esm.js.map +1 -1
  32. package/lib/index.js +20455 -55
  33. package/lib/index.js.map +1 -1
  34. package/lib/stylesAndAnimations/utilityClasses/UtilityClassesData.d.ts +7 -0
  35. package/lib/stylesAndAnimations/utilityClasses/UtilityClassesTable.d.ts +1 -0
  36. package/lib/stylesAndAnimations/utilityClasses/UtilityClassesTable.stories.d.ts +6 -0
  37. package/package.json +2 -1
  38. package/src/components/tanstackTable/TankstackTable.types.ts +39 -0
  39. package/src/components/tanstackTable/TanstackTable.mdx +122 -0
  40. package/src/components/tanstackTable/TanstackTable.stories.tsx +260 -0
  41. package/src/components/tanstackTable/TanstakTable.tsx +157 -0
  42. package/src/components/tanstackTable/__tests__/TanstackTable.test.tsx +87 -0
  43. package/src/components/tanstackTable/__tests__/__mocks__/test-mock-data.tsx +83 -0
  44. package/src/components/tanstackTable/components/ActionBar/ActionBar.mdx +10 -0
  45. package/src/components/tanstackTable/components/ActionBar/ActionBar.scss +30 -0
  46. package/src/components/tanstackTable/components/ActionBar/ActionBar.stories.tsx +98 -0
  47. package/src/components/tanstackTable/components/ActionBar/ActionBar.tsx +51 -0
  48. package/src/components/tanstackTable/components/ActionBar/__tests__/ActionBar.test.tsx +87 -0
  49. package/src/components/tanstackTable/components/ActionBar/index.ts +1 -0
  50. package/src/components/tanstackTable/components/NoResults/NoResults.scss +24 -0
  51. package/src/components/tanstackTable/components/NoResults/NoResults.tsx +22 -0
  52. package/src/components/tanstackTable/components/NoResults/__tests__/NoResult.test.tsx +25 -0
  53. package/src/components/tanstackTable/components/NoResults/index.ts +1 -0
  54. package/src/components/tanstackTable/components/TableBody/TableBody.tsx +87 -0
  55. package/src/components/tanstackTable/components/TableBody/index.ts +1 -0
  56. package/src/components/tanstackTable/components/TableHeader/TableHeader.tsx +49 -0
  57. package/src/components/tanstackTable/components/TableHeader/index.ts +1 -0
  58. package/src/components/tanstackTable/components/TablePagination/TablePagination.tsx +45 -0
  59. package/src/components/tanstackTable/components/TablePagination/__tests__/TablePagination.test.tsx +18 -0
  60. package/src/components/tanstackTable/components/TablePagination/index.ts +1 -0
  61. package/src/components/tanstackTable/docs/pinnedColumns/PinnedColumn.mdx +34 -0
  62. package/src/components/tanstackTable/docs/pinnedColumns/PinnedColumn.stories.tsx +40 -0
  63. package/src/components/tanstackTable/docs/withRowClick/WithRowClick.mdx +48 -0
  64. package/src/components/tanstackTable/docs/withRowClick/WithRowClick.stories.tsx +32 -0
  65. package/src/components/tanstackTable/helpers.ts +45 -0
  66. package/src/components/tanstackTable/index.ts +2 -0
  67. package/src/components/tanstackTable/mock-data/mock-data.ts +256 -0
  68. package/src/components/tanstackTable/mock-data/table-configuration.tsx +219 -0
  69. package/src/components/tanstackTable/styles/_variables.scss +35 -0
  70. package/src/components/tanstackTable/styles/table.scss +204 -0
  71. package/src/components/tanstackTable/styles/test.scss +19 -0
  72. package/src/components/tanstackTable/tanstack-table.d.ts +18 -0
  73. package/src/components/tanstackTable/useTanstackTable.tsx +42 -0
  74. package/src/index.ts +1 -0
  75. package/src/legacy/components/loading-indicators/CirclePulse/CirclePulse.tsx +1 -0
  76. package/src/storybookDocs/Permafrost.mdx +22 -11
  77. package/src/styles/_borders.scss +2 -1
  78. package/src/styles/index.scss +1 -0
  79. package/src/stylesAndAnimations/borders/BorderColor.tsx +14 -6
  80. package/src/stylesAndAnimations/utilityClasses/UtilityClasses.mdx +24 -0
  81. package/src/stylesAndAnimations/utilityClasses/UtilityClassesData.ts +230 -0
  82. package/src/stylesAndAnimations/utilityClasses/UtilityClassesTable.stories.tsx +13 -0
  83. package/src/stylesAndAnimations/utilityClasses/UtilityClassesTable.tsx +146 -0
@@ -0,0 +1,35 @@
1
+ // Light Theme Specific Variables
2
+
3
+ :root [data-theme='light'] {
4
+ --pf-tanstack-table-background-color: var(--pf-white-color);
5
+ --pf-tanstack-table-font-color: var(--pf-gray-color);
6
+ --pf-tanstack-table-border-color: var(--pf-gray-color-200);
7
+ --pf-tanstack-table-stripe-color: var(--pf-gray-color-100);
8
+ --pf-tanstack-table-hover-color: var(--pf-gray-color-200);
9
+ --pf-tanstack-table-disabled-color: var(--pf-gray-color-300);
10
+ --pf-tanstack-table-checked-color: var(--pf-secondary-color-950);
11
+ --pf-tanstack-table-clicked-color: var(--pf-secondary-color-100);
12
+ --pf-tanstack-table-highlighted-color: var(--pf-gray-color-200);
13
+ --pf-tanstack-table-highlighted-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2),
14
+ 0 8px 16px rgba(0, 0, 0, 0.2);
15
+ --pf-tanstack-table-font-size: var(--pf-font-size-body2);
16
+ }
17
+
18
+ // Dark Theme Specific Variables
19
+ :root [data-theme='dark'],
20
+ :root {
21
+ --pf-tanstack-table-background-color: var(--pf-primary-color-800);
22
+ --pf-tanstack-table-font-color: var(--pf-white-color);
23
+ --pf-tanstack-table-border-color: var(--pf-tertiary-color-800);
24
+ --pf-tanstack-table-stripe-color: var(--pf-primary-color-700);
25
+ --pf-tanstack-table-hover-color: var(--pf-primary-color-600);
26
+ --pf-tanstack-table-disabled-color: var(--pf-gray-color-900);
27
+ --pf-tanstack-table-disabled-button-color: var(--pf-primary-color-100);
28
+ --pf-tanstack-table-checked-color: var(--pf-secondary-color-950);
29
+ --pf-tanstack-table-clicked-color: var(--pf-primary-color);
30
+ --pf-tanstack-table-highlighted-color: var(--pf-primary-color);
31
+ --pf-tanstack-table-highlighted-box-shadow: 0 4px 8px rgba(0, 0, 0, 0.4),
32
+ 0 8px 16px rgba(0, 0, 0, 0.3);
33
+ --pf-tanstack-table-font-size: var(--pf-font-size-body2);
34
+ --pf-tanstack-table-pagination-background-color: var(--pf-primary-color-700);
35
+ }
@@ -0,0 +1,204 @@
1
+ @import './_variables.scss';
2
+ @import './test.scss';
3
+
4
+ @import '../components/ActionBar/ActionBar.scss';
5
+ @import '../components/NoResults/NoResults.scss';
6
+
7
+ .tanstack-table__outer-container {
8
+ display: flex;
9
+ flex-direction: column;
10
+ width: 100%;
11
+ height: 100%;
12
+
13
+ .tanstack-table__container {
14
+ position: relative;
15
+ display: block;
16
+ overflow: auto;
17
+ height: 100%;
18
+
19
+ // Webkit scrollbar styles
20
+ &::-webkit-scrollbar {
21
+ width: var(--pf-size-2);
22
+ height: var(--pf-size-2);
23
+ cursor: pointer;
24
+ }
25
+
26
+ &::-webkit-scrollbar-track {
27
+ background: var(--pf-tanstack-table-background-color);
28
+ border-radius: var(--pf-rounded);
29
+ cursor: pointer;
30
+ }
31
+
32
+ &::-webkit-scrollbar-thumb {
33
+ background: var(--pf-tanstack-table-border-color);
34
+ border-radius: var(--pf-rounded);
35
+ cursor: pointer;
36
+ &:hover {
37
+ background: var(--pf-primary-color);
38
+ }
39
+ }
40
+
41
+ // Firefox scrollbar styles
42
+ scrollbar-width: thin;
43
+ scrollbar-color: var(--pf-tanstack-table-border-color) var(--pf-tanstack-table-background-color);
44
+ }
45
+ }
46
+
47
+ .tanstack-table {
48
+ border-collapse: separate;
49
+ margin: 0;
50
+ table-layout: auto;
51
+ border-spacing: 0;
52
+ border-radius: var(--pf-rounded-lg);
53
+ width: 100%;
54
+
55
+ &.is-loading {
56
+ border: var(--pf-border-thin) solid var(--pf-border-color);
57
+ height: 100%;
58
+ width: 100%;
59
+ }
60
+
61
+ &__thead {
62
+ position: sticky;
63
+ top: 0;
64
+ z-index: 100;
65
+ box-sizing: border-box;
66
+
67
+ background-color: var(--pf-tanstack-table-background-color);
68
+
69
+ tr:first-child {
70
+ th {
71
+ &:first-child {
72
+ border-top-left-radius: var(--pf-rounded-lg);
73
+ }
74
+
75
+ &:last-child {
76
+ border-top-right-radius: var(--pf-rounded-lg);
77
+ }
78
+ }
79
+ }
80
+
81
+ &__th {
82
+ color: var(--pf-tanstack-table-font-color);
83
+ background: var(--pf-tanstack-table-background-color);
84
+ font-size: var(--pf-tanstack-table-font-size);
85
+ font-weight: var(--pf-font-weight-medium);
86
+ box-sizing: border-box;
87
+
88
+ border-top: var(--pf-border-sm) solid var(--pf-tanstack-table-border-color);
89
+ border-bottom: var(--pf-border-sm) solid var(--pf-tanstack-table-border-color);
90
+ border-right: var(--pf-border-sm) solid var(--pf-tanstack-table-border-color);
91
+
92
+ user-select: none;
93
+
94
+ overflow: hidden;
95
+ text-overflow: ellipsis;
96
+ white-space: nowrap;
97
+
98
+ max-width: 300px;
99
+ width: auto;
100
+ padding: 0 var(--pf-padding-2);
101
+ text-align: left;
102
+
103
+ &:first-child {
104
+ border-left: var(--pf-border-sm) solid var(--pf-tanstack-table-border-color);
105
+ }
106
+ }
107
+ }
108
+
109
+ &__tbody {
110
+ tr:last-child {
111
+ td {
112
+ &:first-child {
113
+ border-bottom-left-radius: var(--pf-rounded-lg);
114
+ }
115
+
116
+ &:last-child {
117
+ border-bottom-right-radius: var(--pf-rounded-lg);
118
+ }
119
+ }
120
+ }
121
+
122
+ &__tr {
123
+ background: transparent;
124
+ width: 100%;
125
+
126
+ &.is-selected {
127
+ td {
128
+ background: var(--pf-tanstack-table-checked-color);
129
+ }
130
+ }
131
+
132
+ &.show-hover {
133
+ &:hover {
134
+ td {
135
+ background-color: var(--pf-tanstack-table-hover-color);
136
+ cursor: pointer;
137
+ }
138
+ }
139
+ }
140
+
141
+ &.is-clicked {
142
+ td {
143
+ background-color: var(--pf-tanstack-table-clicked-color);
144
+ }
145
+ }
146
+ }
147
+
148
+ &__td {
149
+ font-size: var(--pf-font-size-base);
150
+ font-weight: var(--pf-font-weight-medium);
151
+ color: var(--pf-tanstack-table-font-color);
152
+ background: var(--pf-tanstack-table-background-color);
153
+
154
+ border-right: var(--pf-border-sm) solid var(--pf-tanstack-table-border-color);
155
+ border-bottom: var(--pf-border-sm) solid var(--pf-tanstack-table-border-color);
156
+
157
+ box-sizing: border-box;
158
+
159
+ overflow: hidden;
160
+ text-overflow: ellipsis;
161
+ white-space: nowrap;
162
+
163
+ padding: 0 var(--pf-padding-2);
164
+ max-width: 300px;
165
+ width: auto;
166
+ text-align: left;
167
+
168
+ &:first-child {
169
+ border-left: var(--pf-border-sm) solid var(--pf-tanstack-table-border-color);
170
+ }
171
+ }
172
+ }
173
+
174
+ &__centered-row {
175
+ padding: var(--pf-padding-1) var(--pf-padding-2);
176
+ text-align: center;
177
+ vertical-align: middle;
178
+ height: 100%;
179
+ border: var(--pf-border-sm) solid var(--pf-border-color);
180
+
181
+ @keyframes shimmer {
182
+ 0% {
183
+ background-color: var(--pf-primary-color-700) 40;
184
+ }
185
+ 50% {
186
+ background-color: var(--pf-primary-color-700);
187
+ }
188
+ 100% {
189
+ background-color: var(--pf-primary-color-700) 40;
190
+ }
191
+ }
192
+
193
+ animation: none;
194
+
195
+ &.is-loading {
196
+ animation: shimmer 3s ease-in-out infinite;
197
+ }
198
+
199
+ svg {
200
+ margin: 0 auto;
201
+ display: block;
202
+ }
203
+ }
204
+ }
@@ -0,0 +1,19 @@
1
+ .tanstack-table__action-bar-test {
2
+ left: 20% !important;
3
+ }
4
+
5
+ .tanstack-table__action-bar-docs {
6
+ bottom: unset !important;
7
+ top: 50% !important;
8
+ transform: translate(-50%, -50%) !important;
9
+ }
10
+
11
+ .tanstack-table__column {
12
+ &.is-pinned {
13
+ opacity: 1;
14
+ }
15
+
16
+ &.is-not-pinned {
17
+ opacity: 0.3;
18
+ }
19
+ }
@@ -0,0 +1,18 @@
1
+ /* eslint-disable @typescript-eslint/no-unused-vars */
2
+ import '@tanstack/react-table';
3
+
4
+ declare module '@tanstack/react-table' {
5
+ interface ColumnMeta<TData extends RowData, TValue> {
6
+ styles: {
7
+ definedColumnSize?: boolean;
8
+ header?: {
9
+ hasNoPadding?: boolean;
10
+ textAlign?: 'left' | 'center' | 'right';
11
+ };
12
+ cell?: {
13
+ hasNoPadding?: boolean;
14
+ textAlign?: 'left' | 'center' | 'right';
15
+ };
16
+ };
17
+ }
18
+ }
@@ -0,0 +1,42 @@
1
+ import { useState } from 'react';
2
+
3
+ import { ColumnDef } from '@tanstack/react-table';
4
+ import { useEffect, useMemo } from 'react';
5
+
6
+ type Props<T> = {
7
+ defaultColumns: ColumnDef<T>[];
8
+ };
9
+
10
+ export function useTanstackTable<T>({ defaultColumns }: Props<T>) {
11
+ const columns = useMemo<ColumnDef<T>[]>(() => defaultColumns, []);
12
+ const defaultData = useMemo(() => [], []);
13
+ const [windowWidth, setWindowWidth] = useState(window.innerWidth);
14
+ const [rowSelection, setRowSelection] = useState({});
15
+ const [formattedColumns, setFormattedColumns] = useState<ColumnDef<T>[]>(columns);
16
+ const [isClickedRow, setIsClickedRow] = useState<string[]>([]);
17
+
18
+ // Tracks changes to browser width to allow for updating of column widths
19
+ useEffect(() => {
20
+ const handleResize = () => {
21
+ setWindowWidth(window.innerWidth);
22
+ };
23
+
24
+ window.addEventListener('resize', handleResize);
25
+
26
+ return () => {
27
+ window.removeEventListener('resize', handleResize);
28
+ };
29
+ }, []);
30
+
31
+ return {
32
+ columns,
33
+ defaultData,
34
+ rowSelection,
35
+ setRowSelection,
36
+ windowWidth,
37
+ formattedColumns,
38
+ setFormattedColumns,
39
+ isClickedRow,
40
+ setIsClickedRow,
41
+ };
42
+ }
package/src/index.ts CHANGED
@@ -28,6 +28,7 @@ export { Menu } from './components/menu';
28
28
  export { Pill } from './components/pill';
29
29
  export { Badge } from './components/badge';
30
30
  export { Modal } from './components/modal';
31
+ export { TanstackTable } from './components/tanstackTable';
31
32
 
32
33
  // Utilities
33
34
  export { registerFontAwesomeIcons } from './setup/setupIcons';
@@ -29,6 +29,7 @@ export function CirclePulse(props: Props): React.ReactElement {
29
29
  aria-hidden={true}
30
30
  className={className}
31
31
  data-cy={props['data-cy']}
32
+ data-testid={props['data-testid']}
32
33
  id={id}
33
34
  overallsize={returnSizeString(overallSize)}
34
35
  ripplesize={returnSizeString(rippleSize)}
@@ -2,13 +2,16 @@ import { Meta } from '@storybook/addon-docs';
2
2
 
3
3
  <Meta title="Getting Started" />
4
4
 
5
- # Permafrost
5
+ # Permafrost
6
+
6
7
  #### Permafrost is the name of our User Interface Design System and Component Library.
8
+
7
9
  Permafrost is utilized in Indico's React projects to ensure a consistent look and feel across our products. It leverages many variables and components that are defined in our design system. We also wrap multiple libraries such as `react-day-picker` or `react-select` to ensure a consistent look and feel.
8
10
 
9
11
  <div style={{ marginBottom: '3rem' }} />
10
12
 
11
13
  ## Installation
14
+
12
15
  Indico serves Permafrost as a package on npm. In order to take advantage of it in your project, you can install it by adding the following to your `package.json`:
13
16
 
14
17
  ```json
@@ -16,16 +19,17 @@ Indico serves Permafrost as a package on npm. In order to take advantage of it i
16
19
  "@indico-data/permafrost": "latest" // or the specific version you want
17
20
  }
18
21
  ```
19
- After adding the package, import the CSS file to apply Permafrost’s styles to the components.
22
+
23
+ After adding the package, import the CSS file to apply Permafrost's styles to the components.
20
24
 
21
25
  ```css
22
- @import "@indico-data/permafrost/dist/index.css";
26
+ @import '@indico-data/permafrost/dist/index.css';
23
27
  ```
24
28
 
25
-
26
29
  ## Usage
27
30
 
28
31
  ### Overriding Variables
32
+
29
33
  You are able to override any of the variables in the design system. We currently support `light` and `dark` themes. If you would like to override a variable in the dark theme, try this approach:
30
34
 
31
35
  ```css
@@ -37,7 +41,8 @@ You are able to override any of the variables in the design system. We currently
37
41
  This pattern applies to all of our variables which you can find in the CSS variables directory in the project.
38
42
 
39
43
  ### Theming
40
- In order to switch between the light and dark themes, you can simply add the `data-theme` attribute to the `html` element. *Note* If no theme is provided, it will default to `:root` which is the dark theme.
44
+
45
+ In order to switch between the light and dark themes, you can simply add the `data-theme` attribute to the `html` element. _Note_ If no theme is provided, it will default to `:root` which is the dark theme.
41
46
 
42
47
  ```html
43
48
  <html data-theme="light">
@@ -47,18 +52,22 @@ In order to switch between the light and dark themes, you can simply add the `da
47
52
 
48
53
  In the example above, it will leverage the `light` theme to render our styles with the `light mode` variables. It is important to note that while Permafrost natively supports `light` and `dark` values for data-theme, these can be extended and even overridden by your project to support additional themes.
49
54
 
50
-
51
55
  ### Importing Components
56
+
52
57
  Using components from Permafrost is as simple as importing them from the package and using them in your project.
53
58
 
54
59
  ```tsx
55
- import {Icon} from '@indico-data/design-system';
60
+ import { Icon } from '@indico-data/design-system';
56
61
 
57
-
58
- <Icon name="indico-o" />
62
+ <Icon name="indico-o" />;
59
63
  ```
60
64
 
65
+ ### Utility Classes
66
+
67
+ Utility classes are pre-defined CSS classes that provide quick and easy styling options for common design patterns. They help maintain consistency and speed up development by offering ready-to-use styles for margins, typography, and more. For a complete list of available utility classes and their usage, see our [Utility Classes documentation](/docs/utility-classes-overview--docs).
68
+
61
69
  ### CSS Only
70
+
62
71
  We have tried to provide as much support as possible for those who wish to implement Permafrost without using our React components. This is where the CSS only approach comes in. We have wrapped the components in a way that allows you to use the same styles with a different library. In order to use the CSS only approach, you can import the css file that sets the styles for the components.
63
72
 
64
73
  You can do this by going into the project and running the following command:
@@ -70,11 +79,13 @@ yarn build
70
79
  This will create an `index.css` file in the `dist` directory that you can then copy and import into your project.
71
80
 
72
81
  #### SASS
82
+
73
83
  If you prefer to use SASS, you can copy the entire `/styles` directory and import the `index.scss` file into your project.
74
84
 
75
85
  **Note:** This will only give you the styling of our design system, none of the interactivity.
76
86
 
77
87
  ### CSS Only Usage
88
+
78
89
  If you wish to do the CSS only approach, you can do so by applying the CSS classes to your components. For example, if you have an input you wish to have styled with our design system, you can do the following:
79
90
 
80
91
  ```tsx
@@ -83,10 +94,10 @@ If you wish to do the CSS only approach, you can do so by applying the CSS class
83
94
 
84
95
  We are as generic as possible with our CSS classes, so you can easily override them if needed.
85
96
 
86
-
87
97
  ## Testing
98
+
88
99
  All of our components have been tested with React Testing Library. You can view the tests for each component by looking in the `__tests__` directory in each component. To run them, you can simply run the following command:
89
100
 
90
101
  ```bash
91
102
  yarn jest
92
- ```
103
+ ```
@@ -3,7 +3,8 @@ $values: var(--pf-border-thin), var(--pf-border-sm), var(--pf-border-md), var(--
3
3
  var(--pf-border-xl);
4
4
  $directions: ('t', top), ('b', bottom), ('l', left), ('r', right);
5
5
  $styles: dashed, dotted, double, solid;
6
- $color-names: 'primary', 'secondary', 'gray', 'steel', 'green', 'orange', 'red';
6
+ $color-names: 'primary', 'secondary', 'tertiary', 'gray', 'red', 'orange', 'yellow', 'green',
7
+ 'purple';
7
8
  $color-grades: '100', '200', '300', '400', '500', '600', '700', '800', '900';
8
9
  $radiusSizes: 0, sm, lg, md, xl, pill, circle, shaped;
9
10
  $radiusValues: var(--pf-rounded-0), var(--pf-rounded-sm), var(--pf-rounded-md), var(--pf-rounded-lg),
@@ -24,6 +24,7 @@
24
24
  @import '../components/badge/styles/Badge.scss';
25
25
  @import '../components/modal/styles/Modal.scss';
26
26
  @import '../components/pagination/styles/Pagination.scss';
27
+ @import '../components/tanstackTable/styles/table.scss';
27
28
 
28
29
  @import '../components/pill/styles/Pill.scss';
29
30
  @import 'sheets'; // Port to an sheets component when we build it
@@ -18,12 +18,12 @@ export const BorderColor = () => {
18
18
  <p className="text-align--center">border-secondary</p>
19
19
  </div>
20
20
  <div>
21
- <div className="sb__square bg-gray-800 border border-lg border-gray"></div>
22
- <p className="text-align--center">border-gray</p>
21
+ <div className="sb__square bg-gray-800 border border-lg border-tertiary"></div>
22
+ <p className="text-align--center">border-tertiary</p>
23
23
  </div>
24
24
  <div>
25
- <div className="sb__square bg-gray-800 border border-lg border-green"></div>
26
- <p className="text-align--center">border-green</p>
25
+ <div className="sb__square bg-gray-800 border border-lg border-gray"></div>
26
+ <p className="text-align--center">border-gray</p>
27
27
  </div>
28
28
  <div>
29
29
  <div className="sb__square bg-gray-800 border border-lg border-red"></div>
@@ -34,8 +34,16 @@ export const BorderColor = () => {
34
34
  <p className="text-align--center">border-orange</p>
35
35
  </div>
36
36
  <div>
37
- <div className="sb__square bg-gray-800 border border-lg border-steel"></div>
38
- <p className="text-align--center">border-steel</p>
37
+ <div className="sb__square bg-gray-800 border border-lg border-yellow"></div>
38
+ <p className="text-align--center">border-yellow</p>
39
+ </div>
40
+ <div>
41
+ <div className="sb__square bg-gray-800 border border-lg border-green"></div>
42
+ <p className="text-align--center">border-green</p>
43
+ </div>
44
+ <div>
45
+ <div className="sb__square bg-gray-800 border border-lg border-purple"></div>
46
+ <p className="text-align--center">border-purple</p>
39
47
  </div>
40
48
  </div>
41
49
  );
@@ -0,0 +1,24 @@
1
+ import { Meta, Canvas } from '@storybook/blocks';
2
+ import * as UtilityClassesStories from './UtilityClassesTable.stories';
3
+
4
+ <Meta title="Utility Classes/Overview" />
5
+
6
+ # Utility Classes Overview
7
+
8
+ Utility classes are designed to provide quick and easy styling options for common design patterns. They help maintain consistency and speed up development by offering predefined styles for borders, colors, typography, and more.
9
+
10
+ ## Example Usage
11
+
12
+ Here's a brief example of how you can use utility classes in your project:
13
+
14
+ ```tsx
15
+ <div className="mb-4 text-uppercase">
16
+ This will have a bottom margin of 16px and the text will be uppercase
17
+ </div>
18
+ ```
19
+
20
+ **Note:** If you find yourself adding more than a few utility classes to a single element and it starts resembling Tailwind, consider using CSS (styled-components, SCSS, etc.) and leverage the design system variables directly.
21
+
22
+ ## Utility Classes
23
+
24
+ <Canvas of={UtilityClassesStories.Default} />