fermmap-shared 0.2.3 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.cjs +18 -29
- package/dist/main.cjs.map +1 -1
- package/dist/module.mjs +20 -31
- package/dist/module.mjs.map +1 -1
- package/dist/types.d.ts +0 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
package/dist/module.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAb,oBAAoB;;;;AEapB,yBAAyB;AACzB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8HC,MAAM,4CAAS,CAAC,YACrB,QAAQ,WACR,UAAU,iBACV,OAAO,gBACP,SAAS,EACT,GAAG,OACS;IACZ,OACE,CAAA,GAAA,UAAA,EAAC,CAAA,GAAA,aAAA,GAAU;QAAA,GACL,KAAK;QACT,WAAW,CAAA,cAAe,GAAG,aAAa,GAAE,CAAA,CAAG,GAAG,mCAAa;gBAAE,GAAG,WAAW;sBAAE;yBAAM;YAAO;QAAG,UAEhG;IAAQ;AAGf;;;;;;ACzIO,MAAM;AAON,MAAM;AAKb,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKC,MAAM;AAMN,MAAM;AAMP,SAAU,0CAAU,SAAE,KAAK,QAAE,OAAO,eAAQ,KAAK,eAAE,WAAW,eAAE,WAAW,EAAE,GAAG,OAAuB;IAC3G,OACE,CAAA,GAAA,WAAA,EAAC,CAAA,GAAA,gBAAA,GAAa;QAAC,WAAW;QAAe,GAA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B,QAAQ;QAEzE,IAAI,CAAC,SAAS,EAAE,EACd,MAAM,IAAI,MAAM,CAAA,eAAA,EAAkB,SAAS,UAAU,EAAE;QAGzD,OAAO,SAAS,IAAI;IACtB;IAEA;;;KAGG,GACH,MAAM,cAAa,QAAiB;QAClC,MAAM,MAAM,WACR,CAAA,wBAAA,EAA2B,mBAAmB,WAAW,GACzD;QAEJ,MAAM,WAAW,MAAM,MAAM;QAE7B,IAAI,CAAC,SAAS,EAAE,EACd,MAAM,IAAI,MAAM,CAAA,2BAAA,EAA8B,SAAS,UAAU,EAAE;QAGrE,OAAO,SAAS,IAAI;IACtB;IAEA;;;KAGG,GACH,MAAM,eAAc,OAAgB;QAClC,MAAM,MAAM,UACR,CAAA,wBAAA,EAA2B,mBAAmB,UAAU,GACxD;QAEJ,MAAM,WAAW,MAAM,MAAM;QAE7B,IAAI,CAAC,SAAS,EAAE,EACd,MAAM,IAAI,MAAM,CAAA,4BAAA,EAA+B,SAAS,UAAU,EAAE;QAGtE,OAAO,SAAS,IAAI;IACtB;AACD;;;;;;;;;;;","sources":["packages/shared/src/index.ts","packages/shared/src/components/index.ts","packages/shared/src/components/AlertDialog.tsx","packages/shared/src/components/Button.tsx","packages/shared/src/components/TextField.tsx","packages/shared/src/components/Autocomplete.tsx","packages/shared/src/components/AutocompleteTable.tsx","packages/shared/src/components/Table.tsx","packages/shared/src/components/Checkbox.tsx","packages/shared/src/components/ProgressBar.tsx","packages/shared/src/components/AvatarButton.tsx","packages/shared/src/components/Badge.tsx","packages/shared/src/components/CloseButton.tsx","packages/shared/src/lib/i18n-provider.tsx","packages/shared/src/components/ComboBox.tsx","packages/shared/src/components/DisclosureGroup.tsx","packages/shared/src/components/FilterTabs.tsx","packages/shared/src/components/LabeledValue.tsx","packages/shared/src/components/Link.tsx","packages/shared/src/components/Menu.tsx","packages/shared/src/components/PasswordStrength.tsx","packages/shared/src/components/RadioGroup.tsx","packages/shared/src/components/SearchField.tsx","packages/shared/src/components/SegmentedControl.tsx","packages/shared/src/components/Select.tsx","packages/shared/src/components/StatCard.tsx","packages/shared/src/components/Switch.tsx","packages/shared/src/components/Tabs.tsx","packages/shared/src/components/TextArea.tsx","packages/shared/src/utils/browser.ts","packages/shared/src/lib/index.ts","packages/shared/src/lib/theme-context.tsx","packages/shared/src/lib/filter-context.tsx","packages/shared/src/lib/axe-devtools.tsx","packages/shared/src/hooks/index.ts","packages/shared/src/hooks/useFilterState.ts","packages/shared/src/utils/index.ts","packages/shared/src/utils/styleUtils.ts","packages/shared/src/utils/category-colors.ts","packages/shared/src/utils/api.ts","packages/shared/src/types/index.ts","packages/shared/src/types/types.ts"],"sourcesContent":["// Components\nexport * from './components';\n\n// Lib (contexts & providers)\nexport * from './lib';\n\n// Hooks\nexport * from './hooks';\n\n// Utils\nexport * from './utils';\n\n// Types\nexport * from './types';\n","// Component exports\nexport { AlertDialog, PromptDialog } from './AlertDialog';\nexport { Autocomplete, type AutocompleteItem, type AutocompleteProps } from './Autocomplete';\nexport { AutocompleteTable, type AutocompleteTableProps } from './AutocompleteTable';\nexport { AvatarButton, type AvatarButtonProps } from './AvatarButton';\nexport { Badge, type BadgeVariant } from './Badge';\nexport { Button } from './Button';\nexport { Checkbox, type CheckboxProps } from './Checkbox';\nexport { CloseButton } from './CloseButton';\nexport { ComboBox, type ComboBoxItem, type ComboBoxProps } from './ComboBox';\nexport { DisclosureGroup, type DisclosureItem } from './DisclosureGroup';\nexport { FilterTabs } from './FilterTabs';\nexport { LabeledValue } from './LabeledValue';\nexport { Link } from './Link';\nexport { Menu, type MenuItem, type MenuProps } from './Menu';\nexport { PasswordStrength, type PasswordStrengthProps, type PasswordValidation } from './PasswordStrength';\nexport { ProgressBar } from './ProgressBar';\nexport { RadioGroup } from './RadioGroup';\nexport { SearchField } from './SearchField';\nexport { SegmentedControl } from './SegmentedControl';\nexport { Select, type SelectOption } from './Select';\nexport { StatCard } from './StatCard';\nexport { Switch } from './Switch';\nexport { Table, type ColumnDef, type TableProps } from './Table';\nexport { Tabs, TabList, Tab, TabPanel } from './Tabs';\nexport { TextArea } from './TextArea';\nexport { TextField } from './TextField';\n","import { Button } from './Button';\nimport { Dialog, Heading, Modal, ModalOverlay } from 'react-aria-components';\nimport { style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { TextField } from './TextField';\nimport { useState } from 'react';\n\nconst overlayStyles = style({\n position: 'fixed',\n inset: 0,\n backgroundColor: 'transparent-black-500',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n isolation: 'isolate',\n});\n\nconst modalStyles = style({\n backgroundColor: 'layer-1',\n borderRadius: 'xl',\n boxShadow: 'elevated',\n padding: 24,\n width: {\n default: 'calc(100vw - 32px)',\n sm: 400,\n md: 500\n },\n maxWidth: 500,\n transform: {\n entering: 'scale(0.95)',\n default: 'scale(1)'\n },\n});\n\nconst headingStyles = style({\n font: 'heading-xl',\n color: 'heading',\n margin: 0,\n marginBottom: 12\n});\n\nconst messageStyles = style({\n font: 'body',\n color: 'neutral',\n margin: 0,\n marginBottom: 24\n});\n\nconst buttonGroupStyles = style({\n display: 'flex',\n gap: 12,\n justifyContent: 'end'\n});\n\nexport interface AlertDialogProps {\n isOpen: boolean;\n onClose: () => void;\n title: string;\n message: string;\n variant?: 'danger' | 'warning' | 'info' | 'success';\n confirmLabel?: string;\n cancelLabel?: string;\n onConfirm: () => void | Promise<void>;\n showCancel?: boolean;\n children?: React.ReactNode; // Optional custom content (e.g., Switch, Checkbox)\n}\n\nexport function AlertDialog({\n isOpen,\n onClose,\n title,\n message,\n variant = 'info',\n confirmLabel = 'OK',\n cancelLabel = 'Cancel',\n onConfirm,\n showCancel = true,\n children\n}: AlertDialogProps) {\n const [isProcessing, setIsProcessing] = useState(false);\n\n const handleConfirm = async () => {\n setIsProcessing(true);\n try {\n await onConfirm();\n onClose();\n } finally {\n setIsProcessing(false);\n }\n };\n\n // Map variant to button variant\n const buttonVariant = variant === 'danger' ? 'danger' :\n variant === 'success' ? 'primary' :\n 'primary';\n\n return (\n <ModalOverlay isOpen={isOpen} onOpenChange={(open) => !open && onClose()} className={overlayStyles}>\n <Modal className={modalStyles}>\n <Dialog>\n {({ close }) => (\n <>\n <Heading slot=\"title\" className={headingStyles}>\n {title}\n </Heading>\n <p className={messageStyles}>{message}</p>\n {children && (\n <div className={style({ marginBottom: 24 })}>\n {children}\n </div>\n )}\n <div className={buttonGroupStyles}>\n {showCancel && (\n <Button\n variant=\"secondary\"\n size=\"M\"\n onPress={close}\n isDisabled={isProcessing}\n >\n {cancelLabel}\n </Button>\n )}\n <Button\n variant={buttonVariant}\n size=\"M\"\n onPress={handleConfirm}\n isDisabled={isProcessing}\n >\n {isProcessing ? 'Processing...' : confirmLabel}\n </Button>\n </div>\n </>\n )}\n </Dialog>\n </Modal>\n </ModalOverlay>\n );\n}\n\nexport interface PromptDialogProps {\n isOpen: boolean;\n onClose: () => void;\n title: string;\n message: string;\n inputLabel: string;\n inputPlaceholder?: string;\n confirmLabel?: string;\n cancelLabel?: string;\n onConfirm: (value: string) => void | Promise<void>;\n validator?: (value: string) => string | null;\n}\n\nexport function PromptDialog({\n isOpen,\n onClose,\n title,\n message,\n inputLabel,\n inputPlaceholder = '',\n confirmLabel = 'OK',\n cancelLabel = 'Cancel',\n onConfirm,\n validator\n}: PromptDialogProps) {\n const [value, setValue] = useState('');\n const [error, setError] = useState<string | null>(null);\n const [isProcessing, setIsProcessing] = useState(false);\n\n const handleConfirm = async () => {\n // Validate\n if (validator) {\n const validationError = validator(value);\n if (validationError) {\n setError(validationError);\n return;\n }\n }\n\n setIsProcessing(true);\n try {\n await onConfirm(value);\n setValue('');\n setError(null);\n onClose();\n } finally {\n setIsProcessing(false);\n }\n };\n\n const handleClose = () => {\n setValue('');\n setError(null);\n onClose();\n };\n\n return (\n <ModalOverlay isOpen={isOpen} onOpenChange={(open) => !open && handleClose()} className={overlayStyles}>\n <Modal className={modalStyles}>\n <Dialog>\n {({ close }) => (\n <>\n <Heading slot=\"title\" className={headingStyles}>\n {title}\n </Heading>\n <p className={messageStyles}>{message}</p>\n <div className={style({ marginBottom: 24 })}>\n <TextField\n label={inputLabel}\n value={value}\n onChange={(newValue) => {\n setValue(newValue);\n setError(null);\n }}\n placeholder={inputPlaceholder}\n error={error || undefined}\n autoFocus\n />\n </div>\n <div className={buttonGroupStyles}>\n <Button\n variant=\"secondary\"\n size=\"M\"\n onPress={() => {\n setValue('');\n setError(null);\n close();\n }}\n isDisabled={isProcessing}\n >\n {cancelLabel}\n </Button>\n <Button\n variant=\"primary\"\n size=\"M\"\n onPress={handleConfirm}\n isDisabled={isProcessing}\n >\n {isProcessing ? 'Processing...' : confirmLabel}\n </Button>\n </div>\n </>\n )}\n </Dialog>\n </Modal>\n </ModalOverlay>\n );\n}\n","import { Button as AriaButton, ButtonProps as AriaButtonProps } from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\n\n// For props: https://react-spectrum.adobe.com/react-aria/Button.html#props\n// For styling: https://react-spectrum.adobe.com/react-aria/Button.html#styling\n// For conditional styling: https://react-spectrum.adobe.com/beta/s2/styling.html#conditional-styles\n\nexport interface ButtonProps extends AriaButtonProps {\n children?: React.ReactNode;\n variant?: 'primary' | 'secondary' | 'danger' | 'navigation';\n size?: 'S' | 'M' | 'L';\n}\n\n// Primary variant styles\nconst buttonStyles = style({\n ...focusRing(),\n font: {\n default: 'body',\n size: {\n S: 'body-sm',\n L: 'body-lg',// or `body` too?\n },\n },\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: {\n default: 8,\n size: {\n S: 4,\n },\n },\n paddingY: {\n default: 12,\n size: {\n S: 8,\n L: 16,\n },\n variant: {\n navigation: {\n default: 4\n }\n }\n },\n paddingStart: {\n default: 16,\n size: {\n S: 12,\n L: 24,\n },\n variant: {\n navigation: {\n default: 8\n }\n }\n },\n paddingEnd: {\n default: 16,\n size: {\n S: 12,\n L: 24,\n },\n variant: {\n navigation: 12\n }\n },\n width: {\n variant: {\n navigation: 'fit'\n }\n },\n color: {\n variant: {\n secondary: {\n default: '--plum-700',\n },\n danger: {\n default: 'white',\n },\n navigation: {\n default: '--plum-700',\n }\n },\n forcedColors: 'ButtonText',\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText',\n },\n },\n backgroundColor: {\n default: '--plum-300',\n variant: {\n primary: {\n default: '--plum-300',\n isHovered: '--plum-400',\n isFocusVisibile: '--plum-400',\n isPressed: '--plum-400',\n },\n secondary: {\n default: '--yogurt-200',\n isHovered: '--yogurt-300',\n isFocusVisibile: '--yogurt-300',\n isPressed: '--yogurt-400',\n },\n navigation: {\n default: 'transparent',\n isHovered: '--yogurt-200',\n isFocusVisibile: '--yogurt-200',\n isPressed: '--yogurt-300',\n },\n danger: {\n default: '--berry-500',\n isHovered: '--berry-600',\n isFocusVisibile: '--berry-600',\n isPressed: '--berry-700',\n },\n },\n forcedColors: 'ButtonFace',\n isDisabled: {\n default: 'gray-100',\n isDisabled: 'GrayText',\n },\n },\n borderRadius: 'lg',\n borderStyle: {\n default: 'none',\n forcedColors: 'solid'\n },\n borderColor: {\n forcedColors: 'ButtonBorder'\n },\n borderWidth: {\n forcedColors: 1\n },\n cursor: {\n default: 'pointer',\n isDisabled: 'not-allowed'\n }\n});\n\nexport const Button = ({\n children,\n variant = 'primary',\n size = 'M',\n className,\n ...props\n}: ButtonProps) => {\n return (\n <AriaButton\n {...props}\n className={renderProps => `${className || ''} ` + buttonStyles({ ...renderProps, size, variant })}\n >\n {children}\n </AriaButton>\n );\n};\n","import {\n TextField as AriaTextField,\n TextFieldProps as AriaTextFieldProps,\n Input,\n Label,\n Text,\n} from 'react-aria-components';\nimport { focusRing, style, } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { textFieldInputStyles } from '../utils/styleUtils' with { type: 'macro' };\n\nexport interface TextFieldProps extends Omit<AriaTextFieldProps, 'children'> {\n label: string;\n type?: 'text' | 'password' | 'email' | 'tel' | 'url' | 'number';\n error?: string;\n description?: string;\n placeholder?: string;\n}\n\nexport const textFieldStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 8,\n marginBottom: 20,\n});\n\nexport const textFieldLabelStyles = style({\n font: 'body',\n color: '--plum-700',\n});\n\nconst inputStyles = style({\n ...focusRing(),\n ...textFieldInputStyles(),\n});\n\nexport const textFieldErrorStyles = style({\n font: 'body-sm',\n color: '--berry-600',\n marginTop: 4,\n});\n\nexport const textFieldDescriptionStyles = style({\n font: 'body-sm',\n color: '--plum-600',\n marginTop: 4,\n});\n\nexport function TextField({ label, type = 'text', error, description, placeholder, ...props }: TextFieldProps) {\n return (\n <AriaTextField className={textFieldStyles} {...props}>\n <Label className={textFieldLabelStyles}>{label}</Label>\n <Input className={inputStyles} type={type} placeholder={placeholder} />\n {description && !error && (\n <Text slot=\"description\" className={textFieldDescriptionStyles}>\n {description}\n </Text>\n )}\n {error && (\n <Text slot=\"errorMessage\" className={textFieldErrorStyles}>\n {error}\n </Text>\n )}\n </AriaTextField>\n );\n}\n","import { useState, useMemo } from 'react';\nimport {\n SearchField as AriaSearchField,\n Autocomplete as AriaAutocomplete,\n Input,\n Label,\n ListBox,\n ListBoxItem,\n useFilter,\n Popover\n} from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport Search from '@react-spectrum/s2/icons/Search';\nimport CheckmarkCircle from '@react-spectrum/s2/icons/CheckmarkCircle';\nimport type { Selection } from 'react-aria-components';\n\nconst containerStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n width: 'full',\n});\n\nconst labelStyles = style({\n font: 'body',\n color: '--plum-700',\n});\n\nconst searchFieldStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n});\n\nconst inputContainerStyles = style({\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n});\n\nconst inputStyles = style({\n ...focusRing(),\n width: 'full',\n padding: 8,\n paddingStart: 40,\n font: 'body',\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--yogurt-400',\n backgroundColor: {\n default: '--yogurt-100',\n isHovered: '--yogurt-200',\n isFocusVisible: '--yogurt-200',\n },\n});\n\nconst searchIconStyles = style({\n position: 'absolute',\n left: 12,\n top: '50%',\n transform: 'translateY(-50%)',\n pointerEvents: 'none',\n color: '--yogurt-600',\n});\n\nconst popoverStyles = style({\n backgroundColor: '--yogurt-50',\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--yogurt-400',\n boxShadow: 'elevated',\n marginTop: 4,\n maxHeight: 300,\n overflow: 'auto',\n isolation: 'isolate',\n // width: 'full',\n // minWidth: 300,\n});\n\nconst listBoxStyles = style({\n padding: 4,\n outline: 'none',\n});\n\nconst listBoxItemStyles = style({\n ...focusRing(),\n font: 'body',\n paddingX: 8,\n paddingY: 8,\n borderRadius: 'sm',\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n gap: 8,\n backgroundColor: {\n default: 'transparent',\n isHovered: '--yogurt-200',\n isFocused: '--yogurt-200',\n isPressed: '--yogurt-300',\n },\n color: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocused: '--plum-800',\n isPressed: '--plum-900',\n },\n outline: 'none',\n});\n\nconst selectedItemStyles = style({\n backgroundColor: {\n default: '--plum-100',\n isHovered: '--plum-200',\n isFocused: '--plum-200',\n },\n color: '--plum-900',\n});\n\nconst checkboxStyles = style({\n width: 16,\n height: 16,\n flexShrink: 0,\n});\n\nconst itemTextStyles = style({\n flex: 1,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n});\n\nconst errorStyles = style({\n font: 'body-sm',\n color: '--berry-600',\n});\n\nexport interface AutocompleteItem {\n id: string | number;\n name: string;\n [key: string]: any;\n}\n\nexport interface AutocompleteProps<T extends AutocompleteItem> {\n items: T[];\n selectedKeys?: Selection;\n onSelectionChange?: (keys: Selection) => void;\n selectionMode?: 'none' | 'single' | 'multiple';\n label: string;\n placeholder?: string;\n ariaLabel?: string;\n error?: string;\n getItemText?: (item: T) => string;\n}\n\n/**\n * Autocomplete component using React Aria SearchField + ListBox\n * \n * Features:\n * - SearchField for filtering items\n * - Optional checkboxes for multi-selection\n * - Shows both selected and unselected items when filtered\n * - Selected items highlighted with background color\n * - Keyboard navigation (arrow keys, enter, escape)\n * - Accessible (ARIA labels, focus management)\n * \n * @example\n * ```tsx\n * // Single select\n * <Autocomplete\n * items={sources}\n * selectedKeys={selectedKey}\n * onSelectionChange={setSelectedKey}\n * selectionMode=\"single\"\n * label=\"Select Source\"\n * placeholder=\"Search sources...\"\n * />\n * \n * // Multi select\n * <Autocomplete\n * items={sources}\n * selectedKeys={selectedKeys}\n * onSelectionChange={setSelectedKeys}\n * selectionMode=\"multiple\"\n * label=\"Select Sources\"\n * placeholder=\"Search sources...\"\n * />\n * \n * // No selection (just filtering)\n * <Autocomplete\n * items={sources}\n * selectionMode=\"none\"\n * label=\"Search Sources\"\n * placeholder=\"Search sources...\"\n * />\n * ```\n */\nexport function Autocomplete<T extends AutocompleteItem>({\n items,\n selectedKeys,\n onSelectionChange,\n selectionMode = 'none',\n label,\n placeholder,\n ariaLabel,\n error,\n getItemText = (item) => item.name,\n}: AutocompleteProps<T>) {\n const [inputValue, setInputValue] = useState('');\n const { contains } = useFilter({ sensitivity: 'base' });\n\n // Filter items based on input value\n const filteredItems = useMemo(() => {\n if (!inputValue) return items;\n const searchLower = inputValue.toLowerCase();\n return items.filter((item) =>\n getItemText(item).toLowerCase().includes(searchLower)\n );\n }, [items, inputValue, getItemText]);\n\n // Sort to show selected items first when in selection mode\n const sortedItems = useMemo(() => {\n if (selectionMode === 'none' || !selectedKeys) return filteredItems;\n\n return [...filteredItems].sort((a, b) => {\n const aSelected = selectedKeys === 'all' || selectedKeys.has(String(a.id));\n const bSelected = selectedKeys === 'all' || selectedKeys.has(String(b.id));\n if (aSelected && !bSelected) return -1;\n if (!aSelected && bSelected) return 1;\n return 0;\n });\n }, [filteredItems, selectedKeys, selectionMode]);\n\n const showCheckboxes = selectionMode !== 'none';\n\n return (\n <div className={containerStyles}>\n <AriaAutocomplete\n filter={contains}\n inputValue={inputValue}\n onInputChange={setInputValue}\n >\n <AriaSearchField\n className={searchFieldStyles}\n aria-label={ariaLabel || label}\n >\n <Label className={labelStyles}>{label}</Label>\n <div className={inputContainerStyles}>\n <div className={searchIconStyles}><Search /></div>\n <Input\n className={inputStyles}\n placeholder={placeholder}\n />\n </div>\n </AriaSearchField>\n\n <ListBox\n className={listBoxStyles}\n items={sortedItems}\n selectionMode={selectionMode}\n selectedKeys={selectedKeys}\n onSelectionChange={onSelectionChange}\n aria-label={ariaLabel || `${label} options`}\n >\n {(item) => {\n const isSelected = selectedKeys === 'all' || (selectedKeys && selectedKeys.has(String(item.id)));\n return (\n <ListBoxItem\n key={item.id}\n id={String(item.id)}\n textValue={getItemText(item)}\n className={(renderProps) =>\n `${listBoxItemStyles(renderProps)} ${isSelected ? selectedItemStyles(renderProps) : ''}`\n }\n >\n {showCheckboxes && (\n <div className={checkboxStyles}>\n {isSelected && <CheckmarkCircle />}\n </div>\n )}\n <span className={itemTextStyles}>{getItemText(item)}</span>\n </ListBoxItem>\n );\n }}\n </ListBox>\n\n {error && <div className={errorStyles}>{error}</div>}\n </AriaAutocomplete>\n </div>\n );\n}\n","import { useMemo } from 'react';\nimport type { Selection } from 'react-aria-components';\nimport { Autocomplete, type AutocompleteItem } from './Autocomplete';\nimport { Table, type ColumnDef } from './Table';\nimport { style } from '@react-spectrum/s2/style' with { type: 'macro' };\n\nconst containerStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 16,\n width: 'full',\n});\n\nconst tableContainerStyles = style({\n maxHeight: 384,\n overflow: 'auto',\n});\n\nexport interface AutocompleteTableProps<T extends AutocompleteItem> {\n // Autocomplete props\n allItems: T[];\n selectedKeys: Selection;\n onSelectionChange: (keys: Selection) => void;\n selectionMode?: 'single' | 'multiple';\n searchLabel: string;\n searchPlaceholder?: string;\n getItemText?: (item: T) => string;\n\n // Table props\n columns: ColumnDef<T>[];\n tableLabel: string;\n}\n\n/**\n * Composite component combining Autocomplete and Table\n * Useful for search-and-select workflows where selected items are displayed in a table\n * \n * Features:\n * - Autocomplete search field at top\n * - Table below showing selected items\n * - Filters all items in autocomplete\n * - Shows only selected items in table\n * - Scrollable table with max height of 384px\n * \n * @example\n * ```tsx\n * <AutocompleteTable\n * allItems={allSources}\n * selectedKeys={selectedSourceIds}\n * onSelectionChange={setSelectedSourceIds}\n * selectionMode=\"multiple\"\n * searchLabel=\"Search Sources\"\n * searchPlaceholder=\"Search by name or URL...\"\n * columns={[\n * { key: 'name', label: 'Name', isRowHeader: true },\n * { key: 'domain', label: 'Domain' },\n * { key: 'actions', label: 'Actions', align: 'end' },\n * ]}\n * tableLabel=\"Selected Sources\"\n * />\n * ```\n */\nexport function AutocompleteTable<T extends AutocompleteItem>({\n allItems,\n selectedKeys,\n onSelectionChange,\n selectionMode = 'multiple',\n searchLabel,\n searchPlaceholder,\n getItemText,\n columns,\n tableLabel,\n}: AutocompleteTableProps<T>) {\n // Filter to show only selected items in table\n const selectedItems = useMemo(() => {\n if (selectedKeys === 'all') return allItems;\n if (!selectedKeys || selectedKeys.size === 0) return [];\n\n return allItems.filter(item => selectedKeys.has(String(item.id)));\n }, [allItems, selectedKeys]);\n\n return (\n <div className={containerStyles}>\n <Autocomplete\n items={allItems}\n selectedKeys={selectedKeys}\n onSelectionChange={onSelectionChange}\n selectionMode={selectionMode}\n label={searchLabel}\n placeholder={searchPlaceholder}\n getItemText={getItemText}\n />\n\n <div className={tableContainerStyles}>\n <Table\n columns={columns}\n data={selectedItems}\n ariaLabel={tableLabel}\n />\n </div>\n </div>\n );\n}\n","import {\n Cell,\n Column,\n Row,\n Table as AriaTable,\n TableBody,\n TableHeader,\n type Key,\n type SortDescriptor\n} from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { Checkbox } from './Checkbox';\nimport { ProgressBar } from './ProgressBar';\nimport { ReactNode, useRef, useEffect } from 'react';\n\nexport interface ColumnDef<T> {\n key: string;\n label: string;\n renderCell: (item: T) => ReactNode;\n width?: string;\n isRowHeader?: boolean;\n align?: 'start' | 'center' | 'end';\n}\n\nexport interface TableProps<T> {\n data: T[];\n columns: ColumnDef<T>[];\n onRowAction?: (key: Key) => void;\n ariaLabel: string;\n sortDescriptor?: SortDescriptor;\n onSortChange?: (descriptor: SortDescriptor) => void;\n selectionMode?: 'none' | 'single' | 'multiple';\n selectedKeys?: Set<Key>;\n onSelectionChange?: (keys: Set<Key>) => void;\n onLoadMore?: () => void;\n isLoadingMore?: boolean;\n}\n\nconst tableContainerStyles = style({\n backgroundColor: 'layer-1',\n borderRadius: 'xl',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--plum-200',\n overflow: 'auto'\n});\n\nconst tableStyles = style({\n width: 'full',\n borderCollapse: 'collapse'\n});\n\nconst tableHeaderStyles = style({\n backgroundColor: '--yogurt-200',\n borderBottomWidth: 1,\n borderBottomStyle: 'solid',\n borderBottomColor: '--plum-200'\n});\n\nconst columnHeaderStyles = style({\n padding: 16,\n textAlign: {\n default: 'start',\n align: {\n start: 'start',\n center: 'center',\n end: 'end',\n },\n },\n font: 'title-lg',\n color: '--plum-700',\n cursor: {\n allowsSorting: 'pointer'\n }\n});\n\nconst rowStyles = style({\n ...focusRing(),\n backgroundColor: {\n default: 'transparent',\n isHovered: '--yogurt-100',\n isSelected: '--plum-100',\n isFocusVisible: '--yogurt-100'\n },\n cursor: {\n default: 'default',\n onRowAction: 'pointer',\n selectionMode: {\n single: 'pointer',\n multiple: 'pointer'\n }\n }\n});\n\nconst cellStyles = style({\n padding: 16,\n textAlign: {\n default: 'start',\n align: {\n start: 'start',\n center: 'center',\n end: 'end',\n },\n },\n font: 'body',\n color: '--plum-700',\n borderBottomWidth: 1,\n borderBottomStyle: 'solid',\n borderBottomColor: '--plum-100'\n});\n\nconst checkboxCellStyles = style({\n padding: 16,\n width: 48,\n borderBottomWidth: 1,\n borderBottomStyle: 'solid',\n borderBottomColor: '--plum-100'\n});\n\nconst emptyStateStyles = style({\n padding: 48,\n textAlign: 'center',\n font: 'body',\n color: '--plum-600',\n});\n\nconst loadingStyles = style({\n padding: 24,\n display: 'flex',\n justifyContent: 'center'\n});\n\nconst scrollTriggerStyles = style({\n height: 1,\n pointerEvents: 'none'\n});\n\n/**\n * Reusable Table component using React Aria Components\n * \n * Features:\n * - Collection-based API for better performance\n * - Built-in virtualization support (via RAC)\n * - Keyboard navigation\n * - Screen reader support\n * - Optional sorting\n * - Optional row selection\n * - Optional row actions (clickable rows)\n * - Checkbox column for multiple selection\n * - Hover and selected states\n * \n * @example\n * ```tsx\n * const columns: ColumnDef<Run>[] = [\n * { key: 'id', label: 'ID', renderCell: (run) => `#${run.id}` },\n * { key: 'status', label: 'Status', renderCell: (run) => <Badge variant={run.status}>{run.status}</Badge> }\n * ];\n * \n * <Table\n * data={runs}\n * columns={columns}\n * ariaLabel=\"Scraper runs\"\n * selectionMode=\"multiple\"\n * selectedKeys={selectedIds}\n * onSelectionChange={setSelectedIds}\n * />\n * ```\n */\nexport function Table<T extends { id: number | string }>({\n data,\n columns,\n onRowAction,\n ariaLabel,\n sortDescriptor,\n onSortChange,\n selectionMode = 'none',\n selectedKeys,\n onSelectionChange,\n onLoadMore,\n isLoadingMore\n}: TableProps<T>) {\n const observerTarget = useRef<HTMLDivElement>(null);\n\n // Infinite scroll observer\n useEffect(() => {\n if (!onLoadMore) return;\n\n const observer = new IntersectionObserver(\n (entries) => {\n if (entries[0].isIntersecting && !isLoadingMore) {\n onLoadMore();\n }\n },\n { threshold: 0.1, rootMargin: '100px' }\n );\n\n if (observerTarget.current) {\n observer.observe(observerTarget.current);\n }\n\n return () => observer.disconnect();\n }, [onLoadMore, isLoadingMore]);\n\n return (\n <>\n <div className={tableContainerStyles}>\n <AriaTable\n aria-label={ariaLabel}\n selectionMode={selectionMode}\n selectedKeys={selectedKeys}\n onSelectionChange={onSelectionChange as any}\n onRowAction={onRowAction}\n sortDescriptor={sortDescriptor}\n onSortChange={onSortChange}\n className={tableStyles}\n >\n <TableHeader className={tableHeaderStyles}>\n {selectionMode === 'multiple' && (\n <Column className={columnHeaderStyles({ align: 'center', alignItems: 'center' })}>\n <Checkbox slot=\"selection\" size=\"S\" />\n </Column>\n )}\n {columns.map((column) => (\n <Column\n key={column.key}\n id={column.key}\n isRowHeader={column.isRowHeader}\n allowsSorting={!!onSortChange}\n className={columnHeaderStyles({ align: column.align })}\n >\n {column.label}\n </Column>\n ))}\n </TableHeader>\n <TableBody\n items={data}\n renderEmptyState={() => (\n <div className={emptyStateStyles}>\n No data available\n </div>\n )}\n >\n {(item) => (\n <Row\n key={item.id}\n id={item.id}\n className={(renderProps) => rowStyles({\n ...renderProps,\n onRowAction: !!onRowAction,\n selectionMode\n })}\n >\n {selectionMode === 'multiple' && (\n <Cell className={checkboxCellStyles}>\n <Checkbox slot=\"selection\" size=\"S\" />\n </Cell>\n )}\n {columns.map((column) => (\n <Cell key={column.key} className={cellStyles({ align: column.align })}>\n {column.renderCell(item)}\n </Cell>\n ))}\n </Row>\n )}\n </TableBody>\n </AriaTable>\n </div>\n\n {/* Infinite scroll trigger */}\n {onLoadMore && <div ref={observerTarget} className={scrollTriggerStyles} />}\n\n {/* Loading indicator */}\n {isLoadingMore && (\n <div className={loadingStyles}>\n <ProgressBar isIndeterminate aria-label=\"Loading more items\" />\n </div>\n )}\n </>\n );\n}\n\n","import { Checkbox as AriaCheckbox, type CheckboxProps as AriaCheckboxProps } from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport './Checkbox.css';\n\nexport interface CheckboxProps extends Omit<AriaCheckboxProps, 'className' | 'style'> {\n /**\n * The size of the Checkbox.\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L';\n}\n\nconst checkboxStyles = style({\n display: 'flex',\n position: 'relative',\n alignItems: 'center',\n gap: 8,\n font: 'body',\n color: {\n default: '--plum-700',\n isDisabled: 'disabled'\n },\n cursor: {\n default: 'pointer',\n isDisabled: 'default'\n },\n disableTapHighlight: true\n});\n\nconst boxStyles = style({\n ...focusRing(),\n size: {\n default: 20,\n size: {\n S: 16,\n M: 20,\n L: 24\n }\n },\n flexShrink: 0,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 2,\n borderStyle: 'solid',\n borderRadius: 'sm',\n transition: 'default',\n backgroundColor: {\n default: 'layer-1',\n isSelected: {\n default: '--plum-600',\n isHovered: '--plum-700',\n isPressed: '--plum-800'\n },\n isDisabled: {\n default: 'gray-100',\n isSelected: 'gray-400'\n }\n },\n borderColor: {\n default: '--plum-400',\n isHovered: '--plum-500',\n isPressed: '--plum-600',\n isSelected: 'transparent',\n isDisabled: 'gray-300'\n }\n});\n\nconst dashStyles = style({\n width: '60%',\n height: 2,\n backgroundColor: 'white',\n borderRadius: 'sm'\n});\n\n/**\n * Checkbox component for selection within tables and forms.\n * Simplified version based on React Spectrum S2 Checkbox.\n * \n * @example\n * ```tsx\n * <Checkbox isSelected={selected} onChange={setSelected}>\n * Subscribe to newsletter\n * </Checkbox>\n * \n * // In table header/cell (no label)\n * <Checkbox slot=\"selection\" />\n * ```\n */\nexport function Checkbox({ size = 'M', children, ...props }: CheckboxProps) {\n return (\n <AriaCheckbox\n {...props}\n className={(renderProps) => checkboxStyles(renderProps)}\n >\n {(renderProps) => {\n const { isSelected, isIndeterminate } = renderProps;\n\n return (\n <>\n <div className={boxStyles({ ...renderProps, isSelected: isSelected || isIndeterminate, size })}>\n {isIndeterminate ? (\n <div className={dashStyles} />\n ) : isSelected ? (\n <svg viewBox=\"0 0 18 18\" aria-hidden=\"true\" className=\"checkbox-checkmark\">\n <polyline points=\"2 9 7 14 16 4\" className=\"checkbox-checkmark-path checkbox-checkmark-selected\" />\n </svg>\n ) : null}\n </div>\n {children}\n </>\n );\n }}\n </AriaCheckbox>\n );\n}\n","import { ProgressBar as AriaProgressBar } from 'react-aria-components';\nimport { style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport './ProgressBar.css';\n\nconst progressBarStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n width: 'full',\n});\n\nconst labelStyles = style({\n font: 'body',\n color: '--plum-700',\n display: 'flex',\n justifyContent: 'space-between',\n});\n\nconst trackStyles = style({\n height: 6,\n backgroundColor: '--yogurt-200',\n borderRadius: 'full',\n overflow: 'hidden',\n position: 'relative',\n});\n\nconst fillStyles = style({\n height: 'full',\n backgroundColor: '--plum-500',\n borderRadius: 'full',\n});\n\nconst indeterminateFillStyles = style({\n height: 'full',\n backgroundColor: '--plum-500',\n borderRadius: 'full',\n width: '40%',\n});\n\ninterface ProgressBarProps {\n label?: string;\n value?: number;\n maxValue?: number;\n isIndeterminate?: boolean;\n showValueLabel?: boolean;\n 'aria-label'?: string;\n}\n\n/**\n * ProgressBar Component\n * \n * Accessible progress indicator using React Aria Components.\n * Supports both determinate (with value) and indeterminate (loading) states.\n * \n * @example\n * // Determinate progress\n * <ProgressBar label=\"Loading...\" value={50} maxValue={100} />\n * \n * @example\n * // Indeterminate progress\n * <ProgressBar label=\"Loading...\" isIndeterminate />\n */\nexport function ProgressBar({\n label,\n value = 0,\n maxValue = 100,\n isIndeterminate = false,\n showValueLabel = true,\n 'aria-label': ariaLabel,\n}: ProgressBarProps) {\n return (\n <AriaProgressBar\n value={isIndeterminate ? undefined : value}\n maxValue={maxValue}\n isIndeterminate={isIndeterminate}\n aria-label={ariaLabel || label}\n className={progressBarStyles}\n >\n {({ percentage, valueText }) => (\n <>\n {label && (\n <div className={labelStyles}>\n <span>{label}</span>\n {!isIndeterminate && showValueLabel && <span>{valueText}</span>}\n </div>\n )}\n <div className={trackStyles}>\n <div\n className={`${isIndeterminate ? 'progress-fill-indeterminate' : 'progress-fill'} ${isIndeterminate ? indeterminateFillStyles : fillStyles}`}\n style={isIndeterminate ? undefined : { width: `${percentage}%` }}\n />\n </div>\n </>\n )}\n </AriaProgressBar>\n );\n}\n","import { Button as AriaButton, ButtonProps as AriaButtonProps } from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\n\nexport interface AvatarButtonProps extends AriaButtonProps {\n initials: string;\n name: string;\n}\n\nconst avatarButtonStyles = style({\n ...focusRing(),\n display: 'flex',\n alignItems: 'center',\n gap: 12,\n padding: 8,\n paddingX: 16,\n backgroundColor: {\n default: '--plum-100',\n isHovered: '--plum-200',\n isPressed: '--plum-300',\n isFocusVisible: '--plum-200'\n },\n color: '--plum-800',\n borderRadius: 'full',\n borderWidth: 2,\n borderStyle: 'solid',\n borderColor: '--plum-300',\n font: 'title-lg',\n cursor: 'pointer'\n});\n\nconst avatarCircleStyles = style({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 32,\n height: 32,\n borderRadius: 'full',\n backgroundColor: '--plum-500',\n color: 'white',\n font: 'title-lg'\n});\n\nexport const AvatarButton = ({ initials, name, ...props }: AvatarButtonProps) => {\n return (\n <AriaButton\n {...props}\n className={renderProps => avatarButtonStyles(renderProps)}\n >\n <div className={avatarCircleStyles}>\n {initials}\n </div>\n <span>{name}</span>\n </AriaButton>\n );\n};\n","import { style } from '@react-spectrum/s2/style' with { type: 'macro' };\n\nexport type BadgeVariant = 'completed' | 'running' | 'failed' | 'cancelled' | 'pending' | 'plum' | 'cucumber' | 'berry' | 'ginger' | 'peach';\n\nexport interface BadgeProps {\n variant?: BadgeVariant;\n children: React.ReactNode;\n}\n\nconst badgeStyles = style({\n paddingY: 4,\n paddingX: 12,\n borderRadius: 'lg',\n font: 'ui-sm',\n display: 'inline-block',\n backgroundColor: {\n variant: {\n completed: '--cucumber-100',\n running: '--ginger-100',\n failed: '--berry-100',\n cancelled: '--plum-100',\n pending: '--plum-100',\n plum: '--plum-100',\n cucumber: '--cucumber-100',\n berry: '--berry-100',\n ginger: '--ginger-100',\n peach: '--peach-100',\n yogurt: '--yogurt-100',\n }\n },\n color: {\n variant: {\n completed: '--cucumber-700',\n running: '--ginger-700',\n failed: '--berry-700',\n cancelled: '--plum-700',\n pending: '--plum-700',\n plum: '--plum-700',\n cucumber: '--cucumber-700',\n berry: '--berry-700',\n ginger: '--ginger-700',\n peach: '--peach-700',\n yogurt: '--yogurt-700',\n }\n }\n});\n\n/**\n * Badge component for displaying status or category with conditional colors\n * \n * @example\n * <Badge variant=\"completed\">Completed</Badge>\n * <Badge variant=\"cucumber\">Vegetable</Badge>\n */\nexport function Badge({ variant, children }: BadgeProps) {\n return (\n <span className={badgeStyles({ variant })}>\n {children}\n </span>\n );\n}\n","import { Button as AriaButton, ButtonProps as AriaButtonProps } from 'react-aria-components';\nimport CloseCircle from '@react-spectrum/s2/icons/CloseCircle';\nimport { focusRing, iconStyle, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { useIntl } from '../lib/i18n-context';\n\n// For props: https://react-spectrum.adobe.com/react-aria/Button.html#props\n// For styling: https://react-spectrum.adobe.com/react-aria/Button.html#styling\n\nexport interface CloseButtonProps extends Omit<AriaButtonProps, 'onPress'> {\n onClose: () => void;\n}\n\nconst closeButtonStyles = style({\n ...focusRing(),\n padding: 8,\n backgroundColor: {\n default: 'transparent',\n isHovered: '--yogurt-100',\n isPressed: '--yogurt-200'\n },\n borderStyle: 'none',\n borderRadius: 'lg',\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n forcedColors: {\n backgroundColor: 'ButtonFace',\n color: 'ButtonText',\n borderColor: 'ButtonBorder',\n borderWidth: 1,\n borderStyle: 'solid'\n }\n});\n\nexport const CloseButton = ({ onClose, ...props }: CloseButtonProps) => {\n const intl = useIntl();\n\n return (\n <AriaButton\n {...props}\n onPress={onClose}\n className={renderProps => closeButtonStyles(renderProps)}\n aria-label={intl.formatMessage({ id: 'ferment.detail.close' })}\n >\n <CloseCircle styles={iconStyle({ size: 'XL' })} />\n </AriaButton>\n );\n};\n","import { createContext, useContext, ReactNode } from 'react';\nimport { IntlProvider, useIntl as useReactIntl } from 'react-intl';\n\ntype LocaleMessages = Record<string, Record<string, string>>;\n\ninterface I18nProviderProps {\n children: ReactNode;\n messages: LocaleMessages;\n}\n\ntype Locale = string;\n\ninterface I18nContextType {\n locale: Locale;\n setLocale: (locale: Locale) => void;\n}\n\nconst I18nContext = createContext<I18nContextType | undefined>(undefined);\n\n/**\n * Unified i18n provider that can be used by both frontend and admin UI.\n * \n * @param messages - Locale messages object (e.g., from src/i18n/index.ts or admin-ui/src/i18n/index.ts)\n * \n * @example\n * // Frontend usage\n * import { localeMessages } from '@/i18n';\n * <I18nProvider messages={localeMessages}>{children}</I18nProvider>\n * \n * @example\n * // Admin UI usage\n * import { localeMessages } from '@admin/i18n';\n * <I18nProvider messages={localeMessages}>{children}</I18nProvider>\n */\nexport function I18nProvider({ children, messages }: I18nProviderProps) {\n // For MVP, we'll start with just English\n // Future: Add locale state management and persistence\n const locale: Locale = 'en';\n\n const setLocale = (newLocale: Locale) => {\n // Future: Implement locale switching with localStorage\n console.log('Locale switching to:', newLocale);\n };\n\n // Defensive check: ensure messages are loaded\n const currentMessages = messages?.[locale] || {};\n\n if (!messages || Object.keys(currentMessages).length === 0) {\n console.warn('I18nProvider: No messages loaded for locale:', locale);\n }\n\n return (\n <I18nContext.Provider value={{ locale, setLocale }}>\n <IntlProvider\n messages={currentMessages}\n locale={locale}\n defaultLocale=\"en\"\n >\n {children}\n </IntlProvider>\n </I18nContext.Provider>\n );\n}\n\nexport function useI18n() {\n const context = useContext(I18nContext);\n if (context === undefined) {\n throw new Error('useI18n must be used within an I18nProvider');\n }\n return context;\n}\n\n/**\n * Hook to access react-intl's formatMessage and other intl methods.\n * Re-exported from react-intl for convenience.\n */\nexport function useIntl() {\n return useReactIntl();\n}\n","import { Button, ComboBox as AriaComboBox, ComboBoxRenderProps, FieldError, Group, Input, Label, ListBox, ListBoxItem, Popover, Text } from 'react-aria-components';\nimport type { Key } from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport ChevronDown from '@react-spectrum/s2/icons/ChevronDown';\n\nconst comboBoxContainerStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n minWidth: 192,\n});\n\nconst labelStyles = style({\n font: 'body',\n color: '--plum-700',\n});\n\nconst inputWrapperStyles = style({\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n});\n\nconst inputStyles = style({\n ...focusRing(),\n width: 'calc(100% - 44px)', // Padding (12px+32px) and border (1px+1px)\n font: 'body',\n flexGrow: 1,\n flexShrink: 1,\n paddingStart: 12,\n paddingEnd: 32,\n paddingY: 8,\n backgroundColor: {\n default: '--yogurt-100',\n isFocusVisible: '--yogurt-200',\n isDisabled: 'gray-100',\n },\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: {\n default: '--yogurt-400',\n isFocusVisible: '--plum-600',\n isDisabled: 'gray-300',\n },\n color: {\n default: '--plum-700',\n isDisabled: 'gray-500',\n },\n outlineStyle: 'none',\n});\n\nconst buttonStyles = style({\n verticalAlign: 'middle',\n marginStart: -36, // 32px for button + padding and 4px this padding\n marginEnd: 8,\n padding: 4,\n borderRadius: 'sm',\n backgroundColor: {\n default: 'transparent',\n isHovered: 'gray-200',\n },\n borderStyle: 'none',\n color: {\n default: 'gray-600',\n isDisabled: 'gray-400',\n },\n cursor: {\n default: 'pointer',\n isDisabled: 'default',\n },\n});\n\nconst popoverStyles = style({\n backgroundColor: '--yogurt-50',\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--yogurt-400',\n boxShadow: 'elevated',\n marginTop: 4,\n maxHeight: 320,\n overflow: 'auto',\n isolation: 'isolate',\n});\n\nconst listBoxStyles = style({\n padding: 4,\n outline: 'none',\n});\n\nconst listBoxItemStyles = style({\n font: 'body',\n paddingX: 8,\n paddingY: 4,\n borderRadius: 'sm',\n cursor: {\n default: 'pointer',\n isDisabled: 'not-allowed',\n },\n backgroundColor: {\n default: 'transparent',\n isHovered: '--yogurt-200',\n isSelected: '--plum-200',\n isFocused: '--yogurt-200',\n isDisabled: '--yogurt-100',\n },\n color: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocused: '--plum-800',\n isPressed: '--plum-900',\n isSelected: '--plum-700',\n isDisabled: 'gray-400',\n },\n outline: 'none',\n});\n\nconst descriptionStyles = style({\n font: 'detail',\n color: 'gray-600',\n});\n\nconst errorStyles = style({\n font: 'detail',\n color: '--berry-700',\n});\n\nexport interface ComboBoxItem {\n id: Key;\n label: string;\n textValue?: string;\n}\n\nexport interface ComboBoxProps {\n label?: string;\n description?: string;\n errorMessage?: string;\n isRequired?: boolean;\n isDisabled?: boolean;\n selectedKey?: Key | null;\n onSelectionChange?: (key: Key | null) => void;\n items: ComboBoxItem[];\n placeholder?: string;\n 'aria-label'?: string;\n inputValue?: string;\n onInputChange?: (value: string) => void;\n}\n\n/**\n * Generic ComboBox component for searchable single-selection.\n * \n * Uses React Aria Components ComboBox for accessible selection with filtering.\n * Reusable for any data type - countries, users, categories, etc.\n * \n * @example\n * ```tsx\n * const items = [\n * { id: 1, label: 'Apple' },\n * { id: 2, label: 'Banana' },\n * { id: 3, label: 'Orange' },\n * ];\n * \n * <ComboBox\n * label=\"Fruit\"\n * items={items}\n * selectedKey={selectedId}\n * onSelectionChange={setSelectedId}\n * placeholder=\"Select a fruit\"\n * />\n * ```\n */\nexport function ComboBox({\n label,\n description,\n errorMessage,\n isRequired = false,\n isDisabled = false,\n selectedKey,\n onSelectionChange,\n items,\n placeholder,\n 'aria-label': ariaLabel,\n inputValue: controlledInputValue,\n onInputChange: controlledOnInputChange,\n}: ComboBoxProps) {\n return (\n <AriaComboBox\n className={comboBoxContainerStyles}\n inputValue={controlledInputValue}\n onInputChange={controlledOnInputChange}\n selectedKey={selectedKey}\n onSelectionChange={onSelectionChange}\n isDisabled={isDisabled}\n isRequired={isRequired}\n aria-label={ariaLabel || label}\n >\n {label && <Label className={labelStyles}>{label}</Label>}\n <div className={inputWrapperStyles}>\n <Input className={inputStyles} placeholder={placeholder} />\n <Button className={buttonStyles}>\n <ChevronDown />\n </Button>\n </div>\n {description && !errorMessage && (\n <Text slot=\"description\" className={descriptionStyles}>\n {description}\n </Text>\n )}\n {errorMessage && <FieldError className={errorStyles}>{errorMessage}</FieldError>}\n <Popover className={popoverStyles}>\n <ListBox className={listBoxStyles} items={items}>\n {(item) => (\n <ListBoxItem\n key={item.id}\n id={item.id}\n textValue={item.textValue || item.label}\n className={listBoxItemStyles}\n >\n {item.label}\n </ListBoxItem>\n )}\n </ListBox>\n </Popover>\n </AriaComboBox>\n );\n}\n","import {\n Button as AriaButton,\n Disclosure,\n DisclosureGroup as AriaDisclosureGroup,\n DisclosurePanel,\n DisclosureStateContext,\n Heading\n} from 'react-aria-components';\nimport ChevronRight from '@react-spectrum/s2/icons/ChevronRight';\nimport type { DisclosureGroupProps } from 'react-aria-components';\nimport { style, iconStyle, focusRing } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { useContext } from 'react';\n\nimport './DisclosureGroup.css';\n\n// Disclosure container - very thin grey border, full width button appearance\nconst disclosureContainerStyles = style({\n borderStyle: 'none',\n borderWidth: 0,\n borderColor: 'transparent',\n borderRadius: 'lg',\n overflow: 'hidden',\n width: 'full',\n backgroundColor: '--yogurt-100'\n});\n\n// Disclosure trigger button - blends seamlessly with container\nconst disclosureTriggerStyles = style({\n ...focusRing(),\n font: 'title',\n color: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocusVisible: '--plum-800',\n isPressed: '--plum-900'\n },\n display: 'flex',\n alignItems: 'center',\n gap: 8,\n padding: 16,\n paddingX: 20,\n width: 'full',\n backgroundColor: {\n default: '--yogurt-100',\n isHovered: '--yogurt-200',\n isPressed: '--yogurt-300'\n },\n borderStyle: 'none',\n borderRadius: 'none',\n cursor: 'pointer'\n});\n\nconst disclosureHeaderStyles = style({\n margin: 0,\n});\n\n// Disclosure panel - white/light background, blends with button header\nconst disclosurePanelStyles = style({\n padding: {\n default: 0,\n isExpanded: 20,\n },\n backgroundColor: '--yogurt-50',\n borderTopWidth: 1,\n borderTopStyle: 'solid',\n borderColor: '--yogurt-300'\n});\n\nexport interface DisclosureItem {\n id: string;\n title: string;\n content: React.ReactNode;\n onPress?: () => void;\n}\n\ninterface CustomDisclosureGroupProps extends Omit<DisclosureGroupProps, 'children'> {\n items: DisclosureItem[];\n 'aria-label'?: string;\n}\n\n/**\n * Reusable DisclosureGroup component\n * Displays collapsible sections with consistent styling\n * \n * @example\n * <DisclosureGroup\n * items={[\n * {\n * id: 'section1',\n * title: 'Section 1',\n * content: <div>Content goes here</div>\n * }\n * ]}\n * />\n */\nexport function DisclosureGroup({ items, ...props }: CustomDisclosureGroupProps) {\n return (\n <AriaDisclosureGroup {...props} className={disclosureContainerStyles}>\n {items.map((item) => (\n <Disclosure key={item.id}>\n <DisclosureContents key={item.id} {...item} />\n </Disclosure>\n ))}\n </AriaDisclosureGroup>\n );\n}\n\nconst DisclosureContents = (item: DisclosureItem) => {\n let { isExpanded } = useContext(DisclosureStateContext)!;\n\n return (\n <>\n <Heading className={disclosureHeaderStyles}>\n <AriaButton\n slot=\"trigger\"\n className={(renderProps) =>\n `disclosure-chevron ${disclosureTriggerStyles(renderProps)}`\n }\n onPress={item.onPress}\n >\n <ChevronRight styles={iconStyle({ size: 'S' })} />\n {item.title}\n </AriaButton>\n </Heading>\n <DisclosurePanel className={disclosurePanelStyles({ isExpanded })}>\n {item.content}\n </DisclosurePanel>\n </>\n );\n}\n","import {\n ToggleButton,\n ToggleButtonGroup,\n SelectionIndicator\n} from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { useIntl } from '../lib/i18n-context';\n\nexport interface FilterOption {\n value: string;\n label: string;\n}\n\nexport interface FilterTabsProps {\n value: string;\n onChange: (value: string) => void;\n options: FilterOption[];\n ariaLabel?: string;\n}\n\nconst filterContainerStyles = style({\n display: 'flex',\n gap: 0,\n padding: 4,\n backgroundColor: '--yogurt-200',\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--yogurt-400'\n});\n\nconst filterButtonStyles = style({\n ...focusRing(),\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n paddingX: 16,\n paddingY: 8,\n font: 'body',\n color: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocusVisible: '--plum-800',\n isPressed: '--plum-900'\n },\n backgroundColor: 'transparent',\n borderStyle: 'none',\n borderRadius: 'default',\n cursor: 'pointer',\n zIndex: 1\n});\n\nconst selectionIndicatorStyles = style({\n position: 'absolute',\n inset: 0,\n borderRadius: 'default',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: 'gray-300',\n boxShadow: 'elevated',\n zIndex: -1,\n backgroundColor: {\n default: 'layer-1',\n isHovered: '--yogurt-300',\n isPressed: '--yogurt-400'\n }\n});\n\n/**\n * FilterTabs component for status filtering\n * Uses React Aria ToggleButtonGroup with SelectionIndicator\n * \n * @example\n * <FilterTabs\n * value={statusFilter}\n * onChange={setStatusFilter}\n * options={[\n * { value: 'all', label: 'All' },\n * { value: 'running', label: 'Running' }\n * ]}\n * ariaLabel=\"Filter by status\"\n * />\n */\nexport function FilterTabs({ value, onChange, options, ariaLabel }: FilterTabsProps) {\n const intl = useIntl();\n\n return (\n <ToggleButtonGroup\n selectionMode=\"single\"\n selectedKeys={new Set([value])}\n disallowEmptySelection\n onSelectionChange={(keys) => {\n const selected = Array.from(keys)[0] as string;\n onChange(selected);\n }}\n aria-label={ariaLabel || intl.formatMessage({ id: 'filterTabs.ariaLabel' })}\n className={filterContainerStyles}\n >\n {options.map((option) => (\n <ToggleButton\n key={option.value}\n id={option.value}\n className={filterButtonStyles}\n >\n {({ isSelected }) => (\n <>\n {option.label}\n {isSelected && <SelectionIndicator className={selectionIndicatorStyles} />}\n </>\n )}\n </ToggleButton>\n ))}\n </ToggleButtonGroup>\n );\n}\n\n","import {\n TextField as AriaTextField,\n Label,\n Text,\n} from 'react-aria-components';\nimport { style, } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport {\n textFieldDescriptionStyles as labeledValueDescriptionStyles,\n textFieldErrorStyles as labeledValueErrorStyles,\n textFieldLabelStyles as labeledValueLabelStyles,\n} from './TextField';\n\nexport interface LabeledValueProps {\n label: string;\n error?: string;\n description?: string;\n children: React.ReactNode;\n}\n\nconst labeledValueStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 8,\n marginBottom: 20,\n});\n\nconst labeledValueValueStyles = style({\n font: 'body',\n color: '--plum-700',\n});\n\n\nexport function LabeledValue({ label, children, error, description, ...props }: LabeledValueProps) {\n return (\n <AriaTextField className={labeledValueStyles} {...props}>\n <Label className={labeledValueLabelStyles}>{label}</Label>\n <span className={labeledValueValueStyles}>\n {children}\n </span>\n {description && !error && (\n <Text slot=\"description\" className={labeledValueDescriptionStyles}>\n {description}\n </Text>\n )}\n {error && (\n <Text slot=\"errorMessage\" className={labeledValueErrorStyles}>\n {error}\n </Text>\n )}\n </AriaTextField>\n );\n}\n","import { Link as AriaLink, LinkProps } from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { ReactNode } from 'react';\n\nconst linkStyles = style({\n ...focusRing(),\n font: 'body',\n color: {\n default: '--plum-600',\n isHovered: '--plum-700',\n isPressed: '--plum-800'\n },\n textDecorationLine: 'underline',\n cursor: 'pointer',\n backgroundColor: {\n default: 'transparent',\n isHovered: 'transparent'\n }\n});\n\ninterface CustomLinkProps extends Omit<LinkProps, 'className'> {\n children: ReactNode;\n isExternal?: boolean;\n className?: string | ((renderProps: any) => string);\n}\n\n/**\n * Link Component\n * \n * Wraps React Aria Components Link with S2 styling and proper a11y.\n * Automatically handles focus states and keyboard navigation.\n * External links automatically get target=\"_blank\" and rel=\"noopener noreferrer\".\n * \n * @example\n * <Link href=\"/ferments\">Browse Ferments</Link>\n * \n * @example\n * <Link href=\"https://example.com\" isExternal>External Link</Link>\n * \n * @example\n * <Link href=\"/\" className={customStyles}>Custom Styled Link</Link>\n */\nexport function Link({ children, href, isExternal, className, ...props }: CustomLinkProps) {\n // Automatically detect external links if not specified\n const isExternalLink = isExternal ?? (href?.toString().startsWith('http://') || href?.toString().startsWith('https://'));\n\n const externalProps = isExternalLink ? {\n target: '_blank',\n rel: 'noopener noreferrer'\n } : {};\n\n return (\n <AriaLink\n {...props}\n {...externalProps}\n href={href}\n className={className || linkStyles}\n >\n {children}\n </AriaLink>\n );\n}\n","import {\n MenuTrigger,\n Menu as AriaMenu,\n MenuItem as AriaMenuItem,\n Popover,\n Separator\n} from 'react-aria-components';\nimport { style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { ReactNode } from 'react';\n\nconst menuStyles = style({\n backgroundColor: '--yogurt-50',\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--yogurt-400',\n boxShadow: 'elevated',\n padding: 4,\n minWidth: 200,\n outline: 'none'\n});\n\nconst menuItemStyles = style({\n display: 'flex',\n alignItems: 'center',\n gap: 12,\n paddingX: 12,\n paddingY: 8,\n borderRadius: 'lg',\n font: 'body',\n color: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocused: '--plum-800',\n isPressed: '--plum-900'\n },\n backgroundColor: {\n default: 'transparent',\n isHovered: '--yogurt-200',\n isFocused: '--yogurt-200'\n },\n cursor: 'pointer',\n outline: 'none'\n});\n\nconst dividerStyles = style({\n height: 1,\n backgroundColor: '--yogurt-400',\n marginY: 4\n});\n\nexport interface MenuItem {\n id: string;\n label: string;\n icon?: ReactNode;\n onAction: () => void;\n}\n\nexport interface MenuProps {\n trigger: ReactNode;\n items: MenuItem[];\n placement?: 'bottom' | 'bottom start' | 'bottom end' | 'top' | 'top start' | 'top end';\n 'aria-label'?: string;\n}\n\n/**\n * Menu component styled to match Select component\n * Uses yogurt colors for consistency with Select\n */\nexport function Menu({ trigger, items, placement = 'bottom end', 'aria-label': ariaLabel }: MenuProps) {\n return (\n <MenuTrigger>\n {trigger}\n <Popover placement={placement}>\n <AriaMenu className={menuStyles} aria-label={ariaLabel}>\n {items.map((item, index) =>\n item.id === 'divider' ? (\n <Separator key={`divider-${index}`} className={dividerStyles} />\n ) : (\n <AriaMenuItem\n key={item.id}\n id={item.id}\n onAction={item.onAction}\n className={menuItemStyles}\n >\n {item.icon}\n {item.label}\n </AriaMenuItem>\n )\n )}\n </AriaMenu>\n </Popover>\n </MenuTrigger>\n );\n}\n","import { style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { useIntl } from '../lib/i18n-context';\n\nexport interface PasswordValidation {\n minLength: boolean;\n hasLetter: boolean;\n hasNumber: boolean;\n hasSpecial: boolean;\n}\n\nexport interface PasswordStrengthProps {\n validation: PasswordValidation;\n}\n\nconst containerStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 8\n});\n\nconst requirementStyles = style({\n display: 'flex',\n alignItems: 'center',\n gap: 8,\n font: 'body-sm'\n});\n\nconst indicatorStyles = style({\n width: 16,\n height: 16,\n borderRadius: 'full',\n flexShrink: 0,\n backgroundColor: {\n default: '--gray-300',\n isValid: '--cucumber-500'\n },\n color: {\n default: 'inherit',\n isValid: '--cucumber-700'\n }\n});\n\n/**\n * Visual password strength indicator showing validation requirements\n * Displays checkmarks (green) for met requirements, circles (gray) for unmet\n */\nexport function PasswordStrength({ validation }: PasswordStrengthProps) {\n const intl = useIntl();\n\n const requirements = [\n {\n key: 'minLength',\n met: validation.minLength,\n label: intl.formatMessage({ id: 'validation.password.minLength' })\n },\n {\n key: 'hasLetter',\n met: validation.hasLetter,\n label: intl.formatMessage({ id: 'validation.password.letter' })\n },\n {\n key: 'hasNumber',\n met: validation.hasNumber,\n label: intl.formatMessage({ id: 'validation.password.number' })\n },\n {\n key: 'hasSpecial',\n met: validation.hasSpecial,\n label: intl.formatMessage({ id: 'validation.password.special' })\n }\n ];\n\n console.log('PasswordStrength requirements:', requirements, intl, intl.formatMessage({ id: 'validation.password.special' }));\n\n return (\n <div className={containerStyles}>\n {requirements.map(req => (\n <div key={req.key} className={requirementStyles}>\n <div\n className={indicatorStyles({ isValid: req.met })}\n />\n <span>{req.label}</span>\n </div>\n ))}\n </div>\n );\n}\n","import { Radio as AriaRadio, RadioGroup as AriaRadioGroup, type RadioGroupProps as AriaRadioGroupProps, type RadioProps as AriaRadioProps } from 'react-aria-components';\nimport { style, focusRing } from '@react-spectrum/s2/style' with { type: 'macro' };\n\nexport interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'children'> {\n label: string;\n options: Array<{ id: string; label: string; value: string }>;\n error?: string;\n}\n\nexport interface RadioProps extends AriaRadioProps {\n children: React.ReactNode;\n}\n\nconst radioGroupStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 8,\n});\n\nconst labelStyles = style({\n font: 'body',\n fontWeight: 'medium',\n color: '--plum-700',\n marginBottom: 8,\n});\n\nconst radioContainerStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 12,\n});\n\nconst radioStyles = style({\n ...focusRing(),\n display: 'flex',\n alignItems: 'center',\n gap: 8,\n font: 'body',\n color: {\n default: '--plum-700',\n isSelected: '--plum-800',\n isHovered: '--plum-600',\n isDisabled: 'gray-400',\n },\n cursor: 'pointer',\n padding: 8,\n borderRadius: 'lg',\n backgroundColor: {\n default: 'transparent',\n isHovered: '--plum-50',\n },\n});\n\nconst radioButtonStyles = style({\n width: 20,\n height: 20,\n borderRadius: 'full',\n borderWidth: 2,\n borderStyle: 'solid',\n borderColor: {\n default: 'gray-400',\n isSelected: '--plum-500',\n isHovered: '--plum-300',\n isDisabled: 'gray-200',\n },\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexShrink: 0,\n backgroundColor: {\n default: 'layer-1',\n isDisabled: 'gray-100',\n },\n});\n\nconst radioInnerDotStyles = style({\n width: 10,\n height: 10,\n borderRadius: 'full',\n backgroundColor: '--plum-500',\n opacity: {\n default: 0,\n isSelected: 1,\n },\n});\n\nconst errorStyles = style({\n font: 'body-sm',\n color: '--berry-600',\n marginTop: 4,\n});\n\nexport function Radio({ children, ...props }: RadioProps) {\n return (\n <AriaRadio {...props} className={renderProps => radioStyles(renderProps)}>\n {renderProps => (\n <>\n <div className={radioButtonStyles(renderProps)}>\n <div className={radioInnerDotStyles(renderProps)} />\n </div>\n <span>{children}</span>\n </>\n )}\n </AriaRadio>\n );\n}\n\nexport function RadioGroup({ label, options, error, ...props }: RadioGroupProps) {\n return (\n <AriaRadioGroup {...props} className={radioGroupStyles}>\n <span className={labelStyles}>{label}</span>\n <div className={radioContainerStyles}>\n {options.map(option => (\n <Radio key={option.id} value={option.value}>\n {option.label}\n </Radio>\n ))}\n </div>\n {error && <span className={errorStyles}>{error}</span>}\n </AriaRadioGroup>\n );\n}\n","import { SearchField as AriaSearchField, Input, Label, Button } from 'react-aria-components';\nimport Close from '@react-spectrum/s2/icons/Close';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { raw } from '../utils/styleMacro' with { type: 'macro' };\nimport Search from '@react-spectrum/s2/icons/Search';\n\n\nconst searchFieldContainerStyles = style({\n flex: {\n default: 'none',\n md: 1,\n },\n});\n\nconst searchFieldStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n});\n\nconst searchInputContainerStyles = style({\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n});\n\nconst searchInputStyles = style({\n ...focusRing(),\n width: 'full',\n padding: 8,\n paddingStart: 40,\n font: 'body',\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--yogurt-400',\n backgroundColor: {\n default: '--yogurt-100',\n isHovered: '--yogurt-200',\n isFocusVisible: '--yogurt-200',\n },\n});\n\nconst labelStyles = style({\n font: 'body',\n color: '--plum-700',\n marginBottom: 4,\n});\n\nconst searchIconStyles = {\n position: 'absolute' as const,\n left: 12,\n top: '50%',\n transform: 'translateY(-50%)',\n pointerEvents: 'none' as const,\n color: '--yogurt-600',\n};\n\nconst clearButtonStyles = style({\n ...focusRing(),\n position: 'absolute',\n right: 8,\n top: '50%',\n transform: 'translateY(-50%)',\n padding: 4,\n backgroundColor: 'transparent',\n borderStyle: 'none',\n borderRadius: 'default',\n cursor: 'pointer',\n color: {\n default: '--yogurt-600',\n isHovered: '--yogurt-700',\n isPressed: '--yogurt-800',\n },\n});\n\nexport interface SearchFieldProps {\n value: string;\n onChange: (value: string) => void;\n label: string;\n placeholder: string;\n ariaLabel: string;\n}\n\n/**\n * Reusable SearchField component using React Aria Components\n * Styled with S2 design tokens and includes search icon\n * \n * @example\n * <SearchField\n * value={searchQuery}\n * onChange={setSearchTerm}\n * label=\"Search\"\n * placeholder=\"Search ferments...\"\n * ariaLabel=\"Search ferments by name or description\"\n * />\n */\nexport function SearchField({\n value,\n onChange,\n label,\n placeholder,\n ariaLabel,\n}: SearchFieldProps) {\n return (\n <div className={searchFieldContainerStyles}>\n <AriaSearchField\n value={value}\n onChange={onChange}\n className={searchFieldStyles}\n aria-label={ariaLabel}\n >\n {({ isEmpty }) => (\n <>\n <Label className={labelStyles}>{label}</Label>\n <div className={searchInputContainerStyles}>\n <div style={searchIconStyles}>\n <Search />\n </div>\n <Input className={(renderProps) => searchInputStyles(renderProps) + ' ' + raw('&::-webkit-search-cancel-button { display: none }', 'custom_layer')} placeholder={placeholder} />\n {!isEmpty && <Button className={clearButtonStyles} aria-label=\"Clear search\">\n <Close />\n </Button>}\n </div>\n </>\n )}\n </AriaSearchField>\n </div>\n );\n}\n","import { useRouter } from 'next/navigation';\nimport {\n ToggleButton,\n ToggleButtonGroup,\n SelectionIndicator\n} from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { useIntl } from '../lib/i18n-context';\nimport GlobeGrid from '@react-spectrum/s2/icons/GlobeGrid';\nimport ListIcon from '@react-spectrum/s2/icons/ViewList';\n\nconst segmentedControlStyles = style({\n display: 'flex',\n gap: 0,\n padding: 4,\n backgroundColor: '--yogurt-200',\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--yogurt-400',\n});\n\nconst toggleButtonStyles = style({\n ...focusRing(),\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 8,\n paddingX: 16,\n paddingY: 8,\n font: 'body',\n color: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocusVisible: '--plum-800',\n isPressed: '--plum-900'\n },\n backgroundColor: 'transparent',\n borderStyle: 'none',\n borderRadius: 'default',\n cursor: 'pointer',\n zIndex: 1,\n '--iconPrimary': {\n type: 'color',\n value: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocusVisible: '--plum-800',\n isPressed: '--plum-900'\n },\n }\n});\n\nconst selectionIndicatorStyles = style({\n position: 'absolute',\n inset: 0,\n borderRadius: 'default',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: 'gray-300',\n boxShadow: 'elevated',\n zIndex: -1,\n color: {\n isDisabled: 'gray-400',\n forcedColors: 'ButtonText'\n },\n backgroundColor: {\n default: '--plum-300',\n isHovered: '--plum-400',\n isFocusVisibile: '--plum-400',\n isPressed: '--plum-400',\n isDisabled: 'gray-100',\n forcedColors: 'ButtonFace'\n },\n});\n\ninterface SegmentedControlProps {\n value: 'map' | 'list';\n}\n\n/**\n * SegmentedControl for Map/List view toggle\n * Uses RAC ToggleButtonGroup for accessible segmented control\n */\nexport function SegmentedControl({ value }: SegmentedControlProps) {\n const intl = useIntl();\n const router = useRouter();\n\n const handleSelectionChange = (newValue: 'map' | 'list') => {\n if (newValue === 'map') {\n router.push('/');\n } else {\n router.push('/ferments');\n }\n };\n\n return (\n <ToggleButtonGroup\n selectionMode=\"single\"\n selectedKeys={new Set([value])}\n disallowEmptySelection\n onSelectionChange={(keys) => {\n const selected = Array.from(keys)[0] as 'map' | 'list';\n handleSelectionChange(selected);\n }}\n aria-label={intl.formatMessage({ id: 'nav.viewToggle.ariaLabel' })}\n className={segmentedControlStyles}\n >\n <ToggleButton\n id=\"map\"\n className={(renderProps) => toggleButtonStyles(renderProps)}\n aria-label={intl.formatMessage({ id: 'nav.map' })}\n >\n {(renderProps) => (\n <>\n <SelectionIndicator className={selectionIndicatorStyles(renderProps)} />\n <GlobeGrid aria-hidden=\"true\" />\n <span>{intl.formatMessage({ id: 'nav.map' })}</span>\n </>\n )}\n </ToggleButton>\n\n <ToggleButton\n id=\"list\"\n className={(renderProps) => toggleButtonStyles(renderProps)}\n aria-label={intl.formatMessage({ id: 'nav.list' })}\n >\n {(renderProps) => (\n <>\n <SelectionIndicator className={selectionIndicatorStyles(renderProps)} />\n <ListIcon aria-hidden=\"true\" />\n <span>{intl.formatMessage({ id: 'nav.list' })}</span>\n </>\n )}\n </ToggleButton>\n </ToggleButtonGroup>\n );\n}\n","import {\n Select as AriaSelect,\n SelectProps,\n Label,\n Button,\n SelectValue,\n Popover,\n ListBox,\n ListBoxItem\n} from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport ChevronDown from '@react-spectrum/s2/icons/ChevronDown';\n\nconst selectContainerStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n minWidth: 200\n});\n\nconst labelStyles = style({\n font: 'body',\n color: '--plum-700',\n});\n\nconst buttonStyles = style({\n ...focusRing(),\n paddingX: 12,\n paddingY: 8,\n backgroundColor: {\n default: '--yogurt-100',\n isHovered: '--yogurt-200',\n isFocusVisible: '--yogurt-200',\n isPressed: '--yogurt-300'\n },\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--yogurt-400',\n font: 'body',\n color: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocused: '--plum-800',\n isPressed: '--plum-900',\n },\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 8,\n minWidth: 200\n});\n\nconst popoverStyles = style({\n backgroundColor: '--yogurt-50',\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--yogurt-400',\n boxShadow: 'elevated',\n marginTop: 4,\n maxHeight: 300,\n overflow: 'auto',\n isolation: 'isolate',\n});\n\nconst listBoxStyles = style({\n padding: 4,\n outline: 'none'\n});\n\nconst listBoxItemStyles = style({\n font: 'body',\n paddingX: 8,\n paddingY: 4,\n borderRadius: 'sm',\n cursor: {\n default: 'pointer',\n isDisabled: 'not-allowed'\n },\n backgroundColor: {\n default: 'transparent',\n isHovered: '--yogurt-200',\n isSelected: '--plum-200',\n isFocused: '--yogurt-200',\n isDisabled: '--yogurt-100'\n },\n color: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocused: '--plum-800',\n isPressed: '--plum-900',\n isSelected: '--plum-700',\n isDisabled: 'gray-400'\n },\n outline: 'none'\n});\n\nexport interface SelectOption {\n id: string;\n label: string;\n value: string | null;\n isDisabled?: boolean;\n}\n\ninterface CustomSelectProps extends Omit<SelectProps<SelectOption>, 'children'> {\n label: string;\n options: SelectOption[];\n placeholder?: string;\n}\n\n/**\n * Reusable Select component following RAC pattern\n * Label is inside the Select wrapper for proper a11y\n */\nexport function Select({ label, options, placeholder, ...props }: CustomSelectProps) {\n return (\n <AriaSelect {...props} className={selectContainerStyles}>\n <Label className={labelStyles}>{label}</Label>\n <Button className={buttonStyles}>\n <SelectValue />\n <ChevronDown aria-hidden=\"true\" />\n </Button>\n <Popover className={popoverStyles}>\n <ListBox className={listBoxStyles} items={options}>\n {(item) => (\n <ListBoxItem\n key={item.id}\n id={item.id}\n textValue={item.label}\n isDisabled={item.isDisabled}\n className={listBoxItemStyles}\n >\n {item.label}\n </ListBoxItem>\n )}\n </ListBox>\n </Popover>\n </AriaSelect>\n );\n}\n","import { ReactNode } from 'react';\nimport { style } from '@react-spectrum/s2/style' with { type: 'macro' };\n\nexport interface StatCardProps {\n title: string;\n value: ReactNode;\n description?: string;\n}\n\nconst cardStyles = style({\n backgroundColor: 'layer-1',\n borderRadius: 'xl',\n padding: 24,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--plum-200',\n display: 'flex',\n flexDirection: 'column',\n gap: 12,\n alignItems: 'center',\n textAlign: 'center'\n});\n\nconst cardTitleStyles = style({\n font: 'title-lg',\n color: '--plum-700',\n margin: 0\n});\n\nconst cardValueStyles = style({\n font: 'heading-2xl',\n color: '--plum-700',\n});\n\nconst cardDescStyles = style({\n font: 'body',\n color: '--plum-700',\n margin: 0\n});\n\n/**\n * StatCard component for displaying dashboard statistics\n * \n * @example\n * <StatCard \n * title=\"Total Sources\"\n * value={42}\n * description=\"Active scraping sources\"\n * />\n * \n * @example\n * // With icon as value\n * <StatCard \n * title=\"System Status\"\n * value={<CheckmarkCircle />}\n * description=\"All systems operational\"\n * />\n */\nexport function StatCard({ title, value, description }: StatCardProps) {\n return (\n <div className={cardStyles}>\n <h3 className={cardTitleStyles}>{title}</h3>\n <div className={cardValueStyles}>{value}</div>\n {description && <p className={cardDescStyles}>{description}</p>}\n </div>\n );\n}\n","import { Switch as AriaSwitch, SwitchProps as AriaSwitchProps } from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\n\n// For props: https://react-spectrum.adobe.com/react-aria/Switch.html#props\n// For styling: https://react-spectrum.adobe.com/react-aria/Switch.html#styling\n\nconst switchContainerStyles = style({\n ...focusRing(),\n display: 'flex',\n alignItems: 'center',\n gap: 8,\n paddingEnd: 2,\n cursor: 'pointer',\n font: 'ui-lg',\n color: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocusVisible: '--plum-800',\n isPressed: '--plum-900'\n },\n borderRadius: 'full'\n});\n\nconst switchTrackStyles = style({\n width: 44,\n height: 24,\n borderRadius: 'full',\n padding: 2,\n display: 'flex',\n alignItems: 'center',\n backgroundColor: {\n default: '--yogurt-400',\n isSelected: '--plum-500',\n isDisabled: 'disabled'\n },\n borderStyle: {\n forcedColors: 'solid'\n },\n borderColor: {\n forcedColors: 'ButtonBorder'\n },\n borderWidth: {\n forcedColors: 1\n }\n});\n\nconst switchThumbStyles = style({\n width: 20,\n height: 20,\n borderRadius: 'full',\n backgroundColor: {\n default: 'white',\n forcedColors: 'ButtonText'\n },\n transform: {\n default: 'translateX(0)',\n isSelected: 'translateX(22px)'\n }\n});\n\nexport interface SwitchProps extends Omit<AriaSwitchProps, 'children'> {\n children?: React.ReactNode;\n}\n\nexport const Switch = ({ children, ...props }: SwitchProps) => {\n return (\n <AriaSwitch\n {...props}\n className={renderProps => switchContainerStyles(renderProps)}\n >\n {renderProps => (\n <>\n <div className={switchTrackStyles(renderProps)}>\n <div className={switchThumbStyles(renderProps)} />\n </div>\n {children}\n </>\n )}\n </AriaSwitch>\n );\n};","import { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { Tabs as AriaTabs, TabList as AriaTabList, Tab as AriaTab, TabPanel as AriaTabPanel } from 'react-aria-components';\nimport type { TabListProps, TabPanelProps, TabProps, TabsProps } from 'react-aria-components';\n\nconst tabsStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 0\n});\n\nconst tabListStyles = style({\n display: 'flex',\n gap: 4,\n borderBottomWidth: 2,\n borderBottomStyle: 'solid',\n borderBottomColor: '--plum-200',\n marginBottom: 24,\n overflowX: 'auto',\n overflowY: 'hidden',\n WebkitOverflowScrolling: 'touch'\n});\n\nconst tabStyles = style({\n ...focusRing(),\n paddingX: 20,\n paddingY: 12,\n font: 'body',\n fontWeight: {\n isSelected: 'bold'\n },\n color: {\n default: '--plum-700',\n isSelected: '--plum-800',\n isHovered: '--plum-800',\n isDisabled: '--plum-300'\n },\n backgroundColor: {\n default: 'transparent',\n isHovered: '--plum-50',\n isSelected: '--plum-100'\n },\n borderWidth: 0,\n borderBottomWidth: 2,\n borderStyle: 'solid',\n borderColor: {\n default: 'transparent',\n isSelected: '--plum-700',\n isHovered: '--plum-300'\n },\n cursor: {\n default: 'pointer',\n isDisabled: 'not-allowed'\n },\n transitionProperty: 'all',\n transitionDuration: '200ms'\n});\n\nconst tabPanelStyles = style({\n paddingY: 0,\n outlineStyle: 'none'\n});\n\nexport function Tabs({ children, ...props }: TabsProps) {\n return (\n <AriaTabs className={tabsStyles} {...props}>\n {children}\n </AriaTabs>\n );\n}\n\nexport function TabList<T extends object>({ children, ...props }: TabListProps<T>) {\n return (\n <AriaTabList className={tabListStyles} {...props}>\n {children}\n </AriaTabList>\n );\n}\n\nexport function Tab({ children, ...props }: TabProps) {\n return (\n <AriaTab className={tabStyles} {...props}>\n {children}\n </AriaTab>\n );\n}\n\nexport function TabPanel({ children, ...props }: TabPanelProps) {\n return (\n <AriaTabPanel className={tabPanelStyles} {...props}>\n {children}\n </AriaTabPanel>\n );\n}\n","import {\n TextArea as AriaTextArea,\n TextField as AriaTextField,\n Label,\n} from 'react-aria-components';\nimport { style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { textFieldErrorStyles, textFieldLabelStyles, type TextFieldProps, textFieldStyles } from './TextField';\nimport { textFieldInputStyles } from '../utils/styleUtils' with { type: 'macro' };\nimport { useRef, useEffect } from 'react';\nimport { safeWindow } from '../utils/browser';\n\nexport interface TextAreaProps extends Omit<TextFieldProps, 'type'> { }\n\nconst textareaStyles = style({\n ...textFieldInputStyles(),\n resize: 'none',\n minHeight: 75, // ~3 lines\n maxHeight: '75vh',\n overflowY: 'auto',\n});\n\nexport function TextArea({ label, error, placeholder, value, ...props }: TextAreaProps) {\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n\n // Auto-grow on value change\n useEffect(() => {\n const textarea = textareaRef.current;\n if (!textarea) return;\n\n // Reset height to recalculate\n textarea.style.height = '75px';\n\n // Set to scrollHeight (content height)\n const newHeight = Math.min(textarea.scrollHeight, safeWindow.innerHeight * 0.75 || 64);\n textarea.style.height = `${newHeight}px`;\n }, [value]);\n\n return (\n <AriaTextField className={textFieldStyles} {...props} value={value}>\n <Label className={textFieldLabelStyles}>{label}</Label>\n <AriaTextArea\n ref={textareaRef}\n className={textareaStyles}\n placeholder={placeholder}\n />\n {error && <div className={textFieldErrorStyles}>{error}</div>}\n </AriaTextField>\n );\n}\n","/**\n * Safe browser API wrappers that work in SSR\n */\n\nexport const isBrowser = typeof window !== 'undefined';\nexport const isDocument = typeof document !== 'undefined';\n\nexport const safeWindow = {\n get innerHeight() {\n return isBrowser ? window.innerHeight : 0;\n },\n\n get location() {\n return isBrowser ? window.location : null;\n },\n\n matchMedia: (query: string) => {\n if (!isBrowser) {\n return { matches: false, media: query, addEventListener: () => { }, removeEventListener: () => { } };\n }\n return window.matchMedia(query);\n },\n\n reload: () => {\n if (isBrowser) window.location.reload();\n }\n};\n\nexport const safeDocument = {\n get documentElement() {\n return isDocument ? document.documentElement : null;\n },\n\n get referrer() {\n return isDocument ? document.referrer : '';\n },\n\n createElement: (tag: string) => {\n return isDocument ? document.createElement(tag) : HTMLUnknownElement.prototype;\n }\n};\n\nexport const safeLocalStorage = {\n getItem: (key: string): string | null => {\n if (!isBrowser) return null;\n try {\n return localStorage.getItem(key);\n } catch {\n return null;\n }\n },\n\n setItem: (key: string, value: string): void => {\n if (!isBrowser) return;\n try {\n localStorage.setItem(key, value);\n } catch {\n // Silent fail\n }\n }\n};\n","// Contexts & Providers\nexport { ThemeProvider, useTheme } from './theme-context';\nexport { I18nProvider } from './i18n-provider';\nexport { useIntl } from './i18n-context';\nexport { FilterProvider, useFilters } from './filter-context';\n\n// Dev Tools\nexport { AxeDevTools } from './axe-devtools';\n","import { createContext, useContext, useState, useEffect, ReactNode } from 'react';\nimport { isBrowser, safeWindow, safeDocument, safeLocalStorage } from '../utils/browser';\n\ntype ColorScheme = 'light' | 'dark';\n\ninterface ThemeContextType {\n colorScheme: ColorScheme;\n toggleColorScheme: () => void;\n}\n\nconst ThemeContext = createContext<ThemeContextType | undefined>(undefined);\n\nconst THEME_STORAGE_KEY = 'globalferments-theme';\n\n// Get initial theme synchronously to prevent flicker\nfunction getInitialTheme(): ColorScheme {\n if (!isBrowser) return 'light';\n\n // First check if blocking script already set the attribute\n const htmlElement = safeDocument.documentElement;\n if (htmlElement) {\n const htmlAttribute = htmlElement.getAttribute('data-color-scheme') as ColorScheme | null;\n if (htmlAttribute && (htmlAttribute === 'light' || htmlAttribute === 'dark')) {\n return htmlAttribute;\n }\n }\n\n // Fallback to localStorage\n const stored = safeLocalStorage.getItem(THEME_STORAGE_KEY) as ColorScheme | null;\n if (stored && (stored === 'light' || stored === 'dark')) {\n return stored;\n }\n\n // Final fallback to system preference\n return safeWindow.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n}\n\nexport function ThemeProvider({ children }: { children: ReactNode }) {\n // Initialize with a function to avoid SSR issues\n const [colorScheme, setColorScheme] = useState<ColorScheme>(() => {\n if (!isBrowser) return 'light';\n return getInitialTheme();\n });\n const [mounted, setMounted] = useState(false);\n\n // Set mounted flag on client\n useEffect(() => {\n setMounted(true);\n // Ensure colorScheme matches what's actually set\n const actual = getInitialTheme();\n if (actual !== colorScheme) {\n setColorScheme(actual);\n }\n }, []);\n\n // Update html attribute and localStorage when scheme changes\n useEffect(() => {\n if (!mounted || !isBrowser) return;\n\n const htmlElement = safeDocument.documentElement;\n if (htmlElement) {\n htmlElement.setAttribute('data-color-scheme', colorScheme);\n }\n safeLocalStorage.setItem(THEME_STORAGE_KEY, colorScheme);\n }, [colorScheme, mounted]);\n\n const toggleColorScheme = () => {\n setColorScheme(prev => prev === 'light' ? 'dark' : 'light');\n };\n\n return (\n <ThemeContext.Provider value={{ colorScheme, toggleColorScheme }}>\n {children}\n </ThemeContext.Provider>\n );\n}\n\nexport function useTheme() {\n const context = useContext(ThemeContext);\n if (context === undefined) {\n throw new Error('useTheme must be used within a ThemeProvider');\n }\n return context;\n}\n","import { createContext, useContext, useState, ReactNode } from 'react';\nimport type { FilterState } from '../types/types';\n\n\n/**\n * Filter context type with state and update methods\n */\ninterface FilterContextType {\n filters: FilterState;\n updateFilter: <K extends keyof FilterState>(key: K, value: FilterState[K]) => void;\n clearFilters: () => void;\n}\n\nconst initialFilterState: FilterState = {\n category: null,\n country: null,\n searchQuery: '',\n};\n\nconst FilterContext = createContext<FilterContextType | undefined>(undefined);\n\n/**\n * Filter Provider Component\n * Manages filter state for the application\n * \n * @example\n * <FilterProvider>\n * <App />\n * </FilterProvider>\n */\nexport function FilterProvider({ children }: { children: ReactNode }) {\n const [filters, setFilters] = useState<FilterState>(initialFilterState);\n\n /**\n * Update a single filter\n */\n const updateFilter = <K extends keyof FilterState>(\n key: K,\n value: FilterState[K]\n ) => {\n setFilters((prev) => ({\n ...prev,\n [key]: value,\n }));\n };\n\n /**\n * Clear all filters back to initial state\n */\n const clearFilters = () => {\n setFilters(initialFilterState);\n };\n\n return (\n <FilterContext.Provider value={{ filters, updateFilter, clearFilters }}>\n {children}\n </FilterContext.Provider>\n );\n}\n\n/**\n * Hook to access filter context\n * Must be used within FilterProvider\n * \n * @example\n * const { filters, updateFilter, clearFilters } = useFilters();\n * updateFilter('category', 'dairy');\n */\nexport function useFilters(): FilterContextType {\n const context = useContext(FilterContext);\n\n if (context === undefined) {\n throw new Error('useFilters must be used within a FilterProvider');\n }\n\n return context;\n}\n","import { useEffect } from 'react';\n\nexport function AxeDevTools() {\n useEffect(() => {\n // Only run in local development (not in production or Vercel deployments)\n const isLocalDev = typeof window !== 'undefined' &&\n window.location.hostname === 'localhost';\n\n if (isLocalDev && process.env.NODE_ENV !== 'production') {\n // Dynamic imports to avoid SSR issues\n Promise.all([\n import('react'),\n import('react-dom'),\n import('@axe-core/react')\n ]).then(([React, ReactDOM, axe]) => {\n axe.default(React.default || React, ReactDOM.default || ReactDOM, 1000, {});\n }).catch(err => {\n console.warn('Failed to load axe-core:', err);\n });\n }\n }, []);\n\n return null;\n}\n","// Hooks\nexport * from './useFilterState';\n","/**\n * Filter State Hook\n * Custom hook for managing ferment filter state with type-safe utilities\n */\nimport type { FilterState } from '../types/types';\n\n/**\n * Default filter state\n */\nexport const DEFAULT_FILTERS: FilterState = {\n searchQuery: '',\n category: null,\n country: null,\n};\n\n/**\n * Check if any filters are active\n */\nexport function hasActiveFilters(filters: FilterState): boolean {\n return (\n filters.searchQuery.trim() !== '' ||\n filters.category !== null ||\n filters.country !== null\n );\n}\n\n/**\n * Clear all filters, returning default state\n */\nexport function clearFilters(): FilterState {\n return { ...DEFAULT_FILTERS };\n}\n\n/**\n * Update a single filter field\n */\nexport function updateFilter(\n filters: FilterState,\n field: keyof FilterState,\n value: string | null\n): FilterState {\n return {\n ...filters,\n [field]: value,\n };\n}\n\n/**\n * Convert filter state to API query parameters\n * Only includes non-empty filters\n */\nexport function filtersToQueryParams(filters: FilterState): Record<string, string> {\n const params: Record<string, string> = {};\n\n if (filters.category) {\n params.category = filters.category;\n }\n\n if (filters.country) {\n params.country = filters.country;\n }\n\n return params;\n}\n","// Utilities\nexport { textFieldInputStyles } from './styleUtils';\nexport { getCategoryColors } from './category-colors';\nexport { api } from './api';\nexport type { FermentsResponse, FermentDetailResponse, SearchResponse, FilterOptions } from './api';\nexport { isBrowser, isDocument, safeWindow, safeDocument, safeLocalStorage } from './browser';\n","\nexport const textFieldInputStyles = () => ({\n padding: 12,\n paddingX: 16,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: {\n default: '--plum-300',\n isHovered: '--plum-400',\n isFocusVisible: '--plum-500',\n isInvalid: '--berry-500',\n },\n borderRadius: 'lg',\n font: 'body',\n backgroundColor: 'layer-1',\n color: 'neutral',\n outline: 'none',\n} as const);\n","/**\n * Category Color Utilities\n * Provides consistent color mapping for ferment categories across Map and List views\n */\nimport type { CategoryColors } from '../types/types';\n\n/**\n * Get colors for a ferment category\n * Returns marker color (for map), badge background, and badge text color\n * \n * @example\n * const colors = getCategoryColors('dairy');\n * // { marker: 'var(--plum-500)', badge: 'plum' }\n */\nexport function getCategoryColors(category: string): CategoryColors {\n const colorMap: Record<string, CategoryColors> = {\n dairy: {\n marker: 'var(--yogurt-500)',\n badge: 'plum',\n },\n vegetable: {\n marker: 'var(--cucumber-500)',\n badge: 'cucumber',\n },\n beverage: {\n marker: 'var(--berry-500)',\n badge: 'berry',\n },\n grain: {\n marker: 'var(--ginger-500)',\n badge: 'ginger',\n },\n legume: {\n marker: 'var(--ginger-600)',\n badge: 'cucumber',\n },\n meat: {\n marker: 'var(--berry-500)',\n badge: 'peach',\n },\n fish: {\n marker: 'var(--berry-500)',\n badge: 'berry',\n },\n condiment: {\n marker: 'var(--plum-650)',\n badge: 'ginger',\n },\n other: {\n marker: 'var(--yogurt-500)',\n badge: 'plum',\n },\n };\n\n // Default to yogurt colors for unknown categories\n return colorMap[category.toLowerCase()] || {\n marker: 'var(--yogurt-500)',\n badge: 'yogurt'\n };\n}\n","/**\n * API Client for GlobalFerments\n * \n * Centralized functions for all backend API calls\n * with error handling and type safety\n */\n\nimport type { Category, Country, Ferment, RelatedFerment } from '../types';\n\nexport interface FermentsResponse {\n ferments: Ferment[];\n count: number;\n filters?: {\n category?: string;\n country?: string;\n };\n}\n\nexport interface FermentDetailResponse extends Ferment {\n relatedFerments: Array<RelatedFerment>;\n}\n\nexport interface SearchResponse {\n results: Ferment[];\n query: string;\n count: number;\n}\n\nexport interface FilterOptions {\n category?: string;\n country?: string;\n limit?: number;\n offset?: number;\n}\n\n/**\n * API client object with all endpoint methods\n */\nexport const api = {\n /**\n * Get list of ferments with optional filters\n */\n async getFerments(filters?: FilterOptions): Promise<FermentsResponse> {\n const params = new URLSearchParams();\n\n if (filters?.category) params.append('category', filters.category);\n if (filters?.country) params.append('country', filters.country);\n if (filters?.limit) params.append('limit', filters.limit.toString());\n if (filters?.offset) params.append('offset', filters.offset.toString());\n\n const url = `/api/ferments${params.toString() ? `?${params}` : ''}`;\n const response = await fetch(url);\n\n if (!response.ok) {\n throw new Error(`Failed to fetch ferments: ${response.statusText}`);\n }\n\n return response.json();\n },\n\n /**\n * Get optimized data for map markers\n */\n async getFermentsForMap(): Promise<{ ferments: Array<Pick<Ferment, 'id' | 'name' | 'latitude' | 'longitude' | 'category' | 'country'>> }> {\n const response = await fetch('/api/ferments/map');\n\n if (!response.ok) {\n throw new Error(`Failed to fetch map data: ${response.statusText}`);\n }\n\n return response.json();\n },\n\n /**\n * Search ferments by name or description\n */\n async searchFerments(query: string): Promise<SearchResponse> {\n if (!query || query.length < 2) {\n return { results: [], query, count: 0 };\n }\n\n const response = await fetch(`/api/search?q=${encodeURIComponent(query)}`);\n\n if (!response.ok) {\n throw new Error(`Search failed: ${response.statusText}`);\n }\n\n return response.json();\n },\n\n /**\n * Get list of countries with hasFerments flag\n * Optionally filtered by category\n */\n async getCountries(category?: string): Promise<{ countries: Country[] }> {\n const url = category\n ? `/api/countries?category=${encodeURIComponent(category)}`\n : '/api/countries';\n\n const response = await fetch(url);\n\n if (!response.ok) {\n throw new Error(`Failed to fetch countries: ${response.statusText}`);\n }\n\n return response.json();\n },\n\n /**\n * Get list of categories\n * Optionally filtered by country\n */\n async getCategories(country?: string): Promise<{ categories: Category[] }> {\n const url = country\n ? `/api/categories?country=${encodeURIComponent(country)}`\n : '/api/categories';\n\n const response = await fetch(url);\n\n if (!response.ok) {\n throw new Error(`Failed to fetch categories: ${response.statusText}`);\n }\n\n return response.json();\n },\n};\n","\nexport * from './types';\n","import type { BadgeVariant } from '../components/Badge';\n\n/**\n * Type definitions for GlobalFerments\n *\n * Shared types used across the application\n */\n\nexport interface FilterState {\n category: string | null;\n country: string | null;\n searchQuery: string;\n}\n\nexport interface CategoryColors {\n marker: string; // CSS variable for map marker color\n badge: BadgeVariant; // plain english name that maps to badge color scheme\n}\n\n/**\n * Type definitions for GlobalFerments\n *\n * Shared types used across the application\n */\n\nexport interface Ferment {\n id: number;\n name: string;\n slug: string;\n description: string;\n country: string;\n countryCode: string;\n region: string;\n regionName?: string | null;\n category: string;\n ingredients: string[] | null;\n imageUrl: string | null;\n sourceUrl: string | null;\n latitude: number | null;\n longitude: number | null;\n relatedFerments?: RelatedFerment[];\n}\n\nexport interface RelatedFerment {\n id: number;\n name: string;\n slug: string;\n category?: string;\n imageUrl?: string | null;\n country: string;\n countryCode?: string;\n}\n\nexport interface Country {\n code: string;\n name: string;\n region: string;\n hasFerments: boolean; // True if this country has ferments\n}\n\nexport interface Category {\n name: string; // Primary field name\n category: string; // Deprecated (backward compatibility)\n}\n"],"names":[],"version":3,"file":"module.mjs.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAb,oBAAoB;;;;AEapB,yBAAyB;AACzB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8HC,MAAM,4CAAS,CAAC,YACrB,QAAQ,WACR,UAAU,iBACV,OAAO,gBACP,SAAS,EACT,GAAG,OACS;IACZ,OACE,CAAA,GAAA,UAAA,EAAC,CAAA,GAAA,aAAA,GAAU;QAAA,GACL,KAAK;QACT,WAAW,CAAA,cAAe,GAAG,aAAa,GAAE,CAAA,CAAG,GAAG,mCAAa;gBAAE,GAAG,WAAW;sBAAE;yBAAM;YAAO;QAAG,UAEhG;IAAQ;AAGf;;;;;;ACzIO,MAAM;AAMN,MAAM;AAKb,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAKC,MAAM;AAMN,MAAM;AAMP,SAAU,0CAAU,SAAE,KAAK,QAAE,OAAO,eAAQ,KAAK,eAAE,WAAW,eAAE,WAAW,EAAE,GAAG,OAAuB;IAC3G,OACE,CAAA,GAAA,WAAA,EAAC,CAAA,GAAA,gBAAA,GAAa;QAAC,WAAW;QAAe,GAAM,KAAK;QAAA,UAAA;YAClD,CAAA,GAAA,UAAA,EAAC,CAAA,GAAA,YAAA,GAAK;gBAAC,WAAW;gBAAoB,UAAG;YAAK;YAC9C,CAAA,GAAA,UAAA,EAAC,CAAA,GAAA,YAAA,GAAK;gBAAC,WAAW;gBAAa,MAAM;gBAAM,aAAa;YAAW;YAClE,eAAe,C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,2BAAA,EAA8B,SAAS,UAAU,EAAE;QAGrE,OAAO,SAAS,IAAI;IACtB;IAEA;;;KAGG,GACH,MAAM,eAAc,OAAgB;QAClC,MAAM,MAAM,UACR,CAAA,wBAAA,EAA2B,mBAAmB,UAAU,GACxD;QAEJ,MAAM,WAAW,MAAM,MAAM;QAE7B,IAAI,CAAC,SAAS,EAAE,EACd,MAAM,IAAI,MAAM,CAAA,4BAAA,EAA+B,SAAS,UAAU,EAAE;QAGtE,OAAO,SAAS,IAAI;IACtB;AACD;;;;;;;;;;;","sources":["packages/shared/src/index.ts","packages/shared/src/components/index.ts","packages/shared/src/components/AlertDialog.tsx","packages/shared/src/components/Button.tsx","packages/shared/src/components/TextField.tsx","packages/shared/src/components/Autocomplete.tsx","packages/shared/src/components/AutocompleteTable.tsx","packages/shared/src/components/Table.tsx","packages/shared/src/components/Checkbox.tsx","packages/shared/src/components/ProgressBar.tsx","packages/shared/src/components/AvatarButton.tsx","packages/shared/src/components/Badge.tsx","packages/shared/src/components/CloseButton.tsx","packages/shared/src/lib/i18n-provider.tsx","packages/shared/src/components/ComboBox.tsx","packages/shared/src/components/DisclosureGroup.tsx","packages/shared/src/components/FilterTabs.tsx","packages/shared/src/components/LabeledValue.tsx","packages/shared/src/components/Link.tsx","packages/shared/src/components/Menu.tsx","packages/shared/src/components/PasswordStrength.tsx","packages/shared/src/components/RadioGroup.tsx","packages/shared/src/components/SearchField.tsx","packages/shared/src/components/SegmentedControl.tsx","packages/shared/src/components/Select.tsx","packages/shared/src/components/StatCard.tsx","packages/shared/src/components/Switch.tsx","packages/shared/src/components/Tabs.tsx","packages/shared/src/components/TextArea.tsx","packages/shared/src/utils/browser.ts","packages/shared/src/lib/index.ts","packages/shared/src/lib/theme-context.tsx","packages/shared/src/lib/filter-context.tsx","packages/shared/src/hooks/index.ts","packages/shared/src/hooks/useFilterState.ts","packages/shared/src/utils/index.ts","packages/shared/src/utils/styleUtils.ts","packages/shared/src/utils/category-colors.ts","packages/shared/src/utils/api.ts","packages/shared/src/types/index.ts","packages/shared/src/types/types.ts"],"sourcesContent":["// Components\nexport * from './components';\n\n// Lib (contexts & providers)\nexport * from './lib';\n\n// Hooks\nexport * from './hooks';\n\n// Utils\nexport * from './utils';\n\n// Types\nexport * from './types';\n","// Component exports\nexport { AlertDialog, PromptDialog } from './AlertDialog';\nexport { Autocomplete, type AutocompleteItem, type AutocompleteProps } from './Autocomplete';\nexport { AutocompleteTable, type AutocompleteTableProps } from './AutocompleteTable';\nexport { AvatarButton, type AvatarButtonProps } from './AvatarButton';\nexport { Badge, type BadgeVariant } from './Badge';\nexport { Button } from './Button';\nexport { Checkbox, type CheckboxProps } from './Checkbox';\nexport { CloseButton } from './CloseButton';\nexport { ComboBox, type ComboBoxItem, type ComboBoxProps } from './ComboBox';\nexport { DisclosureGroup, type DisclosureItem } from './DisclosureGroup';\nexport { FilterTabs } from './FilterTabs';\nexport { LabeledValue } from './LabeledValue';\nexport { Link } from './Link';\nexport { Menu, type MenuItem, type MenuProps } from './Menu';\nexport { PasswordStrength, type PasswordStrengthProps, type PasswordValidation } from './PasswordStrength';\nexport { ProgressBar } from './ProgressBar';\nexport { RadioGroup } from './RadioGroup';\nexport { SearchField } from './SearchField';\nexport { SegmentedControl } from './SegmentedControl';\nexport { Select, type SelectOption } from './Select';\nexport { StatCard } from './StatCard';\nexport { Switch } from './Switch';\nexport { Table, type ColumnDef, type TableProps } from './Table';\nexport { Tabs, TabList, Tab, TabPanel } from './Tabs';\nexport { TextArea } from './TextArea';\nexport { TextField } from './TextField';\n","import { Button } from './Button';\nimport { Dialog, Heading, Modal, ModalOverlay } from 'react-aria-components';\nimport { style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { TextField } from './TextField';\nimport { useState } from 'react';\n\nconst overlayStyles = style({\n position: 'fixed',\n inset: 0,\n backgroundColor: 'transparent-black-500',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n isolation: 'isolate',\n});\n\nconst modalStyles = style({\n backgroundColor: 'layer-1',\n borderRadius: 'xl',\n boxShadow: 'elevated',\n padding: 24,\n width: {\n default: 'calc(100vw - 32px)',\n sm: 400,\n md: 500\n },\n maxWidth: 500,\n transform: {\n entering: 'scale(0.95)',\n default: 'scale(1)'\n },\n});\n\nconst headingStyles = style({\n font: 'heading-xl',\n color: 'heading',\n margin: 0,\n marginBottom: 12\n});\n\nconst messageStyles = style({\n font: 'body',\n color: 'neutral',\n margin: 0,\n marginBottom: 24\n});\n\nconst buttonGroupStyles = style({\n display: 'flex',\n gap: 12,\n justifyContent: 'end'\n});\n\nexport interface AlertDialogProps {\n isOpen: boolean;\n onClose: () => void;\n title: string;\n message: string;\n variant?: 'danger' | 'warning' | 'info' | 'success';\n confirmLabel?: string;\n cancelLabel?: string;\n onConfirm: () => void | Promise<void>;\n showCancel?: boolean;\n children?: React.ReactNode; // Optional custom content (e.g., Switch, Checkbox)\n}\n\nexport function AlertDialog({\n isOpen,\n onClose,\n title,\n message,\n variant = 'info',\n confirmLabel = 'OK',\n cancelLabel = 'Cancel',\n onConfirm,\n showCancel = true,\n children\n}: AlertDialogProps) {\n const [isProcessing, setIsProcessing] = useState(false);\n\n const handleConfirm = async () => {\n setIsProcessing(true);\n try {\n await onConfirm();\n onClose();\n } finally {\n setIsProcessing(false);\n }\n };\n\n // Map variant to button variant\n const buttonVariant = variant === 'danger' ? 'danger' :\n variant === 'success' ? 'primary' :\n 'primary';\n\n return (\n <ModalOverlay isOpen={isOpen} onOpenChange={(open) => !open && onClose()} className={overlayStyles}>\n <Modal className={modalStyles}>\n <Dialog>\n {({ close }) => (\n <>\n <Heading slot=\"title\" className={headingStyles}>\n {title}\n </Heading>\n <p className={messageStyles}>{message}</p>\n {children && (\n <div className={style({ marginBottom: 24 })}>\n {children}\n </div>\n )}\n <div className={buttonGroupStyles}>\n {showCancel && (\n <Button\n variant=\"secondary\"\n size=\"M\"\n onPress={close}\n isDisabled={isProcessing}\n >\n {cancelLabel}\n </Button>\n )}\n <Button\n variant={buttonVariant}\n size=\"M\"\n onPress={handleConfirm}\n isDisabled={isProcessing}\n >\n {isProcessing ? 'Processing...' : confirmLabel}\n </Button>\n </div>\n </>\n )}\n </Dialog>\n </Modal>\n </ModalOverlay>\n );\n}\n\nexport interface PromptDialogProps {\n isOpen: boolean;\n onClose: () => void;\n title: string;\n message: string;\n inputLabel: string;\n inputPlaceholder?: string;\n confirmLabel?: string;\n cancelLabel?: string;\n onConfirm: (value: string) => void | Promise<void>;\n validator?: (value: string) => string | null;\n}\n\nexport function PromptDialog({\n isOpen,\n onClose,\n title,\n message,\n inputLabel,\n inputPlaceholder = '',\n confirmLabel = 'OK',\n cancelLabel = 'Cancel',\n onConfirm,\n validator\n}: PromptDialogProps) {\n const [value, setValue] = useState('');\n const [error, setError] = useState<string | null>(null);\n const [isProcessing, setIsProcessing] = useState(false);\n\n const handleConfirm = async () => {\n // Validate\n if (validator) {\n const validationError = validator(value);\n if (validationError) {\n setError(validationError);\n return;\n }\n }\n\n setIsProcessing(true);\n try {\n await onConfirm(value);\n setValue('');\n setError(null);\n onClose();\n } finally {\n setIsProcessing(false);\n }\n };\n\n const handleClose = () => {\n setValue('');\n setError(null);\n onClose();\n };\n\n return (\n <ModalOverlay isOpen={isOpen} onOpenChange={(open) => !open && handleClose()} className={overlayStyles}>\n <Modal className={modalStyles}>\n <Dialog>\n {({ close }) => (\n <>\n <Heading slot=\"title\" className={headingStyles}>\n {title}\n </Heading>\n <p className={messageStyles}>{message}</p>\n <div className={style({ marginBottom: 24 })}>\n <TextField\n label={inputLabel}\n value={value}\n onChange={(newValue) => {\n setValue(newValue);\n setError(null);\n }}\n placeholder={inputPlaceholder}\n error={error || undefined}\n autoFocus\n />\n </div>\n <div className={buttonGroupStyles}>\n <Button\n variant=\"secondary\"\n size=\"M\"\n onPress={() => {\n setValue('');\n setError(null);\n close();\n }}\n isDisabled={isProcessing}\n >\n {cancelLabel}\n </Button>\n <Button\n variant=\"primary\"\n size=\"M\"\n onPress={handleConfirm}\n isDisabled={isProcessing}\n >\n {isProcessing ? 'Processing...' : confirmLabel}\n </Button>\n </div>\n </>\n )}\n </Dialog>\n </Modal>\n </ModalOverlay>\n );\n}\n","import { Button as AriaButton, ButtonProps as AriaButtonProps } from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\n\n// For props: https://react-spectrum.adobe.com/react-aria/Button.html#props\n// For styling: https://react-spectrum.adobe.com/react-aria/Button.html#styling\n// For conditional styling: https://react-spectrum.adobe.com/beta/s2/styling.html#conditional-styles\n\nexport interface ButtonProps extends AriaButtonProps {\n children?: React.ReactNode;\n variant?: 'primary' | 'secondary' | 'danger' | 'navigation';\n size?: 'S' | 'M' | 'L';\n}\n\n// Primary variant styles\nconst buttonStyles = style({\n ...focusRing(),\n font: {\n default: 'body',\n size: {\n S: 'body-sm',\n L: 'body-lg',// or `body` too?\n },\n },\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: {\n default: 8,\n size: {\n S: 4,\n },\n },\n paddingY: {\n default: 12,\n size: {\n S: 8,\n L: 16,\n },\n variant: {\n navigation: {\n default: 4\n }\n }\n },\n paddingStart: {\n default: 16,\n size: {\n S: 12,\n L: 24,\n },\n variant: {\n navigation: {\n default: 8\n }\n }\n },\n paddingEnd: {\n default: 16,\n size: {\n S: 12,\n L: 24,\n },\n variant: {\n navigation: 12\n }\n },\n width: {\n variant: {\n navigation: 'fit'\n }\n },\n color: {\n variant: {\n secondary: {\n default: '--plum-700',\n },\n danger: {\n default: 'white',\n },\n navigation: {\n default: '--plum-700',\n }\n },\n forcedColors: 'ButtonText',\n isDisabled: {\n default: 'gray-400',\n forcedColors: 'GrayText',\n },\n },\n backgroundColor: {\n default: '--plum-300',\n variant: {\n primary: {\n default: '--plum-300',\n isHovered: '--plum-400',\n isFocusVisibile: '--plum-400',\n isPressed: '--plum-400',\n },\n secondary: {\n default: '--yogurt-200',\n isHovered: '--yogurt-300',\n isFocusVisibile: '--yogurt-300',\n isPressed: '--yogurt-400',\n },\n navigation: {\n default: 'transparent',\n isHovered: '--yogurt-200',\n isFocusVisibile: '--yogurt-200',\n isPressed: '--yogurt-300',\n },\n danger: {\n default: '--berry-500',\n isHovered: '--berry-600',\n isFocusVisibile: '--berry-600',\n isPressed: '--berry-700',\n },\n },\n forcedColors: 'ButtonFace',\n isDisabled: {\n default: 'gray-100',\n isDisabled: 'GrayText',\n },\n },\n borderRadius: 'lg',\n borderStyle: {\n default: 'none',\n forcedColors: 'solid'\n },\n borderColor: {\n forcedColors: 'ButtonBorder'\n },\n borderWidth: {\n forcedColors: 1\n },\n cursor: {\n default: 'pointer',\n isDisabled: 'not-allowed'\n }\n});\n\nexport const Button = ({\n children,\n variant = 'primary',\n size = 'M',\n className,\n ...props\n}: ButtonProps) => {\n return (\n <AriaButton\n {...props}\n className={renderProps => `${className || ''} ` + buttonStyles({ ...renderProps, size, variant })}\n >\n {children}\n </AriaButton>\n );\n};\n","import {\n TextField as AriaTextField,\n TextFieldProps as AriaTextFieldProps,\n Input,\n Label,\n Text,\n} from 'react-aria-components';\nimport { focusRing, style, } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { textFieldInputStyles } from '../utils/styleUtils' with { type: 'macro' };\n\nexport interface TextFieldProps extends Omit<AriaTextFieldProps, 'children'> {\n label: string;\n type?: 'text' | 'password' | 'email' | 'tel' | 'url' | 'number';\n error?: string;\n description?: string;\n placeholder?: string;\n}\n\nexport const textFieldStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 8,\n});\n\nexport const textFieldLabelStyles = style({\n font: 'body',\n color: '--plum-700',\n});\n\nconst inputStyles = style({\n ...focusRing(),\n ...textFieldInputStyles(),\n});\n\nexport const textFieldErrorStyles = style({\n font: 'body-sm',\n color: '--berry-600',\n marginTop: 4,\n});\n\nexport const textFieldDescriptionStyles = style({\n font: 'body-sm',\n color: '--plum-600',\n marginTop: 4,\n});\n\nexport function TextField({ label, type = 'text', error, description, placeholder, ...props }: TextFieldProps) {\n return (\n <AriaTextField className={textFieldStyles} {...props}>\n <Label className={textFieldLabelStyles}>{label}</Label>\n <Input className={inputStyles} type={type} placeholder={placeholder} />\n {description && !error && (\n <Text slot=\"description\" className={textFieldDescriptionStyles}>\n {description}\n </Text>\n )}\n {error && (\n <Text slot=\"errorMessage\" className={textFieldErrorStyles}>\n {error}\n </Text>\n )}\n </AriaTextField>\n );\n}\n","import { useState, useMemo } from 'react';\nimport {\n SearchField as AriaSearchField,\n Autocomplete as AriaAutocomplete,\n Input,\n Label,\n ListBox,\n ListBoxItem,\n useFilter,\n Popover\n} from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport Search from '@react-spectrum/s2/icons/Search';\nimport CheckmarkCircle from '@react-spectrum/s2/icons/CheckmarkCircle';\nimport type { Selection } from 'react-aria-components';\n\nconst containerStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n width: 'full',\n});\n\nconst labelStyles = style({\n font: 'body',\n color: '--plum-700',\n});\n\nconst searchFieldStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n});\n\nconst inputContainerStyles = style({\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n});\n\nconst inputStyles = style({\n ...focusRing(),\n width: 'full',\n padding: 8,\n paddingStart: 40,\n font: 'body',\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--yogurt-400',\n backgroundColor: {\n default: '--yogurt-100',\n isHovered: '--yogurt-200',\n isFocusVisible: '--yogurt-200',\n },\n});\n\nconst searchIconStyles = style({\n position: 'absolute',\n left: 12,\n top: '50%',\n transform: 'translateY(-50%)',\n pointerEvents: 'none',\n color: '--yogurt-600',\n});\n\nconst popoverStyles = style({\n backgroundColor: '--yogurt-50',\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--yogurt-400',\n boxShadow: 'elevated',\n marginTop: 4,\n maxHeight: 300,\n overflow: 'auto',\n isolation: 'isolate',\n // width: 'full',\n // minWidth: 300,\n});\n\nconst listBoxStyles = style({\n padding: 4,\n outline: 'none',\n});\n\nconst listBoxItemStyles = style({\n ...focusRing(),\n font: 'body',\n paddingX: 8,\n paddingY: 8,\n borderRadius: 'sm',\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n gap: 8,\n backgroundColor: {\n default: 'transparent',\n isHovered: '--yogurt-200',\n isFocused: '--yogurt-200',\n isPressed: '--yogurt-300',\n },\n color: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocused: '--plum-800',\n isPressed: '--plum-900',\n },\n outline: 'none',\n});\n\nconst selectedItemStyles = style({\n backgroundColor: {\n default: '--plum-100',\n isHovered: '--plum-200',\n isFocused: '--plum-200',\n },\n color: '--plum-900',\n});\n\nconst checkboxStyles = style({\n width: 16,\n height: 16,\n flexShrink: 0,\n});\n\nconst itemTextStyles = style({\n flex: 1,\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n});\n\nconst errorStyles = style({\n font: 'body-sm',\n color: '--berry-600',\n});\n\nexport interface AutocompleteItem {\n id: string | number;\n name: string;\n [key: string]: any;\n}\n\nexport interface AutocompleteProps<T extends AutocompleteItem> {\n items: T[];\n selectedKeys?: Selection;\n onSelectionChange?: (keys: Selection) => void;\n selectionMode?: 'none' | 'single' | 'multiple';\n label: string;\n placeholder?: string;\n ariaLabel?: string;\n error?: string;\n getItemText?: (item: T) => string;\n}\n\n/**\n * Autocomplete component using React Aria SearchField + ListBox\n * \n * Features:\n * - SearchField for filtering items\n * - Optional checkboxes for multi-selection\n * - Shows both selected and unselected items when filtered\n * - Selected items highlighted with background color\n * - Keyboard navigation (arrow keys, enter, escape)\n * - Accessible (ARIA labels, focus management)\n * \n * @example\n * ```tsx\n * // Single select\n * <Autocomplete\n * items={sources}\n * selectedKeys={selectedKey}\n * onSelectionChange={setSelectedKey}\n * selectionMode=\"single\"\n * label=\"Select Source\"\n * placeholder=\"Search sources...\"\n * />\n * \n * // Multi select\n * <Autocomplete\n * items={sources}\n * selectedKeys={selectedKeys}\n * onSelectionChange={setSelectedKeys}\n * selectionMode=\"multiple\"\n * label=\"Select Sources\"\n * placeholder=\"Search sources...\"\n * />\n * \n * // No selection (just filtering)\n * <Autocomplete\n * items={sources}\n * selectionMode=\"none\"\n * label=\"Search Sources\"\n * placeholder=\"Search sources...\"\n * />\n * ```\n */\nexport function Autocomplete<T extends AutocompleteItem>({\n items,\n selectedKeys,\n onSelectionChange,\n selectionMode = 'none',\n label,\n placeholder,\n ariaLabel,\n error,\n getItemText = (item) => item.name,\n}: AutocompleteProps<T>) {\n const [inputValue, setInputValue] = useState('');\n const { contains } = useFilter({ sensitivity: 'base' });\n\n // Filter items based on input value\n const filteredItems = useMemo(() => {\n if (!inputValue) return items;\n const searchLower = inputValue.toLowerCase();\n return items.filter((item) =>\n getItemText(item).toLowerCase().includes(searchLower)\n );\n }, [items, inputValue, getItemText]);\n\n // Sort to show selected items first when in selection mode\n const sortedItems = useMemo(() => {\n if (selectionMode === 'none' || !selectedKeys) return filteredItems;\n\n return [...filteredItems].sort((a, b) => {\n const aSelected = selectedKeys === 'all' || selectedKeys.has(String(a.id));\n const bSelected = selectedKeys === 'all' || selectedKeys.has(String(b.id));\n if (aSelected && !bSelected) return -1;\n if (!aSelected && bSelected) return 1;\n return 0;\n });\n }, [filteredItems, selectedKeys, selectionMode]);\n\n const showCheckboxes = selectionMode !== 'none';\n\n return (\n <div className={containerStyles}>\n <AriaAutocomplete\n filter={contains}\n inputValue={inputValue}\n onInputChange={setInputValue}\n >\n <AriaSearchField\n className={searchFieldStyles}\n aria-label={ariaLabel || label}\n >\n <Label className={labelStyles}>{label}</Label>\n <div className={inputContainerStyles}>\n <div className={searchIconStyles}><Search /></div>\n <Input\n className={inputStyles}\n placeholder={placeholder}\n />\n </div>\n </AriaSearchField>\n\n <ListBox\n className={listBoxStyles}\n items={sortedItems}\n selectionMode={selectionMode}\n selectedKeys={selectedKeys}\n onSelectionChange={onSelectionChange}\n aria-label={ariaLabel || `${label} options`}\n >\n {(item) => {\n const isSelected = selectedKeys === 'all' || (selectedKeys && selectedKeys.has(String(item.id)));\n return (\n <ListBoxItem\n key={item.id}\n id={String(item.id)}\n textValue={getItemText(item)}\n className={(renderProps) =>\n `${listBoxItemStyles(renderProps)} ${isSelected ? selectedItemStyles(renderProps) : ''}`\n }\n >\n {showCheckboxes && (\n <div className={checkboxStyles}>\n {isSelected && <CheckmarkCircle />}\n </div>\n )}\n <span className={itemTextStyles}>{getItemText(item)}</span>\n </ListBoxItem>\n );\n }}\n </ListBox>\n\n {error && <div className={errorStyles}>{error}</div>}\n </AriaAutocomplete>\n </div>\n );\n}\n","import { useMemo } from 'react';\nimport type { Selection } from 'react-aria-components';\nimport { Autocomplete, type AutocompleteItem } from './Autocomplete';\nimport { Table, type ColumnDef } from './Table';\nimport { style } from '@react-spectrum/s2/style' with { type: 'macro' };\n\nconst containerStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 16,\n width: 'full',\n});\n\nconst tableContainerStyles = style({\n maxHeight: 384,\n overflow: 'auto',\n});\n\nexport interface AutocompleteTableProps<T extends AutocompleteItem> {\n // Autocomplete props\n allItems: T[];\n selectedKeys: Selection;\n onSelectionChange: (keys: Selection) => void;\n selectionMode?: 'single' | 'multiple';\n searchLabel: string;\n searchPlaceholder?: string;\n getItemText?: (item: T) => string;\n\n // Table props\n columns: ColumnDef<T>[];\n tableLabel: string;\n}\n\n/**\n * Composite component combining Autocomplete and Table\n * Useful for search-and-select workflows where selected items are displayed in a table\n * \n * Features:\n * - Autocomplete search field at top\n * - Table below showing selected items\n * - Filters all items in autocomplete\n * - Shows only selected items in table\n * - Scrollable table with max height of 384px\n * \n * @example\n * ```tsx\n * <AutocompleteTable\n * allItems={allSources}\n * selectedKeys={selectedSourceIds}\n * onSelectionChange={setSelectedSourceIds}\n * selectionMode=\"multiple\"\n * searchLabel=\"Search Sources\"\n * searchPlaceholder=\"Search by name or URL...\"\n * columns={[\n * { key: 'name', label: 'Name', isRowHeader: true },\n * { key: 'domain', label: 'Domain' },\n * { key: 'actions', label: 'Actions', align: 'end' },\n * ]}\n * tableLabel=\"Selected Sources\"\n * />\n * ```\n */\nexport function AutocompleteTable<T extends AutocompleteItem>({\n allItems,\n selectedKeys,\n onSelectionChange,\n selectionMode = 'multiple',\n searchLabel,\n searchPlaceholder,\n getItemText,\n columns,\n tableLabel,\n}: AutocompleteTableProps<T>) {\n // Filter to show only selected items in table\n const selectedItems = useMemo(() => {\n if (selectedKeys === 'all') return allItems;\n if (!selectedKeys || selectedKeys.size === 0) return [];\n\n return allItems.filter(item => selectedKeys.has(String(item.id)));\n }, [allItems, selectedKeys]);\n\n return (\n <div className={containerStyles}>\n <Autocomplete\n items={allItems}\n selectedKeys={selectedKeys}\n onSelectionChange={onSelectionChange}\n selectionMode={selectionMode}\n label={searchLabel}\n placeholder={searchPlaceholder}\n getItemText={getItemText}\n />\n\n <div className={tableContainerStyles}>\n <Table\n columns={columns}\n data={selectedItems}\n ariaLabel={tableLabel}\n />\n </div>\n </div>\n );\n}\n","import {\n Cell,\n Column,\n Row,\n Table as AriaTable,\n TableBody,\n TableHeader,\n type Key,\n type SortDescriptor\n} from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { Checkbox } from './Checkbox';\nimport { ProgressBar } from './ProgressBar';\nimport { ReactNode, useRef, useEffect } from 'react';\n\nexport interface ColumnDef<T> {\n key: string;\n label: string;\n renderCell: (item: T) => ReactNode;\n width?: string;\n isRowHeader?: boolean;\n align?: 'start' | 'center' | 'end';\n}\n\nexport interface TableProps<T> {\n data: T[];\n columns: ColumnDef<T>[];\n onRowAction?: (key: Key) => void;\n ariaLabel: string;\n sortDescriptor?: SortDescriptor;\n onSortChange?: (descriptor: SortDescriptor) => void;\n selectionMode?: 'none' | 'single' | 'multiple';\n selectedKeys?: Set<Key>;\n onSelectionChange?: (keys: Set<Key>) => void;\n onLoadMore?: () => void;\n isLoadingMore?: boolean;\n}\n\nconst tableContainerStyles = style({\n backgroundColor: 'layer-1',\n borderRadius: 'xl',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--plum-200',\n overflow: 'auto'\n});\n\nconst tableStyles = style({\n width: 'full',\n borderCollapse: 'collapse'\n});\n\nconst tableHeaderStyles = style({\n backgroundColor: '--yogurt-200',\n borderBottomWidth: 1,\n borderBottomStyle: 'solid',\n borderBottomColor: '--plum-200'\n});\n\nconst columnHeaderStyles = style({\n padding: 16,\n textAlign: {\n default: 'start',\n align: {\n start: 'start',\n center: 'center',\n end: 'end',\n },\n },\n font: 'title-lg',\n color: '--plum-700',\n cursor: {\n allowsSorting: 'pointer'\n }\n});\n\nconst rowStyles = style({\n ...focusRing(),\n backgroundColor: {\n default: 'transparent',\n isHovered: '--yogurt-100',\n isSelected: '--plum-100',\n isFocusVisible: '--yogurt-100'\n },\n cursor: {\n default: 'default',\n onRowAction: 'pointer',\n selectionMode: {\n single: 'pointer',\n multiple: 'pointer'\n }\n }\n});\n\nconst cellStyles = style({\n padding: 16,\n textAlign: {\n default: 'start',\n align: {\n start: 'start',\n center: 'center',\n end: 'end',\n },\n },\n font: 'body',\n color: '--plum-700',\n borderBottomWidth: 1,\n borderBottomStyle: 'solid',\n borderBottomColor: '--plum-100'\n});\n\nconst checkboxCellStyles = style({\n padding: 16,\n width: 48,\n borderBottomWidth: 1,\n borderBottomStyle: 'solid',\n borderBottomColor: '--plum-100'\n});\n\nconst emptyStateStyles = style({\n padding: 48,\n textAlign: 'center',\n font: 'body',\n color: '--plum-600',\n});\n\nconst loadingStyles = style({\n padding: 24,\n display: 'flex',\n justifyContent: 'center'\n});\n\nconst scrollTriggerStyles = style({\n height: 1,\n pointerEvents: 'none'\n});\n\n/**\n * Reusable Table component using React Aria Components\n * \n * Features:\n * - Collection-based API for better performance\n * - Built-in virtualization support (via RAC)\n * - Keyboard navigation\n * - Screen reader support\n * - Optional sorting\n * - Optional row selection\n * - Optional row actions (clickable rows)\n * - Checkbox column for multiple selection\n * - Hover and selected states\n * \n * @example\n * ```tsx\n * const columns: ColumnDef<Run>[] = [\n * { key: 'id', label: 'ID', renderCell: (run) => `#${run.id}` },\n * { key: 'status', label: 'Status', renderCell: (run) => <Badge variant={run.status}>{run.status}</Badge> }\n * ];\n * \n * <Table\n * data={runs}\n * columns={columns}\n * ariaLabel=\"Scraper runs\"\n * selectionMode=\"multiple\"\n * selectedKeys={selectedIds}\n * onSelectionChange={setSelectedIds}\n * />\n * ```\n */\nexport function Table<T extends { id: number | string }>({\n data,\n columns,\n onRowAction,\n ariaLabel,\n sortDescriptor,\n onSortChange,\n selectionMode = 'none',\n selectedKeys,\n onSelectionChange,\n onLoadMore,\n isLoadingMore\n}: TableProps<T>) {\n const observerTarget = useRef<HTMLDivElement>(null);\n\n // Infinite scroll observer\n useEffect(() => {\n if (!onLoadMore) return;\n\n const observer = new IntersectionObserver(\n (entries) => {\n if (entries[0].isIntersecting && !isLoadingMore) {\n onLoadMore();\n }\n },\n { threshold: 0.1, rootMargin: '100px' }\n );\n\n if (observerTarget.current) {\n observer.observe(observerTarget.current);\n }\n\n return () => observer.disconnect();\n }, [onLoadMore, isLoadingMore]);\n\n return (\n <>\n <div className={tableContainerStyles}>\n <AriaTable\n aria-label={ariaLabel}\n selectionMode={selectionMode}\n selectedKeys={selectedKeys}\n onSelectionChange={onSelectionChange as any}\n onRowAction={onRowAction}\n sortDescriptor={sortDescriptor}\n onSortChange={onSortChange}\n className={tableStyles}\n >\n <TableHeader className={tableHeaderStyles}>\n {selectionMode === 'multiple' && (\n <Column className={columnHeaderStyles({ align: 'center', alignItems: 'center' })}>\n <Checkbox slot=\"selection\" size=\"S\" />\n </Column>\n )}\n {columns.map((column) => (\n <Column\n key={column.key}\n id={column.key}\n isRowHeader={column.isRowHeader}\n allowsSorting={!!onSortChange}\n className={columnHeaderStyles({ align: column.align })}\n >\n {column.label}\n </Column>\n ))}\n </TableHeader>\n <TableBody\n items={data}\n renderEmptyState={() => (\n <div className={emptyStateStyles}>\n No data available\n </div>\n )}\n >\n {(item) => (\n <Row\n key={item.id}\n id={item.id}\n className={(renderProps) => rowStyles({\n ...renderProps,\n onRowAction: !!onRowAction,\n selectionMode\n })}\n >\n {selectionMode === 'multiple' && (\n <Cell className={checkboxCellStyles}>\n <Checkbox slot=\"selection\" size=\"S\" />\n </Cell>\n )}\n {columns.map((column) => (\n <Cell key={column.key} className={cellStyles({ align: column.align })}>\n {column.renderCell(item)}\n </Cell>\n ))}\n </Row>\n )}\n </TableBody>\n </AriaTable>\n </div>\n\n {/* Infinite scroll trigger */}\n {onLoadMore && <div ref={observerTarget} className={scrollTriggerStyles} />}\n\n {/* Loading indicator */}\n {isLoadingMore && (\n <div className={loadingStyles}>\n <ProgressBar isIndeterminate aria-label=\"Loading more items\" />\n </div>\n )}\n </>\n );\n}\n\n","import { Checkbox as AriaCheckbox, type CheckboxProps as AriaCheckboxProps } from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport './Checkbox.css';\n\nexport interface CheckboxProps extends Omit<AriaCheckboxProps, 'className' | 'style'> {\n /**\n * The size of the Checkbox.\n * @default 'M'\n */\n size?: 'S' | 'M' | 'L';\n}\n\nconst checkboxStyles = style({\n display: 'flex',\n position: 'relative',\n alignItems: 'center',\n gap: 8,\n font: 'body',\n color: {\n default: '--plum-700',\n isDisabled: 'disabled'\n },\n cursor: {\n default: 'pointer',\n isDisabled: 'default'\n },\n disableTapHighlight: true\n});\n\nconst boxStyles = style({\n ...focusRing(),\n size: {\n default: 20,\n size: {\n S: 16,\n M: 20,\n L: 24\n }\n },\n flexShrink: 0,\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderWidth: 2,\n borderStyle: 'solid',\n borderRadius: 'sm',\n transition: 'default',\n backgroundColor: {\n default: 'layer-1',\n isSelected: {\n default: '--plum-600',\n isHovered: '--plum-700',\n isPressed: '--plum-800'\n },\n isDisabled: {\n default: 'gray-100',\n isSelected: 'gray-400'\n }\n },\n borderColor: {\n default: '--plum-400',\n isHovered: '--plum-500',\n isPressed: '--plum-600',\n isSelected: 'transparent',\n isDisabled: 'gray-300'\n }\n});\n\nconst dashStyles = style({\n width: '60%',\n height: 2,\n backgroundColor: 'white',\n borderRadius: 'sm'\n});\n\n/**\n * Checkbox component for selection within tables and forms.\n * Simplified version based on React Spectrum S2 Checkbox.\n * \n * @example\n * ```tsx\n * <Checkbox isSelected={selected} onChange={setSelected}>\n * Subscribe to newsletter\n * </Checkbox>\n * \n * // In table header/cell (no label)\n * <Checkbox slot=\"selection\" />\n * ```\n */\nexport function Checkbox({ size = 'M', children, ...props }: CheckboxProps) {\n return (\n <AriaCheckbox\n {...props}\n className={(renderProps) => checkboxStyles(renderProps)}\n >\n {(renderProps) => {\n const { isSelected, isIndeterminate } = renderProps;\n\n return (\n <>\n <div className={boxStyles({ ...renderProps, isSelected: isSelected || isIndeterminate, size })}>\n {isIndeterminate ? (\n <div className={dashStyles} />\n ) : isSelected ? (\n <svg viewBox=\"0 0 18 18\" aria-hidden=\"true\" className=\"checkbox-checkmark\">\n <polyline points=\"2 9 7 14 16 4\" className=\"checkbox-checkmark-path checkbox-checkmark-selected\" />\n </svg>\n ) : null}\n </div>\n {children}\n </>\n );\n }}\n </AriaCheckbox>\n );\n}\n","import { ProgressBar as AriaProgressBar } from 'react-aria-components';\nimport { style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport './ProgressBar.css';\n\nconst progressBarStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n width: 'full',\n});\n\nconst labelStyles = style({\n font: 'body',\n color: '--plum-700',\n display: 'flex',\n justifyContent: 'space-between',\n});\n\nconst trackStyles = style({\n height: 6,\n backgroundColor: '--yogurt-200',\n borderRadius: 'full',\n overflow: 'hidden',\n position: 'relative',\n});\n\nconst fillStyles = style({\n height: 'full',\n backgroundColor: '--plum-500',\n borderRadius: 'full',\n});\n\nconst indeterminateFillStyles = style({\n height: 'full',\n backgroundColor: '--plum-500',\n borderRadius: 'full',\n width: '40%',\n});\n\ninterface ProgressBarProps {\n label?: string;\n value?: number;\n maxValue?: number;\n isIndeterminate?: boolean;\n showValueLabel?: boolean;\n 'aria-label'?: string;\n}\n\n/**\n * ProgressBar Component\n * \n * Accessible progress indicator using React Aria Components.\n * Supports both determinate (with value) and indeterminate (loading) states.\n * \n * @example\n * // Determinate progress\n * <ProgressBar label=\"Loading...\" value={50} maxValue={100} />\n * \n * @example\n * // Indeterminate progress\n * <ProgressBar label=\"Loading...\" isIndeterminate />\n */\nexport function ProgressBar({\n label,\n value = 0,\n maxValue = 100,\n isIndeterminate = false,\n showValueLabel = true,\n 'aria-label': ariaLabel,\n}: ProgressBarProps) {\n return (\n <AriaProgressBar\n value={isIndeterminate ? undefined : value}\n maxValue={maxValue}\n isIndeterminate={isIndeterminate}\n aria-label={ariaLabel || label}\n className={progressBarStyles}\n >\n {({ percentage, valueText }) => (\n <>\n {label && (\n <div className={labelStyles}>\n <span>{label}</span>\n {!isIndeterminate && showValueLabel && <span>{valueText}</span>}\n </div>\n )}\n <div className={trackStyles}>\n <div\n className={`${isIndeterminate ? 'progress-fill-indeterminate' : 'progress-fill'} ${isIndeterminate ? indeterminateFillStyles : fillStyles}`}\n style={isIndeterminate ? undefined : { width: `${percentage}%` }}\n />\n </div>\n </>\n )}\n </AriaProgressBar>\n );\n}\n","import { Button as AriaButton, ButtonProps as AriaButtonProps } from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\n\nexport interface AvatarButtonProps extends AriaButtonProps {\n initials: string;\n name: string;\n}\n\nconst avatarButtonStyles = style({\n ...focusRing(),\n display: 'flex',\n alignItems: 'center',\n gap: 12,\n padding: 8,\n paddingX: 16,\n backgroundColor: {\n default: '--plum-100',\n isHovered: '--plum-200',\n isPressed: '--plum-300',\n isFocusVisible: '--plum-200'\n },\n color: '--plum-800',\n borderRadius: 'full',\n borderWidth: 2,\n borderStyle: 'solid',\n borderColor: '--plum-300',\n font: 'title-lg',\n cursor: 'pointer'\n});\n\nconst avatarCircleStyles = style({\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: 32,\n height: 32,\n borderRadius: 'full',\n backgroundColor: '--plum-500',\n color: 'white',\n font: 'title-lg'\n});\n\nexport const AvatarButton = ({ initials, name, ...props }: AvatarButtonProps) => {\n return (\n <AriaButton\n {...props}\n className={renderProps => avatarButtonStyles(renderProps)}\n >\n <div className={avatarCircleStyles}>\n {initials}\n </div>\n <span>{name}</span>\n </AriaButton>\n );\n};\n","import { style } from '@react-spectrum/s2/style' with { type: 'macro' };\n\nexport type BadgeVariant = 'completed' | 'running' | 'failed' | 'cancelled' | 'pending' | 'plum' | 'cucumber' | 'berry' | 'ginger' | 'peach';\n\nexport interface BadgeProps {\n variant?: BadgeVariant;\n children: React.ReactNode;\n}\n\nconst badgeStyles = style({\n paddingY: 4,\n paddingX: 12,\n borderRadius: 'lg',\n font: 'ui-sm',\n display: 'inline-block',\n backgroundColor: {\n variant: {\n completed: '--cucumber-100',\n running: '--ginger-100',\n failed: '--berry-100',\n cancelled: '--plum-100',\n pending: '--plum-100',\n plum: '--plum-100',\n cucumber: '--cucumber-100',\n berry: '--berry-100',\n ginger: '--ginger-100',\n peach: '--peach-100',\n yogurt: '--yogurt-100',\n }\n },\n color: {\n variant: {\n completed: '--cucumber-700',\n running: '--ginger-700',\n failed: '--berry-700',\n cancelled: '--plum-700',\n pending: '--plum-700',\n plum: '--plum-700',\n cucumber: '--cucumber-700',\n berry: '--berry-700',\n ginger: '--ginger-700',\n peach: '--peach-700',\n yogurt: '--yogurt-700',\n }\n }\n});\n\n/**\n * Badge component for displaying status or category with conditional colors\n * \n * @example\n * <Badge variant=\"completed\">Completed</Badge>\n * <Badge variant=\"cucumber\">Vegetable</Badge>\n */\nexport function Badge({ variant, children }: BadgeProps) {\n return (\n <span className={badgeStyles({ variant })}>\n {children}\n </span>\n );\n}\n","import { Button as AriaButton, ButtonProps as AriaButtonProps } from 'react-aria-components';\nimport CloseCircle from '@react-spectrum/s2/icons/CloseCircle';\nimport { focusRing, iconStyle, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { useIntl } from '../lib/i18n-context';\n\n// For props: https://react-spectrum.adobe.com/react-aria/Button.html#props\n// For styling: https://react-spectrum.adobe.com/react-aria/Button.html#styling\n\nexport interface CloseButtonProps extends Omit<AriaButtonProps, 'onPress'> {\n onClose: () => void;\n}\n\nconst closeButtonStyles = style({\n ...focusRing(),\n padding: 8,\n backgroundColor: {\n default: 'transparent',\n isHovered: '--yogurt-100',\n isPressed: '--yogurt-200'\n },\n borderStyle: 'none',\n borderRadius: 'lg',\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n forcedColors: {\n backgroundColor: 'ButtonFace',\n color: 'ButtonText',\n borderColor: 'ButtonBorder',\n borderWidth: 1,\n borderStyle: 'solid'\n }\n});\n\nexport const CloseButton = ({ onClose, ...props }: CloseButtonProps) => {\n const intl = useIntl();\n\n return (\n <AriaButton\n {...props}\n onPress={onClose}\n className={renderProps => closeButtonStyles(renderProps)}\n aria-label={intl.formatMessage({ id: 'ferment.detail.close' })}\n >\n <CloseCircle styles={iconStyle({ size: 'XL' })} />\n </AriaButton>\n );\n};\n","import { createContext, useContext, ReactNode } from 'react';\nimport { IntlProvider, useIntl as useReactIntl } from 'react-intl';\n\ntype LocaleMessages = Record<string, Record<string, string>>;\n\ninterface I18nProviderProps {\n children: ReactNode;\n messages: LocaleMessages;\n}\n\ntype Locale = string;\n\ninterface I18nContextType {\n locale: Locale;\n setLocale: (locale: Locale) => void;\n}\n\nconst I18nContext = createContext<I18nContextType | undefined>(undefined);\n\n/**\n * Unified i18n provider that can be used by both frontend and admin UI.\n * \n * @param messages - Locale messages object (e.g., from src/i18n/index.ts or admin-ui/src/i18n/index.ts)\n * \n * @example\n * // Frontend usage\n * import { localeMessages } from '@/i18n';\n * <I18nProvider messages={localeMessages}>{children}</I18nProvider>\n * \n * @example\n * // Admin UI usage\n * import { localeMessages } from '@admin/i18n';\n * <I18nProvider messages={localeMessages}>{children}</I18nProvider>\n */\nexport function I18nProvider({ children, messages }: I18nProviderProps) {\n // For MVP, we'll start with just English\n // Future: Add locale state management and persistence\n const locale: Locale = 'en';\n\n const setLocale = (newLocale: Locale) => {\n // Future: Implement locale switching with localStorage\n console.log('Locale switching to:', newLocale);\n };\n\n // Defensive check: ensure messages are loaded\n const currentMessages = messages?.[locale] || {};\n\n if (!messages || Object.keys(currentMessages).length === 0) {\n console.warn('I18nProvider: No messages loaded for locale:', locale);\n }\n\n return (\n <I18nContext.Provider value={{ locale, setLocale }}>\n <IntlProvider\n messages={currentMessages}\n locale={locale}\n defaultLocale=\"en\"\n >\n {children}\n </IntlProvider>\n </I18nContext.Provider>\n );\n}\n\nexport function useI18n() {\n const context = useContext(I18nContext);\n if (context === undefined) {\n throw new Error('useI18n must be used within an I18nProvider');\n }\n return context;\n}\n\n/**\n * Hook to access react-intl's formatMessage and other intl methods.\n * Re-exported from react-intl for convenience.\n */\nexport function useIntl() {\n return useReactIntl();\n}\n","import { Button, ComboBox as AriaComboBox, ComboBoxRenderProps, FieldError, Group, Input, Label, ListBox, ListBoxItem, Popover, Text } from 'react-aria-components';\nimport type { Key } from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { useEffect, useState } from 'react';\nimport ChevronDown from '@react-spectrum/s2/icons/ChevronDown';\n\nconst comboBoxContainerStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n minWidth: 192,\n});\n\nconst labelStyles = style({\n font: 'body',\n color: '--plum-700',\n});\n\nconst inputWrapperStyles = style({\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n});\n\nconst inputStyles = style({\n ...focusRing(),\n width: 'calc(100% - 44px)', // Padding (12px+32px) and border (1px+1px)\n font: 'body',\n flexGrow: 1,\n flexShrink: 1,\n paddingStart: 12,\n paddingEnd: 32,\n paddingY: 8,\n backgroundColor: {\n default: '--yogurt-100',\n isFocusVisible: '--yogurt-200',\n isDisabled: 'gray-100',\n },\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: {\n default: '--yogurt-400',\n isFocusVisible: '--plum-600',\n isDisabled: 'gray-300',\n },\n color: {\n default: '--plum-700',\n isDisabled: 'gray-500',\n },\n outlineStyle: 'none',\n});\n\nconst buttonStyles = style({\n verticalAlign: 'middle',\n marginStart: -36, // 32px for button + padding and 4px this padding\n marginEnd: 8,\n padding: 4,\n borderRadius: 'sm',\n backgroundColor: {\n default: 'transparent',\n isHovered: 'gray-200',\n },\n borderStyle: 'none',\n color: {\n default: 'gray-600',\n isDisabled: 'gray-400',\n },\n cursor: {\n default: 'pointer',\n isDisabled: 'default',\n },\n});\n\nconst popoverStyles = style({\n backgroundColor: '--yogurt-50',\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--yogurt-400',\n boxShadow: 'elevated',\n marginTop: 4,\n maxHeight: 320,\n overflow: 'auto',\n isolation: 'isolate',\n});\n\nconst listBoxStyles = style({\n padding: 4,\n outline: 'none',\n});\n\nconst listBoxItemStyles = style({\n font: 'body',\n paddingX: 8,\n paddingY: 4,\n borderRadius: 'sm',\n cursor: {\n default: 'pointer',\n isDisabled: 'not-allowed',\n },\n backgroundColor: {\n default: 'transparent',\n isHovered: '--yogurt-200',\n isSelected: '--plum-200',\n isFocused: '--yogurt-200',\n isDisabled: '--yogurt-100',\n },\n color: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocused: '--plum-800',\n isPressed: '--plum-900',\n isSelected: '--plum-700',\n isDisabled: 'gray-400',\n },\n outline: 'none',\n});\n\nconst descriptionStyles = style({\n font: 'detail',\n color: 'gray-600',\n});\n\nconst errorStyles = style({\n font: 'detail',\n color: '--berry-700',\n});\n\nexport interface ComboBoxItem {\n id: Key;\n label: string;\n textValue?: string;\n}\n\nexport interface ComboBoxProps {\n label?: string;\n description?: string;\n errorMessage?: string;\n isRequired?: boolean;\n isDisabled?: boolean;\n selectedKey?: Key | null;\n onSelectionChange?: (key: Key | null) => void;\n items: ComboBoxItem[];\n placeholder?: string;\n 'aria-label'?: string;\n inputValue?: string;\n onInputChange?: (value: string) => void;\n}\n\n/**\n * Generic ComboBox component for searchable single-selection.\n * \n * Uses React Aria Components ComboBox for accessible selection with filtering.\n * Reusable for any data type - countries, users, categories, etc.\n * \n * @example\n * ```tsx\n * const items = [\n * { id: 1, label: 'Apple' },\n * { id: 2, label: 'Banana' },\n * { id: 3, label: 'Orange' },\n * ];\n * \n * <ComboBox\n * label=\"Fruit\"\n * items={items}\n * selectedKey={selectedId}\n * onSelectionChange={setSelectedId}\n * placeholder=\"Select a fruit\"\n * />\n * ```\n */\nexport function ComboBox({\n label,\n description,\n errorMessage,\n isRequired = false,\n isDisabled = false,\n selectedKey,\n onSelectionChange,\n items,\n placeholder,\n 'aria-label': ariaLabel,\n inputValue: controlledInputValue,\n onInputChange: controlledOnInputChange,\n}: ComboBoxProps) {\n const [internalInputValue, setInternalInputValue] = useState('');\n\n // Sync input value with selected item\n useEffect(() => {\n if (selectedKey) {\n const selected = items.find(item => item.id === selectedKey);\n if (selected) {\n setInternalInputValue(selected.label);\n }\n } else {\n setInternalInputValue('');\n }\n }, [selectedKey, items]);\n\n // Use controlled inputValue if provided, otherwise use internal state\n const effectiveInputValue = controlledInputValue !== undefined\n ? controlledInputValue\n : internalInputValue;\n\n const effectiveOnInputChange = controlledOnInputChange !== undefined\n ? controlledOnInputChange\n : setInternalInputValue;\n\n return (\n <AriaComboBox\n className={comboBoxContainerStyles}\n inputValue={effectiveInputValue}\n onInputChange={effectiveOnInputChange}\n selectedKey={selectedKey}\n onSelectionChange={onSelectionChange}\n isDisabled={isDisabled}\n isRequired={isRequired}\n aria-label={ariaLabel || label}\n >\n {label && <Label className={labelStyles}>{label}</Label>}\n <div className={inputWrapperStyles}>\n <Input className={inputStyles} placeholder={placeholder} />\n <Button className={buttonStyles}>\n <ChevronDown />\n </Button>\n </div>\n {description && !errorMessage && (\n <Text slot=\"description\" className={descriptionStyles}>\n {description}\n </Text>\n )}\n {errorMessage && <FieldError className={errorStyles}>{errorMessage}</FieldError>}\n <Popover className={popoverStyles}>\n <ListBox className={listBoxStyles} items={items}>\n {(item) => (\n <ListBoxItem\n key={item.id}\n id={item.id}\n textValue={item.textValue || item.label}\n className={listBoxItemStyles}\n >\n {item.label}\n </ListBoxItem>\n )}\n </ListBox>\n </Popover>\n </AriaComboBox>\n );\n}\n","import {\n Button as AriaButton,\n Disclosure,\n DisclosureGroup as AriaDisclosureGroup,\n DisclosurePanel,\n DisclosureStateContext,\n Heading\n} from 'react-aria-components';\nimport ChevronRight from '@react-spectrum/s2/icons/ChevronRight';\nimport type { DisclosureGroupProps } from 'react-aria-components';\nimport { style, iconStyle, focusRing } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { useContext } from 'react';\n\nimport './DisclosureGroup.css';\n\n// Disclosure container - very thin grey border, full width button appearance\nconst disclosureContainerStyles = style({\n borderStyle: 'none',\n borderWidth: 0,\n borderColor: 'transparent',\n borderRadius: 'lg',\n overflow: 'hidden',\n width: 'full',\n backgroundColor: '--yogurt-100'\n});\n\n// Disclosure trigger button - blends seamlessly with container\nconst disclosureTriggerStyles = style({\n ...focusRing(),\n font: 'title',\n color: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocusVisible: '--plum-800',\n isPressed: '--plum-900'\n },\n display: 'flex',\n alignItems: 'center',\n gap: 8,\n padding: 16,\n paddingX: 20,\n width: 'full',\n backgroundColor: {\n default: '--yogurt-100',\n isHovered: '--yogurt-200',\n isPressed: '--yogurt-300'\n },\n borderStyle: 'none',\n borderRadius: 'none',\n cursor: 'pointer'\n});\n\nconst disclosureHeaderStyles = style({\n margin: 0,\n});\n\n// Disclosure panel - white/light background, blends with button header\nconst disclosurePanelStyles = style({\n padding: {\n default: 0,\n isExpanded: 20,\n },\n backgroundColor: '--yogurt-50',\n borderTopWidth: 1,\n borderTopStyle: 'solid',\n borderColor: '--yogurt-300'\n});\n\nexport interface DisclosureItem {\n id: string;\n title: string;\n content: React.ReactNode;\n onPress?: () => void;\n}\n\ninterface CustomDisclosureGroupProps extends Omit<DisclosureGroupProps, 'children'> {\n items: DisclosureItem[];\n 'aria-label'?: string;\n}\n\n/**\n * Reusable DisclosureGroup component\n * Displays collapsible sections with consistent styling\n * \n * @example\n * <DisclosureGroup\n * items={[\n * {\n * id: 'section1',\n * title: 'Section 1',\n * content: <div>Content goes here</div>\n * }\n * ]}\n * />\n */\nexport function DisclosureGroup({ items, ...props }: CustomDisclosureGroupProps) {\n return (\n <AriaDisclosureGroup {...props} className={disclosureContainerStyles}>\n {items.map((item) => (\n <Disclosure key={item.id}>\n <DisclosureContents key={item.id} {...item} />\n </Disclosure>\n ))}\n </AriaDisclosureGroup>\n );\n}\n\nconst DisclosureContents = (item: DisclosureItem) => {\n let { isExpanded } = useContext(DisclosureStateContext)!;\n\n return (\n <>\n <Heading className={disclosureHeaderStyles}>\n <AriaButton\n slot=\"trigger\"\n className={(renderProps) =>\n `disclosure-chevron ${disclosureTriggerStyles(renderProps)}`\n }\n onPress={item.onPress}\n >\n <ChevronRight styles={iconStyle({ size: 'S' })} />\n {item.title}\n </AriaButton>\n </Heading>\n <DisclosurePanel className={disclosurePanelStyles({ isExpanded })}>\n {item.content}\n </DisclosurePanel>\n </>\n );\n}\n","import {\n ToggleButton,\n ToggleButtonGroup,\n SelectionIndicator\n} from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { useIntl } from '../lib/i18n-context';\n\nexport interface FilterOption {\n value: string;\n label: string;\n}\n\nexport interface FilterTabsProps {\n value: string;\n onChange: (value: string) => void;\n options: FilterOption[];\n ariaLabel?: string;\n}\n\nconst filterContainerStyles = style({\n display: 'flex',\n gap: 0,\n padding: 4,\n backgroundColor: '--yogurt-200',\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--yogurt-400'\n});\n\nconst filterButtonStyles = style({\n ...focusRing(),\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n paddingX: 16,\n paddingY: 8,\n font: 'body',\n color: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocusVisible: '--plum-800',\n isPressed: '--plum-900'\n },\n backgroundColor: 'transparent',\n borderStyle: 'none',\n borderRadius: 'default',\n cursor: 'pointer',\n zIndex: 1\n});\n\nconst selectionIndicatorStyles = style({\n position: 'absolute',\n inset: 0,\n borderRadius: 'default',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: 'gray-300',\n boxShadow: 'elevated',\n zIndex: -1,\n backgroundColor: {\n default: 'layer-1',\n isHovered: '--yogurt-300',\n isPressed: '--yogurt-400'\n }\n});\n\n/**\n * FilterTabs component for status filtering\n * Uses React Aria ToggleButtonGroup with SelectionIndicator\n * \n * @example\n * <FilterTabs\n * value={statusFilter}\n * onChange={setStatusFilter}\n * options={[\n * { value: 'all', label: 'All' },\n * { value: 'running', label: 'Running' }\n * ]}\n * ariaLabel=\"Filter by status\"\n * />\n */\nexport function FilterTabs({ value, onChange, options, ariaLabel }: FilterTabsProps) {\n const intl = useIntl();\n\n return (\n <ToggleButtonGroup\n selectionMode=\"single\"\n selectedKeys={new Set([value])}\n disallowEmptySelection\n onSelectionChange={(keys) => {\n const selected = Array.from(keys)[0] as string;\n onChange(selected);\n }}\n aria-label={ariaLabel || intl.formatMessage({ id: 'filterTabs.ariaLabel' })}\n className={filterContainerStyles}\n >\n {options.map((option) => (\n <ToggleButton\n key={option.value}\n id={option.value}\n className={filterButtonStyles}\n >\n {({ isSelected }) => (\n <>\n {option.label}\n {isSelected && <SelectionIndicator className={selectionIndicatorStyles} />}\n </>\n )}\n </ToggleButton>\n ))}\n </ToggleButtonGroup>\n );\n}\n\n","import {\n TextField as AriaTextField,\n Label,\n Text,\n} from 'react-aria-components';\nimport { style, } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport {\n textFieldDescriptionStyles as labeledValueDescriptionStyles,\n textFieldErrorStyles as labeledValueErrorStyles,\n textFieldLabelStyles as labeledValueLabelStyles,\n} from './TextField';\n\nexport interface LabeledValueProps {\n label: string;\n error?: string;\n description?: string;\n children: React.ReactNode;\n}\n\nconst labeledValueStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 8,\n marginBottom: 20,\n});\n\nconst labeledValueValueStyles = style({\n font: 'body',\n color: '--plum-700',\n});\n\n\nexport function LabeledValue({ label, children, error, description, ...props }: LabeledValueProps) {\n return (\n <AriaTextField className={labeledValueStyles} {...props}>\n <Label className={labeledValueLabelStyles}>{label}</Label>\n <span className={labeledValueValueStyles}>\n {children}\n </span>\n {description && !error && (\n <Text slot=\"description\" className={labeledValueDescriptionStyles}>\n {description}\n </Text>\n )}\n {error && (\n <Text slot=\"errorMessage\" className={labeledValueErrorStyles}>\n {error}\n </Text>\n )}\n </AriaTextField>\n );\n}\n","import { Link as AriaLink, LinkProps } from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { ReactNode } from 'react';\n\nconst linkStyles = style({\n ...focusRing(),\n font: 'body',\n color: {\n default: '--plum-600',\n isHovered: '--plum-700',\n isPressed: '--plum-800'\n },\n textDecorationLine: 'underline',\n cursor: 'pointer',\n backgroundColor: {\n default: 'transparent',\n isHovered: 'transparent'\n }\n});\n\ninterface CustomLinkProps extends Omit<LinkProps, 'className'> {\n children: ReactNode;\n isExternal?: boolean;\n className?: string | ((renderProps: any) => string);\n}\n\n/**\n * Link Component\n * \n * Wraps React Aria Components Link with S2 styling and proper a11y.\n * Automatically handles focus states and keyboard navigation.\n * External links automatically get target=\"_blank\" and rel=\"noopener noreferrer\".\n * \n * @example\n * <Link href=\"/ferments\">Browse Ferments</Link>\n * \n * @example\n * <Link href=\"https://example.com\" isExternal>External Link</Link>\n * \n * @example\n * <Link href=\"/\" className={customStyles}>Custom Styled Link</Link>\n */\nexport function Link({ children, href, isExternal, className, ...props }: CustomLinkProps) {\n // Automatically detect external links if not specified\n const isExternalLink = isExternal ?? (href?.toString().startsWith('http://') || href?.toString().startsWith('https://'));\n\n const externalProps = isExternalLink ? {\n target: '_blank',\n rel: 'noopener noreferrer'\n } : {};\n\n return (\n <AriaLink\n {...props}\n {...externalProps}\n href={href}\n className={className || linkStyles}\n >\n {children}\n </AriaLink>\n );\n}\n","import {\n MenuTrigger,\n Menu as AriaMenu,\n MenuItem as AriaMenuItem,\n Popover,\n Separator\n} from 'react-aria-components';\nimport { style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { ReactNode } from 'react';\n\nconst menuStyles = style({\n backgroundColor: '--yogurt-50',\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--yogurt-400',\n boxShadow: 'elevated',\n padding: 4,\n minWidth: 200,\n outline: 'none'\n});\n\nconst menuItemStyles = style({\n display: 'flex',\n alignItems: 'center',\n gap: 12,\n paddingX: 12,\n paddingY: 8,\n borderRadius: 'lg',\n font: 'body',\n color: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocused: '--plum-800',\n isPressed: '--plum-900'\n },\n backgroundColor: {\n default: 'transparent',\n isHovered: '--yogurt-200',\n isFocused: '--yogurt-200'\n },\n cursor: 'pointer',\n outline: 'none'\n});\n\nconst dividerStyles = style({\n height: 1,\n backgroundColor: '--yogurt-400',\n marginY: 4\n});\n\nexport interface MenuItem {\n id: string;\n label: string;\n icon?: ReactNode;\n onAction: () => void;\n}\n\nexport interface MenuProps {\n trigger: ReactNode;\n items: MenuItem[];\n placement?: 'bottom' | 'bottom start' | 'bottom end' | 'top' | 'top start' | 'top end';\n 'aria-label'?: string;\n}\n\n/**\n * Menu component styled to match Select component\n * Uses yogurt colors for consistency with Select\n */\nexport function Menu({ trigger, items, placement = 'bottom end', 'aria-label': ariaLabel }: MenuProps) {\n return (\n <MenuTrigger>\n {trigger}\n <Popover placement={placement}>\n <AriaMenu className={menuStyles} aria-label={ariaLabel}>\n {items.map((item, index) =>\n item.id === 'divider' ? (\n <Separator key={`divider-${index}`} className={dividerStyles} />\n ) : (\n <AriaMenuItem\n key={item.id}\n id={item.id}\n onAction={item.onAction}\n className={menuItemStyles}\n >\n {item.icon}\n {item.label}\n </AriaMenuItem>\n )\n )}\n </AriaMenu>\n </Popover>\n </MenuTrigger>\n );\n}\n","import { style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { useIntl } from '../lib/i18n-context';\n\nexport interface PasswordValidation {\n minLength: boolean;\n hasLetter: boolean;\n hasNumber: boolean;\n hasSpecial: boolean;\n}\n\nexport interface PasswordStrengthProps {\n validation: PasswordValidation;\n}\n\nconst containerStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 8\n});\n\nconst requirementStyles = style({\n display: 'flex',\n alignItems: 'center',\n gap: 8,\n font: 'body-sm'\n});\n\nconst indicatorStyles = style({\n width: 16,\n height: 16,\n borderRadius: 'full',\n flexShrink: 0,\n backgroundColor: {\n default: '--gray-300',\n isValid: '--cucumber-500'\n },\n color: {\n default: 'inherit',\n isValid: '--cucumber-700'\n }\n});\n\n/**\n * Visual password strength indicator showing validation requirements\n * Displays checkmarks (green) for met requirements, circles (gray) for unmet\n */\nexport function PasswordStrength({ validation }: PasswordStrengthProps) {\n const intl = useIntl();\n\n const requirements = [\n {\n key: 'minLength',\n met: validation.minLength,\n label: intl.formatMessage({ id: 'validation.password.minLength' })\n },\n {\n key: 'hasLetter',\n met: validation.hasLetter,\n label: intl.formatMessage({ id: 'validation.password.letter' })\n },\n {\n key: 'hasNumber',\n met: validation.hasNumber,\n label: intl.formatMessage({ id: 'validation.password.number' })\n },\n {\n key: 'hasSpecial',\n met: validation.hasSpecial,\n label: intl.formatMessage({ id: 'validation.password.special' })\n }\n ];\n\n console.log('PasswordStrength requirements:', requirements, intl, intl.formatMessage({ id: 'validation.password.special' }));\n\n return (\n <div className={containerStyles}>\n {requirements.map(req => (\n <div key={req.key} className={requirementStyles}>\n <div\n className={indicatorStyles({ isValid: req.met })}\n />\n <span>{req.label}</span>\n </div>\n ))}\n </div>\n );\n}\n","import { Radio as AriaRadio, RadioGroup as AriaRadioGroup, type RadioGroupProps as AriaRadioGroupProps, type RadioProps as AriaRadioProps } from 'react-aria-components';\nimport { style, focusRing } from '@react-spectrum/s2/style' with { type: 'macro' };\n\nexport interface RadioGroupProps extends Omit<AriaRadioGroupProps, 'children'> {\n label: string;\n options: Array<{ id: string; label: string; value: string }>;\n error?: string;\n}\n\nexport interface RadioProps extends AriaRadioProps {\n children: React.ReactNode;\n}\n\nconst radioGroupStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 8,\n});\n\nconst labelStyles = style({\n font: 'body',\n fontWeight: 'medium',\n color: '--plum-700',\n marginBottom: 8,\n});\n\nconst radioContainerStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 12,\n});\n\nconst radioStyles = style({\n ...focusRing(),\n display: 'flex',\n alignItems: 'center',\n gap: 8,\n font: 'body',\n color: {\n default: '--plum-700',\n isSelected: '--plum-800',\n isHovered: '--plum-600',\n isDisabled: 'gray-400',\n },\n cursor: 'pointer',\n padding: 8,\n borderRadius: 'lg',\n backgroundColor: {\n default: 'transparent',\n isHovered: '--plum-50',\n },\n});\n\nconst radioButtonStyles = style({\n width: 20,\n height: 20,\n borderRadius: 'full',\n borderWidth: 2,\n borderStyle: 'solid',\n borderColor: {\n default: 'gray-400',\n isSelected: '--plum-500',\n isHovered: '--plum-300',\n isDisabled: 'gray-200',\n },\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n flexShrink: 0,\n backgroundColor: {\n default: 'layer-1',\n isDisabled: 'gray-100',\n },\n});\n\nconst radioInnerDotStyles = style({\n width: 10,\n height: 10,\n borderRadius: 'full',\n backgroundColor: '--plum-500',\n opacity: {\n default: 0,\n isSelected: 1,\n },\n});\n\nconst errorStyles = style({\n font: 'body-sm',\n color: '--berry-600',\n marginTop: 4,\n});\n\nexport function Radio({ children, ...props }: RadioProps) {\n return (\n <AriaRadio {...props} className={renderProps => radioStyles(renderProps)}>\n {renderProps => (\n <>\n <div className={radioButtonStyles(renderProps)}>\n <div className={radioInnerDotStyles(renderProps)} />\n </div>\n <span>{children}</span>\n </>\n )}\n </AriaRadio>\n );\n}\n\nexport function RadioGroup({ label, options, error, ...props }: RadioGroupProps) {\n return (\n <AriaRadioGroup {...props} className={radioGroupStyles}>\n <span className={labelStyles}>{label}</span>\n <div className={radioContainerStyles}>\n {options.map(option => (\n <Radio key={option.id} value={option.value}>\n {option.label}\n </Radio>\n ))}\n </div>\n {error && <span className={errorStyles}>{error}</span>}\n </AriaRadioGroup>\n );\n}\n","import { SearchField as AriaSearchField, Input, Label, Button } from 'react-aria-components';\nimport Close from '@react-spectrum/s2/icons/Close';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { raw } from '../utils/styleMacro' with { type: 'macro' };\nimport Search from '@react-spectrum/s2/icons/Search';\n\n\nconst searchFieldContainerStyles = style({\n flex: {\n default: 'none',\n md: 1,\n },\n});\n\nconst searchFieldStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n});\n\nconst searchInputContainerStyles = style({\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n});\n\nconst searchInputStyles = style({\n ...focusRing(),\n width: 'full',\n padding: 8,\n paddingStart: 40,\n font: 'body',\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--yogurt-400',\n backgroundColor: {\n default: '--yogurt-100',\n isHovered: '--yogurt-200',\n isFocusVisible: '--yogurt-200',\n },\n});\n\nconst labelStyles = style({\n font: 'body',\n color: '--plum-700',\n marginBottom: 4,\n});\n\nconst searchIconStyles = {\n position: 'absolute' as const,\n left: 12,\n top: '50%',\n transform: 'translateY(-50%)',\n pointerEvents: 'none' as const,\n color: '--yogurt-600',\n};\n\nconst clearButtonStyles = style({\n ...focusRing(),\n position: 'absolute',\n right: 8,\n top: '50%',\n transform: 'translateY(-50%)',\n padding: 4,\n backgroundColor: 'transparent',\n borderStyle: 'none',\n borderRadius: 'default',\n cursor: 'pointer',\n color: {\n default: '--yogurt-600',\n isHovered: '--yogurt-700',\n isPressed: '--yogurt-800',\n },\n});\n\nexport interface SearchFieldProps {\n value: string;\n onChange: (value: string) => void;\n label: string;\n placeholder: string;\n ariaLabel: string;\n}\n\n/**\n * Reusable SearchField component using React Aria Components\n * Styled with S2 design tokens and includes search icon\n * \n * @example\n * <SearchField\n * value={searchQuery}\n * onChange={setSearchTerm}\n * label=\"Search\"\n * placeholder=\"Search ferments...\"\n * ariaLabel=\"Search ferments by name or description\"\n * />\n */\nexport function SearchField({\n value,\n onChange,\n label,\n placeholder,\n ariaLabel,\n}: SearchFieldProps) {\n return (\n <div className={searchFieldContainerStyles}>\n <AriaSearchField\n value={value}\n onChange={onChange}\n className={searchFieldStyles}\n aria-label={ariaLabel}\n >\n {({ isEmpty }) => (\n <>\n <Label className={labelStyles}>{label}</Label>\n <div className={searchInputContainerStyles}>\n <div style={searchIconStyles}>\n <Search />\n </div>\n <Input className={(renderProps) => searchInputStyles(renderProps) + ' ' + raw('&::-webkit-search-cancel-button { display: none }', 'custom_layer')} placeholder={placeholder} />\n {!isEmpty && <Button className={clearButtonStyles} aria-label=\"Clear search\">\n <Close />\n </Button>}\n </div>\n </>\n )}\n </AriaSearchField>\n </div>\n );\n}\n","import { useRouter } from 'next/navigation';\nimport {\n ToggleButton,\n ToggleButtonGroup,\n SelectionIndicator\n} from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { useIntl } from '../lib/i18n-context';\nimport GlobeGrid from '@react-spectrum/s2/icons/GlobeGrid';\nimport ListIcon from '@react-spectrum/s2/icons/ViewList';\n\nconst segmentedControlStyles = style({\n display: 'flex',\n gap: 0,\n padding: 4,\n backgroundColor: '--yogurt-200',\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--yogurt-400',\n});\n\nconst toggleButtonStyles = style({\n ...focusRing(),\n position: 'relative',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n gap: 8,\n paddingX: 16,\n paddingY: 8,\n font: 'body',\n color: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocusVisible: '--plum-800',\n isPressed: '--plum-900'\n },\n backgroundColor: 'transparent',\n borderStyle: 'none',\n borderRadius: 'default',\n cursor: 'pointer',\n zIndex: 1,\n '--iconPrimary': {\n type: 'color',\n value: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocusVisible: '--plum-800',\n isPressed: '--plum-900'\n },\n }\n});\n\nconst selectionIndicatorStyles = style({\n position: 'absolute',\n inset: 0,\n borderRadius: 'default',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: 'gray-300',\n boxShadow: 'elevated',\n zIndex: -1,\n color: {\n isDisabled: 'gray-400',\n forcedColors: 'ButtonText'\n },\n backgroundColor: {\n default: '--plum-300',\n isHovered: '--plum-400',\n isFocusVisibile: '--plum-400',\n isPressed: '--plum-400',\n isDisabled: 'gray-100',\n forcedColors: 'ButtonFace'\n },\n});\n\ninterface SegmentedControlProps {\n value: 'map' | 'list';\n}\n\n/**\n * SegmentedControl for Map/List view toggle\n * Uses RAC ToggleButtonGroup for accessible segmented control\n */\nexport function SegmentedControl({ value }: SegmentedControlProps) {\n const intl = useIntl();\n const router = useRouter();\n\n const handleSelectionChange = (newValue: 'map' | 'list') => {\n if (newValue === 'map') {\n router.push('/');\n } else {\n router.push('/ferments');\n }\n };\n\n return (\n <ToggleButtonGroup\n selectionMode=\"single\"\n selectedKeys={new Set([value])}\n disallowEmptySelection\n onSelectionChange={(keys) => {\n const selected = Array.from(keys)[0] as 'map' | 'list';\n handleSelectionChange(selected);\n }}\n aria-label={intl.formatMessage({ id: 'nav.viewToggle.ariaLabel' })}\n className={segmentedControlStyles}\n >\n <ToggleButton\n id=\"map\"\n className={(renderProps) => toggleButtonStyles(renderProps)}\n aria-label={intl.formatMessage({ id: 'nav.map' })}\n >\n {(renderProps) => (\n <>\n <SelectionIndicator className={selectionIndicatorStyles(renderProps)} />\n <GlobeGrid aria-hidden=\"true\" />\n <span>{intl.formatMessage({ id: 'nav.map' })}</span>\n </>\n )}\n </ToggleButton>\n\n <ToggleButton\n id=\"list\"\n className={(renderProps) => toggleButtonStyles(renderProps)}\n aria-label={intl.formatMessage({ id: 'nav.list' })}\n >\n {(renderProps) => (\n <>\n <SelectionIndicator className={selectionIndicatorStyles(renderProps)} />\n <ListIcon aria-hidden=\"true\" />\n <span>{intl.formatMessage({ id: 'nav.list' })}</span>\n </>\n )}\n </ToggleButton>\n </ToggleButtonGroup>\n );\n}\n","import {\n Select as AriaSelect,\n SelectProps,\n Label,\n Button,\n SelectValue,\n Popover,\n ListBox,\n ListBoxItem\n} from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport ChevronDown from '@react-spectrum/s2/icons/ChevronDown';\n\nconst selectContainerStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 4,\n minWidth: 200\n});\n\nconst labelStyles = style({\n font: 'body',\n color: '--plum-700',\n});\n\nconst buttonStyles = style({\n ...focusRing(),\n paddingX: 12,\n paddingY: 8,\n backgroundColor: {\n default: '--yogurt-100',\n isHovered: '--yogurt-200',\n isFocusVisible: '--yogurt-200',\n isPressed: '--yogurt-300'\n },\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--yogurt-400',\n font: 'body',\n color: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocused: '--plum-800',\n isPressed: '--plum-900',\n },\n cursor: 'pointer',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'space-between',\n gap: 8,\n minWidth: 200\n});\n\nconst popoverStyles = style({\n backgroundColor: '--yogurt-50',\n borderRadius: 'lg',\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--yogurt-400',\n boxShadow: 'elevated',\n marginTop: 4,\n maxHeight: 300,\n overflow: 'auto',\n isolation: 'isolate',\n});\n\nconst listBoxStyles = style({\n padding: 4,\n outline: 'none'\n});\n\nconst listBoxItemStyles = style({\n font: 'body',\n paddingX: 8,\n paddingY: 4,\n borderRadius: 'sm',\n cursor: {\n default: 'pointer',\n isDisabled: 'not-allowed'\n },\n backgroundColor: {\n default: 'transparent',\n isHovered: '--yogurt-200',\n isSelected: '--plum-200',\n isFocused: '--yogurt-200',\n isDisabled: '--yogurt-100'\n },\n color: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocused: '--plum-800',\n isPressed: '--plum-900',\n isSelected: '--plum-700',\n isDisabled: 'gray-400'\n },\n outline: 'none'\n});\n\nexport interface SelectOption {\n id: string;\n label: string;\n value: string | null;\n isDisabled?: boolean;\n}\n\ninterface CustomSelectProps extends Omit<SelectProps<SelectOption>, 'children'> {\n label: string;\n options: SelectOption[];\n placeholder?: string;\n}\n\n/**\n * Reusable Select component following RAC pattern\n * Label is inside the Select wrapper for proper a11y\n */\nexport function Select({ label, options, placeholder, ...props }: CustomSelectProps) {\n return (\n <AriaSelect {...props} className={selectContainerStyles}>\n <Label className={labelStyles}>{label}</Label>\n <Button className={buttonStyles}>\n <SelectValue />\n <ChevronDown aria-hidden=\"true\" />\n </Button>\n <Popover className={popoverStyles}>\n <ListBox className={listBoxStyles} items={options}>\n {(item) => (\n <ListBoxItem\n key={item.id}\n id={item.id}\n textValue={item.label}\n isDisabled={item.isDisabled}\n className={listBoxItemStyles}\n >\n {item.label}\n </ListBoxItem>\n )}\n </ListBox>\n </Popover>\n </AriaSelect>\n );\n}\n","import { ReactNode } from 'react';\nimport { style } from '@react-spectrum/s2/style' with { type: 'macro' };\n\nexport interface StatCardProps {\n title: string;\n value: ReactNode;\n description?: string;\n}\n\nconst cardStyles = style({\n backgroundColor: 'layer-1',\n borderRadius: 'xl',\n padding: 24,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: '--plum-200',\n display: 'flex',\n flexDirection: 'column',\n gap: 12,\n alignItems: 'center',\n textAlign: 'center'\n});\n\nconst cardTitleStyles = style({\n font: 'title-lg',\n color: '--plum-700',\n margin: 0\n});\n\nconst cardValueStyles = style({\n font: 'heading-2xl',\n color: '--plum-700',\n});\n\nconst cardDescStyles = style({\n font: 'body',\n color: '--plum-700',\n margin: 0\n});\n\n/**\n * StatCard component for displaying dashboard statistics\n * \n * @example\n * <StatCard \n * title=\"Total Sources\"\n * value={42}\n * description=\"Active scraping sources\"\n * />\n * \n * @example\n * // With icon as value\n * <StatCard \n * title=\"System Status\"\n * value={<CheckmarkCircle />}\n * description=\"All systems operational\"\n * />\n */\nexport function StatCard({ title, value, description }: StatCardProps) {\n return (\n <div className={cardStyles}>\n <h3 className={cardTitleStyles}>{title}</h3>\n <div className={cardValueStyles}>{value}</div>\n {description && <p className={cardDescStyles}>{description}</p>}\n </div>\n );\n}\n","import { Switch as AriaSwitch, SwitchProps as AriaSwitchProps } from 'react-aria-components';\nimport { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\n\n// For props: https://react-spectrum.adobe.com/react-aria/Switch.html#props\n// For styling: https://react-spectrum.adobe.com/react-aria/Switch.html#styling\n\nconst switchContainerStyles = style({\n ...focusRing(),\n display: 'flex',\n alignItems: 'center',\n gap: 8,\n paddingEnd: 2,\n cursor: 'pointer',\n font: 'ui-lg',\n color: {\n default: '--plum-700',\n isHovered: '--plum-800',\n isFocusVisible: '--plum-800',\n isPressed: '--plum-900'\n },\n borderRadius: 'full'\n});\n\nconst switchTrackStyles = style({\n width: 44,\n height: 24,\n borderRadius: 'full',\n padding: 2,\n display: 'flex',\n alignItems: 'center',\n backgroundColor: {\n default: '--yogurt-400',\n isSelected: '--plum-500',\n isDisabled: 'disabled'\n },\n borderStyle: {\n forcedColors: 'solid'\n },\n borderColor: {\n forcedColors: 'ButtonBorder'\n },\n borderWidth: {\n forcedColors: 1\n }\n});\n\nconst switchThumbStyles = style({\n width: 20,\n height: 20,\n borderRadius: 'full',\n backgroundColor: {\n default: 'white',\n forcedColors: 'ButtonText'\n },\n transform: {\n default: 'translateX(0)',\n isSelected: 'translateX(22px)'\n }\n});\n\nexport interface SwitchProps extends Omit<AriaSwitchProps, 'children'> {\n children?: React.ReactNode;\n}\n\nexport const Switch = ({ children, ...props }: SwitchProps) => {\n return (\n <AriaSwitch\n {...props}\n className={renderProps => switchContainerStyles(renderProps)}\n >\n {renderProps => (\n <>\n <div className={switchTrackStyles(renderProps)}>\n <div className={switchThumbStyles(renderProps)} />\n </div>\n {children}\n </>\n )}\n </AriaSwitch>\n );\n};","import { focusRing, style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { Tabs as AriaTabs, TabList as AriaTabList, Tab as AriaTab, TabPanel as AriaTabPanel } from 'react-aria-components';\nimport type { TabListProps, TabPanelProps, TabProps, TabsProps } from 'react-aria-components';\n\nconst tabsStyles = style({\n display: 'flex',\n flexDirection: 'column',\n gap: 0\n});\n\nconst tabListStyles = style({\n display: 'flex',\n gap: 4,\n borderBottomWidth: 2,\n borderBottomStyle: 'solid',\n borderBottomColor: '--plum-200',\n marginBottom: 24,\n overflowX: 'auto',\n overflowY: 'hidden',\n WebkitOverflowScrolling: 'touch'\n});\n\nconst tabStyles = style({\n ...focusRing(),\n paddingX: 20,\n paddingY: 12,\n font: 'body',\n fontWeight: {\n isSelected: 'bold'\n },\n color: {\n default: '--plum-700',\n isSelected: '--plum-800',\n isHovered: '--plum-800',\n isDisabled: '--plum-300'\n },\n backgroundColor: {\n default: 'transparent',\n isHovered: '--plum-50',\n isSelected: '--plum-100'\n },\n borderWidth: 0,\n borderBottomWidth: 2,\n borderStyle: 'solid',\n borderColor: {\n default: 'transparent',\n isSelected: '--plum-700',\n isHovered: '--plum-300'\n },\n cursor: {\n default: 'pointer',\n isDisabled: 'not-allowed'\n },\n transitionProperty: 'all',\n transitionDuration: '200ms'\n});\n\nconst tabPanelStyles = style({\n paddingY: 0,\n outlineStyle: 'none'\n});\n\nexport function Tabs({ children, ...props }: TabsProps) {\n return (\n <AriaTabs className={tabsStyles} {...props}>\n {children}\n </AriaTabs>\n );\n}\n\nexport function TabList<T extends object>({ children, ...props }: TabListProps<T>) {\n return (\n <AriaTabList className={tabListStyles} {...props}>\n {children}\n </AriaTabList>\n );\n}\n\nexport function Tab({ children, ...props }: TabProps) {\n return (\n <AriaTab className={tabStyles} {...props}>\n {children}\n </AriaTab>\n );\n}\n\nexport function TabPanel({ children, ...props }: TabPanelProps) {\n return (\n <AriaTabPanel className={tabPanelStyles} {...props}>\n {children}\n </AriaTabPanel>\n );\n}\n","import {\n TextArea as AriaTextArea,\n TextField as AriaTextField,\n Label,\n} from 'react-aria-components';\nimport { style } from '@react-spectrum/s2/style' with { type: 'macro' };\nimport { textFieldErrorStyles, textFieldLabelStyles, type TextFieldProps, textFieldStyles } from './TextField';\nimport { textFieldInputStyles } from '../utils/styleUtils' with { type: 'macro' };\nimport { useRef, useEffect } from 'react';\nimport { safeWindow } from '../utils/browser';\n\nexport interface TextAreaProps extends Omit<TextFieldProps, 'type'> { }\n\nconst textareaStyles = style({\n ...textFieldInputStyles(),\n resize: 'none',\n minHeight: 75, // ~3 lines\n maxHeight: '75vh',\n overflowY: 'auto',\n});\n\nexport function TextArea({ label, error, placeholder, value, ...props }: TextAreaProps) {\n const textareaRef = useRef<HTMLTextAreaElement>(null);\n\n // Auto-grow on value change\n useEffect(() => {\n const textarea = textareaRef.current;\n if (!textarea) return;\n\n // Reset height to recalculate\n textarea.style.height = '75px';\n\n // Set to scrollHeight (content height)\n const newHeight = Math.min(textarea.scrollHeight, safeWindow.innerHeight * 0.75 || 64);\n textarea.style.height = `${newHeight}px`;\n }, [value]);\n\n return (\n <AriaTextField className={textFieldStyles} {...props} value={value}>\n <Label className={textFieldLabelStyles}>{label}</Label>\n <AriaTextArea\n ref={textareaRef}\n className={textareaStyles}\n placeholder={placeholder}\n />\n {error && <div className={textFieldErrorStyles}>{error}</div>}\n </AriaTextField>\n );\n}\n","/**\n * Safe browser API wrappers that work in SSR\n */\n\nexport const isBrowser = typeof window !== 'undefined';\nexport const isDocument = typeof document !== 'undefined';\n\nexport const safeWindow = {\n get innerHeight() {\n return isBrowser ? window.innerHeight : 0;\n },\n\n get location() {\n return isBrowser ? window.location : null;\n },\n\n matchMedia: (query: string) => {\n if (!isBrowser) {\n return { matches: false, media: query, addEventListener: () => { }, removeEventListener: () => { } };\n }\n return window.matchMedia(query);\n },\n\n reload: () => {\n if (isBrowser) window.location.reload();\n }\n};\n\nexport const safeDocument = {\n get documentElement() {\n return isDocument ? document.documentElement : null;\n },\n\n get referrer() {\n return isDocument ? document.referrer : '';\n },\n\n createElement: (tag: string) => {\n return isDocument ? document.createElement(tag) : HTMLUnknownElement.prototype;\n }\n};\n\nexport const safeLocalStorage = {\n getItem: (key: string): string | null => {\n if (!isBrowser) return null;\n try {\n return localStorage.getItem(key);\n } catch {\n return null;\n }\n },\n\n setItem: (key: string, value: string): void => {\n if (!isBrowser) return;\n try {\n localStorage.setItem(key, value);\n } catch {\n // Silent fail\n }\n }\n};\n","// Contexts & Providers\nexport { ThemeProvider, useTheme } from './theme-context';\nexport { I18nProvider } from './i18n-provider';\nexport { useIntl } from './i18n-context';\nexport { FilterProvider, useFilters } from './filter-context';\n","import { createContext, useContext, useState, useEffect, ReactNode } from 'react';\nimport { isBrowser, safeWindow, safeDocument, safeLocalStorage } from '../utils/browser';\n\ntype ColorScheme = 'light' | 'dark';\n\ninterface ThemeContextType {\n colorScheme: ColorScheme;\n toggleColorScheme: () => void;\n}\n\nconst ThemeContext = createContext<ThemeContextType | undefined>(undefined);\n\nconst THEME_STORAGE_KEY = 'globalferments-theme';\n\n// Get initial theme synchronously to prevent flicker\nfunction getInitialTheme(): ColorScheme {\n if (!isBrowser) return 'light';\n\n // First check if blocking script already set the attribute\n const htmlElement = safeDocument.documentElement;\n if (htmlElement) {\n const htmlAttribute = htmlElement.getAttribute('data-color-scheme') as ColorScheme | null;\n if (htmlAttribute && (htmlAttribute === 'light' || htmlAttribute === 'dark')) {\n return htmlAttribute;\n }\n }\n\n // Fallback to localStorage\n const stored = safeLocalStorage.getItem(THEME_STORAGE_KEY) as ColorScheme | null;\n if (stored && (stored === 'light' || stored === 'dark')) {\n return stored;\n }\n\n // Final fallback to system preference\n return safeWindow.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';\n}\n\nexport function ThemeProvider({ children }: { children: ReactNode }) {\n // Initialize with a function to avoid SSR issues\n const [colorScheme, setColorScheme] = useState<ColorScheme>(() => {\n if (!isBrowser) return 'light';\n return getInitialTheme();\n });\n const [mounted, setMounted] = useState(false);\n\n // Set mounted flag on client\n useEffect(() => {\n setMounted(true);\n // Ensure colorScheme matches what's actually set\n const actual = getInitialTheme();\n if (actual !== colorScheme) {\n setColorScheme(actual);\n }\n }, []);\n\n // Update html attribute and localStorage when scheme changes\n useEffect(() => {\n if (!mounted || !isBrowser) return;\n\n const htmlElement = safeDocument.documentElement;\n if (htmlElement) {\n htmlElement.setAttribute('data-color-scheme', colorScheme);\n }\n safeLocalStorage.setItem(THEME_STORAGE_KEY, colorScheme);\n }, [colorScheme, mounted]);\n\n const toggleColorScheme = () => {\n setColorScheme(prev => prev === 'light' ? 'dark' : 'light');\n };\n\n return (\n <ThemeContext.Provider value={{ colorScheme, toggleColorScheme }}>\n {children}\n </ThemeContext.Provider>\n );\n}\n\nexport function useTheme() {\n const context = useContext(ThemeContext);\n if (context === undefined) {\n throw new Error('useTheme must be used within a ThemeProvider');\n }\n return context;\n}\n","import { createContext, useContext, useState, ReactNode } from 'react';\nimport type { FilterState } from '../types/types';\n\n\n/**\n * Filter context type with state and update methods\n */\ninterface FilterContextType {\n filters: FilterState;\n updateFilter: <K extends keyof FilterState>(key: K, value: FilterState[K]) => void;\n clearFilters: () => void;\n}\n\nconst initialFilterState: FilterState = {\n category: null,\n country: null,\n searchQuery: '',\n};\n\nconst FilterContext = createContext<FilterContextType | undefined>(undefined);\n\n/**\n * Filter Provider Component\n * Manages filter state for the application\n * \n * @example\n * <FilterProvider>\n * <App />\n * </FilterProvider>\n */\nexport function FilterProvider({ children }: { children: ReactNode }) {\n const [filters, setFilters] = useState<FilterState>(initialFilterState);\n\n /**\n * Update a single filter\n */\n const updateFilter = <K extends keyof FilterState>(\n key: K,\n value: FilterState[K]\n ) => {\n setFilters((prev) => ({\n ...prev,\n [key]: value,\n }));\n };\n\n /**\n * Clear all filters back to initial state\n */\n const clearFilters = () => {\n setFilters(initialFilterState);\n };\n\n return (\n <FilterContext.Provider value={{ filters, updateFilter, clearFilters }}>\n {children}\n </FilterContext.Provider>\n );\n}\n\n/**\n * Hook to access filter context\n * Must be used within FilterProvider\n * \n * @example\n * const { filters, updateFilter, clearFilters } = useFilters();\n * updateFilter('category', 'dairy');\n */\nexport function useFilters(): FilterContextType {\n const context = useContext(FilterContext);\n\n if (context === undefined) {\n throw new Error('useFilters must be used within a FilterProvider');\n }\n\n return context;\n}\n","// Hooks\nexport * from './useFilterState';\n","/**\n * Filter State Hook\n * Custom hook for managing ferment filter state with type-safe utilities\n */\nimport type { FilterState } from '../types/types';\n\n/**\n * Default filter state\n */\nexport const DEFAULT_FILTERS: FilterState = {\n searchQuery: '',\n category: null,\n country: null,\n};\n\n/**\n * Check if any filters are active\n */\nexport function hasActiveFilters(filters: FilterState): boolean {\n return (\n filters.searchQuery.trim() !== '' ||\n filters.category !== null ||\n filters.country !== null\n );\n}\n\n/**\n * Clear all filters, returning default state\n */\nexport function clearFilters(): FilterState {\n return { ...DEFAULT_FILTERS };\n}\n\n/**\n * Update a single filter field\n */\nexport function updateFilter(\n filters: FilterState,\n field: keyof FilterState,\n value: string | null\n): FilterState {\n return {\n ...filters,\n [field]: value,\n };\n}\n\n/**\n * Convert filter state to API query parameters\n * Only includes non-empty filters\n */\nexport function filtersToQueryParams(filters: FilterState): Record<string, string> {\n const params: Record<string, string> = {};\n\n if (filters.category) {\n params.category = filters.category;\n }\n\n if (filters.country) {\n params.country = filters.country;\n }\n\n return params;\n}\n","// Utilities\nexport { textFieldInputStyles } from './styleUtils';\nexport { getCategoryColors } from './category-colors';\nexport { api } from './api';\nexport type { FermentsResponse, FermentDetailResponse, SearchResponse, FilterOptions } from './api';\nexport { isBrowser, isDocument, safeWindow, safeDocument, safeLocalStorage } from './browser';\n","\nexport const textFieldInputStyles = () => ({\n padding: 12,\n paddingX: 16,\n borderWidth: 1,\n borderStyle: 'solid',\n borderColor: {\n default: '--plum-300',\n isHovered: '--plum-400',\n isFocusVisible: '--plum-500',\n isInvalid: '--berry-500',\n },\n borderRadius: 'lg',\n font: 'body',\n backgroundColor: 'layer-1',\n color: 'neutral',\n outline: 'none',\n} as const);\n","/**\n * Category Color Utilities\n * Provides consistent color mapping for ferment categories across Map and List views\n */\nimport type { CategoryColors } from '../types/types';\n\n/**\n * Get colors for a ferment category\n * Returns marker color (for map), badge background, and badge text color\n * \n * @example\n * const colors = getCategoryColors('dairy');\n * // { marker: 'var(--plum-500)', badge: 'plum' }\n */\nexport function getCategoryColors(category: string): CategoryColors {\n const colorMap: Record<string, CategoryColors> = {\n dairy: {\n marker: 'var(--yogurt-500)',\n badge: 'plum',\n },\n vegetable: {\n marker: 'var(--cucumber-500)',\n badge: 'cucumber',\n },\n beverage: {\n marker: 'var(--berry-500)',\n badge: 'berry',\n },\n grain: {\n marker: 'var(--ginger-500)',\n badge: 'ginger',\n },\n legume: {\n marker: 'var(--ginger-600)',\n badge: 'cucumber',\n },\n meat: {\n marker: 'var(--berry-500)',\n badge: 'peach',\n },\n fish: {\n marker: 'var(--berry-500)',\n badge: 'berry',\n },\n condiment: {\n marker: 'var(--plum-650)',\n badge: 'ginger',\n },\n other: {\n marker: 'var(--yogurt-500)',\n badge: 'plum',\n },\n };\n\n // Default to yogurt colors for unknown categories\n return colorMap[category.toLowerCase()] || {\n marker: 'var(--yogurt-500)',\n badge: 'yogurt'\n };\n}\n","/**\n * API Client for GlobalFerments\n * \n * Centralized functions for all backend API calls\n * with error handling and type safety\n */\n\nimport type { Category, Country, Ferment, RelatedFerment } from '../types';\n\nexport interface FermentsResponse {\n ferments: Ferment[];\n count: number;\n filters?: {\n category?: string;\n country?: string;\n };\n}\n\nexport interface FermentDetailResponse extends Ferment {\n relatedFerments: Array<RelatedFerment>;\n}\n\nexport interface SearchResponse {\n results: Ferment[];\n query: string;\n count: number;\n}\n\nexport interface FilterOptions {\n category?: string;\n country?: string;\n limit?: number;\n offset?: number;\n}\n\n/**\n * API client object with all endpoint methods\n */\nexport const api = {\n /**\n * Get list of ferments with optional filters\n */\n async getFerments(filters?: FilterOptions): Promise<FermentsResponse> {\n const params = new URLSearchParams();\n\n if (filters?.category) params.append('category', filters.category);\n if (filters?.country) params.append('country', filters.country);\n if (filters?.limit) params.append('limit', filters.limit.toString());\n if (filters?.offset) params.append('offset', filters.offset.toString());\n\n const url = `/api/ferments${params.toString() ? `?${params}` : ''}`;\n const response = await fetch(url);\n\n if (!response.ok) {\n throw new Error(`Failed to fetch ferments: ${response.statusText}`);\n }\n\n return response.json();\n },\n\n /**\n * Get optimized data for map markers\n */\n async getFermentsForMap(): Promise<{ ferments: Array<Pick<Ferment, 'id' | 'name' | 'latitude' | 'longitude' | 'category' | 'country'>> }> {\n const response = await fetch('/api/ferments/map');\n\n if (!response.ok) {\n throw new Error(`Failed to fetch map data: ${response.statusText}`);\n }\n\n return response.json();\n },\n\n /**\n * Search ferments by name or description\n */\n async searchFerments(query: string): Promise<SearchResponse> {\n if (!query || query.length < 2) {\n return { results: [], query, count: 0 };\n }\n\n const response = await fetch(`/api/search?q=${encodeURIComponent(query)}`);\n\n if (!response.ok) {\n throw new Error(`Search failed: ${response.statusText}`);\n }\n\n return response.json();\n },\n\n /**\n * Get list of countries with hasFerments flag\n * Optionally filtered by category\n */\n async getCountries(category?: string): Promise<{ countries: Country[] }> {\n const url = category\n ? `/api/countries?category=${encodeURIComponent(category)}`\n : '/api/countries';\n\n const response = await fetch(url);\n\n if (!response.ok) {\n throw new Error(`Failed to fetch countries: ${response.statusText}`);\n }\n\n return response.json();\n },\n\n /**\n * Get list of categories\n * Optionally filtered by country\n */\n async getCategories(country?: string): Promise<{ categories: Category[] }> {\n const url = country\n ? `/api/categories?country=${encodeURIComponent(country)}`\n : '/api/categories';\n\n const response = await fetch(url);\n\n if (!response.ok) {\n throw new Error(`Failed to fetch categories: ${response.statusText}`);\n }\n\n return response.json();\n },\n};\n","\nexport * from './types';\n","import type { BadgeVariant } from '../components/Badge';\n\n/**\n * Type definitions for GlobalFerments\n *\n * Shared types used across the application\n */\n\nexport interface FilterState {\n category: string | null;\n country: string | null;\n searchQuery: string;\n}\n\nexport interface CategoryColors {\n marker: string; // CSS variable for map marker color\n badge: BadgeVariant; // plain english name that maps to badge color scheme\n}\n\n/**\n * Type definitions for GlobalFerments\n *\n * Shared types used across the application\n */\n\nexport interface Ferment {\n id: number;\n name: string;\n slug: string;\n description: string;\n country: string;\n countryCode: string;\n region: string;\n regionName?: string | null;\n category: string;\n ingredients: string[] | null;\n imageUrl: string | null;\n sourceUrl: string | null;\n latitude: number | null;\n longitude: number | null;\n relatedFerments?: RelatedFerment[];\n}\n\nexport interface RelatedFerment {\n id: number;\n name: string;\n slug: string;\n category?: string;\n imageUrl?: string | null;\n country: string;\n countryCode?: string;\n}\n\nexport interface Country {\n code: string;\n name: string;\n region: string;\n hasFerments: boolean; // True if this country has ferments\n}\n\nexport interface Category {\n name: string; // Primary field name\n category: string; // Deprecated (backward compatibility)\n}\n"],"names":[],"version":3,"file":"module.mjs.map"}
|