@parrot-co/parrot-ui 0.0.93 → 0.0.95

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.map CHANGED
@@ -1 +1 @@
1
- {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AIAO,SAAS,0CAAS,KAAc;IACrC,OAAO,OAAO,UAAU;AAC1B;AAEO,SAAS,0CAAQ,KAAc;IACpC,OAAO,UAAU,QAAQ,MAAM,QAAQ;AACzC;AAEO,SAAS,0CAAa,KAAqB;IAChD,OAAO,0CAAQ,UAAU,MAAM,WAAW;AAC5C;AAEO,SAAS,0CAAS,KAAa;IACpC,OACE,AAAC,CAAA,OAAO,UAAU,YAAY,OAAO,UAAU,UAAS,KACxD,CAAC,MAAM,QAAQ,UACf,UAAU;AAEd;AAEO,SAAS,0CAAc,KAAa;IACzC,OAAO,0CAAS,UAAU,OAAO,KAAK,OAAO,WAAW;AAC1D;AAEO,SAAS,0CAAoB,KAAa;IAC/C,OACE,OAAO,OAAO,OAAO,OAAO,CAAC;QAC3B,OAAO,UAAU,MAAM,UAAU,aAAa,UAAU;IAC1D,GAAG,SAAS;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,OAAO;QACX,MAAO,IAAI,MAAM,OAAQ;YACvB,MAAM,SAAS,wCAAkB,KAAK,CAAC,IAAI;YAC3C,IAAI,QAAQ;gBACV,QAAS,CAAA,QAAQ,GAAE;gBACnB,QAAQ,CAAC,EAAE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Q;4BACR,WAAU;;;;;YAIf,uBAAS,gCAAC,CAAA,GAAA,wCAAS;0BAAG;;;;AAG7B;;;;","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/components/flex/index.ts","src/components/flex/flex.tsx","src/components/input/index.ts","src/components/input/input.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/popover/index.ts","src/components/popover/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/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/utils/helpers.ts","src/utils/theme.ts","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/tabs/index.ts","src/components/tabs/tabs.tsx","src/components/switch/index.ts","src/components/switch/switch.tsx","src/components/color-tray/index.ts","src/components/color-tray/color-tray.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/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"],"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\";\n// TODO will be cool to export a single namespaced object eg. `DropdownMenu`, `DropdownMenu.Trigger`, `DropdownMenu.MenuItem`, etc.\nexport { DropdownMenu } from \"./components/dropdown-menu\";\nexport { ComboBox } from \"./components/combo-box\";\nexport { Radio, RadioGroup, RadioCard } from \"./components/radio\";\nexport { Select } from \"./components/select\";\nexport { Option, Section } 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 { Root, Item } from \"./components/tabs\";\nexport { Tag } from \"./components/tag\";\nexport { Switch } from \"./components/switch\";\nexport { ColorTray } from \"./components/color-tray\";\nexport { IconTray } from \"./components/icon-tray\";\nexport { Sticker } from \"./components/sticker\";\nexport { TabObject as Tabs } 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 { ThemeProvider, useTheme } from \"./components/theme\";\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","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\";\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 extends React.ComponentProps<typeof Box> {\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 = React.forwardRef<\n HTMLDivElement,\n GridProps & AsProps<\"div\">\n>(\n (\n { columns = 12, gap, gapX, gapY, align, justify, as, className, ...props },\n ref\n ) => {\n return (\n <Box\n as={as}\n ref={ref}\n className={cx({\n \"p-grid\": true,\n \"display-grid\": true,\n [`columns-${columns}`]: !!columns,\n [`gap-${gap}`]: !!gap,\n [`column-gap-${gapX}`]: !!gapX,\n [`row-gap-${gapY}`]: !!gapY,\n [`flex-align-${align}`]: !!align,\n [`flex-justify-${justify}`]: !!justify,\n [`${className}`]: !!className,\n })}\n {...props}\n ></Box>\n );\n }\n);\n\nGrid.displayName = \"Grid\";\n\ninterface GridItemProps extends React.ComponentProps<typeof Box> {\n colSpan?: Columns;\n}\n\nexport const GridItem = React.forwardRef<\n HTMLDivElement,\n GridItemProps & AsProps<\"div\">\n>(({ colSpan = 1, as, className, ...props }, ref) => {\n return (\n <Box\n as={as}\n stretchX\n className={cx({\n \"p-grid-item\": true,\n [`col-span-${colSpan}`]: !!colSpan,\n [`${className}`]: !!className,\n })}\n ref={ref}\n {...props}\n ></Box>\n );\n});\n\nGridItem.displayName = \"GridItem\";\n","export { Flex } from \"./flex\";\nexport type { FlexProps } from \"./flex\";\n","import * as React from \"react\";\nimport { Box } from \"../box\";\nimport { cx } from \"../../utils/dom\";\nimport {\n AlignItemsType,\n FlexDirectionType,\n JustifyContentType,\n SizeOption,\n} from \"../../utils/theme\";\nimport { BoxProps } from \"../box/box\";\nimport { AsProps } from \"../../utils/types\";\n\nexport interface FlexProps extends BoxProps {\n justify?: JustifyContentType;\n align?: AlignItemsType;\n direction?: FlexDirectionType;\n gap?: SizeOption;\n columnGap?: SizeOption;\n rowGap?: 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 getDirection = React.useCallback(() => {\n if (stack) {\n return \"column\";\n }\n\n return direction || \"row\";\n }, [stack, direction]);\n\n return (\n <Box\n className={cx({\n [`${className}`]: !!className,\n [inline ? \"display-inline-flex\" : \"display-flex\"]: true,\n [`flex-justify-${justify}`]: !!justify,\n [`flex-align-${align}`]: !!align,\n [`flex-direction-${getDirection()}`]: !!getDirection(),\n [`gap-${gap}`]: !!gap,\n [`column-gap-${columnGap}`]: !!columnGap,\n [`row-gap-${rowGap}`]: !!rowGap,\n [`flex-${wrap}`]: !!wrap,\n })}\n // TODO - Fix types here - seems to work just fine though\n ref={ref as any}\n {...(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 { Flex } from \"../flex\";\nimport { AriaTextFieldOptions, useTextField } from \"react-aria\";\nimport { InputLabel } from \"../input-label\";\nimport { InputError } from \"../input-error\";\nimport { Text } from \"../text\";\nimport { useSpace } from \"../space/space\";\nimport { cx, mergeRefs } from \"../../utils/dom\";\nimport { BorderRadius, Color, InputAppearance } from \"../../utils/theme\";\nimport { useTheme } from \"../theme\";\nimport { StyleProps } from \"../../utils/types\";\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 appearance?: InputAppearance;\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n color?: Color;\n radius?: BorderRadius;\n};\n\nexport interface ExtendedInputProps\n extends Omit<AriaTextFieldOptions<\"input\">, \"size\">,\n InputProps,\n StyleProps {\n _someProp?: string;\n}\n\nexport type InputVariantProps = Pick<\n InputProps,\n \"appearance\" | \"size\" | \"color\" | \"shape\"\n>;\n\nexport const Input = React.forwardRef<HTMLDivElement, ExtendedInputProps>(\n (\n {\n label,\n error,\n color = \"gray\",\n appearance = \"outline\",\n size = \"sm\",\n append,\n prepend,\n description,\n isDisabled,\n validationStatus,\n className,\n inputRef,\n radius,\n style,\n ...props\n },\n ref\n ) => {\n const space = useSpace();\n\n const internalInputRef = React.useRef<HTMLInputElement>(null);\n\n const { labelProps, inputProps, errorMessageProps, descriptionProps } =\n useTextField(\n {\n ...props,\n inputElementType: \"input\",\n label,\n description,\n isDisabled: isDisabled as boolean,\n },\n internalInputRef\n );\n\n const theme = useTheme();\n\n return (\n <Flex\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 )}\n stack\n ref={ref}\n gap={\"3xs\"}\n stretchX\n style={style}\n >\n {label && (\n <InputLabel color={color} {...labelProps}>\n {label}\n </InputLabel>\n )}\n\n <Flex\n className={cx(space.classNames, \"p-input-control\")}\n data-has-error={!!error}\n data-appearance={appearance}\n stretchX\n inline\n position=\"relative\"\n >\n {prepend && <Flex className=\"add-on add-on-left\">{prepend}</Flex>}\n <input\n ref={mergeRefs(internalInputRef, inputRef)}\n data-has-left-addon={!!prepend}\n data-has-right-addon={!!append}\n className={cx(\"p-text-input-el\")}\n {...inputProps}\n />\n {append && <Flex className=\"add-on add-on-right\">{append}</Flex>}\n </Flex>\n\n {description && (\n <Text\n as=\"div\"\n variant=\"light\"\n color=\"gray\"\n size=\"sm\"\n lineHeight={\"base\"}\n {...descriptionProps}\n >\n {description}\n </Text>\n )}\n\n {error && (\n <InputError\n validationStatus={validationStatus}\n {...errorMessageProps}\n >\n {error}\n </InputError>\n )}\n </Flex>\n );\n }\n);\n\nInput.displayName = \"Input\";\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 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 } from \"../../utils/types\";\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?: 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 [`text-highlight`]: !!highlight,\n \"p-text\": true,\n [`text-size-${size}`]: !!size,\n [`text-weight-${weight}`]: !!weight,\n [`text-align-${align}`]: !!align,\n [`text-line-height-${lineHeight}`]: !!lineHeight,\n [`text-transform-${textCase}`]: !!textCase,\n [`${className}`]: !!className,\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 } from \"../flex\";\nimport { ConditionalClassNameObject, cx } from \"../../utils/dom\";\nimport { SizeOption } from \"../../utils/theme\";\n\nconst SpaceContext = React.createContext<{\n classNames: ConditionalClassNameObject;\n compactItemWrapperAdjust: string;\n}>({ classNames: {}, compactItemWrapperAdjust: \"\" });\n\nexport interface SpaceProps extends React.ComponentProps<typeof Flex> {\n compact?: boolean;\n gap?: SizeOption;\n className?: string;\n}\n\nfunction SpaceComponent(\n {\n children,\n compact,\n gap,\n className,\n ...props\n }: React.PropsWithChildren<SpaceProps>,\n ref: React.ForwardedRef<HTMLDivElement>\n) {\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 const realGap = compact ? \"none\" : gap;\n\n return (\n <Flex\n data-compact={compact}\n className={cx([className, \"p-space\"])}\n ref={ref}\n gap={realGap}\n {...props}\n >\n {nodes}\n </Flex>\n );\n}\n\nexport const Space = React.forwardRef(SpaceComponent);\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, ...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 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 { HiMinus, HiPlus } from \"react-icons/hi\";\nimport { useNumberFieldState } from \"react-stately\";\nimport { AriaNumberFieldProps, useNumberField, useLocale } from \"react-aria\";\nimport { InputLabel } from \"../input-label\";\nimport { InputError } from \"../input-error\";\nimport { Text } from \"../text\";\nimport { InputProps } from \"./input\";\nimport { useTheme } from \"../theme\";\nimport { StyleProps } from \"../../utils/types\";\n\ninterface NumberInputProps\n extends InputProps,\n AriaNumberFieldProps,\n StyleProps {\n showSteppers?: boolean;\n}\n\n// TODO - add support for `append` and `prepend` props\n// TODO - format stepper buttons\n\nexport const NumberInput = React.forwardRef<HTMLDivElement, NumberInputProps>(\n (props, ref) => {\n const {\n appearance = \"outline\",\n size = \"md\",\n color = \"gray\",\n className,\n append,\n prepend,\n placeholder,\n showSteppers = false,\n radius,\n ...rest\n } = props;\n\n const space = useSpace();\n const internalInputRef = React.useRef<HTMLInputElement>(null);\n\n const { locale } = useLocale();\n const state = useNumberFieldState({ ...rest, locale });\n const {\n errorMessageProps,\n descriptionProps,\n labelProps,\n groupProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n } = useNumberField(rest, state, internalInputRef);\n\n const theme = useTheme();\n\n return (\n <Flex\n stack\n gap=\"3xs\"\n ref={ref}\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n data-color={color}\n data-size={size}\n stretchX\n className={cx(\"p-input-group\", space.compactItemWrapperAdjust)}\n >\n {rest.label && <InputLabel {...labelProps}>{rest.label}</InputLabel>}\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 >\n <HiMinus size={20} />\n </IconButton>\n )}\n <input\n ref={mergeRefs(internalInputRef, ref)}\n placeholder={placeholder}\n className={cx(\n \"p-input-control\",\n \"space-item\",\n className,\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 >\n <HiPlus />\n </IconButton>\n )}\n </Flex>\n\n {rest.description && (\n <Text\n weight=\"regular\"\n size=\"sm\"\n color=\"gray\"\n variant=\"light\"\n lineHeight=\"base\"\n {...descriptionProps}\n as={\"div\"}\n >\n {rest.description}\n </Text>\n )}\n\n {rest.error && (\n <InputError {...errorMessageProps}>{rest.error}</InputError>\n )}\n </Flex>\n );\n }\n);\n\nNumberInput.displayName = \"NumberInput\";\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, 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 { useToggleState } from \"react-stately\";\nimport {\n Color,\n ColorVariant,\n BorderRadius,\n ButtonAppearance,\n ButtonSize,\n} from \"../../utils/theme\";\nimport { useTheme } from \"../theme/theme-provider\";\n\nexport interface ButtonToggleProps {\n isToggle?: boolean;\n idleColor?: Color;\n idleVariant?: ColorVariant;\n activeColor?: Color;\n activeVariant?: ColorVariant;\n}\n\nexport type ButtonProps = AriaButtonProps<\"button\" | \"div\" | \"a\"> &\n ButtonToggleProps & {\n append?: React.ReactNode;\n prepend?: React.ReactNode;\n as?: React.ElementType;\n isLoading?: boolean;\n className?: string;\n isIconButton?: boolean;\n color?: Color;\n variant?: ColorVariant;\n size?: ButtonSize;\n radius?: BorderRadius;\n isSelected?: boolean;\n defaultSelected?: boolean;\n appearance?: ButtonAppearance;\n role?: string;\n style?: React.CSSProperties;\n form?: string;\n };\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 = \"violet\",\n activeVariant = \"solid\",\n idleColor = \"gray\",\n idleVariant = \"outline\",\n isIconButton,\n style,\n ...otherProps\n } = { ...buttonGroupProps, ...props };\n\n const state = useToggleState({\n ...otherProps,\n });\n\n const buttonRef = React.useRef(null);\n const { buttonProps, isPressed } = useToggleButton(\n { ...otherProps, elementType: as },\n state,\n buttonRef\n );\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}\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-size={size}\n className={cx(className, \"p-button\", space.classNames)}\n ref={mergeRefs(ref, buttonRef)}\n form={otherProps.form}\n {...(buttonProps as Omit<typeof buttonProps, \"color\">)}\n >\n {prepend}\n <span\n style={{ padding: isIconButton ? undefined : \"0 6px\", lineHeight: 0 }}\n >\n {children}\n </span>\n {isLoading ? (\n <Loader style={{ marginLeft: 8 }} color=\"inherit\" size={\"xs\"} />\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\";\n\nconst ButtonGroupContext = React.createContext<ButtonGroupProps>({});\n\ninterface ButtonGroupProps\n extends Pick<\n ButtonProps,\n | \"color\"\n | \"variant\"\n | \"size\"\n | \"radius\"\n | \"idleColor\"\n | \"idleVariant\"\n | \"activeColor\"\n | \"activeVariant\"\n | \"isToggle\"\n > {\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}: 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 gap={gap} compact={compact}>\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, ExtendedInputProps } from \"./input\";\nimport { HiEye } from \"react-icons/hi\";\n\nexport const PasswordInput = React.forwardRef<\n HTMLDivElement,\n ExtendedInputProps\n>((props, ref) => {\n const [showPassword, setShowPassword] = React.useState(false);\n\n return (\n <Input\n ref={ref}\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\nPasswordInput.displayName = \"PasswordInput\";\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 { InputProps } from \"../input/input\";\nimport { useTheme } from \"../theme\";\n\ninterface TextareaProps extends AriaTextFieldOptions<\"textarea\">, InputProps {\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 {description && (\n <Text\n lineHeight={\"base\"}\n {...descriptionProps}\n variant={\"light\"}\n as=\"div\"\n size={\"sm\"}\n >\n {description}\n </Text>\n )}\n {error && <InputError {...errorMessageProps}>{error}</InputError>}\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\";\n\nexport interface CheckboxVariantProps {\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 ...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 className={cx(className, \"p-checkbox\")}\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 data-color={resolvedColor}\n data-radius={getRadius()}\n className=\"p-fake-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 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 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 { Popover } from \"../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}\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 <li className=\"p-list-separator\" {...separatorProps} />\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 {Popover} from './popover'","import * as React from \"react\";\nimport { AriaPopoverProps, Overlay, usePopover } from \"react-aria\";\nimport { OverlayTriggerState } from \"react-stately\";\nimport { useTheme } from \"../theme/theme-provider\";\nimport { mergeRefs } from \"../../utils/dom\";\n\ninterface PopoverProps extends Omit<AriaPopoverProps, \"popoverRef\"> {\n state: OverlayTriggerState;\n children: React.ReactNode;\n popoverRef?: React.RefObject<HTMLDivElement>;\n}\n\nexport function Popover({\n state,\n children,\n popoverRef,\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 return (\n <Overlay>\n <div {...underlayProps} className=\"underlay\"></div>\n <div\n data-color={theme?.color}\n data-radius={theme?.radius}\n {...popoverProps}\n ref={mergeRefs(popoverRef, internalPopoverRef)}\n className=\"p-popover\"\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 { InputProps } from \"../input/input\";\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 { Popover } from \"../popover\";\nimport { ListBox } from \"../list-box\";\nimport { cx } from \"../../utils/dom\";\nimport { StyleProps } from \"../../utils/types\";\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\";\n\ninterface ComboBoxProps<T>\n extends InputProps,\n StyleProps,\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, Option, Section } from \"./list-box\";\n","import * as React from \"react\";\nimport {\n AriaListBoxOptions,\n AriaListBoxSectionProps,\n AriaOptionProps,\n useListBox,\n useListBoxSection,\n useOption,\n} from \"react-aria\";\nimport {\n Item,\n ListState,\n Node,\n useListState,\n Section as AriaSection,\n} from \"react-stately\";\nimport { CollectionChildren, ID } from \"../../utils/types\";\nimport { Text } from \"../text\";\nimport { Flex } from \"../flex\";\nimport { renderListBoxContent } from \"./list-box.utils\";\nimport { Color } from \"../../utils/theme\";\nimport { omit } from \"../../utils/object\";\nimport { HiCheck } from \"react-icons/hi\";\nimport { ListBoxProvider, useListBoxContext } from \"./list-box-provider\";\nimport { useTheme } from \"../theme\";\nimport { mergeRefs } from \"../../utils/dom\";\n\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 renderOption?: (item: T) => React.ReactNode;\n getSectionLabel?: (item: T) => React.ReactNode;\n getSectionItems?: (item: T) => T[];\n state?: ListState<T>;\n color?: Color;\n width?: number | string;\n showSeparator?: boolean;\n showSelectedMarker?: boolean;\n}\n\nexport interface ListBoxProps<T>\n extends AriaListBoxOptions<T>,\n ListBoxRenderProps<T> {\n __parrotKey?: ID;\n\n listBoxRef?: React.RefObject<HTMLUListElement>;\n}\n\nexport function ListBox({\n state,\n color,\n width = 300,\n showSelectedMarker = true,\n listBoxRef,\n ...props\n}: ListBoxProps<any>) {\n const internalState = useListState({\n ...props,\n children: renderListBoxContent(props),\n });\n const listRef = React.useRef(null);\n const listState = state || internalState;\n const { listBoxProps } = useListBox(props, listState, listRef);\n\n const options = [...listState.collection];\n\n const theme = useTheme();\n\n return (\n <ListBoxProvider {...props} showSelectedMarker={showSelectedMarker}>\n <Flex\n data-color={color ?? theme?.color ?? \"gray\"}\n style={{ width: width, minWidth: 300 }}\n stack\n gap=\"md\"\n >\n <Flex\n as=\"ul\"\n stack\n gap=\"none\"\n className=\"p-list-box-wrapper\"\n ref={mergeRefs(listRef, listBoxRef)}\n data-radius=\"lg\"\n {...listBoxProps}\n >\n {/* {props.label && (\n <Text size=\"sm\" variant=\"light\" as=\"div\" {...labelProps}>\n {props.label}\n </Text>\n )} */}\n {options.length === 0 && (\n <Flex justify=\"center\" align=\"center\" style={{ height: 50 }}>\n <Text color=\"gray\" variant=\"light\" align=\"center\">\n No Options\n </Text>\n </Flex>\n )}\n {options.map((item) => {\n return item.type === \"section\" ? (\n <ListSection section={item} state={listState} key={item.key} />\n ) : (\n <ListOption state={listState} item={item} key={item.key} />\n );\n })}\n </Flex>\n </Flex>\n </ListBoxProvider>\n );\n}\n\ninterface OptionProps<T> extends AriaOptionProps {\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 listBoxContext = useListBoxContext();\n\n return (\n <li\n className=\"p-list-option\"\n data-disabled={isDisabled}\n data-focus-visible={isFocusVisible}\n data-focused={isFocused}\n data-pressed={isPressed}\n data-selected={isSelected}\n {...optionProps}\n {...(omit(item.props, [\"textValue\"]) as any)} // TODO test this to make sure it can't be abused by consumers of this library.\n ref={optionRef}\n >\n {item.rendered}\n {isSelected && listBoxContext.props.showSelectedMarker && (\n <HiCheck className=\"selected-marker\" />\n )}\n </li>\n );\n}\n\ninterface ListSectionProps<T> extends AriaListBoxSectionProps {\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 function getChildren() {\n if (state.collection.getChildren) {\n return [...state.collection.getChildren(section.key)];\n }\n\n return [];\n }\n\n return (\n <Flex gap=\"sm\" stack className=\"p-list-section\">\n {section.key !== state.collection.getFirstKey() &&\n listBoxContext.props.showSeparator && (\n <li className=\"p-list-separator\"></li>\n )}\n <Flex gap={\"none\"} stack as=\"li\" {...itemProps}>\n {section.rendered && (\n <div className=\"p-list-section-header\">\n <Text\n weight=\"regular\"\n size=\"xs\"\n as=\"div\"\n variant=\"light\"\n {...headingProps}\n >\n {section.rendered}\n </Text>\n </div>\n )}\n <ul {...groupProps}>\n {getChildren().map((node) => {\n return <ListOption item={node} key={node.key} state={state} />;\n })}\n </ul>\n </Flex>\n </Flex>\n );\n}\n\nexport const Option = Item;\nexport const Section = AriaSection;\n","import * as React from \"react\";\nimport { Section, Option, ListBoxProps } from \"./list-box\";\n\nexport function renderListBoxContent<T>({\n children,\n renderOption,\n valueKey,\n sectionKey,\n getSectionLabel,\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\"];\n const sectionChildren = (item as any)?.[sectionKey ?? \"children\"] ?? [];\n\n if ((item as any)?.[sectionKey]) {\n return (\n <Section\n items={sectionChildren}\n key={value}\n title={getSectionLabel?.(item)}\n >\n {(item) => (\n <Option\n textValue={(item as any)?.[labelKey ?? \"label\"]}\n key={(item as any)?.[valueKey ?? \"id\"]}\n >\n {(item as any)?.[labelKey ?? \"label\"] ??\n renderOption?.(item as T)}\n </Option>\n )}\n </Section>\n );\n }\n\n return (\n <Option textValue={label} key={(item as any)?.[valueKey ?? \"id\"]}>\n {renderOption?.(item) ?? label}\n </Option>\n );\n };\n }\n}\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 context = React.useContext(ListBoxContext);\n if (!context) {\n throw new Error(\n \"ListBox components must be rendered within the ListBoxProvider\"\n );\n }\n\n return context;\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 { InputVariantProps } from \"../input/input\";\n\nexport interface RadioProps\n extends AriaRadioProps,\n Pick<InputVariantProps, \"appearance\" | \"color\"> {\n className?: string;\n style?: React.CSSProperties;\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\";\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 { InputVariantProps } from \"../input/input\";\n\nexport interface RadioCardProps\n extends AriaRadioProps,\n Pick<InputVariantProps, \"appearance\" | \"color\"> {\n title?: React.ReactNode;\n description?: React.ReactNode;\n children?: React.ReactNode;\n showIndicator?: boolean;\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-fake-radio\"\n data-size=\"sm\"\n data-checked={inputProps.checked}\n />\n )}\n <Flex 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\";\n","import * as React from \"react\";\nimport { ListBox } from \"../list-box\";\nimport { InputLabel } from \"../input-label\";\nimport { Flex } from \"../flex\";\nimport { cx } from \"../../utils/dom\";\nimport { HiSelector, HiX } from \"react-icons/hi\";\nimport { useListState, useMenuTriggerState } from \"react-stately\";\nimport { HiddenSelect, useMenuTrigger, usePress } from \"react-aria\";\nimport { ListBoxProps } from \"../list-box/list-box\";\nimport { renderListBoxContent } from \"../list-box/list-box.utils\";\nimport { Tag } from \"../tag\";\nimport { getRandomColor } from \"../../utils/helpers\";\nimport { Text } from \"../text\";\nimport { Box } from \"../box\";\nimport { Popover } from \"../popover\";\nimport { useTheme } from \"../theme/theme-provider\";\nimport { InputProps } from \"../input/input\";\nimport { Color } from \"../../utils/theme\";\nimport { useSpace } from \"../space/space\";\nimport { ID, StyleProps } from \"../../utils/types\";\nimport { isArray } from \"../../utils/assertions\";\nimport { InputError } from \"../input-error\";\n\ntype SingleOrMultipleValue = ID | Array<ID>;\ninterface MockNativeOnChangeEvent {\n target: {\n value: SingleOrMultipleValue;\n name?: string;\n };\n}\nexport interface SelectProps<T>\n extends ListBoxProps<T>,\n InputProps,\n StyleProps {\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}\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 defaultValue,\n onChange,\n ...props\n}: SelectProps<T>) {\n const isMultiple = selectionMode === \"multiple\";\n\n function getValue(value?: SingleOrMultipleValue) {\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 }\n\n function onSelectionChange(selectedKeys: any) {\n onChange?.({\n target: {\n value: isMultiple ? selectedKeys : selectedKeys[0],\n name: props.name,\n },\n });\n }\n\n const space = useSpace();\n const [isFocused, setIsFocused] = React.useState(false);\n const triggerState = useMenuTriggerState({});\n const listState = useListState({\n ...props,\n selectedKeys: getValue(value),\n defaultSelectedKeys: getValue(defaultValue),\n selectionMode: selectionMode,\n children: renderListBoxContent(props),\n onSelectionChange(keys) {\n onSelectionChange([...keys]);\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\n const { menuTriggerProps } = 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 function content() {\n if (selectedItems.length === 0) {\n return (\n <Text color={color} variant=\"lighter\">\n {props.placeholder}\n </Text>\n );\n }\n\n if (isMultiple) {\n return (\n <Flex gap=\"3xs\" wrap=\"wrap\">\n {selectedItems.map((item) => (\n <Tag\n append={<HiX />}\n color={getRandomColor(item?.textValue ?? \"\")}\n key={item?.key}\n >\n {item?.textValue}\n </Tag>\n ))}\n </Flex>\n );\n }\n\n return (\n <Text\n variant=\"default\"\n color={color === \"gray\" ? \"black\" : color}\n className=\"single-value\"\n >\n {renderValue?.(selectedItems[0]?.value) ??\n selectedItems[0]?.value?.[props.labelKey ?? \"label\"] ??\n selectedItems[0]?.textValue}\n </Text>\n );\n }\n\n return (\n <Box as=\"span\" position=\"relative\" stretchX>\n {selectionMode === \"single\" && (\n // Implement a hidden select element to allow for native form submission\n // should work for both single and multiple selection modes\n <HiddenSelect\n triggerRef={triggerRef}\n label={label}\n name={props.name}\n state={{\n selectedItem: selectedItems[0] as any,\n selectedKey: selectedItems[0]?.key as any,\n setSelectedKey: (key) =>\n listState.selectionManager.setSelectedKeys([\n key,\n ] as Iterable<React.Key>),\n isFocused: isFocused,\n setFocused: setIsFocused,\n ...listState,\n ...triggerState,\n }}\n isDisabled={props.isDisabled}\n ></HiddenSelect>\n )}\n <Flex\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n gap=\"3xs\"\n stack\n className={cx(\n \"p-input-group\",\n className,\n space.compactItemWrapperAdjust\n )}\n data-size={size}\n data-color={color ?? \"gray\"}\n >\n {label && <InputLabel color={color}>{label}</InputLabel>}\n <div\n data-selection-mode={selectionMode}\n tabIndex={0}\n role=\"button\"\n ref={triggerRef}\n color=\"gray\"\n className={cx(\"p-input-control\", \"p-select\", space.classNames)}\n data-appearance={appearance}\n {...triggerProps}\n >\n {content()}\n <HiSelector className=\"selector\" size={18} />\n </div>\n {error && <InputError>{error}</InputError>}\n {description && (\n <Text as=\"div\" variant=\"light\" color=\"gray\" size=\"sm\">\n {description}\n </Text>\n )}\n </Flex>\n {triggerState.isOpen && (\n <Popover\n placement=\"bottom start\"\n offset={4}\n shouldUpdatePosition\n triggerRef={triggerRef}\n state={triggerState}\n >\n <ListBox\n label={label}\n showSeparator={props.showSeparator}\n showSelectedMarker={props.showSelectedMarker}\n width={triggerRef.current?.getBoundingClientRect().width}\n color={listBoxColor ?? \"gray\"}\n shouldFocusOnHover\n state={listState}\n {...props}\n />\n </Popover>\n )}\n </Box>\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","import { supportedColors } from \"./theme\";\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","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 { 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 { CalendarDate, DateValue, parseDate } from \"@internationalized/date\";\nimport { Popover } from \"../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 { InputProps } from \"../input/input\";\nimport { useTheme } from \"../theme\";\n\nexport interface DateInputProps\n extends Omit<\n AriaDatePickerProps<DateValue>,\n \"value\" | \"onChange\" | \"defaultValue\"\n >,\n InputProps {\n numberOfMonths?: number;\n value?: string;\n defaultValue?: string;\n onChange?(value: string, dateObject?: DateValue): 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) : undefined,\n defaultValue: defaultValue ? parseDate(defaultValue) : undefined,\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 type { DateSegment } from \"react-stately\";\nimport { Text } from \"../text\";\nimport { mergeRefs } from \"../../utils/dom\";\nimport { InputVariantProps } from \"../input/input\";\n\ninterface DateFieldProps\n extends AriaDatePickerProps<DateValue>,\n InputVariantProps {\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: DateSegment;\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 { InputVariantProps } from \"../input/input\";\nimport { Color } from \"../../utils/theme\";\n\ninterface CalendarProps\n extends AriaCalendarProps<DateValue>,\n InputVariantProps {\n numberOfMonths?: number;\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 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 <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 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 } 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/theme-provider\";\n\ntype AvatarSize = \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\";\n\ntype AvatarShape = \"circle\" | \"square\";\n\nexport interface AvatarProps extends React.ComponentProps<\"div\"> {\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 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 = \"square\",\n className,\n ...props\n },\n ref\n ) => {\n const [imageError, setImageError] = React.useState(false);\n const theme = useTheme();\n\n function getAvatarRadius(): BorderRadius {\n if (theme?.avatarRadiusSize && shape !== \"circle\") {\n return theme.avatarRadiusSize;\n }\n\n if (shape === \"circle\") {\n return \"full\";\n }\n\n return \"md\";\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 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 <span>{name.charAt(0)}</span>;\n }\n\n return children;\n };\n\n return (\n <div\n className={cx([\"p-avatar\", className])}\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 type { 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","import { Item, Root } from \"./tabs\";\n\nexport const TabObject = {\n Item: Item,\n Root: Root,\n};\n\nexport { Root, Item } 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\";\n\nexport interface TabsProps extends AriaTabListProps<any> {\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nconst Tabs = React.forwardRef<HTMLDivElement, TabsProps>(\n ({ ...props }, ref) => {\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 data-color={theme?.color ?? \"violet\"}\n position={\"relative\"}\n ref={ref}\n className=\"p-tabs\"\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);\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 Root = Tabs;\nexport const Item = AriaItem;\n\nTabs.displayName = \"Tabs\";\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 {ColorTray} from './color-tray';","import * as React from \"react\";\n\nexport function ColorTray(props: any) {\n return <div></div>;\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<HTMLDivElement, StickerProps>(\n (\n {\n variant = \"outline\",\n color = \"violet\",\n padded = true,\n gap = \"sm\",\n radius,\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 ></Flex>\n );\n }\n);\n\nSticker.displayName = \"Sticker\";\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\";\n\nexport interface ModalProps extends AriaModalOverlayProps {\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 ...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=\"p-modal-content\"\n data-variant={variant}\n style={{ minWidth: width }}\n ref={dialogRef}\n {...dialogProps}\n >\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 <IconButton\n color=\"gray\"\n onPress={handleClose}\n variant=\"ghost\"\n size=\"sm\"\n >\n <HiX size={18} />\n </IconButton>\n )}\n </Flex>\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 { InputProps } from \"../input/input\";\nimport { borderRadiusShapeMap } from \"../../utils/theme\";\nimport { useTheme } from \"../theme\";\n\ninterface TagField extends InputProps {\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"],"names":[],"version":3,"file":"main.js.map"}
1
+ {"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AIAO,SAAS,0CAAS,KAAc;IACrC,OAAO,OAAO,UAAU;AAC1B;AAEO,SAAS,0CAAQ,KAAc;IACpC,OAAO,UAAU,QAAQ,MAAM,QAAQ;AACzC;AAEO,SAAS,0CAAa,KAAqB;IAChD,OAAO,0CAAQ,UAAU,MAAM,W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iCAAC,CAAA,GAAA,yCAAG;QACF,cAAY;QACZ,eAAa,UAAU,OAAO,UAAU;QACxC,aAAW;QACX,WAAU;QACV,KAAK;QACL,KAAK;;YAEJ,uBAAS,gCAAC,CAAA,GAAA,wCAAS;0BAAG;;0BACvB,iCAAC;gBACC,WAAU;gBACV,gBAAc;gBACd,SAAS;gBACT,mBAAiB;;oBAEhB,OAAO,IAAI,CAAC;wBACX,OAAO,0BACL,gCAAC;sCAAkB,YAAY,OAAO;2BAA3B,uBAEX,gCAAC,CAAA,GAAA,yCAAE;4BACD,SAAS;4BACT,OAAO;4BACP,OAAO;4BACP,MAAM;4BACN,sBACE,gCAAC,CAAA,GAAA,yCAAS;gCACR,SAAS;gCACT,OAAO;gCACP,QAAQ;gCACR,OAAO;oCAAE,YAAY;gCAAE;gCACvB,SAAS;oCACP,SAAS;gCACX;gCACA,MAAM;0CAEN,cAAA,gCAAC,CAAA,GAAA,uBAAE;oCAAE,MAAM;;;sCAKd;2BAFI;oBAKX;kCAEA,gCAAC,CAAA,GAAA,yCAAE;wBACD,OAAO;4BACL,OAAO;wBACT;wBACA,WAAU;kCAEV,cAAA,gCAAC;4BACC,KAAK;4BACL,aAAa,kBAAkB,cAAc;4BAC7C,WAAW;4BACX,OAAO;4BACP,UAAU;4BACV,SAAS;4BACT,QAAQ;4BACR,WAAU;;;;;YAIf,uBAAS,gCAAC,CAAA,GAAA,wCAAS;0BAAG;;;;AAG7B;;;;","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/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/popover/index.ts","src/components/popover/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/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/tabs/index.ts","src/components/tabs/tabs.tsx","src/components/switch/index.ts","src/components/switch/switch.tsx","src/components/color-tray/index.ts","src/components/color-tray/color-tray.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/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"],"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\";\n// TODO will be cool to export a single namespaced object eg. `DropdownMenu`, `DropdownMenu.Trigger`, `DropdownMenu.MenuItem`, etc.\nexport { DropdownMenu } from \"./components/dropdown-menu\";\nexport { ComboBox } from \"./components/combo-box\";\nexport { Radio, RadioGroup, RadioCard } from \"./components/radio\";\nexport { Select } from \"./components/select\";\nexport { Option, Section } 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 { Root, Item } from \"./components/tabs\";\nexport { Tag } from \"./components/tag\";\nexport { Switch } from \"./components/switch\";\nexport { ColorTray } from \"./components/color-tray\";\nexport { IconTray } from \"./components/icon-tray\";\nexport { Sticker } from \"./components/sticker\";\nexport { TabObject as Tabs } 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 { ThemeProvider, useTheme } from \"./components/theme\";\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","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 { supportedColors } from \"./theme\";\nimport { ResponsiveProp, Breakpoints } from \"./types\";\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 } 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 `flex-${wrap}`,\n `flex-justify-${justify}`,\n `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 {...(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 { Flex } from \"../flex\";\nimport { AriaTextFieldOptions, useTextField } from \"react-aria\";\nimport { InputLabel } from \"../input-label\";\nimport { InputError } from \"../input-error\";\nimport { Text } from \"../text\";\nimport { useSpace } from \"../space/space\";\nimport { cx, mergeRefs } from \"../../utils/dom\";\nimport { BorderRadius, Color, InputAppearance } from \"../../utils/theme\";\nimport { useTheme } from \"../theme\";\nimport { StyleProps } from \"../../utils/types\";\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 appearance?: InputAppearance;\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n color?: Color;\n radius?: BorderRadius;\n};\n\nexport interface ExtendedInputProps\n extends Omit<AriaTextFieldOptions<\"input\">, \"size\">,\n InputProps,\n StyleProps {\n _someProp?: string;\n}\n\nexport type InputVariantProps = Pick<\n InputProps,\n \"appearance\" | \"size\" | \"color\" | \"shape\"\n>;\n\nexport const Input = React.forwardRef<HTMLDivElement, ExtendedInputProps>(\n (\n {\n label,\n error,\n color = \"gray\",\n appearance = \"outline\",\n size = \"sm\",\n append,\n prepend,\n description,\n isDisabled,\n validationStatus,\n className,\n inputRef,\n radius,\n style,\n ...props\n },\n ref\n ) => {\n const space = useSpace();\n\n const internalInputRef = React.useRef<HTMLInputElement>(null);\n\n const { labelProps, inputProps, errorMessageProps, descriptionProps } =\n useTextField(\n {\n ...props,\n inputElementType: \"input\",\n label,\n description,\n isDisabled: isDisabled as boolean,\n },\n internalInputRef\n );\n\n const theme = useTheme();\n\n return (\n <Flex\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 )}\n stack\n ref={ref}\n gap={\"3xs\"}\n stretchX\n style={style}\n >\n {label && (\n <InputLabel color={color} {...labelProps}>\n {label}\n </InputLabel>\n )}\n\n <Flex\n className={cx(space.classNames, \"p-input-control\")}\n data-has-error={!!error}\n data-appearance={appearance}\n stretchX\n inline\n position=\"relative\"\n >\n {prepend && <Flex className=\"add-on add-on-left\">{prepend}</Flex>}\n <input\n ref={mergeRefs(internalInputRef, inputRef)}\n data-has-left-addon={!!prepend}\n data-has-right-addon={!!append}\n className={cx(\"p-text-input-el\")}\n {...inputProps}\n />\n {append && <Flex className=\"add-on add-on-right\">{append}</Flex>}\n </Flex>\n\n {description && (\n <Text\n as=\"div\"\n variant=\"light\"\n color=\"gray\"\n size=\"sm\"\n lineHeight={\"base\"}\n {...descriptionProps}\n >\n {description}\n </Text>\n )}\n\n {error && (\n <InputError\n validationStatus={validationStatus}\n {...errorMessageProps}\n >\n {error}\n </InputError>\n )}\n </Flex>\n );\n }\n);\n\nInput.displayName = \"Input\";\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 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 } from \"../../utils/types\";\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?: 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 [`text-highlight`]: !!highlight,\n \"p-text\": true,\n [`text-size-${size}`]: !!size,\n [`text-weight-${weight}`]: !!weight,\n [`text-align-${align}`]: !!align,\n [`text-line-height-${lineHeight}`]: !!lineHeight,\n [`text-transform-${textCase}`]: !!textCase,\n [`${className}`]: !!className,\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 } from \"../flex\";\nimport { ConditionalClassNameObject, cx } from \"../../utils/dom\";\nimport { SizeOption } from \"../../utils/theme\";\n\nconst SpaceContext = React.createContext<{\n classNames: ConditionalClassNameObject;\n compactItemWrapperAdjust: string;\n}>({ classNames: {}, compactItemWrapperAdjust: \"\" });\n\nexport interface SpaceProps extends React.ComponentProps<typeof Flex> {\n compact?: boolean;\n gap?: SizeOption;\n className?: string;\n}\n\nfunction SpaceComponent(\n {\n children,\n compact,\n gap,\n className,\n ...props\n }: React.PropsWithChildren<SpaceProps>,\n ref: React.ForwardedRef<HTMLDivElement>\n) {\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 const realGap = compact ? \"none\" : gap;\n\n return (\n <Flex\n data-compact={compact}\n className={cx([className, \"p-space\"])}\n ref={ref}\n gap={realGap}\n {...props}\n >\n {nodes}\n </Flex>\n );\n}\n\nexport const Space = React.forwardRef(SpaceComponent);\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 { HiMinus, HiPlus } from \"react-icons/hi\";\nimport { useNumberFieldState } from \"react-stately\";\nimport { AriaNumberFieldProps, useNumberField, useLocale } from \"react-aria\";\nimport { InputLabel } from \"../input-label\";\nimport { InputError } from \"../input-error\";\nimport { Text } from \"../text\";\nimport { InputProps } from \"./input\";\nimport { useTheme } from \"../theme\";\nimport { StyleProps } from \"../../utils/types\";\n\ninterface NumberInputProps\n extends InputProps,\n AriaNumberFieldProps,\n StyleProps {\n showSteppers?: boolean;\n}\n\n// TODO - add support for `append` and `prepend` props\n// TODO - format stepper buttons\n\nexport const NumberInput = React.forwardRef<HTMLDivElement, NumberInputProps>(\n (props, ref) => {\n const {\n appearance = \"outline\",\n size = \"md\",\n color = \"gray\",\n className,\n append,\n prepend,\n placeholder,\n showSteppers = false,\n radius,\n ...rest\n } = props;\n\n const space = useSpace();\n const internalInputRef = React.useRef<HTMLInputElement>(null);\n\n const { locale } = useLocale();\n const state = useNumberFieldState({ ...rest, locale });\n const {\n errorMessageProps,\n descriptionProps,\n labelProps,\n groupProps,\n inputProps,\n incrementButtonProps,\n decrementButtonProps,\n } = useNumberField(rest, state, internalInputRef);\n\n const theme = useTheme();\n\n return (\n <Flex\n stack\n gap=\"3xs\"\n ref={ref}\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n data-color={color}\n data-size={size}\n stretchX\n className={cx(\"p-input-group\", space.compactItemWrapperAdjust)}\n >\n {rest.label && <InputLabel {...labelProps}>{rest.label}</InputLabel>}\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 >\n <HiMinus size={20} />\n </IconButton>\n )}\n <input\n ref={mergeRefs(internalInputRef, ref)}\n placeholder={placeholder}\n className={cx(\n \"p-input-control\",\n \"space-item\",\n className,\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 >\n <HiPlus />\n </IconButton>\n )}\n </Flex>\n\n {rest.description && (\n <Text\n weight=\"regular\"\n size=\"sm\"\n color=\"gray\"\n variant=\"light\"\n lineHeight=\"base\"\n {...descriptionProps}\n as={\"div\"}\n >\n {rest.description}\n </Text>\n )}\n\n {rest.error && (\n <InputError {...errorMessageProps}>{rest.error}</InputError>\n )}\n </Flex>\n );\n }\n);\n\nNumberInput.displayName = \"NumberInput\";\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, 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 { useToggleState } from \"react-stately\";\nimport {\n Color,\n ColorVariant,\n BorderRadius,\n ButtonAppearance,\n ButtonSize,\n} from \"../../utils/theme\";\nimport { useTheme } from \"../theme/theme-provider\";\nimport { ResponsiveProp } from \"../../utils/types\";\nimport { breakpointClassNames } from \"../../utils/helpers\";\n\nexport interface ButtonToggleProps {\n isToggle?: boolean;\n idleColor?: Color;\n idleVariant?: ColorVariant;\n activeColor?: Color;\n activeVariant?: ColorVariant;\n}\n\nexport type ButtonProps = AriaButtonProps<\"button\" | \"div\" | \"a\"> &\n ButtonToggleProps & {\n append?: React.ReactNode;\n prepend?: React.ReactNode;\n as?: React.ElementType;\n isLoading?: boolean;\n className?: string;\n isIconButton?: boolean;\n color?: Color;\n variant?: ColorVariant;\n size?: ResponsiveProp<ButtonSize>;\n radius?: BorderRadius;\n isSelected?: boolean;\n defaultSelected?: boolean;\n appearance?: ButtonAppearance;\n role?: string;\n style?: React.CSSProperties;\n form?: string;\n };\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 = \"violet\",\n activeVariant = \"solid\",\n idleColor = \"gray\",\n idleVariant = \"outline\",\n isIconButton,\n style,\n ...otherProps\n } = { ...buttonGroupProps, ...props };\n\n const state = useToggleState({\n ...otherProps,\n });\n\n const buttonRef = React.useRef(null);\n const { buttonProps, isPressed } = useToggleButton(\n { ...otherProps, elementType: as },\n state,\n buttonRef\n );\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}\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 className={cx(\n breakpointClassNames(\"size\", size),\n className,\n \"p-button\",\n space.classNames\n )}\n ref={mergeRefs(ref, buttonRef)}\n form={otherProps.form}\n {...(buttonProps as Omit<typeof buttonProps, \"color\">)}\n >\n {prepend}\n <span\n style={{ padding: isIconButton ? undefined : \"0 6px\", lineHeight: 0 }}\n >\n {children}\n </span>\n {isLoading ? (\n <Loader style={{ marginLeft: 8 }} color=\"inherit\" size={\"xs\"} />\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\";\n\nconst ButtonGroupContext = React.createContext<ButtonGroupProps>({});\n\ninterface ButtonGroupProps\n extends Pick<\n ButtonProps,\n | \"color\"\n | \"variant\"\n | \"size\"\n | \"radius\"\n | \"idleColor\"\n | \"idleVariant\"\n | \"activeColor\"\n | \"activeVariant\"\n | \"isToggle\"\n > {\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}: 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 gap={gap} compact={compact}>\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, ExtendedInputProps } from \"./input\";\nimport { HiEye } from \"react-icons/hi\";\n\nexport const PasswordInput = React.forwardRef<\n HTMLDivElement,\n ExtendedInputProps\n>((props, ref) => {\n const [showPassword, setShowPassword] = React.useState(false);\n\n return (\n <Input\n ref={ref}\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\nPasswordInput.displayName = \"PasswordInput\";\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 { InputProps } from \"../input/input\";\nimport { useTheme } from \"../theme\";\n\ninterface TextareaProps extends AriaTextFieldOptions<\"textarea\">, InputProps {\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 {description && (\n <Text\n lineHeight={\"base\"}\n {...descriptionProps}\n variant={\"light\"}\n as=\"div\"\n size={\"sm\"}\n >\n {description}\n </Text>\n )}\n {error && <InputError {...errorMessageProps}>{error}</InputError>}\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\";\n\nexport interface CheckboxVariantProps {\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 ...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 className={cx(className, \"p-checkbox\")}\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 data-color={resolvedColor}\n data-radius={getRadius()}\n className=\"p-fake-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 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 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 { Popover } from \"../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}\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 {Popover} from './popover'","import * as React from \"react\";\nimport { AriaPopoverProps, Overlay, usePopover } from \"react-aria\";\nimport { OverlayTriggerState } from \"react-stately\";\nimport { useTheme } from \"../theme/theme-provider\";\nimport { mergeRefs } from \"../../utils/dom\";\n\ninterface PopoverProps extends Omit<AriaPopoverProps, \"popoverRef\"> {\n state: OverlayTriggerState;\n children: React.ReactNode;\n popoverRef?: React.RefObject<HTMLDivElement>;\n}\n\nexport function Popover({\n state,\n children,\n popoverRef,\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 return (\n <Overlay>\n <div {...underlayProps} className=\"underlay\"></div>\n <div\n data-color={theme?.color}\n data-radius={theme?.radius}\n {...popoverProps}\n ref={mergeRefs(popoverRef, internalPopoverRef)}\n className=\"p-popover\"\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 { InputProps } from \"../input/input\";\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 { Popover } from \"../popover\";\nimport { ListBox } from \"../list-box\";\nimport { cx } from \"../../utils/dom\";\nimport { StyleProps } from \"../../utils/types\";\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\";\n\ninterface ComboBoxProps<T>\n extends InputProps,\n StyleProps,\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, Option, Section } from \"./list-box\";\n","import * as React from \"react\";\nimport {\n AriaListBoxOptions,\n AriaListBoxSectionProps,\n AriaOptionProps,\n useListBox,\n useListBoxSection,\n useOption,\n} from \"react-aria\";\nimport {\n Item,\n ListState,\n Node,\n useListState,\n Section as AriaSection,\n} from \"react-stately\";\nimport { CollectionChildren, ID } from \"../../utils/types\";\nimport { Text } from \"../text\";\nimport { Flex } from \"../flex\";\nimport { renderListBoxContent } from \"./list-box.utils\";\nimport { Color } from \"../../utils/theme\";\nimport { omit } from \"../../utils/object\";\nimport { HiCheck } from \"react-icons/hi\";\nimport { ListBoxProvider, useListBoxContext } from \"./list-box-provider\";\nimport { useTheme } from \"../theme\";\nimport { mergeRefs } from \"../../utils/dom\";\n\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 renderOption?: (item: T) => React.ReactNode;\n getSectionLabel?: (item: T) => React.ReactNode;\n getSectionItems?: (item: T) => T[];\n state?: ListState<T>;\n color?: Color;\n width?: number | string;\n showSeparator?: boolean;\n showSelectedMarker?: boolean;\n}\n\nexport interface ListBoxProps<T>\n extends AriaListBoxOptions<T>,\n ListBoxRenderProps<T> {\n __parrotKey?: ID;\n\n listBoxRef?: React.RefObject<HTMLUListElement>;\n}\n\nexport function ListBox({\n state,\n color,\n width = 300,\n showSelectedMarker = true,\n listBoxRef,\n ...props\n}: ListBoxProps<any>) {\n const internalState = useListState({\n ...props,\n children: renderListBoxContent(props),\n });\n const listRef = React.useRef(null);\n const listState = state || internalState;\n const { listBoxProps } = useListBox(props, listState, listRef);\n\n const options = [...listState.collection];\n\n const theme = useTheme();\n\n return (\n <ListBoxProvider {...props} showSelectedMarker={showSelectedMarker}>\n <Flex\n data-color={color ?? theme?.color ?? \"gray\"}\n style={{ width: width, minWidth: 300 }}\n stack\n gap=\"md\"\n >\n <Flex\n as=\"ul\"\n stack\n gap=\"none\"\n className=\"p-list-box-wrapper\"\n ref={mergeRefs(listRef, listBoxRef)}\n data-radius=\"lg\"\n {...listBoxProps}\n >\n {/* {props.label && (\n <Text size=\"sm\" variant=\"light\" as=\"div\" {...labelProps}>\n {props.label}\n </Text>\n )} */}\n {options.length === 0 && (\n <Flex justify=\"center\" align=\"center\" style={{ height: 50 }}>\n <Text color=\"gray\" variant=\"light\" align=\"center\">\n No Options\n </Text>\n </Flex>\n )}\n {options.map((item) => {\n return item.type === \"section\" ? (\n <ListSection section={item} state={listState} key={item.key} />\n ) : (\n <ListOption state={listState} item={item} key={item.key} />\n );\n })}\n </Flex>\n </Flex>\n </ListBoxProvider>\n );\n}\n\ninterface OptionProps<T> extends AriaOptionProps {\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 listBoxContext = useListBoxContext();\n\n return (\n <li\n className=\"p-list-option\"\n data-disabled={isDisabled}\n data-focus-visible={isFocusVisible}\n data-focused={isFocused}\n data-pressed={isPressed}\n data-selected={isSelected}\n {...optionProps}\n {...(omit(item.props, [\"textValue\"]) as any)} // TODO test this to make sure it can't be abused by consumers of this library.\n ref={optionRef}\n >\n {item.rendered}\n {isSelected && listBoxContext.props.showSelectedMarker && (\n <HiCheck className=\"selected-marker\" />\n )}\n </li>\n );\n}\n\ninterface ListSectionProps<T> extends AriaListBoxSectionProps {\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 function getChildren() {\n if (state.collection.getChildren) {\n return [...state.collection.getChildren(section.key)];\n }\n\n return [];\n }\n\n return (\n <Flex gap=\"sm\" stack className=\"p-list-section\">\n {section.key !== state.collection.getFirstKey() &&\n listBoxContext.props.showSeparator && (\n <li className=\"p-list-separator\"></li>\n )}\n <Flex gap={\"none\"} stack as=\"li\" {...itemProps}>\n {section.rendered && (\n <div className=\"p-list-section-header\">\n <Text\n weight=\"regular\"\n size=\"xs\"\n as=\"div\"\n variant=\"light\"\n {...headingProps}\n >\n {section.rendered}\n </Text>\n </div>\n )}\n <ul {...groupProps}>\n {getChildren().map((node) => {\n return <ListOption item={node} key={node.key} state={state} />;\n })}\n </ul>\n </Flex>\n </Flex>\n );\n}\n\nexport const Option = Item;\nexport const Section = AriaSection;\n","import * as React from \"react\";\nimport { Section, Option, ListBoxProps } from \"./list-box\";\n\nexport function renderListBoxContent<T>({\n children,\n renderOption,\n valueKey,\n sectionKey,\n getSectionLabel,\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\"];\n const sectionChildren = (item as any)?.[sectionKey ?? \"children\"] ?? [];\n\n if ((item as any)?.[sectionKey]) {\n return (\n <Section\n items={sectionChildren}\n key={value}\n title={getSectionLabel?.(item)}\n >\n {(item) => (\n <Option\n textValue={(item as any)?.[labelKey ?? \"label\"]}\n key={(item as any)?.[valueKey ?? \"id\"]}\n >\n {(item as any)?.[labelKey ?? \"label\"] ??\n renderOption?.(item as T)}\n </Option>\n )}\n </Section>\n );\n }\n\n return (\n <Option textValue={label} key={(item as any)?.[valueKey ?? \"id\"]}>\n {renderOption?.(item) ?? label}\n </Option>\n );\n };\n }\n}\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 context = React.useContext(ListBoxContext);\n if (!context) {\n throw new Error(\n \"ListBox components must be rendered within the ListBoxProvider\"\n );\n }\n\n return context;\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 { InputVariantProps } from \"../input/input\";\n\nexport interface RadioProps\n extends AriaRadioProps,\n Pick<InputVariantProps, \"appearance\" | \"color\"> {\n className?: string;\n style?: React.CSSProperties;\n size?: \"xs\" | \"sm\" | \"md\" | \"lg\";\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 { InputVariantProps } from \"../input/input\";\n\nexport interface RadioCardProps\n extends AriaRadioProps,\n Pick<InputVariantProps, \"appearance\" | \"color\"> {\n title?: React.ReactNode;\n description?: React.ReactNode;\n children?: React.ReactNode;\n showIndicator?: boolean;\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-fake-radio\"\n data-size=\"sm\"\n data-checked={inputProps.checked}\n />\n )}\n <Flex 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\";\n","import * as React from \"react\";\nimport { ListBox } from \"../list-box\";\nimport { InputLabel } from \"../input-label\";\nimport { Flex } from \"../flex\";\nimport { cx } from \"../../utils/dom\";\nimport { HiSelector, HiX } from \"react-icons/hi\";\nimport { useListState, useMenuTriggerState } from \"react-stately\";\nimport { HiddenSelect, useMenuTrigger, usePress } from \"react-aria\";\nimport { ListBoxProps } from \"../list-box/list-box\";\nimport { renderListBoxContent } from \"../list-box/list-box.utils\";\nimport { Tag } from \"../tag\";\nimport { getRandomColor } from \"../../utils/helpers\";\nimport { Text } from \"../text\";\nimport { Box } from \"../box\";\nimport { Popover } from \"../popover\";\nimport { useTheme } from \"../theme/theme-provider\";\nimport { InputProps } from \"../input/input\";\nimport { Color } from \"../../utils/theme\";\nimport { useSpace } from \"../space/space\";\nimport { ID, StyleProps } from \"../../utils/types\";\nimport { isArray } from \"../../utils/assertions\";\nimport { InputError } from \"../input-error\";\n\ntype SingleOrMultipleValue = ID | Array<ID>;\ninterface MockNativeOnChangeEvent {\n target: {\n value: SingleOrMultipleValue;\n name?: string;\n };\n}\nexport interface SelectProps<T>\n extends ListBoxProps<T>,\n InputProps,\n StyleProps {\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}\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 defaultValue,\n onChange,\n ...props\n}: SelectProps<T>) {\n const isMultiple = selectionMode === \"multiple\";\n\n function getValue(value?: SingleOrMultipleValue) {\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 }\n\n function onSelectionChange(selectedKeys: any) {\n onChange?.({\n target: {\n value: isMultiple ? selectedKeys : selectedKeys[0],\n name: props.name,\n },\n });\n }\n\n const space = useSpace();\n const [isFocused, setIsFocused] = React.useState(false);\n const triggerState = useMenuTriggerState({});\n const listState = useListState({\n ...props,\n selectedKeys: getValue(value),\n defaultSelectedKeys: getValue(defaultValue),\n selectionMode: selectionMode,\n children: renderListBoxContent(props),\n onSelectionChange(keys) {\n onSelectionChange([...keys]);\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\n const { menuTriggerProps } = 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 function content() {\n if (selectedItems.length === 0) {\n return (\n <Text color={color} variant=\"lighter\">\n {props.placeholder}\n </Text>\n );\n }\n\n if (isMultiple) {\n return (\n <Flex gap=\"3xs\" wrap=\"wrap\">\n {selectedItems.map((item) => (\n <Tag\n append={<HiX />}\n color={getRandomColor(item?.textValue ?? \"\")}\n key={item?.key}\n >\n {item?.textValue}\n </Tag>\n ))}\n </Flex>\n );\n }\n\n return (\n <Text\n variant=\"default\"\n color={color === \"gray\" ? \"black\" : color}\n className=\"single-value\"\n >\n {renderValue?.(selectedItems[0]?.value) ??\n selectedItems[0]?.value?.[props.labelKey ?? \"label\"] ??\n selectedItems[0]?.textValue}\n </Text>\n );\n }\n\n return (\n <Box as=\"span\" position=\"relative\" stretchX>\n {selectionMode === \"single\" && (\n // Implement a hidden select element to allow for native form submission\n // should work for both single and multiple selection modes\n <HiddenSelect\n triggerRef={triggerRef}\n label={label}\n name={props.name}\n state={{\n selectedItem: selectedItems[0] as any,\n selectedKey: selectedItems[0]?.key as any,\n setSelectedKey: (key) =>\n listState.selectionManager.setSelectedKeys([\n key,\n ] as Iterable<React.Key>),\n isFocused: isFocused,\n setFocused: setIsFocused,\n ...listState,\n ...triggerState,\n }}\n isDisabled={props.isDisabled}\n ></HiddenSelect>\n )}\n <Flex\n data-radius={radius ?? theme?.radius ?? \"lg\"}\n gap=\"3xs\"\n stack\n className={cx(\n \"p-input-group\",\n className,\n space.compactItemWrapperAdjust\n )}\n data-size={size}\n data-color={color ?? \"gray\"}\n >\n {label && <InputLabel color={color}>{label}</InputLabel>}\n <div\n data-selection-mode={selectionMode}\n tabIndex={0}\n role=\"button\"\n ref={triggerRef}\n color=\"gray\"\n className={cx(\"p-input-control\", \"p-select\", space.classNames)}\n data-appearance={appearance}\n {...triggerProps}\n >\n {content()}\n <HiSelector className=\"selector\" size={18} />\n </div>\n {error && <InputError>{error}</InputError>}\n {description && (\n <Text as=\"div\" variant=\"light\" color=\"gray\" size=\"sm\">\n {description}\n </Text>\n )}\n </Flex>\n {triggerState.isOpen && (\n <Popover\n placement=\"bottom start\"\n offset={4}\n shouldUpdatePosition\n triggerRef={triggerRef}\n state={triggerState}\n >\n <ListBox\n label={label}\n showSeparator={props.showSeparator}\n showSelectedMarker={props.showSelectedMarker}\n width={triggerRef.current?.getBoundingClientRect().width}\n color={listBoxColor ?? \"gray\"}\n shouldFocusOnHover\n state={listState}\n {...props}\n />\n </Popover>\n )}\n </Box>\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 { CalendarDate, DateValue, parseDate } from \"@internationalized/date\";\nimport { Popover } from \"../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 { InputProps } from \"../input/input\";\nimport { useTheme } from \"../theme\";\n\nexport interface DateInputProps\n extends Omit<\n AriaDatePickerProps<DateValue>,\n \"value\" | \"onChange\" | \"defaultValue\"\n >,\n InputProps {\n numberOfMonths?: number;\n value?: string;\n defaultValue?: string;\n onChange?(value: string, dateObject?: DateValue): 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) : undefined,\n defaultValue: defaultValue ? parseDate(defaultValue) : undefined,\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 type { DateSegment } from \"react-stately\";\nimport { Text } from \"../text\";\nimport { mergeRefs } from \"../../utils/dom\";\nimport { InputVariantProps } from \"../input/input\";\n\ninterface DateFieldProps\n extends AriaDatePickerProps<DateValue>,\n InputVariantProps {\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: DateSegment;\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 { InputVariantProps } from \"../input/input\";\nimport { Color } from \"../../utils/theme\";\n\ninterface CalendarProps\n extends AriaCalendarProps<DateValue>,\n InputVariantProps {\n numberOfMonths?: number;\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 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 <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 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 } 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/theme-provider\";\n\ntype AvatarSize = \"2xs\" | \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\" | \"2xl\" | \"3xl\";\n\ntype AvatarShape = \"circle\" | \"square\";\n\nexport interface AvatarProps extends React.ComponentProps<\"div\"> {\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 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 = \"square\",\n className,\n ...props\n },\n ref\n ) => {\n const [imageError, setImageError] = React.useState(false);\n const theme = useTheme();\n\n function getAvatarRadius(): BorderRadius {\n if (theme?.avatarRadiusSize && shape !== \"circle\") {\n return theme.avatarRadiusSize;\n }\n\n if (shape === \"circle\") {\n return \"full\";\n }\n\n return \"md\";\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 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 <span>{name.charAt(0)}</span>;\n }\n\n return children;\n };\n\n return (\n <div\n className={cx([\"p-avatar\", className])}\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 type { 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","import { Item, Root } from \"./tabs\";\n\nexport const TabObject = {\n Item: Item,\n Root: Root,\n};\n\nexport { Root, Item } 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\";\n\nexport interface TabsProps extends AriaTabListProps<any> {\n orientation?: \"horizontal\" | \"vertical\";\n}\n\nconst Tabs = React.forwardRef<HTMLDivElement, TabsProps>(\n ({ ...props }, ref) => {\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 data-color={theme?.color ?? \"violet\"}\n position={\"relative\"}\n ref={ref}\n className=\"p-tabs\"\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);\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 Root = Tabs;\nexport const Item = AriaItem;\n\nTabs.displayName = \"Tabs\";\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 {ColorTray} from './color-tray';","import * as React from \"react\";\n\nexport function ColorTray(props: any) {\n return <div></div>;\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<HTMLDivElement, StickerProps>(\n (\n {\n variant = \"outline\",\n color = \"violet\",\n padded = true,\n gap = \"sm\",\n radius,\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 ></Flex>\n );\n }\n);\n\nSticker.displayName = \"Sticker\";\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 <IconButton\n color=\"gray\"\n onPress={handleClose}\n variant=\"ghost\"\n size=\"sm\"\n >\n <HiX size={18} />\n </IconButton>\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 { InputProps } from \"../input/input\";\nimport { borderRadiusShapeMap } from \"../../utils/theme\";\nimport { useTheme } from \"../theme\";\n\ninterface TagField extends InputProps {\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"],"names":[],"version":3,"file":"main.js.map"}