@xsolla/xui-color-picker 0.160.2 → 0.161.1

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/native/index.js CHANGED
@@ -212,10 +212,11 @@ var isNative = true;
212
212
  // src/ColorPicker.tsx
213
213
  var import_xui_select = require("@xsolla/xui-select");
214
214
  var import_xui_button2 = require("@xsolla/xui-button");
215
- var import_xui_core2 = require("@xsolla/xui-core");
215
+ var import_xui_core3 = require("@xsolla/xui-core");
216
216
 
217
217
  // src/ColorPickerArea.tsx
218
218
  var import_react2 = require("react");
219
+ var import_xui_core = require("@xsolla/xui-core");
219
220
 
220
221
  // src/colorUtils.ts
221
222
  function hsbToRgb(h, s, b, a = 1) {
@@ -457,6 +458,7 @@ var ColorPickerArea = (0, import_react2.forwardRef)(function CustomColorArea(pro
457
458
  onChangeEnd,
458
459
  className
459
460
  } = props;
461
+ const { theme } = (0, import_xui_core.useResolvedTheme)();
460
462
  const internalRef = (0, import_react2.useRef)(null);
461
463
  const containerRef = useMergedRefs(ref, internalRef);
462
464
  const [layout, setLayout] = (0, import_react2.useState)({ width: 0, height: 0 });
@@ -566,7 +568,7 @@ var ColorPickerArea = (0, import_react2.forwardRef)(function CustomColorArea(pro
566
568
  "data-testid": "color-picker-color-area",
567
569
  ref: containerRef,
568
570
  className,
569
- borderRadius: 8,
571
+ borderRadius: theme.shape.contextMenu.lg.borderRadius,
570
572
  height: 240,
571
573
  cursor: "pointer",
572
574
  position: "relative",
@@ -592,7 +594,7 @@ var ColorPickerArea = (0, import_react2.forwardRef)(function CustomColorArea(pro
592
594
  position: "absolute",
593
595
  width: 16,
594
596
  height: 16,
595
- borderRadius: 8,
597
+ borderRadius: theme.shape.contextMenu.lg.borderRadius,
596
598
  borderWidth: 2,
597
599
  borderColor: "#ffffff",
598
600
  style: {
@@ -610,7 +612,7 @@ var ColorPickerArea = (0, import_react2.forwardRef)(function CustomColorArea(pro
610
612
 
611
613
  // src/ColorPickerSlider.tsx
612
614
  var import_react3 = require("react");
613
- var import_xui_core = require("@xsolla/xui-core");
615
+ var import_xui_core2 = require("@xsolla/xui-core");
614
616
  var import_jsx_runtime3 = require("react/jsx-runtime");
615
617
  var ColorPickerSlider = ({
616
618
  channel,
@@ -621,7 +623,7 @@ var ColorPickerSlider = ({
621
623
  themeMode,
622
624
  themeProductContext
623
625
  }) => {
624
- const { theme } = (0, import_xui_core.useResolvedTheme)({ themeMode, themeProductContext });
626
+ const { theme } = (0, import_xui_core2.useResolvedTheme)({ themeMode, themeProductContext });
625
627
  const trackRef = (0, import_react3.useRef)(null);
626
628
  const [layout, setLayout] = (0, import_react3.useState)({ width: 0, height: 0 });
627
629
  const [isDragging, setIsDragging] = (0, import_react3.useState)(false);
@@ -720,7 +722,7 @@ var ColorPickerSlider = ({
720
722
  {
721
723
  testID,
722
724
  height: 12,
723
- borderRadius: 6,
725
+ borderRadius: theme.shape.contextMenu.lg.borderRadius,
724
726
  position: "relative",
725
727
  style: isWeb ? { background: getGradient() } : { backgroundColor: theme.colors.background.primary },
726
728
  onLayout: (e) => {
@@ -743,7 +745,7 @@ var ColorPickerSlider = ({
743
745
  position: "absolute",
744
746
  width: 16,
745
747
  height: 16,
746
- borderRadius: 8,
748
+ borderRadius: theme.shape.contextMenu.lg.borderRadius,
747
749
  borderWidth: 2,
748
750
  borderColor: "#ffffff",
749
751
  style: {
@@ -960,7 +962,7 @@ var ColorPicker = (0, import_react6.forwardRef)(
960
962
  themeMode,
961
963
  themeProductContext
962
964
  }, ref) => {
963
- const { theme } = (0, import_xui_core2.useResolvedTheme)({ themeMode, themeProductContext });
965
+ const { theme } = (0, import_xui_core3.useResolvedTheme)({ themeMode, themeProductContext });
964
966
  const prevColorRef = (0, import_react6.useRef)(propValue);
965
967
  const [innerValue, setInnerValue] = useUpdatableState(
966
968
  (prevState) => {
@@ -998,7 +1000,7 @@ var ColorPicker = (0, import_react6.forwardRef)(
998
1000
  handleChange(innerValue.toString(), newFormat);
999
1001
  };
1000
1002
  const onCopy = async () => {
1001
- if (import_xui_core2.isNative) {
1003
+ if (import_xui_core3.isNative) {
1002
1004
  console.warn("Clipboard not yet implemented for native");
1003
1005
  return;
1004
1006
  }
@@ -1022,7 +1024,7 @@ var ColorPicker = (0, import_react6.forwardRef)(
1022
1024
  ref,
1023
1025
  testID,
1024
1026
  backgroundColor: theme.colors.background.secondary,
1025
- borderRadius: 8,
1027
+ borderRadius: theme.shape.contextMenu.lg.borderRadius,
1026
1028
  padding: 16,
1027
1029
  gap: 16,
1028
1030
  width: 312,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.tsx","../../src/ColorPicker.tsx","../../../../foundation/primitives-native/src/Box.tsx","../../../../foundation/primitives-native/src/index.tsx","../../src/ColorPickerArea.tsx","../../src/colorUtils.ts","../../src/utils.ts","../../src/ColorPickerSlider.tsx","../../src/ColorPickerInput.tsx","../../src/ColorPickerHexInput.tsx","../../src/ColorPickerEyedropper.tsx"],"sourcesContent":["export * from \"./ColorPicker\";\nexport * from \"./types\";\nexport * from \"./colorUtils\";\nexport * from \"./ColorPickerArea\";\nexport * from \"./ColorPickerSlider\";\n","import { forwardRef, useRef, useState } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport { Select } from \"@xsolla/xui-select\";\nimport { IconButton } from \"@xsolla/xui-button\";\nimport {\n useResolvedTheme,\n isNative,\n type ThemeOverrideProps,\n} from \"@xsolla/xui-core\";\nimport { ColorPickerArea } from \"./ColorPickerArea\";\nimport { ColorPickerSlider } from \"./ColorPickerSlider\";\nimport { ColorPickerInput } from \"./ColorPickerInput\";\nimport { ColorPickerHexInput } from \"./ColorPickerHexInput\";\nimport { ColorPickerEyedropper } from \"./ColorPickerEyedropper\";\nimport { parseColor, type ColorChannel, type ColorValue } from \"./colorUtils\";\nimport type { ColorFormat, ColorPickerProps, InputColorFormat } from \"./types\";\nimport { useUpdatableState } from \"./utils\";\n\nconst DEFAULT_VALUE = \"#66E6FFFF\";\n\nconst supportedFormats: InputColorFormat[] = [\"hex\", \"hsl\", \"rgb\", \"hsb\"];\n\nconst addAlfaToChannel = (\n channelName: InputColorFormat,\n alpha: boolean\n): ColorFormat => (alpha ? `${channelName}a` : channelName) as ColorFormat;\n\nconst removeAlfaFromChannel = (channelName: ColorFormat): InputColorFormat =>\n channelName.slice(0, 3) as InputColorFormat;\n\nconst CopyIcon = () => (\n <svg\n viewBox=\"0 0 24 24\"\n width={18}\n height={18}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\" />\n <path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\" />\n </svg>\n);\n\nconst CheckIcon = () => (\n <svg\n viewBox=\"0 0 24 24\"\n width={18}\n height={18}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n);\n\nconst ResetIcon = () => (\n <svg\n viewBox=\"0 0 24 24\"\n width={18}\n height={18}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n <polyline points=\"3 3 3 8 8 8\" />\n </svg>\n);\n\nexport const ColorPicker = forwardRef<\n any,\n ColorPickerProps & ThemeOverrideProps\n>(\n (\n {\n colorFormat: defaultColorFormat = \"hex\",\n alpha = true,\n value: propValue,\n onChange,\n selectableFormats = supportedFormats,\n copiedIcon,\n eyedropper = false,\n bottomContent,\n testID,\n themeMode,\n themeProductContext,\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const prevColorRef = useRef(propValue);\n\n const [innerValue, setInnerValue] = useUpdatableState<ColorValue>(\n (prevState) => {\n if (prevColorRef.current === propValue && prevState) return prevState;\n const parsedColor = parseColor(propValue || DEFAULT_VALUE);\n return parsedColor;\n },\n [propValue],\n true\n );\n\n const [initialValue] = useState<ColorValue>(() => innerValue);\n const [isValueCopied, setValueCopied] = useState(false);\n\n const [colorFormat, setColorFormat] = useUpdatableState<ColorFormat>(\n () => addAlfaToChannel(defaultColorFormat, alpha),\n [defaultColorFormat, alpha],\n true\n );\n\n const handleChange = (\n newColorString: string,\n currentFormat: ColorFormat = colorFormat\n ) => {\n if (!newColorString) return;\n const newColor = parseColor(newColorString);\n const valueInInitialFormat = newColor.toString(\n addAlfaToChannel(defaultColorFormat, alpha)\n );\n const valueInCurrentFormat = newColor.toString(currentFormat);\n\n setInnerValue(newColor);\n prevColorRef.current = valueInInitialFormat;\n\n onChange?.({\n valueInInitialFormat,\n currentColorFormat: removeAlfaFromChannel(currentFormat),\n valueInCurrentFormat,\n });\n };\n\n const handleChangeFormat = (newFormat: string) => {\n setColorFormat(newFormat as ColorFormat);\n handleChange(innerValue.toString(), newFormat as ColorFormat);\n };\n\n const onCopy = async () => {\n if (isNative) {\n // Native clipboard needs a library like react-native-clipboard\n console.warn(\"Clipboard not yet implemented for native\");\n return;\n }\n try {\n await navigator.clipboard.writeText(innerValue.toString(colorFormat));\n setValueCopied(true);\n setTimeout(() => setValueCopied(false), 2000);\n } catch (err) {\n console.error(\"Failed to copy:\", err);\n }\n };\n\n const onReset = () => handleChange(initialValue.toString());\n\n const selectFormatOptions = selectableFormats\n .map((f) => addAlfaToChannel(f, alpha))\n .map((f) => ({\n label: f.toUpperCase(),\n value: f,\n }));\n\n const channels: ColorChannel[] = colorFormat.includes(\"hex\")\n ? []\n : colorFormat.includes(\"rgb\")\n ? [\"red\", \"green\", \"blue\"]\n : colorFormat.includes(\"hsl\")\n ? [\"hue\", \"saturation\", \"lightness\"]\n : [\"hue\", \"saturation\", \"brightness\"];\n\n return (\n <Box\n ref={ref}\n testID={testID}\n backgroundColor={theme.colors.background.secondary}\n borderRadius={8}\n padding={16}\n gap={16}\n width={312}\n style={{ boxShadow: \"0px 4px 16px 0px rgba(7, 7, 8, 0.1)\" }}\n >\n <ColorPickerArea\n value={innerValue.toString()}\n onChange={handleChange}\n />\n\n <Box flexDirection=\"row\" gap={8} alignItems=\"center\">\n {eyedropper && <ColorPickerEyedropper onColorPick={handleChange} />}\n <Box flex={1} gap={8}>\n <ColorPickerSlider\n channel=\"hue\"\n value={innerValue.toString()}\n onChange={handleChange}\n />\n {alpha && (\n <ColorPickerSlider\n channel=\"alpha\"\n value={innerValue.toString()}\n onChange={handleChange}\n />\n )}\n </Box>\n </Box>\n\n <Box flexDirection=\"row\" gap={8} alignItems=\"center\">\n <Box width={80}>\n <Select\n size=\"sm\"\n options={selectFormatOptions}\n value={colorFormat}\n onChange={handleChangeFormat}\n />\n </Box>\n\n <Box flex={1} flexDirection=\"row\" gap={4}>\n {colorFormat.includes(\"hex\") ? (\n <ColorPickerHexInput\n value={innerValue.toString(colorFormat)}\n onChange={handleChange}\n />\n ) : (\n channels.map((channel) => (\n <ColorPickerInput\n key={channel}\n value={innerValue}\n valueType={\n innerValue.getChannelRange(channel).maxValue === 100\n ? \"percentage\"\n : \"number\"\n }\n channel={channel}\n onChange={handleChange}\n />\n ))\n )}\n {alpha && (\n <ColorPickerInput\n channel=\"alpha\"\n value={innerValue}\n valueType=\"percentage\"\n onChange={handleChange}\n />\n )}\n </Box>\n\n <Box flexDirection=\"row\" gap={4}>\n <IconButton\n size=\"sm\"\n variant=\"secondary\"\n tone=\"mono\"\n onPress={onCopy}\n icon={isValueCopied ? copiedIcon || <CheckIcon /> : <CopyIcon />}\n aria-label=\"Copy color\"\n />\n <IconButton\n size=\"sm\"\n variant=\"secondary\"\n tone=\"mono\"\n onPress={onReset}\n icon={<ResetIcon />}\n aria-label=\"Reset color\"\n />\n </Box>\n </Box>\n\n {bottomContent}\n </Box>\n );\n }\n);\n\nColorPicker.displayName = \"ColorPicker\";\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","export * from \"./Box\";\nexport * from \"./Text\";\nexport * from \"./Spinner\";\nexport * from \"./Icon\";\nexport * from \"./Divider\";\nexport * from \"./Input\";\nexport * from \"./TextArea\";\nexport * from \"./LinearGradient\";\n\nexport const isWeb = false;\nexport const isNative = true;\n","import React, {\n forwardRef,\n useCallback,\n useEffect,\n useRef,\n useState,\n type ForwardedRef,\n} from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, isWeb, isNative } from \"@xsolla/xui-primitives\";\nimport { createColorFromHsb, parseColor } from \"./colorUtils\";\nimport type { CustomColorAreaProps } from \"./types\";\nimport { clamp, snapValueToStep, useMergedRefs } from \"./utils\";\n\nexport const ColorPickerArea = forwardRef(function CustomColorArea(\n props: CustomColorAreaProps,\n ref: ForwardedRef<any>\n) {\n const {\n xChannelStep = 0.1,\n yChannelStep = 0.1,\n value,\n defaultValue,\n onChange,\n onChangeEnd,\n className,\n } = props;\n\n const internalRef = useRef<any>(null);\n const containerRef = useMergedRefs(ref, internalRef);\n const [layout, setLayout] = useState({ width: 0, height: 0 });\n const [isDragging, setIsDragging] = useState(false);\n const [currentColor, setCurrentColor] = useState(() => {\n const initialValue = value || defaultValue || \"#ffffff\";\n return parseColor(initialValue);\n });\n\n useEffect(() => {\n if (value !== undefined) {\n setCurrentColor(parseColor(value));\n }\n }, [value]);\n\n const hsb = currentColor.toHsb();\n const hue = hsb.h;\n\n const saturation = hsb.s * 100;\n const brightness = hsb.b * 100;\n const thumbX = (saturation / 100) * 100;\n const thumbY = 100 - (brightness / 100) * 100;\n\n const updateColor = useCallback(\n (x: number, y: number) => {\n const newSaturation = snapValueToStep(x * 100, 0, 100, xChannelStep);\n const newBrightness = snapValueToStep(\n (1 - y) * 100,\n 0,\n 100,\n yChannelStep\n );\n\n const newColor = createColorFromHsb(\n hue,\n newSaturation,\n newBrightness,\n hsb.a\n );\n setCurrentColor(newColor);\n onChange?.(newColor.toString());\n return newColor;\n },\n [hue, hsb.a, xChannelStep, yChannelStep, onChange]\n );\n\n // Web mouse handlers\n const handleMouseDown = useCallback(\n (e: React.MouseEvent<HTMLDivElement>) => {\n if (isNative) return;\n setIsDragging(true);\n const rect = e.currentTarget.getBoundingClientRect();\n const x = clamp((e.clientX - rect.left) / rect.width, 0, 1);\n const y = clamp((e.clientY - rect.top) / rect.height, 0, 1);\n updateColor(x, y);\n },\n [updateColor]\n );\n\n const handleMouseMove = useCallback(\n (e: MouseEvent) => {\n if (!isDragging || isNative) return;\n const rect = (internalRef.current as any)?.getBoundingClientRect?.();\n if (!rect) return;\n const x = clamp((e.clientX - rect.left) / rect.width, 0, 1);\n const y = clamp((e.clientY - rect.top) / rect.height, 0, 1);\n updateColor(x, y);\n },\n [isDragging, updateColor]\n );\n\n const handleMouseUp = useCallback(() => {\n if (isDragging) {\n setIsDragging(false);\n onChangeEnd?.(currentColor.toString());\n }\n }, [isDragging, currentColor, onChangeEnd]);\n\n useEffect(() => {\n if (isWeb && isDragging) {\n document.addEventListener(\"mousemove\", handleMouseMove);\n document.addEventListener(\"mouseup\", handleMouseUp);\n return () => {\n document.removeEventListener(\"mousemove\", handleMouseMove);\n document.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }\n }, [isDragging, handleMouseMove, handleMouseUp]);\n\n // Native responder handlers\n const handleResponderMove = useCallback(\n (e: any) => {\n const { locationX, locationY } = e.nativeEvent;\n const x = clamp(locationX / layout.width, 0, 1);\n const y = clamp(locationY / layout.height, 0, 1);\n updateColor(x, y);\n },\n [layout, updateColor]\n );\n\n const handleResponderRelease = useCallback(() => {\n setIsDragging(false);\n onChangeEnd?.(currentColor.toString());\n }, [currentColor, onChangeEnd]);\n\n const gradientStyle = isWeb\n ? {\n background: `linear-gradient(to top,\n hsl(${hue}, 100%, 0%),\n hsl(${hue}, 100%, 50%)),\n linear-gradient(to right,\n hsla(${hue}, 0%, 50%, 1),\n hsla(${hue}, 100%, 50%, 1))`,\n }\n : {\n backgroundColor: `hsl(${hue}, 100%, 50%)`, // Fallback for native without LinearGradient\n };\n\n const thumbColor = currentColor.toString(\"hex\");\n\n return (\n <Box\n data-testid=\"color-picker-color-area\"\n ref={containerRef}\n className={className}\n borderRadius={8}\n height={240}\n cursor=\"pointer\"\n position=\"relative\"\n style={gradientStyle as any}\n onMouseDown={handleMouseDown}\n onLayout={(e: any) => {\n if (isNative) {\n setLayout(e.nativeEvent.layout);\n }\n }}\n onMoveShouldSetResponder={() => isNative}\n onResponderGrant={(e: any) => {\n setIsDragging(true);\n handleResponderMove(e);\n }}\n onResponderMove={handleResponderMove}\n onResponderRelease={handleResponderRelease}\n onResponderTerminate={handleResponderRelease}\n >\n <Box width=\"100%\" height=\"100%\" position=\"relative\">\n <Box\n data-testid=\"color-picker-color-area-thumb\"\n position=\"absolute\"\n width={16}\n height={16}\n borderRadius={8}\n borderWidth={2}\n borderColor=\"#ffffff\"\n style={\n {\n left: `${thumbX}%`,\n top: `${thumbY}%`,\n transform: isWeb\n ? \"translate(-50%, -50%)\"\n : ([{ translateX: -8 }, { translateY: -8 }] as any),\n backgroundColor: thumbColor,\n boxShadow: \"0 0 4px rgba(0,0,0,0.3)\",\n } as any\n }\n />\n </Box>\n </Box>\n );\n});\n","export type ColorChannel =\n | \"hue\"\n | \"saturation\"\n | \"brightness\"\n | \"lightness\"\n | \"red\"\n | \"green\"\n | \"blue\"\n | \"alpha\";\n\nexport interface ColorValue {\n getChannelValue(channel: ColorChannel): number;\n setChannelValue(channel: ColorChannel, value: number): ColorValue;\n getChannelRange(channel: ColorChannel): {\n minValue: number;\n maxValue: number;\n step: number;\n pageSize: number;\n };\n getColorChannels(): ColorChannel[];\n toFormat(format: string): string;\n toString(format?: string): string;\n toHsb(): { h: number; s: number; b: number; a: number };\n toRgb(): { r: number; g: number; b: number; a: number };\n toHsl(): { h: number; s: number; l: number; a: number };\n}\n\n// Basic color conversion functions\nfunction hsbToRgb(h: number, s: number, b: number, a: number = 1) {\n s /= 100;\n b /= 100;\n const k = (n: number) => (n + h / 60) % 6;\n const f = (n: number) =>\n b * (1 - s * Math.max(0, Math.min(k(n), 4 - k(n), 1)));\n return {\n r: Math.round(255 * f(5)),\n g: Math.round(255 * f(3)),\n b: Math.round(255 * f(1)),\n a,\n };\n}\n\nfunction rgbToHsb(r: number, g: number, b: number, a: number = 1) {\n r /= 255;\n g /= 255;\n b /= 255;\n const v = Math.max(r, g, b);\n const n = v - Math.min(r, g, b);\n const h =\n n === 0\n ? 0\n : n && v === r\n ? (g - b) / n\n : v === g\n ? 2 + (b - r) / n\n : 4 + (r - g) / n;\n return {\n h: Math.round(60 * (h < 0 ? h + 6 : h)),\n s: Math.round(v && (n / v) * 100),\n b: Math.round(v * 100),\n a,\n };\n}\n\nfunction rgbToHex(r: number, g: number, b: number, a: number = 1) {\n const toHex = (n: number) => n.toString(16).padStart(2, \"0\");\n const alpha = a === 1 ? \"\" : toHex(Math.round(a * 255));\n return `#${toHex(r)}${toHex(g)}${toHex(b)}${alpha}`.toUpperCase();\n}\n\nfunction hexToRgb(hex: string) {\n hex = hex.replace(/^#/, \"\");\n if (hex.length === 3)\n hex = hex\n .split(\"\")\n .map((s) => s + s)\n .join(\"\");\n if (hex.length === 4)\n hex = hex\n .split(\"\")\n .map((s) => s + s)\n .join(\"\");\n\n const r = parseInt(hex.slice(0, 2), 16);\n const g = parseInt(hex.slice(2, 4), 16);\n const b = parseInt(hex.slice(4, 6), 16);\n const a = hex.length === 8 ? parseInt(hex.slice(6, 8), 16) / 255 : 1;\n\n return { r, g, b, a: parseFloat(a.toFixed(2)) };\n}\n\nfunction rgbToHsl(r: number, g: number, b: number, a: number = 1) {\n r /= 255;\n g /= 255;\n b /= 255;\n const max = Math.max(r, g, b),\n min = Math.min(r, g, b);\n let h = 0,\n s = 0,\n l = (max + min) / 2;\n\n if (max !== min) {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n\n return {\n h: Math.round(h * 360),\n s: Math.round(s * 100),\n l: Math.round(l * 100),\n a,\n };\n}\n\nclass ColorValueImpl implements ColorValue {\n private h: number;\n private s: number;\n private b: number;\n private a: number;\n\n constructor(h: number, s: number, b: number, a: number = 1) {\n this.h = h;\n this.s = s;\n this.b = b;\n this.a = a;\n }\n\n getChannelValue(channel: ColorChannel): number {\n switch (channel) {\n case \"hue\":\n return this.h;\n case \"saturation\":\n return this.s;\n case \"brightness\":\n return this.b;\n case \"alpha\":\n return this.a;\n case \"red\":\n return hsbToRgb(this.h, this.s, this.b, this.a).r;\n case \"green\":\n return hsbToRgb(this.h, this.s, this.b, this.a).g;\n case \"blue\":\n return hsbToRgb(this.h, this.s, this.b, this.a).b;\n case \"lightness\":\n return rgbToHsl(\n hsbToRgb(this.h, this.s, this.b, this.a).r,\n hsbToRgb(this.h, this.s, this.b, this.a).g,\n hsbToRgb(this.h, this.s, this.b, this.a).b\n ).l;\n default:\n return 0;\n }\n }\n\n setChannelValue(channel: ColorChannel, value: number): ColorValue {\n if (channel === \"hue\")\n return new ColorValueImpl(value, this.s, this.b, this.a);\n if (channel === \"saturation\")\n return new ColorValueImpl(this.h, value, this.b, this.a);\n if (channel === \"brightness\")\n return new ColorValueImpl(this.h, this.s, value, this.a);\n if (channel === \"alpha\")\n return new ColorValueImpl(this.h, this.s, this.b, value);\n\n // For RGB/HSL channels, convert to RGB, update, then back to HSB\n const rgb = hsbToRgb(this.h, this.s, this.b, this.a);\n if (channel === \"red\") rgb.r = value;\n else if (channel === \"green\") rgb.g = value;\n else if (channel === \"blue\") rgb.b = value;\n\n const hsb = rgbToHsb(rgb.r, rgb.g, rgb.b, rgb.a);\n return new ColorValueImpl(hsb.h, hsb.s, hsb.b, hsb.a);\n }\n\n getChannelRange(channel: ColorChannel) {\n switch (channel) {\n case \"hue\":\n return { minValue: 0, maxValue: 360, step: 1, pageSize: 15 };\n case \"alpha\":\n return { minValue: 0, maxValue: 1, step: 0.01, pageSize: 0.1 };\n case \"red\":\n case \"green\":\n case \"blue\":\n return { minValue: 0, maxValue: 255, step: 1, pageSize: 17 };\n default:\n return { minValue: 0, maxValue: 100, step: 1, pageSize: 10 };\n }\n }\n\n getColorChannels(): ColorChannel[] {\n return [\"red\", \"green\", \"blue\"];\n }\n\n toFormat(format: string): string {\n const rgb = hsbToRgb(this.h, this.s, this.b, this.a);\n if (format === \"hex\" || format === \"hexa\")\n return rgbToHex(rgb.r, rgb.g, rgb.b, this.a);\n if (format === \"rgb\") return `rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`;\n if (format === \"rgba\")\n return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${this.a})`;\n if (format === \"hsl\") {\n const hsl = rgbToHsl(rgb.r, rgb.g, rgb.b);\n return `hsl(${hsl.h}, ${hsl.s}%, ${hsl.l}%)`;\n }\n if (format === \"hsla\") {\n const hsl = rgbToHsl(rgb.r, rgb.g, rgb.b);\n return `hsla(${hsl.h}, ${hsl.s}%, ${hsl.l}%, ${this.a})`;\n }\n if (format === \"hsb\") return `hsb(${this.h}, ${this.s}%, ${this.b}%)`;\n if (format === \"hsba\")\n return `hsba(${this.h}, ${this.s}%, ${this.b}%, ${this.a})`;\n return rgbToHex(rgb.r, rgb.g, rgb.b, this.a);\n }\n\n toString(format?: string): string {\n return this.toFormat(format || \"hex\");\n }\n\n toHsb() {\n return { h: this.h, s: this.s / 100, b: this.b / 100, a: this.a };\n }\n toRgb() {\n return hsbToRgb(this.h, this.s, this.b, this.a);\n }\n toHsl() {\n const rgb = this.toRgb();\n return rgbToHsl(rgb.r, rgb.g, rgb.b, this.a);\n }\n}\n\nexport function parseColor(color: string): ColorValue {\n if (color.startsWith(\"#\")) {\n const rgb = hexToRgb(color);\n const hsb = rgbToHsb(rgb.r, rgb.g, rgb.b, rgb.a);\n return new ColorValueImpl(hsb.h, hsb.s, hsb.b, hsb.a);\n }\n // Basic support for hsb/rgb/hsl strings if needed, otherwise default to white\n return new ColorValueImpl(0, 0, 100, 1);\n}\n\nexport function createColorFromHsb(\n h: number,\n s: number,\n b: number,\n a: number = 1\n): ColorValue {\n return new ColorValueImpl(h, s, b, a);\n}\n","import { useRef, useEffect, useState, useCallback } from \"react\";\n\nexport function clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n\nexport function snapValueToStep(\n value: number,\n min: number | undefined,\n max: number | undefined,\n step: number\n): number {\n const remainder = (value - (min ?? 0)) % step;\n let snappedValue =\n Math.abs(remainder) * 2 >= step\n ? value + Math.sign(remainder) * (step - Math.abs(remainder))\n : value - remainder;\n\n if (min !== undefined && snappedValue < min) {\n snappedValue = min;\n } else if (max !== undefined && snappedValue > max) {\n snappedValue = max;\n }\n\n return snappedValue;\n}\n\nexport function useMergedRefs<T>(...refs: Array<any>) {\n return useCallback((node: T) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref != null) {\n ref.current = node;\n }\n });\n }, refs);\n}\n\nexport function useUpdatableState<T>(\n updater: (prevState: T | undefined) => T,\n deps: any[],\n initialUpdate = false\n): [T, (value: T) => void] {\n const [state, setState] = useState<T>(() => updater(undefined));\n const isFirstRender = useRef(true);\n\n useEffect(() => {\n if (isFirstRender.current && !initialUpdate) {\n isFirstRender.current = false;\n return;\n }\n setState(updater);\n }, deps);\n\n return [state, setState];\n}\n","import React, { useCallback, useEffect, useRef, useState } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, isWeb, isNative } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, type ThemeOverrideProps } from \"@xsolla/xui-core\";\nimport { createColorFromHsb, parseColor } from \"./colorUtils\";\nimport { clamp, snapValueToStep } from \"./utils\";\n\ntype ColorPickerSliderProps = {\n channel: \"hue\" | \"alpha\";\n value: string;\n onChange?: (color: string) => void;\n onChangeEnd?: (color: string) => void;\n /** Test ID for testing frameworks */\n testID?: string;\n};\n\nexport const ColorPickerSlider: React.FC<\n ColorPickerSliderProps & ThemeOverrideProps\n> = ({\n channel,\n value,\n onChange,\n onChangeEnd,\n testID,\n themeMode,\n themeProductContext,\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const trackRef = useRef<any>(null);\n const [layout, setLayout] = useState({ width: 0, height: 0 });\n const [isDragging, setIsDragging] = useState(false);\n const currentColor = parseColor(value);\n const hsb = currentColor.toHsb();\n\n const getChannelValue = () => {\n if (channel === \"hue\") return hsb.h;\n return hsb.a * 100;\n };\n\n const getMaxValue = () => (channel === \"hue\" ? 360 : 100);\n\n const channelValue = getChannelValue();\n const maxValue = getMaxValue();\n const thumbPosition = (channelValue / maxValue) * 100;\n\n const updateColor = useCallback(\n (x: number) => {\n const newValue = snapValueToStep(x * maxValue, 0, maxValue, 1);\n let newColor;\n if (channel === \"hue\") {\n newColor = createColorFromHsb(\n newValue,\n hsb.s * 100,\n hsb.b * 100,\n hsb.a\n );\n } else {\n newColor = createColorFromHsb(\n hsb.h,\n hsb.s * 100,\n hsb.b * 100,\n newValue / 100\n );\n }\n onChange?.(newColor.toString());\n return newColor;\n },\n [channel, maxValue, hsb, onChange]\n );\n\n // Web mouse handlers\n const handleMouseDown = useCallback(\n (e: React.MouseEvent<HTMLDivElement>) => {\n if (isNative) return;\n setIsDragging(true);\n const rect = e.currentTarget.getBoundingClientRect();\n const x = clamp((e.clientX - rect.left) / rect.width, 0, 1);\n updateColor(x);\n },\n [updateColor]\n );\n\n const handleMouseMove = useCallback(\n (e: MouseEvent) => {\n if (!isDragging || isNative) return;\n const rect = (trackRef.current as any)?.getBoundingClientRect?.();\n if (!rect) return;\n const x = clamp((e.clientX - rect.left) / rect.width, 0, 1);\n updateColor(x);\n },\n [isDragging, updateColor]\n );\n\n const handleMouseUp = useCallback(() => {\n if (isDragging) {\n setIsDragging(false);\n onChangeEnd?.(currentColor.toString());\n }\n }, [isDragging, currentColor, onChangeEnd]);\n\n useEffect(() => {\n if (isWeb && isDragging) {\n document.addEventListener(\"mousemove\", handleMouseMove);\n document.addEventListener(\"mouseup\", handleMouseUp);\n return () => {\n document.removeEventListener(\"mousemove\", handleMouseMove);\n document.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }\n }, [isDragging, handleMouseMove, handleMouseUp]);\n\n // Native responder handlers\n const handleResponderMove = useCallback(\n (e: any) => {\n const { locationX } = e.nativeEvent;\n const x = clamp(locationX / layout.width, 0, 1);\n updateColor(x);\n },\n [layout, updateColor]\n );\n\n const handleResponderRelease = useCallback(() => {\n setIsDragging(false);\n onChangeEnd?.(currentColor.toString());\n }, [currentColor, onChangeEnd]);\n\n const getGradient = () => {\n if (channel === \"hue\") {\n return \"linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%)\";\n }\n const colorHex = currentColor.toString(\"hex\");\n return `linear-gradient(to right, transparent 0%, ${colorHex} 100%)`;\n };\n\n const thumbColor =\n channel === \"hue\"\n ? createColorFromHsb(channelValue, 100, 100, 1).toString(\"hex\")\n : currentColor.toString(\"hex\");\n\n return (\n <Box\n testID={testID}\n height={12}\n borderRadius={6}\n position=\"relative\"\n style={\n isWeb\n ? { background: getGradient() }\n : ({ backgroundColor: theme.colors.background.primary } as any)\n }\n onLayout={(e: any) => {\n if (isNative) {\n setLayout(e.nativeEvent.layout);\n }\n }}\n onMouseDown={handleMouseDown}\n onMoveShouldSetResponder={() => isNative}\n onResponderGrant={(e: any) => {\n setIsDragging(true);\n handleResponderMove(e);\n }}\n onResponderMove={handleResponderMove}\n onResponderRelease={handleResponderRelease}\n onResponderTerminate={handleResponderRelease}\n >\n <Box ref={trackRef} width=\"100%\" height=\"100%\" position=\"relative\">\n <Box\n position=\"absolute\"\n width={16}\n height={16}\n borderRadius={8}\n borderWidth={2}\n borderColor=\"#ffffff\"\n style={\n {\n left: `${thumbPosition}%`,\n top: \"50%\",\n transform: isWeb\n ? \"translate(-50%, -50%)\"\n : ([{ translateX: -8 }, { translateY: -8 }] as any),\n backgroundColor: thumbColor,\n boxShadow: \"0 0 4px rgba(0,0,0,0.3)\",\n } as any\n }\n />\n </Box>\n </Box>\n );\n};\n","import React, { useEffect, useState } from \"react\";\nimport { Input } from \"@xsolla/xui-input\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport type { ColorChannel, ColorValue } from \"./colorUtils\";\n\ntype ColorPickerInputProps = {\n value: ColorValue;\n valueType: \"number\" | \"percentage\";\n channel: ColorChannel;\n onChange: (color: string) => void;\n};\n\nexport const ColorPickerInput: React.FC<ColorPickerInputProps> = ({\n value,\n valueType,\n channel,\n onChange,\n}) => {\n const channelValue = value.getChannelValue(channel);\n const channelRange = value.getChannelRange(channel);\n const intValue = channel === \"alpha\" ? channelValue * 100 : channelValue;\n const roundedValue = Math.round(intValue);\n\n const [inputValue, setInputValue] = useState(String(roundedValue));\n\n useEffect(() => {\n setInputValue(String(roundedValue));\n }, [roundedValue]);\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const text = e.target.value.replace(/[^0-9]/g, \"\");\n setInputValue(text);\n\n const parsedValue = parseInt(text, 10);\n if (!isNaN(parsedValue)) {\n const min = channel === \"alpha\" ? 0 : channelRange.minValue;\n const max = channel === \"alpha\" ? 100 : channelRange.maxValue;\n\n const clampedValue = Math.min(Math.max(parsedValue, min), max);\n const colorValue =\n channel === \"alpha\" ? clampedValue / 100 : clampedValue;\n\n const newColor = value.setChannelValue(channel, colorValue);\n onChange(newColor.toString());\n }\n };\n\n const handleBlur = () => {\n setInputValue(String(roundedValue));\n };\n\n return (\n <Box flex={1} minWidth={40}>\n <Input\n size=\"sm\"\n value={valueType === \"percentage\" ? `${inputValue}%` : inputValue}\n onChange={handleChange}\n onBlur={handleBlur}\n />\n </Box>\n );\n};\n","import React, { useEffect, useState } from \"react\";\nimport { Input } from \"@xsolla/xui-input\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport { parseColor } from \"./colorUtils\";\n\ntype ColorPickerHexInputProps = {\n value: string;\n onChange: (color: string) => void;\n};\n\nexport const ColorPickerHexInput: React.FC<ColorPickerHexInputProps> = ({\n value,\n onChange,\n}) => {\n const [inputValue, setInputValue] = useState(value);\n\n useEffect(() => {\n setInputValue(value);\n }, [value]);\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = e.target.value;\n setInputValue(newValue);\n\n try {\n const color = parseColor(newValue);\n if (color) {\n onChange(color.toString(\"hex\"));\n }\n } catch {\n // Invalid color\n }\n };\n\n const handleBlur = () => {\n try {\n const color = parseColor(inputValue);\n if (color) {\n onChange(color.toString(\"hex\"));\n } else {\n setInputValue(value);\n }\n } catch {\n setInputValue(value);\n }\n };\n\n return (\n <Box flex={1}>\n <Input\n size=\"sm\"\n value={inputValue}\n onChange={handleChange}\n onBlur={handleBlur}\n />\n </Box>\n );\n};\n","import React from \"react\";\nimport { IconButton } from \"@xsolla/xui-button\";\nimport { parseColor } from \"./colorUtils\";\n\nconst DropletIcon = () => (\n <svg\n viewBox=\"0 0 24 24\"\n width={18}\n height={18}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5s-3 3.5-3 5.5a7 7 0 0 0 7 7z\" />\n </svg>\n);\n\ndeclare let EyeDropper: {\n new (): {\n open(): Promise<{ sRGBHex: string }>;\n };\n};\n\ntype Props = {\n onColorPick: (color: string) => void;\n};\n\nexport const ColorPickerEyedropper: React.FC<Props> = ({ onColorPick }) => {\n const onEyedropperButtonClick = () => {\n if (typeof EyeDropper !== \"undefined\") {\n new EyeDropper().open().then((result) => {\n const pickedColor = parseColor(result.sRGBHex);\n const hsb = pickedColor.toHsb();\n const hsbString = `hsb(${Math.round(hsb.h)}, ${Math.round(hsb.s * 100)}%, ${Math.round(hsb.b * 100)}%)`;\n onColorPick(hsbString);\n });\n }\n };\n\n if (typeof EyeDropper === \"undefined\") return null;\n\n return (\n <IconButton\n size=\"sm\"\n variant=\"secondary\"\n tone=\"mono\"\n onPress={onEyedropperButtonClick}\n icon={<DropletIcon />}\n aria-label=\"Pick color from screen\"\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA6C;;;ACC7C,0BAQO;AA2ID;AAxIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,oBAAoB,CAAC,aAAkC;AAAA,IAC3D,iBACE,WAAW,YAAY,kBACnB,WAAW,kBACX;AAAA,IACN;AAAA,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H;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;","names":["import_react","import_xui_button","import_xui_core","import_react","import_jsx_runtime","import_react","import_jsx_runtime","import_react","import_jsx_runtime","import_react","import_xui_input","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
1
+ {"version":3,"sources":["../../src/index.tsx","../../src/ColorPicker.tsx","../../../../foundation/primitives-native/src/Box.tsx","../../../../foundation/primitives-native/src/index.tsx","../../src/ColorPickerArea.tsx","../../src/colorUtils.ts","../../src/utils.ts","../../src/ColorPickerSlider.tsx","../../src/ColorPickerInput.tsx","../../src/ColorPickerHexInput.tsx","../../src/ColorPickerEyedropper.tsx"],"sourcesContent":["export * from \"./ColorPicker\";\nexport * from \"./types\";\nexport * from \"./colorUtils\";\nexport * from \"./ColorPickerArea\";\nexport * from \"./ColorPickerSlider\";\n","import { forwardRef, useRef, useState } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport { Select } from \"@xsolla/xui-select\";\nimport { IconButton } from \"@xsolla/xui-button\";\nimport {\n useResolvedTheme,\n isNative,\n type ThemeOverrideProps,\n} from \"@xsolla/xui-core\";\nimport { ColorPickerArea } from \"./ColorPickerArea\";\nimport { ColorPickerSlider } from \"./ColorPickerSlider\";\nimport { ColorPickerInput } from \"./ColorPickerInput\";\nimport { ColorPickerHexInput } from \"./ColorPickerHexInput\";\nimport { ColorPickerEyedropper } from \"./ColorPickerEyedropper\";\nimport { parseColor, type ColorChannel, type ColorValue } from \"./colorUtils\";\nimport type { ColorFormat, ColorPickerProps, InputColorFormat } from \"./types\";\nimport { useUpdatableState } from \"./utils\";\n\nconst DEFAULT_VALUE = \"#66E6FFFF\";\n\nconst supportedFormats: InputColorFormat[] = [\"hex\", \"hsl\", \"rgb\", \"hsb\"];\n\nconst addAlfaToChannel = (\n channelName: InputColorFormat,\n alpha: boolean\n): ColorFormat => (alpha ? `${channelName}a` : channelName) as ColorFormat;\n\nconst removeAlfaFromChannel = (channelName: ColorFormat): InputColorFormat =>\n channelName.slice(0, 3) as InputColorFormat;\n\nconst CopyIcon = () => (\n <svg\n viewBox=\"0 0 24 24\"\n width={18}\n height={18}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <rect x=\"9\" y=\"9\" width=\"13\" height=\"13\" rx=\"2\" ry=\"2\" />\n <path d=\"M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1\" />\n </svg>\n);\n\nconst CheckIcon = () => (\n <svg\n viewBox=\"0 0 24 24\"\n width={18}\n height={18}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <polyline points=\"20 6 9 17 4 12\" />\n </svg>\n);\n\nconst ResetIcon = () => (\n <svg\n viewBox=\"0 0 24 24\"\n width={18}\n height={18}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8\" />\n <polyline points=\"3 3 3 8 8 8\" />\n </svg>\n);\n\nexport const ColorPicker = forwardRef<\n any,\n ColorPickerProps & ThemeOverrideProps\n>(\n (\n {\n colorFormat: defaultColorFormat = \"hex\",\n alpha = true,\n value: propValue,\n onChange,\n selectableFormats = supportedFormats,\n copiedIcon,\n eyedropper = false,\n bottomContent,\n testID,\n themeMode,\n themeProductContext,\n },\n ref\n ) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const prevColorRef = useRef(propValue);\n\n const [innerValue, setInnerValue] = useUpdatableState<ColorValue>(\n (prevState) => {\n if (prevColorRef.current === propValue && prevState) return prevState;\n const parsedColor = parseColor(propValue || DEFAULT_VALUE);\n return parsedColor;\n },\n [propValue],\n true\n );\n\n const [initialValue] = useState<ColorValue>(() => innerValue);\n const [isValueCopied, setValueCopied] = useState(false);\n\n const [colorFormat, setColorFormat] = useUpdatableState<ColorFormat>(\n () => addAlfaToChannel(defaultColorFormat, alpha),\n [defaultColorFormat, alpha],\n true\n );\n\n const handleChange = (\n newColorString: string,\n currentFormat: ColorFormat = colorFormat\n ) => {\n if (!newColorString) return;\n const newColor = parseColor(newColorString);\n const valueInInitialFormat = newColor.toString(\n addAlfaToChannel(defaultColorFormat, alpha)\n );\n const valueInCurrentFormat = newColor.toString(currentFormat);\n\n setInnerValue(newColor);\n prevColorRef.current = valueInInitialFormat;\n\n onChange?.({\n valueInInitialFormat,\n currentColorFormat: removeAlfaFromChannel(currentFormat),\n valueInCurrentFormat,\n });\n };\n\n const handleChangeFormat = (newFormat: string) => {\n setColorFormat(newFormat as ColorFormat);\n handleChange(innerValue.toString(), newFormat as ColorFormat);\n };\n\n const onCopy = async () => {\n if (isNative) {\n // Native clipboard needs a library like react-native-clipboard\n console.warn(\"Clipboard not yet implemented for native\");\n return;\n }\n try {\n await navigator.clipboard.writeText(innerValue.toString(colorFormat));\n setValueCopied(true);\n setTimeout(() => setValueCopied(false), 2000);\n } catch (err) {\n console.error(\"Failed to copy:\", err);\n }\n };\n\n const onReset = () => handleChange(initialValue.toString());\n\n const selectFormatOptions = selectableFormats\n .map((f) => addAlfaToChannel(f, alpha))\n .map((f) => ({\n label: f.toUpperCase(),\n value: f,\n }));\n\n const channels: ColorChannel[] = colorFormat.includes(\"hex\")\n ? []\n : colorFormat.includes(\"rgb\")\n ? [\"red\", \"green\", \"blue\"]\n : colorFormat.includes(\"hsl\")\n ? [\"hue\", \"saturation\", \"lightness\"]\n : [\"hue\", \"saturation\", \"brightness\"];\n\n return (\n <Box\n ref={ref}\n testID={testID}\n backgroundColor={theme.colors.background.secondary}\n borderRadius={theme.shape.contextMenu.lg.borderRadius}\n padding={16}\n gap={16}\n width={312}\n style={{ boxShadow: \"0px 4px 16px 0px rgba(7, 7, 8, 0.1)\" }}\n >\n <ColorPickerArea\n value={innerValue.toString()}\n onChange={handleChange}\n />\n\n <Box flexDirection=\"row\" gap={8} alignItems=\"center\">\n {eyedropper && <ColorPickerEyedropper onColorPick={handleChange} />}\n <Box flex={1} gap={8}>\n <ColorPickerSlider\n channel=\"hue\"\n value={innerValue.toString()}\n onChange={handleChange}\n />\n {alpha && (\n <ColorPickerSlider\n channel=\"alpha\"\n value={innerValue.toString()}\n onChange={handleChange}\n />\n )}\n </Box>\n </Box>\n\n <Box flexDirection=\"row\" gap={8} alignItems=\"center\">\n <Box width={80}>\n <Select\n size=\"sm\"\n options={selectFormatOptions}\n value={colorFormat}\n onChange={handleChangeFormat}\n />\n </Box>\n\n <Box flex={1} flexDirection=\"row\" gap={4}>\n {colorFormat.includes(\"hex\") ? (\n <ColorPickerHexInput\n value={innerValue.toString(colorFormat)}\n onChange={handleChange}\n />\n ) : (\n channels.map((channel) => (\n <ColorPickerInput\n key={channel}\n value={innerValue}\n valueType={\n innerValue.getChannelRange(channel).maxValue === 100\n ? \"percentage\"\n : \"number\"\n }\n channel={channel}\n onChange={handleChange}\n />\n ))\n )}\n {alpha && (\n <ColorPickerInput\n channel=\"alpha\"\n value={innerValue}\n valueType=\"percentage\"\n onChange={handleChange}\n />\n )}\n </Box>\n\n <Box flexDirection=\"row\" gap={4}>\n <IconButton\n size=\"sm\"\n variant=\"secondary\"\n tone=\"mono\"\n onPress={onCopy}\n icon={isValueCopied ? copiedIcon || <CheckIcon /> : <CopyIcon />}\n aria-label=\"Copy color\"\n />\n <IconButton\n size=\"sm\"\n variant=\"secondary\"\n tone=\"mono\"\n onPress={onReset}\n icon={<ResetIcon />}\n aria-label=\"Reset color\"\n />\n </Box>\n </Box>\n\n {bottomContent}\n </Box>\n );\n }\n);\n\nColorPicker.displayName = \"ColorPicker\";\n","import React from \"react\";\nimport {\n View,\n Pressable,\n Image,\n ViewStyle,\n ImageStyle,\n DimensionValue,\n AnimatableNumericValue,\n} from \"react-native\";\nimport { BoxProps } from \"@xsolla/xui-primitives-core\";\n\nexport const Box: React.FC<BoxProps> = ({\n children,\n onPress,\n onLayout,\n onMoveShouldSetResponder,\n onResponderGrant,\n onResponderMove,\n onResponderRelease,\n onResponderTerminate,\n backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius,\n borderStyle,\n height,\n padding,\n paddingHorizontal,\n paddingVertical,\n margin,\n marginTop,\n marginBottom,\n marginLeft,\n marginRight,\n flexDirection,\n alignItems,\n justifyContent,\n position,\n top,\n bottom,\n left,\n right,\n width,\n minWidth,\n minHeight,\n maxWidth,\n maxHeight,\n flex,\n overflow,\n zIndex,\n hoverStyle,\n pressStyle,\n style,\n \"data-testid\": dataTestId,\n testID,\n as,\n src,\n alt,\n ...rest\n}) => {\n const getContainerStyle = (pressed?: boolean): ViewStyle => ({\n backgroundColor:\n pressed && pressStyle?.backgroundColor\n ? pressStyle.backgroundColor\n : backgroundColor,\n borderColor,\n borderWidth,\n borderBottomWidth,\n borderBottomColor,\n borderTopWidth,\n borderTopColor,\n borderLeftWidth,\n borderLeftColor,\n borderRightWidth,\n borderRightColor,\n borderRadius: borderRadius as AnimatableNumericValue,\n borderStyle: borderStyle as ViewStyle[\"borderStyle\"],\n overflow,\n zIndex,\n height: height as DimensionValue,\n width: width as DimensionValue,\n minWidth: minWidth as DimensionValue,\n minHeight: minHeight as DimensionValue,\n maxWidth: maxWidth as DimensionValue,\n maxHeight: maxHeight as DimensionValue,\n padding: padding as DimensionValue,\n paddingHorizontal: paddingHorizontal as DimensionValue,\n paddingVertical: paddingVertical as DimensionValue,\n margin: margin as DimensionValue,\n marginTop: marginTop as DimensionValue,\n marginBottom: marginBottom as DimensionValue,\n marginLeft: marginLeft as DimensionValue,\n marginRight: marginRight as DimensionValue,\n flexDirection,\n alignItems,\n justifyContent,\n position: position as ViewStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n flex,\n ...(style as ViewStyle),\n });\n\n const finalTestID = dataTestId || testID;\n\n // Destructure and drop web-only props from rest before passing to RN components\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const {\n role,\n tabIndex,\n onKeyDown,\n onKeyUp,\n \"aria-label\": _ariaLabel,\n \"aria-labelledby\": _ariaLabelledBy,\n \"aria-current\": _ariaCurrent,\n \"aria-disabled\": _ariaDisabled,\n \"aria-live\": _ariaLive,\n className,\n \"data-testid\": _dataTestId,\n ...nativeRest\n } = rest as Record<string, unknown>;\n\n // Handle as=\"img\" for React Native\n if (as === \"img\" && src) {\n const imageStyle: ImageStyle = {\n width: width as DimensionValue,\n height: height as DimensionValue,\n borderRadius: borderRadius as number,\n position: position as ImageStyle[\"position\"],\n top: top as DimensionValue,\n bottom: bottom as DimensionValue,\n left: left as DimensionValue,\n right: right as DimensionValue,\n ...(style as ImageStyle),\n };\n\n return (\n <Image\n source={{ uri: src }}\n style={imageStyle}\n testID={finalTestID}\n resizeMode=\"cover\"\n {...nativeRest}\n />\n );\n }\n\n if (onPress) {\n return (\n <Pressable\n onPress={onPress}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n style={({ pressed }) => getContainerStyle(pressed)}\n testID={finalTestID}\n {...nativeRest}\n >\n {children}\n </Pressable>\n );\n }\n\n return (\n <View\n style={getContainerStyle()}\n testID={finalTestID}\n onLayout={onLayout}\n onMoveShouldSetResponder={onMoveShouldSetResponder}\n onResponderGrant={onResponderGrant}\n onResponderMove={onResponderMove}\n onResponderRelease={onResponderRelease}\n onResponderTerminate={onResponderTerminate}\n {...nativeRest}\n >\n {children}\n </View>\n );\n};\n","export * from \"./Box\";\nexport * from \"./Text\";\nexport * from \"./Spinner\";\nexport * from \"./Icon\";\nexport * from \"./Divider\";\nexport * from \"./Input\";\nexport * from \"./TextArea\";\nexport * from \"./LinearGradient\";\n\nexport const isWeb = false;\nexport const isNative = true;\n","import React, {\n forwardRef,\n useCallback,\n useEffect,\n useRef,\n useState,\n type ForwardedRef,\n} from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, isWeb, isNative } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme } from \"@xsolla/xui-core\";\nimport { createColorFromHsb, parseColor } from \"./colorUtils\";\nimport type { CustomColorAreaProps } from \"./types\";\nimport { clamp, snapValueToStep, useMergedRefs } from \"./utils\";\n\nexport const ColorPickerArea = forwardRef(function CustomColorArea(\n props: CustomColorAreaProps,\n ref: ForwardedRef<any>\n) {\n const {\n xChannelStep = 0.1,\n yChannelStep = 0.1,\n value,\n defaultValue,\n onChange,\n onChangeEnd,\n className,\n } = props;\n\n const { theme } = useResolvedTheme();\n const internalRef = useRef<any>(null);\n const containerRef = useMergedRefs(ref, internalRef);\n const [layout, setLayout] = useState({ width: 0, height: 0 });\n const [isDragging, setIsDragging] = useState(false);\n const [currentColor, setCurrentColor] = useState(() => {\n const initialValue = value || defaultValue || \"#ffffff\";\n return parseColor(initialValue);\n });\n\n useEffect(() => {\n if (value !== undefined) {\n setCurrentColor(parseColor(value));\n }\n }, [value]);\n\n const hsb = currentColor.toHsb();\n const hue = hsb.h;\n\n const saturation = hsb.s * 100;\n const brightness = hsb.b * 100;\n const thumbX = (saturation / 100) * 100;\n const thumbY = 100 - (brightness / 100) * 100;\n\n const updateColor = useCallback(\n (x: number, y: number) => {\n const newSaturation = snapValueToStep(x * 100, 0, 100, xChannelStep);\n const newBrightness = snapValueToStep(\n (1 - y) * 100,\n 0,\n 100,\n yChannelStep\n );\n\n const newColor = createColorFromHsb(\n hue,\n newSaturation,\n newBrightness,\n hsb.a\n );\n setCurrentColor(newColor);\n onChange?.(newColor.toString());\n return newColor;\n },\n [hue, hsb.a, xChannelStep, yChannelStep, onChange]\n );\n\n // Web mouse handlers\n const handleMouseDown = useCallback(\n (e: React.MouseEvent<HTMLDivElement>) => {\n if (isNative) return;\n setIsDragging(true);\n const rect = e.currentTarget.getBoundingClientRect();\n const x = clamp((e.clientX - rect.left) / rect.width, 0, 1);\n const y = clamp((e.clientY - rect.top) / rect.height, 0, 1);\n updateColor(x, y);\n },\n [updateColor]\n );\n\n const handleMouseMove = useCallback(\n (e: MouseEvent) => {\n if (!isDragging || isNative) return;\n const rect = (internalRef.current as any)?.getBoundingClientRect?.();\n if (!rect) return;\n const x = clamp((e.clientX - rect.left) / rect.width, 0, 1);\n const y = clamp((e.clientY - rect.top) / rect.height, 0, 1);\n updateColor(x, y);\n },\n [isDragging, updateColor]\n );\n\n const handleMouseUp = useCallback(() => {\n if (isDragging) {\n setIsDragging(false);\n onChangeEnd?.(currentColor.toString());\n }\n }, [isDragging, currentColor, onChangeEnd]);\n\n useEffect(() => {\n if (isWeb && isDragging) {\n document.addEventListener(\"mousemove\", handleMouseMove);\n document.addEventListener(\"mouseup\", handleMouseUp);\n return () => {\n document.removeEventListener(\"mousemove\", handleMouseMove);\n document.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }\n }, [isDragging, handleMouseMove, handleMouseUp]);\n\n // Native responder handlers\n const handleResponderMove = useCallback(\n (e: any) => {\n const { locationX, locationY } = e.nativeEvent;\n const x = clamp(locationX / layout.width, 0, 1);\n const y = clamp(locationY / layout.height, 0, 1);\n updateColor(x, y);\n },\n [layout, updateColor]\n );\n\n const handleResponderRelease = useCallback(() => {\n setIsDragging(false);\n onChangeEnd?.(currentColor.toString());\n }, [currentColor, onChangeEnd]);\n\n const gradientStyle = isWeb\n ? {\n background: `linear-gradient(to top,\n hsl(${hue}, 100%, 0%),\n hsl(${hue}, 100%, 50%)),\n linear-gradient(to right,\n hsla(${hue}, 0%, 50%, 1),\n hsla(${hue}, 100%, 50%, 1))`,\n }\n : {\n backgroundColor: `hsl(${hue}, 100%, 50%)`, // Fallback for native without LinearGradient\n };\n\n const thumbColor = currentColor.toString(\"hex\");\n\n return (\n <Box\n data-testid=\"color-picker-color-area\"\n ref={containerRef}\n className={className}\n borderRadius={theme.shape.contextMenu.lg.borderRadius}\n height={240}\n cursor=\"pointer\"\n position=\"relative\"\n style={gradientStyle as any}\n onMouseDown={handleMouseDown}\n onLayout={(e: any) => {\n if (isNative) {\n setLayout(e.nativeEvent.layout);\n }\n }}\n onMoveShouldSetResponder={() => isNative}\n onResponderGrant={(e: any) => {\n setIsDragging(true);\n handleResponderMove(e);\n }}\n onResponderMove={handleResponderMove}\n onResponderRelease={handleResponderRelease}\n onResponderTerminate={handleResponderRelease}\n >\n <Box width=\"100%\" height=\"100%\" position=\"relative\">\n <Box\n data-testid=\"color-picker-color-area-thumb\"\n position=\"absolute\"\n width={16}\n height={16}\n borderRadius={theme.shape.contextMenu.lg.borderRadius}\n borderWidth={2}\n borderColor=\"#ffffff\"\n style={\n {\n left: `${thumbX}%`,\n top: `${thumbY}%`,\n transform: isWeb\n ? \"translate(-50%, -50%)\"\n : ([{ translateX: -8 }, { translateY: -8 }] as any),\n backgroundColor: thumbColor,\n boxShadow: \"0 0 4px rgba(0,0,0,0.3)\",\n } as any\n }\n />\n </Box>\n </Box>\n );\n});\n","export type ColorChannel =\n | \"hue\"\n | \"saturation\"\n | \"brightness\"\n | \"lightness\"\n | \"red\"\n | \"green\"\n | \"blue\"\n | \"alpha\";\n\nexport interface ColorValue {\n getChannelValue(channel: ColorChannel): number;\n setChannelValue(channel: ColorChannel, value: number): ColorValue;\n getChannelRange(channel: ColorChannel): {\n minValue: number;\n maxValue: number;\n step: number;\n pageSize: number;\n };\n getColorChannels(): ColorChannel[];\n toFormat(format: string): string;\n toString(format?: string): string;\n toHsb(): { h: number; s: number; b: number; a: number };\n toRgb(): { r: number; g: number; b: number; a: number };\n toHsl(): { h: number; s: number; l: number; a: number };\n}\n\n// Basic color conversion functions\nfunction hsbToRgb(h: number, s: number, b: number, a: number = 1) {\n s /= 100;\n b /= 100;\n const k = (n: number) => (n + h / 60) % 6;\n const f = (n: number) =>\n b * (1 - s * Math.max(0, Math.min(k(n), 4 - k(n), 1)));\n return {\n r: Math.round(255 * f(5)),\n g: Math.round(255 * f(3)),\n b: Math.round(255 * f(1)),\n a,\n };\n}\n\nfunction rgbToHsb(r: number, g: number, b: number, a: number = 1) {\n r /= 255;\n g /= 255;\n b /= 255;\n const v = Math.max(r, g, b);\n const n = v - Math.min(r, g, b);\n const h =\n n === 0\n ? 0\n : n && v === r\n ? (g - b) / n\n : v === g\n ? 2 + (b - r) / n\n : 4 + (r - g) / n;\n return {\n h: Math.round(60 * (h < 0 ? h + 6 : h)),\n s: Math.round(v && (n / v) * 100),\n b: Math.round(v * 100),\n a,\n };\n}\n\nfunction rgbToHex(r: number, g: number, b: number, a: number = 1) {\n const toHex = (n: number) => n.toString(16).padStart(2, \"0\");\n const alpha = a === 1 ? \"\" : toHex(Math.round(a * 255));\n return `#${toHex(r)}${toHex(g)}${toHex(b)}${alpha}`.toUpperCase();\n}\n\nfunction hexToRgb(hex: string) {\n hex = hex.replace(/^#/, \"\");\n if (hex.length === 3)\n hex = hex\n .split(\"\")\n .map((s) => s + s)\n .join(\"\");\n if (hex.length === 4)\n hex = hex\n .split(\"\")\n .map((s) => s + s)\n .join(\"\");\n\n const r = parseInt(hex.slice(0, 2), 16);\n const g = parseInt(hex.slice(2, 4), 16);\n const b = parseInt(hex.slice(4, 6), 16);\n const a = hex.length === 8 ? parseInt(hex.slice(6, 8), 16) / 255 : 1;\n\n return { r, g, b, a: parseFloat(a.toFixed(2)) };\n}\n\nfunction rgbToHsl(r: number, g: number, b: number, a: number = 1) {\n r /= 255;\n g /= 255;\n b /= 255;\n const max = Math.max(r, g, b),\n min = Math.min(r, g, b);\n let h = 0,\n s = 0,\n l = (max + min) / 2;\n\n if (max !== min) {\n const d = max - min;\n s = l > 0.5 ? d / (2 - max - min) : d / (max + min);\n switch (max) {\n case r:\n h = (g - b) / d + (g < b ? 6 : 0);\n break;\n case g:\n h = (b - r) / d + 2;\n break;\n case b:\n h = (r - g) / d + 4;\n break;\n }\n h /= 6;\n }\n\n return {\n h: Math.round(h * 360),\n s: Math.round(s * 100),\n l: Math.round(l * 100),\n a,\n };\n}\n\nclass ColorValueImpl implements ColorValue {\n private h: number;\n private s: number;\n private b: number;\n private a: number;\n\n constructor(h: number, s: number, b: number, a: number = 1) {\n this.h = h;\n this.s = s;\n this.b = b;\n this.a = a;\n }\n\n getChannelValue(channel: ColorChannel): number {\n switch (channel) {\n case \"hue\":\n return this.h;\n case \"saturation\":\n return this.s;\n case \"brightness\":\n return this.b;\n case \"alpha\":\n return this.a;\n case \"red\":\n return hsbToRgb(this.h, this.s, this.b, this.a).r;\n case \"green\":\n return hsbToRgb(this.h, this.s, this.b, this.a).g;\n case \"blue\":\n return hsbToRgb(this.h, this.s, this.b, this.a).b;\n case \"lightness\":\n return rgbToHsl(\n hsbToRgb(this.h, this.s, this.b, this.a).r,\n hsbToRgb(this.h, this.s, this.b, this.a).g,\n hsbToRgb(this.h, this.s, this.b, this.a).b\n ).l;\n default:\n return 0;\n }\n }\n\n setChannelValue(channel: ColorChannel, value: number): ColorValue {\n if (channel === \"hue\")\n return new ColorValueImpl(value, this.s, this.b, this.a);\n if (channel === \"saturation\")\n return new ColorValueImpl(this.h, value, this.b, this.a);\n if (channel === \"brightness\")\n return new ColorValueImpl(this.h, this.s, value, this.a);\n if (channel === \"alpha\")\n return new ColorValueImpl(this.h, this.s, this.b, value);\n\n // For RGB/HSL channels, convert to RGB, update, then back to HSB\n const rgb = hsbToRgb(this.h, this.s, this.b, this.a);\n if (channel === \"red\") rgb.r = value;\n else if (channel === \"green\") rgb.g = value;\n else if (channel === \"blue\") rgb.b = value;\n\n const hsb = rgbToHsb(rgb.r, rgb.g, rgb.b, rgb.a);\n return new ColorValueImpl(hsb.h, hsb.s, hsb.b, hsb.a);\n }\n\n getChannelRange(channel: ColorChannel) {\n switch (channel) {\n case \"hue\":\n return { minValue: 0, maxValue: 360, step: 1, pageSize: 15 };\n case \"alpha\":\n return { minValue: 0, maxValue: 1, step: 0.01, pageSize: 0.1 };\n case \"red\":\n case \"green\":\n case \"blue\":\n return { minValue: 0, maxValue: 255, step: 1, pageSize: 17 };\n default:\n return { minValue: 0, maxValue: 100, step: 1, pageSize: 10 };\n }\n }\n\n getColorChannels(): ColorChannel[] {\n return [\"red\", \"green\", \"blue\"];\n }\n\n toFormat(format: string): string {\n const rgb = hsbToRgb(this.h, this.s, this.b, this.a);\n if (format === \"hex\" || format === \"hexa\")\n return rgbToHex(rgb.r, rgb.g, rgb.b, this.a);\n if (format === \"rgb\") return `rgb(${rgb.r}, ${rgb.g}, ${rgb.b})`;\n if (format === \"rgba\")\n return `rgba(${rgb.r}, ${rgb.g}, ${rgb.b}, ${this.a})`;\n if (format === \"hsl\") {\n const hsl = rgbToHsl(rgb.r, rgb.g, rgb.b);\n return `hsl(${hsl.h}, ${hsl.s}%, ${hsl.l}%)`;\n }\n if (format === \"hsla\") {\n const hsl = rgbToHsl(rgb.r, rgb.g, rgb.b);\n return `hsla(${hsl.h}, ${hsl.s}%, ${hsl.l}%, ${this.a})`;\n }\n if (format === \"hsb\") return `hsb(${this.h}, ${this.s}%, ${this.b}%)`;\n if (format === \"hsba\")\n return `hsba(${this.h}, ${this.s}%, ${this.b}%, ${this.a})`;\n return rgbToHex(rgb.r, rgb.g, rgb.b, this.a);\n }\n\n toString(format?: string): string {\n return this.toFormat(format || \"hex\");\n }\n\n toHsb() {\n return { h: this.h, s: this.s / 100, b: this.b / 100, a: this.a };\n }\n toRgb() {\n return hsbToRgb(this.h, this.s, this.b, this.a);\n }\n toHsl() {\n const rgb = this.toRgb();\n return rgbToHsl(rgb.r, rgb.g, rgb.b, this.a);\n }\n}\n\nexport function parseColor(color: string): ColorValue {\n if (color.startsWith(\"#\")) {\n const rgb = hexToRgb(color);\n const hsb = rgbToHsb(rgb.r, rgb.g, rgb.b, rgb.a);\n return new ColorValueImpl(hsb.h, hsb.s, hsb.b, hsb.a);\n }\n // Basic support for hsb/rgb/hsl strings if needed, otherwise default to white\n return new ColorValueImpl(0, 0, 100, 1);\n}\n\nexport function createColorFromHsb(\n h: number,\n s: number,\n b: number,\n a: number = 1\n): ColorValue {\n return new ColorValueImpl(h, s, b, a);\n}\n","import { useRef, useEffect, useState, useCallback } from \"react\";\n\nexport function clamp(value: number, min: number, max: number): number {\n return Math.min(Math.max(value, min), max);\n}\n\nexport function snapValueToStep(\n value: number,\n min: number | undefined,\n max: number | undefined,\n step: number\n): number {\n const remainder = (value - (min ?? 0)) % step;\n let snappedValue =\n Math.abs(remainder) * 2 >= step\n ? value + Math.sign(remainder) * (step - Math.abs(remainder))\n : value - remainder;\n\n if (min !== undefined && snappedValue < min) {\n snappedValue = min;\n } else if (max !== undefined && snappedValue > max) {\n snappedValue = max;\n }\n\n return snappedValue;\n}\n\nexport function useMergedRefs<T>(...refs: Array<any>) {\n return useCallback((node: T) => {\n refs.forEach((ref) => {\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref != null) {\n ref.current = node;\n }\n });\n }, refs);\n}\n\nexport function useUpdatableState<T>(\n updater: (prevState: T | undefined) => T,\n deps: any[],\n initialUpdate = false\n): [T, (value: T) => void] {\n const [state, setState] = useState<T>(() => updater(undefined));\n const isFirstRender = useRef(true);\n\n useEffect(() => {\n if (isFirstRender.current && !initialUpdate) {\n isFirstRender.current = false;\n return;\n }\n setState(updater);\n }, deps);\n\n return [state, setState];\n}\n","import React, { useCallback, useEffect, useRef, useState } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, isWeb, isNative } from \"@xsolla/xui-primitives\";\nimport { useResolvedTheme, type ThemeOverrideProps } from \"@xsolla/xui-core\";\nimport { createColorFromHsb, parseColor } from \"./colorUtils\";\nimport { clamp, snapValueToStep } from \"./utils\";\n\ntype ColorPickerSliderProps = {\n channel: \"hue\" | \"alpha\";\n value: string;\n onChange?: (color: string) => void;\n onChangeEnd?: (color: string) => void;\n /** Test ID for testing frameworks */\n testID?: string;\n};\n\nexport const ColorPickerSlider: React.FC<\n ColorPickerSliderProps & ThemeOverrideProps\n> = ({\n channel,\n value,\n onChange,\n onChangeEnd,\n testID,\n themeMode,\n themeProductContext,\n}) => {\n const { theme } = useResolvedTheme({ themeMode, themeProductContext });\n const trackRef = useRef<any>(null);\n const [layout, setLayout] = useState({ width: 0, height: 0 });\n const [isDragging, setIsDragging] = useState(false);\n const currentColor = parseColor(value);\n const hsb = currentColor.toHsb();\n\n const getChannelValue = () => {\n if (channel === \"hue\") return hsb.h;\n return hsb.a * 100;\n };\n\n const getMaxValue = () => (channel === \"hue\" ? 360 : 100);\n\n const channelValue = getChannelValue();\n const maxValue = getMaxValue();\n const thumbPosition = (channelValue / maxValue) * 100;\n\n const updateColor = useCallback(\n (x: number) => {\n const newValue = snapValueToStep(x * maxValue, 0, maxValue, 1);\n let newColor;\n if (channel === \"hue\") {\n newColor = createColorFromHsb(\n newValue,\n hsb.s * 100,\n hsb.b * 100,\n hsb.a\n );\n } else {\n newColor = createColorFromHsb(\n hsb.h,\n hsb.s * 100,\n hsb.b * 100,\n newValue / 100\n );\n }\n onChange?.(newColor.toString());\n return newColor;\n },\n [channel, maxValue, hsb, onChange]\n );\n\n // Web mouse handlers\n const handleMouseDown = useCallback(\n (e: React.MouseEvent<HTMLDivElement>) => {\n if (isNative) return;\n setIsDragging(true);\n const rect = e.currentTarget.getBoundingClientRect();\n const x = clamp((e.clientX - rect.left) / rect.width, 0, 1);\n updateColor(x);\n },\n [updateColor]\n );\n\n const handleMouseMove = useCallback(\n (e: MouseEvent) => {\n if (!isDragging || isNative) return;\n const rect = (trackRef.current as any)?.getBoundingClientRect?.();\n if (!rect) return;\n const x = clamp((e.clientX - rect.left) / rect.width, 0, 1);\n updateColor(x);\n },\n [isDragging, updateColor]\n );\n\n const handleMouseUp = useCallback(() => {\n if (isDragging) {\n setIsDragging(false);\n onChangeEnd?.(currentColor.toString());\n }\n }, [isDragging, currentColor, onChangeEnd]);\n\n useEffect(() => {\n if (isWeb && isDragging) {\n document.addEventListener(\"mousemove\", handleMouseMove);\n document.addEventListener(\"mouseup\", handleMouseUp);\n return () => {\n document.removeEventListener(\"mousemove\", handleMouseMove);\n document.removeEventListener(\"mouseup\", handleMouseUp);\n };\n }\n }, [isDragging, handleMouseMove, handleMouseUp]);\n\n // Native responder handlers\n const handleResponderMove = useCallback(\n (e: any) => {\n const { locationX } = e.nativeEvent;\n const x = clamp(locationX / layout.width, 0, 1);\n updateColor(x);\n },\n [layout, updateColor]\n );\n\n const handleResponderRelease = useCallback(() => {\n setIsDragging(false);\n onChangeEnd?.(currentColor.toString());\n }, [currentColor, onChangeEnd]);\n\n const getGradient = () => {\n if (channel === \"hue\") {\n return \"linear-gradient(to right, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%)\";\n }\n const colorHex = currentColor.toString(\"hex\");\n return `linear-gradient(to right, transparent 0%, ${colorHex} 100%)`;\n };\n\n const thumbColor =\n channel === \"hue\"\n ? createColorFromHsb(channelValue, 100, 100, 1).toString(\"hex\")\n : currentColor.toString(\"hex\");\n\n return (\n <Box\n testID={testID}\n height={12}\n borderRadius={theme.shape.contextMenu.lg.borderRadius}\n position=\"relative\"\n style={\n isWeb\n ? { background: getGradient() }\n : ({ backgroundColor: theme.colors.background.primary } as any)\n }\n onLayout={(e: any) => {\n if (isNative) {\n setLayout(e.nativeEvent.layout);\n }\n }}\n onMouseDown={handleMouseDown}\n onMoveShouldSetResponder={() => isNative}\n onResponderGrant={(e: any) => {\n setIsDragging(true);\n handleResponderMove(e);\n }}\n onResponderMove={handleResponderMove}\n onResponderRelease={handleResponderRelease}\n onResponderTerminate={handleResponderRelease}\n >\n <Box ref={trackRef} width=\"100%\" height=\"100%\" position=\"relative\">\n <Box\n position=\"absolute\"\n width={16}\n height={16}\n borderRadius={theme.shape.contextMenu.lg.borderRadius}\n borderWidth={2}\n borderColor=\"#ffffff\"\n style={\n {\n left: `${thumbPosition}%`,\n top: \"50%\",\n transform: isWeb\n ? \"translate(-50%, -50%)\"\n : ([{ translateX: -8 }, { translateY: -8 }] as any),\n backgroundColor: thumbColor,\n boxShadow: \"0 0 4px rgba(0,0,0,0.3)\",\n } as any\n }\n />\n </Box>\n </Box>\n );\n};\n","import React, { useEffect, useState } from \"react\";\nimport { Input } from \"@xsolla/xui-input\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport type { ColorChannel, ColorValue } from \"./colorUtils\";\n\ntype ColorPickerInputProps = {\n value: ColorValue;\n valueType: \"number\" | \"percentage\";\n channel: ColorChannel;\n onChange: (color: string) => void;\n};\n\nexport const ColorPickerInput: React.FC<ColorPickerInputProps> = ({\n value,\n valueType,\n channel,\n onChange,\n}) => {\n const channelValue = value.getChannelValue(channel);\n const channelRange = value.getChannelRange(channel);\n const intValue = channel === \"alpha\" ? channelValue * 100 : channelValue;\n const roundedValue = Math.round(intValue);\n\n const [inputValue, setInputValue] = useState(String(roundedValue));\n\n useEffect(() => {\n setInputValue(String(roundedValue));\n }, [roundedValue]);\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const text = e.target.value.replace(/[^0-9]/g, \"\");\n setInputValue(text);\n\n const parsedValue = parseInt(text, 10);\n if (!isNaN(parsedValue)) {\n const min = channel === \"alpha\" ? 0 : channelRange.minValue;\n const max = channel === \"alpha\" ? 100 : channelRange.maxValue;\n\n const clampedValue = Math.min(Math.max(parsedValue, min), max);\n const colorValue =\n channel === \"alpha\" ? clampedValue / 100 : clampedValue;\n\n const newColor = value.setChannelValue(channel, colorValue);\n onChange(newColor.toString());\n }\n };\n\n const handleBlur = () => {\n setInputValue(String(roundedValue));\n };\n\n return (\n <Box flex={1} minWidth={40}>\n <Input\n size=\"sm\"\n value={valueType === \"percentage\" ? `${inputValue}%` : inputValue}\n onChange={handleChange}\n onBlur={handleBlur}\n />\n </Box>\n );\n};\n","import React, { useEffect, useState } from \"react\";\nimport { Input } from \"@xsolla/xui-input\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box } from \"@xsolla/xui-primitives\";\nimport { parseColor } from \"./colorUtils\";\n\ntype ColorPickerHexInputProps = {\n value: string;\n onChange: (color: string) => void;\n};\n\nexport const ColorPickerHexInput: React.FC<ColorPickerHexInputProps> = ({\n value,\n onChange,\n}) => {\n const [inputValue, setInputValue] = useState(value);\n\n useEffect(() => {\n setInputValue(value);\n }, [value]);\n\n const handleChange = (e: React.ChangeEvent<HTMLInputElement>) => {\n const newValue = e.target.value;\n setInputValue(newValue);\n\n try {\n const color = parseColor(newValue);\n if (color) {\n onChange(color.toString(\"hex\"));\n }\n } catch {\n // Invalid color\n }\n };\n\n const handleBlur = () => {\n try {\n const color = parseColor(inputValue);\n if (color) {\n onChange(color.toString(\"hex\"));\n } else {\n setInputValue(value);\n }\n } catch {\n setInputValue(value);\n }\n };\n\n return (\n <Box flex={1}>\n <Input\n size=\"sm\"\n value={inputValue}\n onChange={handleChange}\n onBlur={handleBlur}\n />\n </Box>\n );\n};\n","import React from \"react\";\nimport { IconButton } from \"@xsolla/xui-button\";\nimport { parseColor } from \"./colorUtils\";\n\nconst DropletIcon = () => (\n <svg\n viewBox=\"0 0 24 24\"\n width={18}\n height={18}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth=\"2\"\n strokeLinecap=\"round\"\n strokeLinejoin=\"round\"\n >\n <path d=\"M12 22a7 7 0 0 0 7-7c0-2-1-3.9-3-5.5s-3.5-4-4-6.5c-.5 2.5-2 4.9-4 6.5s-3 3.5-3 5.5a7 7 0 0 0 7 7z\" />\n </svg>\n);\n\ndeclare let EyeDropper: {\n new (): {\n open(): Promise<{ sRGBHex: string }>;\n };\n};\n\ntype Props = {\n onColorPick: (color: string) => void;\n};\n\nexport const ColorPickerEyedropper: React.FC<Props> = ({ onColorPick }) => {\n const onEyedropperButtonClick = () => {\n if (typeof EyeDropper !== \"undefined\") {\n new EyeDropper().open().then((result) => {\n const pickedColor = parseColor(result.sRGBHex);\n const hsb = pickedColor.toHsb();\n const hsbString = `hsb(${Math.round(hsb.h)}, ${Math.round(hsb.s * 100)}%, ${Math.round(hsb.b * 100)}%)`;\n onColorPick(hsbString);\n });\n }\n };\n\n if (typeof EyeDropper === \"undefined\") return null;\n\n return (\n <IconButton\n size=\"sm\"\n variant=\"secondary\"\n tone=\"mono\"\n onPress={onEyedropperButtonClick}\n icon={<DropletIcon />}\n aria-label=\"Pick color from screen\"\n />\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAA6C;;;ACC7C,0BAQO;AA2ID;AAxIC,IAAM,MAA0B,CAAC;AAAA,EACtC;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,GAAG;AACL,MAAM;AACJ,QAAM,oBAAoB,CAAC,aAAkC;AAAA,IAC3D,iBACE,WAAW,YAAY,kBACnB,WAAW,kBACX;AAAA,IACN;AAAA,IACA;AAAA,IACA;AAAA,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,SAAQ;AAAA,kBACR,MAAK;AAAA,kBACL,SAAS;AAAA,kBACT,MAAM,6CAAC,aAAU;AAAA,kBACjB,cAAW;AAAA;AAAA,cACb;AAAA,eACF;AAAA,aACF;AAAA,UAEC;AAAA;AAAA;AAAA,IACH;AAAA,EAEJ;AACF;AAEA,YAAY,cAAc;","names":["import_react","import_xui_button","import_xui_core","import_react","import_jsx_runtime","import_react","import_xui_core","import_jsx_runtime","import_react","import_jsx_runtime","import_react","import_xui_input","import_jsx_runtime","import_jsx_runtime","import_jsx_runtime"]}
package/native/index.mjs CHANGED
@@ -187,7 +187,7 @@ var isNative = true;
187
187
  import { Select } from "@xsolla/xui-select";
188
188
  import { IconButton as IconButton2 } from "@xsolla/xui-button";
189
189
  import {
190
- useResolvedTheme as useResolvedTheme2,
190
+ useResolvedTheme as useResolvedTheme3,
191
191
  isNative as isNative2
192
192
  } from "@xsolla/xui-core";
193
193
 
@@ -199,6 +199,7 @@ import {
199
199
  useRef as useRef2,
200
200
  useState as useState2
201
201
  } from "react";
202
+ import { useResolvedTheme } from "@xsolla/xui-core";
202
203
 
203
204
  // src/colorUtils.ts
204
205
  function hsbToRgb(h, s, b, a = 1) {
@@ -440,6 +441,7 @@ var ColorPickerArea = forwardRef(function CustomColorArea(props, ref) {
440
441
  onChangeEnd,
441
442
  className
442
443
  } = props;
444
+ const { theme } = useResolvedTheme();
443
445
  const internalRef = useRef2(null);
444
446
  const containerRef = useMergedRefs(ref, internalRef);
445
447
  const [layout, setLayout] = useState2({ width: 0, height: 0 });
@@ -549,7 +551,7 @@ var ColorPickerArea = forwardRef(function CustomColorArea(props, ref) {
549
551
  "data-testid": "color-picker-color-area",
550
552
  ref: containerRef,
551
553
  className,
552
- borderRadius: 8,
554
+ borderRadius: theme.shape.contextMenu.lg.borderRadius,
553
555
  height: 240,
554
556
  cursor: "pointer",
555
557
  position: "relative",
@@ -575,7 +577,7 @@ var ColorPickerArea = forwardRef(function CustomColorArea(props, ref) {
575
577
  position: "absolute",
576
578
  width: 16,
577
579
  height: 16,
578
- borderRadius: 8,
580
+ borderRadius: theme.shape.contextMenu.lg.borderRadius,
579
581
  borderWidth: 2,
580
582
  borderColor: "#ffffff",
581
583
  style: {
@@ -593,7 +595,7 @@ var ColorPickerArea = forwardRef(function CustomColorArea(props, ref) {
593
595
 
594
596
  // src/ColorPickerSlider.tsx
595
597
  import { useCallback as useCallback3, useEffect as useEffect3, useRef as useRef3, useState as useState3 } from "react";
596
- import { useResolvedTheme } from "@xsolla/xui-core";
598
+ import { useResolvedTheme as useResolvedTheme2 } from "@xsolla/xui-core";
597
599
  import { jsx as jsx3 } from "react/jsx-runtime";
598
600
  var ColorPickerSlider = ({
599
601
  channel,
@@ -604,7 +606,7 @@ var ColorPickerSlider = ({
604
606
  themeMode,
605
607
  themeProductContext
606
608
  }) => {
607
- const { theme } = useResolvedTheme({ themeMode, themeProductContext });
609
+ const { theme } = useResolvedTheme2({ themeMode, themeProductContext });
608
610
  const trackRef = useRef3(null);
609
611
  const [layout, setLayout] = useState3({ width: 0, height: 0 });
610
612
  const [isDragging, setIsDragging] = useState3(false);
@@ -703,7 +705,7 @@ var ColorPickerSlider = ({
703
705
  {
704
706
  testID,
705
707
  height: 12,
706
- borderRadius: 6,
708
+ borderRadius: theme.shape.contextMenu.lg.borderRadius,
707
709
  position: "relative",
708
710
  style: isWeb ? { background: getGradient() } : { backgroundColor: theme.colors.background.primary },
709
711
  onLayout: (e) => {
@@ -726,7 +728,7 @@ var ColorPickerSlider = ({
726
728
  position: "absolute",
727
729
  width: 16,
728
730
  height: 16,
729
- borderRadius: 8,
731
+ borderRadius: theme.shape.contextMenu.lg.borderRadius,
730
732
  borderWidth: 2,
731
733
  borderColor: "#ffffff",
732
734
  style: {
@@ -943,7 +945,7 @@ var ColorPicker = forwardRef2(
943
945
  themeMode,
944
946
  themeProductContext
945
947
  }, ref) => {
946
- const { theme } = useResolvedTheme2({ themeMode, themeProductContext });
948
+ const { theme } = useResolvedTheme3({ themeMode, themeProductContext });
947
949
  const prevColorRef = useRef4(propValue);
948
950
  const [innerValue, setInnerValue] = useUpdatableState(
949
951
  (prevState) => {
@@ -1005,7 +1007,7 @@ var ColorPicker = forwardRef2(
1005
1007
  ref,
1006
1008
  testID,
1007
1009
  backgroundColor: theme.colors.background.secondary,
1008
- borderRadius: 8,
1010
+ borderRadius: theme.shape.contextMenu.lg.borderRadius,
1009
1011
  padding: 16,
1010
1012
  gap: 16,
1011
1013
  width: 312,