@veritone-ce/design-system 2.8.12 → 2.8.13-next.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 (60) hide show
  1. package/dist/cjs/Dialog/components.js +29 -90
  2. package/dist/cjs/Dialog/state.js +2 -8
  3. package/dist/cjs/Dialog/styles.module.scss.js +2 -2
  4. package/dist/cjs/FileUploader/controlled.js +7 -0
  5. package/dist/cjs/Table/AutoTable/controlled.js +2 -1
  6. package/dist/cjs/Table/AutoTable/styles.module.scss.js +1 -1
  7. package/dist/cjs/TablePagination/index.js +21 -8
  8. package/dist/cjs/index.js +11 -0
  9. package/dist/cjs/styles/createPalette.js +11 -0
  10. package/dist/cjs/styles/entrypoint.scss.js +7 -0
  11. package/dist/cjs/styles.css +1 -1
  12. package/dist/cjs/unstable/Card/components.js +213 -0
  13. package/dist/cjs/unstable/Card/state.js +53 -0
  14. package/dist/cjs/unstable/Card/styles.module.scss.js +1 -1
  15. package/dist/cjs/unstable/StatCard/index.js +124 -0
  16. package/dist/cjs/unstable/StatCard/index.module.scss.js +7 -0
  17. package/dist/cjs/unstable/index.js +39 -13
  18. package/dist/cjs/unstable/skeleton/index.js +74 -0
  19. package/dist/cjs/unstable/skeleton/index.module.scss.js +7 -0
  20. package/dist/cjs/unstable/suspense/index.js +18 -0
  21. package/dist/cjs/unstable/suspense/index.module.scss.js +7 -0
  22. package/dist/cjs/unstable/suspense/loader.js +23 -0
  23. package/dist/esm/Dialog/components.js +28 -89
  24. package/dist/esm/Dialog/state.js +2 -8
  25. package/dist/esm/Dialog/styles.module.scss.js +2 -2
  26. package/dist/esm/FileUploader/controlled.js +7 -0
  27. package/dist/esm/Table/AutoTable/controlled.js +2 -1
  28. package/dist/esm/Table/AutoTable/styles.module.scss.js +1 -1
  29. package/dist/esm/TablePagination/index.js +21 -8
  30. package/dist/esm/index.js +1 -1
  31. package/dist/esm/styles/createPalette.js +1 -1
  32. package/dist/esm/styles/entrypoint.scss.js +3 -0
  33. package/dist/esm/styles.css +1 -1
  34. package/dist/esm/unstable/Card/components.js +182 -0
  35. package/dist/esm/unstable/Card/state.js +30 -0
  36. package/dist/esm/unstable/Card/styles.module.scss.js +1 -1
  37. package/dist/esm/unstable/StatCard/index.js +116 -0
  38. package/dist/esm/unstable/StatCard/index.module.scss.js +3 -0
  39. package/dist/esm/unstable/index.js +5 -1
  40. package/dist/esm/unstable/skeleton/index.js +69 -0
  41. package/dist/esm/unstable/skeleton/index.module.scss.js +3 -0
  42. package/dist/esm/unstable/suspense/index.js +15 -0
  43. package/dist/esm/unstable/suspense/index.module.scss.js +3 -0
  44. package/dist/esm/unstable/suspense/loader.js +20 -0
  45. package/dist/types/Dialog/components.d.ts +27 -20
  46. package/dist/types/Dialog/factory.d.ts +4 -5
  47. package/dist/types/Dialog/state.d.ts +1 -15
  48. package/dist/types/TablePagination/index.d.ts +1 -1
  49. package/dist/types/styles/createPalette.d.ts +13 -2
  50. package/dist/types/unstable/Card/components.d.ts +90 -0
  51. package/dist/types/unstable/Card/index.d.ts +2 -11
  52. package/dist/types/unstable/Card/state.d.ts +20 -0
  53. package/dist/types/unstable/StatCard/index.d.ts +33 -0
  54. package/dist/types/unstable/index.d.ts +3 -0
  55. package/dist/types/unstable/skeleton/index.d.ts +15 -0
  56. package/dist/types/unstable/suspense/index.d.ts +9 -0
  57. package/dist/types/unstable/suspense/loader.d.ts +7 -0
  58. package/package.json +1 -7
  59. package/dist/cjs/unstable/Card/index.js +0 -33
  60. package/dist/esm/unstable/Card/index.js +0 -29
@@ -17,10 +17,10 @@ require('../styles/defaultTheme.js');
17
17
  require('../styles/provider.client.js');
18
18
  var portal = require('../styles/portal.js');
19
19
  require('../styles/css-vars.js');
20
- var index$1 = require('../Button/index.js');
21
- var index = require('../Typography/index.js');
22
- var index$2 = require('../IconButton/index.js');
20
+ var index = require('../Button/index.js');
21
+ var index$1 = require('../IconButton/index.js');
23
22
  var internal = require('../Icon/internal.js');
23
+ var components = require('../unstable/Card/components.js');
24
24
 
25
25
  function _interopNamespaceDefault(e) {
26
26
  var n = Object.create(null);
@@ -50,9 +50,18 @@ const Dialog = React__namespace.forwardRef(function Dialog2({
50
50
  overlayClassName,
51
51
  lockScroll = true,
52
52
  disableAutoFocus = false,
53
- "data-testid": dataTestId,
54
- ...options
53
+ open,
54
+ onDismiss,
55
+ preventOutsideDismiss,
56
+ preventEscapeDismiss,
57
+ ...props
55
58
  }, propRef) {
59
+ const options = {
60
+ open,
61
+ onDismiss,
62
+ preventOutsideDismiss,
63
+ preventEscapeDismiss
64
+ };
56
65
  const dialog = state.useDialog(options);
57
66
  const { isMounted: overlayIsMounted, styles: overlayTransitionStyles } = react.useTransitionStyles(dialog.context, {
58
67
  duration: 225,
@@ -84,13 +93,11 @@ const Dialog = React__namespace.forwardRef(function Dialog2({
84
93
  context: dialog.context,
85
94
  disabled: disableAutoFocus,
86
95
  children: /* @__PURE__ */ jsxRuntime.jsx(portal.PortalThemeRelay, { children: /* @__PURE__ */ jsxRuntime.jsx(
87
- "div",
96
+ components.default,
88
97
  {
89
98
  ref,
90
- "aria-labelledby": dialog.labelId,
91
- "aria-describedby": dialog.descriptionId,
92
99
  ...dialog.getFloatingProps(),
93
- "data-testid": dataTestId,
100
+ ...props,
94
101
  style: {
95
102
  ...innerTransitionStyles,
96
103
  ...style
@@ -108,109 +115,41 @@ const Dialog = React__namespace.forwardRef(function Dialog2({
108
115
  });
109
116
  const DialogStart = React__namespace.forwardRef(
110
117
  function DialogStart2({ children, ...props }, ref) {
111
- return /* @__PURE__ */ jsxRuntime.jsx(
112
- "div",
113
- {
114
- ref,
115
- ...props,
116
- className: cx.cx(styles_module.default["dialog-start"], props.className),
117
- children
118
- }
119
- );
118
+ return /* @__PURE__ */ jsxRuntime.jsx(components.CardStart, { ref, ...props, children });
120
119
  }
121
120
  );
122
121
  const DialogContent = React__namespace.forwardRef(function DialogContent2({ children, ...props }, ref) {
123
- return /* @__PURE__ */ jsxRuntime.jsx(
124
- "div",
125
- {
126
- ...props,
127
- ref,
128
- className: cx.cx(styles_module.default["dialog-content"], props.className),
129
- children
130
- }
131
- );
122
+ return /* @__PURE__ */ jsxRuntime.jsx(components.CardContent, { ref, ...props, children });
132
123
  });
133
124
  const DialogEnd = React__namespace.forwardRef(
134
125
  function DialogEnd2({ children, ...props }, ref) {
135
- return /* @__PURE__ */ jsxRuntime.jsx(
136
- "div",
137
- {
138
- ref,
139
- ...props,
140
- className: cx.cx(styles_module.default["dialog-end"], props.className),
141
- children
142
- }
143
- );
126
+ return /* @__PURE__ */ jsxRuntime.jsx(components.CardEnd, { ref, ...props, children });
144
127
  }
145
128
  );
146
- const DialogTitle = React__namespace.forwardRef(function DialogTitle2({ children, ...props }, ref) {
147
- const { setLabelId } = state.useDialogContext();
148
- const id = React__namespace.useId();
149
- React__namespace.useLayoutEffect(() => {
150
- setLabelId(id);
151
- return () => setLabelId(void 0);
152
- }, [id, setLabelId]);
153
- return /* @__PURE__ */ jsxRuntime.jsx(DialogStart, { children: /* @__PURE__ */ jsxRuntime.jsx(
154
- index.default,
129
+ const DialogTitle = React__namespace.forwardRef(function DialogTitle2({ children, className, ...props }, ref) {
130
+ return /* @__PURE__ */ jsxRuntime.jsx(
131
+ components.CardTitle,
155
132
  {
156
- variant: "h4",
157
- color: "primary",
158
133
  ref,
159
- id,
160
- leadingTrim: true,
134
+ className: cx.cx(className, styles_module.default["dialog-title"]),
161
135
  ...props,
162
- className: cx.cx(styles_module.default["dialog-title"], props.className),
163
136
  children
164
137
  }
165
- ) });
138
+ );
166
139
  });
167
140
  const DialogTypography = React__namespace.forwardRef(function DialogTypography2({ children, ...props }, ref) {
168
- return /* @__PURE__ */ jsxRuntime.jsx(
169
- index.default,
170
- {
171
- variant: "paragraph2",
172
- color: "primary",
173
- ...props,
174
- ref,
175
- className: cx.cx(styles_module.default["dialog-typography"], props.className),
176
- children
177
- }
178
- );
141
+ return /* @__PURE__ */ jsxRuntime.jsx(components.CardTypography, { ref, ...props, children });
179
142
  });
180
143
  const DialogDescription = React__namespace.forwardRef(function DialogDescription2({ children, ...props }, ref) {
181
- const { setDescriptionId } = state.useDialogContext();
182
- const id = React__namespace.useId();
183
- React__namespace.useLayoutEffect(() => {
184
- setDescriptionId(id);
185
- return () => setDescriptionId(void 0);
186
- }, [id, setDescriptionId]);
187
- return /* @__PURE__ */ jsxRuntime.jsx(
188
- DialogTypography,
189
- {
190
- variant: "paragraph2",
191
- color: "primary",
192
- ...props,
193
- ref,
194
- id,
195
- children
196
- }
197
- );
144
+ return /* @__PURE__ */ jsxRuntime.jsx(components.CardDescription, { ref, ...props, children });
198
145
  });
199
146
  const DialogActions = React__namespace.forwardRef(function DialogActions2({ children, ...props }, ref) {
200
- return /* @__PURE__ */ jsxRuntime.jsx(DialogEnd, { children: /* @__PURE__ */ jsxRuntime.jsx(
201
- "div",
202
- {
203
- ...props,
204
- ref,
205
- className: cx.cx(styles_module.default["dialog-actions"], props.className),
206
- children
207
- }
208
- ) });
147
+ return /* @__PURE__ */ jsxRuntime.jsx(components.CardActions, { ref, ...props, children });
209
148
  });
210
149
  const DialogCloseButton = React__namespace.forwardRef(function DialogCloseButton2(props, ref) {
211
150
  const { dismiss } = state.useDialogContext();
212
151
  return /* @__PURE__ */ jsxRuntime.jsx(
213
- index$1.default,
152
+ index.default,
214
153
  {
215
154
  variant: "tertiary",
216
155
  ...props,
@@ -225,7 +164,7 @@ const DialogCloseButton = React__namespace.forwardRef(function DialogCloseButton
225
164
  const DialogCloseIconButton = React__namespace.forwardRef(function DialogCloseIconButton2({ children = /* @__PURE__ */ jsxRuntime.jsx(internal.CloseIcon, {}), ...props }, ref) {
226
165
  const { dismiss } = state.useDialogContext();
227
166
  return /* @__PURE__ */ jsxRuntime.jsx(
228
- index$2.default,
167
+ index$1.default,
229
168
  {
230
169
  ...props,
231
170
  ref,
@@ -30,8 +30,6 @@ function useDialog({
30
30
  preventOutsideDismiss,
31
31
  preventEscapeDismiss
32
32
  }) {
33
- const [labelId, setLabelId] = React__namespace.useState();
34
- const [descriptionId, setDescriptionId] = React__namespace.useState();
35
33
  const data = react.useFloating({
36
34
  open,
37
35
  onOpenChange: (newOpen) => !newOpen && typeof dismissDialog === "function" && dismissDialog()
@@ -49,13 +47,9 @@ function useDialog({
49
47
  open,
50
48
  dismiss: dismissDialog,
51
49
  ...interactions,
52
- ...data,
53
- labelId,
54
- descriptionId,
55
- setLabelId,
56
- setDescriptionId
50
+ ...data
57
51
  }),
58
- [open, dismissDialog, interactions, data, labelId, descriptionId]
52
+ [open, dismissDialog, interactions, data]
59
53
  );
60
54
  }
61
55
  const DialogContext = React__namespace.createContext(null);
@@ -2,6 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var css = {"dialog-overlay":"vt_ce_Dialog_dialog-overlay__9285b892","dialog":"vt_ce_Dialog_dialog__6471c2e3","dialog-start":"vt_ce_Dialog_dialog-start__3d0c37c9","dialog-end":"vt_ce_Dialog_dialog-end__d33601cf","dialog-content":"vt_ce_Dialog_dialog-content__237fe65e","dialog-title":"vt_ce_Dialog_dialog-title__d88ef551","dialog-typography":"vt_ce_Dialog_dialog-typography__94d06942","dialog-actions":"vt_ce_Dialog_dialog-actions__e259c208"};
5
+ var styles = {"dialog-overlay":"vt_ce_Dialog_dialog-overlay__9285b892","dialog":"vt_ce_Dialog_dialog__6471c2e3","dialog-title":"vt_ce_Dialog_dialog-title__d88ef551"};
6
6
 
7
- exports.default = css;
7
+ exports.default = styles;
@@ -18,7 +18,14 @@ var index$2 = require('../IconButton/index.js');
18
18
  var wrappers = require('../Icon/wrappers.js');
19
19
  require('../Icon/factory.js');
20
20
  var styles_module = require('./styles.module.scss.js');
21
+ require('../unstable/Breadcrumbs/index.js');
22
+ require('../unstable/Card/components.js');
21
23
  var index$1 = require('../unstable/LinearProgress/index.js');
24
+ require('@mui/material');
25
+ require('../FormControl/index.js');
26
+ require('../ErrorBoundary/index.js');
27
+ require('../Button/index.js');
28
+ require('../unstable/Tabs/index.js');
22
29
 
23
30
  const CloudUploadOutlinedIcon = wrappers.adaptMuiSvgIcon(iconsMaterial.CloudUploadOutlined);
24
31
  const DeleteOutlineIcon = wrappers.adaptMuiSvgIcon(iconsMaterial.DeleteOutline);
@@ -84,7 +84,8 @@ function ControlledAutoTable({
84
84
  const size = rowsPerPage ?? 10;
85
85
  table.setPageSize(size);
86
86
  options.onRowsPerPageChange(size);
87
- }
87
+ },
88
+ className: styles_module.default.pagination
88
89
  }
89
90
  ) }) }) })
90
91
  ]
@@ -2,6 +2,6 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var styles = {"visuallyHidden":"vt_ce_AutoTable_visuallyHidden__d42457bf","errorContainer":"vt_ce_AutoTable_errorContainer__22629d1a","loadingContainer":"vt_ce_AutoTable_loadingContainer__800e1c5c","table":"vt_ce_AutoTable_table__abdcf037","stickyHeader":"vt_ce_AutoTable_stickyHeader__1fdfff7b","virtualTableBody":"vt_ce_AutoTable_virtualTableBody__1264b0bb"};
5
+ var styles = {"visuallyHidden":"vt_ce_AutoTable_visuallyHidden__d42457bf","errorContainer":"vt_ce_AutoTable_errorContainer__22629d1a","loadingContainer":"vt_ce_AutoTable_loadingContainer__800e1c5c","table":"vt_ce_AutoTable_table__abdcf037","stickyHeader":"vt_ce_AutoTable_stickyHeader__1fdfff7b","virtualTableBody":"vt_ce_AutoTable_virtualTableBody__1264b0bb","pagination":"vt_ce_AutoTable_pagination__1b911403"};
6
6
 
7
7
  exports.default = styles;
@@ -13,6 +13,13 @@ var uncontrolled = require('../Select/uncontrolled.js');
13
13
  var React = require('react');
14
14
  var index$1 = require('../Input/index.js');
15
15
  var index = require('../FormControl/index.js');
16
+ var cx = require('../styles/cx.js');
17
+ require('../styles/defaultThemeOptions.js');
18
+ require('@capsizecss/core');
19
+ require('color2k');
20
+ require('../styles/defaultTheme.js');
21
+ require('../styles/provider.client.js');
22
+ require('../styles/css-vars.js');
16
23
 
17
24
  function TablePagination({
18
25
  page,
@@ -22,6 +29,12 @@ function TablePagination({
22
29
  rowsPerPageLabel = "Rows per page:",
23
30
  rowsPerPageVariant = "normal",
24
31
  showPageNumberInput = false,
32
+ onChangePage,
33
+ onRowsPerPageChange,
34
+ "data-pendo-prev": dataPendoPrev,
35
+ "data-pendo-next": dataPendoNext,
36
+ "data-pendo-select": dataPendoSelect,
37
+ className,
25
38
  ...props
26
39
  }) {
27
40
  const showPrev = page !== 1;
@@ -39,7 +52,7 @@ function TablePagination({
39
52
  Math.min(Math.ceil(count / rowsPerPage), Number(inputPage))
40
53
  );
41
54
  if (newPage !== page) {
42
- props.onChangePage(newPage);
55
+ onChangePage(newPage);
43
56
  }
44
57
  setInputPage(newPage.toString());
45
58
  };
@@ -51,7 +64,7 @@ function TablePagination({
51
64
  React.useEffect(() => {
52
65
  setInputPage(page.toString());
53
66
  }, [page]);
54
- return /* @__PURE__ */ jsxRuntime.jsxs("nav", { className: styles_module.default["container"], children: [
67
+ return /* @__PURE__ */ jsxRuntime.jsxs("nav", { ...props, className: cx.cx(styles_module.default["container"], className), children: [
55
68
  /* @__PURE__ */ jsxRuntime.jsx(index.default, { label: rowsPerPageLabel, placement: "inline-start", children: /* @__PURE__ */ jsxRuntime.jsx(
56
69
  uncontrolled.default,
57
70
  {
@@ -62,9 +75,9 @@ function TablePagination({
62
75
  label: option.toLocaleString(),
63
76
  value: option
64
77
  })),
65
- onChange: (_, newRowsPerPage) => props.onRowsPerPageChange?.(newRowsPerPage),
78
+ onChange: (_, newRowsPerPage) => onRowsPerPageChange?.(newRowsPerPage),
66
79
  className: styles_module.default["rows-per-page-select"],
67
- "data-pendo": props["data-pendo-select"],
80
+ "data-pendo": dataPendoSelect,
68
81
  tight: rowsPerPageVariant === "tight"
69
82
  }
70
83
  ) }),
@@ -93,8 +106,8 @@ function TablePagination({
93
106
  {
94
107
  type: "button",
95
108
  disabled: !showPrev,
96
- onClick: () => props.onChangePage(page - 1),
97
- "data-pendo": props["data-pendo-prev"],
109
+ onClick: () => onChangePage(page - 1),
110
+ "data-pendo": dataPendoPrev,
98
111
  children: /* @__PURE__ */ jsxRuntime.jsx(internal.NavigateBeforeIcon, {})
99
112
  }
100
113
  ) }),
@@ -103,8 +116,8 @@ function TablePagination({
103
116
  {
104
117
  type: "button",
105
118
  disabled: !showNext,
106
- onClick: () => props.onChangePage(page + 1),
107
- "data-pendo": props["data-pendo-next"],
119
+ onClick: () => onChangePage(page + 1),
120
+ "data-pendo": dataPendoNext,
108
121
  children: /* @__PURE__ */ jsxRuntime.jsx(internal.NavigateNextIcon, {})
109
122
  }
110
123
  ) })
package/dist/cjs/index.js CHANGED
@@ -71,6 +71,17 @@ exports.useTheme = useTheme.default;
71
71
  exports.TypographyVariantKeys = typography.TypographyVariantKeys;
72
72
  exports.PortalThemeRelay = portal.PortalThemeRelay;
73
73
  exports.createPalette = createPalette.createPalette;
74
+ exports.createPaletteAction = createPalette.createPaletteAction;
75
+ exports.createPaletteActionVariantsColors = createPalette.createPaletteActionVariantsColors;
76
+ exports.createPaletteBackground = createPalette.createPaletteBackground;
77
+ exports.createPaletteBrand = createPalette.createPaletteBrand;
78
+ exports.createPaletteColor = createPalette.createPaletteColor;
79
+ exports.createPaletteIndicator = createPalette.createPaletteIndicator;
80
+ exports.createPaletteStroke = createPalette.createPaletteStroke;
81
+ exports.createPaletteSurfaceColors = createPalette.createPaletteSurfaceColors;
82
+ exports.createPaletteTable = createPalette.createPaletteTable;
83
+ exports.createPaletteText = createPalette.createPaletteText;
84
+ exports.createPaletteTooltip = createPalette.createPaletteTooltip;
74
85
  exports.createTypography = createTypography.createTypography;
75
86
  exports.ThemeContext = provider_client.ThemeContext;
76
87
  exports.ThemeContextProvider = provider_client.ThemeContextProvider;
@@ -225,3 +225,14 @@ function createPalette(options = {}) {
225
225
  }
226
226
 
227
227
  exports.createPalette = createPalette;
228
+ exports.createPaletteAction = createPaletteAction;
229
+ exports.createPaletteActionVariantsColors = createPaletteActionVariantsColors;
230
+ exports.createPaletteBackground = createPaletteBackground;
231
+ exports.createPaletteBrand = createPaletteBrand;
232
+ exports.createPaletteColor = createPaletteColor;
233
+ exports.createPaletteIndicator = createPaletteIndicator;
234
+ exports.createPaletteStroke = createPaletteStroke;
235
+ exports.createPaletteSurfaceColors = createPaletteSurfaceColors;
236
+ exports.createPaletteTable = createPaletteTable;
237
+ exports.createPaletteText = createPaletteText;
238
+ exports.createPaletteTooltip = createPaletteTooltip;
@@ -0,0 +1,7 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var undefined$1 = undefined;
6
+
7
+ exports.default = undefined$1;