@foxford/ui 2.19.2-beta-e3f3d87-20240304 → 2.20.0-beta-74e0253-20240306
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/components/Anchor/Anchor.js.map +1 -1
- package/components/ArrowBadge/ArrowBadge.js.map +1 -1
- package/components/Badge/Badge.js.map +1 -1
- package/components/Button/Button.js.map +1 -1
- package/components/FormInputLabel/FormInputLabel.js +2 -0
- package/components/FormInputLabel/FormInputLabel.js.map +1 -0
- package/components/FormInputLabel/constants.js +2 -0
- package/components/FormInputLabel/constants.js.map +1 -0
- package/components/FormInputLabel/style.js +2 -0
- package/components/FormInputLabel/style.js.map +1 -0
- package/components/FormLabel/FormLabel.js.map +1 -1
- package/components/Input/Input.js +1 -1
- package/components/Input/Input.js.map +1 -1
- package/components/Input/images/minus.module.svg.js +2 -0
- package/components/Input/images/minus.module.svg.js.map +1 -0
- package/components/Input/images/plus.module.svg.js +2 -0
- package/components/Input/images/plus.module.svg.js.map +1 -0
- package/components/Input/style.js +1 -1
- package/components/Input/style.js.map +1 -1
- package/components/Input.Phone/Input.Phone.js +1 -1
- package/components/Input.Phone/Input.Phone.js.map +1 -1
- package/components/InputCheckbox/InputCheckbox.js.map +1 -1
- package/components/InputRadio/InputRadio.js.map +1 -1
- package/components/Tab/Tab.js.map +1 -1
- package/components/Text/Text.js.map +1 -1
- package/components/Text/style.js +1 -1
- package/components/Text/style.js.map +1 -1
- package/components/Textarea/Textarea.js.map +1 -1
- package/components/Textarea/style.js.map +1 -1
- package/dts/index.d.ts +282 -273
- package/index.cjs.js +1 -1
- package/index.cjs.js.map +1 -1
- package/mixins/create-responsive-props.js +1 -1
- package/mixins/create-responsive-props.js.map +1 -1
- package/package.json +2 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Anchor.js","sources":["../../../../src/components/Anchor/Anchor.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { Link } from 'react-router-dom'\nimport { useTheme } from 'styled-components'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { useClassname } from 'hooks/useClassname'\nimport { Text } from 'components/Text'\nimport { Icon } from 'components/Icon'\nimport type { TextProps } from 'components/Text'\nimport type { IconProps } from 'components/Icon'\nimport { SIZES } from './constants'\nimport * as Styled from './style'\nimport type { AnchorProps } from './types'\n\nconst COMPONENT_NAME = 'Anchor'\n\n/**\n *\n * Component
|
|
1
|
+
{"version":3,"file":"Anchor.js","sources":["../../../../src/components/Anchor/Anchor.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { Link } from 'react-router-dom'\nimport { useTheme } from 'styled-components'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { useClassname } from 'hooks/useClassname'\nimport { Text } from 'components/Text'\nimport { Icon } from 'components/Icon'\nimport type { TextProps } from 'components/Text'\nimport type { IconProps } from 'components/Icon'\nimport { SIZES } from './constants'\nimport * as Styled from './style'\nimport type { AnchorProps } from './types'\n\nconst COMPONENT_NAME = 'Anchor'\n\n/**\n *\n * Component accepts all \\<a\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [AnchorProps](https://github.com/foxford/ui/blob/master/src/components/Anchor/types.ts)\n */\nconst Anchor: React.ForwardRefExoticComponent<AnchorProps> = withMergedProps<AnchorProps, HTMLAnchorElement>(\n forwardRef((props, ref) => {\n const {\n size = 'inherit',\n autoRel = true,\n textProps = {},\n iconProps = {},\n icon,\n children,\n content,\n ...restProps\n } = props\n\n const contentProps = content ? { dangerouslySetInnerHTML: { __html: content } } : {}\n\n const theme = useTheme()\n\n const className = useClassname(COMPONENT_NAME, restProps.className)\n const relBuilder = theme.utils?.relBuilder\n const href = restProps.href ?? restProps.to\n\n const rel =\n restProps.rel ??\n (autoRel && relBuilder && typeof href === 'string' ? relBuilder(href, restProps.target) : undefined)\n\n const [before, after] = Array.isArray(icon) ? icon : [icon]\n\n const baseTextProps: TextProps = {\n as: 'span',\n size: 'inherit',\n color: 'inherit',\n underline: restProps.underline,\n marginLeft: before ? '0.25em' : undefined,\n marginRight: after ? '0.25em' : undefined,\n }\n\n const iconBaseProps: IconProps = { as: 'span', color: 'inherit' }\n\n let rootNode\n if (restProps.to) rootNode = Link\n if (restProps.pseudo) rootNode = 'div'\n if (restProps.disabled) rootNode = 'span'\n if (restProps.as) rootNode = restProps.as\n\n return (\n <Styled.Root\n {...contentProps}\n {...restProps}\n ref={ref}\n as={rootNode}\n className={className}\n size={size}\n rel={rel}\n data-disabled={restProps.disabled}\n >\n {typeof children === 'function' ? (\n children({ baseTextProps, textProps, iconBaseProps, iconProps, icon })\n ) : props.preset === 'brand' ? (\n <>\n {before && <Icon icon={before} {...iconBaseProps} {...iconProps} />}\n <Text {...baseTextProps} {...textProps}>\n {children}\n </Text>\n {after && <Icon icon={after} {...iconBaseProps} {...iconProps} />}\n </>\n ) : (\n children\n )}\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { Anchor, COMPONENT_NAME }\n"],"names":["COMPONENT_NAME","Anchor","withMergedProps","forwardRef","props","ref","_theme$utils","_restProps$href","_restProps$rel","size","autoRel","textProps","iconProps","icon","children","content","restProps","_excluded","contentProps","dangerouslySetInnerHTML","__html","theme","useTheme","className","useClassname","relBuilder","utils","href","to","rel","target","before","after","Array","isArray","baseTextProps","as","color","underline","marginLeft","undefined","marginRight","iconBaseProps","rootNode","Link","pseudo","disabled","_jsx","Styled.Root","preset","_jsxs","_Fragment","Icon","_objectSpread","Text","displayName","sizes","SIZES"],"mappings":"kqBAaMA,IAAAA,EAAiB,SAYjBC,IAAAA,EAAuDC,EAC3DC,GAAW,CAACC,EAAOC,KAAQ,IAAAC,EAAAC,EAAAC,EACzB,IAAMC,KACJA,EAAO,UADHC,QAEJA,KAFIC,UAGJA,EAAY,GAHRC,UAIJA,EAAY,GAJRC,KAKJA,EALIC,SAMJA,EANIC,QAOJA,GAEEX,EAD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ADD,EAAAA,EAAAA,EAAA,GAAUlB,GAAmBxB,GAA7B,GAAA,CAAAG,SACGA,KAEFkB,GAASe,EAACK,EAADC,EAAAA,EAAA,CAAMxC,KAAMmB,GAAWU,GAAmB9B,OAGtDE,QAKR,CACEyC,YApFmB,SAqFnBC,MAAOC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArrowBadge.js","sources":["../../../../src/components/ArrowBadge/ArrowBadge.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Text } from 'components/Text'\nimport type { TextProps } from 'components/Text'\nimport * as Styled from './style'\nimport type { ArrowBadgeProps } from './types'\nimport { SIZES } from './constants'\n\nconst COMPONENT_NAME = 'ArrowBadge'\n\n/**\n *\n * Component
|
|
1
|
+
{"version":3,"file":"ArrowBadge.js","sources":["../../../../src/components/ArrowBadge/ArrowBadge.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Text } from 'components/Text'\nimport type { TextProps } from 'components/Text'\nimport * as Styled from './style'\nimport type { ArrowBadgeProps } from './types'\nimport { SIZES } from './constants'\n\nconst COMPONENT_NAME = 'ArrowBadge'\n\n/**\n *\n * Component accepts all \\<div\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ArrowBadgeProps](https://github.com/foxford/ui/blob/master/src/components/ArrowBadge/types.ts)\n */\nconst ArrowBadge: React.ForwardRefExoticComponent<ArrowBadgeProps> = withMergedProps<ArrowBadgeProps, HTMLDivElement>(\n forwardRef((props, ref) => {\n const { size = 'm', textProps = {}, children, left, right, fancy, ...restProps } = props\n\n const baseTextProps: TextProps = { as: 'div', size: 'inherit', color: 'inherit' }\n\n return (\n <Styled.Root {...restProps} size={size} ref={ref}>\n <Styled.Edge left={left} right={right} fancy={fancy} />\n <Styled.Content>\n {typeof children === 'function' ? (\n children({ baseTextProps, textProps })\n ) : (\n <Text {...baseTextProps} {...textProps}>\n {children}\n </Text>\n )}\n </Styled.Content>\n <Styled.Edge left={left} right={right} fancy={fancy} after />\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { ArrowBadge, COMPONENT_NAME }\n"],"names":["COMPONENT_NAME","ArrowBadge","withMergedProps","forwardRef","props","ref","size","textProps","children","left","right","fancy","restProps","_excluded","baseTextProps","as","color","_jsxs","Styled.Root","_jsx","Styled.Edge","Styled.Content","Text","after","displayName","sizes","SIZES"],"mappings":"2cAQMA,IAAAA,EAAiB,aAYjBC,IAAAA,EAA+DC,EACnEC,GAAW,CAACC,EAAOC,KACjB,IAAMC,KAAEA,EAAO,IAATC,UAAcA,EAAY,GAA1BC,SAA8BA,EAA9BC,KAAwCA,EAAxCC,MAA8CA,EAA9CC,MAAqDA,GAAwBP,EAAdQ,IAAcR,EAAnFS,GAEA,IAAMC,EAA2B,CAAEC,GAAI,MAAOT,KAAM,UAAWU,MAAO,WAEtE,OACEC,EAACC,SAAgBN,GAAjB,GAAA,CAA4BN,KAAMA,EAAMD,IAAKA,EAA7CG,SACE,CAAAW,EAACC,EAAD,CAAaX,KAAMA,EAAMC,MAAOA,EAAOC,MAAOA,IAC9CQ,EAACE,EAAD,CAAAb,SACuB,mBAAbA,EACNA,EAAS,CAAEM,cAAAA,EAAeP,UAAAA,IAE1BY,EAACG,EAASR,EAAAA,EAAAA,EAAAA,GAAAA,GAAmBP,GAA7B,GAAA,CAAAC,SACGA,OAIPW,EAACC,EAAD,CAAaX,KAAMA,EAAMC,MAAOA,EAAOC,MAAOA,EAAOY,OAAK,WAIhE,CACEC,YAnCmB,aAoCnBC,MAAOC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Badge.js","sources":["../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Text } from 'components/Text'\nimport { Icon } from 'components/Icon'\nimport type { TextProps } from 'components/Text'\nimport type { IconProps } from 'components/Icon'\nimport * as Styled from './style'\nimport { SIZES, SIZES_ROUND } from './constants'\nimport type { BadgeProps } from './types'\n\nconst COMPONENT_NAME = 'Badge'\n\n/**\n *\n * Component
|
|
1
|
+
{"version":3,"file":"Badge.js","sources":["../../../../src/components/Badge/Badge.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Text } from 'components/Text'\nimport { Icon } from 'components/Icon'\nimport type { TextProps } from 'components/Text'\nimport type { IconProps } from 'components/Icon'\nimport * as Styled from './style'\nimport { SIZES, SIZES_ROUND } from './constants'\nimport type { BadgeProps } from './types'\n\nconst COMPONENT_NAME = 'Badge'\n\n/**\n *\n * Component accepts all \\<div\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [BadgeProps](https://github.com/foxford/ui/blob/master/src/components/Badge/types.ts)\n */\nexport const Badge: React.ForwardRefExoticComponent<BadgeProps> = withMergedProps<BadgeProps, HTMLDivElement>(\n forwardRef((props, ref) => {\n const {\n size = 's',\n borderRadius = 3,\n textProps = {},\n iconProps = {},\n children,\n content,\n icon,\n ...restProps\n } = props\n\n const [before, after] = Array.isArray(icon) ? icon : [icon]\n\n const baseTextProps: TextProps = {\n as: 'span',\n size: 'inherit',\n color: 'inherit',\n marginLeft: before ? '0.25em' : undefined,\n marginRight: after ? '0.25em' : undefined,\n }\n const iconBaseProps: IconProps = { color: 'inherit' }\n\n return (\n <Styled.Root {...restProps} size={size} borderRadius={borderRadius} ref={ref}>\n {typeof children === 'function' ? (\n children({ baseTextProps, textProps, iconBaseProps, iconProps, icon })\n ) : (\n <>\n {before && <Icon icon={before} {...iconBaseProps} {...iconProps} />}\n {(children || content) && (\n <Text {...baseTextProps} {...textProps}>\n {children || content}\n </Text>\n )}\n {after && <Icon icon={after} {...iconBaseProps} {...iconProps} />}\n </>\n )}\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => (props.round ? SIZES_ROUND : SIZES),\n }\n)\n"],"names":["Badge","withMergedProps","forwardRef","props","ref","size","borderRadius","textProps","iconProps","children","content","icon","restProps","_excluded","before","after","Array","isArray","baseTextProps","as","color","marginLeft","marginRight","iconBaseProps","_jsx","Styled.Root","_jsxs","_Fragment","Icon","_objectSpread","Text","displayName","sizes","round","SIZES_ROUND","SIZES"],"mappings":"wiBAsBO,IAAMA,EAAqDC,EAChEC,GAAAA,CAAYC,EAAOC,KACjB,IAAMC,KACJA,EAAO,IADHC,aAEJA,EAAe,EAFXC,UAGJA,EAAY,GAHRC,UAIJA,EAAY,GAJRC,SAKJA,EALIC,QAMJA,EANIC,KAOJA,GAEER,EADCS,IACDT,EATJU,GAWA,IAAOC,EAAQC,GAASC,MAAMC,QAAQN,GAAQA,EAAO,CAACA,GAEtD,IAAMO,EAA2B,CAC/BC,GAAI,OACJd,KAAM,UACNe,MAAO,UACPC,WAAYP,EAAS,gBACrBQ,YAAaP,EAAQ,cAAA,GAEvB,IAAMQ,EAA2B,CAAEH,MAAO,WAE1C,OACEI,EAACC,SAAgBb,GAAjB,GAAA,CAA4BP,KAAMA,EAAMC,aAAcA,EAAcF,IAAKA,EAAzEK,SACuB,mBAAbA,EACNA,EAAS,CAAES,cAAAA,EAAeX,UAAAA,EAAWgB,cAAAA,EAAef,UAAAA,EAAWG,KAAAA,IAE/De,EAAAC,EAAA,CAAAlB,SACGK,CAAAA,GAAUU,EAACI,EAADC,EAAAA,EAAA,CAAMlB,KAAMG,GAAYS,GAAmBf,KACpDC,GAAYC,IACZc,EAACM,EAASZ,EAAAA,EAAAA,EAAAA,GAAAA,GAAmBX,GAA7B,GAAA,CAAAE,SACGA,GAAYC,KAGhBK,GAASS,EAACI,EAADC,EAAAA,EAAA,CAAMlB,KAAMI,GAAWQ,GAAmBf,aAM9D,CACEuB,YAvDmB,QAwDnBC,MAAQ7B,GAAWA,EAAM8B,MAAQC,EAAcC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { useTheme } from 'styled-components'\nimport { Link } from 'react-router-dom'\nimport { useClassname } from 'hooks/useClassname'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport { Text } from 'components/Text'\nimport type { IconProps } from 'components/Icon'\nimport type { TextProps } from 'components/Text'\nimport { useComputedRel, useComputedLinkProps } from './hooks'\nimport { SIZES, SIZES_ROUND, SIZES_DEFAULT, SIZES_ROUND_DEFAULT, PROPS_BY_SIZE } from './constants'\nimport SuccessIcon from './images/success.module.svg'\nimport type { ButtonProps } from './types'\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Button'\n\n/**\n *\n * Component
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../../src/components/Button/Button.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { useTheme } from 'styled-components'\nimport { Link } from 'react-router-dom'\nimport { useClassname } from 'hooks/useClassname'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Icon } from 'components/Icon'\nimport { Text } from 'components/Text'\nimport type { IconProps } from 'components/Icon'\nimport type { TextProps } from 'components/Text'\nimport { useComputedRel, useComputedLinkProps } from './hooks'\nimport { SIZES, SIZES_ROUND, SIZES_DEFAULT, SIZES_ROUND_DEFAULT, PROPS_BY_SIZE } from './constants'\nimport SuccessIcon from './images/success.module.svg'\nimport type { ButtonProps } from './types'\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Button'\n\n/**\n *\n * Component accepts all \\<button\\> attributes.\n *\n * Responsive \"size\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [ButtonProps](https://github.com/foxford/ui/blob/master/src/components/Button/types.ts)\n */\nconst Button: React.ForwardRefExoticComponent<ButtonProps> = withMergedProps<ButtonProps, HTMLButtonElement>(\n forwardRef((props, ref) => {\n let {\n size = 'm',\n inline = true,\n rounded = true,\n color = 'accent',\n fontColor = 'white',\n textProps = {},\n iconProps = {},\n as: _as,\n className,\n children,\n content,\n fontWeight,\n icon,\n innerRef,\n ...restProps\n } = props\n\n const theme = useTheme()\n\n if (restProps.preset === 'default' && typeof size === 'string' && !restProps.round) {\n const propsBySize = PROPS_BY_SIZE[size] ?? {}\n restProps = { ...propsBySize, ...restProps }\n }\n\n if (restProps.href) _as = 'a'\n if (restProps.to) _as = Link\n\n if (restProps.primary) color = 'primary'\n if (restProps.secondary) color = 'atlantis'\n\n const rootClassName = useClassname(COMPONENT_NAME, className)\n const textClassName = useClassname(COMPONENT_NAME)\n const rel = useComputedRel(theme, restProps)\n const linkProps = useComputedLinkProps(_as, restProps)\n\n let [before, after] = Array.isArray(icon) ? icon : [icon]\n\n if (restProps.success) {\n before = <SuccessIcon />\n after = null\n }\n\n if (restProps.preset === 'brand' && restProps.loading) {\n before = <Styled.LoaderIcon />\n after = null\n }\n\n const baseTextProps: TextProps = {\n as: 'span',\n size: 'inherit',\n color: 'inherit',\n weight: fontWeight ?? (restProps.preset === 'brand' ? 800 : 600),\n lineHeight: restProps.preset === 'brand' ? 1.2 : 1,\n marginLeft: before ? '0.25em' : undefined,\n marginRight: after ? '0.25em' : undefined,\n }\n\n const iconBaseProps: IconProps = { as: 'span', color: 'inherit' }\n\n return (\n <Styled.Root\n {...restProps}\n {...linkProps}\n size={size}\n inline={inline}\n color={color}\n fontColor={fontColor}\n rounded={rounded}\n rel={rel}\n as={_as}\n className={rootClassName}\n ref={ref ?? innerRef}\n >\n {typeof children === 'function' ? (\n children({\n baseTextProps,\n textProps,\n iconBaseProps,\n iconProps,\n icon: [before, after],\n })\n ) : (\n <>\n {before && <Icon className='icon' icon={before} {...iconBaseProps} {...iconProps} />}\n {(content || children) && (\n <Text className={`${textClassName}__content`} {...baseTextProps} {...textProps}>\n {content || children}\n </Text>\n )}\n {after && <Icon className='icon' icon={after} {...iconBaseProps} {...iconProps} />}\n </>\n )}\n </Styled.Root>\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => {\n let sizes = props.preset === 'brand' ? SIZES : SIZES_DEFAULT\n if (props.round) sizes = props.preset === 'brand' ? SIZES_ROUND : SIZES_ROUND_DEFAULT\n\n return sizes\n },\n }\n)\n\nexport { Button, COMPONENT_NAME }\n\nexport type { ButtonProps }\n"],"names":["COMPONENT_NAME","Button","withMergedProps","forwardRef","props","ref","size","inline","rounded","color","fontColor","textProps","iconProps","as","_as","className","children","content","fontWeight","icon","innerRef","restProps","_excluded","theme","useTheme","preset","round","_PROPS_BY_SIZE$size","propsBySize","PROPS_BY_SIZE","href","to","Link","primary","secondary","rootClassName","useClassname","textClassName","rel","useComputedRel","linkProps","useComputedLinkProps","before","after","Array","isArray","success","_jsx","SuccessIcon","loading","Styled.LoaderIcon","baseTextProps","weight","lineHeight","marginLeft","undefined","marginRight","iconBaseProps","Styled.Root","_jsxs","_Fragment","Icon","_objectSpread","Text","displayName","sizes","SIZES","SIZES_DEFAULT","SIZES_ROUND","SIZES_ROUND_DEFAULT"],"mappings":"47BAeMA,IAAAA,EAAiB,SAYjBC,IAAAA,EAAuDC,EAC3DC,IAAYC,EAAOC,KACjB,IAAIC,KACFA,EAAO,IADLC,OAEFA,GAAS,EAFPC,QAGFA,GAAU,EAHRC,MAIFA,EAAQ,SAJNC,UAKFA,EAAY,QALVC,UAMFA,EAAY,GANVC,UAOFA,EAAY,GACZC,GAAIC,EARFC,UASFA,EATEC,SAUFA,EAVEC,QAWFA,EAXEC,WAYFA,EAZEC,KAaFA,EAbEC,SAcFA,GAEEhB,EADCiB,IACDjB,EAhBJkB,GAkBA,IAAMC,EAAQC,IAEd,GAAyB,YAArBH,EAAUI,QAAwC,iBAATnB,IAAsBe,EAAUK,MAAO,CAAA,IAAAC,EAClF,IAAMC,UAAcC,EAAAA,EAAcvB,UAAAA,QAAS,GAC3Ce,EAAiBO,EAAAA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mB7C,KACrEK,GAAWD,IACX+B,EAACgB,EAADD,EAAAA,EAAAA,EAAA,CAAM/C,oBAAcsB,EAAL,cAAmCc,GAAmBxC,GAArE,GAAA,CAAAK,SACGC,GAAWD,KAGf2B,GAASI,EAACc,EAADC,EAAAA,EAAA,CAAM/C,UAAU,OAAOI,KAAMwB,GAAWc,GAAmB7C,aAM/E,CACEoD,YA/GmB,SAgHnBC,MAAQ7D,IACN,IAAI6D,EAAyB,UAAjB7D,EAAMqB,OAAqByC,EAAQC,EAG/C,OAFI/D,EAAMsB,QAAOuC,EAAyB,UAAjB7D,EAAMqB,OAAqB2C,EAAcC,GAE3DJ"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import r from'@babel/runtime/helpers/objectSpread2';import e from'@babel/runtime/helpers/objectWithoutProperties';import{forwardRef as o}from'react';import{Text as i}from'../Text/Text.js';import{Icon as t}from'../Icon/Icon.js';import'../Icon/icons.js';import{Spacer as s}from'../Spacer/Spacer.js';import{withMergedProps as a}from'../../hocs/withMergedProps.js';import{SIZES as n}from'./constants.js';import{Root as p,Label as l,Caption as m}from'./style.js';import{jsxs as c,jsx as h}from'react/jsx-runtime';var f=["size","labelPosition","textProps","iconProps","icon","input","label","text","controls"];var b='FormInputLabel';var d=a(o(((o,a)=>{var{size:n="m",labelPosition:b="dynamic",textProps:d={},iconProps:x={},icon:j,input:P,label:u,text:I,controls:S}=o,g=e(o,f);return c(p,r(r({},g),{},{size:n,labelPosition:b,ref:a,children:[j&&h(s,{display:"flex",marginRight:12,children:h(t,r({as:"span",color:"inherit",icon:j},x))}),c(l,r(r({size:"inherit",color:"inherit"},d),{},{children:[P,u&&h(m,{children:u})]})),I&&h(i,r(r({size:"inherit",color:"inherit",whiteSpace:"nowrap",marginLeft:12},d),{},{children:I})),S&&h(s,{display:"flex",marginLeft:4,children:S})]}))})),{sizes:n,displayName:"FormInputLabel"});export{b as COMPONENT_NAME,d as FormInputLabel};
|
|
2
|
+
//# sourceMappingURL=FormInputLabel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FormInputLabel.js","sources":["../../../../src/components/FormInputLabel/FormInputLabel.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { Text } from 'components/Text'\nimport { Icon } from 'components/Icon'\nimport { Spacer } from 'components/Spacer'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { SIZES } from './constants'\nimport * as Styled from './style'\nimport type { FormInputLabelProps } from './types'\n\nconst COMPONENT_NAME = 'FormInputLabel'\n\nconst FormInputLabel: React.ForwardRefExoticComponent<FormInputLabelProps> = withMergedProps<\n FormInputLabelProps,\n HTMLDivElement\n>(\n forwardRef((props, ref) => {\n const {\n size = 'm',\n labelPosition = 'dynamic',\n textProps = {},\n iconProps = {},\n icon,\n input,\n label,\n text,\n controls,\n ...restProps\n } = props\n\n return (\n <Styled.Root {...restProps} size={size} labelPosition={labelPosition} ref={ref}>\n {icon && (\n <Spacer display='flex' marginRight={12}>\n <Icon as='span' color='inherit' icon={icon} {...iconProps} />\n </Spacer>\n )}\n <Styled.Label size='inherit' color='inherit' {...textProps}>\n {input}\n {label && <Styled.Caption>{label}</Styled.Caption>}\n </Styled.Label>\n {text && (\n <Text size='inherit' color='inherit' whiteSpace='nowrap' marginLeft={12} {...textProps}>\n {text}\n </Text>\n )}\n {controls && (\n <Spacer display='flex' marginLeft={4}>\n {controls}\n </Spacer>\n )}\n </Styled.Root>\n )\n }),\n {\n sizes: SIZES,\n displayName: COMPONENT_NAME,\n }\n)\n\nexport { FormInputLabel, COMPONENT_NAME }\n"],"names":["COMPONENT_NAME","FormInputLabel","withMergedProps","forwardRef","props","ref","size","labelPosition","textProps","iconProps","icon","input","label","text","controls","restProps","_excluded","_jsxs","Styled.Root","children","_jsx","Spacer","display","marginRight","Icon","_objectSpread","as","color","Styled.Label","Styled.Caption","Text","whiteSpace","marginLeft","sizes","SIZES","displayName"],"mappings":"4lBASMA,IAAAA,EAAiB,iBAEjBC,IAAAA,EAAuEC,EAI3EC,GAAAA,CAAYC,EAAOC,KACjB,IAAMC,KACJA,EAAO,IADHC,cAEJA,EAAgB,UAFZC,UAGJA,EAAY,GAHRC,UAIJA,EAAY,GAJRC,KAKJA,EALIC,MAMJA,EANIC,MAOJA,EAPIC,KAQJA,EARIC,SASJA,GAEEV,EADCW,IACDX,EAXJY,GAaA,OACEC,EAACC,SAAgBH,GAAjB,GAAA,CAA4BT,KAAMA,EAAMC,cAAeA,EAAeF,IAAKA,EAA3Ec,SACGT,CAAAA,GACCU,EAACC,EAAD,CAAQC,QAAQ,OAAOC,YAAa,GAApCJ,SACEC,EAACI,EAADC,EAAA,CAAMC,GAAG,OAAOC,MAAM,UAAUjB,KAAMA,GAAUD,MAGpDQ,EAACW,EAADH,EAAAA,EAAA,CAAcnB,KAAK,UAAUqB,MAAM,WAAcnB,GAAjD,GAAA,CAAAW,SAAA,CACGR,EACAC,GAASQ,EAACS,EAAD,CAAAV,SAAiBP,QAE5BC,GACCO,EAACU,EAADL,EAAAA,EAAA,CAAMnB,KAAK,UAAUqB,MAAM,UAAUI,WAAW,SAASC,WAAY,IAAQxB,GAA7E,GAAA,CAAAW,SACGN,KAGJC,GACCM,EAACC,EAAD,CAAQC,QAAQ,OAAOU,WAAY,EAAnCb,SACGL,WAMX,CACEmB,MAAOC,EACPC,YA9CmB"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
var d={xxxl:{fontSize:22,paddingTop:4,paddingRight:16,paddingBottom:4,paddingLeft:16,minHeight:72},xxl:{fontSize:22,paddingTop:4,paddingRight:16,paddingBottom:4,paddingLeft:16,minHeight:72},xl:{fontSize:20,paddingTop:4,paddingRight:16,paddingBottom:4,paddingLeft:16,minHeight:64},l:{fontSize:18,paddingTop:4,paddingRight:16,paddingBottom:4,paddingLeft:16,minHeight:56},m:{fontSize:16,paddingTop:4,paddingRight:16,paddingBottom:4,paddingLeft:16,minHeight:48},s:{fontSize:14,paddingTop:4,paddingRight:14,paddingBottom:4,paddingLeft:14,minHeight:40},xs:{fontSize:12,paddingTop:4,paddingRight:14,paddingBottom:4,paddingLeft:14,minHeight:40},xxs:{fontSize:12,paddingTop:4,paddingRight:14,paddingBottom:4,paddingLeft:14,minHeight:40},xxxs:{fontSize:12,paddingTop:4,paddingRight:14,paddingBottom:4,paddingLeft:14,minHeight:40}};export{d as SIZES};
|
|
2
|
+
//# sourceMappingURL=constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.js","sources":["../../../../src/components/FormInputLabel/constants.ts"],"sourcesContent":["import type { Sizes } from 'shared/types'\n\nexport const SIZES: Sizes = {\n xxxl: {\n fontSize: 22,\n paddingTop: 4,\n paddingRight: 16,\n paddingBottom: 4,\n paddingLeft: 16,\n minHeight: 72,\n },\n xxl: {\n fontSize: 22,\n paddingTop: 4,\n paddingRight: 16,\n paddingBottom: 4,\n paddingLeft: 16,\n minHeight: 72,\n },\n xl: {\n fontSize: 20,\n paddingTop: 4,\n paddingRight: 16,\n paddingBottom: 4,\n paddingLeft: 16,\n minHeight: 64,\n },\n l: {\n fontSize: 18,\n paddingTop: 4,\n paddingRight: 16,\n paddingBottom: 4,\n paddingLeft: 16,\n minHeight: 56,\n },\n m: {\n fontSize: 16,\n paddingTop: 4,\n paddingRight: 16,\n paddingBottom: 4,\n paddingLeft: 16,\n minHeight: 48,\n },\n s: {\n fontSize: 14,\n paddingTop: 4,\n paddingRight: 14,\n paddingBottom: 4,\n paddingLeft: 14,\n minHeight: 40,\n },\n xs: {\n fontSize: 12,\n paddingTop: 4,\n paddingRight: 14,\n paddingBottom: 4,\n paddingLeft: 14,\n minHeight: 40,\n },\n xxs: {\n fontSize: 12,\n paddingTop: 4,\n paddingRight: 14,\n paddingBottom: 4,\n paddingLeft: 14,\n minHeight: 40,\n },\n xxxs: {\n fontSize: 12,\n paddingTop: 4,\n paddingRight: 14,\n paddingBottom: 4,\n paddingLeft: 14,\n minHeight: 40,\n },\n}\n"],"names":["SIZES","xxxl","fontSize","paddingTop","paddingRight","paddingBottom","paddingLeft","minHeight","xxl","xl","l","m","s","xs","xxs","xxxs"],"mappings":"AAEO,IAAMA,EAAe,CAC1BC,KAAM,CACJC,SAAU,GACVC,WAAY,EACZC,aAAc,GACdC,cAAe,EACfC,YAAa,GACbC,UAAW,IAEbC,IAAK,CACHN,SAAU,GACVC,WAAY,EACZC,aAAc,GACdC,cAAe,EACfC,YAAa,GACbC,UAAW,IAEbE,GAAI,CACFP,SAAU,GACVC,WAAY,EACZC,aAAc,GACdC,cAAe,EACfC,YAAa,GACbC,UAAW,IAEbG,EAAG,CACDR,SAAU,GACVC,WAAY,EACZC,aAAc,GACdC,cAAe,EACfC,YAAa,GACbC,UAAW,IAEbI,EAAG,CACDT,SAAU,GACVC,WAAY,EACZC,aAAc,GACdC,cAAe,EACfC,YAAa,GACbC,UAAW,IAEbK,EAAG,CACDV,SAAU,GACVC,WAAY,EACZC,aAAc,GACdC,cAAe,EACfC,YAAa,GACbC,UAAW,IAEbM,GAAI,CACFX,SAAU,GACVC,WAAY,EACZC,aAAc,GACdC,cAAe,EACfC,YAAa,GACbC,UAAW,IAEbO,IAAK,CACHZ,SAAU,GACVC,WAAY,EACZC,aAAc,GACdC,cAAe,EACfC,YAAa,GACbC,UAAW,IAEbQ,KAAM,CACJb,SAAU,GACVC,WAAY,EACZC,aAAc,GACdC,cAAe,EACfC,YAAa,GACbC,UAAW"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import o from'@babel/runtime/helpers/objectSpread2';import r,{css as e}from'styled-components';import n from'tinycolor2';import{Text as t}from'../Text/Text.js';import{createShouldForwardProp as a}from'../../shared/utils/style.js';import{responsiveSize as c}from'../../mixins/responsive-size.js';import{responsiveMargin as l}from'../../mixins/responsive-margin.js';var s=a((o=>!['primary','secondary','active','error','success','disabled','onColored','labelPosition','inline'].includes(o)));var i=r(t).attrs({forwardedAs:'label'}).withConfig({componentId:"fox-ui__sc-1il4atw-0"})(["box-sizing:border-box;position:relative;display:flex;flex-grow:1;align-self:stretch;cursor:inherit;&::after{content:'';position:absolute;bottom:0;right:0;width:40px;height:100%;pointer-events:none;opacity:1;background-image:linear-gradient(90deg,transparent,currentColor);transition-property:color,opacity;}"]);var d=r.span.withConfig({componentId:"fox-ui__sc-1il4atw-1"})(["box-sizing:border-box;position:absolute;left:0;top:50%;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;transition-property:transform;"]);var m=o=>"\n color: ".concat(o.color,";\n background-color: ").concat(o.backgroundColor,";\n border-color: ").concat(o.borderColor,";\n &:hover {\n color: ").concat(o.colorHover,";\n background-color: ").concat(o.backgroundColorHover,";\n border-color: ").concat(o.borderColorHover,";\n }\n & > ").concat(i,"::after {\n color: ").concat(o.backgroundColor,";\n }\n \n");var b={onColored:{disabled:e(["",""],(r=>m(o({color:r.theme.colors['content-disabled'],backgroundColor:r.theme.colors['bg-disabled-large'],borderColor:r.theme.colors.transparent,colorHover:r.theme.colors['content-disabled'],backgroundColorHover:r.theme.colors['bg-disabled-large'],borderColorHover:r.theme.colors.transparent},r.palette)))),error:e(["",""],(r=>m(o({color:r.theme.colors['content-onmain-secondary'],backgroundColor:r.theme.colors['alert-bg-error-200'],borderColor:r.theme.colors['alert-bg-error-500'],colorHover:r.theme.colors['content-onmain-secondary'],backgroundColorHover:r.theme.colors['alert-bg-error-200'],borderColorHover:r.theme.colors['alert-bg-error-500']},r.palette)))),success:e(["",""],(r=>m(o({color:r.theme.colors['content-onmain-secondary'],backgroundColor:r.theme.colors['alert-bg-success-200'],borderColor:r.theme.colors['alert-bg-success-500'],colorHover:r.theme.colors['content-onmain-secondary'],backgroundColorHover:r.theme.colors['alert-bg-success-200'],borderColorHover:r.theme.colors['alert-bg-success-500']},r.palette)))),default:e(["",""],(r=>m(o({color:r.theme.colors['content-onmain-secondary'],backgroundColor:r.theme.colors['bg-onmain-primary'],borderColor:r.theme.colors['border-onmain-default-large'],colorHover:r.theme.colors['content-onmain-secondary'],backgroundColorHover:r.active?r.theme.colors['bg-onmain-primary']:n(r.theme.colors['bg-onmain-primary']).darken(4).toString(),borderColorHover:r.theme.colors['border-onmain-default-large']},r.palette))))},secondary:{disabled:e(["",""],(r=>m(o({color:r.theme.colors['content-disabled'],backgroundColor:r.theme.colors['bg-disabled-large'],borderColor:r.theme.colors.transparent,colorHover:r.theme.colors['content-disabled'],backgroundColorHover:r.theme.colors['bg-disabled-large'],borderColorHover:r.theme.colors.transparent},r.palette)))),error:e(["",""],(r=>m(o({color:r.theme.colors['content-onmain-secondary'],backgroundColor:r.theme.colors['alert-bg-error-100'],borderColor:r.theme.colors['alert-bg-error-500'],colorHover:r.theme.colors['content-onmain-secondary'],backgroundColorHover:r.theme.colors['alert-bg-error-100'],borderColorHover:r.theme.colors['alert-bg-error-500']},r.palette)))),success:e(["",""],(r=>m(o({color:r.theme.colors['content-onmain-secondary'],backgroundColor:r.theme.colors['alert-bg-success-100'],borderColor:r.theme.colors['alert-bg-success-500'],colorHover:r.theme.colors['content-onmain-secondary'],backgroundColorHover:r.theme.colors['alert-bg-success-100'],borderColorHover:r.theme.colors['alert-bg-success-500']},r.palette)))),default:e(["",""],(r=>m(o({color:r.theme.colors['content-onmain-secondary'],backgroundColor:r.theme.colors['bg-onmain-secondary'],borderColor:r.theme.colors['border-onmain-default-large'],colorHover:r.theme.colors['content-onmain-secondary'],backgroundColorHover:r.active?r.theme.colors['bg-onmain-secondary']:n(r.theme.colors['bg-onmain-secondary']).darken(4).toString(),borderColorHover:r.theme.colors['border-onmain-default-large']},r.palette))))},primary:{disabled:e(["",""],(r=>m(o({color:r.theme.colors['content-disabled'],backgroundColor:r.theme.colors['bg-disabled-large'],borderColor:r.theme.colors.transparent,colorHover:r.theme.colors['content-disabled'],backgroundColorHover:r.theme.colors['bg-disabled-large'],borderColorHover:r.theme.colors.transparent},r.palette)))),error:e(["",""],(r=>m(o({color:r.theme.colors['content-onmain-secondary'],backgroundColor:r.theme.colors['alert-bg-error-100'],borderColor:r.theme.colors['alert-bg-error-500'],colorHover:r.theme.colors['content-onmain-secondary'],backgroundColorHover:r.theme.colors['alert-bg-error-100'],borderColorHover:r.theme.colors['alert-bg-error-500']},r.palette)))),success:e(["",""],(r=>m(o({color:r.theme.colors['content-onmain-secondary'],backgroundColor:r.theme.colors['alert-bg-success-100'],borderColor:r.theme.colors['alert-bg-success-500'],colorHover:r.theme.colors['content-onmain-secondary'],backgroundColorHover:r.theme.colors['alert-bg-success-100'],borderColorHover:r.theme.colors['alert-bg-success-500']},r.palette)))),default:e(["",""],(r=>m(o({color:r.theme.colors['content-onmain-secondary'],backgroundColor:r.theme.colors['bg-onmain-primary'],borderColor:r.theme.colors['border-onmain-default-large'],colorHover:r.theme.colors['content-onmain-secondary'],backgroundColorHover:r.active?r.theme.colors['bg-onmain-primary']:n(r.theme.colors['bg-onmain-primary']).darken(4).toString(),borderColorHover:r.theme.colors['border-onmain-default-large']},r.palette))))}};var g=r.div.withConfig({shouldForwardProp:s}).attrs({dynamicSizeDeclaration:(o,r)=>({fontSize:'string'==typeof o?o:"".concat(o).concat(r),padding:'0.25em 1em',minHeight:'3em'})}).withConfig({componentId:"fox-ui__sc-1il4atw-2"})([""," "," "," ",""],(o=>{var r;var e=o.active?'scale(0.7) translateX(-21.5%) translateY(-160%)':'translateY(-50%)';var n='1';var t='auto';return'top'===o.labelPosition&&(e='scale(0.7) translateX(-21.5%) translateY(-160%)'),'center'===o.labelPosition&&(e="translateY(-50%)",n=o.active?'0':'1',t=o.active?'-1':'auto'),"\n box-sizing: border-box;\n position: relative;\n isolation: isolate;\n display: ".concat(o.inline?'inline-flex':'flex',";\n cursor: ").concat((null!==(r=o.cursor)&&void 0!==r?r:o.disabled)?'not-allowed':'pointer',";\n align-items: center;\n min-width: min-content;\n border: 1px solid transparent;\n border-radius: 10px;\n transition-property: background-color;\n\n &,\n & > ").concat(i,"::after,\n & > ").concat(i," > ").concat(d," {\n transition-duration: 150ms;\n transition-timing-function: ease;\n }\n\n & > ").concat(i," > ").concat(d," {\n transform: ").concat(e,";\n opacity: ").concat(n,";\n z-index: ").concat(t,";\n }\n\n &:focus-within {\n box-shadow: 0 0 0 2px ").concat(o.theme.colors.toryBlueDark,", 0 0 0 4px ").concat(o.theme.colors.white,";\n outline: 2px solid transparent;\n outline-offset: 2px;\n }\n\n &:hover > ").concat(i,"::after,\n &:focus-within > ").concat(i,"::after {\n opacity: 0;\n }\n ")}),(o=>{var r=b.primary;return o.secondary&&(r=b.secondary),o.onColored&&(r=b.onColored),o.disabled?r.disabled:o.error?r.error:o.success?r.success:r.default}),c,l);export{d as Caption,i as Label,g as Root};
|
|
2
|
+
//# sourceMappingURL=style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"style.js","sources":["../../../../src/components/FormInputLabel/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport tinycolor from 'tinycolor2'\nimport { Text } from 'components/Text'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport { responsiveSize } from 'mixins/responsive-size'\nimport { responsiveMargin } from 'mixins/responsive-margin'\nimport type { CSSColor } from 'shared/types'\nimport type { StyledFormInputLabelProps, FormInputLabelPalette } from './types'\n\nconst shouldForwardFormInputLabelProp = createShouldForwardProp(\n (propKey) =>\n ![\n 'primary',\n 'secondary',\n 'active',\n 'error',\n 'success',\n 'disabled',\n 'onColored',\n 'labelPosition',\n 'inline',\n ].includes(propKey)\n)\n\nexport const Label = styled(Text).attrs({ forwardedAs: 'label' })`\n box-sizing: border-box;\n position: relative;\n display: flex;\n flex-grow: 1;\n align-self: stretch;\n cursor: inherit;\n &::after {\n content: '';\n position: absolute;\n bottom: 0;\n right: 0;\n width: 40px;\n height: 100%;\n pointer-events: none;\n opacity: 1;\n background-image: linear-gradient(90deg, transparent, currentColor);\n transition-property: color, opacity;\n }\n`\n\nexport const Caption = styled.span`\n box-sizing: border-box;\n position: absolute;\n left: 0;\n top: 50%;\n width: 100%;\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n transition-property: transform;\n`\n\nconst template = (palette: FormInputLabelPalette) => `\n color: ${palette.color};\n background-color: ${palette.backgroundColor};\n border-color: ${palette.borderColor};\n &:hover {\n color: ${palette.colorHover};\n background-color: ${palette.backgroundColorHover};\n border-color: ${palette.borderColorHover};\n }\n & > ${Label}::after {\n color: ${palette.backgroundColor};\n }\n \n`\n\nconst COLOR_SCHEMA = {\n onColored: {\n disabled: css<StyledFormInputLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-disabled'],\n backgroundColor: props.theme.colors['bg-disabled-large'],\n borderColor: props.theme.colors.transparent,\n colorHover: props.theme.colors['content-disabled'],\n backgroundColorHover: props.theme.colors['bg-disabled-large'],\n borderColorHover: props.theme.colors.transparent,\n ...props.palette,\n })}\n `,\n error: css<StyledFormInputLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-secondary'],\n backgroundColor: props.theme.colors['alert-bg-error-200'],\n borderColor: props.theme.colors['alert-bg-error-500'],\n colorHover: props.theme.colors['content-onmain-secondary'],\n backgroundColorHover: props.theme.colors['alert-bg-error-200'],\n borderColorHover: props.theme.colors['alert-bg-error-500'],\n ...props.palette,\n })}\n `,\n success: css<StyledFormInputLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-secondary'],\n backgroundColor: props.theme.colors['alert-bg-success-200'],\n borderColor: props.theme.colors['alert-bg-success-500'],\n colorHover: props.theme.colors['content-onmain-secondary'],\n backgroundColorHover: props.theme.colors['alert-bg-success-200'],\n borderColorHover: props.theme.colors['alert-bg-success-500'],\n ...props.palette,\n })}\n `,\n default: css<StyledFormInputLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-secondary'],\n backgroundColor: props.theme.colors['bg-onmain-primary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-onmain-secondary'],\n backgroundColorHover: props.active\n ? props.theme.colors['bg-onmain-primary']\n : (tinycolor(props.theme.colors['bg-onmain-primary']).darken(4).toString() as CSSColor),\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n },\n secondary: {\n disabled: css<StyledFormInputLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-disabled'],\n backgroundColor: props.theme.colors['bg-disabled-large'],\n borderColor: props.theme.colors.transparent,\n colorHover: props.theme.colors['content-disabled'],\n backgroundColorHover: props.theme.colors['bg-disabled-large'],\n borderColorHover: props.theme.colors.transparent,\n ...props.palette,\n })}\n `,\n error: css<StyledFormInputLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-secondary'],\n backgroundColor: props.theme.colors['alert-bg-error-100'],\n borderColor: props.theme.colors['alert-bg-error-500'],\n colorHover: props.theme.colors['content-onmain-secondary'],\n backgroundColorHover: props.theme.colors['alert-bg-error-100'],\n borderColorHover: props.theme.colors['alert-bg-error-500'],\n ...props.palette,\n })}\n `,\n success: css<StyledFormInputLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-secondary'],\n backgroundColor: props.theme.colors['alert-bg-success-100'],\n borderColor: props.theme.colors['alert-bg-success-500'],\n colorHover: props.theme.colors['content-onmain-secondary'],\n backgroundColorHover: props.theme.colors['alert-bg-success-100'],\n borderColorHover: props.theme.colors['alert-bg-success-500'],\n ...props.palette,\n })}\n `,\n default: css<StyledFormInputLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-secondary'],\n backgroundColor: props.theme.colors['bg-onmain-secondary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-onmain-secondary'],\n backgroundColorHover: props.active\n ? props.theme.colors['bg-onmain-secondary']\n : (tinycolor(props.theme.colors['bg-onmain-secondary']).darken(4).toString() as CSSColor),\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n },\n primary: {\n disabled: css<StyledFormInputLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-disabled'],\n backgroundColor: props.theme.colors['bg-disabled-large'],\n borderColor: props.theme.colors.transparent,\n colorHover: props.theme.colors['content-disabled'],\n backgroundColorHover: props.theme.colors['bg-disabled-large'],\n borderColorHover: props.theme.colors.transparent,\n ...props.palette,\n })}\n `,\n error: css<StyledFormInputLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-secondary'],\n backgroundColor: props.theme.colors['alert-bg-error-100'],\n borderColor: props.theme.colors['alert-bg-error-500'],\n colorHover: props.theme.colors['content-onmain-secondary'],\n backgroundColorHover: props.theme.colors['alert-bg-error-100'],\n borderColorHover: props.theme.colors['alert-bg-error-500'],\n ...props.palette,\n })}\n `,\n success: css<StyledFormInputLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-secondary'],\n backgroundColor: props.theme.colors['alert-bg-success-100'],\n borderColor: props.theme.colors['alert-bg-success-500'],\n colorHover: props.theme.colors['content-onmain-secondary'],\n backgroundColorHover: props.theme.colors['alert-bg-success-100'],\n borderColorHover: props.theme.colors['alert-bg-success-500'],\n ...props.palette,\n })}\n `,\n default: css<StyledFormInputLabelProps>`\n ${(props) =>\n template({\n color: props.theme.colors['content-onmain-secondary'],\n backgroundColor: props.theme.colors['bg-onmain-primary'],\n borderColor: props.theme.colors['border-onmain-default-large'],\n colorHover: props.theme.colors['content-onmain-secondary'],\n backgroundColorHover: props.active\n ? props.theme.colors['bg-onmain-primary']\n : (tinycolor(props.theme.colors['bg-onmain-primary']).darken(4).toString() as CSSColor),\n borderColorHover: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n `,\n },\n}\n\nexport const Root = styled.div\n .withConfig<StyledFormInputLabelProps>({\n shouldForwardProp: shouldForwardFormInputLabelProp,\n })\n .attrs<StyledFormInputLabelProps>(<Required<Pick<StyledFormInputLabelProps, 'dynamicSizeDeclaration'>>>{\n dynamicSizeDeclaration: (size, sizeUnits) => ({\n fontSize: typeof size === 'string' ? size : `${size}${sizeUnits}`,\n padding: '0.25em 1em',\n minHeight: '3em',\n }),\n })`\n ${(props) => {\n let transform = props.active ? 'scale(0.7) translateX(-21.5%) translateY(-160%)' : 'translateY(-50%)'\n let opacity = '1'\n let zIndex = 'auto'\n\n if (props.labelPosition === 'top') {\n transform = 'scale(0.7) translateX(-21.5%) translateY(-160%)'\n }\n if (props.labelPosition === 'center') {\n transform = `translateY(-50%)`\n opacity = props.active ? '0' : '1'\n zIndex = props.active ? '-1' : 'auto'\n }\n\n return `\n box-sizing: border-box;\n position: relative;\n isolation: isolate;\n display: ${props.inline ? 'inline-flex' : 'flex'};\n cursor: ${props.cursor ?? props.disabled ? 'not-allowed' : 'pointer'};\n align-items: center;\n min-width: min-content;\n border: 1px solid transparent;\n border-radius: 10px;\n transition-property: background-color;\n\n &,\n & > ${Label}::after,\n & > ${Label} > ${Caption} {\n transition-duration: 150ms;\n transition-timing-function: ease;\n }\n\n & > ${Label} > ${Caption} {\n transform: ${transform};\n opacity: ${opacity};\n z-index: ${zIndex};\n }\n\n &:focus-within {\n box-shadow: 0 0 0 2px ${props.theme.colors.toryBlueDark}, 0 0 0 4px ${props.theme.colors.white};\n outline: 2px solid transparent;\n outline-offset: 2px;\n }\n\n &:hover > ${Label}::after,\n &:focus-within > ${Label}::after {\n opacity: 0;\n }\n `\n }}\n ${(props) => {\n let schema = COLOR_SCHEMA.primary\n\n if (props.secondary) schema = COLOR_SCHEMA.secondary\n if (props.onColored) schema = COLOR_SCHEMA.onColored\n\n if (props.disabled) return schema.disabled\n if (props.error) return schema.error\n if (props.success) return schema.success\n\n return schema.default\n }}\n\n ${responsiveSize}\n ${responsiveMargin}\n`\n"],"names":["shouldForwardFormInputLabelProp","createShouldForwardProp","propKey","includes","Label","styled","Text","attrs","forwardedAs","withConfig","componentId","Caption","span","template","palette","concat","color","backgroundColor","borderColor","colorHover","backgroundColorHover","borderColorHover","COLOR_SCHEMA","onColored","disabled","css","props","_objectSpread","theme","colors","transparent","error","success","default","active","tinycolor","darken","toString","secondary","primary","Root","div","shouldForwardProp","dynamicSizeDeclaration","size","sizeUnits","fontSize","padding","minHeight","_props$cursor","transform","opacity","zIndex","labelPosition","inline","cursor","toryBlueDark","white","schema","responsiveSize","responsiveMargin"],"mappings":"4WASA,IAAMA,EAAkCC,GACrCC,IACE,CACC,UACA,YACA,SACA,QACA,UACA,WACA,YACA,gBACA,UACAC,SAASD,KAGR,IAAME,EAAQC,EAAOC,GAAMC,MAAM,CAAEC,YAAa,UAArCC,WAAA,CAAAC,YAAA,wBAAGL,CAAd,CAAA,wTAqBMM,IAAAA,EAAUN,EAAOO,KAAVH,WAAA,CAAAC,YAAA,wBAAGL,CAAhB,CAAA,+JAYP,IAAMQ,EAAYC,GAAD,cAAAC,OACND,EAAQE,MACGF,2BAAAA,OAAAA,EAAQG,gBACZH,uBAAAA,OAAAA,EAAQI,YAHT,+BAAAH,OAKJD,EAAQK,WALJ,6BAAAJ,OAMOD,EAAQM,qBACZN,yBAAAA,OAAAA,EAAQO,0CAEpBjB,EATS,0BAAAW,OAUJD,EAAQG,gBAVrB,eAeA,IAAMK,EAAe,CACnBC,UAAW,CACTC,SAAUC,EACLC,CAAAA,GAAAA,KAAAA,GACDb,EAAQc,EAAA,CACNX,MAAOU,EAAME,MAAMC,OAAO,oBAC1BZ,gBAAiBS,EAAME,MAAMC,OAAO,qBACpCX,YAAaQ,EAAME,MAAMC,OAAOC,YAChCX,WAAYO,EAAME,MAAMC,OAAO,oBAC/BT,qBAAsBM,EAAME,MAAMC,OAAO,qBACzCR,iBAAkBK,EAAME,MAAMC,OAAOC,aAClCJ,EAAMZ,YAGfiB,MAAON,EACFC,CAAAA,GAAAA,KAAAA,GACDb,EAAQc,EAAA,CACNX,MAAOU,EAAME,MAAMC,OAAO,4BAC1BZ,gBAAiBS,EAAME,MAAMC,OAAO,sBACpCX,YAAaQ,EAAME,MAAMC,OAAO,sBAChCV,WAAYO,EAAME,MAAMC,OAAO,4BAC/BT,qBAAsBM,EAAME,MAAMC,OAAO,sBACzCR,iBAAkBK,EAAME,MAAMC,OAA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2B,gBACRH,EAAA,mBACAC,EAAUzB,EAAMQ,OAAS,IAAM,IAC/BkB,EAAS1B,EAAMQ,OAAS,KAAO,QAOpBR,yGAAAA,OAAAA,EAAM4B,OAAS,cAAgB,OAJ5C,qBAAAvC,gBAKYW,EAAAA,EAAM6B,cAAAA,QAAU7B,EAAMF,UAAW,cAAgB,UAL7D,wMAAAT,OAaQX,EAbR,wBAAAW,OAcQX,EAdR,OAAAW,OAcmBJ,EAdnB,6GAAAI,OAmBQX,EAAWO,OAAAA,OAAAA,EACFuC,2BAAAA,OAAAA,EACFC,wBAAAA,OAAAA,EACAC,wBAAAA,OAAAA,EAIa1B,wEAAAA,OAAAA,EAAME,MAAMC,OAAO2B,aA1B/C,gBAAAzC,OA0B0EW,EAAME,MAAMC,OAAO4B,MA1B7F,yGAAA1C,OA+BcX,EA/Bd,qCAAAW,OAgCqBX,EAhCrB,oDAqCCsB,IACD,IAAIgC,EAASpC,EAAaiB,QAK1B,OAHIb,EAAMY,YAAWoB,EAASpC,EAAagB,WACvCZ,EAAMH,YAAWmC,EAASpC,EAAaC,WAEvCG,EAAMF,SAAiBkC,EAAOlC,SAC9BE,EAAMK,MAAc2B,EAAO3B,MAC3BL,EAAMM,QAAgB0B,EAAO1B,QAE1B0B,EAAOzB,UAGd0B,EACAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormLabel.js","sources":["../../../../src/components/FormLabel/FormLabel.tsx"],"sourcesContent":["import { forwardRef, cloneElement } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Text } from 'components/Text'\nimport * as Styled from './style'\nimport { SIZES } from './constants'\nimport type { FormLabelProps } from './types'\n\nconst COMPONENT_NAME = 'FormLabel'\n\n/**\n *\n * Component
|
|
1
|
+
{"version":3,"file":"FormLabel.js","sources":["../../../../src/components/FormLabel/FormLabel.tsx"],"sourcesContent":["import { forwardRef, cloneElement } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { Text } from 'components/Text'\nimport * as Styled from './style'\nimport { SIZES } from './constants'\nimport type { FormLabelProps } from './types'\n\nconst COMPONENT_NAME = 'FormLabel'\n\n/**\n *\n * Component accepts all \\<label\\> attributes.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to root node.\n *\n * See full [FormLabelProps](https://github.com/foxford/ui/blob/master/src/components/FormLabel/types.ts)\n */\nconst FormLabel: React.ForwardRefExoticComponent<FormLabelProps> = withMergedProps<FormLabelProps, HTMLLabelElement>(\n forwardRef(\n (\n {\n size = 'm',\n textProps = {},\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n disabled,\n error,\n success,\n checked,\n onColored,\n cursor,\n children,\n control,\n label,\n ...props\n },\n ref\n ) => {\n const sizeProps = {\n size,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n }\n\n const stateProps = {\n disabled,\n error,\n success,\n checked,\n onColored,\n }\n\n const elementProps =\n typeof control === 'object' && typeof control.props === 'object' && control.props !== null ? control.props : {}\n\n return (\n <Styled.Root {...props} {...sizeProps} {...stateProps} cursor={cursor} ref={ref}>\n {typeof control === 'function'\n ? control({\n cursor,\n ...sizeProps,\n ...stateProps,\n })\n : cloneElement(control, {\n cursor,\n ...sizeProps,\n ...stateProps,\n ...elementProps,\n })}\n <Text as='span' appearance='body' size='inherit' color='inherit' marginLeft={8} {...textProps}>\n {label ?? children}\n </Text>\n </Styled.Root>\n )\n }\n ),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { FormLabel, COMPONENT_NAME }\n"],"names":["COMPONENT_NAME","FormLabel","withMergedProps","forwardRef","_ref","ref","size","textProps","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","disabled","error","success","checked","onColored","cursor","children","control","label","props","_objectWithoutProperties","_excluded","sizeProps","stateProps","elementProps","_jsxs","Styled.Root","_objectSpread","cloneElement","_jsx","Text","as","appearance","color","marginLeft","displayName","sizes","SIZES"],"mappings":"ijBAOMA,IAAAA,EAAiB,YAYjBC,IAAAA,EAA6DC,EACjEC,GACE,CAAAC,EAqBEC,KACG,IArBHC,KACEA,EAAO,IADTC,UAEEA,EAAY,GAFdC,QAGEA,EAHFC,OAIEA,EAJFC,MAKEA,EALFC,MAMEA,EANFC,MAOEA,EAPFC,OAQEA,EARFC,SASEA,EATFC,MAUEA,EAVFC,QAWEA,EAXFC,QAYEA,EAZFC,UAaEA,EAbFC,OAcEA,EAdFC,SAeEA,EAfFC,QAgBEA,EAhBFC,MAiBEA,GAIClB,EAHEmB,EAGFC,EAAApB,EAAAqB,GACH,IAAMC,EAAY,CAChBpB,KAAAA,EACAE,QAAAA,EACAC,OAAAA,EACAC,MAAAA,EACAC,MAAAA,EACAC,MAAAA,EACAC,OAAAA,GAGF,IAAMc,EAAa,CACjBb,SAAAA,EACAC,MAAAA,EACAC,QAAAA,EACAC,QAAAA,EACAC,UAAAA,GAGF,IAAMU,EACe,iBAAZP,GAAiD,iBAAlBA,EAAQE,OAAwC,OAAlBF,EAAQE,MAAiBF,EAAQE,MAAQ,GAE/G,OACEM,EAACC,aAAgBP,GAAWG,GAAeC,GAA3C,GAAA,CAAuDR,OAAQA,EAAQd,IAAKA,EAA5Ee,SAAA,CACsB,mBAAZC,EACJA,EAAOU,EAAAA,EAAA,CACLZ,OAAAA,GACGO,GACAC,IAELK,EAAaX,EAADU,EAAAA,EAAAA,EAAA,CACVZ,OAAAA,GACGO,GACAC,GACAC,IAETK,EAACC,EAADH,EAAAA,EAAA,CAAMI,GAAG,OAAOC,WAAW,OAAO9B,KAAK,UAAU+B,MAAM,UAAUC,WAAY,GAAO/B,GAApF,GAAA,CAAAa,SACGE,MAAAA,EAAAA,EAASF,YAMpB,CACEmB,YAhFmB,YAiFnBC,MAAOC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import r from'@babel/runtime/helpers/objectSpread2';import i from'@babel/runtime/helpers/objectWithoutProperties';import{forwardRef as t,useRef as n,useImperativeHandle as e,useState as a}from'react';import{useTheme as o}from'styled-components';import{withMergedProps as m}from'../../hocs/withMergedProps.js';import{FormInputLabel as s}from'../FormInputLabel/FormInputLabel.js';import{SIZES as g}from'../FormInputLabel/constants.js';import{Icon as l}from'../Icon/Icon.js';import'../Icon/icons.js';import{InputPhone as p}from'../Input.Phone/Input.Phone.js';import{Spacer as c}from'../Spacer/Spacer.js';import u from'./images/minus.module.svg.js';import d from'./images/plus.module.svg.js';import{Root as X,Input as S,InputControl as h}from'./style.js';import{jsx as L,jsxs as f,Fragment as b}from'react/jsx-runtime';var v=["size","mask","rounded","color","placeholderColor","width","type","labelPosition","textProps","iconProps","controls","preset","className","style","cursor","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","sizeUnits","sizes","margin","marginXXS","marginXS","marginS","marginM","marginL","marginXL","marginTop","marginTopXXS","marginTopXS","marginTopS","marginTopM","marginTopL","marginTopXL","marginRight","marginRightXXS","marginRightXS","marginRightS","marginRightM","marginRightL","marginRightXL","marginBottom","marginBottomXXS","marginBottomXS","marginBottomS","marginBottomM","marginBottomL","marginBottomXL","marginLeft","marginLeftXXS","marginLeftXS","marginLeftS","marginLeftM","marginLeftL","marginLeftXL","marginUnits","palette","widthXXS","widthXS","widthS","widthM","widthL","widthXL","error","success","label","icon","text","primary","secondary","onColored","fluid","disabled","inline","inputRef"];var y='Input';var z=Object.assign(m(t(((t,m)=>{var g,p,y,z;var R=o();var{size:w="m",mask:B="",rounded:T=!0,color:P="mineShaft",placeholderColor:M="silver",width:C=R.defaultInputControlsWidth,type:I="text",labelPosition:j="dynamic",textProps:k={},iconProps:x={},controls:N={},preset:A,className:E,style:U,cursor:F,sizeXXS:O,sizeXS:V,sizeS:W,sizeM:D,sizeL:H,sizeXL:Z,sizeUnits:_,sizes:q,margin:G,marginXXS:J,marginXS:K,marginS:Q,marginM:Y,marginL:$,marginXL:rr,marginTop:ir,marginTopXXS:tr,marginTopXS:nr,marginTopS:er,marginTopM:ar,marginTopL:or,marginTopXL:mr,marginRight:sr,marginRightXXS:gr,marginRightXS:lr,marginRightS:pr,marginRightM:cr,marginRightL:ur,marginRightXL:dr,marginBottom:Xr,marginBottomXXS:Sr,marginBottomXS:hr,marginBottomS:Lr,marginBottomM:fr,marginBottomL:br,marginBottomXL:vr,marginLeft:yr,marginLeftXXS:zr,marginLeftXS:Rr,marginLeftS:wr,marginLeftM:Br,marginLeftL:Tr,marginLeftXL:Pr,marginUnits:Mr,palette:Cr,widthXXS:Ir,widthXS:jr,widthS:kr,widthM:xr,widthL:Nr,widthXL:Ar,error:Er,success:Ur,label:Fr,icon:Or,text:Vr,primary:Wr,secondary:Dr,onColored:Hr,fluid:Zr,disabled:_r,inline:qr,inputRef:Gr}=t,Jr=i(t,v);var{icon:Kr,iconProps:Qr={},buttonProps:Yr={}}=null!==(g=N.additional)&&void 0!==g?g:{};var{icon:$r,iconProps:ri={},buttonProps:ii=[]}=null!==(p=N.number)&&void 0!==p?p:{};var[ti,ni]=Array.isArray($r)?$r:[$r];var ei=null!==(y=Array.isArray(ii)?ii[0]:ii)&&void 0!==y?y:{};var ai=null!==(z=Array.isArray(ii)?ii[1]:{})&&void 0!==z?z:{};var oi=n(null);e(m,(()=>oi.current),[]);var mi='string'==typeof t.value||'number'==typeof t.value||'string'==typeof t.defaultValue||'number'==typeof t.defaultValue;var[si,gi]=a(mi);var[li,pi]=a(mi);return'brand'!==A?L(X,r(r({},Jr),{},{inputRef:null!=Gr?Gr:r=>{oi.current=r},className:E,style:U,size:'number'==typeof w?w:void 0,mask:B,rounded:T,color:P,placeholderColor:M,width:C,widthXXS:Ir,widthXS:jr,widthS:kr,widthM:xr,widthL:Nr,widthXL:Ar,error:Er,type:I,fluid:Zr,disabled:_r})):L(s,{className:E,style:U,cursor:F,size:w,sizeXXS:O,sizeXS:V,sizeS:W,sizeM:D,sizeL:H,sizeXL:Z,sizeUnits:_,sizes:q,margin:G,marginXXS:J,marginXS:K,marginS:Q,marginM:Y,marginL:$,marginXL:rr,marginTop:ir,marginTopXXS:tr,marginTopXS:nr,marginTopS:er,marginTopM:ar,marginTopL:or,marginTopXL:mr,marginRight:sr,marginRightXXS:gr,marginRightXS:lr,marginRightS:pr,marginRightM:cr,marginRightL:ur,marginRightXL:dr,marginBottom:Xr,marginBottomXXS:Sr,marginBottomXS:hr,marginBottomS:Lr,marginBottomM:fr,marginBottomL:br,marginBottomXL:vr,marginLeft:yr,marginLeftXXS:zr,marginLeftXS:Rr,marginLeftS:wr,marginLeftM:Br,marginLeftL:Tr,marginLeftXL:Pr,marginUnits:Mr,palette:Cr,error:Er,success:Ur,label:Fr,labelPosition:j,icon:Or,text:Vr,primary:Wr,secondary:Dr,onColored:Hr,disabled:_r,inline:qr,active:si,textProps:k,iconProps:r({size:24,color:_r?'content-disabled':'content-onmain-tertiary'},x),onClick:()=>{oi.current&&oi.current.focus()},onFocus:r=>{r.target!==r.currentTarget&&gi(!0)},onBlur:r=>{r.target===r.currentTarget||li||gi(!1)},input:L(S,r(r({},Jr),{},{inputRef:r=>{oi.current=r},mask:B,palette:Cr,type:I,label:Fr,labelPosition:j,disabled:_r,active:si,cursor:F,onBlur:r=>{r.stopPropagation(),Jr.onBlur&&Jr.onBlur(r),pi(Boolean(r.currentTarget.value)),gi(Boolean(r.currentTarget.value))}})),controls:Kr||'number'===I?f(b,{children:[Kr&&L(h,r(r({},Yr),{},{type:"button",palette:Cr,disabled:_r,onClick:r=>{r.stopPropagation(),Yr.onClick&&Yr.onClick(r)},children:L(l,r({icon:Kr,as:"span",size:24,color:"inherit"},Qr))})),'number'===I&&f(c,{display:"flex",marginLeft:4,children:[L(h,r(r({},ei),{},{type:"button",palette:Cr,disabled:_r,onClick:r=>{r.stopPropagation(),ei.onClick&&ei.onClick(r);try{if(oi.current){var i=oi.current.value;if(oi.current.stepDown(),i!==oi.current.value){var t=new Event('input',{bubbles:!0});oi.current.dispatchEvent(t)}}}catch(r){console.error(r)}},children:L(l,r({icon:null!=ti?ti:L(u,{}),as:"span",size:24,color:"inherit"},ri))})),L(h,r(r({},ai),{},{type:"button",palette:Cr,disabled:_r,onClick:r=>{r.stopPropagation(),ai.onClick&&ai.onClick(r);try{if(oi.current){var i=oi.current.value;if(oi.current.stepUp(),i!==oi.current.value){var t=new Event('input',{bubbles:!0});oi.current.dispatchEvent(t)}}}catch(r){console.error(r)}},children:L(l,r({icon:null!=ni?ni:L(d,{}),as:"span",size:24,color:"inherit"},ri))}))]})]}):void 0})})),{sizes:g,displayName:"Input"}),{Phone:p});export{y as COMPONENT_NAME,z as Input};
|
|
2
2
|
//# sourceMappingURL=Input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sources":["../../../../src/components/Input/Input.tsx"],"sourcesContent":["import { InputState, MaskOptions } from 'react-input-mask'\nimport { useTheme } from 'styled-components'\nimport { BaseProps, InputField } from 'shared/interfaces'\nimport { InputPhone } from 'components/Input.Phone'\nimport * as Styled from './style'\n\ntype InputHTMLAttributes = Omit<React.InputHTMLAttributes<HTMLInputElement>, 'color' | 'width'>\n\nexport interface InputProps extends BaseProps, InputField, InputHTMLAttributes {\n /**\n * Mask string. Format characters are:\n * * `9`: `0-9`\n * * `a`: `A-Z, a-z`\n * * `\\*`: `A-Z, a-z, 0-9`\n *\n * Any character can be escaped with backslash, which usually will appear as double backslash in JS strings.\n * For example, German phone mask with unremoveable prefix +49 will look like `mask=\"+4\\\\9 99 999 99\"` or `mask={\"+4\\\\\\\\9 99 999 99\"}`\n */\n mask?: string | Array<string | RegExp>\n /**\n * Character to cover unfilled editable parts of mask. Default character is \"_\". If set to null, unfilled parts will be empty, like in ordinary input.\n */\n maskChar?: string | null\n /**\n * Defines format characters with characters as keys and corresponding RegExp string as values. Default ones:\n * ```\n * {\n * \"9\": \"[0-9]\",\n * \"a\": \"[A-Za-z]\",\n * \"*\": \"[A-Za-z0-9]\"\n * }```\n */\n formatChars?: { [key: string]: string }\n /**\n * Show mask even in empty input without focus.\n */\n alwaysShowMask?: boolean\n /**\n * Use inputRef instead of ref if you need input node to manage focus, selection, etc.\n */\n inputRef?: React.Ref<HTMLInputElement>\n\n /**\n * In case you need to implement more complex masking behavior, you can provide\n * beforeMaskedValueChange function to change masked value and cursor position\n * before it will be applied to the input.\n */\n beforeMaskedValueChange?(\n _newState: InputState,\n _oldState: InputState,\n _userInput: string,\n _maskOptions: MaskOptions\n ): InputState\n /**\n * Input type\n */\n type?: string\n dataset?: Record<string, string>\n}\n\nInput.defaultProps = {\n rounded: true,\n type: 'text',\n color: 'mineShaft',\n mask: '',\n placeholderColor: 'silver',\n}\n\nInput.Phone = InputPhone\nInput.displayName = 'Input'\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`InputField`](#/Миксины)\n * - `React.InputHTMLAttributes<HTMLInputElement>`\n */\nexport function Input(props: InputProps) {\n const theme = useTheme()\n\n const { width = theme.defaultInputControlsWidth } = props\n\n return <Styled.Root {...props} width={width} mask={props.mask || ''} />\n}\n"],"names":["Input","props","theme","useTheme","width","defaultInputControlsWidth","_jsx","Styled.Root","mask","defaultProps","rounded","type","color","placeholderColor","Phone","InputPhone","displayName"],"mappings":"sOA4EO,SAASA,EAAMC,GACpB,IAAMC,EAAQC,IAEd,IAAMC,MAAEA,EAAQF,EAAMG,2BAA8BJ,EAEpD,OAAOK,EAACC,SAAgBN,GAAjB,GAAA,CAAwBG,MAAOA,EAAOI,KAAMP,EAAMO,MAAQ,MArBnER,EAAMS,aAAe,CACnBC,SAAS,EACTC,KAAM,OACNC,MAAO,YACPJ,KAAM,GACNK,iBAAkB,UAGpBb,EAAMc,MAAQC,EACdf,EAAMgB,YAAc"}
|
|
1
|
+
{"version":3,"file":"Input.js","sources":["../../../../src/components/Input/Input.tsx"],"sourcesContent":["import { forwardRef, useState, useImperativeHandle, useRef } from 'react'\nimport { useTheme } from 'styled-components'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { FormInputLabel, SIZES } from 'components/FormInputLabel'\nimport { Icon } from 'components/Icon'\nimport { InputPhone } from 'components/Input.Phone'\nimport { Spacer } from 'components/Spacer'\nimport Minus from './images/minus.module.svg'\nimport Plus from './images/plus.module.svg'\nimport * as Styled from './style'\nimport type { InputProps } from './types'\n\nconst COMPONENT_NAME = 'Input'\n\n/**\n *\n * Component accepts all \\<input\\> attributes and \"react-input-mask\" props.\n *\n * Responsive \"size\", \"margin\" props are supported.\n *\n * Exposed \"ref\" attached to \\<input\\>.\n *\n * See full [InputProps](https://github.com/foxford/ui/blob/master/src/components/Input/types.ts)\n */\nconst Input: React.ForwardRefExoticComponent<InputProps> & { Phone: typeof InputPhone } = Object.assign(\n withMergedProps<InputProps, HTMLInputElement>(\n forwardRef((props, forwardedRef) => {\n const theme = useTheme()\n\n const {\n size = 'm',\n mask = '',\n rounded = true,\n color = 'mineShaft',\n placeholderColor = 'silver',\n width = theme.defaultInputControlsWidth,\n type = 'text',\n labelPosition = 'dynamic',\n textProps = {},\n iconProps = {},\n controls = {},\n preset,\n className,\n style,\n cursor,\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n sizeUnits,\n sizes,\n margin,\n marginXXS,\n marginXS,\n marginS,\n marginM,\n marginL,\n marginXL,\n marginTop,\n marginTopXXS,\n marginTopXS,\n marginTopS,\n marginTopM,\n marginTopL,\n marginTopXL,\n marginRight,\n marginRightXXS,\n marginRightXS,\n marginRightS,\n marginRightM,\n marginRightL,\n marginRightXL,\n marginBottom,\n marginBottomXXS,\n marginBottomXS,\n marginBottomS,\n marginBottomM,\n marginBottomL,\n marginBottomXL,\n marginLeft,\n marginLeftXXS,\n marginLeftXS,\n marginLeftS,\n marginLeftM,\n marginLeftL,\n marginLeftXL,\n marginUnits,\n palette,\n widthXXS,\n widthXS,\n widthS,\n widthM,\n widthL,\n widthXL,\n error,\n success,\n label,\n icon,\n text,\n primary,\n secondary,\n onColored,\n fluid,\n disabled,\n inline,\n inputRef,\n ...inputProps\n } = props\n\n const {\n icon: additionalControlIcon,\n iconProps: additionalControlIconProps = {},\n buttonProps: additionalControlButtonProps = {},\n } = controls.additional ?? {}\n\n const {\n icon: numberControlIcon,\n iconProps: numberControlIconProps = {},\n buttonProps: numberControlButtonProps = [],\n } = controls.number ?? {}\n\n const [minus, plus] = Array.isArray(numberControlIcon) ? numberControlIcon : [numberControlIcon]\n\n const minusButtonProps =\n (Array.isArray(numberControlButtonProps) ? numberControlButtonProps[0] : numberControlButtonProps) ?? {}\n\n const plusButtonProps = (Array.isArray(numberControlButtonProps) ? numberControlButtonProps[1] : {}) ?? {}\n\n const ref = useRef<HTMLInputElement | null>(null)\n useImperativeHandle<HTMLInputElement | null, HTMLInputElement | null>(forwardedRef, () => ref.current, [])\n\n const hasInitValue =\n typeof props.value === 'string' ||\n typeof props.value === 'number' ||\n typeof props.defaultValue === 'string' ||\n typeof props.defaultValue === 'number'\n\n const [active, setActive] = useState(hasInitValue)\n const [hasValue, setHasValue] = useState(hasInitValue)\n\n if (preset !== 'brand') {\n return (\n <Styled.Root\n {...inputProps}\n inputRef={\n inputRef ??\n ((input) => {\n ref.current = input\n })\n }\n className={className}\n style={style}\n size={typeof size === 'number' ? size : undefined}\n mask={mask}\n rounded={rounded}\n color={color}\n placeholderColor={placeholderColor}\n width={width}\n widthXXS={widthXXS}\n widthXS={widthXS}\n widthS={widthS}\n widthM={widthM}\n widthL={widthL}\n widthXL={widthXL}\n error={error}\n type={type}\n fluid={fluid}\n disabled={disabled}\n />\n )\n }\n\n return (\n <FormInputLabel\n className={className}\n style={style}\n cursor={cursor}\n size={size}\n sizeXXS={sizeXXS}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n sizeUnits={sizeUnits}\n sizes={sizes}\n margin={margin}\n marginXXS={marginXXS}\n marginXS={marginXS}\n marginS={marginS}\n marginM={marginM}\n marginL={marginL}\n marginXL={marginXL}\n marginTop={marginTop}\n marginTopXXS={marginTopXXS}\n marginTopXS={marginTopXS}\n marginTopS={marginTopS}\n marginTopM={marginTopM}\n marginTopL={marginTopL}\n marginTopXL={marginTopXL}\n marginRight={marginRight}\n marginRightXXS={marginRightXXS}\n marginRightXS={marginRightXS}\n marginRightS={marginRightS}\n marginRightM={marginRightM}\n marginRightL={marginRightL}\n marginRightXL={marginRightXL}\n marginBottom={marginBottom}\n marginBottomXXS={marginBottomXXS}\n marginBottomXS={marginBottomXS}\n marginBottomS={marginBottomS}\n marginBottomM={marginBottomM}\n marginBottomL={marginBottomL}\n marginBottomXL={marginBottomXL}\n marginLeft={marginLeft}\n marginLeftXXS={marginLeftXXS}\n marginLeftXS={marginLeftXS}\n marginLeftS={marginLeftS}\n marginLeftM={marginLeftM}\n marginLeftL={marginLeftL}\n marginLeftXL={marginLeftXL}\n marginUnits={marginUnits}\n palette={palette}\n error={error}\n success={success}\n label={label}\n labelPosition={labelPosition}\n icon={icon}\n text={text}\n primary={primary}\n secondary={secondary}\n onColored={onColored}\n disabled={disabled}\n inline={inline}\n active={active}\n textProps={textProps}\n iconProps={{\n size: 24,\n color: disabled ? 'content-disabled' : 'content-onmain-tertiary',\n ...iconProps,\n }}\n onClick={() => {\n if (ref.current) {\n ref.current.focus()\n }\n }}\n onFocus={(evt) => {\n if (evt.target !== evt.currentTarget) {\n setActive(true)\n }\n }}\n onBlur={(evt) => {\n if (evt.target !== evt.currentTarget && !hasValue) {\n setActive(false)\n }\n }}\n input={\n <Styled.Input\n {...inputProps}\n inputRef={(input) => {\n ref.current = input\n }}\n mask={mask}\n palette={palette}\n type={type}\n label={label}\n labelPosition={labelPosition}\n disabled={disabled}\n active={active}\n cursor={cursor}\n onBlur={(evt) => {\n evt.stopPropagation()\n if (inputProps.onBlur) {\n inputProps.onBlur(evt)\n }\n\n setHasValue(Boolean(evt.currentTarget.value))\n setActive(Boolean(evt.currentTarget.value))\n }}\n />\n }\n controls={\n additionalControlIcon || type === 'number' ? (\n <>\n {additionalControlIcon && (\n <Styled.InputControl\n {...additionalControlButtonProps}\n type='button'\n palette={palette}\n disabled={disabled}\n onClick={(evt) => {\n evt.stopPropagation()\n if (additionalControlButtonProps.onClick) {\n additionalControlButtonProps.onClick(evt)\n }\n }}\n >\n <Icon\n icon={additionalControlIcon}\n as='span'\n size={24}\n color='inherit'\n {...additionalControlIconProps}\n />\n </Styled.InputControl>\n )}\n {type === 'number' && (\n <Spacer display='flex' marginLeft={4}>\n <Styled.InputControl\n {...minusButtonProps}\n type='button'\n palette={palette}\n disabled={disabled}\n onClick={(evt) => {\n evt.stopPropagation()\n if (minusButtonProps.onClick) {\n minusButtonProps.onClick(evt)\n }\n\n try {\n if (ref.current) {\n const prev = ref.current.value\n ref.current.stepDown()\n\n const decremented = ref.current.value\n if (prev !== decremented) {\n const event = new Event('input', { bubbles: true })\n ref.current.dispatchEvent(event)\n }\n }\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error(err)\n }\n }}\n >\n <Icon icon={minus ?? <Minus />} as='span' size={24} color='inherit' {...numberControlIconProps} />\n </Styled.InputControl>\n <Styled.InputControl\n {...plusButtonProps}\n type='button'\n palette={palette}\n disabled={disabled}\n onClick={(evt) => {\n evt.stopPropagation()\n if (plusButtonProps.onClick) {\n plusButtonProps.onClick(evt)\n }\n\n try {\n if (ref.current) {\n const prev = ref.current.value\n ref.current.stepUp()\n\n const incremented = ref.current.value\n if (prev !== incremented) {\n const event = new Event('input', { bubbles: true })\n ref.current.dispatchEvent(event)\n }\n }\n } catch (err) {\n // eslint-disable-next-line no-console\n console.error(err)\n }\n }}\n >\n <Icon icon={plus ?? <Plus />} as='span' size={24} color='inherit' {...numberControlIconProps} />\n </Styled.InputControl>\n </Spacer>\n )}\n </>\n ) : undefined\n }\n />\n )\n }),\n {\n sizes: SIZES,\n displayName: COMPONENT_NAME,\n }\n ),\n {\n Phone: InputPhone,\n }\n)\n\nexport { Input, COMPONENT_NAME }\n"],"names":["COMPONENT_NAME","Input","Object","assign","withMergedProps","forwardRef","props","forwardedRef","_controls$additional","_controls$number","_ref","_ref2","theme","useTheme","size","mask","rounded","color","placeholderColor","width","defaultInputControlsWidth","type","labelPosition","textProps","iconProps","controls","preset","className","style","cursor","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","sizeUnits","sizes","margin","marginXXS","marginXS","marginS","marginM","marginL","marginXL","marginTop","marginTopXXS","marginTopXS","marginTopS","marginTopM","marginTopL","marginTopXL","marginRight","marginRightXXS","marginRightXS","marginRightS","marginRightM","marginRightL","marginRightXL","marginBottom","marginBottomXXS","marginBottomXS","marginBottomS","marginBottomM","marginBottomL","marginBottomXL","marginLeft","marginLeftXXS","marginLeftXS","marginLeftS","marginLeftM","marginLeftL","marginLeftXL","marginUnits","palette","widthXXS","widthXS","widthS","widthM","widthL","widthXL","error","success","label","icon","text","primary","secondary","onColored","fluid","disabled","inline","inputRef","inputProps","_excluded","additionalControlIcon","additionalControlIconProps","buttonProps","additionalControlButtonProps","additional","numberControlIcon","numberControlIconProps","numberControlButtonProps","number","minus","plus","Array","isArray","minusButtonProps","plusButtonProps","ref","useRef","useImperativeHandle","current","hasInitValue","value","defaultValue","active","setActive","useState","hasValue","setHasValue","_jsx","Styled.Root","input","undefined","FormInputLabel","_objectSpread","onClick","focus","onFocus","evt","target","currentTarget","onBlur","Styled.Input","stopPropagation","Boolean","_jsxs","_Fragment","children","Styled.InputControl","Icon","as","Spacer","display","prev","stepDown","event","Event","bubbles","dispatchEvent","err","console","Minus","stepUp","Plus","SIZES","displayName","Phone","InputPhone"],"mappings":"wsDAYMA,IAAAA,EAAiB,QAYvB,IAAMC,EAAoFC,OAAOC,OAC/FC,EACEC,GAAAA,CAAYC,EAAOC,KAAiB,IAAAC,EAAAC,EAAAC,EAAAC,EAClC,IAAMC,EAAQC,IAEd,IAAMC,KACJA,EAAO,IADHC,KAEJA,EAAO,GAFHC,QAGJA,GAAU,EAHNC,MAIJA,EAAQ,YAJJC,iBAKJA,EAAmB,SALfC,MAMJA,EAAQP,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AAIG,QAAQE,MAIzB,GAHAL,GAAIG,QAAQ0C,SAGRT,IADgBpC,GAAIG,QAAQE,MACN,CACxB,IAAMiC,EAAQ,IAAIC,MAAM,QAAS,CAAEC,SAAAA,IACnCxC,GAAIG,QAAQsC,cAAcH,KAG9B,MAAOI,GAEPC,QAAQxE,MAAMuE,KAxBpBZ,SA4BElB,EAACoB,EAADf,EAAA,CAAM3C,KAAMqB,MAAAA,GAAAA,GAAQiB,EAACkC,EAArB,IAA8Bb,GAAG,OAAOjI,KAAM,GAAIG,MAAM,WAAcoF,mBAK5EwB,OAKZ,CACExF,MAAOwH,EACPC,YAhXiB,UAmXrB,CACEC,MAAOC"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as e from'react';var r;function t(){return t=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var t=arguments[r];for(var a in t)({}).hasOwnProperty.call(t,a)&&(e[a]=t[a])}return e},t.apply(this,arguments)}var a=a=>e.createElement("svg",t({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},a),r||(r=e.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M5.25 12a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5H6a.75.75 0 0 1-.75-.75",clipRule:"evenodd"})));export{a as default};
|
|
2
|
+
//# sourceMappingURL=minus.module.svg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"minus.module.svg.js","sources":["../../../../../src/components/Input/images/minus.module.svg"],"sourcesContent":["<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\"><path fill=\"currentcolor\" fill-rule=\"evenodd\" d=\"M5.25 12a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5H6a.75.75 0 0 1-.75-.75\" clip-rule=\"evenodd\"/></svg>"],"names":["_path","_extends","Object","assign","target","i","arguments","length","source","key","hasOwnProperty","call","apply","this","SvgMinusmodule","props","React","createElement","xmlns","fill","viewBox","fillRule","d","clipRule"],"mappings":"wBAAA,IAAIA,EAEJ,SAASC,IAA2Q,OAA9PA,EAAWC,OAAOC,QAAU,SAAUC,GAAU,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAASF,UAAUD,GAAI,IAAK,IAAII,KAAOD,OAA+BE,eAAeC,KAAKH,EAAQC,KAAQL,EAAOK,GAAOD,EAAOC,IAAY,OAAOL,GAAkBH,EAASW,MAAMC,KAAMP,WAI7S,IAACQ,EAAyCC,GACvBC,EAAMC,cAAc,MAAOhB,EAAS,CACtDiB,MAAO,6BACPC,KAAM,OACNC,QAAS,aACRL,GAAQf,IAAUA,EAAqBgB,EAAMC,cAAc,OAAQ,CACpEE,KAAM,eACNE,SAAU,UACVC,EAAG,6EACHC,SAAU"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import*as e from'react';var r;function a(){return a=Object.assign||function(e){for(var r=1;r<arguments.length;r++){var a=arguments[r];for(var t in a)({}).hasOwnProperty.call(a,t)&&(e[t]=a[t])}return e},a.apply(this,arguments)}var t=t=>e.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},t),r||(r=e.createElement("path",{fill:"currentcolor",fillRule:"evenodd",d:"M12 5.25a.75.75 0 0 1 .75.75v5.25H18a.75.75 0 0 1 0 1.5h-5.25V18a.75.75 0 0 1-1.5 0v-5.25H6a.75.75 0 0 1 0-1.5h5.25V6a.75.75 0 0 1 .75-.75",clipRule:"evenodd"})));export{t as default};
|
|
2
|
+
//# sourceMappingURL=plus.module.svg.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"plus.module.svg.js","sources":["../../../../../src/components/Input/images/plus.module.svg"],"sourcesContent":["<svg xmlns=\"http://www.w3.org/2000/svg\" fill=\"none\" viewBox=\"0 0 24 24\"><path fill=\"currentcolor\" fill-rule=\"evenodd\" d=\"M12 5.25a.75.75 0 0 1 .75.75v5.25H18a.75.75 0 0 1 0 1.5h-5.25V18a.75.75 0 0 1-1.5 0v-5.25H6a.75.75 0 0 1 0-1.5h5.25V6a.75.75 0 0 1 .75-.75\" clip-rule=\"evenodd\"/></svg>"],"names":["_path","_extends","Object","assign","target","i","arguments","length","source","key","hasOwnProperty","call","apply","this","SvgPlusmodule","props","React","createElement","xmlns","fill","viewBox","fillRule","d","clipRule"],"mappings":"wBAAA,IAAIA,EAEJ,SAASC,IAA2Q,OAA9PA,EAAWC,OAAOC,QAAU,SAAUC,GAAU,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CAAE,IAAIG,EAASF,UAAUD,GAAI,IAAK,IAAII,KAAOD,OAA+BE,eAAeC,KAAKH,EAAQC,KAAQL,EAAOK,GAAOD,EAAOC,IAAY,OAAOL,GAAkBH,EAASW,MAAMC,KAAMP,WAI7S,IAACQ,EAAuCC,GACrBC,EAAMC,cAAc,MAAOhB,EAAS,CACtDiB,MAAO,6BACPC,KAAM,OACNC,QAAS,aACRL,GAAQf,IAAUA,EAAqBgB,EAAMC,cAAc,OAAQ,CACpEE,KAAM,eACNE,SAAU,UACVC,EAAG,6IACHC,SAAU"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import o,{css as
|
|
1
|
+
import o from'@babel/runtime/helpers/objectSpread2';import r,{css as n}from'styled-components';import e from'react-input-mask';import t from'tinycolor2';import{color as l}from'../../mixins/color.js';import{property as a,responsiveNamedProperty as c}from'../../mixins/responsive-property.js';import{chooseWidthValue as i}from'./helpers.js';import{focus as s}from'../../mixins/focus.js';var d=n(["border:1px solid ",";background-color:",";"],(o=>o.theme.colors.pomegranate),(o=>t(o.theme.colors.pomegranate).setAlpha(.1).toString()));var p=n(["background-color:rgba(0,0,0,0.04);border-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.16);cursor:not-allowed;&:disabled{background-color:rgba(0,0,0,0.04);border-color:rgba(0,0,0,0.04);color:rgba(0,0,0,0.16);cursor:not-allowed;}"]);var u=n(["&:focus{border:1px solid ",";outline:none;}"],(o=>o.theme.colors.accent));var h=n(["border-radius:",";"],(o=>o.theme.borderRadius));var b=o=>n(["box-sizing:border-box;display:block;background-color:",";border:solid 1px ",";width:auto;appearance:none;font-size:16px;",";&::placeholder{","}"," "," "," "," "," "," ",""],o.theme.colors.white,o.theme.colors.alto,o.color?l(o.color):null,o.placeholderColor?l(o.placeholderColor):null,u,o.disabled?p:null,o.rounded?h:null,o.width?a(i(o.width),o.fluid&&'auto'!==o.width?'max-width':'width'):null,c({sizes:{widthXS:o.widthXS,widthS:o.widthS,widthM:o.widthM,widthL:o.widthL,widthXL:o.widthXL},cssProperty:o.fluid&&'auto'!==o.width?'max-width':'width',customSizeHandler:i}),o.fluid?n(["width:100%;"]):null,o.error?d:null);var m=r(e).withConfig({shouldForwardProp:o=>!['color','placeholderColor','rounded','fluid','error'].includes(o)&&!o.includes('width')}).withConfig({componentId:"fox-ui__sc-1gazj3c-0"})(["line-height:24px;padding:15px 20px 11px;",""],(o=>b(o)));var g=r(e).withConfig({shouldForwardProp:o=>!['palette','label','labelPosition','active','cursor'].includes(o)}).withConfig({componentId:"fox-ui__sc-1gazj3c-1"})([""," ",""],(o=>{var r;var n='1';var e='0px';return o.label&&'dynamic'===o.labelPosition&&(n="".concat(o.active?1:0),e='16px'),o.label&&'top'===o.labelPosition&&(e='16px'),o.label&&'center'===o.labelPosition&&(n="".concat(o.active?1:0)),"\n box-sizing: border-box;\n appearance: textfield;\n border: none;\n padding: 0;\n margin: 0;\n font-size: inherit;\n line-height: inherit;\n background-color: transparent;\n width: 100%;\n align-self: stretch;\n opacity: ".concat(n,";\n padding-top: ").concat(e,";\n cursor: ").concat((null!==(r=o.cursor)&&void 0!==r?r:o.disabled)?'not-allowed':'auto',";\n\n &[type=\"number\"]::-webkit-outer-spin-button,\n &[type=\"number\"]::-webkit-inner-spin-button {\n appearance: none;\n margin: 0;\n }\n\n &:focus {\n outline: none;\n }\n ")}),(r=>{return n=o({inputColor:r.theme.colors['content-onmain-primary'],inputPlaceholderColor:r.theme.colors['content-onmain-secondary'],inputColorDisabled:r.theme.colors['content-disabled'],inputPlaceholderColorDisabled:r.theme.colors['content-disabled']},r.palette),"\n color: ".concat(n.inputColor,";\n &::placeholder {\n color: ").concat(n.inputPlaceholderColor,";\n }\n &:disabled {\n color: ").concat(n.inputColorDisabled,";\n }\n &:disabled::placeholder {\n color: ").concat(n.inputPlaceholderColorDisabled,";\n }\n");var n}));var f=r.button.withConfig({shouldForwardProp:o=>!['palette'].includes(o)}).withConfig({componentId:"fox-ui__sc-1gazj3c-2"})(["box-sizing:border-box;appearance:none;position:relative;padding:6px;margin:0;border:none;display:flex;align-items:center;justify-content:center;flex-shrink:0;border-radius:8px;cursor:inherit;&:first-child{margin-left:4px;}&:not(:first-child){margin-left:9px;}&:not(:first-child)::before{content:'';position:absolute;width:1px;height:60%;top:50%;left:-5px;transform:translateY(-50%);}"," ",""],(r=>{return n=o({controlsColor:r.theme.colors['content-onmain-tertiary'],controlsColorHover:r.theme.colors['content-onmain-primary'],controlsColorActive:r.theme.colors['content-onmain-primary'],controlsColorDisabled:r.theme.colors['content-disabled'],controlsBackgroundColor:r.theme.colors.transparent,controlsBackgroundColorHover:t(r.theme.colors['bg-oncolor-hover']).lighten(20).toString(),controlsBackgroundColorActive:r.theme.colors['bg-oncolor-hover'],controlsBackgroundColorDisabled:r.theme.colors.transparent,controlsSeparatorColor:r.theme.colors['border-onmain-default-large']},r.palette),"\n color: ".concat(n.controlsColor,";\n background-color: ").concat(n.controlsBackgroundColor,";\n &:hover {\n color: ").concat(n.controlsColorHover,";\n background-color: ").concat(n.controlsBackgroundColorHover,";\n }\n &:active {\n color: ").concat(n.controlsColorActive,";\n background-color: ").concat(n.controlsBackgroundColorActive,";\n }\n &:disabled {\n color: ").concat(n.controlsColorDisabled,";\n background-color: ").concat(n.controlsBackgroundColorDisabled,";\n }\n &:not(:first-child)::before {\n background-color: ").concat(n.controlsSeparatorColor,";\n }\n");var n}),s);export{g as Input,f as InputControl,m as Root,b as baseInputStyle,p as disabledStyle,d as errorStyle,u as focusStyle,h as roundedStyle};
|
|
2
2
|
//# sourceMappingURL=style.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"style.js","sources":["../../../../src/components/Input/style.ts"],"sourcesContent":["import styled, { css, DefaultTheme } from 'styled-components'\nimport InputMask from 'react-input-mask'\nimport tinycolor from 'tinycolor2'\nimport { color } from 'mixins/color'\nimport { property, responsiveNamedProperty } from 'mixins/responsive-property'\nimport { InputField } from 'shared/interfaces'\nimport { chooseWidthValue } from 'components/Input/helpers'\nimport { InputProps } from './Input'\n\nexport const errorStyle = css`\n border: 1px solid ${(props) => props.theme.colors.pomegranate};\n background-color: ${(props) => tinycolor(props.theme.colors.pomegranate).setAlpha(0.1).toString()};\n`\n\nexport const disabledStyle = css`\n background-color: rgba(0, 0, 0, 0.04);\n border-color: rgba(0, 0, 0, 0.04);\n color: rgba(0, 0, 0, 0.16);\n cursor: not-allowed;\n &:disabled {\n background-color: rgba(0, 0, 0, 0.04);\n border-color: rgba(0, 0, 0, 0.04);\n color: rgba(0, 0, 0, 0.16);\n cursor: not-allowed;\n }\n`\n\nexport const focusStyle = css`\n &:focus {\n border: 1px solid ${(props) => props.theme.colors.accent};\n outline: none;\n }\n`\n\nexport const roundedStyle = css`\n border-radius: ${(props) => props.theme.borderRadius};\n`\n\nexport const baseInputStyle = <T extends InputField>(props: T & { theme: DefaultTheme }) => css`\n box-sizing: border-box;\n display: block;\n background-color: ${props.theme.colors.white};\n border: solid 1px ${props.theme.colors.alto};\n width: auto;\n appearance: none;\n font-size: 16px;\n ${props.color ? color(props.color) : null};\n &::placeholder {\n ${props.placeholderColor ? color(props.placeholderColor) : null}\n }\n ${focusStyle}\n ${props.disabled ? disabledStyle : null}\n ${props.rounded ? roundedStyle : null}\n\n ${props.width\n ? property(chooseWidthValue(props.width), props.fluid && props.width !== 'auto' ? 'max-width' : 'width')\n : null}\n ${responsiveNamedProperty({\n sizes: {\n widthXS: props.widthXS,\n widthS: props.widthS,\n widthM: props.widthM,\n widthL: props.widthL,\n widthXL: props.widthXL,\n },\n cssProperty: props.fluid && props.width !== 'auto' ? 'max-width' : 'width',\n customSizeHandler: chooseWidthValue,\n })}\n ${props.fluid\n ? css`\n width: 100%;\n `\n : null}\n ${props.error ? errorStyle : null}\n`\n\nexport const Root = styled(InputMask).withConfig<InputProps>({\n shouldForwardProp: (prop) =>\n !['color', 'placeholderColor', 'rounded', 'fluid', 'error'].includes(prop) && !prop.includes('width'),\n})`\n line-height: 24px;\n padding: 15px 20px 11px;\n ${(props) => baseInputStyle(props)}\n`\n"],"names":["errorStyle","css","props","theme","colors","pomegranate","tinycolor","setAlpha","toString","disabledStyle","focusStyle","accent","roundedStyle","borderRadius","baseInputStyle","white","alto","color","placeholderColor","disabled","rounded","width","property","chooseWidthValue","fluid","responsiveNamedProperty","sizes","widthXS","widthS","widthM","widthL","widthXL","cssProperty","customSizeHandler","error","Root","styled","InputMask","withConfig","shouldForwardProp","prop","includes","componentId"],"mappings":"+RASaA,IAAAA,EAAaC,kDACHC,GAAUA,EAAMC,MAAMC,OAAOC,cAC7BH,GAAUI,EAAUJ,EAAMC,MAAMC,OAAOC,aAAaE,SAAS,IAAKC,aAG5EC,IAAAA,EAAgBR,EAAtB,CAAA,qOAaMS,IAAAA,EAAaT,mDAEDC,GAAUA,EAAMC,MAAMC,OAAOO,SAKzCC,IAAAA,EAAeX,EACRC,CAAAA,iBAAAA,MAAAA,GAAUA,EAAMC,MAAMU,eAGnC,IAAMC,EAAwCZ,GAAuCD,EAA9D,CAAA,wDAAA,qBAAA,8CAAA,mBAAA,IAAA,IAAA,IAAA,IAAA,IAAA,IAAA,IAAA,IAGRC,EAAMC,MAAMC,OAAOW,MACnBb,EAAMC,MAAMC,OAAOY,KAIrCd,EAAMe,MAAQA,EAAMf,EAAMe,OAAS,KAEjCf,EAAMgB,iBAAmBD,EAAMf,EAAMgB,kBAAoB,KAE3DR,EACAR,EAAMiB,SAAWV,EAAgB,KACjCP,EAAMkB,QAAUR,EAAe,KAE/BV,EAAMmB,MACJC,EAASC,EAAiBrB,EAAMmB,OAAQnB,EAAMsB,OAAyB,SAAhBtB,EAAMmB,MAAmB,YAAc,SAC9F,KACFI,EAAwB,CACxBC,MAAO,CACLC,QAASzB,EAAMyB,QACfC,OAAQ1B,EAAM0B,OACdC,OAAQ3B,EAAM2B,OACdC,OAAQ5B,EAAM4B,OACdC,QAAS7B,EAAM6B,SAEjBC,YAAa9B,EAAMsB,OAAyB,SAAhBtB,EAAMmB,MAAmB,YAAc,QACnEY,kBAAmBV,IAEnBrB,EAAMsB,MACJvB,EADF,CAAA,gBAIE,KACFC,EAAMgC,MAAQlC,EAAa,MAGxB,IAAMmC,EAAOC,EAAOC,GAAWC,WAAuB,CAC3DC,kBAAoBC,IACjB,CAAC,QAAS,mBAAoB,UAAW,QAAS,SAASC,SAASD,KAAUA,EAAKC,SAAS,WAFhFH,WAAA,CAAAI,YAAA,wBAAGN,CAAH,CAAA,2CAAA,KAMZlC,GAAUY,EAAeZ"}
|
|
1
|
+
{"version":3,"file":"style.js","sources":["../../../../src/components/Input/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport InputMask from 'react-input-mask'\nimport tinycolor from 'tinycolor2'\nimport type { StyledProps } from 'styled-components'\nimport { color } from 'mixins/color'\nimport { property, responsiveNamedProperty } from 'mixins/responsive-property'\nimport { chooseWidthValue } from 'components/Input/helpers'\nimport { focus } from 'mixins/focus'\nimport type { CSSColor } from 'shared/types'\nimport type {\n StyledBaseInputProps,\n StyledInputProps,\n StyledInputControlsProps,\n InputPalette,\n InputControlsPalette,\n} from './types'\n\nconst template = (palette: InputPalette) => `\n color: ${palette.inputColor};\n &::placeholder {\n color: ${palette.inputPlaceholderColor};\n }\n &:disabled {\n color: ${palette.inputColorDisabled};\n }\n &:disabled::placeholder {\n color: ${palette.inputPlaceholderColorDisabled};\n }\n`\n\nconst controlsTemplate = (palette: InputControlsPalette) => `\n color: ${palette.controlsColor};\n background-color: ${palette.controlsBackgroundColor};\n &:hover {\n color: ${palette.controlsColorHover};\n background-color: ${palette.controlsBackgroundColorHover};\n }\n &:active {\n color: ${palette.controlsColorActive};\n background-color: ${palette.controlsBackgroundColorActive};\n }\n &:disabled {\n color: ${palette.controlsColorDisabled};\n background-color: ${palette.controlsBackgroundColorDisabled};\n }\n &:not(:first-child)::before {\n background-color: ${palette.controlsSeparatorColor};\n }\n`\n\nexport const errorStyle = css`\n border: 1px solid ${(props) => props.theme.colors.pomegranate};\n background-color: ${(props) => tinycolor(props.theme.colors.pomegranate).setAlpha(0.1).toString()};\n`\n\nexport const disabledStyle = css`\n background-color: rgba(0, 0, 0, 0.04);\n border-color: rgba(0, 0, 0, 0.04);\n color: rgba(0, 0, 0, 0.16);\n cursor: not-allowed;\n &:disabled {\n background-color: rgba(0, 0, 0, 0.04);\n border-color: rgba(0, 0, 0, 0.04);\n color: rgba(0, 0, 0, 0.16);\n cursor: not-allowed;\n }\n`\n\nexport const focusStyle = css`\n &:focus {\n border: 1px solid ${(props) => props.theme.colors.accent};\n outline: none;\n }\n`\n\nexport const roundedStyle = css`\n border-radius: ${(props) => props.theme.borderRadius};\n`\n\nexport const baseInputStyle = (\n props: StyledProps<\n Pick<\n StyledBaseInputProps,\n | 'color'\n | 'placeholderColor'\n | 'disabled'\n | 'rounded'\n | 'width'\n | 'widthXS'\n | 'widthS'\n | 'widthM'\n | 'widthL'\n | 'widthXL'\n | 'fluid'\n | 'error'\n >\n >\n) => css`\n box-sizing: border-box;\n display: block;\n background-color: ${props.theme.colors.white};\n border: solid 1px ${props.theme.colors.alto};\n width: auto;\n appearance: none;\n font-size: 16px;\n ${props.color ? color(props.color) : null};\n &::placeholder {\n ${props.placeholderColor ? color(props.placeholderColor) : null}\n }\n ${focusStyle}\n ${props.disabled ? disabledStyle : null}\n ${props.rounded ? roundedStyle : null}\n\n ${props.width\n ? property(chooseWidthValue(props.width), props.fluid && props.width !== 'auto' ? 'max-width' : 'width')\n : null}\n ${responsiveNamedProperty({\n sizes: {\n widthXS: props.widthXS,\n widthS: props.widthS,\n widthM: props.widthM,\n widthL: props.widthL,\n widthXL: props.widthXL,\n },\n cssProperty: props.fluid && props.width !== 'auto' ? 'max-width' : 'width',\n customSizeHandler: chooseWidthValue,\n })}\n ${props.fluid\n ? css`\n width: 100%;\n `\n : null}\n ${props.error ? errorStyle : null}\n`\n\nexport const Root: React.ComponentType<StyledBaseInputProps> = styled(InputMask).withConfig<StyledBaseInputProps>({\n shouldForwardProp: (prop) =>\n !['color', 'placeholderColor', 'rounded', 'fluid', 'error'].includes(prop) && !prop.includes('width'),\n})`\n line-height: 24px;\n padding: 15px 20px 11px;\n ${(props) => baseInputStyle(props)}\n`\n\nexport const Input: React.ComponentType<StyledInputProps> = styled(InputMask).withConfig<StyledInputProps>({\n shouldForwardProp: (propKey) => !['palette', 'label', 'labelPosition', 'active', 'cursor'].includes(propKey),\n})`\n ${(props) => {\n let opacity = '1'\n let paddingTop = '0px'\n\n if (props.label && props.labelPosition === 'dynamic') {\n opacity = `${props.active ? 1 : 0}`\n paddingTop = '16px'\n }\n\n if (props.label && props.labelPosition === 'top') {\n paddingTop = '16px'\n }\n\n if (props.label && props.labelPosition === 'center') {\n opacity = `${props.active ? 1 : 0}`\n }\n\n return `\n box-sizing: border-box;\n appearance: textfield;\n border: none;\n padding: 0;\n margin: 0;\n font-size: inherit;\n line-height: inherit;\n background-color: transparent;\n width: 100%;\n align-self: stretch;\n opacity: ${opacity};\n padding-top: ${paddingTop};\n cursor: ${props.cursor ?? props.disabled ? 'not-allowed' : 'auto'};\n\n &[type=\"number\"]::-webkit-outer-spin-button,\n &[type=\"number\"]::-webkit-inner-spin-button {\n appearance: none;\n margin: 0;\n }\n\n &:focus {\n outline: none;\n }\n `\n }}\n ${(props) =>\n template({\n inputColor: props.theme.colors['content-onmain-primary'],\n inputPlaceholderColor: props.theme.colors['content-onmain-secondary'],\n inputColorDisabled: props.theme.colors['content-disabled'],\n inputPlaceholderColorDisabled: props.theme.colors['content-disabled'],\n ...props.palette,\n })}\n`\n\nexport const InputControl = styled.button.withConfig<StyledInputControlsProps>({\n shouldForwardProp: (propKey) => !['palette'].includes(propKey),\n})`\n box-sizing: border-box;\n appearance: none;\n position: relative;\n padding: 6px;\n margin: 0;\n border: none;\n display: flex;\n align-items: center;\n justify-content: center;\n flex-shrink: 0;\n border-radius: 8px;\n cursor: inherit;\n &:first-child {\n margin-left: 4px;\n }\n &:not(:first-child) {\n margin-left: 9px;\n }\n &:not(:first-child)::before {\n content: '';\n position: absolute;\n width: 1px;\n height: 60%;\n top: 50%;\n left: -5px;\n transform: translateY(-50%);\n }\n ${(props) =>\n controlsTemplate({\n controlsColor: props.theme.colors['content-onmain-tertiary'],\n controlsColorHover: props.theme.colors['content-onmain-primary'],\n controlsColorActive: props.theme.colors['content-onmain-primary'],\n controlsColorDisabled: props.theme.colors['content-disabled'],\n controlsBackgroundColor: props.theme.colors.transparent,\n controlsBackgroundColorHover: tinycolor(props.theme.colors['bg-oncolor-hover'])\n .lighten(20)\n .toString() as CSSColor,\n controlsBackgroundColorActive: props.theme.colors['bg-oncolor-hover'],\n controlsBackgroundColorDisabled: props.theme.colors.transparent,\n controlsSeparatorColor: props.theme.colors['border-onmain-default-large'],\n ...props.palette,\n })}\n\n ${focus}\n`\n"],"names":["errorStyle","css","props","theme","colors","pomegranate","tinycolor","setAlpha","toString","disabledStyle","focusStyle","accent","roundedStyle","borderRadius","baseInputStyle","white","alto","color","placeholderColor","disabled","rounded","width","property","chooseWidthValue","fluid","responsiveNamedProperty","sizes","widthXS","widthS","widthM","widthL","widthXL","cssProperty","customSizeHandler","error","Root","styled","InputMask","withConfig","shouldForwardProp","prop","includes","componentId","Input","propKey","_props$cursor","opacity","paddingTop","label","labelPosition","concat","active","cursor","template","palette","_objectSpread","inputColor","inputPlaceholderColor","inputColorDisabled","inputPlaceholderColorDisabled","InputControl","button","controlsTemplate","controlsColor","controlsColorHover","controlsColorActive","controlsColorDisabled","controlsBackgroundColor","transparent","controlsBackgroundColorHover","lighten","controlsBackgroundColorActive","controlsBackgroundColorDisabled","controlsSeparatorColor","focus"],"mappings":"iYAkDaA,IAAAA,EAAaC,kDACHC,GAAUA,EAAMC,MAAMC,OAAOC,cAC7BH,GAAUI,EAAUJ,EAAMC,MAAMC,OAAOC,aAAaE,SAAS,IAAKC,aAG5EC,IAAAA,EAAgBR,EAAtB,CAAA,qOAaMS,IAAAA,EAAaT,mDAEDC,GAAUA,EAAMC,MAAMC,OAAOO,SAKzCC,IAAAA,EAAeX,EACRC,CAAAA,iBAAAA,MAAAA,GAAUA,EAAMC,MAAMU,eAGnC,IAAMC,EACXZ,GAiBGD,EAlByB,CAAA,wDAAA,qBAAA,8CAAA,mBAAA,IAAA,IAAA,IAAA,IAAA,IAAA,IAAA,IAAA,IAqBRC,EAAMC,MAAMC,OAAOW,MACnBb,EAAMC,MAAMC,OAAOY,KAIrCd,EAAMe,MAAQA,EAAMf,EAAMe,OAAS,KAEjCf,EAAMgB,iBAAmBD,EAAMf,EAAMgB,kBAAoB,KAE3DR,EACAR,EAAMiB,SAAWV,EAAgB,KACjCP,EAAMkB,QAAUR,EAAe,KAE/BV,EAAMmB,MACJC,EAASC,EAAiBrB,EAAMmB,OAAQnB,EAAMsB,OAAyB,SAAhBtB,EAAMmB,MAAmB,YAAc,SAC9F,KACFI,EAAwB,CACxBC,MAAO,CACLC,QAASzB,EAAMyB,QACfC,OAAQ1B,EAAM0B,OACdC,OAAQ3B,EAAM2B,OACdC,OAAQ5B,EAAM4B,OACdC,QAAS7B,EAAM6B,SAEjBC,YAAa9B,EAAMsB,OAAyB,SAAhBtB,EAAMmB,MAAmB,YAAc,QACnEY,kBAAmBV,IAEnBrB,EAAMsB,MACJvB,EADF,CAAA,gBAIE,KACFC,EAAMgC,MAAQlC,EAAa,MAGxB,IAAMmC,EAAkDC,EAAOC,GAA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WAAWH,SAASG,KAD/BN,WAAA,CAAAI,YAAA,wBAAGN,CA8BvBlC,CAAAA,kYAAAA,IAAAA,KAAAA,IACD4D,OAzMsBR,EAyMNC,EAAA,CACdQ,cAAe7D,EAAMC,MAAMC,OAAO,2BAClC4D,mBAAoB9D,EAAMC,MAAMC,OAAO,0BACvC6D,oBAAqB/D,EAAMC,MAAMC,OAAO,0BACxC8D,sBAAuBhE,EAAMC,MAAMC,OAAO,oBAC1C+D,wBAAyBjE,EAAMC,MAAMC,OAAOgE,YAC5CC,6BAA8B/D,EAAUJ,EAAMC,MAAMC,OAAO,qBACxDkE,QAAQ,IACR9D,WACH+D,8BAA+BrE,EAAMC,MAAMC,OAAO,oBAClDoE,gCAAiCtE,EAAMC,MAAMC,OAAOgE,YACpDK,uBAAwBvE,EAAMC,MAAMC,OAAO,gCACxCF,EAAMoD,SApNJA,cAAAA,OAAAA,EAAQS,cADM,2BAAAb,OAEHI,EAAQa,wBAEjBb,+BAAAA,OAAAA,EAAQU,mBAJI,6BAAAd,OAKDI,EAAQe,6BAGnBf,qCAAAA,OAAAA,EAAQW,oBARI,6BAAAf,OASDI,EAAQiB,4EAGnBjB,EAAQY,sBAZI,6BAAAhB,OAaDI,EAAQkB,0GAGRlB,EAAQmB,uBAhBhC,YAA0BnB,IAAAA,IAwNtBoB"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import e from'@babel/runtime/helpers/objectWithoutProperties';import t from'@babel/runtime/helpers/objectSpread2';import{PureComponent as a}from'react';import{Input as r}from'../Input/Input.js';import{COUNTRY_DATA as s,DEFAULT_MASK as o,INITIAL_MASK as n,REGEXPS as i,RUSSIAN_PHONE_WITHOUT_COUNTY_CODE_LENGTH as l}from'./constants.js';import{jsx as u}from'react/jsx-runtime';var p=["countryData","defaultMask","initialMask","stripValue"];var h=function(e){var t=arguments.length>0&&void 0!==e?e:'';return t.replace(i.NOT_NUMBERS,'')};class c extends a{constructor(e){var a;super(e),a=this,this.autocorrectOf8=void 0,this.autocorrectOf9=void 0,this.getUpdates=function(e,t){var r=arguments.length>1&&void 0!==t?t:void 0;var{countryData:o,defaultMask:n,initialMask:u}=a.props;var p=h(e);var c=u;var v=null;var m=!1;var d=!1;if(!p)return{mask:c,numbers:p,startsFrom8:m,startsFrom9:d,regexp:v};var g=!1;for(var f=0;f<o.length;f++)p.startsWith(o[f][1])&&([,,c,v]=o[f],g=0===f||1===f);return m=g&&i.FROM_8.test(p)&&a.autocorrectOf8,d=(!c||p.length===l&&''===r)&&a.autocorrectOf9&&i.FROM_9.test(p),m&&(c=s[0][2],a.autocorrectOf8=!1),d&&(c=s[0][2],a.autocorrectOf9=!1),c||(c=n),{mask:c,numbers:p,startsFrom8:m,startsFrom9:d,regexp:v}},this.change=e=>{var{mask:t}=this.getUpdates(e);this.setState({mask:t})},this.handleChange=e=>{e.persist();var{onChange:t,stripValue:a}=this.props;if(t){var r=e;a&&(r.target.value=h(e.target.value)),t(r)}},this.beforeMaskedValueChange=(e,a)=>{var{mask:r,numbers:s,startsFrom8:o,startsFrom9:n,regexp:l}=this.getUpdates(e.value,a.value);return this.setState({mask:r,regexp:l}),n?{selection:1===s.length?{start:5,end:5}:e.selection,value:e.value.replace(i.FROM_9,'+79$1')}:o?{selection:{start:2,end:2},value:e.value.replace(i.FROM_8,'+7$1')}:i.FILLED.test(a.value)&&1===s.length?{selection:{start:2,end:2},value:e.value}:!i.FILLED.test(a.value)&&i.FILLED.test(e.value)?t(t({},e),{},{selection:e.selection?{start:e.selection.start+1,end:e.selection.end+1}:null}):e},this.autocorrectOf8=!0,this.autocorrectOf9=!0;var{mask:r}=this.getUpdates(e.value||'');this.state={mask:r,regexp:null}}componentDidUpdate(e){var{value:t}=this.props;t!==e.value&&this.change(t)}render(){var a=e(this.props,p);var{mask:s,regexp:o}=this.state;return u(r,t(t({},a),{},{beforeMaskedValueChange:this.beforeMaskedValueChange,mask:s,"data-regexp":o instanceof RegExp?o.toString():void 0,onChange:this.handleChange}))}}c.displayName='Input.Phone',c.defaultProps={countryData:s,defaultMask:o,initialMask:n,placeholder:'+9 (999) 999-99-99',rounded:!0,type:'text',color:'mineShaft',mask:'',placeholderColor:'silver'};export{c as InputPhone};
|
|
2
2
|
//# sourceMappingURL=Input.Phone.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.Phone.js","sources":["../../../../src/components/Input.Phone/Input.Phone.tsx"],"sourcesContent":["/* eslint-disable no-use-before-define */\nimport { PureComponent } from 'react'\nimport { InputState } from 'react-input-mask'\nimport { Input
|
|
1
|
+
{"version":3,"file":"Input.Phone.js","sources":["../../../../src/components/Input.Phone/Input.Phone.tsx"],"sourcesContent":["/* eslint-disable no-use-before-define */\nimport { PureComponent } from 'react'\nimport type { InputState } from 'react-input-mask'\nimport { Input } from '../Input/Input'\nimport type { InputProps } from '../Input'\nimport {\n COUNTRY_DATA,\n DEFAULT_MASK,\n INITIAL_MASK,\n REGEXPS,\n RUSSIAN_PHONE_WITHOUT_COUNTY_CODE_LENGTH,\n} from './constants'\n\nconst onlyNumbers = (value = ''): string => value.replace(REGEXPS.NOT_NUMBERS, '')\n\nexport interface InputPhoneProps extends InputProps {\n /**\n * Settings for different country codes\n */\n countryData?: string[][]\n /**\n * Default field mask that is set when none of the countryData prop matches\n */\n defaultMask?: string\n /**\n * The default field mask when the phone field is empty is required to enable autocomplete in\n * the browser\n */\n initialMask?: string\n /** If event should return stripped phone value (not for redux forms) */\n stripValue?: boolean\n}\n\ninterface InputPhoneState {\n mask: string\n regexp?: RegExp | null\n}\n\n/**\n * Расширен:\n * - `InputProps`\n */\nexport class InputPhone extends PureComponent<typeof InputPhone.defaultProps & InputPhoneProps, InputPhoneState> {\n static displayName = 'Input.Phone'\n static defaultProps = {\n countryData: COUNTRY_DATA,\n defaultMask: DEFAULT_MASK,\n initialMask: INITIAL_MASK,\n placeholder: '+9 (999) 999-99-99',\n rounded: true,\n type: 'text',\n color: 'mineShaft',\n mask: '',\n placeholderColor: 'silver',\n }\n\n autocorrectOf8: boolean\n autocorrectOf9: boolean\n\n constructor(props: typeof InputPhone.defaultProps & InputPhoneProps) {\n super(props)\n\n this.autocorrectOf8 = true\n this.autocorrectOf9 = true\n\n const { mask } = this.getUpdates(props.value || '')\n\n this.state = { mask, regexp: null }\n }\n\n componentDidUpdate(nextProps: InputPhoneProps) {\n const { value } = this.props\n\n if (value !== nextProps.value) {\n this.change(value)\n }\n }\n\n getUpdates = (\n value: InputPhoneProps['value'],\n prevValue: InputPhoneProps['value'] = undefined\n ): {\n mask: string\n numbers: string\n startsFrom8: boolean\n startsFrom9: boolean\n regexp: RegExp | null\n } => {\n const { countryData, defaultMask, initialMask } = this.props\n const numbers = onlyNumbers(value as string)\n\n let mask = initialMask\n let regexp = null\n let startsFrom8 = false\n let startsFrom9 = false\n\n if (!numbers)\n return {\n mask,\n numbers,\n startsFrom8,\n startsFrom9,\n regexp,\n }\n\n let isRussian = false\n\n for (let i = 0; i < countryData.length; i++) {\n if (numbers.startsWith(countryData[i][1])) {\n ;[, , mask, regexp] = countryData[i]\n isRussian = i === 0 || i === 1\n }\n }\n\n startsFrom8 = isRussian && REGEXPS.FROM_8.test(numbers) && this.autocorrectOf8\n startsFrom9 =\n (!mask || (numbers.length === RUSSIAN_PHONE_WITHOUT_COUNTY_CODE_LENGTH && prevValue === '')) &&\n this.autocorrectOf9 &&\n REGEXPS.FROM_9.test(numbers)\n\n if (startsFrom8) {\n // RUSSIAN_MASK\n mask = COUNTRY_DATA[0][2]\n\n this.autocorrectOf8 = false\n }\n\n if (startsFrom9) {\n // RUSSIAN_MASK\n mask = COUNTRY_DATA[0][2]\n\n this.autocorrectOf9 = false\n }\n\n if (!mask) {\n mask = defaultMask\n }\n\n return {\n mask,\n numbers,\n startsFrom8,\n startsFrom9,\n regexp,\n }\n }\n\n change = (phone: InputPhoneProps['value']) => {\n const { mask } = this.getUpdates(phone)\n\n this.setState({ mask })\n }\n\n handleChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {\n e.persist()\n\n const { onChange, stripValue } = this.props\n\n if (onChange) {\n const _e = e\n if (stripValue) _e.target.value = onlyNumbers(e.target.value)\n onChange(_e)\n }\n }\n\n beforeMaskedValueChange = (newState: InputState, oldState: InputState) => {\n const { mask, numbers, startsFrom8, startsFrom9, regexp } = this.getUpdates(newState.value, oldState.value)\n\n this.setState({ mask, regexp })\n\n /**\n * For the correct caret position, when the user enters 9 in the phone field and it's replaced\n * by '+7 (9'\n */\n if (startsFrom9) {\n return {\n selection: numbers.length === 1 ? { start: 5, end: 5 } : newState.selection,\n value: newState.value.replace(REGEXPS.FROM_9, '+79$1'),\n }\n }\n\n if (startsFrom8) {\n return { selection: { start: 2, end: 2 }, value: newState.value.replace(REGEXPS.FROM_8, '+7$1') }\n }\n\n if (REGEXPS.FILLED.test(oldState.value) && numbers.length === 1) {\n return { selection: { start: 2, end: 2 }, value: newState.value }\n }\n\n if (!REGEXPS.FILLED.test(oldState.value) && REGEXPS.FILLED.test(newState.value)) {\n return {\n ...newState,\n selection: newState.selection ? { start: newState.selection.start + 1, end: newState.selection.end + 1 } : null,\n }\n }\n\n return newState\n }\n\n render() {\n const {\n /* eslint-disable no-unused-vars, @typescript-eslint/no-unused-vars */\n countryData,\n defaultMask,\n initialMask,\n stripValue,\n /* eslint-enable no-unused-vars, @typescript-eslint/no-unused-vars */\n ...props\n } = this.props\n const { mask, regexp } = this.state\n\n return (\n <Input\n {...props}\n beforeMaskedValueChange={this.beforeMaskedValueChange}\n mask={mask}\n data-regexp={regexp instanceof RegExp ? regexp.toString() : undefined}\n onChange={this.handleChange}\n />\n )\n }\n}\n"],"names":["onlyNumbers","e","value","replace","REGEXPS","NOT_NUMBERS","InputPhone","PureComponent","constructor","props","_this","super","this","autocorrectOf8","autocorrectOf9","getUpdates","t","prevValue","undefined","countryData","defaultMask","initialMask","numbers","mask","regexp","startsFrom8","startsFrom9","isRussian","i","length","startsWith","FROM_8","test","RUSSIAN_PHONE_WITHOUT_COUNTY_CODE_LENGTH","FROM_9","COUNTRY_DATA","change","phone","setState","handleChange","persist","onChange","stripValue","_e","target","beforeMaskedValueChange","newState","oldState","selection","start","end","FILLED","_objectSpread","state","componentDidUpdate","nextProps","render","_objectWithoutProperties","_excluded","_jsx","Input","RegExp","toString","displayName","defaultProps","DEFAULT_MASK","INITIAL_MASK","placeholder","rounded","type","color","placeholderColor"],"mappings":"sbAaA,IAAMA,EAAc,SAAAC,GAAA,IAACC,+BAADD,EAAAA,EAAS,GAAT,OAAwBC,EAAMC,QAAQC,EAAQC,YAAa,KA6BxE,MAAMC,UAAmBC,EAiB9BC,YAAYC,GAAyD,IAAAC,EACnEC,MAAMF,GAD6DC,EAAAE,KAAAA,KAHrEC,sBAGqED,KAFrEE,oBAEqE,EAAAF,KAmBrEG,WAAa,SACXb,EADWc,GASR,IAPHC,+BAFWD,EAAAA,OAE2BE,EAQtC,IAAMC,YAAEA,EAAFC,YAAeA,EAAfC,YAA4BA,GAAgBX,EAAKD,MACvD,IAAMa,EAAUtB,EAAYE,GAE5B,IAAIqB,EAAOF,EACX,IAAIG,EAAS,KACb,IAAIC,GAAAA,EACJ,IAAIC,KAEJ,IAAKJ,EACH,MAAO,CACLC,KAAAA,EACAD,QAAAA,EACAG,YAAAA,EACAC,YAAAA,EACAF,OAAAA,GAGJ,IAAIG,KAEJ,IAAK,IAAIC,EAAI,EAAGA,EAAIT,EAAYU,OAAQD,IAClCN,EAAQQ,WAAWX,EAAYS,GAAG,OACnC,CAAA,CAAKL,EAAMC,GAAUL,EAAYS,GAClCD,EAAkB,IAANC,GAAiB,IAANA,GA4B3B,OAxBAH,EAAcE,GAAavB,EAAQ2B,OAAOC,KAAKV,IAAYZ,EAAKG,eAChEa,IACIH,GAASD,EAAQO,SAAWI,GAA0D,KAAdhB,IAC1EP,EAAKI,gBACLV,EAAQ8B,OAAOF,KAAKV,GAElBG,IAEFF,EAAOY,EAAa,GAAG,GAEvBzB,EAAKG,gBAAAA,GAGHa,IAEFH,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,EAASE,UAAY,CAAEC,MAAOH,EAASE,UAAUC,MAAQ,EAAGC,IAAKJ,EAASE,UAAUE,IAAM,GAAM,OAIxGJ,GAtIPlC,KAAKC,gBAAiB,EACtBD,KAAKE,gBAAAA,EAEL,IAAQS,KAAAA,GAASX,KAAKG,WAAWN,EAAMP,OAAS,IAEhDU,KAAKyC,MAAQ,CAAE9B,KAAAA,EAAMC,OAAQ,MAG/B8B,mBAAmBC,GACjB,IAAMrD,MAAEA,GAAUU,KAAKH,MAEnBP,IAAUqD,EAAUrD,OACtBU,KAAKwB,OAAOlC,GA6HhBsD,SACE,IAOK/C,EAPLgD,EAQI7C,KAAKH,MARTiD,GASA,IAAMnC,KAAEA,EAAFC,OAAQA,GAAWZ,KAAKyC,MAE9B,OACEM,EAACC,EAADR,EAAAA,EAAA,GACM3C,GADN,GAAA,CAEEoC,wBAAyBjC,KAAKiC,wBAC9BtB,KAAMA,EACN,cAAaC,aAAkBqC,OAASrC,EAAOsC,gBAAa5C,EAC5DuB,SAAU7B,KAAK2B,iBA/KVjC,EACJyD,YAAc,cADVzD,EAEJ0D,aAAe,CACpB7C,YAAagB,EACbf,YAAa6C,EACb5C,YAAa6C,EACbC,YAAa,qBACbC,SAAS,EACTC,KAAM,OACNC,MAAO,YACP/C,KAAM,GACNgD,iBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputCheckbox.js","sources":["../../../../src/components/InputCheckbox/InputCheckbox.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { SIZES } from './constants'\nimport * as Styled from './style'\nimport type { InputCheckboxProps } from './types'\n\nconst COMPONENT_NAME = 'InputCheckbox'\n\n/**\n *\n * Component
|
|
1
|
+
{"version":3,"file":"InputCheckbox.js","sources":["../../../../src/components/InputCheckbox/InputCheckbox.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { SIZES } from './constants'\nimport * as Styled from './style'\nimport type { InputCheckboxProps } from './types'\n\nconst COMPONENT_NAME = 'InputCheckbox'\n\n/**\n *\n * Component accepts all \\<input\\> attributes.\n *\n * Responsive \"size\" props are supported.\n *\n * Exposed \"ref\" attached to \\<input\\>.\n *\n * See full [InputCheckboxProps](https://github.com/foxford/ui/blob/master/src/components/InputCheckbox/types.ts)\n *\n * @visibleName Checkbox\n */\nconst InputCheckbox: React.ForwardRefExoticComponent<InputCheckboxProps> = withMergedProps<\n InputCheckboxProps,\n HTMLInputElement\n>(\n forwardRef(\n (\n {\n size = 'm',\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n sizes,\n sizeUnits,\n inline,\n error,\n success,\n onColored,\n palette,\n preset,\n cursor,\n style,\n indeterminate,\n className,\n ...inputProps\n },\n ref\n ) => {\n return (\n <Styled.Root\n size={size}\n sizeXXS={sizeXXS}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n sizes={sizes}\n sizeUnits={sizeUnits}\n inline={inline}\n error={error}\n success={success}\n onColored={onColored}\n palette={palette}\n preset={preset}\n cursor={cursor}\n style={style}\n indeterminate={indeterminate}\n className={className}\n >\n <Styled.Input {...inputProps} type='checkbox' ref={ref} />\n <Styled.InputMask>\n {indeterminate === true ? <Styled.InputIndeterminate /> : <Styled.InputChecked />}\n </Styled.InputMask>\n </Styled.Root>\n )\n }\n ),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { InputCheckbox, COMPONENT_NAME }\n"],"names":["COMPONENT_NAME","InputCheckbox","withMergedProps","forwardRef","_ref","ref","size","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","sizes","sizeUnits","inline","error","success","onColored","palette","preset","cursor","style","indeterminate","className","inputProps","_objectWithoutProperties","_excluded","_jsxs","Styled.Root","children","_jsx","Styled.Input","type","Styled.InputMask","Styled.InputIndeterminate","Styled.InputChecked","displayName","SIZES"],"mappings":"klBAMMA,IAAAA,EAAiB,gBAcjBC,IAAAA,EAAqEC,EAIzEC,GAAAA,CACEC,EAuBEC,KACG,IAvBHC,KACEA,EAAO,IADTC,QAEEA,EAFFC,OAGEA,EAHFC,MAIEA,EAJFC,MAKEA,EALFC,MAMEA,EANFC,OAOEA,EAPFC,MAQEA,EARFC,UASEA,EATFC,OAUEA,EAVFC,MAWEA,EAXFC,QAYEA,EAZFC,UAaEA,EAbFC,QAcEA,EAdFC,OAeEA,EAfFC,OAgBEA,EAhBFC,MAiBEA,EAjBFC,cAkBEA,EAlBFC,UAmBEA,GAICpB,EAHEqB,EAGFC,EAAAtB,EAAAuB,GACH,OACEC,EAACC,EAAD,CACEvB,KAAMA,EACNC,QAASA,EACTC,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,EACRC,MAAOA,EACPC,UAAWA,EACXC,OAAQA,EACRC,MAAOA,EACPC,QAASA,EACTC,UAAWA,EACXC,QAASA,EACTC,OAAQA,EACRC,OAAQA,EACRC,MAAOA,EACPC,cAAeA,EACfC,UAAWA,EAnBbM,SAAA,CAqBEC,EAACC,SAAiBP,GAAlB,GAAA,CAA8BQ,KAAK,WAAW5B,IAAKA,KACnD0B,EAACG,EAAD,CAAAJ,SAC4BC,GAAP,IAAlBR,EAA0BY,EAAgCC,EAA1D,YAMX,CACEC,YA3EmB,gBA4EnBxB,MAAOyB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputRadio.js","sources":["../../../../src/components/InputRadio/InputRadio.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { SIZES } from './constants'\nimport * as Styled from './style'\nimport type { InputRadioProps } from './types'\n\nconst COMPONENT_NAME = 'InputRadio'\n\n/**\n *\n * Component
|
|
1
|
+
{"version":3,"file":"InputRadio.js","sources":["../../../../src/components/InputRadio/InputRadio.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { SIZES } from './constants'\nimport * as Styled from './style'\nimport type { InputRadioProps } from './types'\n\nconst COMPONENT_NAME = 'InputRadio'\n\n/**\n *\n * Component accepts all \\<input\\> attributes.\n *\n * Responsive \"size\" props are supported.\n *\n * Exposed \"ref\" attached to \\<input\\>.\n *\n * See full [InputRadioProps](https://github.com/foxford/ui/blob/master/src/components/InputRadio/types.ts)\n *\n * @visibleName Radio\n */\nconst InputRadio: React.ForwardRefExoticComponent<InputRadioProps> = withMergedProps<InputRadioProps, HTMLInputElement>(\n forwardRef(\n (\n {\n size = 'm',\n sizeXXS,\n sizeXS,\n sizeS,\n sizeM,\n sizeL,\n sizeXL,\n sizes,\n sizeUnits,\n inline,\n error,\n success,\n onColored,\n palette,\n preset,\n cursor,\n style,\n className,\n ...inputProps\n },\n ref\n ) => {\n return (\n <Styled.Root\n size={size}\n sizeXXS={sizeXXS}\n sizeXS={sizeXS}\n sizeS={sizeS}\n sizeM={sizeM}\n sizeL={sizeL}\n sizeXL={sizeXL}\n sizes={sizes}\n sizeUnits={sizeUnits}\n inline={inline}\n error={error}\n success={success}\n onColored={onColored}\n palette={palette}\n preset={preset}\n cursor={cursor}\n style={style}\n className={className}\n >\n <Styled.Input {...inputProps} type='radio' ref={ref} />\n <Styled.InputMask />\n </Styled.Root>\n )\n }\n ),\n {\n displayName: COMPONENT_NAME,\n sizes: SIZES,\n }\n)\n\nexport { InputRadio, COMPONENT_NAME }\n"],"names":["COMPONENT_NAME","InputRadio","withMergedProps","forwardRef","_ref","ref","size","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","sizes","sizeUnits","inline","error","success","onColored","palette","preset","cursor","style","className","inputProps","_objectWithoutProperties","_excluded","_jsxs","Styled.Root","children","_jsx","Styled.Input","type","Styled.InputMask","displayName","SIZES"],"mappings":"whBAMMA,IAAAA,EAAiB,aAcjBC,IAAAA,EAA+DC,EACnEC,IACEC,EAsBEC,KACG,IAtBHC,KACEA,EAAO,IADTC,QAEEA,EAFFC,OAGEA,EAHFC,MAIEA,EAJFC,MAKEA,EALFC,MAMEA,EANFC,OAOEA,EAPFC,MAQEA,EARFC,UASEA,EATFC,OAUEA,EAVFC,MAWEA,EAXFC,QAYEA,EAZFC,UAaEA,EAbFC,QAcEA,EAdFC,OAeEA,EAfFC,OAgBEA,EAhBFC,MAiBEA,EAjBFC,UAkBEA,GAICnB,EAHEoB,EAGFC,EAAArB,EAAAsB,GACH,OACEC,EAACC,EAAD,CACEtB,KAAMA,EACNC,QAASA,EACTC,OAAQA,EACRC,MAAOA,EACPC,MAAOA,EACPC,MAAOA,EACPC,OAAQA,EACRC,MAAOA,EACPC,UAAWA,EACXC,OAAQA,EACRC,MAAOA,EACPC,QAASA,EACTC,UAAWA,EACXC,QAASA,EACTC,OAAQA,EACRC,OAAQA,EACRC,MAAOA,EACPC,UAAWA,EAlBbM,SAAA,CAoBEC,EAACC,SAAiBP,GAAlB,GAAA,CAA8BQ,KAAK,QAAQ3B,IAAKA,KAChDyB,EAACG,EArBH,UA0BN,CACEC,YApEmB,aAqEnBrB,MAAOsB"}
|