@xsolla/xui-select 0.188.2 → 0.188.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xsolla/xui-select",
3
- "version": "0.188.2",
3
+ "version": "0.188.4",
4
4
  "main": "./web/index.js",
5
5
  "module": "./web/index.mjs",
6
6
  "types": "./web/index.d.ts",
@@ -13,10 +13,10 @@
13
13
  "test:coverage": "vitest run --coverage"
14
14
  },
15
15
  "dependencies": {
16
- "@xsolla/xui-core": "0.188.2",
17
- "@xsolla/xui-hooks": "0.188.2",
18
- "@xsolla/xui-icons-base": "0.188.2",
19
- "@xsolla/xui-primitives-core": "0.188.2"
16
+ "@xsolla/xui-core": "0.188.4",
17
+ "@xsolla/xui-hooks": "0.188.4",
18
+ "@xsolla/xui-icons-base": "0.188.4",
19
+ "@xsolla/xui-primitives-core": "0.188.4"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "react": ">=16.8.0",
package/web/index.js CHANGED
@@ -337,11 +337,13 @@ var StyledIcon = (0, import_styled_components3.default)(FilteredDiv2)`
337
337
  height: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
338
338
  color: ${(props) => props.color || "currentColor"};
339
339
 
340
+ /* Icons paint themselves — each icon's own SVG sets its fill/stroke
341
+ (icons-base via inline "fill: currentColor", Lucide via "fill"/"stroke"
342
+ attributes). Do not add fill/stroke here: it re-strokes fill-based icons
343
+ and thickens the glyph. See FEP-877. */
340
344
  svg {
341
345
  width: 100%;
342
346
  height: 100%;
343
- fill: none;
344
- stroke: currentColor;
345
347
  }
346
348
  `;
347
349
  var Icon = ({
@@ -564,7 +566,7 @@ var Select = ({
564
566
  options.find((o) => getOptionValue(o) === selectedValue) || selectedValue
565
567
  ) : placeholder;
566
568
  const textColor = isDisable ? inputColors.textDisable : selectedValue ? inputColors.text : inputColors.placeholder;
567
- const iconColor = isDisable ? inputColors.textDisable : inputColors.text;
569
+ const iconColor = isDisable ? inputColors.textDisable : inputColors.placeholder;
568
570
  const dropdownTop = sizeStyles.height + (label ? sizeStyles.fontSize + sizeStyles.fieldGap : 0) + sizeStyles.fieldGap;
569
571
  const dropdown = isFocus && options.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
570
572
  Box,
@@ -756,32 +758,45 @@ var Select = ({
756
758
  flexDirection: "row",
757
759
  alignItems: "center",
758
760
  justifyContent: iconOnly ? "center" : "flex-start",
759
- gap: iconOnly ? 4 : 12,
761
+ gap: iconOnly ? 4 : sizeStyles.trailingGap,
760
762
  position: "relative",
763
+ style: isWeb ? { cursor: isDisable ? "not-allowed" : "pointer" } : void 0,
761
764
  hoverStyle: !isDisable && !isFocus && !isError ? {
762
765
  backgroundColor: inputColors.bgHover,
763
766
  borderColor: inputColors.borderHover
764
767
  } : void 0,
765
768
  children: [
766
- iconLeft && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { size: sizeStyles.iconSize, color: iconColor, children: iconLeft }) }),
767
- !iconOnly && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
769
+ iconOnly ? iconLeft && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { size: sizeStyles.iconSize, color: iconColor, children: iconLeft }) }) : /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(
768
770
  Box,
769
771
  {
772
+ flexDirection: "row",
773
+ alignItems: "center",
770
774
  flex: 1,
771
- height: "100%",
772
- justifyContent: "center",
773
- overflow: "hidden",
774
- overflowX: "hidden",
775
- children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
776
- Text,
777
- {
778
- color: textColor,
779
- fontSize: sizeStyles.fontSize,
780
- numberOfLines: 1,
781
- style: { whiteSpace: "nowrap" },
782
- children: currentLabel
783
- }
784
- )
775
+ gap: sizeStyles.contentGap,
776
+ style: { minWidth: 0 },
777
+ children: [
778
+ iconLeft && /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Box, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(Icon, { size: sizeStyles.iconSize, color: iconColor, children: iconLeft }) }),
779
+ /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
780
+ Box,
781
+ {
782
+ flex: 1,
783
+ height: "100%",
784
+ justifyContent: "center",
785
+ overflow: "hidden",
786
+ overflowX: "hidden",
787
+ children: /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
788
+ Text,
789
+ {
790
+ color: textColor,
791
+ fontSize: sizeStyles.fontSize,
792
+ numberOfLines: 1,
793
+ style: { whiteSpace: "nowrap" },
794
+ children: currentLabel
795
+ }
796
+ )
797
+ }
798
+ )
799
+ ]
785
800
  }
786
801
  ),
787
802
  /* @__PURE__ */ (0, import_jsx_runtime4.jsxs)(Box, { flexDirection: "row", alignItems: "center", gap: 4, children: [
package/web/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.tsx","../../src/Select.tsx","../../../../foundation/primitives-web/src/Box.tsx","../../../../foundation/primitives-web/src/filterDOMProps.ts","../../../../../node_modules/@emotion/memoize/dist/memoize.esm.js","../../../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js","../../../../foundation/primitives-web/src/Text.tsx","../../../../foundation/primitives-web/src/Icon.tsx","../../../../foundation/primitives-web/src/index.tsx","../../src/Portal.web.tsx"],"sourcesContent":["export * from \"./Select\";\n","import React, { useState, useRef, useEffect, useCallback } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon, isWeb, isNative } from \"@xsolla/xui-primitives\";\nimport {\n useModalId,\n useResolvedTheme,\n useOverlayLayer,\n LAYER_OFFSET,\n type ThemeOverrideProps,\n type ThemeMode,\n type ProductContext,\n} from \"@xsolla/xui-core\";\nimport { useClickOutside } from \"@xsolla/xui-hooks\";\nimport {\n ChevronDown,\n ChevronUp,\n ExclamationMarkCr,\n Remove,\n Search as SearchIcon,\n} from \"@xsolla/xui-icons-base\";\nimport { Portal } from \"./Portal\";\n\nexport interface SelectOption {\n label: string;\n value: any;\n disabled?: boolean;\n}\n\nexport interface SelectProps extends ThemeOverrideProps {\n value?: string;\n placeholder?: string;\n onPress?: () => void;\n size?: \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\";\n state?: \"default\" | \"hover\" | \"focus\" | \"disable\" | \"error\";\n disabled?: boolean;\n label?: string;\n errorMessage?: string;\n iconLeft?: React.ReactNode;\n iconRight?: React.ReactNode;\n filled?: boolean;\n iconOnly?: boolean;\n options?: (string | SelectOption)[];\n onChange?: (value: string) => void;\n searchable?: boolean;\n searchPlaceholder?: string;\n noOptionsMessage?: string;\n /** Show a clear button to reset the selected value (field variant only) */\n clearable?: boolean;\n /** Called when the clear button is pressed */\n onClear?: () => void;\n maxHeight?: number;\n /**\n * Width of the dropdown popover. By default the popover matches the Select\n * trigger's width (`100%` of the field). Pass a number (px) or any CSS width\n * string (e.g. `320`, `\"24rem\"`) to size the popover independently of the\n * trigger — useful when option labels are wider than the field.\n */\n popoverWidth?: number | string;\n fullWidth?: boolean;\n testID?: string;\n /** Theme mode for the dropdown overlay. Defaults to themeMode when not set. */\n overlayThemeMode?: ThemeMode;\n /** Product context for the dropdown overlay. Defaults to themeProductContext when not set. */\n overlayThemeProductContext?: ProductContext;\n /** Preferred side for the dropdown. Default: \"bottom\". */\n side?: \"top\" | \"bottom\";\n /** When true, the dropdown flips to the opposite side when there isn't enough viewport space. Default: false. */\n autoFlip?: boolean;\n}\n\ninterface DropdownPosition {\n left: number;\n top?: number;\n bottom?: number;\n width: number;\n visible: boolean;\n}\n\nexport const Select: React.FC<SelectProps> = ({\n value,\n placeholder = \"Select\",\n onPress,\n size = \"md\",\n state: externalState,\n disabled = false,\n label,\n errorMessage,\n iconLeft,\n iconRight,\n filled = true,\n iconOnly = false,\n options = [],\n onChange,\n searchable = false,\n searchPlaceholder = \"Search\",\n noOptionsMessage = \"No results\",\n clearable = false,\n onClear,\n maxHeight = 300,\n popoverWidth,\n fullWidth = true,\n testID,\n themeMode,\n themeProductContext,\n overlayThemeMode,\n overlayThemeProductContext,\n side = \"bottom\",\n autoFlip = false,\n}) => {\n const { theme: rawTheme } = useResolvedTheme({\n themeMode,\n themeProductContext,\n });\n const theme = rawTheme as any;\n const { theme: rawOverlayTheme } = useResolvedTheme({\n themeMode: overlayThemeMode ?? themeMode,\n themeProductContext: overlayThemeProductContext ?? themeProductContext,\n });\n const overlayTheme = rawOverlayTheme as any;\n const modalId = useModalId();\n const overlayLayer = useOverlayLayer();\n const [isOpen, setIsOpen] = useState(false);\n const [selectedValue, setSelectedValue] = useState<string | undefined>(value);\n const [searchValue, setSearchValue] = useState(\"\");\n const [dropdownPosition, setDropdownPosition] =\n useState<DropdownPosition | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLDivElement>(null);\n const dropdownRef = useRef<HTMLDivElement>(null);\n const selectedItemRef = useRef<HTMLDivElement>(null);\n const searchInputRef = useRef<HTMLInputElement>(null);\n // Stable IDs for ARIA relationships — lazy useState so it's computed once\n const [baseId] = useState(\n () => `xui-select-${Math.random().toString(36).slice(2, 9)}`\n );\n const labelId = `${baseId}-label`;\n const listboxId = `${baseId}-listbox`;\n\n const isDisable = externalState === \"disable\" || disabled;\n const isError = externalState === \"error\" || !!errorMessage;\n const isFocus = externalState === \"focus\" || isOpen;\n\n const sizeStyles = theme.sizing.input(size);\n const inputColors = theme.colors.control.input;\n const overlayInputColors = overlayTheme.colors.control.input;\n\n const updateDropdownPosition = useCallback(() => {\n if (!isWeb || !triggerRef.current || !dropdownRef.current) return;\n\n const triggerRect = triggerRef.current.getBoundingClientRect();\n // Read the actual rendered height — dropdown is in DOM (visibility: hidden) at this point\n const dropH = dropdownRef.current.getBoundingClientRect().height;\n const gap = sizeStyles.fieldGap;\n const viewportHeight = window.innerHeight;\n const spaceBelow = viewportHeight - triggerRect.bottom - gap;\n const spaceAbove = triggerRect.top - gap;\n\n const placeBelow = () =>\n setDropdownPosition({\n left: triggerRect.left,\n top: triggerRect.bottom + gap,\n width: triggerRect.width,\n visible: true,\n });\n\n const placeAbove = () =>\n setDropdownPosition({\n left: triggerRect.left,\n bottom: viewportHeight - triggerRect.top + gap,\n width: triggerRect.width,\n visible: true,\n });\n\n if (!autoFlip) {\n side === \"top\" ? placeAbove() : placeBelow();\n return;\n }\n\n // Auto-flip: prefer the requested side, flip only when there isn't enough room\n if (side === \"top\") {\n spaceAbove >= dropH || spaceAbove >= spaceBelow\n ? placeAbove()\n : placeBelow();\n } else {\n spaceBelow >= dropH || spaceBelow >= spaceAbove\n ? placeBelow()\n : placeAbove();\n }\n }, [sizeStyles.fieldGap, side, autoFlip]);\n\n useEffect(() => {\n if (value !== undefined) setSelectedValue(value);\n }, [value]);\n\n useEffect(() => {\n if (isFocus && selectedItemRef.current && dropdownRef.current) {\n const timeoutId = setTimeout(() => {\n const selectedItem = selectedItemRef.current;\n if (selectedItem && isWeb)\n selectedItem.scrollIntoView({ block: \"nearest\" });\n }, 0);\n return () => clearTimeout(timeoutId);\n }\n }, [isFocus]);\n\n // Keep the portaled dropdown anchored to the trigger (web only)\n // Positioning: runs whenever the dropdown becomes visible (covers both normal open\n // and forced-focus via the state prop). Resize repositions an already-open dropdown.\n useEffect(() => {\n if (!isWeb || !isFocus) return;\n updateDropdownPosition();\n window.addEventListener(\"resize\", updateDropdownPosition);\n return () => window.removeEventListener(\"resize\", updateDropdownPosition);\n }, [isFocus, updateDropdownPosition]);\n\n // Close-on-scroll: only active when the user has explicitly opened the dropdown\n // (isOpen=true), NOT when isFocus is forced via the state prop. This prevents\n // Storybook / forced-focus stories from closing immediately on ambient scroll events.\n // Scrolling inside the dropdown (the options list) is ignored.\n useEffect(() => {\n if (!isWeb || !isOpen) return;\n const closeOnScroll = (e: Event) => {\n if (dropdownRef.current?.contains(e.target as Node)) return;\n setIsOpen(false);\n };\n window.addEventListener(\"scroll\", closeOnScroll, true);\n return () => window.removeEventListener(\"scroll\", closeOnScroll, true);\n }, [isOpen]);\n\n useEffect(() => {\n if (isFocus && searchable) searchInputRef.current?.focus();\n }, [isFocus, searchable]);\n\n useEffect(() => {\n if (!isFocus) setSearchValue(\"\");\n }, [isFocus]);\n\n // Dropdown is portaled outside containerRef, so spare clicks that land in it\n useClickOutside(\n containerRef,\n useCallback((event: MouseEvent) => {\n const dropdownEl = dropdownRef.current;\n if (dropdownEl) {\n const path =\n typeof event.composedPath === \"function\" ? event.composedPath() : [];\n const insideDropdown = path.length\n ? path.includes(dropdownEl)\n : dropdownEl.contains(event.target as Node);\n if (insideDropdown) return;\n }\n setIsOpen(false);\n }, []),\n isWeb && isOpen\n );\n\n const getOptionLabel = (option: string | SelectOption) =>\n typeof option === \"string\" ? option : option.label;\n const getOptionValue = (option: string | SelectOption) =>\n typeof option === \"string\" ? option : option.value;\n const getOptionDisabled = (option: string | SelectOption) =>\n typeof option === \"string\" ? false : option.disabled || false;\n\n const filteredOptions =\n searchable && searchValue\n ? options.filter((option) =>\n getOptionLabel(option)\n .toLowerCase()\n .includes(searchValue.toLowerCase())\n )\n : options;\n\n const handlePress = () => {\n if (!isDisable) {\n if (onPress) onPress();\n setIsOpen(!isOpen);\n }\n };\n\n const handleSelect = (option: string | SelectOption) => {\n if (getOptionDisabled(option)) return;\n const val = getOptionValue(option);\n setSelectedValue(val);\n setIsOpen(false);\n if (onChange) onChange(val);\n };\n\n const handleClear = (e: React.MouseEvent) => {\n e.stopPropagation();\n if (isDisable) return;\n setSelectedValue(undefined);\n if (onChange) onChange(\"\");\n if (onClear) onClear();\n };\n\n const isHover = externalState === \"hover\";\n let backgroundColor = inputColors.bg;\n let borderColor = inputColors.border;\n\n if (isDisable) {\n backgroundColor = inputColors.bgDisable;\n borderColor = inputColors.borderDisable;\n } else if (isFocus) {\n backgroundColor = theme.colors.control.focus.bg;\n borderColor = isError\n ? theme.colors.border.alert\n : theme.colors.border.brand;\n } else if (isError) {\n borderColor = theme.colors.border.alert;\n } else if (isHover) {\n backgroundColor = inputColors.bgHover;\n borderColor = inputColors.borderHover;\n }\n\n if (filled === false && !isFocus && !isError && !isHover) {\n backgroundColor = \"transparent\";\n }\n\n const currentLabel = selectedValue\n ? getOptionLabel(\n options.find((o) => getOptionValue(o) === selectedValue) ||\n selectedValue\n )\n : placeholder;\n\n const textColor = isDisable\n ? inputColors.textDisable\n : selectedValue\n ? inputColors.text\n : inputColors.placeholder;\n const iconColor = isDisable ? inputColors.textDisable : inputColors.text;\n\n const dropdownTop =\n sizeStyles.height +\n (label ? sizeStyles.fontSize + sizeStyles.fieldGap : 0) +\n sizeStyles.fieldGap;\n\n const dropdown = isFocus && options.length > 0 && (\n <Box\n ref={dropdownRef}\n id={listboxId}\n role=\"listbox\"\n aria-label={label || placeholder}\n data-modal-id={modalId}\n position={isNative ? \"absolute\" : undefined}\n top={isNative ? dropdownTop : undefined}\n width={isNative ? (popoverWidth ?? \"100%\") : undefined}\n backgroundColor={overlayTheme.colors.background.secondary}\n borderColor={overlayTheme.colors.border.secondary}\n borderWidth={1}\n borderRadius={overlayTheme.shape.contextMenu[size].borderRadius}\n style={{\n zIndex: overlayLayer + LAYER_OFFSET.popover,\n ...(isNative\n ? { elevation: 4 }\n : {\n position: \"fixed\",\n top:\n dropdownPosition?.top != null\n ? dropdownPosition.top\n : undefined,\n bottom:\n dropdownPosition?.bottom != null\n ? dropdownPosition.bottom\n : undefined,\n left: dropdownPosition?.left,\n width: popoverWidth ?? dropdownPosition?.width,\n boxShadow: \"0 4px 12px rgba(0,0,0,0.1)\",\n visibility: dropdownPosition?.visible ? \"visible\" : \"hidden\",\n }),\n minWidth:\n popoverWidth == null && iconOnly ? sizeStyles.height * 3 : undefined,\n }}\n >\n {/* Search Input - Outside scrollable area (web only) */}\n {searchable && !isNative && (\n <Box\n paddingHorizontal={sizeStyles.paddingHorizontal}\n paddingVertical={sizeStyles.paddingVertical}\n borderBottomWidth={1}\n borderColor={overlayTheme.colors.border.secondary}\n >\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={sizeStyles.paddingHorizontal / 2}\n paddingHorizontal={4}\n >\n <Icon\n size={sizeStyles.iconSize - 2}\n color={overlayInputColors.placeholder}\n >\n <SearchIcon />\n </Icon>\n <Box\n as=\"input\"\n ref={searchInputRef}\n flex={1}\n type=\"text\"\n aria-label={searchPlaceholder}\n value={searchValue}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setSearchValue(e.target.value)\n }\n placeholder={searchPlaceholder}\n style={{\n border: \"none\",\n outline: \"none\",\n background: \"transparent\",\n color: overlayInputColors.text,\n fontSize: sizeStyles.fontSize,\n width: \"100%\",\n }}\n />\n </Box>\n </Box>\n )}\n\n {/* Options List - Scrollable */}\n <Box\n paddingVertical={4}\n overflow=\"scroll\"\n style={{\n maxHeight: searchable ? maxHeight - 60 : maxHeight,\n ...(isWeb ? { overflowY: \"auto\" } : {}),\n }}\n >\n {filteredOptions.length === 0 ? (\n <Box\n paddingVertical={sizeStyles.paddingVertical * 2}\n paddingHorizontal={sizeStyles.paddingHorizontal}\n alignItems=\"center\"\n >\n <Text\n color={overlayTheme.colors.content.tertiary}\n fontSize={sizeStyles.fontSize}\n >\n {noOptionsMessage}\n </Text>\n </Box>\n ) : (\n filteredOptions.map((option, index) => {\n const optionValue = getOptionValue(option);\n const optionLabel = getOptionLabel(option);\n const isOptionDisabled = getOptionDisabled(option);\n const isSelected = optionValue === selectedValue;\n const brandColors = overlayTheme.colors.control.brand.primary;\n const contentColors = overlayTheme.colors.content;\n return (\n <Box\n testID={testID}\n key={index}\n role=\"option\"\n aria-selected={isSelected}\n aria-disabled={isOptionDisabled || undefined}\n ref={isSelected ? selectedItemRef : undefined}\n paddingVertical={sizeStyles.paddingVertical}\n paddingHorizontal={sizeStyles.paddingHorizontal}\n onPress={\n isOptionDisabled ? undefined : () => handleSelect(option)\n }\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n backgroundColor={isSelected ? brandColors.bg : \"transparent\"}\n style={{\n ...(isWeb\n ? {\n cursor: isOptionDisabled ? \"not-allowed\" : \"pointer\",\n }\n : {}),\n opacity: isOptionDisabled ? 0.5 : 1,\n }}\n hoverStyle={\n !isSelected && !isOptionDisabled\n ? { backgroundColor: overlayInputColors.bgHover }\n : undefined\n }\n >\n <Text\n color={\n isSelected\n ? contentColors.on.brand\n : overlayTheme.colors.content.secondary\n }\n fontSize={sizeStyles.fontSize}\n fontWeight=\"400\"\n >\n {optionLabel}\n </Text>\n </Box>\n );\n })\n )}\n </Box>\n </Box>\n );\n\n return (\n <Box\n testID={testID}\n ref={containerRef}\n flexDirection=\"column\"\n gap={sizeStyles.fieldGap}\n width={fullWidth ? \"100%\" : undefined}\n position=\"relative\"\n >\n {label && (\n <Text\n id={labelId}\n color={theme.colors.content.secondary}\n fontSize={sizeStyles.fontSize - 2}\n fontWeight=\"500\"\n >\n {label}\n </Text>\n )}\n <Box\n ref={triggerRef}\n onPress={handlePress}\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-expanded={isFocus && options.length > 0}\n aria-controls={listboxId}\n aria-labelledby={label ? labelId : undefined}\n aria-disabled={isDisable || undefined}\n backgroundColor={backgroundColor}\n borderColor={borderColor}\n borderWidth={borderColor !== \"transparent\" ? 1 : 0}\n borderRadius={sizeStyles.radius}\n height={sizeStyles.height}\n width={iconOnly ? sizeStyles.height : \"100%\"}\n paddingHorizontal={iconOnly ? 0 : sizeStyles.paddingHorizontal}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent={iconOnly ? \"center\" : \"flex-start\"}\n gap={iconOnly ? 4 : 12}\n position=\"relative\"\n hoverStyle={\n !isDisable && !isFocus && !isError\n ? {\n backgroundColor: inputColors.bgHover,\n borderColor: inputColors.borderHover,\n }\n : undefined\n }\n >\n {iconLeft && (\n <Box alignItems=\"center\" justifyContent=\"center\">\n <Icon size={sizeStyles.iconSize} color={iconColor}>\n {iconLeft}\n </Icon>\n </Box>\n )}\n {!iconOnly && (\n <Box\n flex={1}\n height=\"100%\"\n justifyContent=\"center\"\n overflow=\"hidden\"\n overflowX=\"hidden\"\n >\n <Text\n color={textColor}\n fontSize={sizeStyles.fontSize}\n numberOfLines={1}\n style={{ whiteSpace: \"nowrap\" }}\n >\n {currentLabel}\n </Text>\n </Box>\n )}\n <Box flexDirection=\"row\" alignItems=\"center\" gap={4}>\n {/* Clear button (field variant only) */}\n {clearable && !iconOnly && !isDisable && selectedValue && (\n <Box\n onPress={handleClear}\n alignItems=\"center\"\n justifyContent=\"center\"\n style={isWeb ? { cursor: \"pointer\" } : undefined}\n >\n <Remove\n size={sizeStyles.iconSize}\n color={iconColor}\n variant=\"line\"\n />\n </Box>\n )}\n\n {/* Error icon */}\n {isError && (\n <Icon\n size={sizeStyles.iconSize}\n color={theme.colors.content.alert.primary}\n >\n <ExclamationMarkCr />\n </Icon>\n )}\n {iconRight !== undefined ? (\n <Icon size={sizeStyles.iconSize} color={iconColor}>\n {iconRight}\n </Icon>\n ) : isFocus ? (\n <ChevronUp\n size={sizeStyles.iconSize}\n color={iconColor}\n variant=\"line\"\n />\n ) : (\n <ChevronDown\n size={sizeStyles.iconSize}\n color={iconColor}\n variant=\"line\"\n />\n )}\n </Box>\n </Box>\n\n {/* Dropdown Menu */}\n {isNative ? dropdown : <Portal>{dropdown}</Portal>}\n\n {isError && errorMessage && (\n <Text\n color={theme.colors.content.alert.primary}\n fontSize={sizeStyles.fontSize - 2}\n style={{ lineHeight: sizeStyles.lineHeight + \"px\" }}\n >\n {errorMessage}\n </Text>\n )}\n </Box>\n );\n};\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledBox = styled(FilteredDiv)<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 max-width: ${(props) =>\n typeof props.maxWidth === \"number\"\n ? `${props.maxWidth}px`\n : props.maxWidth || \"none\"};\n max-height: ${(props) =>\n typeof props.maxHeight === \"number\"\n ? `${props.maxHeight}px`\n : props.maxHeight || \"none\"};\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 onError,\n onLoad,\n type,\n disabled,\n id,\n testID,\n \"data-testid\": dataTestId,\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 onError={onError}\n onLoad={onLoad}\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 ...props.style,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n elementType={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 data-testid={dataTestId || testID}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport isPropValid from \"@emotion/is-prop-valid\";\n\n// Props that @emotion/is-prop-valid incorrectly treats as valid HTML.\n// These are React Native or component-specific props that match\n// valid HTML patterns (on* event handlers, SVG attributes).\nexport const ADDITIONAL_BLOCKED_PROPS = new Set([\n // RN-only event handlers (pass isPropValid's on* pattern)\n \"onPress\",\n \"onChangeText\",\n \"onLayout\",\n \"onMoveShouldSetResponder\",\n \"onResponderGrant\",\n \"onResponderMove\",\n \"onResponderRelease\",\n \"onResponderTerminate\",\n // SVG attributes that pass isPropValid\n \"strokeWidth\",\n // CSS properties that pass isPropValid but are used as component props\n \"overflow\",\n \"cursor\",\n \"fontSize\",\n \"fontWeight\",\n \"fontFamily\",\n \"textDecoration\",\n]);\n\nfunction shouldForwardProp(key: string): boolean {\n if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;\n return isPropValid(key);\n}\n\n/**\n * Creates a React component that renders the given HTML tag\n * but filters out non-HTML props before they reach the DOM.\n *\n * Uses @emotion/is-prop-valid (same library styled-components v4\n * uses internally) to automatically block invalid HTML attributes,\n * plus a small blocklist for false positives (RN on* handlers, SVG attrs).\n *\n * Usage: `const FilteredDiv = createFilteredElement(\"div\");`\n * Then: `const StyledBox = styled(FilteredDiv)<BoxProps>\\`...\\`;`\n *\n * styled-components can still read ALL props for CSS interpolation,\n * but only valid HTML attributes are forwarded to the DOM element.\n */\nexport function createFilteredElement(defaultTag: string) {\n const Component = React.forwardRef<HTMLElement, Record<string, unknown>>(\n ({ children, elementType, ...props }, ref) => {\n const Tag = (elementType as string) || defaultTag;\n const htmlProps: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n if (shouldForwardProp(key)) {\n htmlProps[key] = props[key];\n }\n }\n return React.createElement(\n Tag,\n { ref, ...htmlProps },\n children as React.ReactNode\n );\n }\n );\n Component.displayName = `Filtered(${defaultTag})`;\n return Component;\n}\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredSpan = createFilteredElement(\"span\");\n\nconst StyledText = styled(FilteredSpan)<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 '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\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 testID,\n \"data-testid\": dataTestId,\n numberOfLines: _numberOfLines,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n data-testid={dataTestId || testID}\n />\n );\n};\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledIcon = styled(FilteredDiv)<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> = ({\n children,\n testID,\n \"data-testid\": dataTestId,\n ...props\n}) => {\n return (\n <StyledIcon data-testid={dataTestId || testID} {...props}>\n {children}\n </StyledIcon>\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 = true;\nexport const isNative = false;\n","import { ReactNode, useEffect, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\n\ninterface PortalProps {\n children: ReactNode;\n}\n\nexport const Portal = ({ children }: PortalProps) => {\n const [mountNode, setMountNode] = useState<HTMLElement | null>(() =>\n typeof document === \"undefined\" ? null : document.body\n );\n\n useEffect(() => setMountNode(document.body), []);\n\n if (!mountNode) return null;\n\n return createPortal(children, mountNode);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAgE;;;ACAhE,IAAAC,gBAAkB;AAClB,+BAAmB;;;ACDnB,mBAAkB;;;ACAlB,SAAS,QAAQ,IAAI;AACnB,MAAI,QAAQ,CAAC;AACb,SAAO,SAAU,KAAK;AACpB,QAAI,MAAM,GAAG,MAAM,OAAW,OAAM,GAAG,IAAI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E,QAAQ,UAAU,IAAI;AAAA,oBAEvC;AAAA,sBAAC;AAAA;AAAA,wBACC,MAAM,WAAW;AAAA,wBACjB,OAAO;AAAA,wBACP,SAAQ;AAAA;AAAA,oBACV;AAAA;AAAA,gBACF;AAAA,gBAID,WACC;AAAA,kBAAC;AAAA;AAAA,oBACC,MAAM,WAAW;AAAA,oBACjB,OAAO,MAAM,OAAO,QAAQ,MAAM;AAAA,oBAElC,uDAAC,2CAAkB;AAAA;AAAA,gBACrB;AAAA,gBAED,cAAc,SACb,6CAAC,QAAK,MAAM,WAAW,UAAU,OAAO,WACrC,qBACH,IACE,UACF;AAAA,kBAAC;AAAA;AAAA,oBACC,MAAM,WAAW;AAAA,oBACjB,OAAO;AAAA,oBACP,SAAQ;AAAA;AAAA,gBACV,IAEA;AAAA,kBAAC;AAAA;AAAA,oBACC,MAAM,WAAW;AAAA,oBACjB,OAAO;AAAA,oBACP,SAAQ;AAAA;AAAA,gBACV;AAAA,iBAEJ;AAAA;AAAA;AAAA,QACF;AAAA,QAGC,WAAW,WAAW,6CAAC,UAAQ,oBAAS;AAAA,QAExC,WAAW,gBACV;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,MAAM,OAAO,QAAQ,MAAM;AAAA,YAClC,UAAU,WAAW,WAAW;AAAA,YAChC,OAAO,EAAE,YAAY,WAAW,aAAa,KAAK;AAAA,YAEjD;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":["import_react","import_react","React","styled","React","import_styled_components","import_jsx_runtime","styled","import_styled_components","import_jsx_runtime","FilteredDiv","styled","import_react","import_jsx_runtime","SearchIcon","index"]}
1
+ {"version":3,"sources":["../../src/index.tsx","../../src/Select.tsx","../../../../foundation/primitives-web/src/Box.tsx","../../../../foundation/primitives-web/src/filterDOMProps.ts","../../../../../node_modules/@emotion/memoize/dist/memoize.esm.js","../../../../../node_modules/@emotion/is-prop-valid/dist/is-prop-valid.esm.js","../../../../foundation/primitives-web/src/Text.tsx","../../../../foundation/primitives-web/src/Icon.tsx","../../../../foundation/primitives-web/src/index.tsx","../../src/Portal.web.tsx"],"sourcesContent":["export * from \"./Select\";\n","import React, { useState, useRef, useEffect, useCallback } from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, Text, Icon, isWeb, isNative } from \"@xsolla/xui-primitives\";\nimport {\n useModalId,\n useResolvedTheme,\n useOverlayLayer,\n LAYER_OFFSET,\n type ThemeOverrideProps,\n type ThemeMode,\n type ProductContext,\n} from \"@xsolla/xui-core\";\nimport { useClickOutside } from \"@xsolla/xui-hooks\";\nimport {\n ChevronDown,\n ChevronUp,\n ExclamationMarkCr,\n Remove,\n Search as SearchIcon,\n} from \"@xsolla/xui-icons-base\";\nimport { Portal } from \"./Portal\";\n\nexport interface SelectOption {\n label: string;\n value: any;\n disabled?: boolean;\n}\n\nexport interface SelectProps extends ThemeOverrideProps {\n value?: string;\n placeholder?: string;\n onPress?: () => void;\n size?: \"xl\" | \"lg\" | \"md\" | \"sm\" | \"xs\";\n state?: \"default\" | \"hover\" | \"focus\" | \"disable\" | \"error\";\n disabled?: boolean;\n label?: string;\n errorMessage?: string;\n iconLeft?: React.ReactNode;\n iconRight?: React.ReactNode;\n filled?: boolean;\n iconOnly?: boolean;\n options?: (string | SelectOption)[];\n onChange?: (value: string) => void;\n searchable?: boolean;\n searchPlaceholder?: string;\n noOptionsMessage?: string;\n /** Show a clear button to reset the selected value (field variant only) */\n clearable?: boolean;\n /** Called when the clear button is pressed */\n onClear?: () => void;\n maxHeight?: number;\n /**\n * Width of the dropdown popover. By default the popover matches the Select\n * trigger's width (`100%` of the field). Pass a number (px) or any CSS width\n * string (e.g. `320`, `\"24rem\"`) to size the popover independently of the\n * trigger — useful when option labels are wider than the field.\n */\n popoverWidth?: number | string;\n fullWidth?: boolean;\n testID?: string;\n /** Theme mode for the dropdown overlay. Defaults to themeMode when not set. */\n overlayThemeMode?: ThemeMode;\n /** Product context for the dropdown overlay. Defaults to themeProductContext when not set. */\n overlayThemeProductContext?: ProductContext;\n /** Preferred side for the dropdown. Default: \"bottom\". */\n side?: \"top\" | \"bottom\";\n /** When true, the dropdown flips to the opposite side when there isn't enough viewport space. Default: false. */\n autoFlip?: boolean;\n}\n\ninterface DropdownPosition {\n left: number;\n top?: number;\n bottom?: number;\n width: number;\n visible: boolean;\n}\n\nexport const Select: React.FC<SelectProps> = ({\n value,\n placeholder = \"Select\",\n onPress,\n size = \"md\",\n state: externalState,\n disabled = false,\n label,\n errorMessage,\n iconLeft,\n iconRight,\n filled = true,\n iconOnly = false,\n options = [],\n onChange,\n searchable = false,\n searchPlaceholder = \"Search\",\n noOptionsMessage = \"No results\",\n clearable = false,\n onClear,\n maxHeight = 300,\n popoverWidth,\n fullWidth = true,\n testID,\n themeMode,\n themeProductContext,\n overlayThemeMode,\n overlayThemeProductContext,\n side = \"bottom\",\n autoFlip = false,\n}) => {\n const { theme: rawTheme } = useResolvedTheme({\n themeMode,\n themeProductContext,\n });\n const theme = rawTheme as any;\n const { theme: rawOverlayTheme } = useResolvedTheme({\n themeMode: overlayThemeMode ?? themeMode,\n themeProductContext: overlayThemeProductContext ?? themeProductContext,\n });\n const overlayTheme = rawOverlayTheme as any;\n const modalId = useModalId();\n const overlayLayer = useOverlayLayer();\n const [isOpen, setIsOpen] = useState(false);\n const [selectedValue, setSelectedValue] = useState<string | undefined>(value);\n const [searchValue, setSearchValue] = useState(\"\");\n const [dropdownPosition, setDropdownPosition] =\n useState<DropdownPosition | null>(null);\n const containerRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLDivElement>(null);\n const dropdownRef = useRef<HTMLDivElement>(null);\n const selectedItemRef = useRef<HTMLDivElement>(null);\n const searchInputRef = useRef<HTMLInputElement>(null);\n // Stable IDs for ARIA relationships — lazy useState so it's computed once\n const [baseId] = useState(\n () => `xui-select-${Math.random().toString(36).slice(2, 9)}`\n );\n const labelId = `${baseId}-label`;\n const listboxId = `${baseId}-listbox`;\n\n const isDisable = externalState === \"disable\" || disabled;\n const isError = externalState === \"error\" || !!errorMessage;\n const isFocus = externalState === \"focus\" || isOpen;\n\n const sizeStyles = theme.sizing.input(size);\n const inputColors = theme.colors.control.input;\n const overlayInputColors = overlayTheme.colors.control.input;\n\n const updateDropdownPosition = useCallback(() => {\n if (!isWeb || !triggerRef.current || !dropdownRef.current) return;\n\n const triggerRect = triggerRef.current.getBoundingClientRect();\n // Read the actual rendered height — dropdown is in DOM (visibility: hidden) at this point\n const dropH = dropdownRef.current.getBoundingClientRect().height;\n const gap = sizeStyles.fieldGap;\n const viewportHeight = window.innerHeight;\n const spaceBelow = viewportHeight - triggerRect.bottom - gap;\n const spaceAbove = triggerRect.top - gap;\n\n const placeBelow = () =>\n setDropdownPosition({\n left: triggerRect.left,\n top: triggerRect.bottom + gap,\n width: triggerRect.width,\n visible: true,\n });\n\n const placeAbove = () =>\n setDropdownPosition({\n left: triggerRect.left,\n bottom: viewportHeight - triggerRect.top + gap,\n width: triggerRect.width,\n visible: true,\n });\n\n if (!autoFlip) {\n side === \"top\" ? placeAbove() : placeBelow();\n return;\n }\n\n // Auto-flip: prefer the requested side, flip only when there isn't enough room\n if (side === \"top\") {\n spaceAbove >= dropH || spaceAbove >= spaceBelow\n ? placeAbove()\n : placeBelow();\n } else {\n spaceBelow >= dropH || spaceBelow >= spaceAbove\n ? placeBelow()\n : placeAbove();\n }\n }, [sizeStyles.fieldGap, side, autoFlip]);\n\n useEffect(() => {\n if (value !== undefined) setSelectedValue(value);\n }, [value]);\n\n useEffect(() => {\n if (isFocus && selectedItemRef.current && dropdownRef.current) {\n const timeoutId = setTimeout(() => {\n const selectedItem = selectedItemRef.current;\n if (selectedItem && isWeb)\n selectedItem.scrollIntoView({ block: \"nearest\" });\n }, 0);\n return () => clearTimeout(timeoutId);\n }\n }, [isFocus]);\n\n // Keep the portaled dropdown anchored to the trigger (web only)\n // Positioning: runs whenever the dropdown becomes visible (covers both normal open\n // and forced-focus via the state prop). Resize repositions an already-open dropdown.\n useEffect(() => {\n if (!isWeb || !isFocus) return;\n updateDropdownPosition();\n window.addEventListener(\"resize\", updateDropdownPosition);\n return () => window.removeEventListener(\"resize\", updateDropdownPosition);\n }, [isFocus, updateDropdownPosition]);\n\n // Close-on-scroll: only active when the user has explicitly opened the dropdown\n // (isOpen=true), NOT when isFocus is forced via the state prop. This prevents\n // Storybook / forced-focus stories from closing immediately on ambient scroll events.\n // Scrolling inside the dropdown (the options list) is ignored.\n useEffect(() => {\n if (!isWeb || !isOpen) return;\n const closeOnScroll = (e: Event) => {\n if (dropdownRef.current?.contains(e.target as Node)) return;\n setIsOpen(false);\n };\n window.addEventListener(\"scroll\", closeOnScroll, true);\n return () => window.removeEventListener(\"scroll\", closeOnScroll, true);\n }, [isOpen]);\n\n useEffect(() => {\n if (isFocus && searchable) searchInputRef.current?.focus();\n }, [isFocus, searchable]);\n\n useEffect(() => {\n if (!isFocus) setSearchValue(\"\");\n }, [isFocus]);\n\n // Dropdown is portaled outside containerRef, so spare clicks that land in it\n useClickOutside(\n containerRef,\n useCallback((event: MouseEvent) => {\n const dropdownEl = dropdownRef.current;\n if (dropdownEl) {\n const path =\n typeof event.composedPath === \"function\" ? event.composedPath() : [];\n const insideDropdown = path.length\n ? path.includes(dropdownEl)\n : dropdownEl.contains(event.target as Node);\n if (insideDropdown) return;\n }\n setIsOpen(false);\n }, []),\n isWeb && isOpen\n );\n\n const getOptionLabel = (option: string | SelectOption) =>\n typeof option === \"string\" ? option : option.label;\n const getOptionValue = (option: string | SelectOption) =>\n typeof option === \"string\" ? option : option.value;\n const getOptionDisabled = (option: string | SelectOption) =>\n typeof option === \"string\" ? false : option.disabled || false;\n\n const filteredOptions =\n searchable && searchValue\n ? options.filter((option) =>\n getOptionLabel(option)\n .toLowerCase()\n .includes(searchValue.toLowerCase())\n )\n : options;\n\n const handlePress = () => {\n if (!isDisable) {\n if (onPress) onPress();\n setIsOpen(!isOpen);\n }\n };\n\n const handleSelect = (option: string | SelectOption) => {\n if (getOptionDisabled(option)) return;\n const val = getOptionValue(option);\n setSelectedValue(val);\n setIsOpen(false);\n if (onChange) onChange(val);\n };\n\n const handleClear = (e: React.MouseEvent) => {\n e.stopPropagation();\n if (isDisable) return;\n setSelectedValue(undefined);\n if (onChange) onChange(\"\");\n if (onClear) onClear();\n };\n\n const isHover = externalState === \"hover\";\n let backgroundColor = inputColors.bg;\n let borderColor = inputColors.border;\n\n if (isDisable) {\n backgroundColor = inputColors.bgDisable;\n borderColor = inputColors.borderDisable;\n } else if (isFocus) {\n backgroundColor = theme.colors.control.focus.bg;\n borderColor = isError\n ? theme.colors.border.alert\n : theme.colors.border.brand;\n } else if (isError) {\n borderColor = theme.colors.border.alert;\n } else if (isHover) {\n backgroundColor = inputColors.bgHover;\n borderColor = inputColors.borderHover;\n }\n\n if (filled === false && !isFocus && !isError && !isHover) {\n backgroundColor = \"transparent\";\n }\n\n const currentLabel = selectedValue\n ? getOptionLabel(\n options.find((o) => getOptionValue(o) === selectedValue) ||\n selectedValue\n )\n : placeholder;\n\n const textColor = isDisable\n ? inputColors.textDisable\n : selectedValue\n ? inputColors.text\n : inputColors.placeholder;\n const iconColor = isDisable\n ? inputColors.textDisable\n : inputColors.placeholder;\n\n const dropdownTop =\n sizeStyles.height +\n (label ? sizeStyles.fontSize + sizeStyles.fieldGap : 0) +\n sizeStyles.fieldGap;\n\n const dropdown = isFocus && options.length > 0 && (\n <Box\n ref={dropdownRef}\n id={listboxId}\n role=\"listbox\"\n aria-label={label || placeholder}\n data-modal-id={modalId}\n position={isNative ? \"absolute\" : undefined}\n top={isNative ? dropdownTop : undefined}\n width={isNative ? (popoverWidth ?? \"100%\") : undefined}\n backgroundColor={overlayTheme.colors.background.secondary}\n borderColor={overlayTheme.colors.border.secondary}\n borderWidth={1}\n borderRadius={overlayTheme.shape.contextMenu[size].borderRadius}\n style={{\n zIndex: overlayLayer + LAYER_OFFSET.popover,\n ...(isNative\n ? { elevation: 4 }\n : {\n position: \"fixed\",\n top:\n dropdownPosition?.top != null\n ? dropdownPosition.top\n : undefined,\n bottom:\n dropdownPosition?.bottom != null\n ? dropdownPosition.bottom\n : undefined,\n left: dropdownPosition?.left,\n width: popoverWidth ?? dropdownPosition?.width,\n boxShadow: \"0 4px 12px rgba(0,0,0,0.1)\",\n visibility: dropdownPosition?.visible ? \"visible\" : \"hidden\",\n }),\n minWidth:\n popoverWidth == null && iconOnly ? sizeStyles.height * 3 : undefined,\n }}\n >\n {/* Search Input - Outside scrollable area (web only) */}\n {searchable && !isNative && (\n <Box\n paddingHorizontal={sizeStyles.paddingHorizontal}\n paddingVertical={sizeStyles.paddingVertical}\n borderBottomWidth={1}\n borderColor={overlayTheme.colors.border.secondary}\n >\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n gap={sizeStyles.paddingHorizontal / 2}\n paddingHorizontal={4}\n >\n <Icon\n size={sizeStyles.iconSize - 2}\n color={overlayInputColors.placeholder}\n >\n <SearchIcon />\n </Icon>\n <Box\n as=\"input\"\n ref={searchInputRef}\n flex={1}\n type=\"text\"\n aria-label={searchPlaceholder}\n value={searchValue}\n onChange={(e: React.ChangeEvent<HTMLInputElement>) =>\n setSearchValue(e.target.value)\n }\n placeholder={searchPlaceholder}\n style={{\n border: \"none\",\n outline: \"none\",\n background: \"transparent\",\n color: overlayInputColors.text,\n fontSize: sizeStyles.fontSize,\n width: \"100%\",\n }}\n />\n </Box>\n </Box>\n )}\n\n {/* Options List - Scrollable */}\n <Box\n paddingVertical={4}\n overflow=\"scroll\"\n style={{\n maxHeight: searchable ? maxHeight - 60 : maxHeight,\n ...(isWeb ? { overflowY: \"auto\" } : {}),\n }}\n >\n {filteredOptions.length === 0 ? (\n <Box\n paddingVertical={sizeStyles.paddingVertical * 2}\n paddingHorizontal={sizeStyles.paddingHorizontal}\n alignItems=\"center\"\n >\n <Text\n color={overlayTheme.colors.content.tertiary}\n fontSize={sizeStyles.fontSize}\n >\n {noOptionsMessage}\n </Text>\n </Box>\n ) : (\n filteredOptions.map((option, index) => {\n const optionValue = getOptionValue(option);\n const optionLabel = getOptionLabel(option);\n const isOptionDisabled = getOptionDisabled(option);\n const isSelected = optionValue === selectedValue;\n const brandColors = overlayTheme.colors.control.brand.primary;\n const contentColors = overlayTheme.colors.content;\n return (\n <Box\n testID={testID}\n key={index}\n role=\"option\"\n aria-selected={isSelected}\n aria-disabled={isOptionDisabled || undefined}\n ref={isSelected ? selectedItemRef : undefined}\n paddingVertical={sizeStyles.paddingVertical}\n paddingHorizontal={sizeStyles.paddingHorizontal}\n onPress={\n isOptionDisabled ? undefined : () => handleSelect(option)\n }\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent=\"space-between\"\n backgroundColor={isSelected ? brandColors.bg : \"transparent\"}\n style={{\n ...(isWeb\n ? {\n cursor: isOptionDisabled ? \"not-allowed\" : \"pointer\",\n }\n : {}),\n opacity: isOptionDisabled ? 0.5 : 1,\n }}\n hoverStyle={\n !isSelected && !isOptionDisabled\n ? { backgroundColor: overlayInputColors.bgHover }\n : undefined\n }\n >\n <Text\n color={\n isSelected\n ? contentColors.on.brand\n : overlayTheme.colors.content.secondary\n }\n fontSize={sizeStyles.fontSize}\n fontWeight=\"400\"\n >\n {optionLabel}\n </Text>\n </Box>\n );\n })\n )}\n </Box>\n </Box>\n );\n\n return (\n <Box\n testID={testID}\n ref={containerRef}\n flexDirection=\"column\"\n gap={sizeStyles.fieldGap}\n width={fullWidth ? \"100%\" : undefined}\n position=\"relative\"\n >\n {label && (\n <Text\n id={labelId}\n color={theme.colors.content.secondary}\n fontSize={sizeStyles.fontSize - 2}\n fontWeight=\"500\"\n >\n {label}\n </Text>\n )}\n <Box\n ref={triggerRef}\n onPress={handlePress}\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-expanded={isFocus && options.length > 0}\n aria-controls={listboxId}\n aria-labelledby={label ? labelId : undefined}\n aria-disabled={isDisable || undefined}\n backgroundColor={backgroundColor}\n borderColor={borderColor}\n borderWidth={borderColor !== \"transparent\" ? 1 : 0}\n borderRadius={sizeStyles.radius}\n height={sizeStyles.height}\n width={iconOnly ? sizeStyles.height : \"100%\"}\n paddingHorizontal={iconOnly ? 0 : sizeStyles.paddingHorizontal}\n flexDirection=\"row\"\n alignItems=\"center\"\n justifyContent={iconOnly ? \"center\" : \"flex-start\"}\n gap={iconOnly ? 4 : sizeStyles.trailingGap}\n position=\"relative\"\n style={\n isWeb ? { cursor: isDisable ? \"not-allowed\" : \"pointer\" } : undefined\n }\n hoverStyle={\n !isDisable && !isFocus && !isError\n ? {\n backgroundColor: inputColors.bgHover,\n borderColor: inputColors.borderHover,\n }\n : undefined\n }\n >\n {iconOnly ? (\n iconLeft && (\n <Box alignItems=\"center\" justifyContent=\"center\">\n <Icon size={sizeStyles.iconSize} color={iconColor}>\n {iconLeft}\n </Icon>\n </Box>\n )\n ) : (\n <Box\n flexDirection=\"row\"\n alignItems=\"center\"\n flex={1}\n gap={sizeStyles.contentGap}\n style={{ minWidth: 0 }}\n >\n {iconLeft && (\n <Box alignItems=\"center\" justifyContent=\"center\">\n <Icon size={sizeStyles.iconSize} color={iconColor}>\n {iconLeft}\n </Icon>\n </Box>\n )}\n <Box\n flex={1}\n height=\"100%\"\n justifyContent=\"center\"\n overflow=\"hidden\"\n overflowX=\"hidden\"\n >\n <Text\n color={textColor}\n fontSize={sizeStyles.fontSize}\n numberOfLines={1}\n style={{ whiteSpace: \"nowrap\" }}\n >\n {currentLabel}\n </Text>\n </Box>\n </Box>\n )}\n <Box flexDirection=\"row\" alignItems=\"center\" gap={4}>\n {/* Clear button (field variant only) */}\n {clearable && !iconOnly && !isDisable && selectedValue && (\n <Box\n onPress={handleClear}\n alignItems=\"center\"\n justifyContent=\"center\"\n style={isWeb ? { cursor: \"pointer\" } : undefined}\n >\n <Remove\n size={sizeStyles.iconSize}\n color={iconColor}\n variant=\"line\"\n />\n </Box>\n )}\n\n {/* Error icon */}\n {isError && (\n <Icon\n size={sizeStyles.iconSize}\n color={theme.colors.content.alert.primary}\n >\n <ExclamationMarkCr />\n </Icon>\n )}\n {iconRight !== undefined ? (\n <Icon size={sizeStyles.iconSize} color={iconColor}>\n {iconRight}\n </Icon>\n ) : isFocus ? (\n <ChevronUp\n size={sizeStyles.iconSize}\n color={iconColor}\n variant=\"line\"\n />\n ) : (\n <ChevronDown\n size={sizeStyles.iconSize}\n color={iconColor}\n variant=\"line\"\n />\n )}\n </Box>\n </Box>\n\n {/* Dropdown Menu */}\n {isNative ? dropdown : <Portal>{dropdown}</Portal>}\n\n {isError && errorMessage && (\n <Text\n color={theme.colors.content.alert.primary}\n fontSize={sizeStyles.fontSize - 2}\n style={{ lineHeight: sizeStyles.lineHeight + \"px\" }}\n >\n {errorMessage}\n </Text>\n )}\n </Box>\n );\n};\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport type { BoxProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledBox = styled(FilteredDiv)<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 max-width: ${(props) =>\n typeof props.maxWidth === \"number\"\n ? `${props.maxWidth}px`\n : props.maxWidth || \"none\"};\n max-height: ${(props) =>\n typeof props.maxHeight === \"number\"\n ? `${props.maxHeight}px`\n : props.maxHeight || \"none\"};\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 onError,\n onLoad,\n type,\n disabled,\n id,\n testID,\n \"data-testid\": dataTestId,\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 onError={onError}\n onLoad={onLoad}\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 ...props.style,\n }}\n />\n );\n }\n\n return (\n <StyledBox\n ref={ref}\n elementType={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 data-testid={dataTestId || testID}\n {...props}\n >\n {children}\n </StyledBox>\n );\n }\n);\n\nBox.displayName = \"Box\";\n","import React from \"react\";\nimport isPropValid from \"@emotion/is-prop-valid\";\n\n// Props that @emotion/is-prop-valid incorrectly treats as valid HTML.\n// These are React Native or component-specific props that match\n// valid HTML patterns (on* event handlers, SVG attributes).\nexport const ADDITIONAL_BLOCKED_PROPS = new Set([\n // RN-only event handlers (pass isPropValid's on* pattern)\n \"onPress\",\n \"onChangeText\",\n \"onLayout\",\n \"onMoveShouldSetResponder\",\n \"onResponderGrant\",\n \"onResponderMove\",\n \"onResponderRelease\",\n \"onResponderTerminate\",\n // SVG attributes that pass isPropValid\n \"strokeWidth\",\n // CSS properties that pass isPropValid but are used as component props\n \"overflow\",\n \"cursor\",\n \"fontSize\",\n \"fontWeight\",\n \"fontFamily\",\n \"textDecoration\",\n]);\n\nfunction shouldForwardProp(key: string): boolean {\n if (ADDITIONAL_BLOCKED_PROPS.has(key)) return false;\n return isPropValid(key);\n}\n\n/**\n * Creates a React component that renders the given HTML tag\n * but filters out non-HTML props before they reach the DOM.\n *\n * Uses @emotion/is-prop-valid (same library styled-components v4\n * uses internally) to automatically block invalid HTML attributes,\n * plus a small blocklist for false positives (RN on* handlers, SVG attrs).\n *\n * Usage: `const FilteredDiv = createFilteredElement(\"div\");`\n * Then: `const StyledBox = styled(FilteredDiv)<BoxProps>\\`...\\`;`\n *\n * styled-components can still read ALL props for CSS interpolation,\n * but only valid HTML attributes are forwarded to the DOM element.\n */\nexport function createFilteredElement(defaultTag: string) {\n const Component = React.forwardRef<HTMLElement, Record<string, unknown>>(\n ({ children, elementType, ...props }, ref) => {\n const Tag = (elementType as string) || defaultTag;\n const htmlProps: Record<string, unknown> = {};\n for (const key of Object.keys(props)) {\n if (shouldForwardProp(key)) {\n htmlProps[key] = props[key];\n }\n }\n return React.createElement(\n Tag,\n { ref, ...htmlProps },\n children as React.ReactNode\n );\n }\n );\n Component.displayName = `Filtered(${defaultTag})`;\n return Component;\n}\n","function memoize(fn) {\n var cache = {};\n return function (arg) {\n if (cache[arg] === undefined) cache[arg] = fn(arg);\n return cache[arg];\n };\n}\n\nexport default memoize;\n","import memoize from '@emotion/memoize';\n\nvar reactPropsRegex = /^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|inert|itemProp|itemScope|itemType|itemID|itemRef|on|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/; // https://esbench.com/bench/5bfee68a4cd7e6009ef61d23\n\nvar index = memoize(function (prop) {\n return reactPropsRegex.test(prop) || prop.charCodeAt(0) === 111\n /* o */\n && prop.charCodeAt(1) === 110\n /* n */\n && prop.charCodeAt(2) < 91;\n}\n/* Z+1 */\n);\n\nexport default index;\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { TextProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredSpan = createFilteredElement(\"span\");\n\nconst StyledText = styled(FilteredSpan)<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 '\"Aktiv Grotesk\", -apple-system, BlinkMacSystemFont, \"Segoe UI\", Roboto, Helvetica, Arial, sans-serif'};\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 testID,\n \"data-testid\": dataTestId,\n numberOfLines: _numberOfLines,\n ...props\n}) => {\n return (\n <StyledText\n {...props}\n style={style}\n className={className}\n id={id}\n role={role}\n data-testid={dataTestId || testID}\n />\n );\n};\n","import React from \"react\";\nimport styled from \"styled-components\";\nimport { IconProps } from \"@xsolla/xui-primitives-core\";\nimport { createFilteredElement } from \"./filterDOMProps\";\n\nconst FilteredDiv = createFilteredElement(\"div\");\n\nconst StyledIcon = styled(FilteredDiv)<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 /* Icons paint themselves — each icon's own SVG sets its fill/stroke\n (icons-base via inline \"fill: currentColor\", Lucide via \"fill\"/\"stroke\"\n attributes). Do not add fill/stroke here: it re-strokes fill-based icons\n and thickens the glyph. See FEP-877. */\n svg {\n width: 100%;\n height: 100%;\n }\n`;\n\nexport const Icon: React.FC<IconProps> = ({\n children,\n testID,\n \"data-testid\": dataTestId,\n ...props\n}) => {\n return (\n <StyledIcon data-testid={dataTestId || testID} {...props}>\n {children}\n </StyledIcon>\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 = true;\nexport const isNative = false;\n","import { ReactNode, useEffect, useState } from \"react\";\nimport { createPortal } from \"react-dom\";\n\ninterface PortalProps {\n children: ReactNode;\n}\n\nexport const Portal = ({ children }: PortalProps) => {\n const [mountNode, setMountNode] = useState<HTMLElement | null>(() =>\n typeof document === \"undefined\" ? null : document.body\n );\n\n useEffect(() => setMountNode(document.body), []);\n\n if (!mountNode) return null;\n\n return createPortal(children, mountNode);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,IAAAA,gBAAgE;;;ACAhE,IAAAC,gBAAkB;AAClB,+BAAmB;;;ACDnB,mBAAkB;;;ACAlB,SAAS,QAAQ,IAAI;AACnB,MAAI,QAAQ,CAAC;AACb,SAAO,SAAU,KAAK;AACpB,QAAI,MAAM,GAAG,MAAM,OAAW,OAAM,GAAG,IAAI,GAAG,GAAG;AACjD,WAAO,MAAM,GAAG;AAAA,EAClB;AACF;AAEA,IAAO,sBAAQ;;;ACNf,IAAI,kBAAkB;AAEtB,IAAI,QAAQ;AAAA,EAAQ,SAAU,MAAM;AAClC,WAAO,gBAAgB,KAAK,IAAI,KAAK,KAAK,WAAW,CAAC,MAAM,OAEzD,KAAK,WAAW,CAAC,MAAM,OAEvB,KAAK,WAAW,CAAC,IAAI;AAAA,EAC1B;AAAA;AAEA;AAEA,IAAO,4BAAQ;;;AFRR,IAAM,2BAA2B,oBAAI,IAAI;AAAA;AAAA,EAE9C;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA;AAAA,EAEA;AAAA;AAAA,EAEA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,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A,gBAID,WACC;AAAA,kBAAC;AAAA;AAAA,oBACC,MAAM,WAAW;AAAA,oBACjB,OAAO,MAAM,OAAO,QAAQ,MAAM;AAAA,oBAElC,uDAAC,2CAAkB;AAAA;AAAA,gBACrB;AAAA,gBAED,cAAc,SACb,6CAAC,QAAK,MAAM,WAAW,UAAU,OAAO,WACrC,qBACH,IACE,UACF;AAAA,kBAAC;AAAA;AAAA,oBACC,MAAM,WAAW;AAAA,oBACjB,OAAO;AAAA,oBACP,SAAQ;AAAA;AAAA,gBACV,IAEA;AAAA,kBAAC;AAAA;AAAA,oBACC,MAAM,WAAW;AAAA,oBACjB,OAAO;AAAA,oBACP,SAAQ;AAAA;AAAA,gBACV;AAAA,iBAEJ;AAAA;AAAA;AAAA,QACF;AAAA,QAGC,WAAW,WAAW,6CAAC,UAAQ,oBAAS;AAAA,QAExC,WAAW,gBACV;AAAA,UAAC;AAAA;AAAA,YACC,OAAO,MAAM,OAAO,QAAQ,MAAM;AAAA,YAClC,UAAU,WAAW,WAAW;AAAA,YAChC,OAAO,EAAE,YAAY,WAAW,aAAa,KAAK;AAAA,YAEjD;AAAA;AAAA,QACH;AAAA;AAAA;AAAA,EAEJ;AAEJ;","names":["import_react","import_react","React","styled","React","import_styled_components","import_jsx_runtime","styled","import_styled_components","import_jsx_runtime","FilteredDiv","styled","import_react","import_jsx_runtime","SearchIcon","index"]}
package/web/index.mjs CHANGED
@@ -301,11 +301,13 @@ var StyledIcon = styled3(FilteredDiv2)`
301
301
  height: ${(props) => typeof props.size === "number" ? `${props.size}px` : props.size || "24px"};
302
302
  color: ${(props) => props.color || "currentColor"};
303
303
 
304
+ /* Icons paint themselves — each icon's own SVG sets its fill/stroke
305
+ (icons-base via inline "fill: currentColor", Lucide via "fill"/"stroke"
306
+ attributes). Do not add fill/stroke here: it re-strokes fill-based icons
307
+ and thickens the glyph. See FEP-877. */
304
308
  svg {
305
309
  width: 100%;
306
310
  height: 100%;
307
- fill: none;
308
- stroke: currentColor;
309
311
  }
310
312
  `;
311
313
  var Icon = ({
@@ -539,7 +541,7 @@ var Select = ({
539
541
  options.find((o) => getOptionValue(o) === selectedValue) || selectedValue
540
542
  ) : placeholder;
541
543
  const textColor = isDisable ? inputColors.textDisable : selectedValue ? inputColors.text : inputColors.placeholder;
542
- const iconColor = isDisable ? inputColors.textDisable : inputColors.text;
544
+ const iconColor = isDisable ? inputColors.textDisable : inputColors.placeholder;
543
545
  const dropdownTop = sizeStyles.height + (label ? sizeStyles.fontSize + sizeStyles.fieldGap : 0) + sizeStyles.fieldGap;
544
546
  const dropdown = isFocus && options.length > 0 && /* @__PURE__ */ jsxs(
545
547
  Box,
@@ -731,32 +733,45 @@ var Select = ({
731
733
  flexDirection: "row",
732
734
  alignItems: "center",
733
735
  justifyContent: iconOnly ? "center" : "flex-start",
734
- gap: iconOnly ? 4 : 12,
736
+ gap: iconOnly ? 4 : sizeStyles.trailingGap,
735
737
  position: "relative",
738
+ style: isWeb ? { cursor: isDisable ? "not-allowed" : "pointer" } : void 0,
736
739
  hoverStyle: !isDisable && !isFocus && !isError ? {
737
740
  backgroundColor: inputColors.bgHover,
738
741
  borderColor: inputColors.borderHover
739
742
  } : void 0,
740
743
  children: [
741
- iconLeft && /* @__PURE__ */ jsx4(Box, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx4(Icon, { size: sizeStyles.iconSize, color: iconColor, children: iconLeft }) }),
742
- !iconOnly && /* @__PURE__ */ jsx4(
744
+ iconOnly ? iconLeft && /* @__PURE__ */ jsx4(Box, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx4(Icon, { size: sizeStyles.iconSize, color: iconColor, children: iconLeft }) }) : /* @__PURE__ */ jsxs(
743
745
  Box,
744
746
  {
747
+ flexDirection: "row",
748
+ alignItems: "center",
745
749
  flex: 1,
746
- height: "100%",
747
- justifyContent: "center",
748
- overflow: "hidden",
749
- overflowX: "hidden",
750
- children: /* @__PURE__ */ jsx4(
751
- Text,
752
- {
753
- color: textColor,
754
- fontSize: sizeStyles.fontSize,
755
- numberOfLines: 1,
756
- style: { whiteSpace: "nowrap" },
757
- children: currentLabel
758
- }
759
- )
750
+ gap: sizeStyles.contentGap,
751
+ style: { minWidth: 0 },
752
+ children: [
753
+ iconLeft && /* @__PURE__ */ jsx4(Box, { alignItems: "center", justifyContent: "center", children: /* @__PURE__ */ jsx4(Icon, { size: sizeStyles.iconSize, color: iconColor, children: iconLeft }) }),
754
+ /* @__PURE__ */ jsx4(
755
+ Box,
756
+ {
757
+ flex: 1,
758
+ height: "100%",
759
+ justifyContent: "center",
760
+ overflow: "hidden",
761
+ overflowX: "hidden",
762
+ children: /* @__PURE__ */ jsx4(
763
+ Text,
764
+ {
765
+ color: textColor,
766
+ fontSize: sizeStyles.fontSize,
767
+ numberOfLines: 1,
768
+ style: { whiteSpace: "nowrap" },
769
+ children: currentLabel
770
+ }
771
+ )
772
+ }
773
+ )
774
+ ]
760
775
  }
761
776
  ),
762
777
  /* @__PURE__ */ jsxs(Box, { flexDirection: "row", alignItems: "center", gap: 4, children: [