@raystack/apsara 0.29.0 → 0.30.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.
@@ -6,23 +6,14 @@ var togglegroup_module = require('./togglegroup.module.css.cjs');
6
6
  var index$1 = require('../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.cjs');
7
7
 
8
8
  const root = index$1.cva(togglegroup_module.default.root);
9
- /**
10
- * @deprecated Use Tabs from '@raystack/apsara/v1' instead.
11
- */
12
9
  const ToggleGroupRoot = ({ className, ...props }) => {
13
10
  return (jsxRuntime.jsxRuntimeExports.jsx(index.Root, { className: root({ className }), ...props }));
14
11
  };
15
12
  ToggleGroupRoot.defaultProps = { type: "single" };
16
13
  const item = index$1.cva(togglegroup_module.default.item);
17
- /**
18
- * @deprecated Use Tabs from '@raystack/apsara/v1' instead.
19
- */
20
14
  const ToggleGroupItem = ({ className, ...props }) => {
21
15
  return (jsxRuntime.jsxRuntimeExports.jsx(index.Item, { className: item({ className }), ...props }));
22
16
  };
23
- /**
24
- * @deprecated Use Tabs from '@raystack/apsara/v1' instead.
25
- */
26
17
  const ToggleGroup = Object.assign(ToggleGroupRoot, {
27
18
  Item: ToggleGroupItem,
28
19
  });
@@ -1 +1 @@
1
- {"version":3,"file":"togglegroup.cjs","sources":["../../toggle-group/togglegroup.tsx"],"sourcesContent":["import React, { ComponentPropsWithoutRef } from \"react\";\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\";\nimport styles from \"./togglegroup.module.css\";\nimport { cva, VariantProps } from \"class-variance-authority\";\n\nconst root = cva(styles.root);\n\n/**\n * @deprecated Use Tabs from '@raystack/apsara/v1' instead.\n */\nexport type ToggleGroupProps = ComponentPropsWithoutRef<\n typeof ToggleGroupPrimitive.Root\n> &\n VariantProps<typeof root>;\n\n/**\n * @deprecated Use Tabs from '@raystack/apsara/v1' instead.\n */\nexport const ToggleGroupRoot = ({ className, ...props }: ToggleGroupProps) => {\n return (\n <ToggleGroupPrimitive.Root className={root({ className })} {...props} />\n );\n};\n\nToggleGroupRoot.defaultProps = { type: \"single\" };\n\nconst item = cva(styles.item);\n\n/**\n * @deprecated Use Tabs from '@raystack/apsara/v1' instead.\n */\nexport interface ToggleGroupItemProps\n extends ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>,\n VariantProps<typeof item> {}\n\n/**\n * @deprecated Use Tabs from '@raystack/apsara/v1' instead.\n */\nexport const ToggleGroupItem = ({\n className,\n ...props\n}: ToggleGroupItemProps) => {\n return (\n <ToggleGroupPrimitive.Item className={item({ className })} {...props} />\n );\n};\n\n/**\n * @deprecated Use Tabs from '@raystack/apsara/v1' instead.\n */\nexport const ToggleGroup = Object.assign(ToggleGroupRoot, {\n Item: ToggleGroupItem,\n});\n"],"names":["cva","styles","_jsx","ToggleGroupPrimitive.Root","ToggleGroupPrimitive.Item"],"mappings":";;;;;;;AAKA,MAAM,IAAI,GAAGA,WAAG,CAACC,0BAAM,CAAC,IAAI,CAAC,CAAC;AAU9B;;AAEG;AACI,MAAM,eAAe,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoB,KAAI;AAC3E,IAAA,QACEC,gCAAC,CAAAC,UAAyB,EAAA,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,KAAM,KAAK,EAAA,CAAI,EACxE;AACJ,EAAE;AAEF,eAAe,CAAC,YAAY,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAElD,MAAM,IAAI,GAAGH,WAAG,CAACC,0BAAM,CAAC,IAAI,CAAC,CAAC;AAS9B;;AAEG;AACI,MAAM,eAAe,GAAG,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACa,KAAI;AACzB,IAAA,QACEC,gCAAC,CAAAE,UAAyB,EAAA,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,KAAM,KAAK,EAAA,CAAI,EACxE;AACJ,EAAE;AAEF;;AAEG;MACU,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;AACxD,IAAA,IAAI,EAAE,eAAe;AACtB,CAAA;;;;;;"}
1
+ {"version":3,"file":"togglegroup.cjs","sources":["../../toggle-group/togglegroup.tsx"],"sourcesContent":["import React, { ComponentPropsWithoutRef } from \"react\";\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\";\nimport styles from \"./togglegroup.module.css\";\nimport { cva, VariantProps } from \"class-variance-authority\";\n\nconst root = cva(styles.root);\n\nexport type ToggleGroupProps = ComponentPropsWithoutRef<\n typeof ToggleGroupPrimitive.Root\n> &\n VariantProps<typeof root>;\n\nexport const ToggleGroupRoot = ({ className, ...props }: ToggleGroupProps) => {\n return (\n <ToggleGroupPrimitive.Root className={root({ className })} {...props} />\n );\n};\n\nToggleGroupRoot.defaultProps = { type: \"single\" };\n\nconst item = cva(styles.item);\n\nexport interface ToggleGroupItemProps\n extends ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>,\n VariantProps<typeof item> {}\n\nexport const ToggleGroupItem = ({\n className,\n ...props\n}: ToggleGroupItemProps) => {\n return (\n <ToggleGroupPrimitive.Item className={item({ className })} {...props} />\n );\n};\n\nexport const ToggleGroup = Object.assign(ToggleGroupRoot, {\n Item: ToggleGroupItem,\n});\n"],"names":["cva","styles","_jsx","ToggleGroupPrimitive.Root","ToggleGroupPrimitive.Item"],"mappings":";;;;;;;AAKA,MAAM,IAAI,GAAGA,WAAG,CAACC,0BAAM,CAAC,IAAI,CAAC,CAAC;AAOvB,MAAM,eAAe,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoB,KAAI;AAC3E,IAAA,QACEC,gCAAC,CAAAC,UAAyB,EAAA,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,KAAM,KAAK,EAAA,CAAI,EACxE;AACJ,EAAE;AAEF,eAAe,CAAC,YAAY,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAElD,MAAM,IAAI,GAAGH,WAAG,CAACC,0BAAM,CAAC,IAAI,CAAC,CAAC;AAMvB,MAAM,eAAe,GAAG,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACa,KAAI;AACzB,IAAA,QACEC,gCAAC,CAAAE,UAAyB,EAAA,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,KAAM,KAAK,EAAA,CAAI,EACxE;AACJ,EAAE;MAEW,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;AACxD,IAAA,IAAI,EAAE,eAAe;AACtB,CAAA;;;;;;"}
@@ -2,13 +2,7 @@ import { ComponentPropsWithoutRef } from "react";
2
2
  import * as ToggleGroupPrimitive from "@radix-ui/react-toggle-group";
3
3
  import { VariantProps } from "class-variance-authority";
4
4
  declare const root: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
5
- /**
6
- * @deprecated Use Tabs from '@raystack/apsara/v1' instead.
7
- */
8
5
  export type ToggleGroupProps = ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Root> & VariantProps<typeof root>;
9
- /**
10
- * @deprecated Use Tabs from '@raystack/apsara/v1' instead.
11
- */
12
6
  export declare const ToggleGroupRoot: {
13
7
  ({ className, ...props }: ToggleGroupProps): import("react/jsx-runtime").JSX.Element;
14
8
  defaultProps: {
@@ -16,18 +10,9 @@ export declare const ToggleGroupRoot: {
16
10
  };
17
11
  };
18
12
  declare const item: (props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string;
19
- /**
20
- * @deprecated Use Tabs from '@raystack/apsara/v1' instead.
21
- */
22
13
  export interface ToggleGroupItemProps extends ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>, VariantProps<typeof item> {
23
14
  }
24
- /**
25
- * @deprecated Use Tabs from '@raystack/apsara/v1' instead.
26
- */
27
15
  export declare const ToggleGroupItem: ({ className, ...props }: ToggleGroupItemProps) => import("react/jsx-runtime").JSX.Element;
28
- /**
29
- * @deprecated Use Tabs from '@raystack/apsara/v1' instead.
30
- */
31
16
  export declare const ToggleGroup: {
32
17
  ({ className, ...props }: ToggleGroupProps): import("react/jsx-runtime").JSX.Element;
33
18
  defaultProps: {
@@ -1 +1 @@
1
- {"version":3,"file":"togglegroup.d.ts","sourceRoot":"","sources":["../../toggle-group/togglegroup.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,QAAA,MAAM,IAAI,yFAAmB,CAAC;AAE9B;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG,wBAAwB,CACrD,OAAO,oBAAoB,CAAC,IAAI,CACjC,GACC,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC;AAE5B;;GAEG;AACH,eAAO,MAAM,eAAe;8BAA6B,gBAAgB;;;;CAIxE,CAAC;AAIF,QAAA,MAAM,IAAI,yFAAmB,CAAC;AAE9B;;GAEG;AACH,MAAM,WAAW,oBACf,SAAQ,wBAAwB,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,EAChE,YAAY,CAAC,OAAO,IAAI,CAAC;CAAG;AAEhC;;GAEG;AACH,eAAO,MAAM,eAAe,4BAGzB,oBAAoB,4CAItB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,WAAW;8BAhCiC,gBAAgB;;;;;oCAuBtE,oBAAoB;CAWrB,CAAC"}
1
+ {"version":3,"file":"togglegroup.d.ts","sourceRoot":"","sources":["../../toggle-group/togglegroup.tsx"],"names":[],"mappings":"AAAA,OAAc,EAAE,wBAAwB,EAAE,MAAM,OAAO,CAAC;AACxD,OAAO,KAAK,oBAAoB,MAAM,8BAA8B,CAAC;AAErE,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAE7D,QAAA,MAAM,IAAI,yFAAmB,CAAC;AAE9B,MAAM,MAAM,gBAAgB,GAAG,wBAAwB,CACrD,OAAO,oBAAoB,CAAC,IAAI,CACjC,GACC,YAAY,CAAC,OAAO,IAAI,CAAC,CAAC;AAE5B,eAAO,MAAM,eAAe;8BAA6B,gBAAgB;;;;CAIxE,CAAC;AAIF,QAAA,MAAM,IAAI,yFAAmB,CAAC;AAE9B,MAAM,WAAW,oBACf,SAAQ,wBAAwB,CAAC,OAAO,oBAAoB,CAAC,IAAI,CAAC,EAChE,YAAY,CAAC,OAAO,IAAI,CAAC;CAAG;AAEhC,eAAO,MAAM,eAAe,4BAGzB,oBAAoB,4CAItB,CAAC;AAEF,eAAO,MAAM,WAAW;8BAvBiC,gBAAgB;;;;;oCAiBtE,oBAAoB;CAQrB,CAAC"}
@@ -4,23 +4,14 @@ import styles from './togglegroup.module.css.js';
4
4
  import { cva } from '../node_modules/.pnpm/class-variance-authority@0.7.1/node_modules/class-variance-authority/dist/index.js';
5
5
 
6
6
  const root = cva(styles.root);
7
- /**
8
- * @deprecated Use Tabs from '@raystack/apsara/v1' instead.
9
- */
10
7
  const ToggleGroupRoot = ({ className, ...props }) => {
11
8
  return (jsxRuntimeExports.jsx($6c1fd9e6a8969628$export$be92b6f5f03c0fe9, { className: root({ className }), ...props }));
12
9
  };
13
10
  ToggleGroupRoot.defaultProps = { type: "single" };
14
11
  const item = cva(styles.item);
15
- /**
16
- * @deprecated Use Tabs from '@raystack/apsara/v1' instead.
17
- */
18
12
  const ToggleGroupItem = ({ className, ...props }) => {
19
13
  return (jsxRuntimeExports.jsx($6c1fd9e6a8969628$export$6d08773d2e66f8f2, { className: item({ className }), ...props }));
20
14
  };
21
- /**
22
- * @deprecated Use Tabs from '@raystack/apsara/v1' instead.
23
- */
24
15
  const ToggleGroup = Object.assign(ToggleGroupRoot, {
25
16
  Item: ToggleGroupItem,
26
17
  });
@@ -1 +1 @@
1
- {"version":3,"file":"togglegroup.js","sources":["../../toggle-group/togglegroup.tsx"],"sourcesContent":["import React, { ComponentPropsWithoutRef } from \"react\";\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\";\nimport styles from \"./togglegroup.module.css\";\nimport { cva, VariantProps } from \"class-variance-authority\";\n\nconst root = cva(styles.root);\n\n/**\n * @deprecated Use Tabs from '@raystack/apsara/v1' instead.\n */\nexport type ToggleGroupProps = ComponentPropsWithoutRef<\n typeof ToggleGroupPrimitive.Root\n> &\n VariantProps<typeof root>;\n\n/**\n * @deprecated Use Tabs from '@raystack/apsara/v1' instead.\n */\nexport const ToggleGroupRoot = ({ className, ...props }: ToggleGroupProps) => {\n return (\n <ToggleGroupPrimitive.Root className={root({ className })} {...props} />\n );\n};\n\nToggleGroupRoot.defaultProps = { type: \"single\" };\n\nconst item = cva(styles.item);\n\n/**\n * @deprecated Use Tabs from '@raystack/apsara/v1' instead.\n */\nexport interface ToggleGroupItemProps\n extends ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>,\n VariantProps<typeof item> {}\n\n/**\n * @deprecated Use Tabs from '@raystack/apsara/v1' instead.\n */\nexport const ToggleGroupItem = ({\n className,\n ...props\n}: ToggleGroupItemProps) => {\n return (\n <ToggleGroupPrimitive.Item className={item({ className })} {...props} />\n );\n};\n\n/**\n * @deprecated Use Tabs from '@raystack/apsara/v1' instead.\n */\nexport const ToggleGroup = Object.assign(ToggleGroupRoot, {\n Item: ToggleGroupItem,\n});\n"],"names":["_jsx","ToggleGroupPrimitive.Root","ToggleGroupPrimitive.Item"],"mappings":";;;;;AAKA,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAU9B;;AAEG;AACI,MAAM,eAAe,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoB,KAAI;AAC3E,IAAA,QACEA,qBAAC,CAAAC,yCAAyB,EAAA,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,KAAM,KAAK,EAAA,CAAI,EACxE;AACJ,EAAE;AAEF,eAAe,CAAC,YAAY,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAElD,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAS9B;;AAEG;AACI,MAAM,eAAe,GAAG,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACa,KAAI;AACzB,IAAA,QACED,qBAAC,CAAAE,yCAAyB,EAAA,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,KAAM,KAAK,EAAA,CAAI,EACxE;AACJ,EAAE;AAEF;;AAEG;MACU,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;AACxD,IAAA,IAAI,EAAE,eAAe;AACtB,CAAA;;;;"}
1
+ {"version":3,"file":"togglegroup.js","sources":["../../toggle-group/togglegroup.tsx"],"sourcesContent":["import React, { ComponentPropsWithoutRef } from \"react\";\nimport * as ToggleGroupPrimitive from \"@radix-ui/react-toggle-group\";\nimport styles from \"./togglegroup.module.css\";\nimport { cva, VariantProps } from \"class-variance-authority\";\n\nconst root = cva(styles.root);\n\nexport type ToggleGroupProps = ComponentPropsWithoutRef<\n typeof ToggleGroupPrimitive.Root\n> &\n VariantProps<typeof root>;\n\nexport const ToggleGroupRoot = ({ className, ...props }: ToggleGroupProps) => {\n return (\n <ToggleGroupPrimitive.Root className={root({ className })} {...props} />\n );\n};\n\nToggleGroupRoot.defaultProps = { type: \"single\" };\n\nconst item = cva(styles.item);\n\nexport interface ToggleGroupItemProps\n extends ComponentPropsWithoutRef<typeof ToggleGroupPrimitive.Item>,\n VariantProps<typeof item> {}\n\nexport const ToggleGroupItem = ({\n className,\n ...props\n}: ToggleGroupItemProps) => {\n return (\n <ToggleGroupPrimitive.Item className={item({ className })} {...props} />\n );\n};\n\nexport const ToggleGroup = Object.assign(ToggleGroupRoot, {\n Item: ToggleGroupItem,\n});\n"],"names":["_jsx","ToggleGroupPrimitive.Root","ToggleGroupPrimitive.Item"],"mappings":";;;;;AAKA,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAOvB,MAAM,eAAe,GAAG,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAoB,KAAI;AAC3E,IAAA,QACEA,qBAAC,CAAAC,yCAAyB,EAAA,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,KAAM,KAAK,EAAA,CAAI,EACxE;AACJ,EAAE;AAEF,eAAe,CAAC,YAAY,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC;AAElD,MAAM,IAAI,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;AAMvB,MAAM,eAAe,GAAG,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACa,KAAI;AACzB,IAAA,QACED,qBAAC,CAAAE,yCAAyB,EAAA,EAAC,SAAS,EAAE,IAAI,CAAC,EAAE,SAAS,EAAE,CAAC,KAAM,KAAK,EAAA,CAAI,EACxE;AACJ,EAAE;MAEW,WAAW,GAAG,MAAM,CAAC,MAAM,CAAC,eAAe,EAAE;AACxD,IAAA,IAAI,EAAE,eAAe;AACtB,CAAA;;;;"}
@@ -47,8 +47,11 @@ const callout = index.cva(callout_module.default.callout, {
47
47
  type: 'grey',
48
48
  },
49
49
  });
50
- const Callout = React__namespace.forwardRef(({ className, type = 'grey', outline, highContrast, children, action, dismissible, onDismiss, width, ...props }, ref) => {
51
- const style = width ? { width: typeof width === 'number' ? `${width}px` : width } : undefined;
50
+ const Callout = React__namespace.forwardRef(({ className, type = 'grey', outline, highContrast, children, action, dismissible, onDismiss, width, style, icon, ...props }, ref) => {
51
+ const combinedStyle = {
52
+ ...style,
53
+ ...(width && { width: typeof width === 'number' ? `${width}px` : width }),
54
+ };
52
55
  const getRole = () => {
53
56
  switch (type) {
54
57
  case 'alert':
@@ -59,7 +62,7 @@ const Callout = React__namespace.forwardRef(({ className, type = 'grey', outline
59
62
  return 'status';
60
63
  }
61
64
  };
62
- return (jsxRuntime.jsxRuntimeExports.jsx("div", { ref: ref, className: `${callout({ type, outline, highContrast })} ${className || ''}`, style: style, role: getRole(), "aria-live": type === 'alert' ? 'assertive' : 'polite', ...props, children: jsxRuntime.jsxRuntimeExports.jsxs("div", { className: callout_module.default.container, children: [jsxRuntime.jsxRuntimeExports.jsxs("div", { className: callout_module.default.messageContainer, children: [jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.InfoCircledIcon, { className: callout_module.default.icon, "aria-hidden": "true" }), jsxRuntime.jsxRuntimeExports.jsx("div", { className: callout_module.default.message, children: children })] }), jsxRuntime.jsxRuntimeExports.jsxs("div", { className: callout_module.default.actionsContainer, children: [action && (jsxRuntime.jsxRuntimeExports.jsx("div", { className: callout_module.default.action, children: action })), dismissible && (jsxRuntime.jsxRuntimeExports.jsx("button", { className: callout_module.default.dismiss, onClick: onDismiss, "aria-label": "Dismiss message", type: "button", children: jsxRuntime.jsxRuntimeExports.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", role: "presentation", children: jsxRuntime.jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z", fill: "currentColor" }) }) }))] })] }) }));
65
+ return (jsxRuntime.jsxRuntimeExports.jsx("div", { ref: ref, className: `${callout({ type, outline, highContrast })} ${className || ''}`, style: combinedStyle, role: getRole(), "aria-live": type === 'alert' ? 'assertive' : 'polite', ...props, children: jsxRuntime.jsxRuntimeExports.jsxs("div", { className: callout_module.default.container, children: [jsxRuntime.jsxRuntimeExports.jsxs("div", { className: callout_module.default.messageContainer, children: [icon !== undefined ? (jsxRuntime.jsxRuntimeExports.jsx("div", { className: callout_module.default.icon, "aria-hidden": "true", children: icon })) : (jsxRuntime.jsxRuntimeExports.jsx(reactIcons_esm.InfoCircledIcon, { className: callout_module.default.icon, "aria-hidden": "true" })), jsxRuntime.jsxRuntimeExports.jsx("div", { className: callout_module.default.message, children: children })] }), jsxRuntime.jsxRuntimeExports.jsxs("div", { className: callout_module.default.actionsContainer, children: [action && (jsxRuntime.jsxRuntimeExports.jsx("div", { className: callout_module.default.action, children: action })), dismissible && (jsxRuntime.jsxRuntimeExports.jsx("button", { className: callout_module.default.dismiss, onClick: onDismiss, "aria-label": "Dismiss message", type: "button", children: jsxRuntime.jsxRuntimeExports.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", role: "presentation", children: jsxRuntime.jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z", fill: "currentColor" }) }) }))] })] }) }));
63
66
  });
64
67
  Callout.displayName = 'Callout';
65
68
 
@@ -1 +1 @@
1
- {"version":3,"file":"callout.cjs","sources":["../../../../v1/components/callout/callout.tsx"],"sourcesContent":["import { InfoCircledIcon } from '@radix-ui/react-icons';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\nimport { type ComponentPropsWithoutRef } from 'react';\n\nimport styles from './callout.module.css';\n\nconst callout = cva(styles.callout, {\n variants: {\n type: {\n grey: styles['callout-grey'],\n success: styles['callout-success'],\n alert: styles['callout-alert'],\n gradient: styles['callout-gradient'],\n accent: styles['callout-accent'],\n attention: styles['callout-attention'],\n normal: styles['callout-normal'],\n },\n outline: {\n true: styles['callout-outline'],\n },\n highContrast: {\n true: styles['callout-high-contrast'],\n },\n },\n defaultVariants: {\n type: 'grey',\n },\n});\n\nexport interface CalloutProps extends ComponentPropsWithoutRef<'div'>, VariantProps<typeof callout> {\n children: React.ReactNode;\n action?: React.ReactNode;\n dismissible?: boolean;\n onDismiss?: () => void;\n width?: string | number;\n}\n\nexport const Callout = React.forwardRef<HTMLDivElement, CalloutProps>(\n ({ \n className,\n type = 'grey',\n outline,\n highContrast,\n children,\n action,\n dismissible,\n onDismiss,\n width,\n ...props\n }, ref) => {\n const style = width ? { width: typeof width === 'number' ? `${width}px` : width } : undefined;\n\n const getRole = () => {\n switch (type) {\n case 'alert':\n return 'alert';\n case 'success':\n return 'status';\n default:\n return 'status';\n }\n };\n\n return (\n <div\n ref={ref}\n className={`${callout({ type, outline, highContrast })} ${className || ''}`}\n style={style}\n role={getRole()}\n aria-live={type === 'alert' ? 'assertive' : 'polite'}\n {...props}\n >\n <div className={styles.container}>\n <div className={styles.messageContainer}>\n <InfoCircledIcon \n className={styles.icon} \n aria-hidden=\"true\"\n />\n <div className={styles.message}>{children}</div>\n </div>\n \n <div className={styles.actionsContainer}>\n {action && (\n <div className={styles.action}>\n {action}\n </div>\n )}\n {dismissible && (\n <button \n className={styles.dismiss} \n onClick={onDismiss}\n aria-label=\"Dismiss message\"\n type=\"button\"\n >\n <svg \n width=\"12\" \n height=\"12\" \n viewBox=\"0 0 12 12\" \n fill=\"none\" \n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n <path \n fillRule=\"evenodd\" \n clipRule=\"evenodd\" \n d=\"M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z\" \n fill=\"currentColor\"\n />\n </svg>\n </button>\n )}\n </div>\n </div>\n </div>\n );\n }\n);\n\nCallout.displayName = 'Callout';"],"names":["cva","styles","React","_jsx","_jsxs","InfoCircledIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,OAAO,GAAGA,SAAG,CAACC,sBAAM,CAAC,OAAO,EAAE;AAClC,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,IAAI,EAAEA,sBAAM,CAAC,cAAc,CAAC;AAC5B,YAAA,OAAO,EAAEA,sBAAM,CAAC,iBAAiB,CAAC;AAClC,YAAA,KAAK,EAAEA,sBAAM,CAAC,eAAe,CAAC;AAC9B,YAAA,QAAQ,EAAEA,sBAAM,CAAC,kBAAkB,CAAC;AACpC,YAAA,MAAM,EAAEA,sBAAM,CAAC,gBAAgB,CAAC;AAChC,YAAA,SAAS,EAAEA,sBAAM,CAAC,mBAAmB,CAAC;AACtC,YAAA,MAAM,EAAEA,sB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x"],"sourcesContent":["import { InfoCircledIcon } from '@radix-ui/react-icons';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\nimport { type ComponentPropsWithoutRef } from 'react';\n\nimport styles from './callout.module.css';\n\nconst callout = cva(styles.callout, {\n variants: {\n type: {\n grey: styles['callout-grey'],\n success: styles['callout-success'],\n alert: styles['callout-alert'],\n gradient: styles['callout-gradient'],\n accent: styles['callout-accent'],\n attention: styles['callout-attention'],\n normal: styles['callout-normal'],\n },\n outline: {\n true: styles['callout-outline'],\n },\n highContrast: {\n true: styles['callout-high-contrast'],\n },\n },\n defaultVariants: {\n type: 'grey',\n },\n});\n\nexport interface CalloutProps extends ComponentPropsWithoutRef<'div'>, VariantProps<typeof callout> {\n children: React.ReactNode;\n action?: React.ReactNode;\n dismissible?: boolean;\n onDismiss?: () => void;\n width?: string | number;\n style?: React.CSSProperties;\n icon?: React.ReactNode;\n}\n\nexport const Callout = React.forwardRef<HTMLDivElement, CalloutProps>(\n ({ \n className,\n type = 'grey',\n outline,\n highContrast,\n children,\n action,\n dismissible,\n onDismiss,\n width,\n style,\n icon,\n ...props\n }, ref) => {\n const combinedStyle = {\n ...style,\n ...(width && { width: typeof width === 'number' ? `${width}px` : width }),\n };\n\n const getRole = () => {\n switch (type) {\n case 'alert':\n return 'alert';\n case 'success':\n return 'status';\n default:\n return 'status';\n }\n };\n\n return (\n <div\n ref={ref}\n className={`${callout({ type, outline, highContrast })} ${className || ''}`}\n style={combinedStyle}\n role={getRole()}\n aria-live={type === 'alert' ? 'assertive' : 'polite'}\n {...props}\n >\n <div className={styles.container}>\n <div className={styles.messageContainer}>\n {icon !== undefined ? (\n <div className={styles.icon} aria-hidden=\"true\">\n {icon}\n </div>\n ) : (\n <InfoCircledIcon \n className={styles.icon} \n aria-hidden=\"true\"\n />\n )}\n <div className={styles.message}>{children}</div>\n </div>\n \n <div className={styles.actionsContainer}>\n {action && (\n <div className={styles.action}>\n {action}\n </div>\n )}\n {dismissible && (\n <button \n className={styles.dismiss} \n onClick={onDismiss}\n aria-label=\"Dismiss message\"\n type=\"button\"\n >\n <svg \n width=\"12\" \n height=\"12\" \n viewBox=\"0 0 12 12\" \n fill=\"none\" \n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n <path \n fillRule=\"evenodd\" \n clipRule=\"evenodd\" \n d=\"M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z\" \n fill=\"currentColor\"\n />\n </svg>\n </button>\n )}\n </div>\n </div>\n </div>\n );\n }\n);\n\nCallout.displayName = 'Callout';"],"names":["cva","styles","React","_jsx","_jsxs","InfoCircledIcon"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,MAAM,OAAO,GAAGA,SAAG,CAACC,sBAAM,CAAC,OAAO,EAAE;AAClC,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,IAAI,EAAEA,sBAAM,CAAC,cAAc,CAAC;AAC5B,YAAA,OAAO,EAAEA,sBAAM,CAAC,iBAAiB,CAAC;AAClC,YAAA,KAAK,EAAEA,sBAAM,CAAC,eAAe,CAAC;AAC9B,YAAA,QAAQ,EAAEA,sBAAM,CAAC,kBAAkB,CAAC;AACpC,YAAA,MAAM,EAAEA,sBAAM,CAAC,gBAAgB,CAAC;AAChC,YAAA,SAAS,EAAEA,sBAAM,CAAC,mBAAmB,C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C,CACV,CACG,EAAA,CAAA,CAAA,EAAA,CACF,EACF,CAAA,EACN;AACJ,CAAC,EACD;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS;;;;"}
@@ -12,6 +12,8 @@ export interface CalloutProps extends ComponentPropsWithoutRef<'div'>, VariantPr
12
12
  dismissible?: boolean;
13
13
  onDismiss?: () => void;
14
14
  width?: string | number;
15
+ style?: React.CSSProperties;
16
+ icon?: React.ReactNode;
15
17
  }
16
18
  export declare const Callout: React.ForwardRefExoticComponent<CalloutProps & React.RefAttributes<HTMLDivElement>>;
17
19
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"callout.d.ts","sourceRoot":"","sources":["../../../../v1/components/callout/callout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAItD,QAAA,MAAM,OAAO;;;;mFAqBX,CAAC;AAEH,MAAM,WAAW,YAAa,SAAQ,wBAAwB,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,OAAO,OAAO,CAAC;IACjG,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;CACzB;AAED,eAAO,MAAM,OAAO,qFAgFnB,CAAC"}
1
+ {"version":3,"file":"callout.d.ts","sourceRoot":"","sources":["../../../../v1/components/callout/callout.tsx"],"names":[],"mappings":"AACA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,KAAK,wBAAwB,EAAE,MAAM,OAAO,CAAC;AAItD,QAAA,MAAM,OAAO;;;;mFAqBX,CAAC;AAEH,MAAM,WAAW,YAAa,SAAQ,wBAAwB,CAAC,KAAK,CAAC,EAAE,YAAY,CAAC,OAAO,OAAO,CAAC;IACjG,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IAC5B,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACxB;AAED,eAAO,MAAM,OAAO,qFA2FnB,CAAC"}
@@ -26,8 +26,11 @@ const callout = cva(styles.callout, {
26
26
  type: 'grey',
27
27
  },
28
28
  });
29
- const Callout = React.forwardRef(({ className, type = 'grey', outline, highContrast, children, action, dismissible, onDismiss, width, ...props }, ref) => {
30
- const style = width ? { width: typeof width === 'number' ? `${width}px` : width } : undefined;
29
+ const Callout = React.forwardRef(({ className, type = 'grey', outline, highContrast, children, action, dismissible, onDismiss, width, style, icon, ...props }, ref) => {
30
+ const combinedStyle = {
31
+ ...style,
32
+ ...(width && { width: typeof width === 'number' ? `${width}px` : width }),
33
+ };
31
34
  const getRole = () => {
32
35
  switch (type) {
33
36
  case 'alert':
@@ -38,7 +41,7 @@ const Callout = React.forwardRef(({ className, type = 'grey', outline, highContr
38
41
  return 'status';
39
42
  }
40
43
  };
41
- return (jsxRuntimeExports.jsx("div", { ref: ref, className: `${callout({ type, outline, highContrast })} ${className || ''}`, style: style, role: getRole(), "aria-live": type === 'alert' ? 'assertive' : 'polite', ...props, children: jsxRuntimeExports.jsxs("div", { className: styles.container, children: [jsxRuntimeExports.jsxs("div", { className: styles.messageContainer, children: [jsxRuntimeExports.jsx(InfoCircledIcon, { className: styles.icon, "aria-hidden": "true" }), jsxRuntimeExports.jsx("div", { className: styles.message, children: children })] }), jsxRuntimeExports.jsxs("div", { className: styles.actionsContainer, children: [action && (jsxRuntimeExports.jsx("div", { className: styles.action, children: action })), dismissible && (jsxRuntimeExports.jsx("button", { className: styles.dismiss, onClick: onDismiss, "aria-label": "Dismiss message", type: "button", children: jsxRuntimeExports.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", role: "presentation", children: jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z", fill: "currentColor" }) }) }))] })] }) }));
44
+ return (jsxRuntimeExports.jsx("div", { ref: ref, className: `${callout({ type, outline, highContrast })} ${className || ''}`, style: combinedStyle, role: getRole(), "aria-live": type === 'alert' ? 'assertive' : 'polite', ...props, children: jsxRuntimeExports.jsxs("div", { className: styles.container, children: [jsxRuntimeExports.jsxs("div", { className: styles.messageContainer, children: [icon !== undefined ? (jsxRuntimeExports.jsx("div", { className: styles.icon, "aria-hidden": "true", children: icon })) : (jsxRuntimeExports.jsx(InfoCircledIcon, { className: styles.icon, "aria-hidden": "true" })), jsxRuntimeExports.jsx("div", { className: styles.message, children: children })] }), jsxRuntimeExports.jsxs("div", { className: styles.actionsContainer, children: [action && (jsxRuntimeExports.jsx("div", { className: styles.action, children: action })), dismissible && (jsxRuntimeExports.jsx("button", { className: styles.dismiss, onClick: onDismiss, "aria-label": "Dismiss message", type: "button", children: jsxRuntimeExports.jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": "true", role: "presentation", children: jsxRuntimeExports.jsx("path", { fillRule: "evenodd", clipRule: "evenodd", d: "M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z", fill: "currentColor" }) }) }))] })] }) }));
42
45
  });
43
46
  Callout.displayName = 'Callout';
44
47
 
@@ -1 +1 @@
1
- {"version":3,"file":"callout.js","sources":["../../../../v1/components/callout/callout.tsx"],"sourcesContent":["import { InfoCircledIcon } from '@radix-ui/react-icons';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\nimport { type ComponentPropsWithoutRef } from 'react';\n\nimport styles from './callout.module.css';\n\nconst callout = cva(styles.callout, {\n variants: {\n type: {\n grey: styles['callout-grey'],\n success: styles['callout-success'],\n alert: styles['callout-alert'],\n gradient: styles['callout-gradient'],\n accent: styles['callout-accent'],\n attention: styles['callout-attention'],\n normal: styles['callout-normal'],\n },\n outline: {\n true: styles['callout-outline'],\n },\n highContrast: {\n true: styles['callout-high-contrast'],\n },\n },\n defaultVariants: {\n type: 'grey',\n },\n});\n\nexport interface CalloutProps extends ComponentPropsWithoutRef<'div'>, VariantProps<typeof callout> {\n children: React.ReactNode;\n action?: React.ReactNode;\n dismissible?: boolean;\n onDismiss?: () => void;\n width?: string | number;\n}\n\nexport const Callout = React.forwardRef<HTMLDivElement, CalloutProps>(\n ({ \n className,\n type = 'grey',\n outline,\n highContrast,\n children,\n action,\n dismissible,\n onDismiss,\n width,\n ...props\n }, ref) => {\n const style = width ? { width: typeof width === 'number' ? `${width}px` : width } : undefined;\n\n const getRole = () => {\n switch (type) {\n case 'alert':\n return 'alert';\n case 'success':\n return 'status';\n default:\n return 'status';\n }\n };\n\n return (\n <div\n ref={ref}\n className={`${callout({ type, outline, highContrast })} ${className || ''}`}\n style={style}\n role={getRole()}\n aria-live={type === 'alert' ? 'assertive' : 'polite'}\n {...props}\n >\n <div className={styles.container}>\n <div className={styles.messageContainer}>\n <InfoCircledIcon \n className={styles.icon} \n aria-hidden=\"true\"\n />\n <div className={styles.message}>{children}</div>\n </div>\n \n <div className={styles.actionsContainer}>\n {action && (\n <div className={styles.action}>\n {action}\n </div>\n )}\n {dismissible && (\n <button \n className={styles.dismiss} \n onClick={onDismiss}\n aria-label=\"Dismiss message\"\n type=\"button\"\n >\n <svg \n width=\"12\" \n height=\"12\" \n viewBox=\"0 0 12 12\" \n fill=\"none\" \n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n <path \n fillRule=\"evenodd\" \n clipRule=\"evenodd\" \n d=\"M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z\" \n fill=\"currentColor\"\n />\n </svg>\n </button>\n )}\n </div>\n </div>\n </div>\n );\n }\n);\n\nCallout.displayName = 'Callout';"],"names":["_jsx","_jsxs"],"mappings":";;;;;;AAOA,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE;AAClC,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,IAAI,EAAE,MAAM,CAAC,cAAc,CAAC;AAC5B,YAAA,OAAO,EAAE,MAAM,CAAC,iBAAiB,CAAC;AAClC,YAAA,KAAK,EAAE,MAAM,CAAC,eAAe,CAAC;AAC9B,YAAA,QAAQ,EAAE,MAAM,CAAC,kBAAkB,CAAC;AACpC,YAAA,MAAM,EAAE,MAAM,CAAC,gBAAgB,CAAC;AAChC,YAAA,SAAS,EAAE,MAAM,CAAC,mBAAmB,CAAC;AACtC,YAAA,MAAM,EAAE,MAAM,CAAC,gBAAgB,CAAC;AACjC,SAAA;AACD,QAAA,OAAO,EAAE;AACP,YAAA,IAAI,EAAE,MAAM,CAAC,iBAAiB,CAAC;AAChC,SAAA;AACD,QAAA,YAAY,EAAE;AACZ,YAAA,IAAI,EAAE,MAAM,CAAC,uBAAuB,CAAC;AACtC,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,MAAM;AACb,KAAA;AACF,CAAA,CAAC,CAAC;AAUU,MAAA,OAAO,GAAG,KAAK,CAAC,UAAU,CACrC,CAAC,EACC,SAAS,EACT,IAAI,GAAG,MAAM,EACb,OAAO,EACP,YAAY,EACZ,QAAQ,EACR,MAAM,EACN,WAAW,EACX,SAAS,EACT,KAAK,EACL,GAAG,KAAK,EACT,EAAE,GAAG,KAAI;AACR,IAAA,MAAM,KAAK,GAAG,KAAK,GAAG,EAAE,KAAK,EAAE,OAAO,KAAK,KAAK,QAAQ,GAAG,CAAG,EAAA,KAAK,CAA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AAO,EAAE,SAAS,EACP,YAAA,EAAA,iBAAiB,EAC5B,IAAI,EAAC,QAAQ,EAEb,QAAA,EAAAA,qBAAA,CAAA,KAAA,EAAA,EACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,EAAA,aAAA,EACtB,MAAM,EAClB,IAAI,EAAC,cAAc,EAAA,QAAA,EAEnBA,gCACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,qgBAAqgB,EACvgB,IAAI,EAAC,cAAc,EAAA,CACnB,GACE,EACC,CAAA,CACV,IACG,CACF,EAAA,CAAA,EAAA,CACF,EACN;AACJ,CAAC,EACD;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS;;;;"}
1
+ {"version":3,"file":"callout.js","sources":["../../../../v1/components/callout/callout.tsx"],"sourcesContent":["import { InfoCircledIcon } from '@radix-ui/react-icons';\nimport { cva, type VariantProps } from 'class-variance-authority';\nimport * as React from 'react';\nimport { type ComponentPropsWithoutRef } from 'react';\n\nimport styles from './callout.module.css';\n\nconst callout = cva(styles.callout, {\n variants: {\n type: {\n grey: styles['callout-grey'],\n success: styles['callout-success'],\n alert: styles['callout-alert'],\n gradient: styles['callout-gradient'],\n accent: styles['callout-accent'],\n attention: styles['callout-attention'],\n normal: styles['callout-normal'],\n },\n outline: {\n true: styles['callout-outline'],\n },\n highContrast: {\n true: styles['callout-high-contrast'],\n },\n },\n defaultVariants: {\n type: 'grey',\n },\n});\n\nexport interface CalloutProps extends ComponentPropsWithoutRef<'div'>, VariantProps<typeof callout> {\n children: React.ReactNode;\n action?: React.ReactNode;\n dismissible?: boolean;\n onDismiss?: () => void;\n width?: string | number;\n style?: React.CSSProperties;\n icon?: React.ReactNode;\n}\n\nexport const Callout = React.forwardRef<HTMLDivElement, CalloutProps>(\n ({ \n className,\n type = 'grey',\n outline,\n highContrast,\n children,\n action,\n dismissible,\n onDismiss,\n width,\n style,\n icon,\n ...props\n }, ref) => {\n const combinedStyle = {\n ...style,\n ...(width && { width: typeof width === 'number' ? `${width}px` : width }),\n };\n\n const getRole = () => {\n switch (type) {\n case 'alert':\n return 'alert';\n case 'success':\n return 'status';\n default:\n return 'status';\n }\n };\n\n return (\n <div\n ref={ref}\n className={`${callout({ type, outline, highContrast })} ${className || ''}`}\n style={combinedStyle}\n role={getRole()}\n aria-live={type === 'alert' ? 'assertive' : 'polite'}\n {...props}\n >\n <div className={styles.container}>\n <div className={styles.messageContainer}>\n {icon !== undefined ? (\n <div className={styles.icon} aria-hidden=\"true\">\n {icon}\n </div>\n ) : (\n <InfoCircledIcon \n className={styles.icon} \n aria-hidden=\"true\"\n />\n )}\n <div className={styles.message}>{children}</div>\n </div>\n \n <div className={styles.actionsContainer}>\n {action && (\n <div className={styles.action}>\n {action}\n </div>\n )}\n {dismissible && (\n <button \n className={styles.dismiss} \n onClick={onDismiss}\n aria-label=\"Dismiss message\"\n type=\"button\"\n >\n <svg \n width=\"12\" \n height=\"12\" \n viewBox=\"0 0 12 12\" \n fill=\"none\" \n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n role=\"presentation\"\n >\n <path \n fillRule=\"evenodd\" \n clipRule=\"evenodd\" \n d=\"M9.5066 3.3066C9.73115 3.08205 9.73115 2.71798 9.5066 2.49343C9.28205 2.26887 8.91798 2.26887 8.69343 2.49343L6.00001 5.18684L3.3066 2.49343C3.08205 2.26887 2.71798 2.26887 2.49343 2.49343C2.26887 2.71798 2.26887 3.08205 2.49343 3.3066L5.18684 6.00001L2.49343 8.69343C2.26887 8.91798 2.26887 9.28205 2.49343 9.5066C2.71798 9.73115 3.08205 9.73115 3.3066 9.5066L6.00001 6.81318L8.69343 9.5066C8.91798 9.73115 9.28205 9.73115 9.5066 9.5066C9.73115 9.28205 9.73115 8.91798 9.5066 8.69343L6.81318 6.00001L9.5066 3.3066Z\" \n fill=\"curr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qBAAA,CAAA,QAAA,EAAA,EACE,SAAS,EAAE,MAAM,CAAC,OAAO,EACzB,OAAO,EAAE,SAAS,EAAA,YAAA,EACP,iBAAiB,EAC5B,IAAI,EAAC,QAAQ,EAEb,QAAA,EAAAA,qBAAA,CAAA,KAAA,EAAA,EACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,KAAK,EAAC,4BAA4B,iBACtB,MAAM,EAClB,IAAI,EAAC,cAAc,EAAA,QAAA,EAEnBA,gCACE,QAAQ,EAAC,SAAS,EAClB,QAAQ,EAAC,SAAS,EAClB,CAAC,EAAC,qgBAAqgB,EACvgB,IAAI,EAAC,cAAc,GACnB,EACE,CAAA,EAAA,CACC,CACV,CACG,EAAA,CAAA,CAAA,EAAA,CACF,EACF,CAAA,EACN;AACJ,CAAC,EACD;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS;;;;"}
@@ -23,7 +23,7 @@ const tooltip = index$1.cva(tooltip_module.default.content, {
23
23
  side: "top"
24
24
  }
25
25
  });
26
- const Tooltip = ({ children, message, disabled, side = "top", className, delayDuration = 200, skipDelayDuration = 200, 'aria-label': ariaLabel, asChild = true, }) => {
26
+ const Tooltip = ({ children, message, disabled, side = "top", className, delayDuration = 200, skipDelayDuration = 200, 'aria-label': ariaLabel, asChild = false, }) => {
27
27
  return disabled ? (children) : (jsxRuntime.jsxRuntimeExports.jsx(index.Provider, { delayDuration: delayDuration, skipDelayDuration: skipDelayDuration, children: jsxRuntime.jsxRuntimeExports.jsxs(index.Root, { children: [jsxRuntime.jsxRuntimeExports.jsx(index.Trigger, { "aria-describedby": "tooltip", asChild: asChild, children: children }), jsxRuntime.jsxRuntimeExports.jsx(index.Portal, { children: jsxRuntime.jsxRuntimeExports.jsxs(index.Content, { id: "tooltip", role: "tooltip", "aria-label": ariaLabel || (typeof message === 'string' ? message : undefined), side: side?.split('-')[0] || 'top', align: (side?.includes('-') ? (side.split('-')[1] === 'left' ? 'start' : 'end') : 'center'), sideOffset: 4, className: tooltip({ side, className }), children: [typeof message === "string" ? (jsxRuntime.jsxRuntimeExports.jsx(text.Text, { children: message })) : (message), jsxRuntime.jsxRuntimeExports.jsx(index.Arrow, { className: tooltip_module.default.arrow, width: 12, height: 6 })] }) })] }) }));
28
28
  };
29
29
  Tooltip.displayName = 'Tooltip';
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.cjs","sources":["../../../../v1/components/tooltip/tooltip.tsx"],"sourcesContent":["import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport React from \"react\";\n\nimport { Text } from \"../text\";\nimport styles from \"./tooltip.module.css\";\n\nconst tooltip = cva(styles.content, {\n variants: {\n side: {\n top: styles[\"side-top\"],\n right: styles[\"side-right\"],\n bottom: styles[\"side-bottom\"],\n left: styles[\"side-left\"],\n \"top-left\": styles[\"side-top-left\"],\n \"top-right\": styles[\"side-top-right\"],\n \"bottom-left\": styles[\"side-bottom-left\"],\n \"bottom-right\": styles[\"side-bottom-right\"],\n }\n },\n defaultVariants: {\n side: \"top\"\n }\n});\n\ninterface TooltipProps extends VariantProps<typeof tooltip> {\n disabled?: boolean;\n children: React.ReactNode;\n message: React.ReactNode;\n className?: string;\n delayDuration?: number;\n skipDelayDuration?: number;\n 'aria-label'?: string;\n asChild?: boolean;\n}\n\nexport const Tooltip: React.FC<TooltipProps> = ({\n children,\n message,\n disabled,\n side = \"top\",\n className,\n delayDuration = 200,\n skipDelayDuration = 200,\n 'aria-label': ariaLabel,\n asChild = true,\n}) => {\n return disabled ? (\n children\n ) : (\n <TooltipPrimitive.Provider delayDuration={delayDuration} skipDelayDuration={skipDelayDuration}>\n <TooltipPrimitive.Root>\n <TooltipPrimitive.Trigger aria-describedby=\"tooltip\" asChild={asChild}>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n id=\"tooltip\"\n role=\"tooltip\"\n aria-label={ariaLabel || (typeof message === 'string' ? message : undefined)}\n side={side?.split('-')[0] as TooltipPrimitive.TooltipContentProps['side'] || 'top'}\n align={(side?.includes('-') ? (side.split('-')[1] === 'left' ? 'start' : 'end') : 'center') satisfies 'start' | 'end' | 'center'}\n sideOffset={4}\n className={tooltip({ side, className })}\n >\n {typeof message === \"string\" ? (\n <Text>{message}</Text>\n ) : (\n message\n )}\n <TooltipPrimitive.Arrow className={styles.arrow} width={12} height={6} />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n </TooltipPrimitive.Provider>\n );\n};\n\nTooltip.displayName = 'Tooltip';\n\nexport const TooltipProvider = TooltipPrimitive.Provider;\n"],"names":["cva","styles","_jsx","TooltipPrimitive.Provider","_jsxs","TooltipPrimitive.Root","TooltipPrimitive.Trigger","TooltipPrimitive.Portal","TooltipPrimitive.Content","Text","TooltipPrimitive.Arrow"],"mappings":";;;;;;;;AAOA,MAAM,OAAO,GAAGA,WAAG,CAACC,sBAAM,CAAC,OAAO,EAAE;AAClC,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,GAAG,EAAEA,sBAAM,CAAC,UAAU,CAAC;AACvB,YAAA,KAAK,EAAEA,sBAAM,CAAC,YAAY,CAAC;AAC3B,YAAA,MAAM,EAAEA,sBAAM,CAAC,aAAa,CAAC;AAC7B,YAAA,IAAI,EAAEA,sBAAM,CAAC,WAAW,CAAC;AACzB,YAAA,UAAU,EAAEA,sBAAM,CAAC,eAAe,CAAC;AACnC,YAAA,WAAW,EAAEA,sBAAM,CAAC,gBAAgB,CAAC;AACrC,YAAA,aAAa,EAAEA,sBAAM,CAAC,kBAAkB,CAAC;AACzC,YAAA,cAAc,EAAEA,sBAAM,CAAC,mBAAmB,CAAC;AAC5C,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,KAAK;AACZ,KAAA;AACF,CAAA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AAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAA,CAAI,IAChD,EACH,CAAA,CAAA,EAAA,CACJ,EACE,CAAA,CAC7B,CAAC;AACJ,EAAE;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAEnB,MAAA,eAAe,GAAGE;;;;;"}
1
+ {"version":3,"file":"tooltip.cjs","sources":["../../../../v1/components/tooltip/tooltip.tsx"],"sourcesContent":["import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport React from \"react\";\n\nimport { Text } from \"../text\";\nimport styles from \"./tooltip.module.css\";\n\nconst tooltip = cva(styles.content, {\n variants: {\n side: {\n top: styles[\"side-top\"],\n right: styles[\"side-right\"],\n bottom: styles[\"side-bottom\"],\n left: styles[\"side-left\"],\n \"top-left\": styles[\"side-top-left\"],\n \"top-right\": styles[\"side-top-right\"],\n \"bottom-left\": styles[\"side-bottom-left\"],\n \"bottom-right\": styles[\"side-bottom-right\"],\n }\n },\n defaultVariants: {\n side: \"top\"\n }\n});\n\ninterface TooltipProps extends VariantProps<typeof tooltip> {\n disabled?: boolean;\n children: React.ReactNode;\n message: React.ReactNode;\n className?: string;\n delayDuration?: number;\n skipDelayDuration?: number;\n 'aria-label'?: string;\n asChild?: boolean;\n}\n\nexport const Tooltip: React.FC<TooltipProps> = ({\n children,\n message,\n disabled,\n side = \"top\",\n className,\n delayDuration = 200,\n skipDelayDuration = 200,\n 'aria-label': ariaLabel,\n asChild = false,\n}) => {\n return disabled ? (\n children\n ) : (\n <TooltipPrimitive.Provider delayDuration={delayDuration} skipDelayDuration={skipDelayDuration}>\n <TooltipPrimitive.Root>\n <TooltipPrimitive.Trigger aria-describedby=\"tooltip\" asChild={asChild}>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n id=\"tooltip\"\n role=\"tooltip\"\n aria-label={ariaLabel || (typeof message === 'string' ? message : undefined)}\n side={side?.split('-')[0] as TooltipPrimitive.TooltipContentProps['side'] || 'top'}\n align={(side?.includes('-') ? (side.split('-')[1] === 'left' ? 'start' : 'end') : 'center') satisfies 'start' | 'end' | 'center'}\n sideOffset={4}\n className={tooltip({ side, className })}\n >\n {typeof message === \"string\" ? (\n <Text>{message}</Text>\n ) : (\n message\n )}\n <TooltipPrimitive.Arrow className={styles.arrow} width={12} height={6} />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n </TooltipPrimitive.Provider>\n );\n};\n\nTooltip.displayName = 'Tooltip';\n\nexport const TooltipProvider = TooltipPrimitive.Provider;\n"],"names":["cva","styles","_jsx","TooltipPrimitive.Provider","_jsxs","TooltipPrimitive.Root","TooltipPrimitive.Trigger","TooltipPrimitive.Portal","TooltipPrimitive.Content","Text","TooltipPrimitive.Arrow"],"mappings":";;;;;;;;AAOA,MAAM,OAAO,GAAGA,WAAG,CAACC,sBAAM,CAAC,OAAO,EAAE;AAClC,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,GAAG,EAAEA,sBAAM,CAAC,UAAU,CAAC;AACvB,YAAA,KAAK,EAAEA,sBAAM,CAAC,YAAY,CAAC;AAC3B,YAAA,MAAM,EAAEA,sBAAM,CAAC,aAAa,CAAC;AAC7B,YAAA,IAAI,EAAEA,sBAAM,CAAC,WAAW,CAAC;AACzB,YAAA,UAAU,EAAEA,sBAAM,CAAC,eAAe,CAAC;AACnC,YAAA,WAAW,EAAEA,sBAAM,CAAC,gBAAgB,CAAC;AACrC,YAAA,aAAa,EAAEA,sBAAM,CAAC,kBAAkB,CAAC;AACzC,YAAA,cAAc,EAAEA,sBAAM,CAAC,mBAAmB,CAAC;AAC5C,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,KAAK;AACZ,KAAA;AACF,CAAA,CAAC,CAAC;AAaI,MAAM,OAAO,GAA2B,CA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,MAAM,EAAE,CAAC,EAAA,CAAI,IAChD,EACH,CAAA,CAAA,EAAA,CACJ,EACE,CAAA,CAC7B,CAAC;AACJ,EAAE;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAEnB,MAAA,eAAe,GAAGE;;;;;"}
@@ -21,7 +21,7 @@ const tooltip = cva(styles.content, {
21
21
  side: "top"
22
22
  }
23
23
  });
24
- const Tooltip = ({ children, message, disabled, side = "top", className, delayDuration = 200, skipDelayDuration = 200, 'aria-label': ariaLabel, asChild = true, }) => {
24
+ const Tooltip = ({ children, message, disabled, side = "top", className, delayDuration = 200, skipDelayDuration = 200, 'aria-label': ariaLabel, asChild = false, }) => {
25
25
  return disabled ? (children) : (jsxRuntimeExports.jsx($a093c7e1ec25a057$export$2881499e37b75b9a, { delayDuration: delayDuration, skipDelayDuration: skipDelayDuration, children: jsxRuntimeExports.jsxs($a093c7e1ec25a057$export$be92b6f5f03c0fe9, { children: [jsxRuntimeExports.jsx($a093c7e1ec25a057$export$41fb9f06171c75f4, { "aria-describedby": "tooltip", asChild: asChild, children: children }), jsxRuntimeExports.jsx($a093c7e1ec25a057$export$602eac185826482c, { children: jsxRuntimeExports.jsxs($a093c7e1ec25a057$export$7c6e2c02157bb7d2, { id: "tooltip", role: "tooltip", "aria-label": ariaLabel || (typeof message === 'string' ? message : undefined), side: side?.split('-')[0] || 'top', align: (side?.includes('-') ? (side.split('-')[1] === 'left' ? 'start' : 'end') : 'center'), sideOffset: 4, className: tooltip({ side, className }), children: [typeof message === "string" ? (jsxRuntimeExports.jsx(Text, { children: message })) : (message), jsxRuntimeExports.jsx($a093c7e1ec25a057$export$21b07c8f274aebd5, { className: styles.arrow, width: 12, height: 6 })] }) })] }) }));
26
26
  };
27
27
  Tooltip.displayName = 'Tooltip';
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","sources":["../../../../v1/components/tooltip/tooltip.tsx"],"sourcesContent":["import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport React from \"react\";\n\nimport { Text } from \"../text\";\nimport styles from \"./tooltip.module.css\";\n\nconst tooltip = cva(styles.content, {\n variants: {\n side: {\n top: styles[\"side-top\"],\n right: styles[\"side-right\"],\n bottom: styles[\"side-bottom\"],\n left: styles[\"side-left\"],\n \"top-left\": styles[\"side-top-left\"],\n \"top-right\": styles[\"side-top-right\"],\n \"bottom-left\": styles[\"side-bottom-left\"],\n \"bottom-right\": styles[\"side-bottom-right\"],\n }\n },\n defaultVariants: {\n side: \"top\"\n }\n});\n\ninterface TooltipProps extends VariantProps<typeof tooltip> {\n disabled?: boolean;\n children: React.ReactNode;\n message: React.ReactNode;\n className?: string;\n delayDuration?: number;\n skipDelayDuration?: number;\n 'aria-label'?: string;\n asChild?: boolean;\n}\n\nexport const Tooltip: React.FC<TooltipProps> = ({\n children,\n message,\n disabled,\n side = \"top\",\n className,\n delayDuration = 200,\n skipDelayDuration = 200,\n 'aria-label': ariaLabel,\n asChild = true,\n}) => {\n return disabled ? (\n children\n ) : (\n <TooltipPrimitive.Provider delayDuration={delayDuration} skipDelayDuration={skipDelayDuration}>\n <TooltipPrimitive.Root>\n <TooltipPrimitive.Trigger aria-describedby=\"tooltip\" asChild={asChild}>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n id=\"tooltip\"\n role=\"tooltip\"\n aria-label={ariaLabel || (typeof message === 'string' ? message : undefined)}\n side={side?.split('-')[0] as TooltipPrimitive.TooltipContentProps['side'] || 'top'}\n align={(side?.includes('-') ? (side.split('-')[1] === 'left' ? 'start' : 'end') : 'center') satisfies 'start' | 'end' | 'center'}\n sideOffset={4}\n className={tooltip({ side, className })}\n >\n {typeof message === \"string\" ? (\n <Text>{message}</Text>\n ) : (\n message\n )}\n <TooltipPrimitive.Arrow className={styles.arrow} width={12} height={6} />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n </TooltipPrimitive.Provider>\n );\n};\n\nTooltip.displayName = 'Tooltip';\n\nexport const TooltipProvider = TooltipPrimitive.Provider;\n"],"names":["_jsx","TooltipPrimitive.Provider","_jsxs","TooltipPrimitive.Root","TooltipPrimitive.Trigger","TooltipPrimitive.Portal","TooltipPrimitive.Content","TooltipPrimitive.Arrow"],"mappings":";;;;;;AAOA,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE;AAClC,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;AACvB,YAAA,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC;AAC3B,YAAA,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;AAC7B,YAAA,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC;AACzB,YAAA,UAAU,EAAE,MAAM,CAAC,eAAe,CAAC;AACnC,YAAA,WAAW,EAAE,MAAM,CAAC,gBAAgB,CAAC;AACrC,YAAA,aAAa,EAAE,MAAM,CAAC,kBAAkB,CAAC;AACzC,YAAA,cAAc,EAAE,MAAM,CAAC,mBAAmB,CAAC;AAC5C,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,KAAK;AACZ,KAAA;AACF,CAAA,CAAC,CAAC;AAaI,MAAM,OAAO,GAA2B,CAAC,EAC9C,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,IAAI,GAAG,KAAK,EACZ,SAAS,EACT,aAAa,GAAG,GAAG,EACnB,iBAAiB,GAAG,GAAG,EACvB,YAAY,EAAE,SAAS,EACvB,OAAO,GAAG,IAAI,GACf,KAAI;IACH,OAAO,QAAQ,IACb,QAAQ,KAERA,qBAAC,CAAAC,yCAAyB,EAAA,EAAC,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,EAC3F,QAAA,EAAAC,sBAAA,CAACC,yCAAqB,eACpBH,qBAAC,CAAAI,yCAAwB,EAAA,EAAA,kBAAA,EAAkB,SAAS,EAAC,OAAO,EAAE,OAAO,EAAA,QAAA,EAClE,QAAQ,EACgB,CAAA,EAC3BJ,sBAACK,yCAAuB,EACtB,EAAA,QAAA,EAAAH,sBAAA,CAACI,yCAAwB,IACvB,EAAE,EAAC,SAAS,EACZ,IAAI,EAAC,SAAS,EAAA,YAAA,EACF,SAAS,KAAK,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC,EAC5E,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAiD,IAAI,KAAK,EAClF,KAAK,GAAG,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM,GAAG,OAAO,GAAG,KAAK,IAAI,QAAQ,CAAsC,EAChI,UAAU,EAAE,CAAC,EACb,SAAS,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAEtC,QAAA,EAAA,CAAA,OAAO,OAAO,KAAK,QAAQ,IAC1BN,qBAAC,CAAA,IAAI,cAAE,OAAO,EAAA,CAAQ,KAEtB,OAAO,CACR,EACDA,qBAAA,CAACO,yCAAsB,IAAC,SAAS,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAA,CAAI,IAChD,EACH,CAAA,CAAA,EAAA,CACJ,EACE,CAAA,CAC7B,CAAC;AACJ,EAAE;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAEnB,MAAA,eAAe,GAAGN;;;;"}
1
+ {"version":3,"file":"tooltip.js","sources":["../../../../v1/components/tooltip/tooltip.tsx"],"sourcesContent":["import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport React from \"react\";\n\nimport { Text } from \"../text\";\nimport styles from \"./tooltip.module.css\";\n\nconst tooltip = cva(styles.content, {\n variants: {\n side: {\n top: styles[\"side-top\"],\n right: styles[\"side-right\"],\n bottom: styles[\"side-bottom\"],\n left: styles[\"side-left\"],\n \"top-left\": styles[\"side-top-left\"],\n \"top-right\": styles[\"side-top-right\"],\n \"bottom-left\": styles[\"side-bottom-left\"],\n \"bottom-right\": styles[\"side-bottom-right\"],\n }\n },\n defaultVariants: {\n side: \"top\"\n }\n});\n\ninterface TooltipProps extends VariantProps<typeof tooltip> {\n disabled?: boolean;\n children: React.ReactNode;\n message: React.ReactNode;\n className?: string;\n delayDuration?: number;\n skipDelayDuration?: number;\n 'aria-label'?: string;\n asChild?: boolean;\n}\n\nexport const Tooltip: React.FC<TooltipProps> = ({\n children,\n message,\n disabled,\n side = \"top\",\n className,\n delayDuration = 200,\n skipDelayDuration = 200,\n 'aria-label': ariaLabel,\n asChild = false,\n}) => {\n return disabled ? (\n children\n ) : (\n <TooltipPrimitive.Provider delayDuration={delayDuration} skipDelayDuration={skipDelayDuration}>\n <TooltipPrimitive.Root>\n <TooltipPrimitive.Trigger aria-describedby=\"tooltip\" asChild={asChild}>\n {children}\n </TooltipPrimitive.Trigger>\n <TooltipPrimitive.Portal>\n <TooltipPrimitive.Content\n id=\"tooltip\"\n role=\"tooltip\"\n aria-label={ariaLabel || (typeof message === 'string' ? message : undefined)}\n side={side?.split('-')[0] as TooltipPrimitive.TooltipContentProps['side'] || 'top'}\n align={(side?.includes('-') ? (side.split('-')[1] === 'left' ? 'start' : 'end') : 'center') satisfies 'start' | 'end' | 'center'}\n sideOffset={4}\n className={tooltip({ side, className })}\n >\n {typeof message === \"string\" ? (\n <Text>{message}</Text>\n ) : (\n message\n )}\n <TooltipPrimitive.Arrow className={styles.arrow} width={12} height={6} />\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n </TooltipPrimitive.Provider>\n );\n};\n\nTooltip.displayName = 'Tooltip';\n\nexport const TooltipProvider = TooltipPrimitive.Provider;\n"],"names":["_jsx","TooltipPrimitive.Provider","_jsxs","TooltipPrimitive.Root","TooltipPrimitive.Trigger","TooltipPrimitive.Portal","TooltipPrimitive.Content","TooltipPrimitive.Arrow"],"mappings":";;;;;;AAOA,MAAM,OAAO,GAAG,GAAG,CAAC,MAAM,CAAC,OAAO,EAAE;AAClC,IAAA,QAAQ,EAAE;AACR,QAAA,IAAI,EAAE;AACJ,YAAA,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;AACvB,YAAA,KAAK,EAAE,MAAM,CAAC,YAAY,CAAC;AAC3B,YAAA,MAAM,EAAE,MAAM,CAAC,aAAa,CAAC;AAC7B,YAAA,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC;AACzB,YAAA,UAAU,EAAE,MAAM,CAAC,eAAe,CAAC;AACnC,YAAA,WAAW,EAAE,MAAM,CAAC,gBAAgB,CAAC;AACrC,YAAA,aAAa,EAAE,MAAM,CAAC,kBAAkB,CAAC;AACzC,YAAA,cAAc,EAAE,MAAM,CAAC,mBAAmB,CAAC;AAC5C,SAAA;AACF,KAAA;AACD,IAAA,eAAe,EAAE;AACf,QAAA,IAAI,EAAE,KAAK;AACZ,KAAA;AACF,CAAA,CAAC,CAAC;AAaI,MAAM,OAAO,GAA2B,CAAC,EAC9C,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,IAAI,GAAG,KAAK,EACZ,SAAS,EACT,aAAa,GAAG,GAAG,EACnB,iBAAiB,GAAG,GAAG,EACvB,YAAY,EAAE,SAAS,EACvB,OAAO,GAAG,KAAK,GAChB,KAAI;IACH,OAAO,QAAQ,IACb,QAAQ,KAERA,qBAAC,CAAAC,yCAAyB,EAAA,EAAC,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,EAC3F,QAAA,EAAAC,sBAAA,CAACC,yCAAqB,eACpBH,qBAAC,CAAAI,yCAAwB,EAAA,EAAA,kBAAA,EAAkB,SAAS,EAAC,OAAO,EAAE,OAAO,EAAA,QAAA,EAClE,QAAQ,EACgB,CAAA,EAC3BJ,sBAACK,yCAAuB,EACtB,EAAA,QAAA,EAAAH,sBAAA,CAACI,yCAAwB,IACvB,EAAE,EAAC,SAAS,EACZ,IAAI,EAAC,SAAS,EAAA,YAAA,EACF,SAAS,KAAK,OAAO,OAAO,KAAK,QAAQ,GAAG,OAAO,GAAG,SAAS,CAAC,EAC5E,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAiD,IAAI,KAAK,EAClF,KAAK,GAAG,IAAI,EAAE,QAAQ,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,MAAM,GAAG,OAAO,GAAG,KAAK,IAAI,QAAQ,CAAsC,EAChI,UAAU,EAAE,CAAC,EACb,SAAS,EAAE,OAAO,CAAC,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC,EAEtC,QAAA,EAAA,CAAA,OAAO,OAAO,KAAK,QAAQ,IAC1BN,qBAAC,CAAA,IAAI,cAAE,OAAO,EAAA,CAAQ,KAEtB,OAAO,CACR,EACDA,qBAAA,CAACO,yCAAsB,IAAC,SAAS,EAAE,MAAM,CAAC,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC,EAAA,CAAI,IAChD,EACH,CAAA,CAAA,EAAA,CACJ,EACE,CAAA,CAC7B,CAAC;AACJ,EAAE;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAEnB,MAAA,eAAe,GAAGN;;;;"}
package/dist/v1/index.cjs CHANGED
@@ -80,4 +80,5 @@ exports.useTheme = theme.useTheme;
80
80
  exports.ToastContainer = toast.ToastContainer;
81
81
  exports.toast = toast.toast;
82
82
  exports.Tooltip = tooltip.Tooltip;
83
+ exports.TooltipProvider = tooltip.TooltipProvider;
83
84
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.cjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -32,5 +32,5 @@ export { TextArea } from "./components/text-area";
32
32
  export { List } from "./components/list";
33
33
  export { ThemeProvider, ThemeProviderProps, ThemeSwitcher, useTheme, } from "./components/theme-provider";
34
34
  export { toast, ToastContainer } from "./components/toast";
35
- export { Tooltip } from "./components/tooltip";
35
+ export { Tooltip, TooltipProvider } from "./components/tooltip";
36
36
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../v1/index.tsx"],"names":[],"mappings":"AAAA,OAAO,oBAAoB,CAAC;AAE5B,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC1E,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAA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M,wBAAwB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAClD,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EACL,aAAa,EACb,kBAAkB,EAClB,aAAa,EACb,QAAQ,GACT,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC"}
package/dist/v1/index.js CHANGED
@@ -34,5 +34,5 @@ export { List } from './components/list/list.js';
34
34
  export { ThemeSwitcher } from './components/theme-provider/switcher.js';
35
35
  export { ThemeProvider, useTheme } from './components/theme-provider/theme.js';
36
36
  export { ToastContainer, toast } from './components/toast/toast.js';
37
- export { Tooltip } from './components/tooltip/tooltip.js';
37
+ export { Tooltip, TooltipProvider } from './components/tooltip/tooltip.js';
38
38
  //# sourceMappingURL=index.js.map