@xsolla/xui-tooltip-web 0.64.0-pr56.1768348754

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.
package/index.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/index.tsx","../../src/Tooltip.tsx","../../../primitives-web/src/Box.tsx","../../../primitives-web/src/Text.tsx","../../../primitives-web/src/Spinner.tsx","../../../primitives-web/src/Icon.tsx","../../../primitives-web/src/Divider.tsx","../../../primitives-web/src/Input.tsx","../../../primitives-web/src/TextArea.tsx"],"sourcesContent":["export * from \"./Tooltip\";\nexport * from \"./types\";\n","import React, { forwardRef, useState, useMemo } from \"react\";\n// @ts-ignore - this will be resolved at build time\nimport { Box, Text } from \"@xsolla/xui-primitives\";\nimport { useDesignSystem } from \"@xsolla/xui-core\";\nimport type { TooltipPlacement, TooltipProps, TooltipSize } from \"./types\";\n\nconst getPositionStyles = (placement: TooltipPlacement, offset: number) => {\n switch (placement) {\n case \"top\":\n case \"top-center\":\n return {\n bottom: `calc(100% + ${offset}px)`,\n left: \"50%\",\n transform: \"translateX(-50%)\",\n };\n case \"top-start\":\n return { bottom: `calc(100% + ${offset}px)`, left: 0 };\n case \"top-end\":\n return { bottom: `calc(100% + ${offset}px)`, right: 0 };\n case \"bottom\":\n case \"bottom-center\":\n return {\n top: `calc(100% + ${offset}px)`,\n left: \"50%\",\n transform: \"translateX(-50%)\",\n };\n case \"bottom-start\":\n return { top: `calc(100% + ${offset}px)`, left: 0 };\n case \"bottom-end\":\n return { top: `calc(100% + ${offset}px)`, right: 0 };\n case \"left\":\n return {\n right: `calc(100% + ${offset}px)`,\n top: \"50%\",\n transform: \"translateY(-50%)\",\n };\n case \"left-start\":\n return { right: `calc(100% + ${offset}px)`, top: 0 };\n case \"left-end\":\n return { right: `calc(100% + ${offset}px)`, bottom: 0 };\n case \"right\":\n return {\n left: `calc(100% + ${offset}px)`,\n top: \"50%\",\n transform: \"translateY(-50%)\",\n };\n case \"right-start\":\n return { left: `calc(100% + ${offset}px)`, top: 0 };\n case \"right-end\":\n return { left: `calc(100% + ${offset}px)`, bottom: 0 };\n default:\n return { bottom: `calc(100% + ${offset}px)`, left: 0 };\n }\n};\n\nconst getTypoStyles = (size: TooltipSize) => {\n switch (size) {\n case \"sm\":\n return { fontSize: 12, lineHeight: \"16px\" };\n case \"md\":\n return { fontSize: 14, lineHeight: \"18px\" };\n case \"lg\":\n return { fontSize: 16, lineHeight: \"20px\" };\n case \"xl\":\n return { fontSize: 18, lineHeight: \"22px\" };\n default:\n return { fontSize: 14, lineHeight: \"18px\" };\n }\n};\n\nexport const Tooltip = forwardRef<any, TooltipProps>(\n (\n {\n content,\n children,\n size = \"md\",\n delayEnter = 0,\n delayLeave = 100,\n offset = 12,\n placement = \"top-start\",\n controlledVisible,\n style,\n \"data-testid\": dataTestId,\n className,\n ...props\n },\n ref\n ) => {\n const [isHovered, setIsHovered] = useState(false);\n const { theme } = useDesignSystem();\n const isVisible =\n controlledVisible !== undefined ? controlledVisible : isHovered;\n\n const positionStyles = useMemo(\n () => getPositionStyles(placement, offset),\n [placement, offset]\n );\n const typoStyles = useMemo(() => getTypoStyles(size), [size]);\n\n return (\n <Box\n position=\"relative\"\n display=\"inline-flex\"\n onMouseEnter={() => setIsHovered(true)}\n onMouseLeave={() => setIsHovered(false)}\n className={className}\n style={{ height: \"fit-content\" }}\n >\n {children}\n {isVisible && (\n <Box\n ref={ref}\n data-testid={dataTestId}\n position=\"absolute\"\n backgroundColor={theme.colors.background.secondary}\n borderRadius={8}\n paddingVertical={8}\n paddingHorizontal={12}\n zIndex={2000}\n style={{\n ...positionStyles,\n boxShadow: \"0 2px 4px rgba(0, 36, 77, 0.2)\",\n pointerEvents: \"none\",\n whiteSpace: \"nowrap\",\n width: \"max-content\",\n ...style,\n }}\n >\n {typeof content === \"string\" || typeof content === \"number\" ? (\n <Text\n color={theme.colors.content.primary}\n fontSize={typoStyles.fontSize}\n fontWeight=\"400\"\n style={{ lineHeight: typoStyles.lineHeight }}\n >\n {content}\n </Text>\n ) : (\n content\n )}\n </Box>\n )}\n </Box>\n );\n }\n);\n\nTooltip.displayName = \"Tooltip\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledBox = styled.div<BoxProps>`\n display: flex;\n box-sizing: border-box;\n background-color: ${(props) => props.backgroundColor || \"transparent\"};\n border-color: ${(props) => props.borderColor || \"transparent\"};\n border-width: ${(props) =>\n typeof props.borderWidth === \"number\"\n ? `${props.borderWidth}px`\n : props.borderWidth || 0};\n\n ${(props) =>\n props.borderBottomWidth !== undefined &&\n `\n border-bottom-width: ${typeof props.borderBottomWidth === \"number\" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};\n border-bottom-color: ${props.borderBottomColor || props.borderColor || \"transparent\"};\n border-bottom-style: solid;\n `}\n ${(props) =>\n props.borderTopWidth !== undefined &&\n `\n border-top-width: ${typeof props.borderTopWidth === \"number\" ? `${props.borderTopWidth}px` : props.borderTopWidth};\n border-top-color: ${props.borderTopColor || props.borderColor || \"transparent\"};\n border-top-style: solid;\n `}\n ${(props) =>\n props.borderLeftWidth !== undefined &&\n `\n border-left-width: ${typeof props.borderLeftWidth === \"number\" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};\n border-left-color: ${props.borderLeftColor || props.borderColor || \"transparent\"};\n border-left-style: solid;\n `}\n ${(props) =>\n props.borderRightWidth !== undefined &&\n `\n border-right-width: ${typeof props.borderRightWidth === \"number\" ? `${props.borderRightWidth}px` : props.borderRightWidth};\n border-right-color: ${props.borderRightColor || props.borderColor || \"transparent\"};\n border-right-style: solid;\n `}\n\n border-style: ${(props) =>\n props.borderStyle ||\n (props.borderWidth ||\n props.borderBottomWidth ||\n props.borderTopWidth ||\n props.borderLeftWidth ||\n props.borderRightWidth\n ? \"solid\"\n : \"none\")};\n border-radius: ${(props) =>\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius || 0};\n height: ${(props) =>\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height || \"auto\"};\n width: ${(props) =>\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width || \"auto\"};\n min-width: ${(props) =>\n typeof props.minWidth === \"number\"\n ? `${props.minWidth}px`\n : props.minWidth || \"auto\"};\n min-height: ${(props) =>\n typeof props.minHeight === \"number\"\n ? `${props.minHeight}px`\n : props.minHeight || \"auto\"};\n\n padding: ${(props) =>\n typeof props.padding === \"number\"\n ? `${props.padding}px`\n : props.padding || 0};\n ${(props) =>\n props.paddingHorizontal &&\n `\n padding-left: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n padding-right: ${typeof props.paddingHorizontal === \"number\" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};\n `}\n ${(props) =>\n props.paddingVertical &&\n `\n padding-top: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n padding-bottom: ${typeof props.paddingVertical === \"number\" ? `${props.paddingVertical}px` : props.paddingVertical};\n `}\n ${(props) =>\n props.paddingTop !== undefined &&\n `padding-top: ${typeof props.paddingTop === \"number\" ? `${props.paddingTop}px` : props.paddingTop};`}\n ${(props) =>\n props.paddingBottom !== undefined &&\n `padding-bottom: ${typeof props.paddingBottom === \"number\" ? `${props.paddingBottom}px` : props.paddingBottom};`}\n ${(props) =>\n props.paddingLeft !== undefined &&\n `padding-left: ${typeof props.paddingLeft === \"number\" ? `${props.paddingLeft}px` : props.paddingLeft};`}\n ${(props) =>\n props.paddingRight !== undefined &&\n `padding-right: ${typeof props.paddingRight === \"number\" ? `${props.paddingRight}px` : props.paddingRight};`}\n\n margin: ${(props) =>\n typeof props.margin === \"number\" ? `${props.margin}px` : props.margin || 0};\n ${(props) =>\n props.marginTop !== undefined &&\n `margin-top: ${typeof props.marginTop === \"number\" ? `${props.marginTop}px` : props.marginTop};`}\n ${(props) =>\n props.marginBottom !== undefined &&\n `margin-bottom: ${typeof props.marginBottom === \"number\" ? `${props.marginBottom}px` : props.marginBottom};`}\n ${(props) =>\n props.marginLeft !== undefined &&\n `margin-left: ${typeof props.marginLeft === \"number\" ? `${props.marginLeft}px` : props.marginLeft};`}\n ${(props) =>\n props.marginRight !== undefined &&\n `margin-right: ${typeof props.marginRight === \"number\" ? `${props.marginRight}px` : props.marginRight};`}\n\n flex-direction: ${(props) => props.flexDirection || \"column\"};\n flex-wrap: ${(props) => props.flexWrap || \"nowrap\"};\n align-items: ${(props) => props.alignItems || \"stretch\"};\n justify-content: ${(props) => props.justifyContent || \"flex-start\"};\n cursor: ${(props) =>\n props.cursor\n ? props.cursor\n : props.onClick || props.onPress\n ? \"pointer\"\n : \"inherit\"};\n position: ${(props) => props.position || \"static\"};\n top: ${(props) =>\n typeof props.top === \"number\" ? `${props.top}px` : props.top};\n bottom: ${(props) =>\n typeof props.bottom === \"number\" ? `${props.bottom}px` : props.bottom};\n left: ${(props) =>\n typeof props.left === \"number\" ? `${props.left}px` : props.left};\n right: ${(props) =>\n typeof props.right === \"number\" ? `${props.right}px` : props.right};\n flex: ${(props) => props.flex};\n flex-shrink: ${(props) => props.flexShrink ?? 1};\n gap: ${(props) =>\n typeof props.gap === \"number\" ? `${props.gap}px` : props.gap || 0};\n align-self: ${(props) => props.alignSelf || \"auto\"};\n overflow: ${(props) => props.overflow || \"visible\"};\n overflow-x: ${(props) => props.overflowX || \"visible\"};\n overflow-y: ${(props) => props.overflowY || \"visible\"};\n z-index: ${(props) => props.zIndex};\n opacity: ${(props) => (props.disabled ? 0.5 : 1)};\n pointer-events: ${(props) => (props.disabled ? \"none\" : \"auto\")};\n\n &:hover {\n ${(props) =>\n props.hoverStyle?.backgroundColor &&\n `background-color: ${props.hoverStyle.backgroundColor};`}\n ${(props) =>\n props.hoverStyle?.borderColor &&\n `border-color: ${props.hoverStyle.borderColor};`}\n }\n\n &:active {\n ${(props) =>\n props.pressStyle?.backgroundColor &&\n `background-color: ${props.pressStyle.backgroundColor};`}\n }\n`;\n\nexport const Box = React.forwardRef<\n HTMLDivElement | HTMLButtonElement,\n BoxProps\n>(\n (\n {\n children,\n onPress,\n onKeyDown,\n onKeyUp,\n role,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-current\": ariaCurrent,\n \"aria-disabled\": ariaDisabled,\n \"aria-live\": ariaLive,\n \"aria-busy\": ariaBusy,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-expanded\": ariaExpanded,\n \"aria-haspopup\": ariaHasPopup,\n \"aria-pressed\": ariaPressed,\n \"aria-controls\": ariaControls,\n tabIndex,\n as,\n src,\n alt,\n type,\n disabled,\n id,\n ...props\n },\n ref\n ) => {\n // Handle as=\"img\" for rendering images with proper border-radius\n if (as === \"img\" && src) {\n return (\n <img\n src={src}\n alt={alt || \"\"}\n style={{\n display: \"block\",\n objectFit: \"cover\",\n width:\n typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width,\n height:\n typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height,\n borderRadius:\n typeof props.borderRadius === \"number\"\n ? `${props.borderRadius}px`\n : props.borderRadius,\n position: props.position,\n top: typeof props.top === \"number\" ? `${props.top}px` : props.top,\n left:\n typeof props.left === \"number\" ? `${props.left}px` : props.left,\n right:\n typeof props.right === \"number\"\n ? `${props.right}px`\n : props.right,\n bottom:\n typeof props.bottom === \"number\"\n ? `${props.bottom}px`\n : props.bottom,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n as={as}\n id={id}\n type={as === \"button\" ? type || \"button\" : undefined}\n disabled={as === \"button\" ? disabled : undefined}\n onClick={onPress}\n onKeyDown={onKeyDown}\n onKeyUp={onKeyUp}\n role={role}\n aria-label={ariaLabel}\n aria-labelledby={ariaLabelledBy}\n aria-current={ariaCurrent}\n aria-disabled={ariaDisabled}\n aria-busy={ariaBusy}\n aria-describedby={ariaDescribedBy}\n aria-expanded={ariaExpanded}\n aria-haspopup={ariaHasPopup}\n aria-pressed={ariaPressed}\n aria-controls={ariaControls}\n aria-live={ariaLive}\n tabIndex={tabIndex !== undefined ? tabIndex : undefined}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledText = styled.span<TextProps>`\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-weight: ${(props) => props.fontWeight || \"normal\"};\n font-family: ${(props) =>\n props.fontFamily ||\n '\"Pilat Wide Bold\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif !important'};\n line-height: ${(props) =>\n typeof props.lineHeight === \"number\"\n ? `${props.lineHeight}px`\n : props.lineHeight || \"inherit\"};\n white-space: ${(props) => props.whiteSpace || \"normal\"};\n text-align: ${(props) => props.textAlign || \"inherit\"};\n text-decoration: ${(props) => props.textDecoration || \"none\"};\n`;\n\nexport const Text: React.FC<TextProps> = ({\n style,\n className,\n id,\n role,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n />\n );\n};\n","import React from \"react\";\nimport styled, { keyframes } from \"styled-components\";\nimport type { SpinnerProps } from \"@xsolla/xui-primitives-core\";\n\nconst rotate = keyframes`\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n`;\n\nconst StyledSpinner = styled.div<SpinnerProps>`\n width: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n height: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n border: ${(props) => props.strokeWidth || 2}px solid\n ${(props) => props.color || \"currentColor\"};\n border-bottom-color: transparent;\n border-radius: 50%;\n display: inline-block;\n box-sizing: border-box;\n animation: ${rotate} 1s linear infinite;\n`;\n\nexport const Spinner: React.FC<SpinnerProps> = ({\n role = \"status\",\n \"aria-label\": ariaLabel,\n \"aria-live\": ariaLive = \"polite\",\n \"aria-describedby\": ariaDescribedBy,\n testID,\n ...props\n}) => {\n return (\n <StyledSpinner\n role={role}\n aria-label={ariaLabel}\n aria-live={ariaLive}\n aria-describedby={ariaDescribedBy}\n data-testid={testID}\n {...props}\n />\n );\n};\n\nSpinner.displayName = \"Spinner\";\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledIcon = styled.div<IconProps>`\n display: flex;\n align-items: center;\n justify-content: center;\n width: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n height: ${(props) =>\n typeof props.size === \"number\" ? `${props.size}px` : props.size || \"24px\"};\n color: ${(props) => props.color || \"currentColor\"};\n\n svg {\n width: 100%;\n height: 100%;\n fill: none;\n stroke: currentColor;\n }\n`;\n\nexport const Icon: React.FC<IconProps> = ({ children, ...props }) => {\n return <StyledIcon {...props}>{children}</StyledIcon>;\n};\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { DividerProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledDivider = styled.div<DividerProps>`\n background-color: ${(props) =>\n props.dashStroke\n ? \"transparent\"\n : props.color || \"rgba(255, 255, 255, 0.15)\"};\n width: ${(props) =>\n props.vertical\n ? typeof props.width === \"number\"\n ? `${props.width}px`\n : props.width || \"1px\"\n : \"100%\"};\n height: ${(props) =>\n props.vertical\n ? \"100%\"\n : typeof props.height === \"number\"\n ? `${props.height}px`\n : props.height || \"1px\"};\n\n ${(props) =>\n props.dashStroke &&\n `\n border-style: dashed;\n border-color: ${props.color || \"rgba(255, 255, 255, 0.15)\"};\n border-width: 0;\n ${\n props.vertical\n ? `\n border-left-width: ${typeof props.width === \"number\" ? `${props.width}px` : props.width || \"1px\"};\n height: 100%;\n `\n : `\n border-top-width: ${typeof props.height === \"number\" ? `${props.height}px` : props.height || \"1px\"};\n width: 100%;\n `\n }\n `}\n`;\n\nexport const Divider: React.FC<DividerProps> = (props) => {\n return <StyledDivider {...props} />;\n};\n","import React, { forwardRef } from \"react\";\nimport styled from \"styled-components\";\nimport { InputPrimitiveProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledInput = styled.input<InputPrimitiveProps>`\n background: transparent;\n border: none;\n outline: none;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-family: inherit;\n text-align: inherit;\n\n &::placeholder {\n color: ${(props) =>\n props.placeholderTextColor || \"rgba(255, 255, 255, 0.5)\"};\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n`;\n\nexport const InputPrimitive = forwardRef<HTMLInputElement, InputPrimitiveProps>(\n (\n {\n value,\n placeholder,\n onChange,\n onChangeText,\n onFocus,\n onBlur,\n onKeyDown,\n disabled,\n secureTextEntry,\n style,\n color,\n fontSize,\n placeholderTextColor,\n maxLength,\n name,\n type,\n inputMode,\n autoComplete,\n id,\n \"aria-invalid\": ariaInvalid,\n \"aria-describedby\": ariaDescribedBy,\n \"aria-labelledby\": ariaLabelledBy,\n \"aria-label\": ariaLabel,\n \"aria-disabled\": ariaDisabled,\n \"data-testid\": dataTestId,\n ...rest\n },\n ref\n ) => {\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n if (onChange) {\n onChange(e);\n }\n if (onChangeText) {\n onChangeText(e.target.value);\n }\n };\n\n // Always pass value to make it a controlled input\n const inputValue = value !== undefined ? value : \"\";\n\n return (\n <StyledInput\n ref={ref}\n id={id}\n value={inputValue}\n name={name}\n placeholder={placeholder}\n onChange={handleChange}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyDown={onKeyDown}\n disabled={disabled}\n type={secureTextEntry ? \"password\" : type || \"text\"}\n inputMode={inputMode}\n autoComplete={autoComplete}\n style={style}\n color={color}\n fontSize={fontSize}\n placeholderTextColor={placeholderTextColor}\n maxLength={maxLength}\n aria-invalid={ariaInvalid}\n aria-describedby={ariaDescribedBy}\n aria-labelledby={ariaLabelledBy}\n aria-label={ariaLabel}\n aria-disabled={ariaDisabled}\n data-testid={dataTestId}\n {...rest}\n />\n );\n }\n);\n\nInputPrimitive.displayName = \"InputPrimitive\";\n","import React, { forwardRef } from \"react\";\nimport styled from \"styled-components\";\nimport { TextAreaPrimitiveProps } from \"@xsolla/xui-primitives-core\";\n\nconst StyledTextArea = styled.textarea<TextAreaPrimitiveProps>`\n background: transparent;\n border: none;\n outline: none;\n width: 100%;\n height: 100%;\n padding: 0;\n margin: 0;\n color: ${(props) => props.color || \"inherit\"};\n font-size: ${(props) =>\n typeof props.fontSize === \"number\"\n ? `${props.fontSize}px`\n : props.fontSize || \"inherit\"};\n font-family: inherit;\n text-align: inherit;\n resize: none;\n\n &::placeholder {\n color: ${(props) =>\n props.placeholderTextColor || \"rgba(255, 255, 255, 0.5)\"};\n }\n\n &:disabled {\n cursor: not-allowed;\n }\n`;\n\nexport const TextAreaPrimitive = forwardRef<\n HTMLTextAreaElement,\n TextAreaPrimitiveProps\n>(\n (\n {\n value,\n placeholder,\n onChangeText,\n onFocus,\n onBlur,\n onKeyDown,\n disabled,\n style,\n color,\n fontSize,\n placeholderTextColor,\n maxLength,\n rows,\n },\n ref\n ) => {\n return (\n <StyledTextArea\n ref={ref}\n value={value}\n placeholder={placeholder}\n onChange={(e) => onChangeText?.(e.target.value)}\n onFocus={onFocus}\n onBlur={onBlur}\n onKeyDown={onKeyDown}\n disabled={disabled}\n style={style}\n color={color}\n fontSize={fontSize}\n placeholderTextColor={placeholderTextColor}\n maxLength={maxLength}\n rows={rows}\n />\n );\n }\n);\n\nTextAreaPrimitive.displayName = \"TextAreaPrimitive\";\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAA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cACnB,QAAQ;AAAA,cACR,OAAO;AAAA,gBACL,GAAG;AAAA,gBACH,WAAW;AAAA,gBACX,eAAe;AAAA,gBACf,YAAY;AAAA,gBACZ,OAAO;AAAA,gBACP,GAAG;AAAA,cACL;AAAA,cAEC,iBAAO,YAAY,YAAY,OAAO,YAAY,WACjD;AAAA,gBAAC;AAAA;AAAA,kBACC,OAAO,MAAM,OAAO,QAAQ;AAAA,kBAC5B,UAAU,WAAW;AAAA,kBACrB,YAAW;AAAA,kBACX,OAAO,EAAE,YAAY,WAAW,WAAW;AAAA,kBAE1C;AAAA;AAAA,cACH,IAEA;AAAA;AAAA,UAEJ;AAAA;AAAA;AAAA,IAEJ;AAAA,EAEJ;AACF;AAEA,QAAQ,cAAc;","names":["import_react","styled","React","import_styled_components","import_jsx_runtime","styled","import_styled_components","import_jsx_runtime","styled","import_styled_components","import_jsx_runtime","styled","import_styled_components","import_jsx_runtime","styled","import_react","import_styled_components","import_jsx_runtime","styled","import_react","import_styled_components","import_jsx_runtime","styled","import_jsx_runtime"]}
package/index.mjs ADDED
@@ -0,0 +1,591 @@
1
+ // src/Tooltip.tsx
2
+ import { forwardRef as forwardRef3, useState, useMemo } from "react";
3
+
4
+ // ../primitives-web/src/Box.tsx
5
+ import React from "react";
6
+ import styled from "styled-components";
7
+ import { jsx } from "react/jsx-runtime";
8
+ var StyledBox = styled.div`
9
+ display: flex;
10
+ box-sizing: border-box;
11
+ background-color: ${(props) => props.backgroundColor || "transparent"};
12
+ border-color: ${(props) => props.borderColor || "transparent"};
13
+ border-width: ${(props) => typeof props.borderWidth === "number" ? `${props.borderWidth}px` : props.borderWidth || 0};
14
+
15
+ ${(props) => props.borderBottomWidth !== void 0 && `
16
+ border-bottom-width: ${typeof props.borderBottomWidth === "number" ? `${props.borderBottomWidth}px` : props.borderBottomWidth};
17
+ border-bottom-color: ${props.borderBottomColor || props.borderColor || "transparent"};
18
+ border-bottom-style: solid;
19
+ `}
20
+ ${(props) => props.borderTopWidth !== void 0 && `
21
+ border-top-width: ${typeof props.borderTopWidth === "number" ? `${props.borderTopWidth}px` : props.borderTopWidth};
22
+ border-top-color: ${props.borderTopColor || props.borderColor || "transparent"};
23
+ border-top-style: solid;
24
+ `}
25
+ ${(props) => props.borderLeftWidth !== void 0 && `
26
+ border-left-width: ${typeof props.borderLeftWidth === "number" ? `${props.borderLeftWidth}px` : props.borderLeftWidth};
27
+ border-left-color: ${props.borderLeftColor || props.borderColor || "transparent"};
28
+ border-left-style: solid;
29
+ `}
30
+ ${(props) => props.borderRightWidth !== void 0 && `
31
+ border-right-width: ${typeof props.borderRightWidth === "number" ? `${props.borderRightWidth}px` : props.borderRightWidth};
32
+ border-right-color: ${props.borderRightColor || props.borderColor || "transparent"};
33
+ border-right-style: solid;
34
+ `}
35
+
36
+ border-style: ${(props) => props.borderStyle || (props.borderWidth || props.borderBottomWidth || props.borderTopWidth || props.borderLeftWidth || props.borderRightWidth ? "solid" : "none")};
37
+ border-radius: ${(props) => typeof props.borderRadius === "number" ? `${props.borderRadius}px` : props.borderRadius || 0};
38
+ height: ${(props) => typeof props.height === "number" ? `${props.height}px` : props.height || "auto"};
39
+ width: ${(props) => typeof props.width === "number" ? `${props.width}px` : props.width || "auto"};
40
+ min-width: ${(props) => typeof props.minWidth === "number" ? `${props.minWidth}px` : props.minWidth || "auto"};
41
+ min-height: ${(props) => typeof props.minHeight === "number" ? `${props.minHeight}px` : props.minHeight || "auto"};
42
+
43
+ padding: ${(props) => typeof props.padding === "number" ? `${props.padding}px` : props.padding || 0};
44
+ ${(props) => props.paddingHorizontal && `
45
+ padding-left: ${typeof props.paddingHorizontal === "number" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};
46
+ padding-right: ${typeof props.paddingHorizontal === "number" ? `${props.paddingHorizontal}px` : props.paddingHorizontal};
47
+ `}
48
+ ${(props) => props.paddingVertical && `
49
+ padding-top: ${typeof props.paddingVertical === "number" ? `${props.paddingVertical}px` : props.paddingVertical};
50
+ padding-bottom: ${typeof props.paddingVertical === "number" ? `${props.paddingVertical}px` : props.paddingVertical};
51
+ `}
52
+ ${(props) => props.paddingTop !== void 0 && `padding-top: ${typeof props.paddingTop === "number" ? `${props.paddingTop}px` : props.paddingTop};`}
53
+ ${(props) => props.paddingBottom !== void 0 && `padding-bottom: ${typeof props.paddingBottom === "number" ? `${props.paddingBottom}px` : props.paddingBottom};`}
54
+ ${(props) => props.paddingLeft !== void 0 && `padding-left: ${typeof props.paddingLeft === "number" ? `${props.paddingLeft}px` : props.paddingLeft};`}
55
+ ${(props) => props.paddingRight !== void 0 && `padding-right: ${typeof props.paddingRight === "number" ? `${props.paddingRight}px` : props.paddingRight};`}
56
+
57
+ margin: ${(props) => typeof props.margin === "number" ? `${props.margin}px` : props.margin || 0};
58
+ ${(props) => props.marginTop !== void 0 && `margin-top: ${typeof props.marginTop === "number" ? `${props.marginTop}px` : props.marginTop};`}
59
+ ${(props) => props.marginBottom !== void 0 && `margin-bottom: ${typeof props.marginBottom === "number" ? `${props.marginBottom}px` : props.marginBottom};`}
60
+ ${(props) => props.marginLeft !== void 0 && `margin-left: ${typeof props.marginLeft === "number" ? `${props.marginLeft}px` : props.marginLeft};`}
61
+ ${(props) => props.marginRight !== void 0 && `margin-right: ${typeof props.marginRight === "number" ? `${props.marginRight}px` : props.marginRight};`}
62
+
63
+ flex-direction: ${(props) => props.flexDirection || "column"};
64
+ flex-wrap: ${(props) => props.flexWrap || "nowrap"};
65
+ align-items: ${(props) => props.alignItems || "stretch"};
66
+ justify-content: ${(props) => props.justifyContent || "flex-start"};
67
+ cursor: ${(props) => props.cursor ? props.cursor : props.onClick || props.onPress ? "pointer" : "inherit"};
68
+ position: ${(props) => props.position || "static"};
69
+ top: ${(props) => typeof props.top === "number" ? `${props.top}px` : props.top};
70
+ bottom: ${(props) => typeof props.bottom === "number" ? `${props.bottom}px` : props.bottom};
71
+ left: ${(props) => typeof props.left === "number" ? `${props.left}px` : props.left};
72
+ right: ${(props) => typeof props.right === "number" ? `${props.right}px` : props.right};
73
+ flex: ${(props) => props.flex};
74
+ flex-shrink: ${(props) => props.flexShrink ?? 1};
75
+ gap: ${(props) => typeof props.gap === "number" ? `${props.gap}px` : props.gap || 0};
76
+ align-self: ${(props) => props.alignSelf || "auto"};
77
+ overflow: ${(props) => props.overflow || "visible"};
78
+ overflow-x: ${(props) => props.overflowX || "visible"};
79
+ overflow-y: ${(props) => props.overflowY || "visible"};
80
+ z-index: ${(props) => props.zIndex};
81
+ opacity: ${(props) => props.disabled ? 0.5 : 1};
82
+ pointer-events: ${(props) => props.disabled ? "none" : "auto"};
83
+
84
+ &:hover {
85
+ ${(props) => props.hoverStyle?.backgroundColor && `background-color: ${props.hoverStyle.backgroundColor};`}
86
+ ${(props) => props.hoverStyle?.borderColor && `border-color: ${props.hoverStyle.borderColor};`}
87
+ }
88
+
89
+ &:active {
90
+ ${(props) => props.pressStyle?.backgroundColor && `background-color: ${props.pressStyle.backgroundColor};`}
91
+ }
92
+ `;
93
+ var Box = React.forwardRef(
94
+ ({
95
+ children,
96
+ onPress,
97
+ onKeyDown,
98
+ onKeyUp,
99
+ role,
100
+ "aria-label": ariaLabel,
101
+ "aria-labelledby": ariaLabelledBy,
102
+ "aria-current": ariaCurrent,
103
+ "aria-disabled": ariaDisabled,
104
+ "aria-live": ariaLive,
105
+ "aria-busy": ariaBusy,
106
+ "aria-describedby": ariaDescribedBy,
107
+ "aria-expanded": ariaExpanded,
108
+ "aria-haspopup": ariaHasPopup,
109
+ "aria-pressed": ariaPressed,
110
+ "aria-controls": ariaControls,
111
+ tabIndex,
112
+ as,
113
+ src,
114
+ alt,
115
+ type,
116
+ disabled,
117
+ id,
118
+ ...props
119
+ }, ref) => {
120
+ if (as === "img" && src) {
121
+ return /* @__PURE__ */ jsx(
122
+ "img",
123
+ {
124
+ src,
125
+ alt: alt || "",
126
+ style: {
127
+ display: "block",
128
+ objectFit: "cover",
129
+ width: typeof props.width === "number" ? `${props.width}px` : props.width,
130
+ height: typeof props.height === "number" ? `${props.height}px` : props.height,
131
+ borderRadius: typeof props.borderRadius === "number" ? `${props.borderRadius}px` : props.borderRadius,
132
+ position: props.position,
133
+ top: typeof props.top === "number" ? `${props.top}px` : props.top,
134
+ left: typeof props.left === "number" ? `${props.left}px` : props.left,
135
+ right: typeof props.right === "number" ? `${props.right}px` : props.right,
136
+ bottom: typeof props.bottom === "number" ? `${props.bottom}px` : props.bottom
137
+ }
138
+ }
139
+ );
140
+ }
141
+ return /* @__PURE__ */ jsx(
142
+ StyledBox,
143
+ {
144
+ ref,
145
+ as,
146
+ id,
147
+ type: as === "button" ? type || "button" : void 0,
148
+ disabled: as === "button" ? disabled : void 0,
149
+ onClick: onPress,
150
+ onKeyDown,
151
+ onKeyUp,
152
+ role,
153
+ "aria-label": ariaLabel,
154
+ "aria-labelledby": ariaLabelledBy,
155
+ "aria-current": ariaCurrent,
156
+ "aria-disabled": ariaDisabled,
157
+ "aria-busy": ariaBusy,
158
+ "aria-describedby": ariaDescribedBy,
159
+ "aria-expanded": ariaExpanded,
160
+ "aria-haspopup": ariaHasPopup,
161
+ "aria-pressed": ariaPressed,
162
+ "aria-controls": ariaControls,
163
+ "aria-live": ariaLive,
164
+ tabIndex: tabIndex !== void 0 ? tabIndex : void 0,
165
+ ...props,
166
+ children
167
+ }
168
+ );
169
+ }
170
+ );
171
+ Box.displayName = "Box";
172
+
173
+ // ../primitives-web/src/Text.tsx
174
+ import styled2 from "styled-components";
175
+ import { jsx as jsx2 } from "react/jsx-runtime";
176
+ var StyledText = styled2.span`
177
+ color: ${(props) => props.color || "inherit"};
178
+ font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
179
+ font-weight: ${(props) => props.fontWeight || "normal"};
180
+ font-family: ${(props) => props.fontFamily || '"Pilat Wide Bold", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important'};
181
+ line-height: ${(props) => typeof props.lineHeight === "number" ? `${props.lineHeight}px` : props.lineHeight || "inherit"};
182
+ white-space: ${(props) => props.whiteSpace || "normal"};
183
+ text-align: ${(props) => props.textAlign || "inherit"};
184
+ text-decoration: ${(props) => props.textDecoration || "none"};
185
+ `;
186
+ var Text = ({
187
+ style,
188
+ className,
189
+ id,
190
+ role,
191
+ ...props
192
+ }) => {
193
+ return /* @__PURE__ */ jsx2(
194
+ StyledText,
195
+ {
196
+ ...props,
197
+ style,
198
+ className,
199
+ id,
200
+ role
201
+ }
202
+ );
203
+ };
204
+
205
+ // ../primitives-web/src/Spinner.tsx
206
+ import styled3, { keyframes } from "styled-components";
207
+ import { jsx as jsx3 } from "react/jsx-runtime";
208
+ var rotate = keyframes`
209
+ from {
210
+ transform: rotate(0deg);
211
+ }
212
+ to {
213
+ transform: rotate(360deg);
214
+ }
215
+ `;
216
+ var StyledSpinner = styled3.div`
217
+ width: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
218
+ height: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
219
+ border: ${(props) => props.strokeWidth || 2}px solid
220
+ ${(props) => props.color || "currentColor"};
221
+ border-bottom-color: transparent;
222
+ border-radius: 50%;
223
+ display: inline-block;
224
+ box-sizing: border-box;
225
+ animation: ${rotate} 1s linear infinite;
226
+ `;
227
+ var Spinner = ({
228
+ role = "status",
229
+ "aria-label": ariaLabel,
230
+ "aria-live": ariaLive = "polite",
231
+ "aria-describedby": ariaDescribedBy,
232
+ testID,
233
+ ...props
234
+ }) => {
235
+ return /* @__PURE__ */ jsx3(
236
+ StyledSpinner,
237
+ {
238
+ role,
239
+ "aria-label": ariaLabel,
240
+ "aria-live": ariaLive,
241
+ "aria-describedby": ariaDescribedBy,
242
+ "data-testid": testID,
243
+ ...props
244
+ }
245
+ );
246
+ };
247
+ Spinner.displayName = "Spinner";
248
+
249
+ // ../primitives-web/src/Icon.tsx
250
+ import styled4 from "styled-components";
251
+ import { jsx as jsx4 } from "react/jsx-runtime";
252
+ var StyledIcon = styled4.div`
253
+ display: flex;
254
+ align-items: center;
255
+ justify-content: center;
256
+ width: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
257
+ height: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
258
+ color: ${(props) => props.color || "currentColor"};
259
+
260
+ svg {
261
+ width: 100%;
262
+ height: 100%;
263
+ fill: none;
264
+ stroke: currentColor;
265
+ }
266
+ `;
267
+
268
+ // ../primitives-web/src/Divider.tsx
269
+ import styled5 from "styled-components";
270
+ import { jsx as jsx5 } from "react/jsx-runtime";
271
+ var StyledDivider = styled5.div`
272
+ background-color: ${(props) => props.dashStroke ? "transparent" : props.color || "rgba(255, 255, 255, 0.15)"};
273
+ width: ${(props) => props.vertical ? typeof props.width === "number" ? `${props.width}px` : props.width || "1px" : "100%"};
274
+ height: ${(props) => props.vertical ? "100%" : typeof props.height === "number" ? `${props.height}px` : props.height || "1px"};
275
+
276
+ ${(props) => props.dashStroke && `
277
+ border-style: dashed;
278
+ border-color: ${props.color || "rgba(255, 255, 255, 0.15)"};
279
+ border-width: 0;
280
+ ${props.vertical ? `
281
+ border-left-width: ${typeof props.width === "number" ? `${props.width}px` : props.width || "1px"};
282
+ height: 100%;
283
+ ` : `
284
+ border-top-width: ${typeof props.height === "number" ? `${props.height}px` : props.height || "1px"};
285
+ width: 100%;
286
+ `}
287
+ `}
288
+ `;
289
+
290
+ // ../primitives-web/src/Input.tsx
291
+ import { forwardRef } from "react";
292
+ import styled6 from "styled-components";
293
+ import { jsx as jsx6 } from "react/jsx-runtime";
294
+ var StyledInput = styled6.input`
295
+ background: transparent;
296
+ border: none;
297
+ outline: none;
298
+ width: 100%;
299
+ height: 100%;
300
+ padding: 0;
301
+ margin: 0;
302
+ color: ${(props) => props.color || "inherit"};
303
+ font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
304
+ font-family: inherit;
305
+ text-align: inherit;
306
+
307
+ &::placeholder {
308
+ color: ${(props) => props.placeholderTextColor || "rgba(255, 255, 255, 0.5)"};
309
+ }
310
+
311
+ &:disabled {
312
+ cursor: not-allowed;
313
+ }
314
+ `;
315
+ var InputPrimitive = forwardRef(
316
+ ({
317
+ value,
318
+ placeholder,
319
+ onChange,
320
+ onChangeText,
321
+ onFocus,
322
+ onBlur,
323
+ onKeyDown,
324
+ disabled,
325
+ secureTextEntry,
326
+ style,
327
+ color,
328
+ fontSize,
329
+ placeholderTextColor,
330
+ maxLength,
331
+ name,
332
+ type,
333
+ inputMode,
334
+ autoComplete,
335
+ id,
336
+ "aria-invalid": ariaInvalid,
337
+ "aria-describedby": ariaDescribedBy,
338
+ "aria-labelledby": ariaLabelledBy,
339
+ "aria-label": ariaLabel,
340
+ "aria-disabled": ariaDisabled,
341
+ "data-testid": dataTestId,
342
+ ...rest
343
+ }, ref) => {
344
+ const handleChange = (e) => {
345
+ if (onChange) {
346
+ onChange(e);
347
+ }
348
+ if (onChangeText) {
349
+ onChangeText(e.target.value);
350
+ }
351
+ };
352
+ const inputValue = value !== void 0 ? value : "";
353
+ return /* @__PURE__ */ jsx6(
354
+ StyledInput,
355
+ {
356
+ ref,
357
+ id,
358
+ value: inputValue,
359
+ name,
360
+ placeholder,
361
+ onChange: handleChange,
362
+ onFocus,
363
+ onBlur,
364
+ onKeyDown,
365
+ disabled,
366
+ type: secureTextEntry ? "password" : type || "text",
367
+ inputMode,
368
+ autoComplete,
369
+ style,
370
+ color,
371
+ fontSize,
372
+ placeholderTextColor,
373
+ maxLength,
374
+ "aria-invalid": ariaInvalid,
375
+ "aria-describedby": ariaDescribedBy,
376
+ "aria-labelledby": ariaLabelledBy,
377
+ "aria-label": ariaLabel,
378
+ "aria-disabled": ariaDisabled,
379
+ "data-testid": dataTestId,
380
+ ...rest
381
+ }
382
+ );
383
+ }
384
+ );
385
+ InputPrimitive.displayName = "InputPrimitive";
386
+
387
+ // ../primitives-web/src/TextArea.tsx
388
+ import { forwardRef as forwardRef2 } from "react";
389
+ import styled7 from "styled-components";
390
+ import { jsx as jsx7 } from "react/jsx-runtime";
391
+ var StyledTextArea = styled7.textarea`
392
+ background: transparent;
393
+ border: none;
394
+ outline: none;
395
+ width: 100%;
396
+ height: 100%;
397
+ padding: 0;
398
+ margin: 0;
399
+ color: ${(props) => props.color || "inherit"};
400
+ font-size: ${(props) => typeof props.fontSize === "number" ? `${props.fontSize}px` : props.fontSize || "inherit"};
401
+ font-family: inherit;
402
+ text-align: inherit;
403
+ resize: none;
404
+
405
+ &::placeholder {
406
+ color: ${(props) => props.placeholderTextColor || "rgba(255, 255, 255, 0.5)"};
407
+ }
408
+
409
+ &:disabled {
410
+ cursor: not-allowed;
411
+ }
412
+ `;
413
+ var TextAreaPrimitive = forwardRef2(
414
+ ({
415
+ value,
416
+ placeholder,
417
+ onChangeText,
418
+ onFocus,
419
+ onBlur,
420
+ onKeyDown,
421
+ disabled,
422
+ style,
423
+ color,
424
+ fontSize,
425
+ placeholderTextColor,
426
+ maxLength,
427
+ rows
428
+ }, ref) => {
429
+ return /* @__PURE__ */ jsx7(
430
+ StyledTextArea,
431
+ {
432
+ ref,
433
+ value,
434
+ placeholder,
435
+ onChange: (e) => onChangeText?.(e.target.value),
436
+ onFocus,
437
+ onBlur,
438
+ onKeyDown,
439
+ disabled,
440
+ style,
441
+ color,
442
+ fontSize,
443
+ placeholderTextColor,
444
+ maxLength,
445
+ rows
446
+ }
447
+ );
448
+ }
449
+ );
450
+ TextAreaPrimitive.displayName = "TextAreaPrimitive";
451
+
452
+ // src/Tooltip.tsx
453
+ import { useDesignSystem } from "@xsolla/xui-core";
454
+ import { jsx as jsx8, jsxs } from "react/jsx-runtime";
455
+ var getPositionStyles = (placement, offset) => {
456
+ switch (placement) {
457
+ case "top":
458
+ case "top-center":
459
+ return {
460
+ bottom: `calc(100% + ${offset}px)`,
461
+ left: "50%",
462
+ transform: "translateX(-50%)"
463
+ };
464
+ case "top-start":
465
+ return { bottom: `calc(100% + ${offset}px)`, left: 0 };
466
+ case "top-end":
467
+ return { bottom: `calc(100% + ${offset}px)`, right: 0 };
468
+ case "bottom":
469
+ case "bottom-center":
470
+ return {
471
+ top: `calc(100% + ${offset}px)`,
472
+ left: "50%",
473
+ transform: "translateX(-50%)"
474
+ };
475
+ case "bottom-start":
476
+ return { top: `calc(100% + ${offset}px)`, left: 0 };
477
+ case "bottom-end":
478
+ return { top: `calc(100% + ${offset}px)`, right: 0 };
479
+ case "left":
480
+ return {
481
+ right: `calc(100% + ${offset}px)`,
482
+ top: "50%",
483
+ transform: "translateY(-50%)"
484
+ };
485
+ case "left-start":
486
+ return { right: `calc(100% + ${offset}px)`, top: 0 };
487
+ case "left-end":
488
+ return { right: `calc(100% + ${offset}px)`, bottom: 0 };
489
+ case "right":
490
+ return {
491
+ left: `calc(100% + ${offset}px)`,
492
+ top: "50%",
493
+ transform: "translateY(-50%)"
494
+ };
495
+ case "right-start":
496
+ return { left: `calc(100% + ${offset}px)`, top: 0 };
497
+ case "right-end":
498
+ return { left: `calc(100% + ${offset}px)`, bottom: 0 };
499
+ default:
500
+ return { bottom: `calc(100% + ${offset}px)`, left: 0 };
501
+ }
502
+ };
503
+ var getTypoStyles = (size) => {
504
+ switch (size) {
505
+ case "sm":
506
+ return { fontSize: 12, lineHeight: "16px" };
507
+ case "md":
508
+ return { fontSize: 14, lineHeight: "18px" };
509
+ case "lg":
510
+ return { fontSize: 16, lineHeight: "20px" };
511
+ case "xl":
512
+ return { fontSize: 18, lineHeight: "22px" };
513
+ default:
514
+ return { fontSize: 14, lineHeight: "18px" };
515
+ }
516
+ };
517
+ var Tooltip = forwardRef3(
518
+ ({
519
+ content,
520
+ children,
521
+ size = "md",
522
+ delayEnter = 0,
523
+ delayLeave = 100,
524
+ offset = 12,
525
+ placement = "top-start",
526
+ controlledVisible,
527
+ style,
528
+ "data-testid": dataTestId,
529
+ className,
530
+ ...props
531
+ }, ref) => {
532
+ const [isHovered, setIsHovered] = useState(false);
533
+ const { theme } = useDesignSystem();
534
+ const isVisible = controlledVisible !== void 0 ? controlledVisible : isHovered;
535
+ const positionStyles = useMemo(
536
+ () => getPositionStyles(placement, offset),
537
+ [placement, offset]
538
+ );
539
+ const typoStyles = useMemo(() => getTypoStyles(size), [size]);
540
+ return /* @__PURE__ */ jsxs(
541
+ Box,
542
+ {
543
+ position: "relative",
544
+ display: "inline-flex",
545
+ onMouseEnter: () => setIsHovered(true),
546
+ onMouseLeave: () => setIsHovered(false),
547
+ className,
548
+ style: { height: "fit-content" },
549
+ children: [
550
+ children,
551
+ isVisible && /* @__PURE__ */ jsx8(
552
+ Box,
553
+ {
554
+ ref,
555
+ "data-testid": dataTestId,
556
+ position: "absolute",
557
+ backgroundColor: theme.colors.background.secondary,
558
+ borderRadius: 8,
559
+ paddingVertical: 8,
560
+ paddingHorizontal: 12,
561
+ zIndex: 2e3,
562
+ style: {
563
+ ...positionStyles,
564
+ boxShadow: "0 2px 4px rgba(0, 36, 77, 0.2)",
565
+ pointerEvents: "none",
566
+ whiteSpace: "nowrap",
567
+ width: "max-content",
568
+ ...style
569
+ },
570
+ children: typeof content === "string" || typeof content === "number" ? /* @__PURE__ */ jsx8(
571
+ Text,
572
+ {
573
+ color: theme.colors.content.primary,
574
+ fontSize: typoStyles.fontSize,
575
+ fontWeight: "400",
576
+ style: { lineHeight: typoStyles.lineHeight },
577
+ children: content
578
+ }
579
+ ) : content
580
+ }
581
+ )
582
+ ]
583
+ }
584
+ );
585
+ }
586
+ );
587
+ Tooltip.displayName = "Tooltip";
588
+ export {
589
+ Tooltip
590
+ };
591
+ //# sourceMappingURL=index.mjs.map