@veritone-ce/design-system 2.0.2 → 2.0.4

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 (58) hide show
  1. package/dist/esm-next/Alert/index.js +1 -0
  2. package/dist/esm-next/Alert/styles.module.scss.js +1 -1
  3. package/dist/esm-next/Button/index.js +1 -0
  4. package/dist/esm-next/Button/styles.module.scss.js +1 -1
  5. package/dist/esm-next/Checkbox/index.js +1 -0
  6. package/dist/esm-next/Checkbox/styles.module.scss.js +1 -1
  7. package/dist/esm-next/CircularProgress/index.js +19 -9
  8. package/dist/esm-next/CircularProgress/styles.module.scss.js +1 -1
  9. package/dist/esm-next/Dialog/components.js +79 -24
  10. package/dist/esm-next/Dialog/styles.module.scss.js +1 -1
  11. package/dist/esm-next/Drawer/components.js +185 -0
  12. package/dist/esm-next/Drawer/factory.js +14 -0
  13. package/dist/esm-next/Drawer/state.js +40 -0
  14. package/dist/esm-next/Drawer/styles.module.scss.js +3 -0
  15. package/dist/esm-next/Icon/wrappers.js +2 -0
  16. package/dist/esm-next/IconButton/index.js +1 -0
  17. package/dist/esm-next/Input/index.js +40 -32
  18. package/dist/esm-next/Input/styles.module.scss.js +1 -1
  19. package/dist/esm-next/Menu/controlled.js +1 -1
  20. package/dist/esm-next/Menu/styles.module.scss.js +1 -1
  21. package/dist/esm-next/RadioButton/index.js +1 -0
  22. package/dist/esm-next/RadioButton/styles.module.scss.js +1 -1
  23. package/dist/esm-next/Select/controlled.js +1 -0
  24. package/dist/esm-next/Select/styles.module.scss.js +1 -1
  25. package/dist/esm-next/Textarea/index.js +1 -0
  26. package/dist/esm-next/Textarea/styles.module.scss.js +1 -1
  27. package/dist/esm-next/Tooltip/index.js +1 -0
  28. package/dist/esm-next/Tooltip/styles.module.scss.js +1 -1
  29. package/dist/esm-next/Typography/index.js +4 -0
  30. package/dist/esm-next/Typography/variants.module.scss.js +1 -1
  31. package/dist/esm-next/index.js +3 -1
  32. package/dist/esm-next/styles/css-vars.js +9 -1
  33. package/dist/esm-next/styles/scss/theme.generated.scss +142 -2
  34. package/dist/esm-next/styles/typography.js +39 -2
  35. package/dist/esm-next/styles.css +13 -12
  36. package/dist/types/src-next/Alert/index.d.ts +1 -0
  37. package/dist/types/src-next/Button/index.d.ts +1 -0
  38. package/dist/types/src-next/Checkbox/index.d.ts +1 -0
  39. package/dist/types/src-next/CircularProgress/index.d.ts +2 -1
  40. package/dist/types/src-next/Dialog/components.d.ts +10 -2
  41. package/dist/types/src-next/Dialog/factory.d.ts +2 -0
  42. package/dist/types/src-next/Drawer/components.d.ts +35 -0
  43. package/dist/types/src-next/Drawer/factory.d.ts +15 -0
  44. package/dist/types/src-next/Drawer/index.d.ts +3 -0
  45. package/dist/types/src-next/Drawer/state.d.ts +113 -0
  46. package/dist/types/src-next/Icon/internal.d.ts +1 -0
  47. package/dist/types/src-next/Icon/shared.d.ts +1 -0
  48. package/dist/types/src-next/IconButton/index.d.ts +1 -0
  49. package/dist/types/src-next/Input/index.d.ts +1 -0
  50. package/dist/types/src-next/Menu/controlled.d.ts +1 -0
  51. package/dist/types/src-next/RadioButton/index.d.ts +1 -0
  52. package/dist/types/src-next/Select/types.d.ts +1 -0
  53. package/dist/types/src-next/Textarea/index.d.ts +1 -0
  54. package/dist/types/src-next/Tooltip/index.d.ts +1 -0
  55. package/dist/types/src-next/Typography/index.d.ts +1 -0
  56. package/dist/types/src-next/index.d.ts +2 -0
  57. package/dist/types/src-next/styles/typography.d.ts +3 -1
  58. package/package.json +4 -2
@@ -31,6 +31,7 @@ const Alert = ({ severity = "success", ...props }) => {
31
31
  return /* @__PURE__ */ jsxs(
32
32
  "div",
33
33
  {
34
+ "data-testid": props["data-testid"],
34
35
  style: {
35
36
  // @ts-ignore
36
37
  "--alert-color": color,
@@ -1,3 +1,3 @@
1
- var modules_efc4e723 = {"alert":"vt_ce_Alert_alert__34ce19c5","alert-stripe":"vt_ce_Alert_alertStripe__34ce19c5","alert-icon":"vt_ce_Alert_alertIcon__34ce19c5","alert-content":"vt_ce_Alert_alertContent__34ce19c5","alert-label":"vt_ce_Alert_alertLabel__34ce19c5","alert-text":"vt_ce_Alert_alertText__34ce19c5","spacer":"vt_ce_Alert_spacer__34ce19c5","alert-action":"vt_ce_Alert_alertAction__34ce19c5","alert-close":"vt_ce_Alert_alertClose__34ce19c5"};
1
+ var modules_efc4e723 = {"alert":"vt_ce_Alert_alert__014c1660","alert-stripe":"vt_ce_Alert_alertStripe__014c1660","alert-icon":"vt_ce_Alert_alertIcon__014c1660","alert-content":"vt_ce_Alert_alertContent__014c1660","alert-label":"vt_ce_Alert_alertLabel__014c1660","alert-text":"vt_ce_Alert_alertText__014c1660","spacer":"vt_ce_Alert_spacer__014c1660","alert-action":"vt_ce_Alert_alertAction__014c1660","alert-close":"vt_ce_Alert_alertClose__014c1660"};
2
2
 
3
3
  export { modules_efc4e723 as default };
@@ -28,6 +28,7 @@ const Button = forwardRef(
28
28
  disabled: loading || disabled,
29
29
  "data-destructive": destructive,
30
30
  onClick: props.onClick,
31
+ "data-testid": props["data-testid"],
31
32
  style: props.style,
32
33
  className: cx(modules_efc4e723["button"], variantCn, props.className),
33
34
  children: [
@@ -1,3 +1,3 @@
1
- var modules_efc4e723 = {"button":"vt_ce_Button_button__259ca507","primary":"vt_ce_Button_primary__259ca507","secondary":"vt_ce_Button_secondary__259ca507","tertiary":"vt_ce_Button_tertiary__259ca507","inner-container":"vt_ce_Button_innerContainer__259ca507","loading-container":"vt_ce_Button_loadingContainer__259ca507","button-icon":"vt_ce_Button_buttonIcon__259ca507"};
1
+ var modules_efc4e723 = {"button":"vt_ce_Button_button__0b5bf02c","primary":"vt_ce_Button_primary__0b5bf02c","secondary":"vt_ce_Button_secondary__0b5bf02c","tertiary":"vt_ce_Button_tertiary__0b5bf02c","inner-container":"vt_ce_Button_innerContainer__0b5bf02c","loading-container":"vt_ce_Button_loadingContainer__0b5bf02c","button-icon":"vt_ce_Button_buttonIcon__0b5bf02c"};
2
2
 
3
3
  export { modules_efc4e723 as default };
@@ -31,6 +31,7 @@ const Checkbox = forwardRef(
31
31
  e.stopPropagation();
32
32
  e.preventDefault();
33
33
  },
34
+ "data-testid": props["data-testid"],
34
35
  style: props.style,
35
36
  className: cx(modules_efc4e723["checkbox"], props.className),
36
37
  children: [
@@ -1,3 +1,3 @@
1
- var modules_efc4e723 = {"checkbox":"vt_ce_Checkbox_checkbox__504048e5","checkbox-svg-path":"vt_ce_Checkbox_checkboxSvgPath__504048e5","passthrough-label-container":"vt_ce_Checkbox_passthroughLabelContainer__504048e5","invisible-checkbox":"vt_ce_Checkbox_invisibleCheckbox__504048e5","visible-label":"vt_ce_Checkbox_visibleLabel__504048e5","icon-container":"vt_ce_Checkbox_iconContainer__504048e5"};
1
+ var modules_efc4e723 = {"checkbox":"vt_ce_Checkbox_checkbox__b74b16bc","checkbox-svg-path":"vt_ce_Checkbox_checkboxSvgPath__b74b16bc","passthrough-label-container":"vt_ce_Checkbox_passthroughLabelContainer__b74b16bc","invisible-checkbox":"vt_ce_Checkbox_invisibleCheckbox__b74b16bc","visible-label":"vt_ce_Checkbox_visibleLabel__b74b16bc","icon-container":"vt_ce_Checkbox_iconContainer__b74b16bc"};
2
2
 
3
3
  export { modules_efc4e723 as default };
@@ -1,7 +1,6 @@
1
1
  'use strict';
2
2
  'use client';
3
3
  import { jsx } from 'react/jsx-runtime';
4
- import { createTheme, ThemeProvider, CircularProgress as CircularProgress$1 } from '@mui/material';
5
4
  import modules_efc4e723 from './styles.module.scss.js';
6
5
  import { cx } from '../styles/cx.js';
7
6
  import '../styles/defaultTheme.js';
@@ -9,7 +8,8 @@ import 'react';
9
8
  import '@mui/system';
10
9
  import '../styles/styled.js';
11
10
 
12
- const muiDefaultTheme = createTheme();
11
+ const SIZE = 44;
12
+ const thickness = 3.6;
13
13
  function CircularProgress({
14
14
  size = 40,
15
15
  fillParentHeight = false,
@@ -20,19 +20,29 @@ function CircularProgress({
20
20
  {
21
21
  className: cx(modules_efc4e723["container"], props.className),
22
22
  "data-fill-parent-height": fillParentHeight,
23
+ "data-testid": props["data-testid"],
23
24
  style: {
24
25
  // @ts-ignore
25
26
  "--circular-progress-color": props.color ?? void 0,
27
+ "--circular-progress-size": `${size}px`,
26
28
  ...props.style
27
29
  },
28
- children: /* @__PURE__ */ jsx(ThemeProvider, { theme: muiDefaultTheme, children: /* @__PURE__ */ jsx(
29
- CircularProgress$1,
30
+ children: /* @__PURE__ */ jsx("span", { className: modules_efc4e723["progress-container"], children: /* @__PURE__ */ jsx(
31
+ "svg",
30
32
  {
31
- color: "inherit",
32
- style: {
33
- width: !fillParentHeight ? size : "unset",
34
- height: !fillParentHeight ? size : "100%"
35
- }
33
+ viewBox: `${SIZE / 2} ${SIZE / 2} ${SIZE} ${SIZE}`,
34
+ className: modules_efc4e723["progress-svg"],
35
+ children: /* @__PURE__ */ jsx(
36
+ "circle",
37
+ {
38
+ cx: SIZE,
39
+ cy: SIZE,
40
+ r: (SIZE - thickness) / 2,
41
+ fill: "none",
42
+ strokeWidth: thickness,
43
+ className: modules_efc4e723["progress-circle"]
44
+ }
45
+ )
36
46
  }
37
47
  ) })
38
48
  }
@@ -1,3 +1,3 @@
1
- var modules_efc4e723 = {"container":"vt_ce_CircularProgress_container__ea033e1c"};
1
+ var modules_efc4e723 = {"container":"vt_ce_CircularProgress_container__4c2cfc25","progress-container":"vt_ce_CircularProgress_progressContainer__4c2cfc25","progress-svg":"vt_ce_CircularProgress_progressSvg__4c2cfc25","circularRotateKeyframe":"vt_ce_CircularProgress_circularRotateKeyframe__4c2cfc25","progress-circle":"vt_ce_CircularProgress_progressCircle__4c2cfc25","circularDashKeyframe":"vt_ce_CircularProgress_circularDashKeyframe__4c2cfc25"};
2
2
 
3
3
  export { modules_efc4e723 as default };
@@ -11,6 +11,7 @@ import '@mui/system';
11
11
  import '../styles/styled.js';
12
12
  import Button from '../Button/index.js';
13
13
  import Typography from '../Typography/index.js';
14
+ import IconButton from '../IconButton/index.js';
14
15
 
15
16
  const Dialog = React.forwardRef(function Dialog2({
16
17
  children,
@@ -19,6 +20,8 @@ const Dialog = React.forwardRef(function Dialog2({
19
20
  className,
20
21
  overlayStyle,
21
22
  overlayClassName,
23
+ lockScroll = true,
24
+ "data-testid": dataTestId,
22
25
  ...options
23
26
  }, propRef) {
24
27
  const dialog = useDialog(options);
@@ -30,7 +33,7 @@ const Dialog = React.forwardRef(function Dialog2({
30
33
  {
31
34
  style: overlayStyle,
32
35
  className: cx(modules_efc4e723["dialog-overlay"], overlayClassName),
33
- lockScroll: true,
36
+ lockScroll,
34
37
  children: /* @__PURE__ */ jsx(FloatingFocusManager, { context: dialog.context, children: /* @__PURE__ */ jsx(
35
38
  "div",
36
39
  {
@@ -38,6 +41,7 @@ const Dialog = React.forwardRef(function Dialog2({
38
41
  "aria-labelledby": dialog.labelId,
39
42
  "aria-describedby": dialog.descriptionId,
40
43
  ...dialog.getFloatingProps(),
44
+ "data-testid": dataTestId,
41
45
  style,
42
46
  className: cx(modules_efc4e723["dialog"], className),
43
47
  children
@@ -48,6 +52,19 @@ const Dialog = React.forwardRef(function Dialog2({
48
52
  }
49
53
  return /* @__PURE__ */ jsx(DialogContext.Provider, { value: dialog, children: content });
50
54
  });
55
+ const DialogStart = React.forwardRef(
56
+ function DialogStart2({ children, ...props }, ref) {
57
+ return /* @__PURE__ */ jsx(
58
+ "div",
59
+ {
60
+ ref,
61
+ ...props,
62
+ className: cx(modules_efc4e723["dialog-start"], props.className),
63
+ children
64
+ }
65
+ );
66
+ }
67
+ );
51
68
  const DialogContent = React.forwardRef(function DialogContent2({ children, ...props }, ref) {
52
69
  return /* @__PURE__ */ jsx(
53
70
  "div",
@@ -59,29 +76,45 @@ const DialogContent = React.forwardRef(function DialogContent2({ children, ...pr
59
76
  }
60
77
  );
61
78
  });
62
- const DialogHeading = React.forwardRef(function DialogHeading2({ children, ...props }, ref) {
79
+ const DialogEnd = React.forwardRef(
80
+ function DialogEnd2({ children, ...props }, ref) {
81
+ return /* @__PURE__ */ jsx(
82
+ "div",
83
+ {
84
+ ref,
85
+ ...props,
86
+ className: cx(modules_efc4e723["dialog-end"], props.className),
87
+ children
88
+ }
89
+ );
90
+ }
91
+ );
92
+ const DialogTitle = React.forwardRef(function DialogTitle2({ children, ...props }, ref) {
63
93
  const { setLabelId } = useDialogContext();
64
94
  const id = React.useId();
65
95
  React.useLayoutEffect(() => {
66
96
  setLabelId(id);
67
97
  return () => setLabelId(void 0);
68
98
  }, [id, setLabelId]);
69
- return /* @__PURE__ */ jsx(
99
+ return /* @__PURE__ */ jsx(DialogStart, { children: /* @__PURE__ */ jsx(
70
100
  Typography,
71
101
  {
72
102
  variant: "h4",
103
+ color: "primary",
73
104
  ref,
74
105
  id,
75
- className: cx(modules_efc4e723["dialog-heading"], props.className),
106
+ ...props,
107
+ className: cx(modules_efc4e723["dialog-title"], props.className),
76
108
  children
77
109
  }
78
- );
110
+ ) });
79
111
  });
80
112
  const DialogTypography = React.forwardRef(function DialogTypography2({ children, ...props }, ref) {
81
113
  return /* @__PURE__ */ jsx(
82
114
  Typography,
83
115
  {
84
116
  variant: "paragraph2",
117
+ color: "primary",
85
118
  ...props,
86
119
  ref,
87
120
  className: cx(modules_efc4e723["dialog-typography"], props.className),
@@ -96,10 +129,20 @@ const DialogDescription = React.forwardRef(function DialogDescription2({ childre
96
129
  setDescriptionId(id);
97
130
  return () => setDescriptionId(void 0);
98
131
  }, [id, setDescriptionId]);
99
- return /* @__PURE__ */ jsx(DialogTypography, { ...props, ref, id, children });
132
+ return /* @__PURE__ */ jsx(
133
+ DialogTypography,
134
+ {
135
+ variant: "paragraph2",
136
+ color: "primary",
137
+ ...props,
138
+ ref,
139
+ id,
140
+ children
141
+ }
142
+ );
100
143
  });
101
144
  const DialogActions = React.forwardRef(function DialogActions2({ children, ...props }, ref) {
102
- return /* @__PURE__ */ jsx(
145
+ return /* @__PURE__ */ jsx(DialogEnd, { children: /* @__PURE__ */ jsx(
103
146
  "div",
104
147
  {
105
148
  ...props,
@@ -107,24 +150,36 @@ const DialogActions = React.forwardRef(function DialogActions2({ children, ...pr
107
150
  className: cx(modules_efc4e723["dialog-actions"], props.className),
108
151
  children
109
152
  }
153
+ ) });
154
+ });
155
+ const DialogCloseButton = React.forwardRef(function DialogCloseButton2(props, ref) {
156
+ const { dismiss } = useDialogContext();
157
+ return /* @__PURE__ */ jsx(
158
+ Button,
159
+ {
160
+ variant: "tertiary",
161
+ ...props,
162
+ ref,
163
+ onClick: (e) => {
164
+ dismiss();
165
+ props.onClick?.(e);
166
+ }
167
+ }
110
168
  );
111
169
  });
112
- const DialogClose = React.forwardRef(
113
- function DialogClose2(props, ref) {
114
- const { dismiss } = useDialogContext();
115
- return /* @__PURE__ */ jsx(
116
- Button,
117
- {
118
- variant: "secondary",
119
- ...props,
120
- ref,
121
- onClick: (e) => {
122
- dismiss();
123
- props.onClick?.(e);
124
- }
170
+ const DialogCloseIconButton = React.forwardRef(function DialogCloseIconButton2(props, ref) {
171
+ const { dismiss } = useDialogContext();
172
+ return /* @__PURE__ */ jsx(
173
+ IconButton,
174
+ {
175
+ ...props,
176
+ ref,
177
+ onClick: (e) => {
178
+ dismiss();
179
+ props.onClick?.(e);
125
180
  }
126
- );
127
- }
128
- );
181
+ }
182
+ );
183
+ });
129
184
 
130
- export { DialogActions, DialogClose, DialogContent, DialogDescription, DialogHeading, DialogTypography, Dialog as default };
185
+ export { DialogActions, DialogCloseButton, DialogCloseIconButton, DialogContent, DialogDescription, DialogEnd, DialogStart, DialogTitle, DialogTypography, Dialog as default };
@@ -1,3 +1,3 @@
1
- var modules_efc4e723 = {"dialog-overlay":"vt_ce_Dialog_dialogOverlay__4b764cfb","dialog":"vt_ce_Dialog_dialog__4b764cfb","dialog-heading":"vt_ce_Dialog_dialogHeading__4b764cfb","dialog-content":"vt_ce_Dialog_dialogContent__4b764cfb","dialog-typography":"vt_ce_Dialog_dialogTypography__4b764cfb","dialog-actions":"vt_ce_Dialog_dialogActions__4b764cfb"};
1
+ var modules_efc4e723 = {"dialog-overlay":"vt_ce_Dialog_dialogOverlay__b0e50c90","dialog":"vt_ce_Dialog_dialog__b0e50c90","dialog-start":"vt_ce_Dialog_dialogStart__b0e50c90","dialog-end":"vt_ce_Dialog_dialogEnd__b0e50c90","dialog-content":"vt_ce_Dialog_dialogContent__b0e50c90","dialog-title":"vt_ce_Dialog_dialogTitle__b0e50c90","dialog-typography":"vt_ce_Dialog_dialogTypography__b0e50c90","dialog-actions":"vt_ce_Dialog_dialogActions__b0e50c90"};
2
2
 
3
3
  export { modules_efc4e723 as default };
@@ -0,0 +1,185 @@
1
+ 'use strict';
2
+ 'use client';
3
+ import { jsx } from 'react/jsx-runtime';
4
+ import * as React from 'react';
5
+ import { useMergeRefs, FloatingPortal, FloatingOverlay, FloatingFocusManager } from '@floating-ui/react';
6
+ import modules_efc4e723 from './styles.module.scss.js';
7
+ import { useDrawer, DrawerContext, useDrawerContext } from './state.js';
8
+ import { cx } from '../styles/cx.js';
9
+ import '../styles/defaultTheme.js';
10
+ import '@mui/system';
11
+ import '../styles/styled.js';
12
+ import Button from '../Button/index.js';
13
+ import Typography from '../Typography/index.js';
14
+ import IconButton from '../IconButton/index.js';
15
+
16
+ const Drawer = React.forwardRef(function Drawer2({
17
+ children,
18
+ portalEl,
19
+ style,
20
+ className,
21
+ overlayStyle,
22
+ overlayClassName,
23
+ lockScroll = true,
24
+ "data-testid": dataTestId,
25
+ ...options
26
+ }, propRef) {
27
+ const drawer = useDrawer(options);
28
+ const ref = useMergeRefs([drawer.context.refs.setFloating, propRef]);
29
+ let content = null;
30
+ if (drawer.context.open) {
31
+ content = /* @__PURE__ */ jsx(FloatingPortal, { root: portalEl, children: /* @__PURE__ */ jsx(
32
+ FloatingOverlay,
33
+ {
34
+ style: overlayStyle,
35
+ className: cx(modules_efc4e723["drawer-overlay"], overlayClassName),
36
+ lockScroll,
37
+ children: /* @__PURE__ */ jsx(FloatingFocusManager, { context: drawer.context, children: /* @__PURE__ */ jsx(
38
+ "div",
39
+ {
40
+ ref,
41
+ "aria-labelledby": drawer.labelId,
42
+ "aria-describedby": drawer.descriptionId,
43
+ ...drawer.getFloatingProps(),
44
+ "data-testid": dataTestId,
45
+ style,
46
+ className: cx(modules_efc4e723["drawer"], className),
47
+ children
48
+ }
49
+ ) })
50
+ }
51
+ ) });
52
+ }
53
+ return /* @__PURE__ */ jsx(DrawerContext.Provider, { value: drawer, children: content });
54
+ });
55
+ const DrawerStart = React.forwardRef(
56
+ function DrawerStart2({ children, ...props }, ref) {
57
+ return /* @__PURE__ */ jsx(
58
+ "div",
59
+ {
60
+ ref,
61
+ ...props,
62
+ className: cx(modules_efc4e723["drawer-start"], props.className),
63
+ children
64
+ }
65
+ );
66
+ }
67
+ );
68
+ const DrawerContent = React.forwardRef(function DrawerContent2({ children, ...props }, ref) {
69
+ return /* @__PURE__ */ jsx(
70
+ "div",
71
+ {
72
+ ...props,
73
+ ref,
74
+ className: cx(modules_efc4e723["drawer-content"], props.className),
75
+ children
76
+ }
77
+ );
78
+ });
79
+ const DrawerEnd = React.forwardRef(
80
+ function DrawerEnd2({ children, ...props }, ref) {
81
+ return /* @__PURE__ */ jsx(
82
+ "div",
83
+ {
84
+ ref,
85
+ ...props,
86
+ className: cx(modules_efc4e723["drawer-end"], props.className),
87
+ children
88
+ }
89
+ );
90
+ }
91
+ );
92
+ const DrawerTitle = React.forwardRef(function DrawerTitle2({ children, ...props }, ref) {
93
+ const { setLabelId } = useDrawerContext();
94
+ const id = React.useId();
95
+ React.useLayoutEffect(() => {
96
+ setLabelId(id);
97
+ return () => setLabelId(void 0);
98
+ }, [id, setLabelId]);
99
+ return /* @__PURE__ */ jsx(DrawerStart, { children: /* @__PURE__ */ jsx(
100
+ Typography,
101
+ {
102
+ variant: "title",
103
+ ref,
104
+ id,
105
+ color: "primary",
106
+ ...props,
107
+ className: cx(modules_efc4e723["drawer-title"], props.className),
108
+ children
109
+ }
110
+ ) });
111
+ });
112
+ const DrawerTypography = React.forwardRef(function DrawerTypography2({ children, ...props }, ref) {
113
+ return /* @__PURE__ */ jsx(
114
+ Typography,
115
+ {
116
+ variant: "paragraph2",
117
+ color: "primary",
118
+ ...props,
119
+ ref,
120
+ className: cx(modules_efc4e723["drawer-typography"], props.className),
121
+ children
122
+ }
123
+ );
124
+ });
125
+ const DrawerDescription = React.forwardRef(function DrawerDescription2({ children, ...props }, ref) {
126
+ const { setDescriptionId } = useDrawerContext();
127
+ const id = React.useId();
128
+ React.useLayoutEffect(() => {
129
+ setDescriptionId(id);
130
+ return () => setDescriptionId(void 0);
131
+ }, [id, setDescriptionId]);
132
+ return /* @__PURE__ */ jsx(
133
+ DrawerTypography,
134
+ {
135
+ variant: "paragraph2",
136
+ color: "primary",
137
+ ...props,
138
+ ref,
139
+ id,
140
+ children
141
+ }
142
+ );
143
+ });
144
+ const DrawerActions = React.forwardRef(function DrawerActions2({ children, ...props }, ref) {
145
+ return /* @__PURE__ */ jsx(DrawerEnd, { children: /* @__PURE__ */ jsx(
146
+ "div",
147
+ {
148
+ ...props,
149
+ ref,
150
+ className: cx(modules_efc4e723["drawer-actions"], props.className),
151
+ children
152
+ }
153
+ ) });
154
+ });
155
+ const DrawerCloseButton = React.forwardRef(function DrawerCloseButton2(props, ref) {
156
+ const { dismiss } = useDrawerContext();
157
+ return /* @__PURE__ */ jsx(
158
+ Button,
159
+ {
160
+ variant: "tertiary",
161
+ ...props,
162
+ ref,
163
+ onClick: (e) => {
164
+ dismiss();
165
+ props.onClick?.(e);
166
+ }
167
+ }
168
+ );
169
+ });
170
+ const DrawerCloseIconButton = React.forwardRef(function DrawerCloseIconButton2(props, ref) {
171
+ const { dismiss } = useDrawerContext();
172
+ return /* @__PURE__ */ jsx(
173
+ IconButton,
174
+ {
175
+ ...props,
176
+ ref,
177
+ onClick: (e) => {
178
+ dismiss();
179
+ props.onClick?.(e);
180
+ }
181
+ }
182
+ );
183
+ });
184
+
185
+ export { DrawerActions, DrawerCloseButton, DrawerCloseIconButton, DrawerContent, DrawerDescription, DrawerEnd, DrawerStart, DrawerTitle, DrawerTypography, Drawer as default };
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { forwardRef } from 'react';
4
+ import Drawer from './components.js';
5
+
6
+ function createDrawerComponent({ portalEl }) {
7
+ return forwardRef(
8
+ function ScopedDrawer(props, ref) {
9
+ return /* @__PURE__ */ jsx(Drawer, { portalEl, ref, ...props });
10
+ }
11
+ );
12
+ }
13
+
14
+ export { createDrawerComponent };
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+ 'use client';
3
+ import * as React from 'react';
4
+ import { useFloating, useDismiss, useRole, useInteractions } from '@floating-ui/react';
5
+
6
+ function useDrawer({ open, onDismiss: dismissDrawer }) {
7
+ const [labelId, setLabelId] = React.useState();
8
+ const [descriptionId, setDescriptionId] = React.useState();
9
+ const data = useFloating({
10
+ open,
11
+ onOpenChange: (newOpen) => !newOpen && dismissDrawer()
12
+ });
13
+ const context = data.context;
14
+ const dismiss = useDismiss(context, { outsidePressEvent: "mousedown" });
15
+ const role = useRole(context);
16
+ const interactions = useInteractions([dismiss, role]);
17
+ return React.useMemo(
18
+ () => ({
19
+ open,
20
+ dismiss: dismissDrawer,
21
+ ...interactions,
22
+ ...data,
23
+ labelId,
24
+ descriptionId,
25
+ setLabelId,
26
+ setDescriptionId
27
+ }),
28
+ [open, dismissDrawer, interactions, data, labelId, descriptionId]
29
+ );
30
+ }
31
+ const DrawerContext = React.createContext(null);
32
+ const useDrawerContext = () => {
33
+ const context = React.useContext(DrawerContext);
34
+ if (context == null) {
35
+ throw new Error("Drawer components must be wrapped in <Drawer />");
36
+ }
37
+ return context;
38
+ };
39
+
40
+ export { DrawerContext, useDrawer, useDrawerContext };
@@ -0,0 +1,3 @@
1
+ var modules_efc4e723 = {"drawer-overlay":"vt_ce_Drawer_drawerOverlay__02bed79d","drawer":"vt_ce_Drawer_drawer__02bed79d","drawer-start":"vt_ce_Drawer_drawerStart__02bed79d","drawer-end":"vt_ce_Drawer_drawerEnd__02bed79d","drawer-content":"vt_ce_Drawer_drawerContent__02bed79d","drawer-title":"vt_ce_Drawer_drawerTitle__02bed79d","drawer-typography":"vt_ce_Drawer_drawerTypography__02bed79d","drawer-actions":"vt_ce_Drawer_drawerActions__02bed79d"};
2
+
3
+ export { modules_efc4e723 as default };
@@ -15,6 +15,7 @@ function adaptMuiSvgIcon(MuiIcon) {
15
15
  {
16
16
  ref,
17
17
  "data-size": size,
18
+ "data-testid": props["data-testid"],
18
19
  style: props.style,
19
20
  className: cx(modules_efc4e723["icon"], props.className),
20
21
  children: /* @__PURE__ */ jsx(MuiIcon, { color: "inherit" })
@@ -31,6 +32,7 @@ function adaptSvgIcon(svg) {
31
32
  {
32
33
  ref,
33
34
  "data-size": size,
35
+ "data-testid": props["data-testid"],
34
36
  style: props.style,
35
37
  className: cx(modules_efc4e723["icon"], props.className),
36
38
  children: svg
@@ -19,6 +19,7 @@ const IconButton = forwardRef(
19
19
  disabled: props.loading || props.disabled,
20
20
  "data-destructive": props.destructive ?? false,
21
21
  onClick: props.onClick,
22
+ "data-testid": props["data-testid"],
22
23
  style: props.style,
23
24
  className: cx(modules_efc4e723["button"], props.className),
24
25
  children: [
@@ -9,38 +9,46 @@ import '@mui/system';
9
9
  import '../styles/styled.js';
10
10
 
11
11
  const Input = forwardRef((props, ref) => {
12
- return /* @__PURE__ */ jsxs("span", { className: cx(modules_efc4e723["input"], props.className), style: props.style, children: [
13
- /* @__PURE__ */ jsx("label", { className: modules_efc4e723["label"], children: props.label }),
14
- /* @__PURE__ */ jsxs(
15
- "span",
16
- {
17
- "data-disabled": props.disabled ?? false,
18
- "data-error": props.error !== void 0,
19
- className: modules_efc4e723["inner-input-container"],
20
- children: [
21
- props.startIcon && /* @__PURE__ */ jsx("span", { className: modules_efc4e723["input-icon"], children: props.startIcon }),
22
- /* @__PURE__ */ jsx(
23
- "input",
24
- {
25
- ref,
26
- type: props.type,
27
- placeholder: props.placeholder,
28
- value: props.value,
29
- disabled: props.disabled,
30
- onChange: props.onChange,
31
- className: modules_efc4e723["inner-input"]
32
- }
33
- ),
34
- props.endIcon && /* @__PURE__ */ jsx("span", { className: modules_efc4e723["input-icon"], children: props.endIcon })
35
- ]
36
- }
37
- ),
38
- props.helpLabel && /* @__PURE__ */ jsx("span", { className: modules_efc4e723["help-label"], children: props.helpLabel }),
39
- props.error && /* @__PURE__ */ jsxs("span", { className: modules_efc4e723["error-label"], children: [
40
- /* @__PURE__ */ jsx(IndicatorCircle, {}),
41
- /* @__PURE__ */ jsx("span", { children: props.error })
42
- ] })
43
- ] });
12
+ return /* @__PURE__ */ jsxs(
13
+ "span",
14
+ {
15
+ "data-testid": props["data-testid"],
16
+ className: cx(modules_efc4e723["input"], props.className),
17
+ style: props.style,
18
+ children: [
19
+ /* @__PURE__ */ jsx("label", { className: modules_efc4e723["label"], children: props.label }),
20
+ /* @__PURE__ */ jsxs(
21
+ "span",
22
+ {
23
+ "data-disabled": props.disabled ?? false,
24
+ "data-error": props.error !== void 0,
25
+ className: modules_efc4e723["inner-input-container"],
26
+ children: [
27
+ props.startIcon && /* @__PURE__ */ jsx("span", { className: modules_efc4e723["input-icon"], children: props.startIcon }),
28
+ /* @__PURE__ */ jsx(
29
+ "input",
30
+ {
31
+ ref,
32
+ type: props.type,
33
+ placeholder: props.placeholder,
34
+ value: props.value,
35
+ disabled: props.disabled,
36
+ onChange: props.onChange,
37
+ className: modules_efc4e723["inner-input"]
38
+ }
39
+ ),
40
+ props.endIcon && /* @__PURE__ */ jsx("span", { className: modules_efc4e723["input-icon"], children: props.endIcon })
41
+ ]
42
+ }
43
+ ),
44
+ props.helpLabel && /* @__PURE__ */ jsx("span", { className: modules_efc4e723["help-label"], children: props.helpLabel }),
45
+ props.error && /* @__PURE__ */ jsxs("span", { className: modules_efc4e723["error-label"], children: [
46
+ /* @__PURE__ */ jsx(IndicatorCircle, {}),
47
+ /* @__PURE__ */ jsx("span", { children: props.error })
48
+ ] })
49
+ ]
50
+ }
51
+ );
44
52
  });
45
53
  const IndicatorCircle = () => /* @__PURE__ */ jsx(
46
54
  "svg",
@@ -1,3 +1,3 @@
1
- var modules_efc4e723 = {"input":"vt_ce_Input_input__4620481b","label":"vt_ce_Input_label__4620481b","inner-input-container":"vt_ce_Input_innerInputContainer__4620481b","inner-input":"vt_ce_Input_innerInput__4620481b","input-icon":"vt_ce_Input_inputIcon__4620481b","help-label":"vt_ce_Input_helpLabel__4620481b","error-label":"vt_ce_Input_errorLabel__4620481b"};
1
+ var modules_efc4e723 = {"input":"vt_ce_Input_input__b1641fef","label":"vt_ce_Input_label__b1641fef","inner-input-container":"vt_ce_Input_innerInputContainer__b1641fef","inner-input":"vt_ce_Input_innerInput__b1641fef","input-icon":"vt_ce_Input_inputIcon__b1641fef","help-label":"vt_ce_Input_helpLabel__b1641fef","error-label":"vt_ce_Input_errorLabel__b1641fef"};
2
2
 
3
3
  export { modules_efc4e723 as default };
@@ -89,7 +89,7 @@ function Menu({
89
89
  children: /* @__PURE__ */ jsx(
90
90
  "div",
91
91
  {
92
- "data-testid": "menu",
92
+ "data-testid": props["data-testid"],
93
93
  ref: refs.setFloating,
94
94
  tabIndex: 0,
95
95
  "aria-labelledby": anchor?.id || props.anchorId,