@veritone-ce/design-system 2.3.13 → 2.4.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 (59) hide show
  1. package/dist/cjs/StatusChip/index.js +65 -0
  2. package/dist/cjs/StatusChip/styles.module.scss.js +7 -0
  3. package/dist/cjs/Table/AutoTable/common.js +144 -0
  4. package/dist/cjs/Table/AutoTable/controlled.js +102 -0
  5. package/dist/cjs/Table/AutoTable/index.js +110 -0
  6. package/dist/cjs/Table/AutoTable/virtual.js +177 -0
  7. package/dist/cjs/Table/TableCell/index.js +50 -0
  8. package/dist/cjs/Table/TableCell/styles.module.scss.js +7 -0
  9. package/dist/cjs/Table/TableRow/index.js +34 -0
  10. package/dist/cjs/Table/TableRow/styles.module.scss.js +7 -0
  11. package/dist/cjs/Table/index.js +76 -0
  12. package/dist/cjs/Table/styles.module.scss.js +7 -0
  13. package/dist/cjs/Tooltip/index.js +38 -26
  14. package/dist/cjs/Tooltip/styles.module.scss.js +1 -1
  15. package/dist/cjs/Typography/index.js +4 -2
  16. package/dist/cjs/Typography/variants.module.scss.js +1 -1
  17. package/dist/cjs/index.js +27 -10
  18. package/dist/cjs/styles/createPalette.js +24 -4
  19. package/dist/cjs/styles/typography.js +9 -1
  20. package/dist/cjs/styles.css +1 -1
  21. package/dist/esm/StatusChip/index.js +61 -0
  22. package/dist/esm/StatusChip/styles.module.scss.js +3 -0
  23. package/dist/esm/Table/AutoTable/common.js +138 -0
  24. package/dist/esm/Table/AutoTable/controlled.js +98 -0
  25. package/dist/esm/Table/AutoTable/index.js +106 -0
  26. package/dist/esm/Table/AutoTable/virtual.js +172 -0
  27. package/dist/esm/Table/TableCell/index.js +46 -0
  28. package/dist/esm/Table/TableCell/styles.module.scss.js +3 -0
  29. package/dist/esm/Table/TableRow/index.js +30 -0
  30. package/dist/esm/Table/TableRow/styles.module.scss.js +3 -0
  31. package/dist/esm/Table/index.js +69 -0
  32. package/dist/esm/Table/styles.module.scss.js +3 -0
  33. package/dist/esm/Tooltip/index.js +38 -26
  34. package/dist/esm/Tooltip/styles.module.scss.js +1 -1
  35. package/dist/esm/Typography/index.js +4 -2
  36. package/dist/esm/Typography/variants.module.scss.js +1 -1
  37. package/dist/esm/index.js +6 -0
  38. package/dist/esm/styles/createPalette.js +24 -4
  39. package/dist/esm/styles/scss/theme.generated.scss +83 -17
  40. package/dist/esm/styles/typography.js +9 -1
  41. package/dist/esm/styles.css +1 -1
  42. package/dist/types/Checkbox/index.d.ts +2 -0
  43. package/dist/types/Dialog/components.d.ts +50 -6
  44. package/dist/types/Drawer/components.d.ts +50 -5
  45. package/dist/types/StatusChip/index.d.ts +12 -0
  46. package/dist/types/Table/AutoTable/common.d.ts +31 -0
  47. package/dist/types/Table/AutoTable/controlled.d.ts +13 -0
  48. package/dist/types/Table/AutoTable/index.d.ts +47 -0
  49. package/dist/types/Table/AutoTable/types.d.ts +106 -0
  50. package/dist/types/Table/AutoTable/virtual.d.ts +23 -0
  51. package/dist/types/Table/TableCell/index.d.ts +14 -0
  52. package/dist/types/Table/TableRow/index.d.ts +10 -0
  53. package/dist/types/Table/index.d.ts +68 -0
  54. package/dist/types/Typography/index.d.ts +11 -3
  55. package/dist/types/index.d.ts +10 -0
  56. package/dist/types/styles/createPalette.d.ts +2 -0
  57. package/dist/types/styles/palette.d.ts +2 -0
  58. package/dist/types/styles/typography.d.ts +1 -1
  59. package/package.json +2 -1
@@ -0,0 +1,106 @@
1
+ 'use strict';
2
+ 'use client';
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import React__default from 'react';
5
+ import VirtualControlledAutoTable from './virtual.js';
6
+ import ControlledAutoTable from './controlled.js';
7
+ import '@tanstack/react-table';
8
+ import '../TableCell/index.js';
9
+ import '@mui/material';
10
+
11
+ function AutoTable(props) {
12
+ const enableSorting = props.enableSorting ?? true;
13
+ const [managedSorting, setManagedSorting] = useManagedStateSwitch(
14
+ props.sorting,
15
+ props.onSortingChange,
16
+ props.defaultSorting ?? []
17
+ );
18
+ const enableRowSelection = props.enableRowSelection ?? props.rowSelection !== void 0;
19
+ const [managedRowSelection, setManagedRowSelection] = useManagedStateSwitch(
20
+ props.rowSelection,
21
+ props.onRowSelectionChange,
22
+ {}
23
+ );
24
+ const enablePagination = props.enablePagination ?? true;
25
+ const [managedPage, setManagedPage] = useManagedStateSwitch(
26
+ props.page,
27
+ props.onPageChange,
28
+ 0
29
+ );
30
+ const [managedRowsPerPage, setManagedRowsPerPage] = useManagedStateSwitch(
31
+ props.rowsPerPage,
32
+ props.onRowsPerPageChange,
33
+ 10
34
+ );
35
+ const options = {
36
+ data: props.data,
37
+ columns: props.columns,
38
+ meta: props.meta,
39
+ getRowId: props.getRowId,
40
+ // sorting
41
+ sorting: managedSorting,
42
+ enableSorting,
43
+ onSortingChange: setManagedSorting,
44
+ manualSorting: props.manualSorting,
45
+ // selection
46
+ rowSelection: managedRowSelection,
47
+ enableRowSelection,
48
+ onRowSelectionChange: setManagedRowSelection,
49
+ // pagination
50
+ pagination: {
51
+ pageIndex: managedPage,
52
+ pageSize: enablePagination ? managedRowsPerPage : props.data.length
53
+ },
54
+ enablePagination,
55
+ onPageChange: setManagedPage,
56
+ onRowsPerPageChange: setManagedRowsPerPage,
57
+ manualPagination: props.manualRowCount !== void 0,
58
+ manualRowCount: props.manualRowCount
59
+ };
60
+ if (props.virtualizer) {
61
+ return /* @__PURE__ */ jsx(
62
+ VirtualControlledAutoTable,
63
+ {
64
+ ...options,
65
+ ...props.virtualizer,
66
+ stickyHeader: props.stickyHeader,
67
+ loading: props.loading,
68
+ zeroStateMessage: props.zeroStateMessage,
69
+ error: props.error,
70
+ ErrorContainer: props.ErrorContainer,
71
+ sx: props.sx,
72
+ className: props.className
73
+ }
74
+ );
75
+ }
76
+ return /* @__PURE__ */ jsx(
77
+ ControlledAutoTable,
78
+ {
79
+ ...options,
80
+ stickyHeader: props.stickyHeader,
81
+ loading: props.loading,
82
+ zeroStateMessage: props.zeroStateMessage,
83
+ error: props.error,
84
+ ErrorContainer: props.ErrorContainer,
85
+ className: props.className
86
+ }
87
+ );
88
+ }
89
+ function useManagedStateSwitch(controlled, setControlled, uncontrolledDefault) {
90
+ const [uncontrolled, setUncontrolled] = React__default.useState(uncontrolledDefault);
91
+ const [managed, setManaged] = controlled !== void 0 ? [
92
+ controlled,
93
+ (u) => {
94
+ setControlled?.(u);
95
+ }
96
+ ] : [
97
+ uncontrolled,
98
+ (u) => {
99
+ setUncontrolled(u);
100
+ setControlled?.(u);
101
+ }
102
+ ];
103
+ return [managed, setManaged];
104
+ }
105
+
106
+ export { AutoTable as default };
@@ -0,0 +1,172 @@
1
+ 'use strict';
2
+ 'use client';
3
+ import { jsxs, jsx } from 'react/jsx-runtime';
4
+ import { flexRender } from '@tanstack/react-table';
5
+ import { Table, TableHead, TableSortLabel, TableBody, TableMessage } from '../index.js';
6
+ import TableRow from '../TableRow/index.js';
7
+ import TableCell from '../TableCell/index.js';
8
+ import React__default from 'react';
9
+ import { styled, Box, CircularProgress } from '@mui/material';
10
+ import { visuallyHidden } from '@mui/utils';
11
+ import { useAutoTable, DefaultErrorContainer } from './common.js';
12
+ import { useVirtualizer } from '@tanstack/react-virtual';
13
+ import isPropValid from '@emotion/is-prop-valid';
14
+
15
+ const TableMessageMaxHeight = 100;
16
+ const TableContainer = styled(Box, {
17
+ shouldForwardProp: (prop) => isPropValid(prop)
18
+ })(({ virtualizerTotalHeight }) => ({
19
+ height: `${virtualizerTotalHeight}px`
20
+ }));
21
+ function VirtualControlledAutoTable({
22
+ stickyHeader,
23
+ loading,
24
+ zeroStateMessage,
25
+ error,
26
+ ErrorContainer = DefaultErrorContainer,
27
+ scrollOffset,
28
+ getScrollElement,
29
+ renderWhenNotVisible = true,
30
+ rowSize,
31
+ headerSize = 50,
32
+ overscan,
33
+ debug,
34
+ sx,
35
+ className,
36
+ ...options
37
+ }) {
38
+ const table = useAutoTable(options);
39
+ const { rows } = table.getRowModel();
40
+ const offsetFromScrollEl = scrollOffset ?? 0;
41
+ const virtualizer = useVirtualizer({
42
+ getScrollElement,
43
+ scrollMargin: offsetFromScrollEl,
44
+ count: rows.length,
45
+ overscan: overscan ?? 10,
46
+ estimateSize: () => rowSize
47
+ });
48
+ const showMessage = error || loading || rows.length === 0;
49
+ const rowsHeight = rows.length * rowSize;
50
+ const totalHeight = headerSize + (showMessage ? TableMessageMaxHeight : rowsHeight);
51
+ const visibilityOverscan = virtualizer.options.overscan * rowSize;
52
+ const visibilityBounds = {
53
+ lower: offsetFromScrollEl - visibilityOverscan,
54
+ upper: offsetFromScrollEl + totalHeight + visibilityOverscan
55
+ };
56
+ const tableIsVisible = renderWhenNotVisible || virtualizer.scrollOffset + virtualizer.scrollRect.height >= visibilityBounds.lower && virtualizer.scrollOffset <= visibilityBounds.upper;
57
+ const virtualItems = virtualizer.getVirtualItems();
58
+ return /* @__PURE__ */ jsxs(
59
+ TableContainer,
60
+ {
61
+ virtualizerTotalHeight: totalHeight,
62
+ sx,
63
+ className,
64
+ children: [
65
+ debug && /* @__PURE__ */ jsx("div", { style: { position: "relative" }, children: /* @__PURE__ */ jsxs(
66
+ "div",
67
+ {
68
+ style: {
69
+ position: "absolute",
70
+ top: 0,
71
+ left: 0,
72
+ color: "red",
73
+ zIndex: 100,
74
+ fontSize: 10
75
+ },
76
+ children: [
77
+ /* @__PURE__ */ jsx("span", { style: { marginRight: 5 }, children: virtualizer.scrollOffset }),
78
+ /* @__PURE__ */ jsx("span", { style: { marginRight: 5 }, children: virtualizer.scrollOffset + virtualizer.scrollRect.height }),
79
+ /* @__PURE__ */ jsx("span", { style: { marginRight: 5 }, children: offsetFromScrollEl }),
80
+ /* @__PURE__ */ jsx("span", { style: { marginRight: 5 }, children: visibilityBounds.lower }),
81
+ /* @__PURE__ */ jsx("span", { style: { marginRight: 5 }, children: visibilityBounds.upper })
82
+ ]
83
+ }
84
+ ) }),
85
+ /* @__PURE__ */ jsxs(
86
+ Table,
87
+ {
88
+ sx: {
89
+ borderCollapse: "separate",
90
+ ...stickyHeader ? {
91
+ "& th": {
92
+ position: "sticky",
93
+ top: typeof stickyHeader === "object" ? stickyHeader.offset : 0,
94
+ zIndex: 2,
95
+ backgroundColor: (theme) => theme.palette.background.default
96
+ }
97
+ } : {}
98
+ },
99
+ children: [
100
+ /* @__PURE__ */ jsx(TableHead, { sx: { height: headerSize }, children: table.getHeaderGroups().map((headerGroup) => /* @__PURE__ */ jsx(TableRow, { children: headerGroup.headers.map((header) => {
101
+ const isSorted = header.column.getIsSorted();
102
+ return /* @__PURE__ */ jsx(TableCell, { variant: "header", children: header.isPlaceholder ? null : header.column.getCanSort() ? /* @__PURE__ */ jsxs(
103
+ TableSortLabel,
104
+ {
105
+ active: isSorted !== false,
106
+ direction: isSorted !== false ? isSorted : "asc",
107
+ onClick: header.column.getToggleSortingHandler(),
108
+ children: [
109
+ flexRender(
110
+ header.column.columnDef.header,
111
+ header.getContext()
112
+ ),
113
+ isSorted !== false ? /* @__PURE__ */ jsx(Box, { component: "span", sx: visuallyHidden, children: isSorted === "desc" ? "sorted descending" : "sorted ascending" }) : null
114
+ ]
115
+ }
116
+ ) : flexRender(
117
+ header.column.columnDef.header,
118
+ header.getContext()
119
+ ) }, header.id);
120
+ }) }, headerGroup.id)) }),
121
+ showMessage ? /* @__PURE__ */ jsx(TableBody, { children: /* @__PURE__ */ jsx(TableRow, { children: /* @__PURE__ */ jsx(
122
+ TableCell,
123
+ {
124
+ colSpan: table.getAllFlatColumns().length,
125
+ children: /* @__PURE__ */ jsx(Box, { children: error ? /* @__PURE__ */ jsx(ErrorContainer, { error }) : loading ? /* @__PURE__ */ jsx(
126
+ Box,
127
+ {
128
+ sx: {
129
+ display: "flex",
130
+ justifyContent: "center",
131
+ paddingTop: "10px",
132
+ paddingBottom: "10px"
133
+ },
134
+ children: /* @__PURE__ */ jsx(CircularProgress, {})
135
+ }
136
+ ) : rows.length === 0 ? /* @__PURE__ */ jsx(TableMessage, { children: zeroStateMessage ?? "No data found" }) : null })
137
+ }
138
+ ) }) }) : tableIsVisible && /* @__PURE__ */ jsx(
139
+ TableBody,
140
+ {
141
+ sx: {
142
+ "&::after": {
143
+ display: "block",
144
+ content: "''",
145
+ // this ensures the table takes up as much size as the total elements by adding padding to the end
146
+ height: `${(rows.length - virtualItems.length) * rowSize}px`
147
+ }
148
+ },
149
+ children: virtualItems.map((virtualRow) => {
150
+ const row = rows[virtualRow.index];
151
+ return /* @__PURE__ */ jsx(
152
+ TableRow,
153
+ {
154
+ children: row.getAllCells().map((cell) => /* @__PURE__ */ jsx(React__default.Fragment, { children: flexRender(
155
+ cell.column.columnDef.cell,
156
+ cell.getContext()
157
+ ) }, cell.id))
158
+ },
159
+ row.id
160
+ );
161
+ })
162
+ }
163
+ )
164
+ ]
165
+ }
166
+ )
167
+ ]
168
+ }
169
+ );
170
+ }
171
+
172
+ export { TableMessageMaxHeight, VirtualControlledAutoTable as default };
@@ -0,0 +1,46 @@
1
+ 'use strict';
2
+ 'use client';
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import React__default, { forwardRef } from 'react';
5
+ import styles from './styles.module.scss.js';
6
+ import '@capsizecss/core';
7
+ import 'color2k';
8
+ import '../../styles/css-vars.js';
9
+ import { cx } from '../../styles/cx.js';
10
+ import '../../styles/defaultTheme.js';
11
+ import '@mui/system';
12
+ import '../../Box/index.js';
13
+ import '../../styles/styled.js';
14
+
15
+ const TableCell = forwardRef(
16
+ ({
17
+ children,
18
+ "data-testid": dataTestId,
19
+ noVerticalPadding,
20
+ variant = "data",
21
+ className,
22
+ style,
23
+ ...props
24
+ }, ref) => {
25
+ const Tag = React__default.useMemo(
26
+ () => variant === "header" ? "th" : "td",
27
+ [variant]
28
+ );
29
+ return /* @__PURE__ */ jsx(
30
+ Tag,
31
+ {
32
+ ref,
33
+ ...props,
34
+ "data-testid": dataTestId,
35
+ className: cx(styles.tableCell, className),
36
+ style: {
37
+ padding: `${noVerticalPadding ? "0px" : "14.25px"} ${"16px"}`,
38
+ ...style
39
+ },
40
+ children
41
+ }
42
+ );
43
+ }
44
+ );
45
+
46
+ export { TableCell as default };
@@ -0,0 +1,3 @@
1
+ var styles = {"tableCell":"vt_ce_TableCell_tableCell__a1247ad8"};
2
+
3
+ export { styles as default };
@@ -0,0 +1,30 @@
1
+ 'use strict';
2
+ 'use client';
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import { forwardRef } from 'react';
5
+ import styles from './styles.module.scss.js';
6
+ import '@capsizecss/core';
7
+ import 'color2k';
8
+ import '../../styles/css-vars.js';
9
+ import { cx } from '../../styles/cx.js';
10
+ import '../../styles/defaultTheme.js';
11
+ import '@mui/system';
12
+ import '../../Box/index.js';
13
+ import '../../styles/styled.js';
14
+
15
+ const TableRow = forwardRef(
16
+ ({ children, "data-testid": dataTestId, className, ...props }, ref) => {
17
+ return /* @__PURE__ */ jsx(
18
+ "tr",
19
+ {
20
+ ref,
21
+ ...props,
22
+ "data-testid": dataTestId,
23
+ className: cx(styles.tableRow, className),
24
+ children
25
+ }
26
+ );
27
+ }
28
+ );
29
+
30
+ export { TableRow as default };
@@ -0,0 +1,3 @@
1
+ var styles = {"tableRow":"vt_ce_TableRow_tableRow__20cdba2f"};
2
+
3
+ export { styles as default };
@@ -0,0 +1,69 @@
1
+ 'use strict';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { Table as Table$1, TableBody as TableBody$1, TableFooter as TableFooter$1, TableHead as TableHead$1, TableSortLabel as TableSortLabel$1 } from '@mui/material';
4
+ import Typography from '../Typography/index.js';
5
+ import styles from './styles.module.scss.js';
6
+
7
+ const Table = (props) => {
8
+ return /* @__PURE__ */ jsx(
9
+ Table$1,
10
+ {
11
+ "data-testid": props["data-testid"],
12
+ stickyHeader: props.stickyHeader,
13
+ sx: props.sx,
14
+ className: props.className,
15
+ children: props.children
16
+ }
17
+ );
18
+ };
19
+ const TableBody = (props) => {
20
+ return /* @__PURE__ */ jsx(
21
+ TableBody$1,
22
+ {
23
+ "data-testid": props["data-testid"],
24
+ sx: props.sx,
25
+ className: props.className,
26
+ children: props.children
27
+ }
28
+ );
29
+ };
30
+ const TableFooter = (props) => {
31
+ return /* @__PURE__ */ jsx(
32
+ TableFooter$1,
33
+ {
34
+ "data-testid": props["data-testid"],
35
+ sx: props.sx,
36
+ className: props.className,
37
+ children: props.children
38
+ }
39
+ );
40
+ };
41
+ const TableHead = (props) => {
42
+ return /* @__PURE__ */ jsx(
43
+ TableHead$1,
44
+ {
45
+ "data-testid": props["data-testid"],
46
+ sx: props.sx,
47
+ className: props.className,
48
+ children: props.children
49
+ }
50
+ );
51
+ };
52
+ const TableSortLabel = (props) => {
53
+ return /* @__PURE__ */ jsx(
54
+ TableSortLabel$1,
55
+ {
56
+ active: props.active,
57
+ direction: props.direction,
58
+ hideSortIcon: props.hideSortIcon,
59
+ onClick: props.onClick,
60
+ disabled: props.disabled,
61
+ children: props.children
62
+ }
63
+ );
64
+ };
65
+ const TableMessage = (props) => {
66
+ return /* @__PURE__ */ jsx("div", { className: styles.tableMessageWrapper, children: /* @__PURE__ */ jsx(Typography, { className: styles.tableMessage, children: props.children }) });
67
+ };
68
+
69
+ export { Table, TableBody, TableFooter, TableHead, TableMessage, TableSortLabel };
@@ -0,0 +1,3 @@
1
+ var styles = {"tableMessageWrapper":"vt_ce_Table_tableMessageWrapper__bd25fe47","tableMessage":"vt_ce_Table_tableMessage__f6316814","checkbox":"vt_ce_Table_checkbox__fcf60b18","selectionTableCell":"vt_ce_Table_selectionTableCell__1edf8bad"};
2
+
3
+ export { styles as default };
@@ -48,7 +48,11 @@ function Tooltip({
48
48
  });
49
49
  const role = useRole(context, { role: "tooltip" });
50
50
  const hover = useHover(context, {
51
- handleClose: safePolygon()
51
+ handleClose: safePolygon(),
52
+ restMs: 300,
53
+ // If their cursor never rests, open it after 1000ms as a
54
+ // fallback.
55
+ delay: { open: 1e3 }
52
56
  });
53
57
  const focus = useFocus(context);
54
58
  const dismiss = useDismiss(context, {
@@ -79,7 +83,7 @@ function Tooltip({
79
83
  }
80
84
  ),
81
85
  isMounted && /* @__PURE__ */ jsx(
82
- "div",
86
+ "span",
83
87
  {
84
88
  ref: refs.setFloating,
85
89
  "data-testid": dataTestId,
@@ -88,30 +92,38 @@ function Tooltip({
88
92
  },
89
93
  className: css["tooltip-float"],
90
94
  ...getFloatingProps(),
91
- children: /* @__PURE__ */ jsxs("div", { style: { ...transitionStyles }, children: [
92
- showArrow && /* @__PURE__ */ jsx(
93
- FloatingArrow,
94
- {
95
- ref: arrowRef,
96
- context,
97
- fill: defaultThemeCssVariableUsages.palette.tooltip.surface,
98
- stroke: defaultThemeCssVariableUsages.palette.tooltip.surface,
99
- strokeWidth: 1,
100
- style: { margin: "-1px" }
101
- }
102
- ),
103
- /* @__PURE__ */ jsx("div", { className: css["tooltip-body"], children: /* @__PURE__ */ jsx(
104
- Typography,
105
- {
106
- variant: "label",
107
- color: "inherit",
108
- leadingTrim,
109
- style,
110
- className: cx(css["tooltip-text"], className),
111
- children: tooltip
112
- }
113
- ) })
114
- ] })
95
+ children: /* @__PURE__ */ jsxs(
96
+ "span",
97
+ {
98
+ style: { ...transitionStyles },
99
+ className: css["tooltip-transition"],
100
+ children: [
101
+ showArrow && /* @__PURE__ */ jsx(
102
+ FloatingArrow,
103
+ {
104
+ ref: arrowRef,
105
+ context,
106
+ fill: defaultThemeCssVariableUsages.palette.tooltip.surface,
107
+ stroke: defaultThemeCssVariableUsages.palette.tooltip.surface,
108
+ strokeWidth: 1,
109
+ style: { margin: "-1px" }
110
+ }
111
+ ),
112
+ /* @__PURE__ */ jsx("span", { className: css["tooltip-body"], children: /* @__PURE__ */ jsx(
113
+ Typography,
114
+ {
115
+ as: "span",
116
+ variant: "label",
117
+ color: "inherit",
118
+ leadingTrim,
119
+ style,
120
+ className: cx(css["tooltip-text"], className),
121
+ children: tooltip
122
+ }
123
+ ) })
124
+ ]
125
+ }
126
+ )
115
127
  }
116
128
  )
117
129
  ] });
@@ -1,3 +1,3 @@
1
- var css = {"tooltip-anchor":"vt_ce_Tooltip_tooltip-anchor__a4700bfb","tooltip-float":"vt_ce_Tooltip_tooltip-float__ff012681","tooltip-body":"vt_ce_Tooltip_tooltip-body__19e91c15","tooltip-text":"vt_ce_Tooltip_tooltip-text__7d962fae"};
1
+ var css = {"tooltip-anchor":"vt_ce_Tooltip_tooltip-anchor__a4700bfb","tooltip-float":"vt_ce_Tooltip_tooltip-float__ff012681","tooltip-transition":"vt_ce_Tooltip_tooltip-transition__4ac21924","tooltip-body":"vt_ce_Tooltip_tooltip-body__19e91c15","tooltip-text":"vt_ce_Tooltip_tooltip-text__7d962fae"};
2
2
 
3
3
  export { css as default };
@@ -13,13 +13,14 @@ import styles from './variants.module.scss.js';
13
13
 
14
14
  const Typography = forwardRef(
15
15
  ({
16
+ as,
16
17
  variant = "paragraph1",
17
18
  color = "primary",
18
19
  leadingTrim = false,
19
20
  ...props
20
21
  }, ref) => {
21
22
  const variantCn = !leadingTrim ? styles[`t-${variant}`] : styles[`t-${variant}-trim`];
22
- const VariantComponent = props.as ?? variantComponents[variant];
23
+ const VariantComponent = as ?? variantComponents[variant];
23
24
  const colorCn = styles[`c-${color}`];
24
25
  return React__default.createElement(VariantComponent, {
25
26
  ...props,
@@ -41,7 +42,8 @@ const variantComponents = {
41
42
  paragraph3: "p",
42
43
  button: "span",
43
44
  buttonSmall: "span",
44
- input: "span"
45
+ input: "span",
46
+ statusChip: "span"
45
47
  };
46
48
 
47
49
  export { Typography as default };
@@ -1,3 +1,3 @@
1
- var styles = {"t-title":"vt_ce_Typography_t-title__3cbea11b","t-title-trim":"vt_ce_Typography_t-title-trim__28bcad4d","t-h1":"vt_ce_Typography_t-h1__8953782d","t-h1-trim":"vt_ce_Typography_t-h1-trim__c62483c9","t-h2":"vt_ce_Typography_t-h2__f2534173","t-h2-trim":"vt_ce_Typography_t-h2-trim__5563b7ae","t-h3":"vt_ce_Typography_t-h3__cdff4f67","t-h3-trim":"vt_ce_Typography_t-h3-trim__0017200e","t-h4":"vt_ce_Typography_t-h4__0acb0595","t-h4-trim":"vt_ce_Typography_t-h4-trim__289878da","t-label":"vt_ce_Typography_t-label__0e84833e","t-label-trim":"vt_ce_Typography_t-label-trim__8e002adc","t-paragraph1":"vt_ce_Typography_t-paragraph1__4a6ca0f2","t-paragraph1-trim":"vt_ce_Typography_t-paragraph1-trim__1d97d797","t-paragraph2":"vt_ce_Typography_t-paragraph2__114e0304","t-paragraph2-trim":"vt_ce_Typography_t-paragraph2-trim__8ca4dfc5","t-paragraph3":"vt_ce_Typography_t-paragraph3__9ce2d2b8","t-paragraph3-trim":"vt_ce_Typography_t-paragraph3-trim__e1fbe9a5","t-button":"vt_ce_Typography_t-button__de9ce92c","t-button-trim":"vt_ce_Typography_t-button-trim__2c6a3dfb","t-buttonSmall":"vt_ce_Typography_t-buttonSmall__48799340","t-buttonSmall-trim":"vt_ce_Typography_t-buttonSmall-trim__af5b6ddb","t-input":"vt_ce_Typography_t-input__3c546dd2","t-input-trim":"vt_ce_Typography_t-input-trim__16e63d90","c-primary":"vt_ce_Typography_c-primary__9abbeb28","c-secondary":"vt_ce_Typography_c-secondary__54db5189","c-tertiary":"vt_ce_Typography_c-tertiary__580276de","c-disabled":"vt_ce_Typography_c-disabled__01eb87d1","c-inherit":"vt_ce_Typography_c-inherit__d9a71622"};
1
+ var styles = {"t-title":"vt_ce_Typography_t-title__3cbea11b","t-title-trim":"vt_ce_Typography_t-title-trim__28bcad4d","t-h1":"vt_ce_Typography_t-h1__8953782d","t-h1-trim":"vt_ce_Typography_t-h1-trim__c62483c9","t-h2":"vt_ce_Typography_t-h2__f2534173","t-h2-trim":"vt_ce_Typography_t-h2-trim__5563b7ae","t-h3":"vt_ce_Typography_t-h3__cdff4f67","t-h3-trim":"vt_ce_Typography_t-h3-trim__0017200e","t-h4":"vt_ce_Typography_t-h4__0acb0595","t-h4-trim":"vt_ce_Typography_t-h4-trim__289878da","t-label":"vt_ce_Typography_t-label__0e84833e","t-label-trim":"vt_ce_Typography_t-label-trim__8e002adc","t-paragraph1":"vt_ce_Typography_t-paragraph1__4a6ca0f2","t-paragraph1-trim":"vt_ce_Typography_t-paragraph1-trim__1d97d797","t-paragraph2":"vt_ce_Typography_t-paragraph2__114e0304","t-paragraph2-trim":"vt_ce_Typography_t-paragraph2-trim__8ca4dfc5","t-paragraph3":"vt_ce_Typography_t-paragraph3__9ce2d2b8","t-paragraph3-trim":"vt_ce_Typography_t-paragraph3-trim__e1fbe9a5","t-button":"vt_ce_Typography_t-button__de9ce92c","t-button-trim":"vt_ce_Typography_t-button-trim__2c6a3dfb","t-buttonSmall":"vt_ce_Typography_t-buttonSmall__48799340","t-buttonSmall-trim":"vt_ce_Typography_t-buttonSmall-trim__af5b6ddb","t-input":"vt_ce_Typography_t-input__3c546dd2","t-input-trim":"vt_ce_Typography_t-input-trim__16e63d90","t-statusChip":"vt_ce_Typography_t-statusChip__35634fde","t-statusChip-trim":"vt_ce_Typography_t-statusChip-trim__adcb5a29","c-primary":"vt_ce_Typography_c-primary__9abbeb28","c-secondary":"vt_ce_Typography_c-secondary__54db5189","c-tertiary":"vt_ce_Typography_c-tertiary__580276de","c-disabled":"vt_ce_Typography_c-disabled__01eb87d1","c-inherit":"vt_ce_Typography_c-inherit__d9a71622"};
2
2
 
3
3
  export { styles as default };
package/dist/esm/index.js CHANGED
@@ -38,9 +38,15 @@ export { default as RadioButton } from './RadioButton/index.js';
38
38
  export { default as ControlledSelect } from './Select/controlled.js';
39
39
  export { default as Select } from './Select/uncontrolled.js';
40
40
  export { createControlledSelectComponent, createSelectComponent } from './Select/factory.js';
41
+ export { default as StatusChip } from './StatusChip/index.js';
42
+ export { Table, TableBody, TableFooter, TableHead, TableMessage, TableSortLabel } from './Table/index.js';
43
+ export { default as AutoTable } from './Table/AutoTable/index.js';
44
+ export { default as TableCell } from './Table/TableCell/index.js';
45
+ export { default as TableRow } from './Table/TableRow/index.js';
41
46
  export { default as TablePagination } from './TablePagination/index.js';
42
47
  export { default as Textarea } from './Textarea/index.js';
43
48
  export { default as Toast } from './Toast/index.js';
44
49
  export { ToastProvider, useToast } from './Toast/hook.js';
45
50
  export { default as Tooltip } from './Tooltip/index.js';
46
51
  export { default as Typography } from './Typography/index.js';
52
+ export { createColumnHelper } from './Table/AutoTable/common.js';
@@ -129,10 +129,30 @@ function createPaletteAction(options, disabled, text) {
129
129
  }
130
130
  function createPaletteIndicator(options, disabled) {
131
131
  return {
132
- success: options.success ? createPaletteActionVariantsColors(options.success, disabled) : createPaletteActionVariantsColors("#28BA3F", disabled),
133
- info: options.info ? createPaletteActionVariantsColors(options.info, disabled) : createPaletteActionVariantsColors("#335B89", disabled),
134
- warning: options.warning ? createPaletteActionVariantsColors(options.warning, disabled) : createPaletteActionVariantsColors("#FFBB0A", disabled),
135
- error: options.error ? createPaletteActionVariantsColors(options.error, disabled) : createPaletteActionVariantsColors("#EB0000", disabled)
132
+ success: options.success ? createPaletteActionVariantsColors(options.success, disabled) : createPaletteActionVariantsColors(
133
+ { surface: "#28BA3F", on: "#FFFFFF" },
134
+ disabled
135
+ ),
136
+ info: options.info ? createPaletteActionVariantsColors(options.info, disabled) : createPaletteActionVariantsColors(
137
+ { surface: "#335B89", on: "#FFFFFF" },
138
+ disabled
139
+ ),
140
+ warning: options.warning ? createPaletteActionVariantsColors(options.warning, disabled) : createPaletteActionVariantsColors(
141
+ { surface: "#FFBB0A", on: "#FFFFFF" },
142
+ disabled
143
+ ),
144
+ error: options.error ? createPaletteActionVariantsColors(options.error, disabled) : createPaletteActionVariantsColors(
145
+ { surface: "#EB0000", on: "#FFFFFF" },
146
+ disabled
147
+ ),
148
+ pending: options.pending ? createPaletteActionVariantsColors(options.pending, disabled) : createPaletteActionVariantsColors(
149
+ { surface: "#7C848D", on: "#FFFFFF" },
150
+ disabled
151
+ ),
152
+ processing: options.processing ? createPaletteActionVariantsColors(options.processing, disabled) : createPaletteActionVariantsColors(
153
+ { surface: "#FFBB0A", on: "#FFFFFF" },
154
+ disabled
155
+ )
136
156
  };
137
157
  }
138
158
  function createPaletteTable(options, disabled) {