@marigold/components 0.2.0 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +294 -0
- package/dist/ActionGroup/ActionGroup.d.ts +1 -2
- package/dist/ActionGroup/ActionGroup.stories.d.ts +5 -0
- package/dist/Alert/Alert.d.ts +10 -13
- package/dist/Alert/Alert.stories.d.ts +5 -0
- package/dist/Badge/Badge.d.ts +5 -0
- package/dist/Badge/Badge.stories.d.ts +5 -0
- package/dist/Box.d.ts +2 -0
- package/dist/Button/Button.d.ts +5 -0
- package/dist/Button/Button.stories.d.ts +5 -0
- package/dist/Card/Card.d.ts +5 -0
- package/dist/Card/Card.stories.d.ts +5 -0
- package/dist/Checkbox/Checkbox.d.ts +10 -5
- package/dist/Checkbox/Checkbox.stories.d.ts +5 -0
- package/dist/Checkbox/CheckboxIcons.d.ts +9 -9
- package/dist/Column/Column.stories.d.ts +5 -0
- package/dist/Columns/Columns.d.ts +2 -2
- package/dist/Columns/Columns.stories.d.ts +5 -0
- package/dist/Container/Container.stories.d.ts +5 -0
- package/dist/Dialog/Dialog.d.ts +5 -2
- package/dist/Dialog/Dialog.stories.d.ts +5 -0
- package/dist/Dialog/ModalDialog.d.ts +4 -1
- package/dist/Divider/Divider.d.ts +5 -0
- package/dist/Divider/Divider.stories.d.ts +5 -0
- package/dist/Field/Field.d.ts +2 -0
- package/dist/Field/Field.stories.d.ts +5 -0
- package/dist/Image/Image.d.ts +5 -0
- package/dist/Image/Image.stories.d.ts +5 -0
- package/dist/Inline/Inline.d.ts +7 -0
- package/dist/Inline/Inline.stories.d.ts +5 -0
- package/dist/Inline/index.d.ts +1 -0
- package/dist/Input/Input.d.ts +5 -0
- package/dist/Input/Input.stories.d.ts +5 -0
- package/dist/Label/Label.d.ts +12 -1
- package/dist/Label/Label.stories.d.ts +5 -0
- package/dist/Link/Link.d.ts +4 -1
- package/dist/Link/Link.stories.d.ts +5 -0
- package/dist/Menu/Menu.d.ts +3 -0
- package/dist/Menu/Menu.stories.d.ts +5 -0
- package/dist/MenuItem/MenuItem.d.ts +5 -0
- package/dist/MenuItem/MenuItem.stories.d.ts +5 -0
- package/dist/Message/Message.d.ts +5 -0
- package/dist/Message/Message.stories.d.ts +5 -0
- package/dist/Provider/MarigoldProvider.d.ts +11 -3
- package/dist/Provider/index.d.ts +1 -1
- package/dist/Radio/Radio.d.ts +6 -0
- package/dist/Radio/RadioIcons.d.ts +1 -0
- package/dist/Select/ListBox.d.ts +1 -0
- package/dist/Select/ListBoxSection.d.ts +1 -0
- package/dist/Select/Option.d.ts +1 -0
- package/dist/Select/Select.d.ts +15 -1
- package/dist/Select/Select.stories.d.ts +5 -0
- package/dist/Slider/Slider.d.ts +5 -0
- package/dist/Slider/Slider.stories.d.ts +5 -0
- package/dist/Stack/Stack.stories.d.ts +5 -0
- package/dist/Text/Text.d.ts +5 -0
- package/dist/Text/Text.stories.d.ts +5 -0
- package/dist/Textarea/Textarea.d.ts +5 -0
- package/dist/Textarea/Textarea.stories.d.ts +5 -0
- package/dist/ValidationMessage/ValidationMessage.d.ts +5 -0
- package/dist/ValidationMessage/ValidationMessage.stories.d.ts +5 -0
- package/dist/VisuallyHidden/VisuallyHidden.d.ts +1 -0
- package/dist/VisuallyHidden/VisuallyHidden.stories.d.ts +5 -0
- package/dist/VisuallyHidden/index.d.ts +1 -0
- package/dist/components.cjs.development.js +480 -496
- package/dist/components.cjs.development.js.map +1 -1
- package/dist/components.cjs.production.min.js +1 -1
- package/dist/components.cjs.production.min.js.map +1 -1
- package/dist/components.esm.js +415 -441
- package/dist/components.esm.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/theme.d.ts +23 -48
- package/package.json +4 -1
- package/src/ActionGroup/ActionGroup.stories.tsx +47 -0
- package/src/ActionGroup/ActionGroup.test.tsx +36 -36
- package/src/ActionGroup/ActionGroup.tsx +17 -28
- package/src/Alert/Alert.stories.tsx +32 -0
- package/src/Alert/Alert.test.tsx +4 -1
- package/src/Alert/Alert.tsx +18 -3
- package/src/Badge/Badge.stories.tsx +38 -0
- package/src/Badge/Badge.test.tsx +5 -1
- package/src/Badge/Badge.tsx +13 -1
- package/src/Box.ts +2 -0
- package/src/Button/{Button.stories.mdx → Button.stories.tsx} +10 -17
- package/src/Button/Button.test.tsx +34 -11
- package/src/Button/Button.tsx +17 -3
- package/src/Card/{Card.stories.mdx → Card.stories.tsx} +9 -17
- package/src/Card/Card.test.tsx +8 -3
- package/src/Card/Card.tsx +13 -1
- package/src/Checkbox/Checkbox.stories.mdx +11 -0
- package/src/Checkbox/Checkbox.stories.tsx +78 -0
- package/src/Checkbox/Checkbox.test.tsx +77 -8
- package/src/Checkbox/Checkbox.tsx +70 -90
- package/src/Checkbox/CheckboxIcons.tsx +51 -41
- package/src/Column/Column.stories.tsx +33 -0
- package/src/Columns/Columns.stories.tsx +75 -0
- package/src/Columns/Columns.test.tsx +34 -23
- package/src/Columns/Columns.tsx +30 -30
- package/src/Container/Container.stories.tsx +14 -0
- package/src/Dialog/{Dialog.stories.mdx → Dialog.stories.tsx} +33 -18
- package/src/Dialog/Dialog.test.tsx +91 -20
- package/src/Dialog/Dialog.tsx +63 -17
- package/src/Dialog/ModalDialog.tsx +33 -4
- package/src/Divider/{Divider.stories.mdx → Divider.stories.tsx} +10 -17
- package/src/Divider/Divider.test.tsx +13 -5
- package/src/Divider/Divider.tsx +12 -0
- package/src/Field/{Field.stories.mdx → Field.stories.tsx} +33 -20
- package/src/Field/Field.test.tsx +55 -5
- package/src/Field/Field.tsx +10 -8
- package/src/Image/Image.stories.tsx +34 -0
- package/src/Image/Image.test.tsx +4 -1
- package/src/Image/Image.tsx +13 -1
- package/src/Inline/Inline.stories.tsx +39 -0
- package/src/Inline/Inline.test.tsx +99 -0
- package/src/Inline/Inline.tsx +38 -0
- package/src/Inline/index.ts +1 -0
- package/src/Input/{Input.stories.mdx → Input.stories.tsx} +10 -17
- package/src/Input/Input.test.tsx +7 -3
- package/src/Input/Input.tsx +13 -1
- package/src/Label/{Label.stories.mdx → Label.stories.tsx} +10 -21
- package/src/Label/Label.test.tsx +25 -4
- package/src/Label/Label.tsx +42 -9
- package/src/Link/Link.stories.tsx +35 -0
- package/src/Link/Link.test.tsx +6 -2
- package/src/Link/Link.tsx +10 -0
- package/src/Menu/{Menu.stories.mdx → Menu.stories.tsx} +13 -32
- package/src/Menu/Menu.test.tsx +7 -2
- package/src/Menu/Menu.tsx +10 -0
- package/src/MenuItem/MenuItem.stories.tsx +30 -0
- package/src/MenuItem/MenuItem.test.tsx +7 -2
- package/src/MenuItem/MenuItem.tsx +12 -0
- package/src/Message/Message.stories.tsx +30 -0
- package/src/Message/Message.test.tsx +4 -1
- package/src/Message/Message.tsx +17 -5
- package/src/Provider/MarigoldProvider.test.tsx +65 -55
- package/src/Provider/MarigoldProvider.tsx +37 -19
- package/src/Provider/index.ts +2 -1
- package/src/Radio/Radio.stories.mdx +11 -0
- package/src/Radio/Radio.test.tsx +36 -2
- package/src/Radio/Radio.tsx +13 -2
- package/src/Radio/RadioIcons.tsx +1 -1
- package/src/Select/ListBox.tsx +1 -0
- package/src/Select/{Select.stories.mdx → Select.stories.tsx} +23 -20
- package/src/Select/Select.test.tsx +39 -1
- package/src/Select/Select.tsx +24 -13
- package/src/Slider/Slider.stories.tsx +24 -0
- package/src/Slider/Slider.test.tsx +10 -6
- package/src/Slider/Slider.tsx +25 -13
- package/src/Stack/Stack.stories.tsx +57 -0
- package/src/Stack/Stack.test.tsx +16 -7
- package/src/Text/{Text.stories.mdx → Text.stories.tsx} +20 -19
- package/src/Text/Text.test.tsx +2 -2
- package/src/Text/Text.tsx +12 -0
- package/src/Textarea/{Textarea.stories.mdx → Textarea.stories.tsx} +14 -24
- package/src/Textarea/Textarea.test.tsx +7 -3
- package/src/Textarea/Textarea.tsx +13 -1
- package/src/ValidationMessage/{ValidationMessage.stories.mdx → ValidationMessage.stories.tsx} +8 -17
- package/src/ValidationMessage/ValidationMessage.test.tsx +7 -2
- package/src/ValidationMessage/ValidationMessage.tsx +12 -0
- package/src/VisuallyHidden/VisuallyHidden.stories.tsx +19 -0
- package/src/VisuallyHidden/VisuallyHidden.test.tsx +10 -0
- package/src/VisuallyHidden/VisuallyHidden.tsx +1 -0
- package/src/VisuallyHidden/index.ts +1 -0
- package/src/index.ts +2 -2
- package/src/theme.ts +49 -48
- package/dist/Box/Box.d.ts +0 -47
- package/dist/Box/index.d.ts +0 -1
- package/dist/Heading/Heading.d.ts +0 -7
- package/dist/Heading/index.d.ts +0 -1
- package/dist/Hidden/Hidden.d.ts +0 -5
- package/dist/Hidden/index.d.ts +0 -1
- package/src/ActionGroup/ActionGroup.stories.mdx +0 -62
- package/src/Alert/Alert.stories.mdx +0 -35
- package/src/Badge/Badge.stories.mdx +0 -57
- package/src/Box/Box.stories.mdx +0 -334
- package/src/Box/Box.test.tsx +0 -133
- package/src/Box/Box.tsx +0 -165
- package/src/Box/index.ts +0 -1
- package/src/Column/Column.stories.mdx +0 -49
- package/src/Columns/Columns.stories.mdx +0 -65
- package/src/Container/Container.stories.mdx +0 -19
- package/src/Heading/Heading.stories.mdx +0 -39
- package/src/Heading/Heading.test.tsx +0 -77
- package/src/Heading/Heading.tsx +0 -19
- package/src/Heading/index.ts +0 -1
- package/src/Hidden/Hidden.stories.mdx +0 -39
- package/src/Hidden/Hidden.test.tsx +0 -24
- package/src/Hidden/Hidden.tsx +0 -16
- package/src/Hidden/index.ts +0 -1
- package/src/Image/Image.stories.mdx +0 -36
- package/src/Link/Link.stories.mdx +0 -45
- package/src/MenuItem/MenuItem.stories.mdx +0 -37
- package/src/Message/Message.stories.mdx +0 -44
- package/src/Slider/Slider.stories.mdx +0 -31
- package/src/Stack/Stack.stories.mdx +0 -51
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components.cjs.production.min.js","sources":["../src/Box/Box.tsx","../src/Alert/Alert.tsx","../src/Button/Button.tsx","../src/Checkbox/CheckboxIcons.tsx","../src/Label/Label.tsx","../src/ValidationMessage/ValidationMessage.tsx","../src/Checkbox/Checkbox.tsx","../src/Column/Column.tsx","../src/Heading/Heading.tsx","../src/Dialog/ModalDialog.tsx","../src/Input/Input.tsx","../src/Text/Text.tsx","../src/Link/Link.tsx","../src/Radio/RadioIcons.tsx","../src/Radio/Radio.tsx","../src/Select/Option.tsx","../src/Select/ListBoxSection.tsx","../src/Select/ListBox.tsx","../src/Select/Popover.tsx","../src/Stack/Stack.tsx","../src/ActionGroup/ActionGroup.tsx","../src/Badge/Badge.tsx","../src/Card/Card.tsx","../src/Columns/Columns.tsx","../src/Container/Container.tsx","../src/Dialog/Dialog.tsx","../src/Divider/Divider.tsx","../src/Field/Field.tsx","../src/Hidden/Hidden.tsx","../src/Image/Image.tsx","../src/Provider/MarigoldProvider.tsx","../src/Menu/Menu.tsx","../src/MenuItem/MenuItem.tsx","../src/Message/Message.tsx","../src/Select/Select.tsx","../src/Slider/Slider.tsx","../src/Textarea/Textarea.tsx"],"sourcesContent":["import React, { forwardRef } from 'react';\nimport { CSSObject, Element, ResponsiveStyleValue } from '@marigold/system';\nimport {\n PolymorphicPropsWithRef,\n PolymorphicComponentWithRef,\n} from '@marigold/types';\n\nexport type BoxOwnProps = {\n className?: string;\n variant?: string | string[];\n css?: CSSObject;\n\n display?: ResponsiveStyleValue<string>;\n\n height?: ResponsiveStyleValue<number | string>;\n width?: ResponsiveStyleValue<number | string>;\n minWidth?: ResponsiveStyleValue<number | string>;\n maxWidth?: ResponsiveStyleValue<number | string>;\n\n position?: ResponsiveStyleValue<string>;\n top?: ResponsiveStyleValue<number | string>;\n bottom?: ResponsiveStyleValue<number | string>;\n right?: ResponsiveStyleValue<number | string>;\n left?: ResponsiveStyleValue<number | string>;\n zIndex?: ResponsiveStyleValue<number | string>;\n\n p?: ResponsiveStyleValue<number | string>;\n px?: ResponsiveStyleValue<number | string>;\n py?: ResponsiveStyleValue<number | string>;\n pt?: ResponsiveStyleValue<number | string>;\n pb?: ResponsiveStyleValue<number | string>;\n pl?: ResponsiveStyleValue<number | string>;\n pr?: ResponsiveStyleValue<number | string>;\n\n m?: ResponsiveStyleValue<number | string>;\n mx?: ResponsiveStyleValue<number | string>;\n my?: ResponsiveStyleValue<number | string>;\n mt?: ResponsiveStyleValue<number | string>;\n mb?: ResponsiveStyleValue<number | string>;\n ml?: ResponsiveStyleValue<number | string>;\n mr?: ResponsiveStyleValue<number | string>;\n\n flexDirection?: ResponsiveStyleValue<string>;\n flexWrap?: ResponsiveStyleValue<string>;\n flexShrink?: ResponsiveStyleValue<number | string>;\n flexGrow?: ResponsiveStyleValue<number | string>;\n alignItems?: ResponsiveStyleValue<string>;\n justifyContent?: ResponsiveStyleValue<string>;\n\n bg?: ResponsiveStyleValue<number | string>;\n border?: ResponsiveStyleValue<number | string>;\n borderRadius?: ResponsiveStyleValue<number | string>;\n boxShadow?: ResponsiveStyleValue<number | string>;\n opacity?: ResponsiveStyleValue<number | string>;\n overflow?: ResponsiveStyleValue<string>;\n\n transition?: ResponsiveStyleValue<number | string>;\n};\n\nexport type BoxProps = PolymorphicPropsWithRef<BoxOwnProps, 'div'>;\n\nexport const Box: PolymorphicComponentWithRef<BoxOwnProps, 'div'> = forwardRef(\n (\n {\n variant,\n as = 'div',\n css,\n children,\n className,\n display,\n height,\n width,\n minWidth,\n maxWidth,\n position,\n top,\n bottom,\n right,\n left,\n zIndex,\n p,\n px,\n py,\n pt,\n pb,\n pl,\n pr,\n m,\n mx,\n my,\n mt,\n mb,\n ml,\n mr,\n flexDirection,\n flexWrap,\n flexShrink,\n flexGrow,\n alignItems,\n justifyContent,\n bg,\n border,\n borderRadius,\n boxShadow,\n opacity,\n overflow,\n transition,\n ...props\n },\n ref\n ) => (\n <Element\n as={as}\n ref={ref}\n variant={variant}\n css={{\n ...{\n display,\n height,\n width,\n minWidth,\n maxWidth,\n position,\n top,\n bottom,\n right,\n left,\n zIndex,\n p,\n px,\n py,\n pt,\n pb,\n pl,\n pr,\n m,\n mx,\n my,\n mt,\n mb,\n ml,\n mr,\n flexDirection,\n flexWrap,\n flexShrink,\n flexGrow,\n alignItems,\n justifyContent,\n bg,\n border,\n borderRadius,\n boxShadow,\n opacity,\n overflow,\n transition,\n },\n ...css,\n }}\n className={className}\n {...props}\n >\n {children}\n </Element>\n )\n);\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\nimport { Exclamation, Check, Notification } from '@marigold/icons';\nimport { Box } from '../Box';\n\nconst ICON_MAP = {\n success: Check,\n warning: Notification,\n error: Exclamation,\n} as const;\n\nexport type AlertProps = {\n variant?: keyof typeof ICON_MAP;\n} & ComponentProps<'div'>;\n\nexport const Alert: React.FC<AlertProps> = ({\n variant = 'success',\n children,\n ...props\n}) => {\n const Icon = ICON_MAP[variant];\n\n return (\n <Box {...props} display=\"flex\" variant={`alerts.${variant}`}>\n <Box\n display=\"inline-block\"\n alignItems=\"center\"\n width=\"32px\"\n height=\"32px\"\n bg={variant}\n >\n <Box as={Icon} size={12} color=\"#fff\" bg={variant} m={10} />\n </Box>\n <Box mx=\"16px\">{children}</Box>\n </Box>\n );\n};\n","import React, { forwardRef, RefObject } from 'react';\nimport { useButton } from '@react-aria/button';\nimport {\n PolymorphicComponentWithRef,\n PolymorphicPropsWithRef,\n} from '@marigold/types';\n\nimport { Box, BoxOwnProps } from '../Box';\n\nexport type ButtonProps = PolymorphicPropsWithRef<BoxOwnProps, 'button'>;\n\nexport const Button: PolymorphicComponentWithRef<BoxOwnProps, 'button'> =\n forwardRef(\n (\n {\n as = 'button',\n variant = 'primary',\n size = 'large',\n disabled,\n children,\n className,\n ...props\n },\n ref\n ) => {\n const { buttonProps } = useButton(\n {\n ...props,\n elementType: typeof as === 'string' ? as : 'span',\n isDisabled: disabled,\n },\n ref as RefObject<HTMLSpanElement>\n );\n\n return (\n <Box\n {...buttonProps}\n {...props}\n as={as}\n variant={[`button.${variant}`, `button.${size}`]}\n className={className}\n ref={ref}\n >\n <Box as=\"span\" display=\"inline-flex\" alignItems=\"center\">\n {children}\n </Box>\n </Box>\n );\n }\n );\n","import React from 'react';\nimport { SVG } from '@marigold/icons';\n\nimport { Box } from '../Box';\n\nexport const CheckboxChecked = ({ disabled = false, ...props }) => (\n <SVG width=\"16\" height=\"32\" viewBox=\"0 0 16 32\" fill=\"none\" {...props}>\n <Box\n as=\"rect\"\n x=\"0.5\"\n y=\"8.5\"\n width=\"15px\"\n height=\"15px\"\n rx=\"1.5\"\n variant={disabled ? 'checkbox.checked.disabled' : 'checkbox.checked'}\n />\n <Box\n as=\"path\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M13.9571 12.8338L12.4085 11.2852L6.08699 17.6007L3.59887 15.1126L2.04163 16.6588L6.08682 20.704L13.9571 12.8338Z\"\n variant=\"checkbox.checked.icon\"\n />\n </SVG>\n);\n\nexport const CheckboxUnchecked = ({\n disabled = false,\n error = false,\n ...props\n}) => (\n <SVG width=\"16\" height=\"32\" viewBox=\"0 0 16 32\" fill=\"none\" {...props}>\n <Box\n as=\"rect\"\n x=\"0.5\"\n y=\"8.5\"\n width=\"15px\"\n height=\"15px\"\n rx=\"1.5\"\n variant={\n disabled\n ? 'checkbox.unchecked.disabled'\n : error\n ? 'checkbox.unchecked.error'\n : 'checkbox.unchecked'\n }\n />\n </SVG>\n);\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\nimport { Required } from '@marigold/icons';\n\nimport { Box } from '../Box';\n\nexport type LabelProps = {\n htmlFor?: string;\n variant?: string;\n required?: boolean;\n} & ComponentProps<'label'>;\n\nexport const Label: React.FC<LabelProps> = ({\n variant = 'above',\n required,\n children,\n ...props\n}) => {\n return required ? (\n <Box as=\"span\" display=\"inline-flex\" alignItems=\"center\">\n <Box {...props} as=\"label\" variant={`label.${variant}`}>\n {children}\n </Box>\n {required && <Box as={Required} size={16} css={{ color: 'red60' }} />}\n </Box>\n ) : (\n <Box {...props} as=\"label\" variant={`label.${variant}`}>\n {children}\n </Box>\n );\n};\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\n\nimport { Box } from '../Box';\n\nexport type ValidationMessageProps = {\n variant?: string;\n} & ComponentProps<'span'>;\n\nexport const ValidationMessage: React.FC<ValidationMessageProps> = ({\n variant = 'error',\n children,\n className,\n ...props\n}) => {\n return (\n <Box\n as=\"span\"\n display=\"flex\"\n alignItems=\"center\"\n variant={`validation.${variant}`}\n className={className}\n {...props}\n >\n {children}\n </Box>\n );\n};\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\nimport { Exclamation } from '@marigold/icons';\n\nimport { CheckboxChecked, CheckboxUnchecked } from './CheckboxIcons';\n\nimport { Box } from '../Box';\nimport { Label } from '../Label';\nimport { ValidationMessage } from '../ValidationMessage';\n\n// Checkbox Icon\n// ---------------\ntype CheckboxIconProps = {\n variant?: string;\n checked?: boolean;\n disabled?: boolean;\n children?: never;\n error?: boolean;\n};\n\nconst CheckboxIcon: React.FC<CheckboxIconProps> = ({\n variant,\n checked,\n disabled,\n error,\n}) => {\n if (checked) {\n return (\n <Box\n as={CheckboxChecked}\n variant={`checkbox.${variant}`}\n disabled={disabled}\n />\n );\n }\n return (\n <Box\n as={CheckboxUnchecked}\n variant={`checkbox.${variant}`}\n disabled={disabled}\n error={error}\n />\n );\n};\n\n// Checkbox Input\n// ---------------\ntype CheckboxInputProps = {\n variant?: string;\n error?: boolean;\n} & ComponentProps<'input'>;\n\nconst CheckboxInput: React.FC<CheckboxInputProps> = ({\n className,\n variant = 'default',\n error,\n ...props\n}) => (\n <Box display=\"inline-block\" className={className}>\n <Box\n as=\"input\"\n type=\"checkbox\"\n css={{\n position: 'absolute',\n opacity: 0,\n zIndex: -1,\n width: 1,\n height: 1,\n overflow: 'hidden',\n }}\n {...props}\n />\n <CheckboxIcon\n checked={props.checked}\n variant={variant}\n disabled={props.disabled}\n error={error}\n />\n </Box>\n);\n\n// Checkbox\n// ---------------\nexport type CheckboxProps = {\n id: string;\n label?: string;\n required?: boolean;\n error?: boolean;\n errorMessage?: string;\n} & CheckboxInputProps;\n\nexport const Checkbox: React.FC<CheckboxProps> = ({\n label,\n required,\n error,\n errorMessage,\n ...props\n}) => {\n if (label) {\n return (\n <>\n <Label\n htmlFor={props.id}\n required={required}\n variant={props.disabled ? 'disabled' : 'inline'}\n >\n <Box as={CheckboxInput} pr=\"8px\" error={error} {...props} />\n {label}\n </Label>\n {error && errorMessage && (\n <ValidationMessage>\n <Exclamation size={16} />\n {errorMessage}\n </ValidationMessage>\n )}\n </>\n );\n }\n\n return <CheckboxInput {...props} />;\n};\n","import React from 'react';\nimport { Box } from '../Box';\n\ntype WidthValues = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\nexport type ColumnProps = {\n className?: string;\n width?: WidthValues | WidthValues[];\n};\n\nconst transform = (width: WidthValues | WidthValues[]) => {\n if (Array.isArray(width)) {\n return width.map(v => `${(v / 12) * 100}%`);\n }\n\n return `${(width / 12) * 100}%`;\n};\n\nexport const Column: React.FC<ColumnProps> = ({\n width = 12,\n children,\n ...props\n}) => (\n <Box {...props} width={transform(width)}>\n {children}\n </Box>\n);\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\nimport { Box } from '../Box';\n\nexport type HeadingProps = {\n as?: 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';\n variant?: string;\n} & ComponentProps<'h1'>;\n\nexport const Heading: React.FC<HeadingProps> = ({\n as = 'h2',\n variant = 'h2',\n children,\n ...props\n}) => (\n <Box {...props} as={as} variant={`text.${variant}`}>\n {children}\n </Box>\n);\n","import React, { RefObject } from 'react';\nimport {\n useOverlay,\n usePreventScroll,\n useModal,\n OverlayProps,\n} from '@react-aria/overlays';\nimport { useDialog } from '@react-aria/dialog';\nimport { FocusScope } from '@react-aria/focus';\nimport { AriaDialogProps } from '@react-types/dialog';\n\nimport { Box } from '../Box';\n\nexport type ModalDialogProps = OverlayProps & AriaDialogProps;\n\nexport const ModalDialog: React.FC<ModalDialogProps> = ({\n children,\n ...props\n}) => {\n // Handle interacting outside the dialog and pressing\n // the Escape key to close the modal.\n const ref = React.useRef<HTMLElement>() as RefObject<HTMLElement>;\n const { overlayProps, underlayProps } = useOverlay(props, ref);\n\n // Prevent scrolling while the modal is open, and hide content\n // outside the modal from screen readers.\n usePreventScroll();\n\n const { modalProps } = useModal();\n const { dialogProps } = useDialog(props, ref);\n\n return (\n <Box variant=\"dialog.modalWrapper\" {...underlayProps}>\n <FocusScope contain restoreFocus autoFocus>\n <Box\n {...overlayProps}\n {...dialogProps}\n {...modalProps}\n ref={ref}\n variant=\"dialog.modalBody\"\n >\n {children}\n </Box>\n </FocusScope>\n </Box>\n );\n};\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\nimport { Box } from '../Box';\n\nexport type InputProps = {\n variant?: string;\n} & ComponentProps<'input'>;\n\nexport const Input: React.FC<InputProps> = ({\n variant = 'default',\n type = 'text',\n ...props\n}) => <Box {...props} as=\"input\" type={type} variant={`input.${variant}`} />;\n","import React, { forwardRef } from 'react';\nimport { ResponsiveStyleValue } from '@marigold/system';\nimport {\n PolymorphicComponentWithRef,\n PolymorphicPropsWithRef,\n} from '@marigold/types';\n\nimport { Box, BoxOwnProps } from '../Box';\n\nexport type TextOwnProps = {\n align?: ResponsiveStyleValue<string>;\n color?: ResponsiveStyleValue<string>;\n cursor?: ResponsiveStyleValue<string>;\n outline?: ResponsiveStyleValue<string>;\n userSelect?: ResponsiveStyleValue<string>;\n} & BoxOwnProps;\n\nexport type TextProps = PolymorphicPropsWithRef<TextOwnProps, 'span'>;\n\nexport const Text: PolymorphicComponentWithRef<TextOwnProps, 'span'> =\n forwardRef(\n (\n {\n as = 'span',\n variant = 'body',\n children,\n className,\n align,\n color,\n cursor,\n outline,\n userSelect,\n ...props\n },\n ref\n ) => (\n <Box\n {...props}\n as={as}\n variant={`text.${variant}`}\n css={{ textAlign: align, color, cursor, outline, userSelect }}\n className={className}\n ref={ref}\n >\n {children}\n </Box>\n )\n );\n","import React, { useRef } from 'react';\nimport { useLink } from '@react-aria/link';\nimport { PolymorphicComponent, PolymorphicProps } from '@marigold/types';\n\nimport { Text, TextOwnProps } from '../Text';\n\nexport type LinkOwnProps = { disabled?: boolean } & TextOwnProps;\nexport type LinkProps = PolymorphicProps<LinkOwnProps, 'a'>;\n\nexport const Link = (({\n as = 'a',\n variant = 'link',\n children,\n disabled,\n ...props\n}: LinkProps) => {\n const ref = useRef<any>();\n const { linkProps } = useLink(\n {\n ...props,\n elementType: typeof as === 'string' ? as : 'span',\n isDisabled: disabled,\n },\n ref\n );\n\n return (\n <Text {...props} {...linkProps} as={as} variant={variant} ref={ref}>\n {children}\n </Text>\n );\n}) as PolymorphicComponent<LinkOwnProps, 'a'>;\n","import React from 'react';\nimport { SVG } from '@marigold/icons';\n\nimport { Box } from '../Box';\n\nexport const RadioChecked = ({ disabled = false, ...props }) => (\n <SVG width=\"16\" height=\"32\" viewBox=\"0 0 16 32\" fill=\"none\" {...props}>\n <Box\n as=\"circle\"\n cx=\"8\"\n cy=\"16\"\n r=\"7.5\"\n variant={disabled ? 'radio.checked.disabled' : 'radio.checked'}\n />\n <Box as=\"circle\" cx=\"8\" cy=\"16\" r=\"3\" variant=\"radio.checked.circle\" />\n </SVG>\n);\n\nexport const RadioUnchecked = ({\n disabled = false,\n error = false,\n ...props\n}) => (\n <SVG width=\"16\" height=\"32\" viewBox=\"0 0 16 32\" fill=\"none\" {...props}>\n <Box\n as=\"circle\"\n cx=\"8\"\n cy=\"16\"\n r=\"7.5\"\n variant={\n disabled\n ? 'radio.unchecked.disabled'\n : error\n ? 'radio.unchecked.error'\n : 'radio.unchecked'\n }\n />\n </SVG>\n);\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\nimport { Exclamation } from '@marigold/icons';\n\nimport { Box } from '../Box';\nimport { Label } from '../Label';\nimport { ValidationMessage } from '../ValidationMessage';\n\nimport { RadioChecked, RadioUnchecked } from './RadioIcons';\n\n// Radio Icon\n// ---------------\ntype RadioIconProps = {\n variant?: string;\n checked?: boolean;\n disabled?: boolean;\n error?: boolean;\n children?: never;\n};\n\nconst RadioIcon: React.FC<RadioIconProps> = ({\n variant,\n checked,\n disabled,\n error,\n}) => {\n if (checked) {\n return (\n <Box as={RadioChecked} variant={`radio.${variant}`} disabled={disabled} />\n );\n }\n return (\n <Box\n as={RadioUnchecked}\n variant={`radio.${variant}`}\n disabled={disabled}\n error={error}\n />\n );\n};\n\n// Radio Input\n// ---------------\ntype RadioInputProps = {\n variant?: string;\n error?: boolean;\n} & ComponentProps<'input'>;\n\nconst RadioInput: React.FC<RadioInputProps> = ({\n className,\n variant = 'default',\n error,\n ...props\n}) => (\n <Box display=\"inline-block\" className={className}>\n <Box\n as=\"input\"\n type=\"radio\"\n css={{\n position: 'absolute',\n opacity: 0,\n zIndex: -1,\n width: 1,\n height: 1,\n overflow: 'hidden',\n }}\n {...props}\n />\n <RadioIcon\n checked={props.checked}\n variant={variant}\n disabled={props.disabled}\n error={error}\n />\n </Box>\n);\n\n// Radio\n// ---------------\nexport type RadioProps = {\n id: string;\n label?: string;\n required?: boolean;\n error?: boolean;\n errorMessage?: string;\n} & RadioInputProps;\n\nexport const Radio: React.FC<RadioProps> = ({\n label,\n required,\n error,\n errorMessage,\n ...props\n}) => {\n if (label) {\n return (\n <>\n <Label\n htmlFor={props.id}\n required={required}\n variant={props.disabled ? 'disabled' : 'inline'}\n >\n <Box as={RadioInput} pr=\"8px\" error={error} {...props} />\n {label}\n </Label>\n {error && errorMessage && (\n <ValidationMessage>\n <Exclamation size={16} />\n {errorMessage}\n </ValidationMessage>\n )}\n </>\n );\n }\n\n return <RadioInput {...props} />;\n};\n","import React, { useEffect, useRef, useState } from 'react';\nimport type { ListState } from '@react-stately/list';\nimport type { Node } from '@react-types/shared';\nimport { useOption } from '@react-aria/listbox';\n\nimport { Box } from '../Box';\n\ninterface OptionProps {\n item: Node<unknown>;\n state: ListState<unknown>;\n}\n\nexport const Option = ({ item, state }: OptionProps) => {\n const ref = useRef<HTMLLIElement>(null);\n const [disabled, setDisabled] = useState(false);\n const { optionProps, isSelected } = useOption(\n {\n key: item.key,\n },\n state,\n ref\n );\n\n useEffect(() => {\n for (const key of state.disabledKeys.values()) {\n if (key === item.key) {\n setDisabled(true);\n }\n }\n }, [state.disabledKeys, item.key]);\n\n return (\n <Box\n as=\"li\"\n {...optionProps}\n ref={ref}\n variant={\n isSelected\n ? 'select.option.selected'\n : disabled\n ? 'select.option.disabled'\n : 'select.option'\n }\n >\n {item.rendered}\n </Box>\n );\n};\n","import React from 'react';\nimport { useListBoxSection } from '@react-aria/listbox';\nimport type { ListState } from '@react-stately/list';\nimport type { Node } from '@react-types/shared';\n\nimport { Box } from '../Box';\nimport { Option } from './Option';\n\ninterface SectionProps {\n section: Node<unknown>;\n state: ListState<unknown>;\n}\n\nexport const ListBoxSection = ({ section, state }: SectionProps) => {\n const { itemProps, headingProps, groupProps } = useListBoxSection({\n heading: section.rendered,\n 'aria-label': section['aria-label'],\n });\n\n return (\n <Box\n as=\"li\"\n {...itemProps}\n css={{\n cursor: 'not-allowed',\n }}\n >\n {section.rendered && (\n <Box as=\"span\" {...headingProps} variant={'select.section'}>\n {section.rendered}\n </Box>\n )}\n <Box as=\"ul\" {...groupProps}>\n {[...section.childNodes].map(node => (\n <Option key={node.key} item={node} state={state} />\n ))}\n </Box>\n </Box>\n );\n};\n","import React, { useRef } from 'react';\nimport { useListBox } from '@react-aria/listbox';\nimport type { AriaListBoxOptions } from '@react-aria/listbox';\nimport type { ListState } from '@react-stately/list';\n\nimport { Box } from '../Box';\nimport { Option } from './Option';\nimport { ListBoxSection } from './ListBoxSection';\n\ninterface ListBoxProps extends AriaListBoxOptions<unknown> {\n state: ListState<unknown>;\n error?: boolean;\n}\n\nexport const ListBox = (props: ListBoxProps) => {\n const ref = useRef<HTMLUListElement>(null);\n const { state, error } = props;\n const { listBoxProps } = useListBox(props, state, ref);\n\n return (\n <Box\n as=\"ul\"\n css={{\n listStyle: 'none',\n }}\n {...listBoxProps}\n variant={error ? 'select.listbox.error' : 'select.listbox'}\n ref={ref}\n >\n {[...state.collection].map(item =>\n item.type === 'section' ? (\n <ListBoxSection key={item.key} section={item} state={state} />\n ) : (\n <Option key={item.key} item={item} state={state} />\n )\n )}\n </Box>\n );\n};\n","import React, { forwardRef, RefObject } from 'react';\nimport { FocusScope } from '@react-aria/focus';\nimport {\n DismissButton,\n OverlayContainer,\n useModal,\n useOverlay,\n} from '@react-aria/overlays';\nimport { mergeProps } from '@react-aria/utils';\n\nimport { Box } from '../Box';\n\ninterface PopoverProps {\n isOpen?: boolean;\n onClose?: () => void;\n ref?: React.Ref<HTMLDivElement>;\n className?: string;\n}\n\nexport const Popover: React.FC<PopoverProps> = forwardRef(\n ({ children, className, isOpen, onClose, ...otherProps }, ref) => {\n // Handle events that should cause the popup to close,\n const { overlayProps } = useOverlay(\n {\n isOpen,\n onClose,\n shouldCloseOnBlur: true,\n isDismissable: true,\n },\n ref as RefObject<HTMLElement>\n );\n // Hide content outside the modal from screen readers.\n const { modalProps } = useModal();\n\n return (\n <OverlayContainer>\n <FocusScope restoreFocus>\n <Box\n {...mergeProps(overlayProps, otherProps, modalProps)}\n className={className}\n ref={ref}\n >\n {children}\n <DismissButton onDismiss={onClose} />\n </Box>\n </FocusScope>\n </OverlayContainer>\n );\n }\n);\n","import React, { Children } from 'react';\nimport flattenChildren from 'react-keyed-flatten-children';\n\nimport { ResponsiveStyleValue } from '@marigold/system';\n\nimport { Box } from '../Box';\n\nexport type StackProps = {\n space?: ResponsiveStyleValue<string>;\n align?: 'left' | 'right' | 'center';\n};\n\nconst ALIGNMENT = {\n left: 'flex-start',\n center: 'center',\n right: 'flex-end',\n};\n\nexport const Stack: React.FC<StackProps> = ({\n space = 'none',\n align = 'left',\n children,\n ...props\n}) => (\n <Box\n {...props}\n display=\"flex\"\n flexDirection=\"column\"\n alignItems={ALIGNMENT[align]}\n css={{ '> * + *': { pt: space } }}\n >\n {Children.map(\n flattenChildren(children) as unknown as React.ReactElement,\n (child: React.ReactElement) => (\n <Box>{React.cloneElement(child, {}, child.props.children)}</Box>\n )\n )}\n </Box>\n);\n","import React, { Children } from 'react';\nimport flattenChildren from 'react-keyed-flatten-children';\n\nimport { ResponsiveStyleValue } from '@marigold/system';\nimport { ComponentProps } from '@marigold/types';\n\nimport { Box } from '../Box';\n\nexport type ActionGroupProps = {\n variant?: string;\n space?: ResponsiveStyleValue<number | string>;\n verticalAlignment?: boolean;\n} & ComponentProps<'div'>;\n\nexport const ActionGroup: React.FC<ActionGroupProps> = ({\n variant = 'default',\n space = 'none',\n verticalAlignment = false,\n children,\n className,\n ...props\n}) => {\n const childStyle = verticalAlignment\n ? { marginBottom: space }\n : { marginRight: space };\n return (\n <Box variant={`actionGroup.${variant}`} className={className} {...props}>\n {Children.map(\n flattenChildren(children),\n (child, i) =>\n child !== null &&\n child !== undefined && (\n <Box\n as={verticalAlignment ? 'div' : 'span'}\n css={i < Children.count(children) - 1 ? childStyle : undefined}\n >\n {child}\n </Box>\n )\n )}\n </Box>\n );\n};\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\nimport { Box } from '../Box';\n\nexport type BadgeProps = {\n variant?: string;\n bgColor?: string;\n borderColor?: string;\n} & ComponentProps<'div'>;\n\nexport const Badge: React.FC<BadgeProps> = ({\n variant = 'default',\n bgColor = 'transparent',\n borderColor = 'transparent',\n children,\n ...props\n}) => (\n <Box\n css={{ bg: bgColor, borderColor: borderColor }}\n variant={`badge.${variant}`}\n {...props}\n >\n {children}\n </Box>\n);\n","import React from 'react';\nimport { ResponsiveStyleValue } from '@marigold/system';\nimport { ComponentProps } from '@marigold/types';\n\nimport { Box } from '../Box';\n\nexport type CardProps = {\n title?: string;\n width?: ResponsiveStyleValue<string>;\n variant?: string;\n} & ComponentProps<'div'>;\n\nexport const Card: React.FC<CardProps> = ({\n variant = 'default',\n title,\n width,\n className,\n children,\n ...props\n}) => {\n return (\n <Box\n {...props}\n variant={`card.${variant}`}\n maxWidth={width}\n className={className}\n >\n {title && (\n <Box as=\"h2\" variant=\"text.h2\" pb=\"small\">\n {title}\n </Box>\n )}\n {children}\n </Box>\n );\n};\n","import React, { Children } from 'react';\nimport { useStyles } from '@marigold/system';\nimport { Box } from '../Box';\nimport flattenChildren from 'react-keyed-flatten-children';\n\ntype ColumnsProps = {\n className?: string;\n space?: number;\n horizontalAlign?: 'left' | 'right' | 'center';\n verticalAlign?: 'top' | 'bottom' | 'center';\n title?: string; // Should only be used for testing.\n};\n\nexport const Columns: React.FC<ColumnsProps> = ({\n space = 0,\n horizontalAlign = 'left',\n verticalAlign = 'top',\n className,\n children,\n ...props\n}) => {\n let columnItems = flattenChildren(children);\n let childClassNames = useStyles({ css: { p: `${space / 2}px` } });\n\n // horizontal Alignment\n let justify = 'flex-start';\n if (horizontalAlign === 'right') {\n justify = 'flex-end';\n } else if (horizontalAlign === 'center') {\n justify = 'center';\n }\n\n // vertical Alignment\n let alignItems = 'flex-start';\n if (verticalAlign === 'bottom') {\n alignItems = 'flex-end';\n } else if (verticalAlign === 'center') {\n alignItems = 'center';\n }\n\n return (\n <Box p={`${space}px`} display=\"flex\" className={className}>\n <Box\n width={`calc(100% + ${space}px)`}\n m={`${-space / 2}px`}\n display=\"flex\"\n flexWrap=\"wrap\"\n alignItems={alignItems}\n justifyContent={justify}\n {...props}\n >\n {Children.map(\n columnItems as unknown as React.ReactElement,\n (child: React.ReactElement) => {\n return React.cloneElement(\n child,\n {\n className: childClassNames,\n },\n <Box className={child && child.props.className}>\n {child.props.children}\n </Box>\n );\n }\n )}\n </Box>\n </Box>\n );\n};\n","import React from 'react';\nimport { Box } from '../Box';\n\nexport type ContainerProps = {\n className?: string;\n title?: string; // Used for testing.\n};\n\nexport const Container: React.FC<ContainerProps> = ({ children, ...props }) => (\n <Box {...props} width=\"100%\">\n {children}\n </Box>\n);\n","import React, { RefObject } from 'react';\nimport { ComponentProps } from '@marigold/types';\nimport { useOverlayTriggerState } from '@react-stately/overlays';\nimport { OverlayContainer } from '@react-aria/overlays';\nimport { useButton } from '@react-aria/button';\nimport { Close } from '@marigold/icons';\n\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Heading } from '../Heading';\n\nimport { ModalDialog } from './ModalDialog';\n\nexport type DialogProps = {\n isOpen: boolean;\n close: ComponentProps<typeof Button>['onClick'];\n title?: string;\n} & ComponentProps<'div'>;\n\nexport const Dialog: React.FC<DialogProps> = ({\n children,\n title,\n className,\n isOpen,\n close,\n ...props\n}) => {\n const closeButtonRef = React.useRef<HTMLElement>() as RefObject<HTMLElement>;\n\n // useButton ensures that focus management is handled correctly,\n // across all browsers. Focus is restored to the button once the\n // dialog closes.\n const { buttonProps: closeButtonProps } = useButton(\n {\n onPress: () => close(),\n },\n closeButtonRef\n );\n\n return (\n <OverlayContainer>\n <ModalDialog isOpen={isOpen} onClose={close} isDismissable>\n <Box variant=\"dialog.wrapper\" className={className} {...props}>\n <Box variant=\"dialog.body\">\n {title && (\n <Heading as=\"h4\" variant=\"h4\">\n {title}\n </Heading>\n )}\n {children}\n </Box>\n <Box variant=\"dialog.onClose\">\n <Button\n variant=\"close\"\n size=\"xsmall\"\n {...closeButtonProps}\n ref={closeButtonRef}\n >\n <Close size={16} />\n </Button>\n </Box>\n </Box>\n </ModalDialog>\n </OverlayContainer>\n );\n};\n\n// use this hook to get the overlayTriggerState and openButton props for using the dialog component\nexport const useDialogButtonProps = () => {\n const state = useOverlayTriggerState({});\n const openButtonRef = React.useRef<HTMLElement>() as RefObject<HTMLElement>;\n const { buttonProps: openButtonProps } = useButton(\n {\n onPress: () => state.open(),\n },\n openButtonRef\n );\n\n return {\n state,\n openButtonProps,\n openButtonRef,\n };\n};\n","import React from 'react';\nimport { Box } from '../Box';\n\nexport type DividerProps = {\n className?: string;\n variant?: string;\n title?: string; // Should only be used for testing.\n};\n\nexport const Divider: React.FC<DividerProps> = ({\n variant = 'regular',\n ...props\n}) => <Box {...props} as=\"hr\" variant={`divider.${variant}`} />;\n","import React from 'react';\nimport { Exclamation } from '@marigold/icons';\nimport { ComponentProps } from '@marigold/types';\n\nimport { Input } from '../Input';\nimport { Label } from '../Label';\nimport { ValidationMessage } from '../ValidationMessage';\n\nexport type FieldProps = {\n htmlFor: string;\n label: string;\n required?: boolean;\n error?: boolean;\n errorMessage?: string;\n disabled?: boolean;\n} & ComponentProps<'input'>;\n\nexport const Field: React.FC<FieldProps> = ({\n type = 'text',\n className,\n htmlFor,\n label,\n required,\n error,\n errorMessage,\n disabled,\n ...props\n}) => {\n return (\n <>\n <Label\n variant={disabled ? 'disabled' : 'above'}\n htmlFor={htmlFor}\n required={required}\n >\n {label}\n </Label>\n <Input\n {...props}\n type={type}\n id={htmlFor}\n disabled={disabled}\n variant={error ? 'error' : 'default'}\n className={className}\n />\n {error && errorMessage && (\n <ValidationMessage>\n <Exclamation size={16} />\n {errorMessage}\n </ValidationMessage>\n )}\n </>\n );\n};\n","import React from 'react';\nimport { Box } from '../Box';\n\nexport type HiddenProps = {\n show?: boolean;\n};\n\nexport const Hidden: React.FC<HiddenProps> = ({\n show = false,\n children,\n ...props\n}) => (\n <Box {...props} as=\"span\" display={show ? 'display' : 'none'}>\n {children}\n </Box>\n);\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\nimport { Box } from '../Box';\n\nexport type ImageProps = {\n variant?: string;\n children?: never;\n} & ComponentProps<'img'>;\n\nexport const Image: React.FC<ImageProps> = ({\n variant = 'fullWidth',\n ...props\n}) => <Box {...props} as=\"img\" variant={`images.${variant}`} />;\n","import React from 'react';\nimport { OverlayProvider } from '@react-aria/overlays';\nimport { ThemeProvider, ThemeProviderProps } from '@marigold/system';\n// import { Global } from '@emotion/react';\n// import { css } from '@theme-ui/css';\n\n// const GlobalStyles = () => {\n// const theme = useTheme();\n// const styles = css({\n// body: { variant: 'root.body' },\n// html: { variant: 'root.html' },\n// })(theme);\n\n// return <Global styles={styles} />;\n// };\n// a merge of the ThemeProvider and the react-aria OverlayProvider\nexport const MarigoldProvider: React.FC<ThemeProviderProps> = ({\n theme,\n children,\n}) => {\n return (\n <ThemeProvider theme={theme}>\n <OverlayProvider>\n {/* <GlobalStyles /> */}\n {children}\n </OverlayProvider>\n </ThemeProvider>\n );\n};\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\n\nimport { Button } from '../Button';\nimport { Box } from '../Box';\n\nexport type MenuProps = {\n variant?: string;\n label?: string;\n onClick: ComponentProps<typeof Button>['onClick'];\n show?: boolean;\n className?: string;\n title?: string; // For testing\n};\n\nexport const Menu: React.FC<MenuProps> = ({\n variant = 'default',\n label = 'Menu',\n onClick,\n show = false,\n children,\n ...props\n}) => {\n return (\n <Box variant={`menu.${variant}`} {...props}>\n <Button onClick={onClick} variant=\"menu\">\n {label}\n </Button>\n {show ? (\n <Box\n display=\"block\"\n position=\"absolute\"\n minWidth=\"120px\"\n borderRadius=\"2px\"\n >\n {children}\n </Box>\n ) : null}\n </Box>\n );\n};\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\nimport { Link } from '../Link';\nimport { Box } from '../Box';\n\nexport type MenuItemProps = {\n variant?: string;\n} & ComponentProps<typeof Link>;\n\nexport const MenuItem: React.FC<MenuItemProps> = ({\n variant = 'default',\n className,\n children,\n ...props\n}) => {\n return (\n <Box variant={`menuItem.${variant}`} className={className}>\n <Link variant=\"menuItemLink\" {...props}>\n {children}\n </Link>\n </Box>\n );\n};\n","import React from 'react';\nimport { Exclamation, Info, Notification } from '@marigold/icons';\nimport { ComponentProps } from '@marigold/types';\nimport { Box } from '../Box';\nimport { Heading } from '../Heading';\n\nexport type MessageProps = {\n messageTitle: string;\n variant?: string;\n} & ComponentProps<'div'>;\n\nexport const Message: React.FC<MessageProps> = ({\n messageTitle,\n variant = 'info',\n className,\n children,\n ...props\n}) => {\n var icon = <Info />;\n if (variant === 'warning') {\n icon = <Notification />;\n }\n if (variant === 'error') {\n icon = <Exclamation />;\n }\n\n return (\n <Box\n display=\"inline-block\"\n variant={`messages.${variant}`}\n className={className}\n {...props}\n >\n <Box display=\"flex\" alignItems=\"center\" variant=\"messages.title\">\n {icon}\n <Heading as=\"h4\" variant=\"h4\">\n {messageTitle}\n </Heading>\n </Box>\n <Box css={{ color: 'black' }}>{children}</Box>\n </Box>\n );\n};\n","import React, { Ref, RefObject, useRef } from 'react';\nimport { useSelectState } from '@react-stately/select';\nimport { useButton } from '@react-aria/button';\nimport { mergeProps } from '@react-aria/utils';\nimport { useFocusRing } from '@react-aria/focus';\nimport { HiddenSelect, useSelect } from '@react-aria/select';\nimport type { AriaSelectProps } from '@react-types/select';\nimport { useOverlayTriggerState } from '@react-stately/overlays';\nimport { useOverlayTrigger, useOverlayPosition } from '@react-aria/overlays';\nimport { SingleSelection } from '@react-types/shared';\n\nimport { ComponentProps } from '@marigold/types';\nimport { ArrowDown, ArrowUp, Exclamation, Required } from '@marigold/icons';\nimport { ResponsiveStyleValue } from '@marigold/system';\n\nimport { Box } from '../Box';\nimport { Label } from '../Label';\nimport { ValidationMessage } from '../ValidationMessage';\nimport { ListBox } from './ListBox';\nimport { Popover } from './Popover';\n\nexport type SelectProps = {\n placeholder?: string;\n disabled?: boolean;\n required?: boolean;\n width?: ResponsiveStyleValue<number | string>;\n error?: boolean;\n errorMessage?: string;\n} & ComponentProps<'select'> &\n AriaSelectProps<object> &\n SingleSelection;\n\nexport const Select = ({\n placeholder = 'Select an option',\n disabled,\n required,\n error,\n errorMessage,\n width,\n className,\n ...props\n}: SelectProps) => {\n const state = useSelectState(props);\n const overlayTriggerState = useOverlayTriggerState({});\n const triggerRef = useRef<HTMLElement>() as RefObject<HTMLElement>;\n const overlayRef = useRef<HTMLDivElement>();\n\n // Get props for the overlay\n const { overlayProps } = useOverlayTrigger(\n { type: 'listbox' },\n overlayTriggerState,\n triggerRef\n );\n // Get popover positioning props relative to the trigger\n const { overlayProps: positionProps } = useOverlayPosition({\n targetRef: triggerRef,\n overlayRef: overlayRef as RefObject<HTMLElement>,\n placement: 'bottom',\n shouldFlip: false,\n isOpen: state.isOpen,\n onClose: state.close,\n });\n // Get props for child elements from useSelect\n const { labelProps, triggerProps, valueProps, menuProps } = useSelect(\n props,\n state,\n triggerRef\n );\n // Get props for the button based on the trigger props from useSelect\n const { buttonProps } = useButton(triggerProps, triggerRef);\n\n const { focusProps } = useFocusRing();\n\n return (\n <Box position=\"relative\" display=\"inline-block\" width={width && width}>\n {props.label && (\n <Box>\n <Label\n {...labelProps}\n htmlFor={labelProps.id}\n variant={disabled ? 'disabled' : 'above'}\n >\n {required ? (\n <Box as=\"span\" display=\"inline-flex\" alignItems=\"center\">\n {props.label}\n <Box as={Required} size={16} css={{ color: 'error' }} />\n </Box>\n ) : (\n props.label\n )}\n </Label>\n </Box>\n )}\n <HiddenSelect\n state={state}\n triggerRef={triggerRef}\n label={props.label}\n name={props.name}\n isDisabled={disabled}\n />\n <Box\n as=\"button\"\n {...mergeProps(buttonProps, focusProps)}\n ref={triggerRef as RefObject<HTMLButtonElement>}\n variant={\n error && state.isOpen && !disabled\n ? 'button.select.errorOpened'\n : error\n ? 'button.select.error'\n : state.isOpen && !disabled\n ? 'button.select.open'\n : 'button.select'\n }\n disabled={disabled}\n className={className}\n >\n <Box\n as=\"span\"\n {...valueProps}\n variant={disabled ? 'select.disabled' : 'select'}\n >\n {state.selectedItem ? state.selectedItem.rendered : placeholder}\n </Box>\n {state.isOpen && !disabled ? (\n <Box\n as={ArrowUp}\n size={16}\n css={{ fill: disabled ? 'disabled' : 'text' }}\n />\n ) : (\n <Box\n as={ArrowDown}\n size={16}\n css={{ fill: disabled ? 'disabled' : 'text' }}\n />\n )}\n </Box>\n {state.isOpen && !disabled && (\n <Box\n as={Popover}\n {...overlayProps}\n {...positionProps}\n css={{\n width: width\n ? width\n : triggerRef.current && triggerRef.current.offsetWidth + 'px',\n }}\n ref={overlayRef as Ref<HTMLDivElement>}\n isOpen={state.isOpen}\n onClose={state.close}\n >\n <ListBox error={error} {...menuProps} state={state} />\n </Box>\n )}\n {error && errorMessage && (\n <Box as=\"span\" display=\"inline-flex\" alignItems=\"center\">\n <Box as={Exclamation} size={16} css={{ color: 'error' }} />\n <ValidationMessage>{errorMessage}</ValidationMessage>\n </Box>\n )}\n </Box>\n );\n};\n","import React from 'react';\nimport { useStyles } from '@marigold/system';\nimport { ComponentProps } from '@marigold/types';\n\nexport type SliderProps = {\n variant?: string;\n} & ComponentProps<'input'>;\n\nexport const Slider: React.FC<SliderProps> = ({\n variant = 'slider',\n className,\n ...props\n}) => {\n const classNames = useStyles({\n variant: `form.${variant}`,\n css: {\n verticalAlign: 'middle',\n },\n className,\n });\n\n return <input type=\"range\" className={classNames} {...props} />;\n};\n","import React from 'react';\nimport { Exclamation } from '@marigold/icons';\nimport { ComponentProps } from '@marigold/types';\n\nimport { ValidationMessage } from '../ValidationMessage';\nimport { Label } from '../Label';\nimport { Box } from '../Box';\n\nexport type TextareaProps = {\n variant?: string;\n label?: string;\n htmlFor?: string;\n required?: boolean;\n error?: boolean;\n errorMessage?: string;\n} & ComponentProps<'textarea'>;\n\nexport const Textarea: React.FC<TextareaProps> = ({\n variant = 'default',\n htmlFor = 'textarea',\n label,\n error,\n errorMessage,\n required,\n className = '',\n children,\n ...props\n}) => (\n <Box>\n {label && (\n <Label htmlFor={htmlFor} required={required}>\n {label}\n </Label>\n )}\n <Box\n as=\"textarea\"\n {...props}\n display=\"block\"\n variant={`textarea.${variant}`}\n css={{ outlineColor: error && 'error' }}\n className={className}\n />\n {error && errorMessage && (\n <ValidationMessage>\n <Exclamation size={16} />\n {errorMessage}\n </ValidationMessage>\n )}\n </Box>\n);\n"],"names":["Box","forwardRef","ref","variant","as","css","children","className","display","height","width","minWidth","maxWidth","position","top","bottom","right","left","zIndex","p","px","py","pt","pb","pl","pr","m","mx","my","mt","mb","ml","mr","flexDirection","flexWrap","flexShrink","flexGrow","alignItems","justifyContent","bg","border","borderRadius","boxShadow","opacity","overflow","transition","props","React","Element","ICON_MAP","success","Check","warning","Notification","error","Exclamation","Button","size","disabled","useButton","elementType","isDisabled","buttonProps","CheckboxChecked","SVG","viewBox","fill","x","y","rx","fillRule","clipRule","d","CheckboxUnchecked","Label","required","Required","color","ValidationMessage","CheckboxIcon","checked","CheckboxInput","type","transform","Array","isArray","map","v","Heading","ModalDialog","useRef","useOverlay","overlayProps","underlayProps","usePreventScroll","modalProps","useModal","dialogProps","useDialog","FocusScope","contain","restoreFocus","autoFocus","Input","Text","align","cursor","outline","userSelect","textAlign","Link","useLink","linkProps","RadioChecked","cx","cy","r","RadioUnchecked","RadioIcon","RadioInput","Option","item","state","useState","setDisabled","useOption","key","optionProps","isSelected","useEffect","disabledKeys","values","rendered","ListBoxSection","section","useListBoxSection","heading","headingProps","groupProps","itemProps","childNodes","node","ListBox","useListBox","listStyle","listBoxProps","collection","Popover","isOpen","onClose","otherProps","shouldCloseOnBlur","isDismissable","OverlayContainer","mergeProps","DismissButton","onDismiss","ALIGNMENT","center","space","verticalAlignment","childStyle","marginBottom","marginRight","Children","flattenChildren","child","i","count","undefined","Icon","bgColor","borderColor","title","label","errorMessage","htmlFor","id","horizontalAlign","verticalAlign","columnItems","childClassNames","useStyles","justify","cloneElement","close","closeButtonRef","closeButtonProps","onPress","Close","show","ThemeProvider","theme","OverlayProvider","onClick","messageTitle","icon","Info","placeholder","useSelectState","overlayTriggerState","useOverlayTriggerState","triggerRef","overlayRef","useOverlayTrigger","positionProps","useOverlayPosition","targetRef","placement","shouldFlip","useSelect","labelProps","valueProps","menuProps","triggerProps","focusProps","useFocusRing","HiddenSelect","name","selectedItem","ArrowUp","ArrowDown","current","offsetWidth","classNames","outlineColor","openButtonRef","open","openButtonProps"],"mappings":"y5CA6DaA,EAAuDC,cAClE,WA+CEC,OA7CEC,IAAAA,YACAC,GAAAA,aAAK,QACLC,IAAAA,IACAC,IAAAA,SACAC,IAAAA,UACAC,IAAAA,QACAC,IAAAA,OACAC,IAAAA,MACAC,IAAAA,SACAC,IAAAA,SACAC,IAAAA,SACAC,IAAAA,IACAC,IAAAA,OACAC,IAAAA,MACAC,IAAAA,KACAC,IAAAA,OACAC,I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C/C,OAAK+C,EAAMyI,aAAalB,EAAO,GAAIA,EAAMxH,MAAMxC,iDiBjBP,oBAC/CH,QAAAA,aAAU,gBACV6K,QAAAA,aAAU,aACVF,IAAAA,MACAxH,IAAAA,MACAyH,IAAAA,aACApG,IAAAA,aACApE,UAAAA,aAAY,KAETuC,iBAEHC,gBAAC/C,OACE8K,GACC/H,gBAAC2B,GAAMsG,QAASA,EAASrG,SAAUA,GAChCmG,GAGL/H,gBAAC/C,iBACCI,GAAG,YACC0C,GACJtC,QAAQ,QACRL,oBAAqBA,EACrBE,IAAK,CAAE4N,aAAc3K,GAAS,SAC9B/C,UAAWA,KAEZ+C,GAASyH,GACRhI,gBAAC+B,OACC/B,gBAACQ,eAAYE,KAAM,KAClBsH,8DXuB2B,eAC5BrD,EAAQ+E,yBAAuB,IAC/ByB,EAAgBnL,EAAM2C,WACa/B,YACvC,CACEiI,QAAS,kBAAMlE,EAAMyG,SAEvBD,SAGK,CACLxG,MAAAA,EACA0G,kBATMtK,YAUNoK,cAAAA"}
|
|
1
|
+
{"version":3,"file":"components.cjs.production.min.js","sources":["../src/Inline/Inline.tsx","../src/Stack/Stack.tsx","../src/Alert/Alert.tsx","../src/Button/Button.tsx","../src/Checkbox/CheckboxIcons.tsx","../src/Label/Label.tsx","../src/ValidationMessage/ValidationMessage.tsx","../src/Checkbox/Checkbox.tsx","../src/Column/Column.tsx","../src/Columns/Columns.tsx","../src/Text/Text.tsx","../src/Dialog/ModalDialog.tsx","../src/Input/Input.tsx","../src/Link/Link.tsx","../src/Radio/RadioIcons.tsx","../src/Radio/Radio.tsx","../src/Select/Option.tsx","../src/Select/ListBoxSection.tsx","../src/Select/ListBox.tsx","../src/Select/Popover.tsx","../src/ActionGroup/ActionGroup.tsx","../src/Badge/Badge.tsx","../src/Card/Card.tsx","../src/Container/Container.tsx","../src/Dialog/Dialog.tsx","../src/Divider/Divider.tsx","../src/Field/Field.tsx","../src/Image/Image.tsx","../src/Provider/MarigoldProvider.tsx","../src/Menu/Menu.tsx","../src/MenuItem/MenuItem.tsx","../src/Message/Message.tsx","../src/Select/Select.tsx","../src/Slider/Slider.tsx","../src/Textarea/Textarea.tsx"],"sourcesContent":["import React, { Children } from 'react';\nimport flattenChildren from 'react-keyed-flatten-children';\n\nimport { ResponsiveStyleValue } from '@marigold/system';\n\nimport { Box } from '../Box';\n\nexport type InlineProps = {\n space?: ResponsiveStyleValue<string>;\n align?: 'top' | 'center' | 'bottom';\n};\n\nconst ALIGNMENT = {\n top: 'flex-start',\n center: 'center',\n bottom: 'flex-end',\n};\n\nexport const Inline: React.FC<InlineProps> = ({\n space = 'none',\n align = 'center',\n children,\n ...props\n}) => (\n <Box\n display=\"inline-flex\"\n css={{ '> * + *': { pl: space } }}\n alignItems={ALIGNMENT[align]}\n {...props}\n >\n {Children.map(\n flattenChildren(children) as unknown as React.ReactElement,\n (child: React.ReactElement) => (\n <Box>{React.cloneElement(child, {}, child.props.children)}</Box>\n )\n )}\n </Box>\n);\n","import React, { Children } from 'react';\nimport flattenChildren from 'react-keyed-flatten-children';\n\nimport { ResponsiveStyleValue } from '@marigold/system';\n\nimport { Box } from '../Box';\n\nexport type StackProps = {\n space?: ResponsiveStyleValue<string>;\n align?: 'left' | 'right' | 'center';\n};\n\nconst ALIGNMENT = {\n left: 'flex-start',\n center: 'center',\n right: 'flex-end',\n};\n\nexport const Stack: React.FC<StackProps> = ({\n space = 'none',\n align = 'left',\n children,\n ...props\n}) => (\n <Box\n {...props}\n display=\"flex\"\n flexDirection=\"column\"\n alignItems={ALIGNMENT[align]}\n css={{ '> * + *': { pt: space } }}\n >\n {Children.map(\n flattenChildren(children) as unknown as React.ReactElement,\n (child: React.ReactElement) => (\n <Box>{React.cloneElement(child, {}, child.props.children)}</Box>\n )\n )}\n </Box>\n);\n","import React from 'react';\nimport { Exclamation, Check, Notification } from '@marigold/icons';\nimport { type ComponentProps } from '@marigold/types';\n\nimport { Box } from '../Box';\n\nconst ICON_MAP = {\n success: Check,\n warning: Notification,\n error: Exclamation,\n} as const;\n\nexport type AlertVariants = keyof typeof ICON_MAP;\n\n// Theme Extension\n// ---------------\nexport interface AlertThemeExtension<Value> {\n alert?: {\n [key in AlertVariants]?: Value;\n };\n}\n\n// Props\n// ---------------\nexport type AlertProps = {\n variant?: AlertVariants;\n} & ComponentProps<'div'>;\n\n// Component\n// ---------------\nexport const Alert: React.FC<AlertProps> = ({\n variant = 'success',\n children,\n ...props\n}) => {\n const Icon = ICON_MAP[variant];\n\n return (\n <Box {...props} display=\"flex\" variant={`alert.${variant}`}>\n <Box\n display=\"inline-block\"\n alignItems=\"center\"\n width=\"32px\"\n height=\"32px\"\n bg={variant}\n >\n <Box as={Icon} size={12} color=\"#fff\" bg={variant} m={10} />\n </Box>\n <Box mx=\"16px\">{children}</Box>\n </Box>\n );\n};\n","import React, { forwardRef, RefObject } from 'react';\nimport { useButton } from '@react-aria/button';\nimport {\n PolymorphicComponentWithRef,\n PolymorphicPropsWithRef,\n} from '@marigold/types';\n\nimport { Box, BoxOwnProps } from '../Box';\n\n// Theme Extension\n// ---------------\nexport interface ButtonThemeExtension<Value> {\n button?: {\n [key: string]: Value;\n };\n}\n\n// Props\n// ---------------\nexport type ButtonProps = PolymorphicPropsWithRef<BoxOwnProps, 'button'>;\n\n// Component\n// ---------------\nexport const Button: PolymorphicComponentWithRef<BoxOwnProps, 'button'> =\n forwardRef(\n (\n {\n as = 'button',\n variant = 'primary',\n size = 'large',\n space = 'none',\n disabled,\n children,\n className,\n ...props\n },\n ref\n ) => {\n const { buttonProps } = useButton(\n {\n ...props,\n elementType: typeof as === 'string' ? as : 'span',\n isDisabled: disabled,\n },\n ref as RefObject<HTMLSpanElement>\n );\n\n return (\n <Box\n {...buttonProps}\n {...props}\n as={as}\n display=\"inline-flex\"\n alignItems=\"center\"\n variant={[`button.${variant}`, `button.${size}`]}\n className={className}\n ref={ref}\n css={{ columnGap: space }}\n >\n {children}\n </Box>\n );\n }\n );\n","import React from 'react';\nimport { conditional, State, SVG } from '@marigold/system';\n\nimport { Box } from '../Box';\n\n// Checkbox Icon\n// ---------------\nexport type CheckboxIconProps = {\n variant?: string;\n checked?: boolean;\n disabled?: boolean;\n error?: boolean;\n children?: never;\n};\n\nexport const CheckboxIcon: React.FC<CheckboxIconProps> = ({\n variant = '',\n checked = false,\n disabled = false,\n error = false,\n}) => {\n const conditionalStates: State = disabled\n ? {\n disabled: disabled,\n }\n : {\n checked: checked,\n error: error,\n };\n\n return (\n <SVG\n width=\"16\"\n height=\"32\"\n viewBox=\"0 0 16 32\"\n fill=\"none\"\n aria-hidden=\"true\"\n >\n <Box\n as=\"rect\"\n x=\"0.5\"\n y=\"8.5\"\n width=\"15px\"\n height=\"15px\"\n rx=\"1.5\"\n variant={conditional(`checkbox.${variant}`, conditionalStates)}\n />\n {checked && (\n <Box\n __baseCSS={{ fill: 'gray00' }}\n as=\"path\"\n fillRule=\"evenodd\"\n clipRule=\"evenodd\"\n d=\"M13.9571 12.8338L12.4085 11.2852L6.08699 17.6007L3.59887 15.1126L2.04163 16.6588L6.08682 20.704L13.9571 12.8338Z\"\n />\n )}\n </SVG>\n );\n};\n","import React from 'react';\n\nimport { ComponentProps } from '@marigold/types';\nimport { Required } from '@marigold/icons';\nimport { ResponsiveStyleValue } from '@marigold/system';\n\nimport { Box } from '../Box';\n\n// Theme Extension\n// ---------------\nexport interface LabelThemeExtension<Value> {\n label?: {\n [key: string]: Value;\n };\n}\n\n// LabelBase\n// ---------------\nexport type LabelBaseProps = {\n htmlFor?: string;\n variant?: string;\n required?: boolean;\n color?: ResponsiveStyleValue<string>;\n} & ComponentProps<'label'>;\n\nexport const LabelBase: React.FC<LabelProps> = ({\n variant = 'above',\n required,\n color = 'text',\n children,\n ...props\n}) => {\n return (\n <Box\n {...props}\n as=\"label\"\n __baseCSS={{ color: color }}\n variant={`label.${variant}`}\n >\n {children}\n </Box>\n );\n};\n\n// Label\n// ---------------\nexport type LabelProps = {\n required?: boolean;\n} & LabelBaseProps;\n\nexport const Label: React.FC<LabelProps> = ({\n required,\n children,\n ...props\n}) => {\n return required ? (\n <Box as=\"span\" display=\"inline-flex\" alignItems=\"center\">\n <LabelBase {...props}>{children}</LabelBase>\n {required && <Box as={Required} size={16} css={{ color: 'error' }} />}\n </Box>\n ) : (\n <LabelBase {...props}>{children}</LabelBase>\n );\n};\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\n\nimport { Box } from '../Box';\n\n// Theme Extension\n// ---------------\nexport interface ValidationMessageThemeExtension<Value> {\n validation?: {\n [key: string]: Value;\n };\n}\n\n// Props\n// ---------------\nexport type ValidationMessageProps = {\n variant?: string;\n} & ComponentProps<'span'>;\n\n// Component\n// ---------------\nexport const ValidationMessage: React.FC<ValidationMessageProps> = ({\n variant = 'error',\n children,\n className,\n ...props\n}) => {\n return (\n <Box\n as=\"span\"\n display=\"flex\"\n alignItems=\"center\"\n variant={`validation.${variant}`}\n className={className}\n {...props}\n >\n {children}\n </Box>\n );\n};\n","import React from 'react';\nimport { useFocusRing } from '@react-aria/focus';\nimport { VisuallyHidden } from '@react-aria/visually-hidden';\nimport { useCheckbox } from '@react-aria/checkbox';\nimport { useToggleState } from '@react-stately/toggle';\nimport { ToggleProps } from '@react-types/checkbox';\n\nimport { ComponentProps } from '@marigold/types';\nimport { Exclamation } from '@marigold/icons';\n\nimport { CheckboxIcon, CheckboxIconProps } from './CheckboxIcons';\nimport { Box } from '../Box';\nimport { Label } from '../Label';\nimport { ValidationMessage } from '../ValidationMessage';\n\n// Theme Extension\n// ---------------\nexport interface CheckboxThemeExtension<Value> {\n checkbox?: {\n [key: string]: Value;\n };\n}\n\n// Checkbox Input\n// ---------------\ntype CheckboxInputProps = CheckboxIconProps &\n ToggleProps &\n ComponentProps<'input'>;\n\nconst CheckboxInput: React.FC<CheckboxInputProps> = ({ error, ...props }) => {\n const state = useToggleState(props);\n const ref = React.useRef<HTMLInputElement>(null);\n const { inputProps } = useCheckbox(props, state, ref);\n const { focusProps } = useFocusRing();\n\n return (\n <Box pr=\"xsmall\">\n <VisuallyHidden>\n <Box\n as=\"input\"\n type=\"checkbox\"\n disabled={props.disabled}\n {...inputProps}\n {...focusProps}\n ref={ref}\n {...props}\n />\n </VisuallyHidden>\n <CheckboxIcon\n checked={props.checked}\n variant={props.variant}\n disabled={props.disabled}\n error={error}\n />\n </Box>\n );\n};\n\n// Checkbox\n// ---------------\nexport type CheckboxProps = {\n id: string;\n label: string;\n required?: boolean;\n labelVariant?: string;\n error?: boolean;\n errorMessage?: string;\n} & CheckboxInputProps;\n\nexport const Checkbox: React.FC<CheckboxProps> = ({\n label,\n required,\n labelVariant = 'inline',\n error,\n errorMessage,\n ...props\n}) => {\n return (\n <>\n <Box\n as={Label}\n __baseCSS={{\n ':hover': { cursor: props.disabled ? 'not-allowed' : 'pointer' },\n }}\n htmlFor={props.id}\n required={required}\n variant={`label.${labelVariant}`}\n color={props.disabled ? 'disabled' : 'text'}\n >\n <Box as={CheckboxInput} error={error} {...props} />\n {label}\n </Box>\n {error && errorMessage && (\n <ValidationMessage>\n <Exclamation size={16} />\n {errorMessage}\n </ValidationMessage>\n )}\n </>\n );\n};\n","import React from 'react';\nimport { Box } from '../Box';\n\ntype WidthValues = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;\n\nexport type ColumnProps = {\n className?: string;\n width?: WidthValues | WidthValues[];\n};\n\nconst transform = (width: WidthValues | WidthValues[]) => {\n if (Array.isArray(width)) {\n return width.map(v => `${(v / 12) * 100}%`);\n }\n\n return `${(width / 12) * 100}%`;\n};\n\nexport const Column: React.FC<ColumnProps> = ({\n width = 12,\n children,\n ...props\n}) => (\n <Box {...props} width={transform(width)}>\n {children}\n </Box>\n);\n","import React, { Children } from 'react';\nimport { Box } from '../Box';\nimport flattenChildren from 'react-keyed-flatten-children';\nimport { ResponsiveStyleValue, useTheme } from '@marigold/system';\n\ntype ColumnsProps = {\n className?: string;\n space?: ResponsiveStyleValue<string>;\n horizontalAlign?: 'left' | 'right' | 'center';\n verticalAlign?: 'top' | 'bottom' | 'center';\n};\n\nconst useAlignment = (direction: string) => {\n switch (direction) {\n case 'right':\n return 'flex-end';\n case 'bottom':\n return 'flex-end';\n case 'center':\n return 'center';\n }\n return 'flex-start';\n};\n\nexport const Columns: React.FC<ColumnsProps> = ({\n space = 'none',\n horizontalAlign = 'left',\n verticalAlign = 'top',\n className,\n children,\n ...props\n}) => {\n const justifyContent = useAlignment(horizontalAlign);\n const alignItems = useAlignment(verticalAlign);\n\n /**\n * transform space string to space value from theme\n */\n const { css } = useTheme();\n const spaceObject = css({ space }) as Object;\n const spaceValue = Object.values(spaceObject)[0];\n\n return (\n <Box p={space} display=\"flex\" className={className}>\n <Box\n width={`calc(100% + ${spaceValue}px)`}\n m={`${-spaceValue / 2}px`}\n display=\"flex\"\n flexWrap=\"wrap\"\n alignItems={alignItems}\n justifyContent={justifyContent}\n {...props}\n >\n {Children.map(\n flattenChildren(children) as unknown as React.ReactElement,\n (child: React.ReactElement) => {\n return React.cloneElement(\n child,\n {},\n <Box css={{ p: `${spaceValue / 2}px` }}>\n {child.props.children}\n </Box>\n );\n }\n )}\n </Box>\n </Box>\n );\n};\n","import React, { forwardRef } from 'react';\nimport { ResponsiveStyleValue } from '@marigold/system';\nimport {\n PolymorphicComponentWithRef,\n PolymorphicPropsWithRef,\n} from '@marigold/types';\n\nimport { Box, BoxOwnProps } from '../Box';\n\n// Theme Extension\n// ---------------\nexport interface TextThemeExtension<Value> {\n text?: {\n [key: string]: Value;\n };\n}\n\n// Props\n// ---------------\nexport type TextOwnProps = {\n align?: ResponsiveStyleValue<string>;\n color?: ResponsiveStyleValue<string>;\n cursor?: ResponsiveStyleValue<string>;\n outline?: ResponsiveStyleValue<string>;\n userSelect?: ResponsiveStyleValue<string>;\n} & BoxOwnProps;\n\nexport type TextProps = PolymorphicPropsWithRef<TextOwnProps, 'span'>;\n\n// Component\n// ---------------\nexport const Text: PolymorphicComponentWithRef<TextOwnProps, 'span'> =\n forwardRef(\n (\n {\n as = 'span',\n variant = 'body',\n children,\n className,\n align,\n color,\n cursor,\n outline,\n userSelect,\n ...props\n },\n ref\n ) => (\n <Box\n {...props}\n as={as}\n variant={`text.${variant}`}\n css={{ textAlign: align, color, cursor, outline, userSelect }}\n className={className}\n ref={ref}\n >\n {children}\n </Box>\n )\n );\n","import React, { RefObject } from 'react';\nimport {\n useOverlay,\n usePreventScroll,\n useModal,\n OverlayProps,\n} from '@react-aria/overlays';\nimport { useDialog } from '@react-aria/dialog';\nimport { FocusScope } from '@react-aria/focus';\nimport { AriaDialogProps } from '@react-types/dialog';\n\nimport { Box } from '../Box';\n\n// Props\n// ---------------\nexport type ModalDialogProps = {\n variant?: string;\n backdropVariant?: string;\n} & OverlayProps &\n AriaDialogProps;\n\n// Component\n// ---------------\nexport const ModalDialog: React.FC<ModalDialogProps> = ({\n variant,\n backdropVariant = 'backdrop',\n children,\n ...props\n}) => {\n const { isDismissable, isOpen, onClose, ...restProps } = props;\n\n // Handle interacting outside the dialog and pressing\n // the Escape key to close the modal.\n const ref = React.useRef<HTMLElement>() as RefObject<HTMLElement>;\n const { overlayProps, underlayProps } = useOverlay(\n { isDismissable, isOpen, onClose },\n ref\n );\n\n // Prevent scrolling while the modal is open, and hide content\n // outside the modal from screen readers.\n usePreventScroll();\n\n const { modalProps } = useModal();\n const { dialogProps } = useDialog(props, ref);\n\n return (\n <Box\n __baseCSS={{\n display: 'grid',\n placeItems: 'center',\n position: 'fixed',\n zIndex: 100,\n top: 0,\n left: 0,\n bottom: 0,\n right: 0,\n }}\n variant={`dialog.${backdropVariant}`}\n {...underlayProps}\n >\n <FocusScope contain restoreFocus autoFocus>\n <Box\n {...overlayProps}\n {...dialogProps}\n {...modalProps}\n ref={ref}\n variant={variant ? `dialog.${variant}` : `dialog`}\n {...restProps}\n >\n {children}\n </Box>\n </FocusScope>\n </Box>\n );\n};\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\nimport { Box } from '../Box';\n\n// Theme Extension\n// ---------------\nexport interface InputThemeExtension<Value> {\n input?: {\n [key: string]: Value;\n };\n}\n\n// Props\n// ---------------\nexport type InputProps = {\n variant?: string;\n} & ComponentProps<'input'>;\n\n// Component\n// ---------------\nexport const Input: React.FC<InputProps> = ({\n variant = '',\n type = 'text',\n ...props\n}) => <Box {...props} as=\"input\" type={type} variant={`input.${variant}`} />;\n","import React, { useRef } from 'react';\nimport { useLink } from '@react-aria/link';\nimport { PolymorphicComponent, PolymorphicProps } from '@marigold/types';\n\nimport { Text, TextOwnProps } from '../Text';\n\n// Theme Extension\n// ---------------\nexport interface LinkThemeExtension<Value> {\n link?: Value;\n}\n\n// Props\n// ---------------\nexport type LinkOwnProps = { disabled?: boolean } & TextOwnProps;\nexport type LinkProps = PolymorphicProps<LinkOwnProps, 'a'>;\n\n// Component\n// ---------------\nexport const Link = (({\n as = 'a',\n variant = 'link',\n children,\n disabled,\n ...props\n}: LinkProps) => {\n const ref = useRef<any>();\n const { linkProps } = useLink(\n {\n ...props,\n elementType: typeof as === 'string' ? as : 'span',\n isDisabled: disabled,\n },\n ref\n );\n\n return (\n <Text {...props} {...linkProps} as={as} variant={variant} ref={ref}>\n {children}\n </Text>\n );\n}) as PolymorphicComponent<LinkOwnProps, 'a'>;\n","import React from 'react';\nimport { SVG } from '@marigold/system';\n\nimport { Box } from '../Box';\n\nexport const RadioChecked = ({ disabled = false, ...props }) => (\n <SVG width=\"16\" height=\"32\" viewBox=\"0 0 16 32\" fill=\"none\" {...props}>\n <Box\n as=\"circle\"\n cx=\"8\"\n cy=\"16\"\n r=\"7.5\"\n variant={disabled ? 'radio.checked.disabled' : 'radio.checked'}\n />\n <Box as=\"circle\" cx=\"8\" cy=\"16\" r=\"3\" variant=\"radio.checked.circle\" />\n </SVG>\n);\n\nexport const RadioUnchecked = ({\n disabled = false,\n error = false,\n ...props\n}) => (\n <SVG width=\"16\" height=\"32\" viewBox=\"0 0 16 32\" fill=\"none\" {...props}>\n <Box\n as=\"circle\"\n cx=\"8\"\n cy=\"16\"\n r=\"7.5\"\n variant={\n disabled\n ? 'radio.unchecked.disabled'\n : error\n ? 'radio.unchecked.error'\n : 'radio.unchecked'\n }\n />\n </SVG>\n);\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\nimport { Exclamation } from '@marigold/icons';\n\nimport { Box } from '../Box';\nimport { Label } from '../Label';\nimport { ValidationMessage } from '../ValidationMessage';\n\nimport { RadioChecked, RadioUnchecked } from './RadioIcons';\n\n// Theme Extension\n// ---------------\nexport interface RadioThemeExtension<Value> {\n radio?: {\n [key: string]: Value;\n };\n}\n\n// Radio Icon\n// ---------------\ntype RadioIconProps = {\n variant?: string;\n checked?: boolean;\n disabled?: boolean;\n error?: boolean;\n children?: never;\n};\n\nconst RadioIcon: React.FC<RadioIconProps> = ({\n variant,\n checked,\n disabled,\n error,\n}) => {\n if (checked) {\n return (\n <Box as={RadioChecked} variant={`radio.${variant}`} disabled={disabled} />\n );\n }\n return (\n <Box\n as={RadioUnchecked}\n variant={`radio.${variant}`}\n disabled={disabled}\n error={error}\n />\n );\n};\n\n// Radio Input\n// ---------------\ntype RadioInputProps = {\n variant?: string;\n error?: boolean;\n} & ComponentProps<'input'>;\n\nconst RadioInput: React.FC<RadioInputProps> = ({\n className,\n variant = '',\n error,\n ...props\n}) => (\n <Box display=\"inline-block\" className={className}>\n <Box\n as=\"input\"\n type=\"radio\"\n css={{\n position: 'absolute',\n opacity: 0,\n zIndex: -1,\n width: 1,\n height: 1,\n overflow: 'hidden',\n }}\n {...props}\n />\n <RadioIcon\n checked={props.checked}\n variant={variant}\n disabled={props.disabled}\n error={error}\n />\n </Box>\n);\n\n// Radio\n// ---------------\nexport type RadioProps = {\n id: string;\n label?: string;\n required?: boolean;\n labelVariant?: string;\n error?: boolean;\n errorMessage?: string;\n} & RadioInputProps;\n\nexport const Radio: React.FC<RadioProps> = ({\n label,\n required,\n labelVariant = 'inline',\n error,\n errorMessage,\n ...props\n}) => {\n if (label) {\n return (\n <>\n <Label\n htmlFor={props.id}\n required={required}\n variant={labelVariant}\n color={props.disabled ? 'disabled' : 'text'}\n >\n <Box as={RadioInput} pr=\"8px\" error={error} {...props} />\n {label}\n </Label>\n {error && errorMessage && (\n <ValidationMessage>\n <Exclamation size={16} />\n {errorMessage}\n </ValidationMessage>\n )}\n </>\n );\n }\n\n return <RadioInput {...props} />;\n};\n","import React, { useEffect, useRef, useState } from 'react';\nimport type { ListState } from '@react-stately/list';\nimport type { Node } from '@react-types/shared';\nimport { useOption } from '@react-aria/listbox';\n\nimport { Box } from '../Box';\n\ninterface OptionProps {\n item: Node<unknown>;\n state: ListState<unknown>;\n}\n\nexport const Option = ({ item, state }: OptionProps) => {\n const ref = useRef<HTMLLIElement>(null);\n const [disabled, setDisabled] = useState(false);\n const { optionProps, isSelected } = useOption(\n {\n key: item.key,\n },\n state,\n ref\n );\n\n useEffect(() => {\n for (const key of state.disabledKeys.values()) {\n if (key === item.key) {\n setDisabled(true);\n }\n }\n }, [state.disabledKeys, item.key]);\n\n return (\n <Box\n as=\"li\"\n {...optionProps}\n ref={ref}\n variant={\n isSelected\n ? 'select.option.selected'\n : disabled\n ? 'select.option.disabled'\n : 'select.option'\n }\n >\n {item.rendered}\n </Box>\n );\n};\n","import React from 'react';\nimport { useListBoxSection } from '@react-aria/listbox';\nimport type { ListState } from '@react-stately/list';\nimport type { Node } from '@react-types/shared';\n\nimport { Box } from '../Box';\nimport { Option } from './Option';\n\ninterface SectionProps {\n section: Node<unknown>;\n state: ListState<unknown>;\n}\n\nexport const ListBoxSection = ({ section, state }: SectionProps) => {\n const { itemProps, headingProps, groupProps } = useListBoxSection({\n heading: section.rendered,\n 'aria-label': section['aria-label'],\n });\n\n return (\n <Box\n as=\"li\"\n {...itemProps}\n css={{\n cursor: 'not-allowed',\n }}\n >\n {section.rendered && (\n <Box as=\"span\" {...headingProps} variant={'select.section'}>\n {section.rendered}\n </Box>\n )}\n <Box as=\"ul\" {...groupProps}>\n {[...section.childNodes].map(node => (\n <Option key={node.key} item={node} state={state} />\n ))}\n </Box>\n </Box>\n );\n};\n","import React, { useRef } from 'react';\nimport { useListBox } from '@react-aria/listbox';\nimport type { AriaListBoxOptions } from '@react-aria/listbox';\nimport type { ListState } from '@react-stately/list';\n\nimport { Box } from '../Box';\nimport { Option } from './Option';\nimport { ListBoxSection } from './ListBoxSection';\n\ninterface ListBoxProps extends AriaListBoxOptions<unknown> {\n state: ListState<unknown>;\n error?: boolean;\n}\n\nexport const ListBox = (props: ListBoxProps) => {\n const ref = useRef<HTMLUListElement>(null);\n const { state, error } = props;\n const { listBoxProps } = useListBox(props, state, ref);\n\n return (\n <Box\n as=\"ul\"\n p=\"none\"\n css={{\n listStyle: 'none',\n }}\n {...listBoxProps}\n variant={error ? 'select.listbox.error' : 'select.listbox'}\n ref={ref}\n >\n {[...state.collection].map(item =>\n item.type === 'section' ? (\n <ListBoxSection key={item.key} section={item} state={state} />\n ) : (\n <Option key={item.key} item={item} state={state} />\n )\n )}\n </Box>\n );\n};\n","import React, { forwardRef, RefObject } from 'react';\nimport { FocusScope } from '@react-aria/focus';\nimport {\n DismissButton,\n OverlayContainer,\n useModal,\n useOverlay,\n} from '@react-aria/overlays';\nimport { mergeProps } from '@react-aria/utils';\n\nimport { Box } from '../Box';\n\ninterface PopoverProps {\n isOpen?: boolean;\n onClose?: () => void;\n ref?: React.Ref<HTMLDivElement>;\n className?: string;\n}\n\nexport const Popover: React.FC<PopoverProps> = forwardRef(\n ({ children, className, isOpen, onClose, ...otherProps }, ref) => {\n // Handle events that should cause the popup to close,\n const { overlayProps } = useOverlay(\n {\n isOpen,\n onClose,\n shouldCloseOnBlur: true,\n isDismissable: true,\n },\n ref as RefObject<HTMLElement>\n );\n // Hide content outside the modal from screen readers.\n const { modalProps } = useModal();\n\n return (\n <OverlayContainer>\n <FocusScope restoreFocus>\n <Box\n {...mergeProps(overlayProps, otherProps, modalProps)}\n className={className}\n ref={ref}\n >\n {children}\n <DismissButton onDismiss={onClose} />\n </Box>\n </FocusScope>\n </OverlayContainer>\n );\n }\n);\n","import React from 'react';\n\nimport { ResponsiveStyleValue } from '@marigold/system';\nimport { ComponentProps } from '@marigold/types';\n\nimport { Inline } from '../Inline';\nimport { Stack } from '../Stack';\n\n// Props\n// ---------------\nexport type ActionGroupProps = {\n space?: ResponsiveStyleValue<string>;\n verticalAlignment?: boolean;\n} & ComponentProps<'div'>;\n\n// Component\n// ---------------\nexport const ActionGroup: React.FC<ActionGroupProps> = ({\n space = 'none',\n verticalAlignment = false,\n children,\n ...props\n}) =>\n verticalAlignment ? (\n <Stack space={space} {...props}>\n {children}\n </Stack>\n ) : (\n <Inline space={space} {...props}>\n {children}\n </Inline>\n );\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\nimport { Box } from '../Box';\n\n// Theme Extension\n// ---------------\nexport interface BadgeThemeExtension<Value> {\n badge?: {\n [key: string]: Value;\n };\n}\n\n// Props\n// ---------------\nexport type BadgeProps = {\n variant?: string;\n bgColor?: string;\n borderColor?: string;\n} & ComponentProps<'div'>;\n\n// Component\n// ---------------\nexport const Badge: React.FC<BadgeProps> = ({\n variant = '',\n bgColor = 'transparent',\n borderColor = 'transparent',\n children,\n ...props\n}) => (\n <Box\n css={{ bg: bgColor, borderColor: borderColor }}\n variant={`badge.${variant}`}\n {...props}\n >\n {children}\n </Box>\n);\n","import React from 'react';\nimport { ResponsiveStyleValue } from '@marigold/system';\nimport { ComponentProps } from '@marigold/types';\n\nimport { Box } from '../Box';\n\n// Theme Extension\n// ---------------\nexport interface CardThemeExtension<Value> {\n card?: {\n [key: string]: Value;\n };\n}\n\n// Props\n// ---------------\nexport type CardProps = {\n title?: string;\n width?: ResponsiveStyleValue<string>;\n variant?: string;\n} & ComponentProps<'div'>;\n\n// Component\n// ---------------\nexport const Card: React.FC<CardProps> = ({\n variant = '',\n title,\n width,\n className,\n children,\n ...props\n}) => {\n return (\n <Box\n {...props}\n variant={`card.${variant}`}\n maxWidth={width}\n className={className}\n >\n {title && (\n <Box as=\"h2\" variant=\"text.h2\" pb=\"small\">\n {title}\n </Box>\n )}\n {children}\n </Box>\n );\n};\n","import React from 'react';\nimport { Box } from '../Box';\n\nexport type ContainerProps = {\n className?: string;\n title?: string; // Used for testing.\n};\n\nexport const Container: React.FC<ContainerProps> = ({ children, ...props }) => (\n <Box {...props} width=\"100%\">\n {children}\n </Box>\n);\n","import React, { RefObject } from 'react';\nimport { ComponentProps } from '@marigold/types';\nimport { useOverlayTriggerState } from '@react-stately/overlays';\nimport { OverlayContainer } from '@react-aria/overlays';\nimport { useButton } from '@react-aria/button';\nimport { Close } from '@marigold/icons';\n\nimport { Box } from '../Box';\nimport { Button } from '../Button';\nimport { Text } from '../Text';\n\nimport { ModalDialog, ModalDialogProps } from './ModalDialog';\n\n// Props\n// ---------------\nexport type DialogProps = {\n backdropVariant?: string;\n close: ComponentProps<typeof Button>['onClick'];\n isOpen: boolean;\n title?: string;\n variant?: string;\n} & ModalDialogProps &\n ComponentProps<'div'>;\n\n// Component\n// ---------------\nexport const Dialog: React.FC<DialogProps> = ({\n backdropVariant,\n children,\n className,\n close,\n isOpen,\n title,\n variant,\n ...props\n}) => {\n const closeButtonRef = React.useRef<HTMLElement>() as RefObject<HTMLElement>;\n\n // useButton ensures that focus management is handled correctly,\n // across all browsers. Focus is restored to the button once the\n // dialog closes.\n const { buttonProps: closeButtonProps } = useButton(\n {\n onPress: () => close(),\n },\n closeButtonRef\n );\n\n return (\n <OverlayContainer>\n <ModalDialog\n variant={variant}\n backdropVariant={backdropVariant}\n isOpen={isOpen}\n onClose={close}\n isDismissable\n {...props}\n >\n <Box\n __baseCSS={{\n display: 'flex',\n justifyContent: 'space-between',\n borderRadius: 'small',\n pl: 'large',\n pb: 'large',\n }}\n className={className}\n >\n <Box pt=\"medium\">\n {title && (\n <Text as=\"h4\" variant=\"headline4\">\n {title}\n </Text>\n )}\n {children}\n </Box>\n <Box\n __baseCSS={{\n display: 'flex',\n justifyContent: 'flex-end',\n alignItems: 'start',\n paddingTop: 'xsmall',\n paddingX: 'xsmall',\n }}\n >\n <Box\n as={Button}\n __baseCSS={{\n color: 'text',\n bg: 'transparent',\n lineHeight: 'xsmall',\n px: 'xxsmall',\n ':hover': {\n color: 'text',\n bg: 'transparent',\n cursor: 'pointer',\n },\n ':focus': {\n outline: 0,\n },\n }}\n {...closeButtonProps}\n ref={closeButtonRef}\n >\n <Close size={16} />\n </Box>\n </Box>\n </Box>\n </ModalDialog>\n </OverlayContainer>\n );\n};\n\n// get the overlayTriggerState and openButton props for using the dialog component\nexport const useDialogButtonProps = () => {\n const state = useOverlayTriggerState({});\n const openButtonRef = React.useRef<HTMLElement>() as RefObject<HTMLElement>;\n const { buttonProps: openButtonProps } = useButton(\n {\n onPress: () => state.open(),\n },\n openButtonRef\n );\n\n return {\n state,\n openButtonProps,\n openButtonRef,\n };\n};\n","import React from 'react';\nimport { Box } from '../Box';\n\n// Theme Extension\n// ---------------\nexport interface DividerThemeExtension<Value> {\n divider?: {\n [key: string]: Value;\n };\n}\n\n// Props\n// ---------------\nexport type DividerProps = {\n className?: string;\n variant?: string;\n title?: string; // Should only be used for testing.\n};\n\n// Component\n// ---------------\nexport const Divider: React.FC<DividerProps> = ({\n variant = 'regular',\n ...props\n}) => <Box {...props} as=\"hr\" variant={`divider.${variant}`} />;\n","import React from 'react';\nimport { Exclamation } from '@marigold/icons';\nimport { ComponentProps } from '@marigold/types';\n\nimport { Input } from '../Input';\nimport { Label } from '../Label';\nimport { ValidationMessage } from '../ValidationMessage';\n\n// Props\n// ---------------\nexport type FieldProps = {\n variant?: string;\n labelVariant?: string;\n htmlFor: string;\n label: string;\n required?: boolean;\n error?: boolean;\n errorMessage?: string;\n disabled?: boolean;\n} & ComponentProps<'input'>;\n\n// Component\n// ---------------\nexport const Field: React.FC<FieldProps> = ({\n type = 'text',\n variant = '',\n labelVariant = 'above',\n htmlFor,\n label,\n required,\n error,\n errorMessage,\n disabled,\n ...props\n}) => {\n return (\n <>\n <Label variant={labelVariant} htmlFor={htmlFor} required={required}>\n {label}\n </Label>\n <Input\n {...props}\n type={type}\n id={htmlFor}\n disabled={disabled}\n variant={variant}\n />\n {error && errorMessage && (\n <ValidationMessage>\n <Exclamation size={16} />\n {errorMessage}\n </ValidationMessage>\n )}\n </>\n );\n};\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\nimport { Box } from '../Box';\n\n// Theme Extension\n// ---------------\nexport interface ImageThemeExtension<Value> {\n image?: {\n [key: string]: Value;\n };\n}\n\n// Props\n// ---------------\nexport type ImageProps = {\n variant?: string;\n children?: never;\n} & ComponentProps<'img'>;\n\n// Component\n// ---------------\nexport const Image: React.FC<ImageProps> = ({\n variant = 'fullWidth',\n ...props\n}) => <Box {...props} as=\"img\" variant={`image.${variant}`} />;\n","import React from 'react';\nimport { OverlayProvider } from '@react-aria/overlays';\nimport {\n Theme,\n Global,\n ThemeProvider,\n ThemeProviderProps,\n useTheme,\n __defaultTheme,\n} from '@marigold/system';\n\n// Theme Extension\n// ---------------\nexport interface RootThemeExtension<Value> {\n root?: {\n body?: Value;\n html?: Value;\n };\n}\n\n// Props\n// ---------------\nexport interface MarigoldProviderProps<T extends Theme>\n extends ThemeProviderProps<T> {}\n\n// Provider\n// ---------------\nexport function MarigoldProvider<T extends Theme>({\n theme,\n children,\n}: MarigoldProviderProps<T>) {\n const outer = useTheme();\n const isTopLevel = outer.theme === __defaultTheme;\n\n return (\n <ThemeProvider theme={theme}>\n {isTopLevel ? (\n <>\n <Global />\n <OverlayProvider>{children}</OverlayProvider>\n </>\n ) : (\n children\n )}\n </ThemeProvider>\n );\n}\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\n\nimport { Button } from '../Button';\nimport { Box } from '../Box';\n\n// Theme Extension\n// ---------------\nexport interface MenuThemeExtension<Value> {\n menu?: Value;\n}\n\n// Props\n// ---------------\nexport type MenuProps = {\n variant?: string;\n label?: string;\n onClick: ComponentProps<typeof Button>['onClick'];\n show?: boolean;\n className?: string;\n title?: string; // For testing\n};\n\n// Component\n// ---------------\nexport const Menu: React.FC<MenuProps> = ({\n variant = 'default',\n label = 'Menu',\n onClick,\n show = false,\n children,\n ...props\n}) => {\n return (\n <Box variant={`menu.${variant}`} {...props}>\n <Button onClick={onClick} variant=\"menu\">\n {label}\n </Button>\n {show ? (\n <Box\n display=\"block\"\n position=\"absolute\"\n minWidth=\"120px\"\n borderRadius=\"2px\"\n >\n {children}\n </Box>\n ) : null}\n </Box>\n );\n};\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\nimport { Link } from '../Link';\nimport { Box } from '../Box';\n\n// Theme Extension\n// ---------------\nexport interface MenuItemThemeExtension<Value> {\n menuItem?: {\n [key: string]: Value;\n };\n}\n\n// Props\n// ---------------\nexport type MenuItemProps = {\n variant?: string;\n} & ComponentProps<typeof Link>;\n\n// Component\n// ---------------\nexport const MenuItem: React.FC<MenuItemProps> = ({\n variant = 'default',\n className,\n children,\n ...props\n}) => {\n return (\n <Box variant={`menuItem.${variant}`} className={className}>\n <Link variant=\"menuItemLink\" {...props}>\n {children}\n </Link>\n </Box>\n );\n};\n","import React from 'react';\nimport { Exclamation, Info, Notification } from '@marigold/icons';\nimport { ComponentProps } from '@marigold/types';\nimport { Box } from '../Box';\nimport { Text } from '../Text';\n\n// Theme Extension\n// ---------------\nexport interface MessageThemeExtension<Value> {\n message?: {\n [key: string]: Value;\n };\n}\n\n// Props\n// ---------------\nexport type MessageProps = {\n messageTitle: string;\n variant?: string;\n} & ComponentProps<'div'>;\n\n// Component\n// ---------------\nexport const Message: React.FC<MessageProps> = ({\n messageTitle,\n variant = 'info',\n className,\n children,\n ...props\n}) => {\n var icon = <Info />;\n if (variant === 'warning') {\n icon = <Notification />;\n }\n if (variant === 'error') {\n icon = <Exclamation />;\n }\n\n return (\n <Box\n display=\"inline-block\"\n variant={`message.${variant}`}\n className={className}\n {...props}\n >\n <Box display=\"flex\" alignItems=\"center\" variant=\"message.title\">\n {icon}\n <Text as=\"h4\" variant=\"headline4\">\n {messageTitle}\n </Text>\n </Box>\n <Box css={{ color: 'black' }}>{children}</Box>\n </Box>\n );\n};\n","import React, { Ref, RefObject, useRef } from 'react';\nimport { useSelectState } from '@react-stately/select';\nimport { useButton } from '@react-aria/button';\nimport { mergeProps } from '@react-aria/utils';\nimport { useFocusRing } from '@react-aria/focus';\nimport { HiddenSelect, useSelect } from '@react-aria/select';\nimport type { AriaSelectProps } from '@react-types/select';\nimport { useOverlayTriggerState } from '@react-stately/overlays';\nimport { useOverlayTrigger, useOverlayPosition } from '@react-aria/overlays';\nimport { SingleSelection } from '@react-types/shared';\n\nimport { ComponentProps } from '@marigold/types';\nimport { ArrowDown, ArrowUp, Exclamation, Required } from '@marigold/icons';\nimport { ResponsiveStyleValue } from '@marigold/system';\n\nimport { Box } from '../Box';\nimport { Label } from '../Label';\nimport { ValidationMessage } from '../ValidationMessage';\nimport { ListBox } from './ListBox';\nimport { Popover } from './Popover';\n\n// Theme Extension\n// ---------------\nexport interface SelectThemeExtension<Value> {\n select?: {\n __default: Value;\n disabled?: Value;\n listbox?: {\n __default: Value;\n error?: Value;\n };\n section?: Value;\n option?: Value;\n };\n}\n\n// Props\n// ---------------\nexport type SelectProps = {\n labelVariant?: string;\n placeholder?: string;\n disabled?: boolean;\n required?: boolean;\n width?: ResponsiveStyleValue<number | string>;\n error?: boolean;\n errorMessage?: string;\n} & ComponentProps<'select'> &\n AriaSelectProps<object> &\n SingleSelection;\n\n// Component\n// ---------------\nexport const Select = ({\n labelVariant = 'above',\n placeholder = 'Select an option',\n disabled,\n required,\n error,\n errorMessage,\n width,\n className,\n ...props\n}: SelectProps) => {\n const state = useSelectState(props);\n const overlayTriggerState = useOverlayTriggerState({});\n const triggerRef = useRef<HTMLElement>() as RefObject<HTMLElement>;\n const overlayRef = useRef<HTMLDivElement>();\n\n // Get props for the overlay\n const { overlayProps } = useOverlayTrigger(\n { type: 'listbox' },\n overlayTriggerState,\n triggerRef\n );\n // Get popover positioning props relative to the trigger\n const { overlayProps: positionProps } = useOverlayPosition({\n targetRef: triggerRef,\n overlayRef: overlayRef as RefObject<HTMLElement>,\n placement: 'bottom',\n shouldFlip: false,\n isOpen: state.isOpen,\n onClose: state.close,\n });\n // Get props for child elements from useSelect\n const { labelProps, triggerProps, valueProps, menuProps } = useSelect(\n props,\n state,\n triggerRef\n );\n // Get props for the button based on the trigger props from useSelect\n const { buttonProps } = useButton(triggerProps, triggerRef);\n\n const { focusProps } = useFocusRing();\n\n return (\n <Box position=\"relative\" display=\"inline-block\" width={width && width}>\n {props.label && (\n <Box>\n <Label {...labelProps} htmlFor={labelProps.id} variant={labelVariant}>\n {required ? (\n <Box as=\"span\" display=\"inline-flex\" alignItems=\"center\">\n {props.label}\n <Box as={Required} size={16} css={{ color: 'error' }} />\n </Box>\n ) : (\n props.label\n )}\n </Label>\n </Box>\n )}\n <HiddenSelect\n state={state}\n triggerRef={triggerRef}\n label={props.label}\n name={props.name}\n isDisabled={disabled}\n />\n <Box\n as=\"button\"\n {...mergeProps(buttonProps, focusProps)}\n ref={triggerRef as RefObject<HTMLButtonElement>}\n variant={\n error && state.isOpen && !disabled\n ? 'button.select.errorOpened'\n : error\n ? 'button.select.error'\n : state.isOpen && !disabled\n ? 'button.select.open'\n : 'button.select'\n }\n disabled={disabled}\n className={className}\n >\n <Box\n as=\"span\"\n {...valueProps}\n variant={disabled ? 'select.disabled' : 'select'}\n >\n {state.selectedItem ? state.selectedItem.rendered : placeholder}\n </Box>\n {state.isOpen && !disabled ? (\n <Box as={ArrowUp} size={16} css={{ fill: 'text' }} />\n ) : (\n <Box\n as={ArrowDown}\n size={16}\n css={{ fill: disabled ? 'disabled' : 'text' }}\n />\n )}\n </Box>\n {state.isOpen && !disabled && (\n <Box\n as={Popover}\n {...overlayProps}\n {...positionProps}\n css={{\n width: triggerRef.current && triggerRef.current.offsetWidth + 'px',\n }}\n ref={overlayRef as Ref<HTMLDivElement>}\n isOpen={state.isOpen}\n onClose={state.close}\n >\n <ListBox error={error} {...menuProps} state={state} />\n </Box>\n )}\n {error && errorMessage && (\n <Box as=\"span\" display=\"inline-flex\" alignItems=\"center\">\n <Box as={Exclamation} size={16} css={{ color: 'error' }} />\n <ValidationMessage>{errorMessage}</ValidationMessage>\n </Box>\n )}\n </Box>\n );\n};\n","import React from 'react';\nimport { ComponentProps } from '@marigold/types';\n\nimport { Box } from '../Box';\n\n// Theme Extension\n// ---------------\nexport interface SliderThemeExtension<Value> {\n slider?: {\n [key: string]: Value;\n };\n}\n\n// Props\n// ---------------\nexport type SliderProps = {\n variant?: string;\n} & ComponentProps<'input'>;\n\n// Component\n// ---------------\nexport const Slider: React.FC<SliderProps> = ({\n variant = '',\n className,\n ...props\n}) => (\n <Box\n as=\"input\"\n type=\"range\"\n css={{ verticalAlign: 'middle' }}\n variant={`slider.${variant}`}\n className={className}\n {...props}\n />\n);\n","import React from 'react';\nimport { Exclamation } from '@marigold/icons';\nimport { ComponentProps } from '@marigold/types';\n\nimport { ValidationMessage } from '../ValidationMessage';\nimport { Label } from '../Label';\nimport { Box } from '../Box';\n\n// Theme Extension\n// ---------------\nexport interface TextareaThemeExtension<Value> {\n textarea?: {\n [key: string]: Value;\n };\n}\n\n// Props\n// ---------------\nexport type TextareaProps = {\n variant?: string;\n label?: string;\n htmlFor?: string;\n required?: boolean;\n error?: boolean;\n errorMessage?: string;\n} & ComponentProps<'textarea'>;\n\n// Component\n// ---------------\nexport const Textarea: React.FC<TextareaProps> = ({\n variant = '',\n htmlFor = 'textarea',\n label,\n error,\n errorMessage,\n required,\n className = '',\n children,\n ...props\n}) => (\n <Box>\n {label && (\n <Label htmlFor={htmlFor} required={required}>\n {label}\n </Label>\n )}\n <Box\n as=\"textarea\"\n {...props}\n display=\"block\"\n variant={`textarea.${variant}`}\n css={{ outlineColor: error && 'error' }}\n className={className}\n />\n {error && errorMessage && (\n <ValidationMessage>\n <Exclamation size={16} />\n {errorMessage}\n </ValidationMessage>\n )}\n </Box>\n);\n"],"names":["ALIGNMENT","top","center","bottom","Inline","space","align","children","props","React","Box","display","css","pl","alignItems","Children","map","flattenChildren","child","cloneElement","left","right","Stack","flexDirection","pt","ICON_MAP","success","Check","warning","Notification","error","Exclamation","Button","forwardRef","ref","as","variant","size","disabled","className","useButton","elementType","isDisabled","buttonProps","columnGap","CheckboxIcon","checked","SVG","width","height","viewBox","fill","x","y","rx","conditional","__baseCSS","fillRule","clipRule","d","LabelBase","required","color","Label","Required","ValidationMessage","CheckboxInput","state","useToggleState","useRef","inputProps","useCheckbox","useFocusRing","pr","VisuallyHidden","type","focusProps","transform","Array","isArray","v","useAlignment","direction","Text","cursor","outline","userSelect","textAlign","ModalDialog","backdropVariant","isDismissable","isOpen","onClose","restProps","useOverlay","overlayProps","underlayProps","usePreventScroll","modalProps","useModal","dialogProps","useDialog","placeItems","position","zIndex","FocusScope","contain","restoreFocus","autoFocus","Input","Link","useLink","linkProps","RadioChecked","cx","cy","r","RadioUnchecked","RadioIcon","RadioInput","opacity","overflow","Option","item","useState","setDisabled","useOption","key","optionProps","isSelected","useEffect","disabledKeys","values","rendered","ListBoxSection","section","useListBoxSection","heading","headingProps","groupProps","itemProps","childNodes","node","ListBox","useListBox","p","listStyle","listBoxProps","collection","Popover","otherProps","shouldCloseOnBlur","OverlayContainer","mergeProps","DismissButton","onDismiss","verticalAlignment","Icon","bg","m","mx","bgColor","borderColor","title","maxWidth","pb","label","labelVariant","errorMessage","htmlFor","id","horizontalAlign","verticalAlign","justifyContent","spaceObject","useTheme","spaceValue","Object","flexWrap","close","closeButtonRef","closeButtonProps","onPress","borderRadius","paddingTop","paddingX","lineHeight","px","Close","theme","outer","ThemeProvider","__defaultTheme","Global","OverlayProvider","onClick","show","minWidth","messageTitle","icon","Info","placeholder","useSelectState","overlayTriggerState","useOverlayTriggerState","triggerRef","overlayRef","useOverlayTrigger","positionProps","useOverlayPosition","targetRef","placement","shouldFlip","useSelect","labelProps","valueProps","menuProps","triggerProps","HiddenSelect","name","selectedItem","ArrowUp","ArrowDown","current","offsetWidth","outlineColor","openBut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