@texturehq/edges 0.0.5 → 0.0.7

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.
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/components/Icon/Icon.tsx","../src/utils/index.ts","../src/utils/controlStyles.ts","../src/components/Button/Button.tsx","../src/components/Field/Field.tsx","../src/components/TextField/TextField.tsx","../src/components/TextArea/TextArea.tsx","../src/components/ListBox/ListBox.tsx","../src/components/Popover/Popover.tsx","../src/components/Select/Select.tsx","../src/components/NumberField/NumberField.tsx","../src/components/TimeField/TimeField.tsx","../src/components/DateField/DateField.tsx","../src/components/ToggleButton/ToggleButton.tsx","../src/components/Tooltip/Tooltip.tsx","../src/components/TextLink/TextLink.tsx","../src/components/Skeleton/Skeleton.tsx","../src/components/Logo/Logo.tsx","../src/components/Loader/Loader.tsx","../src/components/Heading/Heading.tsx","../src/components/CopyToClipboard/CopyToClipboard.tsx","../src/components/Switch/Switch.tsx","../src/components/ProgressBar/ProgressBar.tsx","../src/components/Calendar/Calendar.tsx","../src/components/RangeCalendar/RangeCalendar.tsx","../packages/@react-aria/ssr/src/SSRProvider.tsx","../node_modules/@react-aria/i18n/dist/packages/@react-aria/i18n/src/utils.ts","../node_modules/@react-aria/i18n/dist/packages/@react-aria/i18n/src/useDefaultLocale.ts","../node_modules/@react-aria/i18n/dist/packages/@react-aria/i18n/src/context.tsx","../node_modules/@react-aria/i18n/dist/packages/@react-aria/i18n/src/useCollator.ts","../node_modules/@react-aria/i18n/dist/packages/@react-aria/i18n/src/useFilter.ts","../node_modules/@react-stately/data/dist/packages/@react-stately/data/src/useListData.ts","../node_modules/@react-stately/data/dist/packages/@react-stately/data/src/useAsyncList.ts","../src/components/Autocomplete/Autocomplete.tsx","../src/components/PlaceSearch/PlaceSearch.tsx","../src/components/ListBoxItem/ListBoxItem.tsx","../src/components/Form/Form.tsx","../src/components/Dialog/Dialog.tsx","../src/components/DateRangePicker/DateRangePicker.tsx","../src/components/Checkbox/Checkbox.tsx"],"names":["TextureMenuLight","jsx","TextureMenuDark","iconMapping","AppWindow","ArrowCircleUp","ArrowDown","ArrowLeft","ArrowLineLeft","ArrowRight","ArrowSquareOut","ArrowUp","ArrowsClockwise","BatteryCharging","BatteryEmpty","BatteryFull","BatteryHigh","BatteryLow","BatteryMedium","BatteryWarning","BookOpen","BookmarkSimple","BracketsCurly","Buildings","CalendarBlank","CaretDown","CaretLeft","CaretRight","CaretUp","CarSimple","ChargingStation","ChartBar","ChartLine","ChartLineUp","Check","CheckCircle","CheckSquare","Circle","CircleDashed","CircleNotch","ClipboardText","ClockCountdown","Cloud","CloudFog","CloudLightning","CloudRain","CloudSnow","CloudSun","Code","Columns","Copy","Cursor","DotsSix","DotsThree","DownloadSimple","EnvelopeSimple","Eye","EyeClosed","EyeSlash","Export","FireSimple","Flag","GearSix","HandPointing","Info","Lightning","LightningSlash","List","ListBullets","ListNumbers","Lock","MagnifyingGlass","MapPin","MapPinArea","MaskHappy","Moon","PaperPlaneRight","PaperclipHorizontal","PencilSimple","Plugs","PlugsConnected","Plus","Power","Question","Repeat","Rocket","ShareNetwork","ShieldCheck","SignOut","SlackLogo","Sliders","Snowflake","SolarPanel","Square","SquaresFour","Stack","Sun","Terminal","ThermometerCold","ThermometerHot","ThermometerSimple","Trash","TreeEvergreen","User","UserCircle","UserPlus","Users","UsersFour","Warning","WarningCircle","WebhooksLogo","Wind","X","Icon","memo","name","size","color","weight","className","title","ariaLabel","props","IconComponent","accessibilityLabel","focusRing","showDefaultOutline","composeTailwindRenderProps","tw","composeRenderProps","twMerge","controlStyles","baseStyles","variantStyles","widthStyles","disabledStyles","enabledStyles","badgePositionStyles","badgeVariantStyles","getButtonStyles","variant","isDisabled","fullWidth","isLoading","styles","Button","icon","children","loadingText","loadingIndicator","iconPosition","iconWeight","badgeVariant","badgePosition","renderChildren","renderProps","iconElement","content","jsxs","Fragment","buttonComponent","RACButton","_className","useInputFocus","isFocused","setIsFocused","React","handleFocus","e","onFocus","handleBlur","onBlur","InputWrapper","ClearButton","onClick","getInputStateStyles","isInvalid","getInputBackgroundStyles","getInputBaseStyles","transparent","getFieldGroupStyles","isFocusWithin","Label","tooltip","isRequired","htmlFor","Description","FieldError","Input","FieldGroup","rest","getTextFieldStyles","paddingStyles","TextField","label","description","errorMessage","showSearchIcon","isClearable","onClear","type","validationResult","showPassword","setShowPassword","isPassword","AriaTextFieldComponent","getTextAreaStyles","TextArea","required","ListBox","AriaListBox","getPopoverStyles","isEntering","isExiting","enteringStyles","exitingStyles","Popover","showArrow","isSubmenu","useSlottedContext","PopoverContext","offset","AriaPopover","OverlayArrow","getSelectValueClassName","useElementFocus","Select","items","controlledSelectedKey","defaultSelectedKey","onSelectionChange","placeholder","showErrors","internalSelectedKey","setInternalSelectedKey","useState","selectedKey","handleSelectionChange","key","selectRef","useRef","AriaSelect","isOpen","SelectValue","getNumberFieldStyles","NumberField","id","useId","AriaNumberField","value","Group","AriaInput","AriaButton","getTimeFieldStyles","getSegmentStyles","isPlaceholder","TimeField","focusedSegment","setFocusedSegment","inputRef","useEffect","handleFocusIn","target","handleFocusOut","inputElement","AriaTimeField","DateInput","segment","DateSegment","DateField","AriaDateField","AriaDateInput","getToggleButtonStyles","isSelected","borderRadius","borderRight","borderLeft","ToggleButton","onPress","badgeNumber","toggleButton","RACToggleButton","Tooltip","TooltipTrigger","AriaTooltip","TextLink","href","external","asButton","externalProps","combinedClasses","Skeleton","width","height","animation","gradient","flex","stack","responsive","delay","adjustAnimationSpeedBasedOnWidth","dataTestId","visible","setVisible","timer","baseClasses","animationSpeed","numWidth","animationClasses","shapeClasses","layoutClasses","responsiveStyles","breakpoint","lineWidth","index","WORDMARK_ASPECT_RATIO","LOGO_ASPECT_RATIO","Logo","withWordmark","providedHeight","LogoComponent","texture_logo_brand_wordmark_default","texture_logo_brand_default","texture_logo_dark_wordmark_default","texture_logo_dark_default","texture_logo_white_wordmark_default","texture_logo_white_default","Loader","sizeVariants","heightVariants","Heading","Tag","sizeClasses","heightClasses","CopyToClipboard","showTooltip","setShowTooltip","copyButton","textToCopy","getTrackClassName","getHandleClassName","Switch","AriaSwitch","ProgressBar","rightLabel","progressWidth","hideLabels","AriaProgressBar","percentage","valueText","isIndeterminate","getCellStyles","Calendar","AriaCalendar","CalendarHeader","CalendarGrid","CalendarGridHeader","CalendarGridBody","date","CalendarCell","Text","direction","useLocale","buttonSize","AriaCalendarGridHeader","day","CalendarHeaderCell","getCellClassName","selectionState","selectionStateClasses","disabledClasses","RangeCalendar","AriaRangeCalendar","formattedDate","isSelectionStart","isSelectionEnd","_isFocusVisible","$b5e257d569688ac6$var$defaultContext","$b5e257d569688ac6$var$SSRContext","$670gB$react","$b5e257d569688ac6$var$IsSSRContext","$b5e257d569688ac6$var$canUseDOM","$b5e257d569688ac6$var$componentIds","$b5e257d569688ac6$var$useCounter","ctx","$670gB$useContext","ref","$670gB$useRef","_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner","_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","currentOwner","prevComponentValue","$b5e257d569688ac6$var$useLegacySSRSafeId","defaultId","counter","prefix","$b5e257d569688ac6$var$useModernSSRSafeId","didSSR","$670gB$useState","$b5e257d569688ac6$export$535bd6ca7f90a273","$b5e257d569688ac6$var$getSnapshot","$b5e257d569688ac6$var$getServerSnapshot","$b5e257d569688ac6$var$subscribe","onStoreChange","$148a7a147e38ea7f$var$RTL_SCRIPTS","$148a7a147e38ea7f$var$RTL_LANGS","$148a7a147e38ea7f$export$702d680b21cbd764","localeString","locale","textInfo","lang","$1e5a04cdaf7d1af8$var$localeSymbol","$1e5a04cdaf7d1af8$export$f09106e7c6677ec5","$1e5a04cdaf7d1af8$var$currentLocale","$1e5a04cdaf7d1af8$var$listeners","$1e5a04cdaf7d1af8$var$updateLocale","listener","$1e5a04cdaf7d1af8$export$188ec29ebc2bdc3a","isSSR","defaultLocale","setDefaultLocale","$ffhGL$useState","$ffhGL$useEffect","$18f2051aff69b9bf$var$I18nContext","$h9FiU$react","$18f2051aff69b9bf$export$43bb16f9c6d9e3f7","$h9FiU$useContext","$325a3faab7a68acd$var$cache","$325a3faab7a68acd$export$a16aca283550c30d","options","cacheKey","a","b","formatter","$bb77f239b46e8c72$export$3274cf84b703fff","collator","startsWith","$21ck9$useCallback","string","substring","endsWith","contains","scan","sliceLen","slice","$21ck9$useMemo","$0d86e9c8f07f9a7b$export$79c0c687a5963b0a","opts","dispatch","cursor","getKey","selectedKeys","state","filterText","values","$0d86e9c8f07f9a7b$var$insert","item","keys","keySet","selection","toIndex","copy","indices","$0d86e9c8f07f9a7b$var$move","newValue","moves","from","j","move","$f86e6c1ec7da6ebb$var$reducer","data","action","_action_filterText","_action_sortDescriptor","_action_updater","_action_selectedKeys","_action_filterText1","_action_items","_action_sortDescriptor1","_data_abortController","_action_filterText2","_action_updater1","_action_selectedKeys1","_action_items1","_action_sortDescriptor2","_data_abortController1","_action_filterText3","_action_abortController","_action_updater2","$f86e6c1ec7da6ebb$export$bc3384a35de93d66","load","sort","initialSelectedKeys","initialSortDescriptor","initialFilterText","$fh1mr$useReducer","dispatchFetch","fn","abortController","previousFilterText","response","_response_filterText","didDispatchInitialFetch","$fh1mr$useRef","$fh1mr$useEffect","sortDescriptor","sizeStylesObject","textSizeStylesObject","iconSizeClassMap","getInputGroupStyles","sizeStyles","stateClasses","useDebounce","debouncedValue","setDebouncedValue","handleRestRequest","config","signal","baseUrl","params","finalUrl","json","error","handleGraphQLRequest","query","obj","Autocomplete","staticItems","sections","requestConfig","defaultFilter","renderLeftIcon","autoFocus","onLoadError","inputValue","setInputValue","debouncedInputValue","_error","setError","setIsLoading","textSizeClass","dynamicItems","result","handleLoadError","ComboBox","section","isMapboxResponse","MAPBOX_TOKEN","PlaceSearch","onSelect","searchTypes","countryRestrictions","proximity","itemDataRef","loadedItemsRef","feature","renderItem","itemData","nameParts","primaryText","secondaryText","selected","itemHeightStylesObject","ListBoxItem","AriaListBoxItem","Form","RACForm","Dialog","RACDialog","DateRangePicker","AriaDateRangePicker","CalendarIcon","getCheckboxStyles","getBoxStyles","colorStyles","iconStyles","Checkbox","otherProps","AriaCheckbox","checkboxContent","Minus"],"mappings":"yXAmHMA,IAAAA,EAAAA,CAAmB,IACvBC,cAAAA,CAAC,OAAI,KAAM,CAAA,IAAA,CAAK,MAAO,CAAA,IAAA,CAAK,OAAQ,CAAA,WAAA,CAAY,IAAK,CAAA,MAAA,CAAO,KAAM,CAAA,4BAAA,CAElE,CAGIC,CAAAA,EAAAA,CAAkB,IACtBD,cAAAA,CAAC,KAAI,CAAA,CAAA,KAAA,CAAM,KAAK,MAAO,CAAA,IAAA,CAAK,OAAQ,CAAA,WAAA,CAAY,IAAK,CAAA,MAAA,CAAO,KAAM,CAAA,4BAAA,CAElE,EAIWE,EAAc,CAAA,CACzB,SAAAC,CAAAA,eAAAA,CACA,aAAAC,CAAAA,mBAAAA,CACA,SAAAC,CAAAA,eAAAA,CACA,UAAAC,eACA,CAAA,aAAA,CAAAC,mBACA,CAAA,UAAA,CAAAC,gBACA,CAAA,cAAA,CAAAC,oBACA,CAAA,OAAA,CAAAC,aACA,CAAA,eAAA,CAAAC,qBACA,CAAA,eAAA,CAAAC,qBACA,CAAA,YAAA,CAAAC,kBACA,CAAA,WAAA,CAAAC,kBACA,WAAAC,CAAAA,iBAAAA,CACA,UAAAC,CAAAA,gBAAAA,CACA,aAAAC,CAAAA,mBAAAA,CACA,cAAAC,CAAAA,oBAAAA,CACA,QAAAC,CAAAA,cAAAA,CACA,cAAAC,CAAAA,oBAAAA,CACA,aAAAC,CAAAA,mBAAAA,CACA,SAAAC,CAAAA,eAAAA,CACA,cAAAC,mBACA,CAAA,SAAA,CAAAC,eACA,CAAA,SAAA,CAAAC,eACA,CAAA,UAAA,CAAAC,gBACA,CAAA,OAAA,CAAAC,aACA,CAAA,SAAA,CAAAC,eACA,CAAA,eAAA,CAAAC,qBACA,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CAAA,EAAGia,GAAkBja,CAAW,CAAC,CAAIpC,CAAAA,EAAAA,CAAAA,EAAa,EAAE,CAAA,CAClF,CAEC,CAAA,QAAA,CAACoC,CAAgB,EAAA,CAChB,GAAM,CAAE,UAAAsH,CAAAA,CAAAA,CAAY,eAAA6E,CAAAA,CAAAA,CAAiB,GAAGhK,CAAK,CAAA,CAAInC,CAC3Cwa,CAAAA,CAAAA,CACJlkB,cAAC,CAAA,KAAA,CAAA,CACC,SAAW4jB,CAAAA,EAAAA,CAAa,CACtB,UAAA5S,CAAAA,CAAAA,CACA,eAAA6E,CAAAA,CAAAA,CACA,GAAGhK,CACL,CAAC,CAAA,CAEA,SAAAgK,CACC7V,CAAAA,cAAAA,CAACmkB,iBAAA,CAAA,CAAM,aAAW,CAAA,IAAA,CAAC,SAAWL,CAAAA,EAAAA,CAAY,CACxC9S,CAAAA,CAAAA,CACFhR,cAACiC,CAAAA,iBAAAA,CAAA,CAAM,aAAA,CAAW,IAAC,CAAA,SAAA,CAAW6hB,GAAY,CACxC,CAAA,IAAA,CACN,CAGF,CAAA,OACEja,eAAAC,CAAAA,mBAAAA,CAAA,CACG,QAAA,CAAA,CAAAoa,EACA,OAAOhb,CAAAA,EAAa,UAAaA,CAAAA,CAAAA,CAASQ,CAAW,CAAA,CAAIR,CAC5D,CAAA,CAAA,CAEJ,EACF,CAEJ","file":"index.cjs","sourcesContent":["import { memo } from \"react\";\n\nimport {\n AppWindow,\n ArrowCircleUp,\n ArrowDown,\n ArrowLeft,\n ArrowLineLeft,\n ArrowRight,\n ArrowSquareOut,\n ArrowUp,\n ArrowsClockwise,\n BatteryCharging,\n BatteryEmpty,\n BatteryFull,\n BatteryHigh,\n BatteryLow,\n BatteryMedium,\n BatteryWarning,\n BookmarkSimple,\n BookOpen,\n BracketsCurly,\n Buildings,\n CalendarBlank,\n CaretDown,\n CaretLeft,\n CaretRight,\n CaretUp,\n CarSimple,\n ChargingStation,\n ChartBar,\n ChartLine,\n ChartLineUp,\n Check,\n CheckCircle,\n CheckSquare,\n Circle,\n CircleDashed,\n CircleNotch,\n ClipboardText,\n ClockCountdown,\n Cloud,\n CloudFog,\n CloudLightning,\n CloudRain,\n CloudSnow,\n CloudSun,\n Code,\n Columns,\n Copy,\n Cursor,\n DotsSix,\n DotsThree,\n DownloadSimple,\n EnvelopeSimple,\n Eye,\n EyeClosed,\n EyeSlash,\n Export,\n FireSimple,\n Flag,\n GearSix,\n HandPointing,\n Info,\n Lightning,\n LightningSlash,\n List,\n ListBullets,\n ListNumbers,\n Lock,\n MagnifyingGlass,\n MapPin,\n MapPinArea,\n MaskHappy,\n Moon,\n PaperPlaneRight,\n PaperclipHorizontal,\n PencilSimple,\n Plugs,\n PlugsConnected,\n Plus,\n Power,\n Question,\n Repeat,\n Rocket,\n ShareNetwork,\n ShieldCheck,\n SignOut,\n SlackLogo,\n Sliders,\n Snowflake,\n SolarPanel,\n Square,\n SquaresFour,\n Stack,\n Sun,\n Terminal,\n ThermometerCold,\n ThermometerHot,\n ThermometerSimple,\n Trash,\n TreeEvergreen,\n User,\n UserCircle,\n UserPlus,\n Users,\n UsersFour,\n Warning,\n WarningCircle,\n WebhooksLogo,\n Wind,\n X,\n} from \"@phosphor-icons/react\";\n\n// Custom SVG icons - these would need to be created or imported properly\nconst TextureMenuLight = () => (\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n {/* SVG path data would go here */}\n </svg>\n);\n\nconst TextureMenuDark = () => (\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n {/* SVG path data would go here */}\n </svg>\n);\n\n// Create a mapping of icon components with a more flexible type\nexport const iconMapping = {\n AppWindow,\n ArrowCircleUp,\n ArrowDown,\n ArrowLeft,\n ArrowLineLeft,\n ArrowRight,\n ArrowSquareOut,\n ArrowUp,\n ArrowsClockwise,\n BatteryCharging,\n BatteryEmpty,\n BatteryFull,\n BatteryHigh,\n BatteryLow,\n BatteryMedium,\n BatteryWarning,\n BookOpen,\n BookmarkSimple,\n BracketsCurly,\n Buildings,\n CalendarBlank,\n CaretDown,\n CaretLeft,\n CaretRight,\n CaretUp,\n CarSimple,\n ChargingStation,\n ChartBar,\n ChartLine,\n ChartLineUp,\n Check,\n CheckCircle,\n CheckSquare,\n Circle,\n CircleDashed,\n CircleNotch,\n ClipboardText,\n ClockCountdown,\n Cloud,\n CloudFog,\n CloudLightning,\n CloudRain,\n CloudSnow,\n CloudSun,\n Code,\n Columns,\n Copy,\n Cursor,\n DotsSix,\n DotsThree,\n DownloadSimple,\n EnvelopeSimple,\n Eye,\n EyeClosed,\n EyeSlash,\n Export,\n FireSimple,\n Flag,\n GearSix,\n HandPointing,\n Info,\n Lightning,\n LightningSlash,\n List,\n ListBullets,\n ListNumbers,\n Lock,\n MagnifyingGlass,\n MapPin,\n MapPinArea,\n MaskHappy,\n Moon,\n PaperPlaneRight,\n PaperclipHorizontal,\n PencilSimple,\n Plugs,\n PlugsConnected,\n Plus,\n Power,\n Question,\n Repeat,\n Rocket,\n ShareNetwork,\n ShieldCheck,\n SignOut,\n SlackLogo,\n Sliders,\n Snowflake,\n SolarPanel,\n Square,\n SquaresFour,\n Stack,\n Sun,\n Terminal,\n ThermometerCold,\n ThermometerHot,\n ThermometerSimple,\n Trash,\n TreeEvergreen,\n User,\n UserCircle,\n UserPlus,\n Users,\n UsersFour,\n Warning,\n WarningCircle,\n WebhooksLogo,\n Wind,\n X,\n TextureMenuLight,\n TextureMenuDark,\n} as const;\n\n// Define a type for all available icon names based on the iconMapping object\nexport type IconName = keyof typeof iconMapping;\n\ninterface ExtendedIconProps {\n name: IconName;\n size?: number;\n color?: string;\n weight?: \"thin\" | \"light\" | \"regular\" | \"bold\" | \"fill\" | \"duotone\";\n className?: string;\n title?: string;\n ariaLabel?: string;\n [key: string]: unknown; // For other props that might be passed through\n}\n\nexport const Icon = memo(\n ({ name, size = 24, color, weight, className, title, ariaLabel, ...props }: ExtendedIconProps) => {\n if (!name) {\n return null;\n }\n\n const IconComponent = iconMapping[name];\n\n if (!IconComponent) {\n if (process.env.NODE_ENV === \"development\") {\n console.error(`Icon with name \"${name}\" does not exist.`);\n }\n return null;\n }\n\n // Use aria-label if provided, otherwise use title or name\n const accessibilityLabel = ariaLabel || title || `${name} icon`;\n\n // For custom SVG icons, we need to handle them differently\n if (name === \"TextureMenuLight\" || name === \"TextureMenuDark\") {\n return (\n <IconComponent data-testid={`${name}-icon`} className={className} aria-label={accessibilityLabel} {...props} />\n );\n }\n\n // For Phosphor icons\n return (\n <IconComponent\n size={size}\n color={color}\n data-testid={`${name}-icon`}\n className={className}\n weight={weight}\n aria-label={accessibilityLabel}\n {...props}\n />\n );\n },\n);\n\nIcon.displayName = \"Icon\";\n","import { DateTime } from \"luxon\";\nimport { composeRenderProps } from \"react-aria-components\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport { ColorModeProvider, useColorMode } from \"./ColorModeProvider\";\n\nexport const formatIsoDateString = (isoDateString: string) => {\n const dateTime = DateTime.fromISO(isoDateString);\n\n return {\n toFullDateTime() {\n return dateTime.toLocaleString(DateTime.DATETIME_MED_WITH_WEEKDAY);\n },\n toRelative() {\n return dateTime.toRelative();\n },\n };\n};\n\nexport function focusRing(showDefaultOutline: boolean = false) {\n const baseClasses = showDefaultOutline\n ? \"outline outline-1 outline-border-input focus:outline-2 focus:outline-border-focus focus:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2\"\n : \"outline-none focus-visible:outline focus-visible:outline-2 focus-visible:outline-border-focus focus-visible:outline-offset-0 invalid:outline-2 invalid:outline-feedback-error-border group-invalid:outline-2 group-invalid:outline-feedback-error-border forced-colors:focus:outline-[Highlight] forced-colors:focus:outline-2 forced-colors:focus:outline-offset-2\";\n return `${baseClasses}`;\n}\n\nexport function composeTailwindRenderProps<T>(\n className: string | ((v: T) => string) | undefined,\n tw: string,\n): string | ((v: T) => string) {\n return composeRenderProps(className, (className) => twMerge(tw, className));\n}\n\nexport function toTitleCase(text: string): string {\n if (!text) return text;\n const articles = new Set([\"a\", \"an\", \"the\", \"and\", \"but\", \"or\", \"for\", \"nor\", \"on\", \"at\", \"to\", \"with\"]);\n return text\n .toLocaleLowerCase()\n .split(/\\s+/)\n .map((word, index) =>\n articles.has(word) && index !== 0 ? word : word.charAt(0).toLocaleUpperCase() + word.slice(1),\n )\n .join(\" \");\n}\n\nexport function truncateMiddle(value: string, length: number = 16): string {\n if (!value) return value;\n if (value.length <= length) return value;\n const mid = Math.floor(length / 2);\n return `${value.slice(0, mid)}...${value.slice(-mid)}`;\n}\n\nexport function toSentenceCase(text: string): string {\n if (!text) return text;\n return text.charAt(0).toLocaleUpperCase() + text.slice(1).toLocaleLowerCase();\n}\n\nexport function formatPhoneNumber(phone: string): string {\n if (!phone) return phone;\n return phone.replace(/(\\d{3})(\\d{3})(\\d{4})/, \"($1) $2-$3\");\n}\n\nexport function toDateString(date: string, showTime: boolean = false): string {\n if (!date) return date;\n\n // Normalize the date string to ensure uppercase \"T\" and \"Z\"\n const normalizedDate = date.replace(\"t\", \"T\").replace(\"z\", \"Z\");\n\n const dt = DateTime.fromISO(normalizedDate); // Parse the ISO date string\n\n if (!dt.isValid) {\n return \"Invalid Date\";\n }\n\n return showTime\n ? dt.toLocaleString(DateTime.DATETIME_SHORT) // Includes both date and time\n : dt.toLocaleString(DateTime.DATE_SHORT); // Date only\n}\n\nconst colorCache = new Map<string, string>();\n\nexport const getResolvedColor = (variableName: string): string => {\n // Early return if running in non-browser environment\n if (typeof window === \"undefined\") return \"\";\n\n // Return cached value if available\n if (colorCache.has(variableName)) {\n return colorCache.get(variableName)!;\n }\n\n try {\n const tempElement = document.createElement(\"div\");\n tempElement.style.color = `var(${variableName})`;\n document.body.appendChild(tempElement);\n const resolvedColor = getComputedStyle(tempElement).color;\n document.body.removeChild(tempElement);\n // Cache the result\n colorCache.set(variableName, resolvedColor);\n return resolvedColor;\n } catch (error) {\n console.error(`Failed to resolve color for ${variableName}:`, error);\n return \"\";\n }\n};\n","/**\n * Control-specific style utilities for form elements and interactive components.\n * These styles use CSS variables defined in the theme for consistent sizing\n * and spacing across all control elements.\n *\n * Text sizes follow the relationships defined in theme.css:\n * sm: --control-text-sm (maps to --text-xs)\n * md: --control-text-md (maps to --text-sm)\n * lg: --control-text-lg (maps to --text-base)\n * xl: --control-text-xl (maps to --text-lg)\n */\n\nexport type Size = \"sm\" | \"md\" | \"lg\" | \"xl\";\n\nexport const controlStyles = {\n sm: {\n text: \"text-[length:var(--control-text-sm)]\",\n height: \"h-[var(--control-sm-height)]\",\n padding: \"px-[var(--control-padding-sm)]\",\n gap: \"gap-[var(--control-gap-sm)]\",\n },\n md: {\n text: \"text-[length:var(--control-text-md)]\",\n height: \"h-[var(--control-md-height)]\",\n padding: \"px-[var(--control-padding-md)]\",\n gap: \"gap-[var(--control-gap-md)]\",\n },\n lg: {\n text: \"text-[length:var(--control-text-lg)]\",\n height: \"h-[var(--control-lg-height)]\",\n padding: \"px-[var(--control-padding-lg)]\",\n gap: \"gap-[var(--control-gap-lg)]\",\n },\n xl: {\n text: \"text-[length:var(--control-text-xl)]\",\n height: \"h-[var(--control-xl-height)]\",\n padding: \"px-[var(--control-padding-xl)]\",\n gap: \"gap-[var(--control-gap-xl)]\",\n },\n} as const;\n","import {\n composeRenderProps,\n Button as RACButton,\n ButtonProps as RACButtonProps,\n ButtonRenderProps,\n} from \"react-aria-components\";\nimport { Icon } from \"../Icon\";\nimport { focusRing } from \"../../utils\";\nimport type { ComponentProps } from \"react\";\nimport type { Size } from \"../../utils/controlStyles\";\nimport { controlStyles } from \"../../utils/controlStyles\";\n\ntype IconName = ComponentProps<typeof Icon>[\"name\"];\n\nexport interface ButtonProps extends RACButtonProps {\n variant?: \"default\" | \"primary\" | \"secondary\" | \"destructive\" | \"icon\" | \"link\" | \"unstyled\" | \"ghost\";\n size?: Size;\n badgeNumber?: number;\n badgeVariant?: \"primary\" | \"destructive\";\n badgePosition?: \"top-right\" | \"top-left\" | \"bottom-right\" | \"bottom-left\";\n fullWidth?: boolean;\n icon?: IconName;\n iconWeight?: \"thin\" | \"light\" | \"regular\" | \"bold\" | \"fill\" | \"duotone\";\n iconPosition?: \"left\" | \"right\";\n isLoading?: boolean;\n loadingText?: string;\n loadingIndicator?: React.ReactNode;\n}\n\nconst baseStyles =\n \"flex font-medium justify-center items-center gap-2 text-center transition rounded-sm whitespace-nowrap box-border\";\n\nconst variantStyles = {\n default:\n \"bg-text-body text-neutral-white hover:brightness-90 forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent\",\n primary:\n \"bg-action-primary text-neutral-white hover:brightness-90 forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent\",\n secondary:\n \"bg-transparent text-text-body border-2 border-border-muted hover:bg-text-body/5 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]\",\n ghost:\n \"border-none text-text-body hover:bg-text-body/5 forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace]\",\n destructive:\n \"bg-transparent text-action-destructive border-2 border-border-muted hover:bg-action-destructive/5 forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[Mark]\",\n link: \"!text-action-primary hover:text-action-primary/90 hover:underline hover:decoration-2 hover:underline-offset-4\",\n icon: \"border-none text-text-body hover:bg-text-body/5 forced-colors:text-[ButtonText] forced-colors:hover:bg-[ButtonFace] p-2 flex-shrink-0\",\n unstyled: \"bg-transparent\",\n};\n\nconst widthStyles = {\n full: \"w-full\",\n default: \"w-fit\",\n};\n\nconst disabledStyles = \"opacity-control-hover cursor-not-allowed pointer-events-none grayscale\";\nconst enabledStyles = \"opacity-100 cursor-pointer\";\n\nconst badgePositionStyles = {\n \"top-right\": \"-right-2 -top-2\",\n \"top-left\": \"-left-2 -top-2\",\n \"bottom-right\": \"-right-2 -bottom-2\",\n \"bottom-left\": \"-left-2 -bottom-2\",\n} as const;\n\nconst badgeVariantStyles = {\n primary: \"bg-action-primary text-white\",\n destructive: \"bg-action-destructive text-white\",\n} as const;\n\nfunction getButtonStyles(props: ButtonProps) {\n const { variant = \"default\", size = \"md\", isDisabled, fullWidth = false, isLoading = false } = props;\n\n let styles = variant === \"unstyled\" ? \"\" : `${baseStyles} ${variantStyles[variant]}`;\n\n // Add size styles using controlStyles\n if (variant !== \"unstyled\") {\n styles += ` ${controlStyles[size].text} ${controlStyles[size].height} ${controlStyles[size].padding} ${controlStyles[size].gap}`;\n }\n\n if (isDisabled || isLoading) {\n styles += ` ${disabledStyles}`;\n } else {\n styles += ` ${enabledStyles}`;\n }\n\n if (fullWidth) {\n styles += ` ${widthStyles.full}`;\n } else {\n styles += ` ${widthStyles.default}`;\n }\n\n return `${styles} ${focusRing()}`;\n}\n\nexport function Button(props: ButtonProps) {\n const {\n icon,\n children,\n isLoading = false,\n loadingText,\n loadingIndicator,\n size = \"md\",\n iconPosition = \"left\",\n iconWeight,\n badgeVariant = \"primary\",\n badgePosition = \"top-right\",\n } = props;\n\n const renderChildren = (renderProps: ButtonRenderProps & { defaultChildren: React.ReactNode }) => {\n const iconElement = icon ? (\n <Icon name={icon} className={`icon-[--control-icon-size-${size}]`} weight={iconWeight} />\n ) : null;\n\n const content = (\n <>\n {iconPosition === \"left\" && iconElement}\n {typeof children === \"function\" ? children(renderProps) : children}\n {iconPosition === \"right\" && iconElement}\n </>\n );\n\n if (isLoading) {\n return (\n <div className=\"relative inline-flex items-center justify-center\">\n <div className=\"absolute inset-0 flex items-center justify-center\">\n {loadingIndicator || (\n <Icon\n name=\"CircleNotch\"\n className={`animate-spin icon-[--control-icon-size-${size}]`}\n aria-hidden=\"true\"\n />\n )}\n </div>\n <div className=\"invisible\" aria-hidden=\"true\">\n {content}\n </div>\n {loadingText && (\n <span className=\"sr-only\" role=\"status\" aria-live=\"polite\">\n {loadingText}\n </span>\n )}\n </div>\n );\n }\n\n return content;\n };\n\n const buttonComponent = (\n <RACButton\n {...props}\n className={composeRenderProps(props.className, (_className) => {\n const styles = getButtonStyles(props);\n return `${styles} ${_className || \"\"} ${isLoading ? \"aria-busy\" : \"\"}`.trim();\n })}\n >\n {renderChildren}\n </RACButton>\n );\n\n if (props.badgeNumber && props.badgeNumber > 0) {\n return (\n <div className=\"relative\">\n {buttonComponent}\n <span\n className={`absolute ${badgePositionStyles[badgePosition]} flex h-5 w-5 items-center justify-center rounded-full ${badgeVariantStyles[badgeVariant]} text-xs`}\n aria-label={`${props.badgeNumber} items`}\n >\n {props.badgeNumber}\n </span>\n </div>\n );\n }\n\n return buttonComponent;\n}\n","/**\n * Field Component System\n *\n * A comprehensive system for building form fields and input components with consistent\n * styling, accessibility, and behavior. This module provides both base components and\n * styling utilities that can be composed to create complex form controls.\n *\n * Key Features:\n * - Consistent styling across all form elements\n * - Built-in state handling (invalid, disabled, focused)\n * - Accessibility support out of the box\n * - Flexible composition through style utilities\n *\n * @example Basic Usage\n * ```tsx\n * <Label htmlFor=\"name\">Name</Label>\n * <Input id=\"name\" size=\"md\" />\n * ```\n *\n * @example Complex Field with All Components\n * ```tsx\n * <div>\n * <Label htmlFor=\"email\" tooltip=\"Enter your work email\">Email</Label>\n * <Input\n * id=\"email\"\n * type=\"email\"\n * isInvalid={hasError}\n * isDisabled={isSubmitting}\n * />\n * <Description>We'll never share your email</Description>\n * {hasError && <FieldError>Please enter a valid email</FieldError>}\n * </div>\n * ```\n */\n\nimport React from \"react\";\nimport { Icon } from \"../Icon/Icon\";\nimport { twMerge } from \"tailwind-merge\";\nimport type { TextProps } from \"react-aria-components\";\nimport { controlStyles, type Size } from \"../../utils/controlStyles\";\n\n// Base style props interface for all input-like components\nexport interface InputStyleProps {\n /** Whether the input is in an invalid state */\n isInvalid?: boolean;\n /** Whether the input is disabled */\n isDisabled?: boolean;\n /** Whether the input should have a transparent background */\n transparent?: boolean;\n /** The size variant of the input */\n size?: Size;\n /** Whether the input is currently focused */\n isFocused?: boolean;\n /** Additional CSS classes to apply */\n className?: string;\n}\n\n// Common interfaces\nexport interface BaseProps {\n /** The size variant of the component */\n size?: Size;\n /** Additional CSS classes to apply */\n className?: string;\n}\n\nexport interface BaseInputProps extends BaseProps {\n /** Whether the input should have a transparent background */\n transparent?: boolean;\n /** Whether to show a clear button when the input has a value */\n isClearable?: boolean;\n /** Callback when the clear button is clicked */\n onClear?: () => void;\n /** Whether to show a search icon */\n showSearchIcon?: boolean;\n}\n\nexport interface LabelProps extends BaseProps {\n /** The label content */\n children: React.ReactNode;\n /** Optional tooltip text to show next to the label */\n tooltip?: string;\n /** Whether to show a required field indicator (*) */\n isRequired?: boolean;\n /** The ID of the input this label is associated with */\n htmlFor?: string;\n}\n\nexport interface FieldErrorProps extends BaseProps {\n /** The error message to display */\n children: React.ReactNode;\n}\n\nexport interface InputProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, \"size\">, InputStyleProps {\n /** The size variant of the input */\n size?: Size;\n}\n\nexport interface DescriptionProps extends Omit<TextProps, \"className\">, BaseProps {\n /** The description content */\n children: React.ReactNode;\n}\n\nexport interface FieldGroupProps extends Omit<React.HTMLAttributes<HTMLDivElement>, \"children\">, InputStyleProps {\n /** Whether any child of the group is focused */\n isFocusWithin?: boolean;\n /** Children can be either a ReactNode or a render function */\n children?: React.ReactNode | ((props: InputStyleProps) => React.ReactNode);\n}\n\n/**\n * Hook for managing input focus state\n */\nexport function useInputFocus() {\n const [isFocused, setIsFocused] = React.useState(false);\n\n const handleFocus = React.useCallback(\n (e: React.FocusEvent<HTMLInputElement>, onFocus?: (e: React.FocusEvent<HTMLInputElement>) => void) => {\n setIsFocused(true);\n onFocus?.(e);\n },\n [],\n );\n\n const handleBlur = React.useCallback(\n (e: React.FocusEvent<HTMLInputElement>, onBlur?: (e: React.FocusEvent<HTMLInputElement>) => void) => {\n setIsFocused(false);\n onBlur?.(e);\n },\n [],\n );\n\n return { isFocused, handleFocus, handleBlur };\n}\n\n/**\n * Wrapper component for input containers\n */\nexport function InputWrapper({ children, className }: { children: React.ReactNode; className?: string }) {\n return <div className={twMerge(\"relative w-full\", className)}>{children}</div>;\n}\n\n/**\n * Clear button component for inputs\n */\nexport function ClearButton({\n onClick,\n size = \"md\",\n className,\n}: {\n onClick: () => void;\n size?: Size;\n className?: string;\n}) {\n return (\n <button\n type=\"button\"\n onClick={(e) => {\n e.preventDefault();\n e.stopPropagation();\n onClick();\n }}\n className={twMerge(\n \"absolute right-2 top-1/2 -translate-y-1/2 transform text-text-muted hover:text-text-body\",\n className,\n )}\n aria-label=\"Clear input\"\n onMouseDown={(e) => {\n e.preventDefault();\n e.stopPropagation();\n }}\n >\n <Icon name=\"X\" size={size === \"sm\" ? 16 : 20} />\n </button>\n );\n}\n\n/**\n * Generates state-specific styles for inputs based on their current state\n * (invalid, disabled, focused).\n *\n * State Priority:\n * 1. Disabled (overrides all other states)\n * 2. Invalid + Focused\n * 3. Invalid\n * 4. Focused\n * 5. Default\n *\n * @example\n * ```tsx\n * const styles = getInputStateStyles({ isInvalid: true, isFocused: true });\n * ```\n */\nexport function getInputStateStyles(props: { isInvalid?: boolean; isDisabled?: boolean; isFocused?: boolean }) {\n const { isInvalid, isDisabled, isFocused } = props;\n const baseStyles = \"border rounded-[var(--control-border-radius)] \";\n\n // Disabled state overrides all others\n if (isDisabled) {\n return `${baseStyles} border-border-muted focus:outline-none`;\n }\n\n // Handle combinations of invalid and focus states\n if (isInvalid && isFocused) {\n return `${baseStyles} border-feedback-error-border outline-[1.5px] outline-[var(--control-focus-ring-color-error)]`;\n }\n\n if (isInvalid) {\n return `${baseStyles} border-feedback-error-border`;\n }\n\n if (isFocused) {\n return `${baseStyles} !outline-[1.5px] !outline-[var(--control-focus-ring-color)] ![--tw-outline-style:solid]`;\n }\n\n // Default state\n return `${baseStyles}`;\n}\n\n/**\n * Generates background styles based on the transparent and disabled props.\n * Uses Tailwind classes for consistent styling across light/dark modes.\n */\nexport function getInputBackgroundStyles(props: { transparent?: boolean; isDisabled?: boolean }) {\n if (props.isDisabled) {\n return \"bg-background-muted\";\n }\n return props.transparent ? \"bg-transparent\" : \"bg-background-input\";\n}\n\n/**\n * Generates the complete set of base styles for input components.\n * This includes state styles, background, sizing, and custom classes.\n *\n * @example\n * ```tsx\n * const styles = getInputBaseStyles({\n * isInvalid: formState.hasError,\n * isDisabled: isLoading,\n * size: \"md\"\n * });\n * ```\n */\nexport function getInputBaseStyles(props: InputStyleProps) {\n const { isInvalid, isDisabled, isFocused, transparent, size = \"md\", className } = props;\n\n return twMerge(\n \"w-full\",\n getInputStateStyles({ isInvalid, isDisabled, isFocused }),\n getInputBackgroundStyles({ transparent, isDisabled }),\n controlStyles[size].text,\n controlStyles[size].height,\n controlStyles[size].padding,\n className,\n );\n}\n\n/**\n * Generates styles for grouped form elements (like input with buttons)\n *\n * @example\n * ```tsx\n * <div className={getFieldGroupStyles({ size: \"md\" })}>\n * <Input />\n * <Button>Submit</Button>\n * </div>\n * ```\n */\nexport function getFieldGroupStyles(props: FieldGroupProps) {\n const { size = \"md\", isFocusWithin, isInvalid, isDisabled, transparent, className } = props;\n\n return twMerge(\n \"group flex items-center rounded-sm overflow-hidden\",\n !transparent && \"bg-background-input\",\n transparent && \"bg-transparent\",\n controlStyles[size].height,\n getInputStateStyles({ isFocused: isFocusWithin, isInvalid, isDisabled }),\n className,\n );\n}\n\n// Components\n\n/**\n * Label component for form fields. Supports tooltips and required field indicators.\n *\n * @example\n * ```tsx\n * <Label\n * htmlFor=\"email\"\n * tooltip=\"Enter your work email\"\n * isRequired\n * >\n * Email Address\n * </Label>\n * ```\n */\nexport function Label({ children, size = \"md\", tooltip, isRequired, className, htmlFor }: LabelProps) {\n return (\n <label\n htmlFor={htmlFor}\n className={twMerge(controlStyles[size].text, \"!text-text-caption flex items-center gap-1\", className)}\n >\n {children}\n {isRequired && <span className=\"text-feedback-error-text\">*</span>}\n {tooltip && (\n <span className=\"text-text-muted\">\n <Icon name=\"Info\" size={size === \"sm\" ? 16 : 20} />\n </span>\n )}\n </label>\n );\n}\n\n/**\n * Description component for providing additional context about a form field.\n *\n * @example\n * ```tsx\n * <Description>Must be at least 8 characters</Description>\n * ```\n */\nexport function Description({ size = \"md\", className, children, ...props }: DescriptionProps) {\n return (\n <div {...props} className={twMerge(\"leading-[2.25] text-text-muted\", controlStyles[size].text, className)}>\n {children}\n </div>\n );\n}\n\n/**\n * Error message component for form fields. Automatically handles\n * accessibility attributes for screen readers.\n *\n * @example\n * ```tsx\n * {hasError && <FieldError>This field is required</FieldError>}\n * ```\n */\nexport function FieldError({ children, size = \"md\", className }: FieldErrorProps) {\n return (\n <div role=\"alert\" className={twMerge(controlStyles[size].text, \"text-feedback-error-text\", className)}>\n {children}\n </div>\n );\n}\n\n/**\n * Base input component with consistent styling and state handling.\n * Extends the native input element with our custom styling system.\n *\n * @example\n * ```tsx\n * <Input\n * size=\"md\"\n * isInvalid={hasError}\n * isDisabled={isLoading}\n * transparent={false}\n * />\n * ```\n */\nexport function Input({ size = \"md\", isInvalid, isDisabled, isFocused, transparent, className, ...props }: InputProps) {\n return (\n <input\n className={getInputBaseStyles({\n isInvalid,\n isDisabled,\n isFocused,\n transparent,\n size,\n className,\n })}\n {...props}\n />\n );\n}\n\n/**\n * Container for grouping form elements with consistent styling.\n * Useful for creating compound components like input with buttons.\n *\n * @example\n * ```tsx\n * <FieldGroup>\n * <Input placeholder=\"Search...\" />\n * <Button>Search</Button>\n * </FieldGroup>\n * ```\n */\nexport function FieldGroup(props: FieldGroupProps) {\n const { children, ...rest } = props;\n return (\n <div {...rest} className={getFieldGroupStyles(props)}>\n {typeof children === \"function\" ? children(props) : children}\n </div>\n );\n}\n","import React from \"react\";\nimport type {\n TextFieldProps as AriaTextFieldProps,\n ValidationResult,\n TextFieldRenderProps,\n} from \"react-aria-components\";\nimport { TextField as AriaTextFieldComponent } from \"react-aria-components\";\nimport {\n Description,\n FieldError,\n Input,\n Label,\n getInputBaseStyles,\n BaseInputProps,\n useInputFocus,\n InputWrapper,\n ClearButton,\n} from \"../Field\";\nimport { composeTailwindRenderProps } from \"../../utils\";\nimport { Icon } from \"../Icon/Icon\";\nimport { twMerge } from \"tailwind-merge\";\nimport type { Size } from \"../../utils/controlStyles\";\n\nconst getTextFieldStyles = (props: {\n isInvalid?: boolean;\n isDisabled?: boolean;\n isFocused?: boolean;\n transparent?: boolean;\n size?: Size;\n showSearchIcon?: boolean;\n isClearable?: boolean;\n hasValue?: boolean;\n isPassword?: boolean;\n className?: string;\n}): string => {\n // Get base input styles\n const baseStyles = getInputBaseStyles({\n isInvalid: props.isInvalid,\n isDisabled: props.isDisabled,\n isFocused: props.isFocused,\n transparent: props.transparent,\n size: props.size,\n });\n\n // Add TextField-specific padding styles\n const paddingStyles = [\n props.showSearchIcon ? \"pl-8\" : \"pl-3\",\n (props.isClearable && props.hasValue) || props.isPassword ? \"pr-8\" : \"pr-3\",\n ].join(\" \");\n\n return twMerge(baseStyles, paddingStyles, props.className);\n};\n\nexport interface TextFieldProps extends Omit<AriaTextFieldProps, \"isRequired\" | \"size\" | \"className\">, BaseInputProps {\n label?: string;\n description?: string;\n errorMessage?: string | ((validation: ValidationResult) => string);\n placeholder?: string;\n tooltip?: string;\n isRequired?: boolean;\n className?: string;\n validationResult?: ValidationResult;\n}\n\nexport function TextField({\n label,\n description,\n errorMessage,\n size = \"md\",\n tooltip,\n isRequired,\n transparent,\n showSearchIcon,\n isClearable,\n onClear,\n type,\n validationResult,\n ...props\n}: TextFieldProps) {\n const [showPassword, setShowPassword] = React.useState(false);\n const { isFocused, handleFocus, handleBlur } = useInputFocus();\n const isPassword = type === \"password\";\n\n return (\n <AriaTextFieldComponent\n {...props}\n isRequired={isRequired}\n type={isPassword ? (showPassword ? \"text\" : \"password\") : type}\n className={composeTailwindRenderProps(props.className, \"group flex flex-col\")}\n >\n {({ isDisabled, isInvalid }: TextFieldRenderProps) => (\n <div className=\"flex flex-col\">\n {label && (\n <Label size={size} tooltip={tooltip} isRequired={isRequired}>\n {label}\n </Label>\n )}\n <InputWrapper>\n {showSearchIcon && (\n <div className=\"pointer-events-none absolute left-2 top-1/2 -translate-y-1/2 transform\">\n <Icon name=\"MagnifyingGlass\" className=\"h-4 w-4 text-text-muted\" />\n </div>\n )}\n <Input\n size={size}\n disabled={isDisabled}\n onFocus={(e) => handleFocus(e, props.onFocus)}\n onBlur={(e) => handleBlur(e, props.onBlur)}\n onChange={(e) => props.onChange?.(e.target.value)}\n className={getTextFieldStyles({\n isInvalid,\n isDisabled,\n isFocused,\n size,\n transparent,\n showSearchIcon,\n isClearable,\n hasValue: !!props.value,\n isPassword,\n className: typeof props.className === \"string\" ? props.className : undefined,\n })}\n />\n {isClearable && props.value && !isDisabled && (\n <ClearButton\n onClick={() => {\n if (onClear) {\n onClear();\n } else if (props.onChange) {\n props.onChange(\"\");\n }\n }}\n size={size}\n />\n )}\n {isPassword && !isDisabled && (\n <button\n type=\"button\"\n onClick={() => setShowPassword(!showPassword)}\n className=\"absolute right-3 top-1/2 -translate-y-1/2 transform text-text-muted hover:text-text-body\"\n aria-label={showPassword ? \"Hide password\" : \"Show password\"}\n onMouseDown={(e) => {\n e.preventDefault();\n e.stopPropagation();\n }}\n >\n <Icon\n name={showPassword ? \"EyeSlash\" : \"Eye\"}\n size={size === \"sm\" ? 16 : 20}\n className=\"text-text-body\"\n />\n </button>\n )}\n </InputWrapper>\n {description && (\n <Description size={size} className=\"mt-3\">\n {description}\n </Description>\n )}\n {typeof errorMessage === \"string\" && (\n <FieldError size={size} className=\"mt-1\">\n {errorMessage}\n </FieldError>\n )}\n {typeof errorMessage === \"function\" && validationResult && (\n <FieldError size={size} className=\"mt-1\">\n {errorMessage(validationResult)}\n </FieldError>\n )}\n </div>\n )}\n </AriaTextFieldComponent>\n );\n}\n","import React from \"react\";\nimport type { ValidationResult } from \"react-aria-components\";\nimport {\n Description,\n FieldError,\n Label,\n getInputBaseStyles,\n BaseInputProps,\n useInputFocus,\n InputWrapper,\n} from \"../Field\";\nimport { twMerge } from \"tailwind-merge\";\nimport type { Size } from \"../../utils/controlStyles\";\n\nconst getTextAreaStyles = (props: {\n isInvalid?: boolean;\n isDisabled?: boolean;\n isFocused?: boolean;\n transparent?: boolean;\n size?: Size;\n className?: string;\n}): string => {\n // Get base input styles\n const baseStyles = getInputBaseStyles({\n isInvalid: props.isInvalid,\n isDisabled: props.isDisabled,\n isFocused: props.isFocused,\n transparent: props.transparent,\n size: props.size,\n });\n\n // Add TextArea-specific styles\n const textAreaStyles = \"min-h-[100px] resize-y py-2\";\n\n return twMerge(baseStyles, textAreaStyles, props.className);\n};\n\nexport interface TextAreaProps extends Omit<React.TextareaHTMLAttributes<HTMLTextAreaElement>, \"size\">, BaseInputProps {\n label?: string;\n description?: string;\n errorMessage?: string | ((validation: ValidationResult) => string);\n tooltip?: string;\n size?: Size;\n isInvalid?: boolean;\n validationResult?: ValidationResult;\n}\n\nexport function TextArea({\n label,\n description,\n errorMessage,\n size = \"md\",\n tooltip,\n required,\n transparent,\n isInvalid,\n className,\n validationResult,\n ...props\n}: TextAreaProps) {\n const { isFocused, handleFocus, handleBlur } = useInputFocus();\n\n return (\n <div className=\"group flex flex-col\">\n <div className=\"flex flex-col\">\n {label && (\n <Label size={size} tooltip={tooltip} isRequired={required}>\n {label}\n </Label>\n )}\n <InputWrapper>\n <textarea\n {...props}\n required={required}\n onFocus={(e) => {\n // Properly handle the textarea focus event\n if (props.onFocus) {\n props.onFocus(e);\n }\n handleFocus(e as unknown as React.FocusEvent<HTMLInputElement>);\n }}\n onBlur={(e) => {\n // Properly handle the textarea blur event\n if (props.onBlur) {\n props.onBlur(e);\n }\n handleBlur(e as unknown as React.FocusEvent<HTMLInputElement>);\n }}\n className={getTextAreaStyles({\n isInvalid,\n isDisabled: props.disabled,\n isFocused,\n size,\n transparent,\n className,\n })}\n />\n </InputWrapper>\n {description && (\n <Description size={size} className=\"mt-3\">\n {description}\n </Description>\n )}\n {typeof errorMessage === \"string\" && (\n <FieldError size={size} className=\"mt-1\">\n {errorMessage}\n </FieldError>\n )}\n {typeof errorMessage === \"function\" && validationResult && (\n <FieldError size={size} className=\"mt-1\">\n {errorMessage(validationResult)}\n </FieldError>\n )}\n </div>\n </div>\n );\n}\n","import { Check } from \"lucide-react\";\nimport {\n ListBox as AriaListBox,\n ListBoxItem as AriaListBoxItem,\n ListBoxProps as AriaListBoxProps,\n Collection,\n Header,\n ListBoxItemProps,\n Section,\n SectionProps,\n composeRenderProps,\n} from \"react-aria-components\";\nimport { composeTailwindRenderProps, focusRing } from \"../../utils\";\n\ninterface ListBoxProps<T> extends Omit<AriaListBoxProps<T>, \"layout\" | \"orientation\"> {}\n\nexport function ListBox<T extends object>({ children, ...props }: ListBoxProps<T>) {\n return (\n <AriaListBox\n {...props}\n className={composeTailwindRenderProps(props.className, \"border border-gray-300 outline-0 dark:border-zinc-600\")}\n >\n {children}\n </AriaListBox>\n );\n}\n\nexport function getItemStyles({\n isSelected,\n isDisabled,\n size,\n}: {\n isSelected?: boolean;\n isDisabled?: boolean;\n size?: \"sm\" | \"md\" | \"lg\";\n}) {\n let styles = `${focusRing} group relative flex items-center gap-8 cursor-default select-none py-1.5 px-2.5 will-change-transform text-sm forced-color-adjust-none`;\n\n if (isSelected) {\n styles +=\n \" bg-background-input text-text-body forced-colors:bg-[Highlight] forced-colors:text-[HighlightText] [&:has(+[data-selected])]:rounded-b-none [&+[data-selected]]:rounded-t-none -outline-offset-4 outline-white dark:outline-white forced-colors:outline-[HighlightText]\";\n } else {\n styles += \" dark:text-zinc-300 hover:bg-background-hover dark:hover:bg-zinc-700 -outline-offset-2\";\n }\n\n if (isDisabled) {\n styles += \" text-slate-300 dark:text-zinc-600 forced-colors:text-[GrayText]\";\n }\n\n if (size === \"sm\") {\n styles += \" py-1 text-xs\";\n }\n\n return styles;\n}\n\nexport function ListBoxItem(props: ListBoxItemProps) {\n const textValue = props.textValue || (typeof props.children === \"string\" ? props.children : undefined);\n\n return (\n <AriaListBoxItem {...props} textValue={textValue} className={(props) => getItemStyles(props)}>\n {composeRenderProps(props.children, (children) => (\n <>\n {children}\n <div className=\"absolute bottom-0 left-4 right-4 hidden h-px bg-white/20 forced-colors:bg-[HighlightText] [.group[data-selected]:has(+[data-selected])_&]:block\" />\n </>\n ))}\n </AriaListBoxItem>\n );\n}\n\nexport function getDropdownItemStyles({\n isDisabled,\n isFocused,\n isOpen,\n}: {\n isDisabled?: boolean;\n isFocused?: boolean;\n isOpen?: boolean;\n}) {\n let styles =\n \"group flex items-center gap-4 cursor-default select-none py-2 pl-3 pr-1 outline outline-0 text-sm forced-color-adjust-none hover:bg-background-hover dark:hover:bg-background-hover\";\n\n if (isDisabled) {\n styles += \" text-gray-300 dark:text-zinc-600 forced-colors:text-[GrayText]\";\n } else {\n styles += \" text-text-body dark:text-zinc-100\";\n }\n\n if (isFocused) {\n styles += \" bg-background-hover forced-colors:bg-[Highlight] forced-colors:text-[HighlightText]\";\n }\n\n if (!isFocused && isOpen) {\n styles += \" bg-background-input\";\n }\n\n return styles;\n}\n\nexport function DropdownItem(props: ListBoxItemProps) {\n const textValue = props.textValue || (typeof props.children === \"string\" ? props.children : undefined);\n return (\n <AriaListBoxItem {...props} textValue={textValue} className={(props) => getDropdownItemStyles(props)}>\n {composeRenderProps(props.children, (children, { isSelected }) => (\n <>\n <span className=\"flex flex-1 items-center gap-2 truncate font-normal group-selected:font-semibold\">\n {children}\n </span>\n <span className=\"flex w-5 items-center\">{isSelected && <Check className=\"h-4 w-4\" />}</span>\n </>\n ))}\n </AriaListBoxItem>\n );\n}\n\nexport interface DropdownSectionProps<T> extends SectionProps<T> {\n title?: string;\n}\n\nexport function DropdownSection<T extends object>(props: DropdownSectionProps<T>) {\n return (\n <Section className=\"after:block after:h-[5px] after:content-[''] first:-mt-[5px]\">\n <Header className=\"sticky -top-[5px] z-10 -mx-1 -mt-px truncate border-y bg-gray-100/60 px-4 py-1 text-sm font-semibold text-text-caption backdrop-blur-md supports-[-moz-appearance:none]:bg-gray-100 dark:border-y-zinc-700 dark:bg-zinc-700/60 dark:text-zinc-300 [&+*]:mt-1\">\n {props.title}\n </Header>\n <Collection items={props.items}>{props.children}</Collection>\n </Section>\n );\n}\n","import {\n OverlayArrow,\n Popover as AriaPopover,\n PopoverProps as AriaPopoverProps,\n composeRenderProps,\n PopoverContext,\n useSlottedContext,\n} from \"react-aria-components\";\nimport React from \"react\";\n\nexport interface PopoverProps extends Omit<AriaPopoverProps, \"children\"> {\n showArrow?: boolean;\n children: React.ReactNode;\n}\n\nfunction getPopoverStyles({\n isEntering,\n isExiting,\n className = \"\",\n}: {\n isEntering?: boolean;\n isExiting?: boolean;\n className?: string;\n}) {\n const baseStyles = [\n \"bg-white\",\n \"dark:bg-zinc-900/70\",\n \"dark:backdrop-blur-2xl\",\n \"dark:backdrop-saturate-200\",\n \"forced-colors:bg-[Canvas]\",\n \"shadow-2xl\",\n \"rounded-sm\",\n \"bg-clip-padding\",\n \"border\",\n \"border-gray-300\",\n \"dark:border-white/[15%]\",\n \"dark:text-zinc-300\",\n ].join(\" \");\n\n const enteringStyles = isEntering\n ? [\n \"animate-in\",\n \"fade-in\",\n \"placement-bottom:slide-in-from-top-1\",\n \"placement-top:slide-in-from-bottom-1\",\n \"placement-left:slide-in-from-right-1\",\n \"placement-right:slide-in-from-left-1\",\n \"ease-out\",\n \"duration-200\",\n ].join(\" \")\n : \"\";\n\n const exitingStyles = isExiting\n ? [\n \"animate-out\",\n \"fade-out\",\n \"placement-bottom:slide-out-to-top-1\",\n \"placement-top:slide-out-to-bottom-1\",\n \"placement-left:slide-out-to-right-1\",\n \"placement-right:slide-out-to-left-1\",\n \"ease-in\",\n \"duration-150\",\n ].join(\" \")\n : \"\";\n\n return [baseStyles, enteringStyles, exitingStyles, className].filter(Boolean).join(\" \");\n}\n\nexport function Popover({ children, showArrow, className, ...props }: PopoverProps) {\n const popoverContext = useSlottedContext(PopoverContext)!;\n const isSubmenu = popoverContext?.trigger === \"SubmenuTrigger\";\n let offset = showArrow ? 12 : 8;\n offset = isSubmenu ? offset - 6 : offset;\n return (\n <AriaPopover\n offset={offset}\n {...props}\n className={composeRenderProps(className, (className, renderProps) =>\n getPopoverStyles({ ...renderProps, className }),\n )}\n >\n {showArrow && (\n <OverlayArrow className=\"group\">\n <svg\n width={12}\n height={12}\n viewBox=\"0 0 12 12\"\n className=\"block fill-white stroke-black/10 stroke-1 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 dark:fill-[#1f1f21] dark:stroke-zinc-600 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]\"\n >\n <path d=\"M0 0 L6 6 L12 0\" />\n </svg>\n </OverlayArrow>\n )}\n {children}\n </AriaPopover>\n );\n}\n","import React, { useState, useRef } from \"react\";\nimport {\n Select as AriaSelect,\n SelectProps as AriaSelectProps,\n ListBox,\n SelectValue,\n ValidationResult,\n Key,\n} from \"react-aria-components\";\nimport { Description, Label, FieldError, InputWrapper, getInputBaseStyles } from \"../Field\";\nimport { Button } from \"../Button\";\nimport { DropdownSection, DropdownSectionProps } from \"../ListBox\";\nimport { Popover } from \"../Popover\";\nimport { Icon } from \"../Icon\";\nimport { composeTailwindRenderProps } from \"../../utils\";\nimport { twMerge } from \"tailwind-merge\";\nimport { controlStyles, Size } from \"../../utils/controlStyles\";\n\n// Replace tv() with a regular function\ntype SelectVariants = {\n isDisabled?: boolean;\n size?: Size;\n isOpen?: boolean;\n isInvalid?: boolean;\n};\n\nfunction getSelectValueClassName(size: Size = \"md\") {\n // Use controlStyles for consistent text sizing\n return `flex-1 text-start data-[placeholder]:text-text-placeholder ${controlStyles[size].text}`;\n}\n\nexport type SelectVariantType = SelectVariants;\n\n// Define a custom hook for focus handling that works with any element\nfunction useElementFocus() {\n const handleFocus = React.useCallback(\n (e: React.FocusEvent<Element>, onFocus?: (e: React.FocusEvent<Element>) => void) => {\n onFocus?.(e);\n },\n [],\n );\n\n const handleBlur = React.useCallback(\n (e: React.FocusEvent<Element>, onBlur?: (e: React.FocusEvent<Element>) => void) => {\n onBlur?.(e);\n },\n [],\n );\n\n return { handleFocus, handleBlur };\n}\n\n/**\n * Interface defining the shape of items in the Select component\n */\nexport interface SelectItem<T = unknown> {\n /** Unique identifier for the item */\n id: string;\n /** Display label for the item */\n label: string;\n /** Value associated with the item */\n value: T;\n}\n\n/**\n * Props for the Select component\n * @template T - The type of the items, must extend SelectItem\n */\nexport interface SelectProps<T extends SelectItem> extends Omit<AriaSelectProps<T>, \"children\" | \"onSelectionChange\"> {\n /** Label text displayed above the select */\n label?: string;\n /** Helper text displayed below the select */\n description?: string;\n /** Error message or function to generate error message */\n errorMessage?: string | ((validation: ValidationResult) => React.ReactNode);\n /** Collection of items to display in the select */\n items?: Iterable<T>;\n /** Size variant of the select */\n size?: Size;\n /** Render function for items or static children */\n children: React.ReactNode | ((item: T) => React.ReactNode);\n /** Currently selected item's id. Uses the SelectItem's `id` field for stable selection tracking */\n selectedKey?: Key;\n /** Default selected item's id for uncontrolled usage */\n defaultSelectedKey?: Key;\n /** Callback when selection changes, provides the selected item's id */\n onSelectionChange?: (key: Key) => void;\n /** Whether to show error states */\n showErrors?: boolean;\n /** Tooltip text */\n tooltip?: string;\n /** Whether the field is required */\n isRequired?: boolean;\n /** Validation result object */\n validationResult?: ValidationResult;\n /** Whether to use transparent background */\n transparent?: boolean;\n}\n\nexport function Select<T extends SelectItem>({\n label,\n description,\n errorMessage,\n children,\n items,\n size = \"md\",\n selectedKey: controlledSelectedKey,\n defaultSelectedKey,\n onSelectionChange,\n placeholder,\n showErrors = false,\n tooltip,\n isRequired,\n transparent,\n ...props\n}: SelectProps<T>) {\n const [internalSelectedKey, setInternalSelectedKey] = useState<Key | null>(null);\n const selectedKey = controlledSelectedKey ?? internalSelectedKey ?? defaultSelectedKey;\n const { handleFocus, handleBlur } = useElementFocus();\n\n const handleSelectionChange = (key: Key) => {\n if (onSelectionChange) {\n onSelectionChange(key);\n } else {\n setInternalSelectedKey(key); // Update internal state if uncontrolled\n }\n };\n\n const selectRef = useRef<HTMLDivElement>(null);\n\n return (\n <AriaSelect\n {...props}\n selectedKey={selectedKey}\n defaultSelectedKey={defaultSelectedKey}\n onSelectionChange={handleSelectionChange}\n placeholder={placeholder}\n className={composeTailwindRenderProps(props.className, \"group flex w-full flex-col\")}\n ref={selectRef}\n onOpenChange={(isOpen) => {\n if (!isOpen) {\n selectRef.current?.blur();\n }\n }}\n >\n {({ isDisabled, isInvalid, isOpen }: { isDisabled: boolean; isInvalid: boolean; isOpen: boolean }) => (\n <div className=\"flex flex-col\">\n {label && (\n <Label size={size} tooltip={tooltip} isRequired={isRequired} className=\"mb-2\">\n {label}\n </Label>\n )}\n <InputWrapper>\n <Button\n variant=\"unstyled\"\n className={twMerge(\n getInputBaseStyles({\n isInvalid: isInvalid || (showErrors && !!errorMessage),\n isDisabled,\n isFocused: isOpen,\n transparent,\n size,\n }),\n \"flex items-center text-start gap-4 cursor-pointer min-w-[200px] max-w-[400px]\",\n )}\n onFocus={(e) => handleFocus(e, props.onFocus)}\n onBlur={(e) => handleBlur(e, props.onBlur)}\n data-open={isOpen}\n >\n <SelectValue className={getSelectValueClassName(size)} />\n <Icon\n name=\"CaretDown\"\n aria-hidden\n className={twMerge(\n \"h-4 w-4 text-text-body group-disabled:text-gray-200 forced-colors:text-[ButtonText] transition-transform\",\n isOpen && \"rotate-180\",\n )}\n />\n </Button>\n </InputWrapper>\n {description && (\n <Description size={size} className=\"mt-3\">\n {description}\n </Description>\n )}\n {showErrors && (\n <FieldError size={size} className=\"mt-3 text-feedback-error-text\">\n {typeof errorMessage === \"function\" && props.validationResult\n ? errorMessage(props.validationResult)\n : typeof errorMessage === \"string\"\n ? errorMessage\n : null}\n </FieldError>\n )}\n <Popover className=\"min-w-[var(--trigger-width)] max-w-[400px] bg-background-input\">\n <ListBox\n items={items}\n className=\"w-full max-h-inherit overflow-auto bg-background-input p-1 outline-0 [clip-path:inset(0_0_0_0_round_.75rem)]\"\n >\n {children}\n </ListBox>\n </Popover>\n </div>\n )}\n </AriaSelect>\n );\n}\n\nexport function SelectSection<T extends object>(props: DropdownSectionProps<T>) {\n return <DropdownSection {...props} />;\n}\n","import {\n NumberField as AriaNumberField,\n NumberFieldProps as AriaNumberFieldProps,\n Button as AriaButton,\n ValidationResult,\n Group,\n Input as AriaInput,\n} from \"react-aria-components\";\nimport { Description, FieldError, Label, getInputStateStyles, BaseInputProps } from \"../Field\";\nimport { composeTailwindRenderProps } from \"../../utils\";\nimport { twMerge } from \"tailwind-merge\";\nimport type { Size } from \"../../utils/controlStyles\";\nimport { useId } from \"react\";\nimport { Icon } from \"../Icon\";\n\nconst getNumberFieldStyles = (props: {\n isInvalid?: boolean;\n isDisabled?: boolean;\n isFocused?: boolean;\n transparent?: boolean;\n size?: Size;\n className?: string;\n}): string => {\n return twMerge(\n getInputStateStyles({\n isInvalid: props.isInvalid,\n isDisabled: props.isDisabled,\n isFocused: props.isFocused,\n }),\n props.transparent ? \"bg-transparent\" : \"bg-background-input\",\n \"pr-9\", // Space for stepper buttons\n \"[appearance:textfield] [&::-webkit-outer-spin-button]:appearance-none [&::-webkit-inner-spin-button]:appearance-none\", // Hide native spinners\n props.className,\n );\n};\n\ninterface NumberFieldProps extends Omit<AriaNumberFieldProps, \"size\" | \"className\">, BaseInputProps {\n value?: number;\n defaultValue?: number;\n onChange?: (value: number) => void;\n minValue?: number;\n maxValue?: number;\n step?: number;\n formatOptions?: Intl.NumberFormatOptions;\n id?: string;\n label?: string;\n description?: string;\n errorMessage?: string | ((validation: ValidationResult) => string);\n tooltip?: string;\n isRequired?: boolean;\n className?: string;\n validationResult?: ValidationResult;\n}\n\nexport function NumberField({\n label,\n description,\n errorMessage,\n size,\n tooltip,\n isRequired,\n transparent,\n validationResult,\n ...props\n}: NumberFieldProps) {\n const id = useId();\n\n return (\n <AriaNumberField\n {...props}\n id={id}\n isRequired={isRequired}\n className={composeTailwindRenderProps(props.className, \"group flex flex-col gap-1\")}\n step={props.step ?? 1}\n onChange={(value) => {\n if (typeof value === \"number\") {\n if (props.maxValue != null && value > props.maxValue) {\n props.onChange?.(props.maxValue);\n } else if (props.minValue != null && value < props.minValue) {\n props.onChange?.(props.minValue);\n } else {\n props.onChange?.(value);\n }\n }\n }}\n isInvalid={\n !!errorMessage ||\n (typeof props.value === \"number\" &&\n ((props.maxValue != null && props.value > props.maxValue) ||\n (props.minValue != null && props.value < props.minValue)))\n }\n >\n {({ isDisabled, isInvalid }) => {\n const isValueInvalid = isInvalid || !!errorMessage;\n return (\n <div className=\"flex flex-col\">\n {label && (\n <Label size={size} tooltip={tooltip} isRequired={isRequired} htmlFor={id}>\n {label}\n </Label>\n )}\n <div className=\"relative\">\n <Group className=\"relative\">\n <AriaInput\n className={getNumberFieldStyles({\n isInvalid: isValueInvalid,\n isDisabled,\n transparent,\n size,\n className: typeof props.className === \"string\" ? props.className : undefined,\n })}\n />\n <div className=\"absolute inset-y-[1px] right-[1px] flex flex-col divide-y border-l overflow-hidden rounded-r-[calc(var(--control-border-radius)-1px)]\">\n <AriaButton\n slot=\"increment\"\n isDisabled={isDisabled}\n className=\"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50\"\n >\n <Icon name=\"CaretUp\" size={14} />\n </AriaButton>\n <AriaButton\n slot=\"decrement\"\n isDisabled={isDisabled}\n className=\"flex h-1/2 w-7 items-center justify-center bg-background-input hover:bg-background-input-hover active:bg-background-input-active disabled:cursor-not-allowed disabled:opacity-50\"\n >\n <Icon name=\"CaretDown\" size={14} />\n </AriaButton>\n </div>\n </Group>\n </div>\n {description && (\n <Description size={size} className=\"mt-3\">\n {description}\n </Description>\n )}\n {errorMessage && (\n <FieldError size={size} className=\"mt-3\">\n {typeof errorMessage === \"function\" ? errorMessage(validationResult!) : errorMessage}\n </FieldError>\n )}\n </div>\n );\n }}\n </AriaNumberField>\n );\n}\n","import {\n Description,\n FieldError,\n Label,\n BaseInputProps,\n getInputBackgroundStyles,\n getInputStateStyles,\n useInputFocus,\n} from \"../Field\";\nimport { twMerge } from \"tailwind-merge\";\nimport type { Size } from \"../../utils/controlStyles\";\nimport { controlStyles } from \"../../utils/controlStyles\";\nimport {\n TimeField as AriaTimeField,\n TimeFieldProps as AriaTimeFieldProps,\n DateInput,\n DateSegment,\n TimeValue,\n ValidationResult,\n} from \"react-aria-components\";\nimport { useState, useRef, useEffect } from \"react\";\n\nconst getTimeFieldStyles = (props: {\n isInvalid?: boolean;\n isDisabled?: boolean;\n isFocused?: boolean;\n transparent?: boolean;\n size?: Size;\n className?: string;\n}): string => {\n return twMerge(\n \"w-full\",\n getInputStateStyles({ isInvalid: props.isInvalid, isDisabled: props.isDisabled, isFocused: props.isFocused }),\n getInputBackgroundStyles({ transparent: props.transparent, isDisabled: props.isDisabled }),\n controlStyles[props.size || \"md\"].text,\n controlStyles[props.size || \"md\"].height,\n controlStyles[props.size || \"md\"].padding,\n \"flex items-center gap-0.5\",\n props.className,\n );\n};\n\nconst getSegmentStyles = ({\n isPlaceholder,\n isDisabled,\n isFocused,\n size = \"md\",\n}: {\n isPlaceholder?: boolean;\n isDisabled?: boolean;\n isInvalid?: boolean;\n isFocused?: boolean;\n size?: Size;\n}) => {\n return twMerge(\n // Base styles\n \"outline-none rounded transition-colors box-content tabular-nums text-center\",\n // Text styles based on state\n isPlaceholder ? \"text-text-muted italic\" : \"text-text-body\",\n isDisabled ? \"text-text-disabled cursor-not-allowed\" : \"cursor-default\",\n // Size styles\n controlStyles[size].text,\n // Padding and spacing\n \"px-0.5 -my-0.5\",\n // Focus styles\n isFocused && \"!outline-[1.5px] !outline-[var(--control-focus-ring-color)] ![--tw-outline-style:solid]\",\n // Hover styles (only when not disabled and not focused)\n !isDisabled && !isFocused && \"hover:bg-text-body/[0.05]\",\n );\n};\n\nexport interface TimeFieldProps extends Omit<AriaTimeFieldProps<TimeValue>, \"size\" | \"className\">, BaseInputProps {\n label?: string;\n description?: string;\n errorMessage?: string | ((validation: ValidationResult) => string);\n placeholder?: string;\n tooltip?: string;\n isRequired?: boolean;\n className?: string;\n validationResult?: ValidationResult;\n}\n\nexport function TimeField({\n label,\n description,\n errorMessage,\n size = \"md\",\n tooltip,\n isRequired,\n transparent,\n validationResult,\n ...props\n}: TimeFieldProps) {\n const { isFocused } = useInputFocus();\n const [focusedSegment, setFocusedSegment] = useState<string | null>(null);\n const inputRef = useRef<HTMLDivElement>(null);\n\n useEffect(() => {\n const handleFocusIn = (e: FocusEvent) => {\n const target = e.target as HTMLElement;\n if (target.hasAttribute(\"data-type\")) {\n setFocusedSegment(target.getAttribute(\"data-type\"));\n }\n };\n\n const handleFocusOut = () => {\n setFocusedSegment(null);\n };\n\n const inputElement = inputRef.current;\n if (inputElement) {\n inputElement.addEventListener(\"focusin\", handleFocusIn);\n inputElement.addEventListener(\"focusout\", handleFocusOut);\n }\n\n return () => {\n if (inputElement) {\n inputElement.removeEventListener(\"focusin\", handleFocusIn);\n inputElement.removeEventListener(\"focusout\", handleFocusOut);\n }\n };\n }, []);\n\n return (\n <AriaTimeField {...props}>\n {({ isDisabled, isInvalid }) => (\n <>\n {label && (\n <Label isRequired={isRequired} tooltip={tooltip}>\n {label}\n </Label>\n )}\n <DateInput\n ref={inputRef}\n className={getTimeFieldStyles({ size, transparent, isDisabled, isInvalid, isFocused })}\n >\n {(segment) => (\n <DateSegment\n segment={segment}\n className={getSegmentStyles({\n isPlaceholder: segment.isPlaceholder,\n isDisabled: segment.isEditable,\n isFocused: focusedSegment === segment.type,\n size,\n })}\n />\n )}\n </DateInput>\n {description && <Description>{description}</Description>}\n {typeof errorMessage === \"string\" ? <FieldError>{errorMessage}</FieldError> : null}\n </>\n )}\n </AriaTimeField>\n );\n}\n","import {\n DateField as AriaDateField,\n DateFieldProps as AriaDateFieldProps,\n DateInput as AriaDateInput,\n DateInputProps,\n DateSegment,\n DateValue,\n ValidationResult,\n} from \"react-aria-components\";\nimport { Description, FieldError, Label } from \"../Field\";\nimport { getFieldGroupStyles } from \"../Field\";\nimport { composeTailwindRenderProps } from \"../../utils\";\n\nexport interface DateFieldProps<T extends DateValue> extends AriaDateFieldProps<T> {\n label?: string;\n description?: string;\n errorMessage?: string | ((validation: ValidationResult) => string);\n}\n\nexport function DateField<T extends DateValue>({ label, description, errorMessage, ...props }: DateFieldProps<T>) {\n return (\n <AriaDateField {...props} className={composeTailwindRenderProps(props.className, \"flex flex-col gap-1\")}>\n {label && <Label>{label}</Label>}\n <DateInput />\n {description && <Description>{description}</Description>}\n {typeof errorMessage === \"string\" ? <FieldError>{errorMessage}</FieldError> : null}\n </AriaDateField>\n );\n}\n\nfunction getSegmentStyles({\n isPlaceholder,\n isDisabled,\n isFocused,\n}: {\n isPlaceholder?: boolean;\n isDisabled?: boolean;\n isFocused?: boolean;\n}) {\n return [\n \"inline p-0.5 type-literal:px-0 rounded outline outline-0 forced-color-adjust-none caret-transparent text-gray-800 dark:text-zinc-200 forced-colors:text-[ButtonText]\",\n isPlaceholder && \"text-gray-600 dark:text-zinc-400 italic\",\n isDisabled && \"text-gray-200 dark:text-zinc-600 forced-colors:text-[GrayText]\",\n isFocused &&\n \"bg-blue-600 text-white dark:text-white forced-colors:bg-[Highlight] forced-colors:text-[HighlightText]\",\n ]\n .filter(Boolean)\n .join(\" \");\n}\n\nexport function DateInput(props: Omit<DateInputProps, \"children\">) {\n return (\n <AriaDateInput\n className={(renderProps) =>\n getFieldGroupStyles({\n ...renderProps,\n className: \"block min-w-[150px] px-2 py-1.5 text-sm\",\n })\n }\n {...props}\n >\n {(segment) => (\n <DateSegment\n segment={segment}\n className={getSegmentStyles({\n isPlaceholder: segment.isPlaceholder,\n isDisabled: segment.isEditable,\n })}\n />\n )}\n </AriaDateInput>\n );\n}\n","import React from \"react\";\nimport { ToggleButton as RACToggleButton } from \"react-aria-components\";\nimport { focusRing } from \"../../utils\";\nimport { twMerge } from \"tailwind-merge\";\nimport { Icon } from \"../Icon\";\nimport type { ComponentProps } from \"react\";\nimport { controlStyles, type Size } from \"../../utils/controlStyles\";\n\ntype IconName = ComponentProps<typeof Icon>[\"name\"];\n\nexport interface ToggleButtonProps {\n variant?: \"default\" | \"primary\";\n size?: Size;\n className?: string;\n children: React.ReactNode;\n onChange?: (isSelected: boolean) => void;\n onPress?: () => void;\n isSelected?: boolean;\n isDisabled?: boolean;\n borderRadius?: \"left\" | \"right\";\n borderRight?: boolean;\n borderLeft?: boolean;\n icon?: IconName;\n iconWeight?: \"thin\" | \"light\" | \"regular\" | \"bold\" | \"fill\" | \"duotone\";\n iconPosition?: \"left\" | \"right\";\n /** Value used for group selection state */\n value?: string;\n isLoading?: boolean;\n loadingText?: string;\n loadingIndicator?: React.ReactNode;\n badgeNumber?: number;\n badgeVariant?: \"primary\" | \"destructive\";\n badgePosition?: \"top-right\" | \"top-left\" | \"bottom-right\" | \"bottom-left\";\n}\n\nconst baseStyles =\n \"flex font-medium justify-center items-center gap-2 text-center transition whitespace-nowrap box-border\";\n\nconst variantStyles = {\n default: {\n selected:\n \"bg-text-body text-white hover:brightness-[var(--control-hover-opacity)] forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent\",\n unselected:\n \"bg-transparent text-text-body border-2 border-border-muted hover:bg-text-body/[0.05] forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]\",\n },\n primary: {\n selected:\n \"bg-action-primary text-white hover:brightness-[var(--control-hover-opacity)] forced-colors:bg-[ButtonText] forced-colors:text-[ButtonFace] border-2 border-transparent\",\n unselected:\n \"bg-transparent text-text-body border-2 border-border-muted hover:bg-text-body/[0.05] forced-colors:border-[ButtonBorder] forced-colors:bg-[ButtonFace] forced-colors:text-[ButtonText]\",\n },\n};\n\nconst disabledStyles = \"opacity-[--control-hover-opacity] cursor-not-allowed pointer-events-none grayscale\";\nconst enabledStyles = \"opacity-100 cursor-pointer\";\n\nconst badgePositionStyles = {\n \"top-right\": \"-right-2 -top-2\",\n \"top-left\": \"-left-2 -top-2\",\n \"bottom-right\": \"-right-2 -bottom-2\",\n \"bottom-left\": \"-left-2 -bottom-2\",\n} as const;\n\nconst badgeVariantStyles = {\n primary: \"bg-action-primary text-white\",\n destructive: \"bg-action-destructive text-white\",\n} as const;\n\nfunction getToggleButtonStyles(props: ToggleButtonProps) {\n const { variant = \"default\", size = \"md\", isDisabled, isSelected, borderRadius, borderRight, borderLeft } = props;\n\n let styles = `${baseStyles} ${isSelected ? variantStyles[variant].selected : variantStyles[variant].unselected}`;\n\n // Add size styles using control-specific variables\n styles += ` ${controlStyles[size].text} ${controlStyles[size].height} ${controlStyles[size].padding} ${controlStyles[size].gap}`;\n\n // Add state styles\n styles += ` ${isDisabled ? disabledStyles : enabledStyles}`;\n\n // Add border styles\n if (borderRadius === \"left\") styles += \" rounded-l-sm\";\n if (borderRadius === \"right\") styles += \" rounded-r-sm\";\n if (borderRight) styles += \" border-r\";\n if (borderLeft) styles += \" border-l\";\n\n // Add focus ring\n styles += ` ${focusRing()}`;\n\n return twMerge(styles);\n}\n\nexport function ToggleButton(props: ToggleButtonProps) {\n const {\n className,\n children,\n onPress,\n icon,\n iconPosition = \"left\",\n iconWeight,\n isLoading = false,\n loadingText,\n loadingIndicator,\n size = \"md\",\n badgeNumber,\n badgeVariant = \"primary\",\n badgePosition = \"top-right\",\n ...rest\n } = props;\n\n const iconElement = icon ? (\n <Icon name={icon} className={`icon-[--control-icon-size-${size}]`} weight={iconWeight} />\n ) : null;\n\n const renderChildren = () => {\n const content = (\n <>\n {iconPosition === \"left\" && iconElement}\n {children}\n {iconPosition === \"right\" && iconElement}\n </>\n );\n\n if (isLoading) {\n return (\n <div className=\"relative inline-flex items-center justify-center\">\n <div className=\"absolute inset-0 flex items-center justify-center\">\n {loadingIndicator || (\n <Icon\n name=\"CircleNotch\"\n className={`animate-spin icon-[--control-icon-size-${size}]`}\n aria-hidden=\"true\"\n />\n )}\n </div>\n <div className=\"invisible\" aria-hidden=\"true\">\n {content}\n </div>\n {loadingText && (\n <span className=\"sr-only\" role=\"status\" aria-live=\"polite\">\n {loadingText}\n </span>\n )}\n </div>\n );\n }\n\n return content;\n };\n\n const toggleButton = (\n <RACToggleButton\n onPress={onPress}\n {...rest}\n className={twMerge(getToggleButtonStyles(props), className)}\n aria-busy={isLoading}\n >\n {renderChildren()}\n </RACToggleButton>\n );\n\n if (badgeNumber && badgeNumber > 0) {\n return (\n <div className=\"relative\">\n {toggleButton}\n <span\n className={`absolute ${badgePositionStyles[badgePosition]} flex h-5 w-5 items-center justify-center rounded-full ${badgeVariantStyles[badgeVariant]} text-xs`}\n aria-label={`${badgeNumber} items`}\n >\n {badgeNumber}\n </span>\n </div>\n );\n }\n\n return toggleButton;\n}\n","import React from \"react\";\nimport {\n Tooltip as AriaTooltip,\n TooltipProps as AriaTooltipProps,\n OverlayArrow,\n composeRenderProps,\n TooltipTrigger,\n} from \"react-aria-components\";\n\nexport interface TooltipProps extends Omit<AriaTooltipProps, \"children\"> {\n children: React.ReactNode;\n content: React.ReactNode;\n}\n\nconst styles = ({\n isEntering,\n isExiting,\n className,\n}: {\n isEntering?: boolean;\n isExiting?: boolean;\n className?: string;\n}) => {\n const baseClasses =\n \"max-w-[200px] group bg-slate-700 dark:bg-slate-600 border border-slate-800 dark:border-white/10 shadow-[inset_0_1px_0_0_theme(colors.gray.600)] dark:shadow-none text-white text-sm rounded-lg drop-shadow-lg will-change-transform px-3 py-1\";\n\n const enteringClasses = isEntering\n ? \"animate-in fade-in placement-bottom:slide-in-from-top-0.5 placement-top:slide-in-from-bottom-0.5 placement-left:slide-in-from-right-0.5 placement-right:slide-in-from-left-0.5 ease-out duration-200\"\n : \"\";\n\n const exitingClasses = isExiting\n ? \"animate-out fade-out placement-bottom:slide-out-to-top-0.5 placement-top:slide-out-to-bottom-0.5 placement-left:slide-out-to-right-0.5 placement-right:slide-out-to-left-0.5 ease-in duration-150\"\n : \"\";\n\n return [baseClasses, enteringClasses, exitingClasses, className].filter(Boolean).join(\" \");\n};\n\nexport function Tooltip({ children, content, ...props }: TooltipProps) {\n return (\n <TooltipTrigger delay={200}>\n {children}\n <AriaTooltip\n {...props}\n offset={10}\n className={composeRenderProps(props.className, (className, renderProps) =>\n styles({ ...renderProps, className }),\n )}\n >\n <OverlayArrow>\n <svg\n width={8}\n height={8}\n viewBox=\"0 0 8 8\"\n className=\"fill-slate-700 stroke-gray-800 group-placement-left:-rotate-90 group-placement-right:rotate-90 group-placement-bottom:rotate-180 dark:fill-slate-600 dark:stroke-white/10 forced-colors:fill-[Canvas] forced-colors:stroke-[ButtonBorder]\"\n >\n <path d=\"M0 0 L4 4 L8 0\" />\n </svg>\n </OverlayArrow>\n {content}\n </AriaTooltip>\n </TooltipTrigger>\n );\n}\n","import { ReactNode } from \"react\";\n\ninterface TextLinkProps {\n href?: string;\n children: ReactNode;\n className?: string;\n external?: boolean;\n title?: string;\n variant?: \"default\" | \"primary\" | \"muted\";\n onClick?: (e: React.MouseEvent<HTMLAnchorElement>) => void;\n asButton?: boolean;\n onPress?: () => void;\n}\n\nexport const TextLink = ({\n href,\n children,\n className = \"\",\n external = false,\n title,\n variant = \"default\",\n onClick,\n asButton = false,\n onPress,\n}: TextLinkProps) => {\n const externalProps = external ? { target: \"_blank\", rel: \"noopener noreferrer\" } : {};\n\n const baseClasses = \"hover:underline hover:decoration-1 hover:underline-offset-4 cursor-pointer\";\n\n const variantClasses = {\n default: \"text-text-link-default hover:text-text-link-hover visited:text-text-link-default\",\n primary: \"text-action-primary hover:text-action-primary-hover visited:text-action-primary\",\n muted: \"text-text-muted hover:text-text-muted visited:text-text-muted\",\n };\n\n const combinedClasses = `${baseClasses} ${variantClasses[variant]} ${className}`;\n\n if (asButton) {\n return (\n <button type=\"button\" className={combinedClasses} onClick={onPress} title={title}>\n {children}\n </button>\n );\n }\n\n return (\n <a href={href || \"#\"} className={combinedClasses} {...externalProps} title={title} onClick={onClick}>\n {children}\n </a>\n );\n};\n\nexport default TextLink;\n","\"use client\";\n\nimport React, { useState, useEffect } from \"react\";\nimport { twMerge } from \"tailwind-merge\";\n\ninterface SkeletonProps {\n width?: number | string;\n height?: number | string;\n variant?: \"text\" | \"rect\" | \"circle\";\n animation?: \"pulse\" | \"wave\" | \"none\";\n gradient?: boolean;\n flex?: boolean;\n stack?: (number | string)[]; // Array of widths for stacked skeletons\n responsive?: Record<string, string | number>;\n delay?: number;\n adjustAnimationSpeedBasedOnWidth?: boolean;\n ariaLabel?: string;\n className?: string;\n \"data-testid\"?: string;\n}\n\nexport const Skeleton: React.FC<SkeletonProps> = ({\n width,\n height,\n variant = \"rect\",\n animation = \"pulse\",\n gradient = false,\n flex = false,\n stack,\n responsive,\n delay = 0,\n adjustAnimationSpeedBasedOnWidth = false,\n ariaLabel,\n className,\n \"data-testid\": dataTestId,\n}) => {\n const [visible, setVisible] = useState(delay === 0);\n\n useEffect(() => {\n if (delay > 0) {\n const timer = setTimeout(() => setVisible(true), delay);\n return () => clearTimeout(timer);\n }\n }, [delay]);\n\n if (!visible) return null;\n\n // Base styles\n const baseClasses = gradient\n ? \"bg-gradient-to-r from-[var(--skeleton-base)] via-[var(--skeleton-highlight)] to-[var(--skeleton-base)]\"\n : \"bg-[var(--skeleton-base)]\";\n\n // Adjust animation speed dynamically based on width\n const animationSpeed =\n adjustAnimationSpeedBasedOnWidth && width\n ? (() => {\n const numWidth = typeof width === \"number\" ? width : parseFloat(String(width));\n return !isNaN(numWidth) ? `animation-duration-[${Math.max(0.8, numWidth / 100)}s]` : \"\";\n })()\n : \"\";\n\n // Animation styles\n const animationClasses =\n animation === \"pulse\"\n ? `animate-pulse ${animationSpeed}`\n : animation === \"wave\"\n ? `relative overflow-hidden before:absolute before:inset-0 before:bg-gradient-to-r before:from-transparent before:via-[var(--skeleton-wave)] before:to-transparent before:animate-wave ${animationSpeed}`\n : \"\";\n\n // Shape-specific styles\n let shapeClasses = \"rounded-sm\";\n if (variant === \"circle\") shapeClasses = \"rounded-full\";\n if (variant === \"text\") shapeClasses = \"h-4 w-full rounded-sm\";\n\n // Dynamic layout handling\n const layoutClasses = flex ? \"flex-1 min-w-0\" : \"\";\n\n // Responsive styles\n const responsiveStyles = responsive\n ? Object.entries(responsive)\n .map(([breakpoint, value]) => `${breakpoint}:w-[${value}]`)\n .join(\" \")\n : \"\";\n\n // Stacking Multiple Skeletons\n if (stack) {\n return (\n <div className=\"space-y-2\" data-testid={dataTestId}>\n {stack.map((lineWidth, index) => (\n <div\n key={index}\n className={twMerge(baseClasses, animationClasses, shapeClasses, layoutClasses, responsiveStyles, className)}\n style={{ width: lineWidth, height }}\n />\n ))}\n </div>\n );\n }\n\n return (\n <div\n className={twMerge(baseClasses, animationClasses, shapeClasses, layoutClasses, responsiveStyles, className)}\n style={{ width, height }}\n role=\"presentation\"\n aria-hidden={!ariaLabel}\n aria-label={ariaLabel ?? undefined}\n data-testid={dataTestId}\n />\n );\n};\n\ninterface SkeletonGroupProps {\n count?: number;\n children: React.ReactNode;\n className?: string;\n \"data-testid\"?: string;\n}\n\nexport const SkeletonGroup: React.FC<SkeletonGroupProps> = ({\n count = 1,\n children,\n className,\n \"data-testid\": dataTestId,\n}) => {\n return (\n <div className={className} data-testid={dataTestId}>\n {Array.from({ length: count }).map((_, index) => (\n <div key={index}>{children}</div>\n ))}\n </div>\n );\n};\n","\"use client\";\n\nimport React from \"react\";\n\nimport TextureLogoBrand from \"./texture_logo_brand.svg?react\";\nimport TextureLogoBrandWordmark from \"./texture_logo_brand_wordmark.svg?react\";\nimport TextureLogoDark from \"./texture_logo_dark.svg?react\";\nimport TextureLogoDarkWordmark from \"./texture_logo_dark_wordmark.svg?react\";\nimport TextureLogoWhite from \"./texture_logo_white.svg?react\";\nimport TextureLogoWhiteWordmark from \"./texture_logo_white_wordmark.svg?react\";\n\ninterface LogoProps {\n color: \"dark\" | \"white\" | \"brand\";\n withWordmark: boolean;\n width: number;\n height?: number;\n className?: string;\n}\n\n// Original SVG dimensions\nconst WORDMARK_ASPECT_RATIO = 1085 / 320; // ~3.39\nconst LOGO_ASPECT_RATIO = 320 / 320; // 1\n\nconst Logo: React.FC<LogoProps> = ({ color, withWordmark, width, height: providedHeight, className }) => {\n const logoMap = {\n brand: withWordmark ? TextureLogoBrandWordmark : TextureLogoBrand,\n dark: withWordmark ? TextureLogoDarkWordmark : TextureLogoDark,\n white: withWordmark ? TextureLogoWhiteWordmark : TextureLogoWhite,\n };\n\n const LogoComponent = logoMap[color];\n\n // Calculate the correct height based on width and aspect ratio\n const height = providedHeight || Math.round(width / (withWordmark ? WORDMARK_ASPECT_RATIO : LOGO_ASPECT_RATIO));\n\n return <LogoComponent width={width} height={height} className={className} aria-label=\"Logo\" />;\n};\n\nexport { Logo };\n","import { twMerge } from \"tailwind-merge\";\n\ninterface LoaderProps {\n /**\n * Optional className for custom styling\n */\n className?: string;\n /**\n * Size of the loader in pixels\n * @default 24\n */\n size?: number;\n /**\n * Color of the loader\n * @default \"text-action-primary\"\n */\n color?: string;\n}\n\nexport const Loader = ({ className, size = 24, color = \"text-action-primary\" }: LoaderProps) => {\n return (\n <div\n className={twMerge(\n \"inline-block animate-spin rounded-full border-2 border-solid border-current border-r-transparent\",\n color,\n className,\n )}\n style={{\n width: size,\n height: size,\n }}\n role=\"status\"\n aria-label=\"loading\"\n >\n <span className=\"sr-only\">Loading...</span>\n </div>\n );\n};\n","import React from \"react\";\nimport { twMerge } from \"tailwind-merge\";\n\nconst sizeVariants = {\n xs: \"text-lg font-semibold\",\n sm: \"text-xl font-semibold\",\n md: \"text-2xl font-semibold\",\n lg: \"text-3xl font-semibold\",\n xl: \"text-4xl font-semibold\",\n} as const;\n\nconst heightVariants = {\n page: \"h-16 leading-[62px]\",\n} as const;\n\nexport type HeadingSize = keyof typeof sizeVariants;\nexport type HeadingHeight = keyof typeof heightVariants;\n\nexport interface HeadingProps {\n tag?: keyof JSX.IntrinsicElements;\n size?: HeadingSize;\n height?: HeadingHeight;\n className?: string;\n children?: React.ReactNode;\n}\n\nexport function Heading({ tag: Tag = \"h1\", size = \"lg\", height, className = \"\", children }: HeadingProps) {\n const sizeClasses = sizeVariants[size];\n const heightClasses = height ? heightVariants[height] : \"\";\n\n return <Tag className={twMerge(sizeClasses, heightClasses, className)}>{children}</Tag>;\n}\n","\"use client\";\n\nimport React, { useState } from \"react\";\nimport { Button } from \"../Button\";\nimport { Icon } from \"../Icon\";\nimport { Tooltip } from \"../Tooltip\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport interface CopyToClipboardProps {\n /**\n * The value to copy to clipboard. If not provided, will use the text content of children\n */\n value?: string;\n /**\n * The content to display\n */\n children: React.ReactNode;\n /**\n * Optional className for the container\n */\n className?: string;\n /**\n * Size of the copy button, defaults to \"sm\"\n */\n size?: \"sm\" | \"md\";\n}\n\nexport function CopyToClipboard({ value, children, className, size = \"sm\" }: CopyToClipboardProps) {\n const [showTooltip, setShowTooltip] = useState(false);\n\n const handleCopy = () => {\n const textToCopy = value || (typeof children === \"string\" ? children : \"\");\n navigator.clipboard.writeText(textToCopy);\n setShowTooltip(true);\n setTimeout(() => {\n setShowTooltip(false);\n }, 2000);\n };\n\n const iconSize = size === \"sm\" ? 14 : 16;\n\n const copyButton = (\n <Button variant=\"icon\" size={size} onPress={handleCopy} className=\"!px-2\">\n <Icon name=\"Copy\" size={iconSize} />\n </Button>\n );\n\n return (\n <div className={twMerge(\"flex items-center gap-1\", className)}>\n {children}\n {showTooltip ? <Tooltip content=\"Copied!\">{copyButton}</Tooltip> : copyButton}\n </div>\n );\n}\n","import React from \"react\";\nimport { Switch as AriaSwitch, SwitchProps as AriaSwitchProps } from \"react-aria-components\";\nimport { composeTailwindRenderProps, focusRing } from \"../../utils\";\n\nexport interface SwitchProps extends Omit<AriaSwitchProps, \"children\"> {\n children: React.ReactNode;\n}\n\nfunction getTrackClassName({ isSelected, isDisabled }: { isSelected: boolean; isDisabled: boolean }) {\n const baseClasses =\n \"flex h-4 w-7 px-px items-center shrink-0 cursor-default rounded-full transition duration-200 ease-in-out shadow-inner border border-transparent\";\n const focusRingClasses = focusRing;\n\n const selectedClasses = isSelected\n ? \"bg-gray-700 dark:bg-zinc-300 forced-colors:!bg-[Highlight] group-pressed:bg-gray-800 dark:group-pressed:bg-zinc-200\"\n : \"bg-gray-400 dark:bg-zinc-400 group-pressed:bg-gray-500 dark:group-pressed:bg-zinc-300\";\n\n const disabledClasses = isDisabled\n ? \"bg-gray-200 dark:bg-zinc-700 forced-colors:group-selected:!bg-[GrayText] forced-colors:border-[GrayText]\"\n : \"\";\n\n return [baseClasses, focusRingClasses, selectedClasses, disabledClasses].filter(Boolean).join(\" \");\n}\n\nfunction getHandleClassName({ isSelected, isDisabled }: { isSelected: boolean; isDisabled: boolean }) {\n const baseClasses =\n \"h-3 w-3 transform rounded-full bg-white dark:bg-zinc-900 outline outline-1 -outline-offset-1 outline-transparent shadow transition duration-200 ease-in-out\";\n\n const selectedClasses = isSelected ? \"translate-x-[100%]\" : \"translate-x-0\";\n\n const disabledClasses = isDisabled ? \"forced-colors:outline-[GrayText]\" : \"\";\n\n return [baseClasses, selectedClasses, disabledClasses].filter(Boolean).join(\" \");\n}\n\nexport function Switch({ children, ...props }: SwitchProps) {\n return (\n <AriaSwitch\n {...props}\n className={composeTailwindRenderProps(\n props.className,\n \"group flex items-center gap-2 text-sm text-gray-800 transition disabled:text-gray-300 dark:text-zinc-200 dark:disabled:text-zinc-600 forced-colors:disabled:text-[GrayText]\",\n )}\n >\n {(renderProps) => (\n <>\n <div className={getTrackClassName(renderProps)}>\n <span className={getHandleClassName(renderProps)} />\n </div>\n {children}\n </>\n )}\n </AriaSwitch>\n );\n}\n","import { ProgressBar as AriaProgressBar, ProgressBarProps as AriaProgressBarProps } from \"react-aria-components\";\nimport { composeTailwindRenderProps } from \"../../utils\";\n\nexport interface ProgressBarProps extends AriaProgressBarProps {\n label?: string;\n rightLabel?: string;\n progressWidth?: number;\n hideLabels?: boolean;\n}\n\nexport function ProgressBar({ label, rightLabel, progressWidth = 64, hideLabels = false, ...props }: ProgressBarProps) {\n return (\n <AriaProgressBar {...props} className={composeTailwindRenderProps(props.className, \"flex flex-col gap-1\")}>\n {({ percentage, valueText, isIndeterminate }) => (\n <>\n {!hideLabels && (\n <div className=\"flex items-center justify-between gap-2\">\n <span className=\"text-sm text-text-heading\">{label}</span>\n <span className=\"text-sm text-text-heading\">{rightLabel || valueText}</span>\n </div>\n )}\n <div\n className={`relative h-2 w-${progressWidth} overflow-hidden rounded-full bg-background-muted outline outline-1 -outline-offset-1 outline-transparent`}\n >\n <div\n className={`absolute top-0 h-full rounded-full bg-blue-600 dark:bg-blue-500 forced-colors:bg-[Highlight] ${isIndeterminate ? \"left-full duration-1000 ease-out animate-in slide-out-to-right-full repeat-infinite [--tw-enter-translate-x:calc(-16rem-100%)]\" : \"left-0\"}`}\n style={{ width: (isIndeterminate ? 40 : percentage) + \"%\" }}\n />\n </div>\n </>\n )}\n </AriaProgressBar>\n );\n}\n","import {\n Calendar as AriaCalendar,\n CalendarGridHeader as AriaCalendarGridHeader,\n CalendarProps as AriaCalendarProps,\n CalendarCell,\n CalendarGrid,\n CalendarGridBody,\n CalendarHeaderCell,\n DateValue,\n Heading,\n Text,\n useLocale,\n} from \"react-aria-components\";\nimport { Button } from \"../Button\";\nimport { Icon } from \"../Icon\";\nimport { focusRing } from \"../../utils\";\n\nfunction getCellStyles({ isSelected, isDisabled }: { isSelected: boolean; isDisabled: boolean }) {\n const baseStyles = [\n focusRing,\n \"w-9 h-9 text-base cursor-default rounded-full flex items-center justify-center forced-color-adjust-none\",\n ];\n\n if (isDisabled) {\n baseStyles.push(\"text-gray-300 dark:text-zinc-600 forced-colors:text-[GrayText]\");\n } else if (isSelected) {\n baseStyles.push(\n \"bg-blue-600 invalid:bg-red-600 text-white forced-colors:bg-[Highlight] forced-colors:invalid:bg-[Mark] forced-colors:text-[HighlightText]\",\n );\n } else {\n baseStyles.push(\n \"text-zinc-900 dark:text-zinc-200 hover:bg-gray-100 dark:hover:bg-zinc-700 pressed:bg-gray-200 dark:pressed:bg-zinc-600\",\n );\n }\n\n return baseStyles.join(\" \");\n}\n\nexport interface CalendarProps<T extends DateValue> extends Omit<AriaCalendarProps<T>, \"visibleDuration\"> {\n errorMessage?: string;\n}\n\nexport function Calendar<T extends DateValue>({ errorMessage, ...props }: CalendarProps<T>) {\n return (\n <AriaCalendar {...props}>\n <CalendarHeader />\n <CalendarGrid>\n <CalendarGridHeader />\n <CalendarGridBody>\n {(date) => (\n <CalendarCell\n date={date}\n className={({ isSelected, isDisabled }) => getCellStyles({ isSelected, isDisabled })}\n />\n )}\n </CalendarGridBody>\n </CalendarGrid>\n {errorMessage && (\n <Text slot=\"errorMessage\" className=\"text-sm text-red-600\">\n {errorMessage}\n </Text>\n )}\n </AriaCalendar>\n );\n}\n\nexport function CalendarHeader() {\n const { direction } = useLocale();\n\n const buttonSize = 18;\n\n return (\n <header className=\"flex w-full items-center gap-1 px-1 pb-4\">\n <Button variant=\"icon\" slot=\"previous\" className=\"pl-0\">\n {direction === \"rtl\" ? (\n <Icon name=\"CaretRight\" aria-hidden size={buttonSize} />\n ) : (\n <Icon name=\"CaretLeft\" aria-hidden size={buttonSize} />\n )}\n </Button>\n <Heading className=\"text-md mx-2 flex-1 text-center font-semibold text-zinc-900 dark:text-zinc-200\" />\n <Button variant=\"icon\" slot=\"next\" className=\"pr-0\">\n {direction === \"rtl\" ? (\n <Icon name=\"CaretLeft\" aria-hidden size={buttonSize} />\n ) : (\n <Icon name=\"CaretRight\" aria-hidden size={buttonSize} />\n )}\n </Button>\n </header>\n );\n}\n\nexport function CalendarGridHeader() {\n return (\n <AriaCalendarGridHeader>\n {(day) => <CalendarHeaderCell className=\"text-xs font-semibold text-text-caption\">{day}</CalendarHeaderCell>}\n </AriaCalendarGridHeader>\n );\n}\n","import {\n RangeCalendar as AriaRangeCalendar,\n RangeCalendarProps as AriaRangeCalendarProps,\n CalendarCell,\n CalendarGrid,\n CalendarGridBody,\n DateValue,\n Text,\n} from \"react-aria-components\";\nimport { CalendarGridHeader, CalendarHeader } from \"../Calendar\";\nimport { focusRing } from \"../../utils\";\n\nexport interface RangeCalendarProps<T extends DateValue> extends Omit<AriaRangeCalendarProps<T>, \"visibleDuration\"> {\n errorMessage?: string;\n}\n\nfunction getCellClassName({\n selectionState,\n isDisabled,\n}: {\n selectionState: \"none\" | \"middle\" | \"cap\";\n isDisabled?: boolean;\n}) {\n const baseClasses = `${focusRing} w-full h-full flex items-center justify-center rounded-sm forced-color-adjust-none font-semibold`;\n\n const selectionStateClasses = {\n none: \"text-text-body group-hover:bg-gray-200 group-pressed:bg-gray-200\",\n middle: [\n \"group-hover:bg-gray-300 forced-colors:group-hover:bg-[Highlight]\",\n \"group-invalid:group-hover:bg-red-200 forced-colors:group-invalid:group-hover:bg-[Mark]\",\n \"group-pressed:bg-blue-300 forced-colors:group-pressed:bg-[Highlight] forced-colors:text-[HighlightText]\",\n \"group-invalid:group-pressed:bg-red-300 forced-colors:group-invalid:group-pressed:bg-[Mark]\",\n ].join(\" \"),\n cap: \" group-invalid:bg-red-600 forced-colors:bg-[Highlight] forced-colors:group-invalid:bg-[Mark] text-white forced-colors:text-white !bg-neutral-black\",\n };\n\n const disabledClasses = isDisabled ? \"text-textFaint dark:text-zinc-600 forced-colors:text-textFaint font-light\" : \"\";\n\n return [baseClasses, selectionStateClasses[selectionState], disabledClasses].filter(Boolean).join(\" \");\n}\n\nexport function RangeCalendar<T extends DateValue>({ errorMessage, ...props }: RangeCalendarProps<T>) {\n return (\n <AriaRangeCalendar {...props}>\n <CalendarHeader />\n <CalendarGrid className=\"w-full [&_td]:px-0\">\n <CalendarGridHeader />\n <CalendarGridBody>\n {(date) => (\n <CalendarCell\n date={date}\n className=\"selection-start:rounded-s-end selection-end:rounded-e-end [td:last-child_&]:rounded-e-end group h-9 w-9 cursor-default text-sm outline outline-0 outside-month:text-gray-300 selected:bg-background-selected invalid:selected:bg-red-100 forced-colors:selected:bg-[Highlight] forced-colors:selected:text-white forced-colors:invalid:selected:bg-[Mark] [td:first-child_&]:rounded-s-full\"\n >\n {({\n formattedDate,\n isSelected,\n isSelectionStart,\n isSelectionEnd,\n isFocusVisible: _isFocusVisible,\n isDisabled,\n }) => (\n <span\n className={getCellClassName({\n selectionState:\n isSelected && (isSelectionStart || isSelectionEnd) ? \"cap\" : isSelected ? \"middle\" : \"none\",\n isDisabled,\n })}\n >\n {formattedDate}\n </span>\n )}\n </CalendarCell>\n )}\n </CalendarGridBody>\n </CalendarGrid>\n {errorMessage && (\n <Text slot=\"errorMessage\" className=\"text-sm text-red-600\">\n {errorMessage}\n </Text>\n )}\n </AriaRangeCalendar>\n );\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is\n// guarded by a check that it only runs on the client side.\n// eslint-disable-next-line rulesdir/useLayoutEffectRule\nimport React, {JSX, ReactNode, useContext, useLayoutEffect, useMemo, useRef, useState} from 'react';\n\n// To support SSR, the auto incrementing id counter is stored in a context. This allows\n// it to be reset on every request to ensure the client and server are consistent.\n// There is also a prefix string that is used to support async loading components\n// Each async boundary must be wrapped in an SSR provider, which appends to the prefix\n// and resets the current id counter. This ensures that async loaded components have\n// consistent ids regardless of the loading order.\ninterface SSRContextValue {\n prefix: string,\n current: number\n}\n\n// Default context value to use in case there is no SSRProvider. This is fine for\n// client-only apps. In order to support multiple copies of React Aria potentially\n// being on the page at once, the prefix is set to a random number. SSRProvider\n// will reset this to zero for consistency between server and client, so in the\n// SSR case multiple copies of React Aria is not supported.\nconst defaultContext: SSRContextValue = {\n prefix: String(Math.round(Math.random() * 10000000000)),\n current: 0\n};\n\nconst SSRContext = React.createContext<SSRContextValue>(defaultContext);\nconst IsSSRContext = React.createContext(false);\n\nexport interface SSRProviderProps {\n /** Your application here. */\n children: ReactNode\n}\n\n// This is only used in React < 18.\nfunction LegacySSRProvider(props: SSRProviderProps): JSX.Element {\n let cur = useContext(SSRContext);\n let counter = useCounter(cur === defaultContext);\n let [isSSR, setIsSSR] = useState(true);\n let value: SSRContextValue = useMemo(() => ({\n // If this is the first SSRProvider, start with an empty string prefix, otherwise\n // append and increment the counter.\n prefix: cur === defaultContext ? '' : `${cur.prefix}-${counter}`,\n current: 0\n }), [cur, counter]);\n\n // If on the client, and the component was initially server rendered,\n // then schedule a layout effect to update the component after hydration.\n if (typeof document !== 'undefined') {\n // This if statement technically breaks the rules of hooks, but is safe\n // because the condition never changes after mounting.\n // eslint-disable-next-line react-hooks/rules-of-hooks\n useLayoutEffect(() => {\n setIsSSR(false);\n }, []);\n }\n\n return (\n <SSRContext.Provider value={value}>\n <IsSSRContext.Provider value={isSSR}>\n {props.children}\n </IsSSRContext.Provider>\n </SSRContext.Provider>\n );\n}\n\nlet warnedAboutSSRProvider = false;\n\n/**\n * When using SSR with React Aria in React 16 or 17, applications must be wrapped in an SSRProvider.\n * This ensures that auto generated ids are consistent between the client and server.\n */\nexport function SSRProvider(props: SSRProviderProps): JSX.Element {\n if (typeof React['useId'] === 'function') {\n if (process.env.NODE_ENV !== 'test' && !warnedAboutSSRProvider) {\n console.warn('In React 18, SSRProvider is not necessary and is a noop. You can remove it from your app.');\n warnedAboutSSRProvider = true;\n }\n return <>{props.children}</>;\n }\n return <LegacySSRProvider {...props} />;\n}\n\nlet canUseDOM = Boolean(\n typeof window !== 'undefined' &&\n window.document &&\n window.document.createElement\n);\n\nlet componentIds = new WeakMap();\n\nfunction useCounter(isDisabled = false) {\n let ctx = useContext(SSRContext);\n let ref = useRef<number | null>(null);\n // eslint-disable-next-line rulesdir/pure-render\n if (ref.current === null && !isDisabled) {\n // In strict mode, React renders components twice, and the ref will be reset to null on the second render.\n // This means our id counter will be incremented twice instead of once. This is a problem because on the\n // server, components are only rendered once and so ids generated on the server won't match the client.\n // In React 18, useId was introduced to solve this, but it is not available in older versions. So to solve this\n // we need to use some React internals to access the underlying Fiber instance, which is stable between renders.\n // This is exposed as ReactCurrentOwner in development, which is all we need since StrictMode only runs in development.\n // To ensure that we only increment the global counter once, we store the starting id for this component in\n // a weak map associated with the Fiber. On the second render, we reset the global counter to this value.\n // Since React runs the second render immediately after the first, this is safe.\n // @ts-ignore\n let currentOwner = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;\n if (currentOwner) {\n let prevComponentValue = componentIds.get(currentOwner);\n if (prevComponentValue == null) {\n // On the first render, and first call to useId, store the id and state in our weak map.\n componentIds.set(currentOwner, {\n id: ctx.current,\n state: currentOwner.memoizedState\n });\n } else if (currentOwner.memoizedState !== prevComponentValue.state) {\n // On the second render, the memoizedState gets reset by React.\n // Reset the counter, and remove from the weak map so we don't\n // do this for subsequent useId calls.\n ctx.current = prevComponentValue.id;\n componentIds.delete(currentOwner);\n }\n }\n\n // eslint-disable-next-line rulesdir/pure-render\n ref.current = ++ctx.current;\n }\n\n // eslint-disable-next-line rulesdir/pure-render\n return ref.current;\n}\n\nfunction useLegacySSRSafeId(defaultId?: string): string {\n let ctx = useContext(SSRContext);\n\n // If we are rendering in a non-DOM environment, and there's no SSRProvider,\n // provide a warning to hint to the developer to add one.\n if (ctx === defaultContext && !canUseDOM) {\n console.warn('When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.');\n }\n\n let counter = useCounter(!!defaultId);\n let prefix = ctx === defaultContext && process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${ctx.prefix}`;\n return defaultId || `${prefix}-${counter}`;\n}\n\nfunction useModernSSRSafeId(defaultId?: string): string {\n let id = React.useId();\n let [didSSR] = useState(useIsSSR());\n let prefix = didSSR || process.env.NODE_ENV === 'test' ? 'react-aria' : `react-aria${defaultContext.prefix}`;\n return defaultId || `${prefix}-${id}`;\n}\n\n// Use React.useId in React 18 if available, otherwise fall back to our old implementation.\n/** @private */\nexport const useSSRSafeId = typeof React['useId'] === 'function' ? useModernSSRSafeId : useLegacySSRSafeId;\n\nfunction getSnapshot() {\n return false;\n}\n\nfunction getServerSnapshot() {\n return true;\n}\n\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nfunction subscribe(onStoreChange: () => void): () => void {\n // noop\n return () => {};\n}\n\n/**\n * Returns whether the component is currently being server side rendered or\n * hydrated on the client. Can be used to delay browser-specific rendering\n * until after hydration.\n */\nexport function useIsSSR(): boolean {\n // In React 18, we can use useSyncExternalStore to detect if we're server rendering or hydrating.\n if (typeof React['useSyncExternalStore'] === 'function') {\n return React['useSyncExternalStore'](subscribe, getSnapshot, getServerSnapshot);\n }\n\n // eslint-disable-next-line react-hooks/rules-of-hooks\n return useContext(IsSSRContext);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\n// https://en.wikipedia.org/wiki/Right-to-left\nconst RTL_SCRIPTS = new Set(['Arab', 'Syrc', 'Samr', 'Mand', 'Thaa', 'Mend', 'Nkoo', 'Adlm', 'Rohg', 'Hebr']);\nconst RTL_LANGS = new Set(['ae', 'ar', 'arc', 'bcc', 'bqi', 'ckb', 'dv', 'fa', 'glk', 'he', 'ku', 'mzn', 'nqo', 'pnb', 'ps', 'sd', 'ug', 'ur', 'yi']);\n\n/**\n * Determines if a locale is read right to left using [Intl.Locale]{@link https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale}.\n */\nexport function isRTL(localeString: string) {\n // If the Intl.Locale API is available, use it to get the locale's text direction.\n if (Intl.Locale) {\n let locale = new Intl.Locale(localeString).maximize();\n\n // Use the text info object to get the direction if possible.\n // @ts-ignore - this was implemented as a property by some browsers before it was standardized as a function.\n // https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Locale/getTextInfo\n let textInfo = typeof locale.getTextInfo === 'function' ? locale.getTextInfo() : locale.textInfo;\n if (textInfo) {\n return textInfo.direction === 'rtl';\n }\n\n // Fallback: guess using the script.\n // This is more accurate than guessing by language, since languages can be written in multiple scripts.\n if (locale.script) {\n return RTL_SCRIPTS.has(locale.script);\n }\n }\n\n // If not, just guess by the language (first part of the locale)\n let lang = localeString.split('-')[0];\n return RTL_LANGS.has(lang);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Direction} from '@react-types/shared';\nimport {isRTL} from './utils';\nimport {useEffect, useState} from 'react';\nimport {useIsSSR} from '@react-aria/ssr';\n\nexport interface Locale {\n /** The [BCP47](https://www.ietf.org/rfc/bcp/bcp47.txt) language code for the locale. */\n locale: string,\n /** The writing direction for the locale. */\n direction: Direction\n}\n\n// Locale passed from server by PackageLocalizationProvider.\nconst localeSymbol = Symbol.for('react-aria.i18n.locale');\n\n/**\n * Gets the locale setting of the browser.\n */\nexport function getDefaultLocale(): Locale {\n let locale = typeof window !== 'undefined' && window[localeSymbol]\n // @ts-ignore\n || (typeof navigator !== 'undefined' && (navigator.language || navigator.userLanguage))\n || 'en-US';\n\n try {\n Intl.DateTimeFormat.supportedLocalesOf([locale]);\n } catch {\n locale = 'en-US';\n }\n return {\n locale,\n direction: isRTL(locale) ? 'rtl' : 'ltr'\n };\n}\n\nlet currentLocale = getDefaultLocale();\nlet listeners = new Set<(locale: Locale) => void>();\n\nfunction updateLocale() {\n currentLocale = getDefaultLocale();\n for (let listener of listeners) {\n listener(currentLocale);\n }\n}\n\n/**\n * Returns the current browser/system language, and updates when it changes.\n */\nexport function useDefaultLocale(): Locale {\n let isSSR = useIsSSR();\n let [defaultLocale, setDefaultLocale] = useState(currentLocale);\n\n useEffect(() => {\n if (listeners.size === 0) {\n window.addEventListener('languagechange', updateLocale);\n }\n\n listeners.add(setDefaultLocale);\n\n return () => {\n listeners.delete(setDefaultLocale);\n if (listeners.size === 0) {\n window.removeEventListener('languagechange', updateLocale);\n }\n };\n }, []);\n\n // We cannot determine the browser's language on the server, so default to\n // en-US. This will be updated after hydration on the client to the correct value.\n if (isSSR) {\n return {\n locale: 'en-US',\n direction: 'ltr'\n };\n }\n\n return defaultLocale;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {isRTL} from './utils';\nimport {Locale, useDefaultLocale} from './useDefaultLocale';\nimport React, {ReactNode, useContext} from 'react';\n\nexport interface I18nProviderProps {\n /** Contents that should have the locale applied. */\n children: ReactNode,\n /** The locale to apply to the children. */\n locale?: string\n}\n\nconst I18nContext = React.createContext<Locale | null>(null);\n\n/**\n * Provides the locale for the application to all child components.\n */\nexport function I18nProvider(props: I18nProviderProps) {\n let {locale, children} = props;\n let defaultLocale = useDefaultLocale();\n\n let value: Locale = React.useMemo(() => {\n if (!locale) {\n return defaultLocale;\n }\n\n return {\n locale,\n direction: isRTL(locale) ? 'rtl' : 'ltr'\n };\n }, [defaultLocale, locale]);\n\n return (\n <I18nContext.Provider value={value}>\n {children}\n </I18nContext.Provider>\n );\n}\n\n/**\n * Returns the current locale and layout direction.\n */\nexport function useLocale(): Locale {\n let defaultLocale = useDefaultLocale();\n let context = useContext(I18nContext);\n return context || defaultLocale;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useLocale} from './context';\n\nlet cache = new Map<string, Intl.Collator>();\n\n/**\n * Provides localized string collation for the current locale. Automatically updates when the locale changes,\n * and handles caching of the collator for performance.\n * @param options - Collator options.\n */\nexport function useCollator(options?: Intl.CollatorOptions): Intl.Collator {\n let {locale} = useLocale();\n\n let cacheKey = locale + (options ? Object.entries(options).sort((a, b) => a[0] < b[0] ? -1 : 1).join() : '');\n if (cache.has(cacheKey)) {\n return cache.get(cacheKey)!;\n }\n\n let formatter = new Intl.Collator(locale, options);\n cache.set(cacheKey, formatter);\n return formatter;\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {useCallback, useMemo} from 'react';\nimport {useCollator} from './useCollator';\n\nexport interface Filter {\n /** Returns whether a string starts with a given substring. */\n startsWith(string: string, substring: string): boolean,\n /** Returns whether a string ends with a given substring. */\n endsWith(string: string, substring: string): boolean,\n /** Returns whether a string contains a given substring. */\n contains(string: string, substring: string): boolean\n}\n\n/**\n * Provides localized string search functionality that is useful for filtering or matching items\n * in a list. Options can be provided to adjust the sensitivity to case, diacritics, and other parameters.\n */\nexport function useFilter(options?: Intl.CollatorOptions): Filter {\n let collator = useCollator({\n usage: 'search',\n ...options\n });\n\n // TODO(later): these methods don't currently support the ignorePunctuation option.\n let startsWith = useCallback((string, substring) => {\n if (substring.length === 0) {\n return true;\n }\n\n // Normalize both strings so we can slice safely\n // TODO: take into account the ignorePunctuation option as well...\n string = string.normalize('NFC');\n substring = substring.normalize('NFC');\n return collator.compare(string.slice(0, substring.length), substring) === 0;\n }, [collator]);\n\n let endsWith = useCallback((string, substring) => {\n if (substring.length === 0) {\n return true;\n }\n\n string = string.normalize('NFC');\n substring = substring.normalize('NFC');\n return collator.compare(string.slice(-substring.length), substring) === 0;\n }, [collator]);\n\n let contains = useCallback((string, substring) => {\n if (substring.length === 0) {\n return true;\n }\n\n string = string.normalize('NFC');\n substring = substring.normalize('NFC');\n\n let scan = 0;\n let sliceLen = substring.length;\n for (; scan + sliceLen <= string.length; scan++) {\n let slice = string.slice(scan, scan + sliceLen);\n if (collator.compare(substring, slice) === 0) {\n return true;\n }\n }\n\n return false;\n }, [collator]);\n\n return useMemo(() => ({\n startsWith,\n endsWith,\n contains\n }), [startsWith, endsWith, contains]);\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {Key, Selection} from '@react-types/shared';\nimport {useMemo, useState} from 'react';\n\nexport interface ListOptions<T> {\n /** Initial items in the list. */\n initialItems?: T[],\n /** The keys for the initially selected items. */\n initialSelectedKeys?: 'all' | Iterable<Key>,\n /** The initial text to filter the list by. */\n initialFilterText?: string,\n /** A function that returns a unique key for an item object. */\n getKey?: (item: T) => Key,\n /** A function that returns whether a item matches the current filter text. */\n filter?: (item: T, filterText: string) => boolean\n}\n\nexport interface ListData<T> {\n /** The items in the list. */\n items: T[],\n\n /** The keys of the currently selected items in the list. */\n selectedKeys: Selection,\n\n /** Sets the selected keys. */\n setSelectedKeys(keys: Selection): void,\n\n /** The current filter text. */\n filterText: string,\n\n /** Sets the filter text. */\n setFilterText(filterText: string): void,\n\n /**\n * Gets an item from the list by key.\n * @param key - The key of the item to retrieve.\n */\n getItem(key: Key): T | undefined,\n\n /**\n * Inserts items into the list at the given index.\n * @param index - The index to insert into.\n * @param values - The values to insert.\n */\n insert(index: number, ...values: T[]): void,\n\n /**\n * Inserts items into the list before the item at the given key.\n * @param key - The key of the item to insert before.\n * @param values - The values to insert.\n */\n insertBefore(key: Key, ...values: T[]): void,\n\n /**\n * Inserts items into the list after the item at the given key.\n * @param key - The key of the item to insert after.\n * @param values - The values to insert.\n */\n insertAfter(key: Key, ...values: T[]): void,\n\n /**\n * Appends items to the list.\n * @param values - The values to insert.\n */\n append(...values: T[]): void,\n\n /**\n * Prepends items to the list.\n * @param value - The value to insert.\n */\n prepend(...values: T[]): void,\n\n /**\n * Removes items from the list by their keys.\n * @param keys - The keys of the item to remove.\n */\n remove(...keys: Key[]): void,\n\n /**\n * Removes all items from the list that are currently\n * in the set of selected items.\n */\n removeSelectedItems(): void,\n\n /**\n * Moves an item within the list.\n * @param key - The key of the item to move.\n * @param toIndex - The index to move the item to.\n */\n move(key: Key, toIndex: number): void,\n\n /**\n * Moves one or more items before a given key.\n * @param key - The key of the item to move the items before.\n * @param keys - The keys of the items to move.\n */\n moveBefore(key: Key, keys: Iterable<Key>): void,\n\n /**\n * Moves one or more items after a given key.\n * @param key - The key of the item to move the items after.\n * @param keys - The keys of the items to move.\n */\n moveAfter(key: Key, keys: Iterable<Key>): void,\n\n /**\n * Updates an item in the list.\n * @param key - The key of the item to update.\n * @param newValue - The new value for the item.\n */\n update(key: Key, newValue: T): void\n}\n\nexport interface ListState<T> {\n items: T[],\n selectedKeys: Selection,\n filterText: string\n}\n\ninterface CreateListOptions<T, C> extends ListOptions<T> {\n cursor?: C\n}\n\n/**\n * Manages state for an immutable list data structure, and provides convenience methods to\n * update the data over time.\n */\nexport function useListData<T>(options: ListOptions<T>): ListData<T> {\n let {\n initialItems = [],\n initialSelectedKeys,\n getKey = (item: any) => item.id ?? item.key,\n filter,\n initialFilterText = ''\n } = options;\n\n // Store both items and filteredItems in state so we can go back to the unfiltered list\n let [state, setState] = useState<ListState<T>>({\n items: initialItems,\n selectedKeys: initialSelectedKeys === 'all' ? 'all' : new Set(initialSelectedKeys || []),\n filterText: initialFilterText\n });\n\n let filteredItems = useMemo(\n () => filter ? state.items.filter(item => filter(item, state.filterText)) : state.items,\n [state.items, state.filterText, filter]);\n\n return {\n ...state,\n items: filteredItems,\n ...createListActions({getKey}, setState),\n getItem(key: Key) {\n return state.items.find(item => getKey(item) === key);\n }\n };\n}\n\nexport function createListActions<T, C>(opts: CreateListOptions<T, C>, dispatch: (updater: (state: ListState<T>) => ListState<T>) => void): Omit<ListData<T>, 'items' | 'selectedKeys' | 'getItem' | 'filterText'> {\n let {cursor, getKey} = opts;\n return {\n setSelectedKeys(selectedKeys: Selection) {\n dispatch(state => ({\n ...state,\n selectedKeys\n }));\n },\n setFilterText(filterText: string) {\n dispatch(state => ({\n ...state,\n filterText\n }));\n },\n insert(index: number, ...values: T[]) {\n dispatch(state => insert(state, index, ...values));\n },\n insertBefore(key: Key, ...values: T[]) {\n dispatch(state => {\n let index = state.items.findIndex(item => getKey?.(item) === key);\n if (index === -1) {\n if (state.items.length === 0) {\n index = 0;\n } else {\n return state;\n }\n }\n\n return insert(state, index, ...values);\n });\n },\n insertAfter(key: Key, ...values: T[]) {\n dispatch(state => {\n let index = state.items.findIndex(item => getKey?.(item) === key);\n if (index === -1) {\n if (state.items.length === 0) {\n index = 0;\n } else {\n return state;\n }\n }\n\n return insert(state, index + 1, ...values);\n });\n },\n prepend(...values: T[]) {\n dispatch(state => insert(state, 0, ...values));\n },\n append(...values: T[]) {\n dispatch(state => insert(state, state.items.length, ...values));\n },\n remove(...keys: Key[]) {\n dispatch(state => {\n let keySet = new Set(keys);\n let items = state.items.filter(item => !keySet.has(getKey!(item)));\n\n let selection: Selection = 'all';\n if (state.selectedKeys !== 'all') {\n selection = new Set(state.selectedKeys);\n for (let key of keys) {\n selection.delete(key);\n }\n }\n if (cursor == null && items.length === 0) {\n selection = new Set();\n }\n\n return {\n ...state,\n items,\n selectedKeys: selection\n };\n });\n },\n removeSelectedItems() {\n dispatch(state => {\n if (state.selectedKeys === 'all') {\n return {\n ...state,\n items: [],\n selectedKeys: new Set()\n };\n }\n\n let selectedKeys = state.selectedKeys;\n let items = state.items.filter(item => !selectedKeys.has(getKey!(item)));\n return {\n ...state,\n items,\n selectedKeys: new Set()\n };\n });\n },\n move(key: Key, toIndex: number) {\n dispatch(state => {\n let index = state.items.findIndex(item => getKey!(item) === key);\n if (index === -1) {\n return state;\n }\n\n let copy = state.items.slice();\n let [item] = copy.splice(index, 1);\n copy.splice(toIndex, 0, item);\n return {\n ...state,\n items: copy\n };\n });\n },\n moveBefore(key: Key, keys: Iterable<Key>) {\n dispatch(state => {\n let toIndex = state.items.findIndex(item => getKey!(item) === key);\n if (toIndex === -1) {\n return state;\n }\n\n // Find indices of keys to move. Sort them so that the order in the list is retained.\n let keyArray = Array.isArray(keys) ? keys : [...keys];\n let indices = keyArray.map(key => state.items.findIndex(item => getKey!(item) === key)).sort((a, b) => a - b);\n return move(state, indices, toIndex);\n });\n },\n moveAfter(key: Key, keys: Iterable<Key>) {\n dispatch(state => {\n let toIndex = state.items.findIndex(item => getKey!(item) === key);\n if (toIndex === -1) {\n return state;\n }\n\n let keyArray = Array.isArray(keys) ? keys : [...keys];\n let indices = keyArray.map(key => state.items.findIndex(item => getKey!(item) === key)).sort((a, b) => a - b);\n return move(state, indices, toIndex + 1);\n });\n },\n update(key: Key, newValue: T) {\n dispatch(state => {\n let index = state.items.findIndex(item => getKey!(item) === key);\n if (index === -1) {\n return state;\n }\n\n return {\n ...state,\n items: [\n ...state.items.slice(0, index),\n newValue,\n ...state.items.slice(index + 1)\n ]\n };\n });\n }\n };\n}\n\nfunction insert<T>(state: ListState<T>, index: number, ...values: T[]): ListState<T> {\n return {\n ...state,\n items: [\n ...state.items.slice(0, index),\n ...values,\n ...state.items.slice(index)\n ]\n };\n}\n\nfunction move<T>(state: ListState<T>, indices: number[], toIndex: number): ListState<T> {\n // Shift the target down by the number of items being moved from before the target\n toIndex -= indices.filter(index => index < toIndex).length;\n\n let moves = indices.map(from => ({\n from,\n to: toIndex++\n }));\n\n // Shift later from indices down if they have a larger index\n for (let i = 0; i < moves.length; i++) {\n let a = moves[i].from;\n for (let j = i; j < moves.length; j++) {\n let b = moves[j].from;\n\n if (b > a) {\n moves[j].from--;\n }\n }\n }\n\n // Interleave the moves so they can be applied one by one rather than all at once\n for (let i = 0; i < moves.length; i++) {\n let a = moves[i];\n for (let j = moves.length - 1; j > i; j--) {\n let b = moves[j];\n\n if (b.from < a.to) {\n a.to++;\n } else {\n b.from++;\n }\n }\n }\n\n let copy = state.items.slice();\n for (let move of moves) {\n let [item] = copy.splice(move.from, 1);\n copy.splice(move.to, 0, item);\n }\n\n return {\n ...state,\n items: copy\n };\n}\n","/*\n * Copyright 2020 Adobe. All rights reserved.\n * This file is licensed to you under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License. You may obtain a copy\n * of the License at http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software distributed under\n * the License is distributed on an \"AS IS\" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS\n * OF ANY KIND, either express or implied. See the License for the specific language\n * governing permissions and limitations under the License.\n */\n\nimport {createListActions, ListData, ListState} from './useListData';\nimport {Key, LoadingState, Selection, SortDescriptor} from '@react-types/shared';\nimport {useEffect, useReducer, useRef} from 'react';\n\nexport interface AsyncListOptions<T, C> {\n /** The keys for the initially selected items. */\n initialSelectedKeys?: Iterable<Key>,\n /** The initial sort descriptor. */\n initialSortDescriptor?: SortDescriptor,\n /** The initial filter text. */\n initialFilterText?: string,\n /** A function that returns a unique key for an item object. */\n getKey?: (item: T) => Key,\n /** A function that loads the data for the items in the list. */\n load: AsyncListLoadFunction<T, C>,\n /**\n * An optional function that performs sorting. If not provided,\n * then `sortDescriptor` is passed to the `load` function.\n */\n sort?: AsyncListLoadFunction<T, C, AsyncListLoadOptions<T, C> & {sortDescriptor: SortDescriptor}>\n}\n\ntype AsyncListLoadFunction<T, C, S extends AsyncListLoadOptions<T, C> = AsyncListLoadOptions<T, C>> = (state: S) => AsyncListStateUpdate<T, C> | Promise<AsyncListStateUpdate<T, C>>;\n\ninterface AsyncListLoadOptions<T, C> {\n /** The items currently in the list. */\n items: T[],\n /** The keys of the currently selected items in the list. */\n selectedKeys: Selection,\n /** The current sort descriptor for the list. */\n sortDescriptor?: SortDescriptor,\n /** An abort signal used to notify the load function that the request has been aborted. */\n signal: AbortSignal,\n /** The pagination cursor returned from the last page load. */\n cursor?: C,\n /** The current filter text used to perform server side filtering. */\n filterText?: string,\n /** The current loading state of the list. */\n loadingState?: LoadingState\n}\n\ninterface AsyncListStateUpdate<T, C> {\n /** The new items to append to the list. */\n items: Iterable<T>,\n /** The keys to add to the selection. */\n selectedKeys?: Iterable<Key>,\n /** The sort descriptor to set. */\n sortDescriptor?: SortDescriptor,\n /** The pagination cursor to be used for the next page load. */\n cursor?: C,\n /** The updated filter text for the list. */\n filterText?: string\n}\n\ninterface AsyncListState<T, C> extends ListState<T> {\n state: LoadingState,\n items: T[],\n // disabledKeys?: Iterable<Key>,\n selectedKeys: Selection,\n // selectedKey?: Key,\n // expandedKeys?: Iterable<Key>,\n sortDescriptor?: SortDescriptor,\n error?: Error,\n abortController?: AbortController,\n cursor?: C\n}\n\ntype ActionType = 'success' | 'error' | 'loading' | 'loadingMore' | 'sorting' | 'update' | 'filtering';\ninterface Action<T, C> {\n type: ActionType,\n items?: Iterable<T>,\n selectedKeys?: Iterable<Key>,\n sortDescriptor?: SortDescriptor,\n error?: Error,\n abortController?: AbortController,\n updater?: (state: ListState<T>) => ListState<T>,\n cursor?: C,\n filterText?: string\n}\n\nexport interface AsyncListData<T> extends ListData<T> {\n /** Whether data is currently being loaded. */\n isLoading: boolean,\n /** If loading data failed, then this contains the error that occurred. */\n error?: Error,\n // disabledKeys?: Set<Key>,\n // selectedKey?: Key,\n // expandedKeys?: Set<Key>,\n /** The current sort descriptor for the list. */\n sortDescriptor?: SortDescriptor,\n\n /** Reloads the data in the list. */\n reload(): void,\n /** Loads the next page of data in the list. */\n loadMore(): void,\n /** Triggers sorting for the list. */\n sort(descriptor: SortDescriptor): void,\n /** The current loading state for the list. */\n loadingState: LoadingState\n}\n\nfunction reducer<T, C>(data: AsyncListState<T, C>, action: Action<T, C>): AsyncListState<T, C> {\n let selectedKeys;\n switch (data.state) {\n case 'idle':\n case 'error':\n switch (action.type) {\n case 'loading':\n case 'loadingMore':\n case 'sorting':\n case 'filtering':\n return {\n ...data,\n filterText: action.filterText ?? data.filterText,\n state: action.type,\n // Reset items to an empty list if loading, but not when sorting.\n items: action.type === 'loading' ? [] : data.items,\n sortDescriptor: action.sortDescriptor ?? data.sortDescriptor,\n abortController: action.abortController\n };\n case 'update':\n return {\n ...data,\n ...action.updater?.(data)\n };\n case 'success':\n case 'error':\n return data;\n default:\n throw new Error(`Invalid action \"${action.type}\" in state \"${data.state}\"`);\n }\n case 'loading':\n case 'sorting':\n case 'filtering':\n switch (action.type) {\n case 'success':\n // Ignore if there is a newer abortcontroller in state.\n // This means that multiple requests were going at once.\n // We want to take only the latest result.\n if (action.abortController !== data.abortController) {\n return data;\n }\n\n selectedKeys = action.selectedKeys ?? data.selectedKeys;\n return {\n ...data,\n filterText: action.filterText ?? data.filterText,\n state: 'idle',\n items: [...(action.items) ?? []],\n selectedKeys: selectedKeys === 'all' ? 'all' : new Set(selectedKeys),\n sortDescriptor: action.sortDescriptor ?? data.sortDescriptor,\n abortController: undefined,\n cursor: action.cursor\n };\n case 'error':\n if (action.abortController !== data.abortController) {\n return data;\n }\n\n return {\n ...data,\n state: 'error',\n error: action.error,\n abortController: undefined\n };\n case 'loading':\n case 'loadingMore':\n case 'sorting':\n case 'filtering':\n // We're already loading, and another load was triggered at the same time.\n // We need to abort the previous load and start a new one.\n data.abortController?.abort();\n return {\n ...data,\n filterText: action.filterText ?? data.filterText,\n state: action.type,\n // Reset items to an empty list if loading, but not when sorting.\n items: action.type === 'loading' ? [] : data.items,\n abortController: action.abortController\n };\n case 'update':\n // We're already loading, and an update happened at the same time (e.g. selectedKey changed).\n // Update data but don't abort previous load.\n return {\n ...data,\n ...action.updater?.(data)\n };\n default:\n throw new Error(`Invalid action \"${action.type}\" in state \"${data.state}\"`);\n }\n case 'loadingMore':\n switch (action.type) {\n case 'success':\n selectedKeys = (data.selectedKeys === 'all' || action.selectedKeys === 'all')\n ? 'all'\n : new Set([...data.selectedKeys, ...(action.selectedKeys ?? [])]);\n // Append the new items\n return {\n ...data,\n state: 'idle',\n items: [...data.items, ...(action.items ?? [])],\n selectedKeys,\n sortDescriptor: action.sortDescriptor ?? data.sortDescriptor,\n abortController: undefined,\n cursor: action.cursor\n };\n case 'error':\n if (action.abortController !== data.abortController) {\n return data;\n }\n\n return {\n ...data,\n state: 'error',\n error: action.error\n };\n case 'loading':\n case 'sorting':\n case 'filtering':\n // We're already loading more, and another load was triggered at the same time.\n // We need to abort the previous load more and start a new one.\n data.abortController?.abort();\n return {\n ...data,\n filterText: action.filterText ?? data.filterText,\n state: action.type,\n // Reset items to an empty list if loading, but not when sorting.\n items: action.type === 'loading' ? [] : data.items,\n abortController: action.abortController\n };\n case 'loadingMore':\n // If already loading more and another loading more is triggered, abort the new load more since\n // it is a duplicate request since the cursor hasn't been updated.\n // Do not overwrite the data.abortController\n action.abortController?.abort();\n\n return data;\n case 'update':\n // We're already loading, and an update happened at the same time (e.g. selectedKey changed).\n // Update data but don't abort previous load.\n return {\n ...data,\n ...action.updater?.(data)\n };\n default:\n throw new Error(`Invalid action \"${action.type}\" in state \"${data.state}\"`);\n }\n default:\n throw new Error(`Invalid state \"${data.state}\"`);\n }\n}\n\n/**\n * Manages state for an immutable async loaded list data structure, and provides convenience methods to\n * update the data over time. Manages loading and error states, pagination, and sorting.\n */\nexport function useAsyncList<T, C = string>(options: AsyncListOptions<T, C>): AsyncListData<T> {\n const {\n load,\n sort,\n initialSelectedKeys,\n initialSortDescriptor,\n getKey = (item: any) => item.id || item.key,\n initialFilterText = ''\n } = options;\n\n let [data, dispatch] = useReducer<AsyncListState<T, C>, [Action<T, C>]>(reducer, {\n state: 'idle',\n error: undefined,\n items: [],\n selectedKeys: initialSelectedKeys === 'all' ? 'all' : new Set(initialSelectedKeys),\n sortDescriptor: initialSortDescriptor,\n filterText: initialFilterText\n });\n\n const dispatchFetch = async (action: Action<T, C>, fn: AsyncListLoadFunction<T, C>) => {\n let abortController = new AbortController();\n try {\n dispatch({...action, abortController});\n let previousFilterText = action.filterText ?? data.filterText;\n\n let response = await fn({\n items: data.items.slice(),\n selectedKeys: data.selectedKeys,\n sortDescriptor: action.sortDescriptor ?? data.sortDescriptor,\n signal: abortController.signal,\n cursor: action.type === 'loadingMore' ? data.cursor : undefined,\n filterText: previousFilterText\n });\n\n let filterText = response.filterText ?? previousFilterText;\n dispatch({type: 'success', ...response, abortController});\n\n // Fetch a new filtered list if filterText is updated via `load` response func rather than list.setFilterText\n // Only do this if not aborted (e.g. user triggers another filter action before load completes)\n if (filterText && (filterText !== previousFilterText) && !abortController.signal.aborted) {\n dispatchFetch({type: 'filtering', filterText}, load);\n }\n } catch (e) {\n dispatch({type: 'error', error: e as Error, abortController});\n }\n };\n\n let didDispatchInitialFetch = useRef(false);\n useEffect(() => {\n if (!didDispatchInitialFetch.current) {\n dispatchFetch({type: 'loading'}, load);\n didDispatchInitialFetch.current = true;\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, []);\n\n return {\n items: data.items,\n selectedKeys: data.selectedKeys,\n sortDescriptor: data.sortDescriptor,\n isLoading: data.state === 'loading' || data.state === 'loadingMore' || data.state === 'sorting' || data.state === 'filtering',\n loadingState: data.state,\n error: data.error,\n filterText: data.filterText,\n getItem(key: Key) {\n return data.items.find(item => getKey(item) === key);\n },\n reload() {\n dispatchFetch({type: 'loading'}, load);\n },\n loadMore() {\n // Ignore if already loading more or if performing server side filtering.\n if (data.state === 'loadingMore' || data.state === 'filtering' || data.cursor == null) {\n return;\n }\n\n dispatchFetch({type: 'loadingMore'}, load);\n },\n sort(sortDescriptor: SortDescriptor) {\n dispatchFetch({type: 'sorting', sortDescriptor}, (sort || load) as AsyncListLoadFunction<T, C>);\n },\n ...createListActions({...options, getKey, cursor: data.cursor}, fn => {\n dispatch({type: 'update', updater: fn});\n }),\n setFilterText(filterText: string) {\n dispatchFetch({type: 'filtering', filterText}, load);\n }\n };\n}\n","\"use client\";\n\nimport React, { useState, useEffect } from \"react\";\nimport {\n Button as AriaButton,\n ComboBox,\n Group,\n Input as AriaInput,\n type Key,\n ValidationResult,\n} from \"react-aria-components\";\nimport { useFilter } from \"react-aria\";\nimport { useAsyncList } from \"react-stately\";\nimport { Icon } from \"../Icon/Icon\";\nimport { Label } from \"../Field/Field\";\nimport { composeTailwindRenderProps } from \"../../utils\";\n\ninterface Item {\n id: string;\n name: string;\n}\n\ninterface Section {\n name: string;\n items: Item[];\n}\n\nconst sizeStylesObject = {\n sm: \"min-h-[theme(controlElementSize.sm)] max-h-[theme(controlElementSize.sm)] text-controlElementSm\",\n md: \"min-h-[theme(controlElementSize.md)] max-h-[theme(controlElementSize.md)] text-controlElementMd\",\n lg: \"min-h-[theme(controlElementSize.lg)] max-h-[theme(controlElementSize.lg)] text-controlElementLg\",\n xl: \"min-h-[theme(controlElementSize.xl)] max-h-[theme(controlElementSize.xl)] text-controlElementXl\",\n};\n\nconst textSizeStylesObject = {\n sm: \"text-controlElementSm\",\n md: \"text-controlElementMd\",\n lg: \"text-controlElementLg\",\n xl: \"text-controlElementXl\",\n};\n\nconst iconSizeClassMap = {\n sm: \"h-4 w-4\",\n md: \"h-5 w-5\",\n lg: \"h-6 w-6\",\n xl: \"h-7 w-7\",\n};\n\nfunction getInputGroupStyles(props: {\n isInvalid?: boolean;\n isDisabled?: boolean;\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n isOpen?: boolean;\n isFocused?: boolean;\n}) {\n const baseStyles = [\"flex w-full cursor-pointer items-center rounded-sm transition outline outline-2\"];\n\n const sizeStyles = props.size ? sizeStylesObject[props.size] : sizeStylesObject[\"md\"];\n\n const stateClasses = props.isDisabled\n ? \"opacity-50 cursor-not-allowed outline-border-input forced-colors:outline-[GrayText]\"\n : props.isInvalid\n ? \"outline-feedback-error-border group-invalid:outline-feedback-error-border forced-colors:group-invalid:outline-[Mark]\"\n : props.isOpen || props.isFocused\n ? \"outline-border-focus dark:outline-zinc-300 forced-colors:outline-[Highlight]\"\n : \"outline-border-input\";\n\n return [...baseStyles, sizeStyles, stateClasses].filter(Boolean).join(\" \");\n}\n\ntype RequestMethod = \"GET\" | \"POST\";\n\ninterface BaseRequestConfig {\n url: string;\n headers?: Record<string, string>;\n transformResponse: (data: unknown) => Item[];\n}\n\ninterface RestRequestConfig extends BaseRequestConfig {\n requestType: \"REST\";\n method?: RequestMethod;\n queryKey?: string;\n extraParams?: Record<string, string>;\n shouldLoad?: (filterText: string) => boolean;\n}\n\ninterface GraphQLRequestConfig extends BaseRequestConfig {\n requestType: \"GraphQL\";\n graphqlQuery: string;\n variableKey?: string;\n responsePath?: string;\n shouldLoad?: (filterText: string) => boolean;\n}\n\ntype AutocompleteRequestConfig = RestRequestConfig | GraphQLRequestConfig;\n\nexport interface AutocompleteProps {\n label?: string;\n staticItems?: Item[];\n sections?: Section[];\n selectedKey?: Key | null;\n defaultSelectedKey?: Key | null;\n onSelectionChange?: (key: Key | null) => void;\n requestConfig?: AutocompleteRequestConfig;\n defaultFilter?: (textValue: string, inputValue: string) => boolean;\n placeholder?: string;\n renderItem?: (item: Item) => React.ReactNode;\n renderLeftIcon?: (isLoading: boolean) => React.ReactNode;\n errorMessage?: string | ((validation: ValidationResult) => string);\n description?: string;\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n tooltip?: string;\n isRequired?: boolean;\n isDisabled?: boolean;\n validationResult?: ValidationResult;\n showErrors?: boolean;\n autoFocus?: boolean;\n onLoadError?: (error: Error) => void;\n}\n\n// Add useDebounce hook\nfunction useDebounce<T>(value: T, delay: number = 300): T {\n const [debouncedValue, setDebouncedValue] = useState<T>(value);\n\n useEffect(() => {\n const timer = setTimeout(() => {\n setDebouncedValue(value);\n }, delay);\n\n return () => {\n clearTimeout(timer);\n };\n }, [value, delay]);\n\n return debouncedValue;\n}\n\nasync function handleRestRequest(\n config: RestRequestConfig,\n filterText: string,\n signal: AbortSignal,\n): Promise<{ items: Item[]; error?: string }> {\n try {\n // Extract the base URL and access token from config\n const baseUrl = config.url.replace(\"{q}\", filterText);\n\n // Add query parameters\n const params = new URLSearchParams();\n if (config.extraParams) {\n Object.entries(config.extraParams).forEach(([key, value]) => {\n params.append(key, value.toString());\n });\n }\n\n // Construct final URL\n const finalUrl = `${baseUrl}${params.toString() ? \"?\" + params.toString() : \"\"}`;\n\n const response = await fetch(finalUrl, {\n method: \"GET\",\n headers: config.headers,\n signal,\n });\n\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n\n const json = await response.json();\n return { items: config.transformResponse(json) };\n } catch (error) {\n return { items: [], error: error instanceof Error ? error.message : \"Unknown error occurred\" };\n }\n}\n\nasync function handleGraphQLRequest(\n config: GraphQLRequestConfig,\n filterText: string,\n signal: AbortSignal,\n): Promise<{ items: Item[]; error?: string }> {\n try {\n const query = config.graphqlQuery.replace(`$${config.variableKey || \"filter\"}`, `\"${filterText}\"`);\n\n const response = await fetch(config.url, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\",\n ...config.headers,\n },\n body: JSON.stringify({ query }),\n signal,\n });\n\n if (!response.ok) {\n throw new Error(`HTTP error! status: ${response.status}`);\n }\n\n let json = await response.json();\n\n if (json.errors) {\n throw new Error(json.errors[0]?.message || \"GraphQL error occurred\");\n }\n\n // For GraphQL, traverse the response path if specified\n if (config.responsePath) {\n json = config.responsePath.split(\".\").reduce((obj, key) => obj?.[key], json);\n }\n\n return { items: config.transformResponse(json) };\n } catch (error) {\n return { items: [], error: error instanceof Error ? error.message : \"Unknown error occurred\" };\n }\n}\n\nexport function Autocomplete({\n label,\n staticItems = [],\n sections,\n selectedKey,\n defaultSelectedKey,\n onSelectionChange,\n requestConfig,\n defaultFilter,\n errorMessage,\n size = \"md\",\n tooltip,\n isRequired,\n isDisabled,\n renderLeftIcon,\n autoFocus = false,\n onLoadError,\n}: AutocompleteProps) {\n const [inputValue, setInputValue] = useState(\"\");\n const [isFocused, setIsFocused] = useState(false);\n const debouncedInputValue = useDebounce(inputValue);\n const { contains } = useFilter({ sensitivity: \"base\" });\n const [_error, setError] = useState<string | undefined>();\n const [isLoading, setIsLoading] = useState(false);\n\n const textSizeClass = textSizeStylesObject[size];\n\n let dynamicItems: ReturnType<typeof useAsyncList<Item>> | null = null;\n\n useEffect(() => {\n if (autoFocus) {\n setIsFocused(true);\n }\n }, [autoFocus]);\n\n useEffect(() => {\n if (dynamicItems) {\n dynamicItems.setFilterText(debouncedInputValue);\n }\n }, [debouncedInputValue, dynamicItems]);\n\n if (requestConfig) {\n dynamicItems = useAsyncList<Item>({\n async load({ signal, filterText = \"\" }) {\n if (!requestConfig.url || (requestConfig.shouldLoad && !requestConfig.shouldLoad(filterText))) {\n return { items: [] };\n }\n\n setIsLoading(true);\n try {\n let result;\n if (requestConfig.requestType === \"GraphQL\") {\n result = await handleGraphQLRequest(requestConfig, filterText, signal);\n } else {\n result = await handleRestRequest(requestConfig, filterText, signal);\n }\n\n setError(result.error);\n setIsLoading(false);\n return { items: result.items };\n } catch (error) {\n handleLoadError(error as Error);\n return { items: [] };\n }\n },\n initialFilterText: \"\",\n });\n }\n\n if (debouncedInputValue === \"\") {\n dynamicItems = null;\n }\n\n const handleLoadError = async (error: Error) => {\n onLoadError?.(error);\n setIsLoading(false);\n };\n\n return (\n <ComboBox\n onSelectionChange={onSelectionChange}\n selectedKey={selectedKey || undefined}\n defaultSelectedKey={defaultSelectedKey || undefined}\n defaultItems={sections ? sections.flatMap((section) => section.items) : staticItems}\n items={dynamicItems ? dynamicItems.items : undefined}\n className={composeTailwindRenderProps(\"group flex flex-col\", \"w-full\")}\n menuTrigger=\"focus\"\n isDisabled={isDisabled}\n isInvalid={!!errorMessage}\n inputValue={inputValue}\n onInputChange={(value) => {\n setInputValue(value);\n }}\n autoFocus={autoFocus}\n defaultFilter={defaultFilter || contains}\n >\n {(state) => (\n <>\n {label && (\n <Label size={size} tooltip={tooltip} isRequired={isRequired}>\n {label}\n </Label>\n )}\n <Group\n className={getInputGroupStyles({\n isInvalid: !!errorMessage,\n isDisabled,\n size,\n isOpen: state.isOpen,\n isFocused,\n })}\n style={{ position: \"relative\" }}\n >\n {renderLeftIcon ? (\n <div className=\"absolute left-3\">{renderLeftIcon(isLoading)}</div>\n ) : (\n <Icon\n name={isLoading ? \"CircleNotch\" : \"MagnifyingGlass\"}\n className={`${iconSizeClassMap[size]} absolute left-3 text-inherit ${isLoading ? \"animate-spin\" : \"\"}`}\n />\n )}\n <AriaInput\n className={`h-full w-full rounded-sm bg-transparent pl-10 pr-3 outline-none ${textSizeClass}`}\n onFocus={() => setIsFocused(true)}\n onBlur={() => setIsFocused(false)}\n />\n <AriaButton className=\"absolute right-3\">\n <Icon\n name={state.isOpen ? \"CaretUp\" : \"CaretDown\"}\n className={`${iconSizeClassMap[size]} text-inherit`}\n />\n </AriaButton>\n </Group>\n </>\n )}\n </ComboBox>\n );\n}\n","import { useRef } from \"react\";\nimport { type Key, type ValidationResult } from \"react-aria-components\";\n\nimport { Autocomplete } from \"../Autocomplete/Autocomplete\";\nimport { Icon } from \"../Icon/Icon\";\n\nexport interface Place {\n id: string;\n place_name: string;\n place_type: string[];\n center: [number, number];\n}\n\ninterface MapboxResponse {\n features: Place[];\n type: string;\n}\n\n// Type guard to validate MapboxResponse shape\nfunction isMapboxResponse(data: unknown): data is MapboxResponse {\n return (\n typeof data === \"object\" &&\n data !== null &&\n \"features\" in data &&\n Array.isArray(data.features) &&\n \"type\" in data &&\n typeof data.type === \"string\"\n );\n}\n\ntype SearchType = \"country\" | \"region\" | \"district\" | \"place\" | \"locality\" | \"neighborhood\" | \"address\" | \"street\";\n\nexport interface PlaceSearchProps {\n label?: string;\n selectedKey?: Key | null;\n defaultSelectedKey?: Key | null;\n onSelectionChange?: (key: Key | null) => void;\n placeholder?: string;\n errorMessage?: string | ((validation: ValidationResult) => string);\n description?: string;\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n tooltip?: string;\n isRequired?: boolean;\n isDisabled?: boolean;\n showErrors?: boolean;\n autoFocus?: boolean;\n onSelect: (place: Place) => void;\n searchTypes?: SearchType[];\n defaultFilter?: (textValue: string, inputValue: string) => boolean;\n validationResult?: ValidationResult;\n countryRestrictions?: string[]; // Array of ISO 3166-1 alpha-2 country codes\n proximity?: \"ip\" | [number, number]; // Either \"ip\" for IP-based location or [longitude, latitude] coordinates\n}\n\nconst MAPBOX_TOKEN = process.env.NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN || \"\";\n\nexport function PlaceSearch({\n label = \"Search for a place\",\n selectedKey,\n defaultSelectedKey,\n onSelectionChange,\n placeholder = \"Enter a location...\",\n errorMessage,\n description,\n size = \"md\",\n tooltip,\n isRequired,\n isDisabled,\n showErrors = true,\n autoFocus = false,\n onSelect,\n searchTypes = [\"place\", \"address\"],\n defaultFilter,\n validationResult,\n countryRestrictions,\n proximity = \"ip\", // Set IP-based location as default\n}: PlaceSearchProps) {\n // Use a WeakMap to store additional data for each item\n const itemDataRef = useRef(new WeakMap<{ id: string; name: string }, { type: string; center: [number, number] }>());\n\n // Store the last loaded items for use in selection\n const loadedItemsRef = useRef<{ id: string; name: string }[]>([]);\n\n const requestConfig = {\n requestType: \"REST\" as const,\n method: \"GET\" as const,\n url: \"https://api.mapbox.com/geocoding/v5/mapbox.places/{q}.json\",\n extraParams: {\n access_token: MAPBOX_TOKEN,\n types: searchTypes.join(\",\"),\n limit: \"5\",\n ...(countryRestrictions?.length ? { country: countryRestrictions.join(\",\").toLowerCase() } : {}),\n ...(proximity\n ? {\n proximity: proximity === \"ip\" ? \"ip\" : proximity.join(\",\"),\n }\n : {}),\n },\n shouldLoad: (filterText: string) => {\n return filterText.length > 0;\n },\n transformResponse: (data: unknown) => {\n if (!isMapboxResponse(data)) return [];\n\n const items = data.features.map((feature) => {\n const item = {\n id: feature.id,\n name: feature.place_name,\n };\n // Store additional data in the WeakMap\n itemDataRef.current.set(item, {\n type: feature.place_type[0],\n center: feature.center,\n });\n return item;\n });\n\n // Store the items for later use\n if (items.length > 0) {\n loadedItemsRef.current = items;\n }\n\n return items;\n },\n };\n\n const renderItem = (item: { id: string; name: string }) => {\n const itemData = itemDataRef.current.get(item);\n\n // Split the place name into parts by commas for better formatting\n const nameParts = item.name.split(\", \");\n const primaryText = nameParts[0];\n const secondaryText = nameParts.slice(1).join(\", \");\n\n return (\n <div className=\"flex items-center gap-3 py-0.5\">\n <Icon\n name={\n itemData?.type === \"address\"\n ? \"MapPin\"\n : itemData?.type === \"place\"\n ? \"Buildings\"\n : itemData?.type === \"region\"\n ? \"MapPinArea\"\n : itemData?.type === \"country\"\n ? \"Flag\"\n : \"Circle\"\n }\n className=\"h-5 w-5 flex-shrink-0 text-text-muted\"\n />\n <div className=\"flex min-w-0 flex-col\">\n <span className=\"truncate font-medium text-text-body\">{primaryText}</span>\n {secondaryText && <span className=\"truncate text-sm text-text-muted\">{secondaryText}</span>}\n </div>\n </div>\n );\n };\n\n const renderLeftIcon = (isLoading: boolean) => {\n if (isLoading) {\n return <Icon name=\"CircleNotch\" className=\"h-4 w-4 animate-spin text-text-muted\" />;\n }\n return <Icon name=\"MagnifyingGlass\" className=\"h-4 w-4 text-text-muted\" />;\n };\n\n return (\n <Autocomplete\n data-testid=\"autocomplete\"\n data-config={JSON.stringify({\n types: searchTypes.join(\",\"),\n country: countryRestrictions?.join(\",\").toLowerCase(),\n proximity: proximity === \"ip\" ? \"ip\" : proximity?.join(\",\"),\n })}\n label={label}\n selectedKey={selectedKey}\n defaultSelectedKey={defaultSelectedKey}\n onSelectionChange={(key) => {\n onSelectionChange?.(key);\n if (key) {\n // Use the stored items instead of creating an empty array\n const items = loadedItemsRef.current;\n const selected = items.find((item) => item.id === key);\n\n if (selected) {\n const itemData = itemDataRef.current.get(selected);\n\n if (itemData) {\n onSelect({\n id: selected.id,\n place_name: selected.name,\n place_type: [itemData.type],\n center: itemData.center,\n });\n }\n }\n }\n }}\n requestConfig={requestConfig}\n placeholder={placeholder}\n errorMessage={errorMessage}\n description={description}\n size={size}\n tooltip={tooltip}\n isRequired={isRequired}\n isDisabled={isDisabled}\n showErrors={showErrors}\n autoFocus={autoFocus}\n renderItem={renderItem}\n renderLeftIcon={renderLeftIcon}\n defaultFilter={defaultFilter}\n validationResult={validationResult}\n />\n );\n}\n","import { ListBoxItem as AriaListBoxItem, ListBoxItemProps } from \"react-aria-components\";\nimport { twMerge } from \"tailwind-merge\";\n\nconst itemHeightStylesObject = {\n sm: \"py-1\",\n md: \"py-2\",\n lg: \"py-3\",\n xl: \"py-4\",\n};\n\nconst textSizeStylesObject = {\n sm: \"text-controlElementSm\",\n md: \"text-controlElementMd\",\n lg: \"text-controlElementLg\",\n xl: \"text-controlElementXl\",\n};\n\ninterface ExtendedListBoxItemProps extends Omit<ListBoxItemProps, \"className\"> {\n size?: \"sm\" | \"md\" | \"lg\" | \"xl\";\n className?: string;\n}\n\nexport function ListBoxItem({ size = \"md\", className, ...props }: ExtendedListBoxItemProps) {\n const baseClassName =\n \"flex cursor-default items-center gap-2 rounded-sm px-3 text-text-body outline-none data-[focused]:bg-background-hover data-[selected]:bg-background-hover\";\n\n return (\n <AriaListBoxItem\n {...props}\n className={twMerge(baseClassName, itemHeightStylesObject[size], textSizeStylesObject[size], className)}\n />\n );\n}\n","import { FormProps, Form as RACForm } from \"react-aria-components\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function Form(props: FormProps) {\n return <RACForm {...props} className={twMerge(\"flex flex-col gap-4\", props.className)} />;\n}\n","import { DialogProps, Dialog as RACDialog } from \"react-aria-components\";\nimport { twMerge } from \"tailwind-merge\";\n\nexport function Dialog(props: DialogProps) {\n // Ensure the dialog is properly labeled for accessibility\n return (\n <RACDialog\n {...props}\n className={twMerge(\n \"relative h-auto max-h-[inherit] overflow-auto outline outline-0 [[data-placement]>&]:p-4\",\n props.className,\n )}\n role=\"dialog\"\n />\n );\n}\n","import { CalendarIcon } from \"lucide-react\";\nimport {\n DateRangePicker as AriaDateRangePicker,\n DateRangePickerProps as AriaDateRangePickerProps,\n DateValue,\n ValidationResult,\n} from \"react-aria-components\";\nimport { Button } from \"../Button\";\nimport { DateInput } from \"../DateField\";\nimport { Dialog } from \"../Dialog\";\nimport { Description, FieldError, FieldGroup, Label } from \"../Field\";\nimport { Popover } from \"../Popover\";\nimport { RangeCalendar } from \"../RangeCalendar\";\nimport { composeTailwindRenderProps } from \"../../utils\";\n\nexport interface DateRangePickerProps<T extends DateValue> extends AriaDateRangePickerProps<T> {\n label?: string;\n description?: string;\n errorMessage?: string | ((validation: ValidationResult) => string);\n}\n\nexport function DateRangePicker<T extends DateValue>({\n label,\n description,\n errorMessage,\n ...props\n}: DateRangePickerProps<T>) {\n return (\n <AriaDateRangePicker\n {...props}\n className={composeTailwindRenderProps(props.className, \"group flex flex-col gap-1\")}\n >\n {label && <Label>{label}</Label>}\n <FieldGroup className=\"w-auto min-w-[208px]\">\n <DateInput slot=\"start\" className=\"px-2 py-1.5 text-sm\" />\n <span\n aria-hidden=\"true\"\n className=\"text-gray-800 group-disabled:text-gray-200 dark:text-zinc-200 group-disabled:dark:text-zinc-600 forced-colors:text-[ButtonText] group-disabled:forced-colors:text-[GrayText]\"\n >\n –\n </span>\n <DateInput slot=\"end\" className=\"flex-1 px-2 py-1.5 text-sm\" />\n <Button variant=\"icon\" className=\"mr-1 w-6 rounded outline-offset-0\">\n <CalendarIcon aria-hidden className=\"h-4 w-4\" />\n </Button>\n </FieldGroup>\n {description && <Description>{description}</Description>}\n {typeof errorMessage === \"string\" ? <FieldError>{errorMessage}</FieldError> : null}\n <Popover>\n <Dialog>\n <RangeCalendar />\n </Dialog>\n </Popover>\n </AriaDateRangePicker>\n );\n}\n","import { ReactNode } from \"react\";\nimport { Check, Minus } from \"lucide-react\";\nimport {\n Checkbox as AriaCheckbox,\n CheckboxGroup as AriaCheckboxGroup,\n CheckboxGroupProps as AriaCheckboxGroupProps,\n CheckboxProps as AriaCheckboxProps,\n CheckboxRenderProps,\n ValidationResult,\n composeRenderProps,\n} from \"react-aria-components\";\nimport { Description, FieldError, Label } from \"../Field\";\nimport { composeTailwindRenderProps } from \"../../utils\";\n\nexport interface CheckboxGroupProps extends Omit<AriaCheckboxGroupProps, \"children\"> {\n label?: string;\n children?: ReactNode;\n description?: string;\n errorMessage?: string | ((validation: ValidationResult) => string);\n}\n\nexport interface CheckboxProps extends Omit<AriaCheckboxProps, \"children\"> {\n children?: ReactNode | ((props: CheckboxRenderProps) => ReactNode);\n}\n\nexport function CheckboxGroup(props: CheckboxGroupProps) {\n return (\n <AriaCheckboxGroup {...props} className={composeTailwindRenderProps(props.className, \"flex flex-col gap-2\")}>\n <Label>{props.label}</Label>\n {props.children}\n {props.description && <Description>{props.description}</Description>}\n <FieldError>{typeof props.errorMessage === \"function\" ? undefined : props.errorMessage}</FieldError>\n </AriaCheckboxGroup>\n );\n}\n\nfunction getCheckboxStyles({ isDisabled }: { isDisabled?: boolean }) {\n return `flex gap-2 items-center group text-sm transition ${isDisabled ? \"text-text-disabled\" : \"text-text-caption\"}`;\n}\n\nfunction getBoxStyles({\n isSelected,\n isInvalid,\n isDisabled,\n isIndeterminate,\n}: {\n isSelected?: boolean;\n isInvalid?: boolean;\n isDisabled?: boolean;\n isIndeterminate?: boolean;\n}) {\n const baseStyles =\n \"w-5 h-5 flex-shrink-0 rounded flex items-center justify-center border-2 transition ring-offset-2 focus:ring-2 focus:ring-border-focus\";\n\n let colorStyles = \"\";\n if (isDisabled) {\n colorStyles = \"border-border-muted bg-background-muted\";\n } else if (isInvalid) {\n colorStyles = \"border-feedback-error-border bg-feedback-error-background\";\n } else if (isSelected || isIndeterminate) {\n colorStyles =\n \"bg-action-primary border-action-primary hover:bg-action-primary-hover hover:border-action-primary-hover\";\n } else {\n colorStyles = \"bg-background-input border-border-input hover:border-border-focus\";\n }\n\n return `${baseStyles} ${colorStyles}`;\n}\n\nconst iconStyles = \"w-4 h-4 text-text-onPrimary group-disabled:text-text-disabled\";\n\nexport function Checkbox(props: CheckboxProps) {\n const { children, ...otherProps } = props;\n return (\n <AriaCheckbox\n {...otherProps}\n className={composeRenderProps(\n props.className,\n (className, renderProps) => `${getCheckboxStyles(renderProps)} ${className || \"\"}`,\n )}\n >\n {(renderProps) => {\n const { isSelected, isIndeterminate, ...rest } = renderProps;\n const checkboxContent = (\n <div\n className={getBoxStyles({\n isSelected,\n isIndeterminate,\n ...rest,\n })}\n >\n {isIndeterminate ? (\n <Minus aria-hidden className={iconStyles} />\n ) : isSelected ? (\n <Check aria-hidden className={iconStyles} />\n ) : null}\n </div>\n );\n\n return (\n <>\n {checkboxContent}\n {typeof children === \"function\" ? children(renderProps) : children}\n </>\n );\n }}\n </AriaCheckbox>\n );\n}\n"]}