paris 0.8.10 → 0.8.12

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
@@ -1,5 +1,17 @@
1
1
  # paris
2
2
 
3
+ ## 0.8.12
4
+
5
+ ### Patch Changes
6
+
7
+ - 9c1955b: Add emptyState render for Table when there are no rows to display
8
+
9
+ ## 0.8.11
10
+
11
+ ### Patch Changes
12
+
13
+ - 28104e0: feat(drawer): Make drawer overlay style default grey and adjust backgroundOverlayGrey color
14
+
3
15
  ## 0.8.10
4
16
 
5
17
  ### Patch Changes
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "paris",
3
3
  "author": "Sanil Chawla <sanil@slingshot.fm> (https://sanil.co)",
4
4
  "description": "Paris is Slingshot's React design system. It's a collection of reusable components, design tokens, and guidelines that help us build consistent, accessible, and performant user interfaces.",
5
- "version": "0.8.10",
5
+ "version": "0.8.12",
6
6
  "homepage": "https://paris.slingshot.fm",
7
7
  "license": "MIT",
8
8
  "repository": {
@@ -34,7 +34,7 @@ $panelAnimationDelay: var(--pte-animations-duration-fast);
34
34
  }
35
35
 
36
36
  &.overlayGreyed {
37
- background-color: rgba(175, 175, 175, 0); // Non-transparent backgroundOverlayGrey
37
+ background-color: rgba(175, 175, 175, 0); // Non-transparent backgroundOverlayGrey (for start animation)
38
38
  will-change: background-color, opacity;
39
39
  }
40
40
  }
@@ -126,7 +126,7 @@ export const Drawer = <T extends string[] | readonly string[] = string[]>({
126
126
  from = 'right',
127
127
  size = 'default',
128
128
  pagination,
129
- overlayStyle = 'blur',
129
+ overlayStyle = 'greyed',
130
130
  additionalActions,
131
131
  children,
132
132
  }: DrawerProps<T>) => {
@@ -27,6 +27,14 @@
27
27
  border-bottom: 1px solid var(--pte-colors-borderOpaque);
28
28
  }
29
29
 
30
+ tr.empty {
31
+ border-bottom: none;
32
+
33
+ td {
34
+ padding: 20px 0 0 0;
35
+ }
36
+ }
37
+
30
38
  tbody tr.clickable {
31
39
  transition: background-color var(--pte-animations-interaction);
32
40
 
@@ -55,6 +55,11 @@ export type TableProps<
55
55
  * Whether the rows should be clickable.
56
56
  */
57
57
  clickableRows?: boolean;
58
+
59
+ /**
60
+ * The content to display when the table is empty.
61
+ */
62
+ emptyState?: ReactNode;
58
63
  /**
59
64
  * Prop overrides for rendered elements.
60
65
  */
@@ -87,6 +92,7 @@ export function Table<RowData extends Record<string, any>[]>({
87
92
  rowRenderFn,
88
93
  onRowClick,
89
94
  clickableRows = true,
95
+ emptyState,
90
96
  overrides,
91
97
  }: TableProps<RowData>) {
92
98
  const id = useId();
@@ -164,6 +170,15 @@ export function Table<RowData extends Record<string, any>[]>({
164
170
  </tr>
165
171
  </thead>
166
172
  <tbody {...overrides?.tbody}>
173
+ {renderedRows.length === 0 && emptyState && (
174
+ <>
175
+ <tr className={styles.empty}>
176
+ <td colSpan={columns.length} className={styles.emptyState}>
177
+ {emptyState}
178
+ </td>
179
+ </tr>
180
+ </>
181
+ )}
167
182
  {renderedRows}
168
183
  </tbody>
169
184
  </table>
@@ -330,7 +330,7 @@ export const LightTheme: Theme = {
330
330
 
331
331
  backgroundOverlayLight: 'rgba(255, 255, 255, 0.07)',
332
332
  backgroundOverlayXLight: 'rgba(255, 255, 255, 0.1)',
333
- backgroundOverlayGrey: 'rgba(175, 175, 175, 0.8)',
333
+ backgroundOverlayGrey: 'rgba(60, 60, 60, 0.65)',
334
334
  backgroundOverlayDark: 'rgba(0, 0, 0, 0.1)',
335
335
  backgroundOverlayTeal: 'rgba(29, 238, 205, 0.1)',
336
336