@foxford/ui 2.21.1 → 2.21.2-beta-a8b0c62-20240328

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.
Files changed (71) hide show
  1. package/components/Anchor/style.js +1 -1
  2. package/components/Anchor/style.js.map +1 -1
  3. package/components/Arrow/Arrow.js +1 -1
  4. package/components/Arrow/Arrow.js.map +1 -1
  5. package/components/Arrow/constants.js +1 -1
  6. package/components/Arrow/constants.js.map +1 -1
  7. package/components/Arrow/default-constants.js +2 -0
  8. package/components/Arrow/default-constants.js.map +1 -0
  9. package/components/Arrow/style.js +1 -1
  10. package/components/Arrow/style.js.map +1 -1
  11. package/components/ArrowBadge/ArrowBadge.js +1 -1
  12. package/components/ArrowBadge/ArrowBadge.js.map +1 -1
  13. package/components/ArrowBadge/style.js +1 -1
  14. package/components/ArrowBadge/style.js.map +1 -1
  15. package/components/Badge/style.js +1 -1
  16. package/components/Badge/style.js.map +1 -1
  17. package/components/Button/Button.js +1 -1
  18. package/components/Button/Button.js.map +1 -1
  19. package/components/Button/constants.js +1 -1
  20. package/components/Button/constants.js.map +1 -1
  21. package/components/Button/default-constants.js +2 -0
  22. package/components/Button/default-constants.js.map +1 -0
  23. package/components/Button/style.js +1 -1
  24. package/components/Button/style.js.map +1 -1
  25. package/components/FormInputLabel/FormInputLabel.js +1 -1
  26. package/components/FormInputLabel/FormInputLabel.js.map +1 -1
  27. package/components/FormInputLabel/style.js +1 -1
  28. package/components/FormInputLabel/style.js.map +1 -1
  29. package/components/FormLabel/FormLabel.js +1 -1
  30. package/components/FormLabel/FormLabel.js.map +1 -1
  31. package/components/FormLabel/style.js +1 -1
  32. package/components/FormLabel/style.js.map +1 -1
  33. package/components/Input/Input.js +1 -1
  34. package/components/Input/Input.js.map +1 -1
  35. package/components/Input/style.js +1 -1
  36. package/components/Input/style.js.map +1 -1
  37. package/components/InputCheckbox/InputCheckbox.js +1 -1
  38. package/components/InputCheckbox/InputCheckbox.js.map +1 -1
  39. package/components/InputCheckbox/constants.js +1 -1
  40. package/components/InputCheckbox/constants.js.map +1 -1
  41. package/components/InputCheckbox/style.js +1 -1
  42. package/components/InputCheckbox/style.js.map +1 -1
  43. package/components/InputRadio/InputRadio.js +1 -1
  44. package/components/InputRadio/InputRadio.js.map +1 -1
  45. package/components/InputRadio/style.js +1 -1
  46. package/components/InputRadio/style.js.map +1 -1
  47. package/components/Tab/Tab.js +1 -1
  48. package/components/Tab/Tab.js.map +1 -1
  49. package/components/Tab/constants.js +1 -1
  50. package/components/Tab/constants.js.map +1 -1
  51. package/components/Tab/default-constants.js +2 -0
  52. package/components/Tab/default-constants.js.map +1 -0
  53. package/components/Tab/style.js +1 -1
  54. package/components/Tab/style.js.map +1 -1
  55. package/components/Text/Text.js +1 -1
  56. package/components/Text/Text.js.map +1 -1
  57. package/components/Text/constants.js +1 -1
  58. package/components/Text/constants.js.map +1 -1
  59. package/components/Text/default-constants.js +2 -0
  60. package/components/Text/default-constants.js.map +1 -0
  61. package/components/Text/style.js +1 -1
  62. package/components/Text/style.js.map +1 -1
  63. package/components/Textarea/style.js +1 -1
  64. package/components/Textarea/style.js.map +1 -1
  65. package/dts/index.d.ts +252 -200
  66. package/hocs/withMergedProps.js.map +1 -1
  67. package/index.cjs.js +1 -1
  68. package/index.cjs.js.map +1 -1
  69. package/package.json +2 -1
  70. package/shared/regexp.js +1 -1
  71. package/shared/regexp.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Text.js","sources":["../../../../src/components/Text/Text.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { useClassname } from 'hooks/useClassname'\nimport { TextHeading } from 'components/Text.Heading'\nimport { TextEllipse } from 'components/Text.Ellipse'\nimport type { TextProps } from './types'\nimport { APPEARANCE, SIZES, SIZES_DEFAULT } from './constants'\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Text'\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 [TextProps](https://github.com/foxford/ui/blob/master/src/components/Text/types.ts)\n */\nconst Text: React.ForwardRefExoticComponent<TextProps> & { Heading: typeof TextHeading; Ellipse: typeof TextEllipse } =\n Object.assign(\n withMergedProps<TextProps, HTMLDivElement>(\n forwardRef((props, ref) => {\n const textProps = props.appearance ? { ...APPEARANCE[props.appearance], ...props } : props\n\n const {\n size = 'm',\n weight = 'normal',\n lineHeight = 'm',\n fontStyle = 'normal',\n className,\n content,\n children,\n ...restProps\n } = textProps\n\n const textClassName = useClassname(COMPONENT_NAME, className)\n\n if (children) {\n return (\n <Styled.Root\n {...restProps}\n size={size}\n weight={weight}\n lineHeight={lineHeight}\n fontStyle={fontStyle}\n className={textClassName}\n ref={ref}\n >\n {children}\n </Styled.Root>\n )\n }\n\n return (\n <Styled.Root\n {...restProps}\n size={size}\n weight={weight}\n lineHeight={lineHeight}\n fontStyle={fontStyle}\n className={textClassName}\n dangerouslySetInnerHTML={{ __html: content || '' }}\n ref={ref}\n />\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => {\n if (typeof props.appearance === 'string') {\n return SIZES[props.appearance] ?? SIZES_DEFAULT\n }\n\n return SIZES_DEFAULT\n },\n }\n ),\n {\n Heading: TextHeading,\n Ellipse: TextEllipse,\n }\n )\n\nexport { Text, COMPONENT_NAME }\n"],"names":["COMPONENT_NAME","Text","Object","assign","withMergedProps","forwardRef","props","ref","textProps","appearance","APPEARANCE","size","weight","lineHeight","fontStyle","className","content","children","restProps","_excluded","textClassName","useClassname","_jsx","Styled.Root","dangerouslySetInnerHTML","__html","displayName","sizes","_SIZES$props$appearan","SIZES","SIZES_DEFAULT","Heading","TextHeading","Ellipse","TextEllipse"],"mappings":"knBASMA,IAAAA,EAAiB,OAYvB,IAAMC,EACJC,OAAOC,OACLC,EACEC,GAAAA,CAAYC,EAAOC,KACjB,IAAMC,EAAYF,EAAMG,WAAkBC,EAAAA,EAAAA,GAAAA,EAAWJ,EAAMG,aAAgBH,GAAUA,EAErF,IAAMK,KACJA,EAAO,IADHC,OAEJA,EAAS,SAFLC,WAGJA,EAAa,IAHTC,UAIJA,EAAY,SAJRC,UAKJA,EALIC,QAMJA,EANIC,SAOJA,GAEET,EADCU,IACDV,EATJW,GAWA,IAAMC,EAAgBC,EA7BP,OA6BoCN,GAEnD,OAEIO,EAACC,SACKL,GADN,GAFAD,EAEA,CAEEN,KAAMA,EACNC,OAAQA,EACRC,WAAYA,EACZC,UAAWA,EACXC,UAAWK,EACXb,IAAKA,EAPPU,SASGA,GAML,CAEEN,KAAMA,EACNC,OAAQA,EACRC,WAAYA,EACZC,UAAWA,EACXC,UAAWK,EACXI,wBAAyB,CAAEC,OAAQT,GAAW,IAC9CT,IAAKA,QAIX,CACEmB,YA7De,OA8DfC,MAAQrB,IACoC,IAAAsB,EAA1C,MAAgC,iBAArBtB,EAAMG,oBACfmB,EAAOC,EAAMvB,EAAMG,2BAGdqB,KAIb,CACEC,QAASC,EACTC,QAASC"}
1
+ {"version":3,"file":"Text.js","sources":["../../../../src/components/Text/Text.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { withMergedProps } from 'hocs/withMergedProps'\nimport { useClassname } from 'hooks/useClassname'\nimport { TextHeading } from 'components/Text.Heading'\nimport { TextEllipse } from 'components/Text.Ellipse'\nimport type { TextProps } from './types'\nimport { APPEARANCE, SIZES } from './constants'\nimport { SIZES_DEFAULT } from './default-constants'\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Text'\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 [TextProps](https://github.com/foxford/ui/blob/master/src/components/Text/types.ts)\n */\nconst Text: React.ForwardRefExoticComponent<TextProps> & { Heading: typeof TextHeading; Ellipse: typeof TextEllipse } =\n Object.assign(\n withMergedProps<TextProps, HTMLDivElement>(\n forwardRef((props, ref) => {\n const textProps = props.appearance ? { ...APPEARANCE[props.appearance], ...props } : props\n\n const {\n size = 'm',\n weight = 'normal',\n lineHeight = 'm',\n fontStyle = 'normal',\n className,\n content,\n children,\n ...restProps\n } = textProps\n\n const textClassName = useClassname(COMPONENT_NAME, className)\n\n if (children) {\n return (\n <Styled.Root\n {...restProps}\n size={size}\n weight={weight}\n lineHeight={lineHeight}\n fontStyle={fontStyle}\n className={textClassName}\n ref={ref}\n >\n {children}\n </Styled.Root>\n )\n }\n\n return (\n <Styled.Root\n {...restProps}\n size={size}\n weight={weight}\n lineHeight={lineHeight}\n fontStyle={fontStyle}\n className={textClassName}\n dangerouslySetInnerHTML={{ __html: content || '' }}\n ref={ref}\n />\n )\n }),\n {\n displayName: COMPONENT_NAME,\n sizes: (props) => {\n if (typeof props.appearance === 'string') {\n return SIZES[props.appearance] ?? SIZES_DEFAULT\n }\n\n return SIZES_DEFAULT\n },\n }\n ),\n {\n Heading: TextHeading,\n Ellipse: TextEllipse,\n }\n )\n\nexport { Text, COMPONENT_NAME }\n"],"names":["COMPONENT_NAME","Text","Object","assign","withMergedProps","forwardRef","props","ref","textProps","appearance","APPEARANCE","size","weight","lineHeight","fontStyle","className","content","children","restProps","_excluded","textClassName","useClassname","_jsx","Styled.Root","dangerouslySetInnerHTML","__html","displayName","sizes","_SIZES$props$appearan","SIZES","SIZES_DEFAULT","Heading","TextHeading","Ellipse","TextEllipse"],"mappings":"spBAUMA,IAAAA,EAAiB,OAYvB,IAAMC,EACJC,OAAOC,OACLC,EACEC,GAAAA,CAAYC,EAAOC,KACjB,IAAMC,EAAYF,EAAMG,WAAkBC,EAAAA,EAAAA,GAAAA,EAAWJ,EAAMG,aAAgBH,GAAUA,EAErF,IAAMK,KACJA,EAAO,IADHC,OAEJA,EAAS,SAFLC,WAGJA,EAAa,IAHTC,UAIJA,EAAY,SAJRC,UAKJA,EALIC,QAMJA,EANIC,SAOJA,GAEET,EADCU,IACDV,EATJW,GAWA,IAAMC,EAAgBC,EA7BP,OA6BoCN,GAEnD,OAEIO,EAACC,SACKL,GADN,GAFAD,EAEA,CAEEN,KAAMA,EACNC,OAAQA,EACRC,WAAYA,EACZC,UAAWA,EACXC,UAAWK,EACXb,IAAKA,EAPPU,SASGA,GAML,CAEEN,KAAMA,EACNC,OAAQA,EACRC,WAAYA,EACZC,UAAWA,EACXC,UAAWK,EACXI,wBAAyB,CAAEC,OAAQT,GAAW,IAC9CT,IAAKA,QAIX,CACEmB,YA7De,OA8DfC,MAAQrB,IACoC,IAAAsB,EAA1C,MAAgC,iBAArBtB,EAAMG,oBACfmB,EAAOC,EAAMvB,EAAMG,2BAGdqB,KAIb,CACEC,QAASC,EACTC,QAASC"}
@@ -1,2 +1,2 @@
1
- var e={display:{lineHeight:1,weight:800,fontStyle:'normal'},heading:{lineHeight:1.1,weight:800,fontStyle:'normal'},subheading:{lineHeight:1.1,weight:700,fontStyle:'normal'},'subheading-compact':{lineHeight:1.3,weight:800,fontStyle:'normal'},body:{lineHeight:1.3,weight:400,fontStyle:'normal'},caption:{lineHeight:1.2,weight:400,fontStyle:'normal'}};var t={display:{xxxl:{fontSize:84},xxl:{fontSize:76},xl:{fontSize:68},l:{fontSize:60},m:{fontSize:52},s:{fontSize:44},xs:{fontSize:36},xxs:{fontSize:28},xxxs:{fontSize:20}},heading:{xxxl:{fontSize:64},xxl:{fontSize:56},xl:{fontSize:48},l:{fontSize:40},m:{fontSize:36},s:{fontSize:32},xs:{fontSize:28},xxs:{fontSize:24},xxxs:{fontSize:20}},subheading:{xxxl:{fontSize:52},xxl:{fontSize:46},xl:{fontSize:40},l:{fontSize:34},m:{fontSize:28},s:{fontSize:24},xs:{fontSize:20},xxs:{fontSize:16},xxxs:{fontSize:12}},'subheading-compact':{xxxl:{fontSize:36},xxl:{fontSize:32},xl:{fontSize:28},l:{fontSize:24},m:{fontSize:20},s:{fontSize:18},xs:{fontSize:16},xxs:{fontSize:14},xxxs:{fontSize:12}},body:{xxxl:{fontSize:32},xxl:{fontSize:28},xl:{fontSize:24},l:{fontSize:20},m:{fontSize:18},s:{fontSize:16},xs:{fontSize:14},xxs:{fontSize:12},xxxs:{fontSize:10}},caption:{xxxl:{fontSize:32},xxl:{fontSize:28},xl:{fontSize:24},l:{fontSize:20},m:{fontSize:18},s:{fontSize:16},xs:{fontSize:14},xxs:{fontSize:12},xxxs:{fontSize:10}}};var i={xxxl:{fontSize:24},xxl:{fontSize:22},xl:{fontSize:20},l:{fontSize:18},m:{fontSize:16},s:{fontSize:14},xs:{fontSize:12},xxs:{fontSize:10},xxxs:{fontSize:8}};export{e as APPEARANCE,t as SIZES,i as SIZES_DEFAULT};
1
+ var e={display:{lineHeight:1,weight:800,fontStyle:'normal'},heading:{lineHeight:1.1,weight:800,fontStyle:'normal'},subheading:{lineHeight:1.1,weight:700,fontStyle:'normal'},'subheading-compact':{lineHeight:1.3,weight:800,fontStyle:'normal'},body:{lineHeight:1.3,weight:400,fontStyle:'normal'},caption:{lineHeight:1.2,weight:400,fontStyle:'normal'}};var t={display:{xxxl:{fontSize:84},xxl:{fontSize:76},xl:{fontSize:68},l:{fontSize:60},m:{fontSize:52},s:{fontSize:44},xs:{fontSize:36},xxs:{fontSize:28},xxxs:{fontSize:20}},heading:{xxxl:{fontSize:64},xxl:{fontSize:56},xl:{fontSize:48},l:{fontSize:40},m:{fontSize:36},s:{fontSize:32},xs:{fontSize:28},xxs:{fontSize:24},xxxs:{fontSize:20}},subheading:{xxxl:{fontSize:52},xxl:{fontSize:46},xl:{fontSize:40},l:{fontSize:34},m:{fontSize:28},s:{fontSize:24},xs:{fontSize:20},xxs:{fontSize:16},xxxs:{fontSize:12}},'subheading-compact':{xxxl:{fontSize:36},xxl:{fontSize:32},xl:{fontSize:28},l:{fontSize:24},m:{fontSize:20},s:{fontSize:18},xs:{fontSize:16},xxs:{fontSize:14},xxxs:{fontSize:12}},body:{xxxl:{fontSize:32},xxl:{fontSize:28},xl:{fontSize:24},l:{fontSize:20},m:{fontSize:18},s:{fontSize:16},xs:{fontSize:14},xxs:{fontSize:12},xxxs:{fontSize:10}},caption:{xxxl:{fontSize:32},xxl:{fontSize:28},xl:{fontSize:24},l:{fontSize:20},m:{fontSize:18},s:{fontSize:16},xs:{fontSize:14},xxs:{fontSize:12},xxxs:{fontSize:10}}};export{e as APPEARANCE,t as SIZES};
2
2
  //# sourceMappingURL=constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../src/components/Text/constants.ts"],"sourcesContent":["import type { Sizes } from 'shared/types'\nimport type { TypographyAppearance, TextProps } from './types'\n\nexport const APPEARANCE: Record<TypographyAppearance, Partial<Omit<TextProps, 'size' | 'appearance'>>> = {\n display: {\n lineHeight: 1,\n weight: 800,\n fontStyle: 'normal',\n },\n heading: {\n lineHeight: 1.1,\n weight: 800,\n fontStyle: 'normal',\n },\n subheading: {\n lineHeight: 1.1,\n weight: 700,\n fontStyle: 'normal',\n },\n 'subheading-compact': {\n lineHeight: 1.3,\n weight: 800,\n fontStyle: 'normal',\n },\n body: {\n lineHeight: 1.3,\n weight: 400,\n fontStyle: 'normal',\n },\n caption: {\n lineHeight: 1.2,\n weight: 400,\n fontStyle: 'normal',\n },\n}\n\nexport const SIZES: Record<TypographyAppearance, Sizes> = {\n display: {\n xxxl: {\n fontSize: 84,\n },\n xxl: {\n fontSize: 76,\n },\n xl: {\n fontSize: 68,\n },\n l: {\n fontSize: 60,\n },\n m: {\n fontSize: 52,\n },\n s: {\n fontSize: 44,\n },\n xs: {\n fontSize: 36,\n },\n xxs: {\n fontSize: 28,\n },\n xxxs: {\n fontSize: 20,\n },\n },\n heading: {\n xxxl: {\n fontSize: 64,\n },\n xxl: {\n fontSize: 56,\n },\n xl: {\n fontSize: 48,\n },\n l: {\n fontSize: 40,\n },\n m: {\n fontSize: 36,\n },\n s: {\n fontSize: 32,\n },\n xs: {\n fontSize: 28,\n },\n xxs: {\n fontSize: 24,\n },\n xxxs: {\n fontSize: 20,\n },\n },\n subheading: {\n xxxl: {\n fontSize: 52,\n },\n xxl: {\n fontSize: 46,\n },\n xl: {\n fontSize: 40,\n },\n l: {\n fontSize: 34,\n },\n m: {\n fontSize: 28,\n },\n s: {\n fontSize: 24,\n },\n xs: {\n fontSize: 20,\n },\n xxs: {\n fontSize: 16,\n },\n xxxs: {\n fontSize: 12,\n },\n },\n 'subheading-compact': {\n xxxl: {\n fontSize: 36,\n },\n xxl: {\n fontSize: 32,\n },\n xl: {\n fontSize: 28,\n },\n l: {\n fontSize: 24,\n },\n m: {\n fontSize: 20,\n },\n s: {\n fontSize: 18,\n },\n xs: {\n fontSize: 16,\n },\n xxs: {\n fontSize: 14,\n },\n xxxs: {\n fontSize: 12,\n },\n },\n body: {\n xxxl: {\n fontSize: 32,\n },\n xxl: {\n fontSize: 28,\n },\n xl: {\n fontSize: 24,\n },\n l: {\n fontSize: 20,\n },\n m: {\n fontSize: 18,\n },\n s: {\n fontSize: 16,\n },\n xs: {\n fontSize: 14,\n },\n xxs: {\n fontSize: 12,\n },\n xxxs: {\n fontSize: 10,\n },\n },\n caption: {\n xxxl: {\n fontSize: 32,\n },\n xxl: {\n fontSize: 28,\n },\n xl: {\n fontSize: 24,\n },\n l: {\n fontSize: 20,\n },\n m: {\n fontSize: 18,\n },\n s: {\n fontSize: 16,\n },\n xs: {\n fontSize: 14,\n },\n xxs: {\n fontSize: 12,\n },\n xxxs: {\n fontSize: 10,\n },\n },\n}\n\nexport const SIZES_DEFAULT: Sizes = {\n xxxl: {\n fontSize: 24,\n },\n xxl: {\n fontSize: 22,\n },\n xl: {\n fontSize: 20,\n },\n l: {\n fontSize: 18,\n },\n m: {\n fontSize: 16,\n },\n s: {\n fontSize: 14,\n },\n xs: {\n fontSize: 12,\n },\n xxs: {\n fontSize: 10,\n },\n xxxs: {\n fontSize: 8,\n },\n}\n"],"names":["APPEARANCE","display","lineHeight","weight","fontStyle","heading","subheading","body","caption","SIZES","xxxl","fontSize","xxl","xl","l","m","s","xs","xxs","xxxs","SIZES_DEFAULT"],"mappings":"AAGO,IAAMA,EAA4F,CACvGC,QAAS,CACPC,WAAY,EACZC,OAAQ,IACRC,UAAW,UAEbC,QAAS,CACPH,WAAY,IACZC,OAAQ,IACRC,UAAW,UAEbE,WAAY,CACVJ,WAAY,IACZC,OAAQ,IACRC,UAAW,UAEb,qBAAsB,CACpBF,WAAY,IACZC,OAAQ,IACRC,UAAW,UAEbG,KAAM,CACJL,WAAY,IACZC,OAAQ,IACRC,UAAW,UAEbI,QAAS,CACPN,WAAY,IACZC,OAAQ,IACRC,UAAW,WAIR,IAAMK,EAA6C,CACxDR,QAAS,CACPS,KAAM,CACJC,SAAU,IAEZC,IAAK,CACHD,SAAU,IAEZE,GAAI,CACFF,SAAU,IAEZG,EAAG,CACDH,SAAU,IAEZI,EAAG,CACDJ,SAAU,IAEZK,EAAG,CACDL,SAAU,IAEZM,GAAI,CACFN,SAAU,IAEZO,IAAK,CACHP,SAAU,IAEZQ,KAAM,CACJR,SAAU,KAGdN,QAAS,CACPK,KAAM,CACJC,SAAU,IAEZC,IAAK,CACHD,SAAU,IAEZE,GAAI,CACFF,SAAU,IAEZG,EAAG,CACDH,SAAU,IAEZI,EAAG,CACDJ,SAAU,IAEZK,EAAG,CACDL,SAAU,IAEZM,GAAI,CACFN,SAAU,IAEZO,IAAK,CACHP,SAAU,IAEZQ,KAAM,CACJR,SAAU,KAGdL,WAAY,CACVI,KAAM,CACJC,SAAU,IAEZC,IAAK,CACHD,SAAU,IAEZE,GAAI,CACFF,SAAU,IAEZG,EAAG,CACDH,SAAU,IAEZI,EAAG,CACDJ,SAAU,IAEZK,EAAG,CACDL,SAAU,IAEZM,GAAI,CACFN,SAAU,IAEZO,IAAK,CACHP,SAAU,IAEZQ,KAAM,CACJR,SAAU,KAGd,qBAAsB,CACpBD,KAAM,CACJC,SAAU,IAEZC,IAAK,CACHD,SAAU,IAEZE,GAAI,CACFF,SAAU,IAEZG,EAAG,CACDH,SAAU,IAEZI,EAAG,CACDJ,SAAU,IAEZK,EAAG,CACDL,SAAU,IAEZM,GAAI,CACFN,SAAU,IAEZO,IAAK,CACHP,SAAU,IAEZQ,KAAM,CACJR,SAAU,KAGdJ,KAAM,CACJG,KAAM,CACJC,SAAU,IAEZC,IAAK,CACHD,SAAU,IAEZE,GAAI,CACFF,SAAU,IAEZG,EAAG,CACDH,SAAU,IAEZI,EAAG,CACDJ,SAAU,IAEZK,EAAG,CACDL,SAAU,IAEZM,GAAI,CACFN,SAAU,IAEZO,IAAK,CACHP,SAAU,IAEZQ,KAAM,CACJR,SAAU,KAGdH,QAAS,CACPE,KAAM,CACJC,SAAU,IAEZC,IAAK,CACHD,SAAU,IAEZE,GAAI,CACFF,SAAU,IAEZG,EAAG,CACDH,SAAU,IAEZI,EAAG,CACDJ,SAAU,IAEZK,EAAG,CACDL,SAAU,IAEZM,GAAI,CACFN,SAAU,IAEZO,IAAK,CACHP,SAAU,IAEZQ,KAAM,CACJR,SAAU,MAKT,IAAMS,EAAuB,CAClCV,KAAM,CACJC,SAAU,IAEZC,IAAK,CACHD,SAAU,IAEZE,GAAI,CACFF,SAAU,IAEZG,EAAG,CACDH,SAAU,IAEZI,EAAG,CACDJ,SAAU,IAEZK,EAAG,CACDL,SAAU,IAEZM,GAAI,CACFN,SAAU,IAEZO,IAAK,CACHP,SAAU,IAEZQ,KAAM,CACJR,SAAU"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/components/Text/constants.ts"],"sourcesContent":["import type { Sizes } from 'shared/types'\nimport type { TypographyAppearance, TextProps } from './types'\n\nexport const APPEARANCE: Record<TypographyAppearance, Partial<Omit<TextProps, 'size' | 'appearance'>>> = {\n display: {\n lineHeight: 1,\n weight: 800,\n fontStyle: 'normal',\n },\n heading: {\n lineHeight: 1.1,\n weight: 800,\n fontStyle: 'normal',\n },\n subheading: {\n lineHeight: 1.1,\n weight: 700,\n fontStyle: 'normal',\n },\n 'subheading-compact': {\n lineHeight: 1.3,\n weight: 800,\n fontStyle: 'normal',\n },\n body: {\n lineHeight: 1.3,\n weight: 400,\n fontStyle: 'normal',\n },\n caption: {\n lineHeight: 1.2,\n weight: 400,\n fontStyle: 'normal',\n },\n}\n\nexport const SIZES: Record<TypographyAppearance, Sizes> = {\n display: {\n xxxl: {\n fontSize: 84,\n },\n xxl: {\n fontSize: 76,\n },\n xl: {\n fontSize: 68,\n },\n l: {\n fontSize: 60,\n },\n m: {\n fontSize: 52,\n },\n s: {\n fontSize: 44,\n },\n xs: {\n fontSize: 36,\n },\n xxs: {\n fontSize: 28,\n },\n xxxs: {\n fontSize: 20,\n },\n },\n heading: {\n xxxl: {\n fontSize: 64,\n },\n xxl: {\n fontSize: 56,\n },\n xl: {\n fontSize: 48,\n },\n l: {\n fontSize: 40,\n },\n m: {\n fontSize: 36,\n },\n s: {\n fontSize: 32,\n },\n xs: {\n fontSize: 28,\n },\n xxs: {\n fontSize: 24,\n },\n xxxs: {\n fontSize: 20,\n },\n },\n subheading: {\n xxxl: {\n fontSize: 52,\n },\n xxl: {\n fontSize: 46,\n },\n xl: {\n fontSize: 40,\n },\n l: {\n fontSize: 34,\n },\n m: {\n fontSize: 28,\n },\n s: {\n fontSize: 24,\n },\n xs: {\n fontSize: 20,\n },\n xxs: {\n fontSize: 16,\n },\n xxxs: {\n fontSize: 12,\n },\n },\n 'subheading-compact': {\n xxxl: {\n fontSize: 36,\n },\n xxl: {\n fontSize: 32,\n },\n xl: {\n fontSize: 28,\n },\n l: {\n fontSize: 24,\n },\n m: {\n fontSize: 20,\n },\n s: {\n fontSize: 18,\n },\n xs: {\n fontSize: 16,\n },\n xxs: {\n fontSize: 14,\n },\n xxxs: {\n fontSize: 12,\n },\n },\n body: {\n xxxl: {\n fontSize: 32,\n },\n xxl: {\n fontSize: 28,\n },\n xl: {\n fontSize: 24,\n },\n l: {\n fontSize: 20,\n },\n m: {\n fontSize: 18,\n },\n s: {\n fontSize: 16,\n },\n xs: {\n fontSize: 14,\n },\n xxs: {\n fontSize: 12,\n },\n xxxs: {\n fontSize: 10,\n },\n },\n caption: {\n xxxl: {\n fontSize: 32,\n },\n xxl: {\n fontSize: 28,\n },\n xl: {\n fontSize: 24,\n },\n l: {\n fontSize: 20,\n },\n m: {\n fontSize: 18,\n },\n s: {\n fontSize: 16,\n },\n xs: {\n fontSize: 14,\n },\n xxs: {\n fontSize: 12,\n },\n xxxs: {\n fontSize: 10,\n },\n },\n}\n"],"names":["APPEARANCE","display","lineHeight","weight","fontStyle","heading","subheading","body","caption","SIZES","xxxl","fontSize","xxl","xl","l","m","s","xs","xxs","xxxs"],"mappings":"AAGO,IAAMA,EAA4F,CACvGC,QAAS,CACPC,WAAY,EACZC,OAAQ,IACRC,UAAW,UAEbC,QAAS,CACPH,WAAY,IACZC,OAAQ,IACRC,UAAW,UAEbE,WAAY,CACVJ,WAAY,IACZC,OAAQ,IACRC,UAAW,UAEb,qBAAsB,CACpBF,WAAY,IACZC,OAAQ,IACRC,UAAW,UAEbG,KAAM,CACJL,WAAY,IACZC,OAAQ,IACRC,UAAW,UAEbI,QAAS,CACPN,WAAY,IACZC,OAAQ,IACRC,UAAW,WAIR,IAAMK,EAA6C,CACxDR,QAAS,CACPS,KAAM,CACJC,SAAU,IAEZC,IAAK,CACHD,SAAU,IAEZE,GAAI,CACFF,SAAU,IAEZG,EAAG,CACDH,SAAU,IAEZI,EAAG,CACDJ,SAAU,IAEZK,EAAG,CACDL,SAAU,IAEZM,GAAI,CACFN,SAAU,IAEZO,IAAK,CACHP,SAAU,IAEZQ,KAAM,CACJR,SAAU,KAGdN,QAAS,CACPK,KAAM,CACJC,SAAU,IAEZC,IAAK,CACHD,SAAU,IAEZE,GAAI,CACFF,SAAU,IAEZG,EAAG,CACDH,SAAU,IAEZI,EAAG,CACDJ,SAAU,IAEZK,EAAG,CACDL,SAAU,IAEZM,GAAI,CACFN,SAAU,IAEZO,IAAK,CACHP,SAAU,IAEZQ,KAAM,CACJR,SAAU,KAGdL,WAAY,CACVI,KAAM,CACJC,SAAU,IAEZC,IAAK,CACHD,SAAU,IAEZE,GAAI,CACFF,SAAU,IAEZG,EAAG,CACDH,SAAU,IAEZI,EAAG,CACDJ,SAAU,IAEZK,EAAG,CACDL,SAAU,IAEZM,GAAI,CACFN,SAAU,IAEZO,IAAK,CACHP,SAAU,IAEZQ,KAAM,CACJR,SAAU,KAGd,qBAAsB,CACpBD,KAAM,CACJC,SAAU,IAEZC,IAAK,CACHD,SAAU,IAEZE,GAAI,CACFF,SAAU,IAEZG,EAAG,CACDH,SAAU,IAEZI,EAAG,CACDJ,SAAU,IAEZK,EAAG,CACDL,SAAU,IAEZM,GAAI,CACFN,SAAU,IAEZO,IAAK,CACHP,SAAU,IAEZQ,KAAM,CACJR,SAAU,KAGdJ,KAAM,CACJG,KAAM,CACJC,SAAU,IAEZC,IAAK,CACHD,SAAU,IAEZE,GAAI,CACFF,SAAU,IAEZG,EAAG,CACDH,SAAU,IAEZI,EAAG,CACDJ,SAAU,IAEZK,EAAG,CACDL,SAAU,IAEZM,GAAI,CACFN,SAAU,IAEZO,IAAK,CACHP,SAAU,IAEZQ,KAAM,CACJR,SAAU,KAGdH,QAAS,CACPE,KAAM,CACJC,SAAU,IAEZC,IAAK,CACHD,SAAU,IAEZE,GAAI,CACFF,SAAU,IAEZG,EAAG,CACDH,SAAU,IAEZI,EAAG,CACDJ,SAAU,IAEZK,EAAG,CACDL,SAAU,IAEZM,GAAI,CACFN,SAAU,IAEZO,IAAK,CACHP,SAAU,IAEZQ,KAAM,CACJR,SAAU"}
@@ -0,0 +1,2 @@
1
+ var x={xxxl:{fontSize:24},xxl:{fontSize:22},xl:{fontSize:20},l:{fontSize:18},m:{fontSize:16},s:{fontSize:14},xs:{fontSize:12},xxs:{fontSize:10},xxxs:{fontSize:8}};export{x as SIZES_DEFAULT};
2
+ //# sourceMappingURL=default-constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"default-constants.js","sources":["../../../../src/components/Text/default-constants.ts"],"sourcesContent":["import type { Sizes } from 'shared/types'\n\nexport const SIZES_DEFAULT: Sizes = {\n xxxl: {\n fontSize: 24,\n },\n xxl: {\n fontSize: 22,\n },\n xl: {\n fontSize: 20,\n },\n l: {\n fontSize: 18,\n },\n m: {\n fontSize: 16,\n },\n s: {\n fontSize: 14,\n },\n xs: {\n fontSize: 12,\n },\n xxs: {\n fontSize: 10,\n },\n xxxs: {\n fontSize: 8,\n },\n}\n"],"names":["SIZES_DEFAULT","xxxl","fontSize","xxl","xl","l","m","s","xs","xxs","xxxs"],"mappings":"AAEO,IAAMA,EAAuB,CAClCC,KAAM,CACJC,SAAU,IAEZC,IAAK,CACHD,SAAU,IAEZE,GAAI,CACFF,SAAU,IAEZG,EAAG,CACDH,SAAU,IAEZI,EAAG,CACDJ,SAAU,IAEZK,EAAG,CACDL,SAAU,IAEZM,GAAI,CACFN,SAAU,IAEZO,IAAK,CACHP,SAAU,IAEZQ,KAAM,CACJR,SAAU"}
@@ -1,2 +1,2 @@
1
- import n from'styled-components';import{display as o}from'../../mixins/display.js';import{color as t}from'../../mixins/color.js';import{responsiveSize as e}from'../../mixins/responsive-size.js';import{responsiveMargin as i}from'../../mixins/responsive-margin.js';import{createShouldForwardProp as r}from'../../shared/utils/style.js';var a={lighter:100,normal:400,bold:600,bolder:800};var c={l:1.5,m:1.3,s:1.15,xs:1};var s=r((n=>!['appearance','fontFamily','weight','fontStyle','transform','underlineLinks','textAlign','lineHeight','content','display','chars','quoted','showZeroMinorPart','separator','underline','whiteSpace'].includes(n)));var l=n.div.withConfig({shouldForwardProp:s}).withConfig({componentId:"fox-ui__sc-s2fogy-0"})([""," "," "," "," ",""],(n=>{var o,t;return"\n margin: 0;\n ".concat(n.fontFamily?"font-family: ".concat(n.fontFamily,";"):'',"\n ").concat(n.transform?"text-transform: ".concat(n.transform,";"):'',"\n ").concat(n.weight?"font-weight: ".concat(null!==(o=a[n.weight])&&void 0!==o?o:n.weight,";"):'',"\n ").concat(n.fontStyle?"font-style: ".concat(n.fontStyle,";"):'',"\n ").concat(n.textAlign?"text-align: ".concat(n.textAlign,";"):'',"\n ").concat(n.lineHeight?"line-height: ".concat(null!==(t=c[n.lineHeight])&&void 0!==t?t:n.lineHeight,";"):'',"\n ").concat(n.underline?"border-bottom: 1px ".concat('string'==typeof n.underline?n.underline:'solid',";"):'',"\n ").concat(n.whiteSpace?"white-space: ".concat(n.whiteSpace,";"):'',"\n ").concat(n.cursor?"cursor: ".concat(n.cursor,";"):'',"\n a {\n text-decoration: ").concat(n.underlineLinks?'underline':'none',";\n &:hover {\n text-decoration: none;\n }\n }\n ")}),e,i,(n=>n.display?o(n.display):null),(n=>t(n.color?n.color:n.theme.textColor)));export{l as Root};
1
+ import n from'styled-components';import{display as o}from'../../mixins/display.js';import{color as t}from'../../mixins/color.js';import{responsiveSize as e}from'../../mixins/responsive-size.js';import{responsiveMargin as i}from'../../mixins/responsive-margin.js';import{createShouldForwardProp as r}from'../../shared/utils/style.js';var a={lighter:100,normal:400,bold:600,bolder:800};var s={l:1.5,m:1.3,s:1.15,xs:1};var c=r((n=>!['appearance','fontFamily','weight','fontStyle','transform','underlineLinks','textAlign','lineHeight','content','display','chars','quoted','showZeroMinorPart','separator','underline','whiteSpace'].includes(n)));var l=n.div.withConfig({shouldForwardProp:c}).withConfig({componentId:"fox-ui__sc-s2fogy-0"})([""," "," "," "," ",""],(n=>{var o,t;return"\n margin: 0;\n ".concat(n.fontFamily?"font-family: ".concat(n.fontFamily,";"):'',"\n ").concat(n.transform?"text-transform: ".concat(n.transform,";"):'',"\n ").concat(n.weight?"font-weight: ".concat(null!==(o=a[n.weight])&&void 0!==o?o:n.weight,";"):'',"\n ").concat(n.fontStyle?"font-style: ".concat(n.fontStyle,";"):'',"\n ").concat(n.textAlign?"text-align: ".concat(n.textAlign,";"):'',"\n ").concat(n.lineHeight?"line-height: ".concat(null!==(t=s[n.lineHeight])&&void 0!==t?t:n.lineHeight,";"):'',"\n ").concat(n.underline?"border-bottom: 1px ".concat('string'==typeof n.underline?n.underline:'solid',";"):'',"\n ").concat(n.whiteSpace?"white-space: ".concat(n.whiteSpace,";"):'',"\n a {\n text-decoration: ").concat(n.underlineLinks?'underline':'none',";\n &:hover {\n text-decoration: none;\n }\n }\n ")}),e,i,(n=>n.display?o(n.display):null),(n=>t(n.color?n.color:n.theme.textColor)));export{l as Root};
2
2
  //# sourceMappingURL=style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sources":["../../../../src/components/Text/style.ts"],"sourcesContent":["import styled from 'styled-components'\nimport { display } from 'mixins/display'\nimport { color } from 'mixins/color'\nimport { responsiveSize } from 'mixins/responsive-size'\nimport { responsiveMargin } from 'mixins/responsive-margin'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport type { Color } from 'shared/types'\nimport type { StyledTextProps } from './types'\n\nconst WEIGHT_MAP = {\n lighter: 100,\n normal: 400,\n bold: 600,\n bolder: 800,\n}\n\nconst LINE_HEIGHT_MAP = {\n l: 1.5,\n m: 1.3,\n s: 1.15,\n xs: 1,\n}\n\nconst shouldForwardTextProp = createShouldForwardProp(\n (propKey) =>\n ![\n 'appearance',\n 'fontFamily',\n 'weight',\n 'fontStyle',\n 'transform',\n 'underlineLinks',\n 'textAlign',\n 'lineHeight',\n 'content',\n 'display',\n 'chars',\n 'quoted',\n 'showZeroMinorPart',\n 'separator',\n 'underline',\n 'whiteSpace',\n ].includes(propKey)\n)\n\nexport const Root = styled.div.withConfig<StyledTextProps>({\n shouldForwardProp: shouldForwardTextProp,\n})`\n ${(props) => `\n margin: 0;\n ${props.fontFamily ? `font-family: ${props.fontFamily};` : ''}\n ${props.transform ? `text-transform: ${props.transform};` : ''}\n ${props.weight ? `font-weight: ${WEIGHT_MAP[props.weight] ?? props.weight};` : ''}\n ${props.fontStyle ? `font-style: ${props.fontStyle};` : ''}\n ${props.textAlign ? `text-align: ${props.textAlign};` : ''}\n ${props.lineHeight ? `line-height: ${LINE_HEIGHT_MAP[props.lineHeight] ?? props.lineHeight};` : ''}\n ${props.underline ? `border-bottom: 1px ${typeof props.underline === 'string' ? props.underline : 'solid'};` : ''}\n ${props.whiteSpace ? `white-space: ${props.whiteSpace};` : ''}\n ${props.cursor ? `cursor: ${props.cursor};` : ''}\n a {\n text-decoration: ${props.underlineLinks ? 'underline' : 'none'};\n &:hover {\n text-decoration: none;\n }\n }\n `}\n\n ${responsiveSize}\n ${responsiveMargin}\n\n ${(props) => (props.display ? display(props.display) : null)}\n ${(props) => (props.color ? color(props.color) : color(props.theme.textColor as Color))}\n`\n"],"names":["WEIGHT_MAP","lighter","normal","bold","bolder","LINE_HEIGHT_MAP","l","m","s","xs","shouldForwardTextProp","createShouldForwardProp","propKey","includes","Root","styled","div","withConfig","shouldForwardProp","componentId","props","_WEIGHT_MAP$props$wei","_LINE_HEIGHT_MAP$prop","fontFamily","transform","concat","weight","fontStyle","textAlign","lineHeight","underline","whiteSpace","cursor","underlineLinks","responsiveSize","responsiveMargin","display","color","theme","textColor"],"mappings":"6UASA,IAAMA,EAAa,CACjBC,QAAS,IACTC,OAAQ,IACRC,KAAM,IACNC,OAAQ,KAGV,IAAMC,EAAkB,CACtBC,EAAG,IACHC,EAAG,IACHC,EAAG,KACHC,GAAI,GAGN,IAAMC,EAAwBC,GAC3BC,IACE,CACC,aACA,aACA,SACA,YACA,YACA,iBACA,YACA,aACA,UACA,UACA,QACA,SACA,oBACA,YACA,YACA,cACAC,SAASD,KAGR,IAAME,EAAOC,EAAOC,IAAIC,WAA4B,CACzDC,kBAAmBR,IADJO,WAAA,CAAAE,YAAA,uBAAGJ,CAAH,CAAA,GAAA,IAAA,IAAA,IAAA,IAAA,KAGZK,IAAD,IAAAC,EAAAC,EAAA,MAEEF,yBAAAA,OAAAA,EAAMG,WAA6BH,gBAAAA,OAAAA,EAAMG,WAAgB,KAAA,GACzDH,UAAAA,OAAAA,EAAMI,oCAA+BJ,EAAMI,UAA3C,KAA0D,GAH5D,UAAAC,OAIEL,EAAMM,OAAN,gBAAAD,OAAA,QAAAJ,EAA+BrB,EAAWoB,EAAMM,eAAhD,IAAAL,EAAAA,EAA2DD,EAAMM,OAAjE,KAA6E,GAJ/E,UAAAD,OAKEL,EAAMO,UAAN,eAAAF,OAAiCL,EAAMO,UAAvC,KAAsD,GALxD,UAAAF,OAMEL,EAAMQ,UAAN,eAAAH,OAAiCL,EAAMQ,UAAvC,KAAsD,GANxD,UAAAH,OAOEL,EAAMS,WAA6BxB,gBAAAA,OAAnC,QAAmCA,EAAAA,EAAgBe,EAAMS,mBAAzD,IAAAP,EAAAA,EAAwEF,EAAMS,WAA9E,KAA8F,GAPhG,UAAAJ,OAQEL,EAAMU,UAAN,sBAAAL,OAAmE,iBAApBL,EAAMU,UAAyBV,EAAMU,UAAY,aAAa,GAR/G,UAAAL,OASEL,EAAMW,WAAN,gBAAAN,OAAmCL,EAAMW,WAAzC,KAAyD,GAT3D,UAAAN,OAUEL,EAAMY,OAAN,WAAAP,OAA0BL,EAAMY,OAAhC,KAA4C,GAV9C,sCAAAP,OAYqBL,EAAMa,eAAiB,YAAc,OAZ1D,4EAmBAC,EACAC,GAECf,GAAWA,EAAMgB,QAAUA,EAAQhB,EAAMgB,SAAW,OACpDhB,GAAyBiB,EAAdjB,EAAMiB,MAAcjB,EAAMiB,MAAejB,EAAMkB,MAAMC"}
1
+ {"version":3,"file":"style.js","sources":["../../../../src/components/Text/style.ts"],"sourcesContent":["import styled from 'styled-components'\nimport { display } from 'mixins/display'\nimport { color } from 'mixins/color'\nimport { responsiveSize } from 'mixins/responsive-size'\nimport { responsiveMargin } from 'mixins/responsive-margin'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport type { Color } from 'shared/types'\nimport type { StyledTextProps } from './types'\n\nconst WEIGHT_MAP = {\n lighter: 100,\n normal: 400,\n bold: 600,\n bolder: 800,\n}\n\nconst LINE_HEIGHT_MAP = {\n l: 1.5,\n m: 1.3,\n s: 1.15,\n xs: 1,\n}\n\nconst shouldForwardTextProp = createShouldForwardProp(\n (propKey) =>\n ![\n 'appearance',\n 'fontFamily',\n 'weight',\n 'fontStyle',\n 'transform',\n 'underlineLinks',\n 'textAlign',\n 'lineHeight',\n 'content',\n 'display',\n 'chars',\n 'quoted',\n 'showZeroMinorPart',\n 'separator',\n 'underline',\n 'whiteSpace',\n ].includes(propKey)\n)\n\nexport const Root = styled.div.withConfig<StyledTextProps>({\n shouldForwardProp: shouldForwardTextProp,\n})`\n ${(props) => `\n margin: 0;\n ${props.fontFamily ? `font-family: ${props.fontFamily};` : ''}\n ${props.transform ? `text-transform: ${props.transform};` : ''}\n ${props.weight ? `font-weight: ${WEIGHT_MAP[props.weight] ?? props.weight};` : ''}\n ${props.fontStyle ? `font-style: ${props.fontStyle};` : ''}\n ${props.textAlign ? `text-align: ${props.textAlign};` : ''}\n ${props.lineHeight ? `line-height: ${LINE_HEIGHT_MAP[props.lineHeight] ?? props.lineHeight};` : ''}\n ${props.underline ? `border-bottom: 1px ${typeof props.underline === 'string' ? props.underline : 'solid'};` : ''}\n ${props.whiteSpace ? `white-space: ${props.whiteSpace};` : ''}\n a {\n text-decoration: ${props.underlineLinks ? 'underline' : 'none'};\n &:hover {\n text-decoration: none;\n }\n }\n `}\n\n ${responsiveSize}\n ${responsiveMargin}\n\n ${(props) => (props.display ? display(props.display) : null)}\n ${(props) => (props.color ? color(props.color) : color(props.theme.textColor as Color))}\n`\n"],"names":["WEIGHT_MAP","lighter","normal","bold","bolder","LINE_HEIGHT_MAP","l","m","s","xs","shouldForwardTextProp","createShouldForwardProp","propKey","includes","Root","styled","div","withConfig","shouldForwardProp","componentId","props","_WEIGHT_MAP$props$wei","_LINE_HEIGHT_MAP$prop","fontFamily","concat","transform","weight","fontStyle","textAlign","lineHeight","underline","whiteSpace","underlineLinks","responsiveSize","responsiveMargin","display","color","theme","textColor"],"mappings":"6UASA,IAAMA,EAAa,CACjBC,QAAS,IACTC,OAAQ,IACRC,KAAM,IACNC,OAAQ,KAGV,IAAMC,EAAkB,CACtBC,EAAG,IACHC,EAAG,IACHC,EAAG,KACHC,GAAI,GAGN,IAAMC,EAAwBC,GAC3BC,IACE,CACC,aACA,aACA,SACA,YACA,YACA,iBACA,YACA,aACA,UACA,UACA,QACA,SACA,oBACA,YACA,YACA,cACAC,SAASD,KAGR,IAAME,EAAOC,EAAOC,IAAIC,WAA4B,CACzDC,kBAAmBR,IADJO,WAAA,CAAAE,YAAA,uBAAGJ,CAAH,CAAA,GAAA,IAAA,IAAA,IAAA,IAAA,KAGZK,IAAD,IAAAC,EAAAC,EAAA,MAEEF,yBAAAA,OAAAA,EAAMG,WAA6BH,gBAAAA,OAAAA,EAAMG,WAAzC,KAAyD,GAF3D,UAAAC,OAGEJ,EAAMK,UAA+BL,mBAAAA,OAAAA,EAAMK,UAAe,KAAA,oBAC1DL,EAAMM,OAAN,gBAAAF,OAAA,QAAAH,EAA+BrB,EAAWoB,EAAMM,eAAhD,IAAAL,EAAAA,EAA2DD,EAAMM,OAAY,KAAA,GAC7EN,UAAAA,OAAAA,EAAMO,gCAA2BP,EAAMO,UAAvC,KAAsD,GALxD,UAAAH,OAMEJ,EAAMQ,UAA2BR,eAAAA,OAAAA,EAAMQ,eAAe,GANxD,UAAAJ,OAOEJ,EAAMS,WAAN,gBAAAL,OAAA,QAAAF,EAAmCjB,EAAgBe,EAAMS,mBAAAA,IAAzDP,EAAAA,EAAwEF,EAAMS,WAAgB,KAAA,GAC9FT,UAAAA,OAAAA,EAAMU,UAAN,sBAAAN,OAAmE,iBAApBJ,EAAMU,UAAyBV,EAAMU,UAAY,QAAa,KAAA,GAC7GV,UAAAA,OAAAA,EAAMW,kCAA6BX,EAAMW,WAAzC,KAAyD,GAT3D,sCAAAP,OAWqBJ,EAAMY,eAAiB,YAAc,OAX1D,4EAkBAC,EACAC,GAECd,GAAWA,EAAMe,QAAUA,EAAQf,EAAMe,SAAW,OACpDf,GAAyBgB,EAAdhB,EAAMgB,MAAchB,EAAMgB,MAAehB,EAAMiB,MAAMC"}
@@ -1,2 +1,2 @@
1
- import o,{css as r}from'styled-components';import{property as n,responsiveNamedProperty as e}from'../../mixins/responsive-property.js';import{chooseWidthValue as t}from'../Input/helpers.js';import{baseInputStyle as i}from'../Input/style.js';import{focus as a}from'../../mixins/focus.js';var d=r(["",";"," "," "," "," ",""],(o=>{var{theme:r}=o;return"\n display: block;\n box-sizing: border-box;\n appearance: none;\n width: auto;\n resize: none;\n\n background: ".concat(r.colors['bg-onmain-secondary'],";\n border: 1px solid ").concat(r.colors['border-onmain-default-large'],";\n border-radius: 12px;\n padding: 12px 16px;\n\n font-style: normal;\n font-weight: 400;\n font-size: 18px;\n line-height: 24px;\n color: ").concat(r.colors['content-onmain-primary'],";\n\n transition-property: background-color, border-color, color, caret-color;\n transition-duration: 200ms;\n transition-timing-function: ease-in;\n\n &::placeholder {\n color: ").concat(r.colors['content-onmain-secondary'],";\n }\n\n &:disabled {\n background-color: ").concat(r.colors['bg-disabled-large'],";\n border-color: ").concat(r.colors['border-disabled'],";\n color: ").concat(r.colors['content-disabled'],";\n cursor: not-allowed;\n }\n ")}),(o=>o.width?n(t(o.width),o.fluid&&'auto'!==o.width?'max-width':'width'):null),(o=>e({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:t})),(o=>{var{fluid:r}=o;return r&&'width: 100%;'}),(o=>{var{error:r,theme:n}=o;return r&&"\n background-color: ".concat(n.colors['alert-bg-error-100'],";\n border: 1px solid ").concat(n.colors['alert-bg-error-500'],";\n ")}),a);var s=r(["resize:none;line-height:23px;padding:16px 20px 11px;",""],i);var c=o.textarea.withConfig({shouldForwardProp:o=>!['color','placeholderColor','rounded','fluid','error','brandPresetUsed','theme'].includes(o)&&!o.includes('width')}).withConfig({componentId:"fox-ui__sc-a4hfy5-0"})(["",""],(o=>{var{brandPresetUsed:r}=o;return r?d:s}));export{c as Root};
1
+ import o,{css as r}from'styled-components';import{property as n,responsiveNamedProperty as t}from'../../mixins/responsive-property.js';import{chooseWidthValue as e}from'../Input/helpers.js';import{baseInputStyle as i}from'../Input/style.js';import{focus as a}from'../../mixins/focus.js';var d=r(["",";"," "," "," "," ",""],(o=>{var{theme:r,disabled:n}=o;return"\n display: block;\n box-sizing: border-box;\n appearance: none;\n width: auto;\n resize: none;\n cursor: ".concat(n?'not-allowed':'text',";\n\n background: ").concat(r.colors['bg-onmain-secondary'],";\n border: 1px solid ").concat(r.colors['border-onmain-default-large'],";\n border-radius: 12px;\n padding: 12px 16px;\n\n font-style: normal;\n font-weight: 400;\n font-size: 18px;\n line-height: 24px;\n color: ").concat(r.colors['content-onmain-primary'],";\n\n transition-property: background-color, border-color, color, caret-color;\n transition-duration: 200ms;\n transition-timing-function: ease-in;\n\n &::placeholder {\n color: ").concat(r.colors['content-onmain-secondary'],";\n }\n\n &:disabled {\n background-color: ").concat(r.colors['bg-disabled-large'],";\n border-color: ").concat(r.colors['border-disabled'],";\n color: ").concat(r.colors['content-disabled'],";\n }\n ")}),(o=>o.width?n(e(o.width),o.fluid&&'auto'!==o.width?'max-width':'width'):null),(o=>t({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:e})),(o=>{var{fluid:r}=o;return r&&'width: 100%;'}),(o=>{var{error:r,theme:n}=o;return r&&"\n background-color: ".concat(n.colors['alert-bg-error-100'],";\n border: 1px solid ").concat(n.colors['alert-bg-error-500'],";\n ")}),a);var s=r(["resize:none;line-height:23px;padding:16px 20px 11px;",""],i);var c=o.textarea.withConfig({shouldForwardProp:o=>!['color','placeholderColor','rounded','fluid','error','brandPresetUsed','theme'].includes(o)&&!o.includes('width')}).withConfig({componentId:"fox-ui__sc-a4hfy5-0"})(["",""],(o=>{var{brandPresetUsed:r}=o;return r?d:s}));export{c as Root};
2
2
  //# sourceMappingURL=style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sources":["../../../../src/components/Textarea/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { property, responsiveNamedProperty } from 'mixins/responsive-property'\nimport { chooseWidthValue } from 'components/Input/helpers'\nimport { baseInputStyle } from 'components/Input/style'\nimport { focus } from 'mixins/focus'\nimport type { StyledTextareaProps } from './types'\n\nconst brandTextareaStyle = css<StyledTextareaProps>`\n ${({ theme }) => `\n display: block;\n box-sizing: border-box;\n appearance: none;\n width: auto;\n resize: none;\n\n background: ${theme.colors['bg-onmain-secondary']};\n border: 1px solid ${theme.colors['border-onmain-default-large']};\n border-radius: 12px;\n padding: 12px 16px;\n\n font-style: normal;\n font-weight: 400;\n font-size: 18px;\n line-height: 24px;\n color: ${theme.colors['content-onmain-primary']};\n\n transition-property: background-color, border-color, color, caret-color;\n transition-duration: 200ms;\n transition-timing-function: ease-in;\n\n &::placeholder {\n color: ${theme.colors['content-onmain-secondary']};\n }\n\n &:disabled {\n background-color: ${theme.colors['bg-disabled-large']};\n border-color: ${theme.colors['border-disabled']};\n color: ${theme.colors['content-disabled']};\n cursor: not-allowed;\n }\n `};\n\n ${(props) =>\n props.width\n ? property(chooseWidthValue(props.width), props.fluid && props.width !== 'auto' ? 'max-width' : 'width')\n : null}\n\n ${(props) =>\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\n ${({ fluid }) => fluid && 'width: 100%;'}\n\n ${({ error, theme }) =>\n error &&\n `\n background-color: ${theme.colors['alert-bg-error-100']};\n border: 1px solid ${theme.colors['alert-bg-error-500']};\n `}\n\n ${focus}\n`\n\nconst baseTextareaStyle = css`\n resize: none;\n line-height: 23px;\n padding: 16px 20px 11px;\n ${baseInputStyle}\n`\n\nexport const Root = styled.textarea.withConfig<StyledTextareaProps>({\n shouldForwardProp: (prop) =>\n !['color', 'placeholderColor', 'rounded', 'fluid', 'error', 'brandPresetUsed', 'theme'].includes(prop) &&\n !prop.includes('width'),\n})`\n ${({ brandPresetUsed }) => (brandPresetUsed ? brandTextareaStyle : baseTextareaStyle)}\n`\n"],"names":["brandTextareaStyle","css","_ref","theme","colors","concat","props","width","property","chooseWidthValue","fluid","responsiveNamedProperty","sizes","widthXS","widthS","widthM","widthL","widthXL","cssProperty","customSizeHandler","_ref2","_ref3","error","focus","baseTextareaStyle","baseInputStyle","Root","styled","textarea","withConfig","shouldForwardProp","prop","includes","componentId","_ref4","brandPresetUsed"],"mappings":"+RAOA,IAAMA,EAAqBC,EACvB,CAAA,GAAA,IAAA,IAAA,IAAA,IAAA,IAAA,KAAAC,IAAA,IAACC,MAAEA,GAAHD,EAAA,MAOcC,qIAAAA,OAAAA,EAAMC,OAAO,uBAP3B,6BAAAC,OAQoBF,EAAMC,OAAO,2MAQxBD,EAAMC,OAAO,0BAhBtB,uMAAAC,OAuBWF,EAAMC,OAAO,4BAIFD,0DAAAA,OAAAA,EAAMC,OAAO,qBACjBD,2BAAAA,OAAAA,EAAMC,OAAO,mBA5B/B,oBAAAC,OA6BWF,EAAMC,OAAO,oBA7BxB,+CAkCCE,GACDA,EAAMC,MACFC,EAASC,EAAiBH,EAAMC,OAAQD,EAAMI,OAAyB,SAAhBJ,EAAMC,MAAmB,YAAc,SAC9F,OAEHD,GACDK,EAAwB,CACtBC,MAAO,CACLC,QAASP,EAAMO,QACfC,OAAQR,EAAMQ,OACdC,OAAQT,EAAMS,OACdC,OAAQV,EAAMU,OACdC,QAASX,EAAMW,SAEjBC,YAAaZ,EAAMI,OAAyB,SAAhBJ,EAAMC,MAAmB,YAAc,QACnEY,kBAAmBV,MAGrBW,IAAA,IAACV,MAAEA,GAAHU,EAAA,OAAeV,GAAS,kBAExBW,IAAA,IAACC,MAAEA,EAAFnB,MAASA,GAAVkB,EAAA,OACAC,GAAK,6BAAAjB,OAEiBF,EAAMC,OAAO,sBAF9B,+BAAAC,OAGiBF,EAAMC,OAAO,sBAJnC,aAOAmB,GAGJ,IAAMC,EAAoBvB,EAAH,CAAA,uDAAA,IAInBwB,GAGG,IAAMC,EAAOC,EAAOC,SAASC,WAAgC,CAClEC,kBAAoBC,IACjB,CAAC,QAAS,mBAAoB,UAAW,QAAS,QAAS,kBAAmB,SAASC,SAASD,KAChGA,EAAKC,SAAS,WAHFH,WAAA,CAAAI,YAAA,uBAAGN,CAKhB,CAAA,GAAA,KAAAO,IAAA,IAACC,gBAAEA,GAAHD,EAAA,OAA0BC,EAAkBnC,EAAqBwB"}
1
+ {"version":3,"file":"style.js","sources":["../../../../src/components/Textarea/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { property, responsiveNamedProperty } from 'mixins/responsive-property'\nimport { chooseWidthValue } from 'components/Input/helpers'\nimport { baseInputStyle } from 'components/Input/style'\nimport { focus } from 'mixins/focus'\nimport type { StyledTextareaProps } from './types'\n\nconst brandTextareaStyle = css<StyledTextareaProps>`\n ${({ theme, disabled }) => `\n display: block;\n box-sizing: border-box;\n appearance: none;\n width: auto;\n resize: none;\n cursor: ${disabled ? 'not-allowed' : 'text'};\n\n background: ${theme.colors['bg-onmain-secondary']};\n border: 1px solid ${theme.colors['border-onmain-default-large']};\n border-radius: 12px;\n padding: 12px 16px;\n\n font-style: normal;\n font-weight: 400;\n font-size: 18px;\n line-height: 24px;\n color: ${theme.colors['content-onmain-primary']};\n\n transition-property: background-color, border-color, color, caret-color;\n transition-duration: 200ms;\n transition-timing-function: ease-in;\n\n &::placeholder {\n color: ${theme.colors['content-onmain-secondary']};\n }\n\n &:disabled {\n background-color: ${theme.colors['bg-disabled-large']};\n border-color: ${theme.colors['border-disabled']};\n color: ${theme.colors['content-disabled']};\n }\n `};\n\n ${(props) =>\n props.width\n ? property(chooseWidthValue(props.width), props.fluid && props.width !== 'auto' ? 'max-width' : 'width')\n : null}\n\n ${(props) =>\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\n ${({ fluid }) => fluid && 'width: 100%;'}\n\n ${({ error, theme }) =>\n error &&\n `\n background-color: ${theme.colors['alert-bg-error-100']};\n border: 1px solid ${theme.colors['alert-bg-error-500']};\n `}\n\n ${focus}\n`\n\nconst baseTextareaStyle = css`\n resize: none;\n line-height: 23px;\n padding: 16px 20px 11px;\n ${baseInputStyle}\n`\n\nexport const Root = styled.textarea.withConfig<StyledTextareaProps>({\n shouldForwardProp: (prop) =>\n !['color', 'placeholderColor', 'rounded', 'fluid', 'error', 'brandPresetUsed', 'theme'].includes(prop) &&\n !prop.includes('width'),\n})`\n ${({ brandPresetUsed }) => (brandPresetUsed ? brandTextareaStyle : baseTextareaStyle)}\n`\n"],"names":["brandTextareaStyle","css","_ref","theme","disabled","colors","props","width","property","chooseWidthValue","fluid","responsiveNamedProperty","sizes","widthXS","widthS","widthM","widthL","widthXL","cssProperty","customSizeHandler","_ref2","_ref3","error","concat","focus","baseTextareaStyle","baseInputStyle","Root","styled","textarea","withConfig","shouldForwardProp","prop","includes","componentId","_ref4","brandPresetUsed"],"mappings":"+RAOA,IAAMA,EAAqBC,EACvB,CAAA,GAAA,IAAA,IAAA,IAAA,IAAA,IAAA,KAAAC,IAAA,IAACC,MAAEA,EAAFC,SAASA,GAAVF,EAAA,MAMUE,+HAAAA,OAAAA,EAAW,cAAgB,uCAEvBD,EAAME,OAAO,2DACPF,EAAME,OAAO,2MAQxBF,EAAME,OAAO,wOAOXF,EAAME,OAAO,6FAIFF,EAAME,OAAO,uDACjBF,EAAME,OAAO,mBACpBF,oBAAAA,OAAAA,EAAME,OAAO,oBA9BxB,mBAkCCC,GACDA,EAAMC,MACFC,EAASC,EAAiBH,EAAMC,OAAQD,EAAMI,OAAyB,SAAhBJ,EAAMC,MAAmB,YAAc,SAC9F,OAEHD,GACDK,EAAwB,CACtBC,MAAO,CACLC,QAASP,EAAMO,QACfC,OAAQR,EAAMQ,OACdC,OAAQT,EAAMS,OACdC,OAAQV,EAAMU,OACdC,QAASX,EAAMW,SAEjBC,YAAaZ,EAAMI,OAAyB,SAAhBJ,EAAMC,MAAmB,YAAc,QACnEY,kBAAmBV,MAGrBW,IAAA,IAACV,MAAEA,GAAHU,EAAA,OAAeV,GAAS,kBAExBW,IAAA,IAACC,MAAEA,EAAFnB,MAASA,GAAVkB,EAAA,OACAC,GAAK,6BAAAC,OAEiBpB,EAAME,OAAO,sBAF9B,+BAAAkB,OAGiBpB,EAAME,OAAO,sBAJnC,aAOAmB,GAGJ,IAAMC,EAAoBxB,EAAH,CAAA,uDAAA,IAInByB,GAGG,IAAMC,EAAOC,EAAOC,SAASC,WAAgC,CAClEC,kBAAoBC,IACjB,CAAC,QAAS,mBAAoB,UAAW,QAAS,QAAS,kBAAmB,SAASC,SAASD,KAChGA,EAAKC,SAAS,WAHFH,WAAA,CAAAI,YAAA,uBAAGN,CAKhB,CAAA,GAAA,KAAAO,IAAA,IAACC,gBAAEA,GAAHD,EAAA,OAA0BC,EAAkBpC,EAAqByB"}