@veritone-ce/design-system 2.0.1 → 2.0.3

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 (41) hide show
  1. package/dist/esm-next/Alert/index.js +1 -2
  2. package/dist/esm-next/Alert/styles.module.scss.js +1 -1
  3. package/dist/esm-next/Button/index.js +33 -26
  4. package/dist/esm-next/Button/styles.module.scss.js +1 -1
  5. package/dist/esm-next/Checkbox/styles.module.scss.js +1 -1
  6. package/dist/esm-next/Dialog/components.js +77 -24
  7. package/dist/esm-next/Dialog/styles.module.scss.js +1 -1
  8. package/dist/esm-next/Drawer/components.js +183 -0
  9. package/dist/esm-next/Drawer/factory.js +14 -0
  10. package/dist/esm-next/Drawer/state.js +40 -0
  11. package/dist/esm-next/Drawer/styles.module.scss.js +3 -0
  12. package/dist/esm-next/Input/styles.module.scss.js +1 -1
  13. package/dist/esm-next/Menu/controlled.js +1 -0
  14. package/dist/esm-next/Menu/styles.module.scss.js +1 -1
  15. package/dist/esm-next/RadioButton/styles.module.scss.js +1 -1
  16. package/dist/esm-next/Select/styles.module.scss.js +1 -1
  17. package/dist/esm-next/Textarea/index.js +1 -0
  18. package/dist/esm-next/Textarea/styles.module.scss.js +1 -1
  19. package/dist/esm-next/Tooltip/index.js +16 -4
  20. package/dist/esm-next/Tooltip/styles.module.scss.js +1 -1
  21. package/dist/esm-next/Typography/index.js +4 -0
  22. package/dist/esm-next/Typography/variants.module.scss.js +1 -1
  23. package/dist/esm-next/index.js +3 -1
  24. package/dist/esm-next/styles/css-vars.js +9 -1
  25. package/dist/esm-next/styles/scss/theme.generated.scss +142 -2
  26. package/dist/esm-next/styles/typography.js +39 -2
  27. package/dist/esm-next/styles.css +12 -11
  28. package/dist/types/src/components/icons/IconListItem/index.d.ts +1 -1
  29. package/dist/types/src-next/Alert/index.d.ts +1 -1
  30. package/dist/types/src-next/CircularProgress/index.d.ts +1 -1
  31. package/dist/types/src-next/Dialog/components.d.ts +8 -2
  32. package/dist/types/src-next/Dialog/factory.d.ts +1 -0
  33. package/dist/types/src-next/Drawer/components.d.ts +33 -0
  34. package/dist/types/src-next/Drawer/factory.d.ts +14 -0
  35. package/dist/types/src-next/Drawer/index.d.ts +3 -0
  36. package/dist/types/src-next/Drawer/state.d.ts +113 -0
  37. package/dist/types/src-next/Textarea/index.d.ts +1 -0
  38. package/dist/types/src-next/index.d.ts +2 -0
  39. package/dist/types/src-next/popover/types.d.ts +1 -0
  40. package/dist/types/src-next/styles/typography.d.ts +3 -1
  41. package/package.json +9 -3
@@ -23,8 +23,7 @@ const defaultMessageText = {
23
23
  warning: `Your action is required. `,
24
24
  error: `An error has occurred. `
25
25
  };
26
- const Alert = (props) => {
27
- const severity = props.severity ?? "success";
26
+ const Alert = ({ severity = "success", ...props }) => {
28
27
  const label = props.label ?? defaultMessageLabel[severity];
29
28
  const text = props.text ?? defaultMessageText[severity];
30
29
  const icon = iconVariants[severity];
@@ -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 };
@@ -9,31 +9,38 @@ import '../styles/defaultTheme.js';
9
9
  import '@mui/system';
10
10
  import '../styles/styled.js';
11
11
 
12
- const Button = forwardRef((props, ref) => {
13
- const variant = props.variant ?? "primary";
14
- const variantCn = modules_efc4e723[variant];
15
- const size = props.size ?? "large";
16
- return /* @__PURE__ */ jsxs(
17
- "button",
18
- {
19
- ref,
20
- "data-size": size,
21
- "data-loading": props.loading ?? false,
22
- disabled: props.loading || props.disabled,
23
- "data-destructive": props.destructive ?? false,
24
- onClick: props.onClick,
25
- style: props.style,
26
- className: cx(modules_efc4e723["button"], variantCn, props.className),
27
- children: [
28
- props.loading && /* @__PURE__ */ jsx("span", { className: modules_efc4e723["loading-container"], children: /* @__PURE__ */ jsx(CircularProgress, { size: "1.4em", color: "inherit" }) }),
29
- /* @__PURE__ */ jsxs("span", { className: modules_efc4e723["inner-container"], children: [
30
- props.startIcon && /* @__PURE__ */ jsx("span", { className: modules_efc4e723["button-icon"], children: props.startIcon }),
31
- /* @__PURE__ */ jsx("span", { children: props.children }),
32
- props.endIcon && /* @__PURE__ */ jsx("span", { className: modules_efc4e723["button-icon"], children: props.endIcon })
33
- ] })
34
- ]
35
- }
36
- );
37
- });
12
+ const Button = forwardRef(
13
+ ({
14
+ variant = "primary",
15
+ size = "large",
16
+ disabled = false,
17
+ loading = false,
18
+ destructive = false,
19
+ ...props
20
+ }, ref) => {
21
+ const variantCn = modules_efc4e723[variant];
22
+ return /* @__PURE__ */ jsxs(
23
+ "button",
24
+ {
25
+ ref,
26
+ "data-size": size,
27
+ "data-loading": loading,
28
+ disabled: loading || disabled,
29
+ "data-destructive": destructive,
30
+ onClick: props.onClick,
31
+ style: props.style,
32
+ className: cx(modules_efc4e723["button"], variantCn, props.className),
33
+ children: [
34
+ loading && /* @__PURE__ */ jsx("span", { className: modules_efc4e723["loading-container"], children: /* @__PURE__ */ jsx(CircularProgress, { size: "1.4em", color: "inherit" }) }),
35
+ /* @__PURE__ */ jsxs("span", { className: modules_efc4e723["inner-container"], children: [
36
+ props.startIcon && /* @__PURE__ */ jsx("span", { className: modules_efc4e723["button-icon"], children: props.startIcon }),
37
+ /* @__PURE__ */ jsx("span", { children: props.children }),
38
+ props.endIcon && /* @__PURE__ */ jsx("span", { className: modules_efc4e723["button-icon"], children: props.endIcon })
39
+ ] })
40
+ ]
41
+ }
42
+ );
43
+ }
44
+ );
38
45
 
39
46
  export { Button as default };
@@ -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 };
@@ -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 };
@@ -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,7 @@ const Dialog = React.forwardRef(function Dialog2({
19
20
  className,
20
21
  overlayStyle,
21
22
  overlayClassName,
23
+ lockScroll = true,
22
24
  ...options
23
25
  }, propRef) {
24
26
  const dialog = useDialog(options);
@@ -30,7 +32,7 @@ const Dialog = React.forwardRef(function Dialog2({
30
32
  {
31
33
  style: overlayStyle,
32
34
  className: cx(modules_efc4e723["dialog-overlay"], overlayClassName),
33
- lockScroll: true,
35
+ lockScroll,
34
36
  children: /* @__PURE__ */ jsx(FloatingFocusManager, { context: dialog.context, children: /* @__PURE__ */ jsx(
35
37
  "div",
36
38
  {
@@ -48,6 +50,19 @@ const Dialog = React.forwardRef(function Dialog2({
48
50
  }
49
51
  return /* @__PURE__ */ jsx(DialogContext.Provider, { value: dialog, children: content });
50
52
  });
53
+ const DialogStart = React.forwardRef(
54
+ function DialogStart2({ children, ...props }, ref) {
55
+ return /* @__PURE__ */ jsx(
56
+ "div",
57
+ {
58
+ ref,
59
+ ...props,
60
+ className: cx(modules_efc4e723["dialog-start"], props.className),
61
+ children
62
+ }
63
+ );
64
+ }
65
+ );
51
66
  const DialogContent = React.forwardRef(function DialogContent2({ children, ...props }, ref) {
52
67
  return /* @__PURE__ */ jsx(
53
68
  "div",
@@ -59,29 +74,45 @@ const DialogContent = React.forwardRef(function DialogContent2({ children, ...pr
59
74
  }
60
75
  );
61
76
  });
62
- const DialogHeading = React.forwardRef(function DialogHeading2({ children, ...props }, ref) {
77
+ const DialogEnd = React.forwardRef(
78
+ function DialogEnd2({ children, ...props }, ref) {
79
+ return /* @__PURE__ */ jsx(
80
+ "div",
81
+ {
82
+ ref,
83
+ ...props,
84
+ className: cx(modules_efc4e723["dialog-end"], props.className),
85
+ children
86
+ }
87
+ );
88
+ }
89
+ );
90
+ const DialogTitle = React.forwardRef(function DialogTitle2({ children, ...props }, ref) {
63
91
  const { setLabelId } = useDialogContext();
64
92
  const id = React.useId();
65
93
  React.useLayoutEffect(() => {
66
94
  setLabelId(id);
67
95
  return () => setLabelId(void 0);
68
96
  }, [id, setLabelId]);
69
- return /* @__PURE__ */ jsx(
97
+ return /* @__PURE__ */ jsx(DialogStart, { children: /* @__PURE__ */ jsx(
70
98
  Typography,
71
99
  {
72
100
  variant: "h4",
101
+ color: "primary",
73
102
  ref,
74
103
  id,
75
- className: cx(modules_efc4e723["dialog-heading"], props.className),
104
+ ...props,
105
+ className: cx(modules_efc4e723["dialog-title"], props.className),
76
106
  children
77
107
  }
78
- );
108
+ ) });
79
109
  });
80
110
  const DialogTypography = React.forwardRef(function DialogTypography2({ children, ...props }, ref) {
81
111
  return /* @__PURE__ */ jsx(
82
112
  Typography,
83
113
  {
84
114
  variant: "paragraph2",
115
+ color: "primary",
85
116
  ...props,
86
117
  ref,
87
118
  className: cx(modules_efc4e723["dialog-typography"], props.className),
@@ -96,10 +127,20 @@ const DialogDescription = React.forwardRef(function DialogDescription2({ childre
96
127
  setDescriptionId(id);
97
128
  return () => setDescriptionId(void 0);
98
129
  }, [id, setDescriptionId]);
99
- return /* @__PURE__ */ jsx(DialogTypography, { ...props, ref, id, children });
130
+ return /* @__PURE__ */ jsx(
131
+ DialogTypography,
132
+ {
133
+ variant: "paragraph2",
134
+ color: "primary",
135
+ ...props,
136
+ ref,
137
+ id,
138
+ children
139
+ }
140
+ );
100
141
  });
101
142
  const DialogActions = React.forwardRef(function DialogActions2({ children, ...props }, ref) {
102
- return /* @__PURE__ */ jsx(
143
+ return /* @__PURE__ */ jsx(DialogEnd, { children: /* @__PURE__ */ jsx(
103
144
  "div",
104
145
  {
105
146
  ...props,
@@ -107,24 +148,36 @@ const DialogActions = React.forwardRef(function DialogActions2({ children, ...pr
107
148
  className: cx(modules_efc4e723["dialog-actions"], props.className),
108
149
  children
109
150
  }
151
+ ) });
152
+ });
153
+ const DialogCloseButton = React.forwardRef(function DialogCloseButton2(props, ref) {
154
+ const { dismiss } = useDialogContext();
155
+ return /* @__PURE__ */ jsx(
156
+ Button,
157
+ {
158
+ variant: "tertiary",
159
+ ...props,
160
+ ref,
161
+ onClick: (e) => {
162
+ dismiss();
163
+ props.onClick?.(e);
164
+ }
165
+ }
110
166
  );
111
167
  });
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
- }
168
+ const DialogCloseIconButton = React.forwardRef(function DialogCloseIconButton2(props, ref) {
169
+ const { dismiss } = useDialogContext();
170
+ return /* @__PURE__ */ jsx(
171
+ IconButton,
172
+ {
173
+ ...props,
174
+ ref,
175
+ onClick: (e) => {
176
+ dismiss();
177
+ props.onClick?.(e);
125
178
  }
126
- );
127
- }
128
- );
179
+ }
180
+ );
181
+ });
129
182
 
130
- export { DialogActions, DialogClose, DialogContent, DialogDescription, DialogHeading, DialogTypography, Dialog as default };
183
+ 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,183 @@
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
+ ...options
25
+ }, propRef) {
26
+ const drawer = useDrawer(options);
27
+ const ref = useMergeRefs([drawer.context.refs.setFloating, propRef]);
28
+ let content = null;
29
+ if (drawer.context.open) {
30
+ content = /* @__PURE__ */ jsx(FloatingPortal, { root: portalEl, children: /* @__PURE__ */ jsx(
31
+ FloatingOverlay,
32
+ {
33
+ style: overlayStyle,
34
+ className: cx(modules_efc4e723["drawer-overlay"], overlayClassName),
35
+ lockScroll,
36
+ children: /* @__PURE__ */ jsx(FloatingFocusManager, { context: drawer.context, children: /* @__PURE__ */ jsx(
37
+ "div",
38
+ {
39
+ ref,
40
+ "aria-labelledby": drawer.labelId,
41
+ "aria-describedby": drawer.descriptionId,
42
+ ...drawer.getFloatingProps(),
43
+ style,
44
+ className: cx(modules_efc4e723["drawer"], className),
45
+ children
46
+ }
47
+ ) })
48
+ }
49
+ ) });
50
+ }
51
+ return /* @__PURE__ */ jsx(DrawerContext.Provider, { value: drawer, children: content });
52
+ });
53
+ const DrawerStart = React.forwardRef(
54
+ function DrawerStart2({ children, ...props }, ref) {
55
+ return /* @__PURE__ */ jsx(
56
+ "div",
57
+ {
58
+ ref,
59
+ ...props,
60
+ className: cx(modules_efc4e723["drawer-start"], props.className),
61
+ children
62
+ }
63
+ );
64
+ }
65
+ );
66
+ const DrawerContent = React.forwardRef(function DrawerContent2({ children, ...props }, ref) {
67
+ return /* @__PURE__ */ jsx(
68
+ "div",
69
+ {
70
+ ...props,
71
+ ref,
72
+ className: cx(modules_efc4e723["drawer-content"], props.className),
73
+ children
74
+ }
75
+ );
76
+ });
77
+ const DrawerEnd = React.forwardRef(
78
+ function DrawerEnd2({ children, ...props }, ref) {
79
+ return /* @__PURE__ */ jsx(
80
+ "div",
81
+ {
82
+ ref,
83
+ ...props,
84
+ className: cx(modules_efc4e723["drawer-end"], props.className),
85
+ children
86
+ }
87
+ );
88
+ }
89
+ );
90
+ const DrawerTitle = React.forwardRef(function DrawerTitle2({ children, ...props }, ref) {
91
+ const { setLabelId } = useDrawerContext();
92
+ const id = React.useId();
93
+ React.useLayoutEffect(() => {
94
+ setLabelId(id);
95
+ return () => setLabelId(void 0);
96
+ }, [id, setLabelId]);
97
+ return /* @__PURE__ */ jsx(DrawerStart, { children: /* @__PURE__ */ jsx(
98
+ Typography,
99
+ {
100
+ variant: "title",
101
+ ref,
102
+ id,
103
+ color: "primary",
104
+ ...props,
105
+ className: cx(modules_efc4e723["drawer-title"], props.className),
106
+ children
107
+ }
108
+ ) });
109
+ });
110
+ const DrawerTypography = React.forwardRef(function DrawerTypography2({ children, ...props }, ref) {
111
+ return /* @__PURE__ */ jsx(
112
+ Typography,
113
+ {
114
+ variant: "paragraph2",
115
+ color: "primary",
116
+ ...props,
117
+ ref,
118
+ className: cx(modules_efc4e723["drawer-typography"], props.className),
119
+ children
120
+ }
121
+ );
122
+ });
123
+ const DrawerDescription = React.forwardRef(function DrawerDescription2({ children, ...props }, ref) {
124
+ const { setDescriptionId } = useDrawerContext();
125
+ const id = React.useId();
126
+ React.useLayoutEffect(() => {
127
+ setDescriptionId(id);
128
+ return () => setDescriptionId(void 0);
129
+ }, [id, setDescriptionId]);
130
+ return /* @__PURE__ */ jsx(
131
+ DrawerTypography,
132
+ {
133
+ variant: "paragraph2",
134
+ color: "primary",
135
+ ...props,
136
+ ref,
137
+ id,
138
+ children
139
+ }
140
+ );
141
+ });
142
+ const DrawerActions = React.forwardRef(function DrawerActions2({ children, ...props }, ref) {
143
+ return /* @__PURE__ */ jsx(DrawerEnd, { children: /* @__PURE__ */ jsx(
144
+ "div",
145
+ {
146
+ ...props,
147
+ ref,
148
+ className: cx(modules_efc4e723["drawer-actions"], props.className),
149
+ children
150
+ }
151
+ ) });
152
+ });
153
+ const DrawerCloseButton = React.forwardRef(function DrawerCloseButton2(props, ref) {
154
+ const { dismiss } = useDrawerContext();
155
+ return /* @__PURE__ */ jsx(
156
+ Button,
157
+ {
158
+ variant: "tertiary",
159
+ ...props,
160
+ ref,
161
+ onClick: (e) => {
162
+ dismiss();
163
+ props.onClick?.(e);
164
+ }
165
+ }
166
+ );
167
+ });
168
+ const DrawerCloseIconButton = React.forwardRef(function DrawerCloseIconButton2(props, ref) {
169
+ const { dismiss } = useDrawerContext();
170
+ return /* @__PURE__ */ jsx(
171
+ IconButton,
172
+ {
173
+ ...props,
174
+ ref,
175
+ onClick: (e) => {
176
+ dismiss();
177
+ props.onClick?.(e);
178
+ }
179
+ }
180
+ );
181
+ });
182
+
183
+ 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 };
@@ -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,6 +89,7 @@ function Menu({
89
89
  children: /* @__PURE__ */ jsx(
90
90
  "div",
91
91
  {
92
+ "data-testid": "menu",
92
93
  ref: refs.setFloating,
93
94
  tabIndex: 0,
94
95
  "aria-labelledby": anchor?.id || props.anchorId,
@@ -1,3 +1,3 @@
1
- var modules_efc4e723 = {"menu":"vt_ce_Menu_menu__bd4e93dd","option":"vt_ce_Menu_option__bd4e93dd","option-icon":"vt_ce_Menu_optionIcon__bd4e93dd","option-label":"vt_ce_Menu_optionLabel__bd4e93dd"};
1
+ var modules_efc4e723 = {"menu":"vt_ce_Menu_menu__5d29505b","option":"vt_ce_Menu_option__5d29505b","option-icon":"vt_ce_Menu_optionIcon__5d29505b","option-label":"vt_ce_Menu_optionLabel__5d29505b"};
2
2
 
3
3
  export { modules_efc4e723 as default };
@@ -1,3 +1,3 @@
1
- var modules_efc4e723 = {"radio":"vt_ce_RadioButton_radio__16b9e3d4","radio-circle-outer":"vt_ce_RadioButton_radioCircleOuter__16b9e3d4","radio-circle-inner":"vt_ce_RadioButton_radioCircleInner__16b9e3d4","passthrough-label-container":"vt_ce_RadioButton_passthroughLabelContainer__16b9e3d4","invisible-radio":"vt_ce_RadioButton_invisibleRadio__16b9e3d4","visible-label":"vt_ce_RadioButton_visibleLabel__16b9e3d4","icon-container":"vt_ce_RadioButton_iconContainer__16b9e3d4"};
1
+ var modules_efc4e723 = {"radio":"vt_ce_RadioButton_radio__2b107241","radio-circle-outer":"vt_ce_RadioButton_radioCircleOuter__2b107241","radio-circle-inner":"vt_ce_RadioButton_radioCircleInner__2b107241","passthrough-label-container":"vt_ce_RadioButton_passthroughLabelContainer__2b107241","invisible-radio":"vt_ce_RadioButton_invisibleRadio__2b107241","visible-label":"vt_ce_RadioButton_visibleLabel__2b107241","icon-container":"vt_ce_RadioButton_iconContainer__2b107241"};
2
2
 
3
3
  export { modules_efc4e723 as default };
@@ -1,3 +1,3 @@
1
- var modules_efc4e723 = {"select":"vt_ce_Select_select__b9f77002","label":"vt_ce_Select_label__b9f77002","inner-input-container":"vt_ce_Select_innerInputContainer__b9f77002","inner-input":"vt_ce_Select_innerInput__b9f77002","select-icon":"vt_ce_Select_selectIcon__b9f77002","help-label":"vt_ce_Select_helpLabel__b9f77002","error-label":"vt_ce_Select_errorLabel__b9f77002"};
1
+ var modules_efc4e723 = {"select":"vt_ce_Select_select__269cb8d6","label":"vt_ce_Select_label__269cb8d6","inner-input-container":"vt_ce_Select_innerInputContainer__269cb8d6","inner-input":"vt_ce_Select_innerInput__269cb8d6","select-icon":"vt_ce_Select_selectIcon__269cb8d6","help-label":"vt_ce_Select_helpLabel__269cb8d6","error-label":"vt_ce_Select_errorLabel__269cb8d6"};
2
2
 
3
3
  export { modules_efc4e723 as default };
@@ -30,6 +30,7 @@ const Textarea = forwardRef(
30
30
  placeholder: props.placeholder,
31
31
  value: props.value,
32
32
  rows: props.rows,
33
+ onChange: props.onChange,
33
34
  disabled: props.disabled,
34
35
  className: modules_efc4e723["inner-textarea"]
35
36
  }
@@ -1,3 +1,3 @@
1
- var modules_efc4e723 = {"textarea":"vt_ce_Textarea_textarea__c4cfba0d","label":"vt_ce_Textarea_label__c4cfba0d","inner-textarea-container":"vt_ce_Textarea_innerTextareaContainer__c4cfba0d","inner-textarea":"vt_ce_Textarea_innerTextarea__c4cfba0d","help-label":"vt_ce_Textarea_helpLabel__c4cfba0d","error-label":"vt_ce_Textarea_errorLabel__c4cfba0d"};
1
+ var modules_efc4e723 = {"textarea":"vt_ce_Textarea_textarea__8ff9396f","label":"vt_ce_Textarea_label__8ff9396f","inner-textarea-container":"vt_ce_Textarea_innerTextareaContainer__8ff9396f","inner-textarea":"vt_ce_Textarea_innerTextarea__8ff9396f","help-label":"vt_ce_Textarea_helpLabel__8ff9396f","error-label":"vt_ce_Textarea_errorLabel__8ff9396f"};
2
2
 
3
3
  export { modules_efc4e723 as default };
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
  'use client';
3
3
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
4
- import { useFloating, shift, flip, arrow, useRole, useHover, safePolygon, useFocus, useDismiss, useInteractions, FloatingArrow } from '@floating-ui/react';
4
+ import { useFloating, offset, inline, flip, shift, arrow, autoUpdate, useRole, useHover, safePolygon, useFocus, useDismiss, useInteractions, FloatingArrow } from '@floating-ui/react';
5
5
  import React__default from 'react';
6
6
  import modules_efc4e723 from './styles.module.scss.js';
7
7
  import { defaultThemeCssVariableUsages } from '../styles/defaultTheme.js';
@@ -17,12 +17,15 @@ function Tooltip({ placement = "bottom", ...props }) {
17
17
  onOpenChange: setIsOpen,
18
18
  placement,
19
19
  middleware: [
20
- shift(),
20
+ offset(10),
21
+ inline(),
21
22
  flip(),
23
+ shift(),
22
24
  arrow({
23
25
  element: arrowRef
24
26
  })
25
- ]
27
+ ],
28
+ whileElementsMounted: autoUpdate
26
29
  });
27
30
  const role = useRole(context, { role: "tooltip" });
28
31
  const hover = useHover(context, {
@@ -39,7 +42,16 @@ function Tooltip({ placement = "bottom", ...props }) {
39
42
  dismiss
40
43
  ]);
41
44
  return /* @__PURE__ */ jsxs(Fragment, { children: [
42
- /* @__PURE__ */ jsx("span", { role: "tooltip", ref: refs.setReference, ...getReferenceProps(), children: props.children }),
45
+ /* @__PURE__ */ jsx(
46
+ "span",
47
+ {
48
+ role: "tooltip",
49
+ ref: refs.setReference,
50
+ ...getReferenceProps(),
51
+ className: modules_efc4e723["tooltip-anchor"],
52
+ children: props.children
53
+ }
54
+ ),
43
55
  isOpen && /* @__PURE__ */ jsxs(
44
56
  "div",
45
57
  {
@@ -1,3 +1,3 @@
1
- var modules_efc4e723 = {"tooltip-body":"vt_ce_Tooltip_tooltipBody__0dd82f81"};
1
+ var modules_efc4e723 = {"tooltip-anchor":"vt_ce_Tooltip_tooltipAnchor__86070564","tooltip-body":"vt_ce_Tooltip_tooltipBody__86070564"};
2
2
 
3
3
  export { modules_efc4e723 as default };
@@ -20,6 +20,10 @@ const Typography = forwardRef(
20
20
  }
21
21
  );
22
22
  const variantComponents = {
23
+ title: "h1",
24
+ h1: "h1",
25
+ h2: "h2",
26
+ h3: "h3",
23
27
  h4: "h4",
24
28
  label: "span",
25
29
  paragraph1: "p",
@@ -1,3 +1,3 @@
1
- var modules_b5c3b63b = {"t-h4":"vt_ce_Typography_tH4__b98e9794","t-label":"vt_ce_Typography_tLabel__b98e9794","t-paragraph1":"vt_ce_Typography_tParagraph1__b98e9794","t-paragraph2":"vt_ce_Typography_tParagraph2__b98e9794","t-paragraph3":"vt_ce_Typography_tParagraph3__b98e9794","t-button":"vt_ce_Typography_tButton__b98e9794","t-buttonSmall":"vt_ce_Typography_tButtonSmall__b98e9794","c-primary":"vt_ce_Typography_cPrimary__b98e9794","c-secondary":"vt_ce_Typography_cSecondary__b98e9794","c-tertiary":"vt_ce_Typography_cTertiary__b98e9794","c-disabled":"vt_ce_Typography_cDisabled__b98e9794"};
1
+ var modules_b5c3b63b = {"t-title":"vt_ce_Typography_tTitle__f1637072","t-h1":"vt_ce_Typography_tH1__f1637072","t-h2":"vt_ce_Typography_tH2__f1637072","t-h3":"vt_ce_Typography_tH3__f1637072","t-h4":"vt_ce_Typography_tH4__f1637072","t-label":"vt_ce_Typography_tLabel__f1637072","t-paragraph1":"vt_ce_Typography_tParagraph1__f1637072","t-paragraph2":"vt_ce_Typography_tParagraph2__f1637072","t-paragraph3":"vt_ce_Typography_tParagraph3__f1637072","t-button":"vt_ce_Typography_tButton__f1637072","t-buttonSmall":"vt_ce_Typography_tButtonSmall__f1637072","c-primary":"vt_ce_Typography_cPrimary__f1637072","c-secondary":"vt_ce_Typography_cSecondary__f1637072","c-tertiary":"vt_ce_Typography_cTertiary__f1637072","c-disabled":"vt_ce_Typography_cDisabled__f1637072"};
2
2
 
3
3
  export { modules_b5c3b63b as default };