@parrot-co/parrot-ui 0.1.11 → 0.1.13
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.js +48 -17
- package/dist/main.js.map +1 -1
- package/dist/module.js +48 -17
- package/dist/module.js.map +1 -1
- package/dist/types.d.ts +3 -3
- package/dist/types.d.ts.map +1 -1
- package/package.json +3 -3
- package/styles.css +1 -1
package/dist/module.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":";;;;;;;;;;;AIAO,SAAS,0CAAS,KAAc;IACrC,OAAO,OAAO,UAAU;AAC1B;AAEO,SAAS,0CAAQ,KAAc;IACpC,OAAO,UAAU,QAAQ,MAAM,OAAO,CAAC;AACzC;AAEO,SAAS,0CAAa,KAAqB;IAChD,OAAO,0CAAQ,UAAU,MAAM,MAAM,KAAK;AAC5C;AAEO,SAAS,0CAAS,KAAa;IACpC,OACE,AAAC,CAAA,OAAO,UAAU,YAAY,OAAO,UAAU,UAAS,KACxD,CAAC,MAAM,OAAO,CAAC,UACf,UAAU;AAEd;AAEO,SAAS,0CAAc,KAAa;IACzC,OAAO,0CAAS,UAAU,OAAO,IAAI,CAAC,OAAO,MAAM,KAAK;AAC1D;AAEO,SAAS,0CAAoB,KAAa;IAC/C,OACE,OAAO,MAAM,CAAC,OAAO,MAAM,CAAC,CAAC;QAC3B,OAAO,UAAU,MAAM,UAAU,aAAa,UAAU;IAC1D,GAAG,MAAM,GAAG;AAEhB;AAEO,SAAS,0CAAkB,KAAc;IAC9C,OAAO,SAAS;AAClB;AAEO,SAAS,yCAAY,KAAc;IACxC,OAAO,UAAU;AACnB;;;ADnCA,6FAA6F;AAC7F,SAAS,wCAAkB,KAAU;IACnC,IAAI,CAAC,OACH,OAAO;IAGT,IAAI,OAAO,UAAU,YACnB,OAAO,wCAAkB;IAG3B,IAAI,CAAA,GAAA,yCAAM,EAAE,QAAQ;QAClB,IAAI,IAAI;QACR,IAAI,OAA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;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,iBAAiB;IACjB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;CACD;AAEM,SAAS,0CAAe,KAA0B;IACvD,MAAM,WAAW,CAAC;IAClB,IAAK,MAAM,OAAO,MAAO;QACvB,IAAI,CAAC,IAAI,UAAU,CAAC,YAAY,CAAC,yCAAmB,GAAG,CAAC,MACtD;QAEF,QAAQ,CAAC,IAAI,GAAG,KAAK,CAAC,IAAI;IAC5B;IACA,OAAO;AACT;;;AD5QO,MAAM,4CAAO,CAClB,YACE,QAAQ,YACR,QAAQ,aACR,SAAS,YACT,QAAQ,aACR,SAAS,YACT,QAAQ,MACR,KAAK,OACL,GAAG,OAC4C,EACjD;IAEA,MAAM,OAAO;IACb,qBACE,gBAAC;QACC,WAAW,CAAA,GAAA,yCAAC,EAAE;YACZ,CAAC,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC;YAC5B,aAAa,CAAC,CAAC;YACf,aAAa,CAAC,CAAC;YACf,cAAc,CAAC,CAAC;YAChB,CAAC,CAAC,EAAE,UAAU,CAAC,CAAC,EA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;AAGP;;;","sources":["src/index.ts","src/components/box/index.ts","src/components/box/box.tsx","src/utils/dom.ts","src/utils/assertions.ts","src/components/grid/index.ts","src/components/grid/grid.tsx","src/utils/helpers.ts","src/utils/theme.ts","src/components/flex/index.ts","src/components/flex/flex.tsx","src/components/input/index.ts","src/components/input/input.tsx","src/components/form/field.tsx","src/components/input-label/index.ts","src/components/input-label/input-label.tsx","src/components/text/index.ts","src/components/text/text.tsx","src/components/input-error/index.ts","src/components/input-error/input-error.tsx","src/components/space/space.tsx","src/components/theme/index.ts","src/components/theme/theme-provider.tsx","src/components/input/number-input.tsx","src/components/button/index.ts","src/components/button/button.tsx","src/components/loader/index.ts","src/components/loader/loader.tsx","src/components/button/button-group.tsx","src/components/space/index.ts","src/utils/object.ts","src/components/button/icon-button.tsx","src/components/input/password-input.tsx","src/components/textarea/index.ts","src/components/textarea/textarea.tsx","src/components/checkbox/index.ts","src/components/checkbox/checkbox.tsx","src/components/checkbox/checkbox-group.tsx","src/components/dropdown-menu/index.ts","src/components/dropdown-menu/dropdown-menu.tsx","src/components/internal-popover/index.ts","src/components/internal-popover/internal-popover.tsx","src/components/combo-box/index.ts","src/components/combo-box/combo-box.tsx","src/components/list-box/index.ts","src/components/list-box/list-box.tsx","src/components/list-box/list-box.utils.tsx","src/components/collections/index.tsx","src/components/list-box/list-box-provider.tsx","src/components/radio/index.ts","src/components/radio/radio.tsx","src/components/radio/radio-card.tsx","src/components/select/index.ts","src/components/select/select.tsx","src/components/tag/index.ts","src/components/tag/tag.tsx","src/components/date-input/index.ts","src/components/date-input/date-input.tsx","src/components/date-input/date-field.tsx","src/components/date-input/calendar.tsx","src/utils/array.ts","src/components/avatar/index.ts","src/components/avatar/avatar.tsx","src/components/file-uploader/index.ts","src/components/file-uploader/file-uploader.tsx","src/components/separator/index.ts","src/components/separator/separator.tsx","src/components/progress/index.ts","src/components/progress/progress.tsx","src/components/switch/index.ts","src/components/switch/switch.tsx","src/components/slider/index.ts","src/components/slider/slider.tsx","src/components/icon-tray/index.ts","src/components/icon-tray/icon-tray.tsx","src/components/sticker/index.ts","src/components/sticker/sticker.tsx","src/components/tabs/index.ts","src/components/tabs/tabs.tsx","src/components/table/index.ts","src/components/table/table.tsx","src/components/timeline/index.ts","src/components/timeline/timeline.tsx","src/components/modal/index.ts","src/components/modal/modal.tsx","src/components/tag-input/index.ts","src/components/tag-input/tag-input.tsx","src/utils/regex.ts","src/hooks/use-controlled-state.tsx","src/components/popover/index.ts","src/components/popover/popover.tsx","src/components/tag-group/index.tsx","src/components/tag-group/tag-group.tsx","src/components/color/index.ts","src/components/color/color-picker.tsx","src/components/color/color-area.tsx","src/components/color/color-field.tsx","src/components/color/color-swatch.tsx","src/components/color/color-slider.tsx","src/components/color/color.utils.tsx","src/components/toggle-group/index.ts","src/components/toggle-group/toggle-group.tsx"],"sourcesContent":["export { Box } from \"./components/box\";\nexport { Grid, GridItem } from \"./components/grid\";\nexport { Flex } from \"./components/flex\";\nexport { Input, NumberInput } from \"./components/input\";\nexport { Text } from \"./components/text\";\nexport { Textarea } from \"./components/textarea\";\nexport { Button, IconButton, ButtonGroup } from \"./components/button\";\nexport { Checkbox, CheckboxGroup } from \"./components/checkbox\";\nexport { DropdownMenu } from \"./components/dropdown-menu\";\nexport { ComboBox } from \"./components/combo-box\";\nexport { Radio, RadioGroup, RadioCard } from \"./components/radio\";\nexport { Select, Option, Section } from \"./components/select\";\nexport { ListBoxItem, ListBoxSection } from \"./components/list-box\";\nexport { DateInput, Calendar } from \"./components/date-input\";\nexport { Avatar } from \"./components/avatar\";\nexport { FileUploader } from \"./components/file-uploader\";\nexport { Separator } from \"./components/separator\";\nexport { Progress } from \"./components/progress\";\nexport { Loader } from \"./components/loader\";\nexport { Tag } from \"./components/tag\";\nexport { Switch } from \"./components/switch\";\nexport { Slider } from \"./components/slider\";\nexport { IconTray } from \"./components/icon-tray\";\nexport { Sticker } from \"./components/sticker\";\nexport { Tabs, Tab } from \"./components/tabs\";\nexport { Table } from \"./components/table\";\nexport { Timeline } from \"./components/timeline\";\nexport { Modal, useModal } from \"./components/modal\";\nexport { Space } from \"./components/space\";\nexport { TagInput } from \"./components/tag-input\";\nexport { Popover, PopoverContent, PopoverTrigger } from \"./components/popover\";\nexport { TagGroup, TagGroupItem } from \"./components/tag-group\";\nexport { ThemeProvider, useTheme } from \"./components/theme\";\nexport {\n ColorArea,\n ColorField,\n ColorPicker,\n ColorSlider,\n ColorSwatchPicker,\n parseColor,\n} from \"./components/color\";\nexport { Toggle, ToggleGroup } from \"./components/toggle-group\";\n\nexport type { ModalProps } from \"./components/modal\";\n","export { Box } from \"./box\";\n","import * as React from \"react\";\nimport { cx } from \"../../utils/dom\";\nimport { PositionType } from \"../../utils/theme\";\nimport { AsProps } from \"../../utils/types\";\n\nexport interface BoxProps {\n stretchX?: boolean;\n stretchY?: boolean;\n stretchXY?: boolean;\n position?: PositionType;\n}\n\nexport const _Box = <T extends React.ElementType = \"div\">(\n {\n stretchX,\n stretchY,\n stretchXY,\n children,\n className,\n position,\n as = \"div\",\n ...props\n }: React.PropsWithChildren<BoxProps> & AsProps<T>,\n ref: React.Ref<T>\n) => {\n const Comp = as;\n return (\n <Comp\n className={cx({\n [`position-${position}`]: !!position,\n \"stretch-x\": !!stretchX,\n \"stretch-y\": !!stretchY,\n \"stretch-xy\": !!stretchXY,\n [`${className}`]: !!className,\n })}\n ref={ref}\n {...props}\n >\n {children}\n </Comp>\n );\n};\n\n_Box.displayName = \"Box\";\n\nexport const Box = React.forwardRef(_Box) as typeof _Box;\n","import { isArray, isObject } from \"./assertions\";\n\nexport type ConditionalClassNameObject = Record<string, boolean>;\n// cns(\"p-button\", {space: true, firs-item:false}, className, [className], ()=>\"hello world\")\nfunction processClassValue(value: any): string | null {\n if (!value) {\n return null;\n }\n\n if (typeof value === \"function\") {\n return processClassValue(value?.());\n }\n\n if (isArray(value)) {\n let i = 0;\n let temp = \"\";\n while (i < value.length) {\n const result = processClassValue(value[i++]);\n if (result) {\n temp && (temp += \" \");\n temp += `${result}`;\n }\n }\n return temp;\n }\n\n if (isObject(value)) {\n let str = \"\";\n for (const key in value) {\n if (value[key]) {\n str && (str += \" \");\n str += `${key}`;\n }\n }\n return str;\n }\n\n return value;\n}\n\nexport function cx(...args: any[]): string {\n let i = 0;\n let classStr = \"\";\n\n while (i < args.length) {\n const result = processClassValue(args[i++]);\n if (result) {\n classStr && (classStr += \" \");\n classStr += result;\n }\n }\n\n return classStr;\n}\n\nexport type RefType<T> =\n | React.MutableRefObject<T>\n | ((node: T) => void)\n | null\n | undefined;\n\nexport function mergeRefs<T>(...refs: Array<RefType<T>>) {\n return (node: T) => {\n for (const ref of refs) {\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref && typeof ref === \"object\") {\n ref.current = node;\n }\n }\n };\n}\n\nconst validDOMProperties: Set<string> = new Set([\n // Common HTML attributes\n \"accept\",\n \"acceptCharset\",\n \"accessKey\",\n \"action\",\n \"allowFullScreen\",\n \"allowTransparency\",\n \"alt\",\n \"async\",\n \"autoComplete\",\n \"autoFocus\",\n \"autoPlay\",\n \"capture\",\n \"cellPadding\",\n \"cellSpacing\",\n \"challenge\",\n \"charSet\",\n \"checked\",\n \"cite\",\n \"classID\",\n \"className\",\n \"colSpan\",\n \"cols\",\n \"content\",\n \"contentEditable\",\n \"contextMenu\",\n \"controls\",\n \"coords\",\n \"crossOrigin\",\n \"data\",\n \"dateTime\",\n \"default\",\n \"defer\",\n \"dir\",\n \"disabled\",\n \"download\",\n \"draggable\",\n \"encType\",\n \"form\",\n \"formAction\",\n \"formEncType\",\n \"formMethod\",\n \"formNoValidate\",\n \"formTarget\",\n \"frameBorder\",\n \"headers\",\n \"height\",\n \"hidden\",\n \"high\",\n \"href\",\n \"hrefLang\",\n \"htmlFor\",\n \"httpEquiv\",\n \"icon\",\n \"id\",\n \"inputMode\",\n \"integrity\",\n \"is\",\n \"keyParams\",\n \"keyType\",\n \"kind\",\n \"label\",\n \"lang\",\n \"list\",\n \"loop\",\n \"low\",\n \"manifest\",\n \"marginHeight\",\n \"marginWidth\",\n \"max\",\n \"maxLength\",\n \"media\",\n \"mediaGroup\",\n \"method\",\n \"min\",\n \"minLength\",\n \"multiple\",\n \"muted\",\n \"name\",\n \"noValidate\",\n \"nonce\",\n \"open\",\n \"optimum\",\n \"pattern\",\n \"placeholder\",\n \"poster\",\n \"preload\",\n \"profile\",\n \"radioGroup\",\n \"readOnly\",\n \"referrerPolicy\",\n \"rel\",\n \"required\",\n \"reversed\",\n \"role\",\n \"rowSpan\",\n \"rows\",\n \"sandbox\",\n \"scope\",\n \"scoped\",\n \"scrolling\",\n \"seamless\",\n \"selected\",\n \"shape\",\n \"size\",\n \"sizes\",\n \"span\",\n \"spellCheck\",\n \"src\",\n \"srcDoc\",\n \"srcLang\",\n \"srcSet\",\n \"start\",\n \"step\",\n \"style\",\n \"summary\",\n \"tabIndex\",\n \"target\",\n \"title\",\n \"type\",\n \"useMap\",\n \"value\",\n \"width\",\n \"wmode\",\n \"wrap\",\n // Event handlers\n \"onCopy\",\n \"onCut\",\n \"onPaste\",\n \"onCompositionEnd\",\n \"onCompositionStart\",\n \"onCompositionUpdate\",\n \"onKeyDown\",\n \"onKeyPress\",\n \"onKeyUp\",\n \"onFocus\",\n \"onBlur\",\n \"onChange\",\n \"onInput\",\n \"onInvalid\",\n \"onSubmit\",\n \"onClick\",\n \"onContextMenu\",\n \"onDoubleClick\",\n \"onDrag\",\n \"onDragEnd\",\n \"onDragEnter\",\n \"onDragExit\",\n \"onDragLeave\",\n \"onDragOver\",\n \"onDragStart\",\n \"onDrop\",\n \"onMouseDown\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"onMouseMove\",\n \"onMouseOut\",\n \"onMouseOver\",\n \"onMouseUp\",\n \"onSelect\",\n \"onTouchCancel\",\n \"onTouchEnd\",\n \"onTouchMove\",\n \"onTouchStart\",\n \"onScroll\",\n \"onWheel\",\n \"onAbort\",\n \"onCanPlay\",\n \"onCanPlayThrough\",\n \"onDurationChange\",\n \"onEmptied\",\n \"onEncrypted\",\n \"onEnded\",\n \"onError\",\n \"onLoadedData\",\n \"onLoadedMetadata\",\n \"onLoadStart\",\n \"onPause\",\n \"onPlay\",\n \"onPlaying\",\n \"onProgress\",\n \"onRateChange\",\n \"onSeeked\",\n \"onSeeking\",\n \"onStalled\",\n \"onSuspend\",\n \"onTimeUpdate\",\n \"onVolumeChange\",\n \"onWaiting\",\n \"onLoad\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n \"onAnimationIteration\",\n \"onTransitionEnd\",\n \"onToggle\",\n]);\n\nexport function filterDOMProps(props: Record<string, any>) {\n const newProps = {} as Record<string, any>;\n for (const key in props) {\n if (!key.startsWith(\"data-\") && !validDOMProperties.has(key)) {\n continue;\n }\n newProps[key] = props[key];\n }\n return newProps;\n}\n","export function isNumber(value: unknown): boolean {\n return typeof value === \"number\";\n}\n\nexport function isArray(value: unknown): boolean {\n return value !== null && Array.isArray(value);\n}\n\nexport function isEmptyArray(value: Array<unknown>): boolean {\n return isArray(value) && value.length === 0;\n}\n\nexport function isObject(value: object): boolean {\n return (\n (typeof value === \"object\" || typeof value === \"function\") &&\n !Array.isArray(value) &&\n value !== null\n );\n}\n\nexport function isEmptyObject(value: object) {\n return isObject(value) && Object.keys(value).length === 0;\n}\n\nexport function objectHasEmptyValue(value: object) {\n return (\n Object.values(value).filter((value) => {\n return value === \"\" || value === undefined || value === null;\n }).length > 0\n );\n}\n\nexport function isUndefinedOrNull(value: unknown) {\n return value == null;\n}\n\nexport function isUndefined(value: unknown) {\n return value === undefined;\n}","export { Grid, GridItem } from './grid';","import * as React from \"react\";\nimport {\n AlignItemsType,\n JustifyContentType,\n SizeOption,\n} from \"../../utils/theme\";\nimport { cx } from \"../../utils/dom\";\nimport { AsProps, ResponsiveProp } from \"../../utils/types\";\nimport { Box } from \"../box\";\nimport { breakpointClassNames } from \"../../utils/helpers\";\nimport { BoxProps } from \"../box/box\";\n\ntype Columns =\n | \"1\"\n | \"2\"\n | \"3\"\n | \"4\"\n | \"5\"\n | \"6\"\n | \"7\"\n | \"8\"\n | \"9\"\n | \"10\"\n | \"11\"\n | \"12\"\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 7\n | 8\n | 9\n | 10\n | 11\n | 12;\ninterface GridProps {\n columns?: ResponsiveProp<Columns>;\n gap?: ResponsiveProp<SizeOption>;\n gapX?: ResponsiveProp<SizeOption>;\n gapY?: ResponsiveProp<SizeOption>;\n align?: ResponsiveProp<AlignItemsType>;\n justify?: ResponsiveProp<JustifyContentType>;\n}\n\nexport const _Grid = <T extends React.ElementType = \"div\">(\n props: GridProps & BoxProps & AsProps<T>,\n ref: React.Ref<T>\n) => {\n const {\n columns = 12,\n gap = \"sm\",\n gapX,\n gapY,\n align,\n justify,\n as,\n className,\n ...otherProps\n } = props;\n\n return (\n // TODO figure out why ts is screaming over here\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-ignore\n <Box\n as={as}\n ref={ref}\n className={cx(\n \"p-grid\",\n \"display-grid\",\n breakpointClassNames(\"columns\", columns),\n breakpointClassNames(\"gap\", gap),\n breakpointClassNames(\"column-gap\", gapX),\n breakpointClassNames(\"row-gap\", gapY),\n breakpointClassNames(\"flex-align\", align),\n breakpointClassNames(\"flex-justify\", justify),\n className\n )}\n {...otherProps}\n ></Box>\n );\n};\n\n_Grid.displayName = \"Grid\";\n\nexport const Grid = React.forwardRef(_Grid) as typeof _Grid;\n\ninterface GridItemProps extends React.ComponentProps<typeof Box> {\n colSpan?: ResponsiveProp<Columns>;\n}\n\nexport const _GridItem = <T extends React.ElementType = \"div\">(\n props: GridItemProps & AsProps<T>,\n ref: React.Ref<T>\n) => {\n return (\n <Box\n ref={ref}\n className={cx(\n \"p-grid-item\",\n breakpointClassNames(\"col-span\", props.colSpan),\n props.className\n )}\n {...props}\n ></Box>\n );\n};\n\nexport const GridItem = React.forwardRef(_GridItem) as typeof _GridItem;\n_GridItem.displayName = \"GridItem\";\n","import { isUndefinedOrNull } from \"./assertions\";\nimport { supportedColors } from \"./theme\";\nimport { ResponsiveProp, Breakpoints } from \"./types\";\n\n\n\nexport function warnDeprecation(deprecatedProp: any,newProp: any, value?: string) {\n if(!isUndefinedOrNull(value)) {\n console.warn(`${deprecatedProp} is deprecated and will be removed in a future release. ${newProp ? `Please use ${newProp} instead.` : \"\"}`)\n }\n}\n\nexport function hashCode(text: string) {\n const str = String(text);\n let hash = 0;\n let char;\n if (str.trim().length === 0) return hash;\n for (let i = 0; i < str.length; i++) {\n char = str.charCodeAt(i);\n hash = (hash << 5) - hash + char;\n // Convert to 32bit integer\n hash &= hash;\n }\n\n return Math.abs(hash);\n}\n\nexport function id() {\n return Math.random().toString(36);\n}\n\nexport function getRandomColor(string: string) {\n const hash = hashCode(string);\n return supportedColors[hash % supportedColors.length];\n}\n\nexport function breakpointClassNames<T>(\n prefix: string,\n value: ResponsiveProp<T>\n): string {\n if (!value) return \"\";\n\n if (typeof value === \"string\" || typeof value === \"number\") {\n return `${prefix}-${value}`;\n }\n\n let classNames = \"\";\n\n for (const key of Object.keys(value as Record<Breakpoints, T>)) {\n const breakpoint = key as Breakpoints;\n const breakpointValue = (value as Record<Breakpoints, T>)[breakpoint];\n\n if (breakpointValue) {\n classNames && (classNames += \" \");\n classNames +=\n breakpoint === \"base\"\n ? `${prefix}-${breakpointValue}`\n : `${breakpoint}:${prefix}-${breakpointValue}`;\n }\n }\n\n return classNames;\n}\n","export const supportedColors = [\n \"tomato\",\n \"red\",\n \"crimson\",\n \"pink\",\n \"plum\",\n \"purple\",\n \"violet\",\n \"indigo\",\n \"blue\",\n \"cyan\",\n \"teal\",\n \"green\",\n \"grass\",\n \"orange\",\n \"brown\",\n \"sky\",\n \"mint\",\n \"lime\",\n \"yellow\",\n \"amber\",\n \"gold\",\n \"bronze\",\n \"gray\",\n \"mauve\",\n \"slate\",\n \"sage\",\n \"olive\",\n \"sand\",\n] as const;\n\nexport type Color = (typeof supportedColors)[number];\n\nexport type ColorVariant =\n | \"solid\"\n | \"outline\"\n | \"light\"\n | \"lightOutline\"\n | \"solidMono\"\n | \"ghost\"\n | \"pastel\";\n\nexport type InputAppearance = \"outline\" | \"filled\" | \"filled-outline\";\nexport type BorderRadius = \"none\" | \"sm\" | \"md\" | \"lg\" | \"full\";\nexport type Appearance = \"light\" | \"dark\";\n\nexport type ButtonSize = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\nexport type ButtonAppearance = \"primary\" | \"secondary\" | \"minimal\";\n\nexport type ButtonAppearanceSchemaType = Partial<\n Record<ButtonAppearance, { variant: ColorVariant; color: Color }>\n>;\nexport type DisplayType =\n | \"block\"\n | \"inline\"\n | \"inline-block\"\n | \"flex\"\n | \"none\"\n | \"grid\"\n | \"inline-flex\";\n\nexport type PositionType = \"absolute\" | \"relative\" | \"fixed\" | \"sticky\";\n\nexport type JustifyContentType =\n | \"start\"\n | \"center\"\n | \"end\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\";\n\nexport type AlignItemsType =\n | \"start\"\n | \"center\"\n | \"end\"\n | \"stretch\"\n | \"baseline\";\n\nexport type FlexDirectionType =\n | \"row\"\n | \"column\"\n | \"row-reverse\"\n | \"column-reverse\";\n\nexport type SizeOption =\n | \"none\"\n | \"4xs\"\n | \"3xs\"\n | \"2xs\"\n | \"xs\"\n | \"sm\"\n | \"md\"\n | \"lg\"\n | \"xl\"\n | \"2xl\"\n | \"3xl\"\n | \"4xl\";\n\nexport const borderRadiusShapeMap = {\n sharp: \"none\",\n pill: \"full\",\n rounded: undefined,\n};\n\nfunction ps(styles: any) {\n // 1. iterate over the keys of the styles object\n // 2. for each key, check is is valid css property\n}\n\ntype CSS = any;\n\ntype ParrotStyleDef = { variants: Record<string, CSS> };\n","export { Flex } from \"./flex\";\nexport type { FlexProps } from \"./flex\";\n","import * as React from \"react\";\nimport { Box } from \"../box\";\nimport { cx, filterDOMProps } from \"../../utils/dom\";\nimport {\n AlignItemsType,\n FlexDirectionType,\n JustifyContentType,\n SizeOption,\n} from \"../../utils/theme\";\nimport { BoxProps } from \"../box/box\";\nimport { AsProps, ResponsiveProp } from \"../../utils/types\";\nimport { breakpointClassNames } from \"../../utils/helpers\";\n\nexport interface FlexProps extends BoxProps {\n justify?: JustifyContentType;\n align?: AlignItemsType;\n direction?: FlexDirectionType;\n gap?: ResponsiveProp<SizeOption>;\n columnGap?: ResponsiveProp<SizeOption>;\n rowGap?: ResponsiveProp<SizeOption>;\n stack?: boolean;\n inline?: boolean;\n wrap?: \"wrap\" | \"nowrap\" | \"wrap-reverse\";\n}\n\nexport const _Flex = <T extends React.ElementType = \"div\">(\n props: React.PropsWithChildren<FlexProps> & AsProps<T>,\n ref: React.Ref<T>\n) => {\n const {\n justify,\n align,\n direction,\n gap = \"sm\",\n columnGap,\n rowGap,\n inline,\n wrap,\n stack,\n className,\n ...otherProps\n } = props;\n\n const flexDirection = stack ? \"column\" : direction ?? \"row\";\n\n return (\n <Box\n className={cx(\n className,\n inline ? \"display-inline-flex\" : \"display-flex\",\n `flex-direction-${flexDirection}`,\n wrap && `flex-${wrap}`,\n justify && `flex-justify-${justify}`,\n align && `flex-align-${align}`,\n breakpointClassNames(\"gap\", gap),\n breakpointClassNames(\"column-gap\", columnGap),\n breakpointClassNames(\"row-gap\", rowGap)\n )}\n // TODO - Fix types here - seems to work just fine though\n ref={ref as any}\n {...(filterDOMProps(otherProps) as any)}\n >\n {props.children}\n </Box>\n );\n};\n\n_Flex.displayName = \"Flex\";\n\nexport const Flex = React.forwardRef(_Flex) as typeof _Flex;\n","export { Input } from './input';\nexport { NumberInput } from './number-input';\nexport { PasswordInput } from './password-input';","import React from \"react\";\nimport { AriaTextFieldProps, useTextField } from \"react-aria\";\nimport { cx, mergeRefs } from \"../../utils/dom\";\nimport { Field, FieldComponentProps } from \"../form/field\";\n\nexport type TextInputProps = AriaTextFieldProps & FieldComponentProps<\"input\">;\n\nexport function Input({\n className,\n classNames,\n style,\n styles,\n inputRef,\n ...props\n}: TextInputProps) {\n const internalInputRef = React.useRef<HTMLInputElement>(null);\n\n const { labelProps, inputProps, errorMessageProps, descriptionProps } =\n useTextField(\n {\n ...props,\n inputElementType: \"input\",\n },\n internalInputRef\n );\n\n return (\n <Field\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n className={className}\n classNames={classNames}\n styles={styles}\n style={style}\n {...props}\n >\n <input\n ref={mergeRefs(internalInputRef, inputRef)}\n data-has-left-addon={!!props.prepend}\n data-has-right-addon={!!props.append}\n className={cx(\"p-text-input-el\")}\n {...inputProps}\n />\n </Field>\n );\n}\n","import React from \"react\";\nimport { Flex } from \"../flex\";\nimport { InputLabel } from \"../input-label\";\nimport { InputError } from \"../input-error\";\nimport { Text } from \"../text\";\nimport { useSpace } from \"../space/space\";\nimport { cx } from \"../../utils/dom\";\nimport { BorderRadius, Color, InputAppearance } from \"../../utils/theme\";\nimport { useTheme } from \"../theme\";\nimport { StyleProps } from \"../../utils/types\";\n\ntype FocusableElement = Element | HTMLOrSVGElement;\n\nexport type FieldProps<S extends string> = InputProps &\n StyleProps<S | \"wrapper\" | \"label\" | \"input\" | \"description\"> & {\n labelProps?:\n | React.LabelHTMLAttributes<HTMLLabelElement>\n | React.DOMAttributes<FocusableElement>;\n descriptionProps?: React.DOMAttributes<FocusableElement>;\n errorMessageProps?: React.DOMAttributes<FocusableElement>;\n children?: React.ReactNode;\n replaceDefaultControlWrapper?: boolean;\n };\n\nexport type FieldComponentProps<S extends string> = Omit<\n FieldProps<S>,\n \"labelProps\" | \"descriptionProps\" | \"errorMessageProps\"\n>;\n\nexport type InputProps = {\n description?: React.ReactNode;\n label?: React.ReactNode;\n error?: React.ReactNode;\n append?: React.ReactNode;\n prepend?: React.ReactNode;\n validationStatus?: \"error\" | \"success\" | \"warning\";\n shape?: \"rounded\" | \"sharp\";\n inputRef?: React.RefObject<HTMLInputElement>;\n wrapperRef?: React.RefObject<HTMLDivElement>;\n appearance?: InputAppearance;\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n color?: Color;\n radius?: BorderRadius;\n isDisabled?: boolean;\n};\n\nexport function Field<S extends string = any>({\n label,\n description,\n error,\n color = \"gray\",\n radius,\n size = \"md\",\n className,\n classNames,\n style,\n styles,\n prepend,\n append,\n appearance = \"outline\",\n validationStatus,\n labelProps,\n errorMessageProps,\n descriptionProps,\n children,\n replaceDefaultControlWrapper,\n isDisabled,\n wrapperRef,\n ...props\n}: FieldProps<S>) {\n const space = useSpace();\n const theme = useTheme();\n\n return (\n <Flex\n ref={wrapperRef}\n {...props}\n data-color={color}\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n data-size={size}\n className={cx(\n \"p-input-group\",\n space.compactItemWrapperAdjust,\n className,\n classNames?.wrapper\n )}\n stack\n gap={\"3xs\"}\n style={{ ...style, ...styles?.wrapper }}\n >\n {label && (\n <InputLabel\n style={styles?.label}\n className={classNames?.label}\n color={color}\n {...labelProps}\n >\n {label}\n </InputLabel>\n )}\n\n {!replaceDefaultControlWrapper && (\n <Flex\n className={cx(space.classNames, \"p-input-control\")}\n data-has-error={!!error}\n data-appearance={appearance}\n data-disabled={isDisabled}\n stretchX\n inline\n position=\"relative\"\n >\n {prepend && <Flex className=\"add-on add-on-left\">{prepend}</Flex>}\n {/**TODO: this is where actual input goes */}\n {children}\n {append && <Flex className=\"add-on add-on-right\">{append}</Flex>}\n </Flex>\n )}\n\n {replaceDefaultControlWrapper && children}\n\n {error && (\n <InputError validationStatus={validationStatus} {...errorMessageProps}>\n {error}\n </InputError>\n )}\n\n {description && (\n <Text\n as=\"div\"\n variant=\"light\"\n color=\"gray\"\n size=\"sm\"\n lineHeight={\"short\"}\n {...descriptionProps}\n >\n {description}\n </Text>\n )}\n </Flex>\n );\n}\n\nField.displayName = \"Field\";\n","export { default as InputLabel } from './input-label';","import React from \"react\";\n\nimport { cx } from \"../../utils/dom\";\nimport { Text } from \"../text\";\nimport { Color } from \"../../utils/theme\";\n\ntype InputLabelProps = Omit<React.HTMLAttributes<HTMLLabelElement>, \"size\">;\n\nconst InputLabel = React.forwardRef<HTMLLabelElement, InputLabelProps>(\n ({ children, className, color, ...props }, ref) => {\n return (\n <Text\n ref={ref}\n size=\"sm\"\n color={(color as Color) || \"gray\"}\n variant=\"light\"\n as=\"label\"\n className={cx([className, \"p-input-label\"])}\n {...props}\n >\n {children}\n </Text>\n );\n }\n);\n\nInputLabel.displayName = \"InputLabel\";\n\nexport default InputLabel;\n","export { Text } from \"./text\";\n","import * as React from \"react\";\nimport { Color, SizeOption } from \"../../utils/theme\";\n\nimport { cx } from \"../../utils/dom\";\nimport { AsProps, ResponsiveProp } from \"../../utils/types\";\nimport { breakpointClassNames } from \"../../utils/helpers\";\n\ntype TextWeight =\n | \"light\"\n | \"regular\"\n | \"medium\"\n | \"semi-bold\"\n | \"bold\"\n | \"heavy\"\n | \"inherit\";\ntype TextColorVariant = \"light\" | \"lighter\" | \"dark\" | \"default\";\n\ninterface TextProps {\n size?: ResponsiveProp<SizeOption>;\n weight?: TextWeight;\n highlight?: boolean;\n color?: Color | \"inherit\" | \"white\" | \"black\";\n variant?: TextColorVariant;\n align?: \"left\" | \"center\" | \"right\";\n numeric?: boolean;\n underline?: boolean;\n italic?: boolean;\n lineHeight?: \"normal\" | \"shorter\" | \"short\" | \"base\" | \"tall\";\n textCase?: \"uppercase\" | \"lowercase\" | \"capitalize\";\n}\n\nexport const _Text = <T extends React.ElementType = \"span\">(\n props: React.PropsWithChildren<TextProps> & AsProps<T>,\n ref?: React.Ref<T>\n) => {\n const {\n textCase,\n size = \"sm\",\n weight,\n color = \"gray\",\n variant = \"default\",\n highlight,\n align,\n lineHeight,\n underline,\n italic,\n as: Comp = \"span\",\n className,\n ...rest\n } = props;\n\n return (\n <Comp\n className={cx(\n \"p-text\",\n className,\n {\n [`text-highlight`]: !!highlight,\n [`text-weight-${weight}`]: !!weight,\n [`text-align-${align}`]: !!align,\n [`text-line-height-${lineHeight}`]: !!lineHeight,\n [`text-transform-${textCase}`]: !!textCase,\n },\n breakpointClassNames(\"text-size\", size)\n )}\n data-underline={underline}\n data-italic={italic}\n data-color={color}\n data-color-variant={variant}\n ref={ref}\n {...rest}\n />\n );\n};\n\n_Text.displayName = \"Text\";\n\nexport const Text = React.forwardRef(_Text) as typeof _Text;\n","export { default as InputError } from './input-error'","import React from \"react\";\nimport { Text } from \"../text\";\n\ntype InputErrorProps = React.ComponentProps<typeof Text> & {\n validationStatus?: \"error\" | \"success\" | \"warning\";\n};\n\nconst InputError = React.forwardRef<HTMLDivElement, InputErrorProps>(\n ({ children, validationStatus = \"error\", ...props }, ref) => {\n return (\n <Text\n size=\"sm\"\n className=\"p-input-error\"\n lineHeight={\"base\"}\n as=\"div\"\n color=\"red\"\n variant=\"default\"\n data-validation-status={validationStatus}\n ref={ref}\n {...props}\n >\n {children}\n </Text>\n );\n }\n);\n\nInputError.displayName = \"InputError\";\n\nexport default InputError;\n","import * as React from \"react\";\nimport { Flex, FlexProps } from \"../flex\";\nimport { ConditionalClassNameObject, cx } from \"../../utils/dom\";\nimport { SizeOption } from \"../../utils/theme\";\nimport { StyleProps } from \"../../utils/types\";\n\nconst SpaceContext = React.createContext<{\n classNames: ConditionalClassNameObject;\n compactItemWrapperAdjust: string;\n}>({ classNames: {}, compactItemWrapperAdjust: \"\" });\n\ntype SpaceProps = FlexProps &\n StyleProps<\"wrapper\"> & {\n compact?: boolean;\n gap?: SizeOption;\n };\n\nexport function Space({\n children,\n compact,\n gap,\n className,\n classNames,\n style,\n styles,\n ...props\n}: React.PropsWithChildren<SpaceProps>) {\n const childrenCount = React.Children.count(children);\n\n const nodes = React.useMemo(() => {\n return React.Children.map(children, (child, index) => {\n const isFirstChild = index == 0;\n const isLastChild = index == childrenCount - 1;\n\n if (!React.isValidElement(child)) return null;\n\n return (\n <SpaceContext.Provider\n value={{\n classNames: {\n \"space-item-first\": isFirstChild,\n \"space-item-last\": isLastChild,\n \"space-item\": true,\n },\n compactItemWrapperAdjust: isLastChild\n ? \"\"\n : \"compact-item-wrapper-adjust\",\n }}\n >\n {child}\n </SpaceContext.Provider>\n );\n });\n }, [children]);\n\n return (\n <Flex\n data-compact={compact}\n style={{ ...style, ...styles?.wrapper }}\n className={cx([className, \"p-space\", classNames?.wrapper])}\n gap={gap ?? \"none\"}\n {...props}\n >\n {nodes}\n </Flex>\n );\n}\n\nexport function useSpace() {\n return React.useContext(SpaceContext);\n}\n","export { useTheme, ThemeProvider } from \"./theme-provider\";\n","import * as React from \"react\";\nimport { cx } from \"../../utils/dom\";\nimport {\n BorderRadius,\n ButtonAppearanceSchemaType,\n Color,\n InputAppearance,\n} from \"../../utils/theme\";\n\ninterface ThemeProviderValue {\n color?: Color;\n scaling?: SizeScale;\n grayVariant?: string;\n radius?: BorderRadius;\n buttonAppearance?: ButtonAppearanceSchemaType;\n avatarRadiusSize?: BorderRadius;\n inputAppearance?: InputAppearance;\n}\ninterface ThemeProviderProps extends ThemeProviderValue {\n children?: React.ReactNode;\n className?: string;\n}\n\ntype SizeScale = \"90%\" | \"95%\" | \"100%\" | \"105%\" | \"110%\";\n\nconst ThemeContext = React.createContext<ThemeProviderValue | null>(null);\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n const { children, className, scaling = \"100%\", ...themeProps } = props;\n return (\n <ThemeContext.Provider value={themeProps}>\n <div\n id=\"parrot-theme-provider\"\n data-radius={themeProps.radius}\n data-color={themeProps.color}\n data-scaling={scaling}\n className={cx([\"parrot-theme\", className])}\n >\n {children}\n </div>\n </ThemeContext.Provider>\n );\n}\n\nexport function useTheme(options?: { requireThemeProvider: boolean }) {\n const theme = React.useContext(ThemeContext);\n if (!theme && options?.requireThemeProvider)\n throw new Error(\"No theme found\");\n return theme;\n}\n","import * as React from \"react\";\nimport { IconButton } from \"../button\";\nimport { Flex } from \"../flex\";\nimport { cx, mergeRefs } from \"../../utils/dom\";\nimport { useSpace } from \"../space/space\";\nimport { useNumberFieldState } from \"react-stately\";\n\nimport { Field, FieldComponentProps } from \"../form/field\";\nimport { AriaNumberFieldProps, useLocale, useNumberField } from \"react-aria\";\n\ntype NumberInputProps = AriaNumberFieldProps &\n FieldComponentProps<\"input\" | \"decrement\" | \"increment\"> & {\n showSteppers?: boolean;\n decrementIcon?: React.ReactNode;\n incrementIcon?: React.ReactNode;\n };\n\n// TODO - add support for `append` and `prepend` props\n// TODO - format stepper buttons\nexport function NumberInput({\n appearance = \"outline\",\n size = \"md\",\n color = \"gray\",\n classNames,\n styles,\n append,\n prepend,\n placeholder,\n showSteppers = false,\n error,\n label,\n minValue,\n maxValue,\n formatOptions,\n inputRef,\n incrementIcon,\n decrementIcon,\n ...props\n}: NumberInputProps) {\n const ariaProps = {\n ...props,\n maxValue,\n formatOptions,\n minValue,\n \"aria-label\": props[\"aria-label\"] ?? \"number input\",\n } as AriaNumberFieldProps;\n\n const space = useSpace();\n const internalInputRef = React.useRef<HTMLInputElement>(null);\n\n const { locale } = useLocale();\n const state = useNumberFieldState({ ...ariaProps, locale });\n const {\n errorMessageProps,\n descriptionProps,\n labelProps,\n groupProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n } = useNumberField(ariaProps, state, internalInputRef);\n\n return (\n <Field\n classNames={classNames}\n color={color}\n size={size}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n error={error}\n label={label}\n replaceDefaultControlWrapper\n {...props}\n >\n <Flex gap=\"4xs\" {...groupProps} className=\"p-input-container\">\n {showSteppers && (\n <IconButton\n {...decrementButtonProps}\n radius=\"md\"\n color={color}\n variant=\"outline\"\n size={size}\n className={classNames?.decrement}\n style={styles?.decrement}\n >\n {decrementIcon}\n </IconButton>\n )}\n <input\n style={styles?.input}\n ref={mergeRefs(internalInputRef, inputRef)}\n placeholder={placeholder}\n className={cx(\n classNames?.input,\n \"p-input-control\",\n \"space-item\",\n space.classNames\n )}\n data-appearance={appearance}\n data-has-left-addon={!!prepend}\n data-has-right-addon={!!append}\n type=\"text\"\n {...inputProps}\n />\n {showSteppers && (\n <IconButton\n {...incrementButtonProps}\n radius=\"md\"\n color={color}\n variant=\"outline\"\n size={size}\n className={classNames?.increment}\n style={styles?.increment}\n >\n {incrementIcon}\n </IconButton>\n )}\n </Flex>\n </Field>\n );\n}\n","export { Button } from \"./button\";\nexport { ButtonGroup } from \"./button-group\";\nexport { IconButton } from \"./icon-button\";\nexport type { ButtonProps } from \"./button\";\n","import React from \"react\";\nimport { AriaButtonProps, useButton, useToggleButton } from \"react-aria\";\nimport { cx, mergeRefs } from \"../../utils/dom\";\nimport { Loader } from \"../loader\";\nimport { useButtonGroup } from \"./button-group\";\nimport { useSpace } from \"../space/space\";\nimport { ToggleState, useToggleState } from \"react-stately\";\nimport {\n BorderRadius,\n ButtonAppearance,\n ButtonSize,\n Color,\n ColorVariant,\n} from \"../../utils/theme\";\nimport { useTheme } from \"../theme\";\nimport { ResponsiveProp, StyleProps } from \"../../utils/types\";\nimport { breakpointClassNames } from \"../../utils/helpers\";\nimport { ToggleButtonProps } from \"react-aria-components\";\n\nexport interface ButtonToggleProps {\n isToggle?: boolean;\n idleColor?: Color;\n idleVariant?: ColorVariant;\n activeColor?: Color;\n activeVariant?: ColorVariant;\n}\n\nexport type ButtonProps = StyleProps<\"wrapper\" | \"loader\"> &\n AriaButtonProps<\"button\" | \"div\" | \"a\"> &\n ButtonToggleProps & {\n appearance?: ButtonAppearance;\n append?: React.ReactNode;\n as?: React.ElementType;\n color?: Color;\n defaultSelected?: boolean;\n form?: string;\n isIconButton?: boolean;\n isLoading?: boolean;\n isSelected?: boolean;\n prepend?: React.ReactNode;\n radius?: BorderRadius;\n role?: string;\n size?: ResponsiveProp<ButtonSize>;\n variant?: ColorVariant;\n } & Pick<ToggleButtonProps, \"onChange\">;\n\n/*\n TODO:\n - [ ] Support onClick prop\n - [ ] Standardize props with universal button props\n */\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (props, ref) => {\n const space = useSpace();\n const buttonGroupProps = useButtonGroup();\n const theme = useTheme();\n\n const {\n color = theme?.color ?? \"violet\",\n variant = \"solid\",\n append,\n prepend,\n size = \"md\",\n children,\n as = \"button\",\n className,\n isLoading,\n radius = \"full\",\n isToggle,\n activeColor = theme?.color,\n activeVariant = \"solid\",\n idleColor = \"gray\",\n idleVariant = \"outline\",\n isIconButton,\n style,\n classNames,\n styles,\n form,\n ...otherProps\n } = { ...buttonGroupProps, ...props };\n\n const state = isToggle\n ? useToggleState({\n ...otherProps,\n })\n : ({} as ToggleState);\n\n const buttonRef = React.useRef(null);\n const { buttonProps, isPressed } = isToggle\n ? useToggleButton({ ...otherProps, elementType: as }, state, buttonRef)\n : useButton({ ...otherProps, elementType: as }, buttonRef);\n\n function getColor() {\n if (!state.isSelected && isToggle) {\n return { color: idleColor, variant: idleVariant };\n }\n if (state.isSelected && isToggle) {\n return { color: activeColor, variant: activeVariant };\n }\n\n return { variant, color };\n }\n\n const Comp = as;\n\n return (\n <Comp\n style={{ ...style, ...styles?.wrapper }}\n data-is-toggle={isToggle}\n data-pressed={isPressed}\n data-radius={radius}\n data-icon-button={isIconButton}\n data-loading={isLoading}\n aria-busy={isLoading}\n data-color={getColor().color}\n data-variant={getColor().variant}\n data-selected={state.isSelected}\n className={cx(\n breakpointClassNames(\"size\", size),\n className,\n \"p-button\",\n space.classNames\n )}\n ref={mergeRefs(ref, buttonRef)}\n form={form}\n {...(buttonProps as Omit<typeof buttonProps, \"color\">)}\n >\n {prepend}\n\n {children}\n\n {isLoading ? (\n <Loader\n className={cx([\"p-button-loader\", classNames?.loader])}\n style={{ marginLeft: 8, ...styles?.loader }}\n color=\"inherit\"\n size={\"xs\"}\n />\n ) : (\n append\n )}\n </Comp>\n );\n }\n);\n\nButton.displayName = \"Button\";\n","export {Loader} from './loader';","import * as React from \"react\";\nimport { cx } from \"../../utils/dom\";\nimport { useTheme } from \"../theme\";\n\ninterface LoaderProps extends React.HTMLAttributes<HTMLDivElement> {\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\";\n}\n\n// TODO: Need to figure out API for this component\n// especially for customizing color\n\nexport const Loader = React.forwardRef<HTMLDivElement, LoaderProps>(\n (\n { color = \"var(--color-10)\", className, style, size = \"sm\", ...props },\n ref\n ) => {\n const theme = useTheme();\n\n return (\n <div\n data-color={theme?.color ?? \"gray\"}\n style={{ fill: color, ...style }}\n className={cx([className, \"p-loader-wrapper\"])}\n ref={ref}\n {...props}\n >\n <svg\n className=\"p-loader-svg\"\n data-size={size}\n viewBox=\"0 0 1024 1024\"\n fill={\"inherit\"}\n >\n <path d=\"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z\" />\n </svg>\n </div>\n );\n }\n);\n\nLoader.displayName = \"Loader\";\n","import * as React from \"react\";\nimport { Space } from \"../space\";\nimport { ButtonProps } from \"./button\";\nimport { omitNullOrUndefined } from \"../../utils/object\";\nimport { StyleProps } from \"../../utils/types\";\n\nconst ButtonGroupContext = React.createContext<ButtonGroupProps>({});\n\ntype ButtonGroupProps = Pick<\n ButtonProps,\n | \"color\"\n | \"variant\"\n | \"size\"\n | \"radius\"\n | \"idleColor\"\n | \"idleVariant\"\n | \"activeColor\"\n | \"activeVariant\"\n | \"isToggle\"\n> &\n StyleProps<\"wrapper\"> & {\n label?: string;\n };\n\nexport function ButtonGroup({\n color,\n variant,\n size,\n compact,\n radius,\n gap,\n children,\n idleColor,\n activeColor,\n idleVariant,\n activeVariant,\n isToggle,\n className,\n classNames,\n style,\n styles,\n}: ButtonGroupProps & React.ComponentProps<typeof Space>) {\n const cleanProps = omitNullOrUndefined({\n color,\n variant,\n size,\n radius,\n idleColor,\n activeColor,\n idleVariant,\n activeVariant,\n isToggle,\n });\n\n return (\n <ButtonGroupContext.Provider value={cleanProps}>\n <Space\n className={className}\n classNames={classNames}\n style={style}\n styles={styles}\n gap={gap}\n compact={compact}\n >\n {children}\n </Space>\n </ButtonGroupContext.Provider>\n );\n}\n\nexport function useButtonGroup() {\n return React.useContext(ButtonGroupContext);\n}\n","export { Space } from \"./space\";\n","import { Dict } from \"./types\";\n\nexport function omit<T extends Dict, K extends keyof T>(object: T, keys: K[]) {\n return Object.keys(object).reduce((obj, key) => {\n if (keys.includes(key as K)) {\n return { ...obj };\n }\n return {\n ...obj,\n [key]: object[key],\n } as T;\n }, {});\n}\nexport function pick<T extends Dict, K extends keyof T>(\n object: T | undefined,\n keys: K[]\n) {\n // TODO handle invalid objects properly\n if (!object) {\n return {};\n }\n\n return Object.keys(object).reduce((obj, key) => {\n if (keys.includes(key as K))\n return {\n ...obj,\n [key]: object[key],\n };\n return { ...obj };\n }, {});\n}\nexport function split<T extends Dict, K extends keyof T>(object: T, keys: K[]) {\n const picked = pick(object, keys);\n const omitted = omit(object, keys);\n\n return [picked, omitted] as [{ [P in K]: T[P] }, Omit<T, K>];\n}\n\nexport function omitNullOrUndefined<T extends Dict>(object: T): Partial<T> {\n return Object.keys(object).reduce((obj, key) => {\n if (object[key] == null) {\n return { ...obj };\n }\n return {\n ...obj,\n [key]: object[key],\n };\n }, {});\n}\n","import * as React from \"react\";\nimport { Button, ButtonProps } from \"./button\";\n\ninterface IconButtonProps extends ButtonProps {\n isIcon?: boolean;\n}\n\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\n (props, ref) => {\n return (\n <Button isIconButton ref={ref} {...props}>\n {props.children}\n </Button>\n );\n }\n);\n\nIconButton.displayName = \"IconButton\";\n","import React from \"react\";\nimport { IconButton } from \"../button\";\nimport { Input, TextInputProps } from \"./input\";\nimport { HiEye } from \"react-icons/hi\";\n\nexport function PasswordInput({ wrapperRef, ...props }: TextInputProps) {\n const [showPassword, setShowPassword] = React.useState(false);\n\n return (\n <Input\n wrapperRef={wrapperRef}\n {...props}\n type={showPassword ? \"text\" : \"password\"}\n append={\n <IconButton\n onPress={() => setShowPassword((p) => !p)}\n size=\"sm\"\n variant=\"light\"\n >\n <HiEye size={16} />\n </IconButton>\n }\n ></Input>\n );\n}\n","export { Textarea } from './textarea'","import React from \"react\";\nimport { AriaTextFieldOptions, useTextField } from \"react-aria\";\nimport { Flex } from \"../flex\";\nimport { InputError } from \"../input-error\";\nimport { InputLabel } from \"../input-label\";\nimport { Text } from \"../text/text\";\nimport { useTheme } from \"../theme\";\nimport { FieldProps } from \"../form/field\";\n\ninterface TextareaProps\n extends AriaTextFieldOptions<\"textarea\">,\n FieldProps<\"input\"> {\n resize?: \"none\" | \"both\" | \"horizontal\" | \"vertical\";\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport const Textarea = React.forwardRef<HTMLDivElement, TextareaProps>(\n (\n {\n appearance = \"outline\",\n resize,\n label,\n description,\n error,\n color = \"gray\",\n style,\n radius,\n ...props\n },\n ref\n ) => {\n const textAreaRef = React.useRef(null);\n const { labelProps, inputProps, errorMessageProps, descriptionProps } =\n useTextField(\n {\n ...props,\n inputElementType: \"textarea\",\n label,\n description,\n errorMessage: error,\n },\n textAreaRef\n );\n\n const theme = useTheme();\n\n return (\n <Flex\n data-color={color}\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n style={style}\n className=\"p-input-group\"\n ref={ref}\n stack\n gap={\"2xs\"}\n >\n {label && <InputLabel {...labelProps}>{label}</InputLabel>}\n <textarea\n className=\"p-input-control p-text-area\"\n disabled={props.isDisabled}\n data-has-error={!!error}\n data-resize={resize}\n data-appearance={appearance}\n {...inputProps}\n ></textarea>\n {error && <InputError {...errorMessageProps}>{error}</InputError>}\n {description && (\n <Text\n lineHeight={\"base\"}\n {...descriptionProps}\n variant={\"light\"}\n as=\"div\"\n size={\"sm\"}\n >\n {description}\n </Text>\n )}\n </Flex>\n );\n }\n);\n\nTextarea.displayName = \"Textarea\";\n","export { Checkbox } from './checkbox';\nexport { CheckboxGroup } from './checkbox-group';","import { useToggleState } from \"react-stately\";\nimport React from \"react\";\nimport {\n AriaCheckboxProps,\n useCheckbox,\n VisuallyHidden,\n useFocusRing,\n useCheckboxGroupItem,\n AriaCheckboxGroupItemProps,\n} from \"react-aria\";\nimport { GroupContext } from \"./checkbox-group\";\nimport { Box } from \"../box\";\nimport { Color } from \"../../utils/theme\";\nimport { cx } from \"../../utils/dom\";\nimport { StyleProps } from \"../../utils/types\";\n\nexport interface CheckboxVariantProps\n extends StyleProps<\"wrapper\" | \"icon\" | \"checkbox\"> {\n appearance?: \"outline\" | \"filled\";\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n shape?: \"sharp\" | \"round\";\n color?: Color;\n}\nexport interface CheckboxProps extends AriaCheckboxProps, CheckboxVariantProps {\n className?: string;\n}\n\nexport const Checkbox = React.forwardRef<HTMLLabelElement, CheckboxProps>(\n (props, ref) => {\n const {\n appearance,\n size,\n shape = \"round\",\n color,\n className,\n classNames,\n styles,\n style,\n ...otherProps\n } = props;\n\n // check if checkbox is rendered in a group context\n const groupContext = React.useContext(GroupContext);\n const groupState = groupContext?.state;\n const groupProps = groupContext?.props;\n const isWithinGroup = groupState != null;\n\n const singleState = useToggleState(props);\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n const single = useCheckbox(otherProps, singleState, inputRef);\n const group =\n groupState &&\n useCheckboxGroupItem(\n otherProps as AriaCheckboxGroupItemProps,\n groupState,\n inputRef\n );\n\n const { isFocusVisible, focusProps } = useFocusRing();\n\n const inputProps = isWithinGroup ? group?.inputProps : single.inputProps;\n const state = isWithinGroup ? groupState : singleState;\n const isSelected = isWithinGroup\n ? groupState.isSelected(props.value ?? \"\")\n : state.isSelected;\n\n function getRadius() {\n const resolvedShape = shape || groupProps?.shape || undefined;\n\n if (resolvedShape === \"sharp\") {\n return \"none\";\n }\n\n if (resolvedShape === \"round\") {\n return \"md\";\n }\n\n return undefined;\n }\n\n const resolvedColor = color || groupProps?.color || undefined;\n const resolvedAppearance =\n appearance || groupProps?.appearance || \"outline\";\n const resolvedSize = size || groupProps?.size || \"md\";\n\n return (\n <label\n style={{ ...style, ...styles?.wrapper }}\n className={cx(className, \"p-checkbox\", classNames?.wrapper)}\n data-disabled={inputProps?.disabled}\n ref={ref}\n >\n <VisuallyHidden>\n <input\n type=\"checkbox\"\n ref={inputRef}\n {...inputProps}\n {...focusProps}\n />\n </VisuallyHidden>\n <div\n style={{ ...style, ...styles?.checkbox }}\n data-color={resolvedColor}\n data-radius={getRadius()}\n className={cx([\"p-fake-checkbox\", classNames?.checkbox])}\n data-focused={isFocusVisible}\n aria-hidden=\"true\"\n data-checked={isSelected && !props.isIndeterminate}\n data-indeterminate={props.isIndeterminate}\n data-size={resolvedSize}\n data-appearance={resolvedAppearance}\n >\n {isSelected && !props.isIndeterminate && (\n <svg\n className={cx([\"p-checkbox-icon\", classNames?.icon])}\n stroke=\"white\"\n width={\"0.75rem\"}\n height={\"0.75rem\"}\n viewBox=\"0 0 18 18\"\n >\n <polyline\n points=\"1 9 7 14 15 4\"\n fill=\"none\"\n strokeWidth={3}\n strokeDasharray={22}\n strokeDashoffset={isSelected ? 44 : 66}\n style={{\n transition: \"all 400ms\",\n }}\n />\n </svg>\n )}\n\n {props.isIndeterminate && (\n <Box\n className={cx([\"p-checkbox-icon\", classNames?.icon])}\n style={{\n background: \"var(--color-12)\",\n width: \"70%\",\n height: 2,\n borderRadius: 4,\n }}\n ></Box>\n )}\n </div>\n {otherProps.children}\n </label>\n );\n }\n);\n\nCheckbox.displayName = \"checkbox\";\n","import React from \"react\";\nimport { CheckboxGroupState, useCheckboxGroupState } from \"react-stately\";\nimport { AriaCheckboxGroupProps, useCheckboxGroup } from \"react-aria\";\nimport { Flex, FlexProps } from \"../flex\";\nimport { Text } from \"../text\";\nimport { InputError } from \"../input-error\";\nimport { CheckboxVariantProps } from \"./checkbox\";\n\nexport const GroupContext = React.createContext<{\n state: CheckboxGroupState;\n props: CheckboxVariantProps;\n} | null>(null);\n\ninterface CheckboxGroupProps\n extends AriaCheckboxGroupProps,\n CheckboxVariantProps {\n children?: React.ReactNode;\n}\n\nexport const CheckboxGroup = React.forwardRef<\n HTMLDivElement,\n CheckboxGroupProps & FlexProps\n>((props, ref) => {\n const {\n children,\n align,\n justify,\n label,\n description,\n errorMessage,\n size,\n appearance,\n color,\n shape,\n } = props;\n\n const state = useCheckboxGroupState(props);\n const { groupProps, labelProps, descriptionProps, errorMessageProps } =\n useCheckboxGroup(props, state);\n\n return (\n <Flex\n align={align}\n justify={justify}\n ref={ref}\n stack\n gap={\"2xs\"}\n {...groupProps}\n >\n <Text {...labelProps}>{label}</Text>\n <GroupContext.Provider\n value={{ state, props: { size, appearance, color, shape } }}\n >\n {children}\n </GroupContext.Provider>\n {description && (\n <Text\n lineHeight={\"base\"}\n variant=\"lighter\"\n size=\"xs\"\n {...descriptionProps}\n >\n {description}\n </Text>\n )}\n {errorMessage && (\n <InputError {...errorMessageProps}>{errorMessage}</InputError>\n )}\n </Flex>\n );\n});\n\nCheckboxGroup.displayName = \"CheckboxGroup\";\n","import {\n DropdownMenu as DropdownRoot,\n Menu,\n DropdownTrigger,\n MenuItem,\n MenuSection,\n} from \"./dropdown-menu\";\n\ntype DropdownMenuType = {\n Root: typeof DropdownRoot;\n Menu: typeof Menu;\n Trigger: typeof DropdownTrigger;\n Item: typeof MenuItem;\n Section: typeof MenuSection;\n};\n\nconst DropdownMenu: DropdownMenuType = {\n Root: DropdownRoot,\n Menu,\n Trigger: DropdownTrigger,\n Item: MenuItem,\n Section: MenuSection,\n};\n\nexport { DropdownMenu };\n","import * as React from \"react\";\nimport {\n AriaButtonProps,\n AriaMenuProps,\n Placement,\n mergeProps,\n useMenu,\n useMenuItem,\n useMenuSection,\n useMenuTrigger,\n usePress,\n useSeparator,\n} from \"react-aria\";\nimport {\n Item,\n ItemProps,\n MenuTriggerProps,\n MenuTriggerState,\n Node,\n Section,\n SectionProps,\n TreeState,\n useMenuTriggerState,\n useTreeState,\n} from \"react-stately\";\nimport { Flex } from \"../flex\";\nimport { Button } from \"../button\";\nimport { InternalPopover as Popover } from \"../internal-popover\";\nimport { useTheme } from \"../theme\";\nimport { cx } from \"../../utils/dom\";\nimport { StyleProps } from \"../../utils/types\";\nimport { Text } from \"../text\";\nimport { Color } from \"../../utils/theme\";\nimport { HiCheck } from \"react-icons/hi\";\n\ninterface DropdownProps extends MenuTriggerProps {\n something?: string;\n}\ninterface DropdownContextValue {\n triggerState: MenuTriggerState;\n triggerRef: React.MutableRefObject<HTMLElement>;\n triggerProps: AriaButtonProps;\n menuProps: any;\n}\nconst DropdownContext = React.createContext<DropdownContextValue | null>(null);\n\nexport function DropdownMenu({\n children,\n ...props\n}: React.PropsWithChildren<DropdownProps>) {\n const triggerRef = React.useRef<HTMLElement>(null);\n const triggerState = useMenuTriggerState(props);\n\n const { menuProps, menuTriggerProps: triggerProps } = useMenuTrigger(\n props,\n triggerState,\n triggerRef\n );\n\n return (\n <DropdownContext.Provider\n value={{\n triggerRef: triggerRef as React.MutableRefObject<HTMLElement>,\n triggerState,\n triggerProps,\n menuProps,\n }}\n >\n {children}\n </DropdownContext.Provider>\n );\n}\n\ninterface DropdownTriggerProps extends StyleProps {\n asChild?: boolean;\n useClickEvent?: boolean;\n}\n\nexport function DropdownTrigger({\n asChild,\n children,\n useClickEvent,\n}: React.PropsWithChildren<DropdownTriggerProps>) {\n const ctx = React.useContext(DropdownContext);\n\n const { pressProps, isPressed } = usePress({\n ...ctx?.triggerProps,\n ref: ctx?.triggerRef,\n });\n\n const triggerProps = useClickEvent ? pressProps : ctx?.triggerProps;\n\n if (asChild) {\n const child = React.Children.only(children);\n return React.cloneElement(child as React.ReactElement, {\n ...triggerProps,\n ref: ctx?.triggerRef,\n \"data-pressed\": isPressed,\n });\n }\n\n return (\n <Button\n {...ctx?.triggerProps}\n ref={ctx?.triggerRef as React.RefObject<HTMLButtonElement>}\n >\n {children}\n </Button>\n );\n}\n\ninterface MenuProps<T> extends AriaMenuProps<T>, StyleProps {\n menuHeader?: React.ReactNode | (() => React.ReactNode);\n menuFooter?: React.ReactNode | (() => React.ReactNode);\n minWidth?: number | string;\n maxHeight?: number | string;\n maxWidth?: number | string;\n placement?: Placement;\n offset?: number;\n color?: Color;\n}\n\nexport function Menu<T extends object>({\n placement = \"bottom start\",\n offset = 8,\n ...props\n}: MenuProps<T>) {\n const ctx = React.useContext(DropdownContext);\n\n if (!ctx?.triggerState.isOpen) {\n return null;\n }\n\n return (\n <Popover\n placement={placement}\n offset={offset}\n state={ctx?.triggerState}\n triggerRef={ctx?.triggerRef}\n >\n <MenuInner {...mergeProps(props, ctx.menuProps)} />\n </Popover>\n );\n}\n\nfunction MenuInner<T extends object>({\n menuHeader,\n menuFooter,\n className,\n color,\n maxHeight = 300,\n minWidth = 200,\n maxWidth,\n ...props\n}: MenuProps<T>) {\n const state = useTreeState(props);\n const ref = React.useRef(null);\n\n const { menuProps } = useMenu(\n {\n ...props,\n autoFocus: true,\n isVirtualized: true,\n },\n state,\n ref\n );\n const theme = useTheme();\n\n function resolvedMenuHeader() {\n if (typeof menuHeader === \"function\") {\n return menuHeader();\n }\n return menuHeader;\n }\n\n function resolvedMenuFooter() {\n if (typeof menuFooter === \"function\") {\n return menuFooter();\n }\n return menuFooter;\n }\n\n return (\n <Flex\n stack\n ref={ref}\n {...menuProps}\n data-color={color ?? theme?.color ?? \"violet\"}\n data-radius={theme?.radius ?? \"lg\"}\n className={cx(\"p-list-box-wrapper\", className)}\n style={{\n minWidth: `max(200px, ${`${minWidth}`.replace(\"px\", \"\")}px)`,\n maxWidth: `${`${maxWidth}`.replace(\"px\", \"\")}px`,\n maxHeight: `${`${maxHeight}`.replace(\"px\", \"\")}px`,\n }}\n >\n {resolvedMenuHeader()}\n <ul>\n {[...state.collection].map((item) => {\n if (item.type === \"section\") {\n return (\n <MenuSectionInner\n state={state}\n section={item}\n key={item.key}\n {...item.props}\n />\n );\n }\n\n return (\n <MenuItemInner\n {...item.props}\n state={state}\n item={item}\n key={item.key}\n />\n );\n })}\n </ul>\n\n {resolvedMenuFooter()}\n </Flex>\n );\n}\n\ninterface MenuItemProps<T extends object> {\n state: TreeState<T>;\n item: Node<T>;\n}\n\ninterface MenuItemRenderProps {\n icon?: React.ReactNode;\n label?: React.ReactNode;\n description?: React.ReactNode;\n asChild?: boolean;\n className?: string;\n style?: React.CSSProperties;\n isReadOnly?: boolean;\n color?: Color;\n onAction?: () => void;\n}\n\nfunction MenuItemInner<T extends object>({\n state,\n item,\n ...otherProps\n}: MenuItemProps<T> & MenuItemRenderProps) {\n const ref = React.useRef(null);\n const {\n menuItemProps,\n isSelected,\n isFocused,\n isPressed,\n isDisabled,\n descriptionProps,\n } = useMenuItem({ key: item?.key }, state, ref);\n\n const { className, style, isReadOnly, icon, color, description, label } =\n otherProps;\n\n return (\n <li\n ref={ref}\n className={cx(className, \"p-list-option p-menu-item\")}\n data-selected={isSelected}\n data-focused={isFocused}\n data-pressed={isPressed}\n data-disabled={isDisabled}\n data-readonly={isReadOnly}\n style={style}\n data-color={color}\n {...menuItemProps}\n >\n <Flex align=\"center\">\n {icon && (\n <Flex className=\"p-list-option-icon-wrapper\">\n {React.isValidElement(icon) &&\n React.cloneElement(icon as React.ReactElement, {\n className: \"p-list-option-icon\",\n size: 18,\n ...(icon as React.ReactElement)?.props,\n })}\n </Flex>\n )}\n\n <Flex gap=\"3xs\" stack>\n <Text as=\"div\" color=\"black\">\n {label ?? item.rendered}\n </Text>\n {description && (\n <Text as=\"div\" lineHeight=\"base\" {...descriptionProps}>\n {description}\n </Text>\n )}\n </Flex>\n </Flex>\n {isSelected && <HiCheck className=\"selected-marker\" />}\n </li>\n );\n}\n\ninterface MenuSectionProps<T extends object> {\n section: Node<T>;\n state: TreeState<T>;\n}\n\nfunction MenuSectionInner<T extends object>({\n state,\n section,\n className,\n style,\n}: MenuSectionProps<T> & MenuItemRenderProps) {\n const { itemProps, headingProps, groupProps } = useMenuSection({\n heading: section?.rendered,\n \"aria-label\": section?.[\"aria-label\"],\n });\n\n const { separatorProps } = useSeparator({ elementType: \"li\" });\n\n function getChildren() {\n if (state?.collection.getChildren) {\n return [...state.collection.getChildren(section.key)];\n }\n return [...section.childNodes];\n }\n\n return (\n <Flex\n stack\n as=\"ul\"\n style={style}\n className={cx(className, \"p-list-section\")}\n >\n {section.key !== state.collection.getFirstKey() && (\n <li className=\"p-list-separator\" {...separatorProps} />\n )}\n <li {...itemProps}>\n {section?.rendered && (\n <Text as=\"h4\" className=\"p-list-section-header\" {...headingProps}>\n {section?.rendered}\n </Text>\n )}\n\n <ul {...groupProps}>\n {getChildren().map((item) => {\n return (\n <MenuItemInner\n {...item.props}\n state={state}\n item={item}\n key={item.key}\n />\n );\n })}\n </ul>\n </li>\n </Flex>\n );\n}\n\nexport const MenuItem = Item as <T>(\n props: ItemProps<T> & MenuItemRenderProps\n) => JSX.Element;\n\nexport const MenuSection = Section as <T>(\n props: SectionProps<T> & MenuItemRenderProps\n) => JSX.Element;\n","export { InternalPopover } from \"./internal-popover\";\n","import * as React from \"react\";\nimport { AriaPopoverProps, Overlay, usePopover } from \"react-aria\";\nimport { OverlayTriggerState } from \"react-stately\";\nimport { useTheme } from \"../theme/theme-provider\";\nimport { cx, mergeRefs } from \"../../utils/dom\";\nimport { StyleProps } from \"../../utils/types\";\n\ninterface PopoverProps\n extends Omit<AriaPopoverProps, \"popoverRef\">,\n StyleProps<\"wrapper\" | \"underlay\"> {\n state: OverlayTriggerState;\n children: React.ReactNode;\n popoverRef?: React.RefObject<HTMLDivElement>;\n}\n\nexport function InternalPopover({\n state,\n children,\n popoverRef,\n style,\n styles,\n classNames,\n className,\n ...props\n}: PopoverProps) {\n const internalPopoverRef = React.useRef(null);\n\n const theme = useTheme();\n\n const { popoverProps, underlayProps } = usePopover(\n { ...props, popoverRef: internalPopoverRef },\n state\n );\n\n const { style: internalStyle, ...otherPopoverProps } = popoverProps;\n\n return (\n <Overlay>\n <div\n {...underlayProps}\n style={styles?.underlay}\n className={cx([\"underlay\", classNames?.underlay])}\n ></div>\n <div\n data-color={theme?.color}\n data-radius={theme?.radius}\n ref={mergeRefs(popoverRef, internalPopoverRef)}\n className={cx([\"p-popover\", className, classNames?.wrapper])}\n style={{ ...internalStyle, ...style, ...styles?.wrapper }}\n {...otherPopoverProps}\n >\n {children}\n </div>\n </Overlay>\n );\n}\n","export { ComboBox } from \"./combo-box\";\n","import * as React from \"react\";\nimport { Flex } from \"../flex\";\nimport { InputLabel } from \"../input-label\";\nimport { InputError } from \"../input-error\";\nimport { IconButton } from \"../button\";\n\nimport { HiSelector } from \"react-icons/hi\";\nimport { Loader } from \"../loader\";\nimport { useComboBoxState } from \"react-stately\";\nimport { AriaComboBoxProps, useComboBox, useFilter } from \"react-aria\";\nimport { omit } from \"../../utils/object\";\nimport { InternalPopover as Popover } from \"../internal-popover\";\nimport { ListBox } from \"../list-box\";\nimport { cx } from \"../../utils/dom\";\nimport { useTheme } from \"../theme\";\nimport { ListBoxProps, ListBoxRenderProps } from \"../list-box/list-box\";\nimport { Color } from \"../../utils/theme\";\nimport { renderListBoxContent } from \"../list-box/list-box.utils\";\nimport { FieldProps } from \"../form/field\";\n\ninterface ComboBoxProps<T>\n extends Omit<FieldProps<\"input\" | \"trigger\" | \"listbox\">, \"children\">,\n Omit<AriaComboBoxProps<T>, \"children\">,\n Omit<ListBoxRenderProps<T>, \"\"> {\n dropdownArrow?: React.ReactNode | ((props: any) => React.ReactNode);\n showDropdownButton?: boolean;\n placeholder?: string;\n listBoxColor?: Color;\n isLoading?: boolean;\n}\n\nexport const _ComboBox = <T extends object>(\n {\n label,\n error,\n showDropdownButton = true,\n dropdownArrow = <HiSelector size={18} />,\n className,\n style,\n color = \"gray\",\n radius,\n size = \"md\",\n appearance = \"outline\",\n listBoxColor,\n append,\n prepend,\n isLoading,\n ...props\n }: ComboBoxProps<T>,\n ref: React.Ref<HTMLDivElement>\n) => {\n const theme = useTheme();\n const { contains } = useFilter({ sensitivity: \"base\" });\n const state = useComboBoxState({\n ...props,\n children: renderListBoxContent(props as ListBoxProps<T>),\n defaultFilter: contains,\n });\n\n const inputRef = React.useRef<HTMLInputElement>(null);\n const buttonRef = React.useRef<HTMLButtonElement>(null);\n const listBoxRef = React.useRef<HTMLUListElement>(null);\n const popoverRef = React.useRef<HTMLDivElement>(null);\n const wrapperRef = React.useRef<HTMLDivElement>(null);\n\n const { inputProps, buttonProps, listBoxProps } = useComboBox(\n {\n inputRef,\n buttonRef,\n listBoxRef,\n popoverRef,\n ...props,\n },\n state\n );\n\n function resolvedDropdownArrow() {\n if (typeof dropdownArrow === \"function\") {\n return dropdownArrow({ color: \"gray\", size: \"md\" });\n }\n return dropdownArrow;\n }\n\n return (\n <Flex\n data-color={color ?? theme?.color ?? \"gray\"}\n data-size={size}\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n style={style}\n className={cx(\"p-combo-box p-input-group\", className)}\n ref={ref}\n stack\n gap=\"3xs\"\n stretchX\n >\n {label && <InputLabel>{label}</InputLabel>}\n <Flex\n position=\"relative\"\n gap=\"3xs\"\n ref={wrapperRef}\n align=\"center\"\n data-appearance={appearance}\n className=\"p-input-control p-combo-box-control\"\n >\n {prepend}\n <input\n className=\"p-combo-box-input p-text-input-el\"\n onChange={(e) => inputProps.onChange?.(e)}\n ref={inputRef}\n data-has-prepend={!!prepend}\n data-size=\"md\"\n {...omit(inputProps as any, [\"size\", \"onChange\"])}\n ></input>\n\n {append}\n {isLoading && <Loader size=\"xs\" />}\n {showDropdownButton && (\n <IconButton\n {...buttonProps}\n variant=\"ghost\"\n color=\"gray\"\n radius=\"lg\"\n className=\"p-combo-box-button\"\n ref={buttonRef}\n >\n {resolvedDropdownArrow()}\n </IconButton>\n )}\n </Flex>\n {error && <InputError>{error}</InputError>}\n {state.isOpen && (\n <Popover\n popoverRef={popoverRef}\n offset={8}\n state={state}\n triggerRef={wrapperRef}\n >\n <ListBox\n color={listBoxColor ?? theme?.color ?? \"gray\"}\n width={wrapperRef.current?.getBoundingClientRect().width}\n listBoxRef={listBoxRef}\n state={state}\n {...listBoxProps}\n ></ListBox>\n </Popover>\n )}\n </Flex>\n );\n};\n\n_ComboBox.displayName = \"ComboBox\";\nexport const ComboBox = React.forwardRef(_ComboBox) as typeof _ComboBox;\n","export { ListBox } from \"./list-box\";\nexport {\n CollectionItem as ListBoxItem,\n CollectionSection as ListBoxSection,\n} from \"../collections\";\n","import * as React from \"react\";\nimport {\n AriaListBoxOptions,\n AriaListBoxSectionProps,\n AriaOptionProps,\n useListBox,\n useListBoxSection,\n useOption,\n} from \"react-aria\";\nimport { ListState, Node, useListState } from \"react-stately\";\nimport { CollectionChildren, ID, StyleProps } from \"../../utils/types\";\nimport { Text } from \"../text\";\nimport { Flex } from \"../flex\";\nimport { useListBoxContent } from \"./list-box.utils\";\nimport { Color } from \"../../utils/theme\";\nimport { ListBoxProvider, useListBoxContext } from \"./list-box-provider\";\nimport { useTheme } from \"../theme\";\nimport { cx, mergeRefs } from \"../../utils/dom\";\nimport {\n CollectionItemProps,\n CollectionSectionProps,\n} from \"../collections/collections.types\";\nexport interface ListBoxRenderProps<T> {\n children?: CollectionChildren<T>; // TODO - type this properly\n labelKey?: keyof T | string; // TODO - type this properly\n valueKey?: keyof T | string; // TODO - type this properly\n sectionKey?: keyof T;\n state?: ListState<T>;\n color?: Color;\n width?: number | string;\n showSectionSeparator?: boolean;\n showSelectionIndicator?: boolean;\n renderOption?: (item: T) => React.ReactNode;\n renderSelectionIndicator?: (item: T) => React.ReactNode;\n renderSectionLabel?: (item: T) => React.ReactNode;\n renderEmpty?: () => React.ReactNode;\n}\n\nexport interface ListBoxProps<T>\n extends AriaListBoxOptions<T>,\n ListBoxRenderProps<T>,\n StyleProps<\"wrapper\" | \"label\" | \"section\" | \"option\"> {\n listBoxRef?: React.RefObject<HTMLUListElement>;\n}\n\nexport function ListBox({\n state,\n color,\n width = 300,\n listBoxRef,\n renderEmpty,\n classNames,\n className,\n style,\n styles,\n ...props\n}: ListBoxProps<any>) {\n const children = useListBoxContent(props);\n const internalState = useListState({\n ...props,\n children: children,\n });\n const listRef = React.useRef(null);\n const listState = state || internalState;\n const { listBoxProps } = useListBox(\n { ...props, label: props.label ?? \"Select an option\" },\n listState,\n listRef\n );\n\n const options = [...listState.collection];\n\n const theme = useTheme();\n\n function renderEmptyState() {\n return (\n renderEmpty?.() ?? (\n <Text color=\"gray\" variant=\"lighter\">\n No options\n </Text>\n )\n );\n }\n\n return (\n <ListBoxProvider {...props}>\n <Flex\n as=\"ul\"\n stack\n gap=\"none\"\n className={cx(\"p-list-box-wrapper\", classNames?.wrapper, className)}\n ref={mergeRefs(listRef, listBoxRef)}\n data-radius=\"lg\"\n data-color={color ?? theme?.color}\n style={{ width: width, ...style, ...styles?.wrapper }}\n {...listBoxProps}\n >\n {options.length === 0 && (\n <Flex justify=\"center\" align=\"center\" style={{ height: 50 }}>\n {renderEmptyState()}\n </Flex>\n )}\n {options.map((item) => {\n return item.type === \"section\" ? (\n <ListSection\n className={classNames?.section}\n section={item}\n state={listState}\n key={item.key}\n />\n ) : (\n <ListOption\n className={classNames?.option}\n state={listState}\n item={item}\n key={item.key}\n />\n );\n })}\n </Flex>\n </ListBoxProvider>\n );\n}\n\ninterface OptionProps<T> extends AriaOptionProps, StyleProps {\n item: Node<T>;\n state: ListState<T>;\n}\n\nfunction ListOption({ state, item }: OptionProps<any>) {\n const optionRef = React.useRef(null);\n const {\n optionProps,\n isDisabled,\n isFocusVisible,\n isFocused,\n isPressed,\n isSelected,\n } = useOption({ key: item.key }, state, optionRef);\n\n const { showSelectionIndicator = true, renderSelectionIndicator } =\n useListBoxContext().props;\n\n const {\n className,\n classNames,\n style,\n styles,\n color,\n textValue,\n title,\n ...otherProps\n } = item.props as CollectionItemProps<any>;\n\n return (\n <li\n style={{ ...style, ...styles?.wrapper }}\n className={cx(className, \"p-list-option\", classNames?.wrapper)}\n data-disabled={isDisabled}\n data-focus-visible={isFocusVisible}\n data-focused={isFocused}\n data-pressed={isPressed}\n data-selected={isSelected}\n data-color={color}\n {...optionProps}\n {...otherProps}\n ref={optionRef}\n data-text-value={textValue}\n data-title={title}\n >\n {item.rendered}\n {isSelected &&\n showSelectionIndicator &&\n (renderSelectionIndicator?.(item) ?? <div>/</div>)}\n </li>\n );\n}\n\ntype ListSectionProps<T> = AriaListBoxSectionProps &\n StyleProps<\"wrapper\" | \"separator\" | \"heading\" | \"items\"> & {\n __parrotKey?: ID;\n state: ListState<T>;\n section: Node<T>;\n };\nfunction ListSection({ state, section }: ListSectionProps<any>) {\n const { itemProps, headingProps, groupProps } = useListBoxSection({\n heading: section?.rendered,\n \"aria-label\": section[\"aria-label\"],\n });\n\n const listBoxContext = useListBoxContext();\n\n const { className, classNames, style, styles } =\n section.props as CollectionSectionProps<any>;\n\n const children = React.useMemo(() => {\n if (state.collection.getChildren) {\n return [...state.collection.getChildren(section.key)];\n }\n\n return [];\n }, []);\n\n return (\n <Flex\n gap=\"sm\"\n stack\n className={cx(className, \"p-list-section\", classNames?.wrapper)}\n style={{ ...style, ...styles?.wrapper }}\n >\n {section.key !== state.collection.getFirstKey() &&\n listBoxContext.props.showSectionSeparator && (\n <li\n style={styles?.separator}\n className={cx(\"p-list-separator\", classNames?.separator)}\n ></li>\n )}\n\n <Flex gap={\"none\"} stack as=\"li\" {...itemProps}>\n {section.rendered && (\n <Text\n style={styles?.heading}\n className={cx(\"p-list-section-header\", classNames?.heading)}\n as=\"div\"\n variant=\"light\"\n {...headingProps}\n >\n {section.rendered}\n </Text>\n )}\n <ul className={cx(classNames?.items)} {...groupProps}>\n {children.map((node) => {\n return <ListOption item={node} key={node.key} state={state} />;\n })}\n </ul>\n </Flex>\n </Flex>\n );\n}\n","import * as React from \"react\";\nimport { ListBoxProps } from \"./list-box\";\nimport { CollectionItem, CollectionSection } from \"../collections\";\n\n// TODO: Decide if we want to keep doing this\n// This allows us to use components like Select and Menu withour having to constantly import Items and Section components.\n\n/**\n * This is a helper function to conditionally render children using the default render function API by react-aria.\n */\nexport function renderListBoxContent<T>({\n children,\n renderOption,\n valueKey,\n sectionKey,\n renderSectionLabel,\n labelKey,\n items,\n}: ListBoxProps<T>) {\n const hasChildren = React.Children.count(children) > 0;\n\n if (hasChildren) {\n return children;\n }\n\n if (items) {\n // eslint-disable-next-line react/display-name\n return (item: T) => {\n const label = (item as any)?.[labelKey ?? \"label\"];\n const value = (item as any)?.[valueKey ?? \"id\" ?? \"key\" ?? \"value\"];\n const sectionChildren = (item as any)?.[sectionKey ?? \"children\"] ?? [];\n\n if ((item as any)?.[sectionKey]) {\n return (\n <CollectionSection\n items={sectionChildren}\n key={value}\n title={renderSectionLabel?.(item)}\n >\n {(item) => (\n <CollectionItem\n textValue={(item as any)?.[labelKey ?? \"label\"]}\n key={(item as any)?.[valueKey ?? \"id\" ?? \"key\" ?? \"value\"]}\n >\n {renderOption?.(item as T) ??\n (item as any)?.[labelKey ?? \"label\"]}\n </CollectionItem>\n )}\n </CollectionSection>\n );\n }\n\n return (\n <CollectionItem textValue={label} key={value}>\n {renderOption?.(item) ?? label}\n </CollectionItem>\n );\n };\n }\n}\n\nexport function useListBoxContent<T>(props: ListBoxProps<T>) {\n const children = React.useMemo(() => {\n return renderListBoxContent(props);\n }, []);\n\n return children;\n}\n","import { Item, Section } from \"react-stately\";\nimport {\n CollectionItemProps,\n CollectionSectionProps,\n} from \"./collections.types\";\n\nexport const CollectionItem = Item as <T>(\n props: CollectionItemProps<T>\n) => JSX.Element;\n\nexport const CollectionSection = Section as <T>(\n props: CollectionSectionProps<T>\n) => JSX.Element;\n","import * as React from \"react\";\nimport { ListBoxProps } from \"./list-box\";\n\nconst ListBoxContext = React.createContext<{ props: ListBoxProps<any> } | null>(\n null\n);\n\nexport function ListBoxProvider(\n props: React.PropsWithChildren<ListBoxProps<any>>\n) {\n return (\n <ListBoxContext.Provider value={{ props }}>\n {props.children}\n </ListBoxContext.Provider>\n );\n}\n\nexport function useListBoxContext() {\n const ctx = React.useContext(ListBoxContext);\n if (!ctx) {\n throw new Error(\n \"ListBox components must be rendered within the ListBoxProvider\"\n );\n }\n\n return ctx;\n}\n","export { Radio, RadioGroup } from './radio';\nexport {RadioCard} from './radio-card';","import React from \"react\";\nimport {\n AriaRadioGroupProps,\n AriaRadioProps,\n useRadio,\n useRadioGroup,\n VisuallyHidden,\n} from \"react-aria\";\nimport { RadioGroupState, useRadioGroupState } from \"react-stately\";\nimport { Flex, FlexProps } from \"../flex\";\nimport { InputError } from \"../input-error\";\nimport { Text } from \"../text\";\nimport { InputLabel } from \"../input-label\";\nimport { cx } from \"../../utils/dom\";\nimport { Color, InputAppearance } from \"../../utils/theme\";\n\nexport interface RadioProps extends AriaRadioProps {\n className?: string;\n style?: React.CSSProperties;\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\";\n appearance?: InputAppearance;\n color?: Color;\n}\n\nexport const RadioContext = React.createContext<RadioGroupState | null>(null);\n\nexport const Radio = React.forwardRef<HTMLLabelElement, RadioProps>(\n (props, ref) => {\n const state = React.useContext(RadioContext);\n\n const {\n size = \"sm\",\n className,\n style,\n appearance,\n color,\n ...otherProps\n } = props;\n if (!state) throw new Error(\"Radio must be used within a RadioGroup\");\n\n const inputRef = React.useRef(null);\n const { inputProps } = useRadio(otherProps, state, inputRef);\n\n return (\n <label style={style} className={cx([className, \"p-radio\"])} ref={ref}>\n <VisuallyHidden>\n <input {...inputProps} ref={inputRef}></input>\n </VisuallyHidden>\n <div\n data-color={color}\n className=\"p-fake-radio\"\n data-appearance={appearance}\n data-checked={inputProps.checked}\n data-size={size}\n />\n {props.children}\n </label>\n );\n }\n);\n\ninterface RadioGroupProps extends AriaRadioGroupProps {\n children?: React.ReactNode;\n}\n\nexport const RadioGroup = React.forwardRef<\n HTMLDivElement,\n RadioGroupProps & FlexProps\n>(\n (\n {\n stack = true,\n direction,\n gap = \"xs\",\n rowGap,\n align,\n justify,\n wrap,\n columnGap,\n ...props\n },\n ref\n ) => {\n const { children, label, description, errorMessage } = props;\n const state = useRadioGroupState(props);\n const { radioGroupProps, labelProps, descriptionProps, errorMessageProps } =\n useRadioGroup(props, state);\n\n return (\n <Flex\n ref={ref}\n stack={stack}\n gap={gap}\n direction={direction}\n rowGap={rowGap}\n columnGap={columnGap}\n align={align}\n justify={justify}\n wrap={wrap}\n {...radioGroupProps}\n >\n {label && <InputLabel {...labelProps}>{label}</InputLabel>}\n {description && (\n <Text variant=\"light\" {...descriptionProps}>\n {description}\n </Text>\n )}\n\n <RadioContext.Provider value={state}>{children}</RadioContext.Provider>\n\n {errorMessage && (\n <InputError {...errorMessageProps}>{errorMessage}</InputError>\n )}\n </Flex>\n );\n }\n);\n\nRadioGroup.displayName = \"RadioGroup\";\nRadio.displayName = \"Radio\";\n","import * as React from \"react\";\nimport { AriaRadioProps, VisuallyHidden, useRadio } from \"react-aria\";\nimport { Flex } from \"../flex\";\nimport { Text } from \"../text\";\nimport { RadioContext } from \"./radio\";\nimport { Color, InputAppearance } from \"../../utils/theme\";\n\nexport interface RadioCardProps extends AriaRadioProps {\n title?: React.ReactNode;\n description?: React.ReactNode;\n children?: React.ReactNode;\n showIndicator?: boolean;\n appearance?: InputAppearance;\n color?: Color;\n}\n\nexport const RadioCard = React.forwardRef<HTMLLabelElement, RadioCardProps>(\n (\n {\n title,\n description,\n children,\n appearance,\n showIndicator = true,\n color,\n ...props\n },\n ref\n ) => {\n const state = React.useContext(RadioContext);\n if (!state) throw new Error(\"RadioCard must be used within a RadioGroup\");\n\n const inputRef = React.useRef(null);\n const { inputProps } = useRadio(props, state, inputRef);\n\n return (\n <label\n data-radius=\"lg\"\n className=\"p-radio-card\"\n data-color={color}\n data-appearance={appearance}\n data-checked={inputProps.checked}\n ref={ref}\n >\n <VisuallyHidden>\n <input {...inputProps} ref={inputRef} />\n </VisuallyHidden>\n {showIndicator && (\n <div\n className=\"p-radio-card-indicator p-fake-radio\"\n data-size=\"sm\"\n data-checked={inputProps.checked}\n />\n )}\n <Flex stretchX className=\"p-radio-card-content\" stack gap={\"xs\"}>\n {(title || description) && (\n <Flex gap={\"4xs\"} stack>\n {title && (\n <Text color={color} size=\"sm\">\n {title}\n </Text>\n )}\n {description && (\n <Text\n color={color}\n lineHeight={\"tall\"}\n size=\"xs\"\n variant=\"lighter\"\n >\n {description}\n </Text>\n )}\n </Flex>\n )}\n {children}\n </Flex>\n </label>\n );\n }\n);\n\nRadioCard.displayName = \"RadioCard\";\n","export { Select } from \"./select\";\nexport {\n CollectionItem as Option,\n CollectionSection as Section,\n} from \"../collections\";\n","import * as React from \"react\";\nimport { ListBox } from \"../list-box\";\nimport { Flex } from \"../flex\";\nimport { cx } from \"../../utils/dom\";\nimport { HiSelector } from \"react-icons/hi\";\nimport { useListState, useMenuTriggerState } from \"react-stately\";\nimport { Key, useMenuTrigger, usePress } from \"react-aria\";\nimport { ListBoxProps } from \"../list-box/list-box\";\nimport { useListBoxContent } from \"../list-box/list-box.utils\";\nimport { Tag } from \"../tag\";\nimport { Text } from \"../text\";\nimport { InternalPopover as Popover } from \"../internal-popover\";\nimport { useTheme } from \"../theme/theme-provider\";\nimport { Color } from \"../../utils/theme\";\nimport { useSpace } from \"../space/space\";\nimport { ID } from \"../../utils/types\";\nimport { isArray } from \"../../utils/assertions\";\nimport { Field, FieldProps } from \"../form/field\";\n\ntype SingleOrMultipleValue = ID | Array<ID>;\ninterface MockNativeOnChangeEvent {\n target: {\n value: SingleOrMultipleValue;\n name?: string;\n };\n}\nexport type SelectProps<T> = ListBoxProps<T> &\n FieldProps<\n | \"trigger\"\n | \"listbox\"\n | \"label\"\n | \"popover\"\n | \"description\"\n | \"errorMessage\"\n | \"value\"\n | \"placeholder\"\n > & {\n renderValue?: (value: T) => React.ReactNode;\n placeholder?: string;\n isDisabled?: boolean;\n name?: string;\n listBoxColor?: Color;\n value?: SingleOrMultipleValue;\n defaultValue?: SingleOrMultipleValue;\n onChange?(event: MockNativeOnChangeEvent): void;\n onSelectionChange?(keys: Array<Key>): void;\n };\n\nexport function Select<T>({\n label,\n selectionMode = \"single\",\n appearance = \"outline\",\n renderValue,\n color = \"gray\",\n error,\n description,\n size = \"sm\",\n radius,\n listBoxColor,\n className,\n value,\n onChange,\n onSelectionChange,\n style,\n classNames,\n styles,\n showSectionSeparator = true,\n showSelectionIndicator = true,\n ...props\n}: SelectProps<T>) {\n const isMultiple = selectionMode === \"multiple\";\n\n const _value = React.useMemo(() => {\n if (!value) return null;\n\n if (selectionMode === \"single\") {\n return [value];\n }\n\n if (isMultiple && !isArray(value)) {\n throw new Error(\n \"Select: value must be an array when selectionMode is multiple\"\n );\n }\n\n return value as Array<ID>;\n }, [value, selectionMode]);\n\n const children = useListBoxContent(props);\n\n const space = useSpace();\n const triggerState = useMenuTriggerState({});\n const listState = useListState({\n ...props,\n selectedKeys: _value,\n defaultSelectedKeys: _value,\n selectionMode: selectionMode,\n children: children,\n onSelectionChange(keys) {\n const keysToArray = [...keys];\n onSelectionChange?.(keysToArray);\n onChange?.({\n target: {\n value: isMultiple ? keysToArray : keysToArray[0],\n name: props.name,\n },\n });\n\n if (!isMultiple) {\n triggerState.close();\n }\n },\n } as ListBoxProps<any>);\n const triggerRef = React.useRef<HTMLDivElement>(null);\n\n const theme = useTheme();\n color = color ?? theme?.color;\n\n const { menuTriggerProps, menuProps } = useMenuTrigger(\n { type: \"listbox\", trigger: \"press\", isDisabled: false },\n triggerState,\n triggerRef\n );\n\n const { pressProps: triggerProps } = usePress(menuTriggerProps);\n\n const selectedItems = [...listState.selectionManager.selectedKeys].map(\n (item) => listState.collection.getItem(item)\n );\n\n const content = React.useMemo(() => {\n if (selectedItems.length === 0) {\n return (\n <Text\n style={styles?.placeholder}\n className={classNames?.placeholder}\n color={color}\n variant=\"lighter\"\n >\n {props.placeholder}\n </Text>\n );\n }\n\n if (isMultiple) {\n return (\n <Flex gap=\"3xs\" wrap=\"wrap\">\n {selectedItems.map(\n (item) =>\n renderValue?.(item?.value) ?? (\n <Tag size=\"md\" variant=\"pastel\" color={color} key={item?.key}>\n {item?.textValue}\n </Tag>\n )\n )}\n </Flex>\n );\n }\n\n return (\n <Text\n as=\"div\"\n variant=\"default\"\n color={color === \"gray\" ? \"black\" : color}\n className={cx(\"single-value\", classNames?.value)}\n style={styles?.value}\n >\n {renderValue?.(selectedItems[0]?.value) ??\n selectedItems[0]?.value?.[props.labelKey ?? \"label\"] ??\n selectedItems[0]?.textValue}\n </Text>\n );\n }, [selectedItems.length, isMultiple, selectedItems[0]?.value]);\n\n return (\n <div\n className={cx(\"p-select\", className, classNames?.wrapper)}\n style={{ ...style, ...styles?.wrapper }}\n >\n {/* implement hidden custom hidden select */}\n <Field\n replaceDefaultControlWrapper\n label={label}\n error={error}\n description={description}\n className={className}\n classNames={classNames}\n size={size}\n radius={radius}\n >\n <div\n style={styles?.trigger}\n data-selection-mode={selectionMode}\n tabIndex={0}\n role=\"button\"\n ref={triggerRef}\n color=\"gray\"\n className={cx(\n \"p-input-control\",\n \"p-select-trigger\",\n space.classNames,\n classNames?.trigger\n )}\n data-appearance={appearance}\n {...triggerProps}\n >\n {content}\n <HiSelector className=\"selector\" size={18} />\n </div>\n </Field>\n {triggerState.isOpen && (\n <Popover\n className={classNames?.popover}\n style={styles?.popover}\n placement=\"bottom start\"\n offset={4}\n shouldUpdatePosition\n triggerRef={triggerRef}\n state={triggerState}\n >\n <ListBox\n label={label}\n showSectionSeparator={showSectionSeparator}\n showSelectionIndicator={showSelectionIndicator}\n width={triggerRef.current?.getBoundingClientRect().width}\n color={listBoxColor ?? \"gray\"}\n shouldFocusOnHover\n state={listState}\n {...menuProps}\n {...props}\n />\n </Popover>\n )}\n </div>\n );\n}\n","export { Tag } from './tag';","import React from \"react\";\nimport { getRandomColor } from \"../../utils/helpers\";\nimport { Color, ColorVariant, borderRadiusShapeMap } from \"../../utils/theme\";\nimport { cx } from \"../../utils/dom\";\n\ntype TagProps = React.ComponentPropsWithoutRef<\"span\"> & {\n prepend?: React.ReactNode;\n append?: React.ReactNode;\n hashValue?: string;\n color?: Color;\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n shape?: \"pill\" | \"rounded\" | \"sharp\";\n variant?: ColorVariant;\n};\n\nexport const Tag = React.forwardRef<HTMLDivElement, TagProps>(\n (\n {\n prepend,\n append,\n children,\n hashValue,\n color,\n size = \"sm\",\n shape = \"rounded\",\n variant = \"light\",\n className,\n ...props\n },\n ref\n ) => {\n const randomColor = React.useMemo(() => {\n if (hashValue) {\n return getRandomColor(hashValue);\n }\n\n return \"gray\";\n }, []);\n\n return (\n <span\n className={cx(className, \"p-tag\")}\n data-radius={borderRadiusShapeMap[shape]}\n data-size={size}\n data-color={color ?? randomColor}\n data-variant={variant}\n ref={ref}\n {...props}\n >\n {prepend && prepend}\n {children}\n {append && append}\n </span>\n );\n }\n);\n\nTag.displayName = \"Tag\";\n","export { DateInput } from \"./date-input\";\nexport { Calendar } from \"./calendar\";\n","import * as React from \"react\";\nimport { Flex } from \"../flex\";\nimport { DateField } from \"./date-field\";\nimport { Calendar } from \"./calendar\";\nimport { AriaDatePickerProps, useDatePicker } from \"react-aria\";\nimport { DateValue, parseDate } from \"@internationalized/date\";\nimport { InternalPopover as Popover } from \"../internal-popover\";\nimport { useDatePickerState } from \"react-stately\";\nimport { IconButton } from \"../button\";\nimport { HiOutlineCalendar } from \"react-icons/hi\";\nimport { InputLabel } from \"../input-label\";\nimport { InputError } from \"../input-error\";\nimport { cx } from \"../../utils/dom\";\nimport { useSpace } from \"../space/space\";\nimport { useTheme } from \"../theme\";\nimport { FieldProps } from \"../form/field\";\n\nexport interface DateInputProps\n extends Omit<\n AriaDatePickerProps<DateValue>,\n \"value\" | \"onChange\" | \"defaultValue\"\n >,\n FieldProps<\"input\"> {\n numberOfMonths?: number;\n value?: string;\n defaultValue?: string;\n onChange?(value: string | null, dateObject?: DateValue | null): void;\n dropdownIcon?: React.ReactNode;\n}\n\nexport const DateInput = React.forwardRef<HTMLDivElement, DateInputProps>(\n (\n {\n appearance = \"outline\",\n size = \"md\",\n color,\n numberOfMonths,\n radius,\n dropdownIcon = <HiOutlineCalendar size={16} />,\n value,\n defaultValue,\n onChange,\n ...props\n },\n ref\n ) => {\n const space = useSpace();\n\n function proxyOnChange(date: DateValue) {\n onChange?.(date?.toString(), date);\n }\n\n const newProps = {\n ...props,\n value: value ? parseDate(value) : null,\n defaultValue: defaultValue ? parseDate(defaultValue) : null,\n onChange: proxyOnChange,\n } as AriaDatePickerProps<DateValue>;\n\n const state = useDatePickerState(newProps);\n const pickerRef = React.useRef(null);\n const {\n groupProps,\n calendarProps,\n fieldProps,\n buttonProps,\n errorMessageProps,\n labelProps,\n } = useDatePicker(newProps, state, pickerRef);\n\n const theme = useTheme();\n\n return (\n <Flex\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n data-size={size}\n className={cx(\"p-input-group\", space.compactItemWrapperAdjust)}\n stretchX\n stack\n gap={\"xs\"}\n >\n {props.label && <InputLabel {...labelProps}>{props.label}</InputLabel>}\n <Flex ref={ref} gap={\"xl\"} stretchX inline stack>\n <Flex\n className={cx(\n \"p-input-control\",\n \"date-picker-trigger\",\n space.classNames\n )}\n ref={pickerRef}\n justify={\"space-between\"}\n align={\"center\"}\n data-appearance={appearance}\n data-color={color}\n {...groupProps}\n >\n <DateField\n appearance={appearance}\n size={size}\n {...fieldProps}\n ></DateField>\n <IconButton\n size=\"sm\"\n variant=\"light\"\n color={color}\n {...buttonProps}\n >\n {dropdownIcon}\n </IconButton>\n </Flex>\n\n {state.isOpen && (\n <Popover\n offset={8}\n state={state}\n triggerRef={pickerRef}\n placement=\"bottom start\"\n >\n <Flex\n style={{ maxHeight: \"auto\" }}\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n >\n <Calendar\n color={color}\n {...calendarProps}\n numberOfMonths={numberOfMonths}\n ></Calendar>\n </Flex>\n </Popover>\n )}\n </Flex>\n {props.error && (\n <InputError {...errorMessageProps}>{props.error}</InputError>\n )}\n </Flex>\n );\n }\n);\n\nDateInput.displayName = \"DateInput\";\n","import { DateValue, GregorianCalendar } from \"@internationalized/date\";\nimport * as React from \"react\";\nimport {\n AriaDatePickerProps,\n useDateField,\n useDateSegment,\n useLocale,\n} from \"react-aria\";\nimport { Flex } from \"../flex\";\nimport { DateFieldState, useDateFieldState } from \"react-stately\";\nimport { DateSegment as DateSegmentType } from \"react-stately\";\nimport { Text } from \"../text\";\nimport { mergeRefs } from \"../../utils/dom\";\n\ninterface DateFieldProps extends AriaDatePickerProps<DateValue> {\n error?: string;\n}\n\nfunction createCalendar() {\n return new GregorianCalendar();\n}\n\nexport const DateField = React.forwardRef<HTMLDivElement, DateFieldProps>(\n (props, ref) => {\n const { locale } = useLocale();\n\n const state = useDateFieldState({\n ...props,\n locale,\n createCalendar,\n });\n\n const fieldRef = React.useRef(null);\n const { fieldProps } = useDateField(props, state, fieldRef);\n\n return (\n <Flex\n gap=\"none\"\n style={{ padding: \"4px 0px\", flex: 1 }}\n stretchY\n ref={mergeRefs(fieldRef, ref)}\n inline\n {...fieldProps}\n >\n {state.segments.map((segment, i) => {\n return (\n <DateSegment key={i} segment={segment} state={state}></DateSegment>\n );\n })}\n </Flex>\n );\n }\n);\n\nfunction DateSegment({\n segment,\n state,\n}: {\n segment: DateSegmentType;\n state: DateFieldState;\n}) {\n const ref = React.useRef(null);\n const { segmentProps } = useDateSegment(segment, state, ref);\n\n const segmentMaxValue = segment.maxValue ?? 0;\n\n return (\n <Flex\n className=\"p-date-input-segment\"\n align={\"center\"}\n justify={\"center\"}\n ref={ref}\n data-placeholder={segment.isPlaceholder}\n data-separator={segment.text === \"/\"}\n style={{\n minWidth: segmentMaxValue.toString().length + \"ch\",\n color: segment.text == \"/\" ? \"var(--color-6)\" : \"var(--color-12)\",\n }}\n {...segmentProps}\n >\n <Text\n size={\"sm\"}\n variant={segment.isPlaceholder ? \"dark\" : \"lighter\"}\n as=\"span\"\n aria-hidden=\"true\"\n style={{\n color: \"inherit\",\n display: \"block\",\n height: segment.isPlaceholder ? \"\" : 0,\n pointerEvents: \"none\",\n visibility: segment.isPlaceholder ? undefined : \"hidden\",\n position: segment.isPlaceholder ? undefined : \"absolute\",\n }}\n >\n {segment.placeholder}\n </Text>\n {segment.isPlaceholder ? \"\" : segment.text}\n </Flex>\n );\n}\n\nDateField.displayName = \"DateField\";\n","import { DateValue } from \"@react-types/calendar\";\nimport * as React from \"react\";\nimport {\n AriaCalendarCellProps,\n AriaCalendarGridProps,\n AriaCalendarProps,\n mergeProps,\n useCalendar,\n useCalendarCell,\n useCalendarGrid,\n useFocusRing,\n useLocale,\n} from \"react-aria\";\nimport { CalendarState, useCalendarState } from \"react-stately\";\nimport {\n CalendarDate,\n DateDuration,\n createCalendar,\n endOfMonth,\n getWeeksInMonth,\n isSameMonth,\n} from \"@internationalized/date\";\nimport { Flex } from \"../flex\";\nimport { IconButton } from \"../button\";\nimport { Text } from \"../text\";\nimport { HiChevronLeft, HiChevronRight } from \"react-icons/hi\";\nimport { range } from \"../../utils/array\";\nimport { Color } from \"../../utils/theme\";\n\ninterface CalendarProps extends AriaCalendarProps<DateValue> {\n numberOfMonths?: number;\n color?: Color;\n}\n\nexport const Calendar = React.forwardRef<HTMLDivElement, CalendarProps>(\n ({ numberOfMonths = 1, color, ...props }, ref) => {\n const { locale } = useLocale();\n const state = useCalendarState({\n ...props,\n locale,\n createCalendar,\n visibleDuration: { months: numberOfMonths },\n });\n\n const { calendarProps, prevButtonProps, nextButtonProps, title } =\n useCalendar(props, state);\n\n console.log(state);\n\n // function onMonthChange(month: string) {\n // state.setValue(\n // parseDate(\n // `${state.value.year}-${month.padStart(2, \"0\")}-${state.value.day\n // .toString()\n // .padStart(2, \"0\")}`\n // )\n // );\n // }\n\n // function onYearChange(year: string) {\n // state.setValue(\n // parseDate(\n // `${year}-${state.value.month\n // .toString()\n // .padStart(2, \"0\")}-${state.value.day.toString().padStart(2, \"0\")}`\n // )\n // );\n // }\n\n return (\n <Flex\n data-color={color}\n inline\n gap={\"xs\"}\n direction={\"column\"}\n ref={ref}\n className=\"p-calendar-wrapper\"\n {...calendarProps}\n >\n <Flex align={\"center\"} justify={\"space-between\"} className=\"header\">\n <IconButton\n variant=\"outline\"\n radius={\"full\"}\n size={\"sm\"}\n color={\"gray\"}\n {...prevButtonProps}\n >\n <HiChevronLeft size={20} />\n </IconButton>\n\n <Text color=\"black\" size=\"sm\" weight={\"regular\"} as=\"h2\">\n {title}\n </Text>\n\n <IconButton\n variant=\"outline\"\n radius=\"full\"\n size={\"sm\"}\n color=\"gray\"\n {...nextButtonProps}\n >\n <HiChevronRight size={20} />\n </IconButton>\n </Flex>\n\n {/* <Flex>\n <Select\n onChange={(value) => onMonthChange(value.target.value as string)}\n value={state.value.month.toString()}\n valueKey=\"value\"\n labelKey=\"label\"\n renderValue={(option) => option?.label?.substring?.(0, 3)}\n items={monthsByIndex.map((m, i) => ({\n label: m,\n value: i + 1,\n }))}\n style={{ flex: 1 }}\n ></Select>\n\n <Select\n value={state.value.year.toString()}\n onChange={(value) => onYearChange(value.target.value as string)}\n style={{ flex: 1 }}\n labelKey=\"label\"\n valueKey=\"value\"\n items={range(1900, 2024)\n .reverse()\n .map((i) => ({ label: i, value: i }))}\n ></Select>\n </Flex> */}\n\n <Flex gap={\"xl\"}>\n {range(1, numberOfMonths).map((n) => {\n return (\n <CalendarGrid\n color={color}\n key={n}\n state={state}\n offset={{ months: n - 1 }}\n />\n );\n })}\n </Flex>\n </Flex>\n );\n }\n);\n\ntype CalendarGridProps = AriaCalendarGridProps & {\n state: CalendarState;\n offset?: DateDuration;\n color?: Color;\n};\n\nfunction CalendarGrid({\n state,\n offset = {},\n color,\n ...props\n}: CalendarGridProps) {\n const { locale } = useLocale();\n const startDate = state.visibleRange.start.add(offset);\n const endDate = endOfMonth(startDate);\n const { gridProps, headerProps, weekDays } = useCalendarGrid(\n { startDate, endDate, ...props },\n state\n );\n\n const weeksInMonth = getWeeksInMonth(state.visibleRange.start, locale);\n\n return (\n <table {...gridProps}>\n <thead {...headerProps}>\n <tr>\n {weekDays.map((day, index) => (\n <th key={index}>\n <div className=\"p-date-cell\">\n <Text size={\"sm\"} variant=\"light\" weight={\"regular\"}>\n {day}\n </Text>\n </div>\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {[...new Array(weeksInMonth).keys()].map((weekIndex) => (\n <tr key={weekIndex}>\n {state\n .getDatesInWeek(weekIndex, startDate)\n .map((date, index) =>\n date ? (\n <CalendarCell\n color={color}\n state={state}\n date={date}\n key={index}\n currentMonth={startDate}\n ></CalendarCell>\n ) : (\n <td key={index}></td>\n )\n )}\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n\ntype CalendarCellProps = AriaCalendarCellProps & {\n state: CalendarState;\n currentMonth: CalendarDate;\n color?: Color;\n};\n\nfunction CalendarCell({\n state,\n currentMonth,\n color,\n ...props\n}: CalendarCellProps) {\n const ref = React.useRef(null);\n const {\n cellProps,\n buttonProps,\n isSelected,\n isDisabled,\n isUnavailable,\n formattedDate,\n } = useCalendarCell(props, state, ref);\n\n const { focusProps, isFocusVisible, isFocused } = useFocusRing();\n const isOutsideMonth = !isSameMonth(currentMonth, props.date);\n\n return (\n <td {...cellProps}>\n <div\n {...mergeProps(buttonProps, focusProps)}\n ref={ref}\n data-hidden={isOutsideMonth}\n data-selected={isSelected}\n data-disabled={isDisabled}\n data-unavailable={isUnavailable}\n data-focused={isFocused}\n data-focus-visible={isFocusVisible}\n className=\"p-date-cell\"\n data-color={color}\n >\n {formattedDate}\n </div>\n </td>\n );\n}\n\nCalendar.displayName = \"Calendar\";\n","import { omit, pick } from \"./object\";\nimport { Dict } from \"./types\";\n\nexport function range(start = 0, end: number, step = 1): Array<number> {\n const result: Array<number> = [];\n \n for (let index = start; index <= end; index += step) {\n result.push(index);\n }\n \n return result;\n }\n \n export function findObjectInArray<O extends Dict>(\n array: Array<O>,\n key: keyof O,\n value: unknown\n ): O | undefined {\n return array.find((item) => {\n return item[key] === value;\n });\n }\n \n export function omitArray<O extends Dict>(array: Array<O>, keys: (keyof O)[]) {\n return array.map((item) => omit(item, keys));\n }\n \n export function pickArray<O extends Dict>(array: Array<O>, keys: (keyof O)[]) {\n return array.map((item) => pick(item, keys));\n }","export {Avatar} from './avatar';","import * as React from \"react\";\nimport { hashCode, warnDeprecation } from \"../../utils/helpers\";\nimport { cx } from \"../../utils/dom\";\nimport {\n BorderRadius,\n Color,\n ColorVariant,\n supportedColors,\n} from \"../../utils/theme\";\nimport { useTheme } from \"../theme\";\nimport { StyleProps } from \"../../utils/types\";\n\ntype AvatarSize = \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\";\n\ntype AvatarShape = \"circle\" | \"square\";\n\nexport interface AvatarProps\n extends React.ComponentProps<\"div\">,\n StyleProps<\"base\" | \"fallback\" | \"img\"> {\n src?: string;\n alt?: string;\n name?: string;\n fallback?: React.ReactNode;\n radius?: BorderRadius;\n color?: Color;\n variant?: ColorVariant;\n size?: AvatarSize;\n /**@deprecated use radius instead */\n shape?: AvatarShape;\n}\n\nexport const Avatar = React.forwardRef<HTMLDivElement, AvatarProps>(\n (\n {\n src,\n alt,\n name,\n color,\n variant = \"light\",\n fallback,\n children,\n size = \"md\",\n shape,\n className,\n radius = \"lg\",\n classNames,\n styles,\n style,\n ...props\n },\n ref\n ) => {\n const [imageError, setImageError] = React.useState(false);\n const theme = useTheme();\n\n function getAvatarRadius(): BorderRadius {\n warnDeprecation(\"shape\", \"radius\", shape);\n // TODO: remove this when we remove the deprecated shape prop\n if (shape === \"circle\" && !radius) {\n radius = \"full\";\n }\n if (shape === \"square\" && !radius) {\n radius = \"md\";\n }\n return theme?.avatarRadiusSize || radius;\n }\n\n const defaultColor = React.useMemo(() => {\n const hash = hashCode(name || \"\");\n return supportedColors[hash % supportedColors.length];\n }, [name]);\n\n const renderContent = () => {\n if (src && !imageError) {\n return (\n <img\n className={cx([\"avatar-img\", classNames?.img])}\n onLoad={() => setImageError(false)}\n onError={() => setImageError(true)}\n src={src}\n alt={alt}\n />\n );\n }\n\n if (imageError && !children) {\n return fallback;\n }\n\n if (!src && !children && name) {\n return (\n <span\n style={styles?.fallback}\n className={cx([\"avatar-fallback\", classNames?.fallback])}\n >\n {name.charAt(0)}\n </span>\n );\n }\n\n return children;\n };\n\n return (\n <div\n style={{ ...style, ...styles?.base }}\n className={cx([\"p-avatar\", className, classNames?.base])}\n data-radius={getAvatarRadius()}\n data-color={color ?? defaultColor}\n data-variant={variant}\n data-interactive={false}\n data-size={size}\n ref={ref}\n {...props}\n >\n {renderContent()}\n </div>\n );\n }\n);\n\nAvatar.displayName = \"Avatar\";\n","export {FileUploader} from './file-uploader';","import * as React from \"react\";\nimport { VisuallyHidden } from \"react-aria\";\nimport { Flex } from \"../flex\";\nimport { ActionStatus } from \"../../utils/types\";\nimport {\n HiOutlineCheckCircle,\n HiOutlineDocumentAdd,\n HiOutlineExclamationCircle,\n HiOutlinePaperClip,\n HiOutlineRefresh,\n HiOutlineTrash,\n} from \"react-icons/hi\";\nimport { Text } from \"../text\";\nimport { Loader } from \"../loader\";\nimport { IconButton } from \"../button\";\nimport { InputError } from \"../input-error\";\nimport { InputLabel } from \"../input-label\";\nimport { useDrop, FileDropItem } from \"react-aria\";\nimport { isEmptyArray } from \"../../utils/assertions\";\nimport { id } from \"../../utils/helpers\";\nimport { Color } from \"../../utils/theme\";\n\nexport type Upload = {\n name: string;\n url: string;\n id: string;\n file?: File;\n status?: ActionStatus;\n progress?: number;\n};\n\n// onChange\n// 1. convert files into upload type with raw file\n// onFileUpload should now take an Array<Upload> argument\n// if you need to do a remote upload outside the component you have access to the raw files.\n// write utility function to extract files from Upload object\n// if you want to use the component as a controlled component, simply pass in an uploads prop.\n// if it's a single upload, display inside component\n// if it's multiple uploads show them in the list of uploads as file name and progress bar\n\ninterface FileUploaderProps {\n onFileUpload?: (files: Array<Upload>) => void;\n onRemoveFile?: () => void;\n onStatusChange?: (status: ActionStatus) => void;\n error?: React.ReactNode;\n label?: React.ReactNode;\n allowMultiple?: boolean;\n uploads?: Array<Upload>;\n hideFileList?: boolean;\n color?: Color;\n}\n\nexport const FileUploader = React.forwardRef<HTMLDivElement, FileUploaderProps>(\n (\n {\n onFileUpload,\n onRemoveFile,\n error,\n label,\n allowMultiple,\n uploads: controlledUploads,\n hideFileList,\n color = \"gray\",\n },\n ref\n ) => {\n const [_uploads, setUploads] = React.useState<Array<Upload>>([]);\n\n const uploads = controlledUploads ?? _uploads;\n\n const inputRef = React.useRef<HTMLInputElement>(null);\n const wrapperRef = React.useRef(null);\n\n const { dropProps, isDropTarget } = useDrop({\n ref: wrapperRef,\n async onDrop(e) {\n const files = await Promise.all(\n (\n e.items.filter(\n (item) => item.kind === \"file\"\n ) as Array<FileDropItem>\n ).map(async (file) => {\n const f = await file.getFile();\n return f;\n })\n );\n\n const uploads = files.map(convertFileToUpload);\n\n onUpload(uploads);\n },\n });\n\n function onUpload(uploads: Array<Upload>) {\n console.log(uploads);\n if (isEmptyArray(uploads)) {\n return;\n }\n\n setUploads(uploads);\n onFileUpload?.(uploads);\n }\n\n function onChange(e: React.ChangeEvent<HTMLInputElement>) {\n const rawFiles = e.target.files;\n\n if (rawFiles?.length) {\n const files = Array.from(rawFiles).map(convertFileToUpload);\n onUpload(files);\n inputRef.current && (inputRef.current.value = \"\");\n }\n }\n\n function convertFileToUpload(file: File): Upload {\n return {\n name: file.name,\n id: id(),\n url: URL.createObjectURL(file),\n status: \"success\",\n file,\n };\n }\n\n function handleRemoveFile() {\n setUploads([]);\n onRemoveFile?.();\n }\n\n function handleRetry() {\n console.log(\"retry\");\n }\n\n const isIdle =\n allowMultiple ||\n (!allowMultiple && uploads[0]?.status === \"idle\") ||\n !uploads.length;\n const isUploading = !allowMultiple && uploads[0]?.status === \"loading\";\n const isUploaded = !allowMultiple && uploads[0]?.status === \"success\";\n const isFailed = !allowMultiple && uploads[0]?.status === \"error\";\n\n return (\n <Flex ref={ref} stack gap={\"xs\"}>\n {label && <InputLabel>{label}</InputLabel>}\n <label\n data-radius=\"lg\"\n className=\"p-file-uploader\"\n ref={wrapperRef}\n {...dropProps}\n data-color={color}\n data-dropping={isDropTarget}\n data-state={\n allowMultiple || !uploads.length ? \"idle\" : uploads[0]?.status\n }\n >\n <VisuallyHidden>\n <input\n ref={inputRef}\n multiple={allowMultiple}\n onChange={onChange}\n type={isIdle ? \"file\" : \"hidden\"}\n />\n </VisuallyHidden>\n\n {isIdle && (\n <Flex align=\"center\" gap={\"xs\"}>\n <HiOutlineDocumentAdd className=\"state-icon\" size={20} />\n <Text color={\"inherit\"} size=\"sm\">\n Click or drag files here to upload\n </Text>\n </Flex>\n )}\n\n {isUploading && (\n <Flex align={\"center\"} gap={\"xs\"}>\n <Loader size=\"xs\" />\n <Text color=\"inherit\" size=\"sm\">\n Name_of_file.ext / Uploading...\n </Text>\n </Flex>\n )}\n\n {isUploaded && (\n <Flex stretchX align={\"center\"} justify={\"space-between\"}>\n <Flex align={\"center\"} gap={\"xs\"}>\n <HiOutlineCheckCircle size={16} />\n <Text color=\"green\" size=\"sm\">\n File successfully uploaded\n </Text>\n </Flex>\n\n <IconButton\n onPress={handleRemoveFile}\n variant={\"outline\"}\n color=\"green\"\n size=\"xs\"\n >\n <HiOutlineTrash size={16} />\n </IconButton>\n </Flex>\n )}\n\n {isFailed && (\n <Flex stretchX justify={\"space-between\"}>\n <Flex align={\"center\"} gap={\"xs\"}>\n <HiOutlineExclamationCircle className=\"state-icon\" />\n <Text color={\"tomato\"} size=\"sm\">\n Failed to upload file\n </Text>\n </Flex>\n\n <IconButton\n onPress={handleRetry}\n variant={\"outline\"}\n color={\"tomato\"}\n size={\"xs\"}\n >\n <HiOutlineRefresh size={16} />\n </IconButton>\n </Flex>\n )}\n\n <Flex></Flex>\n </label>\n\n {uploads.length > 1 && !hideFileList && (\n <Flex\n style={{ marginTop: 10 }}\n stack\n gap={\"sm\"}\n className=\"upload-list\"\n >\n {uploads.map((upload) => (\n <Flex align={\"center\"} gap={\"xs\"} key={upload.id}>\n {upload.status === \"loading\" && <Loader></Loader>}\n {upload.status === \"success\" && <HiOutlinePaperClip />}\n <Text size=\"sm\" color={\"gray\"}>\n {upload.name}\n </Text>\n </Flex>\n ))}\n </Flex>\n )}\n\n {error && <InputError>{error}</InputError>}\n </Flex>\n );\n }\n);\n\nFileUploader.displayName = \"FileUploader\";\n","export {Separator} from './separator'","import * as React from \"react\";\nimport { cx } from \"../../utils/dom\";\nimport { Color } from \"../../utils/theme\";\n\ninterface SeparatorProps extends React.ComponentPropsWithoutRef<\"div\"> {\n orientation?: \"horizontal\" | \"vertical\";\n color?: Color;\n opacity?: \"faint\" | \"medium\" | \"strong\";\n}\n\nexport const Separator = React.forwardRef<HTMLDivElement, SeparatorProps>(\n ({ orientation, className, color, opacity, ...props }, ref) => {\n return (\n <div\n data-opacity={opacity}\n data-color={color}\n data-orientation={orientation}\n className={cx([\"p-separator\", className])}\n ref={ref}\n {...props}\n ></div>\n );\n }\n);\n\nSeparator.displayName = \"Separator\";\n","export {Progress} from './progress';","import * as React from \"react\";\nimport { Box } from \"../box\";\nimport { AriaProgressBarProps, useProgressBar } from \"react-aria\";\nimport { Flex } from \"../flex\";\nimport { Text } from \"../text\";\nimport { cx } from \"../../utils/dom\";\nimport { Color } from \"../../utils/theme\";\n\ninterface ProgressProps\n extends AriaProgressBarProps,\n React.ComponentPropsWithoutRef<\"div\"> {\n height?: number;\n color?: Color;\n}\n\nexport const Progress = React.forwardRef<HTMLDivElement, ProgressProps>(\n ({ height = 2, className, style, color = \"gray\", ...props }, ref) => {\n const { minValue = 0, maxValue = 100, value = 0, label } = props;\n const { progressBarProps, labelProps } = useProgressBar(props);\n const percent = ((value - minValue) / (maxValue - minValue)) * 100;\n const barWidth = `${percent}%`;\n\n return (\n <Flex\n data-color={color}\n style={style}\n className={cx([className, \"progress-bar\"])}\n stack\n {...progressBarProps}\n >\n {label && <Text {...labelProps}>{label}</Text>}\n <div\n className=\"progress-wrapper\"\n style={{\n height,\n background: \"var(--color-3)\",\n position: \"relative\",\n borderRadius: 60,\n overflow: \"hidden\",\n }}\n ref={ref}\n >\n <Box\n position={\"absolute\"}\n className=\"progress\"\n style={{\n left: 0,\n top: 0,\n height: \"100%\",\n width: barWidth,\n background: \"var(--color-10)\",\n transition: \"all 0.3s ease\",\n }}\n ></Box>\n </div>\n </Flex>\n );\n }\n);\n\nProgress.displayName = \"Progress\";\n","export {Switch} from './switch'","import * as React from \"react\";\nimport {\n AriaSwitchProps,\n VisuallyHidden,\n useFocusRing,\n useHover,\n usePress,\n useSwitch,\n} from \"react-aria\";\nimport { useToggleState } from \"react-stately\";\nimport { Flex } from \"../flex\";\nimport { Color, ColorVariant } from \"../../utils/theme\";\nimport { cx } from \"../../utils/dom\";\nimport { omit } from \"../../utils/object\";\n\ninterface Props extends AriaSwitchProps {\n color?: Color;\n variant?: ColorVariant;\n size?: \"sm\" | \"md\" | \"lg\";\n className?: string;\n}\n\nexport const Switch = React.forwardRef<HTMLLabelElement, Props>(\n ({ color = \"violet\", size = \"sm\", children, className, ...props }, ref) => {\n const { isHovered, hoverProps } = useHover(props);\n const { isPressed, pressProps } = usePress(props);\n const state = useToggleState(props);\n const switchRef = React.useRef(null);\n const { inputProps } = useSwitch(props, state, switchRef);\n const { isFocusVisible, focusProps } = useFocusRing();\n\n return (\n <Flex\n ref={ref as any}\n style={{\n opacity: props.isDisabled ? 0.4 : 1,\n }}\n align={\"center\"}\n gap={\"xs\"}\n as=\"label\"\n className={cx(className, \"p-switch-group\")}\n >\n <VisuallyHidden>\n <input ref={switchRef} {...inputProps} {...focusProps} />\n </VisuallyHidden>\n\n <span\n data-color={color}\n data-hovered={isHovered}\n data-disabled={props.isDisabled}\n data-selected={state.isSelected}\n data-focused={isFocusVisible}\n className=\"p-switch track\"\n data-size={size}\n {...hoverProps}\n >\n <Flex\n data-selected={state.isSelected}\n data-pressed={isPressed}\n className=\"p-switch-thumb\"\n {...omit(pressProps as any, [\"isSelected\"])}\n />\n </span>\n {children}\n </Flex>\n );\n }\n);\n\nSwitch.displayName = \"Switch\";\n","export { Slider } from \"./slider\";\n","import * as React from \"react\";\nimport { cx } from \"../../utils/dom\";\nimport { StyleProps } from \"../../utils/types\";\nimport {\n AriaSliderProps,\n AriaSliderThumbProps,\n VisuallyHidden,\n mergeProps,\n useFocusRing,\n useNumberFormatter,\n useSlider,\n useSliderThumb,\n} from \"react-aria\";\nimport { SliderState, useSliderState } from \"react-stately\";\nimport { InputLabel } from \"../input-label\";\nimport { Color, SizeOption } from \"../../utils/theme\";\n\ntype SliderProps = {\n name?: string;\n size?: SizeOption;\n color?: Color;\n} & StyleProps<\n \"wrapper\" | \"track\" | \"fill\" | \"thumb\" | \"innerThumb\" | \"label\"\n> &\n AriaSliderProps;\n\nexport function Slider({\n className,\n classNames,\n style,\n styles,\n name,\n size = \"sm\",\n color,\n orientation = \"horizontal\",\n ...props\n}: SliderProps) {\n const trackRef = React.useRef(null);\n const numberFormatter = useNumberFormatter();\n const state = useSliderState({ ...props, numberFormatter });\n const { trackProps, labelProps } = useSlider(\n { ...props, \"aria-label\": props[\"aria-label\"] ?? \"slider\" },\n state,\n trackRef\n );\n\n const percent = state.getThumbPercent(0);\n\n return (\n <div\n data-color={color}\n data-size={size}\n style={{ ...style, ...styles?.wrapper }}\n className={cx(\"p-slider\", orientation, className, classNames?.wrapper)}\n >\n {props.label && (\n <InputLabel\n style={styles?.label}\n className={classNames?.label}\n {...labelProps}\n >\n {props.label}\n </InputLabel>\n )}\n <div\n {...trackProps}\n ref={trackRef}\n className={cx(\"p-slider-track\", classNames?.track)}\n style={{ ...styles?.track, ...trackProps.style }}\n >\n <div\n style={{ ...styles?.fill, width: `${percent * 100}%` }}\n className={cx(\"p-slider-track-fill\", classNames?.fill)}\n ></div>\n <Thumb\n styles={{ wrapper: styles?.thumb, inner: styles?.innerThumb }}\n classNames={{\n wrapper: classNames?.thumb,\n inner: classNames?.innerThumb,\n }}\n state={state}\n trackRef={trackRef}\n index={0}\n name={name}\n />\n </div>\n </div>\n );\n}\n\ntype ThumbProps = StyleProps<\"wrapper\" | \"inner\"> &\n AriaSliderThumbProps & {\n trackRef: React.RefObject<HTMLDivElement>;\n state: SliderState;\n };\n\nfunction Thumb({\n state,\n trackRef,\n index,\n name,\n className,\n classNames,\n styles,\n style,\n}: ThumbProps) {\n const inputRef = React.useRef(null);\n const { thumbProps, inputProps, isDragging } = useSliderThumb(\n {\n index,\n trackRef,\n inputRef,\n name,\n },\n state\n );\n\n const { focusProps, isFocusVisible } = useFocusRing();\n return (\n <div\n {...thumbProps}\n data-dragging={isDragging}\n data-focus-visible={isFocusVisible}\n className={cx(\"p-slider-thumb\", className, classNames?.wrapper)}\n style={{ ...thumbProps.style, ...style, ...styles?.wrapper }}\n >\n <div\n style={styles?.inner}\n className={cx(\"p-slider-thumb-inner\", classNames?.inner)}\n ></div>\n <VisuallyHidden>\n <input ref={inputRef} {...mergeProps(inputProps, focusProps)} />\n </VisuallyHidden>\n </div>\n );\n}\n","export {IconTray} from './icon-tray'","import * as React from \"react\";\n\nexport function IconTray(props: any) {\n return <div></div>;\n}\n","export {Sticker} from './sticker';","import React from \"react\";\nimport { Flex, FlexProps } from \"../flex\";\nimport { BorderRadius, Color, ColorVariant } from \"../../utils/theme\";\nimport { useTheme } from \"../theme\";\n\ninterface StickerProps extends FlexProps {\n padded?: boolean;\n color?: Color;\n variant?: ColorVariant;\n radius?: BorderRadius;\n}\n\nexport const Sticker = React.forwardRef<\n HTMLDivElement,\n React.PropsWithChildren<StickerProps>\n>(\n (\n {\n variant = \"outline\",\n color = \"violet\",\n padded = true,\n gap = \"sm\",\n radius,\n children,\n ...props\n },\n ref\n ) => {\n const theme = useTheme();\n\n return (\n <Flex\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n style={{\n borderRadius: \"max(var(--radius-lg), var(--radius-full))\",\n padding: padded ? \"var(--space-4)\" : undefined,\n }}\n data-variant={variant}\n data-color={color}\n ref={ref}\n gap={gap}\n {...props}\n >\n {children}\n </Flex>\n );\n }\n);\n\nSticker.displayName = \"Sticker\";\n","export { Tabs, Item as Tab } from \"./tabs\";\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport * as React from \"react\";\nimport {\n AriaTabListProps,\n AriaTabPanelProps,\n useTab,\n useTabList,\n useTabPanel,\n} from \"react-aria\";\nimport {\n Item as AriaItem,\n Node,\n TabListState,\n useTabListState,\n} from \"react-stately\";\nimport { Box } from \"../box\";\nimport { useTheme } from \"../theme\";\nimport { StyleProps } from \"../../utils/types\";\nimport { cx } from \"../../utils/dom\";\n\nexport interface TabsProps extends AriaTabListProps<any>, StyleProps {\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nexport function Tabs({ className, style, ...props }: TabsProps) {\n const state = useTabListState(props);\n const tabRef = React.useRef<HTMLDivElement>(null);\n\n const [indicatorStyles, setIndicatorStyles] = React.useState({\n width: 0,\n left: 0,\n });\n\n const indicatorRef = React.useRef(null);\n\n const { tabListProps } = useTabList(props, state, tabRef);\n\n React.useEffect(() => {\n const selected: any = tabRef?.current?.querySelector(\n '.p-tab[aria-selected=\"true\"]'\n );\n\n setIndicatorStyles({\n width: selected?.offsetWidth,\n left: selected?.offsetLeft,\n });\n }, [state.selectedKey]);\n\n const theme = useTheme();\n\n return (\n <Box\n style={style}\n data-color={theme?.color ?? \"violet\"}\n position={\"relative\"}\n className={cx(\"p-tabs\", className)}\n >\n <div {...tabListProps} ref={tabRef} className=\"p-tab-list\">\n <Box\n className=\"indicator\"\n style={{\n left: indicatorStyles?.left,\n bottom: 0,\n background: \"var(--color-10)\",\n height: 2,\n marginBottom: -1,\n width: indicatorStyles?.width,\n transition: \"all 0.2s ease\",\n }}\n ref={indicatorRef}\n position={\"absolute\"}\n ></Box>\n {[...state.collection].map((item) => (\n <Tab\n orientation={props.orientation}\n key={item.key}\n item={item as any}\n state={state}\n ></Tab>\n ))}\n </div>\n <TabPanel key={state?.selectedItem?.key} state={state} />\n </Box>\n );\n}\n\ntype TabProps = {\n item: Node<unknown>;\n state: TabListState<unknown>;\n orientation?: \"horizontal\" | \"vertical\";\n};\n\nfunction Tab({ item, state }: TabProps) {\n const { key, rendered } = item;\n const ref = React.useRef(null);\n\n const { tabProps, isDisabled, isSelected } = useTab({ key }, state, ref);\n\n return (\n <div\n id={`tab-${key}`}\n className=\"p-tab\"\n ref={ref}\n data-disabled={isDisabled}\n data-selected={isSelected}\n {...tabProps}\n >\n {rendered}\n </div>\n );\n}\n\ntype TabPanelProps = AriaTabPanelProps & {\n state: TabListState<unknown>;\n};\n\nfunction TabPanel({ state, ...props }: TabPanelProps) {\n const ref = React.useRef(null);\n const { tabPanelProps } = useTabPanel(props, state, ref);\n\n return (\n <div {...tabPanelProps} ref={ref}>\n {state.selectedItem?.props.children}\n </div>\n );\n}\n\nexport const Item = AriaItem;\n","export { Table } from \"./table\";\n","import * as React from \"react\";\n\nexport function Table() {\n return <div></div>;\n}\n","export { Timeline } from \"./timeline\";\n","import React from \"react\";\nimport { Box } from \"../box\";\nimport { Flex } from \"../flex\";\n\n// https://dribbble.com/shots/20456228-Audit-trail\n// https://dribbble.com/shots/18901487-Attio-Record-Activity-Feed\n// https://dribbble.com/shots/20146723-Sales-Status-Ditto-CRM\n\nexport interface TimelineProps<T> {\n items: Array<T>;\n render?(item: T): React.ReactNode;\n labelKey?: keyof T;\n getIndicator?(item: T): React.ReactNode;\n hideLastItemTail?: boolean;\n}\n\nexport function Timeline<T>({\n items,\n render,\n labelKey,\n getIndicator,\n hideLastItemTail = true,\n}: TimelineProps<T>) {\n return (\n <Box>\n {items.map((item, index) => {\n const indicator = getIndicator?.(item) ?? (\n <div color={\"blue\"} data-variant={\"outline\"} />\n );\n\n const content =\n render?.(item) ?? (item[labelKey as keyof T] as React.ReactNode);\n\n const isLast = index === items.length - 1;\n\n return (\n <Flex className=\"p-timeline-item\" key={index}>\n <Flex align={\"center\"} stack>\n <Flex className=\"p-timeline-indicator-container\">\n {indicator}\n </Flex>\n\n {isLast && hideLastItemTail ? null : (\n <div className=\"p-timeline-item-tail\" />\n )}\n </Flex>\n\n <Flex stretchX className=\"p-timeline-item-content\">\n {content}\n </Flex>\n </Flex>\n );\n })}\n </Box>\n );\n}\n","export { Modal, useModal } from \"./modal\";\nexport type { ModalProps } from \"./modal\";\n","import * as React from \"react\";\nimport {\n AriaModalOverlayProps,\n Overlay as AriaOverlay,\n useDialog,\n useModalOverlay,\n} from \"react-aria\";\nimport {\n OverlayTriggerProps,\n OverlayTriggerState,\n useOverlayTriggerState,\n} from \"react-stately\";\nimport { Flex } from \"../flex\";\nimport { Text } from \"../text\";\nimport { Button, IconButton } from \"../button\";\nimport { HiX } from \"react-icons/hi\";\nimport { StyleProps } from \"../../utils/types\";\nimport { cx } from \"../../utils/dom\";\n\nexport interface ModalProps extends AriaModalOverlayProps, StyleProps {\n hideTitle?: boolean;\n state?: OverlayTriggerState;\n children?: React.ReactNode;\n title?: React.ReactNode;\n description?: React.ReactNode;\n onConfirm?(): void;\n onCancel?(): void;\n confirmLabel?: string;\n cancelLabel?: string;\n confirmButtonProps?: React.ComponentProps<typeof Button>;\n cancelButtonProps?: React.ComponentProps<typeof Button>;\n width?: number | string;\n variant?: \"modal\" | \"drawer\";\n showCloseButton?: boolean;\n onOpenChange?(open: boolean): void;\n onClose?(): void;\n isOpen?: boolean;\n defaultOpen?: boolean;\n}\n\nexport function Overlay({ children, state, ...props }: ModalProps) {\n const modalRef = React.useRef(null);\n\n const { modalProps, underlayProps } = useModalOverlay(\n props,\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n state!,\n modalRef\n );\n\n if (!state?.isOpen) {\n return null;\n }\n\n return (\n <AriaOverlay>\n <div className=\"p-modal-underlay\" {...underlayProps}>\n <div className=\"p-modal-container\" {...modalProps} ref={modalRef}>\n {children}\n </div>\n </div>\n </AriaOverlay>\n );\n}\n\nfunction Dialog({\n width = 400,\n title,\n onCancel,\n onConfirm,\n confirmLabel = \"Confirm\",\n cancelLabel = \"Cancel\",\n description,\n children,\n confirmButtonProps,\n cancelButtonProps,\n variant = \"modal\",\n showCloseButton = true,\n onClose,\n onOpenChange,\n className,\n style,\n hideTitle,\n ...props\n}: ModalProps) {\n const dialogRef = React.useRef(null);\n\n const { dialogProps, titleProps } = useDialog(\n { role: \"dialog\", ...props },\n dialogRef\n );\n\n function handleClose() {\n onOpenChange?.(false);\n onClose?.();\n }\n\n return (\n <div\n data-radius=\"md\"\n className={cx(\"p-modal-content\", className)}\n data-variant={variant}\n style={{ minWidth: width, ...style }}\n ref={dialogRef}\n {...dialogProps}\n >\n {!hideTitle && (\n <Flex\n align=\"center\"\n as=\"header\"\n justify=\"space-between\"\n gap=\"2xl\"\n className=\"p-modal-head\"\n >\n <Flex stack gap={\"3xs\"}>\n {title && (\n <Text\n weight={\"medium\"}\n size={\"md\"}\n color={\"black\"}\n {...titleProps}\n as=\"div\"\n >\n {title}\n </Text>\n )}\n {description && (\n <Text lineHeight={\"base\"} size={\"xs\"} variant={\"light\"} as=\"div\">\n {description}\n </Text>\n )}\n </Flex>\n\n {props.isDismissable && showCloseButton && (\n <button\n color=\"gray\"\n onClick={handleClose}\n data-variant=\"ghost\"\n data-color=\"gray\"\n className=\"p-button size-sm\"\n data-radius={\"full\"}\n data-icon-button={true}\n >\n <HiX size={18} />\n </button>\n )}\n </Flex>\n )}\n <Flex stack className=\"p-modal-body\">\n {children}\n </Flex>\n\n {(onConfirm || onCancel) && (\n <Flex\n as=\"footer\"\n className=\"p-modal-footer\"\n gap={\"xs\"}\n justify={\"end\"}\n stretchX\n >\n {onCancel && (\n <Button\n onPress={handleClose}\n variant={\"outline\"}\n color={\"gray\"}\n {...cancelButtonProps}\n >\n {cancelLabel}\n </Button>\n )}\n {onConfirm && (\n <Button onPress={onConfirm} {...confirmButtonProps}>\n {confirmLabel}\n </Button>\n )}\n </Flex>\n )}\n </div>\n );\n}\n\nexport function Modal({\n isOpen,\n defaultOpen,\n onOpenChange,\n ...props\n}: Omit<ModalProps, \"state\">) {\n const state = useOverlayTriggerState({ defaultOpen, isOpen, onOpenChange });\n\n return (\n <Overlay state={state} {...props}>\n <Dialog onOpenChange={onOpenChange} state={state} {...props} />\n </Overlay>\n );\n}\n\nexport function useModal(props: OverlayTriggerProps = {}) {\n const state = useOverlayTriggerState(props);\n return state;\n}\n\nModal.useModal = useModal;\n","export { TagInput } from \"./tag-input\";\n","import * as React from \"react\";\nimport { Flex } from \"../flex\";\nimport { Tag } from \"../tag/tag\";\nimport { HiX } from \"react-icons/hi\";\nimport { EMAIL_REGEX } from \"../../utils/regex\";\nimport { InputLabel } from \"../input-label\";\nimport { useControlledState } from \"../../hooks/use-controlled-state\";\nimport { InputError } from \"../input-error\";\nimport { IconButton } from \"../button\";\nimport { Box } from \"../box\";\nimport { useTheme } from \"../theme\";\nimport { FieldProps } from \"../form/field\";\n\ninterface TagField extends FieldProps<\"input\"> {\n tags?: Array<string>;\n defaultTags?: Array<string>;\n placeholder?: string;\n onInputValueChange?(value: string): void;\n onChange?(tags: Array<string>): void;\n tagVariant?: React.ComponentProps<typeof Tag>[\"variant\"];\n tagColor?: React.ComponentProps<typeof Tag>[\"color\"];\n tagShape?: React.ComponentProps<typeof Tag>[\"shape\"];\n tagSize?: React.ComponentProps<typeof Tag>[\"size\"];\n renderTag?(value: string, onRemove: (value: string) => void): React.ReactNode;\n}\n\nexport function TagInput({\n appearance = \"outline\",\n size = \"md\",\n label,\n error,\n placeholder,\n tags,\n defaultTags,\n tagColor = \"gray\",\n tagVariant = \"light\",\n tagShape = \"rounded\",\n tagSize = \"md\",\n color = \"gray\",\n onChange,\n renderTag,\n radius,\n}: TagField) {\n const [inputValue, setInputValue] = React.useState(\"\");\n const [values, setValues] = useControlledState<Array<string>>(\n dedupe(tags),\n dedupe(defaultTags) || [],\n onChange\n );\n const [isFocused, setIsFocused] = React.useState(false);\n const theme = useTheme();\n\n function dedupe(values: Array<string> | undefined) {\n if (!values) return undefined;\n return Array.from(new Set(values));\n }\n\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n function onInputChange(e: React.ChangeEvent<HTMLInputElement>) {\n const { value } = e.target;\n setInputValue(value);\n }\n\n // function hasTrailingSpace(value: string) {\n // return /\\s$/.test(value);\n // }\n\n function hasTrailingComma(value: string) {\n return /,$/.test(value);\n }\n\n function onInputFocus() {\n setIsFocused(true);\n }\n\n function onInputBlur() {\n setIsFocused(false);\n }\n\n function onKeyDown(e: React.KeyboardEvent<HTMLInputElement>) {\n switch (e.key) {\n case \"Enter\":\n case \" \":\n if (isValid(inputValue.trim())) {\n commit([inputValue]);\n }\n break;\n case \"Backspace\":\n if (!inputValue) {\n onRemove(values[values.length - 1]);\n }\n break;\n\n default:\n break;\n }\n }\n\n function captureFocus() {\n inputRef.current?.focus();\n }\n\n function onRemove(value: string) {\n setValues(values.filter((v) => v !== value));\n }\n\n function isValid(value: string) {\n return EMAIL_REGEX.test(value);\n }\n\n function commit(newValues: Array<string>) {\n const validValues = newValues\n .map((v) => v.trim())\n .filter((v) => isValid(v));\n\n if (validValues.length > 0) {\n setInputValue(\"\");\n }\n\n const finalValues = Array.from(new Set([...values, ...validValues]));\n setValues(finalValues);\n }\n\n const showPlaceholder = !inputValue && values.length === 0;\n\n function getInputContainerWidth() {\n if (showPlaceholder) {\n return (placeholder?.length ?? 0) * 10;\n }\n\n if (!showPlaceholder && isFocused) {\n return inputValue?.length * 10 || 10;\n }\n\n return 0;\n }\n\n React.useEffect(() => {\n if (hasTrailingComma(inputValue.trim())) {\n const split = inputValue.split(\",\");\n commit(split);\n }\n }, [inputValue]);\n\n return (\n <Flex\n data-color={color}\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n data-size={size}\n className=\"p-input-group\"\n stack\n gap={\"xs\"}\n >\n {label && <InputLabel>{label}</InputLabel>}\n <div\n className=\"p-input-control p-tag-field\"\n data-focused={isFocused}\n onClick={captureFocus}\n data-appearance={appearance}\n >\n {values.map((value) => {\n return renderTag ? (\n <span key={value}>{renderTag?.(value, onRemove)}</span>\n ) : (\n <Tag\n variant={tagVariant}\n color={tagColor}\n shape={tagShape}\n size={tagSize}\n append={\n <IconButton\n variant={\"ghost\"}\n color={tagColor}\n radius={\"md\"}\n style={{ marginLeft: 8 }}\n onPress={() => {\n onRemove(value);\n }}\n size={\"xs\"}\n >\n <HiX size={16} />\n </IconButton>\n }\n key={value}\n >\n {value}\n </Tag>\n );\n })}\n\n <Box\n style={{\n width: getInputContainerWidth(),\n }}\n className=\"input-container\"\n >\n <input\n ref={inputRef}\n placeholder={showPlaceholder ? placeholder : \"\"}\n onKeyDown={onKeyDown}\n value={inputValue}\n onChange={onInputChange}\n onFocus={onInputFocus}\n onBlur={onInputBlur}\n className=\"p-tag-field-input\"\n />\n </Box>\n </div>\n {error && <InputError>{error}</InputError>}\n </Flex>\n );\n}\n","export const EMAIL_REGEX =\n /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n","import * as React from \"react\";\nimport { isUndefinedOrNull } from \"../utils/assertions\";\n\nexport function useControlledState<T>(\n value?: T,\n defaultValue?: T,\n onChange?: (value: T) => void\n) {\n const [state, setState] = React.useState(value || defaultValue);\n const isControlled = !isUndefinedOrNull(value);\n\n const controlledValue = isControlled ? value : state;\n\n const setValue = React.useCallback(\n (value: T) => {\n if (!isControlled) {\n setState(value);\n }\n\n if (!Object.is(controlledValue, value)) {\n onChange?.(value);\n }\n },\n [isControlled, controlledValue]\n );\n\n return [controlledValue, setValue] as [T, (value: T) => void];\n}\n","export { Popover, PopoverContent, PopoverTrigger } from \"./popover\";\n","import * as React from \"react\";\nimport { InternalPopover } from \"../internal-popover\";\nimport {\n AriaButtonProps,\n AriaPopoverProps,\n useOverlayTrigger,\n usePress,\n} from \"react-aria\";\nimport { OverlayTriggerState, useOverlayTriggerState } from \"react-stately\";\nimport { StyleProps } from \"../../utils/types\";\nimport { cx } from \"../../utils/dom\";\n\ninterface PopoverProps {\n children?: React.ReactNode;\n useNativeClickHandler?: boolean;\n}\n\ninterface PopoverContextValue {\n triggerRef: React.RefObject<any>;\n overlayState: OverlayTriggerState;\n triggerProps: AriaButtonProps;\n overlayProps: any;\n props?: PopoverProps;\n}\n\nconst PopoverContext = React.createContext<PopoverContextValue | null>(null);\n\nexport function Popover({\n children,\n useNativeClickHandler,\n ...props\n}: PopoverProps) {\n const triggerRef = React.useRef(null);\n const state = useOverlayTriggerState(props);\n const { triggerProps, overlayProps } = useOverlayTrigger(\n { type: \"dialog\" },\n state,\n triggerRef\n );\n\n return (\n <PopoverContext.Provider\n value={{\n triggerProps,\n triggerRef,\n overlayProps,\n overlayState: state,\n props: { useNativeClickHandler },\n }}\n >\n {children}\n </PopoverContext.Provider>\n );\n}\n\ninterface PopoverTriggerProps {\n children: React.ReactElement;\n}\n\nexport function PopoverTrigger({ children }: PopoverTriggerProps) {\n const ctx = React.useContext(PopoverContext);\n if (!ctx) {\n throw \"PopoverTrigger must be used within a Popover component\";\n }\n\n const useClickEvents = ctx.props?.useNativeClickHandler;\n const clickProps = usePress(ctx.triggerProps);\n\n const triggerProps = useClickEvents\n ? clickProps.pressProps\n : ctx.triggerProps;\n\n return React.cloneElement(children, {\n ref: ctx.triggerRef,\n [\"data-is-pressed\"]: clickProps.isPressed,\n ...triggerProps,\n });\n}\n\ninterface PopoverContentProps\n extends StyleProps,\n Omit<AriaPopoverProps, \"triggerRef\" | \"popoverRef\"> {\n width?: number;\n}\n\nexport function PopoverContent({\n children,\n offset = 12,\n placement,\n style,\n className,\n ...props\n}: React.PropsWithChildren<PopoverContentProps>) {\n const ctx = React.useContext(PopoverContext);\n if (!ctx) {\n throw \"PopoverContent must be used withing a Popover component\";\n }\n\n if (!ctx.overlayState?.isOpen) {\n return null;\n }\n\n return (\n <InternalPopover\n offset={offset}\n placement={placement}\n state={ctx.overlayState}\n triggerRef={ctx.triggerRef}\n {...props}\n >\n <div\n {...ctx.overlayProps}\n data-radius=\"md\"\n className={cx(className, \"p-popover-content\")}\n style={{ ...style }}\n >\n {children}\n </div>\n </InternalPopover>\n );\n}\n","export { TagGroup, TagGroupItem } from \"./tag-group\";\n","import * as React from \"react\";\nimport { Flex, FlexProps } from \"../flex\";\nimport {\n AriaTagGroupProps,\n AriaTagProps,\n useFocusRing,\n useTag,\n useTagGroup,\n} from \"react-aria\";\nimport { Item, ListState, useListState } from \"react-stately\";\nimport { InputLabel } from \"../input-label\";\nimport { cx } from \"../../utils/dom\";\nimport { Text } from \"../text\";\nimport { InputError } from \"../input-error\";\nimport { Color, ColorVariant } from \"../../utils/theme\";\nimport { useTheme } from \"../theme\";\nimport { getRandomColor } from \"../../utils/helpers\";\n\ninterface TagProps<T> extends AriaTagProps<T>, TagVariantProps {\n state: ListState<T>;\n}\n\nfunction Tag<T>(props: TagProps<T>) {\n const theme = useTheme();\n const {\n activeColor = theme?.color ?? \"gray\",\n activeVariant = \"solid\",\n idleColor = \"gray\",\n idleVariant = \"outline\",\n item,\n state,\n autoColor,\n } = props;\n const tagRef = React.useRef(null);\n const { focusProps, isFocusVisible } = useFocusRing({ within: true });\n const { rowProps, gridCellProps, isSelected } = useTag(props, state, tagRef);\n\n const colors = React.useMemo(() => {\n if (autoColor) {\n const color = getRandomColor(item.textValue);\n return { active: color, idle: color };\n }\n\n return { active: activeColor, idle: idleColor };\n }, [activeColor, idleColor, autoColor]);\n\n return (\n <div\n ref={tagRef}\n {...rowProps}\n {...focusProps}\n data-focus-visible={isFocusVisible}\n data-is-toggle={true}\n className={cx(\"p-button\", \"size-sm\")}\n data-variant={isSelected ? activeVariant : idleVariant}\n data-radius=\"full\"\n data-color={isSelected ? colors.active : colors.idle}\n >\n <div {...gridCellProps}>{item.rendered}</div>\n </div>\n );\n}\n\ninterface TagVariantProps {\n activeColor?: Color;\n activeVariant?: ColorVariant;\n idleColor?: Color;\n idleVariant?: ColorVariant;\n autoColor?: boolean;\n}\n\ninterface TagGroupProps<T>\n extends AriaTagGroupProps<T>,\n FlexProps,\n TagVariantProps {}\n\nexport function TagGroup<T extends object>({\n wrap = \"wrap\",\n gap,\n columnGap,\n rowGap,\n align,\n justify,\n activeColor,\n activeVariant,\n idleColor,\n idleVariant,\n autoColor,\n ...props\n}: TagGroupProps<T>) {\n const { label, description, errorMessage } = props;\n const tagGroupRef = React.useRef(null);\n const state = useListState(props);\n const { gridProps, labelProps, descriptionProps, errorMessageProps } =\n useTagGroup(props, state, tagGroupRef);\n\n return (\n <Flex stack className=\"tag-group\">\n {label && <InputLabel {...labelProps}>{label}</InputLabel>}\n <Flex\n wrap={wrap}\n gap={gap}\n columnGap={columnGap}\n rowGap={rowGap}\n align={align}\n justify={justify}\n ref={tagGroupRef}\n {...gridProps}\n >\n {[...state.collection].map((item) => {\n return (\n <Tag\n autoColor={autoColor}\n activeColor={activeColor}\n activeVariant={activeVariant}\n idleColor={idleColor}\n idleVariant={idleVariant}\n key={item.key}\n state={state}\n item={item}\n ></Tag>\n );\n })}\n </Flex>\n {errorMessage && (\n <InputError {...errorMessageProps}>{errorMessage}</InputError>\n )}\n {description && (\n <Text as=\"div\" {...descriptionProps}>\n {description}\n </Text>\n )}\n </Flex>\n );\n}\n\nexport const TagGroupItem = Item;\n","export { ColorPicker } from \"./color-picker\";\nexport { ColorArea } from \"./color-area\";\nexport { ColorField } from \"./color-field\";\nexport { ColorSwatchPicker } from \"./color-swatch\";\nexport { ColorSlider } from \"./color-slider\";\nexport { parseColor } from \"./color.utils\";\n","import { ColorField, ColorArea, ColorSlider, ColorSwatchPicker } from \"./index\";\nimport * as React from \"react\";\nimport { Color, parseColor } from \"@react-stately/color\";\nimport { Flex } from \"../flex\";\nimport { NumberInput } from \"../input\";\nimport { Space } from \"../space\";\nimport { Select } from \"../select\";\nimport { Separator } from \"../separator\";\nimport { useControlledState } from \"../../hooks/use-controlled-state\";\nimport { StyleProps } from \"../../utils/types\";\n\ntype ColorPickerProps = StyleProps<\n \"wrapper\" | \"area\" | \"swatch\" | \"hue\" | \"alpha\"\n> & {\n onChange?: (color: Color) => void;\n color?: Color;\n};\n\nexport function ColorPicker({\n onChange,\n color: colorProp,\n styles,\n classNames,\n className,\n style,\n}: ColorPickerProps) {\n const [colorSpace, setColorSpace] = React.useState(\"hex\");\n\n const [color, setColor] = useControlledState(\n colorProp,\n parseColor(\"#BB66CC\").toFormat(\"hsla\"),\n onChange\n );\n\n function handleChange(color: Color) {\n setColor(color);\n onChange?.(color);\n }\n\n function setAlpha(alpha: number) {\n if (isNaN(alpha)) {\n return;\n }\n console.log(alpha);\n console.log(color);\n const newColor = color.withChannelValue(\"alpha\", alpha);\n setColor(newColor);\n console.log(newColor);\n }\n\n const [h, s, l] = color.getColorChannels();\n const rgbaColor = color.toFormat(\"rgba\");\n const [r, g, b] = rgbaColor.getColorChannels();\n return (\n <Flex stack style={{ width: 240 }}>\n <ColorArea\n onChange={handleChange}\n onChangeEnd={handleChange}\n xChannel={s}\n yChannel={l}\n value={color ?? parseColor(\"hsl(219, 79%, 66%)\")}\n style={{ width: \"100%\", height: 140 }}\n />\n <Flex stack style={{ padding: 8 }}>\n <Flex stack gap={\"2xs\"}>\n <ColorSlider\n value={color}\n onChange={handleChange}\n onChangeEnd={handleChange}\n channel={h}\n />\n <ColorSlider\n value={color}\n onChange={handleChange}\n onChangeEnd={handleChange}\n channel={\"alpha\"}\n />\n </Flex>\n <Flex stack>\n <Flex style={{ width: \"100%\" }} gap={\"3xs\"}>\n {colorSpace === \"hex\" && (\n <Space style={{ gap: 3 }} compact>\n <ColorField\n value={color}\n onChange={handleChange as any}\n size=\"sm\"\n style={{ width: \"60%\" }}\n appearance=\"filled\"\n placeholder=\"Add a color\"\n ></ColorField>\n <NumberInput\n onChange={(n) => setAlpha(n)}\n maxValue={1}\n formatOptions={{\n style: \"percent\",\n maximumFractionDigits: 0,\n }}\n size=\"sm\"\n value={color.getChannelValue(\"alpha\")}\n style={{ width: \"40%\" }}\n appearance=\"filled\"\n ></NumberInput>\n </Space>\n )}\n\n {[\"rgb\", \"hsl\"].includes(colorSpace) && (\n <Space style={{ gap: 3 }} compact>\n <NumberInput\n value={\n colorSpace === \"rgb\"\n ? rgbaColor.getChannelValue(r)\n : color.getChannelValue(h)\n }\n appearance=\"filled\"\n size=\"sm\"\n ></NumberInput>\n <NumberInput\n value={\n colorSpace === \"rgb\"\n ? rgbaColor.getChannelValue(g)\n : color.getChannelValue(s)\n }\n appearance=\"filled\"\n size=\"sm\"\n ></NumberInput>\n <NumberInput\n value={\n colorSpace === \"rgb\"\n ? rgbaColor.getChannelValue(b)\n : color.getChannelValue(l)\n }\n appearance=\"filled\"\n size=\"sm\"\n ></NumberInput>\n <NumberInput\n formatOptions={{\n style: \"percent\",\n maximumFractionDigits: 0,\n }}\n value={\n colorSpace === \"rgb\"\n ? rgbaColor.getChannelValue(\"alpha\")\n : color.getChannelValue(\"alpha\")\n }\n appearance=\"filled\"\n size=\"sm\"\n ></NumberInput>\n </Space>\n )}\n\n <Select\n style={{ width: \"60%\" }}\n valueKey=\"id\"\n onChange={(v) =>\n setColorSpace((v.target.value as string) ?? colorSpace)\n }\n showSelectionIndicator={false}\n value={colorSpace}\n size=\"sm\"\n appearance=\"filled\"\n items={[\"hex\", \"rgb\", \"hsl\"].map((o) => ({\n label: o.toUpperCase(),\n id: o,\n }))}\n ></Select>\n </Flex>\n\n <Separator color=\"gray\" />\n\n <Flex>\n <ColorSwatchPicker\n styles={{\n wrapper: { gap: 6 },\n swatch: {\n borderRadius: 5,\n },\n }}\n onChange={handleChange}\n colors={[\n \"#000000\",\n \"#333333\",\n \"#555555\",\n \"#777777\",\n \"#999999\",\n \"#bbbbbb\",\n \"#dddddd\",\n \"#ffffff\",\n \"#4455BB\",\n \"#1199EE\",\n \"#55CCFF\",\n \"#22CCDD\",\n \"#22AA99\",\n \"#66BB66\",\n \"#99CC66\",\n \"#CCDD33\",\n \"#7755CC\",\n \"#BB66CC\",\n \"#FF88AA\",\n \"#EE4444\",\n \"#FF7744\",\n \"#FFAA22\",\n \"#FFCC66\",\n \"#FFEE66\",\n ].map((color) => ({\n label: color,\n color: parseColor(color).toString(\"hsl\"),\n key: color,\n }))}\n />\n </Flex>\n </Flex>\n </Flex>\n </Flex>\n );\n}\n","import { useColorArea } from \"@react-aria/color\";\nimport {\n ColorAreaProps as AriaColorAreaProps,\n useColorAreaState,\n} from \"@react-stately/color\";\nimport * as React from \"react\";\nimport { BorderRadius, SizeOption } from \"../../utils/theme\";\nimport { cx } from \"../../utils/dom\";\nimport { StyleProps } from \"../../utils/types\";\nimport { useFocusRing } from \"react-aria\";\nimport { useTheme } from \"../theme\";\n\ntype ColorAreaProps = AriaColorAreaProps &\n StyleProps<\"wrapper\" | \"thumb\"> & {\n size?: SizeOption;\n radius?: BorderRadius;\n };\n\nexport function ColorArea({\n className,\n classNames,\n style,\n styles,\n radius,\n ...props\n}: ColorAreaProps) {\n const inputXRef = React.useRef(null);\n const inputYRef = React.useRef(null);\n const containerRef = React.useRef(null);\n\n const state = useColorAreaState(props);\n const { colorAreaProps, xInputProps, yInputProps, thumbProps } = useColorArea(\n { ...props, inputXRef, inputYRef, containerRef },\n state\n );\n\n const { focusProps, isFocusVisible } = useFocusRing();\n const theme = useTheme();\n\n return (\n <div\n {...colorAreaProps}\n ref={containerRef}\n style={{ ...colorAreaProps.style, ...styles?.wrapper, ...style }}\n className={cx(\"p-color-area\", className, classNames?.wrapper)}\n data-disabled={props.isDisabled}\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n >\n <div\n {...thumbProps}\n style={{ ...thumbProps.style, ...styles?.thumb }}\n className={cx(\"p-color-area-thumb\", classNames?.thumb)}\n data-focus-visible={isFocusVisible}\n data-color={state.getDisplayColor().toString(\"css\")}\n >\n <input {...xInputProps} ref={inputXRef} {...focusProps} />\n <input {...yInputProps} ref={inputYRef} {...focusProps} />\n </div>\n </div>\n );\n}\n","import { AriaColorFieldProps, useColorField } from \"@react-aria/color\";\nimport { useColorFieldState } from \"@react-stately/color\";\nimport * as React from \"react\";\nimport { cx } from \"../../utils/dom\";\nimport { Field, FieldComponentProps } from \"../form/field\";\n\ntype ColorFieldProps = AriaColorFieldProps & FieldComponentProps<\"input\">;\n\nexport function ColorField({\n label,\n description,\n className,\n classNames,\n style,\n styles,\n ...props\n}: ColorFieldProps) {\n const state = useColorFieldState(props);\n const inputRef = React.useRef<HTMLInputElement>(null);\n const { inputProps, labelProps, descriptionProps, errorMessageProps } =\n useColorField(\n { ...props, \"aria-label\": props[\"aria-label\"] ?? \"color-field\" },\n state,\n inputRef\n );\n\n return (\n <Field\n description={description}\n label={label}\n style={style}\n classNames={classNames}\n className={className}\n styles={styles}\n labelProps={{ ...labelProps }}\n descriptionProps={{ ...descriptionProps }}\n errorMessageProps={{ ...errorMessageProps }}\n {...props}\n >\n <input\n style={styles?.input}\n className={cx(classNames?.input, \"p-text-input-el\")}\n type=\"text\"\n ref={inputRef}\n {...inputProps}\n />\n </Field>\n );\n}\n","import { AriaColorSwatchProps, useColorSwatch } from \"@react-aria/color\";\nimport * as React from \"react\";\nimport { cx } from \"../../utils/dom\";\nimport { Flex, FlexProps } from \"../flex\";\nimport {\n Item,\n ItemProps,\n ListProps,\n ListState,\n Node,\n useListState,\n} from \"react-stately\";\nimport { useListBox, useOption } from \"react-aria\";\nimport { Color as AriaColor, parseColor } from \"@react-stately/color\";\nimport { StyleProps } from \"../../utils/types\";\nimport { BorderRadius, SizeOption } from \"../../utils/theme\";\nimport { useTheme } from \"../theme\";\n\ninterface ColorOption {\n key: string;\n color: string;\n label?: string;\n}\n\ntype ColorSwatchPickerProps<T> = FlexProps &\n ListProps<T> &\n StyleProps<\"wrapper\" | \"swatch\"> & {\n colors: Array<ColorOption>;\n onChange?: (color: AriaColor) => void;\n size?: SizeOption;\n radius?: BorderRadius;\n };\n\nexport function ColorSwatchPicker({\n colors,\n items,\n children,\n radius,\n size,\n onChange,\n selectionMode = \"single\",\n className,\n classNames,\n style,\n styles,\n ...props\n}: ColorSwatchPickerProps<ColorOption>) {\n items = colors;\n children = (item) => (\n <Color\n textValue={item.color}\n color={parseColor(item.color)}\n key={item.color}\n />\n );\n\n const listProps = {\n ...props,\n items,\n children,\n selectionMode,\n [\"aria-label\"]: \"color swatch picker\",\n onSelectionChange: (keys) => {\n const keysToArray = [...keys];\n onChange?.(parseColor(keysToArray[0] as string));\n props.onSelectionChange?.(keys);\n },\n } as ListProps<ColorOption>;\n\n const theme = useTheme();\n const wrapperRef = React.useRef(null);\n\n const listState = useListState(listProps);\n const { listBoxProps } = useListBox(listProps, listState, wrapperRef);\n\n const _colors = [...listState.collection];\n\n radius = radius ?? theme?.radius ?? \"md\";\n\n return (\n <SwatchProvider colors={colors} radius={radius} size={size} {...props}>\n <Flex\n style={{ ...style, ...styles?.wrapper }}\n className={cx(className, classNames?.wrapper)}\n wrap=\"wrap\"\n {...listBoxProps}\n ref={wrapperRef}\n >\n {_colors.map((color, index) => (\n <SwatchOption\n className={classNames?.swatch}\n style={styles?.swatch}\n key={index}\n state={listState}\n item={color}\n />\n ))}\n </Flex>\n </SwatchProvider>\n );\n}\n\ntype SwatchOptionProps = StyleProps & {\n item: Node<any>;\n state: ListState<any>;\n};\n\nexport function SwatchOption({\n item,\n state,\n style,\n className,\n}: SwatchOptionProps) {\n const ref = React.useRef(null);\n const {\n optionProps,\n isDisabled,\n isFocusVisible,\n isFocused,\n isPressed,\n isSelected,\n } = useOption({ key: item.key }, state, ref);\n\n const color = item.props.color;\n const ctx = useSwatchPickerContext();\n\n return (\n <ColorSwatch\n className={className}\n style={style}\n color={color}\n _ref={ref}\n data-disabled={isDisabled}\n data-selected={isSelected}\n data-focused={isFocused}\n data-focus-visible={isFocusVisible}\n data-pressed={isPressed}\n data-radius={ctx.radius}\n data-size={ctx.size}\n {...optionProps}\n ></ColorSwatch>\n );\n}\n\ntype ColorSwatchProps = AriaColorSwatchProps &\n StyleProps & {\n _ref?: React.RefObject<HTMLDivElement>;\n };\n\nfunction ColorSwatch({\n className,\n style,\n _ref,\n color: colorProp,\n ...props\n}: ColorSwatchProps) {\n const { colorSwatchProps, color } = useColorSwatch({\n ...props,\n color: colorProp,\n });\n return (\n <div\n {...props}\n ref={_ref}\n className={cx(\"p-color-swatch\", className)}\n {...colorSwatchProps}\n style={{\n ...colorSwatchProps.style,\n background: color.toString(\"css\"),\n ...style,\n }}\n >\n <div className=\"p-swatch-checkers\"></div>\n </div>\n );\n}\n\nconst SwatchPickerContext =\n React.createContext<ColorSwatchPickerProps<ColorOption> | null>(null);\nfunction SwatchProvider(\n props: React.PropsWithChildren<ColorSwatchPickerProps<ColorOption>>\n) {\n return (\n <SwatchPickerContext.Provider value={props}>\n {props.children}\n </SwatchPickerContext.Provider>\n );\n}\n\nfunction useSwatchPickerContext() {\n const ctx = React.useContext(SwatchPickerContext);\n if (!ctx) {\n throw new Error(\"SwatchPicker must be used within a SwatchPickerProvider\");\n }\n return ctx;\n}\n\nconst Color = Item as (\n props: Partial<ItemProps<ColorOption>> & { color: AriaColor }\n) => JSX.Element;\n","import { AriaColorSliderOptions, useColorSlider } from \"@react-aria/color\";\nimport { useColorSliderState } from \"@react-stately/color\";\nimport * as React from \"react\";\nimport { useFocusRing, useLocale } from \"react-aria\";\nimport { Field } from \"../form/field\";\n\ntype ColorSliderProps = Omit<AriaColorSliderOptions, \"trackRef\" | \"inputRef\">;\n\nexport function ColorSlider({ label, ...props }: ColorSliderProps) {\n const { locale } = useLocale();\n const state = useColorSliderState({ ...props, locale });\n const trackRef = React.useRef(null);\n const inputRef = React.useRef(null);\n\n const { labelProps, trackProps, thumbProps, inputProps } = useColorSlider(\n {\n ...props,\n label,\n \"aria-label\": props[\"aria-label\"] ?? \"color-slider\",\n inputRef,\n trackRef,\n },\n state\n );\n\n const { focusProps, isFocusVisible } = useFocusRing();\n\n return (\n <Field\n label={label}\n className=\"p-color-slider\"\n replaceDefaultControlWrapper\n labelProps={labelProps}\n >\n <div\n {...trackProps}\n data-focus-visible={isFocusVisible}\n data-bg={trackProps.style?.background}\n className=\"p-color-slider-track\"\n ref={trackRef}\n style={{\n ...trackProps.style,\n background: trackProps.style?.background,\n }}\n >\n <div className=\"p-color-slider-checkers\"></div>\n <div\n className=\"p-color-slider-thumb\"\n {...thumbProps}\n style={{\n ...thumbProps.style,\n background: state.getDisplayColor().toString(\"css\"),\n }}\n >\n <input ref={inputRef} {...inputProps} {...focusProps} />\n </div>\n </div>\n </Field>\n );\n}\n","import { parseColor as AriaParseColor } from \"@react-stately/color\";\n\nexport function parseColor(color: string) {\n // TODO: add support for rgba colors\n return AriaParseColor(color);\n}\n","export { Toggle, ToggleGroup } from \"./toggle-group\";\n","import * as React from \"react\";\nimport { StyleProps } from \"../../utils/types\";\nimport {\n CheckboxGroupProps,\n CheckboxGroupState,\n RadioGroupProps,\n RadioGroupState,\n useCheckboxGroupState,\n useRadioGroupState,\n} from \"react-stately\";\nimport {\n AriaCheckboxGroupItemProps,\n AriaRadioProps,\n VisuallyHidden,\n mergeProps,\n useCheckboxGroup,\n useCheckboxGroupItem,\n useFocusRing,\n useRadio,\n useRadioGroup,\n} from \"react-aria\";\nimport { cx } from \"../../utils/dom\";\nimport {\n BorderRadius,\n ButtonSize,\n Color,\n ColorVariant,\n SizeOption,\n} from \"../../utils/theme\";\nimport { useTheme } from \"../theme\";\nimport { Space, useSpace } from \"../space/space\";\nimport { ButtonToggleProps } from \"../button/button\";\nimport { Field } from \"../form/field\";\n\n// TODO: Figure out how to make this a whole lot simpler.\n// We can't call hooks conditionally\n// We don't want to have two separate components for single and multiple selection toggles\n\ntype Mode = \"single\" | \"multiple\";\ntype ValueType<M> = M extends \"single\" ? string : string[];\n\ntype CFGroupProps<P> = Omit<\n P,\n \"onChange\" | \"value\" | \"defaultValue\" | \"validate\"\n>;\n\ntype CFUnion = CFGroupProps<RadioGroupProps> | CFGroupProps<CheckboxGroupProps>;\n\ntype ToggleGroupContextValue = {\n state: RadioGroupState | CheckboxGroupState;\n mode: \"single\" | \"multiple\";\n props: GroupProps<CFUnion>;\n};\nconst ToggleGroupContext = React.createContext<ToggleGroupContextValue | null>(\n null\n);\n\ntype GroupProps<T> = StyleProps<\"wrapper\"> &\n ButtonToggleProps &\n T & {\n children?: React.ReactNode;\n radius?: BorderRadius;\n size?: ButtonSize;\n };\n\ntype ToggleGroupProps<M extends Mode> = GroupProps<CFUnion> & {\n mode?: M;\n} & React.ComponentProps<typeof Space>;\n\ntype ValueProps<M extends Mode> = {\n value?: ValueType<M>;\n defaultValue?: ValueType<M>;\n onChange?: (value: ValueType<M>) => void;\n validate?: (value: ValueType<M>) => void;\n};\n\nexport function ToggleGroup<M extends Mode = \"single\">({\n children,\n mode = \"single\" as M,\n value,\n defaultValue,\n onChange,\n validate,\n styles,\n classNames,\n className,\n style,\n ...props\n}: ToggleGroupProps<M> & ValueProps<M>) {\n const Wrapper = React.useMemo(() => {\n if (mode === \"single\") {\n return SingleSelectGroup;\n }\n\n return MultiSelectGroup;\n }, [mode]);\n\n props = { ...props } as CFUnion;\n\n return (\n <Field label={props.label} replaceDefaultControlWrapper>\n <Wrapper\n value={value as any}\n defaultValue={defaultValue as any}\n onChange={onChange as any}\n validate={validate as any}\n {...props}\n >\n <Space\n className={className}\n styles={styles}\n classNames={classNames}\n style={style}\n {...props}\n >\n {children}\n </Space>\n </Wrapper>\n </Field>\n );\n}\n\nfunction SingleSelectGroup({\n children,\n orientation = \"horizontal\",\n ...props\n}: GroupProps<RadioGroupProps>) {\n const state = useRadioGroupState(props);\n const { radioGroupProps } = useRadioGroup(\n { ...props, orientation, \"aria-label\": \"single toggle group\" },\n state\n );\n return (\n <div {...radioGroupProps}>\n <ToggleGroupContext.Provider value={{ state, mode: \"single\", props }}>\n {children}\n </ToggleGroupContext.Provider>\n </div>\n );\n}\n\nfunction MultiSelectGroup({\n children,\n ...props\n}: GroupProps<CheckboxGroupProps>) {\n const state = useCheckboxGroupState(props);\n const { groupProps } = useCheckboxGroup(\n { ...props, \"aria-label\": \"multiple toggle group\" },\n state\n );\n return (\n <div {...groupProps}>\n <ToggleGroupContext.Provider value={{ state, mode: \"multiple\", props }}>\n {children}\n </ToggleGroupContext.Provider>\n </div>\n );\n}\n\ntype SingleToggleProps<P> = P & {\n children: React.ReactNode;\n};\n\nfunction SingleToggle({ ...props }: SingleToggleProps<AriaRadioProps>) {\n const ctx = React.useContext(ToggleGroupContext);\n const state = ctx?.state as RadioGroupState;\n const ref = React.useRef(null);\n if (!ctx) {\n throw new Error(\"Toggle must be used within a ToggleGroup\");\n }\n\n const { focusProps, isFocusVisible } = useFocusRing();\n const isSelected = state.selectedValue === props.value;\n\n const { inputProps } = useRadio(props, ctx.state as RadioGroupState, ref);\n\n return (\n <ToggleButton isSelected={isSelected} isFocusVisible={isFocusVisible}>\n <VisuallyHidden>\n <input ref={ref} {...mergeProps(inputProps, focusProps)} />\n </VisuallyHidden>\n {props.children}\n </ToggleButton>\n );\n}\n\nfunction MultiToggle({\n ...props\n}: SingleToggleProps<AriaCheckboxGroupItemProps>) {\n const ctx = React.useContext(ToggleGroupContext);\n const state = ctx?.state as CheckboxGroupState;\n const ref = React.useRef(null);\n if (!ctx) {\n throw new Error(\"Toggle must be used within a ToggleGroup\");\n }\n\n const { focusProps, isFocusVisible } = useFocusRing();\n const isSelected = state.isSelected(props.value);\n\n const { inputProps } = useCheckboxGroupItem(\n props,\n ctx.state as CheckboxGroupState,\n ref\n );\n\n return (\n <ToggleButton isSelected={isSelected} isFocusVisible={isFocusVisible}>\n <VisuallyHidden>\n <input ref={ref} {...mergeProps(inputProps, focusProps)} />\n </VisuallyHidden>\n {props.children}\n </ToggleButton>\n );\n}\n\ntype ToggleProps = StyleProps<\"wrapper\"> &\n ButtonToggleProps & {\n value: string;\n children: React.ReactNode;\n color?: Color;\n variant?: ColorVariant;\n size?: SizeOption;\n radius?: BorderRadius;\n isIconButton?: boolean;\n };\n\nconst ToggleContext = React.createContext<{ props: ToggleProps } | null>(null);\n\nexport function Toggle({ ...props }: ToggleProps) {\n const ctx = React.useContext(ToggleGroupContext);\n if (!ctx) {\n throw new Error(\"Toggle must be used within a ToggleGroup\");\n }\n\n const Wrapper = React.useMemo(() => {\n if (ctx?.mode === \"single\") {\n return SingleToggle;\n }\n\n return MultiToggle;\n }, [ctx?.mode]);\n\n return (\n <ToggleContext.Provider value={{ props }}>\n <Wrapper value={props.value}>{props.children}</Wrapper>\n </ToggleContext.Provider>\n );\n}\n\nfunction ToggleButton({\n children,\n isFocusVisible,\n isSelected,\n ...props\n}: {\n children: React.ReactNode;\n isSelected?: boolean;\n isFocusVisible?: boolean;\n}) {\n const ctx = React.useContext(ToggleContext)?.props;\n const groupCtx = React.useContext(ToggleGroupContext);\n\n if (!ctx || !groupCtx) {\n throw new Error(\"Toggle must be used within a ToggleGroup\");\n }\n\n const theme = useTheme();\n const space = useSpace();\n const idleColor = ctx.idleColor ?? groupCtx.props.idleColor ?? \"gray\";\n const activeColor =\n ctx.activeColor ?? groupCtx.props.activeColor ?? theme?.color ?? \"gray\";\n const idleVariant = ctx.idleVariant ?? groupCtx.props.idleVariant ?? \"light\";\n const activeVariant =\n ctx.activeVariant ?? groupCtx.props.activeVariant ?? \"solid\";\n const color = isSelected ? activeColor : idleColor;\n const variant = isSelected ? activeVariant : idleVariant;\n const radius = ctx.radius ?? groupCtx.props.radius ?? \"full\";\n const size = ctx.size ?? groupCtx.props.size ?? \"md\";\n\n return (\n <label\n data-icon-button={ctx.isIconButton}\n data-is-toggle={true}\n data-radius={radius}\n data-color={color}\n data-variant={variant}\n className={cx(\n \"p-button\",\n ctx.className,\n ctx.classNames?.wrapper,\n `size-${size}`,\n space.classNames\n )}\n data-selected={isSelected}\n data-focus-visible={isFocusVisible}\n {...props}\n >\n {children}\n </label>\n );\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|
|
1
|
+
{"mappings":";;;;;;;;;;;AIAO,SAAS,0CAAS,KAAc;IACrC,OAAO,OAAO,UAAU;AAC1B;AAEO,SAAS,0CAAQ,KAAc;IACpC,OAAO,UAAU,QAAQ,MAAM,OAAO,CAAC;AACzC;AAEO,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,IAAI,WAAW;IAEf,MAAO,IAAI,KAAK,MAAM,CAAE;QACtB,MAAM,SAAS,wCAAkB,IAAI,CAAC,IAAI;QAC1C,IAAI,QAAQ;YACV,YAAa,CAAA,YAAY,GAAE;YAC3B,YAAY;QACd;IACF;IAEA,OAAO;AACT;AAQO,SAAS,0CAAa,GAAG,IAAuB;IACrD,OAAO,CAAC;QACN,KAAK,MAAM,OAAO,KAAM;YACtB,IAAI,OAAO,QAAQ,YACjB,IAAI;iBACC,IAAI,OAAO,OAAO,QAAQ,UAC/B,IAAI,OAAO,GAAG;QAElB;IACF;AACF;AAEA,MAAM,2CAAkC,IAAI,IAAI;IAC9C,yBAAyB;IACzB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,iBAAiB;IACjB;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IAC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IAAI,UAAU,EAAE,SAChB,CAAC,KAAK,EAAE,KAAK,CAAC,EACd,MAAM,UAAU;QAElB,iBAAe;QACf,sBAAoB;QACnB,GAAG,KAAK;kBAER;;AAGP;;;","sources":["src/index.ts","src/components/box/index.ts","src/components/box/box.tsx","src/utils/dom.ts","src/utils/assertions.ts","src/components/grid/index.ts","src/components/grid/grid.tsx","src/utils/helpers.ts","src/utils/theme.ts","src/components/flex/index.ts","src/components/flex/flex.tsx","src/components/input/index.ts","src/components/input/input.tsx","src/components/form/field.tsx","src/components/input-label/index.ts","src/components/input-label/input-label.tsx","src/components/text/index.ts","src/components/text/text.tsx","src/components/input-error/index.ts","src/components/input-error/input-error.tsx","src/components/space/space.tsx","src/components/theme/index.ts","src/components/theme/theme-provider.tsx","src/components/input/number-input.tsx","src/components/button/index.ts","src/components/button/button.tsx","src/components/loader/index.ts","src/components/loader/loader.tsx","src/components/button/button-group.tsx","src/components/space/index.ts","src/utils/object.ts","src/components/button/icon-button.tsx","src/components/input/password-input.tsx","src/components/textarea/index.ts","src/components/textarea/textarea.tsx","src/components/checkbox/index.ts","src/components/checkbox/checkbox.tsx","src/components/checkbox/checkbox-group.tsx","src/components/dropdown-menu/index.ts","src/components/dropdown-menu/dropdown-menu.tsx","src/components/internal-popover/index.ts","src/components/internal-popover/internal-popover.tsx","src/components/combo-box/index.ts","src/components/combo-box/combo-box.tsx","src/components/list-box/index.ts","src/components/list-box/list-box.tsx","src/components/list-box/list-box.utils.tsx","src/components/collections/index.tsx","src/components/list-box/list-box-provider.tsx","src/components/radio/index.ts","src/components/radio/radio.tsx","src/components/radio/radio-card.tsx","src/components/select/index.ts","src/components/select/select.tsx","src/components/tag/index.ts","src/components/tag/tag.tsx","src/components/date-input/index.ts","src/components/date-input/date-input.tsx","src/components/date-input/date-field.tsx","src/components/date-input/calendar.tsx","src/utils/array.ts","src/components/avatar/index.ts","src/components/avatar/avatar.tsx","src/components/file-uploader/index.ts","src/components/file-uploader/file-uploader.tsx","src/components/separator/index.ts","src/components/separator/separator.tsx","src/components/progress/index.ts","src/components/progress/progress.tsx","src/components/switch/index.ts","src/components/switch/switch.tsx","src/components/slider/index.ts","src/components/slider/slider.tsx","src/components/icon-tray/index.ts","src/components/icon-tray/icon-tray.tsx","src/components/sticker/index.ts","src/components/sticker/sticker.tsx","src/components/tabs/index.ts","src/components/tabs/tabs.tsx","src/components/table/index.ts","src/components/table/table.tsx","src/components/timeline/index.ts","src/components/timeline/timeline.tsx","src/components/modal/index.ts","src/components/modal/modal.tsx","src/components/tag-input/index.ts","src/components/tag-input/tag-input.tsx","src/utils/regex.ts","src/hooks/use-controlled-state.tsx","src/components/popover/index.ts","src/components/popover/popover.tsx","src/components/tag-group/index.tsx","src/components/tag-group/tag-group.tsx","src/components/color/index.ts","src/components/color/color-picker.tsx","src/components/color/color-area.tsx","src/components/color/color-field.tsx","src/components/color/color-swatch.tsx","src/components/color/color-slider.tsx","src/components/color/color.utils.tsx","src/components/toggle-group/index.ts","src/components/toggle-group/toggle-group.tsx"],"sourcesContent":["export { Box } from \"./components/box\";\nexport { Grid, GridItem } from \"./components/grid\";\nexport { Flex } from \"./components/flex\";\nexport { Input, NumberInput } from \"./components/input\";\nexport { Text } from \"./components/text\";\nexport { Textarea } from \"./components/textarea\";\nexport { Button, IconButton, ButtonGroup } from \"./components/button\";\nexport { Checkbox, CheckboxGroup } from \"./components/checkbox\";\nexport { DropdownMenu } from \"./components/dropdown-menu\";\nexport { ComboBox } from \"./components/combo-box\";\nexport { Radio, RadioGroup, RadioCard } from \"./components/radio\";\nexport { Select, Option, Section } from \"./components/select\";\nexport { ListBoxItem, ListBoxSection } from \"./components/list-box\";\nexport { DateInput, Calendar } from \"./components/date-input\";\nexport { Avatar } from \"./components/avatar\";\nexport { FileUploader } from \"./components/file-uploader\";\nexport { Separator } from \"./components/separator\";\nexport { Progress } from \"./components/progress\";\nexport { Loader } from \"./components/loader\";\nexport { Tag } from \"./components/tag\";\nexport { Switch } from \"./components/switch\";\nexport { Slider } from \"./components/slider\";\nexport { IconTray } from \"./components/icon-tray\";\nexport { Sticker } from \"./components/sticker\";\nexport { Tabs, Tab } from \"./components/tabs\";\nexport { Table } from \"./components/table\";\nexport { Timeline } from \"./components/timeline\";\nexport { Modal, useModal } from \"./components/modal\";\nexport { Space } from \"./components/space\";\nexport { TagInput } from \"./components/tag-input\";\nexport { Popover, PopoverContent, PopoverTrigger } from \"./components/popover\";\nexport { TagGroup, TagGroupItem } from \"./components/tag-group\";\nexport { ThemeProvider, useTheme } from \"./components/theme\";\nexport {\n ColorArea,\n ColorField,\n ColorPicker,\n ColorSlider,\n ColorSwatchPicker,\n parseColor,\n} from \"./components/color\";\nexport { Toggle, ToggleGroup } from \"./components/toggle-group\";\n\nexport type { ModalProps } from \"./components/modal\";\n","export { Box } from \"./box\";\n","import * as React from \"react\";\nimport { cx } from \"../../utils/dom\";\nimport { PositionType } from \"../../utils/theme\";\nimport { AsProps } from \"../../utils/types\";\n\nexport interface BoxProps {\n stretchX?: boolean;\n stretchY?: boolean;\n stretchXY?: boolean;\n position?: PositionType;\n}\n\nexport const _Box = <T extends React.ElementType = \"div\">(\n {\n stretchX,\n stretchY,\n stretchXY,\n children,\n className,\n position,\n as = \"div\",\n ...props\n }: React.PropsWithChildren<BoxProps> & AsProps<T>,\n ref: React.Ref<T>\n) => {\n const Comp = as;\n return (\n <Comp\n className={cx({\n [`position-${position}`]: !!position,\n \"stretch-x\": !!stretchX,\n \"stretch-y\": !!stretchY,\n \"stretch-xy\": !!stretchXY,\n [`${className}`]: !!className,\n })}\n ref={ref}\n {...props}\n >\n {children}\n </Comp>\n );\n};\n\n_Box.displayName = \"Box\";\n\nexport const Box = React.forwardRef(_Box) as typeof _Box;\n","import { isArray, isObject } from \"./assertions\";\n\nexport type ConditionalClassNameObject = Record<string, boolean>;\n// cns(\"p-button\", {space: true, firs-item:false}, className, [className], ()=>\"hello world\")\nfunction processClassValue(value: any): string | null {\n if (!value) {\n return null;\n }\n\n if (typeof value === \"function\") {\n return processClassValue(value?.());\n }\n\n if (isArray(value)) {\n let i = 0;\n let temp = \"\";\n while (i < value.length) {\n const result = processClassValue(value[i++]);\n if (result) {\n temp && (temp += \" \");\n temp += `${result}`;\n }\n }\n return temp;\n }\n\n if (isObject(value)) {\n let str = \"\";\n for (const key in value) {\n if (value[key]) {\n str && (str += \" \");\n str += `${key}`;\n }\n }\n return str;\n }\n\n return value;\n}\n\nexport function cx(...args: any[]): string {\n let i = 0;\n let classStr = \"\";\n\n while (i < args.length) {\n const result = processClassValue(args[i++]);\n if (result) {\n classStr && (classStr += \" \");\n classStr += result;\n }\n }\n\n return classStr;\n}\n\nexport type RefType<T> =\n | React.MutableRefObject<T>\n | ((node: T) => void)\n | null\n | undefined;\n\nexport function mergeRefs<T>(...refs: Array<RefType<T>>) {\n return (node: T) => {\n for (const ref of refs) {\n if (typeof ref === \"function\") {\n ref(node);\n } else if (ref && typeof ref === \"object\") {\n ref.current = node;\n }\n }\n };\n}\n\nconst validDOMProperties: Set<string> = new Set([\n // Common HTML attributes\n \"accept\",\n \"acceptCharset\",\n \"accessKey\",\n \"action\",\n \"allowFullScreen\",\n \"allowTransparency\",\n \"alt\",\n \"async\",\n \"autoComplete\",\n \"autoFocus\",\n \"autoPlay\",\n \"capture\",\n \"cellPadding\",\n \"cellSpacing\",\n \"challenge\",\n \"charSet\",\n \"checked\",\n \"cite\",\n \"classID\",\n \"className\",\n \"colSpan\",\n \"cols\",\n \"content\",\n \"contentEditable\",\n \"contextMenu\",\n \"controls\",\n \"coords\",\n \"crossOrigin\",\n \"data\",\n \"dateTime\",\n \"default\",\n \"defer\",\n \"dir\",\n \"disabled\",\n \"download\",\n \"draggable\",\n \"encType\",\n \"form\",\n \"formAction\",\n \"formEncType\",\n \"formMethod\",\n \"formNoValidate\",\n \"formTarget\",\n \"frameBorder\",\n \"headers\",\n \"height\",\n \"hidden\",\n \"high\",\n \"href\",\n \"hrefLang\",\n \"htmlFor\",\n \"httpEquiv\",\n \"icon\",\n \"id\",\n \"inputMode\",\n \"integrity\",\n \"is\",\n \"keyParams\",\n \"keyType\",\n \"kind\",\n \"label\",\n \"lang\",\n \"list\",\n \"loop\",\n \"low\",\n \"manifest\",\n \"marginHeight\",\n \"marginWidth\",\n \"max\",\n \"maxLength\",\n \"media\",\n \"mediaGroup\",\n \"method\",\n \"min\",\n \"minLength\",\n \"multiple\",\n \"muted\",\n \"name\",\n \"noValidate\",\n \"nonce\",\n \"open\",\n \"optimum\",\n \"pattern\",\n \"placeholder\",\n \"poster\",\n \"preload\",\n \"profile\",\n \"radioGroup\",\n \"readOnly\",\n \"referrerPolicy\",\n \"rel\",\n \"required\",\n \"reversed\",\n \"role\",\n \"rowSpan\",\n \"rows\",\n \"sandbox\",\n \"scope\",\n \"scoped\",\n \"scrolling\",\n \"seamless\",\n \"selected\",\n \"shape\",\n \"size\",\n \"sizes\",\n \"span\",\n \"spellCheck\",\n \"src\",\n \"srcDoc\",\n \"srcLang\",\n \"srcSet\",\n \"start\",\n \"step\",\n \"style\",\n \"summary\",\n \"tabIndex\",\n \"target\",\n \"title\",\n \"type\",\n \"useMap\",\n \"value\",\n \"width\",\n \"wmode\",\n \"wrap\",\n // Event handlers\n \"onCopy\",\n \"onCut\",\n \"onPaste\",\n \"onCompositionEnd\",\n \"onCompositionStart\",\n \"onCompositionUpdate\",\n \"onKeyDown\",\n \"onKeyPress\",\n \"onKeyUp\",\n \"onFocus\",\n \"onBlur\",\n \"onChange\",\n \"onInput\",\n \"onInvalid\",\n \"onSubmit\",\n \"onClick\",\n \"onContextMenu\",\n \"onDoubleClick\",\n \"onDrag\",\n \"onDragEnd\",\n \"onDragEnter\",\n \"onDragExit\",\n \"onDragLeave\",\n \"onDragOver\",\n \"onDragStart\",\n \"onDrop\",\n \"onMouseDown\",\n \"onMouseEnter\",\n \"onMouseLeave\",\n \"onMouseMove\",\n \"onMouseOut\",\n \"onMouseOver\",\n \"onMouseUp\",\n \"onSelect\",\n \"onTouchCancel\",\n \"onTouchEnd\",\n \"onTouchMove\",\n \"onTouchStart\",\n \"onScroll\",\n \"onWheel\",\n \"onAbort\",\n \"onCanPlay\",\n \"onCanPlayThrough\",\n \"onDurationChange\",\n \"onEmptied\",\n \"onEncrypted\",\n \"onEnded\",\n \"onError\",\n \"onLoadedData\",\n \"onLoadedMetadata\",\n \"onLoadStart\",\n \"onPause\",\n \"onPlay\",\n \"onPlaying\",\n \"onProgress\",\n \"onRateChange\",\n \"onSeeked\",\n \"onSeeking\",\n \"onStalled\",\n \"onSuspend\",\n \"onTimeUpdate\",\n \"onVolumeChange\",\n \"onWaiting\",\n \"onLoad\",\n \"onAnimationStart\",\n \"onAnimationEnd\",\n \"onAnimationIteration\",\n \"onTransitionEnd\",\n \"onToggle\",\n]);\n\nexport function filterDOMProps(props: Record<string, any>) {\n const newProps = {} as Record<string, any>;\n for (const key in props) {\n if (!key.startsWith(\"data-\") && !validDOMProperties.has(key)) {\n continue;\n }\n newProps[key] = props[key];\n }\n return newProps;\n}\n","export function isNumber(value: unknown): boolean {\n return typeof value === \"number\";\n}\n\nexport function isArray(value: unknown): boolean {\n return value !== null && Array.isArray(value);\n}\n\nexport function isEmptyArray(value: Array<unknown>): boolean {\n return isArray(value) && value.length === 0;\n}\n\nexport function isObject(value: object): boolean {\n return (\n (typeof value === \"object\" || typeof value === \"function\") &&\n !Array.isArray(value) &&\n value !== null\n );\n}\n\nexport function isEmptyObject(value: object) {\n return isObject(value) && Object.keys(value).length === 0;\n}\n\nexport function objectHasEmptyValue(value: object) {\n return (\n Object.values(value).filter((value) => {\n return value === \"\" || value === undefined || value === null;\n }).length > 0\n );\n}\n\nexport function isUndefinedOrNull(value: unknown) {\n return value == null;\n}\n\nexport function isUndefined(value: unknown) {\n return value === undefined;\n}","export { Grid, GridItem } from './grid';","import * as React from \"react\";\nimport {\n AlignItemsType,\n JustifyContentType,\n SizeOption,\n} from \"../../utils/theme\";\nimport { cx } from \"../../utils/dom\";\nimport { AsProps, ResponsiveProp } from \"../../utils/types\";\nimport { Box } from \"../box\";\nimport { breakpointClassNames } from \"../../utils/helpers\";\nimport { BoxProps } from \"../box/box\";\n\ntype Columns =\n | \"1\"\n | \"2\"\n | \"3\"\n | \"4\"\n | \"5\"\n | \"6\"\n | \"7\"\n | \"8\"\n | \"9\"\n | \"10\"\n | \"11\"\n | \"12\"\n | 1\n | 2\n | 3\n | 4\n | 5\n | 6\n | 7\n | 8\n | 9\n | 10\n | 11\n | 12;\ninterface GridProps {\n columns?: ResponsiveProp<Columns>;\n gap?: ResponsiveProp<SizeOption>;\n gapX?: ResponsiveProp<SizeOption>;\n gapY?: ResponsiveProp<SizeOption>;\n align?: ResponsiveProp<AlignItemsType>;\n justify?: ResponsiveProp<JustifyContentType>;\n}\n\nexport const _Grid = <T extends React.ElementType = \"div\">(\n props: GridProps & BoxProps & AsProps<T>,\n ref: React.Ref<T>\n) => {\n const {\n columns = 12,\n gap = \"sm\",\n gapX,\n gapY,\n align,\n justify,\n as,\n className,\n ...otherProps\n } = props;\n\n return (\n // TODO figure out why ts is screaming over here\n // eslint-disable-next-line @typescript-eslint/ban-ts-comment\n //@ts-ignore\n <Box\n as={as}\n ref={ref}\n className={cx(\n \"p-grid\",\n \"display-grid\",\n breakpointClassNames(\"columns\", columns),\n breakpointClassNames(\"gap\", gap),\n breakpointClassNames(\"column-gap\", gapX),\n breakpointClassNames(\"row-gap\", gapY),\n breakpointClassNames(\"flex-align\", align),\n breakpointClassNames(\"flex-justify\", justify),\n className\n )}\n {...otherProps}\n ></Box>\n );\n};\n\n_Grid.displayName = \"Grid\";\n\nexport const Grid = React.forwardRef(_Grid) as typeof _Grid;\n\ninterface GridItemProps extends React.ComponentProps<typeof Box> {\n colSpan?: ResponsiveProp<Columns>;\n}\n\nexport const _GridItem = <T extends React.ElementType = \"div\">(\n props: GridItemProps & AsProps<T>,\n ref: React.Ref<T>\n) => {\n return (\n <Box\n ref={ref}\n className={cx(\n \"p-grid-item\",\n breakpointClassNames(\"col-span\", props.colSpan),\n props.className\n )}\n {...props}\n ></Box>\n );\n};\n\nexport const GridItem = React.forwardRef(_GridItem) as typeof _GridItem;\n_GridItem.displayName = \"GridItem\";\n","import { isUndefinedOrNull } from \"./assertions\";\nimport { supportedColors } from \"./theme\";\nimport { ResponsiveProp, Breakpoints } from \"./types\";\n\n\n\nexport function warnDeprecation(deprecatedProp: any,newProp: any, value?: string) {\n if(!isUndefinedOrNull(value)) {\n console.warn(`${deprecatedProp} is deprecated and will be removed in a future release. ${newProp ? `Please use ${newProp} instead.` : \"\"}`)\n }\n}\n\nexport function hashCode(text: string) {\n const str = String(text);\n let hash = 0;\n let char;\n if (str.trim().length === 0) return hash;\n for (let i = 0; i < str.length; i++) {\n char = str.charCodeAt(i);\n hash = (hash << 5) - hash + char;\n // Convert to 32bit integer\n hash &= hash;\n }\n\n return Math.abs(hash);\n}\n\nexport function id() {\n return Math.random().toString(36);\n}\n\nexport function getRandomColor(string: string) {\n const hash = hashCode(string);\n return supportedColors[hash % supportedColors.length];\n}\n\nexport function breakpointClassNames<T>(\n prefix: string,\n value: ResponsiveProp<T>\n): string {\n if (!value) return \"\";\n\n if (typeof value === \"string\" || typeof value === \"number\") {\n return `${prefix}-${value}`;\n }\n\n let classNames = \"\";\n\n for (const key of Object.keys(value as Record<Breakpoints, T>)) {\n const breakpoint = key as Breakpoints;\n const breakpointValue = (value as Record<Breakpoints, T>)[breakpoint];\n\n if (breakpointValue) {\n classNames && (classNames += \" \");\n classNames +=\n breakpoint === \"base\"\n ? `${prefix}-${breakpointValue}`\n : `${breakpoint}:${prefix}-${breakpointValue}`;\n }\n }\n\n return classNames;\n}\n","export const supportedColors = [\n \"tomato\",\n \"red\",\n \"crimson\",\n \"pink\",\n \"plum\",\n \"purple\",\n \"violet\",\n \"indigo\",\n \"blue\",\n \"cyan\",\n \"teal\",\n \"green\",\n \"grass\",\n \"orange\",\n \"brown\",\n \"sky\",\n \"mint\",\n \"lime\",\n \"yellow\",\n \"amber\",\n \"gold\",\n \"bronze\",\n \"gray\",\n \"mauve\",\n \"slate\",\n \"sage\",\n \"olive\",\n \"sand\",\n] as const;\n\nexport type Color = (typeof supportedColors)[number];\n\nexport type ColorVariant =\n | \"solid\"\n | \"outline\"\n | \"light\"\n | \"lightOutline\"\n | \"solidMono\"\n | \"ghost\"\n | \"pastel\";\n\nexport type InputAppearance = \"outline\" | \"filled\" | \"filled-outline\";\nexport type BorderRadius = \"none\" | \"sm\" | \"md\" | \"lg\" | \"full\";\nexport type Appearance = \"light\" | \"dark\";\n\nexport type ButtonSize = \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\nexport type ButtonAppearance = \"primary\" | \"secondary\" | \"minimal\";\n\nexport type ButtonAppearanceSchemaType = Partial<\n Record<ButtonAppearance, { variant: ColorVariant; color: Color }>\n>;\nexport type DisplayType =\n | \"block\"\n | \"inline\"\n | \"inline-block\"\n | \"flex\"\n | \"none\"\n | \"grid\"\n | \"inline-flex\";\n\nexport type PositionType = \"absolute\" | \"relative\" | \"fixed\" | \"sticky\";\n\nexport type JustifyContentType =\n | \"start\"\n | \"center\"\n | \"end\"\n | \"space-between\"\n | \"space-around\"\n | \"space-evenly\";\n\nexport type AlignItemsType =\n | \"start\"\n | \"center\"\n | \"end\"\n | \"stretch\"\n | \"baseline\";\n\nexport type FlexDirectionType =\n | \"row\"\n | \"column\"\n | \"row-reverse\"\n | \"column-reverse\";\n\nexport type SizeOption =\n | \"none\"\n | \"4xs\"\n | \"3xs\"\n | \"2xs\"\n | \"xs\"\n | \"sm\"\n | \"md\"\n | \"lg\"\n | \"xl\"\n | \"2xl\"\n | \"3xl\"\n | \"4xl\";\n\nexport const borderRadiusShapeMap = {\n sharp: \"none\",\n pill: \"full\",\n rounded: undefined,\n};\n\nfunction ps(styles: any) {\n // 1. iterate over the keys of the styles object\n // 2. for each key, check is is valid css property\n}\n\ntype CSS = any;\n\ntype ParrotStyleDef = { variants: Record<string, CSS> };\n","export { Flex } from \"./flex\";\nexport type { FlexProps } from \"./flex\";\n","import * as React from \"react\";\nimport { Box } from \"../box\";\nimport { cx, filterDOMProps } from \"../../utils/dom\";\nimport {\n AlignItemsType,\n FlexDirectionType,\n JustifyContentType,\n SizeOption,\n} from \"../../utils/theme\";\nimport { BoxProps } from \"../box/box\";\nimport { AsProps, ResponsiveProp } from \"../../utils/types\";\nimport { breakpointClassNames } from \"../../utils/helpers\";\n\nexport interface FlexProps extends BoxProps {\n justify?: JustifyContentType;\n align?: AlignItemsType;\n direction?: FlexDirectionType;\n gap?: ResponsiveProp<SizeOption>;\n columnGap?: ResponsiveProp<SizeOption>;\n rowGap?: ResponsiveProp<SizeOption>;\n stack?: boolean;\n inline?: boolean;\n wrap?: \"wrap\" | \"nowrap\" | \"wrap-reverse\";\n}\n\nexport const _Flex = <T extends React.ElementType = \"div\">(\n props: React.PropsWithChildren<FlexProps> & AsProps<T>,\n ref: React.Ref<T>\n) => {\n const {\n justify,\n align,\n direction,\n gap = \"sm\",\n columnGap,\n rowGap,\n inline,\n wrap,\n stack,\n className,\n ...otherProps\n } = props;\n\n const flexDirection = stack ? \"column\" : direction ?? \"row\";\n\n return (\n <Box\n className={cx(\n className,\n inline ? \"display-inline-flex\" : \"display-flex\",\n `flex-direction-${flexDirection}`,\n wrap && `flex-${wrap}`,\n justify && `flex-justify-${justify}`,\n align && `flex-align-${align}`,\n breakpointClassNames(\"gap\", gap),\n breakpointClassNames(\"column-gap\", columnGap),\n breakpointClassNames(\"row-gap\", rowGap)\n )}\n // TODO - Fix types here - seems to work just fine though\n ref={ref as any}\n {...(filterDOMProps(otherProps) as any)}\n >\n {props.children}\n </Box>\n );\n};\n\n_Flex.displayName = \"Flex\";\n\nexport const Flex = React.forwardRef(_Flex) as typeof _Flex;\n","export { Input } from './input';\nexport { NumberInput } from './number-input';\nexport { PasswordInput } from './password-input';","import React from \"react\";\nimport { AriaTextFieldProps, useTextField } from \"react-aria\";\nimport { cx, mergeRefs } from \"../../utils/dom\";\nimport { Field, FieldComponentProps } from \"../form/field\";\n\nexport type TextInputProps = AriaTextFieldProps & FieldComponentProps<\"input\">;\n\nexport function Input({\n className,\n classNames,\n style,\n styles,\n onChange,\n inputRef,\n ...props\n}: TextInputProps) {\n const internalInputRef = React.useRef<HTMLInputElement>(null);\n\n const { labelProps, inputProps, errorMessageProps, descriptionProps } =\n useTextField(\n {\n ...props,\n onChange,\n inputElementType: \"input\",\n },\n internalInputRef\n );\n\n return (\n <Field\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n className={className}\n classNames={classNames}\n styles={styles}\n style={style}\n {...props}\n >\n <input\n ref={mergeRefs(inputRef, internalInputRef)}\n data-has-left-addon={!!props.prepend}\n data-has-right-addon={!!props.append}\n className={cx(\"p-text-input-el\")}\n {...inputProps}\n />\n </Field>\n );\n}\n","import React from \"react\";\nimport { Flex } from \"../flex\";\nimport { InputLabel } from \"../input-label\";\nimport { InputError } from \"../input-error\";\nimport { Text } from \"../text\";\nimport { useSpace } from \"../space/space\";\nimport { cx } from \"../../utils/dom\";\nimport { BorderRadius, Color, InputAppearance } from \"../../utils/theme\";\nimport { useTheme } from \"../theme\";\nimport { StyleProps } from \"../../utils/types\";\n\ntype FocusableElement = Element | HTMLOrSVGElement;\n\nexport type FieldProps<S extends string> = InputProps &\n StyleProps<S | \"wrapper\" | \"label\" | \"input\" | \"description\"> & {\n labelProps?:\n | React.LabelHTMLAttributes<HTMLLabelElement>\n | React.DOMAttributes<FocusableElement>;\n descriptionProps?: React.DOMAttributes<FocusableElement>;\n errorMessageProps?: React.DOMAttributes<FocusableElement>;\n children?: React.ReactNode;\n replaceDefaultControlWrapper?: boolean;\n };\n\nexport type FieldComponentProps<S extends string> = Omit<\n FieldProps<S>,\n \"labelProps\" | \"descriptionProps\" | \"errorMessageProps\"\n>;\n\nexport type InputProps = {\n description?: React.ReactNode;\n label?: React.ReactNode;\n error?: React.ReactNode;\n append?: React.ReactNode;\n prepend?: React.ReactNode;\n validationStatus?: \"error\" | \"success\" | \"warning\";\n shape?: \"rounded\" | \"sharp\";\n inputRef?: React.RefObject<HTMLInputElement>;\n wrapperRef?: React.RefObject<HTMLDivElement>;\n appearance?: InputAppearance;\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n color?: Color;\n radius?: BorderRadius;\n isDisabled?: boolean;\n};\n\nexport function Field<S extends string = any>({\n label,\n description,\n error,\n color = \"gray\",\n radius,\n size = \"md\",\n className,\n classNames,\n style,\n styles,\n prepend,\n append,\n appearance = \"outline\",\n validationStatus,\n labelProps,\n errorMessageProps,\n descriptionProps,\n children,\n replaceDefaultControlWrapper,\n isDisabled,\n wrapperRef,\n ...props\n}: FieldProps<S>) {\n const space = useSpace();\n const theme = useTheme();\n\n return (\n <Flex\n ref={wrapperRef}\n {...props}\n data-color={color}\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n data-size={size}\n className={cx(\n \"p-input-group\",\n space.compactItemWrapperAdjust,\n className,\n classNames?.wrapper\n )}\n stack\n gap={\"3xs\"}\n style={{ ...style, ...styles?.wrapper }}\n >\n {label && (\n <InputLabel\n style={styles?.label}\n className={classNames?.label}\n color={color}\n {...labelProps}\n >\n {label}\n </InputLabel>\n )}\n\n {!replaceDefaultControlWrapper && (\n <Flex\n className={cx(space.classNames, \"p-input-control\")}\n data-has-error={!!error}\n data-appearance={appearance}\n data-disabled={isDisabled}\n stretchX\n inline\n position=\"relative\"\n >\n {prepend && <Flex className=\"add-on add-on-left\">{prepend}</Flex>}\n {/**TODO: this is where actual input goes */}\n {children}\n {append && <Flex className=\"add-on add-on-right\">{append}</Flex>}\n </Flex>\n )}\n\n {replaceDefaultControlWrapper && children}\n\n {error && (\n <InputError validationStatus={validationStatus} {...errorMessageProps}>\n {error}\n </InputError>\n )}\n\n {description && (\n <Text\n as=\"div\"\n variant=\"light\"\n color=\"gray\"\n size=\"sm\"\n lineHeight={\"short\"}\n {...descriptionProps}\n >\n {description}\n </Text>\n )}\n </Flex>\n );\n}\n\nField.displayName = \"Field\";\n","export { default as InputLabel } from './input-label';","import React from \"react\";\n\nimport { cx } from \"../../utils/dom\";\nimport { Text } from \"../text\";\nimport { Color } from \"../../utils/theme\";\n\ntype InputLabelProps = Omit<React.HTMLAttributes<HTMLLabelElement>, \"size\">;\n\nconst InputLabel = React.forwardRef<HTMLLabelElement, InputLabelProps>(\n ({ children, className, color, ...props }, ref) => {\n return (\n <Text\n ref={ref}\n size=\"sm\"\n color={(color as Color) || \"gray\"}\n variant=\"light\"\n as=\"label\"\n className={cx([className, \"p-input-label\"])}\n {...props}\n >\n {children}\n </Text>\n );\n }\n);\n\nInputLabel.displayName = \"InputLabel\";\n\nexport default InputLabel;\n","export { Text } from \"./text\";\n","import * as React from \"react\";\nimport { Color, SizeOption } from \"../../utils/theme\";\n\nimport { cx } from \"../../utils/dom\";\nimport { AsProps, ResponsiveProp } from \"../../utils/types\";\nimport { breakpointClassNames } from \"../../utils/helpers\";\n\ntype TextWeight =\n | \"light\"\n | \"regular\"\n | \"medium\"\n | \"semi-bold\"\n | \"bold\"\n | \"heavy\"\n | \"inherit\";\ntype TextColorVariant = \"light\" | \"lighter\" | \"dark\" | \"default\";\n\ninterface TextProps {\n size?: ResponsiveProp<SizeOption>;\n weight?: TextWeight;\n highlight?: boolean;\n color?: Color | \"inherit\" | \"white\" | \"black\";\n variant?: TextColorVariant;\n align?: \"left\" | \"center\" | \"right\";\n numeric?: boolean;\n underline?: boolean;\n italic?: boolean;\n lineHeight?: \"normal\" | \"shorter\" | \"short\" | \"base\" | \"tall\";\n textCase?: \"uppercase\" | \"lowercase\" | \"capitalize\";\n}\n\nexport const _Text = <T extends React.ElementType = \"span\">(\n props: React.PropsWithChildren<TextProps> & AsProps<T>,\n ref?: React.Ref<T>\n) => {\n const {\n textCase,\n size = \"sm\",\n weight,\n color = \"gray\",\n variant = \"default\",\n highlight,\n align,\n lineHeight,\n underline,\n italic,\n as: Comp = \"span\",\n className,\n ...rest\n } = props;\n\n return (\n <Comp\n className={cx(\n \"p-text\",\n className,\n {\n [`text-highlight`]: !!highlight,\n [`text-weight-${weight}`]: !!weight,\n [`text-align-${align}`]: !!align,\n [`text-line-height-${lineHeight}`]: !!lineHeight,\n [`text-transform-${textCase}`]: !!textCase,\n },\n breakpointClassNames(\"text-size\", size)\n )}\n data-underline={underline}\n data-italic={italic}\n data-color={color}\n data-color-variant={variant}\n ref={ref}\n {...rest}\n />\n );\n};\n\n_Text.displayName = \"Text\";\n\nexport const Text = React.forwardRef(_Text) as typeof _Text;\n","export { default as InputError } from './input-error'","import React from \"react\";\nimport { Text } from \"../text\";\n\ntype InputErrorProps = React.ComponentProps<typeof Text> & {\n validationStatus?: \"error\" | \"success\" | \"warning\";\n};\n\nconst InputError = React.forwardRef<HTMLDivElement, InputErrorProps>(\n ({ children, validationStatus = \"error\", ...props }, ref) => {\n return (\n <Text\n size=\"sm\"\n className=\"p-input-error\"\n lineHeight={\"base\"}\n as=\"div\"\n color=\"red\"\n variant=\"default\"\n data-validation-status={validationStatus}\n ref={ref}\n {...props}\n >\n {children}\n </Text>\n );\n }\n);\n\nInputError.displayName = \"InputError\";\n\nexport default InputError;\n","import * as React from \"react\";\nimport { Flex, FlexProps } from \"../flex\";\nimport { ConditionalClassNameObject, cx } from \"../../utils/dom\";\nimport { SizeOption } from \"../../utils/theme\";\nimport { StyleProps } from \"../../utils/types\";\n\nconst SpaceContext = React.createContext<{\n classNames: ConditionalClassNameObject;\n compactItemWrapperAdjust: string;\n}>({ classNames: {}, compactItemWrapperAdjust: \"\" });\n\ntype SpaceProps = FlexProps &\n StyleProps<\"wrapper\"> & {\n compact?: boolean;\n gap?: SizeOption;\n };\n\nexport function Space({\n children,\n compact,\n gap,\n className,\n classNames,\n style,\n styles,\n ...props\n}: React.PropsWithChildren<SpaceProps>) {\n const childrenCount = React.Children.count(children);\n\n const nodes = React.useMemo(() => {\n return React.Children.map(children, (child, index) => {\n const isFirstChild = index == 0;\n const isLastChild = index == childrenCount - 1;\n\n if (!React.isValidElement(child)) return null;\n\n return (\n <SpaceContext.Provider\n value={{\n classNames: {\n \"space-item-first\": isFirstChild,\n \"space-item-last\": isLastChild,\n \"space-item\": true,\n },\n compactItemWrapperAdjust: isLastChild\n ? \"\"\n : \"compact-item-wrapper-adjust\",\n }}\n >\n {child}\n </SpaceContext.Provider>\n );\n });\n }, [children]);\n\n return (\n <Flex\n data-compact={compact}\n style={{ ...style, ...styles?.wrapper }}\n className={cx([className, \"p-space\", classNames?.wrapper])}\n gap={gap ?? \"none\"}\n {...props}\n >\n {nodes}\n </Flex>\n );\n}\n\nexport function useSpace() {\n return React.useContext(SpaceContext);\n}\n","export { useTheme, ThemeProvider } from \"./theme-provider\";\n","import * as React from \"react\";\nimport { cx } from \"../../utils/dom\";\nimport {\n BorderRadius,\n ButtonAppearanceSchemaType,\n Color,\n InputAppearance,\n} from \"../../utils/theme\";\n\ninterface ThemeProviderValue {\n color?: Color;\n scaling?: SizeScale;\n grayVariant?: string;\n radius?: BorderRadius;\n buttonAppearance?: ButtonAppearanceSchemaType;\n avatarRadiusSize?: BorderRadius;\n inputAppearance?: InputAppearance;\n}\ninterface ThemeProviderProps extends ThemeProviderValue {\n children?: React.ReactNode;\n className?: string;\n}\n\ntype SizeScale = \"90%\" | \"95%\" | \"100%\" | \"105%\" | \"110%\";\n\nconst ThemeContext = React.createContext<ThemeProviderValue | null>(null);\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n const { children, className, scaling = \"100%\", ...themeProps } = props;\n return (\n <ThemeContext.Provider value={themeProps}>\n <div\n id=\"parrot-theme-provider\"\n data-radius={themeProps.radius}\n data-color={themeProps.color}\n data-scaling={scaling}\n className={cx([\"parrot-theme\", className])}\n >\n {children}\n </div>\n </ThemeContext.Provider>\n );\n}\n\nexport function useTheme(options?: { requireThemeProvider: boolean }) {\n const theme = React.useContext(ThemeContext);\n if (!theme && options?.requireThemeProvider)\n throw new Error(\"No theme found\");\n return theme;\n}\n","import * as React from \"react\";\nimport { IconButton } from \"../button\";\nimport { Flex } from \"../flex\";\nimport { cx, mergeRefs } from \"../../utils/dom\";\nimport { useSpace } from \"../space/space\";\nimport { useNumberFieldState } from \"react-stately\";\n\nimport { Field, FieldComponentProps } from \"../form/field\";\nimport { AriaNumberFieldProps, useLocale, useNumberField } from \"react-aria\";\n\ntype NumberInputProps = AriaNumberFieldProps &\n FieldComponentProps<\"input\" | \"decrement\" | \"increment\"> & {\n showSteppers?: boolean;\n decrementIcon?: React.ReactNode;\n incrementIcon?: React.ReactNode;\n };\n\n// TODO - add support for `append` and `prepend` props\n// TODO - format stepper buttons\nexport function NumberInput({\n appearance = \"outline\",\n size = \"md\",\n color = \"gray\",\n classNames,\n styles,\n append,\n prepend,\n placeholder,\n showSteppers = false,\n error,\n label,\n minValue,\n maxValue,\n formatOptions,\n inputRef,\n incrementIcon,\n decrementIcon,\n onChange,\n ...props\n}: NumberInputProps) {\n const ariaProps = {\n ...props,\n maxValue,\n formatOptions,\n minValue,\n onChange,\n \"aria-label\": props[\"aria-label\"] ?? \"number input\",\n } as AriaNumberFieldProps;\n\n const space = useSpace();\n const internalInputRef = React.useRef<HTMLInputElement>(null);\n\n const { locale } = useLocale();\n const state = useNumberFieldState({ ...ariaProps, locale });\n const {\n errorMessageProps,\n descriptionProps,\n labelProps,\n groupProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n } = useNumberField(ariaProps, state, internalInputRef);\n\n return (\n <Field\n classNames={classNames}\n color={color}\n size={size}\n labelProps={labelProps}\n descriptionProps={descriptionProps}\n errorMessageProps={errorMessageProps}\n error={error}\n label={label}\n replaceDefaultControlWrapper\n {...props}\n >\n <Flex gap=\"4xs\" {...groupProps} className=\"p-input-container\">\n {showSteppers && (\n <IconButton\n {...decrementButtonProps}\n radius=\"md\"\n color={color}\n variant=\"outline\"\n size={size}\n className={classNames?.decrement}\n style={styles?.decrement}\n >\n {decrementIcon}\n </IconButton>\n )}\n <input\n style={styles?.input}\n ref={mergeRefs(internalInputRef, inputRef)}\n placeholder={placeholder}\n className={cx(\n classNames?.input,\n \"p-input-control\",\n \"space-item\",\n space.classNames\n )}\n data-appearance={appearance}\n data-has-left-addon={!!prepend}\n data-has-right-addon={!!append}\n type=\"text\"\n {...inputProps}\n />\n {showSteppers && (\n <IconButton\n {...incrementButtonProps}\n radius=\"md\"\n color={color}\n variant=\"outline\"\n size={size}\n className={classNames?.increment}\n style={styles?.increment}\n >\n {incrementIcon}\n </IconButton>\n )}\n </Flex>\n </Field>\n );\n}\n","export { Button } from \"./button\";\nexport { ButtonGroup } from \"./button-group\";\nexport { IconButton } from \"./icon-button\";\nexport type { ButtonProps } from \"./button\";\n","import React from \"react\";\nimport { AriaButtonProps, useButton, useToggleButton } from \"react-aria\";\nimport { cx, mergeRefs } from \"../../utils/dom\";\nimport { Loader } from \"../loader\";\nimport { useButtonGroup } from \"./button-group\";\nimport { useSpace } from \"../space/space\";\nimport { ToggleState, useToggleState } from \"react-stately\";\nimport {\n BorderRadius,\n ButtonAppearance,\n ButtonSize,\n Color,\n ColorVariant,\n} from \"../../utils/theme\";\nimport { useTheme } from \"../theme\";\nimport { ResponsiveProp, StyleProps } from \"../../utils/types\";\nimport { breakpointClassNames } from \"../../utils/helpers\";\nimport { ToggleButtonProps } from \"react-aria-components\";\n\nexport interface ButtonToggleProps {\n isToggle?: boolean;\n idleColor?: Color;\n idleVariant?: ColorVariant;\n activeColor?: Color;\n activeVariant?: ColorVariant;\n}\n\nexport type ButtonProps = StyleProps<\"wrapper\" | \"loader\"> &\n AriaButtonProps<\"button\" | \"div\" | \"a\"> &\n ButtonToggleProps & {\n appearance?: ButtonAppearance;\n append?: React.ReactNode;\n as?: React.ElementType;\n color?: Color;\n defaultSelected?: boolean;\n form?: string;\n isIconButton?: boolean;\n isLoading?: boolean;\n isSelected?: boolean;\n prepend?: React.ReactNode;\n radius?: BorderRadius;\n role?: string;\n size?: ResponsiveProp<ButtonSize>;\n variant?: ColorVariant;\n } & Pick<ToggleButtonProps, \"onChange\">;\n\n/*\n TODO:\n - [ ] Support onClick prop\n - [ ] Standardize props with universal button props\n */\n\nexport const Button = React.forwardRef<HTMLButtonElement, ButtonProps>(\n (props, ref) => {\n const space = useSpace();\n const buttonGroupProps = useButtonGroup();\n const theme = useTheme();\n\n const {\n color = theme?.color ?? \"violet\",\n variant = \"solid\",\n append,\n prepend,\n size = \"md\",\n children,\n as = \"button\",\n className,\n isLoading,\n radius = \"full\",\n isToggle,\n activeColor = theme?.color,\n activeVariant = \"solid\",\n idleColor = \"gray\",\n idleVariant = \"outline\",\n isIconButton,\n style,\n classNames,\n styles,\n form,\n ...otherProps\n } = { ...buttonGroupProps, ...props };\n\n const state = isToggle\n ? useToggleState({\n ...otherProps,\n })\n : ({} as ToggleState);\n\n const buttonRef = React.useRef(null);\n const { buttonProps, isPressed } = isToggle\n ? useToggleButton({ ...otherProps, elementType: as }, state, buttonRef)\n : useButton({ ...otherProps, elementType: as }, buttonRef);\n\n function getColor() {\n if (!state.isSelected && isToggle) {\n return { color: idleColor, variant: idleVariant };\n }\n if (state.isSelected && isToggle) {\n return { color: activeColor, variant: activeVariant };\n }\n\n return { variant, color };\n }\n\n const Comp = as;\n\n return (\n <Comp\n style={{ ...style, ...styles?.wrapper }}\n data-is-toggle={isToggle}\n data-pressed={isPressed}\n data-radius={radius}\n data-icon-button={isIconButton}\n data-loading={isLoading}\n aria-busy={isLoading}\n data-color={getColor().color}\n data-variant={getColor().variant}\n data-selected={state.isSelected}\n className={cx(\n breakpointClassNames(\"size\", size),\n className,\n \"p-button\",\n space.classNames\n )}\n ref={mergeRefs(ref, buttonRef)}\n form={form}\n {...(buttonProps as Omit<typeof buttonProps, \"color\">)}\n >\n {prepend}\n\n {children}\n\n {isLoading ? (\n <Loader\n className={cx([\"p-button-loader\", classNames?.loader])}\n style={{ marginLeft: 8, ...styles?.loader }}\n color=\"inherit\"\n size={\"xs\"}\n />\n ) : (\n append\n )}\n </Comp>\n );\n }\n);\n\nButton.displayName = \"Button\";\n","export {Loader} from './loader';","import * as React from \"react\";\nimport { cx } from \"../../utils/dom\";\nimport { useTheme } from \"../theme\";\n\ninterface LoaderProps extends React.HTMLAttributes<HTMLDivElement> {\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\";\n}\n\n// TODO: Need to figure out API for this component\n// especially for customizing color\n\nexport const Loader = React.forwardRef<HTMLDivElement, LoaderProps>(\n (\n { color = \"var(--color-10)\", className, style, size = \"sm\", ...props },\n ref\n ) => {\n const theme = useTheme();\n\n return (\n <div\n data-color={theme?.color ?? \"gray\"}\n style={{ fill: color, ...style }}\n className={cx([className, \"p-loader-wrapper\"])}\n ref={ref}\n {...props}\n >\n <svg\n className=\"p-loader-svg\"\n data-size={size}\n viewBox=\"0 0 1024 1024\"\n fill={\"inherit\"}\n >\n <path d=\"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z\" />\n </svg>\n </div>\n );\n }\n);\n\nLoader.displayName = \"Loader\";\n","import * as React from \"react\";\nimport { Space } from \"../space\";\nimport { ButtonProps } from \"./button\";\nimport { omitNullOrUndefined } from \"../../utils/object\";\nimport { StyleProps } from \"../../utils/types\";\n\nconst ButtonGroupContext = React.createContext<ButtonGroupProps>({});\n\ntype ButtonGroupProps = Pick<\n ButtonProps,\n | \"color\"\n | \"variant\"\n | \"size\"\n | \"radius\"\n | \"idleColor\"\n | \"idleVariant\"\n | \"activeColor\"\n | \"activeVariant\"\n | \"isToggle\"\n> &\n StyleProps<\"wrapper\"> & {\n label?: string;\n };\n\nexport function ButtonGroup({\n color,\n variant,\n size,\n compact,\n radius,\n gap,\n children,\n idleColor,\n activeColor,\n idleVariant,\n activeVariant,\n isToggle,\n className,\n classNames,\n style,\n styles,\n}: ButtonGroupProps & React.ComponentProps<typeof Space>) {\n const cleanProps = omitNullOrUndefined({\n color,\n variant,\n size,\n radius,\n idleColor,\n activeColor,\n idleVariant,\n activeVariant,\n isToggle,\n });\n\n return (\n <ButtonGroupContext.Provider value={cleanProps}>\n <Space\n className={className}\n classNames={classNames}\n style={style}\n styles={styles}\n gap={gap}\n compact={compact}\n >\n {children}\n </Space>\n </ButtonGroupContext.Provider>\n );\n}\n\nexport function useButtonGroup() {\n return React.useContext(ButtonGroupContext);\n}\n","export { Space } from \"./space\";\n","import { Dict } from \"./types\";\n\nexport function omit<T extends Dict, K extends keyof T>(object: T, keys: K[]) {\n return Object.keys(object).reduce((obj, key) => {\n if (keys.includes(key as K)) {\n return { ...obj };\n }\n return {\n ...obj,\n [key]: object[key],\n } as T;\n }, {});\n}\nexport function pick<T extends Dict, K extends keyof T>(\n object: T | undefined,\n keys: K[]\n) {\n // TODO handle invalid objects properly\n if (!object) {\n return {};\n }\n\n return Object.keys(object).reduce((obj, key) => {\n if (keys.includes(key as K))\n return {\n ...obj,\n [key]: object[key],\n };\n return { ...obj };\n }, {});\n}\nexport function split<T extends Dict, K extends keyof T>(object: T, keys: K[]) {\n const picked = pick(object, keys);\n const omitted = omit(object, keys);\n\n return [picked, omitted] as [{ [P in K]: T[P] }, Omit<T, K>];\n}\n\nexport function omitNullOrUndefined<T extends Dict>(object: T): Partial<T> {\n return Object.keys(object).reduce((obj, key) => {\n if (object[key] == null) {\n return { ...obj };\n }\n return {\n ...obj,\n [key]: object[key],\n };\n }, {});\n}\n","import * as React from \"react\";\nimport { Button, ButtonProps } from \"./button\";\n\ninterface IconButtonProps extends ButtonProps {\n isIcon?: boolean;\n}\n\nexport const IconButton = React.forwardRef<HTMLButtonElement, IconButtonProps>(\n (props, ref) => {\n return (\n <Button isIconButton ref={ref} {...props}>\n {props.children}\n </Button>\n );\n }\n);\n\nIconButton.displayName = \"IconButton\";\n","import React from \"react\";\nimport { IconButton } from \"../button\";\nimport { Input, TextInputProps } from \"./input\";\nimport { HiEye } from \"react-icons/hi\";\n\nexport function PasswordInput({ wrapperRef, ...props }: TextInputProps) {\n const [showPassword, setShowPassword] = React.useState(false);\n\n return (\n <Input\n wrapperRef={wrapperRef}\n {...props}\n type={showPassword ? \"text\" : \"password\"}\n append={\n <IconButton\n onPress={() => setShowPassword((p) => !p)}\n size=\"sm\"\n variant=\"light\"\n >\n <HiEye size={16} />\n </IconButton>\n }\n ></Input>\n );\n}\n","export { Textarea } from './textarea'","import React from \"react\";\nimport { AriaTextFieldOptions, useTextField } from \"react-aria\";\nimport { Flex } from \"../flex\";\nimport { InputError } from \"../input-error\";\nimport { InputLabel } from \"../input-label\";\nimport { Text } from \"../text/text\";\nimport { useTheme } from \"../theme\";\nimport { FieldProps } from \"../form/field\";\n\ninterface TextareaProps\n extends AriaTextFieldOptions<\"textarea\">,\n FieldProps<\"input\"> {\n resize?: \"none\" | \"both\" | \"horizontal\" | \"vertical\";\n className?: string;\n style?: React.CSSProperties;\n}\n\nexport const Textarea = React.forwardRef<HTMLDivElement, TextareaProps>(\n (\n {\n appearance = \"outline\",\n resize,\n label,\n description,\n error,\n color = \"gray\",\n style,\n radius,\n ...props\n },\n ref\n ) => {\n const textAreaRef = React.useRef(null);\n const { labelProps, inputProps, errorMessageProps, descriptionProps } =\n useTextField(\n {\n ...props,\n inputElementType: \"textarea\",\n label,\n description,\n errorMessage: error,\n },\n textAreaRef\n );\n\n const theme = useTheme();\n\n return (\n <Flex\n data-color={color}\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n style={style}\n className=\"p-input-group\"\n ref={ref}\n stack\n gap={\"2xs\"}\n >\n {label && <InputLabel {...labelProps}>{label}</InputLabel>}\n <textarea\n className=\"p-input-control p-text-area\"\n disabled={props.isDisabled}\n data-has-error={!!error}\n data-resize={resize}\n data-appearance={appearance}\n {...inputProps}\n ></textarea>\n {error && <InputError {...errorMessageProps}>{error}</InputError>}\n {description && (\n <Text\n lineHeight={\"base\"}\n {...descriptionProps}\n variant={\"light\"}\n as=\"div\"\n size={\"sm\"}\n >\n {description}\n </Text>\n )}\n </Flex>\n );\n }\n);\n\nTextarea.displayName = \"Textarea\";\n","export { Checkbox } from './checkbox';\nexport { CheckboxGroup } from './checkbox-group';","import { useToggleState } from \"react-stately\";\nimport React from \"react\";\nimport {\n AriaCheckboxProps,\n useCheckbox,\n VisuallyHidden,\n useFocusRing,\n useCheckboxGroupItem,\n AriaCheckboxGroupItemProps,\n} from \"react-aria\";\nimport { GroupContext } from \"./checkbox-group\";\nimport { Box } from \"../box\";\nimport { Color } from \"../../utils/theme\";\nimport { cx } from \"../../utils/dom\";\nimport { StyleProps } from \"../../utils/types\";\n\nexport interface CheckboxVariantProps\n extends StyleProps<\"wrapper\" | \"icon\" | \"checkbox\"> {\n appearance?: \"outline\" | \"filled\";\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n shape?: \"sharp\" | \"round\";\n color?: Color;\n}\nexport interface CheckboxProps extends AriaCheckboxProps, CheckboxVariantProps {\n className?: string;\n}\n\nexport const Checkbox = React.forwardRef<HTMLLabelElement, CheckboxProps>(\n (props, ref) => {\n const {\n appearance,\n size,\n shape = \"round\",\n color,\n className,\n classNames,\n styles,\n style,\n ...otherProps\n } = props;\n\n // check if checkbox is rendered in a group context\n const groupContext = React.useContext(GroupContext);\n const groupState = groupContext?.state;\n const groupProps = groupContext?.props;\n const isWithinGroup = groupState != null;\n\n const singleState = useToggleState(props);\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n const single = useCheckbox(otherProps, singleState, inputRef);\n const group =\n groupState &&\n useCheckboxGroupItem(\n otherProps as AriaCheckboxGroupItemProps,\n groupState,\n inputRef\n );\n\n const { isFocusVisible, focusProps } = useFocusRing();\n\n const inputProps = isWithinGroup ? group?.inputProps : single.inputProps;\n const state = isWithinGroup ? groupState : singleState;\n const isSelected = isWithinGroup\n ? groupState.isSelected(props.value ?? \"\")\n : state.isSelected;\n\n function getRadius() {\n const resolvedShape = shape || groupProps?.shape || undefined;\n\n if (resolvedShape === \"sharp\") {\n return \"none\";\n }\n\n if (resolvedShape === \"round\") {\n return \"md\";\n }\n\n return undefined;\n }\n\n const resolvedColor = color || groupProps?.color || undefined;\n const resolvedAppearance =\n appearance || groupProps?.appearance || \"outline\";\n const resolvedSize = size || groupProps?.size || \"md\";\n\n return (\n <label\n style={{ ...style, ...styles?.wrapper }}\n className={cx(className, \"p-checkbox\", classNames?.wrapper)}\n data-disabled={inputProps?.disabled}\n ref={ref}\n >\n <VisuallyHidden>\n <input\n type=\"checkbox\"\n ref={inputRef}\n {...inputProps}\n {...focusProps}\n />\n </VisuallyHidden>\n <div\n style={{ ...style, ...styles?.checkbox }}\n data-color={resolvedColor}\n data-radius={getRadius()}\n className={cx([\"p-fake-checkbox\", classNames?.checkbox])}\n data-focused={isFocusVisible}\n aria-hidden=\"true\"\n data-checked={isSelected && !props.isIndeterminate}\n data-indeterminate={props.isIndeterminate}\n data-size={resolvedSize}\n data-appearance={resolvedAppearance}\n >\n {isSelected && !props.isIndeterminate && (\n <svg\n className={cx([\"p-checkbox-icon\", classNames?.icon])}\n stroke=\"white\"\n width={\"0.75rem\"}\n height={\"0.75rem\"}\n viewBox=\"0 0 18 18\"\n >\n <polyline\n points=\"1 9 7 14 15 4\"\n fill=\"none\"\n strokeWidth={3}\n strokeDasharray={22}\n strokeDashoffset={isSelected ? 44 : 66}\n style={{\n transition: \"all 400ms\",\n }}\n />\n </svg>\n )}\n\n {props.isIndeterminate && (\n <Box\n className={cx([\"p-checkbox-icon\", classNames?.icon])}\n style={{\n background: \"var(--color-12)\",\n width: \"70%\",\n height: 2,\n borderRadius: 4,\n }}\n ></Box>\n )}\n </div>\n {otherProps.children}\n </label>\n );\n }\n);\n\nCheckbox.displayName = \"checkbox\";\n","import React from \"react\";\nimport { CheckboxGroupState, useCheckboxGroupState } from \"react-stately\";\nimport { AriaCheckboxGroupProps, useCheckboxGroup } from \"react-aria\";\nimport { Flex, FlexProps } from \"../flex\";\nimport { Text } from \"../text\";\nimport { InputError } from \"../input-error\";\nimport { CheckboxVariantProps } from \"./checkbox\";\n\nexport const GroupContext = React.createContext<{\n state: CheckboxGroupState;\n props: CheckboxVariantProps;\n} | null>(null);\n\ninterface CheckboxGroupProps\n extends AriaCheckboxGroupProps,\n CheckboxVariantProps {\n children?: React.ReactNode;\n}\n\nexport const CheckboxGroup = React.forwardRef<\n HTMLDivElement,\n CheckboxGroupProps & FlexProps\n>((props, ref) => {\n const {\n children,\n align,\n justify,\n label,\n description,\n errorMessage,\n size,\n appearance,\n color,\n shape,\n } = props;\n\n const state = useCheckboxGroupState(props);\n const { groupProps, labelProps, descriptionProps, errorMessageProps } =\n useCheckboxGroup(props, state);\n\n return (\n <Flex\n align={align}\n justify={justify}\n ref={ref}\n stack\n gap={\"2xs\"}\n {...groupProps}\n >\n <Text {...labelProps}>{label}</Text>\n <GroupContext.Provider\n value={{ state, props: { size, appearance, color, shape } }}\n >\n {children}\n </GroupContext.Provider>\n {description && (\n <Text\n lineHeight={\"base\"}\n variant=\"lighter\"\n size=\"xs\"\n {...descriptionProps}\n >\n {description}\n </Text>\n )}\n {errorMessage && (\n <InputError {...errorMessageProps}>{errorMessage}</InputError>\n )}\n </Flex>\n );\n});\n\nCheckboxGroup.displayName = \"CheckboxGroup\";\n","import {\n DropdownMenu as DropdownRoot,\n Menu,\n DropdownTrigger,\n MenuItem,\n MenuSection,\n} from \"./dropdown-menu\";\n\ntype DropdownMenuType = {\n Root: typeof DropdownRoot;\n Menu: typeof Menu;\n Trigger: typeof DropdownTrigger;\n Item: typeof MenuItem;\n Section: typeof MenuSection;\n};\n\nconst DropdownMenu: DropdownMenuType = {\n Root: DropdownRoot,\n Menu,\n Trigger: DropdownTrigger,\n Item: MenuItem,\n Section: MenuSection,\n};\n\nexport { DropdownMenu };\n","import * as React from \"react\";\nimport {\n AriaButtonProps,\n AriaMenuProps,\n Placement,\n mergeProps,\n useMenu,\n useMenuItem,\n useMenuSection,\n useMenuTrigger,\n usePress,\n useSeparator,\n} from \"react-aria\";\nimport {\n Item,\n ItemProps,\n MenuTriggerProps,\n MenuTriggerState,\n Node,\n Section,\n SectionProps,\n TreeState,\n useMenuTriggerState,\n useTreeState,\n} from \"react-stately\";\nimport { Flex } from \"../flex\";\nimport { Button } from \"../button\";\nimport { InternalPopover as Popover } from \"../internal-popover\";\nimport { useTheme } from \"../theme\";\nimport { cx } from \"../../utils/dom\";\nimport { StyleProps } from \"../../utils/types\";\nimport { Text } from \"../text\";\nimport { Color } from \"../../utils/theme\";\nimport { HiCheck } from \"react-icons/hi\";\n\ninterface DropdownProps extends MenuTriggerProps {\n something?: string;\n}\ninterface DropdownContextValue {\n triggerState: MenuTriggerState;\n triggerRef: React.MutableRefObject<HTMLElement>;\n triggerProps: AriaButtonProps;\n menuProps: any;\n}\nconst DropdownContext = React.createContext<DropdownContextValue | null>(null);\n\nexport function DropdownMenu({\n children,\n ...props\n}: React.PropsWithChildren<DropdownProps>) {\n const triggerRef = React.useRef<HTMLElement>(null);\n const triggerState = useMenuTriggerState(props);\n\n const { menuProps, menuTriggerProps: triggerProps } = useMenuTrigger(\n props,\n triggerState,\n triggerRef\n );\n\n return (\n <DropdownContext.Provider\n value={{\n triggerRef: triggerRef as React.MutableRefObject<HTMLElement>,\n triggerState,\n triggerProps,\n menuProps,\n }}\n >\n {children}\n </DropdownContext.Provider>\n );\n}\n\ninterface DropdownTriggerProps extends StyleProps {\n asChild?: boolean;\n useClickEvent?: boolean;\n}\n\nexport function DropdownTrigger({\n asChild,\n children,\n useClickEvent,\n}: React.PropsWithChildren<DropdownTriggerProps>) {\n const ctx = React.useContext(DropdownContext);\n\n const { pressProps, isPressed } = usePress({\n ...ctx?.triggerProps,\n ref: ctx?.triggerRef,\n });\n\n const triggerProps = useClickEvent ? pressProps : ctx?.triggerProps;\n\n if (asChild) {\n const child = React.Children.only(children);\n return React.cloneElement(child as React.ReactElement, {\n ...triggerProps,\n ref: ctx?.triggerRef,\n \"data-pressed\": isPressed,\n });\n }\n\n return (\n <Button\n {...ctx?.triggerProps}\n ref={ctx?.triggerRef as React.RefObject<HTMLButtonElement>}\n >\n {children}\n </Button>\n );\n}\n\ninterface MenuProps<T> extends AriaMenuProps<T>, StyleProps {\n menuHeader?: React.ReactNode | (() => React.ReactNode);\n menuFooter?: React.ReactNode | (() => React.ReactNode);\n minWidth?: number | string;\n maxHeight?: number | string;\n maxWidth?: number | string;\n placement?: Placement;\n offset?: number;\n color?: Color;\n}\n\nexport function Menu<T extends object>({\n placement = \"bottom start\",\n offset = 8,\n ...props\n}: MenuProps<T>) {\n const ctx = React.useContext(DropdownContext);\n\n if (!ctx?.triggerState.isOpen) {\n return null;\n }\n\n return (\n <Popover\n placement={placement}\n offset={offset}\n state={ctx?.triggerState}\n triggerRef={ctx?.triggerRef}\n >\n <MenuInner {...mergeProps(props, ctx.menuProps)} />\n </Popover>\n );\n}\n\nfunction MenuInner<T extends object>({\n menuHeader,\n menuFooter,\n className,\n color,\n maxHeight = 300,\n minWidth = 200,\n maxWidth,\n ...props\n}: MenuProps<T>) {\n const state = useTreeState(props);\n const ref = React.useRef(null);\n\n const { menuProps } = useMenu(\n {\n ...props,\n autoFocus: true,\n isVirtualized: true,\n },\n state,\n ref\n );\n const theme = useTheme();\n\n function resolvedMenuHeader() {\n if (typeof menuHeader === \"function\") {\n return menuHeader();\n }\n return menuHeader;\n }\n\n function resolvedMenuFooter() {\n if (typeof menuFooter === \"function\") {\n return menuFooter();\n }\n return menuFooter;\n }\n\n return (\n <Flex\n stack\n ref={ref}\n {...menuProps}\n data-color={color ?? theme?.color ?? \"violet\"}\n data-radius={theme?.radius ?? \"lg\"}\n className={cx(\"p-list-box-wrapper\", className)}\n style={{\n minWidth: `max(200px, ${`${minWidth}`.replace(\"px\", \"\")}px)`,\n maxWidth: `${`${maxWidth}`.replace(\"px\", \"\")}px`,\n maxHeight: `${`${maxHeight}`.replace(\"px\", \"\")}px`,\n }}\n >\n {resolvedMenuHeader()}\n <ul>\n {[...state.collection].map((item) => {\n if (item.type === \"section\") {\n return (\n <MenuSectionInner\n state={state}\n section={item}\n key={item.key}\n {...item.props}\n />\n );\n }\n\n return (\n <MenuItemInner\n {...item.props}\n state={state}\n item={item}\n key={item.key}\n />\n );\n })}\n </ul>\n\n {resolvedMenuFooter()}\n </Flex>\n );\n}\n\ninterface MenuItemProps<T extends object> {\n state: TreeState<T>;\n item: Node<T>;\n}\n\ninterface MenuItemRenderProps {\n icon?: React.ReactNode;\n label?: React.ReactNode;\n description?: React.ReactNode;\n asChild?: boolean;\n className?: string;\n style?: React.CSSProperties;\n isReadOnly?: boolean;\n color?: Color;\n onAction?: () => void;\n}\n\nfunction MenuItemInner<T extends object>({\n state,\n item,\n ...otherProps\n}: MenuItemProps<T> & MenuItemRenderProps) {\n const ref = React.useRef(null);\n const {\n menuItemProps,\n isSelected,\n isFocused,\n isPressed,\n isDisabled,\n descriptionProps,\n } = useMenuItem({ key: item?.key }, state, ref);\n\n const { className, style, isReadOnly, icon, color, description, label } =\n otherProps;\n\n return (\n <li\n ref={ref}\n className={cx(className, \"p-list-option p-menu-item\")}\n data-selected={isSelected}\n data-focused={isFocused}\n data-pressed={isPressed}\n data-disabled={isDisabled}\n data-readonly={isReadOnly}\n style={style}\n data-color={color}\n {...menuItemProps}\n >\n <Flex align=\"center\">\n {icon && (\n <Flex className=\"p-list-option-icon-wrapper\">\n {React.isValidElement(icon) &&\n React.cloneElement(icon as React.ReactElement, {\n className: \"p-list-option-icon\",\n size: 18,\n ...(icon as React.ReactElement)?.props,\n })}\n </Flex>\n )}\n\n <Flex gap=\"3xs\" stack>\n <Text as=\"div\" color=\"black\">\n {label ?? item.rendered}\n </Text>\n {description && (\n <Text as=\"div\" lineHeight=\"base\" {...descriptionProps}>\n {description}\n </Text>\n )}\n </Flex>\n </Flex>\n {isSelected && <HiCheck className=\"selected-marker\" />}\n </li>\n );\n}\n\ninterface MenuSectionProps<T extends object> {\n section: Node<T>;\n state: TreeState<T>;\n}\n\nfunction MenuSectionInner<T extends object>({\n state,\n section,\n className,\n style,\n}: MenuSectionProps<T> & MenuItemRenderProps) {\n const { itemProps, headingProps, groupProps } = useMenuSection({\n heading: section?.rendered,\n \"aria-label\": section?.[\"aria-label\"],\n });\n\n const { separatorProps } = useSeparator({ elementType: \"li\" });\n\n function getChildren() {\n if (state?.collection.getChildren) {\n return [...state.collection.getChildren(section.key)];\n }\n return [...section.childNodes];\n }\n\n return (\n <Flex\n stack\n as=\"ul\"\n style={style}\n className={cx(className, \"p-list-section\")}\n >\n {section.key !== state.collection.getFirstKey() && (\n <li className=\"p-list-separator\" {...separatorProps} />\n )}\n <li {...itemProps}>\n {section?.rendered && (\n <Text as=\"h4\" className=\"p-list-section-header\" {...headingProps}>\n {section?.rendered}\n </Text>\n )}\n\n <ul {...groupProps}>\n {getChildren().map((item) => {\n return (\n <MenuItemInner\n {...item.props}\n state={state}\n item={item}\n key={item.key}\n />\n );\n })}\n </ul>\n </li>\n </Flex>\n );\n}\n\nexport const MenuItem = Item as <T>(\n props: ItemProps<T> & MenuItemRenderProps\n) => JSX.Element;\n\nexport const MenuSection = Section as <T>(\n props: SectionProps<T> & MenuItemRenderProps\n) => JSX.Element;\n","export { InternalPopover } from \"./internal-popover\";\n","import * as React from \"react\";\nimport { AriaPopoverProps, Overlay, usePopover } from \"react-aria\";\nimport { OverlayTriggerState } from \"react-stately\";\nimport { useTheme } from \"../theme/theme-provider\";\nimport { cx, mergeRefs } from \"../../utils/dom\";\nimport { StyleProps } from \"../../utils/types\";\n\ninterface PopoverProps\n extends Omit<AriaPopoverProps, \"popoverRef\">,\n StyleProps<\"wrapper\" | \"underlay\"> {\n state: OverlayTriggerState;\n children: React.ReactNode;\n popoverRef?: React.RefObject<HTMLDivElement>;\n}\n\nexport function InternalPopover({\n state,\n children,\n popoverRef,\n style,\n styles,\n classNames,\n className,\n ...props\n}: PopoverProps) {\n const internalPopoverRef = React.useRef(null);\n\n const theme = useTheme();\n\n const { popoverProps, underlayProps } = usePopover(\n { ...props, popoverRef: internalPopoverRef },\n state\n );\n\n const { style: internalStyle, ...otherPopoverProps } = popoverProps;\n\n return (\n <Overlay>\n <div\n {...underlayProps}\n style={styles?.underlay}\n className={cx([\"underlay\", classNames?.underlay])}\n ></div>\n <div\n data-color={theme?.color}\n data-radius={theme?.radius}\n ref={mergeRefs(popoverRef, internalPopoverRef)}\n className={cx([\"p-popover\", className, classNames?.wrapper])}\n style={{ ...internalStyle, ...style, ...styles?.wrapper }}\n {...otherPopoverProps}\n >\n {children}\n </div>\n </Overlay>\n );\n}\n","export { ComboBox } from \"./combo-box\";\n","import * as React from \"react\";\nimport { Flex } from \"../flex\";\nimport { InputLabel } from \"../input-label\";\nimport { InputError } from \"../input-error\";\nimport { IconButton } from \"../button\";\n\nimport { HiSelector } from \"react-icons/hi\";\nimport { Loader } from \"../loader\";\nimport { useComboBoxState } from \"react-stately\";\nimport { AriaComboBoxProps, useComboBox, useFilter } from \"react-aria\";\nimport { omit } from \"../../utils/object\";\nimport { InternalPopover as Popover } from \"../internal-popover\";\nimport { ListBox } from \"../list-box\";\nimport { cx } from \"../../utils/dom\";\nimport { useTheme } from \"../theme\";\nimport { ListBoxProps, ListBoxRenderProps } from \"../list-box/list-box\";\nimport { Color } from \"../../utils/theme\";\nimport { renderListBoxContent } from \"../list-box/list-box.utils\";\nimport { FieldProps } from \"../form/field\";\n\ninterface ComboBoxProps<T>\n extends Omit<FieldProps<\"input\" | \"trigger\" | \"listbox\">, \"children\">,\n Omit<AriaComboBoxProps<T>, \"children\">,\n Omit<ListBoxRenderProps<T>, \"\"> {\n dropdownArrow?: React.ReactNode | ((props: any) => React.ReactNode);\n showDropdownButton?: boolean;\n placeholder?: string;\n listBoxColor?: Color;\n isLoading?: boolean;\n}\n\nexport const _ComboBox = <T extends object>(\n {\n label,\n error,\n showDropdownButton = true,\n dropdownArrow = <HiSelector size={18} />,\n className,\n style,\n color = \"gray\",\n radius,\n size = \"md\",\n appearance = \"outline\",\n listBoxColor,\n append,\n prepend,\n isLoading,\n ...props\n }: ComboBoxProps<T>,\n ref: React.Ref<HTMLDivElement>\n) => {\n const theme = useTheme();\n const { contains } = useFilter({ sensitivity: \"base\" });\n const state = useComboBoxState({\n ...props,\n children: renderListBoxContent(props as ListBoxProps<T>),\n defaultFilter: contains,\n });\n\n const inputRef = React.useRef<HTMLInputElement>(null);\n const buttonRef = React.useRef<HTMLButtonElement>(null);\n const listBoxRef = React.useRef<HTMLUListElement>(null);\n const popoverRef = React.useRef<HTMLDivElement>(null);\n const wrapperRef = React.useRef<HTMLDivElement>(null);\n\n const { inputProps, buttonProps, listBoxProps } = useComboBox(\n {\n inputRef,\n buttonRef,\n listBoxRef,\n popoverRef,\n ...props,\n },\n state\n );\n\n function resolvedDropdownArrow() {\n if (typeof dropdownArrow === \"function\") {\n return dropdownArrow({ color: \"gray\", size: \"md\" });\n }\n return dropdownArrow;\n }\n\n return (\n <Flex\n data-color={color ?? theme?.color ?? \"gray\"}\n data-size={size}\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n style={style}\n className={cx(\"p-combo-box p-input-group\", className)}\n ref={ref}\n stack\n gap=\"3xs\"\n stretchX\n >\n {label && <InputLabel>{label}</InputLabel>}\n <Flex\n position=\"relative\"\n gap=\"3xs\"\n ref={wrapperRef}\n align=\"center\"\n data-appearance={appearance}\n className=\"p-input-control p-combo-box-control\"\n >\n {prepend}\n <input\n className=\"p-combo-box-input p-text-input-el\"\n onChange={(e) => inputProps.onChange?.(e)}\n ref={inputRef}\n data-has-prepend={!!prepend}\n data-size=\"md\"\n {...omit(inputProps as any, [\"size\", \"onChange\"])}\n ></input>\n\n {append}\n {isLoading && <Loader size=\"xs\" />}\n {showDropdownButton && (\n <IconButton\n {...buttonProps}\n variant=\"ghost\"\n color=\"gray\"\n radius=\"lg\"\n className=\"p-combo-box-button\"\n ref={buttonRef}\n >\n {resolvedDropdownArrow()}\n </IconButton>\n )}\n </Flex>\n {error && <InputError>{error}</InputError>}\n {state.isOpen && (\n <Popover\n popoverRef={popoverRef}\n offset={8}\n state={state}\n triggerRef={wrapperRef}\n >\n <ListBox\n color={listBoxColor ?? theme?.color ?? \"gray\"}\n width={wrapperRef.current?.getBoundingClientRect().width}\n listBoxRef={listBoxRef}\n state={state}\n {...listBoxProps}\n ></ListBox>\n </Popover>\n )}\n </Flex>\n );\n};\n\n_ComboBox.displayName = \"ComboBox\";\nexport const ComboBox = React.forwardRef(_ComboBox) as typeof _ComboBox;\n","export { ListBox } from \"./list-box\";\nexport {\n CollectionItem as ListBoxItem,\n CollectionSection as ListBoxSection,\n} from \"../collections\";\n","import * as React from \"react\";\nimport {\n AriaListBoxOptions,\n AriaListBoxSectionProps,\n AriaOptionProps,\n useListBox,\n useListBoxSection,\n useOption,\n} from \"react-aria\";\nimport { ListState, Node, useListState } from \"react-stately\";\nimport { CollectionChildren, ID, StyleProps } from \"../../utils/types\";\nimport { Text } from \"../text\";\nimport { Flex } from \"../flex\";\nimport { useListBoxContent } from \"./list-box.utils\";\nimport { Color } from \"../../utils/theme\";\nimport { ListBoxProvider, useListBoxContext } from \"./list-box-provider\";\nimport { useTheme } from \"../theme\";\nimport { cx, mergeRefs } from \"../../utils/dom\";\nimport {\n CollectionItemProps,\n CollectionSectionProps,\n} from \"../collections/collections.types\";\nexport interface ListBoxRenderProps<T> {\n children?: CollectionChildren<T>; // TODO - type this properly\n labelKey?: keyof T | string; // TODO - type this properly\n valueKey?: keyof T | string; // TODO - type this properly\n sectionKey?: keyof T;\n state?: ListState<T>;\n color?: Color;\n width?: number | string;\n showSectionSeparator?: boolean;\n showSelectionIndicator?: boolean;\n renderOption?: (item: T) => React.ReactNode;\n renderSelectionIndicator?: (item: T) => React.ReactNode;\n renderSectionLabel?: (item: T) => React.ReactNode;\n renderEmpty?: () => React.ReactNode;\n}\n\nexport interface ListBoxProps<T>\n extends AriaListBoxOptions<T>,\n ListBoxRenderProps<T>,\n StyleProps<\"wrapper\" | \"label\" | \"section\" | \"option\"> {\n listBoxRef?: React.RefObject<HTMLUListElement>;\n}\n\nexport function ListBox({\n state,\n color,\n width = 300,\n listBoxRef,\n renderEmpty,\n classNames,\n className,\n style,\n styles,\n ...props\n}: ListBoxProps<any>) {\n const children = useListBoxContent(props);\n const internalState = useListState({\n ...props,\n children: children,\n });\n const listRef = React.useRef(null);\n const listState = state || internalState;\n const { listBoxProps } = useListBox(\n { ...props, label: props.label ?? \"Select an option\" },\n listState,\n listRef\n );\n\n const options = [...listState.collection];\n\n const theme = useTheme();\n\n function renderEmptyState() {\n return (\n renderEmpty?.() ?? (\n <Text color=\"gray\" variant=\"lighter\">\n No options\n </Text>\n )\n );\n }\n\n return (\n <ListBoxProvider {...props}>\n <Flex\n as=\"ul\"\n stack\n gap=\"none\"\n className={cx(\"p-list-box-wrapper\", classNames?.wrapper, className)}\n ref={mergeRefs(listRef, listBoxRef)}\n data-radius=\"lg\"\n data-color={color ?? theme?.color}\n style={{ width: width, ...style, ...styles?.wrapper }}\n {...listBoxProps}\n >\n {options.length === 0 && (\n <Flex justify=\"center\" align=\"center\" style={{ height: 50 }}>\n {renderEmptyState()}\n </Flex>\n )}\n {options.map((item) => {\n return item.type === \"section\" ? (\n <ListSection\n className={classNames?.section}\n section={item}\n state={listState}\n key={item.key}\n />\n ) : (\n <ListOption\n className={classNames?.option}\n state={listState}\n item={item}\n key={item.key}\n />\n );\n })}\n </Flex>\n </ListBoxProvider>\n );\n}\n\ninterface OptionProps<T> extends AriaOptionProps, StyleProps {\n item: Node<T>;\n state: ListState<T>;\n}\n\nfunction ListOption({ state, item }: OptionProps<any>) {\n const optionRef = React.useRef(null);\n const {\n optionProps,\n isDisabled,\n isFocusVisible,\n isFocused,\n isPressed,\n isSelected,\n } = useOption({ key: item.key }, state, optionRef);\n\n const { showSelectionIndicator = true, renderSelectionIndicator } =\n useListBoxContext().props;\n\n const {\n className,\n classNames,\n style,\n styles,\n color,\n textValue,\n title,\n ...otherProps\n } = item.props as CollectionItemProps<any>;\n\n return (\n <li\n style={{ ...style, ...styles?.wrapper }}\n className={cx(className, \"p-list-option\", classNames?.wrapper)}\n data-disabled={isDisabled}\n data-focus-visible={isFocusVisible}\n data-focused={isFocused}\n data-pressed={isPressed}\n data-selected={isSelected}\n data-color={color}\n {...optionProps}\n {...otherProps}\n ref={optionRef}\n data-text-value={textValue}\n data-title={title}\n >\n {item.rendered}\n {isSelected &&\n showSelectionIndicator &&\n (renderSelectionIndicator?.(item) ?? <div>/</div>)}\n </li>\n );\n}\n\ntype ListSectionProps<T> = AriaListBoxSectionProps &\n StyleProps<\"wrapper\" | \"separator\" | \"heading\" | \"items\"> & {\n __parrotKey?: ID;\n state: ListState<T>;\n section: Node<T>;\n };\nfunction ListSection({ state, section }: ListSectionProps<any>) {\n const { itemProps, headingProps, groupProps } = useListBoxSection({\n heading: section?.rendered,\n \"aria-label\": section[\"aria-label\"],\n });\n\n const listBoxContext = useListBoxContext();\n\n const { className, classNames, style, styles } =\n section.props as CollectionSectionProps<any>;\n\n const children = React.useMemo(() => {\n if (state.collection.getChildren) {\n return [...state.collection.getChildren(section.key)];\n }\n\n return [];\n }, []);\n\n return (\n <Flex\n gap=\"sm\"\n stack\n className={cx(className, \"p-list-section\", classNames?.wrapper)}\n style={{ ...style, ...styles?.wrapper }}\n >\n {section.key !== state.collection.getFirstKey() &&\n listBoxContext.props.showSectionSeparator && (\n <li\n style={styles?.separator}\n className={cx(\"p-list-separator\", classNames?.separator)}\n ></li>\n )}\n\n <Flex gap={\"none\"} stack as=\"li\" {...itemProps}>\n {section.rendered && (\n <Text\n style={styles?.heading}\n className={cx(\"p-list-section-header\", classNames?.heading)}\n as=\"div\"\n variant=\"light\"\n {...headingProps}\n >\n {section.rendered}\n </Text>\n )}\n <ul className={cx(classNames?.items)} {...groupProps}>\n {children.map((node) => {\n return <ListOption item={node} key={node.key} state={state} />;\n })}\n </ul>\n </Flex>\n </Flex>\n );\n}\n","import * as React from \"react\";\nimport { ListBoxProps } from \"./list-box\";\nimport { CollectionItem, CollectionSection } from \"../collections\";\n\n// TODO: Decide if we want to keep doing this\n// This allows us to use components like Select and Menu withour having to constantly import Items and Section components.\n\n/**\n * This is a helper function to conditionally render children using the default render function API by react-aria.\n */\nexport function renderListBoxContent<T>({\n children,\n renderOption,\n valueKey,\n sectionKey,\n renderSectionLabel,\n labelKey,\n items,\n}: ListBoxProps<T>) {\n const hasChildren = React.Children.count(children) > 0;\n\n if (hasChildren) {\n return children;\n }\n\n if (items) {\n // eslint-disable-next-line react/display-name\n return (item: T) => {\n const label = (item as any)?.[labelKey ?? \"label\"];\n const value = (item as any)?.[valueKey ?? \"id\" ?? \"key\" ?? \"value\"];\n const sectionChildren = (item as any)?.[sectionKey ?? \"children\"] ?? [];\n\n if ((item as any)?.[sectionKey]) {\n return (\n <CollectionSection\n items={sectionChildren}\n key={value}\n title={renderSectionLabel?.(item)}\n >\n {(item) => (\n <CollectionItem\n textValue={(item as any)?.[labelKey ?? \"label\"]}\n key={(item as any)?.[valueKey ?? \"id\" ?? \"key\" ?? \"value\"]}\n >\n {renderOption?.(item as T) ??\n (item as any)?.[labelKey ?? \"label\"]}\n </CollectionItem>\n )}\n </CollectionSection>\n );\n }\n\n return (\n <CollectionItem textValue={label} key={value}>\n {renderOption?.(item) ?? label}\n </CollectionItem>\n );\n };\n }\n}\n\nexport function useListBoxContent<T>(props: ListBoxProps<T>) {\n const children = React.useMemo(() => {\n return renderListBoxContent(props);\n }, []);\n\n return children;\n}\n","import { Item, Section } from \"react-stately\";\nimport {\n CollectionItemProps,\n CollectionSectionProps,\n} from \"./collections.types\";\n\nexport const CollectionItem = Item as <T>(\n props: CollectionItemProps<T>\n) => JSX.Element;\n\nexport const CollectionSection = Section as <T>(\n props: CollectionSectionProps<T>\n) => JSX.Element;\n","import * as React from \"react\";\nimport { ListBoxProps } from \"./list-box\";\n\nconst ListBoxContext = React.createContext<{ props: ListBoxProps<any> } | null>(\n null\n);\n\nexport function ListBoxProvider(\n props: React.PropsWithChildren<ListBoxProps<any>>\n) {\n return (\n <ListBoxContext.Provider value={{ props }}>\n {props.children}\n </ListBoxContext.Provider>\n );\n}\n\nexport function useListBoxContext() {\n const ctx = React.useContext(ListBoxContext);\n if (!ctx) {\n throw new Error(\n \"ListBox components must be rendered within the ListBoxProvider\"\n );\n }\n\n return ctx;\n}\n","export { Radio, RadioGroup } from './radio';\nexport {RadioCard} from './radio-card';","import React from \"react\";\nimport {\n AriaRadioGroupProps,\n AriaRadioProps,\n useRadio,\n useRadioGroup,\n VisuallyHidden,\n} from \"react-aria\";\nimport { RadioGroupState, useRadioGroupState } from \"react-stately\";\nimport { Flex, FlexProps } from \"../flex\";\nimport { InputError } from \"../input-error\";\nimport { Text } from \"../text\";\nimport { InputLabel } from \"../input-label\";\nimport { cx } from \"../../utils/dom\";\nimport { Color, InputAppearance } from \"../../utils/theme\";\n\nexport interface RadioProps extends AriaRadioProps {\n className?: string;\n style?: React.CSSProperties;\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\";\n appearance?: InputAppearance;\n color?: Color;\n}\n\nexport const RadioContext = React.createContext<RadioGroupState | null>(null);\n\nexport const Radio = React.forwardRef<HTMLLabelElement, RadioProps>(\n (props, ref) => {\n const state = React.useContext(RadioContext);\n\n const {\n size = \"sm\",\n className,\n style,\n appearance,\n color,\n ...otherProps\n } = props;\n if (!state) throw new Error(\"Radio must be used within a RadioGroup\");\n\n const inputRef = React.useRef(null);\n const { inputProps } = useRadio(otherProps, state, inputRef);\n\n return (\n <label style={style} className={cx([className, \"p-radio\"])} ref={ref}>\n <VisuallyHidden>\n <input {...inputProps} ref={inputRef}></input>\n </VisuallyHidden>\n <div\n data-color={color}\n className=\"p-fake-radio\"\n data-appearance={appearance}\n data-checked={inputProps.checked}\n data-size={size}\n />\n {props.children}\n </label>\n );\n }\n);\n\ninterface RadioGroupProps extends AriaRadioGroupProps {\n children?: React.ReactNode;\n}\n\nexport const RadioGroup = React.forwardRef<\n HTMLDivElement,\n RadioGroupProps & FlexProps\n>(\n (\n {\n stack = true,\n direction,\n gap = \"xs\",\n rowGap,\n align,\n justify,\n wrap,\n columnGap,\n ...props\n },\n ref\n ) => {\n const { children, label, description, errorMessage } = props;\n const state = useRadioGroupState(props);\n const { radioGroupProps, labelProps, descriptionProps, errorMessageProps } =\n useRadioGroup(props, state);\n\n return (\n <Flex\n ref={ref}\n stack={stack}\n gap={gap}\n direction={direction}\n rowGap={rowGap}\n columnGap={columnGap}\n align={align}\n justify={justify}\n wrap={wrap}\n {...radioGroupProps}\n >\n {label && <InputLabel {...labelProps}>{label}</InputLabel>}\n {description && (\n <Text variant=\"light\" {...descriptionProps}>\n {description}\n </Text>\n )}\n\n <RadioContext.Provider value={state}>{children}</RadioContext.Provider>\n\n {errorMessage && (\n <InputError {...errorMessageProps}>{errorMessage}</InputError>\n )}\n </Flex>\n );\n }\n);\n\nRadioGroup.displayName = \"RadioGroup\";\nRadio.displayName = \"Radio\";\n","import * as React from \"react\";\nimport { AriaRadioProps, VisuallyHidden, useRadio } from \"react-aria\";\nimport { Flex } from \"../flex\";\nimport { Text } from \"../text\";\nimport { RadioContext } from \"./radio\";\nimport { Color, InputAppearance } from \"../../utils/theme\";\n\nexport interface RadioCardProps extends AriaRadioProps {\n title?: React.ReactNode;\n description?: React.ReactNode;\n children?: React.ReactNode;\n showIndicator?: boolean;\n appearance?: InputAppearance;\n color?: Color;\n}\n\nexport const RadioCard = React.forwardRef<HTMLLabelElement, RadioCardProps>(\n (\n {\n title,\n description,\n children,\n appearance,\n showIndicator = true,\n color,\n ...props\n },\n ref\n ) => {\n const state = React.useContext(RadioContext);\n if (!state) throw new Error(\"RadioCard must be used within a RadioGroup\");\n\n const inputRef = React.useRef(null);\n const { inputProps } = useRadio(props, state, inputRef);\n\n return (\n <label\n data-radius=\"lg\"\n className=\"p-radio-card\"\n data-color={color}\n data-appearance={appearance}\n data-checked={inputProps.checked}\n ref={ref}\n >\n <VisuallyHidden>\n <input {...inputProps} ref={inputRef} />\n </VisuallyHidden>\n {showIndicator && (\n <div\n className=\"p-radio-card-indicator p-fake-radio\"\n data-size=\"sm\"\n data-checked={inputProps.checked}\n />\n )}\n <Flex stretchX className=\"p-radio-card-content\" stack gap={\"xs\"}>\n {(title || description) && (\n <Flex gap={\"4xs\"} stack>\n {title && (\n <Text color={color} size=\"sm\">\n {title}\n </Text>\n )}\n {description && (\n <Text\n color={color}\n lineHeight={\"tall\"}\n size=\"xs\"\n variant=\"lighter\"\n >\n {description}\n </Text>\n )}\n </Flex>\n )}\n {children}\n </Flex>\n </label>\n );\n }\n);\n\nRadioCard.displayName = \"RadioCard\";\n","export { Select } from \"./select\";\nexport {\n CollectionItem as Option,\n CollectionSection as Section,\n} from \"../collections\";\n","import * as React from \"react\";\nimport { ListBox } from \"../list-box\";\nimport { Flex } from \"../flex\";\nimport { cx } from \"../../utils/dom\";\nimport { HiSelector } from \"react-icons/hi\";\nimport { useListState, useMenuTriggerState } from \"react-stately\";\nimport { Key, useMenuTrigger, usePress } from \"react-aria\";\nimport { ListBoxProps } from \"../list-box/list-box\";\nimport { useListBoxContent } from \"../list-box/list-box.utils\";\nimport { Tag } from \"../tag\";\nimport { Text } from \"../text\";\nimport { InternalPopover as Popover } from \"../internal-popover\";\nimport { useTheme } from \"../theme/theme-provider\";\nimport { Color } from \"../../utils/theme\";\nimport { useSpace } from \"../space/space\";\nimport { ID } from \"../../utils/types\";\nimport { isArray } from \"../../utils/assertions\";\nimport { Field, FieldProps } from \"../form/field\";\n\ntype SingleOrMultipleValue = ID | Array<ID>;\ninterface MockNativeOnChangeEvent {\n target: {\n value: SingleOrMultipleValue;\n name?: string;\n };\n}\nexport type SelectProps<T> = ListBoxProps<T> &\n FieldProps<\n | \"trigger\"\n | \"listbox\"\n | \"label\"\n | \"popover\"\n | \"description\"\n | \"errorMessage\"\n | \"value\"\n | \"placeholder\"\n > & {\n renderValue?: (value: T) => React.ReactNode;\n placeholder?: string;\n isDisabled?: boolean;\n name?: string;\n listBoxColor?: Color;\n value?: SingleOrMultipleValue;\n defaultValue?: SingleOrMultipleValue;\n onChange?(event: MockNativeOnChangeEvent): void;\n onSelectionChange?(keys: Array<Key>): void;\n };\n\nexport function Select<T>({\n label,\n selectionMode = \"single\",\n appearance = \"outline\",\n renderValue,\n color = \"gray\",\n error,\n description,\n size = \"sm\",\n radius,\n listBoxColor,\n className,\n value,\n onChange,\n onSelectionChange,\n style,\n classNames,\n styles,\n showSectionSeparator = true,\n showSelectionIndicator = true,\n ...props\n}: SelectProps<T>) {\n const isMultiple = selectionMode === \"multiple\";\n\n const _value = React.useMemo(() => {\n if (!value) return null;\n\n if (selectionMode === \"single\") {\n return [value];\n }\n\n if (isMultiple && !isArray(value)) {\n throw new Error(\n \"Select: value must be an array when selectionMode is multiple\"\n );\n }\n\n return value as Array<ID>;\n }, [value, selectionMode]);\n\n const children = useListBoxContent(props);\n\n const space = useSpace();\n const triggerState = useMenuTriggerState({});\n const listState = useListState({\n ...props,\n selectedKeys: _value,\n defaultSelectedKeys: _value,\n selectionMode: selectionMode,\n children: children,\n onSelectionChange(keys) {\n const keysToArray = [...keys];\n onSelectionChange?.(keysToArray);\n onChange?.({\n target: {\n value: isMultiple ? keysToArray : keysToArray[0],\n name: props.name,\n },\n });\n\n if (!isMultiple) {\n triggerState.close();\n }\n },\n } as ListBoxProps<any>);\n const triggerRef = React.useRef<HTMLDivElement>(null);\n\n const theme = useTheme();\n color = color ?? theme?.color;\n\n const { menuTriggerProps, menuProps } = useMenuTrigger(\n { type: \"listbox\", trigger: \"press\", isDisabled: false },\n triggerState,\n triggerRef\n );\n\n const { pressProps: triggerProps } = usePress(menuTriggerProps);\n\n const selectedItems = [...listState.selectionManager.selectedKeys].map(\n (item) => listState.collection.getItem(item)\n );\n\n const content = React.useMemo(() => {\n if (selectedItems.length === 0) {\n return (\n <Text\n style={styles?.placeholder}\n className={classNames?.placeholder}\n color={color}\n variant=\"lighter\"\n >\n {props.placeholder}\n </Text>\n );\n }\n\n if (isMultiple) {\n return (\n <Flex gap=\"3xs\" wrap=\"wrap\">\n {selectedItems.map(\n (item) =>\n renderValue?.(item?.value) ?? (\n <Tag size=\"md\" variant=\"pastel\" color={color} key={item?.key}>\n {item?.textValue}\n </Tag>\n )\n )}\n </Flex>\n );\n }\n\n return (\n <Text\n as=\"div\"\n variant=\"default\"\n color={color === \"gray\" ? \"black\" : color}\n className={cx(\"single-value\", classNames?.value)}\n style={styles?.value}\n >\n {renderValue?.(selectedItems[0]?.value) ??\n selectedItems[0]?.value?.[props.labelKey ?? \"label\"] ??\n selectedItems[0]?.textValue}\n </Text>\n );\n }, [selectedItems.length, isMultiple, selectedItems[0]?.value]);\n\n return (\n <div\n className={cx(\"p-select\", className, classNames?.wrapper)}\n style={{ ...style, ...styles?.wrapper }}\n >\n {/* implement hidden custom hidden select */}\n <Field\n replaceDefaultControlWrapper\n label={label}\n error={error}\n description={description}\n className={className}\n classNames={classNames}\n size={size}\n radius={radius}\n >\n <div\n style={styles?.trigger}\n data-selection-mode={selectionMode}\n tabIndex={0}\n role=\"button\"\n ref={triggerRef}\n color=\"gray\"\n className={cx(\n \"p-input-control\",\n \"p-select-trigger\",\n space.classNames,\n classNames?.trigger\n )}\n data-appearance={appearance}\n {...triggerProps}\n >\n {content}\n <HiSelector className=\"selector\" size={18} />\n </div>\n </Field>\n {triggerState.isOpen && (\n <Popover\n className={classNames?.popover}\n style={styles?.popover}\n placement=\"bottom start\"\n offset={4}\n shouldUpdatePosition\n triggerRef={triggerRef}\n state={triggerState}\n >\n <ListBox\n label={label}\n showSectionSeparator={showSectionSeparator}\n showSelectionIndicator={showSelectionIndicator}\n width={triggerRef.current?.getBoundingClientRect().width}\n color={listBoxColor ?? \"gray\"}\n shouldFocusOnHover\n state={listState}\n {...menuProps}\n {...props}\n />\n </Popover>\n )}\n </div>\n );\n}\n","export { Tag } from './tag';","import React from \"react\";\nimport { getRandomColor } from \"../../utils/helpers\";\nimport { Color, ColorVariant, borderRadiusShapeMap } from \"../../utils/theme\";\nimport { cx } from \"../../utils/dom\";\n\ntype TagProps = React.ComponentPropsWithoutRef<\"span\"> & {\n prepend?: React.ReactNode;\n append?: React.ReactNode;\n hashValue?: string;\n color?: Color;\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n shape?: \"pill\" | \"rounded\" | \"sharp\";\n variant?: ColorVariant;\n};\n\nexport const Tag = React.forwardRef<HTMLDivElement, TagProps>(\n (\n {\n prepend,\n append,\n children,\n hashValue,\n color,\n size = \"sm\",\n shape = \"rounded\",\n variant = \"light\",\n className,\n ...props\n },\n ref\n ) => {\n const randomColor = React.useMemo(() => {\n if (hashValue) {\n return getRandomColor(hashValue);\n }\n\n return \"gray\";\n }, []);\n\n return (\n <span\n className={cx(className, \"p-tag\")}\n data-radius={borderRadiusShapeMap[shape]}\n data-size={size}\n data-color={color ?? randomColor}\n data-variant={variant}\n ref={ref}\n {...props}\n >\n {prepend && prepend}\n {children}\n {append && append}\n </span>\n );\n }\n);\n\nTag.displayName = \"Tag\";\n","export { DateInput } from \"./date-input\";\nexport { Calendar } from \"./calendar\";\n","import * as React from \"react\";\nimport { Flex } from \"../flex\";\nimport { DateField } from \"./date-field\";\nimport { Calendar } from \"./calendar\";\nimport { AriaDatePickerProps, useDatePicker } from \"react-aria\";\nimport { DateValue, parseDate } from \"@internationalized/date\";\nimport { InternalPopover as Popover } from \"../internal-popover\";\nimport { useDatePickerState } from \"react-stately\";\nimport { IconButton } from \"../button\";\nimport { HiOutlineCalendar } from \"react-icons/hi\";\nimport { InputLabel } from \"../input-label\";\nimport { InputError } from \"../input-error\";\nimport { cx } from \"../../utils/dom\";\nimport { useSpace } from \"../space/space\";\nimport { useTheme } from \"../theme\";\nimport { FieldProps } from \"../form/field\";\n\nexport interface DateInputProps\n extends Omit<\n AriaDatePickerProps<DateValue>,\n \"value\" | \"onChange\" | \"defaultValue\"\n >,\n FieldProps<\"input\"> {\n numberOfMonths?: number;\n value?: string;\n defaultValue?: string;\n onChange?(value: string | null, dateObject?: DateValue | null): void;\n dropdownIcon?: React.ReactNode;\n}\n\nexport const DateInput = React.forwardRef<HTMLDivElement, DateInputProps>(\n (\n {\n appearance = \"outline\",\n size = \"md\",\n color,\n numberOfMonths,\n radius,\n dropdownIcon = <HiOutlineCalendar size={16} />,\n value,\n defaultValue,\n onChange,\n ...props\n },\n ref\n ) => {\n const space = useSpace();\n\n function proxyOnChange(date: DateValue) {\n onChange?.(date?.toString(), date);\n }\n\n const newProps = {\n ...props,\n value: value ? parseDate(value) : null,\n defaultValue: defaultValue ? parseDate(defaultValue) : null,\n onChange: proxyOnChange,\n } as AriaDatePickerProps<DateValue>;\n\n const state = useDatePickerState(newProps);\n const pickerRef = React.useRef(null);\n const {\n groupProps,\n calendarProps,\n fieldProps,\n buttonProps,\n errorMessageProps,\n labelProps,\n } = useDatePicker(newProps, state, pickerRef);\n\n const theme = useTheme();\n\n return (\n <Flex\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n data-size={size}\n className={cx(\"p-input-group\", space.compactItemWrapperAdjust)}\n stretchX\n stack\n gap={\"xs\"}\n >\n {props.label && <InputLabel {...labelProps}>{props.label}</InputLabel>}\n <Flex ref={ref} gap={\"xl\"} stretchX inline stack>\n <Flex\n className={cx(\n \"p-input-control\",\n \"date-picker-trigger\",\n space.classNames\n )}\n ref={pickerRef}\n justify={\"space-between\"}\n align={\"center\"}\n data-appearance={appearance}\n data-color={color}\n {...groupProps}\n >\n <DateField\n appearance={appearance}\n size={size}\n {...fieldProps}\n ></DateField>\n <IconButton\n size=\"sm\"\n variant=\"light\"\n color={color}\n {...buttonProps}\n >\n {dropdownIcon}\n </IconButton>\n </Flex>\n\n {state.isOpen && (\n <Popover\n offset={8}\n state={state}\n triggerRef={pickerRef}\n placement=\"bottom start\"\n >\n <Flex\n style={{ maxHeight: \"auto\" }}\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n >\n <Calendar\n color={color}\n {...calendarProps}\n numberOfMonths={numberOfMonths}\n ></Calendar>\n </Flex>\n </Popover>\n )}\n </Flex>\n {props.error && (\n <InputError {...errorMessageProps}>{props.error}</InputError>\n )}\n </Flex>\n );\n }\n);\n\nDateInput.displayName = \"DateInput\";\n","import { DateValue, GregorianCalendar } from \"@internationalized/date\";\nimport * as React from \"react\";\nimport {\n AriaDatePickerProps,\n useDateField,\n useDateSegment,\n useLocale,\n} from \"react-aria\";\nimport { Flex } from \"../flex\";\nimport { DateFieldState, useDateFieldState } from \"react-stately\";\nimport { DateSegment as DateSegmentType } from \"react-stately\";\nimport { Text } from \"../text\";\nimport { mergeRefs } from \"../../utils/dom\";\n\ninterface DateFieldProps extends AriaDatePickerProps<DateValue> {\n error?: string;\n}\n\nfunction createCalendar() {\n return new GregorianCalendar();\n}\n\nexport const DateField = React.forwardRef<HTMLDivElement, DateFieldProps>(\n (props, ref) => {\n const { locale } = useLocale();\n\n const state = useDateFieldState({\n ...props,\n locale,\n createCalendar,\n });\n\n const fieldRef = React.useRef(null);\n const { fieldProps } = useDateField(props, state, fieldRef);\n\n return (\n <Flex\n gap=\"none\"\n style={{ padding: \"4px 0px\", flex: 1 }}\n stretchY\n ref={mergeRefs(fieldRef, ref)}\n inline\n {...fieldProps}\n >\n {state.segments.map((segment, i) => {\n return (\n <DateSegment key={i} segment={segment} state={state}></DateSegment>\n );\n })}\n </Flex>\n );\n }\n);\n\nfunction DateSegment({\n segment,\n state,\n}: {\n segment: DateSegmentType;\n state: DateFieldState;\n}) {\n const ref = React.useRef(null);\n const { segmentProps } = useDateSegment(segment, state, ref);\n\n const segmentMaxValue = segment.maxValue ?? 0;\n\n return (\n <Flex\n className=\"p-date-input-segment\"\n align={\"center\"}\n justify={\"center\"}\n ref={ref}\n data-placeholder={segment.isPlaceholder}\n data-separator={segment.text === \"/\"}\n style={{\n minWidth: segmentMaxValue.toString().length + \"ch\",\n color: segment.text == \"/\" ? \"var(--color-6)\" : \"var(--color-12)\",\n }}\n {...segmentProps}\n >\n <Text\n size={\"sm\"}\n variant={segment.isPlaceholder ? \"dark\" : \"lighter\"}\n as=\"span\"\n aria-hidden=\"true\"\n style={{\n color: \"inherit\",\n display: \"block\",\n height: segment.isPlaceholder ? \"\" : 0,\n pointerEvents: \"none\",\n visibility: segment.isPlaceholder ? undefined : \"hidden\",\n position: segment.isPlaceholder ? undefined : \"absolute\",\n }}\n >\n {segment.placeholder}\n </Text>\n {segment.isPlaceholder ? \"\" : segment.text}\n </Flex>\n );\n}\n\nDateField.displayName = \"DateField\";\n","import { DateValue } from \"@react-types/calendar\";\nimport * as React from \"react\";\nimport {\n AriaCalendarCellProps,\n AriaCalendarGridProps,\n AriaCalendarProps,\n mergeProps,\n useCalendar,\n useCalendarCell,\n useCalendarGrid,\n useFocusRing,\n useLocale,\n} from \"react-aria\";\nimport { CalendarState, useCalendarState } from \"react-stately\";\nimport {\n CalendarDate,\n DateDuration,\n createCalendar,\n endOfMonth,\n getWeeksInMonth,\n isSameMonth,\n} from \"@internationalized/date\";\nimport { Flex } from \"../flex\";\nimport { IconButton } from \"../button\";\nimport { Text } from \"../text\";\nimport { HiChevronLeft, HiChevronRight } from \"react-icons/hi\";\nimport { range } from \"../../utils/array\";\nimport { Color } from \"../../utils/theme\";\n\ninterface CalendarProps extends AriaCalendarProps<DateValue> {\n numberOfMonths?: number;\n color?: Color;\n}\n\nexport const Calendar = React.forwardRef<HTMLDivElement, CalendarProps>(\n ({ numberOfMonths = 1, color, ...props }, ref) => {\n const { locale } = useLocale();\n const state = useCalendarState({\n ...props,\n locale,\n createCalendar,\n visibleDuration: { months: numberOfMonths },\n });\n\n const { calendarProps, prevButtonProps, nextButtonProps, title } =\n useCalendar(props, state);\n\n console.log(state);\n\n // function onMonthChange(month: string) {\n // state.setValue(\n // parseDate(\n // `${state.value.year}-${month.padStart(2, \"0\")}-${state.value.day\n // .toString()\n // .padStart(2, \"0\")}`\n // )\n // );\n // }\n\n // function onYearChange(year: string) {\n // state.setValue(\n // parseDate(\n // `${year}-${state.value.month\n // .toString()\n // .padStart(2, \"0\")}-${state.value.day.toString().padStart(2, \"0\")}`\n // )\n // );\n // }\n\n return (\n <Flex\n data-color={color}\n inline\n gap={\"xs\"}\n direction={\"column\"}\n ref={ref}\n className=\"p-calendar-wrapper\"\n {...calendarProps}\n >\n <Flex align={\"center\"} justify={\"space-between\"} className=\"header\">\n <IconButton\n variant=\"outline\"\n radius={\"full\"}\n size={\"sm\"}\n color={\"gray\"}\n {...prevButtonProps}\n >\n <HiChevronLeft size={20} />\n </IconButton>\n\n <Text color=\"black\" size=\"sm\" weight={\"regular\"} as=\"h2\">\n {title}\n </Text>\n\n <IconButton\n variant=\"outline\"\n radius=\"full\"\n size={\"sm\"}\n color=\"gray\"\n {...nextButtonProps}\n >\n <HiChevronRight size={20} />\n </IconButton>\n </Flex>\n\n {/* <Flex>\n <Select\n onChange={(value) => onMonthChange(value.target.value as string)}\n value={state.value.month.toString()}\n valueKey=\"value\"\n labelKey=\"label\"\n renderValue={(option) => option?.label?.substring?.(0, 3)}\n items={monthsByIndex.map((m, i) => ({\n label: m,\n value: i + 1,\n }))}\n style={{ flex: 1 }}\n ></Select>\n\n <Select\n value={state.value.year.toString()}\n onChange={(value) => onYearChange(value.target.value as string)}\n style={{ flex: 1 }}\n labelKey=\"label\"\n valueKey=\"value\"\n items={range(1900, 2024)\n .reverse()\n .map((i) => ({ label: i, value: i }))}\n ></Select>\n </Flex> */}\n\n <Flex gap={\"xl\"}>\n {range(1, numberOfMonths).map((n) => {\n return (\n <CalendarGrid\n color={color}\n key={n}\n state={state}\n offset={{ months: n - 1 }}\n />\n );\n })}\n </Flex>\n </Flex>\n );\n }\n);\n\ntype CalendarGridProps = AriaCalendarGridProps & {\n state: CalendarState;\n offset?: DateDuration;\n color?: Color;\n};\n\nfunction CalendarGrid({\n state,\n offset = {},\n color,\n ...props\n}: CalendarGridProps) {\n const { locale } = useLocale();\n const startDate = state.visibleRange.start.add(offset);\n const endDate = endOfMonth(startDate);\n const { gridProps, headerProps, weekDays } = useCalendarGrid(\n { startDate, endDate, ...props },\n state\n );\n\n const weeksInMonth = getWeeksInMonth(state.visibleRange.start, locale);\n\n return (\n <table {...gridProps}>\n <thead {...headerProps}>\n <tr>\n {weekDays.map((day, index) => (\n <th key={index}>\n <div className=\"p-date-cell\">\n <Text size={\"sm\"} variant=\"light\" weight={\"regular\"}>\n {day}\n </Text>\n </div>\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {[...new Array(weeksInMonth).keys()].map((weekIndex) => (\n <tr key={weekIndex}>\n {state\n .getDatesInWeek(weekIndex, startDate)\n .map((date, index) =>\n date ? (\n <CalendarCell\n color={color}\n state={state}\n date={date}\n key={index}\n currentMonth={startDate}\n ></CalendarCell>\n ) : (\n <td key={index}></td>\n )\n )}\n </tr>\n ))}\n </tbody>\n </table>\n );\n}\n\ntype CalendarCellProps = AriaCalendarCellProps & {\n state: CalendarState;\n currentMonth: CalendarDate;\n color?: Color;\n};\n\nfunction CalendarCell({\n state,\n currentMonth,\n color,\n ...props\n}: CalendarCellProps) {\n const ref = React.useRef(null);\n const {\n cellProps,\n buttonProps,\n isSelected,\n isDisabled,\n isUnavailable,\n formattedDate,\n } = useCalendarCell(props, state, ref);\n\n const { focusProps, isFocusVisible, isFocused } = useFocusRing();\n const isOutsideMonth = !isSameMonth(currentMonth, props.date);\n\n return (\n <td {...cellProps}>\n <div\n {...mergeProps(buttonProps, focusProps)}\n ref={ref}\n data-hidden={isOutsideMonth}\n data-selected={isSelected}\n data-disabled={isDisabled}\n data-unavailable={isUnavailable}\n data-focused={isFocused}\n data-focus-visible={isFocusVisible}\n className=\"p-date-cell\"\n data-color={color}\n >\n {formattedDate}\n </div>\n </td>\n );\n}\n\nCalendar.displayName = \"Calendar\";\n","import { omit, pick } from \"./object\";\nimport { Dict } from \"./types\";\n\nexport function range(start = 0, end: number, step = 1): Array<number> {\n const result: Array<number> = [];\n \n for (let index = start; index <= end; index += step) {\n result.push(index);\n }\n \n return result;\n }\n \n export function findObjectInArray<O extends Dict>(\n array: Array<O>,\n key: keyof O,\n value: unknown\n ): O | undefined {\n return array.find((item) => {\n return item[key] === value;\n });\n }\n \n export function omitArray<O extends Dict>(array: Array<O>, keys: (keyof O)[]) {\n return array.map((item) => omit(item, keys));\n }\n \n export function pickArray<O extends Dict>(array: Array<O>, keys: (keyof O)[]) {\n return array.map((item) => pick(item, keys));\n }","export {Avatar} from './avatar';","import * as React from \"react\";\nimport { hashCode, warnDeprecation } from \"../../utils/helpers\";\nimport { cx } from \"../../utils/dom\";\nimport {\n BorderRadius,\n Color,\n ColorVariant,\n supportedColors,\n} from \"../../utils/theme\";\nimport { useTheme } from \"../theme\";\nimport { StyleProps } from \"../../utils/types\";\n\ntype AvatarSize = \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\";\n\ntype AvatarShape = \"circle\" | \"square\";\n\nexport interface AvatarProps\n extends React.ComponentProps<\"div\">,\n StyleProps<\"base\" | \"fallback\" | \"img\"> {\n src?: string;\n alt?: string;\n name?: string;\n fallback?: React.ReactNode;\n radius?: BorderRadius;\n color?: Color;\n variant?: ColorVariant;\n size?: AvatarSize;\n /**@deprecated use radius instead */\n shape?: AvatarShape;\n}\n\nexport const Avatar = React.forwardRef<HTMLDivElement, AvatarProps>(\n (\n {\n src,\n alt,\n name,\n color,\n variant = \"light\",\n fallback,\n children,\n size = \"md\",\n shape,\n className,\n radius = \"lg\",\n classNames,\n styles,\n style,\n ...props\n },\n ref\n ) => {\n const [imageError, setImageError] = React.useState(false);\n const theme = useTheme();\n\n function getAvatarRadius(): BorderRadius {\n warnDeprecation(\"shape\", \"radius\", shape);\n // TODO: remove this when we remove the deprecated shape prop\n if (shape === \"circle\" && !radius) {\n radius = \"full\";\n }\n if (shape === \"square\" && !radius) {\n radius = \"md\";\n }\n return theme?.avatarRadiusSize || radius;\n }\n\n const defaultColor = React.useMemo(() => {\n const hash = hashCode(name || \"\");\n return supportedColors[hash % supportedColors.length];\n }, [name]);\n\n const renderContent = () => {\n if (src && !imageError) {\n return (\n <img\n className={cx([\"avatar-img\", classNames?.img])}\n onLoad={() => setImageError(false)}\n onError={() => setImageError(true)}\n src={src}\n alt={alt}\n />\n );\n }\n\n if (imageError && !children) {\n return fallback;\n }\n\n if (!src && !children && name) {\n return (\n <span\n style={styles?.fallback}\n className={cx([\"avatar-fallback\", classNames?.fallback])}\n >\n {name.charAt(0)}\n </span>\n );\n }\n\n return children;\n };\n\n return (\n <div\n style={{ ...style, ...styles?.base }}\n className={cx([\"p-avatar\", className, classNames?.base])}\n data-radius={getAvatarRadius()}\n data-color={color ?? defaultColor}\n data-variant={variant}\n data-interactive={false}\n data-size={size}\n ref={ref}\n {...props}\n >\n {renderContent()}\n </div>\n );\n }\n);\n\nAvatar.displayName = \"Avatar\";\n","export {FileUploader} from './file-uploader';","import * as React from \"react\";\nimport { VisuallyHidden } from \"react-aria\";\nimport { Flex } from \"../flex\";\nimport { ActionStatus } from \"../../utils/types\";\nimport {\n HiOutlineCheckCircle,\n HiOutlineDocumentAdd,\n HiOutlineExclamationCircle,\n HiOutlinePaperClip,\n HiOutlineRefresh,\n HiOutlineTrash,\n} from \"react-icons/hi\";\nimport { Text } from \"../text\";\nimport { Loader } from \"../loader\";\nimport { IconButton } from \"../button\";\nimport { InputError } from \"../input-error\";\nimport { InputLabel } from \"../input-label\";\nimport { useDrop, FileDropItem } from \"react-aria\";\nimport { isEmptyArray } from \"../../utils/assertions\";\nimport { id } from \"../../utils/helpers\";\nimport { Color } from \"../../utils/theme\";\n\nexport type Upload = {\n name: string;\n url: string;\n id: string;\n file?: File;\n status?: ActionStatus;\n progress?: number;\n};\n\n// onChange\n// 1. convert files into upload type with raw file\n// onFileUpload should now take an Array<Upload> argument\n// if you need to do a remote upload outside the component you have access to the raw files.\n// write utility function to extract files from Upload object\n// if you want to use the component as a controlled component, simply pass in an uploads prop.\n// if it's a single upload, display inside component\n// if it's multiple uploads show them in the list of uploads as file name and progress bar\n\ninterface FileUploaderProps {\n onFileUpload?: (files: Array<Upload>) => void;\n onRemoveFile?: () => void;\n onStatusChange?: (status: ActionStatus) => void;\n error?: React.ReactNode;\n label?: React.ReactNode;\n allowMultiple?: boolean;\n uploads?: Array<Upload>;\n hideFileList?: boolean;\n color?: Color;\n}\n\nexport const FileUploader = React.forwardRef<HTMLDivElement, FileUploaderProps>(\n (\n {\n onFileUpload,\n onRemoveFile,\n error,\n label,\n allowMultiple,\n uploads: controlledUploads,\n hideFileList,\n color = \"gray\",\n },\n ref\n ) => {\n const [_uploads, setUploads] = React.useState<Array<Upload>>([]);\n\n const uploads = controlledUploads ?? _uploads;\n\n const inputRef = React.useRef<HTMLInputElement>(null);\n const wrapperRef = React.useRef(null);\n\n const { dropProps, isDropTarget } = useDrop({\n ref: wrapperRef,\n async onDrop(e) {\n const files = await Promise.all(\n (\n e.items.filter(\n (item) => item.kind === \"file\"\n ) as Array<FileDropItem>\n ).map(async (file) => {\n const f = await file.getFile();\n return f;\n })\n );\n\n const uploads = files.map(convertFileToUpload);\n\n onUpload(uploads);\n },\n });\n\n function onUpload(uploads: Array<Upload>) {\n console.log(uploads);\n if (isEmptyArray(uploads)) {\n return;\n }\n\n setUploads(uploads);\n onFileUpload?.(uploads);\n }\n\n function onChange(e: React.ChangeEvent<HTMLInputElement>) {\n const rawFiles = e.target.files;\n\n if (rawFiles?.length) {\n const files = Array.from(rawFiles).map(convertFileToUpload);\n onUpload(files);\n inputRef.current && (inputRef.current.value = \"\");\n }\n }\n\n function convertFileToUpload(file: File): Upload {\n return {\n name: file.name,\n id: id(),\n url: URL.createObjectURL(file),\n status: \"success\",\n file,\n };\n }\n\n function handleRemoveFile() {\n setUploads([]);\n onRemoveFile?.();\n }\n\n function handleRetry() {\n console.log(\"retry\");\n }\n\n const isIdle =\n allowMultiple ||\n (!allowMultiple && uploads[0]?.status === \"idle\") ||\n !uploads.length;\n const isUploading = !allowMultiple && uploads[0]?.status === \"loading\";\n const isUploaded = !allowMultiple && uploads[0]?.status === \"success\";\n const isFailed = !allowMultiple && uploads[0]?.status === \"error\";\n\n return (\n <Flex ref={ref} stack gap={\"xs\"}>\n {label && <InputLabel>{label}</InputLabel>}\n <label\n data-radius=\"lg\"\n className=\"p-file-uploader\"\n ref={wrapperRef}\n {...dropProps}\n data-color={color}\n data-dropping={isDropTarget}\n data-state={\n allowMultiple || !uploads.length ? \"idle\" : uploads[0]?.status\n }\n >\n <VisuallyHidden>\n <input\n ref={inputRef}\n multiple={allowMultiple}\n onChange={onChange}\n type={isIdle ? \"file\" : \"hidden\"}\n />\n </VisuallyHidden>\n\n {isIdle && (\n <Flex align=\"center\" gap={\"xs\"}>\n <HiOutlineDocumentAdd className=\"state-icon\" size={20} />\n <Text color={\"inherit\"} size=\"sm\">\n Click or drag files here to upload\n </Text>\n </Flex>\n )}\n\n {isUploading && (\n <Flex align={\"center\"} gap={\"xs\"}>\n <Loader size=\"xs\" />\n <Text color=\"inherit\" size=\"sm\">\n Name_of_file.ext / Uploading...\n </Text>\n </Flex>\n )}\n\n {isUploaded && (\n <Flex stretchX align={\"center\"} justify={\"space-between\"}>\n <Flex align={\"center\"} gap={\"xs\"}>\n <HiOutlineCheckCircle size={16} />\n <Text color=\"green\" size=\"sm\">\n File successfully uploaded\n </Text>\n </Flex>\n\n <IconButton\n onPress={handleRemoveFile}\n variant={\"outline\"}\n color=\"green\"\n size=\"xs\"\n >\n <HiOutlineTrash size={16} />\n </IconButton>\n </Flex>\n )}\n\n {isFailed && (\n <Flex stretchX justify={\"space-between\"}>\n <Flex align={\"center\"} gap={\"xs\"}>\n <HiOutlineExclamationCircle className=\"state-icon\" />\n <Text color={\"tomato\"} size=\"sm\">\n Failed to upload file\n </Text>\n </Flex>\n\n <IconButton\n onPress={handleRetry}\n variant={\"outline\"}\n color={\"tomato\"}\n size={\"xs\"}\n >\n <HiOutlineRefresh size={16} />\n </IconButton>\n </Flex>\n )}\n\n <Flex></Flex>\n </label>\n\n {uploads.length > 1 && !hideFileList && (\n <Flex\n style={{ marginTop: 10 }}\n stack\n gap={\"sm\"}\n className=\"upload-list\"\n >\n {uploads.map((upload) => (\n <Flex align={\"center\"} gap={\"xs\"} key={upload.id}>\n {upload.status === \"loading\" && <Loader></Loader>}\n {upload.status === \"success\" && <HiOutlinePaperClip />}\n <Text size=\"sm\" color={\"gray\"}>\n {upload.name}\n </Text>\n </Flex>\n ))}\n </Flex>\n )}\n\n {error && <InputError>{error}</InputError>}\n </Flex>\n );\n }\n);\n\nFileUploader.displayName = \"FileUploader\";\n","export {Separator} from './separator'","import * as React from \"react\";\nimport { cx } from \"../../utils/dom\";\nimport { Color } from \"../../utils/theme\";\n\ninterface SeparatorProps extends React.ComponentPropsWithoutRef<\"div\"> {\n orientation?: \"horizontal\" | \"vertical\";\n color?: Color;\n opacity?: \"faint\" | \"medium\" | \"strong\";\n}\n\nexport const Separator = React.forwardRef<HTMLDivElement, SeparatorProps>(\n ({ orientation, className, color, opacity, ...props }, ref) => {\n return (\n <div\n data-opacity={opacity}\n data-color={color}\n data-orientation={orientation}\n className={cx([\"p-separator\", className])}\n ref={ref}\n {...props}\n ></div>\n );\n }\n);\n\nSeparator.displayName = \"Separator\";\n","export {Progress} from './progress';","import * as React from \"react\";\nimport { Box } from \"../box\";\nimport { AriaProgressBarProps, useProgressBar } from \"react-aria\";\nimport { Flex } from \"../flex\";\nimport { Text } from \"../text\";\nimport { cx } from \"../../utils/dom\";\nimport { Color } from \"../../utils/theme\";\n\ninterface ProgressProps\n extends AriaProgressBarProps,\n React.ComponentPropsWithoutRef<\"div\"> {\n height?: number;\n color?: Color;\n}\n\nexport const Progress = React.forwardRef<HTMLDivElement, ProgressProps>(\n ({ height = 2, className, style, color = \"gray\", ...props }, ref) => {\n const { minValue = 0, maxValue = 100, value = 0, label } = props;\n const { progressBarProps, labelProps } = useProgressBar(props);\n const percent = ((value - minValue) / (maxValue - minValue)) * 100;\n const barWidth = `${percent}%`;\n\n return (\n <Flex\n data-color={color}\n style={style}\n className={cx([className, \"progress-bar\"])}\n stack\n {...progressBarProps}\n >\n {label && <Text {...labelProps}>{label}</Text>}\n <div\n className=\"progress-wrapper\"\n style={{\n height,\n background: \"var(--color-3)\",\n position: \"relative\",\n borderRadius: 60,\n overflow: \"hidden\",\n }}\n ref={ref}\n >\n <Box\n position={\"absolute\"}\n className=\"progress\"\n style={{\n left: 0,\n top: 0,\n height: \"100%\",\n width: barWidth,\n background: \"var(--color-10)\",\n transition: \"all 0.3s ease\",\n }}\n ></Box>\n </div>\n </Flex>\n );\n }\n);\n\nProgress.displayName = \"Progress\";\n","export {Switch} from './switch'","import * as React from \"react\";\nimport {\n AriaSwitchProps,\n VisuallyHidden,\n useFocusRing,\n useHover,\n usePress,\n useSwitch,\n} from \"react-aria\";\nimport { useToggleState } from \"react-stately\";\nimport { Flex } from \"../flex\";\nimport { Color, ColorVariant } from \"../../utils/theme\";\nimport { cx } from \"../../utils/dom\";\nimport { omit } from \"../../utils/object\";\n\ninterface Props extends AriaSwitchProps {\n color?: Color;\n variant?: ColorVariant;\n size?: \"sm\" | \"md\" | \"lg\";\n className?: string;\n}\n\nexport const Switch = React.forwardRef<HTMLLabelElement, Props>(\n ({ color = \"violet\", size = \"sm\", children, className, ...props }, ref) => {\n const { isHovered, hoverProps } = useHover(props);\n const { isPressed, pressProps } = usePress(props);\n const state = useToggleState(props);\n const switchRef = React.useRef(null);\n const { inputProps } = useSwitch(props, state, switchRef);\n const { isFocusVisible, focusProps } = useFocusRing();\n\n return (\n <Flex\n ref={ref as any}\n style={{\n opacity: props.isDisabled ? 0.4 : 1,\n }}\n align={\"center\"}\n gap={\"xs\"}\n as=\"label\"\n className={cx(className, \"p-switch-group\")}\n >\n <VisuallyHidden>\n <input ref={switchRef} {...inputProps} {...focusProps} />\n </VisuallyHidden>\n\n <span\n data-color={color}\n data-hovered={isHovered}\n data-disabled={props.isDisabled}\n data-selected={state.isSelected}\n data-focused={isFocusVisible}\n className=\"p-switch track\"\n data-size={size}\n {...hoverProps}\n >\n <Flex\n data-selected={state.isSelected}\n data-pressed={isPressed}\n className=\"p-switch-thumb\"\n {...omit(pressProps as any, [\"isSelected\"])}\n />\n </span>\n {children}\n </Flex>\n );\n }\n);\n\nSwitch.displayName = \"Switch\";\n","export { Slider } from \"./slider\";\n","import * as React from \"react\";\nimport { cx } from \"../../utils/dom\";\nimport { StyleProps } from \"../../utils/types\";\nimport {\n AriaSliderProps,\n AriaSliderThumbProps,\n VisuallyHidden,\n mergeProps,\n useFocusRing,\n useNumberFormatter,\n useSlider,\n useSliderThumb,\n} from \"react-aria\";\nimport { SliderState, useSliderState } from \"react-stately\";\nimport { InputLabel } from \"../input-label\";\nimport { Color, SizeOption } from \"../../utils/theme\";\n\ntype SliderProps = {\n name?: string;\n size?: SizeOption;\n color?: Color;\n} & StyleProps<\n \"wrapper\" | \"track\" | \"fill\" | \"thumb\" | \"innerThumb\" | \"label\"\n> &\n AriaSliderProps;\n\nexport function Slider({\n className,\n classNames,\n style,\n styles,\n name,\n size = \"sm\",\n color,\n orientation = \"horizontal\",\n ...props\n}: SliderProps) {\n const trackRef = React.useRef(null);\n const numberFormatter = useNumberFormatter();\n const state = useSliderState({ ...props, numberFormatter });\n const { trackProps, labelProps } = useSlider(\n { ...props, \"aria-label\": props[\"aria-label\"] ?? \"slider\" },\n state,\n trackRef\n );\n\n const percent = state.getThumbPercent(0);\n\n return (\n <div\n data-color={color}\n data-size={size}\n style={{ ...style, ...styles?.wrapper }}\n className={cx(\"p-slider\", orientation, className, classNames?.wrapper)}\n >\n {props.label && (\n <InputLabel\n style={styles?.label}\n className={classNames?.label}\n {...labelProps}\n >\n {props.label}\n </InputLabel>\n )}\n <div\n {...trackProps}\n ref={trackRef}\n className={cx(\"p-slider-track\", classNames?.track)}\n style={{ ...styles?.track, ...trackProps.style }}\n >\n <div\n style={{ ...styles?.fill, width: `${percent * 100}%` }}\n className={cx(\"p-slider-track-fill\", classNames?.fill)}\n ></div>\n <Thumb\n styles={{ wrapper: styles?.thumb, inner: styles?.innerThumb }}\n classNames={{\n wrapper: classNames?.thumb,\n inner: classNames?.innerThumb,\n }}\n state={state}\n trackRef={trackRef}\n index={0}\n name={name}\n />\n </div>\n </div>\n );\n}\n\ntype ThumbProps = StyleProps<\"wrapper\" | \"inner\"> &\n AriaSliderThumbProps & {\n trackRef: React.RefObject<HTMLDivElement>;\n state: SliderState;\n };\n\nfunction Thumb({\n state,\n trackRef,\n index,\n name,\n className,\n classNames,\n styles,\n style,\n}: ThumbProps) {\n const inputRef = React.useRef(null);\n const { thumbProps, inputProps, isDragging } = useSliderThumb(\n {\n index,\n trackRef,\n inputRef,\n name,\n },\n state\n );\n\n const { focusProps, isFocusVisible } = useFocusRing();\n return (\n <div\n {...thumbProps}\n data-dragging={isDragging}\n data-focus-visible={isFocusVisible}\n className={cx(\"p-slider-thumb\", className, classNames?.wrapper)}\n style={{ ...thumbProps.style, ...style, ...styles?.wrapper }}\n >\n <div\n style={styles?.inner}\n className={cx(\"p-slider-thumb-inner\", classNames?.inner)}\n ></div>\n <VisuallyHidden>\n <input ref={inputRef} {...mergeProps(inputProps, focusProps)} />\n </VisuallyHidden>\n </div>\n );\n}\n","export {IconTray} from './icon-tray'","import * as React from \"react\";\n\nexport function IconTray(props: any) {\n return <div></div>;\n}\n","export {Sticker} from './sticker';","import React from \"react\";\nimport { Flex, FlexProps } from \"../flex\";\nimport { BorderRadius, Color, ColorVariant } from \"../../utils/theme\";\nimport { useTheme } from \"../theme\";\n\ninterface StickerProps extends FlexProps {\n padded?: boolean;\n color?: Color;\n variant?: ColorVariant;\n radius?: BorderRadius;\n}\n\nexport const Sticker = React.forwardRef<\n HTMLDivElement,\n React.PropsWithChildren<StickerProps>\n>(\n (\n {\n variant = \"outline\",\n color = \"violet\",\n padded = true,\n gap = \"sm\",\n radius,\n children,\n ...props\n },\n ref\n ) => {\n const theme = useTheme();\n\n return (\n <Flex\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n style={{\n borderRadius: \"max(var(--radius-lg), var(--radius-full))\",\n padding: padded ? \"var(--space-4)\" : undefined,\n }}\n data-variant={variant}\n data-color={color}\n ref={ref}\n gap={gap}\n {...props}\n >\n {children}\n </Flex>\n );\n }\n);\n\nSticker.displayName = \"Sticker\";\n","export { Tabs, Item as Tab } from \"./tabs\";\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport * as React from \"react\";\nimport {\n AriaTabListProps,\n AriaTabPanelProps,\n useTab,\n useTabList,\n useTabPanel,\n} from \"react-aria\";\nimport {\n Item as AriaItem,\n Node,\n TabListState,\n useTabListState,\n} from \"react-stately\";\nimport { Box } from \"../box\";\nimport { useTheme } from \"../theme\";\nimport { StyleProps } from \"../../utils/types\";\nimport { cx } from \"../../utils/dom\";\n\nexport interface TabsProps extends AriaTabListProps<any>, StyleProps {\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nexport function Tabs({ className, style, ...props }: TabsProps) {\n const state = useTabListState(props);\n const tabRef = React.useRef<HTMLDivElement>(null);\n\n const [indicatorStyles, setIndicatorStyles] = React.useState({\n width: 0,\n left: 0,\n });\n\n const indicatorRef = React.useRef(null);\n\n const { tabListProps } = useTabList(props, state, tabRef);\n\n React.useEffect(() => {\n const selected: any = tabRef?.current?.querySelector(\n '.p-tab[aria-selected=\"true\"]'\n );\n\n setIndicatorStyles({\n width: selected?.offsetWidth,\n left: selected?.offsetLeft,\n });\n }, [state.selectedKey]);\n\n const theme = useTheme();\n\n return (\n <Box\n style={style}\n data-color={theme?.color ?? \"violet\"}\n position={\"relative\"}\n className={cx(\"p-tabs\", className)}\n >\n <div {...tabListProps} ref={tabRef} className=\"p-tab-list\">\n <Box\n className=\"indicator\"\n style={{\n left: indicatorStyles?.left,\n bottom: 0,\n background: \"var(--color-10)\",\n height: 2,\n marginBottom: -1,\n width: indicatorStyles?.width,\n transition: \"all 0.2s ease\",\n }}\n ref={indicatorRef}\n position={\"absolute\"}\n ></Box>\n {[...state.collection].map((item) => (\n <Tab\n orientation={props.orientation}\n key={item.key}\n item={item as any}\n state={state}\n ></Tab>\n ))}\n </div>\n <TabPanel key={state?.selectedItem?.key} state={state} />\n </Box>\n );\n}\n\ntype TabProps = {\n item: Node<unknown>;\n state: TabListState<unknown>;\n orientation?: \"horizontal\" | \"vertical\";\n};\n\nfunction Tab({ item, state }: TabProps) {\n const { key, rendered } = item;\n const ref = React.useRef(null);\n\n const { tabProps, isDisabled, isSelected } = useTab({ key }, state, ref);\n\n return (\n <div\n id={`tab-${key}`}\n className=\"p-tab\"\n ref={ref}\n data-disabled={isDisabled}\n data-selected={isSelected}\n {...tabProps}\n >\n {rendered}\n </div>\n );\n}\n\ntype TabPanelProps = AriaTabPanelProps & {\n state: TabListState<unknown>;\n};\n\nfunction TabPanel({ state, ...props }: TabPanelProps) {\n const ref = React.useRef(null);\n const { tabPanelProps } = useTabPanel(props, state, ref);\n\n return (\n <div {...tabPanelProps} ref={ref}>\n {state.selectedItem?.props.children}\n </div>\n );\n}\n\nexport const Item = AriaItem;\n","export { Table } from \"./table\";\n","import * as React from \"react\";\n\nexport function Table() {\n return <div></div>;\n}\n","export { Timeline } from \"./timeline\";\n","import React from \"react\";\nimport { Box } from \"../box\";\nimport { Flex } from \"../flex\";\n\n// https://dribbble.com/shots/20456228-Audit-trail\n// https://dribbble.com/shots/18901487-Attio-Record-Activity-Feed\n// https://dribbble.com/shots/20146723-Sales-Status-Ditto-CRM\n\nexport interface TimelineProps<T> {\n items: Array<T>;\n render?(item: T): React.ReactNode;\n labelKey?: keyof T;\n getIndicator?(item: T): React.ReactNode;\n hideLastItemTail?: boolean;\n}\n\nexport function Timeline<T>({\n items,\n render,\n labelKey,\n getIndicator,\n hideLastItemTail = true,\n}: TimelineProps<T>) {\n return (\n <Box>\n {items.map((item, index) => {\n const indicator = getIndicator?.(item) ?? (\n <div color={\"blue\"} data-variant={\"outline\"} />\n );\n\n const content =\n render?.(item) ?? (item[labelKey as keyof T] as React.ReactNode);\n\n const isLast = index === items.length - 1;\n\n return (\n <Flex className=\"p-timeline-item\" key={index}>\n <Flex align={\"center\"} stack>\n <Flex className=\"p-timeline-indicator-container\">\n {indicator}\n </Flex>\n\n {isLast && hideLastItemTail ? null : (\n <div className=\"p-timeline-item-tail\" />\n )}\n </Flex>\n\n <Flex stretchX className=\"p-timeline-item-content\">\n {content}\n </Flex>\n </Flex>\n );\n })}\n </Box>\n );\n}\n","export { Modal, useModal } from \"./modal\";\nexport type { ModalProps } from \"./modal\";\n","import * as React from \"react\";\nimport {\n AriaModalOverlayProps,\n Overlay as AriaOverlay,\n useDialog,\n useModalOverlay,\n} from \"react-aria\";\nimport {\n OverlayTriggerProps,\n OverlayTriggerState,\n useOverlayTriggerState,\n} from \"react-stately\";\nimport { Flex } from \"../flex\";\nimport { Text } from \"../text\";\nimport { Button } from \"../button\";\nimport { HiX } from \"react-icons/hi\";\nimport { StyleProps } from \"../../utils/types\";\nimport { cx } from \"../../utils/dom\";\n\nexport interface ModalProps\n extends AriaModalOverlayProps,\n StyleProps<\n | \"wrapper\"\n | \"underlay\"\n | \"content\"\n | \"header\"\n | \"body\"\n | \"footer\"\n | \"title\"\n > {\n hideTitle?: boolean;\n state?: OverlayTriggerState;\n children?: React.ReactNode;\n title?: React.ReactNode;\n description?: React.ReactNode;\n onConfirm?(): void;\n onCancel?(): void;\n confirmLabel?: string;\n cancelLabel?: string;\n confirmButtonProps?: React.ComponentProps<typeof Button>;\n cancelButtonProps?: React.ComponentProps<typeof Button>;\n width?: number | string;\n variant?: \"modal\" | \"drawer\";\n showCloseButton?: boolean;\n onOpenChange?(open: boolean): void;\n onClose?(): void;\n isOpen?: boolean;\n defaultOpen?: boolean;\n}\n\nexport function Overlay({\n children,\n state,\n classNames,\n styles,\n variant = \"modal\",\n isDismissable = true,\n ...props\n}: ModalProps) {\n const modalRef = React.useRef(null);\n\n const { modalProps, underlayProps } = useModalOverlay(\n { ...props, isDismissable },\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n state!,\n modalRef\n );\n\n if (!state?.isOpen) {\n return null;\n }\n return (\n <AriaOverlay>\n <div\n style={styles?.underlay}\n className={cx([\"p-modal-underlay\", classNames?.underlay])}\n {...underlayProps}\n >\n <div\n data-variant={variant}\n style={styles?.wrapper}\n className={cx([\"p-modal-container\", classNames?.wrapper])}\n {...modalProps}\n ref={modalRef}\n >\n {children}\n </div>\n </div>\n </AriaOverlay>\n );\n}\n\nfunction Dialog({\n width = 400,\n title,\n onCancel,\n onConfirm,\n confirmLabel = \"Confirm\",\n cancelLabel = \"Cancel\",\n description,\n children,\n confirmButtonProps,\n cancelButtonProps,\n showCloseButton = true,\n onClose,\n className,\n style,\n hideTitle,\n classNames,\n styles,\n state,\n ...props\n}: ModalProps) {\n const dialogRef = React.useRef(null);\n\n const { dialogProps, titleProps } = useDialog(\n { role: \"dialog\", ...props },\n dialogRef\n );\n\n function handleClose() {\n state?.close();\n onClose?.();\n }\n\n return (\n <div\n data-radius=\"md\"\n className={cx(\"p-modal-content\", className, classNames?.content)}\n style={{ width: width, ...style, ...styles?.content }}\n ref={dialogRef}\n {...dialogProps}\n >\n {!hideTitle && (\n <Flex\n align=\"center\"\n as=\"header\"\n justify=\"space-between\"\n gap=\"2xl\"\n style={styles?.header}\n className={cx([\"p-modal-head\", classNames?.header])}\n >\n <Flex stack gap={\"3xs\"}>\n {title && (\n <Text\n style={styles?.title}\n className={cx([\"p-modal-title\", classNames?.title])}\n weight={\"medium\"}\n size={\"md\"}\n color={\"black\"}\n as=\"div\"\n {...titleProps}\n >\n {title}\n </Text>\n )}\n {description && (\n <Text lineHeight={\"base\"} size={\"xs\"} variant={\"light\"} as=\"div\">\n {description}\n </Text>\n )}\n </Flex>\n\n {props.isDismissable && showCloseButton && (\n <button\n color=\"gray\"\n onClick={handleClose}\n data-variant=\"ghost\"\n data-color=\"gray\"\n className=\"p-button size-sm\"\n data-radius={\"full\"}\n data-icon-button={true}\n >\n <HiX size={18} />\n </button>\n )}\n </Flex>\n )}\n <Flex\n stack\n className={cx([\"p-modal-body\", classNames?.body])}\n style={styles?.body}\n >\n {children}\n </Flex>\n\n {(onConfirm || onCancel) && (\n <Flex\n as=\"footer\"\n style={styles?.footer}\n className={cx([\"p-modal-footer\", classNames?.footer])}\n gap={\"xs\"}\n justify={\"end\"}\n stretchX\n >\n {onCancel && (\n <Button\n onPress={handleClose}\n variant={\"outline\"}\n color={\"gray\"}\n {...cancelButtonProps}\n >\n {cancelLabel}\n </Button>\n )}\n {onConfirm && (\n <Button onPress={onConfirm} {...confirmButtonProps}>\n {confirmLabel}\n </Button>\n )}\n </Flex>\n )}\n </div>\n );\n}\n\nexport function Modal({\n isOpen,\n defaultOpen,\n onOpenChange,\n ...props\n}: Omit<ModalProps, \"state\">) {\n const state = useOverlayTriggerState({ defaultOpen, isOpen, onOpenChange });\n\n return (\n <Overlay state={state} {...props}>\n <Dialog onOpenChange={onOpenChange} state={state} {...props} />\n </Overlay>\n );\n}\n\nexport function useModal(props: OverlayTriggerProps = {}) {\n const state = useOverlayTriggerState(props);\n return state;\n}\n\nModal.useModal = useModal;\n","export { TagInput } from \"./tag-input\";\n","import * as React from \"react\";\nimport { Flex } from \"../flex\";\nimport { Tag } from \"../tag/tag\";\nimport { HiX } from \"react-icons/hi\";\nimport { EMAIL_REGEX } from \"../../utils/regex\";\nimport { InputLabel } from \"../input-label\";\nimport { useControlledState } from \"../../hooks/use-controlled-state\";\nimport { InputError } from \"../input-error\";\nimport { IconButton } from \"../button\";\nimport { Box } from \"../box\";\nimport { useTheme } from \"../theme\";\nimport { FieldProps } from \"../form/field\";\n\ninterface TagField extends FieldProps<\"input\"> {\n tags?: Array<string>;\n defaultTags?: Array<string>;\n placeholder?: string;\n onInputValueChange?(value: string): void;\n onChange?(tags: Array<string>): void;\n tagVariant?: React.ComponentProps<typeof Tag>[\"variant\"];\n tagColor?: React.ComponentProps<typeof Tag>[\"color\"];\n tagShape?: React.ComponentProps<typeof Tag>[\"shape\"];\n tagSize?: React.ComponentProps<typeof Tag>[\"size\"];\n renderTag?(value: string, onRemove: (value: string) => void): React.ReactNode;\n}\n\nexport function TagInput({\n appearance = \"outline\",\n size = \"md\",\n label,\n error,\n placeholder,\n tags,\n defaultTags,\n tagColor = \"gray\",\n tagVariant = \"light\",\n tagShape = \"rounded\",\n tagSize = \"md\",\n color = \"gray\",\n onChange,\n renderTag,\n radius,\n}: TagField) {\n const [inputValue, setInputValue] = React.useState(\"\");\n const [values, setValues] = useControlledState<Array<string>>(\n dedupe(tags),\n dedupe(defaultTags) || [],\n onChange\n );\n const [isFocused, setIsFocused] = React.useState(false);\n const theme = useTheme();\n\n function dedupe(values: Array<string> | undefined) {\n if (!values) return undefined;\n return Array.from(new Set(values));\n }\n\n const inputRef = React.useRef<HTMLInputElement>(null);\n\n function onInputChange(e: React.ChangeEvent<HTMLInputElement>) {\n const { value } = e.target;\n setInputValue(value);\n }\n\n // function hasTrailingSpace(value: string) {\n // return /\\s$/.test(value);\n // }\n\n function hasTrailingComma(value: string) {\n return /,$/.test(value);\n }\n\n function onInputFocus() {\n setIsFocused(true);\n }\n\n function onInputBlur() {\n setIsFocused(false);\n }\n\n function onKeyDown(e: React.KeyboardEvent<HTMLInputElement>) {\n switch (e.key) {\n case \"Enter\":\n case \" \":\n if (isValid(inputValue.trim())) {\n commit([inputValue]);\n }\n break;\n case \"Backspace\":\n if (!inputValue) {\n onRemove(values[values.length - 1]);\n }\n break;\n\n default:\n break;\n }\n }\n\n function captureFocus() {\n inputRef.current?.focus();\n }\n\n function onRemove(value: string) {\n setValues(values.filter((v) => v !== value));\n }\n\n function isValid(value: string) {\n return EMAIL_REGEX.test(value);\n }\n\n function commit(newValues: Array<string>) {\n const validValues = newValues\n .map((v) => v.trim())\n .filter((v) => isValid(v));\n\n if (validValues.length > 0) {\n setInputValue(\"\");\n }\n\n const finalValues = Array.from(new Set([...values, ...validValues]));\n setValues(finalValues);\n }\n\n const showPlaceholder = !inputValue && values.length === 0;\n\n function getInputContainerWidth() {\n if (showPlaceholder) {\n return (placeholder?.length ?? 0) * 10;\n }\n\n if (!showPlaceholder && isFocused) {\n return inputValue?.length * 10 || 10;\n }\n\n return 0;\n }\n\n React.useEffect(() => {\n if (hasTrailingComma(inputValue.trim())) {\n const split = inputValue.split(\",\");\n commit(split);\n }\n }, [inputValue]);\n\n return (\n <Flex\n data-color={color}\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n data-size={size}\n className=\"p-input-group\"\n stack\n gap={\"xs\"}\n >\n {label && <InputLabel>{label}</InputLabel>}\n <div\n className=\"p-input-control p-tag-field\"\n data-focused={isFocused}\n onClick={captureFocus}\n data-appearance={appearance}\n >\n {values.map((value) => {\n return renderTag ? (\n <span key={value}>{renderTag?.(value, onRemove)}</span>\n ) : (\n <Tag\n variant={tagVariant}\n color={tagColor}\n shape={tagShape}\n size={tagSize}\n append={\n <IconButton\n variant={\"ghost\"}\n color={tagColor}\n radius={\"md\"}\n style={{ marginLeft: 8 }}\n onPress={() => {\n onRemove(value);\n }}\n size={\"xs\"}\n >\n <HiX size={16} />\n </IconButton>\n }\n key={value}\n >\n {value}\n </Tag>\n );\n })}\n\n <Box\n style={{\n width: getInputContainerWidth(),\n }}\n className=\"input-container\"\n >\n <input\n ref={inputRef}\n placeholder={showPlaceholder ? placeholder : \"\"}\n onKeyDown={onKeyDown}\n value={inputValue}\n onChange={onInputChange}\n onFocus={onInputFocus}\n onBlur={onInputBlur}\n className=\"p-tag-field-input\"\n />\n </Box>\n </div>\n {error && <InputError>{error}</InputError>}\n </Flex>\n );\n}\n","export const EMAIL_REGEX =\n /^(([^<>()[\\]\\\\.,;:\\s@\"]+(\\.[^<>()[\\]\\\\.,;:\\s@\"]+)*)|(\".+\"))@((\\[[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}\\.[0-9]{1,3}])|(([a-zA-Z\\-0-9]+\\.)+[a-zA-Z]{2,}))$/;\n","import * as React from \"react\";\nimport { isUndefinedOrNull } from \"../utils/assertions\";\n\nexport function useControlledState<T>(\n value?: T,\n defaultValue?: T,\n onChange?: (value: T) => void\n) {\n const [state, setState] = React.useState(value || defaultValue);\n const isControlled = !isUndefinedOrNull(value);\n\n const controlledValue = isControlled ? value : state;\n\n const setValue = React.useCallback(\n (value: T) => {\n if (!isControlled) {\n setState(value);\n }\n\n if (!Object.is(controlledValue, value)) {\n onChange?.(value);\n }\n },\n [isControlled, controlledValue]\n );\n\n return [controlledValue, setValue] as [T, (value: T) => void];\n}\n","export { Popover, PopoverContent, PopoverTrigger } from \"./popover\";\n","import * as React from \"react\";\nimport { InternalPopover } from \"../internal-popover\";\nimport {\n AriaButtonProps,\n AriaPopoverProps,\n useOverlayTrigger,\n usePress,\n} from \"react-aria\";\nimport { OverlayTriggerState, useOverlayTriggerState } from \"react-stately\";\nimport { StyleProps } from \"../../utils/types\";\nimport { cx } from \"../../utils/dom\";\n\ninterface PopoverProps {\n children?: React.ReactNode;\n useNativeClickHandler?: boolean;\n}\n\ninterface PopoverContextValue {\n triggerRef: React.RefObject<any>;\n overlayState: OverlayTriggerState;\n triggerProps: AriaButtonProps;\n overlayProps: any;\n props?: PopoverProps;\n}\n\nconst PopoverContext = React.createContext<PopoverContextValue | null>(null);\n\nexport function Popover({\n children,\n useNativeClickHandler,\n ...props\n}: PopoverProps) {\n const triggerRef = React.useRef(null);\n const state = useOverlayTriggerState(props);\n const { triggerProps, overlayProps } = useOverlayTrigger(\n { type: \"dialog\" },\n state,\n triggerRef\n );\n\n return (\n <PopoverContext.Provider\n value={{\n triggerProps,\n triggerRef,\n overlayProps,\n overlayState: state,\n props: { useNativeClickHandler },\n }}\n >\n {children}\n </PopoverContext.Provider>\n );\n}\n\ninterface PopoverTriggerProps {\n children: React.ReactElement;\n}\n\nexport function PopoverTrigger({ children }: PopoverTriggerProps) {\n const ctx = React.useContext(PopoverContext);\n if (!ctx) {\n throw \"PopoverTrigger must be used within a Popover component\";\n }\n\n const useClickEvents = ctx.props?.useNativeClickHandler;\n const clickProps = usePress(ctx.triggerProps);\n\n const triggerProps = useClickEvents\n ? clickProps.pressProps\n : ctx.triggerProps;\n\n return React.cloneElement(children, {\n ref: ctx.triggerRef,\n [\"data-is-pressed\"]: clickProps.isPressed,\n ...triggerProps,\n });\n}\n\ninterface PopoverContentProps\n extends StyleProps,\n Omit<AriaPopoverProps, \"triggerRef\" | \"popoverRef\"> {\n width?: number;\n}\n\nexport function PopoverContent({\n children,\n offset = 12,\n placement,\n style,\n className,\n ...props\n}: React.PropsWithChildren<PopoverContentProps>) {\n const ctx = React.useContext(PopoverContext);\n if (!ctx) {\n throw \"PopoverContent must be used withing a Popover component\";\n }\n\n if (!ctx.overlayState?.isOpen) {\n return null;\n }\n\n return (\n <InternalPopover\n offset={offset}\n placement={placement}\n state={ctx.overlayState}\n triggerRef={ctx.triggerRef}\n {...props}\n >\n <div\n {...ctx.overlayProps}\n data-radius=\"md\"\n className={cx(className, \"p-popover-content\")}\n style={{ ...style }}\n >\n {children}\n </div>\n </InternalPopover>\n );\n}\n","export { TagGroup, TagGroupItem } from \"./tag-group\";\n","import * as React from \"react\";\nimport { Flex, FlexProps } from \"../flex\";\nimport {\n AriaTagGroupProps,\n AriaTagProps,\n useFocusRing,\n useTag,\n useTagGroup,\n} from \"react-aria\";\nimport { Item, ListState, useListState } from \"react-stately\";\nimport { InputLabel } from \"../input-label\";\nimport { cx } from \"../../utils/dom\";\nimport { Text } from \"../text\";\nimport { InputError } from \"../input-error\";\nimport { Color, ColorVariant } from \"../../utils/theme\";\nimport { useTheme } from \"../theme\";\nimport { getRandomColor } from \"../../utils/helpers\";\n\ninterface TagProps<T> extends AriaTagProps<T>, TagVariantProps {\n state: ListState<T>;\n}\n\nfunction Tag<T>(props: TagProps<T>) {\n const theme = useTheme();\n const {\n activeColor = theme?.color ?? \"gray\",\n activeVariant = \"solid\",\n idleColor = \"gray\",\n idleVariant = \"outline\",\n item,\n state,\n autoColor,\n } = props;\n const tagRef = React.useRef(null);\n const { focusProps, isFocusVisible } = useFocusRing({ within: true });\n const { rowProps, gridCellProps, isSelected } = useTag(props, state, tagRef);\n\n const colors = React.useMemo(() => {\n if (autoColor) {\n const color = getRandomColor(item.textValue);\n return { active: color, idle: color };\n }\n\n return { active: activeColor, idle: idleColor };\n }, [activeColor, idleColor, autoColor]);\n\n return (\n <div\n ref={tagRef}\n {...rowProps}\n {...focusProps}\n data-focus-visible={isFocusVisible}\n data-is-toggle={true}\n className={cx(\"p-button\", \"size-sm\")}\n data-variant={isSelected ? activeVariant : idleVariant}\n data-radius=\"full\"\n data-color={isSelected ? colors.active : colors.idle}\n >\n <div {...gridCellProps}>{item.rendered}</div>\n </div>\n );\n}\n\ninterface TagVariantProps {\n activeColor?: Color;\n activeVariant?: ColorVariant;\n idleColor?: Color;\n idleVariant?: ColorVariant;\n autoColor?: boolean;\n}\n\ninterface TagGroupProps<T>\n extends AriaTagGroupProps<T>,\n FlexProps,\n TagVariantProps {}\n\nexport function TagGroup<T extends object>({\n wrap = \"wrap\",\n gap,\n columnGap,\n rowGap,\n align,\n justify,\n activeColor,\n activeVariant,\n idleColor,\n idleVariant,\n autoColor,\n ...props\n}: TagGroupProps<T>) {\n const { label, description, errorMessage } = props;\n const tagGroupRef = React.useRef(null);\n const state = useListState(props);\n const { gridProps, labelProps, descriptionProps, errorMessageProps } =\n useTagGroup(props, state, tagGroupRef);\n\n return (\n <Flex stack className=\"tag-group\">\n {label && <InputLabel {...labelProps}>{label}</InputLabel>}\n <Flex\n wrap={wrap}\n gap={gap}\n columnGap={columnGap}\n rowGap={rowGap}\n align={align}\n justify={justify}\n ref={tagGroupRef}\n {...gridProps}\n >\n {[...state.collection].map((item) => {\n return (\n <Tag\n autoColor={autoColor}\n activeColor={activeColor}\n activeVariant={activeVariant}\n idleColor={idleColor}\n idleVariant={idleVariant}\n key={item.key}\n state={state}\n item={item}\n ></Tag>\n );\n })}\n </Flex>\n {errorMessage && (\n <InputError {...errorMessageProps}>{errorMessage}</InputError>\n )}\n {description && (\n <Text as=\"div\" {...descriptionProps}>\n {description}\n </Text>\n )}\n </Flex>\n );\n}\n\nexport const TagGroupItem = Item;\n","export { ColorPicker } from \"./color-picker\";\nexport { ColorArea } from \"./color-area\";\nexport { ColorField } from \"./color-field\";\nexport { ColorSwatchPicker } from \"./color-swatch\";\nexport { ColorSlider } from \"./color-slider\";\nexport { parseColor } from \"./color.utils\";\n","import { ColorField, ColorArea, ColorSlider, ColorSwatchPicker } from \"./index\";\nimport * as React from \"react\";\nimport { Color, parseColor } from \"@react-stately/color\";\nimport { Flex } from \"../flex\";\nimport { NumberInput } from \"../input\";\nimport { Space } from \"../space\";\nimport { Select } from \"../select\";\nimport { Separator } from \"../separator\";\nimport { useControlledState } from \"../../hooks/use-controlled-state\";\nimport { StyleProps } from \"../../utils/types\";\n\ntype ColorPickerProps = StyleProps<\n \"wrapper\" | \"area\" | \"swatch\" | \"hue\" | \"alpha\"\n> & {\n onChange?: (color: Color) => void;\n color?: Color;\n};\n\nexport function ColorPicker({\n onChange,\n color: colorProp,\n styles,\n classNames,\n className,\n style,\n}: ColorPickerProps) {\n const [colorSpace, setColorSpace] = React.useState(\"hex\");\n\n const [color, setColor] = useControlledState(\n colorProp,\n parseColor(\"#BB66CC\").toFormat(\"hsla\"),\n onChange\n );\n\n function handleChange(color: Color) {\n setColor(color);\n onChange?.(color);\n }\n\n function setAlpha(alpha: number) {\n if (isNaN(alpha)) {\n return;\n }\n console.log(alpha);\n console.log(color);\n const newColor = color.withChannelValue(\"alpha\", alpha);\n setColor(newColor);\n console.log(newColor);\n }\n\n const [h, s, l] = color.getColorChannels();\n const rgbaColor = color.toFormat(\"rgba\");\n const [r, g, b] = rgbaColor.getColorChannels();\n return (\n <Flex stack style={{ width: 240 }}>\n <ColorArea\n onChange={handleChange}\n onChangeEnd={handleChange}\n xChannel={s}\n yChannel={l}\n value={color ?? parseColor(\"hsl(219, 79%, 66%)\")}\n style={{ width: \"100%\", height: 140 }}\n />\n <Flex stack style={{ padding: 8 }}>\n <Flex stack gap={\"2xs\"}>\n <ColorSlider\n value={color}\n onChange={handleChange}\n onChangeEnd={handleChange}\n channel={h}\n />\n <ColorSlider\n value={color}\n onChange={handleChange}\n onChangeEnd={handleChange}\n channel={\"alpha\"}\n />\n </Flex>\n <Flex stack>\n <Flex style={{ width: \"100%\" }} gap={\"3xs\"}>\n {colorSpace === \"hex\" && (\n <Space style={{ gap: 3 }} compact>\n <ColorField\n value={color}\n onChange={handleChange as any}\n size=\"sm\"\n style={{ width: \"60%\" }}\n appearance=\"filled\"\n placeholder=\"Add a color\"\n ></ColorField>\n <NumberInput\n onChange={(n) => setAlpha(n)}\n maxValue={1}\n formatOptions={{\n style: \"percent\",\n maximumFractionDigits: 0,\n }}\n size=\"sm\"\n value={color.getChannelValue(\"alpha\")}\n style={{ width: \"40%\" }}\n appearance=\"filled\"\n ></NumberInput>\n </Space>\n )}\n\n {[\"rgb\", \"hsl\"].includes(colorSpace) && (\n <Space style={{ gap: 3 }} compact>\n <NumberInput\n value={\n colorSpace === \"rgb\"\n ? rgbaColor.getChannelValue(r)\n : color.getChannelValue(h)\n }\n appearance=\"filled\"\n size=\"sm\"\n ></NumberInput>\n <NumberInput\n value={\n colorSpace === \"rgb\"\n ? rgbaColor.getChannelValue(g)\n : color.getChannelValue(s)\n }\n appearance=\"filled\"\n size=\"sm\"\n ></NumberInput>\n <NumberInput\n value={\n colorSpace === \"rgb\"\n ? rgbaColor.getChannelValue(b)\n : color.getChannelValue(l)\n }\n appearance=\"filled\"\n size=\"sm\"\n ></NumberInput>\n <NumberInput\n formatOptions={{\n style: \"percent\",\n maximumFractionDigits: 0,\n }}\n value={\n colorSpace === \"rgb\"\n ? rgbaColor.getChannelValue(\"alpha\")\n : color.getChannelValue(\"alpha\")\n }\n appearance=\"filled\"\n size=\"sm\"\n ></NumberInput>\n </Space>\n )}\n\n <Select\n style={{ width: \"60%\" }}\n valueKey=\"id\"\n onChange={(v) =>\n setColorSpace((v.target.value as string) ?? colorSpace)\n }\n showSelectionIndicator={false}\n value={colorSpace}\n size=\"sm\"\n appearance=\"filled\"\n items={[\"hex\", \"rgb\", \"hsl\"].map((o) => ({\n label: o.toUpperCase(),\n id: o,\n }))}\n ></Select>\n </Flex>\n\n <Separator color=\"gray\" />\n\n <Flex>\n <ColorSwatchPicker\n styles={{\n wrapper: { gap: 6 },\n swatch: {\n borderRadius: 5,\n },\n }}\n onChange={handleChange}\n colors={[\n \"#000000\",\n \"#333333\",\n \"#555555\",\n \"#777777\",\n \"#999999\",\n \"#bbbbbb\",\n \"#dddddd\",\n \"#ffffff\",\n \"#4455BB\",\n \"#1199EE\",\n \"#55CCFF\",\n \"#22CCDD\",\n \"#22AA99\",\n \"#66BB66\",\n \"#99CC66\",\n \"#CCDD33\",\n \"#7755CC\",\n \"#BB66CC\",\n \"#FF88AA\",\n \"#EE4444\",\n \"#FF7744\",\n \"#FFAA22\",\n \"#FFCC66\",\n \"#FFEE66\",\n ].map((color) => ({\n label: color,\n color: parseColor(color).toString(\"hsl\"),\n key: color,\n }))}\n />\n </Flex>\n </Flex>\n </Flex>\n </Flex>\n );\n}\n","import { useColorArea } from \"@react-aria/color\";\nimport {\n ColorAreaProps as AriaColorAreaProps,\n useColorAreaState,\n} from \"@react-stately/color\";\nimport * as React from \"react\";\nimport { BorderRadius, SizeOption } from \"../../utils/theme\";\nimport { cx } from \"../../utils/dom\";\nimport { StyleProps } from \"../../utils/types\";\nimport { useFocusRing } from \"react-aria\";\nimport { useTheme } from \"../theme\";\n\ntype ColorAreaProps = AriaColorAreaProps &\n StyleProps<\"wrapper\" | \"thumb\"> & {\n size?: SizeOption;\n radius?: BorderRadius;\n };\n\nexport function ColorArea({\n className,\n classNames,\n style,\n styles,\n radius,\n ...props\n}: ColorAreaProps) {\n const inputXRef = React.useRef(null);\n const inputYRef = React.useRef(null);\n const containerRef = React.useRef(null);\n\n const state = useColorAreaState(props);\n const { colorAreaProps, xInputProps, yInputProps, thumbProps } = useColorArea(\n { ...props, inputXRef, inputYRef, containerRef },\n state\n );\n\n const { focusProps, isFocusVisible } = useFocusRing();\n const theme = useTheme();\n\n return (\n <div\n {...colorAreaProps}\n ref={containerRef}\n style={{ ...colorAreaProps.style, ...styles?.wrapper, ...style }}\n className={cx(\"p-color-area\", className, classNames?.wrapper)}\n data-disabled={props.isDisabled}\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n >\n <div\n {...thumbProps}\n style={{ ...thumbProps.style, ...styles?.thumb }}\n className={cx(\"p-color-area-thumb\", classNames?.thumb)}\n data-focus-visible={isFocusVisible}\n data-color={state.getDisplayColor().toString(\"css\")}\n >\n <input {...xInputProps} ref={inputXRef} {...focusProps} />\n <input {...yInputProps} ref={inputYRef} {...focusProps} />\n </div>\n </div>\n );\n}\n","import { AriaColorFieldProps, useColorField } from \"@react-aria/color\";\nimport { useColorFieldState } from \"@react-stately/color\";\nimport * as React from \"react\";\nimport { cx } from \"../../utils/dom\";\nimport { Field, FieldComponentProps } from \"../form/field\";\n\ntype ColorFieldProps = AriaColorFieldProps & FieldComponentProps<\"input\">;\n\nexport function ColorField({\n label,\n description,\n className,\n classNames,\n style,\n styles,\n ...props\n}: ColorFieldProps) {\n const state = useColorFieldState(props);\n const inputRef = React.useRef<HTMLInputElement>(null);\n const { inputProps, labelProps, descriptionProps, errorMessageProps } =\n useColorField(\n { ...props, \"aria-label\": props[\"aria-label\"] ?? \"color-field\" },\n state,\n inputRef\n );\n\n return (\n <Field\n description={description}\n label={label}\n style={style}\n classNames={classNames}\n className={className}\n styles={styles}\n labelProps={{ ...labelProps }}\n descriptionProps={{ ...descriptionProps }}\n errorMessageProps={{ ...errorMessageProps }}\n {...props}\n >\n <input\n style={styles?.input}\n className={cx(classNames?.input, \"p-text-input-el\")}\n type=\"text\"\n ref={inputRef}\n {...inputProps}\n />\n </Field>\n );\n}\n","import { AriaColorSwatchProps, useColorSwatch } from \"@react-aria/color\";\nimport * as React from \"react\";\nimport { cx } from \"../../utils/dom\";\nimport { Flex, FlexProps } from \"../flex\";\nimport {\n Item,\n ItemProps,\n ListProps,\n ListState,\n Node,\n useListState,\n} from \"react-stately\";\nimport { useListBox, useOption } from \"react-aria\";\nimport { Color as AriaColor, parseColor } from \"@react-stately/color\";\nimport { StyleProps } from \"../../utils/types\";\nimport { BorderRadius, SizeOption } from \"../../utils/theme\";\nimport { useTheme } from \"../theme\";\n\ninterface ColorOption {\n key: string;\n color: string;\n label?: string;\n}\n\ntype ColorSwatchPickerProps<T> = FlexProps &\n ListProps<T> &\n StyleProps<\"wrapper\" | \"swatch\"> & {\n colors: Array<ColorOption>;\n onChange?: (color: AriaColor) => void;\n size?: SizeOption;\n radius?: BorderRadius;\n };\n\nexport function ColorSwatchPicker({\n colors,\n items,\n children,\n radius,\n size,\n onChange,\n selectionMode = \"single\",\n className,\n classNames,\n style,\n styles,\n ...props\n}: ColorSwatchPickerProps<ColorOption>) {\n items = colors;\n children = (item) => (\n <Color\n textValue={item.color}\n color={parseColor(item.color)}\n key={item.color}\n />\n );\n\n const listProps = {\n ...props,\n items,\n children,\n selectionMode,\n [\"aria-label\"]: \"color swatch picker\",\n onSelectionChange: (keys) => {\n const keysToArray = [...keys];\n onChange?.(parseColor(keysToArray[0] as string));\n props.onSelectionChange?.(keys);\n },\n } as ListProps<ColorOption>;\n\n const theme = useTheme();\n const wrapperRef = React.useRef(null);\n\n const listState = useListState(listProps);\n const { listBoxProps } = useListBox(listProps, listState, wrapperRef);\n\n const _colors = [...listState.collection];\n\n radius = radius ?? theme?.radius ?? \"md\";\n\n return (\n <SwatchProvider colors={colors} radius={radius} size={size} {...props}>\n <Flex\n style={{ ...style, ...styles?.wrapper }}\n className={cx(className, classNames?.wrapper)}\n wrap=\"wrap\"\n {...listBoxProps}\n ref={wrapperRef}\n >\n {_colors.map((color, index) => (\n <SwatchOption\n className={classNames?.swatch}\n style={styles?.swatch}\n key={index}\n state={listState}\n item={color}\n />\n ))}\n </Flex>\n </SwatchProvider>\n );\n}\n\ntype SwatchOptionProps = StyleProps & {\n item: Node<any>;\n state: ListState<any>;\n};\n\nexport function SwatchOption({\n item,\n state,\n style,\n className,\n}: SwatchOptionProps) {\n const ref = React.useRef(null);\n const {\n optionProps,\n isDisabled,\n isFocusVisible,\n isFocused,\n isPressed,\n isSelected,\n } = useOption({ key: item.key }, state, ref);\n\n const color = item.props.color;\n const ctx = useSwatchPickerContext();\n\n return (\n <ColorSwatch\n className={className}\n style={style}\n color={color}\n _ref={ref}\n data-disabled={isDisabled}\n data-selected={isSelected}\n data-focused={isFocused}\n data-focus-visible={isFocusVisible}\n data-pressed={isPressed}\n data-radius={ctx.radius}\n data-size={ctx.size}\n {...optionProps}\n ></ColorSwatch>\n );\n}\n\ntype ColorSwatchProps = AriaColorSwatchProps &\n StyleProps & {\n _ref?: React.RefObject<HTMLDivElement>;\n };\n\nfunction ColorSwatch({\n className,\n style,\n _ref,\n color: colorProp,\n ...props\n}: ColorSwatchProps) {\n const { colorSwatchProps, color } = useColorSwatch({\n ...props,\n color: colorProp,\n });\n return (\n <div\n {...props}\n ref={_ref}\n className={cx(\"p-color-swatch\", className)}\n {...colorSwatchProps}\n style={{\n ...colorSwatchProps.style,\n background: color.toString(\"css\"),\n ...style,\n }}\n >\n <div className=\"p-swatch-checkers\"></div>\n </div>\n );\n}\n\nconst SwatchPickerContext =\n React.createContext<ColorSwatchPickerProps<ColorOption> | null>(null);\nfunction SwatchProvider(\n props: React.PropsWithChildren<ColorSwatchPickerProps<ColorOption>>\n) {\n return (\n <SwatchPickerContext.Provider value={props}>\n {props.children}\n </SwatchPickerContext.Provider>\n );\n}\n\nfunction useSwatchPickerContext() {\n const ctx = React.useContext(SwatchPickerContext);\n if (!ctx) {\n throw new Error(\"SwatchPicker must be used within a SwatchPickerProvider\");\n }\n return ctx;\n}\n\nconst Color = Item as (\n props: Partial<ItemProps<ColorOption>> & { color: AriaColor }\n) => JSX.Element;\n","import { AriaColorSliderOptions, useColorSlider } from \"@react-aria/color\";\nimport { useColorSliderState } from \"@react-stately/color\";\nimport * as React from \"react\";\nimport { useFocusRing, useLocale } from \"react-aria\";\nimport { Field } from \"../form/field\";\n\ntype ColorSliderProps = Omit<AriaColorSliderOptions, \"trackRef\" | \"inputRef\">;\n\nexport function ColorSlider({ label, ...props }: ColorSliderProps) {\n const { locale } = useLocale();\n const state = useColorSliderState({ ...props, locale });\n const trackRef = React.useRef(null);\n const inputRef = React.useRef(null);\n\n const { labelProps, trackProps, thumbProps, inputProps } = useColorSlider(\n {\n ...props,\n label,\n \"aria-label\": props[\"aria-label\"] ?? \"color-slider\",\n inputRef,\n trackRef,\n },\n state\n );\n\n const { focusProps, isFocusVisible } = useFocusRing();\n\n return (\n <Field\n label={label}\n className=\"p-color-slider\"\n replaceDefaultControlWrapper\n labelProps={labelProps}\n >\n <div\n {...trackProps}\n data-focus-visible={isFocusVisible}\n data-bg={trackProps.style?.background}\n className=\"p-color-slider-track\"\n ref={trackRef}\n style={{\n ...trackProps.style,\n background: trackProps.style?.background,\n }}\n >\n <div className=\"p-color-slider-checkers\"></div>\n <div\n className=\"p-color-slider-thumb\"\n {...thumbProps}\n style={{\n ...thumbProps.style,\n background: state.getDisplayColor().toString(\"css\"),\n }}\n >\n <input ref={inputRef} {...inputProps} {...focusProps} />\n </div>\n </div>\n </Field>\n );\n}\n","import { parseColor as AriaParseColor } from \"@react-stately/color\";\n\nexport function parseColor(color: string) {\n // TODO: add support for rgba colors\n return AriaParseColor(color);\n}\n","export { Toggle, ToggleGroup } from \"./toggle-group\";\n","import * as React from \"react\";\nimport { StyleProps } from \"../../utils/types\";\nimport {\n CheckboxGroupProps,\n CheckboxGroupState,\n RadioGroupProps,\n RadioGroupState,\n useCheckboxGroupState,\n useRadioGroupState,\n} from \"react-stately\";\nimport {\n AriaCheckboxGroupItemProps,\n AriaRadioProps,\n VisuallyHidden,\n mergeProps,\n useCheckboxGroup,\n useCheckboxGroupItem,\n useFocusRing,\n useRadio,\n useRadioGroup,\n} from \"react-aria\";\nimport { cx } from \"../../utils/dom\";\nimport {\n BorderRadius,\n ButtonSize,\n Color,\n ColorVariant,\n SizeOption,\n} from \"../../utils/theme\";\nimport { useTheme } from \"../theme\";\nimport { Space, useSpace } from \"../space/space\";\nimport { ButtonToggleProps } from \"../button/button\";\nimport { Field } from \"../form/field\";\n\n// TODO: Figure out how to make this a whole lot simpler.\n// We can't call hooks conditionally\n// We don't want to have two separate components for single and multiple selection toggles\n\ntype Mode = \"single\" | \"multiple\";\ntype ValueType<M> = M extends \"single\" ? string : string[];\n\ntype CFGroupProps<P> = Omit<\n P,\n \"onChange\" | \"value\" | \"defaultValue\" | \"validate\"\n>;\n\ntype CFUnion = CFGroupProps<RadioGroupProps> | CFGroupProps<CheckboxGroupProps>;\n\ntype ToggleGroupContextValue = {\n state: RadioGroupState | CheckboxGroupState;\n mode: \"single\" | \"multiple\";\n props: GroupProps<CFUnion>;\n};\nconst ToggleGroupContext = React.createContext<ToggleGroupContextValue | null>(\n null\n);\n\ntype GroupProps<T> = StyleProps<\"wrapper\"> &\n ButtonToggleProps &\n T & {\n children?: React.ReactNode;\n radius?: BorderRadius;\n size?: ButtonSize;\n };\n\ntype ToggleGroupProps<M extends Mode> = GroupProps<CFUnion> & {\n mode?: M;\n} & React.ComponentProps<typeof Space>;\n\ntype ValueProps<M extends Mode> = {\n value?: ValueType<M>;\n defaultValue?: ValueType<M>;\n onChange?: (value: ValueType<M>) => void;\n validate?: (value: ValueType<M>) => void;\n};\n\nexport function ToggleGroup<M extends Mode = \"single\">({\n children,\n mode = \"single\" as M,\n value,\n defaultValue,\n onChange,\n validate,\n styles,\n classNames,\n className,\n style,\n ...props\n}: ToggleGroupProps<M> & ValueProps<M>) {\n const Wrapper = React.useMemo(() => {\n if (mode === \"single\") {\n return SingleSelectGroup;\n }\n\n return MultiSelectGroup;\n }, [mode]);\n\n props = { ...props } as CFUnion;\n\n return (\n <Field label={props.label} replaceDefaultControlWrapper>\n <Wrapper\n value={value as any}\n defaultValue={defaultValue as any}\n onChange={onChange as any}\n validate={validate as any}\n {...props}\n >\n <Space\n className={className}\n styles={styles}\n classNames={classNames}\n style={style}\n {...props}\n >\n {children}\n </Space>\n </Wrapper>\n </Field>\n );\n}\n\nfunction SingleSelectGroup({\n children,\n orientation = \"horizontal\",\n ...props\n}: GroupProps<RadioGroupProps>) {\n const state = useRadioGroupState(props);\n const { radioGroupProps } = useRadioGroup(\n { ...props, orientation, \"aria-label\": \"single toggle group\" },\n state\n );\n return (\n <div {...radioGroupProps}>\n <ToggleGroupContext.Provider value={{ state, mode: \"single\", props }}>\n {children}\n </ToggleGroupContext.Provider>\n </div>\n );\n}\n\nfunction MultiSelectGroup({\n children,\n ...props\n}: GroupProps<CheckboxGroupProps>) {\n const state = useCheckboxGroupState(props);\n const { groupProps } = useCheckboxGroup(\n { ...props, \"aria-label\": \"multiple toggle group\" },\n state\n );\n return (\n <div {...groupProps}>\n <ToggleGroupContext.Provider value={{ state, mode: \"multiple\", props }}>\n {children}\n </ToggleGroupContext.Provider>\n </div>\n );\n}\n\ntype SingleToggleProps<P> = P & {\n children: React.ReactNode;\n};\n\nfunction SingleToggle({ ...props }: SingleToggleProps<AriaRadioProps>) {\n const ctx = React.useContext(ToggleGroupContext);\n const state = ctx?.state as RadioGroupState;\n const ref = React.useRef(null);\n if (!ctx) {\n throw new Error(\"Toggle must be used within a ToggleGroup\");\n }\n\n const { focusProps, isFocusVisible } = useFocusRing();\n const isSelected = state.selectedValue === props.value;\n\n const { inputProps } = useRadio(props, ctx.state as RadioGroupState, ref);\n\n return (\n <ToggleButton isSelected={isSelected} isFocusVisible={isFocusVisible}>\n <VisuallyHidden>\n <input ref={ref} {...mergeProps(inputProps, focusProps)} />\n </VisuallyHidden>\n {props.children}\n </ToggleButton>\n );\n}\n\nfunction MultiToggle({\n ...props\n}: SingleToggleProps<AriaCheckboxGroupItemProps>) {\n const ctx = React.useContext(ToggleGroupContext);\n const state = ctx?.state as CheckboxGroupState;\n const ref = React.useRef(null);\n if (!ctx) {\n throw new Error(\"Toggle must be used within a ToggleGroup\");\n }\n\n const { focusProps, isFocusVisible } = useFocusRing();\n const isSelected = state.isSelected(props.value);\n\n const { inputProps } = useCheckboxGroupItem(\n props,\n ctx.state as CheckboxGroupState,\n ref\n );\n\n return (\n <ToggleButton isSelected={isSelected} isFocusVisible={isFocusVisible}>\n <VisuallyHidden>\n <input ref={ref} {...mergeProps(inputProps, focusProps)} />\n </VisuallyHidden>\n {props.children}\n </ToggleButton>\n );\n}\n\ntype ToggleProps = StyleProps<\"wrapper\"> &\n ButtonToggleProps & {\n value: string;\n children: React.ReactNode;\n color?: Color;\n variant?: ColorVariant;\n size?: SizeOption;\n radius?: BorderRadius;\n isIconButton?: boolean;\n };\n\nconst ToggleContext = React.createContext<{ props: ToggleProps } | null>(null);\n\nexport function Toggle({ ...props }: ToggleProps) {\n const ctx = React.useContext(ToggleGroupContext);\n if (!ctx) {\n throw new Error(\"Toggle must be used within a ToggleGroup\");\n }\n\n const Wrapper = React.useMemo(() => {\n if (ctx?.mode === \"single\") {\n return SingleToggle;\n }\n\n return MultiToggle;\n }, [ctx?.mode]);\n\n return (\n <ToggleContext.Provider value={{ props }}>\n <Wrapper value={props.value}>{props.children}</Wrapper>\n </ToggleContext.Provider>\n );\n}\n\nfunction ToggleButton({\n children,\n isFocusVisible,\n isSelected,\n ...props\n}: {\n children: React.ReactNode;\n isSelected?: boolean;\n isFocusVisible?: boolean;\n}) {\n const ctx = React.useContext(ToggleContext)?.props;\n const groupCtx = React.useContext(ToggleGroupContext);\n\n if (!ctx || !groupCtx) {\n throw new Error(\"Toggle must be used within a ToggleGroup\");\n }\n\n const theme = useTheme();\n const space = useSpace();\n const idleColor = ctx.idleColor ?? groupCtx.props.idleColor ?? \"gray\";\n const activeColor =\n ctx.activeColor ?? groupCtx.props.activeColor ?? theme?.color ?? \"gray\";\n const idleVariant = ctx.idleVariant ?? groupCtx.props.idleVariant ?? \"light\";\n const activeVariant =\n ctx.activeVariant ?? groupCtx.props.activeVariant ?? \"solid\";\n const color = isSelected ? activeColor : idleColor;\n const variant = isSelected ? activeVariant : idleVariant;\n const radius = ctx.radius ?? groupCtx.props.radius ?? \"full\";\n const size = ctx.size ?? groupCtx.props.size ?? \"md\";\n\n return (\n <label\n data-icon-button={ctx.isIconButton}\n data-is-toggle={true}\n data-radius={radius}\n data-color={color}\n data-variant={variant}\n className={cx(\n \"p-button\",\n ctx.className,\n ctx.classNames?.wrapper,\n `size-${size}`,\n space.classNames\n )}\n data-selected={isSelected}\n data-focus-visible={isFocusVisible}\n {...props}\n >\n {children}\n </label>\n );\n}\n"],"names":[],"version":3,"file":"module.js.map"}
|