@raystack/apsara 0.34.2 → 0.35.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.
@@ -24,8 +24,8 @@ const tooltip = index$1.cva(tooltip_module.default.content, {
24
24
  side: "top"
25
25
  }
26
26
  });
27
- const Tooltip = ({ children, message, disabled, side = "top", classNames, triggerStyle, contentStyle, delayDuration = 200, skipDelayDuration = 200, 'aria-label': ariaLabel, asChild = true, }) => {
28
- 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: jsxRuntime.jsxRuntimeExports.jsx("div", { className: clsx.clsx(tooltip_module.default.trigger, classNames?.trigger ?? ""), style: triggerStyle, 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: classNames?.content }), style: contentStyle, children: [typeof message === "string" ? (jsxRuntime.jsxRuntimeExports.jsx(text.Text, { children: message })) : (message), jsxRuntime.jsxRuntimeExports.jsx(index.Arrow, { className: clsx.clsx(tooltip_module.default.arrow, classNames?.arrow), width: 12, height: 6 })] }) })] }) }));
27
+ const Tooltip = ({ children, message, disabled, side = "top", classNames, triggerStyle, contentStyle, delayDuration = 200, skipDelayDuration = 200, 'aria-label': ariaLabel, asChild = true, showArrow = true, }) => {
28
+ 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: jsxRuntime.jsxRuntimeExports.jsx("div", { className: clsx.clsx(tooltip_module.default.trigger, classNames?.trigger ?? ""), style: triggerStyle, 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: classNames?.content }), style: contentStyle, children: [typeof message === "string" ? (jsxRuntime.jsxRuntimeExports.jsx(text.Text, { children: message })) : (message), showArrow && (jsxRuntime.jsxRuntimeExports.jsx(index.Arrow, { className: clsx.clsx(tooltip_module.default.arrow, classNames?.arrow), width: 12, height: 6 }))] }) })] }) }));
29
29
  };
30
30
  Tooltip.displayName = 'Tooltip';
31
31
  const TooltipProvider = index.Provider;
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.cjs","sources":["../../../../v1/components/tooltip/tooltip.tsx"],"sourcesContent":["import React from \"react\";\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport clsx from \"clsx\";\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 classNames?: {\n trigger?: string;\n content?: string;\n arrow?: string;\n };\n triggerStyle?: React.CSSProperties;\n contentStyle?: React.CSSProperties;\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 classNames,\n triggerStyle,\n contentStyle,\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 \n aria-describedby=\"tooltip\" \n asChild={asChild}\n >\n <div className={clsx(styles.trigger, classNames?.trigger ?? \"\")} style={triggerStyle}>\n {children}\n </div>\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: classNames?.content })}\n style={contentStyle}\n >\n {typeof message === \"string\" ? (\n <Text>{message}</Text>\n ) : (\n message\n )}\n <TooltipPrimitive.Arrow className={clsx(styles.arrow, classNames?.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","clsx","TooltipPrimitive.Portal","TooltipPrimitive.Content","Text","TooltipPrim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"react\";\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport clsx from \"clsx\";\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 classNames?: {\n trigger?: string;\n content?: string;\n arrow?: string;\n };\n triggerStyle?: React.CSSProperties;\n contentStyle?: React.CSSProperties;\n delayDuration?: number;\n skipDelayDuration?: number;\n 'aria-label'?: string;\n asChild?: boolean;\n showArrow?: boolean;\n}\n\nexport const Tooltip: React.FC<TooltipProps> = ({\n children,\n message,\n disabled,\n side = \"top\",\n classNames,\n triggerStyle,\n contentStyle,\n delayDuration = 200,\n skipDelayDuration = 200,\n 'aria-label': ariaLabel,\n asChild = true,\n showArrow = true,\n}) => {\n return disabled ? (\n children\n ) : (\n <TooltipPrimitive.Provider delayDuration={delayDuration} skipDelayDuration={skipDelayDuration}>\n <TooltipPrimitive.Root>\n <TooltipPrimitive.Trigger \n aria-describedby=\"tooltip\" \n asChild={asChild}\n >\n <div className={clsx(styles.trigger, classNames?.trigger ?? \"\")} style={triggerStyle}>\n {children}\n </div>\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: classNames?.content })}\n style={contentStyle}\n >\n {typeof message === \"string\" ? (\n <Text>{message}</Text>\n ) : (\n message\n )}\n {showArrow && (\n <TooltipPrimitive.Arrow \n className={clsx(styles.arrow, classNames?.arrow)} \n width={12} \n height={6} \n />\n )}\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","clsx","TooltipPrimitive.Portal","TooltipPrimitive.Content","Text","TooltipPrimitive.Arrow"],"mappings":";;;;;;;;;AAQA,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;AAoBU,MAAA,OAAO,GAA2B,CAAC,EAC9C,QAAQ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AAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,CAAC,EAC5D,KAAK,EAAE,YAAY,aAElB,OAAO,OAAO,KAAK,QAAQ,IAC1BP,gCAAA,CAACQ,SAAI,EAAA,EAAA,QAAA,EAAE,OAAO,EAAA,CAAQ,KAEtB,OAAO,CACR,EACA,SAAS,KACRR,gCAAC,CAAAS,WAAsB,IACrB,SAAS,EAAEJ,SAAI,CAACN,sBAAM,CAAC,KAAK,EAAE,UAAU,EAAE,KAAK,CAAC,EAChD,KAAK,EAAE,EAAE,EACT,MAAM,EAAE,CAAC,EAAA,CACT,CACH,CAAA,EAAA,CACwB,EACH,CAAA,CAAA,EAAA,CACJ,EACE,CAAA,CAC7B,CAAC;AACJ,EAAE;AAEF,OAAO,CAAC,WAAW,GAAG,SAAS,CAAC;AAEnB,MAAA,eAAe,GAAGE;;;;;"}
@@ -19,6 +19,7 @@ interface TooltipProps extends VariantProps<typeof tooltip> {
19
19
  skipDelayDuration?: number;
20
20
  'aria-label'?: string;
21
21
  asChild?: boolean;
22
+ showArrow?: boolean;
22
23
  }
23
24
  export declare const Tooltip: React.FC<TooltipProps>;
24
25
  export declare const TooltipProvider: React.FC<TooltipPrimitive.TooltipProviderProps>;
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.d.ts","sourceRoot":"","sources":["../../../../v1/components/tooltip/tooltip.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,KAAK,gBAAgB,MAAM,yBAAyB,CAAC;AAC5D,OAAO,EAAO,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAM7D,QAAA,MAAM,OAAO;;mFAgBX,CAAC;AAEH,UAAU,YAAa,SAAQ,YAAY,CAAC,OAAO,OAAO,CAAC;IACzD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB,UAAU,CAA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E,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,eAAO,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CAuD1C,CAAC;AAIF,eAAO,MAAM,eAAe,iDAA4B,CAAC"}
@@ -22,8 +22,8 @@ const tooltip = cva(styles.content, {
22
22
  side: "top"
23
23
  }
24
24
  });
25
- const Tooltip = ({ children, message, disabled, side = "top", classNames, triggerStyle, contentStyle, delayDuration = 200, skipDelayDuration = 200, 'aria-label': ariaLabel, asChild = true, }) => {
26
- 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: jsxRuntimeExports.jsx("div", { className: clsx(styles.trigger, classNames?.trigger ?? ""), style: triggerStyle, 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: classNames?.content }), style: contentStyle, children: [typeof message === "string" ? (jsxRuntimeExports.jsx(Text, { children: message })) : (message), jsxRuntimeExports.jsx($a093c7e1ec25a057$export$21b07c8f274aebd5, { className: clsx(styles.arrow, classNames?.arrow), width: 12, height: 6 })] }) })] }) }));
25
+ const Tooltip = ({ children, message, disabled, side = "top", classNames, triggerStyle, contentStyle, delayDuration = 200, skipDelayDuration = 200, 'aria-label': ariaLabel, asChild = true, showArrow = true, }) => {
26
+ 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: jsxRuntimeExports.jsx("div", { className: clsx(styles.trigger, classNames?.trigger ?? ""), style: triggerStyle, 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: classNames?.content }), style: contentStyle, children: [typeof message === "string" ? (jsxRuntimeExports.jsx(Text, { children: message })) : (message), showArrow && (jsxRuntimeExports.jsx($a093c7e1ec25a057$export$21b07c8f274aebd5, { className: clsx(styles.arrow, classNames?.arrow), width: 12, height: 6 }))] }) })] }) }));
27
27
  };
28
28
  Tooltip.displayName = 'Tooltip';
29
29
  const TooltipProvider = $a093c7e1ec25a057$export$2881499e37b75b9a;
@@ -1 +1 @@
1
- {"version":3,"file":"tooltip.js","sources":["../../../../v1/components/tooltip/tooltip.tsx"],"sourcesContent":["import React from \"react\";\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport clsx from \"clsx\";\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 classNames?: {\n trigger?: string;\n content?: string;\n arrow?: string;\n };\n triggerStyle?: React.CSSProperties;\n contentStyle?: React.CSSProperties;\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 classNames,\n triggerStyle,\n contentStyle,\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 \n aria-describedby=\"tooltip\" \n asChild={asChild}\n >\n <div className={clsx(styles.trigger, classNames?.trigger ?? \"\")} style={triggerStyle}>\n {children}\n </div>\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: classNames?.content })}\n style={contentStyle}\n >\n {typeof message === \"string\" ? (\n <Text>{message}</Text>\n ) : (\n message\n )}\n <TooltipPrimitive.Arrow className={clsx(styles.arrow, classNames?.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":";;;;;;;AAQA,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;AAmBU,MAAA,OAAO,GAA2B,CAAC,EAC9C,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,IAAI,GAAG,KAAK,EACZ,UAAU,EACV,YAAY,EACZ,YAAY,EACZ,aAAa,GAAG,GAAG,EACnB,iBAAiB,GAAG,GAAG,EACvB,YAAY,EAAE,SAAS,EACvB,OAAO,GAAG,IAAI,GACf,KAAI;IACH,OAAO,QAAQ,IACb,QAAQ,KAERA,qBAAA,CAACC,yCAAyB,EAAC,EAAA,aAAa,EAAE,aAAa,EAAE,iBAAiB,EAAE,iBAAiB,EAAA,QAAA,EAC3FC,sBAAC,CAAA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,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 React from \"react\";\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { cva, VariantProps } from \"class-variance-authority\";\nimport clsx from \"clsx\";\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 classNames?: {\n trigger?: string;\n content?: string;\n arrow?: string;\n };\n triggerStyle?: React.CSSProperties;\n contentStyle?: React.CSSProperties;\n delayDuration?: number;\n skipDelayDuration?: number;\n 'aria-label'?: string;\n asChild?: boolean;\n showArrow?: boolean;\n}\n\nexport const Tooltip: React.FC<TooltipProps> = ({\n children,\n message,\n disabled,\n side = \"top\",\n classNames,\n triggerStyle,\n contentStyle,\n delayDuration = 200,\n skipDelayDuration = 200,\n 'aria-label': ariaLabel,\n asChild = true,\n showArrow = true,\n}) => {\n return disabled ? (\n children\n ) : (\n <TooltipPrimitive.Provider delayDuration={delayDuration} skipDelayDuration={skipDelayDuration}>\n <TooltipPrimitive.Root>\n <TooltipPrimitive.Trigger \n aria-describedby=\"tooltip\" \n asChild={asChild}\n >\n <div className={clsx(styles.trigger, classNames?.trigger ?? \"\")} style={triggerStyle}>\n {children}\n </div>\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: classNames?.content })}\n style={contentStyle}\n >\n {typeof message === \"string\" ? (\n <Text>{message}</Text>\n ) : (\n message\n )}\n {showArrow && (\n <TooltipPrimitive.Arrow \n className={clsx(styles.arrow, classNames?.arrow)} \n width={12} \n height={6} \n />\n )}\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":";;;;;;;AAQA,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,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