@traefik-labs/faency 12.3.3 → 12.3.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.themes.cjs.map +1 -1
- package/dist/components/Accordion/Accordion.themes.js.map +1 -1
- package/dist/components/AriaTable/AriaTable.cjs.map +1 -1
- package/dist/components/AriaTable/AriaTable.js.map +1 -1
- package/dist/components/Avatar/Avatar.cjs.map +1 -1
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/Avatar.vanilla.cjs.map +1 -1
- package/dist/components/Avatar/Avatar.vanilla.js.map +1 -1
- package/dist/components/Badge/Badge.cjs.map +1 -1
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Badge/Badge.themes.cjs.map +1 -1
- package/dist/components/Badge/Badge.themes.js.map +1 -1
- package/dist/components/Badge/Badge.vanilla.cjs.map +1 -1
- package/dist/components/Badge/Badge.vanilla.js.map +1 -1
- package/dist/components/Blockquote/Blockquote.vanilla.cjs.map +1 -1
- package/dist/components/Blockquote/Blockquote.vanilla.css.cjs +1 -0
- package/dist/components/Blockquote/Blockquote.vanilla.css.js +1 -0
- package/dist/components/Blockquote/Blockquote.vanilla.js.map +1 -1
- package/dist/components/Box/Box.vanilla.cjs.map +1 -1
- package/dist/components/Box/Box.vanilla.js.map +1 -1
- package/dist/components/Bubble/Bubble.vanilla.cjs.map +1 -1
- package/dist/components/Bubble/Bubble.vanilla.js.map +1 -1
- package/dist/components/Button/Button.cjs.map +1 -1
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/Button.themes.cjs.map +1 -1
- package/dist/components/Button/Button.themes.js.map +1 -1
- package/dist/components/Button/Button.vanilla.cjs.map +1 -1
- package/dist/components/Button/Button.vanilla.js.map +1 -1
- package/dist/components/ButtonSwitch/ButtonSwitch.themes.cjs.map +1 -1
- package/dist/components/ButtonSwitch/ButtonSwitch.themes.js.map +1 -1
- package/dist/components/ButtonSwitch/ButtonSwitch.vanilla.cjs.map +1 -1
- package/dist/components/ButtonSwitch/ButtonSwitch.vanilla.js.map +1 -1
- package/dist/components/Card/Card.cjs.map +1 -1
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Card/Card.themes.cjs.map +1 -1
- package/dist/components/Card/Card.themes.js.map +1 -1
- package/dist/components/Card/Card.vanilla.cjs.map +1 -1
- package/dist/components/Card/Card.vanilla.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.themes.cjs.map +1 -1
- package/dist/components/Checkbox/Checkbox.themes.js.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.cjs.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.js.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.themes.cjs.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.themes.js.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.vanilla.cjs.map +1 -1
- package/dist/components/CodeBlock/CodeBlock.vanilla.js.map +1 -1
- package/dist/components/CodeBlock/prism-extend.cjs.map +1 -1
- package/dist/components/CodeBlock/prism-extend.js.map +1 -1
- package/dist/components/Container/Container.vanilla.cjs.map +1 -1
- package/dist/components/Container/Container.vanilla.js.map +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.cjs.map +1 -1
- package/dist/components/DateTimePicker/DateTimePicker.js.map +1 -1
- package/dist/components/DateTimePickerInput/DateTimePickerInput.cjs.map +1 -1
- package/dist/components/DateTimePickerInput/DateTimePickerInput.js.map +1 -1
- package/dist/components/Dialog/Dialog.cjs.map +1 -1
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Dialog/Dialog.themes.cjs.map +1 -1
- package/dist/components/Dialog/Dialog.themes.js.map +1 -1
- package/dist/components/Elevation/Elevation.vanilla.cjs.map +1 -1
- package/dist/components/Elevation/Elevation.vanilla.js.map +1 -1
- package/dist/components/Flex/Flex.vanilla.cjs.map +1 -1
- package/dist/components/Flex/Flex.vanilla.js.map +1 -1
- package/dist/components/Grid/Grid.vanilla.cjs.map +1 -1
- package/dist/components/Grid/Grid.vanilla.js.map +1 -1
- package/dist/components/Heading/Heading.themes.cjs.map +1 -1
- package/dist/components/Heading/Heading.themes.js.map +1 -1
- package/dist/components/IconButton/IconButton.themes.cjs.map +1 -1
- package/dist/components/IconButton/IconButton.themes.js.map +1 -1
- package/dist/components/IconButton/IconButton.vanilla.cjs.map +1 -1
- package/dist/components/IconButton/IconButton.vanilla.js.map +1 -1
- package/dist/components/Image/Image.vanilla.cjs.map +1 -1
- package/dist/components/Image/Image.vanilla.js.map +1 -1
- package/dist/components/Input/Input.cjs.map +1 -1
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/Input/Input.themes.cjs.map +1 -1
- package/dist/components/Input/Input.themes.js.map +1 -1
- package/dist/components/Input/Input.vanilla.cjs.map +1 -1
- package/dist/components/Input/Input.vanilla.js.map +1 -1
- package/dist/components/Label/Label.vanilla.cjs.map +1 -1
- package/dist/components/Label/Label.vanilla.css.cjs +0 -1
- package/dist/components/Label/Label.vanilla.css.js +0 -1
- package/dist/components/Label/Label.vanilla.js.map +1 -1
- package/dist/components/Link/Link.themes.cjs.map +1 -1
- package/dist/components/Link/Link.themes.js.map +1 -1
- package/dist/components/List/List.cjs.map +1 -1
- package/dist/components/List/List.js.map +1 -1
- package/dist/components/List/List.themes.cjs.map +1 -1
- package/dist/components/List/List.themes.js.map +1 -1
- package/dist/components/Navigation/Navigation.cjs.map +1 -1
- package/dist/components/Navigation/Navigation.js.map +1 -1
- package/dist/components/Navigation/Navigation.themes.cjs.map +1 -1
- package/dist/components/Navigation/Navigation.themes.js.map +1 -1
- package/dist/components/NavigationTree/NavigationTreeContainer.cjs.map +1 -1
- package/dist/components/NavigationTree/NavigationTreeContainer.js.map +1 -1
- package/dist/components/NavigationTree/NavigationTreeDrawer.cjs.map +1 -1
- package/dist/components/NavigationTree/NavigationTreeDrawer.js.map +1 -1
- package/dist/components/NavigationTree/NavigationTreeItem.cjs.map +1 -1
- package/dist/components/NavigationTree/NavigationTreeItem.js.map +1 -1
- package/dist/components/Panel/Panel.vanilla.cjs.map +1 -1
- package/dist/components/Panel/Panel.vanilla.js.map +1 -1
- package/dist/components/Paragraph/Paragraph.cjs.map +1 -1
- package/dist/components/Paragraph/Paragraph.js.map +1 -1
- package/dist/components/Paragraph/Paragraph.vanilla.cjs.map +1 -1
- package/dist/components/Paragraph/Paragraph.vanilla.js.map +1 -1
- package/dist/components/Popover/Popover.cjs.map +1 -1
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/Radio/Radio.themes.cjs.map +1 -1
- package/dist/components/Radio/Radio.themes.js.map +1 -1
- package/dist/components/RadioAccordion/RadioAccordion.cjs.map +1 -1
- package/dist/components/RadioAccordion/RadioAccordion.js.map +1 -1
- package/dist/components/Select/Select.cjs.map +1 -1
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/Select.themes.cjs.map +1 -1
- package/dist/components/Select/Select.themes.js.map +1 -1
- package/dist/components/SidePanel/SidePanel.themes.cjs.map +1 -1
- package/dist/components/SidePanel/SidePanel.themes.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.themes.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.themes.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.vanilla.cjs.map +1 -1
- package/dist/components/Skeleton/Skeleton.vanilla.js.map +1 -1
- package/dist/components/Switch/Switch.themes.cjs.map +1 -1
- package/dist/components/Switch/Switch.themes.js.map +1 -1
- package/dist/components/Table/Table.cjs.map +1 -1
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Table/Table.themes.cjs.map +1 -1
- package/dist/components/Table/Table.themes.js.map +1 -1
- package/dist/components/Text/Text.themes.cjs.map +1 -1
- package/dist/components/Text/Text.themes.js.map +1 -1
- package/dist/components/TextField/TextField.cjs.map +1 -1
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/TextField/TextField.vanilla.cjs.map +1 -1
- package/dist/components/TextField/TextField.vanilla.js.map +1 -1
- package/dist/components/Textarea/Textarea.cjs.map +1 -1
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/Textarea/Textarea.themes.cjs.map +1 -1
- package/dist/components/Textarea/Textarea.themes.js.map +1 -1
- package/dist/components/Textarea/Textarea.vanilla.cjs.map +1 -1
- package/dist/components/Textarea/Textarea.vanilla.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.cjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.themes.cjs.map +1 -1
- package/dist/components/Tooltip/Tooltip.themes.js.map +1 -1
- package/dist/components/colorSchemeContext.cjs.map +1 -1
- package/dist/components/colorSchemeContext.js.map +1 -1
- package/dist/stitches.config.cjs.map +1 -1
- package/dist/stitches.config.js.map +1 -1
- package/dist/styles/cssProps.cjs.map +1 -1
- package/dist/styles/cssProps.js.map +1 -1
- package/dist/styles/themeContext.cjs.map +1 -1
- package/dist/styles/themeContext.js.map +1 -1
- package/dist/utils/deepMerge.cjs.map +1 -1
- package/dist/utils/deepMerge.js.map +1 -1
- package/package.json +22 -22
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.vanilla.cjs","names":[],"sources":["../../../components/Grid/Grid.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport React, { ElementType } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport type { Gap, GridAlign, GridFlow, GridJustify } from '../../styles/types';\nimport { gridRecipe } from './Grid.vanilla.css';\n\ninterface GridOwnProps extends CSSProps {\n align?: GridAlign;\n justify?: GridJustify;\n flow?: GridFlow;\n columns?: number;\n gap?: Gap;\n gapX?: Gap;\n gapY?: Gap;\n}\n\nexport type GridProps<C extends ElementType = 'div'> = PolymorphicComponentProps<C, GridOwnProps>;\ntype GridComponent = PolymorphicComponent<'div', GridProps<ElementType>>;\n\nexport const GridVanillaComponent = React.forwardRef(\n <C extends ElementType = 'div'>(\n {\n as,\n className,\n css,\n style,\n align,\n justify,\n flow,\n columns,\n gap,\n gapX,\n gapY,\n ...props\n }: GridProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'div';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const dynamicStyles: React.CSSProperties = {};\n\n // To support any value on the columns props\n if (columns !== undefined) {\n dynamicStyles.gridTemplateColumns = `repeat(${columns}, 1fr)`;\n }\n\n const mergedStyles = {\n ...cssStyles,\n ...dynamicStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = gridRecipe({ align, justify, flow, gap, gapX, gapY });\n\n return (\n <Component\n ref={ref}\n className={`${recipeClass} ${className || ''}`.trim()}\n style={mergedStyles}\n {...props}\n />\n );\n },\n);\n\nGridVanillaComponent.displayName = 'GridVanilla';\n\nexport const GridVanilla = GridVanillaComponent as GridComponent;\n"],"mappings":";;;;;;;;;AA0BA,IAAa,uBAAuB,MAAA,QAAM,YAEtC,EACE,IACA,WACA,KACA,OACA,OACA,SACA,MACA,SACA,KACA,MACA,MACA,GAAG,SAEL,QACG;CACH,MAAM,YAAY,MAAM;CAExB,MAAM,EAAE,WAAW,qBAAA,wBAAwB;CAE3C,MAAM,EAAE,OAAO,WAAW,SAAS,iBAAA,eAAe,KAAK,OAAO;CAE9D,MAAM,gBAAqC,EAAE;
|
|
1
|
+
{"version":3,"file":"Grid.vanilla.cjs","names":[],"sources":["../../../components/Grid/Grid.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport React, { ElementType } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport type { Gap, GridAlign, GridFlow, GridJustify } from '../../styles/types';\nimport { gridRecipe } from './Grid.vanilla.css';\n\ninterface GridOwnProps extends CSSProps {\n align?: GridAlign;\n justify?: GridJustify;\n flow?: GridFlow;\n columns?: number;\n gap?: Gap;\n gapX?: Gap;\n gapY?: Gap;\n}\n\nexport type GridProps<C extends ElementType = 'div'> = PolymorphicComponentProps<C, GridOwnProps>;\ntype GridComponent = PolymorphicComponent<'div', GridProps<ElementType>>;\n\nexport const GridVanillaComponent = React.forwardRef(\n <C extends ElementType = 'div'>(\n {\n as,\n className,\n css,\n style,\n align,\n justify,\n flow,\n columns,\n gap,\n gapX,\n gapY,\n ...props\n }: GridProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'div';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const dynamicStyles: React.CSSProperties = {};\n\n // To support any value on the columns props\n if (columns !== undefined) {\n dynamicStyles.gridTemplateColumns = `repeat(${columns}, 1fr)`;\n }\n\n const mergedStyles = {\n ...cssStyles,\n ...dynamicStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = gridRecipe({ align, justify, flow, gap, gapX, gapY });\n\n return (\n <Component\n ref={ref}\n className={`${recipeClass} ${className || ''}`.trim()}\n style={mergedStyles}\n {...props}\n />\n );\n },\n);\n\nGridVanillaComponent.displayName = 'GridVanilla';\n\nexport const GridVanilla = GridVanillaComponent as GridComponent;\n"],"mappings":";;;;;;;;;AA0BA,IAAa,uBAAuB,MAAA,QAAM,YAEtC,EACE,IACA,WACA,KACA,OACA,OACA,SACA,MACA,SACA,KACA,MACA,MACA,GAAG,SAEL,QACG;CACH,MAAM,YAAY,MAAM;CAExB,MAAM,EAAE,WAAW,qBAAA,wBAAwB;CAE3C,MAAM,EAAE,OAAO,WAAW,SAAS,iBAAA,eAAe,KAAK,OAAO;CAE9D,MAAM,gBAAqC,EAAE;CAG7C,IAAI,YAAY,KAAA,GACd,cAAc,sBAAsB,UAAU,QAAQ;CAGxD,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,GAAG;EACH,IAAA,GAAA,yBAAA,kBAAoB,KAAK;EAC1B;CAID,OACE,iBAAA,GAAA,kBAAA,KAAC,WAAD;EACO;EACL,WAAW,GALK,yBAAA,WAAW;GAAE;GAAO;GAAS;GAAM;GAAK;GAAM;GAAM,CAKtD,CAAY,GAAG,aAAa,KAAK,MAAM;EACrD,OAAO;EACP,GAAI;EACJ,CAAA;EAGP;AAED,qBAAqB,cAAc;AAEnC,IAAa,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Grid.vanilla.js","names":[],"sources":["../../../components/Grid/Grid.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport React, { ElementType } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport type { Gap, GridAlign, GridFlow, GridJustify } from '../../styles/types';\nimport { gridRecipe } from './Grid.vanilla.css';\n\ninterface GridOwnProps extends CSSProps {\n align?: GridAlign;\n justify?: GridJustify;\n flow?: GridFlow;\n columns?: number;\n gap?: Gap;\n gapX?: Gap;\n gapY?: Gap;\n}\n\nexport type GridProps<C extends ElementType = 'div'> = PolymorphicComponentProps<C, GridOwnProps>;\ntype GridComponent = PolymorphicComponent<'div', GridProps<ElementType>>;\n\nexport const GridVanillaComponent = React.forwardRef(\n <C extends ElementType = 'div'>(\n {\n as,\n className,\n css,\n style,\n align,\n justify,\n flow,\n columns,\n gap,\n gapX,\n gapY,\n ...props\n }: GridProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'div';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const dynamicStyles: React.CSSProperties = {};\n\n // To support any value on the columns props\n if (columns !== undefined) {\n dynamicStyles.gridTemplateColumns = `repeat(${columns}, 1fr)`;\n }\n\n const mergedStyles = {\n ...cssStyles,\n ...dynamicStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = gridRecipe({ align, justify, flow, gap, gapX, gapY });\n\n return (\n <Component\n ref={ref}\n className={`${recipeClass} ${className || ''}`.trim()}\n style={mergedStyles}\n {...props}\n />\n );\n },\n);\n\nGridVanillaComponent.displayName = 'GridVanilla';\n\nexport const GridVanilla = GridVanillaComponent as GridComponent;\n"],"mappings":";;;;;;;AA0BA,IAAa,uBAAuB,MAAM,YAEtC,EACE,IACA,WACA,KACA,OACA,OACA,SACA,MACA,SACA,KACA,MACA,MACA,GAAG,SAEL,QACG;CACH,MAAM,YAAY,MAAM;CAExB,MAAM,EAAE,WAAW,wBAAwB;CAE3C,MAAM,EAAE,OAAO,WAAW,SAAS,eAAe,KAAK,OAAO;CAE9D,MAAM,gBAAqC,EAAE;
|
|
1
|
+
{"version":3,"file":"Grid.vanilla.js","names":[],"sources":["../../../components/Grid/Grid.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport React, { ElementType } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport type { Gap, GridAlign, GridFlow, GridJustify } from '../../styles/types';\nimport { gridRecipe } from './Grid.vanilla.css';\n\ninterface GridOwnProps extends CSSProps {\n align?: GridAlign;\n justify?: GridJustify;\n flow?: GridFlow;\n columns?: number;\n gap?: Gap;\n gapX?: Gap;\n gapY?: Gap;\n}\n\nexport type GridProps<C extends ElementType = 'div'> = PolymorphicComponentProps<C, GridOwnProps>;\ntype GridComponent = PolymorphicComponent<'div', GridProps<ElementType>>;\n\nexport const GridVanillaComponent = React.forwardRef(\n <C extends ElementType = 'div'>(\n {\n as,\n className,\n css,\n style,\n align,\n justify,\n flow,\n columns,\n gap,\n gapX,\n gapY,\n ...props\n }: GridProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'div';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const dynamicStyles: React.CSSProperties = {};\n\n // To support any value on the columns props\n if (columns !== undefined) {\n dynamicStyles.gridTemplateColumns = `repeat(${columns}, 1fr)`;\n }\n\n const mergedStyles = {\n ...cssStyles,\n ...dynamicStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = gridRecipe({ align, justify, flow, gap, gapX, gapY });\n\n return (\n <Component\n ref={ref}\n className={`${recipeClass} ${className || ''}`.trim()}\n style={mergedStyles}\n {...props}\n />\n );\n },\n);\n\nGridVanillaComponent.displayName = 'GridVanilla';\n\nexport const GridVanilla = GridVanillaComponent as GridComponent;\n"],"mappings":";;;;;;;AA0BA,IAAa,uBAAuB,MAAM,YAEtC,EACE,IACA,WACA,KACA,OACA,OACA,SACA,MACA,SACA,KACA,MACA,MACA,GAAG,SAEL,QACG;CACH,MAAM,YAAY,MAAM;CAExB,MAAM,EAAE,WAAW,wBAAwB;CAE3C,MAAM,EAAE,OAAO,WAAW,SAAS,eAAe,KAAK,OAAO;CAE9D,MAAM,gBAAqC,EAAE;CAG7C,IAAI,YAAY,KAAA,GACd,cAAc,sBAAsB,UAAU,QAAQ;CAGxD,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,GAAG;EACH,GAAG,iBAAiB,KAAK;EAC1B;CAID,OACE,oBAAC,WAAD;EACO;EACL,WAAW,GALK,WAAW;GAAE;GAAO;GAAS;GAAM;GAAK;GAAM;GAAM,CAKtD,CAAY,GAAG,aAAa,KAAK,MAAM;EACrD,OAAO;EACP,GAAI;EACJ,CAAA;EAGP;AAED,qBAAqB,cAAc;AAEnC,IAAa,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.themes.cjs","names":[],"sources":["../../../components/Heading/Heading.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\nimport tinycolor from 'tinycolor2';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\n\nexport namespace Theme {\n type Colors = {\n headingDefault: Property.Color;\n };\n\n type Factory = (primaryColor: ColorInfo) => Colors;\n\n export const getLight: Factory = () => ({\n headingDefault: tinycolor('black').setAlpha(0.74).toHslString(),\n });\n\n export const getDark: Factory = () => ({\n headingDefault: tinycolor('white').setAlpha(0.74).toHslString(),\n });\n}\n"],"mappings":";;;;AAKO,IAAA;;
|
|
1
|
+
{"version":3,"file":"Heading.themes.cjs","names":[],"sources":["../../../components/Heading/Heading.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\nimport tinycolor from 'tinycolor2';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\n\nexport namespace Theme {\n type Colors = {\n headingDefault: Property.Color;\n };\n\n type Factory = (primaryColor: ColorInfo) => Colors;\n\n export const getLight: Factory = () => ({\n headingDefault: tinycolor('black').setAlpha(0.74).toHslString(),\n });\n\n export const getDark: Factory = () => ({\n headingDefault: tinycolor('white').setAlpha(0.74).toHslString(),\n });\n}\n"],"mappings":";;;;AAKO,IAAA;;CAOQ,OAAA,kBAA2B,EACtC,iBAAA,GAAA,WAAA,SAA0B,QAAQ,CAAC,SAAS,IAAK,CAAC,aAAa,EAChE;CAEY,OAAA,iBAA0B,EACrC,iBAAA,GAAA,WAAA,SAA0B,QAAQ,CAAC,SAAS,IAAK,CAAC,aAAa,EAChE;yBACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Heading.themes.js","names":[],"sources":["../../../components/Heading/Heading.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\nimport tinycolor from 'tinycolor2';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\n\nexport namespace Theme {\n type Colors = {\n headingDefault: Property.Color;\n };\n\n type Factory = (primaryColor: ColorInfo) => Colors;\n\n export const getLight: Factory = () => ({\n headingDefault: tinycolor('black').setAlpha(0.74).toHslString(),\n });\n\n export const getDark: Factory = () => ({\n headingDefault: tinycolor('white').setAlpha(0.74).toHslString(),\n });\n}\n"],"mappings":";;AAKO,IAAA;;
|
|
1
|
+
{"version":3,"file":"Heading.themes.js","names":[],"sources":["../../../components/Heading/Heading.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\nimport tinycolor from 'tinycolor2';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\n\nexport namespace Theme {\n type Colors = {\n headingDefault: Property.Color;\n };\n\n type Factory = (primaryColor: ColorInfo) => Colors;\n\n export const getLight: Factory = () => ({\n headingDefault: tinycolor('black').setAlpha(0.74).toHslString(),\n });\n\n export const getDark: Factory = () => ({\n headingDefault: tinycolor('white').setAlpha(0.74).toHslString(),\n });\n}\n"],"mappings":";;AAKO,IAAA;;CAOQ,OAAA,kBAA2B,EACtC,gBAAgB,UAAU,QAAQ,CAAC,SAAS,IAAK,CAAC,aAAa,EAChE;CAEY,OAAA,iBAA0B,EACrC,gBAAgB,UAAU,QAAQ,CAAC,SAAS,IAAK,CAAC,aAAa,EAChE;yBACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.themes.cjs","names":[],"sources":["../../../components/IconButton/IconButton.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\n\nexport namespace Theme {\n type Colors = {\n iconButtonBackground: Property.Color;\n iconButtonHoverBorder: Property.Color;\n iconButtonHoverBackground: Property.Color;\n iconButtonFocusBorder: Property.Color;\n };\n\n type Factory = (primaryColor?: ColorInfo) => Colors;\n\n export const getLight: Factory = () => ({\n iconButtonBackground: 'white',\n iconButtonHoverBorder: '$slate9',\n iconButtonHoverBackground: '$slateA3',\n iconButtonFocusBorder: '$slate10',\n });\n\n export const getDark: Factory = () => ({\n iconButtonBackground: '$deepBlue2',\n iconButtonHoverBorder: '$deepBlue6',\n iconButtonHoverBackground: '$slateA4',\n iconButtonFocusBorder: '$deepBlue7',\n });\n}\n"],"mappings":";AAIO,IAAA;;
|
|
1
|
+
{"version":3,"file":"IconButton.themes.cjs","names":[],"sources":["../../../components/IconButton/IconButton.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\n\nexport namespace Theme {\n type Colors = {\n iconButtonBackground: Property.Color;\n iconButtonHoverBorder: Property.Color;\n iconButtonHoverBackground: Property.Color;\n iconButtonFocusBorder: Property.Color;\n };\n\n type Factory = (primaryColor?: ColorInfo) => Colors;\n\n export const getLight: Factory = () => ({\n iconButtonBackground: 'white',\n iconButtonHoverBorder: '$slate9',\n iconButtonHoverBackground: '$slateA3',\n iconButtonFocusBorder: '$slate10',\n });\n\n export const getDark: Factory = () => ({\n iconButtonBackground: '$deepBlue2',\n iconButtonHoverBorder: '$deepBlue6',\n iconButtonHoverBackground: '$slateA4',\n iconButtonFocusBorder: '$deepBlue7',\n });\n}\n"],"mappings":";AAIO,IAAA;;CAUQ,OAAA,kBAA2B;EACtC,sBAAsB;EACtB,uBAAuB;EACvB,2BAA2B;EAC3B,uBAAuB;EACxB;CAEY,OAAA,iBAA0B;EACrC,sBAAsB;EACtB,uBAAuB;EACvB,2BAA2B;EAC3B,uBAAuB;EACxB;yBACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.themes.js","names":[],"sources":["../../../components/IconButton/IconButton.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\n\nexport namespace Theme {\n type Colors = {\n iconButtonBackground: Property.Color;\n iconButtonHoverBorder: Property.Color;\n iconButtonHoverBackground: Property.Color;\n iconButtonFocusBorder: Property.Color;\n };\n\n type Factory = (primaryColor?: ColorInfo) => Colors;\n\n export const getLight: Factory = () => ({\n iconButtonBackground: 'white',\n iconButtonHoverBorder: '$slate9',\n iconButtonHoverBackground: '$slateA3',\n iconButtonFocusBorder: '$slate10',\n });\n\n export const getDark: Factory = () => ({\n iconButtonBackground: '$deepBlue2',\n iconButtonHoverBorder: '$deepBlue6',\n iconButtonHoverBackground: '$slateA4',\n iconButtonFocusBorder: '$deepBlue7',\n });\n}\n"],"mappings":";AAIO,IAAA;;
|
|
1
|
+
{"version":3,"file":"IconButton.themes.js","names":[],"sources":["../../../components/IconButton/IconButton.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\n\nexport namespace Theme {\n type Colors = {\n iconButtonBackground: Property.Color;\n iconButtonHoverBorder: Property.Color;\n iconButtonHoverBackground: Property.Color;\n iconButtonFocusBorder: Property.Color;\n };\n\n type Factory = (primaryColor?: ColorInfo) => Colors;\n\n export const getLight: Factory = () => ({\n iconButtonBackground: 'white',\n iconButtonHoverBorder: '$slate9',\n iconButtonHoverBackground: '$slateA3',\n iconButtonFocusBorder: '$slate10',\n });\n\n export const getDark: Factory = () => ({\n iconButtonBackground: '$deepBlue2',\n iconButtonHoverBorder: '$deepBlue6',\n iconButtonHoverBackground: '$slateA4',\n iconButtonFocusBorder: '$deepBlue7',\n });\n}\n"],"mappings":";AAIO,IAAA;;CAUQ,OAAA,kBAA2B;EACtC,sBAAsB;EACtB,uBAAuB;EACvB,2BAA2B;EAC3B,uBAAuB;EACxB;CAEY,OAAA,iBAA0B;EACrC,sBAAsB;EACtB,uBAAuB;EACvB,2BAA2B;EAC3B,uBAAuB;EACxB;yBACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.vanilla.cjs","names":[],"sources":["../../../components/IconButton/IconButton.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { iconButtonRecipe } from './IconButton.vanilla.css';\n\ntype IconButtonRecipeVariants = RecipeVariants<typeof iconButtonRecipe>;\n\ninterface IconButtonOwnProps extends Omit<IconButtonRecipeVariants, never>, CSSProps {}\n\nexport type IconButtonVanillaProps<C extends ElementType = 'button'> = PolymorphicComponentProps<\n C,\n IconButtonOwnProps\n>;\n\ntype IconButtonVanillaComponent = PolymorphicComponent<\n 'button',\n IconButtonVanillaProps<ElementType>\n>;\n\nconst IconButtonVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'button'>(\n { as, className, css, style, size, variant, ...props }: IconButtonVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'button';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = iconButtonRecipe({ size, variant });\n\n return (\n <Component\n ref={ref}\n className={`${recipeClass} ${className || ''}`.trim()}\n style={mergedStyles}\n {...props}\n />\n );\n },\n);\n\nIconButtonVanillaComponentImpl.displayName = 'IconButtonVanilla';\n\nexport const IconButtonVanilla = IconButtonVanillaComponentImpl as IconButtonVanillaComponent;\n"],"mappings":";;;;;;;;AA2BA,IAAM,kCAAA,GAAA,MAAA,aAEF,EAAE,IAAI,WAAW,KAAK,OAAO,MAAM,SAAS,GAAG,SAC/C,QACG;CACH,MAAM,YAAY,MAAM;CAExB,MAAM,EAAE,WAAW,qBAAA,wBAAwB;CAE3C,MAAM,EAAE,OAAO,WAAW,SAAS,iBAAA,eAAe,KAAK,OAAO;CAE9D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,IAAA,GAAA,yBAAA,kBAAoB,KAAK;EAC1B;
|
|
1
|
+
{"version":3,"file":"IconButton.vanilla.cjs","names":[],"sources":["../../../components/IconButton/IconButton.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { iconButtonRecipe } from './IconButton.vanilla.css';\n\ntype IconButtonRecipeVariants = RecipeVariants<typeof iconButtonRecipe>;\n\ninterface IconButtonOwnProps extends Omit<IconButtonRecipeVariants, never>, CSSProps {}\n\nexport type IconButtonVanillaProps<C extends ElementType = 'button'> = PolymorphicComponentProps<\n C,\n IconButtonOwnProps\n>;\n\ntype IconButtonVanillaComponent = PolymorphicComponent<\n 'button',\n IconButtonVanillaProps<ElementType>\n>;\n\nconst IconButtonVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'button'>(\n { as, className, css, style, size, variant, ...props }: IconButtonVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'button';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = iconButtonRecipe({ size, variant });\n\n return (\n <Component\n ref={ref}\n className={`${recipeClass} ${className || ''}`.trim()}\n style={mergedStyles}\n {...props}\n />\n );\n },\n);\n\nIconButtonVanillaComponentImpl.displayName = 'IconButtonVanilla';\n\nexport const IconButtonVanilla = IconButtonVanillaComponentImpl as IconButtonVanillaComponent;\n"],"mappings":";;;;;;;;AA2BA,IAAM,kCAAA,GAAA,MAAA,aAEF,EAAE,IAAI,WAAW,KAAK,OAAO,MAAM,SAAS,GAAG,SAC/C,QACG;CACH,MAAM,YAAY,MAAM;CAExB,MAAM,EAAE,WAAW,qBAAA,wBAAwB;CAE3C,MAAM,EAAE,OAAO,WAAW,SAAS,iBAAA,eAAe,KAAK,OAAO;CAE9D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,IAAA,GAAA,yBAAA,kBAAoB,KAAK;EAC1B;CAID,OACE,iBAAA,GAAA,kBAAA,KAAC,WAAD;EACO;EACL,WAAW,GALK,+BAAA,iBAAiB;GAAE;GAAM;GAAS,CAKpC,CAAY,GAAG,aAAa,KAAK,MAAM;EACrD,OAAO;EACP,GAAI;EACJ,CAAA;EAGP;AAED,+BAA+B,cAAc;AAE7C,IAAa,oBAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IconButton.vanilla.js","names":[],"sources":["../../../components/IconButton/IconButton.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { iconButtonRecipe } from './IconButton.vanilla.css';\n\ntype IconButtonRecipeVariants = RecipeVariants<typeof iconButtonRecipe>;\n\ninterface IconButtonOwnProps extends Omit<IconButtonRecipeVariants, never>, CSSProps {}\n\nexport type IconButtonVanillaProps<C extends ElementType = 'button'> = PolymorphicComponentProps<\n C,\n IconButtonOwnProps\n>;\n\ntype IconButtonVanillaComponent = PolymorphicComponent<\n 'button',\n IconButtonVanillaProps<ElementType>\n>;\n\nconst IconButtonVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'button'>(\n { as, className, css, style, size, variant, ...props }: IconButtonVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'button';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = iconButtonRecipe({ size, variant });\n\n return (\n <Component\n ref={ref}\n className={`${recipeClass} ${className || ''}`.trim()}\n style={mergedStyles}\n {...props}\n />\n );\n },\n);\n\nIconButtonVanillaComponentImpl.displayName = 'IconButtonVanilla';\n\nexport const IconButtonVanilla = IconButtonVanillaComponentImpl as IconButtonVanillaComponent;\n"],"mappings":";;;;;;;AA2BA,IAAM,iCAAiC,YAEnC,EAAE,IAAI,WAAW,KAAK,OAAO,MAAM,SAAS,GAAG,SAC/C,QACG;CACH,MAAM,YAAY,MAAM;CAExB,MAAM,EAAE,WAAW,wBAAwB;CAE3C,MAAM,EAAE,OAAO,WAAW,SAAS,eAAe,KAAK,OAAO;CAE9D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,GAAG,iBAAiB,KAAK;EAC1B;
|
|
1
|
+
{"version":3,"file":"IconButton.vanilla.js","names":[],"sources":["../../../components/IconButton/IconButton.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { iconButtonRecipe } from './IconButton.vanilla.css';\n\ntype IconButtonRecipeVariants = RecipeVariants<typeof iconButtonRecipe>;\n\ninterface IconButtonOwnProps extends Omit<IconButtonRecipeVariants, never>, CSSProps {}\n\nexport type IconButtonVanillaProps<C extends ElementType = 'button'> = PolymorphicComponentProps<\n C,\n IconButtonOwnProps\n>;\n\ntype IconButtonVanillaComponent = PolymorphicComponent<\n 'button',\n IconButtonVanillaProps<ElementType>\n>;\n\nconst IconButtonVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'button'>(\n { as, className, css, style, size, variant, ...props }: IconButtonVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'button';\n\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = iconButtonRecipe({ size, variant });\n\n return (\n <Component\n ref={ref}\n className={`${recipeClass} ${className || ''}`.trim()}\n style={mergedStyles}\n {...props}\n />\n );\n },\n);\n\nIconButtonVanillaComponentImpl.displayName = 'IconButtonVanilla';\n\nexport const IconButtonVanilla = IconButtonVanillaComponentImpl as IconButtonVanillaComponent;\n"],"mappings":";;;;;;;AA2BA,IAAM,iCAAiC,YAEnC,EAAE,IAAI,WAAW,KAAK,OAAO,MAAM,SAAS,GAAG,SAC/C,QACG;CACH,MAAM,YAAY,MAAM;CAExB,MAAM,EAAE,WAAW,wBAAwB;CAE3C,MAAM,EAAE,OAAO,WAAW,SAAS,eAAe,KAAK,OAAO;CAE9D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,GAAG,iBAAiB,KAAK;EAC1B;CAID,OACE,oBAAC,WAAD;EACO;EACL,WAAW,GALK,iBAAiB;GAAE;GAAM;GAAS,CAKpC,CAAY,GAAG,aAAa,KAAK,MAAM;EACrD,OAAO;EACP,GAAI;EACJ,CAAA;EAGP;AAED,+BAA+B,cAAc;AAE7C,IAAa,oBAAoB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.vanilla.cjs","names":[],"sources":["../../../components/Image/Image.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { image } from './Image.vanilla.css';\n\nexport type ImageVanillaProps<C extends ElementType = 'img'> = PolymorphicComponentProps<\n C,\n CSSProps\n>;\n\ntype ImageVanillaComponent = PolymorphicComponent<'img', ImageVanillaProps<ElementType>>;\n\nconst ImageVanillaImpl = forwardRef(\n <C extends ElementType = 'img'>(\n { as, className, css, style, ...props }: ImageVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'img';\n const { colors } = useVanillaExtractTheme();\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n return (\n <Component\n ref={ref}\n className={`${image} ${className || ''}`.trim()}\n style={mergedStyles}\n {...props}\n />\n );\n },\n);\n\nImageVanillaImpl.displayName = 'ImageVanilla';\n\nexport const ImageVanilla = ImageVanillaImpl as ImageVanillaComponent;\n"],"mappings":";;;;;;;;AAmBA,IAAM,oBAAA,GAAA,MAAA,aAEF,EAAE,IAAI,WAAW,KAAK,OAAO,GAAG,SAChC,QACG;CACH,MAAM,YAAY,MAAM;CACxB,MAAM,EAAE,WAAW,qBAAA,wBAAwB;CAC3C,MAAM,EAAE,OAAO,WAAW,SAAS,iBAAA,eAAe,KAAK,OAAO;CAE9D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,IAAA,GAAA,yBAAA,kBAAoB,KAAK;EAC1B;
|
|
1
|
+
{"version":3,"file":"Image.vanilla.cjs","names":[],"sources":["../../../components/Image/Image.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { image } from './Image.vanilla.css';\n\nexport type ImageVanillaProps<C extends ElementType = 'img'> = PolymorphicComponentProps<\n C,\n CSSProps\n>;\n\ntype ImageVanillaComponent = PolymorphicComponent<'img', ImageVanillaProps<ElementType>>;\n\nconst ImageVanillaImpl = forwardRef(\n <C extends ElementType = 'img'>(\n { as, className, css, style, ...props }: ImageVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'img';\n const { colors } = useVanillaExtractTheme();\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n return (\n <Component\n ref={ref}\n className={`${image} ${className || ''}`.trim()}\n style={mergedStyles}\n {...props}\n />\n );\n },\n);\n\nImageVanillaImpl.displayName = 'ImageVanilla';\n\nexport const ImageVanilla = ImageVanillaImpl as ImageVanillaComponent;\n"],"mappings":";;;;;;;;AAmBA,IAAM,oBAAA,GAAA,MAAA,aAEF,EAAE,IAAI,WAAW,KAAK,OAAO,GAAG,SAChC,QACG;CACH,MAAM,YAAY,MAAM;CACxB,MAAM,EAAE,WAAW,qBAAA,wBAAwB;CAC3C,MAAM,EAAE,OAAO,WAAW,SAAS,iBAAA,eAAe,KAAK,OAAO;CAE9D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,IAAA,GAAA,yBAAA,kBAAoB,KAAK;EAC1B;CAED,OACE,iBAAA,GAAA,kBAAA,KAAC,WAAD;EACO;EACL,WAAW,GAAG,0BAAA,MAAM,GAAG,aAAa,KAAK,MAAM;EAC/C,OAAO;EACP,GAAI;EACJ,CAAA;EAGP;AAED,iBAAiB,cAAc;AAE/B,IAAa,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.vanilla.js","names":[],"sources":["../../../components/Image/Image.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { image } from './Image.vanilla.css';\n\nexport type ImageVanillaProps<C extends ElementType = 'img'> = PolymorphicComponentProps<\n C,\n CSSProps\n>;\n\ntype ImageVanillaComponent = PolymorphicComponent<'img', ImageVanillaProps<ElementType>>;\n\nconst ImageVanillaImpl = forwardRef(\n <C extends ElementType = 'img'>(\n { as, className, css, style, ...props }: ImageVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'img';\n const { colors } = useVanillaExtractTheme();\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n return (\n <Component\n ref={ref}\n className={`${image} ${className || ''}`.trim()}\n style={mergedStyles}\n {...props}\n />\n );\n },\n);\n\nImageVanillaImpl.displayName = 'ImageVanilla';\n\nexport const ImageVanilla = ImageVanillaImpl as ImageVanillaComponent;\n"],"mappings":";;;;;;;AAmBA,IAAM,mBAAmB,YAErB,EAAE,IAAI,WAAW,KAAK,OAAO,GAAG,SAChC,QACG;CACH,MAAM,YAAY,MAAM;CACxB,MAAM,EAAE,WAAW,wBAAwB;CAC3C,MAAM,EAAE,OAAO,WAAW,SAAS,eAAe,KAAK,OAAO;CAE9D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,GAAG,iBAAiB,KAAK;EAC1B;
|
|
1
|
+
{"version":3,"file":"Image.vanilla.js","names":[],"sources":["../../../components/Image/Image.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { image } from './Image.vanilla.css';\n\nexport type ImageVanillaProps<C extends ElementType = 'img'> = PolymorphicComponentProps<\n C,\n CSSProps\n>;\n\ntype ImageVanillaComponent = PolymorphicComponent<'img', ImageVanillaProps<ElementType>>;\n\nconst ImageVanillaImpl = forwardRef(\n <C extends ElementType = 'img'>(\n { as, className, css, style, ...props }: ImageVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'img';\n const { colors } = useVanillaExtractTheme();\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n return (\n <Component\n ref={ref}\n className={`${image} ${className || ''}`.trim()}\n style={mergedStyles}\n {...props}\n />\n );\n },\n);\n\nImageVanillaImpl.displayName = 'ImageVanilla';\n\nexport const ImageVanilla = ImageVanillaImpl as ImageVanillaComponent;\n"],"mappings":";;;;;;;AAmBA,IAAM,mBAAmB,YAErB,EAAE,IAAI,WAAW,KAAK,OAAO,GAAG,SAChC,QACG;CACH,MAAM,YAAY,MAAM;CACxB,MAAM,EAAE,WAAW,wBAAwB;CAC3C,MAAM,EAAE,OAAO,WAAW,SAAS,eAAe,KAAK,OAAO;CAE9D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,GAAG,iBAAiB,KAAK;EAC1B;CAED,OACE,oBAAC,WAAD;EACO;EACL,WAAW,GAAG,MAAM,GAAG,aAAa,KAAK,MAAM;EAC/C,OAAO;EACP,GAAI;EACJ,CAAA;EAGP;AAED,iBAAiB,cAAc;AAE/B,IAAa,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.cjs","names":[],"sources":["../../../components/Input/Input.tsx"],"sourcesContent":["import React from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport { elevationVariants } from '../Elevation';\n\n// CONSTANTS\nconst FOCUS_SHADOW = elevationVariants[1].boxShadow; // apply elevation $1 when focus\n\nconst SMALL_HEIGHT = '$5';\nconst MEDIUM_HEIGHT = '$6';\nconst LARGE_HEIGHT = '$7';\n\nconst StyledInput = styled('input', {\n // Reset\n appearance: 'none',\n borderWidth: '0',\n boxSizing: 'border-box',\n fontFamily: '$rubik',\n margin: '0',\n outline: 'none',\n padding: '0',\n width: '100%',\n WebkitTapHighlightColor: 'rgba(0,0,0,0)',\n\n // Custom\n position: 'relative',\n backgroundColor: 'transparent',\n borderRadius: 'inherit', // inherit border radius from InputWrapper\n boxShadow: 'inset 0 0 0 1px $colors$inputBorder',\n color: '$inputText',\n fontVariantNumeric: 'tabular-nums',\n transition: 'box-shadow .1s ease-in-out',\n\n '&[type=\"number\"]': {\n pr: '0', // remove padding for number native controls\n },\n\n '&:-webkit-autofill,&:autofill': {\n boxShadow: 'inset 0 0 0 1px $colors$inputBorder, inset 0 0 0 100px $colors$inputBg',\n },\n\n '&:-webkit-autofill::first-line,&:autofill::first-line': {\n fontFamily: '$rubik',\n color: '$hiContrast',\n },\n\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 2px $colors$inputFocusBorder, ${FOCUS_SHADOW}`,\n },\n\n '&::placeholder': {\n color: '$inputPlaceholder',\n },\n\n '&:read-only:not(:disabled)': {\n boxShadow: 'none',\n },\n\n '&:disabled': {\n pointerEvents: 'none',\n color: '$inputDisabledText',\n },\n\n variants: {\n size: {\n small: {\n height: SMALL_HEIGHT,\n fontSize: '$1',\n px: '$2',\n lineHeight: '$sizes$5',\n '&:-webkit-autofill::first-line,&:autofill::first-line': {\n fontSize: '$1',\n },\n },\n medium: {\n height: MEDIUM_HEIGHT,\n fontSize: '$3',\n px: '$3',\n lineHeight: '$sizes$6',\n '&:-webkit-autofill::first-line,&:autofill::first-line': {\n fontSize: '$3',\n },\n },\n large: {\n height: LARGE_HEIGHT,\n fontSize: '$3',\n px: '$3',\n lineHeight: '$sizes$7',\n '&:-webkit-autofill::first-line,&:autofill::first-line': {\n fontSize: '$3',\n },\n },\n },\n startAdornment: {\n true: {},\n },\n endAdornment: {\n true: {},\n },\n variant: {\n ghost: {\n boxShadow: 'none',\n '&:disabled': {\n boxShadow: 'none',\n },\n backgroundColor: 'transparent',\n '&:focus-visible': {\n backgroundColor: '$loContrast',\n },\n },\n },\n state: {\n invalid: {\n boxShadow: 'inset 0 0 0 1px $colors$inputInvalidBorder',\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 2px $colors$inputInvalidBorder, ${FOCUS_SHADOW}`,\n },\n },\n },\n cursor: {\n default: {\n cursor: 'default',\n '@hover': {\n '&:hover:not(:read-only)': {\n cursor: 'text',\n },\n },\n '&:focus-visible:not(:read-only)': {\n cursor: 'text',\n },\n },\n text: {\n cursor: 'text',\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n cursor: 'default',\n },\n compoundVariants: [\n {\n variant: 'ghost',\n state: 'invalid',\n css: {\n boxShadow: 'inset 0 0 0 1px $colors$inputInvalidBorder',\n },\n },\n {\n startAdornment: true,\n size: 'small',\n css: {\n paddingInlineStart: 'calc($2 + 15px)',\n },\n },\n {\n startAdornment: true,\n size: 'medium',\n css: {\n paddingInlineStart: 'calc($3 + 15px)',\n },\n },\n {\n startAdornment: true,\n size: 'large',\n css: {\n paddingInlineStart: 'calc($3 + 15px)',\n },\n },\n {\n endAdornment: true,\n size: 'small',\n css: {\n paddingInlineEnd: 'calc($2 + 15px)',\n },\n },\n {\n endAdornment: true,\n size: 'medium',\n css: {\n paddingInlineEnd: 'calc($3 + 15px)',\n },\n },\n {\n endAdornment: true,\n size: 'large',\n css: {\n paddingInlineEnd: 'calc($3 + 15px)',\n },\n },\n {\n endAdornment: true,\n size: 'small',\n state: 'invalid',\n css: {\n paddingInlineEnd: 'calc($4 + 30px)', // size padding + adornment margins + icon size + icon size\n },\n },\n {\n endAdornment: true,\n size: 'medium',\n state: 'invalid',\n css: {\n paddingInlineEnd: 'calc($6 + 30px)', // size padding + adornment margins + icon size + icon size\n },\n },\n {\n endAdornment: true,\n size: 'large',\n state: 'invalid',\n css: {\n paddingInlineEnd: 'calc($6 + 30px)', // size padding + adornment margins + icon size + icon size\n },\n },\n ],\n});\n\nconst InputWrapper = styled('div', {\n // Reset\n outline: 'none',\n lineHeight: 0,\n\n position: 'relative',\n backgroundColor: '$inputBg',\n color: '$inputPlaceholder',\n\n '&::before': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n pointerEvents: 'none',\n },\n '&::after': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n pointerEvents: 'none',\n },\n\n '&:focus-visible': {\n '&::before': {\n backgroundColor: '$inputFocusBg',\n },\n '&::after': {\n backgroundColor: '$primary',\n opacity: 0.15,\n },\n },\n\n '@hover': {\n '&:hover': {\n '&::before': {\n backgroundColor: '$inputHoverBg',\n },\n '&::after': {\n backgroundColor: '$primary',\n opacity: 0.05,\n },\n },\n },\n\n variants: {\n disabled: {\n true: {\n opacity: 0.7,\n color: '$inputDisabledText',\n '@hover': {\n '&:hover': {\n '&::before': {\n backgroundColor: 'inherit',\n },\n '&::after': {\n backgroundColor: 'inherit',\n },\n },\n },\n },\n },\n state: {\n invalid: {\n '@hover': {\n '&:hover': {\n '&::after': {\n backgroundColor: '$inputInvalidBorder',\n },\n },\n },\n },\n },\n size: {\n small: {\n borderRadius: '$2',\n '&::before, &::after': {\n borderRadius: '$2',\n },\n },\n medium: {\n borderRadius: '$3',\n '&::before, &::after': {\n borderRadius: '$3',\n },\n },\n large: {\n borderRadius: '$3',\n '&::before, &::after': {\n borderRadius: '$3',\n },\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n disabled: false,\n },\n});\n\nconst AdornmentWrapper = styled('div', {\n position: 'absolute',\n top: 0,\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n variants: {\n size: {\n small: {\n mx: 'calc($2 / 2)',\n },\n medium: {\n mx: 'calc($3 / 2)',\n },\n large: {\n mx: 'calc($3 / 2)',\n },\n },\n variant: {\n start: {\n left: 0,\n },\n end: {\n right: 0,\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n});\n\nconst AdornmentWrapperStart = styled(AdornmentWrapper, {\n left: 0,\n});\n\nconst AdornmentWrapperEnd = styled(AdornmentWrapper, {\n right: 0,\n});\n\ntype DefaultInputVariants = VariantProps<typeof StyledInput>;\nexport type InputVariants = Omit<DefaultInputVariants, 'startAdornment' | 'endAdornment'>;\nexport interface HTMLInputProps extends React.InputHTMLAttributes<any> {\n startAdornment?: React.ReactNode;\n endAdornment?: React.ReactNode;\n type?: string;\n}\n\nexport type InputProps = Omit<HTMLInputProps, 'size'> & InputVariants & { css?: CSS };\n\nexport interface InputHandle extends HTMLInputElement {\n clear: () => void;\n}\n\nexport const Input = React.forwardRef<InputHandle, InputProps>(\n ({ size, startAdornment, endAdornment, css, ...props }, forwardedRef) => {\n const inputRef = React.useRef<InputHandle>(null);\n\n React.useImperativeHandle(\n forwardedRef,\n () => {\n const { current } = inputRef;\n if (current) {\n current.clear = () => {\n current.value = '';\n };\n }\n return current as InputHandle;\n },\n [inputRef]\n );\n\n const hasStartAdornment = React.useMemo(() => Boolean(startAdornment), [startAdornment]);\n\n const hasEndAdornment = React.useMemo(() => Boolean(endAdornment), [endAdornment]);\n\n return (\n <InputWrapper css={css} disabled={props.disabled} state={props.state}>\n {hasStartAdornment && (\n <AdornmentWrapperStart size={size}>{startAdornment}</AdornmentWrapperStart>\n )}\n\n <StyledInput\n ref={inputRef}\n startAdornment={hasStartAdornment}\n endAdornment={hasEndAdornment}\n size={size}\n {...props}\n />\n {hasEndAdornment && <AdornmentWrapperEnd size={size}>{endAdornment}</AdornmentWrapperEnd>}\n </InputWrapper>\n );\n }\n);\n"],"mappings":";;;;;;;AAMA,IAAM,eAAe,kBAAA,kBAAkB,GAAG;AAM1C,IAAM,cAAc,wBAAA,OAAO,SAAS;CAElC,YAAY;CACZ,aAAa;CACb,WAAW;CACX,YAAY;CACZ,QAAQ;CACR,SAAS;CACT,SAAS;CACT,OAAO;CACP,yBAAyB;CAGzB,UAAU;CACV,iBAAiB;CACjB,cAAc;CACd,WAAW;CACX,OAAO;CACP,oBAAoB;CACpB,YAAY;CAEZ,sBAAoB,EAClB,IAAI,KACL;CAED,iCAAiC,EAC/B,WAAW,0EACZ;CAED,yDAAyD;EACvD,YAAY;EACZ,OAAO;EACR;CAED,mBAAmB,EACjB,WAAW,6CAA6C,gBACzD;CAED,kBAAkB,EAChB,OAAO,qBACR;CAED,8BAA8B,EAC5B,WAAW,QACZ;CAED,cAAc;EACZ,eAAe;EACf,OAAO;EACR;CAED,UAAU;EACR,MAAM;GACJ,OAAO;IACL,QAAQ;IACR,UAAU;IACV,IAAI;IACJ,YAAY;IACZ,yDAAyD,EACvD,UAAU,MACX;IACF;GACD,QAAQ;IACN,QAAQ;IACR,UAAU;IACV,IAAI;IACJ,YAAY;IACZ,yDAAyD,EACvD,UAAU,MACX;IACF;GACD,OAAO;IACL,QAAQ;IACR,UAAU;IACV,IAAI;IACJ,YAAY;IACZ,yDAAyD,EACvD,UAAU,MACX;IACF;GACF;EACD,gBAAgB,EACd,MAAM,EAAE,EACT;EACD,cAAc,EACZ,MAAM,EAAE,EACT;EACD,SAAS,EACP,OAAO;GACL,WAAW;GACX,cAAc,EACZ,WAAW,QACZ;GACD,iBAAiB;GACjB,mBAAmB,EACjB,iBAAiB,eAClB;GACF,EACF;EACD,OAAO,EACL,SAAS;GACP,WAAW;GACX,mBAAmB,EACjB,WAAW,+CAA+C,gBAC3D;GACF,EACF;EACD,QAAQ;GACN,SAAS;IACP,QAAQ;IACR,UAAU,EACR,2BAA2B,EACzB,QAAQ,QACT,EACF;IACD,mCAAmC,EACjC,QAAQ,QACT;IACF;GACD,MAAM,EACJ,QAAQ,QACT;GACF;EACF;CACD,iBAAiB;EACf,MAAM;EACN,QAAQ;EACT;CACD,kBAAkB;EAChB;GACE,SAAS;GACT,OAAO;GACP,KAAK,EACH,WAAW,8CACZ;GACF;EACD;GACE,gBAAgB;GAChB,MAAM;GACN,KAAK,EACH,oBAAoB,mBACrB;GACF;EACD;GACE,gBAAgB;GAChB,MAAM;GACN,KAAK,EACH,oBAAoB,mBACrB;GACF;EACD;GACE,gBAAgB;GAChB,MAAM;GACN,KAAK,EACH,oBAAoB,mBACrB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,OAAO;GACP,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,OAAO;GACP,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,OAAO;GACP,KAAK,EACH,kBAAkB,mBACnB;GACF;EACF;CACF,CAAC;AAEF,IAAM,eAAe,wBAAA,OAAO,OAAO;CAEjC,SAAS;CACT,YAAY;CAEZ,UAAU;CACV,iBAAiB;CACjB,OAAO;CAEP,aAAa;EACX,WAAW;EACX,SAAS;EACT,UAAU;EACV,OAAO;EACP,eAAe;EAChB;CACD,YAAY;EACV,WAAW;EACX,SAAS;EACT,UAAU;EACV,OAAO;EACP,eAAe;EAChB;CAED,mBAAmB;EACjB,aAAa,EACX,iBAAiB,iBAClB;EACD,YAAY;GACV,iBAAiB;GACjB,SAAS;GACV;EACF;CAED,UAAU,EACR,WAAW;EACT,aAAa,EACX,iBAAiB,iBAClB;EACD,YAAY;GACV,iBAAiB;GACjB,SAAS;GACV;EACF,EACF;CAED,UAAU;EACR,UAAU,EACR,MAAM;GACJ,SAAS;GACT,OAAO;GACP,UAAU,EACR,WAAW;IACT,aAAa,EACX,iBAAiB,WAClB;IACD,YAAY,EACV,iBAAiB,WAClB;IACF,EACF;GACF,EACF;EACD,OAAO,EACL,SAAS,EACP,UAAU,EACR,WAAW,EACT,YAAY,EACV,iBAAiB,uBAClB,EACF,EACF,EACF,EACF;EACD,MAAM;GACJ,OAAO;IACL,cAAc;IACd,uBAAuB,EACrB,cAAc,MACf;IACF;GACD,QAAQ;IACN,cAAc;IACd,uBAAuB,EACrB,cAAc,MACf;IACF;GACD,OAAO;IACL,cAAc;IACd,uBAAuB,EACrB,cAAc,MACf;IACF;GACF;EACF;CACD,iBAAiB;EACf,MAAM;EACN,UAAU;EACX;CACF,CAAC;AAEF,IAAM,mBAAmB,wBAAA,OAAO,OAAO;CACrC,UAAU;CACV,KAAK;CACL,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,gBAAgB;CAChB,UAAU;EACR,MAAM;GACJ,OAAO,EACL,IAAI,gBACL;GACD,QAAQ,EACN,IAAI,gBACL;GACD,OAAO,EACL,IAAI,gBACL;GACF;EACD,SAAS;GACP,OAAO,EACL,MAAM,GACP;GACD,KAAK,EACH,OAAO,GACR;GACF;EACF;CACD,iBAAiB,EACf,MAAM,UACP;CACF,CAAC;AAEF,IAAM,wBAAwB,wBAAA,OAAO,kBAAkB,EACrD,MAAM,GACP,CAAC;AAEF,IAAM,sBAAsB,wBAAA,OAAO,kBAAkB,EACnD,OAAO,GACR,CAAC;AAgBF,IAAa,QAAQ,MAAA,QAAM,YACxB,EAAE,MAAM,gBAAgB,cAAc,KAAK,GAAG,SAAS,iBAAiB;CACvE,MAAM,WAAW,MAAA,QAAM,OAAoB,KAAK;AAEhD,OAAA,QAAM,oBACJ,oBACM;EACJ,MAAM,EAAE,YAAY;AACpB,MAAI,QACF,SAAQ,cAAc;AACpB,WAAQ,QAAQ;;AAGpB,SAAO;IAET,CAAC,SAAS,CACX;CAED,MAAM,oBAAoB,MAAA,QAAM,cAAc,QAAQ,eAAe,EAAE,CAAC,eAAe,CAAC;CAExF,MAAM,kBAAkB,MAAA,QAAM,cAAc,QAAQ,aAAa,EAAE,CAAC,aAAa,CAAC;AAElF,QACE,iBAAA,GAAA,kBAAA,MAAC,cAAD;EAAmB;EAAK,UAAU,MAAM;EAAU,OAAO,MAAM;YAA/D;GACG,qBACC,iBAAA,GAAA,kBAAA,KAAC,uBAAD;IAA6B;cAAO;IAAuC,CAAA;GAG7E,iBAAA,GAAA,kBAAA,KAAC,aAAD;IACE,KAAK;IACL,gBAAgB;IAChB,cAAc;IACR;IACN,GAAI;IACJ,CAAA;GACD,mBAAmB,iBAAA,GAAA,kBAAA,KAAC,qBAAD;IAA2B;cAAO;IAAmC,CAAA;GAC5E;;EAGpB"}
|
|
1
|
+
{"version":3,"file":"Input.cjs","names":[],"sources":["../../../components/Input/Input.tsx"],"sourcesContent":["import React from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport { elevationVariants } from '../Elevation';\n\n// CONSTANTS\nconst FOCUS_SHADOW = elevationVariants[1].boxShadow; // apply elevation $1 when focus\n\nconst SMALL_HEIGHT = '$5';\nconst MEDIUM_HEIGHT = '$6';\nconst LARGE_HEIGHT = '$7';\n\nconst StyledInput = styled('input', {\n // Reset\n appearance: 'none',\n borderWidth: '0',\n boxSizing: 'border-box',\n fontFamily: '$rubik',\n margin: '0',\n outline: 'none',\n padding: '0',\n width: '100%',\n WebkitTapHighlightColor: 'rgba(0,0,0,0)',\n\n // Custom\n position: 'relative',\n backgroundColor: 'transparent',\n borderRadius: 'inherit', // inherit border radius from InputWrapper\n boxShadow: 'inset 0 0 0 1px $colors$inputBorder',\n color: '$inputText',\n fontVariantNumeric: 'tabular-nums',\n transition: 'box-shadow .1s ease-in-out',\n\n '&[type=\"number\"]': {\n pr: '0', // remove padding for number native controls\n },\n\n '&:-webkit-autofill,&:autofill': {\n boxShadow: 'inset 0 0 0 1px $colors$inputBorder, inset 0 0 0 100px $colors$inputBg',\n },\n\n '&:-webkit-autofill::first-line,&:autofill::first-line': {\n fontFamily: '$rubik',\n color: '$hiContrast',\n },\n\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 2px $colors$inputFocusBorder, ${FOCUS_SHADOW}`,\n },\n\n '&::placeholder': {\n color: '$inputPlaceholder',\n },\n\n '&:read-only:not(:disabled)': {\n boxShadow: 'none',\n },\n\n '&:disabled': {\n pointerEvents: 'none',\n color: '$inputDisabledText',\n },\n\n variants: {\n size: {\n small: {\n height: SMALL_HEIGHT,\n fontSize: '$1',\n px: '$2',\n lineHeight: '$sizes$5',\n '&:-webkit-autofill::first-line,&:autofill::first-line': {\n fontSize: '$1',\n },\n },\n medium: {\n height: MEDIUM_HEIGHT,\n fontSize: '$3',\n px: '$3',\n lineHeight: '$sizes$6',\n '&:-webkit-autofill::first-line,&:autofill::first-line': {\n fontSize: '$3',\n },\n },\n large: {\n height: LARGE_HEIGHT,\n fontSize: '$3',\n px: '$3',\n lineHeight: '$sizes$7',\n '&:-webkit-autofill::first-line,&:autofill::first-line': {\n fontSize: '$3',\n },\n },\n },\n startAdornment: {\n true: {},\n },\n endAdornment: {\n true: {},\n },\n variant: {\n ghost: {\n boxShadow: 'none',\n '&:disabled': {\n boxShadow: 'none',\n },\n backgroundColor: 'transparent',\n '&:focus-visible': {\n backgroundColor: '$loContrast',\n },\n },\n },\n state: {\n invalid: {\n boxShadow: 'inset 0 0 0 1px $colors$inputInvalidBorder',\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 2px $colors$inputInvalidBorder, ${FOCUS_SHADOW}`,\n },\n },\n },\n cursor: {\n default: {\n cursor: 'default',\n '@hover': {\n '&:hover:not(:read-only)': {\n cursor: 'text',\n },\n },\n '&:focus-visible:not(:read-only)': {\n cursor: 'text',\n },\n },\n text: {\n cursor: 'text',\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n cursor: 'default',\n },\n compoundVariants: [\n {\n variant: 'ghost',\n state: 'invalid',\n css: {\n boxShadow: 'inset 0 0 0 1px $colors$inputInvalidBorder',\n },\n },\n {\n startAdornment: true,\n size: 'small',\n css: {\n paddingInlineStart: 'calc($2 + 15px)',\n },\n },\n {\n startAdornment: true,\n size: 'medium',\n css: {\n paddingInlineStart: 'calc($3 + 15px)',\n },\n },\n {\n startAdornment: true,\n size: 'large',\n css: {\n paddingInlineStart: 'calc($3 + 15px)',\n },\n },\n {\n endAdornment: true,\n size: 'small',\n css: {\n paddingInlineEnd: 'calc($2 + 15px)',\n },\n },\n {\n endAdornment: true,\n size: 'medium',\n css: {\n paddingInlineEnd: 'calc($3 + 15px)',\n },\n },\n {\n endAdornment: true,\n size: 'large',\n css: {\n paddingInlineEnd: 'calc($3 + 15px)',\n },\n },\n {\n endAdornment: true,\n size: 'small',\n state: 'invalid',\n css: {\n paddingInlineEnd: 'calc($4 + 30px)', // size padding + adornment margins + icon size + icon size\n },\n },\n {\n endAdornment: true,\n size: 'medium',\n state: 'invalid',\n css: {\n paddingInlineEnd: 'calc($6 + 30px)', // size padding + adornment margins + icon size + icon size\n },\n },\n {\n endAdornment: true,\n size: 'large',\n state: 'invalid',\n css: {\n paddingInlineEnd: 'calc($6 + 30px)', // size padding + adornment margins + icon size + icon size\n },\n },\n ],\n});\n\nconst InputWrapper = styled('div', {\n // Reset\n outline: 'none',\n lineHeight: 0,\n\n position: 'relative',\n backgroundColor: '$inputBg',\n color: '$inputPlaceholder',\n\n '&::before': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n pointerEvents: 'none',\n },\n '&::after': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n pointerEvents: 'none',\n },\n\n '&:focus-visible': {\n '&::before': {\n backgroundColor: '$inputFocusBg',\n },\n '&::after': {\n backgroundColor: '$primary',\n opacity: 0.15,\n },\n },\n\n '@hover': {\n '&:hover': {\n '&::before': {\n backgroundColor: '$inputHoverBg',\n },\n '&::after': {\n backgroundColor: '$primary',\n opacity: 0.05,\n },\n },\n },\n\n variants: {\n disabled: {\n true: {\n opacity: 0.7,\n color: '$inputDisabledText',\n '@hover': {\n '&:hover': {\n '&::before': {\n backgroundColor: 'inherit',\n },\n '&::after': {\n backgroundColor: 'inherit',\n },\n },\n },\n },\n },\n state: {\n invalid: {\n '@hover': {\n '&:hover': {\n '&::after': {\n backgroundColor: '$inputInvalidBorder',\n },\n },\n },\n },\n },\n size: {\n small: {\n borderRadius: '$2',\n '&::before, &::after': {\n borderRadius: '$2',\n },\n },\n medium: {\n borderRadius: '$3',\n '&::before, &::after': {\n borderRadius: '$3',\n },\n },\n large: {\n borderRadius: '$3',\n '&::before, &::after': {\n borderRadius: '$3',\n },\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n disabled: false,\n },\n});\n\nconst AdornmentWrapper = styled('div', {\n position: 'absolute',\n top: 0,\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n variants: {\n size: {\n small: {\n mx: 'calc($2 / 2)',\n },\n medium: {\n mx: 'calc($3 / 2)',\n },\n large: {\n mx: 'calc($3 / 2)',\n },\n },\n variant: {\n start: {\n left: 0,\n },\n end: {\n right: 0,\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n});\n\nconst AdornmentWrapperStart = styled(AdornmentWrapper, {\n left: 0,\n});\n\nconst AdornmentWrapperEnd = styled(AdornmentWrapper, {\n right: 0,\n});\n\ntype DefaultInputVariants = VariantProps<typeof StyledInput>;\nexport type InputVariants = Omit<DefaultInputVariants, 'startAdornment' | 'endAdornment'>;\nexport interface HTMLInputProps extends React.InputHTMLAttributes<any> {\n startAdornment?: React.ReactNode;\n endAdornment?: React.ReactNode;\n type?: string;\n}\n\nexport type InputProps = Omit<HTMLInputProps, 'size'> & InputVariants & { css?: CSS };\n\nexport interface InputHandle extends HTMLInputElement {\n clear: () => void;\n}\n\nexport const Input = React.forwardRef<InputHandle, InputProps>(\n ({ size, startAdornment, endAdornment, css, ...props }, forwardedRef) => {\n const inputRef = React.useRef<InputHandle>(null);\n\n React.useImperativeHandle(\n forwardedRef,\n () => {\n const { current } = inputRef;\n if (current) {\n current.clear = () => {\n current.value = '';\n };\n }\n return current as InputHandle;\n },\n [inputRef]\n );\n\n const hasStartAdornment = React.useMemo(() => Boolean(startAdornment), [startAdornment]);\n\n const hasEndAdornment = React.useMemo(() => Boolean(endAdornment), [endAdornment]);\n\n return (\n <InputWrapper css={css} disabled={props.disabled} state={props.state}>\n {hasStartAdornment && (\n <AdornmentWrapperStart size={size}>{startAdornment}</AdornmentWrapperStart>\n )}\n\n <StyledInput\n ref={inputRef}\n startAdornment={hasStartAdornment}\n endAdornment={hasEndAdornment}\n size={size}\n {...props}\n />\n {hasEndAdornment && <AdornmentWrapperEnd size={size}>{endAdornment}</AdornmentWrapperEnd>}\n </InputWrapper>\n );\n }\n);\n"],"mappings":";;;;;;;AAMA,IAAM,eAAe,kBAAA,kBAAkB,GAAG;AAM1C,IAAM,cAAc,wBAAA,OAAO,SAAS;CAElC,YAAY;CACZ,aAAa;CACb,WAAW;CACX,YAAY;CACZ,QAAQ;CACR,SAAS;CACT,SAAS;CACT,OAAO;CACP,yBAAyB;CAGzB,UAAU;CACV,iBAAiB;CACjB,cAAc;CACd,WAAW;CACX,OAAO;CACP,oBAAoB;CACpB,YAAY;CAEZ,sBAAoB,EAClB,IAAI,KACL;CAED,iCAAiC,EAC/B,WAAW,0EACZ;CAED,yDAAyD;EACvD,YAAY;EACZ,OAAO;EACR;CAED,mBAAmB,EACjB,WAAW,6CAA6C,gBACzD;CAED,kBAAkB,EAChB,OAAO,qBACR;CAED,8BAA8B,EAC5B,WAAW,QACZ;CAED,cAAc;EACZ,eAAe;EACf,OAAO;EACR;CAED,UAAU;EACR,MAAM;GACJ,OAAO;IACL,QAAQ;IACR,UAAU;IACV,IAAI;IACJ,YAAY;IACZ,yDAAyD,EACvD,UAAU,MACX;IACF;GACD,QAAQ;IACN,QAAQ;IACR,UAAU;IACV,IAAI;IACJ,YAAY;IACZ,yDAAyD,EACvD,UAAU,MACX;IACF;GACD,OAAO;IACL,QAAQ;IACR,UAAU;IACV,IAAI;IACJ,YAAY;IACZ,yDAAyD,EACvD,UAAU,MACX;IACF;GACF;EACD,gBAAgB,EACd,MAAM,EAAE,EACT;EACD,cAAc,EACZ,MAAM,EAAE,EACT;EACD,SAAS,EACP,OAAO;GACL,WAAW;GACX,cAAc,EACZ,WAAW,QACZ;GACD,iBAAiB;GACjB,mBAAmB,EACjB,iBAAiB,eAClB;GACF,EACF;EACD,OAAO,EACL,SAAS;GACP,WAAW;GACX,mBAAmB,EACjB,WAAW,+CAA+C,gBAC3D;GACF,EACF;EACD,QAAQ;GACN,SAAS;IACP,QAAQ;IACR,UAAU,EACR,2BAA2B,EACzB,QAAQ,QACT,EACF;IACD,mCAAmC,EACjC,QAAQ,QACT;IACF;GACD,MAAM,EACJ,QAAQ,QACT;GACF;EACF;CACD,iBAAiB;EACf,MAAM;EACN,QAAQ;EACT;CACD,kBAAkB;EAChB;GACE,SAAS;GACT,OAAO;GACP,KAAK,EACH,WAAW,8CACZ;GACF;EACD;GACE,gBAAgB;GAChB,MAAM;GACN,KAAK,EACH,oBAAoB,mBACrB;GACF;EACD;GACE,gBAAgB;GAChB,MAAM;GACN,KAAK,EACH,oBAAoB,mBACrB;GACF;EACD;GACE,gBAAgB;GAChB,MAAM;GACN,KAAK,EACH,oBAAoB,mBACrB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,OAAO;GACP,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,OAAO;GACP,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,OAAO;GACP,KAAK,EACH,kBAAkB,mBACnB;GACF;EACF;CACF,CAAC;AAEF,IAAM,eAAe,wBAAA,OAAO,OAAO;CAEjC,SAAS;CACT,YAAY;CAEZ,UAAU;CACV,iBAAiB;CACjB,OAAO;CAEP,aAAa;EACX,WAAW;EACX,SAAS;EACT,UAAU;EACV,OAAO;EACP,eAAe;EAChB;CACD,YAAY;EACV,WAAW;EACX,SAAS;EACT,UAAU;EACV,OAAO;EACP,eAAe;EAChB;CAED,mBAAmB;EACjB,aAAa,EACX,iBAAiB,iBAClB;EACD,YAAY;GACV,iBAAiB;GACjB,SAAS;GACV;EACF;CAED,UAAU,EACR,WAAW;EACT,aAAa,EACX,iBAAiB,iBAClB;EACD,YAAY;GACV,iBAAiB;GACjB,SAAS;GACV;EACF,EACF;CAED,UAAU;EACR,UAAU,EACR,MAAM;GACJ,SAAS;GACT,OAAO;GACP,UAAU,EACR,WAAW;IACT,aAAa,EACX,iBAAiB,WAClB;IACD,YAAY,EACV,iBAAiB,WAClB;IACF,EACF;GACF,EACF;EACD,OAAO,EACL,SAAS,EACP,UAAU,EACR,WAAW,EACT,YAAY,EACV,iBAAiB,uBAClB,EACF,EACF,EACF,EACF;EACD,MAAM;GACJ,OAAO;IACL,cAAc;IACd,uBAAuB,EACrB,cAAc,MACf;IACF;GACD,QAAQ;IACN,cAAc;IACd,uBAAuB,EACrB,cAAc,MACf;IACF;GACD,OAAO;IACL,cAAc;IACd,uBAAuB,EACrB,cAAc,MACf;IACF;GACF;EACF;CACD,iBAAiB;EACf,MAAM;EACN,UAAU;EACX;CACF,CAAC;AAEF,IAAM,mBAAmB,wBAAA,OAAO,OAAO;CACrC,UAAU;CACV,KAAK;CACL,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,gBAAgB;CAChB,UAAU;EACR,MAAM;GACJ,OAAO,EACL,IAAI,gBACL;GACD,QAAQ,EACN,IAAI,gBACL;GACD,OAAO,EACL,IAAI,gBACL;GACF;EACD,SAAS;GACP,OAAO,EACL,MAAM,GACP;GACD,KAAK,EACH,OAAO,GACR;GACF;EACF;CACD,iBAAiB,EACf,MAAM,UACP;CACF,CAAC;AAEF,IAAM,wBAAwB,wBAAA,OAAO,kBAAkB,EACrD,MAAM,GACP,CAAC;AAEF,IAAM,sBAAsB,wBAAA,OAAO,kBAAkB,EACnD,OAAO,GACR,CAAC;AAgBF,IAAa,QAAQ,MAAA,QAAM,YACxB,EAAE,MAAM,gBAAgB,cAAc,KAAK,GAAG,SAAS,iBAAiB;CACvE,MAAM,WAAW,MAAA,QAAM,OAAoB,KAAK;CAEhD,MAAA,QAAM,oBACJ,oBACM;EACJ,MAAM,EAAE,YAAY;EACpB,IAAI,SACF,QAAQ,cAAc;GACpB,QAAQ,QAAQ;;EAGpB,OAAO;IAET,CAAC,SAAS,CACX;CAED,MAAM,oBAAoB,MAAA,QAAM,cAAc,QAAQ,eAAe,EAAE,CAAC,eAAe,CAAC;CAExF,MAAM,kBAAkB,MAAA,QAAM,cAAc,QAAQ,aAAa,EAAE,CAAC,aAAa,CAAC;CAElF,OACE,iBAAA,GAAA,kBAAA,MAAC,cAAD;EAAmB;EAAK,UAAU,MAAM;EAAU,OAAO,MAAM;YAA/D;GACG,qBACC,iBAAA,GAAA,kBAAA,KAAC,uBAAD;IAA6B;cAAO;IAAuC,CAAA;GAG7E,iBAAA,GAAA,kBAAA,KAAC,aAAD;IACE,KAAK;IACL,gBAAgB;IAChB,cAAc;IACR;IACN,GAAI;IACJ,CAAA;GACD,mBAAmB,iBAAA,GAAA,kBAAA,KAAC,qBAAD;IAA2B;cAAO;IAAmC,CAAA;GAC5E;;EAGpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","names":[],"sources":["../../../components/Input/Input.tsx"],"sourcesContent":["import React from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport { elevationVariants } from '../Elevation';\n\n// CONSTANTS\nconst FOCUS_SHADOW = elevationVariants[1].boxShadow; // apply elevation $1 when focus\n\nconst SMALL_HEIGHT = '$5';\nconst MEDIUM_HEIGHT = '$6';\nconst LARGE_HEIGHT = '$7';\n\nconst StyledInput = styled('input', {\n // Reset\n appearance: 'none',\n borderWidth: '0',\n boxSizing: 'border-box',\n fontFamily: '$rubik',\n margin: '0',\n outline: 'none',\n padding: '0',\n width: '100%',\n WebkitTapHighlightColor: 'rgba(0,0,0,0)',\n\n // Custom\n position: 'relative',\n backgroundColor: 'transparent',\n borderRadius: 'inherit', // inherit border radius from InputWrapper\n boxShadow: 'inset 0 0 0 1px $colors$inputBorder',\n color: '$inputText',\n fontVariantNumeric: 'tabular-nums',\n transition: 'box-shadow .1s ease-in-out',\n\n '&[type=\"number\"]': {\n pr: '0', // remove padding for number native controls\n },\n\n '&:-webkit-autofill,&:autofill': {\n boxShadow: 'inset 0 0 0 1px $colors$inputBorder, inset 0 0 0 100px $colors$inputBg',\n },\n\n '&:-webkit-autofill::first-line,&:autofill::first-line': {\n fontFamily: '$rubik',\n color: '$hiContrast',\n },\n\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 2px $colors$inputFocusBorder, ${FOCUS_SHADOW}`,\n },\n\n '&::placeholder': {\n color: '$inputPlaceholder',\n },\n\n '&:read-only:not(:disabled)': {\n boxShadow: 'none',\n },\n\n '&:disabled': {\n pointerEvents: 'none',\n color: '$inputDisabledText',\n },\n\n variants: {\n size: {\n small: {\n height: SMALL_HEIGHT,\n fontSize: '$1',\n px: '$2',\n lineHeight: '$sizes$5',\n '&:-webkit-autofill::first-line,&:autofill::first-line': {\n fontSize: '$1',\n },\n },\n medium: {\n height: MEDIUM_HEIGHT,\n fontSize: '$3',\n px: '$3',\n lineHeight: '$sizes$6',\n '&:-webkit-autofill::first-line,&:autofill::first-line': {\n fontSize: '$3',\n },\n },\n large: {\n height: LARGE_HEIGHT,\n fontSize: '$3',\n px: '$3',\n lineHeight: '$sizes$7',\n '&:-webkit-autofill::first-line,&:autofill::first-line': {\n fontSize: '$3',\n },\n },\n },\n startAdornment: {\n true: {},\n },\n endAdornment: {\n true: {},\n },\n variant: {\n ghost: {\n boxShadow: 'none',\n '&:disabled': {\n boxShadow: 'none',\n },\n backgroundColor: 'transparent',\n '&:focus-visible': {\n backgroundColor: '$loContrast',\n },\n },\n },\n state: {\n invalid: {\n boxShadow: 'inset 0 0 0 1px $colors$inputInvalidBorder',\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 2px $colors$inputInvalidBorder, ${FOCUS_SHADOW}`,\n },\n },\n },\n cursor: {\n default: {\n cursor: 'default',\n '@hover': {\n '&:hover:not(:read-only)': {\n cursor: 'text',\n },\n },\n '&:focus-visible:not(:read-only)': {\n cursor: 'text',\n },\n },\n text: {\n cursor: 'text',\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n cursor: 'default',\n },\n compoundVariants: [\n {\n variant: 'ghost',\n state: 'invalid',\n css: {\n boxShadow: 'inset 0 0 0 1px $colors$inputInvalidBorder',\n },\n },\n {\n startAdornment: true,\n size: 'small',\n css: {\n paddingInlineStart: 'calc($2 + 15px)',\n },\n },\n {\n startAdornment: true,\n size: 'medium',\n css: {\n paddingInlineStart: 'calc($3 + 15px)',\n },\n },\n {\n startAdornment: true,\n size: 'large',\n css: {\n paddingInlineStart: 'calc($3 + 15px)',\n },\n },\n {\n endAdornment: true,\n size: 'small',\n css: {\n paddingInlineEnd: 'calc($2 + 15px)',\n },\n },\n {\n endAdornment: true,\n size: 'medium',\n css: {\n paddingInlineEnd: 'calc($3 + 15px)',\n },\n },\n {\n endAdornment: true,\n size: 'large',\n css: {\n paddingInlineEnd: 'calc($3 + 15px)',\n },\n },\n {\n endAdornment: true,\n size: 'small',\n state: 'invalid',\n css: {\n paddingInlineEnd: 'calc($4 + 30px)', // size padding + adornment margins + icon size + icon size\n },\n },\n {\n endAdornment: true,\n size: 'medium',\n state: 'invalid',\n css: {\n paddingInlineEnd: 'calc($6 + 30px)', // size padding + adornment margins + icon size + icon size\n },\n },\n {\n endAdornment: true,\n size: 'large',\n state: 'invalid',\n css: {\n paddingInlineEnd: 'calc($6 + 30px)', // size padding + adornment margins + icon size + icon size\n },\n },\n ],\n});\n\nconst InputWrapper = styled('div', {\n // Reset\n outline: 'none',\n lineHeight: 0,\n\n position: 'relative',\n backgroundColor: '$inputBg',\n color: '$inputPlaceholder',\n\n '&::before': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n pointerEvents: 'none',\n },\n '&::after': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n pointerEvents: 'none',\n },\n\n '&:focus-visible': {\n '&::before': {\n backgroundColor: '$inputFocusBg',\n },\n '&::after': {\n backgroundColor: '$primary',\n opacity: 0.15,\n },\n },\n\n '@hover': {\n '&:hover': {\n '&::before': {\n backgroundColor: '$inputHoverBg',\n },\n '&::after': {\n backgroundColor: '$primary',\n opacity: 0.05,\n },\n },\n },\n\n variants: {\n disabled: {\n true: {\n opacity: 0.7,\n color: '$inputDisabledText',\n '@hover': {\n '&:hover': {\n '&::before': {\n backgroundColor: 'inherit',\n },\n '&::after': {\n backgroundColor: 'inherit',\n },\n },\n },\n },\n },\n state: {\n invalid: {\n '@hover': {\n '&:hover': {\n '&::after': {\n backgroundColor: '$inputInvalidBorder',\n },\n },\n },\n },\n },\n size: {\n small: {\n borderRadius: '$2',\n '&::before, &::after': {\n borderRadius: '$2',\n },\n },\n medium: {\n borderRadius: '$3',\n '&::before, &::after': {\n borderRadius: '$3',\n },\n },\n large: {\n borderRadius: '$3',\n '&::before, &::after': {\n borderRadius: '$3',\n },\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n disabled: false,\n },\n});\n\nconst AdornmentWrapper = styled('div', {\n position: 'absolute',\n top: 0,\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n variants: {\n size: {\n small: {\n mx: 'calc($2 / 2)',\n },\n medium: {\n mx: 'calc($3 / 2)',\n },\n large: {\n mx: 'calc($3 / 2)',\n },\n },\n variant: {\n start: {\n left: 0,\n },\n end: {\n right: 0,\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n});\n\nconst AdornmentWrapperStart = styled(AdornmentWrapper, {\n left: 0,\n});\n\nconst AdornmentWrapperEnd = styled(AdornmentWrapper, {\n right: 0,\n});\n\ntype DefaultInputVariants = VariantProps<typeof StyledInput>;\nexport type InputVariants = Omit<DefaultInputVariants, 'startAdornment' | 'endAdornment'>;\nexport interface HTMLInputProps extends React.InputHTMLAttributes<any> {\n startAdornment?: React.ReactNode;\n endAdornment?: React.ReactNode;\n type?: string;\n}\n\nexport type InputProps = Omit<HTMLInputProps, 'size'> & InputVariants & { css?: CSS };\n\nexport interface InputHandle extends HTMLInputElement {\n clear: () => void;\n}\n\nexport const Input = React.forwardRef<InputHandle, InputProps>(\n ({ size, startAdornment, endAdornment, css, ...props }, forwardedRef) => {\n const inputRef = React.useRef<InputHandle>(null);\n\n React.useImperativeHandle(\n forwardedRef,\n () => {\n const { current } = inputRef;\n if (current) {\n current.clear = () => {\n current.value = '';\n };\n }\n return current as InputHandle;\n },\n [inputRef]\n );\n\n const hasStartAdornment = React.useMemo(() => Boolean(startAdornment), [startAdornment]);\n\n const hasEndAdornment = React.useMemo(() => Boolean(endAdornment), [endAdornment]);\n\n return (\n <InputWrapper css={css} disabled={props.disabled} state={props.state}>\n {hasStartAdornment && (\n <AdornmentWrapperStart size={size}>{startAdornment}</AdornmentWrapperStart>\n )}\n\n <StyledInput\n ref={inputRef}\n startAdornment={hasStartAdornment}\n endAdornment={hasEndAdornment}\n size={size}\n {...props}\n />\n {hasEndAdornment && <AdornmentWrapperEnd size={size}>{endAdornment}</AdornmentWrapperEnd>}\n </InputWrapper>\n );\n }\n);\n"],"mappings":";;;;;AAMA,IAAM,eAAe,kBAAkB,GAAG;AAM1C,IAAM,cAAc,OAAO,SAAS;CAElC,YAAY;CACZ,aAAa;CACb,WAAW;CACX,YAAY;CACZ,QAAQ;CACR,SAAS;CACT,SAAS;CACT,OAAO;CACP,yBAAyB;CAGzB,UAAU;CACV,iBAAiB;CACjB,cAAc;CACd,WAAW;CACX,OAAO;CACP,oBAAoB;CACpB,YAAY;CAEZ,sBAAoB,EAClB,IAAI,KACL;CAED,iCAAiC,EAC/B,WAAW,0EACZ;CAED,yDAAyD;EACvD,YAAY;EACZ,OAAO;EACR;CAED,mBAAmB,EACjB,WAAW,6CAA6C,gBACzD;CAED,kBAAkB,EAChB,OAAO,qBACR;CAED,8BAA8B,EAC5B,WAAW,QACZ;CAED,cAAc;EACZ,eAAe;EACf,OAAO;EACR;CAED,UAAU;EACR,MAAM;GACJ,OAAO;IACL,QAAQ;IACR,UAAU;IACV,IAAI;IACJ,YAAY;IACZ,yDAAyD,EACvD,UAAU,MACX;IACF;GACD,QAAQ;IACN,QAAQ;IACR,UAAU;IACV,IAAI;IACJ,YAAY;IACZ,yDAAyD,EACvD,UAAU,MACX;IACF;GACD,OAAO;IACL,QAAQ;IACR,UAAU;IACV,IAAI;IACJ,YAAY;IACZ,yDAAyD,EACvD,UAAU,MACX;IACF;GACF;EACD,gBAAgB,EACd,MAAM,EAAE,EACT;EACD,cAAc,EACZ,MAAM,EAAE,EACT;EACD,SAAS,EACP,OAAO;GACL,WAAW;GACX,cAAc,EACZ,WAAW,QACZ;GACD,iBAAiB;GACjB,mBAAmB,EACjB,iBAAiB,eAClB;GACF,EACF;EACD,OAAO,EACL,SAAS;GACP,WAAW;GACX,mBAAmB,EACjB,WAAW,+CAA+C,gBAC3D;GACF,EACF;EACD,QAAQ;GACN,SAAS;IACP,QAAQ;IACR,UAAU,EACR,2BAA2B,EACzB,QAAQ,QACT,EACF;IACD,mCAAmC,EACjC,QAAQ,QACT;IACF;GACD,MAAM,EACJ,QAAQ,QACT;GACF;EACF;CACD,iBAAiB;EACf,MAAM;EACN,QAAQ;EACT;CACD,kBAAkB;EAChB;GACE,SAAS;GACT,OAAO;GACP,KAAK,EACH,WAAW,8CACZ;GACF;EACD;GACE,gBAAgB;GAChB,MAAM;GACN,KAAK,EACH,oBAAoB,mBACrB;GACF;EACD;GACE,gBAAgB;GAChB,MAAM;GACN,KAAK,EACH,oBAAoB,mBACrB;GACF;EACD;GACE,gBAAgB;GAChB,MAAM;GACN,KAAK,EACH,oBAAoB,mBACrB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,OAAO;GACP,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,OAAO;GACP,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,OAAO;GACP,KAAK,EACH,kBAAkB,mBACnB;GACF;EACF;CACF,CAAC;AAEF,IAAM,eAAe,OAAO,OAAO;CAEjC,SAAS;CACT,YAAY;CAEZ,UAAU;CACV,iBAAiB;CACjB,OAAO;CAEP,aAAa;EACX,WAAW;EACX,SAAS;EACT,UAAU;EACV,OAAO;EACP,eAAe;EAChB;CACD,YAAY;EACV,WAAW;EACX,SAAS;EACT,UAAU;EACV,OAAO;EACP,eAAe;EAChB;CAED,mBAAmB;EACjB,aAAa,EACX,iBAAiB,iBAClB;EACD,YAAY;GACV,iBAAiB;GACjB,SAAS;GACV;EACF;CAED,UAAU,EACR,WAAW;EACT,aAAa,EACX,iBAAiB,iBAClB;EACD,YAAY;GACV,iBAAiB;GACjB,SAAS;GACV;EACF,EACF;CAED,UAAU;EACR,UAAU,EACR,MAAM;GACJ,SAAS;GACT,OAAO;GACP,UAAU,EACR,WAAW;IACT,aAAa,EACX,iBAAiB,WAClB;IACD,YAAY,EACV,iBAAiB,WAClB;IACF,EACF;GACF,EACF;EACD,OAAO,EACL,SAAS,EACP,UAAU,EACR,WAAW,EACT,YAAY,EACV,iBAAiB,uBAClB,EACF,EACF,EACF,EACF;EACD,MAAM;GACJ,OAAO;IACL,cAAc;IACd,uBAAuB,EACrB,cAAc,MACf;IACF;GACD,QAAQ;IACN,cAAc;IACd,uBAAuB,EACrB,cAAc,MACf;IACF;GACD,OAAO;IACL,cAAc;IACd,uBAAuB,EACrB,cAAc,MACf;IACF;GACF;EACF;CACD,iBAAiB;EACf,MAAM;EACN,UAAU;EACX;CACF,CAAC;AAEF,IAAM,mBAAmB,OAAO,OAAO;CACrC,UAAU;CACV,KAAK;CACL,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,gBAAgB;CAChB,UAAU;EACR,MAAM;GACJ,OAAO,EACL,IAAI,gBACL;GACD,QAAQ,EACN,IAAI,gBACL;GACD,OAAO,EACL,IAAI,gBACL;GACF;EACD,SAAS;GACP,OAAO,EACL,MAAM,GACP;GACD,KAAK,EACH,OAAO,GACR;GACF;EACF;CACD,iBAAiB,EACf,MAAM,UACP;CACF,CAAC;AAEF,IAAM,wBAAwB,OAAO,kBAAkB,EACrD,MAAM,GACP,CAAC;AAEF,IAAM,sBAAsB,OAAO,kBAAkB,EACnD,OAAO,GACR,CAAC;AAgBF,IAAa,QAAQ,MAAM,YACxB,EAAE,MAAM,gBAAgB,cAAc,KAAK,GAAG,SAAS,iBAAiB;CACvE,MAAM,WAAW,MAAM,OAAoB,KAAK;AAEhD,OAAM,oBACJ,oBACM;EACJ,MAAM,EAAE,YAAY;AACpB,MAAI,QACF,SAAQ,cAAc;AACpB,WAAQ,QAAQ;;AAGpB,SAAO;IAET,CAAC,SAAS,CACX;CAED,MAAM,oBAAoB,MAAM,cAAc,QAAQ,eAAe,EAAE,CAAC,eAAe,CAAC;CAExF,MAAM,kBAAkB,MAAM,cAAc,QAAQ,aAAa,EAAE,CAAC,aAAa,CAAC;AAElF,QACE,qBAAC,cAAD;EAAmB;EAAK,UAAU,MAAM;EAAU,OAAO,MAAM;YAA/D;GACG,qBACC,oBAAC,uBAAD;IAA6B;cAAO;IAAuC,CAAA;GAG7E,oBAAC,aAAD;IACE,KAAK;IACL,gBAAgB;IAChB,cAAc;IACR;IACN,GAAI;IACJ,CAAA;GACD,mBAAmB,oBAAC,qBAAD;IAA2B;cAAO;IAAmC,CAAA;GAC5E;;EAGpB"}
|
|
1
|
+
{"version":3,"file":"Input.js","names":[],"sources":["../../../components/Input/Input.tsx"],"sourcesContent":["import React from 'react';\n\nimport { CSS, styled, VariantProps } from '../../stitches.config';\nimport { elevationVariants } from '../Elevation';\n\n// CONSTANTS\nconst FOCUS_SHADOW = elevationVariants[1].boxShadow; // apply elevation $1 when focus\n\nconst SMALL_HEIGHT = '$5';\nconst MEDIUM_HEIGHT = '$6';\nconst LARGE_HEIGHT = '$7';\n\nconst StyledInput = styled('input', {\n // Reset\n appearance: 'none',\n borderWidth: '0',\n boxSizing: 'border-box',\n fontFamily: '$rubik',\n margin: '0',\n outline: 'none',\n padding: '0',\n width: '100%',\n WebkitTapHighlightColor: 'rgba(0,0,0,0)',\n\n // Custom\n position: 'relative',\n backgroundColor: 'transparent',\n borderRadius: 'inherit', // inherit border radius from InputWrapper\n boxShadow: 'inset 0 0 0 1px $colors$inputBorder',\n color: '$inputText',\n fontVariantNumeric: 'tabular-nums',\n transition: 'box-shadow .1s ease-in-out',\n\n '&[type=\"number\"]': {\n pr: '0', // remove padding for number native controls\n },\n\n '&:-webkit-autofill,&:autofill': {\n boxShadow: 'inset 0 0 0 1px $colors$inputBorder, inset 0 0 0 100px $colors$inputBg',\n },\n\n '&:-webkit-autofill::first-line,&:autofill::first-line': {\n fontFamily: '$rubik',\n color: '$hiContrast',\n },\n\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 2px $colors$inputFocusBorder, ${FOCUS_SHADOW}`,\n },\n\n '&::placeholder': {\n color: '$inputPlaceholder',\n },\n\n '&:read-only:not(:disabled)': {\n boxShadow: 'none',\n },\n\n '&:disabled': {\n pointerEvents: 'none',\n color: '$inputDisabledText',\n },\n\n variants: {\n size: {\n small: {\n height: SMALL_HEIGHT,\n fontSize: '$1',\n px: '$2',\n lineHeight: '$sizes$5',\n '&:-webkit-autofill::first-line,&:autofill::first-line': {\n fontSize: '$1',\n },\n },\n medium: {\n height: MEDIUM_HEIGHT,\n fontSize: '$3',\n px: '$3',\n lineHeight: '$sizes$6',\n '&:-webkit-autofill::first-line,&:autofill::first-line': {\n fontSize: '$3',\n },\n },\n large: {\n height: LARGE_HEIGHT,\n fontSize: '$3',\n px: '$3',\n lineHeight: '$sizes$7',\n '&:-webkit-autofill::first-line,&:autofill::first-line': {\n fontSize: '$3',\n },\n },\n },\n startAdornment: {\n true: {},\n },\n endAdornment: {\n true: {},\n },\n variant: {\n ghost: {\n boxShadow: 'none',\n '&:disabled': {\n boxShadow: 'none',\n },\n backgroundColor: 'transparent',\n '&:focus-visible': {\n backgroundColor: '$loContrast',\n },\n },\n },\n state: {\n invalid: {\n boxShadow: 'inset 0 0 0 1px $colors$inputInvalidBorder',\n '&:focus-visible': {\n boxShadow: `inset 0 0 0 2px $colors$inputInvalidBorder, ${FOCUS_SHADOW}`,\n },\n },\n },\n cursor: {\n default: {\n cursor: 'default',\n '@hover': {\n '&:hover:not(:read-only)': {\n cursor: 'text',\n },\n },\n '&:focus-visible:not(:read-only)': {\n cursor: 'text',\n },\n },\n text: {\n cursor: 'text',\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n cursor: 'default',\n },\n compoundVariants: [\n {\n variant: 'ghost',\n state: 'invalid',\n css: {\n boxShadow: 'inset 0 0 0 1px $colors$inputInvalidBorder',\n },\n },\n {\n startAdornment: true,\n size: 'small',\n css: {\n paddingInlineStart: 'calc($2 + 15px)',\n },\n },\n {\n startAdornment: true,\n size: 'medium',\n css: {\n paddingInlineStart: 'calc($3 + 15px)',\n },\n },\n {\n startAdornment: true,\n size: 'large',\n css: {\n paddingInlineStart: 'calc($3 + 15px)',\n },\n },\n {\n endAdornment: true,\n size: 'small',\n css: {\n paddingInlineEnd: 'calc($2 + 15px)',\n },\n },\n {\n endAdornment: true,\n size: 'medium',\n css: {\n paddingInlineEnd: 'calc($3 + 15px)',\n },\n },\n {\n endAdornment: true,\n size: 'large',\n css: {\n paddingInlineEnd: 'calc($3 + 15px)',\n },\n },\n {\n endAdornment: true,\n size: 'small',\n state: 'invalid',\n css: {\n paddingInlineEnd: 'calc($4 + 30px)', // size padding + adornment margins + icon size + icon size\n },\n },\n {\n endAdornment: true,\n size: 'medium',\n state: 'invalid',\n css: {\n paddingInlineEnd: 'calc($6 + 30px)', // size padding + adornment margins + icon size + icon size\n },\n },\n {\n endAdornment: true,\n size: 'large',\n state: 'invalid',\n css: {\n paddingInlineEnd: 'calc($6 + 30px)', // size padding + adornment margins + icon size + icon size\n },\n },\n ],\n});\n\nconst InputWrapper = styled('div', {\n // Reset\n outline: 'none',\n lineHeight: 0,\n\n position: 'relative',\n backgroundColor: '$inputBg',\n color: '$inputPlaceholder',\n\n '&::before': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n pointerEvents: 'none',\n },\n '&::after': {\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n pointerEvents: 'none',\n },\n\n '&:focus-visible': {\n '&::before': {\n backgroundColor: '$inputFocusBg',\n },\n '&::after': {\n backgroundColor: '$primary',\n opacity: 0.15,\n },\n },\n\n '@hover': {\n '&:hover': {\n '&::before': {\n backgroundColor: '$inputHoverBg',\n },\n '&::after': {\n backgroundColor: '$primary',\n opacity: 0.05,\n },\n },\n },\n\n variants: {\n disabled: {\n true: {\n opacity: 0.7,\n color: '$inputDisabledText',\n '@hover': {\n '&:hover': {\n '&::before': {\n backgroundColor: 'inherit',\n },\n '&::after': {\n backgroundColor: 'inherit',\n },\n },\n },\n },\n },\n state: {\n invalid: {\n '@hover': {\n '&:hover': {\n '&::after': {\n backgroundColor: '$inputInvalidBorder',\n },\n },\n },\n },\n },\n size: {\n small: {\n borderRadius: '$2',\n '&::before, &::after': {\n borderRadius: '$2',\n },\n },\n medium: {\n borderRadius: '$3',\n '&::before, &::after': {\n borderRadius: '$3',\n },\n },\n large: {\n borderRadius: '$3',\n '&::before, &::after': {\n borderRadius: '$3',\n },\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n disabled: false,\n },\n});\n\nconst AdornmentWrapper = styled('div', {\n position: 'absolute',\n top: 0,\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n variants: {\n size: {\n small: {\n mx: 'calc($2 / 2)',\n },\n medium: {\n mx: 'calc($3 / 2)',\n },\n large: {\n mx: 'calc($3 / 2)',\n },\n },\n variant: {\n start: {\n left: 0,\n },\n end: {\n right: 0,\n },\n },\n },\n defaultVariants: {\n size: 'medium',\n },\n});\n\nconst AdornmentWrapperStart = styled(AdornmentWrapper, {\n left: 0,\n});\n\nconst AdornmentWrapperEnd = styled(AdornmentWrapper, {\n right: 0,\n});\n\ntype DefaultInputVariants = VariantProps<typeof StyledInput>;\nexport type InputVariants = Omit<DefaultInputVariants, 'startAdornment' | 'endAdornment'>;\nexport interface HTMLInputProps extends React.InputHTMLAttributes<any> {\n startAdornment?: React.ReactNode;\n endAdornment?: React.ReactNode;\n type?: string;\n}\n\nexport type InputProps = Omit<HTMLInputProps, 'size'> & InputVariants & { css?: CSS };\n\nexport interface InputHandle extends HTMLInputElement {\n clear: () => void;\n}\n\nexport const Input = React.forwardRef<InputHandle, InputProps>(\n ({ size, startAdornment, endAdornment, css, ...props }, forwardedRef) => {\n const inputRef = React.useRef<InputHandle>(null);\n\n React.useImperativeHandle(\n forwardedRef,\n () => {\n const { current } = inputRef;\n if (current) {\n current.clear = () => {\n current.value = '';\n };\n }\n return current as InputHandle;\n },\n [inputRef]\n );\n\n const hasStartAdornment = React.useMemo(() => Boolean(startAdornment), [startAdornment]);\n\n const hasEndAdornment = React.useMemo(() => Boolean(endAdornment), [endAdornment]);\n\n return (\n <InputWrapper css={css} disabled={props.disabled} state={props.state}>\n {hasStartAdornment && (\n <AdornmentWrapperStart size={size}>{startAdornment}</AdornmentWrapperStart>\n )}\n\n <StyledInput\n ref={inputRef}\n startAdornment={hasStartAdornment}\n endAdornment={hasEndAdornment}\n size={size}\n {...props}\n />\n {hasEndAdornment && <AdornmentWrapperEnd size={size}>{endAdornment}</AdornmentWrapperEnd>}\n </InputWrapper>\n );\n }\n);\n"],"mappings":";;;;;AAMA,IAAM,eAAe,kBAAkB,GAAG;AAM1C,IAAM,cAAc,OAAO,SAAS;CAElC,YAAY;CACZ,aAAa;CACb,WAAW;CACX,YAAY;CACZ,QAAQ;CACR,SAAS;CACT,SAAS;CACT,OAAO;CACP,yBAAyB;CAGzB,UAAU;CACV,iBAAiB;CACjB,cAAc;CACd,WAAW;CACX,OAAO;CACP,oBAAoB;CACpB,YAAY;CAEZ,sBAAoB,EAClB,IAAI,KACL;CAED,iCAAiC,EAC/B,WAAW,0EACZ;CAED,yDAAyD;EACvD,YAAY;EACZ,OAAO;EACR;CAED,mBAAmB,EACjB,WAAW,6CAA6C,gBACzD;CAED,kBAAkB,EAChB,OAAO,qBACR;CAED,8BAA8B,EAC5B,WAAW,QACZ;CAED,cAAc;EACZ,eAAe;EACf,OAAO;EACR;CAED,UAAU;EACR,MAAM;GACJ,OAAO;IACL,QAAQ;IACR,UAAU;IACV,IAAI;IACJ,YAAY;IACZ,yDAAyD,EACvD,UAAU,MACX;IACF;GACD,QAAQ;IACN,QAAQ;IACR,UAAU;IACV,IAAI;IACJ,YAAY;IACZ,yDAAyD,EACvD,UAAU,MACX;IACF;GACD,OAAO;IACL,QAAQ;IACR,UAAU;IACV,IAAI;IACJ,YAAY;IACZ,yDAAyD,EACvD,UAAU,MACX;IACF;GACF;EACD,gBAAgB,EACd,MAAM,EAAE,EACT;EACD,cAAc,EACZ,MAAM,EAAE,EACT;EACD,SAAS,EACP,OAAO;GACL,WAAW;GACX,cAAc,EACZ,WAAW,QACZ;GACD,iBAAiB;GACjB,mBAAmB,EACjB,iBAAiB,eAClB;GACF,EACF;EACD,OAAO,EACL,SAAS;GACP,WAAW;GACX,mBAAmB,EACjB,WAAW,+CAA+C,gBAC3D;GACF,EACF;EACD,QAAQ;GACN,SAAS;IACP,QAAQ;IACR,UAAU,EACR,2BAA2B,EACzB,QAAQ,QACT,EACF;IACD,mCAAmC,EACjC,QAAQ,QACT;IACF;GACD,MAAM,EACJ,QAAQ,QACT;GACF;EACF;CACD,iBAAiB;EACf,MAAM;EACN,QAAQ;EACT;CACD,kBAAkB;EAChB;GACE,SAAS;GACT,OAAO;GACP,KAAK,EACH,WAAW,8CACZ;GACF;EACD;GACE,gBAAgB;GAChB,MAAM;GACN,KAAK,EACH,oBAAoB,mBACrB;GACF;EACD;GACE,gBAAgB;GAChB,MAAM;GACN,KAAK,EACH,oBAAoB,mBACrB;GACF;EACD;GACE,gBAAgB;GAChB,MAAM;GACN,KAAK,EACH,oBAAoB,mBACrB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,OAAO;GACP,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,OAAO;GACP,KAAK,EACH,kBAAkB,mBACnB;GACF;EACD;GACE,cAAc;GACd,MAAM;GACN,OAAO;GACP,KAAK,EACH,kBAAkB,mBACnB;GACF;EACF;CACF,CAAC;AAEF,IAAM,eAAe,OAAO,OAAO;CAEjC,SAAS;CACT,YAAY;CAEZ,UAAU;CACV,iBAAiB;CACjB,OAAO;CAEP,aAAa;EACX,WAAW;EACX,SAAS;EACT,UAAU;EACV,OAAO;EACP,eAAe;EAChB;CACD,YAAY;EACV,WAAW;EACX,SAAS;EACT,UAAU;EACV,OAAO;EACP,eAAe;EAChB;CAED,mBAAmB;EACjB,aAAa,EACX,iBAAiB,iBAClB;EACD,YAAY;GACV,iBAAiB;GACjB,SAAS;GACV;EACF;CAED,UAAU,EACR,WAAW;EACT,aAAa,EACX,iBAAiB,iBAClB;EACD,YAAY;GACV,iBAAiB;GACjB,SAAS;GACV;EACF,EACF;CAED,UAAU;EACR,UAAU,EACR,MAAM;GACJ,SAAS;GACT,OAAO;GACP,UAAU,EACR,WAAW;IACT,aAAa,EACX,iBAAiB,WAClB;IACD,YAAY,EACV,iBAAiB,WAClB;IACF,EACF;GACF,EACF;EACD,OAAO,EACL,SAAS,EACP,UAAU,EACR,WAAW,EACT,YAAY,EACV,iBAAiB,uBAClB,EACF,EACF,EACF,EACF;EACD,MAAM;GACJ,OAAO;IACL,cAAc;IACd,uBAAuB,EACrB,cAAc,MACf;IACF;GACD,QAAQ;IACN,cAAc;IACd,uBAAuB,EACrB,cAAc,MACf;IACF;GACD,OAAO;IACL,cAAc;IACd,uBAAuB,EACrB,cAAc,MACf;IACF;GACF;EACF;CACD,iBAAiB;EACf,MAAM;EACN,UAAU;EACX;CACF,CAAC;AAEF,IAAM,mBAAmB,OAAO,OAAO;CACrC,UAAU;CACV,KAAK;CACL,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,gBAAgB;CAChB,UAAU;EACR,MAAM;GACJ,OAAO,EACL,IAAI,gBACL;GACD,QAAQ,EACN,IAAI,gBACL;GACD,OAAO,EACL,IAAI,gBACL;GACF;EACD,SAAS;GACP,OAAO,EACL,MAAM,GACP;GACD,KAAK,EACH,OAAO,GACR;GACF;EACF;CACD,iBAAiB,EACf,MAAM,UACP;CACF,CAAC;AAEF,IAAM,wBAAwB,OAAO,kBAAkB,EACrD,MAAM,GACP,CAAC;AAEF,IAAM,sBAAsB,OAAO,kBAAkB,EACnD,OAAO,GACR,CAAC;AAgBF,IAAa,QAAQ,MAAM,YACxB,EAAE,MAAM,gBAAgB,cAAc,KAAK,GAAG,SAAS,iBAAiB;CACvE,MAAM,WAAW,MAAM,OAAoB,KAAK;CAEhD,MAAM,oBACJ,oBACM;EACJ,MAAM,EAAE,YAAY;EACpB,IAAI,SACF,QAAQ,cAAc;GACpB,QAAQ,QAAQ;;EAGpB,OAAO;IAET,CAAC,SAAS,CACX;CAED,MAAM,oBAAoB,MAAM,cAAc,QAAQ,eAAe,EAAE,CAAC,eAAe,CAAC;CAExF,MAAM,kBAAkB,MAAM,cAAc,QAAQ,aAAa,EAAE,CAAC,aAAa,CAAC;CAElF,OACE,qBAAC,cAAD;EAAmB;EAAK,UAAU,MAAM;EAAU,OAAO,MAAM;YAA/D;GACG,qBACC,oBAAC,uBAAD;IAA6B;cAAO;IAAuC,CAAA;GAG7E,oBAAC,aAAD;IACE,KAAK;IACL,gBAAgB;IAChB,cAAc;IACR;IACN,GAAI;IACJ,CAAA;GACD,mBAAmB,oBAAC,qBAAD;IAA2B;cAAO;IAAmC,CAAA;GAC5E;;EAGpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.themes.cjs","names":[],"sources":["../../../components/Input/Input.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\nimport tinycolor from 'tinycolor2';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\n\nexport namespace Theme {\n export type Colors = {\n inputBg: Property.Color;\n inputBorder: Property.Color;\n inputFocusBg: Property.Color;\n inputFocusBorder: Property.Color;\n inputHoverBg: Property.Color;\n inputText: Property.Color;\n inputPlaceholder: Property.Color;\n inputDisabledText: Property.Color;\n inputInvalidBorder: Property.Color;\n };\n\n type Factory = (primaryColor: ColorInfo) => Colors;\n\n export const getLight: Factory = (primaryColor) => ({\n inputBg: '$deepBlue1',\n inputBorder: '$grayBlue9',\n inputFocusBg: tinycolor('black').setAlpha(0.15).toHslString(),\n inputFocusBorder: primaryColor.helpers.pickScale(8),\n inputHoverBg: '$whiteA9',\n inputText: tinycolor('black').setAlpha(0.74).toHslString(),\n inputPlaceholder: '$blackA10',\n inputDisabledText: tinycolor('black').setAlpha(0.35).toHslString(),\n inputInvalidBorder: '$red9',\n });\n\n export const getDark: Factory = (primaryColor) => ({\n inputBg: '$grayBlue7',\n inputBorder: '$grayBlue9',\n inputFocusBg: tinycolor('black').setAlpha(0.15).toHslString(),\n inputFocusBorder: primaryColor.helpers.pickScale(11),\n inputHoverBg: '$whiteA4',\n inputText: tinycolor('white').setAlpha(0.8).toHslString(),\n inputPlaceholder: '$whiteA10',\n inputDisabledText: tinycolor('white').setAlpha(0.35).toHslString(),\n inputInvalidBorder: '$red9',\n });\n}\n"],"mappings":";;;;AAKO,IAAA;;
|
|
1
|
+
{"version":3,"file":"Input.themes.cjs","names":[],"sources":["../../../components/Input/Input.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\nimport tinycolor from 'tinycolor2';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\n\nexport namespace Theme {\n export type Colors = {\n inputBg: Property.Color;\n inputBorder: Property.Color;\n inputFocusBg: Property.Color;\n inputFocusBorder: Property.Color;\n inputHoverBg: Property.Color;\n inputText: Property.Color;\n inputPlaceholder: Property.Color;\n inputDisabledText: Property.Color;\n inputInvalidBorder: Property.Color;\n };\n\n type Factory = (primaryColor: ColorInfo) => Colors;\n\n export const getLight: Factory = (primaryColor) => ({\n inputBg: '$deepBlue1',\n inputBorder: '$grayBlue9',\n inputFocusBg: tinycolor('black').setAlpha(0.15).toHslString(),\n inputFocusBorder: primaryColor.helpers.pickScale(8),\n inputHoverBg: '$whiteA9',\n inputText: tinycolor('black').setAlpha(0.74).toHslString(),\n inputPlaceholder: '$blackA10',\n inputDisabledText: tinycolor('black').setAlpha(0.35).toHslString(),\n inputInvalidBorder: '$red9',\n });\n\n export const getDark: Factory = (primaryColor) => ({\n inputBg: '$grayBlue7',\n inputBorder: '$grayBlue9',\n inputFocusBg: tinycolor('black').setAlpha(0.15).toHslString(),\n inputFocusBorder: primaryColor.helpers.pickScale(11),\n inputHoverBg: '$whiteA4',\n inputText: tinycolor('white').setAlpha(0.8).toHslString(),\n inputPlaceholder: '$whiteA10',\n inputDisabledText: tinycolor('white').setAlpha(0.35).toHslString(),\n inputInvalidBorder: '$red9',\n });\n}\n"],"mappings":";;;;AAKO,IAAA;;CAeQ,OAAA,YAAqB,kBAAkB;EAClD,SAAS;EACT,aAAa;EACb,eAAA,GAAA,WAAA,SAAwB,QAAQ,CAAC,SAAS,IAAK,CAAC,aAAa;EAC7D,kBAAkB,aAAa,QAAQ,UAAU,EAAE;EACnD,cAAc;EACd,YAAA,GAAA,WAAA,SAAqB,QAAQ,CAAC,SAAS,IAAK,CAAC,aAAa;EAC1D,kBAAkB;EAClB,oBAAA,GAAA,WAAA,SAA6B,QAAQ,CAAC,SAAS,IAAK,CAAC,aAAa;EAClE,oBAAoB;EACrB;CAEY,OAAA,WAAoB,kBAAkB;EACjD,SAAS;EACT,aAAa;EACb,eAAA,GAAA,WAAA,SAAwB,QAAQ,CAAC,SAAS,IAAK,CAAC,aAAa;EAC7D,kBAAkB,aAAa,QAAQ,UAAU,GAAG;EACpD,cAAc;EACd,YAAA,GAAA,WAAA,SAAqB,QAAQ,CAAC,SAAS,GAAI,CAAC,aAAa;EACzD,kBAAkB;EAClB,oBAAA,GAAA,WAAA,SAA6B,QAAQ,CAAC,SAAS,IAAK,CAAC,aAAa;EAClE,oBAAoB;EACrB;yBACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.themes.js","names":[],"sources":["../../../components/Input/Input.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\nimport tinycolor from 'tinycolor2';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\n\nexport namespace Theme {\n export type Colors = {\n inputBg: Property.Color;\n inputBorder: Property.Color;\n inputFocusBg: Property.Color;\n inputFocusBorder: Property.Color;\n inputHoverBg: Property.Color;\n inputText: Property.Color;\n inputPlaceholder: Property.Color;\n inputDisabledText: Property.Color;\n inputInvalidBorder: Property.Color;\n };\n\n type Factory = (primaryColor: ColorInfo) => Colors;\n\n export const getLight: Factory = (primaryColor) => ({\n inputBg: '$deepBlue1',\n inputBorder: '$grayBlue9',\n inputFocusBg: tinycolor('black').setAlpha(0.15).toHslString(),\n inputFocusBorder: primaryColor.helpers.pickScale(8),\n inputHoverBg: '$whiteA9',\n inputText: tinycolor('black').setAlpha(0.74).toHslString(),\n inputPlaceholder: '$blackA10',\n inputDisabledText: tinycolor('black').setAlpha(0.35).toHslString(),\n inputInvalidBorder: '$red9',\n });\n\n export const getDark: Factory = (primaryColor) => ({\n inputBg: '$grayBlue7',\n inputBorder: '$grayBlue9',\n inputFocusBg: tinycolor('black').setAlpha(0.15).toHslString(),\n inputFocusBorder: primaryColor.helpers.pickScale(11),\n inputHoverBg: '$whiteA4',\n inputText: tinycolor('white').setAlpha(0.8).toHslString(),\n inputPlaceholder: '$whiteA10',\n inputDisabledText: tinycolor('white').setAlpha(0.35).toHslString(),\n inputInvalidBorder: '$red9',\n });\n}\n"],"mappings":";;AAKO,IAAA;;
|
|
1
|
+
{"version":3,"file":"Input.themes.js","names":[],"sources":["../../../components/Input/Input.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\nimport tinycolor from 'tinycolor2';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\n\nexport namespace Theme {\n export type Colors = {\n inputBg: Property.Color;\n inputBorder: Property.Color;\n inputFocusBg: Property.Color;\n inputFocusBorder: Property.Color;\n inputHoverBg: Property.Color;\n inputText: Property.Color;\n inputPlaceholder: Property.Color;\n inputDisabledText: Property.Color;\n inputInvalidBorder: Property.Color;\n };\n\n type Factory = (primaryColor: ColorInfo) => Colors;\n\n export const getLight: Factory = (primaryColor) => ({\n inputBg: '$deepBlue1',\n inputBorder: '$grayBlue9',\n inputFocusBg: tinycolor('black').setAlpha(0.15).toHslString(),\n inputFocusBorder: primaryColor.helpers.pickScale(8),\n inputHoverBg: '$whiteA9',\n inputText: tinycolor('black').setAlpha(0.74).toHslString(),\n inputPlaceholder: '$blackA10',\n inputDisabledText: tinycolor('black').setAlpha(0.35).toHslString(),\n inputInvalidBorder: '$red9',\n });\n\n export const getDark: Factory = (primaryColor) => ({\n inputBg: '$grayBlue7',\n inputBorder: '$grayBlue9',\n inputFocusBg: tinycolor('black').setAlpha(0.15).toHslString(),\n inputFocusBorder: primaryColor.helpers.pickScale(11),\n inputHoverBg: '$whiteA4',\n inputText: tinycolor('white').setAlpha(0.8).toHslString(),\n inputPlaceholder: '$whiteA10',\n inputDisabledText: tinycolor('white').setAlpha(0.35).toHslString(),\n inputInvalidBorder: '$red9',\n });\n}\n"],"mappings":";;AAKO,IAAA;;CAeQ,OAAA,YAAqB,kBAAkB;EAClD,SAAS;EACT,aAAa;EACb,cAAc,UAAU,QAAQ,CAAC,SAAS,IAAK,CAAC,aAAa;EAC7D,kBAAkB,aAAa,QAAQ,UAAU,EAAE;EACnD,cAAc;EACd,WAAW,UAAU,QAAQ,CAAC,SAAS,IAAK,CAAC,aAAa;EAC1D,kBAAkB;EAClB,mBAAmB,UAAU,QAAQ,CAAC,SAAS,IAAK,CAAC,aAAa;EAClE,oBAAoB;EACrB;CAEY,OAAA,WAAoB,kBAAkB;EACjD,SAAS;EACT,aAAa;EACb,cAAc,UAAU,QAAQ,CAAC,SAAS,IAAK,CAAC,aAAa;EAC7D,kBAAkB,aAAa,QAAQ,UAAU,GAAG;EACpD,cAAc;EACd,WAAW,UAAU,QAAQ,CAAC,SAAS,GAAI,CAAC,aAAa;EACzD,kBAAkB;EAClB,mBAAmB,UAAU,QAAQ,CAAC,SAAS,IAAK,CAAC,aAAa;EAClE,oBAAoB;EACrB;yBACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.vanilla.cjs","names":[],"sources":["../../../components/Input/Input.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport React from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { adornmentWrapperRecipe, inputWrapperRecipe, styledInputRecipe } from './Input.vanilla.css';\n\ntype StyledInputRecipeVariants = NonNullable<RecipeVariants<typeof styledInputRecipe>>;\n\nexport interface InputVanillaOwnProps extends CSSProps {\n size?: StyledInputRecipeVariants['size'];\n variant?: StyledInputRecipeVariants['variant'];\n state?: StyledInputRecipeVariants['state'];\n cursor?: StyledInputRecipeVariants['cursor'];\n startAdornment?: React.ReactNode;\n endAdornment?: React.ReactNode;\n type?: string;\n}\n\nexport type InputVanillaProps = Omit<React.InputHTMLAttributes<any>, 'size'> & InputVanillaOwnProps;\n\nexport interface InputVanillaHandle extends HTMLInputElement {\n clear: () => void;\n}\n\nexport const InputVanilla = React.forwardRef<InputVanillaHandle, InputVanillaProps>(\n (\n { size, startAdornment, endAdornment, css, variant, state, cursor, className, style, ...props },\n forwardedRef,\n ) => {\n const inputRef = React.useRef<InputVanillaHandle>(null);\n const { colors } = useVanillaExtractTheme();\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n const mergedStyles = { ...cssStyles, ...style, ...assignInlineVars(vars) };\n\n React.useImperativeHandle(forwardedRef, () => {\n const { current } = inputRef;\n if (current) {\n current.clear = () => {\n current.value = '';\n };\n }\n return current as InputVanillaHandle;\n }, [inputRef]);\n\n const hasStartAdornment = React.useMemo(() => Boolean(startAdornment), [startAdornment]);\n const hasEndAdornment = React.useMemo(() => Boolean(endAdornment), [endAdornment]);\n\n const inputWrapperClass = inputWrapperRecipe({\n disabled: props.disabled,\n state,\n size,\n });\n\n const styledInputClass = styledInputRecipe({\n size,\n variant,\n state,\n cursor,\n startAdornment: hasStartAdornment,\n endAdornment: hasEndAdornment,\n });\n\n const adornmentWrapperStartClass = adornmentWrapperRecipe({\n size,\n variant: 'start',\n });\n\n const adornmentWrapperEndClass = adornmentWrapperRecipe({\n size,\n variant: 'end',\n });\n\n return (\n <div className={`${inputWrapperClass} ${className || ''}`.trim()} style={mergedStyles}>\n {hasStartAdornment && <div className={adornmentWrapperStartClass}>{startAdornment}</div>}\n\n <input ref={inputRef} className={styledInputClass} {...props} />\n\n {hasEndAdornment && <div className={adornmentWrapperEndClass}>{endAdornment}</div>}\n </div>\n );\n },\n);\n\nInputVanilla.displayName = 'InputVanilla';\n"],"mappings":";;;;;;;;;AA0BA,IAAa,eAAe,MAAA,QAAM,YAE9B,EAAE,MAAM,gBAAgB,cAAc,KAAK,SAAS,OAAO,QAAQ,WAAW,OAAO,GAAG,SACxF,iBACG;CACH,MAAM,WAAW,MAAA,QAAM,OAA2B,KAAK;CACvD,MAAM,EAAE,WAAW,qBAAA,wBAAwB;CAC3C,MAAM,EAAE,OAAO,WAAW,SAAS,iBAAA,eAAe,KAAK,OAAO;CAC9D,MAAM,eAAe;EAAE,GAAG;EAAW,GAAG;EAAO,IAAA,GAAA,yBAAA,kBAAoB,KAAK;EAAE;
|
|
1
|
+
{"version":3,"file":"Input.vanilla.cjs","names":[],"sources":["../../../components/Input/Input.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport React from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { adornmentWrapperRecipe, inputWrapperRecipe, styledInputRecipe } from './Input.vanilla.css';\n\ntype StyledInputRecipeVariants = NonNullable<RecipeVariants<typeof styledInputRecipe>>;\n\nexport interface InputVanillaOwnProps extends CSSProps {\n size?: StyledInputRecipeVariants['size'];\n variant?: StyledInputRecipeVariants['variant'];\n state?: StyledInputRecipeVariants['state'];\n cursor?: StyledInputRecipeVariants['cursor'];\n startAdornment?: React.ReactNode;\n endAdornment?: React.ReactNode;\n type?: string;\n}\n\nexport type InputVanillaProps = Omit<React.InputHTMLAttributes<any>, 'size'> & InputVanillaOwnProps;\n\nexport interface InputVanillaHandle extends HTMLInputElement {\n clear: () => void;\n}\n\nexport const InputVanilla = React.forwardRef<InputVanillaHandle, InputVanillaProps>(\n (\n { size, startAdornment, endAdornment, css, variant, state, cursor, className, style, ...props },\n forwardedRef,\n ) => {\n const inputRef = React.useRef<InputVanillaHandle>(null);\n const { colors } = useVanillaExtractTheme();\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n const mergedStyles = { ...cssStyles, ...style, ...assignInlineVars(vars) };\n\n React.useImperativeHandle(forwardedRef, () => {\n const { current } = inputRef;\n if (current) {\n current.clear = () => {\n current.value = '';\n };\n }\n return current as InputVanillaHandle;\n }, [inputRef]);\n\n const hasStartAdornment = React.useMemo(() => Boolean(startAdornment), [startAdornment]);\n const hasEndAdornment = React.useMemo(() => Boolean(endAdornment), [endAdornment]);\n\n const inputWrapperClass = inputWrapperRecipe({\n disabled: props.disabled,\n state,\n size,\n });\n\n const styledInputClass = styledInputRecipe({\n size,\n variant,\n state,\n cursor,\n startAdornment: hasStartAdornment,\n endAdornment: hasEndAdornment,\n });\n\n const adornmentWrapperStartClass = adornmentWrapperRecipe({\n size,\n variant: 'start',\n });\n\n const adornmentWrapperEndClass = adornmentWrapperRecipe({\n size,\n variant: 'end',\n });\n\n return (\n <div className={`${inputWrapperClass} ${className || ''}`.trim()} style={mergedStyles}>\n {hasStartAdornment && <div className={adornmentWrapperStartClass}>{startAdornment}</div>}\n\n <input ref={inputRef} className={styledInputClass} {...props} />\n\n {hasEndAdornment && <div className={adornmentWrapperEndClass}>{endAdornment}</div>}\n </div>\n );\n },\n);\n\nInputVanilla.displayName = 'InputVanilla';\n"],"mappings":";;;;;;;;;AA0BA,IAAa,eAAe,MAAA,QAAM,YAE9B,EAAE,MAAM,gBAAgB,cAAc,KAAK,SAAS,OAAO,QAAQ,WAAW,OAAO,GAAG,SACxF,iBACG;CACH,MAAM,WAAW,MAAA,QAAM,OAA2B,KAAK;CACvD,MAAM,EAAE,WAAW,qBAAA,wBAAwB;CAC3C,MAAM,EAAE,OAAO,WAAW,SAAS,iBAAA,eAAe,KAAK,OAAO;CAC9D,MAAM,eAAe;EAAE,GAAG;EAAW,GAAG;EAAO,IAAA,GAAA,yBAAA,kBAAoB,KAAK;EAAE;CAE1E,MAAA,QAAM,oBAAoB,oBAAoB;EAC5C,MAAM,EAAE,YAAY;EACpB,IAAI,SACF,QAAQ,cAAc;GACpB,QAAQ,QAAQ;;EAGpB,OAAO;IACN,CAAC,SAAS,CAAC;CAEd,MAAM,oBAAoB,MAAA,QAAM,cAAc,QAAQ,eAAe,EAAE,CAAC,eAAe,CAAC;CACxF,MAAM,kBAAkB,MAAA,QAAM,cAAc,QAAQ,aAAa,EAAE,CAAC,aAAa,CAAC;CAElF,MAAM,oBAAoB,0BAAA,mBAAmB;EAC3C,UAAU,MAAM;EAChB;EACA;EACD,CAAC;CAEF,MAAM,mBAAmB,0BAAA,kBAAkB;EACzC;EACA;EACA;EACA;EACA,gBAAgB;EAChB,cAAc;EACf,CAAC;CAEF,MAAM,6BAA6B,0BAAA,uBAAuB;EACxD;EACA,SAAS;EACV,CAAC;CAEF,MAAM,2BAA2B,0BAAA,uBAAuB;EACtD;EACA,SAAS;EACV,CAAC;CAEF,OACE,iBAAA,GAAA,kBAAA,MAAC,OAAD;EAAK,WAAW,GAAG,kBAAkB,GAAG,aAAa,KAAK,MAAM;EAAE,OAAO;YAAzE;GACG,qBAAqB,iBAAA,GAAA,kBAAA,KAAC,OAAD;IAAK,WAAW;cAA6B;IAAqB,CAAA;GAExF,iBAAA,GAAA,kBAAA,KAAC,SAAD;IAAO,KAAK;IAAU,WAAW;IAAkB,GAAI;IAAS,CAAA;GAE/D,mBAAmB,iBAAA,GAAA,kBAAA,KAAC,OAAD;IAAK,WAAW;cAA2B;IAAmB,CAAA;GAC9E;;EAGX;AAED,aAAa,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.vanilla.js","names":[],"sources":["../../../components/Input/Input.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport React from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { adornmentWrapperRecipe, inputWrapperRecipe, styledInputRecipe } from './Input.vanilla.css';\n\ntype StyledInputRecipeVariants = NonNullable<RecipeVariants<typeof styledInputRecipe>>;\n\nexport interface InputVanillaOwnProps extends CSSProps {\n size?: StyledInputRecipeVariants['size'];\n variant?: StyledInputRecipeVariants['variant'];\n state?: StyledInputRecipeVariants['state'];\n cursor?: StyledInputRecipeVariants['cursor'];\n startAdornment?: React.ReactNode;\n endAdornment?: React.ReactNode;\n type?: string;\n}\n\nexport type InputVanillaProps = Omit<React.InputHTMLAttributes<any>, 'size'> & InputVanillaOwnProps;\n\nexport interface InputVanillaHandle extends HTMLInputElement {\n clear: () => void;\n}\n\nexport const InputVanilla = React.forwardRef<InputVanillaHandle, InputVanillaProps>(\n (\n { size, startAdornment, endAdornment, css, variant, state, cursor, className, style, ...props },\n forwardedRef,\n ) => {\n const inputRef = React.useRef<InputVanillaHandle>(null);\n const { colors } = useVanillaExtractTheme();\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n const mergedStyles = { ...cssStyles, ...style, ...assignInlineVars(vars) };\n\n React.useImperativeHandle(forwardedRef, () => {\n const { current } = inputRef;\n if (current) {\n current.clear = () => {\n current.value = '';\n };\n }\n return current as InputVanillaHandle;\n }, [inputRef]);\n\n const hasStartAdornment = React.useMemo(() => Boolean(startAdornment), [startAdornment]);\n const hasEndAdornment = React.useMemo(() => Boolean(endAdornment), [endAdornment]);\n\n const inputWrapperClass = inputWrapperRecipe({\n disabled: props.disabled,\n state,\n size,\n });\n\n const styledInputClass = styledInputRecipe({\n size,\n variant,\n state,\n cursor,\n startAdornment: hasStartAdornment,\n endAdornment: hasEndAdornment,\n });\n\n const adornmentWrapperStartClass = adornmentWrapperRecipe({\n size,\n variant: 'start',\n });\n\n const adornmentWrapperEndClass = adornmentWrapperRecipe({\n size,\n variant: 'end',\n });\n\n return (\n <div className={`${inputWrapperClass} ${className || ''}`.trim()} style={mergedStyles}>\n {hasStartAdornment && <div className={adornmentWrapperStartClass}>{startAdornment}</div>}\n\n <input ref={inputRef} className={styledInputClass} {...props} />\n\n {hasEndAdornment && <div className={adornmentWrapperEndClass}>{endAdornment}</div>}\n </div>\n );\n },\n);\n\nInputVanilla.displayName = 'InputVanilla';\n"],"mappings":";;;;;;;AA0BA,IAAa,eAAe,MAAM,YAE9B,EAAE,MAAM,gBAAgB,cAAc,KAAK,SAAS,OAAO,QAAQ,WAAW,OAAO,GAAG,SACxF,iBACG;CACH,MAAM,WAAW,MAAM,OAA2B,KAAK;CACvD,MAAM,EAAE,WAAW,wBAAwB;CAC3C,MAAM,EAAE,OAAO,WAAW,SAAS,eAAe,KAAK,OAAO;CAC9D,MAAM,eAAe;EAAE,GAAG;EAAW,GAAG;EAAO,GAAG,iBAAiB,KAAK;EAAE;
|
|
1
|
+
{"version":3,"file":"Input.vanilla.js","names":[],"sources":["../../../components/Input/Input.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport React from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { adornmentWrapperRecipe, inputWrapperRecipe, styledInputRecipe } from './Input.vanilla.css';\n\ntype StyledInputRecipeVariants = NonNullable<RecipeVariants<typeof styledInputRecipe>>;\n\nexport interface InputVanillaOwnProps extends CSSProps {\n size?: StyledInputRecipeVariants['size'];\n variant?: StyledInputRecipeVariants['variant'];\n state?: StyledInputRecipeVariants['state'];\n cursor?: StyledInputRecipeVariants['cursor'];\n startAdornment?: React.ReactNode;\n endAdornment?: React.ReactNode;\n type?: string;\n}\n\nexport type InputVanillaProps = Omit<React.InputHTMLAttributes<any>, 'size'> & InputVanillaOwnProps;\n\nexport interface InputVanillaHandle extends HTMLInputElement {\n clear: () => void;\n}\n\nexport const InputVanilla = React.forwardRef<InputVanillaHandle, InputVanillaProps>(\n (\n { size, startAdornment, endAdornment, css, variant, state, cursor, className, style, ...props },\n forwardedRef,\n ) => {\n const inputRef = React.useRef<InputVanillaHandle>(null);\n const { colors } = useVanillaExtractTheme();\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n const mergedStyles = { ...cssStyles, ...style, ...assignInlineVars(vars) };\n\n React.useImperativeHandle(forwardedRef, () => {\n const { current } = inputRef;\n if (current) {\n current.clear = () => {\n current.value = '';\n };\n }\n return current as InputVanillaHandle;\n }, [inputRef]);\n\n const hasStartAdornment = React.useMemo(() => Boolean(startAdornment), [startAdornment]);\n const hasEndAdornment = React.useMemo(() => Boolean(endAdornment), [endAdornment]);\n\n const inputWrapperClass = inputWrapperRecipe({\n disabled: props.disabled,\n state,\n size,\n });\n\n const styledInputClass = styledInputRecipe({\n size,\n variant,\n state,\n cursor,\n startAdornment: hasStartAdornment,\n endAdornment: hasEndAdornment,\n });\n\n const adornmentWrapperStartClass = adornmentWrapperRecipe({\n size,\n variant: 'start',\n });\n\n const adornmentWrapperEndClass = adornmentWrapperRecipe({\n size,\n variant: 'end',\n });\n\n return (\n <div className={`${inputWrapperClass} ${className || ''}`.trim()} style={mergedStyles}>\n {hasStartAdornment && <div className={adornmentWrapperStartClass}>{startAdornment}</div>}\n\n <input ref={inputRef} className={styledInputClass} {...props} />\n\n {hasEndAdornment && <div className={adornmentWrapperEndClass}>{endAdornment}</div>}\n </div>\n );\n },\n);\n\nInputVanilla.displayName = 'InputVanilla';\n"],"mappings":";;;;;;;AA0BA,IAAa,eAAe,MAAM,YAE9B,EAAE,MAAM,gBAAgB,cAAc,KAAK,SAAS,OAAO,QAAQ,WAAW,OAAO,GAAG,SACxF,iBACG;CACH,MAAM,WAAW,MAAM,OAA2B,KAAK;CACvD,MAAM,EAAE,WAAW,wBAAwB;CAC3C,MAAM,EAAE,OAAO,WAAW,SAAS,eAAe,KAAK,OAAO;CAC9D,MAAM,eAAe;EAAE,GAAG;EAAW,GAAG;EAAO,GAAG,iBAAiB,KAAK;EAAE;CAE1E,MAAM,oBAAoB,oBAAoB;EAC5C,MAAM,EAAE,YAAY;EACpB,IAAI,SACF,QAAQ,cAAc;GACpB,QAAQ,QAAQ;;EAGpB,OAAO;IACN,CAAC,SAAS,CAAC;CAEd,MAAM,oBAAoB,MAAM,cAAc,QAAQ,eAAe,EAAE,CAAC,eAAe,CAAC;CACxF,MAAM,kBAAkB,MAAM,cAAc,QAAQ,aAAa,EAAE,CAAC,aAAa,CAAC;CAElF,MAAM,oBAAoB,mBAAmB;EAC3C,UAAU,MAAM;EAChB;EACA;EACD,CAAC;CAEF,MAAM,mBAAmB,kBAAkB;EACzC;EACA;EACA;EACA;EACA,gBAAgB;EAChB,cAAc;EACf,CAAC;CAEF,MAAM,6BAA6B,uBAAuB;EACxD;EACA,SAAS;EACV,CAAC;CAEF,MAAM,2BAA2B,uBAAuB;EACtD;EACA,SAAS;EACV,CAAC;CAEF,OACE,qBAAC,OAAD;EAAK,WAAW,GAAG,kBAAkB,GAAG,aAAa,KAAK,MAAM;EAAE,OAAO;YAAzE;GACG,qBAAqB,oBAAC,OAAD;IAAK,WAAW;cAA6B;IAAqB,CAAA;GAExF,oBAAC,SAAD;IAAO,KAAK;IAAU,WAAW;IAAkB,GAAI;IAAS,CAAA;GAE/D,mBAAmB,oBAAC,OAAD;IAAK,WAAW;cAA2B;IAAmB,CAAA;GAC9E;;EAGX;AAED,aAAa,cAAc"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.vanilla.cjs","names":[],"sources":["../../../components/Label/Label.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { labelRecipe } from './Label.vanilla.css';\n\ntype LabelRecipeVariants = NonNullable<RecipeVariants<typeof labelRecipe>>;\n\ninterface LabelOwnProps extends LabelRecipeVariants, CSSProps {}\n\nexport type LabelVanillaProps<C extends ElementType = 'label'> = PolymorphicComponentProps<\n C,\n LabelOwnProps\n>;\n\ntype LabelVanillaComponent = PolymorphicComponent<'label', LabelVanillaProps<ElementType>>;\n\nconst LabelVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'label'>(\n {\n as,\n className,\n css,\n style,\n size,\n weight,\n variant,\n gradient,\n transform,\n noWrap,\n ...props\n }: LabelVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'label';\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = labelRecipe({ size, weight, variant, gradient, transform, noWrap });\n\n return (\n <Component\n ref={ref}\n className={`${recipeClass} ${className || ''}`.trim()}\n style={mergedStyles}\n {...props}\n />\n );\n },\n);\n\nLabelVanillaComponentImpl.displayName = 'LabelVanilla';\n\nexport const LabelVanilla = LabelVanillaComponentImpl as LabelVanillaComponent;\n"],"mappings":";;;;;;;;AAwBA,IAAM,6BAAA,GAAA,MAAA,aAEF,EACE,IACA,WACA,KACA,OACA,MACA,QACA,SACA,UACA,WACA,QACA,GAAG,SAEL,QACG;CACH,MAAM,YAAY,MAAM;CACxB,MAAM,EAAE,WAAW,qBAAA,wBAAwB;CAE3C,MAAM,EAAE,OAAO,WAAW,SAAS,iBAAA,eAAe,KAAK,OAAO;CAE9D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,IAAA,GAAA,yBAAA,kBAAoB,KAAK;EAC1B;
|
|
1
|
+
{"version":3,"file":"Label.vanilla.cjs","names":[],"sources":["../../../components/Label/Label.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { labelRecipe } from './Label.vanilla.css';\n\ntype LabelRecipeVariants = NonNullable<RecipeVariants<typeof labelRecipe>>;\n\ninterface LabelOwnProps extends LabelRecipeVariants, CSSProps {}\n\nexport type LabelVanillaProps<C extends ElementType = 'label'> = PolymorphicComponentProps<\n C,\n LabelOwnProps\n>;\n\ntype LabelVanillaComponent = PolymorphicComponent<'label', LabelVanillaProps<ElementType>>;\n\nconst LabelVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'label'>(\n {\n as,\n className,\n css,\n style,\n size,\n weight,\n variant,\n gradient,\n transform,\n noWrap,\n ...props\n }: LabelVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'label';\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = labelRecipe({ size, weight, variant, gradient, transform, noWrap });\n\n return (\n <Component\n ref={ref}\n className={`${recipeClass} ${className || ''}`.trim()}\n style={mergedStyles}\n {...props}\n />\n );\n },\n);\n\nLabelVanillaComponentImpl.displayName = 'LabelVanilla';\n\nexport const LabelVanilla = LabelVanillaComponentImpl as LabelVanillaComponent;\n"],"mappings":";;;;;;;;AAwBA,IAAM,6BAAA,GAAA,MAAA,aAEF,EACE,IACA,WACA,KACA,OACA,MACA,QACA,SACA,UACA,WACA,QACA,GAAG,SAEL,QACG;CACH,MAAM,YAAY,MAAM;CACxB,MAAM,EAAE,WAAW,qBAAA,wBAAwB;CAE3C,MAAM,EAAE,OAAO,WAAW,SAAS,iBAAA,eAAe,KAAK,OAAO;CAE9D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,IAAA,GAAA,yBAAA,kBAAoB,KAAK;EAC1B;CAID,OACE,iBAAA,GAAA,kBAAA,KAAC,WAAD;EACO;EACL,WAAW,GALK,0BAAA,YAAY;GAAE;GAAM;GAAQ;GAAS;GAAU;GAAW;GAAQ,CAKpE,CAAY,GAAG,aAAa,KAAK,MAAM;EACrD,OAAO;EACP,GAAI;EACJ,CAAA;EAGP;AAED,0BAA0B,cAAc;AAExC,IAAa,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Label.vanilla.js","names":[],"sources":["../../../components/Label/Label.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { labelRecipe } from './Label.vanilla.css';\n\ntype LabelRecipeVariants = NonNullable<RecipeVariants<typeof labelRecipe>>;\n\ninterface LabelOwnProps extends LabelRecipeVariants, CSSProps {}\n\nexport type LabelVanillaProps<C extends ElementType = 'label'> = PolymorphicComponentProps<\n C,\n LabelOwnProps\n>;\n\ntype LabelVanillaComponent = PolymorphicComponent<'label', LabelVanillaProps<ElementType>>;\n\nconst LabelVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'label'>(\n {\n as,\n className,\n css,\n style,\n size,\n weight,\n variant,\n gradient,\n transform,\n noWrap,\n ...props\n }: LabelVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'label';\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = labelRecipe({ size, weight, variant, gradient, transform, noWrap });\n\n return (\n <Component\n ref={ref}\n className={`${recipeClass} ${className || ''}`.trim()}\n style={mergedStyles}\n {...props}\n />\n );\n },\n);\n\nLabelVanillaComponentImpl.displayName = 'LabelVanilla';\n\nexport const LabelVanilla = LabelVanillaComponentImpl as LabelVanillaComponent;\n"],"mappings":";;;;;;;AAwBA,IAAM,4BAA4B,YAE9B,EACE,IACA,WACA,KACA,OACA,MACA,QACA,SACA,UACA,WACA,QACA,GAAG,SAEL,QACG;CACH,MAAM,YAAY,MAAM;CACxB,MAAM,EAAE,WAAW,wBAAwB;CAE3C,MAAM,EAAE,OAAO,WAAW,SAAS,eAAe,KAAK,OAAO;CAE9D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,GAAG,iBAAiB,KAAK;EAC1B;
|
|
1
|
+
{"version":3,"file":"Label.vanilla.js","names":[],"sources":["../../../components/Label/Label.vanilla.tsx"],"sourcesContent":["import { assignInlineVars } from '@vanilla-extract/dynamic';\nimport { RecipeVariants } from '@vanilla-extract/recipes';\nimport { ElementType, forwardRef } from 'react';\n\nimport { CSSProps, processCSSProp } from '../../styles/cssProps';\nimport {\n PolymorphicComponent,\n PolymorphicComponentProps,\n PolymorphicRef,\n} from '../../styles/polymorphic';\nimport { useVanillaExtractTheme } from '../../styles/themeContext';\nimport { labelRecipe } from './Label.vanilla.css';\n\ntype LabelRecipeVariants = NonNullable<RecipeVariants<typeof labelRecipe>>;\n\ninterface LabelOwnProps extends LabelRecipeVariants, CSSProps {}\n\nexport type LabelVanillaProps<C extends ElementType = 'label'> = PolymorphicComponentProps<\n C,\n LabelOwnProps\n>;\n\ntype LabelVanillaComponent = PolymorphicComponent<'label', LabelVanillaProps<ElementType>>;\n\nconst LabelVanillaComponentImpl = forwardRef(\n <C extends ElementType = 'label'>(\n {\n as,\n className,\n css,\n style,\n size,\n weight,\n variant,\n gradient,\n transform,\n noWrap,\n ...props\n }: LabelVanillaProps<C>,\n ref?: PolymorphicRef<C>,\n ) => {\n const Component = as || 'label';\n const { colors } = useVanillaExtractTheme();\n\n const { style: cssStyles, vars } = processCSSProp(css, colors);\n\n const mergedStyles = {\n ...cssStyles,\n ...style,\n ...assignInlineVars(vars),\n };\n\n const recipeClass = labelRecipe({ size, weight, variant, gradient, transform, noWrap });\n\n return (\n <Component\n ref={ref}\n className={`${recipeClass} ${className || ''}`.trim()}\n style={mergedStyles}\n {...props}\n />\n );\n },\n);\n\nLabelVanillaComponentImpl.displayName = 'LabelVanilla';\n\nexport const LabelVanilla = LabelVanillaComponentImpl as LabelVanillaComponent;\n"],"mappings":";;;;;;;AAwBA,IAAM,4BAA4B,YAE9B,EACE,IACA,WACA,KACA,OACA,MACA,QACA,SACA,UACA,WACA,QACA,GAAG,SAEL,QACG;CACH,MAAM,YAAY,MAAM;CACxB,MAAM,EAAE,WAAW,wBAAwB;CAE3C,MAAM,EAAE,OAAO,WAAW,SAAS,eAAe,KAAK,OAAO;CAE9D,MAAM,eAAe;EACnB,GAAG;EACH,GAAG;EACH,GAAG,iBAAiB,KAAK;EAC1B;CAID,OACE,oBAAC,WAAD;EACO;EACL,WAAW,GALK,YAAY;GAAE;GAAM;GAAQ;GAAS;GAAU;GAAW;GAAQ,CAKpE,CAAY,GAAG,aAAa,KAAK,MAAM;EACrD,OAAO;EACP,GAAI;EACJ,CAAA;EAGP;AAED,0BAA0B,cAAc;AAExC,IAAa,eAAe"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.themes.cjs","names":[],"sources":["../../../components/Link/Link.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\nimport tinycolor from 'tinycolor2';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\nexport namespace Theme {\n type Colors = {\n linkSubtle: Property.Color;\n linkBlueTextDecoration: Property.Color;\n linkBlueHoverTextDecoration: Property.Color;\n linkBlueFocusOutline: Property.Color;\n linkContrast: Property.Color;\n linkContrastTextDecoration: Property.Color;\n linkContrastHoverTextDecoration: Property.Color;\n linkContrastFocusOutline: Property.Color;\n linkSubtleTextDecoration: Property.Color;\n linkSubtleHoverTextDecoration: Property.Color;\n linkSubtleFocusOutline: Property.Color;\n linkPrimary: Property.Color;\n linkPrimaryTextDecoration: Property.Color;\n linkPrimaryHoverTextDecoration: Property.Color;\n linkPrimaryFocusOutline: Property.Color;\n };\n\n type Factory = (primaryColor: ColorInfo) => Colors;\n\n export const getLight: Factory = (primaryColor) => ({\n linkBlue: '$blue11',\n linkBlueTextDecoration: '$blue7',\n linkBlueHoverTextDecoration: '$blue11',\n linkBlueFocusOutline: '$blue8',\n linkContrast: '$hiContrast',\n linkContrastTextDecoration: '$slate8',\n linkContrastHoverTextDecoration: '$hiContrast',\n linkContrastFocusOutline: '$slate8',\n linkSubtle: '$deepBlue7',\n linkSubtleTextDecoration: '$deepBlue5',\n linkSubtleHoverTextDecoration: '$deepBlue7',\n linkSubtleFocusOutline: '$deepBlue4',\n linkPrimary: tinycolor(primaryColor.value).darken(26).toHslString(),\n linkPrimaryTextDecoration: tinycolor(primaryColor.value).darken(16).toHslString(),\n linkPrimaryHoverTextDecoration: tinycolor(primaryColor.value).darken(26).toHslString(),\n linkPrimaryFocusOutline: tinycolor(primaryColor.value).darken(16).toHslString(),\n });\n\n export const getDark: Factory = (primaryColor) => ({\n linkBlue: '$blue11',\n linkBlueTextDecoration: '$blue8',\n linkBlueHoverTextDecoration: '$blue11',\n linkBlueFocusOutline: '$blue8',\n linkContrast: '$hiContrast',\n linkContrastTextDecoration: '$slate8',\n linkContrastHoverTextDecoration: '$hiContrast',\n linkContrastFocusOutline: '$slate8',\n linkSubtle: '$deepBlue6',\n linkSubtleTextDecoration: '$deepBlue4',\n linkSubtleHoverTextDecoration: '$deepBlue5',\n linkSubtleFocusOutline: '$deepBlue3',\n linkPrimary: '$primary',\n linkPrimaryTextDecoration: tinycolor(primaryColor.value).lighten(16).toHslString(),\n linkPrimaryHoverTextDecoration: tinycolor(primaryColor.value).darken(20).toHslString(),\n linkPrimaryFocusOutline: tinycolor(primaryColor.value).lighten(16).toHslString(),\n });\n}\n"],"mappings":";;;;AAIO,IAAA;;
|
|
1
|
+
{"version":3,"file":"Link.themes.cjs","names":[],"sources":["../../../components/Link/Link.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\nimport tinycolor from 'tinycolor2';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\nexport namespace Theme {\n type Colors = {\n linkSubtle: Property.Color;\n linkBlueTextDecoration: Property.Color;\n linkBlueHoverTextDecoration: Property.Color;\n linkBlueFocusOutline: Property.Color;\n linkContrast: Property.Color;\n linkContrastTextDecoration: Property.Color;\n linkContrastHoverTextDecoration: Property.Color;\n linkContrastFocusOutline: Property.Color;\n linkSubtleTextDecoration: Property.Color;\n linkSubtleHoverTextDecoration: Property.Color;\n linkSubtleFocusOutline: Property.Color;\n linkPrimary: Property.Color;\n linkPrimaryTextDecoration: Property.Color;\n linkPrimaryHoverTextDecoration: Property.Color;\n linkPrimaryFocusOutline: Property.Color;\n };\n\n type Factory = (primaryColor: ColorInfo) => Colors;\n\n export const getLight: Factory = (primaryColor) => ({\n linkBlue: '$blue11',\n linkBlueTextDecoration: '$blue7',\n linkBlueHoverTextDecoration: '$blue11',\n linkBlueFocusOutline: '$blue8',\n linkContrast: '$hiContrast',\n linkContrastTextDecoration: '$slate8',\n linkContrastHoverTextDecoration: '$hiContrast',\n linkContrastFocusOutline: '$slate8',\n linkSubtle: '$deepBlue7',\n linkSubtleTextDecoration: '$deepBlue5',\n linkSubtleHoverTextDecoration: '$deepBlue7',\n linkSubtleFocusOutline: '$deepBlue4',\n linkPrimary: tinycolor(primaryColor.value).darken(26).toHslString(),\n linkPrimaryTextDecoration: tinycolor(primaryColor.value).darken(16).toHslString(),\n linkPrimaryHoverTextDecoration: tinycolor(primaryColor.value).darken(26).toHslString(),\n linkPrimaryFocusOutline: tinycolor(primaryColor.value).darken(16).toHslString(),\n });\n\n export const getDark: Factory = (primaryColor) => ({\n linkBlue: '$blue11',\n linkBlueTextDecoration: '$blue8',\n linkBlueHoverTextDecoration: '$blue11',\n linkBlueFocusOutline: '$blue8',\n linkContrast: '$hiContrast',\n linkContrastTextDecoration: '$slate8',\n linkContrastHoverTextDecoration: '$hiContrast',\n linkContrastFocusOutline: '$slate8',\n linkSubtle: '$deepBlue6',\n linkSubtleTextDecoration: '$deepBlue4',\n linkSubtleHoverTextDecoration: '$deepBlue5',\n linkSubtleFocusOutline: '$deepBlue3',\n linkPrimary: '$primary',\n linkPrimaryTextDecoration: tinycolor(primaryColor.value).lighten(16).toHslString(),\n linkPrimaryHoverTextDecoration: tinycolor(primaryColor.value).darken(20).toHslString(),\n linkPrimaryFocusOutline: tinycolor(primaryColor.value).lighten(16).toHslString(),\n });\n}\n"],"mappings":";;;;AAIO,IAAA;;CAqBQ,OAAA,YAAqB,kBAAkB;EAClD,UAAU;EACV,wBAAwB;EACxB,6BAA6B;EAC7B,sBAAsB;EACtB,cAAc;EACd,4BAA4B;EAC5B,iCAAiC;EACjC,0BAA0B;EAC1B,YAAY;EACZ,0BAA0B;EAC1B,+BAA+B;EAC/B,wBAAwB;EACxB,cAAA,GAAA,WAAA,SAAuB,aAAa,MAAM,CAAC,OAAO,GAAG,CAAC,aAAa;EACnE,4BAAA,GAAA,WAAA,SAAqC,aAAa,MAAM,CAAC,OAAO,GAAG,CAAC,aAAa;EACjF,iCAAA,GAAA,WAAA,SAA0C,aAAa,MAAM,CAAC,OAAO,GAAG,CAAC,aAAa;EACtF,0BAAA,GAAA,WAAA,SAAmC,aAAa,MAAM,CAAC,OAAO,GAAG,CAAC,aAAa;EAChF;CAEY,OAAA,WAAoB,kBAAkB;EACjD,UAAU;EACV,wBAAwB;EACxB,6BAA6B;EAC7B,sBAAsB;EACtB,cAAc;EACd,4BAA4B;EAC5B,iCAAiC;EACjC,0BAA0B;EAC1B,YAAY;EACZ,0BAA0B;EAC1B,+BAA+B;EAC/B,wBAAwB;EACxB,aAAa;EACb,4BAAA,GAAA,WAAA,SAAqC,aAAa,MAAM,CAAC,QAAQ,GAAG,CAAC,aAAa;EAClF,iCAAA,GAAA,WAAA,SAA0C,aAAa,MAAM,CAAC,OAAO,GAAG,CAAC,aAAa;EACtF,0BAAA,GAAA,WAAA,SAAmC,aAAa,MAAM,CAAC,QAAQ,GAAG,CAAC,aAAa;EACjF;yBACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.themes.js","names":[],"sources":["../../../components/Link/Link.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\nimport tinycolor from 'tinycolor2';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\nexport namespace Theme {\n type Colors = {\n linkSubtle: Property.Color;\n linkBlueTextDecoration: Property.Color;\n linkBlueHoverTextDecoration: Property.Color;\n linkBlueFocusOutline: Property.Color;\n linkContrast: Property.Color;\n linkContrastTextDecoration: Property.Color;\n linkContrastHoverTextDecoration: Property.Color;\n linkContrastFocusOutline: Property.Color;\n linkSubtleTextDecoration: Property.Color;\n linkSubtleHoverTextDecoration: Property.Color;\n linkSubtleFocusOutline: Property.Color;\n linkPrimary: Property.Color;\n linkPrimaryTextDecoration: Property.Color;\n linkPrimaryHoverTextDecoration: Property.Color;\n linkPrimaryFocusOutline: Property.Color;\n };\n\n type Factory = (primaryColor: ColorInfo) => Colors;\n\n export const getLight: Factory = (primaryColor) => ({\n linkBlue: '$blue11',\n linkBlueTextDecoration: '$blue7',\n linkBlueHoverTextDecoration: '$blue11',\n linkBlueFocusOutline: '$blue8',\n linkContrast: '$hiContrast',\n linkContrastTextDecoration: '$slate8',\n linkContrastHoverTextDecoration: '$hiContrast',\n linkContrastFocusOutline: '$slate8',\n linkSubtle: '$deepBlue7',\n linkSubtleTextDecoration: '$deepBlue5',\n linkSubtleHoverTextDecoration: '$deepBlue7',\n linkSubtleFocusOutline: '$deepBlue4',\n linkPrimary: tinycolor(primaryColor.value).darken(26).toHslString(),\n linkPrimaryTextDecoration: tinycolor(primaryColor.value).darken(16).toHslString(),\n linkPrimaryHoverTextDecoration: tinycolor(primaryColor.value).darken(26).toHslString(),\n linkPrimaryFocusOutline: tinycolor(primaryColor.value).darken(16).toHslString(),\n });\n\n export const getDark: Factory = (primaryColor) => ({\n linkBlue: '$blue11',\n linkBlueTextDecoration: '$blue8',\n linkBlueHoverTextDecoration: '$blue11',\n linkBlueFocusOutline: '$blue8',\n linkContrast: '$hiContrast',\n linkContrastTextDecoration: '$slate8',\n linkContrastHoverTextDecoration: '$hiContrast',\n linkContrastFocusOutline: '$slate8',\n linkSubtle: '$deepBlue6',\n linkSubtleTextDecoration: '$deepBlue4',\n linkSubtleHoverTextDecoration: '$deepBlue5',\n linkSubtleFocusOutline: '$deepBlue3',\n linkPrimary: '$primary',\n linkPrimaryTextDecoration: tinycolor(primaryColor.value).lighten(16).toHslString(),\n linkPrimaryHoverTextDecoration: tinycolor(primaryColor.value).darken(20).toHslString(),\n linkPrimaryFocusOutline: tinycolor(primaryColor.value).lighten(16).toHslString(),\n });\n}\n"],"mappings":";;AAIO,IAAA;;
|
|
1
|
+
{"version":3,"file":"Link.themes.js","names":[],"sources":["../../../components/Link/Link.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\nimport tinycolor from 'tinycolor2';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\nexport namespace Theme {\n type Colors = {\n linkSubtle: Property.Color;\n linkBlueTextDecoration: Property.Color;\n linkBlueHoverTextDecoration: Property.Color;\n linkBlueFocusOutline: Property.Color;\n linkContrast: Property.Color;\n linkContrastTextDecoration: Property.Color;\n linkContrastHoverTextDecoration: Property.Color;\n linkContrastFocusOutline: Property.Color;\n linkSubtleTextDecoration: Property.Color;\n linkSubtleHoverTextDecoration: Property.Color;\n linkSubtleFocusOutline: Property.Color;\n linkPrimary: Property.Color;\n linkPrimaryTextDecoration: Property.Color;\n linkPrimaryHoverTextDecoration: Property.Color;\n linkPrimaryFocusOutline: Property.Color;\n };\n\n type Factory = (primaryColor: ColorInfo) => Colors;\n\n export const getLight: Factory = (primaryColor) => ({\n linkBlue: '$blue11',\n linkBlueTextDecoration: '$blue7',\n linkBlueHoverTextDecoration: '$blue11',\n linkBlueFocusOutline: '$blue8',\n linkContrast: '$hiContrast',\n linkContrastTextDecoration: '$slate8',\n linkContrastHoverTextDecoration: '$hiContrast',\n linkContrastFocusOutline: '$slate8',\n linkSubtle: '$deepBlue7',\n linkSubtleTextDecoration: '$deepBlue5',\n linkSubtleHoverTextDecoration: '$deepBlue7',\n linkSubtleFocusOutline: '$deepBlue4',\n linkPrimary: tinycolor(primaryColor.value).darken(26).toHslString(),\n linkPrimaryTextDecoration: tinycolor(primaryColor.value).darken(16).toHslString(),\n linkPrimaryHoverTextDecoration: tinycolor(primaryColor.value).darken(26).toHslString(),\n linkPrimaryFocusOutline: tinycolor(primaryColor.value).darken(16).toHslString(),\n });\n\n export const getDark: Factory = (primaryColor) => ({\n linkBlue: '$blue11',\n linkBlueTextDecoration: '$blue8',\n linkBlueHoverTextDecoration: '$blue11',\n linkBlueFocusOutline: '$blue8',\n linkContrast: '$hiContrast',\n linkContrastTextDecoration: '$slate8',\n linkContrastHoverTextDecoration: '$hiContrast',\n linkContrastFocusOutline: '$slate8',\n linkSubtle: '$deepBlue6',\n linkSubtleTextDecoration: '$deepBlue4',\n linkSubtleHoverTextDecoration: '$deepBlue5',\n linkSubtleFocusOutline: '$deepBlue3',\n linkPrimary: '$primary',\n linkPrimaryTextDecoration: tinycolor(primaryColor.value).lighten(16).toHslString(),\n linkPrimaryHoverTextDecoration: tinycolor(primaryColor.value).darken(20).toHslString(),\n linkPrimaryFocusOutline: tinycolor(primaryColor.value).lighten(16).toHslString(),\n });\n}\n"],"mappings":";;AAIO,IAAA;;CAqBQ,OAAA,YAAqB,kBAAkB;EAClD,UAAU;EACV,wBAAwB;EACxB,6BAA6B;EAC7B,sBAAsB;EACtB,cAAc;EACd,4BAA4B;EAC5B,iCAAiC;EACjC,0BAA0B;EAC1B,YAAY;EACZ,0BAA0B;EAC1B,+BAA+B;EAC/B,wBAAwB;EACxB,aAAa,UAAU,aAAa,MAAM,CAAC,OAAO,GAAG,CAAC,aAAa;EACnE,2BAA2B,UAAU,aAAa,MAAM,CAAC,OAAO,GAAG,CAAC,aAAa;EACjF,gCAAgC,UAAU,aAAa,MAAM,CAAC,OAAO,GAAG,CAAC,aAAa;EACtF,yBAAyB,UAAU,aAAa,MAAM,CAAC,OAAO,GAAG,CAAC,aAAa;EAChF;CAEY,OAAA,WAAoB,kBAAkB;EACjD,UAAU;EACV,wBAAwB;EACxB,6BAA6B;EAC7B,sBAAsB;EACtB,cAAc;EACd,4BAA4B;EAC5B,iCAAiC;EACjC,0BAA0B;EAC1B,YAAY;EACZ,0BAA0B;EAC1B,+BAA+B;EAC/B,wBAAwB;EACxB,aAAa;EACb,2BAA2B,UAAU,aAAa,MAAM,CAAC,QAAQ,GAAG,CAAC,aAAa;EAClF,gCAAgC,UAAU,aAAa,MAAM,CAAC,OAAO,GAAG,CAAC,aAAa;EACtF,yBAAyB,UAAU,aAAa,MAAM,CAAC,QAAQ,GAAG,CAAC,aAAa;EACjF;yBACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.cjs","names":[],"sources":["../../../components/List/List.tsx"],"sourcesContent":["import React, { ComponentProps, createContext, ReactNode, useContext, useMemo } from 'react';\n\nimport { styled, VariantProps } from '../../stitches.config';\nimport { BUTTON_BASE_STYLES } from '../Button';\nimport { elevationVariants } from '../Elevation';\nimport { Flex } from '../Flex';\n\nconst LIST_ITEM_CONTENT_STYLES = {\n bc: 'transparent',\n c: 'inherit',\n borderRadius: 'inherit',\n fontFamily: '$rubik',\n fontSize: '$3',\n fontVariantNumeric: 'tabular-nums',\n};\n\nconst StyledSpan = styled('span', Flex, {\n // APPLY BUTTON STYLES\n ...LIST_ITEM_CONTENT_STYLES,\n // CUSTOM\n p: '$1',\n gap: '$1',\n});\n\nconst StyledListItemButton = styled('button', Flex, {\n ...BUTTON_BASE_STYLES,\n ...LIST_ITEM_CONTENT_STYLES,\n outline: 'none',\n\n // CUSTOM\n flexGrow: 1,\n width: '100%',\n p: '$2',\n position: 'relative',\n '&::before': {\n borderRadius: 'inherit',\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n },\n '&::after': {\n borderRadius: 'inherit',\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n },\n '&:focus, &:focus-visible': {\n boxShadow: 'inset 0 0 0 2px $colors$listItemFocusBorder',\n },\n\n '@hover': {\n '&:hover': {\n cursor: 'pointer',\n '&::before': {\n backgroundColor: '$listItemHoverBg',\n },\n '&::after': {\n backgroundColor: '$primary',\n opacity: 0.05,\n },\n },\n },\n '&:active': {\n '&::before': {\n backgroundColor: '$listItemActiveBg',\n },\n '&::after': {\n backgroundColor: '$primary',\n opacity: 0.05,\n },\n },\n});\n\nconst StyledLi = styled('li', {\n m: '$2',\n outline: 'none',\n position: 'relative',\n '&:focus-within': {\n boxShadow: 'none',\n },\n variants: {\n elevation: elevationVariants,\n },\n defaultVariants: {\n elevation: '0',\n },\n});\n\nconst StyledUl = styled('ul', {\n m: '0 0 0 8px',\n p: 0,\n color: '$textDefault',\n\n '&:has(> li > span > input[type=\"checkbox\"])': {\n m: 0,\n listStyle: 'none',\n '> li': {\n marginLeft: 0,\n '> span': {\n input: {\n margin: '0 3px 0 0',\n },\n },\n },\n },\n // Restore left-margin indentation when a nested checkbox list is inside a li\n 'li > &:has(> li > span > input[type=\"checkbox\"])': {\n marginLeft: '$2',\n '> li': {\n marginLeft: '$2',\n },\n },\n});\n\nconst StyledOl = styled('ol', {\n m: '0 0 0 8px',\n p: 0,\n color: '$textDefault',\n\n '> li::marker': {\n fontSize: '$3',\n fontFamily: '$rubik',\n },\n});\n\nconst ListContext = createContext({\n interactive: false,\n});\n\nexport interface ListProps extends ComponentProps<typeof StyledUl>, VariantProps<typeof StyledUl> {\n interactive?: boolean;\n}\nexport const Ul = React.forwardRef<React.ElementRef<typeof StyledUl>, ListProps>(\n ({ interactive, ...props }, forwardedRef) => {\n const parentContext = useContext(ListContext);\n const contextValue = useMemo(\n () => ({\n interactive: interactive !== undefined ? !!interactive : parentContext.interactive,\n }),\n [interactive, parentContext.interactive],\n );\n\n return (\n <ListContext.Provider value={contextValue}>\n <StyledUl role=\"list\" ref={forwardedRef} {...props} />\n </ListContext.Provider>\n );\n },\n);\n\nexport interface OrderedListProps\n extends ComponentProps<typeof StyledOl>,\n VariantProps<typeof StyledOl> {\n interactive?: boolean;\n}\n\nexport const Ol = React.forwardRef<React.ElementRef<typeof StyledOl>, OrderedListProps>(\n ({ interactive, ...props }, forwardedRef) => {\n const parentContext = useContext(ListContext);\n const contextValue = useMemo(\n () => ({\n interactive: interactive !== undefined ? !!interactive : parentContext.interactive,\n }),\n [interactive, parentContext.interactive],\n );\n\n return (\n <ListContext.Provider value={contextValue}>\n <StyledOl role=\"list\" ref={forwardedRef} {...props} />\n </ListContext.Provider>\n );\n },\n);\n\nconst ControlsWrapper = styled('div', {\n position: 'absolute',\n top: 0,\n right: '$2',\n zIndex: 1,\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n overflow: 'visible',\n});\n\nexport interface ListItemProps\n extends ComponentProps<typeof StyledLi>,\n VariantProps<typeof StyledLi>,\n VariantProps<typeof Flex> {\n controls?: ReactNode;\n}\nexport const Li = React.forwardRef<React.ElementRef<typeof StyledLi>, ListItemProps>(\n ({ children, controls, align, justify, direction, gap, wrap, ...props }, forwardedRef) => {\n const { interactive } = useContext(ListContext);\n\n const childArray = React.Children.toArray(children);\n const nestedLists = childArray.filter(\n (child) => React.isValidElement(child) && (child.type === Ul || child.type === Ol),\n );\n const inlineChildren = childArray.filter(\n (child) => !(React.isValidElement(child) && (child.type === Ul || child.type === Ol)),\n );\n\n return (\n <StyledLi {...props} ref={forwardedRef}>\n {interactive ? (\n <StyledListItemButton\n align={align}\n justify={justify}\n direction={direction}\n gap={gap}\n wrap={wrap}\n >\n {inlineChildren}\n </StyledListItemButton>\n ) : (\n <StyledSpan\n align={align || 'center'}\n justify={justify}\n direction={direction}\n gap={gap}\n wrap={wrap}\n css={{ flexGrow: 1 }}\n >\n {inlineChildren}\n </StyledSpan>\n )}\n {nestedLists}\n {!!controls && <ControlsWrapper>{controls}</ControlsWrapper>}\n </StyledLi>\n );\n },\n);\n"],"mappings":";;;;;;;;;AAOA,IAAM,2BAA2B;CAC/B,IAAI;CACJ,GAAG;CACH,cAAc;CACd,YAAY;CACZ,UAAU;CACV,oBAAoB;CACrB;AAED,IAAM,aAAa,wBAAA,OAAO,QAAQ,aAAA,MAAM;CAEtC,GAAG;CAEH,GAAG;CACH,KAAK;CACN,CAAC;AAEF,IAAM,uBAAuB,wBAAA,OAAO,UAAU,aAAA,MAAM;CAClD,GAAG,eAAA;CACH,GAAG;CACH,SAAS;CAGT,UAAU;CACV,OAAO;CACP,GAAG;CACH,UAAU;CACV,aAAa;EACX,cAAc;EACd,WAAW;EACX,SAAS;EACT,UAAU;EACV,OAAO;EACR;CACD,YAAY;EACV,cAAc;EACd,WAAW;EACX,SAAS;EACT,UAAU;EACV,OAAO;EACR;CACD,4BAA4B,EAC1B,WAAW,+CACZ;CAED,UAAU,EACR,WAAW;EACT,QAAQ;EACR,aAAa,EACX,iBAAiB,oBAClB;EACD,YAAY;GACV,iBAAiB;GACjB,SAAS;GACV;EACF,EACF;CACD,YAAY;EACV,aAAa,EACX,iBAAiB,qBAClB;EACD,YAAY;GACV,iBAAiB;GACjB,SAAS;GACV;EACF;CACF,CAAC;AAEF,IAAM,WAAW,wBAAA,OAAO,MAAM;CAC5B,GAAG;CACH,SAAS;CACT,UAAU;CACV,kBAAkB,EAChB,WAAW,QACZ;CACD,UAAU,EACR,WAAW,kBAAA,mBACZ;CACD,iBAAiB,EACf,WAAW,KACZ;CACF,CAAC;AAEF,IAAM,WAAW,wBAAA,OAAO,MAAM;CAC5B,GAAG;CACH,GAAG;CACH,OAAO;CAEP,iDAA+C;EAC7C,GAAG;EACH,WAAW;EACX,QAAQ;GACN,YAAY;GACZ,UAAU,EACR,OAAO,EACL,QAAQ,aACT,EACF;GACF;EACF;CAED,sDAAoD;EAClD,YAAY;EACZ,QAAQ,EACN,YAAY,MACb;EACF;CACF,CAAC;AAEF,IAAM,WAAW,wBAAA,OAAO,MAAM;CAC5B,GAAG;CACH,GAAG;CACH,OAAO;CAEP,gBAAgB;EACd,UAAU;EACV,YAAY;EACb;CACF,CAAC;AAEF,IAAM,eAAA,GAAA,MAAA,eAA4B,EAChC,aAAa,OACd,CAAC;AAKF,IAAa,KAAK,MAAA,QAAM,YACrB,EAAE,aAAa,GAAG,SAAS,iBAAiB;CAC3C,MAAM,iBAAA,GAAA,MAAA,YAA2B,YAAY;CAC7C,MAAM,gBAAA,GAAA,MAAA,gBACG,EACL,aAAa,gBAAgB,KAAA,IAAY,CAAC,CAAC,cAAc,cAAc,aACxE,GACD,CAAC,aAAa,cAAc,YAAY,CACzC;
|
|
1
|
+
{"version":3,"file":"List.cjs","names":[],"sources":["../../../components/List/List.tsx"],"sourcesContent":["import React, { ComponentProps, createContext, ReactNode, useContext, useMemo } from 'react';\n\nimport { styled, VariantProps } from '../../stitches.config';\nimport { BUTTON_BASE_STYLES } from '../Button';\nimport { elevationVariants } from '../Elevation';\nimport { Flex } from '../Flex';\n\nconst LIST_ITEM_CONTENT_STYLES = {\n bc: 'transparent',\n c: 'inherit',\n borderRadius: 'inherit',\n fontFamily: '$rubik',\n fontSize: '$3',\n fontVariantNumeric: 'tabular-nums',\n};\n\nconst StyledSpan = styled('span', Flex, {\n // APPLY BUTTON STYLES\n ...LIST_ITEM_CONTENT_STYLES,\n // CUSTOM\n p: '$1',\n gap: '$1',\n});\n\nconst StyledListItemButton = styled('button', Flex, {\n ...BUTTON_BASE_STYLES,\n ...LIST_ITEM_CONTENT_STYLES,\n outline: 'none',\n\n // CUSTOM\n flexGrow: 1,\n width: '100%',\n p: '$2',\n position: 'relative',\n '&::before': {\n borderRadius: 'inherit',\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n },\n '&::after': {\n borderRadius: 'inherit',\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n },\n '&:focus, &:focus-visible': {\n boxShadow: 'inset 0 0 0 2px $colors$listItemFocusBorder',\n },\n\n '@hover': {\n '&:hover': {\n cursor: 'pointer',\n '&::before': {\n backgroundColor: '$listItemHoverBg',\n },\n '&::after': {\n backgroundColor: '$primary',\n opacity: 0.05,\n },\n },\n },\n '&:active': {\n '&::before': {\n backgroundColor: '$listItemActiveBg',\n },\n '&::after': {\n backgroundColor: '$primary',\n opacity: 0.05,\n },\n },\n});\n\nconst StyledLi = styled('li', {\n m: '$2',\n outline: 'none',\n position: 'relative',\n '&:focus-within': {\n boxShadow: 'none',\n },\n variants: {\n elevation: elevationVariants,\n },\n defaultVariants: {\n elevation: '0',\n },\n});\n\nconst StyledUl = styled('ul', {\n m: '0 0 0 8px',\n p: 0,\n color: '$textDefault',\n\n '&:has(> li > span > input[type=\"checkbox\"])': {\n m: 0,\n listStyle: 'none',\n '> li': {\n marginLeft: 0,\n '> span': {\n input: {\n margin: '0 3px 0 0',\n },\n },\n },\n },\n // Restore left-margin indentation when a nested checkbox list is inside a li\n 'li > &:has(> li > span > input[type=\"checkbox\"])': {\n marginLeft: '$2',\n '> li': {\n marginLeft: '$2',\n },\n },\n});\n\nconst StyledOl = styled('ol', {\n m: '0 0 0 8px',\n p: 0,\n color: '$textDefault',\n\n '> li::marker': {\n fontSize: '$3',\n fontFamily: '$rubik',\n },\n});\n\nconst ListContext = createContext({\n interactive: false,\n});\n\nexport interface ListProps extends ComponentProps<typeof StyledUl>, VariantProps<typeof StyledUl> {\n interactive?: boolean;\n}\nexport const Ul = React.forwardRef<React.ElementRef<typeof StyledUl>, ListProps>(\n ({ interactive, ...props }, forwardedRef) => {\n const parentContext = useContext(ListContext);\n const contextValue = useMemo(\n () => ({\n interactive: interactive !== undefined ? !!interactive : parentContext.interactive,\n }),\n [interactive, parentContext.interactive],\n );\n\n return (\n <ListContext.Provider value={contextValue}>\n <StyledUl role=\"list\" ref={forwardedRef} {...props} />\n </ListContext.Provider>\n );\n },\n);\n\nexport interface OrderedListProps\n extends ComponentProps<typeof StyledOl>,\n VariantProps<typeof StyledOl> {\n interactive?: boolean;\n}\n\nexport const Ol = React.forwardRef<React.ElementRef<typeof StyledOl>, OrderedListProps>(\n ({ interactive, ...props }, forwardedRef) => {\n const parentContext = useContext(ListContext);\n const contextValue = useMemo(\n () => ({\n interactive: interactive !== undefined ? !!interactive : parentContext.interactive,\n }),\n [interactive, parentContext.interactive],\n );\n\n return (\n <ListContext.Provider value={contextValue}>\n <StyledOl role=\"list\" ref={forwardedRef} {...props} />\n </ListContext.Provider>\n );\n },\n);\n\nconst ControlsWrapper = styled('div', {\n position: 'absolute',\n top: 0,\n right: '$2',\n zIndex: 1,\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n overflow: 'visible',\n});\n\nexport interface ListItemProps\n extends ComponentProps<typeof StyledLi>,\n VariantProps<typeof StyledLi>,\n VariantProps<typeof Flex> {\n controls?: ReactNode;\n}\nexport const Li = React.forwardRef<React.ElementRef<typeof StyledLi>, ListItemProps>(\n ({ children, controls, align, justify, direction, gap, wrap, ...props }, forwardedRef) => {\n const { interactive } = useContext(ListContext);\n\n const childArray = React.Children.toArray(children);\n const nestedLists = childArray.filter(\n (child) => React.isValidElement(child) && (child.type === Ul || child.type === Ol),\n );\n const inlineChildren = childArray.filter(\n (child) => !(React.isValidElement(child) && (child.type === Ul || child.type === Ol)),\n );\n\n return (\n <StyledLi {...props} ref={forwardedRef}>\n {interactive ? (\n <StyledListItemButton\n align={align}\n justify={justify}\n direction={direction}\n gap={gap}\n wrap={wrap}\n >\n {inlineChildren}\n </StyledListItemButton>\n ) : (\n <StyledSpan\n align={align || 'center'}\n justify={justify}\n direction={direction}\n gap={gap}\n wrap={wrap}\n css={{ flexGrow: 1 }}\n >\n {inlineChildren}\n </StyledSpan>\n )}\n {nestedLists}\n {!!controls && <ControlsWrapper>{controls}</ControlsWrapper>}\n </StyledLi>\n );\n },\n);\n"],"mappings":";;;;;;;;;AAOA,IAAM,2BAA2B;CAC/B,IAAI;CACJ,GAAG;CACH,cAAc;CACd,YAAY;CACZ,UAAU;CACV,oBAAoB;CACrB;AAED,IAAM,aAAa,wBAAA,OAAO,QAAQ,aAAA,MAAM;CAEtC,GAAG;CAEH,GAAG;CACH,KAAK;CACN,CAAC;AAEF,IAAM,uBAAuB,wBAAA,OAAO,UAAU,aAAA,MAAM;CAClD,GAAG,eAAA;CACH,GAAG;CACH,SAAS;CAGT,UAAU;CACV,OAAO;CACP,GAAG;CACH,UAAU;CACV,aAAa;EACX,cAAc;EACd,WAAW;EACX,SAAS;EACT,UAAU;EACV,OAAO;EACR;CACD,YAAY;EACV,cAAc;EACd,WAAW;EACX,SAAS;EACT,UAAU;EACV,OAAO;EACR;CACD,4BAA4B,EAC1B,WAAW,+CACZ;CAED,UAAU,EACR,WAAW;EACT,QAAQ;EACR,aAAa,EACX,iBAAiB,oBAClB;EACD,YAAY;GACV,iBAAiB;GACjB,SAAS;GACV;EACF,EACF;CACD,YAAY;EACV,aAAa,EACX,iBAAiB,qBAClB;EACD,YAAY;GACV,iBAAiB;GACjB,SAAS;GACV;EACF;CACF,CAAC;AAEF,IAAM,WAAW,wBAAA,OAAO,MAAM;CAC5B,GAAG;CACH,SAAS;CACT,UAAU;CACV,kBAAkB,EAChB,WAAW,QACZ;CACD,UAAU,EACR,WAAW,kBAAA,mBACZ;CACD,iBAAiB,EACf,WAAW,KACZ;CACF,CAAC;AAEF,IAAM,WAAW,wBAAA,OAAO,MAAM;CAC5B,GAAG;CACH,GAAG;CACH,OAAO;CAEP,iDAA+C;EAC7C,GAAG;EACH,WAAW;EACX,QAAQ;GACN,YAAY;GACZ,UAAU,EACR,OAAO,EACL,QAAQ,aACT,EACF;GACF;EACF;CAED,sDAAoD;EAClD,YAAY;EACZ,QAAQ,EACN,YAAY,MACb;EACF;CACF,CAAC;AAEF,IAAM,WAAW,wBAAA,OAAO,MAAM;CAC5B,GAAG;CACH,GAAG;CACH,OAAO;CAEP,gBAAgB;EACd,UAAU;EACV,YAAY;EACb;CACF,CAAC;AAEF,IAAM,eAAA,GAAA,MAAA,eAA4B,EAChC,aAAa,OACd,CAAC;AAKF,IAAa,KAAK,MAAA,QAAM,YACrB,EAAE,aAAa,GAAG,SAAS,iBAAiB;CAC3C,MAAM,iBAAA,GAAA,MAAA,YAA2B,YAAY;CAC7C,MAAM,gBAAA,GAAA,MAAA,gBACG,EACL,aAAa,gBAAgB,KAAA,IAAY,CAAC,CAAC,cAAc,cAAc,aACxE,GACD,CAAC,aAAa,cAAc,YAAY,CACzC;CAED,OACE,iBAAA,GAAA,kBAAA,KAAC,YAAY,UAAb;EAAsB,OAAO;YAC3B,iBAAA,GAAA,kBAAA,KAAC,UAAD;GAAU,MAAK;GAAO,KAAK;GAAc,GAAI;GAAS,CAAA;EACjC,CAAA;EAG5B;AAQD,IAAa,KAAK,MAAA,QAAM,YACrB,EAAE,aAAa,GAAG,SAAS,iBAAiB;CAC3C,MAAM,iBAAA,GAAA,MAAA,YAA2B,YAAY;CAC7C,MAAM,gBAAA,GAAA,MAAA,gBACG,EACL,aAAa,gBAAgB,KAAA,IAAY,CAAC,CAAC,cAAc,cAAc,aACxE,GACD,CAAC,aAAa,cAAc,YAAY,CACzC;CAED,OACE,iBAAA,GAAA,kBAAA,KAAC,YAAY,UAAb;EAAsB,OAAO;YAC3B,iBAAA,GAAA,kBAAA,KAAC,UAAD;GAAU,MAAK;GAAO,KAAK;GAAc,GAAI;GAAS,CAAA;EACjC,CAAA;EAG5B;AAED,IAAM,kBAAkB,wBAAA,OAAO,OAAO;CACpC,UAAU;CACV,KAAK;CACL,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,gBAAgB;CAChB,UAAU;CACX,CAAC;AAQF,IAAa,KAAK,MAAA,QAAM,YACrB,EAAE,UAAU,UAAU,OAAO,SAAS,WAAW,KAAK,MAAM,GAAG,SAAS,iBAAiB;CACxF,MAAM,EAAE,iBAAA,GAAA,MAAA,YAA2B,YAAY;CAE/C,MAAM,aAAa,MAAA,QAAM,SAAS,QAAQ,SAAS;CACnD,MAAM,cAAc,WAAW,QAC5B,UAAU,MAAA,QAAM,eAAe,MAAM,KAAK,MAAM,SAAS,MAAM,MAAM,SAAS,IAChF;CACD,MAAM,iBAAiB,WAAW,QAC/B,UAAU,EAAE,MAAA,QAAM,eAAe,MAAM,KAAK,MAAM,SAAS,MAAM,MAAM,SAAS,KAClF;CAED,OACE,iBAAA,GAAA,kBAAA,MAAC,UAAD;EAAU,GAAI;EAAO,KAAK;YAA1B;GACG,cACC,iBAAA,GAAA,kBAAA,KAAC,sBAAD;IACS;IACE;IACE;IACN;IACC;cAEL;IACoB,CAAA,GAEvB,iBAAA,GAAA,kBAAA,KAAC,YAAD;IACE,OAAO,SAAS;IACP;IACE;IACN;IACC;IACN,KAAK,EAAE,UAAU,GAAG;cAEnB;IACU,CAAA;GAEd;GACA,CAAC,CAAC,YAAY,iBAAA,GAAA,kBAAA,KAAC,iBAAD,EAAA,UAAkB,UAA2B,CAAA;GACnD;;EAGhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.js","names":[],"sources":["../../../components/List/List.tsx"],"sourcesContent":["import React, { ComponentProps, createContext, ReactNode, useContext, useMemo } from 'react';\n\nimport { styled, VariantProps } from '../../stitches.config';\nimport { BUTTON_BASE_STYLES } from '../Button';\nimport { elevationVariants } from '../Elevation';\nimport { Flex } from '../Flex';\n\nconst LIST_ITEM_CONTENT_STYLES = {\n bc: 'transparent',\n c: 'inherit',\n borderRadius: 'inherit',\n fontFamily: '$rubik',\n fontSize: '$3',\n fontVariantNumeric: 'tabular-nums',\n};\n\nconst StyledSpan = styled('span', Flex, {\n // APPLY BUTTON STYLES\n ...LIST_ITEM_CONTENT_STYLES,\n // CUSTOM\n p: '$1',\n gap: '$1',\n});\n\nconst StyledListItemButton = styled('button', Flex, {\n ...BUTTON_BASE_STYLES,\n ...LIST_ITEM_CONTENT_STYLES,\n outline: 'none',\n\n // CUSTOM\n flexGrow: 1,\n width: '100%',\n p: '$2',\n position: 'relative',\n '&::before': {\n borderRadius: 'inherit',\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n },\n '&::after': {\n borderRadius: 'inherit',\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n },\n '&:focus, &:focus-visible': {\n boxShadow: 'inset 0 0 0 2px $colors$listItemFocusBorder',\n },\n\n '@hover': {\n '&:hover': {\n cursor: 'pointer',\n '&::before': {\n backgroundColor: '$listItemHoverBg',\n },\n '&::after': {\n backgroundColor: '$primary',\n opacity: 0.05,\n },\n },\n },\n '&:active': {\n '&::before': {\n backgroundColor: '$listItemActiveBg',\n },\n '&::after': {\n backgroundColor: '$primary',\n opacity: 0.05,\n },\n },\n});\n\nconst StyledLi = styled('li', {\n m: '$2',\n outline: 'none',\n position: 'relative',\n '&:focus-within': {\n boxShadow: 'none',\n },\n variants: {\n elevation: elevationVariants,\n },\n defaultVariants: {\n elevation: '0',\n },\n});\n\nconst StyledUl = styled('ul', {\n m: '0 0 0 8px',\n p: 0,\n color: '$textDefault',\n\n '&:has(> li > span > input[type=\"checkbox\"])': {\n m: 0,\n listStyle: 'none',\n '> li': {\n marginLeft: 0,\n '> span': {\n input: {\n margin: '0 3px 0 0',\n },\n },\n },\n },\n // Restore left-margin indentation when a nested checkbox list is inside a li\n 'li > &:has(> li > span > input[type=\"checkbox\"])': {\n marginLeft: '$2',\n '> li': {\n marginLeft: '$2',\n },\n },\n});\n\nconst StyledOl = styled('ol', {\n m: '0 0 0 8px',\n p: 0,\n color: '$textDefault',\n\n '> li::marker': {\n fontSize: '$3',\n fontFamily: '$rubik',\n },\n});\n\nconst ListContext = createContext({\n interactive: false,\n});\n\nexport interface ListProps extends ComponentProps<typeof StyledUl>, VariantProps<typeof StyledUl> {\n interactive?: boolean;\n}\nexport const Ul = React.forwardRef<React.ElementRef<typeof StyledUl>, ListProps>(\n ({ interactive, ...props }, forwardedRef) => {\n const parentContext = useContext(ListContext);\n const contextValue = useMemo(\n () => ({\n interactive: interactive !== undefined ? !!interactive : parentContext.interactive,\n }),\n [interactive, parentContext.interactive],\n );\n\n return (\n <ListContext.Provider value={contextValue}>\n <StyledUl role=\"list\" ref={forwardedRef} {...props} />\n </ListContext.Provider>\n );\n },\n);\n\nexport interface OrderedListProps\n extends ComponentProps<typeof StyledOl>,\n VariantProps<typeof StyledOl> {\n interactive?: boolean;\n}\n\nexport const Ol = React.forwardRef<React.ElementRef<typeof StyledOl>, OrderedListProps>(\n ({ interactive, ...props }, forwardedRef) => {\n const parentContext = useContext(ListContext);\n const contextValue = useMemo(\n () => ({\n interactive: interactive !== undefined ? !!interactive : parentContext.interactive,\n }),\n [interactive, parentContext.interactive],\n );\n\n return (\n <ListContext.Provider value={contextValue}>\n <StyledOl role=\"list\" ref={forwardedRef} {...props} />\n </ListContext.Provider>\n );\n },\n);\n\nconst ControlsWrapper = styled('div', {\n position: 'absolute',\n top: 0,\n right: '$2',\n zIndex: 1,\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n overflow: 'visible',\n});\n\nexport interface ListItemProps\n extends ComponentProps<typeof StyledLi>,\n VariantProps<typeof StyledLi>,\n VariantProps<typeof Flex> {\n controls?: ReactNode;\n}\nexport const Li = React.forwardRef<React.ElementRef<typeof StyledLi>, ListItemProps>(\n ({ children, controls, align, justify, direction, gap, wrap, ...props }, forwardedRef) => {\n const { interactive } = useContext(ListContext);\n\n const childArray = React.Children.toArray(children);\n const nestedLists = childArray.filter(\n (child) => React.isValidElement(child) && (child.type === Ul || child.type === Ol),\n );\n const inlineChildren = childArray.filter(\n (child) => !(React.isValidElement(child) && (child.type === Ul || child.type === Ol)),\n );\n\n return (\n <StyledLi {...props} ref={forwardedRef}>\n {interactive ? (\n <StyledListItemButton\n align={align}\n justify={justify}\n direction={direction}\n gap={gap}\n wrap={wrap}\n >\n {inlineChildren}\n </StyledListItemButton>\n ) : (\n <StyledSpan\n align={align || 'center'}\n justify={justify}\n direction={direction}\n gap={gap}\n wrap={wrap}\n css={{ flexGrow: 1 }}\n >\n {inlineChildren}\n </StyledSpan>\n )}\n {nestedLists}\n {!!controls && <ControlsWrapper>{controls}</ControlsWrapper>}\n </StyledLi>\n );\n },\n);\n"],"mappings":";;;;;;;AAOA,IAAM,2BAA2B;CAC/B,IAAI;CACJ,GAAG;CACH,cAAc;CACd,YAAY;CACZ,UAAU;CACV,oBAAoB;CACrB;AAED,IAAM,aAAa,OAAO,QAAQ,MAAM;CAEtC,GAAG;CAEH,GAAG;CACH,KAAK;CACN,CAAC;AAEF,IAAM,uBAAuB,OAAO,UAAU,MAAM;CAClD,GAAG;CACH,GAAG;CACH,SAAS;CAGT,UAAU;CACV,OAAO;CACP,GAAG;CACH,UAAU;CACV,aAAa;EACX,cAAc;EACd,WAAW;EACX,SAAS;EACT,UAAU;EACV,OAAO;EACR;CACD,YAAY;EACV,cAAc;EACd,WAAW;EACX,SAAS;EACT,UAAU;EACV,OAAO;EACR;CACD,4BAA4B,EAC1B,WAAW,+CACZ;CAED,UAAU,EACR,WAAW;EACT,QAAQ;EACR,aAAa,EACX,iBAAiB,oBAClB;EACD,YAAY;GACV,iBAAiB;GACjB,SAAS;GACV;EACF,EACF;CACD,YAAY;EACV,aAAa,EACX,iBAAiB,qBAClB;EACD,YAAY;GACV,iBAAiB;GACjB,SAAS;GACV;EACF;CACF,CAAC;AAEF,IAAM,WAAW,OAAO,MAAM;CAC5B,GAAG;CACH,SAAS;CACT,UAAU;CACV,kBAAkB,EAChB,WAAW,QACZ;CACD,UAAU,EACR,WAAW,mBACZ;CACD,iBAAiB,EACf,WAAW,KACZ;CACF,CAAC;AAEF,IAAM,WAAW,OAAO,MAAM;CAC5B,GAAG;CACH,GAAG;CACH,OAAO;CAEP,iDAA+C;EAC7C,GAAG;EACH,WAAW;EACX,QAAQ;GACN,YAAY;GACZ,UAAU,EACR,OAAO,EACL,QAAQ,aACT,EACF;GACF;EACF;CAED,sDAAoD;EAClD,YAAY;EACZ,QAAQ,EACN,YAAY,MACb;EACF;CACF,CAAC;AAEF,IAAM,WAAW,OAAO,MAAM;CAC5B,GAAG;CACH,GAAG;CACH,OAAO;CAEP,gBAAgB;EACd,UAAU;EACV,YAAY;EACb;CACF,CAAC;AAEF,IAAM,cAAc,cAAc,EAChC,aAAa,OACd,CAAC;AAKF,IAAa,KAAK,MAAM,YACrB,EAAE,aAAa,GAAG,SAAS,iBAAiB;CAC3C,MAAM,gBAAgB,WAAW,YAAY;CAC7C,MAAM,eAAe,eACZ,EACL,aAAa,gBAAgB,KAAA,IAAY,CAAC,CAAC,cAAc,cAAc,aACxE,GACD,CAAC,aAAa,cAAc,YAAY,CACzC;
|
|
1
|
+
{"version":3,"file":"List.js","names":[],"sources":["../../../components/List/List.tsx"],"sourcesContent":["import React, { ComponentProps, createContext, ReactNode, useContext, useMemo } from 'react';\n\nimport { styled, VariantProps } from '../../stitches.config';\nimport { BUTTON_BASE_STYLES } from '../Button';\nimport { elevationVariants } from '../Elevation';\nimport { Flex } from '../Flex';\n\nconst LIST_ITEM_CONTENT_STYLES = {\n bc: 'transparent',\n c: 'inherit',\n borderRadius: 'inherit',\n fontFamily: '$rubik',\n fontSize: '$3',\n fontVariantNumeric: 'tabular-nums',\n};\n\nconst StyledSpan = styled('span', Flex, {\n // APPLY BUTTON STYLES\n ...LIST_ITEM_CONTENT_STYLES,\n // CUSTOM\n p: '$1',\n gap: '$1',\n});\n\nconst StyledListItemButton = styled('button', Flex, {\n ...BUTTON_BASE_STYLES,\n ...LIST_ITEM_CONTENT_STYLES,\n outline: 'none',\n\n // CUSTOM\n flexGrow: 1,\n width: '100%',\n p: '$2',\n position: 'relative',\n '&::before': {\n borderRadius: 'inherit',\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n },\n '&::after': {\n borderRadius: 'inherit',\n boxSizing: 'border-box',\n content: '\"\"',\n position: 'absolute',\n inset: 0,\n },\n '&:focus, &:focus-visible': {\n boxShadow: 'inset 0 0 0 2px $colors$listItemFocusBorder',\n },\n\n '@hover': {\n '&:hover': {\n cursor: 'pointer',\n '&::before': {\n backgroundColor: '$listItemHoverBg',\n },\n '&::after': {\n backgroundColor: '$primary',\n opacity: 0.05,\n },\n },\n },\n '&:active': {\n '&::before': {\n backgroundColor: '$listItemActiveBg',\n },\n '&::after': {\n backgroundColor: '$primary',\n opacity: 0.05,\n },\n },\n});\n\nconst StyledLi = styled('li', {\n m: '$2',\n outline: 'none',\n position: 'relative',\n '&:focus-within': {\n boxShadow: 'none',\n },\n variants: {\n elevation: elevationVariants,\n },\n defaultVariants: {\n elevation: '0',\n },\n});\n\nconst StyledUl = styled('ul', {\n m: '0 0 0 8px',\n p: 0,\n color: '$textDefault',\n\n '&:has(> li > span > input[type=\"checkbox\"])': {\n m: 0,\n listStyle: 'none',\n '> li': {\n marginLeft: 0,\n '> span': {\n input: {\n margin: '0 3px 0 0',\n },\n },\n },\n },\n // Restore left-margin indentation when a nested checkbox list is inside a li\n 'li > &:has(> li > span > input[type=\"checkbox\"])': {\n marginLeft: '$2',\n '> li': {\n marginLeft: '$2',\n },\n },\n});\n\nconst StyledOl = styled('ol', {\n m: '0 0 0 8px',\n p: 0,\n color: '$textDefault',\n\n '> li::marker': {\n fontSize: '$3',\n fontFamily: '$rubik',\n },\n});\n\nconst ListContext = createContext({\n interactive: false,\n});\n\nexport interface ListProps extends ComponentProps<typeof StyledUl>, VariantProps<typeof StyledUl> {\n interactive?: boolean;\n}\nexport const Ul = React.forwardRef<React.ElementRef<typeof StyledUl>, ListProps>(\n ({ interactive, ...props }, forwardedRef) => {\n const parentContext = useContext(ListContext);\n const contextValue = useMemo(\n () => ({\n interactive: interactive !== undefined ? !!interactive : parentContext.interactive,\n }),\n [interactive, parentContext.interactive],\n );\n\n return (\n <ListContext.Provider value={contextValue}>\n <StyledUl role=\"list\" ref={forwardedRef} {...props} />\n </ListContext.Provider>\n );\n },\n);\n\nexport interface OrderedListProps\n extends ComponentProps<typeof StyledOl>,\n VariantProps<typeof StyledOl> {\n interactive?: boolean;\n}\n\nexport const Ol = React.forwardRef<React.ElementRef<typeof StyledOl>, OrderedListProps>(\n ({ interactive, ...props }, forwardedRef) => {\n const parentContext = useContext(ListContext);\n const contextValue = useMemo(\n () => ({\n interactive: interactive !== undefined ? !!interactive : parentContext.interactive,\n }),\n [interactive, parentContext.interactive],\n );\n\n return (\n <ListContext.Provider value={contextValue}>\n <StyledOl role=\"list\" ref={forwardedRef} {...props} />\n </ListContext.Provider>\n );\n },\n);\n\nconst ControlsWrapper = styled('div', {\n position: 'absolute',\n top: 0,\n right: '$2',\n zIndex: 1,\n height: '100%',\n display: 'flex',\n alignItems: 'center',\n justifyContent: 'center',\n overflow: 'visible',\n});\n\nexport interface ListItemProps\n extends ComponentProps<typeof StyledLi>,\n VariantProps<typeof StyledLi>,\n VariantProps<typeof Flex> {\n controls?: ReactNode;\n}\nexport const Li = React.forwardRef<React.ElementRef<typeof StyledLi>, ListItemProps>(\n ({ children, controls, align, justify, direction, gap, wrap, ...props }, forwardedRef) => {\n const { interactive } = useContext(ListContext);\n\n const childArray = React.Children.toArray(children);\n const nestedLists = childArray.filter(\n (child) => React.isValidElement(child) && (child.type === Ul || child.type === Ol),\n );\n const inlineChildren = childArray.filter(\n (child) => !(React.isValidElement(child) && (child.type === Ul || child.type === Ol)),\n );\n\n return (\n <StyledLi {...props} ref={forwardedRef}>\n {interactive ? (\n <StyledListItemButton\n align={align}\n justify={justify}\n direction={direction}\n gap={gap}\n wrap={wrap}\n >\n {inlineChildren}\n </StyledListItemButton>\n ) : (\n <StyledSpan\n align={align || 'center'}\n justify={justify}\n direction={direction}\n gap={gap}\n wrap={wrap}\n css={{ flexGrow: 1 }}\n >\n {inlineChildren}\n </StyledSpan>\n )}\n {nestedLists}\n {!!controls && <ControlsWrapper>{controls}</ControlsWrapper>}\n </StyledLi>\n );\n },\n);\n"],"mappings":";;;;;;;AAOA,IAAM,2BAA2B;CAC/B,IAAI;CACJ,GAAG;CACH,cAAc;CACd,YAAY;CACZ,UAAU;CACV,oBAAoB;CACrB;AAED,IAAM,aAAa,OAAO,QAAQ,MAAM;CAEtC,GAAG;CAEH,GAAG;CACH,KAAK;CACN,CAAC;AAEF,IAAM,uBAAuB,OAAO,UAAU,MAAM;CAClD,GAAG;CACH,GAAG;CACH,SAAS;CAGT,UAAU;CACV,OAAO;CACP,GAAG;CACH,UAAU;CACV,aAAa;EACX,cAAc;EACd,WAAW;EACX,SAAS;EACT,UAAU;EACV,OAAO;EACR;CACD,YAAY;EACV,cAAc;EACd,WAAW;EACX,SAAS;EACT,UAAU;EACV,OAAO;EACR;CACD,4BAA4B,EAC1B,WAAW,+CACZ;CAED,UAAU,EACR,WAAW;EACT,QAAQ;EACR,aAAa,EACX,iBAAiB,oBAClB;EACD,YAAY;GACV,iBAAiB;GACjB,SAAS;GACV;EACF,EACF;CACD,YAAY;EACV,aAAa,EACX,iBAAiB,qBAClB;EACD,YAAY;GACV,iBAAiB;GACjB,SAAS;GACV;EACF;CACF,CAAC;AAEF,IAAM,WAAW,OAAO,MAAM;CAC5B,GAAG;CACH,SAAS;CACT,UAAU;CACV,kBAAkB,EAChB,WAAW,QACZ;CACD,UAAU,EACR,WAAW,mBACZ;CACD,iBAAiB,EACf,WAAW,KACZ;CACF,CAAC;AAEF,IAAM,WAAW,OAAO,MAAM;CAC5B,GAAG;CACH,GAAG;CACH,OAAO;CAEP,iDAA+C;EAC7C,GAAG;EACH,WAAW;EACX,QAAQ;GACN,YAAY;GACZ,UAAU,EACR,OAAO,EACL,QAAQ,aACT,EACF;GACF;EACF;CAED,sDAAoD;EAClD,YAAY;EACZ,QAAQ,EACN,YAAY,MACb;EACF;CACF,CAAC;AAEF,IAAM,WAAW,OAAO,MAAM;CAC5B,GAAG;CACH,GAAG;CACH,OAAO;CAEP,gBAAgB;EACd,UAAU;EACV,YAAY;EACb;CACF,CAAC;AAEF,IAAM,cAAc,cAAc,EAChC,aAAa,OACd,CAAC;AAKF,IAAa,KAAK,MAAM,YACrB,EAAE,aAAa,GAAG,SAAS,iBAAiB;CAC3C,MAAM,gBAAgB,WAAW,YAAY;CAC7C,MAAM,eAAe,eACZ,EACL,aAAa,gBAAgB,KAAA,IAAY,CAAC,CAAC,cAAc,cAAc,aACxE,GACD,CAAC,aAAa,cAAc,YAAY,CACzC;CAED,OACE,oBAAC,YAAY,UAAb;EAAsB,OAAO;YAC3B,oBAAC,UAAD;GAAU,MAAK;GAAO,KAAK;GAAc,GAAI;GAAS,CAAA;EACjC,CAAA;EAG5B;AAQD,IAAa,KAAK,MAAM,YACrB,EAAE,aAAa,GAAG,SAAS,iBAAiB;CAC3C,MAAM,gBAAgB,WAAW,YAAY;CAC7C,MAAM,eAAe,eACZ,EACL,aAAa,gBAAgB,KAAA,IAAY,CAAC,CAAC,cAAc,cAAc,aACxE,GACD,CAAC,aAAa,cAAc,YAAY,CACzC;CAED,OACE,oBAAC,YAAY,UAAb;EAAsB,OAAO;YAC3B,oBAAC,UAAD;GAAU,MAAK;GAAO,KAAK;GAAc,GAAI;GAAS,CAAA;EACjC,CAAA;EAG5B;AAED,IAAM,kBAAkB,OAAO,OAAO;CACpC,UAAU;CACV,KAAK;CACL,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,YAAY;CACZ,gBAAgB;CAChB,UAAU;CACX,CAAC;AAQF,IAAa,KAAK,MAAM,YACrB,EAAE,UAAU,UAAU,OAAO,SAAS,WAAW,KAAK,MAAM,GAAG,SAAS,iBAAiB;CACxF,MAAM,EAAE,gBAAgB,WAAW,YAAY;CAE/C,MAAM,aAAa,MAAM,SAAS,QAAQ,SAAS;CACnD,MAAM,cAAc,WAAW,QAC5B,UAAU,MAAM,eAAe,MAAM,KAAK,MAAM,SAAS,MAAM,MAAM,SAAS,IAChF;CACD,MAAM,iBAAiB,WAAW,QAC/B,UAAU,EAAE,MAAM,eAAe,MAAM,KAAK,MAAM,SAAS,MAAM,MAAM,SAAS,KAClF;CAED,OACE,qBAAC,UAAD;EAAU,GAAI;EAAO,KAAK;YAA1B;GACG,cACC,oBAAC,sBAAD;IACS;IACE;IACE;IACN;IACC;cAEL;IACoB,CAAA,GAEvB,oBAAC,YAAD;IACE,OAAO,SAAS;IACP;IACE;IACN;IACC;IACN,KAAK,EAAE,UAAU,GAAG;cAEnB;IACU,CAAA;GAEd;GACA,CAAC,CAAC,YAAY,oBAAC,iBAAD,EAAA,UAAkB,UAA2B,CAAA;GACnD;;EAGhB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.themes.cjs","names":[],"sources":["../../../components/List/List.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\n\nexport namespace Theme {\n export type Colors = {\n listItemHoverBg: Property.Color;\n listItemActiveBg: Property.Color;\n listItemFocusBorder: Property.Color;\n };\n\n type Factory = (primaryColor: ColorInfo) => Colors;\n\n export const getLight: Factory = (primaryColor) => ({\n listItemHoverBg: '$whiteA9',\n listItemActiveBg: '$whiteA8',\n listItemFocusBorder: primaryColor.helpers.pickScale(8),\n });\n\n export const getDark: Factory = (primaryColor) => ({\n listItemHoverBg: '$whiteA4',\n listItemActiveBg: '$whiteA3',\n listItemFocusBorder: primaryColor.helpers.pickScale(11),\n });\n}\n"],"mappings":";AAIO,IAAA;;
|
|
1
|
+
{"version":3,"file":"List.themes.cjs","names":[],"sources":["../../../components/List/List.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\n\nexport namespace Theme {\n export type Colors = {\n listItemHoverBg: Property.Color;\n listItemActiveBg: Property.Color;\n listItemFocusBorder: Property.Color;\n };\n\n type Factory = (primaryColor: ColorInfo) => Colors;\n\n export const getLight: Factory = (primaryColor) => ({\n listItemHoverBg: '$whiteA9',\n listItemActiveBg: '$whiteA8',\n listItemFocusBorder: primaryColor.helpers.pickScale(8),\n });\n\n export const getDark: Factory = (primaryColor) => ({\n listItemHoverBg: '$whiteA4',\n listItemActiveBg: '$whiteA3',\n listItemFocusBorder: primaryColor.helpers.pickScale(11),\n });\n}\n"],"mappings":";AAIO,IAAA;;CASQ,OAAA,YAAqB,kBAAkB;EAClD,iBAAiB;EACjB,kBAAkB;EAClB,qBAAqB,aAAa,QAAQ,UAAU,EAAE;EACvD;CAEY,OAAA,WAAoB,kBAAkB;EACjD,iBAAiB;EACjB,kBAAkB;EAClB,qBAAqB,aAAa,QAAQ,UAAU,GAAG;EACxD;yBACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"List.themes.js","names":[],"sources":["../../../components/List/List.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\n\nexport namespace Theme {\n export type Colors = {\n listItemHoverBg: Property.Color;\n listItemActiveBg: Property.Color;\n listItemFocusBorder: Property.Color;\n };\n\n type Factory = (primaryColor: ColorInfo) => Colors;\n\n export const getLight: Factory = (primaryColor) => ({\n listItemHoverBg: '$whiteA9',\n listItemActiveBg: '$whiteA8',\n listItemFocusBorder: primaryColor.helpers.pickScale(8),\n });\n\n export const getDark: Factory = (primaryColor) => ({\n listItemHoverBg: '$whiteA4',\n listItemActiveBg: '$whiteA3',\n listItemFocusBorder: primaryColor.helpers.pickScale(11),\n });\n}\n"],"mappings":";AAIO,IAAA;;
|
|
1
|
+
{"version":3,"file":"List.themes.js","names":[],"sources":["../../../components/List/List.themes.ts"],"sourcesContent":["import { Property } from '@stitches/react/types/css';\n\nimport { ColorInfo } from '../../utils/getPrimaryColorInfo';\n\nexport namespace Theme {\n export type Colors = {\n listItemHoverBg: Property.Color;\n listItemActiveBg: Property.Color;\n listItemFocusBorder: Property.Color;\n };\n\n type Factory = (primaryColor: ColorInfo) => Colors;\n\n export const getLight: Factory = (primaryColor) => ({\n listItemHoverBg: '$whiteA9',\n listItemActiveBg: '$whiteA8',\n listItemFocusBorder: primaryColor.helpers.pickScale(8),\n });\n\n export const getDark: Factory = (primaryColor) => ({\n listItemHoverBg: '$whiteA4',\n listItemActiveBg: '$whiteA3',\n listItemFocusBorder: primaryColor.helpers.pickScale(11),\n });\n}\n"],"mappings":";AAIO,IAAA;;CASQ,OAAA,YAAqB,kBAAkB;EAClD,iBAAiB;EACjB,kBAAkB;EAClB,qBAAqB,aAAa,QAAQ,UAAU,EAAE;EACvD;CAEY,OAAA,WAAoB,kBAAkB;EACjD,iBAAiB;EACjB,kBAAkB;EAClB,qBAAqB,aAAa,QAAQ,UAAU,GAAG;EACxD;yBACF"}
|