@magiclabs/ui-components 1.14.1 → 1.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/inputs/text-input.js +1 -1
- package/dist/cjs/components/inputs/text-input.js.map +1 -1
- package/dist/cjs/recipes/text-input.js +1 -1
- package/dist/cjs/recipes/text-input.js.map +1 -1
- package/dist/es/components/inputs/text-input.js +1 -1
- package/dist/es/components/inputs/text-input.js.map +1 -1
- package/dist/es/recipes/text-input.js +1 -1
- package/dist/es/recipes/text-input.js.map +1 -1
- package/dist/panda.buildinfo.json +1 -1
- package/dist/types/components/inputs/text-input.d.ts +22 -0
- package/dist/types/components/inputs/text-input.d.ts.map +1 -1
- package/dist/types/recipes/text-input.d.ts +28 -20
- package/dist/types/recipes/text-input.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var e=require("react/jsx-runtime"),a=require("react"),l=require("react-aria"),S=require("../primitives/button.js");require("../primitives/checkbox.js"),require("../primitives/popover.js"),require("../primitives/radio.js"),require("../primitives/segmented-control.js"),require("../primitives/switch.js");var x=require("../primitives/text.js"),R=require("../../recipes/text-input.js"),k=require("@styled/css"),m=require("@styled/jsx"),v=require("@styled/tokens"),c=require("create-slots");const z=c.createSlot(({children:s,...o})=>e.jsx(m.Flex,{alignItems:"center",justifyContent:"center",children:a.Children.map(s,t=>{var r;return a.cloneElement(t,{...o,color:(r=t.props.color)!==null&&r!==void 0?r:v.token("colors.neutral.primary")})})})),E=c.createSlot(({children:s,...o})=>e.jsx(m.Flex,{alignItems:"center",justifyContent:"center",children:a.Children.map(s,t=>{var r;return a.isValidElement(t)?a.cloneElement(t,{...o,color:(r=t.props.color)!==null&&r!==void 0?r:v.token("colors.brand.base")}):null})})),w=c.createSlot(S.default),D=c.createSlot(x.default),H=c.createSlot(x.default),A=a.forwardRef((s,o)=>{const{label:t,disabled:r,size:u="md",alignText:f="left",attr:j,description:d,autoFocus:g,className:b="",errorMessage:h}=s,i=u==="sm"?16:20,B=a.useRef(null),N=o||B,{labelProps:O,inputProps:V,descriptionProps:W,errorMessageProps:G,isInvalid:P,validationErrors:y}=l.useTextField({...s,isDisabled:r??!1,isInvalid:!!h},N),{focusProps:J}=l.useFocusRing({autoFocus:g??!1}),{hoverProps:K}=l.useHover({isDisabled:r??!1});return c.createHost(s.children,p=>{const q=p.get(z),I=p.get(E),F=p.getProps(w),C=p.getProps(D),T=p.getProps(H),n=R.textInput({size:u,alignText:f,disabled:r,isError:P});return e.jsxs("div",{className:k.cx(n.container,b),children:[e.jsx("label",{className:n.label,...O,children:t}),e.jsxs(m.HStack,{className:n.inputContainer,children:[q&&{...q,props:{...q.props,className:n.typeIcon,width:i,height:i}},C&&e.jsx(x.default,{...C,styles:{color:v.token("colors.text.tertiary")}}),e.jsx("input",{ref:N,className:n.input,...l.mergeProps(V,J,K),...j}),T&&e.jsx(x.default,{...T,styles:{color:v.token("colors.text.tertiary")}}),I&&{...I,props:{...I.props,className:n.actionIcon,width:i,height:i}},F&&e.jsx(m.Flex,{alignItems:"center",justifyContent:"center",className:n.actionButton,children:e.jsx(S.default,{...F,variant:"text",size:u})})]}),d&&e.jsx("div",{className:n.description,...W,children:d}),P&&e.jsx(x.default,{variant:"error",...G,size:"sm",styles:{fontWeight:"400"},children:y.length>0?y.join(" "):h})]})})}),M=a.forwardRef((s,o)=>{const{disabled:t,autoFocus:r,className:u="",attr:f}=s,j=a.useRef(null),d=o||j,{inputProps:g}=l.useTextField({...s,isDisabled:t??!1},d),{focusProps:b}=l.useFocusRing({autoFocus:r??!1}),{hoverProps:h}=l.useHover({isDisabled:t??!1}),i=R.textInput({char:!0,disabled:t});return e.jsx("div",{className:k.cx(i.container,u),children:e.jsx("div",{className:i.inputContainer,children:e.jsx("input",{ref:d,className:i.input,...l.mergeProps(g,b,h),size:1,...f})})})}),L=Object.assign(A,{TypeIcon:z,ActionIcon:E,ActionButton:w,Char:M,Prefix:D,Suffix:H});A.displayName="TextInput",M.displayName="TextInputChar",exports.TextInput=L;
|
|
2
2
|
//# sourceMappingURL=text-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.js","sources":["../../../../src/components/inputs/text-input.tsx"],"sourcesContent":["import {\n Children,\n cloneElement,\n forwardRef,\n HTMLAttributes,\n InputHTMLAttributes,\n isValidElement,\n ReactNode,\n RefObject,\n useRef,\n} from 'react';\nimport type { AriaTextFieldProps } from 'react-aria';\nimport { mergeProps, useFocusRing, useHover, useTextField } from 'react-aria';\n\nimport { Text } from '@components/primitives';\nimport { textInput } from '@recipes/text-input';\nimport { css, cx } from '@styled/css';\nimport { Flex } from '@styled/jsx';\nimport { token } from '@styled/tokens';\n\nimport { createHost, createSlot } from 'create-slots';\n\nexport type TextInputProps = AriaTextFieldProps & {\n className?: string;\n disabled?: boolean;\n attr?: InputHTMLAttributes<HTMLInputElement>;\n errorMessage?: string;\n children?: ReactNode;\n size?: 'sm' | 'md' | 'lg';\n alignText?: 'left' | 'center' | 'right';\n};\n\nexport type CharProps = AriaTextFieldProps & {\n className?: string;\n disabled?: boolean;\n attr?: InputHTMLAttributes<HTMLInputElement>;\n};\n\nexport type ActionIconProps = HTMLAttributes<HTMLElement> & {\n onClick: () => void;\n};\n\nconst TypeIcon = createSlot(({ children, ...props }) => {\n return (\n <Flex alignItems=\"center\" justifyContent=\"center\">\n {Children.map(children, child => {\n return cloneElement(child, { ...props, color: child.props.color ?? token('colors.neutral.primary') });\n })}\n </Flex>\n );\n});\n\nconst ActionIcon = createSlot(({ children, ...props }: ActionIconProps) => {\n return (\n <Flex alignItems=\"center\" justifyContent=\"center\">\n {Children.map(children, child => {\n if (isValidElement<ActionIconProps>(child)) {\n return cloneElement(child, { ...props, color: child.props.color ?? token('colors.brand.base') });\n }\n return null;\n })}\n </Flex>\n );\n});\n\nconst Component = forwardRef<HTMLInputElement, TextInputProps>((props, forwardedRef) => {\n const {\n label,\n disabled,\n size = 'md',\n alignText = 'left',\n attr,\n description,\n autoFocus,\n className = '',\n errorMessage,\n } = props;\n const iconSize = size === 'sm' ? 16 : 20;\n\n const internalRef = useRef(null);\n // forwardedRef is null until after first render\n const ref = forwardedRef || internalRef;\n\n const { labelProps, inputProps, descriptionProps, errorMessageProps, isInvalid, validationErrors } = useTextField(\n { ...props, isDisabled: disabled ?? false, isInvalid: !!errorMessage },\n ref as RefObject<HTMLInputElement>,\n );\n\n const { focusProps } = useFocusRing({\n autoFocus: autoFocus ?? false,\n });\n const { hoverProps } = useHover({ isDisabled: disabled ?? false });\n\n return createHost(props.children, slots => {\n const typeIcon = slots.get(TypeIcon);\n const actionIcon = slots.get(ActionIcon);\n\n const classes = textInput({\n size,\n alignText,\n disabled,\n isError: isInvalid,\n typeIcon: !!typeIcon,\n actionIcon: !!actionIcon,\n });\n\n return (\n <div className={cx(classes.container, className)}>\n <label className={classes.label} {...labelProps}>\n {label}\n </label>\n <div className={css({ position: 'relative' }) + (!disabled ? ' group' : '')}>\n {typeIcon && {\n ...typeIcon,\n props: { ...typeIcon.props, className: classes.typeIcon, width: iconSize, height: iconSize },\n }}\n <input ref={ref} className={classes.input} {...mergeProps(inputProps, focusProps, hoverProps)} {...attr} />\n {actionIcon && {\n ...actionIcon,\n props: { ...actionIcon.props, className: classes.actionIcon, width: iconSize, height: iconSize },\n }}\n </div>\n {description && (\n <div className={classes.description} {...descriptionProps}>\n {description}\n </div>\n )}\n {isInvalid && (\n <Text variant=\"error\" {...errorMessageProps} size={'sm'} styles={{ fontWeight: '400' }}>\n {validationErrors.length > 0 ? validationErrors.join(' ') : errorMessage}\n </Text>\n )}\n </div>\n );\n });\n});\n\nconst Char = forwardRef<HTMLInputElement, CharProps>((props, forwardedRef) => {\n const { disabled, autoFocus, className = '', attr } = props;\n\n const internalRef = useRef(null);\n // forwardedRef is null until after first render\n const ref = forwardedRef || internalRef;\n\n const { inputProps } = useTextField({ ...props, isDisabled: disabled ?? false }, ref as RefObject<HTMLInputElement>);\n\n const { focusProps } = useFocusRing({ autoFocus: autoFocus ?? false });\n const { hoverProps } = useHover({ isDisabled: disabled ?? false });\n\n const classes = textInput({ disabled });\n\n return (\n <div className={cx(classes.container, className)}>\n <input\n ref={ref}\n className={cx(classes.input, classes.char)}\n {...mergeProps(inputProps, focusProps, hoverProps)}\n size={1}\n {...attr}\n />\n </div>\n );\n});\n\nexport const TextInput = Object.assign(Component, {\n TypeIcon,\n ActionIcon,\n Char,\n});\n\nComponent.displayName = 'TextInput';\nChar.displayName = 'TextInputChar';\n"],"names":["TypeIcon","createSlot","children","props","_jsx","Flex","Children","child","cloneElement","_a","token","ActionIcon","isValidElement","Component","forwardRef","forwardedRef","label","disabled","size","alignText","attr","description","autoFocus","className","errorMessage","iconSize","internalRef","useRef","ref","labelProps","inputProps","descriptionProps","errorMessageProps","isInvalid","validationErrors","useTextField","focusProps","useFocusRing","hoverProps","useHover","createHost","slots","typeIcon","actionIcon","classes","textInput","_jsxs","cx","css","mergeProps","Text","Char","TextInput"],"mappings":"kfA0CA,MAAMA,EAAWC,EAAW,WAAA,CAAC,CAAE,SAAAC,EAAU,GAAGC,CAAO,IAE/CC,MAACC,EAAAA,KAAI,CAAC,WAAW,SAAS,eAAe,SACtC,SAAAC,EAAAA,SAAS,IAAIJ,EAAUK,GAAQ,OAC9B,OAAOC,EAAAA,aAAaD,EAAO,CAAE,GAAGJ,EAAO,OAAOM,EAAAF,EAAM,MAAM,SAAS,MAAAE,IAAA,OAAAA,EAAAC,QAAM,wBAAwB,CAAG,CAAA,CACtG,CAAC,CACI,CAAA,CAEV,EAEKC,EAAaV,EAAAA,WAAW,CAAC,CAAE,SAAAC,EAAU,GAAGC,CAAwB,IAElEC,EAAAA,IAACC,EAAI,KAAA,CAAC,WAAW,SAAS,eAAe,SACtC,SAAAC,EAAS,SAAA,IAAIJ,EAAUK,GAAQ,OAC9B,OAAIK,EAAAA,eAAgCL,CAAK,EAChCC,EAAAA,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EAE3D2B,EAAUC,EAAAA,UAAU,CAAE,SAAA5B,CAAQ,CAAE,EAEtC,OACEb,EAAAA,WAAK,UAAW2C,KAAGH,EAAQ,UAAWrB,CAAS,EAC7C,SAAAnB,MAAA,QAAA,CACE,IAAKwB,EACL,UAAWmB,EAAAA,GAAGH,EAAQ,MAAOA,EAAQ,IAAI,KACrCK,EAAAA,WAAWnB,EAAYM,EAAYE,CAAU,EACjD,KAAM,KACFlB,CAAI,CAAA,CAEN,CAAA,CAEV,CAAC,EAEYgC,EAAY,OAAO,OAAOvC,EAAW,CAChD,SAAAb,EACA,WAAAW,EACA,KAAAwC,CACD,CAAA,EAEDtC,EAAU,YAAc,YACxBsC,EAAK,YAAc"}
|
|
1
|
+
{"version":3,"file":"text-input.js","sources":["../../../../src/components/inputs/text-input.tsx"],"sourcesContent":["import {\n Children,\n cloneElement,\n forwardRef,\n HTMLAttributes,\n InputHTMLAttributes,\n isValidElement,\n ReactNode,\n RefObject,\n useRef,\n} from 'react';\nimport type { AriaTextFieldProps } from 'react-aria';\nimport { mergeProps, useFocusRing, useHover, useTextField } from 'react-aria';\n\nimport { Button, Text } from '@components/primitives';\nimport { textInput } from '@recipes/text-input';\nimport { cx } from '@styled/css';\nimport { Flex, HStack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\n\nimport { createHost, createSlot } from 'create-slots';\n\nexport type TextInputProps = AriaTextFieldProps & {\n className?: string;\n disabled?: boolean;\n attr?: InputHTMLAttributes<HTMLInputElement>;\n errorMessage?: string;\n children?: ReactNode;\n size?: 'sm' | 'md' | 'lg';\n alignText?: 'left' | 'center' | 'right';\n};\n\nexport type CharProps = AriaTextFieldProps & {\n className?: string;\n disabled?: boolean;\n attr?: InputHTMLAttributes<HTMLInputElement>;\n};\n\nexport type ActionIconProps = HTMLAttributes<HTMLElement> & {\n onClick: () => void;\n};\n\nconst TypeIcon = createSlot(({ children, ...props }) => {\n return (\n <Flex alignItems=\"center\" justifyContent=\"center\">\n {Children.map(children, child => {\n return cloneElement(child, { ...props, color: child.props.color ?? token('colors.neutral.primary') });\n })}\n </Flex>\n );\n});\n\nconst ActionIcon = createSlot(({ children, ...props }: ActionIconProps) => {\n return (\n <Flex alignItems=\"center\" justifyContent=\"center\">\n {Children.map(children, child => {\n if (isValidElement<ActionIconProps>(child)) {\n return cloneElement(child, { ...props, color: child.props.color ?? token('colors.brand.base') });\n }\n return null;\n })}\n </Flex>\n );\n});\n\nconst ActionButton = createSlot(Button);\nconst Prefix = createSlot(Text);\nconst Suffix = createSlot(Text);\n\nconst Component = forwardRef<HTMLInputElement, TextInputProps>((props, forwardedRef) => {\n const {\n label,\n disabled,\n size = 'md',\n alignText = 'left',\n attr,\n description,\n autoFocus,\n className = '',\n errorMessage,\n } = props;\n const iconSize = size === 'sm' ? 16 : 20;\n\n const internalRef = useRef(null);\n // forwardedRef is null until after first render\n const ref = forwardedRef || internalRef;\n\n const { labelProps, inputProps, descriptionProps, errorMessageProps, isInvalid, validationErrors } = useTextField(\n { ...props, isDisabled: disabled ?? false, isInvalid: !!errorMessage },\n ref as RefObject<HTMLInputElement>,\n );\n\n const { focusProps } = useFocusRing({\n autoFocus: autoFocus ?? false,\n });\n const { hoverProps } = useHover({ isDisabled: disabled ?? false });\n\n return createHost(props.children, slots => {\n const typeIcon = slots.get(TypeIcon);\n const actionIcon = slots.get(ActionIcon);\n const actionButtonProps = slots.getProps(ActionButton);\n const prefixProps = slots.getProps(Prefix);\n const suffixProps = slots.getProps(Suffix);\n\n const classes = textInput({\n size,\n alignText,\n disabled,\n isError: isInvalid,\n });\n\n return (\n <div className={cx(classes.container, className)}>\n <label className={classes.label} {...labelProps}>\n {label}\n </label>\n <HStack className={classes.inputContainer}>\n {typeIcon && {\n ...typeIcon,\n props: { ...typeIcon.props, className: classes.typeIcon, width: iconSize, height: iconSize },\n }}\n {prefixProps && <Text {...prefixProps} styles={{ color: token('colors.text.tertiary') }} />}\n <input ref={ref} className={classes.input} {...mergeProps(inputProps, focusProps, hoverProps)} {...attr} />\n {suffixProps && <Text {...suffixProps} styles={{ color: token('colors.text.tertiary') }} />}\n {actionIcon && {\n ...actionIcon,\n props: { ...actionIcon.props, className: classes.actionIcon, width: iconSize, height: iconSize },\n }}\n {actionButtonProps && (\n <Flex alignItems=\"center\" justifyContent=\"center\" className={classes.actionButton}>\n <Button {...actionButtonProps} variant=\"text\" size={size} />\n </Flex>\n )}\n </HStack>\n {description && (\n <div className={classes.description} {...descriptionProps}>\n {description}\n </div>\n )}\n {isInvalid && (\n <Text variant=\"error\" {...errorMessageProps} size={'sm'} styles={{ fontWeight: '400' }}>\n {validationErrors.length > 0 ? validationErrors.join(' ') : errorMessage}\n </Text>\n )}\n </div>\n );\n });\n});\n\nconst Char = forwardRef<HTMLInputElement, CharProps>((props, forwardedRef) => {\n const { disabled, autoFocus, className = '', attr } = props;\n\n const internalRef = useRef(null);\n // forwardedRef is null until after first render\n const ref = forwardedRef || internalRef;\n\n const { inputProps } = useTextField({ ...props, isDisabled: disabled ?? false }, ref as RefObject<HTMLInputElement>);\n\n const { focusProps } = useFocusRing({ autoFocus: autoFocus ?? false });\n const { hoverProps } = useHover({ isDisabled: disabled ?? false });\n\n const classes = textInput({ char: true, disabled });\n\n return (\n <div className={cx(classes.container, className)}>\n <div className={classes.inputContainer}>\n <input\n ref={ref}\n className={classes.input}\n {...mergeProps(inputProps, focusProps, hoverProps)}\n size={1}\n {...attr}\n />\n </div>\n </div>\n );\n});\n\nexport const TextInput = Object.assign(Component, {\n TypeIcon,\n ActionIcon,\n ActionButton,\n Char,\n Prefix,\n Suffix,\n});\n\nComponent.displayName = 'TextInput';\nChar.displayName = 'TextInputChar';\n"],"names":["TypeIcon","createSlot","children","props","_jsx","Flex","Children","child","cloneElement","_a","token","ActionIcon","isValidElement","ActionButton","Button","Prefix","Text","Suffix","Component","forwardRef","forwardedRef","label","disabled","size","alignText","attr","description","autoFocus","className","errorMessage","iconSize","internalRef","useRef","ref","labelProps","inputProps","descriptionProps","errorMessageProps","isInvalid","validationErrors","useTextField","focusProps","useFocusRing","hoverProps","useHover","createHost","slots","typeIcon","actionIcon","actionButtonProps","prefixProps","suffixProps","classes","textInput","_jsxs","cx","HStack","mergeProps","Char","TextInput"],"mappings":"ofA0CA,MAAMA,EAAWC,EAAAA,WAAW,CAAC,CAAE,SAAAC,EAAU,GAAGC,CAAO,IAE/CC,EAAAA,IAACC,EAAI,KAAA,CAAC,WAAW,SAAS,eAAe,SACtC,SAAAC,WAAS,IAAIJ,EAAUK,GAAQ,OAC9B,OAAOC,EAAAA,aAAaD,EAAO,CAAE,GAAGJ,EAAO,OAAOM,EAAAF,EAAM,MAAM,SAAS,MAAAE,IAAA,OAAAA,EAAAC,EAAAA,MAAM,wBAAwB,CAAG,CAAA,CACtG,CAAC,CACI,CAAA,CAEV,EAEKC,EAAaV,EAAW,WAAA,CAAC,CAAE,SAAAC,EAAU,GAAGC,CAAwB,IAElEC,EAAAA,IAACC,EAAAA,KAAI,CAAC,WAAW,SAAS,eAAe,SACtC,SAAAC,EAAAA,SAAS,IAAIJ,EAAUK,GAAQ,OAC9B,OAAIK,EAAAA,eAAgCL,CAAK,EAChCC,EAAAA,aAAaD,EAAO,CAAE,GAAGJ,EAAO,OAAOM,EAAAF,EAAM,MAAM,SAAS,MAAAE,IAAA,OAAAA,EAAAC,EAAAA,MAAM,mBAAmB,CAAG,CAAA,EAE1F,IACT,CAAC,CACI,CAAA,CAEV,EAEKG,EAAeZ,EAAWa,WAAAA,EAAM,OAAA,EAChCC,EAASd,EAAAA,WAAWe,EAAAA,OAAI,EACxBC,EAAShB,EAAAA,WAAWe,EAAAA,OAAI,EAExBE,EAAYC,EAA6C,WAAA,CAAChB,EAAOiB,IAAgB,CACrF,KAAM,CACJ,MAAAC,EACA,SAAAC,EACA,KAAAC,EAAO,KACP,UAAAC,EAAY,OACZ,KAAAC,EACA,YAAAC,EACA,UAAAC,EACA,UAAAC,EAAY,GACZ,aAAAC,CAAY,EACV1B,EACE2B,EAAWP,IAAS,K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KC,EAAAA,aAAa,CAAE,UAAWf,GAAa,EAAK,CAAE,EAC/D,CAAE,WAAAgB,CAAU,EAAKC,EAAAA,SAAS,CAAE,WAAYtB,GAAY,EAAK,CAAE,EAE3D8B,EAAUC,EAAAA,UAAU,CAAE,KAAM,GAAM,SAAA/B,CAAU,CAAA,EAElD,OACElB,EAAAA,WAAK,UAAWmD,EAAAA,GAAGH,EAAQ,UAAWxB,CAAS,EAC7C,SAAAxB,EAAAA,IAAA,MAAA,CAAK,UAAWgD,EAAQ,eAAc,SACpChD,EAAAA,IACE,QAAA,CAAA,IAAK6B,EACL,UAAWmB,EAAQ,SACfK,EAAAA,WAAWtB,EAAYM,EAAYE,CAAU,EACjD,KAAM,EAAC,GACHlB,CACJ,CAAA,CAAA,CAAA,CAEA,CAAA,CAEV,CAAC,EAEYkC,EAAY,OAAO,OAAOzC,EAAW,CAChD,SAAAlB,EACA,WAAAW,EACA,aAAAE,EACA,KAAA6C,EACA,OAAA3C,EACA,OAAAE,CACD,CAAA,EAEDC,EAAU,YAAc,YACxBwC,EAAK,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var t=require("@styled/css");const
|
|
1
|
+
"use strict";var t=require("@styled/css");const n=t.sva({slots:["container","label","inputContainer","input","description","typeIcon","actionIcon","actionButton"],base:{container:{display:"flex",flexDirection:"column",gap:2},label:{fontSize:"sm",fontWeight:"medium",color:"text.primary"},inputContainer:{backgroundColor:"transparent",borderStyle:"solid",borderWidth:"thin",borderColor:"neutral.secondary",borderRadius:"input",boxSizing:"border-box",transition:"all linear 120ms",width:"100%",_hover:{borderColor:"neutral.primary"},_focusWithin:{outlineColor:"brand.base",outlineStyle:"solid",outlineWidth:"thick",outlineOffset:.5}},input:{transition:"all linear 120ms",width:"100%",boxSizing:"border-box",m:0,p:0,outline:"none",minWidth:10,fontWeight:"normal",backgroundColor:"transparent",color:"text.primary",_placeholder:{color:"text.tertiary"},_groupHover:{borderColor:"neutral.primary"}},description:{fontSize:"sm",color:"text.primary"},typeIcon:{transition:"opacity linear 120ms"},actionIcon:{transition:"opacity linear 120ms",cursor:"pointer"},actionButton:{transition:"opacity linear 120ms"}},variants:{size:{sm:{input:{fontSize:"sm",textAlign:"left"},inputContainer:{height:10,p:3}},md:{input:{fontSize:"md",textAlign:"left"},inputContainer:{height:12,p:3}},lg:{input:{fontSize:"lg",textAlign:"left"},inputContainer:{height:15,padding:4}}},alignText:{left:{input:{textAlign:"left"}},center:{input:{textAlign:"center"}},right:{input:{textAlign:"right"}}},isError:{true:{inputContainer:{borderColor:"negative.base"}}},char:{true:{input:{fontSize:"xl",textAlign:"center"},inputContainer:{height:12,py:2}}},disabled:{true:{container:{opacity:.3,pointerEvents:"none"},inputContainer:{_hover:{borderColor:"neutral.secondary"}}}}}});exports.textInput=n;
|
|
2
2
|
//# sourceMappingURL=text-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.js","sources":["../../../src/recipes/text-input.ts"],"sourcesContent":["import { sva } from '@styled/css';\n\nexport const textInput = sva({\n slots: ['container', 'label', '
|
|
1
|
+
{"version":3,"file":"text-input.js","sources":["../../../src/recipes/text-input.ts"],"sourcesContent":["import { sva } from '@styled/css';\n\nexport const textInput = sva({\n slots: ['container', 'label', 'inputContainer', 'input', 'description', 'typeIcon', 'actionIcon', 'actionButton'],\n base: {\n container: { display: 'flex', flexDirection: 'column', gap: 2 },\n label: {\n fontSize: 'sm',\n fontWeight: 'medium',\n color: 'text.primary',\n },\n inputContainer: {\n backgroundColor: 'transparent',\n borderStyle: 'solid',\n borderWidth: 'thin',\n borderColor: 'neutral.secondary',\n borderRadius: 'input',\n boxSizing: 'border-box',\n transition: 'all linear 120ms',\n width: '100%',\n\n _hover: {\n borderColor: 'neutral.primary',\n },\n\n _focusWithin: {\n outlineColor: 'brand.base',\n outlineStyle: 'solid',\n outlineWidth: 'thick',\n outlineOffset: 0.5,\n },\n },\n input: {\n transition: 'all linear 120ms',\n width: '100%',\n boxSizing: 'border-box',\n m: 0,\n p: 0,\n outline: 'none',\n minWidth: 10,\n fontWeight: 'normal',\n backgroundColor: 'transparent',\n color: 'text.primary',\n _placeholder: {\n color: 'text.tertiary',\n },\n\n _groupHover: {\n borderColor: 'neutral.primary',\n },\n },\n description: {\n fontSize: 'sm',\n color: 'text.primary',\n },\n typeIcon: {\n transition: 'opacity linear 120ms',\n },\n actionIcon: {\n transition: 'opacity linear 120ms',\n cursor: 'pointer',\n },\n actionButton: {\n transition: 'opacity linear 120ms',\n },\n },\n variants: {\n size: {\n sm: {\n input: {\n fontSize: 'sm',\n textAlign: 'left',\n },\n inputContainer: {\n height: 10,\n p: 3,\n },\n },\n md: {\n input: {\n fontSize: 'md',\n textAlign: 'left',\n },\n inputContainer: {\n height: 12,\n p: 3,\n },\n },\n lg: {\n input: {\n fontSize: 'lg',\n textAlign: 'left',\n },\n inputContainer: {\n height: 15,\n padding: 4,\n },\n },\n },\n alignText: {\n left: {\n input: {\n textAlign: 'left',\n },\n },\n center: {\n input: {\n textAlign: 'center',\n },\n },\n right: {\n input: {\n textAlign: 'right',\n },\n },\n },\n isError: {\n true: {\n inputContainer: {\n borderColor: 'negative.base',\n },\n },\n },\n char: {\n true: {\n input: {\n fontSize: 'xl',\n textAlign: 'center',\n },\n inputContainer: {\n height: 12,\n py: 2,\n },\n },\n },\n disabled: {\n true: {\n container: {\n opacity: 0.3,\n pointerEvents: 'none',\n },\n inputContainer: {\n _hover: {\n borderColor: 'neutral.secondary',\n },\n },\n },\n },\n },\n});\n"],"names":["textInput","sva"],"mappings":"0CAEO,MAAMA,EAAYC,EAAAA,IAAI,CAC3B,MAAO,CAAC,YAAa,QAAS,iBAAkB,QAAS,cAAe,WAAY,aAAc,cAAc,EAChH,KAAM,CACJ,UAAW,CAAE,QAAS,OAAQ,cAAe,SAAU,IAAK,CAAG,EAC/D,MAAO,CACL,SAAU,KACV,WAAY,SACZ,MAAO,cACR,EACD,eAAgB,CACd,gBAAiB,cACjB,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ACF,CACF,CACF,CACF,CACF,CAAA"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{jsx as
|
|
1
|
+
import{jsx as r,jsxs as T}from"react/jsx-runtime";import{Children as z,cloneElement as D,isValidElement as _,forwardRef as E,useRef as w}from"react";import{useTextField as A,useFocusRing as H,useHover as M,mergeProps as R}from"react-aria";import S from"../primitives/button.js";import"../primitives/checkbox.js";import"../primitives/popover.js";import"../primitives/radio.js";import"../primitives/segmented-control.js";import"../primitives/switch.js";import p from"../primitives/text.js";import{textInput as k}from"../../recipes/text-input.js";import{cx as B}from"@styled/css";import{Flex as N,HStack as ee}from"@styled/jsx";import{token as u}from"@styled/tokens";import{createSlot as m,createHost as re}from"create-slots";const O=m(({children:s,...n})=>r(N,{alignItems:"center",justifyContent:"center",children:z.map(s,t=>{var e;return D(t,{...n,color:(e=t.props.color)!==null&&e!==void 0?e:u("colors.neutral.primary")})})})),V=m(({children:s,...n})=>r(N,{alignItems:"center",justifyContent:"center",children:z.map(s,t=>{var e;return _(t)?D(t,{...n,color:(e=t.props.color)!==null&&e!==void 0?e:u("colors.brand.base")}):null})})),W=m(S),q=m(p),G=m(p),J=E((s,n)=>{const{label:t,disabled:e,size:a="md",alignText:h="left",attr:f,description:l,autoFocus:g,className:x="",errorMessage:d}=s,o=a==="sm"?16:20,L=w(null),P=n||L,{labelProps:Q,inputProps:U,descriptionProps:X,errorMessageProps:Y,isInvalid:y,validationErrors:I}=A({...s,isDisabled:e??!1,isInvalid:!!d},P),{focusProps:Z}=H({autoFocus:g??!1}),{hoverProps:$}=M({isDisabled:e??!1});return re(s.children,c=>{const v=c.get(O),b=c.get(V),j=c.getProps(W),C=c.getProps(q),F=c.getProps(G),i=k({size:a,alignText:h,disabled:e,isError:y});return T("div",{className:B(i.container,x),children:[r("label",{className:i.label,...Q,children:t}),T(ee,{className:i.inputContainer,children:[v&&{...v,props:{...v.props,className:i.typeIcon,width:o,height:o}},C&&r(p,{...C,styles:{color:u("colors.text.tertiary")}}),r("input",{ref:P,className:i.input,...R(U,Z,$),...f}),F&&r(p,{...F,styles:{color:u("colors.text.tertiary")}}),b&&{...b,props:{...b.props,className:i.actionIcon,width:o,height:o}},j&&r(N,{alignItems:"center",justifyContent:"center",className:i.actionButton,children:r(S,{...j,variant:"text",size:a})})]}),l&&r("div",{className:i.description,...X,children:l}),y&&r(p,{variant:"error",...Y,size:"sm",styles:{fontWeight:"400"},children:I.length>0?I.join(" "):d})]})})}),K=E((s,n)=>{const{disabled:t,autoFocus:e,className:a="",attr:h}=s,f=w(null),l=n||f,{inputProps:g}=A({...s,isDisabled:t??!1},l),{focusProps:x}=H({autoFocus:e??!1}),{hoverProps:d}=M({isDisabled:t??!1}),o=k({char:!0,disabled:t});return r("div",{className:B(o.container,a),children:r("div",{className:o.inputContainer,children:r("input",{ref:l,className:o.input,...R(g,x,d),size:1,...h})})})}),te=Object.assign(J,{TypeIcon:O,ActionIcon:V,ActionButton:W,Char:K,Prefix:q,Suffix:G});J.displayName="TextInput",K.displayName="TextInputChar";export{te as TextInput};
|
|
2
2
|
//# sourceMappingURL=text-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.js","sources":["../../../../src/components/inputs/text-input.tsx"],"sourcesContent":["import {\n Children,\n cloneElement,\n forwardRef,\n HTMLAttributes,\n InputHTMLAttributes,\n isValidElement,\n ReactNode,\n RefObject,\n useRef,\n} from 'react';\nimport type { AriaTextFieldProps } from 'react-aria';\nimport { mergeProps, useFocusRing, useHover, useTextField } from 'react-aria';\n\nimport { Text } from '@components/primitives';\nimport { textInput } from '@recipes/text-input';\nimport { css, cx } from '@styled/css';\nimport { Flex } from '@styled/jsx';\nimport { token } from '@styled/tokens';\n\nimport { createHost, createSlot } from 'create-slots';\n\nexport type TextInputProps = AriaTextFieldProps & {\n className?: string;\n disabled?: boolean;\n attr?: InputHTMLAttributes<HTMLInputElement>;\n errorMessage?: string;\n children?: ReactNode;\n size?: 'sm' | 'md' | 'lg';\n alignText?: 'left' | 'center' | 'right';\n};\n\nexport type CharProps = AriaTextFieldProps & {\n className?: string;\n disabled?: boolean;\n attr?: InputHTMLAttributes<HTMLInputElement>;\n};\n\nexport type ActionIconProps = HTMLAttributes<HTMLElement> & {\n onClick: () => void;\n};\n\nconst TypeIcon = createSlot(({ children, ...props }) => {\n return (\n <Flex alignItems=\"center\" justifyContent=\"center\">\n {Children.map(children, child => {\n return cloneElement(child, { ...props, color: child.props.color ?? token('colors.neutral.primary') });\n })}\n </Flex>\n );\n});\n\nconst ActionIcon = createSlot(({ children, ...props }: ActionIconProps) => {\n return (\n <Flex alignItems=\"center\" justifyContent=\"center\">\n {Children.map(children, child => {\n if (isValidElement<ActionIconProps>(child)) {\n return cloneElement(child, { ...props, color: child.props.color ?? token('colors.brand.base') });\n }\n return null;\n })}\n </Flex>\n );\n});\n\nconst Component = forwardRef<HTMLInputElement, TextInputProps>((props, forwardedRef) => {\n const {\n label,\n disabled,\n size = 'md',\n alignText = 'left',\n attr,\n description,\n autoFocus,\n className = '',\n errorMessage,\n } = props;\n const iconSize = size === 'sm' ? 16 : 20;\n\n const internalRef = useRef(null);\n // forwardedRef is null until after first render\n const ref = forwardedRef || internalRef;\n\n const { labelProps, inputProps, descriptionProps, errorMessageProps, isInvalid, validationErrors } = useTextField(\n { ...props, isDisabled: disabled ?? false, isInvalid: !!errorMessage },\n ref as RefObject<HTMLInputElement>,\n );\n\n const { focusProps } = useFocusRing({\n autoFocus: autoFocus ?? false,\n });\n const { hoverProps } = useHover({ isDisabled: disabled ?? false });\n\n return createHost(props.children, slots => {\n const typeIcon = slots.get(TypeIcon);\n const actionIcon = slots.get(ActionIcon);\n\n const classes = textInput({\n size,\n alignText,\n disabled,\n isError: isInvalid,\n typeIcon: !!typeIcon,\n actionIcon: !!actionIcon,\n });\n\n return (\n <div className={cx(classes.container, className)}>\n <label className={classes.label} {...labelProps}>\n {label}\n </label>\n <div className={css({ position: 'relative' }) + (!disabled ? ' group' : '')}>\n {typeIcon && {\n ...typeIcon,\n props: { ...typeIcon.props, className: classes.typeIcon, width: iconSize, height: iconSize },\n }}\n <input ref={ref} className={classes.input} {...mergeProps(inputProps, focusProps, hoverProps)} {...attr} />\n {actionIcon && {\n ...actionIcon,\n props: { ...actionIcon.props, className: classes.actionIcon, width: iconSize, height: iconSize },\n }}\n </div>\n {description && (\n <div className={classes.description} {...descriptionProps}>\n {description}\n </div>\n )}\n {isInvalid && (\n <Text variant=\"error\" {...errorMessageProps} size={'sm'} styles={{ fontWeight: '400' }}>\n {validationErrors.length > 0 ? validationErrors.join(' ') : errorMessage}\n </Text>\n )}\n </div>\n );\n });\n});\n\nconst Char = forwardRef<HTMLInputElement, CharProps>((props, forwardedRef) => {\n const { disabled, autoFocus, className = '', attr } = props;\n\n const internalRef = useRef(null);\n // forwardedRef is null until after first render\n const ref = forwardedRef || internalRef;\n\n const { inputProps } = useTextField({ ...props, isDisabled: disabled ?? false }, ref as RefObject<HTMLInputElement>);\n\n const { focusProps } = useFocusRing({ autoFocus: autoFocus ?? false });\n const { hoverProps } = useHover({ isDisabled: disabled ?? false });\n\n const classes = textInput({ disabled });\n\n return (\n <div className={cx(classes.container, className)}>\n <input\n ref={ref}\n className={cx(classes.input, classes.char)}\n {...mergeProps(inputProps, focusProps, hoverProps)}\n size={1}\n {...attr}\n />\n </div>\n );\n});\n\nexport const TextInput = Object.assign(Component, {\n TypeIcon,\n ActionIcon,\n Char,\n});\n\nComponent.displayName = 'TextInput';\nChar.displayName = 'TextInputChar';\n"],"names":["TypeIcon","createSlot","children","props","_jsx","Flex","Children","child","cloneElement","_a","token","ActionIcon","isValidElement","Component","forwardRef","forwardedRef","label","disabled","size","alignText","attr","description","autoFocus","className","errorMessage","iconSize","internalRef","useRef","ref","labelProps","inputProps","descriptionProps","errorMessageProps","isInvalid","validationErrors","useTextField","focusProps","useFocusRing","hoverProps","useHover","createHost","slots","typeIcon","actionIcon","classes","textInput","_jsxs","cx","css","mergeProps","Text","Char","TextInput"],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Y,IAAgB,CAC3E,KAAM,CAAE,SAAAE,EAAU,UAAAK,EAAW,UAAAC,EAAY,GAAI,KAAAH,CAAM,EAAGjB,EAEhDuB,EAAcC,EAAO,IAAI,EAEzBC,EAAMb,GAAgBW,EAEtB,CAAE,WAAAI,CAAY,EAAGK,EAAa,CAAE,GAAGhC,EAAO,WAAYc,GAAY,EAAO,EAAEW,CAAkC,EAE7G,CAAE,WAAAQ,CAAU,EAAKC,EAAa,CAAE,UAAWf,GAAa,EAAK,CAAE,EAC/D,CAAE,WAAAgB,CAAU,EAAKC,EAAS,CAAE,WAAYtB,GAAY,EAAK,CAAE,EAE3D2B,EAAUC,EAAU,CAAE,SAAA5B,CAAQ,CAAE,EAEtC,OACEb,SAAK,UAAW2C,EAAGH,EAAQ,UAAWrB,CAAS,EAC7C,SAAAnB,EAAA,QAAA,CACE,IAAKwB,EACL,UAAWmB,EAAGH,EAAQ,MAAOA,EAAQ,IAAI,KACrCK,EAAWnB,EAAYM,EAAYE,CAAU,EACjD,KAAM,KACFlB,CAAI,CAAA,CAEN,CAAA,CAEV,CAAC,EAEYgC,EAAY,OAAO,OAAOvC,EAAW,CAChD,SAAAb,EACA,WAAAW,EACA,KAAAwC,CACD,CAAA,EAEDtC,EAAU,YAAc,YACxBsC,EAAK,YAAc"}
|
|
1
|
+
{"version":3,"file":"text-input.js","sources":["../../../../src/components/inputs/text-input.tsx"],"sourcesContent":["import {\n Children,\n cloneElement,\n forwardRef,\n HTMLAttributes,\n InputHTMLAttributes,\n isValidElement,\n ReactNode,\n RefObject,\n useRef,\n} from 'react';\nimport type { AriaTextFieldProps } from 'react-aria';\nimport { mergeProps, useFocusRing, useHover, useTextField } from 'react-aria';\n\nimport { Button, Text } from '@components/primitives';\nimport { textInput } from '@recipes/text-input';\nimport { cx } from '@styled/css';\nimport { Flex, HStack } from '@styled/jsx';\nimport { token } from '@styled/tokens';\n\nimport { createHost, createSlot } from 'create-slots';\n\nexport type TextInputProps = AriaTextFieldProps & {\n className?: string;\n disabled?: boolean;\n attr?: InputHTMLAttributes<HTMLInputElement>;\n errorMessage?: string;\n children?: ReactNode;\n size?: 'sm' | 'md' | 'lg';\n alignText?: 'left' | 'center' | 'right';\n};\n\nexport type CharProps = AriaTextFieldProps & {\n className?: string;\n disabled?: boolean;\n attr?: InputHTMLAttributes<HTMLInputElement>;\n};\n\nexport type ActionIconProps = HTMLAttributes<HTMLElement> & {\n onClick: () => void;\n};\n\nconst TypeIcon = createSlot(({ children, ...props }) => {\n return (\n <Flex alignItems=\"center\" justifyContent=\"center\">\n {Children.map(children, child => {\n return cloneElement(child, { ...props, color: child.props.color ?? token('colors.neutral.primary') });\n })}\n </Flex>\n );\n});\n\nconst ActionIcon = createSlot(({ children, ...props }: ActionIconProps) => {\n return (\n <Flex alignItems=\"center\" justifyContent=\"center\">\n {Children.map(children, child => {\n if (isValidElement<ActionIconProps>(child)) {\n return cloneElement(child, { ...props, color: child.props.color ?? token('colors.brand.base') });\n }\n return null;\n })}\n </Flex>\n );\n});\n\nconst ActionButton = createSlot(Button);\nconst Prefix = createSlot(Text);\nconst Suffix = createSlot(Text);\n\nconst Component = forwardRef<HTMLInputElement, TextInputProps>((props, forwardedRef) => {\n const {\n label,\n disabled,\n size = 'md',\n alignText = 'left',\n attr,\n description,\n autoFocus,\n className = '',\n errorMessage,\n } = props;\n const iconSize = size === 'sm' ? 16 : 20;\n\n const internalRef = useRef(null);\n // forwardedRef is null until after first render\n const ref = forwardedRef || internalRef;\n\n const { labelProps, inputProps, descriptionProps, errorMessageProps, isInvalid, validationErrors } = useTextField(\n { ...props, isDisabled: disabled ?? false, isInvalid: !!errorMessage },\n ref as RefObject<HTMLInputElement>,\n );\n\n const { focusProps } = useFocusRing({\n autoFocus: autoFocus ?? false,\n });\n const { hoverProps } = useHover({ isDisabled: disabled ?? false });\n\n return createHost(props.children, slots => {\n const typeIcon = slots.get(TypeIcon);\n const actionIcon = slots.get(ActionIcon);\n const actionButtonProps = slots.getProps(ActionButton);\n const prefixProps = slots.getProps(Prefix);\n const suffixProps = slots.getProps(Suffix);\n\n const classes = textInput({\n size,\n alignText,\n disabled,\n isError: isInvalid,\n });\n\n return (\n <div className={cx(classes.container, className)}>\n <label className={classes.label} {...labelProps}>\n {label}\n </label>\n <HStack className={classes.inputContainer}>\n {typeIcon && {\n ...typeIcon,\n props: { ...typeIcon.props, className: classes.typeIcon, width: iconSize, height: iconSize },\n }}\n {prefixProps && <Text {...prefixProps} styles={{ color: token('colors.text.tertiary') }} />}\n <input ref={ref} className={classes.input} {...mergeProps(inputProps, focusProps, hoverProps)} {...attr} />\n {suffixProps && <Text {...suffixProps} styles={{ color: token('colors.text.tertiary') }} />}\n {actionIcon && {\n ...actionIcon,\n props: { ...actionIcon.props, className: classes.actionIcon, width: iconSize, height: iconSize },\n }}\n {actionButtonProps && (\n <Flex alignItems=\"center\" justifyContent=\"center\" className={classes.actionButton}>\n <Button {...actionButtonProps} variant=\"text\" size={size} />\n </Flex>\n )}\n </HStack>\n {description && (\n <div className={classes.description} {...descriptionProps}>\n {description}\n </div>\n )}\n {isInvalid && (\n <Text variant=\"error\" {...errorMessageProps} size={'sm'} styles={{ fontWeight: '400' }}>\n {validationErrors.length > 0 ? validationErrors.join(' ') : errorMessage}\n </Text>\n )}\n </div>\n );\n });\n});\n\nconst Char = forwardRef<HTMLInputElement, CharProps>((props, forwardedRef) => {\n const { disabled, autoFocus, className = '', attr } = props;\n\n const internalRef = useRef(null);\n // forwardedRef is null until after first render\n const ref = forwardedRef || internalRef;\n\n const { inputProps } = useTextField({ ...props, isDisabled: disabled ?? false }, ref as RefObject<HTMLInputElement>);\n\n const { focusProps } = useFocusRing({ autoFocus: autoFocus ?? false });\n const { hoverProps } = useHover({ isDisabled: disabled ?? false });\n\n const classes = textInput({ char: true, disabled });\n\n return (\n <div className={cx(classes.container, className)}>\n <div className={classes.inputContainer}>\n <input\n ref={ref}\n className={classes.input}\n {...mergeProps(inputProps, focusProps, hoverProps)}\n size={1}\n {...attr}\n />\n </div>\n </div>\n );\n});\n\nexport const TextInput = Object.assign(Component, {\n TypeIcon,\n ActionIcon,\n ActionButton,\n Char,\n Prefix,\n Suffix,\n});\n\nComponent.displayName = 'TextInput';\nChar.displayName = 'TextInputChar';\n"],"names":["TypeIcon","createSlot","children","props","_jsx","Flex","Children","child","cloneElement","_a","token","ActionIcon","isValidElement","ActionButton","Button","Prefix","Text","Suffix","Component","forwardRef","forwardedRef","label","disabled","size","alignText","attr","description","autoFocus","className","errorMessage","iconSize","internalRef","useRef","ref","labelProps","inputProps","descriptionProps","errorMessageProps","isInvalid","validationErrors","useTextField","focusProps","useFocusRing","hoverProps","useHover","createHost","slots","typeIcon","actionIcon","actionButtonProps","prefixProps","suffixProps","classes","textInput","_jsxs","cx","HStack","mergeProps","Char","TextInput"],"mappings":"mtBA0CA,MAAMA,EAAWC,EAAW,CAAC,CAAE,SAAAC,EAAU,GAAGC,CAAO,IAE/CC,EAACC,EAAI,CAAC,WAAW,SAAS,eAAe,SACtC,SAAAC,EAAS,IAAIJ,EAAUK,GAAQ,OAC9B,OAAOC,EAAaD,EAAO,CAAE,GAAGJ,EAAO,OAAOM,EAAAF,EAAM,MAAM,SAAS,MAAAE,IAAA,OAAAA,EAAAC,EAAM,wBAAwB,CAAG,CAAA,CACtG,CAAC,CACI,CAAA,CAEV,EAEKC,EAAaV,EAAW,CAAC,CAAE,SAAAC,EAAU,GAAGC,CAAwB,IAElEC,EAACC,EAAI,CAAC,WAAW,SAAS,eAAe,SACtC,SAAAC,EAAS,IAAIJ,EAAUK,GAAQ,OAC9B,OAAIK,EAAgCL,CAAK,EAChCC,EAAaD,EAAO,CAAE,GAAGJ,EAAO,OAAOM,EAAAF,EAAM,MAAM,SAAS,MAAAE,IAAA,OAAAA,EAAAC,EAAM,mBAAmB,CAAG,CAAA,EAE1F,IACT,CAAC,CACI,CAAA,CAEV,EAEKG,EAAeZ,EAAWa,CAAM,EAChCC,EAASd,EAAWe,CAAI,EACxBC,EAAShB,EAAWe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,EAE7G,CAAE,WAAAQ,CAAU,EAAKC,EAAa,CAAE,UAAWf,GAAa,EAAK,CAAE,EAC/D,CAAE,WAAAgB,CAAU,EAAKC,EAAS,CAAE,WAAYtB,GAAY,EAAK,CAAE,EAE3D8B,EAAUC,EAAU,CAAE,KAAM,GAAM,SAAA/B,CAAU,CAAA,EAElD,OACElB,SAAK,UAAWmD,EAAGH,EAAQ,UAAWxB,CAAS,EAC7C,SAAAxB,EAAA,MAAA,CAAK,UAAWgD,EAAQ,eAAc,SACpChD,EACE,QAAA,CAAA,IAAK6B,EACL,UAAWmB,EAAQ,SACfK,EAAWtB,EAAYM,EAAYE,CAAU,EACjD,KAAM,EAAC,GACHlB,CACJ,CAAA,CAAA,CAAA,CAEA,CAAA,CAEV,CAAC,EAEYkC,GAAY,OAAO,OAAOzC,EAAW,CAChD,SAAAlB,EACA,WAAAW,EACA,aAAAE,EACA,KAAA6C,EACA,OAAA3C,EACA,OAAAE,CACD,CAAA,EAEDC,EAAU,YAAc,YACxBwC,EAAK,YAAc"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{sva as t}from"@styled/css";const
|
|
1
|
+
import{sva as t}from"@styled/css";const n=t({slots:["container","label","inputContainer","input","description","typeIcon","actionIcon","actionButton"],base:{container:{display:"flex",flexDirection:"column",gap:2},label:{fontSize:"sm",fontWeight:"medium",color:"text.primary"},inputContainer:{backgroundColor:"transparent",borderStyle:"solid",borderWidth:"thin",borderColor:"neutral.secondary",borderRadius:"input",boxSizing:"border-box",transition:"all linear 120ms",width:"100%",_hover:{borderColor:"neutral.primary"},_focusWithin:{outlineColor:"brand.base",outlineStyle:"solid",outlineWidth:"thick",outlineOffset:.5}},input:{transition:"all linear 120ms",width:"100%",boxSizing:"border-box",m:0,p:0,outline:"none",minWidth:10,fontWeight:"normal",backgroundColor:"transparent",color:"text.primary",_placeholder:{color:"text.tertiary"},_groupHover:{borderColor:"neutral.primary"}},description:{fontSize:"sm",color:"text.primary"},typeIcon:{transition:"opacity linear 120ms"},actionIcon:{transition:"opacity linear 120ms",cursor:"pointer"},actionButton:{transition:"opacity linear 120ms"}},variants:{size:{sm:{input:{fontSize:"sm",textAlign:"left"},inputContainer:{height:10,p:3}},md:{input:{fontSize:"md",textAlign:"left"},inputContainer:{height:12,p:3}},lg:{input:{fontSize:"lg",textAlign:"left"},inputContainer:{height:15,padding:4}}},alignText:{left:{input:{textAlign:"left"}},center:{input:{textAlign:"center"}},right:{input:{textAlign:"right"}}},isError:{true:{inputContainer:{borderColor:"negative.base"}}},char:{true:{input:{fontSize:"xl",textAlign:"center"},inputContainer:{height:12,py:2}}},disabled:{true:{container:{opacity:.3,pointerEvents:"none"},inputContainer:{_hover:{borderColor:"neutral.secondary"}}}}}});export{n as textInput};
|
|
2
2
|
//# sourceMappingURL=text-input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.js","sources":["../../../src/recipes/text-input.ts"],"sourcesContent":["import { sva } from '@styled/css';\n\nexport const textInput = sva({\n slots: ['container', 'label', '
|
|
1
|
+
{"version":3,"file":"text-input.js","sources":["../../../src/recipes/text-input.ts"],"sourcesContent":["import { sva } from '@styled/css';\n\nexport const textInput = sva({\n slots: ['container', 'label', 'inputContainer', 'input', 'description', 'typeIcon', 'actionIcon', 'actionButton'],\n base: {\n container: { display: 'flex', flexDirection: 'column', gap: 2 },\n label: {\n fontSize: 'sm',\n fontWeight: 'medium',\n color: 'text.primary',\n },\n inputContainer: {\n backgroundColor: 'transparent',\n borderStyle: 'solid',\n borderWidth: 'thin',\n borderColor: 'neutral.secondary',\n borderRadius: 'input',\n boxSizing: 'border-box',\n transition: 'all linear 120ms',\n width: '100%',\n\n _hover: {\n borderColor: 'neutral.primary',\n },\n\n _focusWithin: {\n outlineColor: 'brand.base',\n outlineStyle: 'solid',\n outlineWidth: 'thick',\n outlineOffset: 0.5,\n },\n },\n input: {\n transition: 'all linear 120ms',\n width: '100%',\n boxSizing: 'border-box',\n m: 0,\n p: 0,\n outline: 'none',\n minWidth: 10,\n fontWeight: 'normal',\n backgroundColor: 'transparent',\n color: 'text.primary',\n _placeholder: {\n color: 'text.tertiary',\n },\n\n _groupHover: {\n borderColor: 'neutral.primary',\n },\n },\n description: {\n fontSize: 'sm',\n color: 'text.primary',\n },\n typeIcon: {\n transition: 'opacity linear 120ms',\n },\n actionIcon: {\n transition: 'opacity linear 120ms',\n cursor: 'pointer',\n },\n actionButton: {\n transition: 'opacity linear 120ms',\n },\n },\n variants: {\n size: {\n sm: {\n input: {\n fontSize: 'sm',\n textAlign: 'left',\n },\n inputContainer: {\n height: 10,\n p: 3,\n },\n },\n md: {\n input: {\n fontSize: 'md',\n textAlign: 'left',\n },\n inputContainer: {\n height: 12,\n p: 3,\n },\n },\n lg: {\n input: {\n fontSize: 'lg',\n textAlign: 'left',\n },\n inputContainer: {\n height: 15,\n padding: 4,\n },\n },\n },\n alignText: {\n left: {\n input: {\n textAlign: 'left',\n },\n },\n center: {\n input: {\n textAlign: 'center',\n },\n },\n right: {\n input: {\n textAlign: 'right',\n },\n },\n },\n isError: {\n true: {\n inputContainer: {\n borderColor: 'negative.base',\n },\n },\n },\n char: {\n true: {\n input: {\n fontSize: 'xl',\n textAlign: 'center',\n },\n inputContainer: {\n height: 12,\n py: 2,\n },\n },\n },\n disabled: {\n true: {\n container: {\n opacity: 0.3,\n pointerEvents: 'none',\n },\n inputContainer: {\n _hover: {\n borderColor: 'neutral.secondary',\n },\n },\n },\n },\n },\n});\n"],"names":["textInput","sva"],"mappings":"kCAEO,MAAMA,EAAYC,EAAI,CAC3B,MAAO,CAAC,YAAa,QAAS,iBAAkB,QAAS,cAAe,WAAY,aAAc,cAAc,EAChH,KAAM,CACJ,UAAW,CAAE,QAAS,OAAQ,cAAe,SAAU,IAAK,CAAG,EAC/D,MAAO,CACL,SAAU,KACV,WAAY,SACZ,MAAO,cACR,EACD,eAAgB,CACd,gBAAiB,cACjB,YAAa,QACb,YAAa,OACb,YAAa,oBACb,aAAc,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-1 +1 @@
|
|
|
1
|
-
{"schemaVersion":"0.40.1","styles":{"atomic":["display]___[value:inline-flex","alignItems]___[value:center","justifyContent]___[value:center","position]___[value:relative","fontWeight]___[value:semibold","boxSizing]___[value:border-box","borderRadius]___[value:button","border]___[value:thin solid","borderColor]___[value:transparent","cursor]___[value:pointer","transition]___[value:all 0.2s ease","outline]___[value:none","willChange]___[value:transform, opacity","background]___[value:none","transform]___[value:scale(0.95)]___[cond:_active","opacity]___[value:0.3]___[cond:_disabled","pointerEvents]___[value:none]___[cond:_disabled","content]___[value:\"\"]___[cond:_before","position]___[value:absolute]___[cond:_before","top]___[value:0]___[cond:_before","left]___[value:0]___[cond:_before","right]___[value:0]___[cond:_before","bottom]___[value:0]___[cond:_before","borderRadius]___[value:inherit]___[cond:_before","backgroundImage]___[value:linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05))]___[cond:_before","backgroundImage]___[value:linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05))]___[cond:_before<___>_dark","opacity]___[value:0]___[cond:_before","transition]___[value:opacity 0.2s ease]___[cond:_before","opacity]___[value:1]___[cond:_hover<___>_before","height]___[value:9","paddingBlock]___[value:1.5","paddingInline]___[value:4","height]___[value:12","paddingBlock]___[value:3","paddingInline]___[value:6","height]___[value:15","paddingBlock]___[value:4","background]___[value:brand.base","background]___[value:brand.lightest","background]___[value:negative.darker","background]___[value:neutral.tertiary","background]___[value:transparent","borderColor]___[value:neutral.primary","padding]___[value:0","height]___[value:fit-content","opacity]___[value:0]___[cond:_hover<___>_before","background]___[value:#ffffff14","background]___[value:#ffffff4d]___[cond:_hover","background]___[value:#ffffff29]___[cond:_dark","backdropFilter]___[value:blur(3px)","display]___[value:none]___[cond:_before","pointerEvents]___[value:none","width]___[value:full","borderRadius]___[value:full","display]___[value:flex","textAlign]___[value:center","whiteSpace]___[value:nowrap","fontSize]___[value:sm","lineHeight]___[value:1.5rem","fontSize]___[value:md","fontSize]___[value:lg","lineHeight]___[value:1.75rem","color]___[value:surface.primary","color]___[value:brand.darker","color]___[value:text.primary","color]___[value:brand.base","color]___[value:brand.darkest]___[cond:_groupHover","color]___[value:brand.base]___[cond:_groupHover<___>_dark","color]___[value:chalk","outlineColor]___[value:brand.base","outlineStyle]___[value:solid","outlineWidth]___[value:thick","outlineOffset]___[value:0.5","width]___[value:9","padding]___[value:1.5","width]___[value:12","padding]___[value:3","width]___[value:15","padding]___[value:4","borderRadius]___[value:10","outlineColor]___[value:brand.lightest]___[cond:_focusVisible","background]___[value:positive.lightest","outlineColor]___[value:positive.lightest]___[cond:_focusVisible","background]___[value:negative.lightest","outlineColor]___[value:negative.lightest]___[cond:_focusVisible","background]___[value:warning.lightest","outlineColor]___[value:warning.lightest]___[cond:_focusVisible","background]___[value:surface.secondary","outlineColor]___[value:surface.secondary]___[cond:_focusVisible","transition]___[value:transform 0.2s ease, opacity 0.2s ease","opacity]___[value:0.8]___[cond:_hover","outlineStyle]___[value:solid]___[cond:_focusVisible","outlineWidth]___[value:thick]___[cond:_focusVisible","outlineOffset]___[value:0.5]___[cond:_focusVisible","animationFillMode]___[value:forwards","animationName]___[value:scaleOut","animationDuration]___[value:150ms","scale]___[value:1]___[cond:_motionReduce","color]___[value:brand.darkest","color]___[value:positive.darkest","color]___[value:negative.darkest","color]___[value:warning.darkest","color]___[value:text.secondary","textTransform]___[value:uppercase","fontSize]___[value:xs","letterSpacing]___[value:0.06rem","marginLeft]___[value:7","marginRight]___[value:7","outlineColor]___[value:brand.base]___[cond:_focusVisible","borderRadius]___[value:2]___[cond:_focusVisible","height]___[value:full","background]___[value:surface.primary","overflow]___[value:hidden","top]___[value:12]___[cond:@media (min-width: 48rem)","marginInline]___[value:auto]___[cond:@media (min-width: 48rem)","width]___[value:25rem]___[cond:@media (min-width: 48rem)","height]___[value:fit-content]___[cond:@media (min-width: 48rem)","boxShadow]___[value:0px 12px 56px {colors.ink.70/15}]___[cond:@media (min-width: 48rem)","borderRadius]___[value:container]___[cond:@media (min-width: 48rem)","boxShadow]___[value:none]___[cond:@media (min-width: 48rem)<___>_dark","animationName]___[value:none","scale]___[value:1","padding]___[value:2","paddingBottom]___[value:0","padding]___[value:8","borderWidth]___[value:1]___[cond:@media (min-width: 48rem)<___>_dark","borderBlock]___[value:solid]___[cond:@media (min-width: 48rem)<___>_dark","borderColor]___[value:neutral.secondary]___[cond:@media (min-width: 48rem)<___>_dark","animationName]___[value:scaleIn","animationDuration]___[value:250ms","pointerEvents]___[value:all","position]___[value:fixed","top]___[value:0","left]___[value:0","backdropBlur]___[value:0.375rem","backdropFilter]___[value:auto","backgroundColor]___[value:surface.primary/70","backgroundColor]___[value:surface.tertiary","animationName]___[value:fadeIn","animationDuration]___[value:400ms","animationName]___[value:fadeOut","height]___[value:100vh","width]___[value:100vw","maxWidth]___[value:100rem","margin]___[value:0 auto","flexDirection]___[value:column","gap]___[value:2","textAlign]___[value:left","textAlign]___[value:right","opacity]___[value:0.3","fontWeight]___[value:medium","fontSize]___[value:xl","transition]___[value:all linear 120ms","width]___[value:100%","borderStyle]___[value:solid","borderWidth]___[value:thin","borderColor]___[value:neutral.secondary","borderRadius]___[value:input","margin]___[value:0","minWidth]___[value:10","fontWeight]___[value:normal","backgroundColor]___[value:transparent","color]___[value:text.tertiary]___[cond:_placeholder","borderColor]___[value:neutral.primary]___[cond:_groupHover","outlineColor]___[value:brand.base]___[cond:_focus","outlineStyle]___[value:solid]___[cond:_focus","outlineWidth]___[value:thick]___[cond:_focus","outlineOffset]___[value:0.5]___[cond:_focus","height]___[value:10","borderColor]___[value:negative.base","paddingLeft]___[value:11","paddingRight]___[value:11","paddingLeft]___[value:9","paddingRight]___[value:9","position]___[value:absolute","top]___[value:50%","transform]___[value:translateY(-50%)","transition]___[value:opacity linear 120ms","left]___[value:3","right]___[value:3","color]___[value:negative.darker","color]___[value:positive.base","color]___[value:warning.base","textStyle]___[value:body-xs","textStyle]___[value:body-sm","textStyle]___[value:body-md","textStyle]___[value:body-lg","textStyle]___[value:body-sm-scaled","textStyle]___[value:body-md-scaled","textStyle]___[value:body-lg-scaled","textStyle]___[value:mono-sm","textStyle]___[value:mono-md","textStyle]___[value:mono-lg","background]___[value:linear-gradient(#00CC8F, #6851FF)","inset]___[value:0","display]___[value:grid","gridTemplateColumns]___[value:repeat(6, minmax(0, 1fr))","columnGap]___[value:2rem","rowGap]___[value:2rem","marginTop]___[value:6","gap]___[value:10px","fill]___[value:white","truncate]___[value:true","flexShrink]___[value:0","paddingTop]___[value:6","paddingInline]___[value:8","display]___[value:block","display]___[value:none","bottom]___[value:0","right]___[value:0","background]___[value:text.primary/20","transform]___[value:translateY(0)","transform]___[value:translateY(100%)","transition]___[value:transform 0.3s","borderRadius]___[value:xl","boxShadow]___[value:0px -12px 56px 0px rgba(119, 118, 122, 0.15)","paddingBottom]___[value:8","justifyContent]___[value:space-between","flexDirection]___[value:row","padding]___[value:6","paddingBottom]___[value:5","minWidth]___[value:8]___[cond:& ><___>_first","minWidth]___[value:8]___[cond:& ><___>_last","outlineStyle]___[value:none","background]___[value:#ffc439","outlineColor]___[value:#ffc439","strokeWidth]___[value:2.5","gap]___[value:1","marginTop]___[value:0.5","width]___[value:60","alignItems]___[value:flex-start","gap]___[value:1.5","stroke]___[value:text.primary","stroke]___[value:brand.base","stroke]___[value:surface.primary","strokeOpacity]___[value:0.12","animation]___[value:spin 1s linear infinite","transformOrigin]___[value:center center","maxWidth]___[value:72","width]___[value:max","backgroundColor]___[value:surface.primary","paddingBlock]___[value:2","paddingInline]___[value:3","boxShadow]___[value:0px 4px 20px 0px rgba(0, 0, 0, 0.10)","left]___[value:50%","transform]___[value:translateX(-50%) translateY(calc(-100% - 0.75rem))","width]___[value:72","height]___[value:4","transform]___[value:translateX(-50%) translateY(0.75rem)","width]___[value:1.125rem","height]___[value:1.125rem","borderColor]___[value:neutral.primary]___[cond:_hover","objectFit]___[value:cover","borderStartRadius]___[value:input","width]___[value:20","background]___[value:surface.tertiary]___[cond:_hover","borderLeftWidth]___[value:thin","borderRadius]___[value:0","background]___[value:brand.lightest]___[cond:_hover","gap]___[value:4","transform]___[value:rotate(180)","width]___[value:14","height]___[value:14","top]___[value:55","boxShadow]___[value:4px 8px 20px 0px rgba(0, 0, 0, 0.15)","maxHeight]___[value:17.5rem","overflowY]___[value:auto","width]___[value:18","height]___[value:18","minWidth]___[value:0","maxWidth]___[value:30rem","caretColor]___[value:transparent","borderRadius]___[value:0.5rem","marginBlock]___[value:4","maxWidth]___[value:8xl","marginInline]___[value:auto","paddingInline]___[value:6]___[cond:md","paddingInline]___[value:8]___[cond:lg","overlay]___[value:true","gap]___[value:0","marginTop]___[value:8","marginTop]___[value:4","background]___[value:neutral.quaternary","transition]___[value:background-color 0.2s","background]___[value:neutral.secondary]___[cond:_hover","borderRadius]___[value:lg","color]___[value:neutral.primary","borderRadius]___[value:2xl","boxShadow]___[value:0 6px 8px 2px rgba(0, 0, 0, .18)]___[cond:_hover","width]___[value:30","height]___[value:30","alignItems]___[value:flex-end","minHeight]___[value:20","outlineOffset]___[value:1","opacity]___[value:1","borderRadius]___[value:sm","borderColor]___[value:brand.base","borderColor]___[value:text.tertiary","pointerEvents]___[value:auto","outlineColor]___[value:transparent","width]___[value:5","height]___[value:5","borderWidth]___[value:thick","transition]___[value:background-color 0.2s ease, border-color 0.2s ease","cursor]___[value:pointer]___[cond:_hover","borderColor]___[value:brand.base]___[cond:_hover","width]___[value:2.5","height]___[value:0.5","marginLeft]___[value:3","srOnly]___[value:true","height]___[value:16","width]___[value:16","alignItems]___[value:start","borderWidth]___[value:1","maxWidth]___[value:52","gap]___[value:5","gap]___[value:10","transition]___[value:border-color 0.2s ease","width]___[value:6","height]___[value:6","flex]___[value:0 0 auto","width]___[value:3","height]___[value:3","borderRadius]___[value:9999px","padding]___[value:1","background]___[value:ink.10","background]___[value:slate.2]___[cond:_dark","opacity]___[value:0.5","background]___[value:paper","background]___[value:slate.4]___[cond:_dark","boxShadow]___[value:0px 4px 20px 0px {colors.ink.90/10}","transition]___[value:transform 0.2s ease","borderRadius]___[value:inherit","marginLeft]___[value:-1","height]___[value:13","height]___[value:8","transition]___[value:background 0s","transition]___[value:background 0.2s ease","background]___[value:transparent]___[cond:_hover","background]___[value:ink.20]___[cond:_hover","background]___[value:transparent]___[cond:_hover<___>_dark","background]___[value:slate.1]___[cond:_hover<___>_dark","zIndex]___[value:0","marginRight]___[value:1","marginRight]___[value:2","background]___[value:neutral.primary","background]___[value:ink.70]___[cond:_hover","background]___[value:brand.base]___[cond:_hover","background]___[value:slate.4]___[cond:_hover<___>_dark","background]___[value:brand.base]___[cond:_hover<___>_dark","paddingInline]___[value:0.5","width]___[value:11","transition]___[value:background-color 0.2s ease","left]___[value:6","width]___[value:4","transition]___[value:left 0.2s ease","textStyle]___[value:h1-scaled","textStyle]___[value:h1","textStyle]___[value:h2-scaled","textStyle]___[value:h2","textStyle]___[value:h3-scaled","textStyle]___[value:h3","textStyle]___[value:h4-scaled","textStyle]___[value:h4","textStyle]___[value:h5-scaled","textStyle]___[value:h5","textStyle]___[value:h6-scaled","textStyle]___[value:h6","truncate]___[value:false","strokeWidth]___[value:4","width]___[value:36","height]___[value:36","gap]___[value:3","marginBlock]___[value:3","height]___[value:2.625rem","width]___[value:2.625rem","overflowWrap]___[value:break-word","wordBreak]___[value:break-word","fontWeight]___[value:600","boxShadow]___[value:0.125rem 0.125rem 1.5rem {colors.ink.70/15}","borderRadius]___[value:1rem","fill]___[value:ink.50","fill]___[value:ink.70]___[cond:_dark","fill]___[value:url(\"#logo-gradient\")]___[cond:_hover","fill]___[value:url(\"#logo-gradient\")]___[cond:_active","fill]___[value:url(\"#logo-gradient\")]___[cond:_focus","color]___[value:text.tertiary]___[cond:_groupHover","color]___[value:ink.50","color]___[value:ink.70]___[cond:_dark","cursor]___[value:default","justifyContent]___[value:space-around","minWidth]___[value:15rem","width]___[value:40%","borderLeft]___[value:thin solid","borderColor]___[value:neutral.tertiary","backgroundColor]___[value:magic.10","animation]___[value:fadeIn 0.5s, moveRight 1s 0.5s forwards","borderRadius]___[value:50%","borderWidth]___[value:3px","borderColor]___[value:surface.primary","height]___[value:3.875rem","width]___[value:3.875rem","marginTop]___[value:-3px","marginRight]___[value:0.9rem","zIndex]___[value:1","marginLeft]___[value:0.9rem","animation]___[value:fadeIn 0.5s, moveLeft 1s 0.5s forwards","height]___[value:34","width]___[value:34","height]___[value:56","width]___[value:56","color]___[value:positive.darker","color]___[value:text.tertiary","fontVariant]___[value:no-contextual","marginBlock]___[value:10","height]___[value:250","color]___[value:ink.70","gridTemplateColumns]___[value:2","fontWeight]___[value:bold","gap]___[value:8","width]___[value:40","height]___[value:40"],"recipes":{}}}
|
|
1
|
+
{"schemaVersion":"0.40.1","styles":{"atomic":["display]___[value:inline-flex","alignItems]___[value:center","justifyContent]___[value:center","position]___[value:relative","fontWeight]___[value:semibold","boxSizing]___[value:border-box","borderRadius]___[value:button","border]___[value:thin solid","borderColor]___[value:transparent","cursor]___[value:pointer","transition]___[value:all 0.2s ease","outline]___[value:none","willChange]___[value:transform, opacity","background]___[value:none","transform]___[value:scale(0.95)]___[cond:_active","opacity]___[value:0.3]___[cond:_disabled","pointerEvents]___[value:none]___[cond:_disabled","content]___[value:\"\"]___[cond:_before","position]___[value:absolute]___[cond:_before","top]___[value:0]___[cond:_before","left]___[value:0]___[cond:_before","right]___[value:0]___[cond:_before","bottom]___[value:0]___[cond:_before","borderRadius]___[value:inherit]___[cond:_before","backgroundImage]___[value:linear-gradient(rgba(0, 0, 0, 0.05), rgba(0, 0, 0, 0.05))]___[cond:_before","backgroundImage]___[value:linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.05))]___[cond:_before<___>_dark","opacity]___[value:0]___[cond:_before","transition]___[value:opacity 0.2s ease]___[cond:_before","opacity]___[value:1]___[cond:_hover<___>_before","height]___[value:9","paddingBlock]___[value:1.5","paddingInline]___[value:4","height]___[value:12","paddingBlock]___[value:3","paddingInline]___[value:6","height]___[value:15","paddingBlock]___[value:4","background]___[value:brand.base","background]___[value:brand.lightest","background]___[value:negative.darker","background]___[value:neutral.tertiary","background]___[value:transparent","borderColor]___[value:neutral.primary","padding]___[value:0","height]___[value:fit-content","opacity]___[value:0]___[cond:_hover<___>_before","background]___[value:#ffffff14","background]___[value:#ffffff4d]___[cond:_hover","background]___[value:#ffffff29]___[cond:_dark","backdropFilter]___[value:blur(3px)","display]___[value:none]___[cond:_before","pointerEvents]___[value:none","width]___[value:full","borderRadius]___[value:full","display]___[value:flex","textAlign]___[value:center","whiteSpace]___[value:nowrap","fontSize]___[value:sm","lineHeight]___[value:1.5rem","fontSize]___[value:md","fontSize]___[value:lg","lineHeight]___[value:1.75rem","color]___[value:surface.primary","color]___[value:brand.darker","color]___[value:text.primary","color]___[value:brand.base","color]___[value:brand.darkest]___[cond:_groupHover","color]___[value:brand.base]___[cond:_groupHover<___>_dark","color]___[value:chalk","outlineColor]___[value:brand.base","outlineStyle]___[value:solid","outlineWidth]___[value:thick","outlineOffset]___[value:0.5","width]___[value:9","padding]___[value:1.5","width]___[value:12","padding]___[value:3","width]___[value:15","padding]___[value:4","borderRadius]___[value:10","outlineColor]___[value:brand.lightest]___[cond:_focusVisible","background]___[value:positive.lightest","outlineColor]___[value:positive.lightest]___[cond:_focusVisible","background]___[value:negative.lightest","outlineColor]___[value:negative.lightest]___[cond:_focusVisible","background]___[value:warning.lightest","outlineColor]___[value:warning.lightest]___[cond:_focusVisible","background]___[value:surface.secondary","outlineColor]___[value:surface.secondary]___[cond:_focusVisible","transition]___[value:transform 0.2s ease, opacity 0.2s ease","opacity]___[value:0.8]___[cond:_hover","outlineStyle]___[value:solid]___[cond:_focusVisible","outlineWidth]___[value:thick]___[cond:_focusVisible","outlineOffset]___[value:0.5]___[cond:_focusVisible","animationFillMode]___[value:forwards","animationName]___[value:scaleOut","animationDuration]___[value:150ms","scale]___[value:1]___[cond:_motionReduce","color]___[value:brand.darkest","color]___[value:positive.darkest","color]___[value:negative.darkest","color]___[value:warning.darkest","color]___[value:text.secondary","textTransform]___[value:uppercase","fontSize]___[value:xs","letterSpacing]___[value:0.06rem","marginLeft]___[value:7","marginRight]___[value:7","outlineColor]___[value:brand.base]___[cond:_focusVisible","borderRadius]___[value:2]___[cond:_focusVisible","height]___[value:full","background]___[value:surface.primary","overflow]___[value:hidden","top]___[value:12]___[cond:@media (min-width: 48rem)","marginInline]___[value:auto]___[cond:@media (min-width: 48rem)","width]___[value:25rem]___[cond:@media (min-width: 48rem)","height]___[value:fit-content]___[cond:@media (min-width: 48rem)","boxShadow]___[value:0px 12px 56px {colors.ink.70/15}]___[cond:@media (min-width: 48rem)","borderRadius]___[value:container]___[cond:@media (min-width: 48rem)","boxShadow]___[value:none]___[cond:@media (min-width: 48rem)<___>_dark","animationName]___[value:none","scale]___[value:1","padding]___[value:2","paddingBottom]___[value:0","padding]___[value:8","borderWidth]___[value:1]___[cond:@media (min-width: 48rem)<___>_dark","borderBlock]___[value:solid]___[cond:@media (min-width: 48rem)<___>_dark","borderColor]___[value:neutral.secondary]___[cond:@media (min-width: 48rem)<___>_dark","animationName]___[value:scaleIn","animationDuration]___[value:250ms","pointerEvents]___[value:all","position]___[value:fixed","top]___[value:0","left]___[value:0","backdropBlur]___[value:0.375rem","backdropFilter]___[value:auto","backgroundColor]___[value:surface.primary/70","backgroundColor]___[value:surface.tertiary","animationName]___[value:fadeIn","animationDuration]___[value:400ms","animationName]___[value:fadeOut","height]___[value:100vh","width]___[value:100vw","maxWidth]___[value:100rem","margin]___[value:0 auto","flexDirection]___[value:column","gap]___[value:2","opacity]___[value:0.3","fontWeight]___[value:medium","backgroundColor]___[value:transparent","borderStyle]___[value:solid","borderWidth]___[value:thin","borderColor]___[value:neutral.secondary","borderRadius]___[value:input","transition]___[value:all linear 120ms","width]___[value:100%","borderColor]___[value:neutral.primary]___[cond:_hover","outlineColor]___[value:brand.base]___[cond:_focusWithin","outlineStyle]___[value:solid]___[cond:_focusWithin","outlineWidth]___[value:thick]___[cond:_focusWithin","outlineOffset]___[value:0.5]___[cond:_focusWithin","height]___[value:10","borderColor]___[value:negative.base","paddingBlock]___[value:2","borderColor]___[value:neutral.secondary]___[cond:_hover","margin]___[value:0","minWidth]___[value:10","fontWeight]___[value:normal","color]___[value:text.tertiary]___[cond:_placeholder","borderColor]___[value:neutral.primary]___[cond:_groupHover","textAlign]___[value:left","textAlign]___[value:right","fontSize]___[value:xl","transition]___[value:opacity linear 120ms","color]___[value:negative.darker","color]___[value:positive.base","color]___[value:warning.base","textStyle]___[value:body-xs","textStyle]___[value:body-sm","textStyle]___[value:body-md","textStyle]___[value:body-lg","textStyle]___[value:body-sm-scaled","textStyle]___[value:body-md-scaled","textStyle]___[value:body-lg-scaled","textStyle]___[value:mono-sm","textStyle]___[value:mono-md","textStyle]___[value:mono-lg","background]___[value:linear-gradient(#00CC8F, #6851FF)","inset]___[value:0","display]___[value:grid","gridTemplateColumns]___[value:repeat(6, minmax(0, 1fr))","columnGap]___[value:2rem","rowGap]___[value:2rem","marginTop]___[value:6","gap]___[value:10px","fill]___[value:white","truncate]___[value:true","flexShrink]___[value:0","paddingTop]___[value:6","paddingInline]___[value:8","display]___[value:block","display]___[value:none","position]___[value:absolute","bottom]___[value:0","right]___[value:0","background]___[value:text.primary/20","transform]___[value:translateY(0)","transform]___[value:translateY(100%)","transition]___[value:transform 0.3s","borderRadius]___[value:xl","boxShadow]___[value:0px -12px 56px 0px rgba(119, 118, 122, 0.15)","paddingBottom]___[value:8","justifyContent]___[value:space-between","flexDirection]___[value:row","padding]___[value:6","paddingBottom]___[value:5","minWidth]___[value:8]___[cond:& ><___>_first","minWidth]___[value:8]___[cond:& ><___>_last","outlineStyle]___[value:none","background]___[value:#ffc439","outlineColor]___[value:#ffc439","strokeWidth]___[value:2.5","gap]___[value:1","marginTop]___[value:0.5","width]___[value:60","alignItems]___[value:flex-start","gap]___[value:1.5","stroke]___[value:text.primary","stroke]___[value:brand.base","stroke]___[value:surface.primary","strokeOpacity]___[value:0.12","animation]___[value:spin 1s linear infinite","transformOrigin]___[value:center center","maxWidth]___[value:72","width]___[value:max","backgroundColor]___[value:surface.primary","paddingInline]___[value:3","boxShadow]___[value:0px 4px 20px 0px rgba(0, 0, 0, 0.10)","left]___[value:50%","transform]___[value:translateX(-50%) translateY(calc(-100% - 0.75rem))","width]___[value:72","height]___[value:4","transform]___[value:translateX(-50%) translateY(0.75rem)","width]___[value:1.125rem","height]___[value:1.125rem","objectFit]___[value:cover","borderStartRadius]___[value:input","width]___[value:20","background]___[value:surface.tertiary]___[cond:_hover","borderLeftWidth]___[value:thin","borderRadius]___[value:0","background]___[value:brand.lightest]___[cond:_hover","gap]___[value:4","transform]___[value:rotate(180)","width]___[value:14","height]___[value:14","top]___[value:55","boxShadow]___[value:4px 8px 20px 0px rgba(0, 0, 0, 0.15)","maxHeight]___[value:17.5rem","overflowY]___[value:auto","width]___[value:18","height]___[value:18","minWidth]___[value:0","maxWidth]___[value:30rem","caretColor]___[value:transparent","borderRadius]___[value:0.5rem","marginBlock]___[value:4","maxWidth]___[value:8xl","marginInline]___[value:auto","paddingInline]___[value:6]___[cond:md","paddingInline]___[value:8]___[cond:lg","overlay]___[value:true","gap]___[value:0","marginTop]___[value:8","marginTop]___[value:4","background]___[value:neutral.quaternary","transition]___[value:background-color 0.2s","background]___[value:neutral.secondary]___[cond:_hover","borderRadius]___[value:lg","color]___[value:neutral.primary","borderRadius]___[value:2xl","boxShadow]___[value:0 6px 8px 2px rgba(0, 0, 0, .18)]___[cond:_hover","width]___[value:30","height]___[value:30","alignItems]___[value:flex-end","minHeight]___[value:20","outlineOffset]___[value:1","opacity]___[value:1","borderRadius]___[value:sm","borderColor]___[value:brand.base","borderColor]___[value:text.tertiary","pointerEvents]___[value:auto","outlineColor]___[value:transparent","width]___[value:5","height]___[value:5","borderWidth]___[value:thick","transition]___[value:background-color 0.2s ease, border-color 0.2s ease","cursor]___[value:pointer]___[cond:_hover","borderColor]___[value:brand.base]___[cond:_hover","width]___[value:2.5","height]___[value:0.5","marginLeft]___[value:3","srOnly]___[value:true","height]___[value:16","width]___[value:16","alignItems]___[value:start","borderWidth]___[value:1","maxWidth]___[value:52","gap]___[value:5","gap]___[value:10","transition]___[value:border-color 0.2s ease","width]___[value:6","height]___[value:6","flex]___[value:0 0 auto","width]___[value:3","height]___[value:3","borderRadius]___[value:9999px","padding]___[value:1","background]___[value:ink.10","background]___[value:slate.2]___[cond:_dark","opacity]___[value:0.5","background]___[value:paper","background]___[value:slate.4]___[cond:_dark","boxShadow]___[value:0px 4px 20px 0px {colors.ink.90/10}","transition]___[value:transform 0.2s ease","borderRadius]___[value:inherit","marginLeft]___[value:-1","height]___[value:13","height]___[value:8","transition]___[value:background 0s","transition]___[value:background 0.2s ease","background]___[value:transparent]___[cond:_hover","background]___[value:ink.20]___[cond:_hover","background]___[value:transparent]___[cond:_hover<___>_dark","background]___[value:slate.1]___[cond:_hover<___>_dark","zIndex]___[value:0","marginRight]___[value:1","marginRight]___[value:2","background]___[value:neutral.primary","background]___[value:ink.70]___[cond:_hover","background]___[value:brand.base]___[cond:_hover","background]___[value:slate.4]___[cond:_hover<___>_dark","background]___[value:brand.base]___[cond:_hover<___>_dark","paddingInline]___[value:0.5","width]___[value:11","transition]___[value:background-color 0.2s ease","left]___[value:6","width]___[value:4","transition]___[value:left 0.2s ease","textStyle]___[value:h1-scaled","textStyle]___[value:h1","textStyle]___[value:h2-scaled","textStyle]___[value:h2","textStyle]___[value:h3-scaled","textStyle]___[value:h3","textStyle]___[value:h4-scaled","textStyle]___[value:h4","textStyle]___[value:h5-scaled","textStyle]___[value:h5","textStyle]___[value:h6-scaled","textStyle]___[value:h6","truncate]___[value:false","strokeWidth]___[value:4","width]___[value:36","height]___[value:36","gap]___[value:3","marginBlock]___[value:3","height]___[value:2.625rem","width]___[value:2.625rem","overflowWrap]___[value:break-word","wordBreak]___[value:break-word","fontWeight]___[value:600","boxShadow]___[value:0.125rem 0.125rem 1.5rem {colors.ink.70/15}","borderRadius]___[value:1rem","fill]___[value:ink.50","fill]___[value:ink.70]___[cond:_dark","fill]___[value:url(\"#logo-gradient\")]___[cond:_hover","fill]___[value:url(\"#logo-gradient\")]___[cond:_active","fill]___[value:url(\"#logo-gradient\")]___[cond:_focus","color]___[value:text.tertiary]___[cond:_groupHover","color]___[value:ink.50","color]___[value:ink.70]___[cond:_dark","cursor]___[value:default","justifyContent]___[value:space-around","minWidth]___[value:15rem","width]___[value:40%","borderLeft]___[value:thin solid","borderColor]___[value:neutral.tertiary","backgroundColor]___[value:magic.10","animation]___[value:fadeIn 0.5s, moveRight 1s 0.5s forwards","borderRadius]___[value:50%","borderWidth]___[value:3px","borderColor]___[value:surface.primary","height]___[value:3.875rem","width]___[value:3.875rem","marginTop]___[value:-3px","marginRight]___[value:0.9rem","zIndex]___[value:1","marginLeft]___[value:0.9rem","animation]___[value:fadeIn 0.5s, moveLeft 1s 0.5s forwards","height]___[value:34","width]___[value:34","height]___[value:56","width]___[value:56","color]___[value:positive.darker","color]___[value:text.tertiary","fontVariant]___[value:no-contextual","marginBlock]___[value:10","height]___[value:250","color]___[value:ink.70","gridTemplateColumns]___[value:2","fontWeight]___[value:bold","gap]___[value:8","width]___[value:40","height]___[value:40"],"recipes":{}}}
|
|
@@ -28,10 +28,32 @@ export declare const TextInput: import("react").ForwardRefExoticComponent<AriaTe
|
|
|
28
28
|
} & import("react").RefAttributes<HTMLInputElement>> & {
|
|
29
29
|
TypeIcon: ({ children, ...props }: any) => import("react/jsx-runtime").JSX.Element;
|
|
30
30
|
ActionIcon: ({ children, ...props }: ActionIconProps) => import("react/jsx-runtime").JSX.Element;
|
|
31
|
+
ActionButton: import("react").ForwardRefExoticComponent<import("../primitives").ButtonProps & import("react").RefAttributes<HTMLButtonElement>> & {
|
|
32
|
+
LeadingIcon: ({ children, ...props }: any) => import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
TrailingIcon: ({ children, ...props }: any) => import("react/jsx-runtime").JSX.Element;
|
|
34
|
+
};
|
|
31
35
|
Char: import("react").ForwardRefExoticComponent<AriaTextFieldProps & {
|
|
32
36
|
className?: string | undefined;
|
|
33
37
|
disabled?: boolean | undefined;
|
|
34
38
|
attr?: InputHTMLAttributes<HTMLInputElement> | undefined;
|
|
35
39
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
40
|
+
Prefix: import("react").ForwardRefExoticComponent<import("../primitives/text").BodyProps & import("react").RefAttributes<HTMLParagraphElement>> & {
|
|
41
|
+
H1: import("react").ForwardRefExoticComponent<import("../primitives").TextProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
42
|
+
H2: import("react").ForwardRefExoticComponent<import("../primitives").TextProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
43
|
+
H3: import("react").ForwardRefExoticComponent<import("../primitives").TextProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
44
|
+
H4: import("react").ForwardRefExoticComponent<import("../primitives").TextProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
45
|
+
H5: import("react").ForwardRefExoticComponent<import("../primitives").TextProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
46
|
+
H6: import("react").ForwardRefExoticComponent<import("../primitives").TextProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
47
|
+
Mono: import("react").ForwardRefExoticComponent<import("../primitives/text").BodyProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
48
|
+
};
|
|
49
|
+
Suffix: import("react").ForwardRefExoticComponent<import("../primitives/text").BodyProps & import("react").RefAttributes<HTMLParagraphElement>> & {
|
|
50
|
+
H1: import("react").ForwardRefExoticComponent<import("../primitives").TextProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
51
|
+
H2: import("react").ForwardRefExoticComponent<import("../primitives").TextProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
52
|
+
H3: import("react").ForwardRefExoticComponent<import("../primitives").TextProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
53
|
+
H4: import("react").ForwardRefExoticComponent<import("../primitives").TextProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
54
|
+
H5: import("react").ForwardRefExoticComponent<import("../primitives").TextProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
55
|
+
H6: import("react").ForwardRefExoticComponent<import("../primitives").TextProps & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
56
|
+
Mono: import("react").ForwardRefExoticComponent<import("../primitives/text").BodyProps & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
57
|
+
};
|
|
36
58
|
};
|
|
37
59
|
//# sourceMappingURL=text-input.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/text-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,cAAc,EACd,mBAAmB,EAEnB,SAAS,EAGV,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAWrD,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,kBAAkB,GAAG;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IAC1D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;
|
|
1
|
+
{"version":3,"file":"text-input.d.ts","sourceRoot":"","sources":["../../../../src/components/inputs/text-input.tsx"],"names":[],"mappings":"AAAA,OAAO,EAIL,cAAc,EACd,mBAAmB,EAEnB,SAAS,EAGV,MAAM,OAAO,CAAC;AACf,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAWrD,MAAM,MAAM,cAAc,GAAG,kBAAkB,GAAG;IAChD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;IAC7C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,IAAI,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;IAC1B,SAAS,CAAC,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;CACzC,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG,kBAAkB,GAAG;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,IAAI,CAAC,EAAE,mBAAmB,CAAC,gBAAgB,CAAC,CAAC;CAC9C,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IAC1D,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,CAAC;AA0IF,eAAO,MAAM,SAAS;;;;;eAvJT,SAAS;;;;;yCAyBiC,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqIpE,CAAC"}
|
|
@@ -1,66 +1,69 @@
|
|
|
1
|
-
export declare const textInput: import("../../styled-system/types").SlotRecipeRuntimeFn<"container" | "label" | "
|
|
1
|
+
export declare const textInput: import("../../styled-system/types").SlotRecipeRuntimeFn<"container" | "label" | "inputContainer" | "input" | "description" | "typeIcon" | "actionIcon" | "actionButton", {
|
|
2
2
|
size: {
|
|
3
3
|
sm: {
|
|
4
4
|
input: {
|
|
5
|
-
height: number;
|
|
6
5
|
fontSize: "sm";
|
|
7
|
-
padding: number;
|
|
8
6
|
textAlign: "left";
|
|
9
7
|
};
|
|
8
|
+
inputContainer: {
|
|
9
|
+
height: number;
|
|
10
|
+
p: number;
|
|
11
|
+
};
|
|
10
12
|
};
|
|
11
13
|
md: {
|
|
12
14
|
input: {
|
|
13
|
-
height: number;
|
|
14
15
|
fontSize: "md";
|
|
15
|
-
py: number;
|
|
16
|
-
px: number;
|
|
17
16
|
textAlign: "left";
|
|
18
17
|
};
|
|
18
|
+
inputContainer: {
|
|
19
|
+
height: number;
|
|
20
|
+
p: number;
|
|
21
|
+
};
|
|
19
22
|
};
|
|
20
23
|
lg: {
|
|
21
24
|
input: {
|
|
22
|
-
height: number;
|
|
23
25
|
fontSize: "lg";
|
|
24
|
-
padding: number;
|
|
25
26
|
textAlign: "left";
|
|
26
27
|
};
|
|
28
|
+
inputContainer: {
|
|
29
|
+
height: number;
|
|
30
|
+
padding: number;
|
|
31
|
+
};
|
|
27
32
|
};
|
|
28
33
|
};
|
|
29
34
|
alignText: {
|
|
30
35
|
left: {
|
|
31
|
-
|
|
36
|
+
input: {
|
|
32
37
|
textAlign: "left";
|
|
33
38
|
};
|
|
34
39
|
};
|
|
35
40
|
center: {
|
|
36
|
-
|
|
41
|
+
input: {
|
|
37
42
|
textAlign: "center";
|
|
38
43
|
};
|
|
39
44
|
};
|
|
40
45
|
right: {
|
|
41
|
-
|
|
46
|
+
input: {
|
|
42
47
|
textAlign: "right";
|
|
43
48
|
};
|
|
44
49
|
};
|
|
45
50
|
};
|
|
46
51
|
isError: {
|
|
47
52
|
true: {
|
|
48
|
-
|
|
53
|
+
inputContainer: {
|
|
49
54
|
borderColor: "negative.base";
|
|
50
55
|
};
|
|
51
56
|
};
|
|
52
57
|
};
|
|
53
|
-
|
|
58
|
+
char: {
|
|
54
59
|
true: {
|
|
55
60
|
input: {
|
|
56
|
-
|
|
61
|
+
fontSize: "xl";
|
|
62
|
+
textAlign: "center";
|
|
57
63
|
};
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
true: {
|
|
62
|
-
input: {
|
|
63
|
-
pr: number;
|
|
64
|
+
inputContainer: {
|
|
65
|
+
height: number;
|
|
66
|
+
py: number;
|
|
64
67
|
};
|
|
65
68
|
};
|
|
66
69
|
};
|
|
@@ -70,6 +73,11 @@ export declare const textInput: import("../../styled-system/types").SlotRecipeRu
|
|
|
70
73
|
opacity: number;
|
|
71
74
|
pointerEvents: "none";
|
|
72
75
|
};
|
|
76
|
+
inputContainer: {
|
|
77
|
+
_hover: {
|
|
78
|
+
borderColor: "neutral.secondary";
|
|
79
|
+
};
|
|
80
|
+
};
|
|
73
81
|
};
|
|
74
82
|
};
|
|
75
83
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"text-input.d.ts","sourceRoot":"","sources":["../../../src/recipes/text-input.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS
|
|
1
|
+
{"version":3,"file":"text-input.d.ts","sourceRoot":"","sources":["../../../src/recipes/text-input.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAmJpB,CAAC"}
|