@xsolla/xui-date-picker 0.183.0 → 0.185.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/web/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.tsx","../../src/DatePicker.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/index.tsx","../../src/utils.ts"],"sourcesContent":["export {\n Calendar,\n DualCalendar,\n CalendarHeader,\n CalendarGrid,\n CalendarChips,\n} from \"@xsolla/xui-calendar\";\nexport type {\n CalendarProps,\n DualCalendarProps,\n CalendarChipOption,\n CalendarChipsProps,\n CalendarGridProps,\n CalendarHeaderProps,\n CalendarLocaleType,\n} from \"@xsolla/xui-calendar\";\nexport * from \"./DatePicker\";\nexport * from \"./types\";\nexport * from \"./utils\";\n","import { forwardRef, 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 { Input } from \"@xsolla/xui-input\";\nimport { format } from \"date-fns\";\nimport { Calendar, DualCalendar } from \"@xsolla/xui-calendar\";\nimport type { DatePickerProps, DateRangeType } from \"./types\";\n\nexport const DatePicker = forwardRef<any, DatePickerProps>(\n (\n {\n onChange,\n size = \"md\",\n locale = \"enUS\",\n variant = \"single\",\n selectsRange = false,\n startDate,\n endDate,\n selectedDate,\n placeholder,\n backgroundColor,\n testID,\n chips,\n activeChip,\n onChipSelect,\n dropdownPosition = \"left\",\n themeMode,\n themeProductContext,\n overlayThemeMode,\n overlayThemeProductContext,\n ...rest\n },\n ref\n ) => {\n const isDual = variant === \"dual\";\n const isRange = isDual || selectsRange;\n const [open, setOpen] = useState(false);\n const [inputValue, setInputValue] = useState(\"\");\n const [internalChip, setInternalChip] = useState<string | null>(null);\n const containerRef = useRef<any>(null);\n const chipSelectionRef = useRef(false);\n\n const activeChipValue = activeChip !== undefined ? activeChip : internalChip;\n\n const formatDateForDisplay = (date: Date | null | undefined): string => {\n if (!date) return \"\";\n try {\n return format(date, \"MM/dd/yyyy\");\n } catch {\n return \"\";\n }\n };\n\n const getDisplayValue = useCallback((): string => {\n if (activeChipValue && chips) {\n const chip = chips.find((c) => c.value === activeChipValue);\n if (chip) return chip.label;\n }\n if (isRange) {\n if (startDate && endDate) {\n return `${formatDateForDisplay(startDate)} - ${formatDateForDisplay(endDate)}`;\n } else if (startDate) {\n return formatDateForDisplay(startDate);\n }\n return \"\";\n } else {\n return formatDateForDisplay(selectedDate);\n }\n }, [isRange, startDate, endDate, selectedDate, activeChipValue, chips]);\n\n useEffect(() => {\n setInputValue(getDisplayValue());\n }, [getDisplayValue]);\n\n const handleInputChange = (text: string) => {\n setInputValue(text);\n };\n\n const handleChipSelect = (value: string | null) => {\n chipSelectionRef.current = true;\n setInternalChip(value);\n onChipSelect?.(value);\n };\n\n const handleDateChange = (date: Date | [Date | null, Date | null]) => {\n if (!chipSelectionRef.current) {\n setInternalChip(null);\n onChipSelect?.(null);\n }\n chipSelectionRef.current = false;\n if (!isRange) {\n onChange?.(date as Date);\n setOpen(false);\n } else {\n const range = date as DateRangeType;\n onChange?.(range);\n if (range[0] && range[1]) setOpen(false);\n }\n };\n\n useEffect(() => {\n if (isNative) return;\n const handleClickOutside = (event: MouseEvent) => {\n if (containerRef.current && !containerRef.current.contains(event.target as Node)) {\n setOpen(false);\n }\n };\n document.addEventListener(\"mousedown\", handleClickOutside);\n return () => document.removeEventListener(\"mousedown\", handleClickOutside);\n }, []);\n\n const overlayThemeProps = {\n themeMode: overlayThemeMode ?? themeMode,\n themeProductContext: overlayThemeProductContext ?? themeProductContext,\n };\n\n const renderCalendar = () =>\n isDual ? (\n <DualCalendar\n locale={locale}\n startDate={startDate}\n endDate={endDate}\n onChange={handleDateChange}\n chips={chips}\n activeChip={activeChipValue}\n onChipSelect={handleChipSelect}\n {...rest}\n {...overlayThemeProps}\n />\n ) : (\n <Calendar\n locale={locale}\n startDate={startDate}\n endDate={endDate}\n selectedDate={selectedDate}\n onChange={handleDateChange}\n selectsRange={selectsRange}\n chips={chips}\n activeChip={activeChipValue}\n onChipSelect={handleChipSelect}\n {...rest}\n {...overlayThemeProps}\n />\n );\n\n return (\n <Box\n ref={(node: any) => {\n containerRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) (ref as any).current = node;\n }}\n position=\"relative\"\n width=\"100%\"\n >\n <Input\n {...rest}\n size={size}\n placeholder={placeholder || (isRange ? \"MM/DD/YYYY - MM/DD/YYYY\" : \"MM/DD/YYYY\")}\n value={inputValue}\n onChangeText={handleInputChange}\n onFocus={() => setOpen(true)}\n backgroundColor={backgroundColor}\n testID={testID}\n themeMode={themeMode}\n themeProductContext={themeProductContext}\n />\n {open &&\n (isWeb ? (\n <Box\n position=\"absolute\"\n top=\"100%\"\n left={dropdownPosition === \"left\" ? 0 : \"auto\"}\n right={dropdownPosition === \"right\" ? 0 : \"auto\"}\n marginTop={4}\n zIndex={1000}\n >\n {renderCalendar()}\n </Box>\n ) : (\n <Box marginTop={4}>{renderCalendar()}</Box>\n ))}\n </Box>\n );\n }\n);\n\nDatePicker.displayName = \"DatePicker\";\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","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 { format } from \"date-fns\";\nimport * as locales from \"date-fns/locale\";\nimport type { CalendarLocaleType } from \"@xsolla/xui-calendar\";\n\nconst defaultLocale = \"enUS\";\n\nexport function formatDate(\n date: Date,\n formatStr: string,\n locale: CalendarLocaleType = defaultLocale\n) {\n const localeObj = locales[locale] || locales[defaultLocale];\n\n return format(date, formatStr, {\n locale: localeObj,\n });\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,uBAMO;;;ACNP,IAAAC,gBAAqE;;;ACArE,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;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import_jsx_runtime","import_date_fns"]}
1
+ {"version":3,"sources":["../../src/index.tsx","../../src/DatePicker.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/index.tsx","../../src/utils.ts"],"sourcesContent":["export {\n Calendar,\n DualCalendar,\n CalendarHeader,\n CalendarGrid,\n CalendarChips,\n} from \"@xsolla/xui-calendar\";\nexport type {\n CalendarProps,\n DualCalendarProps,\n CalendarChipOption,\n CalendarChipsProps,\n CalendarGridProps,\n CalendarHeaderProps,\n CalendarLocaleType,\n} from \"@xsolla/xui-calendar\";\nexport * from \"./DatePicker\";\nexport * from \"./types\";\nexport * from \"./utils\";\n","import {\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n type CSSProperties,\n type ClipboardEvent,\n type FocusEvent,\n type KeyboardEvent,\n type MouseEvent,\n} from \"react\";\n// @ts-expect-error - this will be resolved at build time\nimport { Box, isWeb, isNative } from \"@xsolla/xui-primitives\";\nimport { Input } from \"@xsolla/xui-input\";\nimport { parse, isValid } from \"date-fns\";\nimport { Calendar, DualCalendar } from \"@xsolla/xui-calendar\";\nimport type {\n DatePickerAlignment,\n DatePickerDropdownPosition,\n DatePickerPlacement,\n DatePickerProps,\n DatePickerSide,\n DateRangeType,\n} from \"./types\";\nimport {\n buildSegmentedValue,\n clampDatePart,\n datePartsFromDate,\n datePartsToDate,\n isDatePartsComplete,\n isSegmentComplete,\n stepDatePart,\n type DateParts,\n type DateSegmentType,\n} from \"./utils\";\n\nconst PLACEMENT_OFFSET = 4;\n/** Default format for rendering/parsing the field's text value (overridable via `dateFormat`). */\nconst DEFAULT_DATE_FORMAT = \"MM/dd/yyyy\";\n/** Range separator used when parsing typed/pasted text (accepts hyphen or dashes). */\nconst RANGE_SEPARATOR = /\\s*[-–—]\\s*/;\n/** Range separator used when rendering the field. */\nconst RANGE_DISPLAY_SEP = \" - \";\n\n/**\n * Trailing calendar icon matching the Figma `icon_calendar--line` (node\n * 22683:20617). Geometry is identical to `@xsolla/xui-icons-base` `Calendar`,\n * but rendered as a self-contained fill-based SVG with inline `fill`/`stroke`:\n * the primitives `Icon` wrapper forces `svg { fill: none; stroke: currentColor }`,\n * which re-strokes fill-based icons and thickens the glyph. Inline styles on the\n * SVG element override that rule. `fillOpacity` 0.6 matches the Figma placeholder\n * tint (`control/input/placeholder`).\n */\nconst CalendarFieldIcon = () => (\n <svg\n viewBox=\"0 0 24 24\"\n width=\"100%\"\n height=\"100%\"\n style={{ fill: \"currentColor\", stroke: \"none\" }}\n >\n <path\n fillOpacity={0.6}\n d=\"M8 4H16V2H18V4H21.5C21.7761 4 22 4.22386 22 4.5V19.5C22 19.7761 21.7761 20 21.5 20H2.5C2.22386 20 2 19.7761 2 19.5V4.5C2 4.22386 2.22386 4 2.5 4H6V2H8V4ZM4 18H20V10H4V18ZM4 8H20V6H4V8Z\"\n />\n </svg>\n);\n// Estimated calendar size used before the overlay has been painted/measured.\nconst FALLBACK_PANEL_SIZE = { width: 320, height: 360 };\n\ninterface ContainerRect {\n top: number;\n bottom: number;\n left: number;\n right: number;\n}\n\n/**\n * Pick the calendar direction with the most available space, preferring\n * bottom, then top, then left, then right (per FEP-822). If nothing fully\n * fits, fall back to whichever side has the largest gap.\n */\nconst resolveAutoPlacement = (\n container: ContainerRect,\n panel: { width: number; height: number },\n viewport: { width: number; height: number },\n offset: number\n): DatePickerSide => {\n const spaceBelow = viewport.height - container.bottom;\n const spaceAbove = container.top;\n const spaceRight = viewport.width - container.right;\n const spaceLeft = container.left;\n const neededVertical = panel.height + offset;\n const neededHorizontal = panel.width + offset;\n\n if (spaceBelow >= neededVertical) return \"bottom\";\n if (spaceAbove >= neededVertical) return \"top\";\n if (spaceLeft >= neededHorizontal) return \"left\";\n if (spaceRight >= neededHorizontal) return \"right\";\n\n const gaps: Array<{ side: DatePickerSide; space: number }> = [\n { side: \"bottom\", space: spaceBelow },\n { side: \"top\", space: spaceAbove },\n { side: \"left\", space: spaceLeft },\n { side: \"right\", space: spaceRight },\n ];\n return gaps.reduce((best, current) =>\n current.space > best.space ? current : best\n ).side;\n};\n\n/** Split a placement into its side and explicit alignment (if any). */\nconst parsePlacement = (\n placement: DatePickerPlacement\n): { side: DatePickerSide; align: DatePickerAlignment | null } => {\n const [side, align] = placement.split(\"-\") as [\n DatePickerSide,\n DatePickerAlignment | undefined,\n ];\n return { side, align: align ?? null };\n};\n\n/** Map the deprecated `dropdownPosition` to an alignment. */\nconst alignFromDropdownPosition = (\n dropdownPosition: DatePickerDropdownPosition\n): DatePickerAlignment => (dropdownPosition === \"right\" ? \"end\" : \"start\");\n\n/**\n * Resolve the forced layout requested via the `placement` prop. The side is\n * always honoured; alignment comes from the suffix when present, otherwise\n * falls back to `dropdownPosition` for top/bottom (and `start` for left/right).\n */\nconst resolveForcedLayout = (\n placement: DatePickerPlacement,\n dropdownPosition: DatePickerDropdownPosition\n): { side: DatePickerSide; align: DatePickerAlignment } => {\n const { side, align } = parsePlacement(placement);\n if (align) return { side, align };\n if (side === \"top\" || side === \"bottom\")\n return { side, align: alignFromDropdownPosition(dropdownPosition) };\n return { side, align: \"start\" };\n};\n\n/**\n * Pick the cross-axis alignment with the most room, flipping start<->end if the\n * calendar would overflow the preferred edge (mirrors the start/end flip in\n * useContextMenuPosition). `center` never flips. The cross axis is horizontal\n * for top/bottom sides and vertical for left/right sides.\n */\nconst resolveAlignForSide = (\n side: DatePickerSide,\n container: ContainerRect,\n panel: { width: number; height: number },\n viewport: { width: number; height: number },\n preferred: DatePickerAlignment\n): DatePickerAlignment => {\n if (preferred === \"center\") return \"center\";\n const isVerticalSide = side === \"left\" || side === \"right\";\n const fits = (align: DatePickerAlignment) => {\n if (isVerticalSide) {\n return align === \"start\"\n ? container.top + panel.height <= viewport.height\n : container.bottom - panel.height >= 0;\n }\n return align === \"start\"\n ? container.left + panel.width <= viewport.width\n : container.right - panel.width >= 0;\n };\n if (fits(preferred)) return preferred;\n const opposite: DatePickerAlignment = preferred === \"start\" ? \"end\" : \"start\";\n return fits(opposite) ? opposite : preferred;\n};\n\n/**\n * Absolute-position style for the calendar overlay given a resolved side and\n * alignment. The side sets the open direction; the alignment sets the cross-axis\n * edge (or centre). Returned as a style object so `transform`-based centring is\n * applied verbatim (matches the ContextMenu panel's `style` usage).\n */\nconst getPlacementStyle = (\n side: DatePickerSide,\n align: DatePickerAlignment,\n offset: number\n): CSSProperties => {\n if (side === \"top\" || side === \"bottom\") {\n const vertical =\n side === \"bottom\"\n ? { top: \"100%\", bottom: \"auto\", marginTop: offset, marginBottom: 0 }\n : { top: \"auto\", bottom: \"100%\", marginTop: 0, marginBottom: offset };\n const horizontal =\n align === \"center\"\n ? { left: \"50%\", right: \"auto\", transform: \"translateX(-50%)\" }\n : align === \"end\"\n ? { left: \"auto\", right: 0 }\n : { left: 0, right: \"auto\" };\n return { marginLeft: 0, marginRight: 0, ...vertical, ...horizontal };\n }\n\n const horizontal =\n side === \"right\"\n ? { left: \"100%\", right: \"auto\", marginLeft: offset, marginRight: 0 }\n : { left: \"auto\", right: \"100%\", marginLeft: 0, marginRight: offset };\n const vertical =\n align === \"center\"\n ? { top: \"50%\", bottom: \"auto\", transform: \"translateY(-50%)\" }\n : align === \"end\"\n ? { top: \"auto\", bottom: 0 }\n : { top: 0, bottom: \"auto\" };\n return { marginTop: 0, marginBottom: 0, ...horizontal, ...vertical };\n};\n\n/** A segment the keyboard can target, identified by its date group + part. */\ntype SegmentKey = { group: number; type: DateSegmentType };\n/** Active segment being typed into, with its accumulated digit buffer. */\ntype EditState = SegmentKey & { buffer: string };\n\nexport const DatePicker = forwardRef<any, DatePickerProps>(\n (\n {\n onChange,\n size = \"md\",\n locale = \"enUS\",\n variant = \"single\",\n selectsRange = false,\n startDate,\n endDate,\n selectedDate,\n minDate,\n maxDate,\n placeholder,\n dateFormat = DEFAULT_DATE_FORMAT,\n backgroundColor,\n testID,\n chips,\n activeChip,\n onChipSelect,\n showChipLabel = true,\n dropdownPosition = \"left\",\n placement,\n themeMode,\n themeProductContext,\n overlayThemeMode,\n overlayThemeProductContext,\n iconRight = <CalendarFieldIcon />,\n iconLeft,\n error,\n errorMessage,\n readOnly,\n onFocus: onFocusProp,\n onBlur: onBlurProp,\n onClick: onClickProp,\n onKeyDown: onKeyDownProp,\n onPaste: onPasteProp,\n ...rest\n },\n ref\n ) => {\n // Editing is disabled for read-only fields (and disabled fields never fire\n // keydown anyway). `disabled` flows to Input via `...rest`.\n const editable = !readOnly && !(rest as { disabled?: boolean }).disabled;\n const isDual = variant === \"dual\";\n const isRange = isDual || selectsRange;\n\n // Per-side date parts (single = 1 group, range = [start, end]). This is the\n // field's source of truth; `onChange` fires only when a side is complete.\n const propGroups = useCallback(\n (): DateParts[] =>\n isRange\n ? [datePartsFromDate(startDate), datePartsFromDate(endDate)]\n : [datePartsFromDate(selectedDate)],\n [isRange, startDate, endDate, selectedDate]\n );\n\n const [open, setOpen] = useState(false);\n const [groups, setGroups] = useState<DateParts[]>(propGroups);\n const [edit, setEdit] = useState<EditState | null>(null);\n const [focused, setFocused] = useState(false);\n // The segment the keyboard currently targets. Tracked in state (not read from\n // the DOM caret) because the underlying Input resets the caret to the end\n // whenever its controlled value changes; a rAF effect syncs the visible\n // selection to follow this.\n const [activeSegment, setActiveSegment] = useState<SegmentKey | null>(null);\n const [internalChip, setInternalChip] = useState<string | null>(null);\n // Validation message for typed/pasted input that failed to parse or fell\n // outside minDate/maxDate. Cleared on edit and when the selection changes.\n const [parseError, setParseError] = useState<string | null>(null);\n const [layout, setLayout] = useState<{\n side: DatePickerSide;\n align: DatePickerAlignment;\n }>(() =>\n placement\n ? resolveForcedLayout(placement, dropdownPosition)\n : { side: \"bottom\", align: alignFromDropdownPosition(dropdownPosition) }\n );\n const containerRef = useRef<any>(null);\n const calendarRef = useRef<any>(null);\n const inputRef = useRef<any>(null);\n const chipSelectionRef = useRef(false);\n // Set while we programmatically restore focus to the field on Escape, so the\n // resulting focus event does not re-open the panel via `onFocus`.\n const suppressReopenRef = useRef(false);\n\n const activeChipValue =\n activeChip !== undefined ? activeChip : internalChip;\n\n const chipLabel =\n showChipLabel && activeChipValue && chips\n ? chips.find((c) => c.value === activeChipValue)?.label\n : undefined;\n\n /** Day-granularity bounds check against `minDate`/`maxDate` (time ignored). */\n const isWithinBounds = (date: Date): boolean => {\n const day = new Date(\n date.getFullYear(),\n date.getMonth(),\n date.getDate()\n ).getTime();\n if (minDate) {\n const min = new Date(\n minDate.getFullYear(),\n minDate.getMonth(),\n minDate.getDate()\n ).getTime();\n if (day < min) return false;\n }\n if (maxDate) {\n const max = new Date(\n maxDate.getFullYear(),\n maxDate.getMonth(),\n maxDate.getDate()\n ).getTime();\n if (day > max) return false;\n }\n return true;\n };\n\n // ----- Field text + segment ranges -----\n\n type FieldSegment = {\n type: DateSegmentType;\n start: number;\n end: number;\n filled: boolean;\n group: number;\n };\n\n // Build the field text and each segment's char range from the current parts\n // + in-progress edit buffer. Range mode joins the two dates with \" - \".\n const composeField = (): { text: string; segments: FieldSegment[] } => {\n const build = (group: number) =>\n buildSegmentedValue(\n dateFormat,\n groups[group] ?? { day: null, month: null, year: null },\n edit && edit.group === group\n ? { type: edit.type, buffer: edit.buffer }\n : undefined\n );\n if (!isRange) {\n const { text, ranges } = build(0);\n return { text, segments: ranges.map((r) => ({ ...r, group: 0 })) };\n }\n const a = build(0);\n const b = build(1);\n const text = `${a.text}${RANGE_DISPLAY_SEP}${b.text}`;\n const offset = a.text.length + RANGE_DISPLAY_SEP.length;\n return {\n text,\n segments: [\n ...a.ranges.map((r) => ({ ...r, group: 0 })),\n ...b.ranges.map((r) => ({\n ...r,\n group: 1,\n start: r.start + offset,\n end: r.end + offset,\n })),\n ],\n };\n };\n\n const composed = composeField();\n const hasAnyFilled = groups.some(\n (g) => g.day != null || g.month != null || g.year != null\n );\n // Show the plain placeholder when the field is empty; show the segment mask\n // (mm/dd/yyyy) once partially filled, or while focused on web (segment\n // editing is web-only). A chip label wins over both.\n const showMask = hasAnyFilled || (focused && isWeb);\n const inputValue = chipLabel ?? (showMask ? composed.text : \"\");\n\n const orderedSegments = (): FieldSegment[] => composeField().segments;\n\n const firstSegmentKey = (): SegmentKey | null => {\n const first = orderedSegments()[0];\n return first ? { group: first.group, type: first.type } : null;\n };\n\n const segmentKeyAtCaret = (caret: number): SegmentKey | null => {\n const segments = orderedSegments();\n const seg =\n segments.find((s) => caret >= s.start && caret <= s.end) ??\n segments.find((s) => caret < s.start) ??\n segments[segments.length - 1];\n return seg ? { group: seg.group, type: seg.type } : null;\n };\n\n // ----- onChange emission (only complete, in-bounds dates) -----\n\n const applySelection = (\n date: Date | DateRangeType,\n closeOnComplete = true\n ) => {\n if (!chipSelectionRef.current) {\n setInternalChip(null);\n onChipSelect?.(null);\n }\n chipSelectionRef.current = false;\n if (!isRange) {\n onChange?.(date as Date);\n if (closeOnComplete) setOpen(false);\n } else {\n const range = date as DateRangeType;\n onChange?.(range);\n if (closeOnComplete && range[0] && range[1]) setOpen(false);\n }\n };\n\n const emit = (next: DateParts[]) => {\n if (!isRange) {\n const date = datePartsToDate(next[0]);\n if (date && isWithinBounds(date)) applySelection(date, false);\n return;\n }\n const start = datePartsToDate(next[0]);\n const end = datePartsToDate(next[1]);\n if (start && !isWithinBounds(start)) return;\n if (end && !isWithinBounds(end)) return;\n // Inverted range (start after end): mirror MUI's field behaviour — don't\n // reorder (the calendar day-click path already orders); keep the entered\n // values, flag an error, and withhold the invalid range from onChange.\n if (start && end && start.getTime() > end.getTime()) {\n setParseError(\"End date must be after start date\");\n return;\n }\n if (start || end) applySelection([start, end], false);\n };\n\n // Write one segment's value; reject (with a message) if it completes an\n // out-of-bounds date. Returns the clamped value, or null when rejected.\n const commitPart = (\n group: number,\n type: DateSegmentType,\n rawValue: number\n ): number | null => {\n const clamped = clampDatePart(type, rawValue, groups[group]);\n const next = groups.map((g, i) => {\n if (i !== group) return g;\n const updated = { ...g, [type]: clamped };\n // Changing month/year can leave an existing day out of range for the new\n // month (e.g. Jan 31 -> Feb); clamp it down to the month's length.\n if (type !== \"day\" && updated.day != null) {\n updated.day = clampDatePart(\"day\", updated.day, updated);\n }\n return updated;\n });\n const assembled = datePartsToDate(next[group]);\n if (assembled && !isWithinBounds(assembled)) {\n setParseError(\"Date must be within the allowed range\");\n return null;\n }\n setParseError(null);\n setGroups(next);\n emit(next);\n return clamped;\n };\n\n const commitBuffer = () => {\n if (!edit) return;\n commitPart(edit.group, edit.type, Number(edit.buffer));\n setEdit(null);\n };\n\n const defaultPart = (type: DateSegmentType): number => {\n const now = new Date();\n if (type === \"day\") return now.getDate();\n if (type === \"month\") return now.getMonth() + 1;\n return now.getFullYear();\n };\n\n // ----- Keyboard handlers (web) -----\n\n const advance = (active: SegmentKey) => {\n const segments = orderedSegments();\n const index = segments.findIndex(\n (s) => s.group === active.group && s.type === active.type\n );\n const next = segments[index + 1];\n setActiveSegment(next ? { group: next.group, type: next.type } : active);\n };\n\n const handleDigit = (digit: string) => {\n const active = activeSegment ?? firstSegmentKey();\n if (!active) return;\n const sameActive =\n edit && edit.group === active.group && edit.type === active.type;\n const buffer = (sameActive ? edit!.buffer : \"\") + digit;\n if (isSegmentComplete(active.type, buffer)) {\n const committed = commitPart(active.group, active.type, Number(buffer));\n setEdit(null);\n if (committed !== null) advance(active);\n } else {\n setEdit({ group: active.group, type: active.type, buffer });\n }\n };\n\n const handleArrowStep = (\n e: KeyboardEvent<HTMLInputElement>,\n delta: number\n ) => {\n e.preventDefault();\n const active = activeSegment ?? firstSegmentKey();\n if (!active) return;\n const parts = groups[active.group];\n const current = parts[active.type];\n const value =\n current == null\n ? defaultPart(active.type) // first press reveals today's part\n : stepDatePart(active.type, current, delta, parts);\n commitPart(active.group, active.type, value);\n setEdit(null);\n if (!activeSegment) setActiveSegment(active);\n };\n\n const handleArrowMove = (\n e: KeyboardEvent<HTMLInputElement>,\n direction: -1 | 1\n ) => {\n const segments = orderedSegments();\n if (!segments.length) return;\n const active = activeSegment ?? firstSegmentKey();\n if (!active) return;\n let index = segments.findIndex(\n (s) => s.group === active.group && s.type === active.type\n );\n if (index === -1) index = direction > 0 ? -1 : segments.length;\n const next = index + direction;\n if (next < 0 || next >= segments.length) return; // caret may leave at edges\n e.preventDefault();\n if (edit) {\n commitPart(edit.group, edit.type, Number(edit.buffer));\n setEdit(null);\n }\n const target = segments[next];\n setActiveSegment({ group: target.group, type: target.type });\n };\n\n const handleBackspace = (e: KeyboardEvent<HTMLInputElement>) => {\n e.preventDefault();\n const active = activeSegment ?? firstSegmentKey();\n if (!active) return;\n const sameActive =\n edit && edit.group === active.group && edit.type === active.type;\n if (sameActive && edit!.buffer.length > 0) {\n const buffer = edit!.buffer.slice(0, -1);\n setEdit(buffer ? { ...edit!, buffer } : null);\n return;\n }\n // Clear the segment and retreat to the previous one.\n const next = groups.map((g, i) =>\n i === active.group ? { ...g, [active.type]: null } : g\n );\n setGroups(next);\n setEdit(null);\n setParseError(null);\n emit(next);\n const segments = orderedSegments();\n const index = segments.findIndex(\n (s) => s.group === active.group && s.type === active.type\n );\n const prev = segments[index - 1];\n if (prev) setActiveSegment({ group: prev.group, type: prev.type });\n };\n\n const handleKeyDown = (e: KeyboardEvent<HTMLInputElement>) => {\n onKeyDownProp?.(e);\n if (e.defaultPrevented) return;\n if (e.key === \"Escape\") {\n setOpen(false);\n return;\n }\n if (!isWeb || !editable) return;\n if (e.key === \"Enter\") {\n commitBuffer();\n setOpen(false);\n return;\n }\n if (e.key === \"ArrowUp\") return handleArrowStep(e, 1);\n if (e.key === \"ArrowDown\") return handleArrowStep(e, -1);\n if (e.key === \"ArrowLeft\") return handleArrowMove(e, -1);\n if (e.key === \"ArrowRight\") return handleArrowMove(e, 1);\n if (e.key === \"Backspace\") return handleBackspace(e);\n if (/^[0-9]$/.test(e.key)) {\n e.preventDefault();\n handleDigit(e.key);\n return;\n }\n // Block other printable characters so the segment mask stays intact; let\n // shortcuts (Cmd/Ctrl, e.g. paste) and navigation keys through.\n if (e.key.length === 1 && !e.metaKey && !e.ctrlKey) e.preventDefault();\n };\n\n // ----- Focus / click / blur / paste -----\n\n const handleFieldFocus = (e: FocusEvent<HTMLInputElement>) => {\n onFocusProp?.(e);\n if (suppressReopenRef.current) {\n suppressReopenRef.current = false;\n return;\n }\n setFocused(true);\n setOpen(true);\n if (isWeb && editable) setActiveSegment(firstSegmentKey());\n };\n\n const handleFieldClick = (e: MouseEvent<HTMLInputElement>) => {\n onClickProp?.(e);\n // Empty field: focus already targets the first segment, and the value just\n // became the mask (which resets the caret), so trust focus's default.\n if (!isWeb || !editable || !hasAnyFilled) return;\n const input = inputRef.current;\n if (!input) return;\n // Read the caret synchronously — it's already placed by mousedown and a\n // filled field's value doesn't change on focus, so selectionStart is the\n // click position. (Reading it in a rAF would race the visual-sync effect,\n // which by then has moved the caret, and mis-target the segment.) The\n // visual effect then highlights whatever segment we set here.\n const key = segmentKeyAtCaret(input.selectionStart ?? 0);\n if (key) setActiveSegment(key);\n };\n\n const handleFieldBlur = (e: FocusEvent<HTMLInputElement>) => {\n onBlurProp?.(e);\n setFocused(false);\n setActiveSegment(null);\n if (!editable) return;\n let next = groups;\n if (edit) {\n const clamped = clampDatePart(\n edit.type,\n Number(edit.buffer),\n groups[edit.group]\n );\n next = groups.map((g, i) =>\n i === edit.group ? { ...g, [edit.type]: clamped } : g\n );\n }\n // Revert incomplete sides to the committed prop value (don't leave a\n // half-typed date on screen).\n const props = propGroups();\n next = next.map((g, i) => (isDatePartsComplete(g) ? g : props[i]));\n setEdit(null);\n setParseError(null);\n setGroups(next);\n emit(next);\n };\n\n const parseOne = (token: string): Date | null => {\n const trimmed = token.trim();\n if (!trimmed) return null;\n const parsed = parse(trimmed, dateFormat, new Date());\n return isValid(parsed) ? parsed : null;\n };\n\n const handlePaste = (e: ClipboardEvent<HTMLInputElement>) => {\n onPasteProp?.(e);\n if (e.defaultPrevented) return;\n if (!isWeb || !editable) return;\n const text = e.clipboardData?.getData(\"text\") ?? \"\";\n if (!text.trim()) return;\n e.preventDefault();\n let next: DateParts[];\n if (isRange) {\n const [startText, endText] = text.split(RANGE_SEPARATOR);\n const start = parseOne(startText ?? \"\");\n const end = parseOne(endText ?? \"\");\n if (!start) {\n setParseError(\n `Enter a valid date range (${dateFormat} - ${dateFormat})`\n );\n return;\n }\n next = [datePartsFromDate(start), datePartsFromDate(end)];\n } else {\n const date = parseOne(text);\n if (!date) {\n setParseError(`Enter a valid date (${dateFormat})`);\n return;\n }\n next = [datePartsFromDate(date)];\n }\n const outOfBounds = next\n .map(datePartsToDate)\n .some((d): d is Date => d instanceof Date && !isWithinBounds(d));\n if (outOfBounds) {\n setParseError(\"Date must be within the allowed range\");\n return;\n }\n setParseError(null);\n setEdit(null);\n setGroups(next);\n emit(next);\n };\n\n const handleChipSelect = (value: string | null) => {\n chipSelectionRef.current = true;\n setInternalChip(value);\n onChipSelect?.(value);\n };\n\n const handleDateChange = (date: Date | DateRangeType) =>\n applySelection(date);\n\n // ----- Effects -----\n\n // Sync from props when they change externally (ignored while focused so it\n // can't clobber in-progress entry; blur handles reverting incomplete sides).\n const propKey = `${selectedDate?.getTime() ?? \"\"}|${\n startDate?.getTime() ?? \"\"\n }|${endDate?.getTime() ?? \"\"}|${isRange}`;\n useEffect(() => {\n if (focused) return;\n setGroups(propGroups());\n setEdit(null);\n setParseError(null);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [propKey]);\n\n // Keep the visible selection on the active segment. Setting a controlled\n // input's value resets the caret to the end, and the underlying Input lags\n // the DOM value by one render (internal `passValue` state) — sometimes past\n // the next frame. So we wait (retrying a few frames) until the DOM value\n // matches the intended text, then place the caret; by then no further value\n // write will move it.\n useEffect(() => {\n if (!isWeb || !activeSegment) return;\n const input = inputRef.current;\n if (!input) return;\n const segment = composeField().segments.find(\n (s) => s.group === activeSegment.group && s.type === activeSegment.type\n );\n if (!segment) return;\n let rafId = 0;\n let attempts = 0;\n const apply = () => {\n if (document.activeElement !== input) return;\n if (input.value === inputValue) {\n input.setSelectionRange(segment.start, segment.end);\n } else if (attempts++ < 5) {\n rafId = window.requestAnimationFrame(apply);\n }\n };\n rafId = window.requestAnimationFrame(apply);\n return () => window.cancelAnimationFrame(rafId);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [activeSegment, inputValue]);\n\n useEffect(() => {\n if (isNative) return;\n const handleClickOutside = (event: globalThis.MouseEvent) => {\n if (\n containerRef.current &&\n !containerRef.current.contains(event.target as Node)\n ) {\n setOpen(false);\n }\n };\n document.addEventListener(\"mousedown\", handleClickOutside);\n return () =>\n document.removeEventListener(\"mousedown\", handleClickOutside);\n }, []);\n\n // Escape dismisses the open dialog regardless of which descendant holds\n // focus (WAI-ARIA dialog pattern), covering the \"awaiting end date\" state\n // where focus has moved off the input into the calendar. A native\n // `document` keydown listener is used (not React synthetic) so behaviour is\n // identical across React 16/17+ event-delegation changes; gated on `open`\n // so it doesn't swallow Escape when closed. Closing returns focus to the\n // field. Web only — mirrors the outside-click listener above.\n useEffect(() => {\n if (!open || !isWeb) return;\n const handleEscape = (event: globalThis.KeyboardEvent) => {\n if (event.key !== \"Escape\") return;\n setOpen(false);\n const input = inputRef.current;\n if (input && document.activeElement !== input) {\n suppressReopenRef.current = true;\n input.focus?.();\n }\n };\n document.addEventListener(\"keydown\", handleEscape);\n return () => document.removeEventListener(\"keydown\", handleEscape);\n }, [open]);\n\n // Resolve the open side + alignment whenever the calendar opens. With an\n // explicit `placement` we honour it (using `dropdownPosition` as the\n // alignment fallback when the placement carries no suffix); otherwise we\n // measure the input and calendar against the viewport after paint and flip\n // to the best-fitting side, flipping the cross-axis edge too so a calendar\n // near a viewport edge doesn't clip.\n useEffect(() => {\n if (!open || !isWeb) return;\n if (placement) {\n const next = resolveForcedLayout(placement, dropdownPosition);\n setLayout((prev) =>\n prev.side === next.side && prev.align === next.align ? prev : next\n );\n return;\n }\n\n const compute = () => {\n const container = containerRef.current;\n if (!container) return;\n const containerRect = container.getBoundingClientRect();\n const panelRect = calendarRef.current\n ? calendarRef.current.getBoundingClientRect()\n : FALLBACK_PANEL_SIZE;\n const panel = { width: panelRect.width, height: panelRect.height };\n const viewport = {\n width: window.innerWidth,\n height: window.innerHeight,\n };\n const side = resolveAutoPlacement(\n containerRect,\n panel,\n viewport,\n PLACEMENT_OFFSET\n );\n const preferred: DatePickerAlignment =\n side === \"top\" || side === \"bottom\"\n ? alignFromDropdownPosition(dropdownPosition)\n : \"start\";\n const align = resolveAlignForSide(\n side,\n containerRect,\n panel,\n viewport,\n preferred\n );\n setLayout((prev) =>\n prev.side === side && prev.align === align ? prev : { side, align }\n );\n };\n\n const rafId = window.requestAnimationFrame(compute);\n const handleResize = () => compute();\n window.addEventListener(\"resize\", handleResize);\n return () => {\n window.cancelAnimationFrame(rafId);\n window.removeEventListener(\"resize\", handleResize);\n };\n }, [open, placement, dropdownPosition]);\n\n const overlayThemeProps = {\n themeMode: overlayThemeMode ?? themeMode,\n themeProductContext: overlayThemeProductContext ?? themeProductContext,\n };\n\n // Drive the calendar's visible month so editing navigates the grid. Anchor\n // on the segment being edited (its group's month/year) — so typing/stepping\n // either side of a range moves the view there — falling back to the\n // committed selection. Memoised on year+month so a consumer re-creating the\n // date object each render doesn't churn the view or block manual prev/next.\n const activeParts = activeSegment ? groups[activeSegment.group] : null;\n const editingAnchor =\n activeParts && activeParts.month != null && activeParts.year != null\n ? new Date(activeParts.year, activeParts.month - 1, 1)\n : null;\n const viewAnchor =\n editingAnchor ?? selectedDate ?? startDate ?? endDate ?? null;\n const viewMonth = useMemo(\n () =>\n viewAnchor\n ? new Date(viewAnchor.getFullYear(), viewAnchor.getMonth(), 1)\n : undefined,\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [viewAnchor?.getFullYear(), viewAnchor?.getMonth()]\n );\n\n const renderCalendar = () =>\n isDual ? (\n <DualCalendar\n locale={locale}\n startDate={startDate}\n endDate={endDate}\n minDate={minDate}\n maxDate={maxDate}\n month={viewMonth}\n onChange={handleDateChange}\n chips={chips}\n activeChip={activeChipValue}\n onChipSelect={handleChipSelect}\n {...rest}\n {...overlayThemeProps}\n />\n ) : (\n <Calendar\n locale={locale}\n startDate={startDate}\n endDate={endDate}\n selectedDate={selectedDate}\n minDate={minDate}\n maxDate={maxDate}\n month={viewMonth}\n onChange={handleDateChange}\n selectsRange={selectsRange}\n chips={chips}\n activeChip={activeChipValue}\n onChipSelect={handleChipSelect}\n {...rest}\n {...overlayThemeProps}\n />\n );\n\n return (\n <Box\n ref={(node: any) => {\n containerRef.current = node;\n if (typeof ref === \"function\") ref(node);\n else if (ref) (ref as any).current = node;\n }}\n position=\"relative\"\n width=\"100%\"\n {...(isWeb ? { onClick: () => setOpen(true) } : {})}\n >\n <Input\n {...rest}\n ref={inputRef}\n size={size}\n placeholder={\n placeholder || (isRange ? \"Enter a date range\" : \"Choose a date\")\n }\n value={inputValue}\n readOnly={readOnly}\n onFocus={handleFieldFocus}\n onBlur={handleFieldBlur}\n onKeyDown={handleKeyDown}\n onClick={handleFieldClick}\n onPaste={handlePaste}\n iconRight={iconRight}\n iconLeft={iconLeft}\n error={error || !!parseError}\n errorMessage={parseError ?? errorMessage}\n backgroundColor={backgroundColor}\n testID={testID}\n themeMode={themeMode}\n themeProductContext={themeProductContext}\n />\n {open &&\n (isWeb ? (\n <Box\n ref={calendarRef}\n role=\"dialog\"\n aria-modal\n aria-label={isRange ? \"Choose a date range\" : \"Choose a date\"}\n // Stop clicks inside the calendar from bubbling to the container's\n // open-on-click handler, which would re-open the panel right after\n // a single-date selection closes it.\n onClick={(e: any) => e.stopPropagation()}\n position=\"absolute\"\n zIndex={1000}\n style={getPlacementStyle(\n layout.side,\n layout.align,\n PLACEMENT_OFFSET\n )}\n >\n {renderCalendar()}\n </Box>\n ) : (\n <Box marginTop={4}>{renderCalendar()}</Box>\n ))}\n </Box>\n );\n }\n);\n\nDatePicker.displayName = \"DatePicker\";\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","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 { format } from \"date-fns\";\nimport * as locales from \"date-fns/locale\";\nimport type { CalendarLocaleType } from \"@xsolla/xui-calendar\";\n\nconst defaultLocale = \"enUS\";\n\nexport function formatDate(\n date: Date,\n formatStr: string,\n locale: CalendarLocaleType = defaultLocale\n) {\n const localeObj = locales[locale] || locales[defaultLocale];\n\n return format(date, formatStr, {\n locale: localeObj,\n });\n}\n\nexport type DateSegmentType = \"day\" | \"month\" | \"year\";\n\n/** A date broken into editable parts; `null` means \"not yet filled\". */\nexport interface DateParts {\n day: number | null;\n month: number | null; // 1-12\n year: number | null;\n}\n\n/** A rendered segment's character span within the field text. */\nexport interface SegmentRange {\n type: DateSegmentType;\n start: number;\n end: number;\n filled: boolean;\n}\n\ntype FormatToken =\n | { kind: \"segment\"; type: DateSegmentType }\n | { kind: \"literal\"; text: string };\n\nconst SEGMENT_WIDTH: Record<DateSegmentType, number> = {\n day: 2,\n month: 2,\n year: 4,\n};\nconst SEGMENT_TOKEN: Record<DateSegmentType, string> = {\n day: \"dd\",\n month: \"mm\",\n year: \"yyyy\",\n};\n\n/** Split a date format into ordered segment tokens and literal separators. */\nexport function parseDateFormat(format: string): FormatToken[] {\n const tokens: FormatToken[] = [];\n let i = 0;\n while (i < format.length) {\n const c = format[i];\n if (c === \"d\" || c === \"M\" || c === \"y\") {\n while (i < format.length && format[i] === c) i++;\n tokens.push({\n kind: \"segment\",\n type: c === \"d\" ? \"day\" : c === \"M\" ? \"month\" : \"year\",\n });\n } else {\n let text = \"\";\n while (i < format.length && !\"dMy\".includes(format[i])) {\n text += format[i];\n i++;\n }\n tokens.push({ kind: \"literal\", text });\n }\n }\n return tokens;\n}\n\nconst EMPTY_PARTS: DateParts = { day: null, month: null, year: null };\n\nexport function datePartsFromDate(date: Date | null | undefined): DateParts {\n if (!date) return { ...EMPTY_PARTS };\n return {\n day: date.getDate(),\n month: date.getMonth() + 1,\n year: date.getFullYear(),\n };\n}\n\n/** Assemble a `Date`, or null if any part is missing or the date is invalid. */\nexport function datePartsToDate(parts: DateParts): Date | null {\n const { day, month, year } = parts;\n if (day == null || month == null || year == null) return null;\n const date = new Date(year, month - 1, day);\n // Reject overflow (e.g. 31 Feb rolling into March).\n if (\n date.getFullYear() !== year ||\n date.getMonth() !== month - 1 ||\n date.getDate() !== day\n ) {\n return null;\n }\n return date;\n}\n\nexport function isDatePartsComplete(parts: DateParts): boolean {\n return parts.day != null && parts.month != null && parts.year != null;\n}\n\n/** Clamp a raw numeric segment value into its valid range. */\nexport function clampDatePart(\n type: DateSegmentType,\n value: number,\n parts: DateParts\n): number {\n if (type === \"month\") return Math.min(12, Math.max(1, value));\n if (type === \"year\") return Math.max(1, value);\n const year = parts.year ?? new Date().getFullYear();\n const monthIndex = (parts.month ?? new Date().getMonth() + 1) - 1;\n return Math.min(daysInMonth(year, monthIndex), Math.max(1, value));\n}\n\n/** Step a numeric segment value, wrapping within its range (day/month) or ±1 (year). */\nexport function stepDatePart(\n type: DateSegmentType,\n current: number,\n delta: number,\n parts: DateParts\n): number {\n if (type === \"month\") return ((((current - 1 + delta) % 12) + 12) % 12) + 1;\n if (type === \"year\") return Math.max(1, current + delta);\n const year = parts.year ?? new Date().getFullYear();\n const monthIndex = (parts.month ?? new Date().getMonth() + 1) - 1;\n const dim = daysInMonth(year, monthIndex);\n return ((((current - 1 + delta) % dim) + dim) % dim) + 1;\n}\n\n/**\n * Render `parts` into field text using `format`, returning each segment's char\n * range. Filled parts are zero-padded; unfilled parts show a token placeholder\n * (`dd`/`mm`/`yyyy`). `active`, when set, renders the raw in-progress buffer for\n * the segment currently being typed.\n */\nexport function buildSegmentedValue(\n format: string,\n parts: DateParts,\n active?: { type: DateSegmentType; buffer: string }\n): { text: string; ranges: SegmentRange[] } {\n const tokens = parseDateFormat(format);\n let text = \"\";\n const ranges: SegmentRange[] = [];\n for (const token of tokens) {\n if (token.kind === \"literal\") {\n text += token.text;\n continue;\n }\n const { type } = token;\n const width = SEGMENT_WIDTH[type];\n const value = parts[type];\n let rendered: string;\n let filled: boolean;\n if (active && active.type === type && active.buffer.length > 0) {\n rendered = active.buffer;\n filled = false;\n } else if (value != null) {\n rendered = String(value).padStart(width, \"0\");\n filled = true;\n } else {\n rendered = SEGMENT_TOKEN[type];\n filled = false;\n }\n const start = text.length;\n text += rendered;\n ranges.push({ type, start, end: text.length, filled });\n }\n return { text, ranges };\n}\n\n/** Whether a first digit rules out a valid second digit (for early auto-commit). */\nexport function isSegmentComplete(\n type: DateSegmentType,\n buffer: string\n): boolean {\n const width = SEGMENT_WIDTH[type];\n if (buffer.length >= width) return true;\n if (buffer.length === 1 && type !== \"year\") {\n const first = Number(buffer);\n // Month tens digit is 0-1, day tens digit is 0-3; anything higher can't take\n // a second digit, so commit immediately.\n return type === \"month\" ? first > 1 : first > 3;\n }\n return false;\n}\n\nexport interface DateSegment {\n type: DateSegmentType;\n /** Inclusive character index of the segment's first digit in `value`. */\n start: number;\n /** Exclusive character index one past the segment's last digit. */\n end: number;\n}\n\n/** Number of days in the given month (0-indexed) of the given year. */\nexport function daysInMonth(year: number, monthIndex: number): number {\n return new Date(year, monthIndex + 1, 0).getDate();\n}\n\n/**\n * Locate the day/month/year segments within a formatted date `value` by walking\n * the `format` string in parallel: `d`/`M`/`y` token runs consume the matching\n * digit run in `value`, other characters are treated as literal separators.\n * Works for any token order (e.g. `MM/dd/yyyy`, `dd/MM/yyyy`, `yyyy-MM-dd`) and\n * both fixed- and variable-width tokens. Returns segments in display order.\n */\nexport function getDateSegments(format: string, value: string): DateSegment[] {\n const segments: DateSegment[] = [];\n let fi = 0;\n let vi = 0;\n while (fi < format.length && vi < value.length) {\n const fc = format[fi];\n if (fc === \"d\" || fc === \"M\" || fc === \"y\") {\n while (fi < format.length && format[fi] === fc) fi++;\n const start = vi;\n while (vi < value.length && value[vi] >= \"0\" && value[vi] <= \"9\") vi++;\n if (vi > start) {\n segments.push({\n type: fc === \"d\" ? \"day\" : fc === \"M\" ? \"month\" : \"year\",\n start,\n end: vi,\n });\n }\n } else {\n // Literal separator (e.g. \"/\", \"-\", \" \"): advance past one char in each.\n fi++;\n vi++;\n }\n }\n return segments;\n}\n\n/**\n * Step a single date segment by `delta`, isolated to that field (no carry):\n * day wraps within the current month, month wraps within the year (day clamped\n * to the new month's length), year increments freely. Mirrors the segment wrap\n * behaviour of the InputTime segments.\n */\nexport function stepDateSegment(\n date: Date,\n type: DateSegmentType,\n delta: number\n): Date {\n const year = date.getFullYear();\n const month = date.getMonth();\n const day = date.getDate();\n\n if (type === \"year\") {\n const nextYear = year + delta;\n return new Date(\n nextYear,\n month,\n Math.min(day, daysInMonth(nextYear, month))\n );\n }\n if (type === \"month\") {\n const nextMonth = (((month + delta) % 12) + 12) % 12;\n return new Date(\n year,\n nextMonth,\n Math.min(day, daysInMonth(year, nextMonth))\n );\n }\n const dim = daysInMonth(year, month);\n const nextDay = ((((day - 1 + delta) % dim) + dim) % dim) + 1;\n return new Date(year, month, nextDay);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAAAA,uBAMO;;;ACNP,IAAAC,gBAYO;;;ACZP,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,EACA;AAAA,EACA;AACF,CAAC;AAED,SAAS,kBAAkB,KAAsB;AAC/C,MAAI,yBAAyB,IAAI,GAAG,EAAG,QAAO;AAC9C,SAAO,0BAAY,GAAG;AACxB;AAgBO,SAAS,sBAAsB,YAAoB;AACxD,QAAM,YAAY,aAAAC,QAAM;AAAA,IACtB,CAAC,EAAE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AAA,QACA,UAAS;AAAA,QACT,OAAM;AAAA,QACL,GAAI,QAAQ,EAAE,SAAS,MAAM,QAAQ,IAAI,EAAE,IAAI,CAAC;AAAA,QAEjD;AAAA;AAAA,YAAC;AAAA;AAAA,cACE,GAAG;AAAA,cACJ,KAAK;AAAA,cACL;AAAA,cACA,aACE,gBAAgB,UAAU,uBAAuB;AAAA,cAEnD,OAAO;AAAA,cACP;AAAA,cACA,SAAS;AAAA,cACT,QAAQ;AAAA,cACR,WAAW;AAAA,cACX,SAAS;AAAA,cACT,SAAS;AAAA,cACT;AAAA,cACA;AAAA,cACA,OAAO,SAAS,CAAC,CAAC;AAAA,cAClB,cAAc,cAAc;AAAA,cAC5B;AAAA,cACA;AAAA,cACA;AAAA,cACA;AAAA;AAAA,UACF;AAAA,UACC,SACE,QACC;AAAA,YAAC;AAAA;AAAA,cACC,KAAK;AAAA,cACL,MAAK;AAAA,cACL,cAAU;AAAA,cACV,cAAY,UAAU,wBAAwB;AAAA,cAI9C,SAAS,CAAC,MAAW,EAAE,gBAAgB;AAAA,cACvC,UAAS;AAAA,cACT,QAAQ;AAAA,cACR,OAAO;AAAA,gBACL,OAAO;AAAA,gBACP,OAAO;AAAA,gBACP;AAAA,cACF;AAAA,cAEC,yBAAe;AAAA;AAAA,UAClB,IAEA,6CAAC,OAAI,WAAW,GAAI,yBAAe,GAAE;AAAA;AAAA;AAAA,IAE3C;AAAA,EAEJ;AACF;AAEA,WAAW,cAAc;","names":["import_xui_calendar","import_react","import_react","React","styled","React","import_date_fns","format","import_jsx_runtime","vertical","horizontal","text","index"]}