@foxford/ui 2.14.1 → 2.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/components/Alert/utils.js.map +1 -1
  2. package/components/ArrowBadge/ArrowBadge.js +1 -1
  3. package/components/ArrowBadge/ArrowBadge.js.map +1 -1
  4. package/components/ArrowBadge/style.js +1 -1
  5. package/components/ArrowBadge/style.js.map +1 -1
  6. package/components/Badge/Badge.js.map +1 -1
  7. package/components/Button/Button.js +1 -1
  8. package/components/Button/Button.js.map +1 -1
  9. package/components/Button/style.js +1 -1
  10. package/components/Button/style.js.map +1 -1
  11. package/components/ContextMenu.Multilevel/ContextMenu.Multilevel.js.map +1 -1
  12. package/components/Tab/Tab.js +2 -0
  13. package/components/Tab/Tab.js.map +1 -0
  14. package/components/Tab/constants.js +2 -0
  15. package/components/Tab/constants.js.map +1 -0
  16. package/components/Tab/images/arrow.module.svg.js +2 -0
  17. package/components/Tab/images/arrow.module.svg.js.map +1 -0
  18. package/components/Tab/style.js +2 -0
  19. package/components/Tab/style.js.map +1 -0
  20. package/components/Tabs/Tabs.js +1 -1
  21. package/components/Tabs/Tabs.js.map +1 -1
  22. package/components/Tabs/style.js +1 -1
  23. package/components/Tabs/style.js.map +1 -1
  24. package/components/Tag/Tag.js.map +1 -1
  25. package/components/Tag/style.js.map +1 -1
  26. package/components/Text/Text.js.map +1 -1
  27. package/components/Text/constants.js.map +1 -1
  28. package/components/Text/style.js.map +1 -1
  29. package/components/Text.Ellipse/Text.Ellipse.js.map +1 -1
  30. package/dts/index.d.ts +241 -198
  31. package/hocs/withMergedProps.js +1 -1
  32. package/hocs/withMergedProps.js.map +1 -1
  33. package/index.cjs.js +1 -1
  34. package/index.cjs.js.map +1 -1
  35. package/index.js +1 -1
  36. package/mixins/color.js.map +1 -1
  37. package/mixins/focus.js +1 -1
  38. package/mixins/focus.js.map +1 -1
  39. package/mixins/size.js.map +1 -1
  40. package/package.json +1 -1
  41. package/shared/regexp.js +1 -1
  42. package/shared/regexp.js.map +1 -1
  43. package/theme/colors-dark.js.map +1 -1
  44. package/theme/colors-light.js.map +1 -1
  45. package/theme/colors.js.map +1 -1
  46. package/components/Tabs/TabsTab.js +0 -2
  47. package/components/Tabs/TabsTab.js.map +0 -1
@@ -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{getColor as t}from'../../mixins/color.js';import{responsiveSize as c}from'../../mixins/size.js';import{responsiveMargin as a}from'../../mixins/margin.js';import{focus as l}from'../../mixins/focus.js';import{createShouldForwardProp as i}from'../../shared/utils/style.js';import m from'./images/arrow.module.svg.js';var s=i((o=>!['active','compact','crispy','crispyCompact','tabTheme','left','right','rounded','outline','onColored'].includes(o)));var d={default:e(["",""],(o=>"\n font-size: 16px;\n font-weight: bold;\n padding-bottom: 12px;\n color: ".concat(o.active?o.theme.colors.primary:o.theme.colors.mineShaft,";\n border-bottom: 2px solid ").concat(o.active?'currentcolor':'transparent',";\n &:hover {\n color: ").concat(o.theme.colors.primary,";\n }\n &.active {\n color: ").concat(o.theme.colors.primary,";\n }\n "))),compact:e(["",""],(o=>"\n font-size: 16px;\n font-weight: normal;\n padding-bottom: 10px;\n color: ".concat(o.active?o.theme.colors.primary:o.theme.colors.mineShaft,";\n border-bottom: 2px solid ").concat(o.active?'currentcolor':'transparent',";\n &:hover {\n color: ").concat(o.theme.colors.primary,";\n }\n &.active {\n color: ").concat(o.theme.colors.primary,";\n }\n "))),crispyCompact:e(["",""],(o=>"\n font-size: 12px;\n font-weight: bold;\n padding-bottom: 6px;\n text-transform: uppercase;\n color: ".concat(o.active?o.theme.colors.primary:o.theme.colors.mineShaft,";\n border-bottom: 2px solid ").concat(o.active?'currentcolor':'transparent',";\n &:hover {\n color: ").concat(o.theme.colors.primary,";\n }\n &.active {\n color: ").concat(o.theme.colors.primary,";\n }\n "))),crispy:e(["",""],(o=>"\n font-size: 12px;\n font-weight: bold;\n padding-bottom: 30px;\n text-transform: uppercase;\n color: ".concat(o.active?o.theme.colors.primary:o.theme.colors.mineShaft,";\n border-bottom: 2px solid ").concat(o.active?'currentcolor':'transparent',";\n &:hover {\n color: ").concat(o.theme.colors.primary,";\n }\n &.active {\n color: ").concat(o.theme.colors.primary,";\n }\n ")))};var b=r.span.withConfig({componentId:"fox-ui__sc-26yal1-0"})(["position:relative;z-index:1;display:flex;align-items:center;flex-grow:1;flex-shrink:0;height:100%;padding:0 1em;border:1px solid transparent;"]);var p=r(m).withConfig({shouldForwardProp:()=>!1}).withConfig({componentId:"fox-ui__sc-26yal1-1"})(["flex-shrink:0;height:100%;",""],(o=>o.after&&'transform: rotate(180deg);'));var h=o=>"\n &:hover > ".concat(b," {\n color: ").concat(o.colorHover,";\n background-color: ").concat(o.backgroundColorHover,";\n border-color: ").concat(o.borderColorHover,";\n }\n &:hover > ").concat(p," {\n color: ").concat(o.backgroundColorHover,";\n stroke: ").concat(o.borderColorHover,";\n }\n & > ").concat(b,",\n &:active > ").concat(b," {\n color: ").concat(o.color,";\n background-color: ").concat(o.backgroundColor,";\n border-color: ").concat(o.borderColor,";\n }\n & > ").concat(p,",\n &:active > ").concat(p," {\n color: ").concat(o.backgroundColor,";\n stroke: ").concat(o.borderColor,";\n }\n &:disabled > ").concat(b," {\n color: ").concat(o.colorDisabled,";\n background-color: ").concat(o.backgroundColorDisabled,";\n border-color: ").concat(o.borderColorDisabled,";\n }\n &:disabled > ").concat(p," {\n color: ").concat(o.backgroundColorDisabled,";\n stroke: ").concat(o.borderColorDisabled,";\n }\n");var g={default:{filled:e(["",""],(r=>h(o({color:r.active?r.theme.colors['content-oncolor-primary']:r.theme.colors['content-onmain-primary'],backgroundColor:r.active?r.theme.colors['bg-brand-primary-500']:r.theme.colors['bg-onmain-tertiary'],borderColor:r.active?r.theme.colors['bg-brand-primary-500']:r.theme.colors['bg-onmain-tertiary'],colorHover:r.active?r.theme.colors['content-oncolor-primary']:r.theme.colors['content-onmain-primary'],backgroundColorHover:r.active?r.theme.colors['bg-brand-primary-500']:n(r.theme.colors['bg-onmain-tertiary']).darken(6).toString(),borderColorHover:r.active?r.theme.colors['bg-brand-primary-500']:n(r.theme.colors['bg-onmain-tertiary']).darken(6).toString(),colorDisabled:r.theme.colors['content-disabled'],backgroundColorDisabled:r.theme.colors['bg-disabled-large'],borderColorDisabled:r.theme.colors['bg-disabled-large']},r.palette)))),outline:e(["",""],(r=>h(o({color:r.active?r.theme.colors['content-oncolor-primary']:r.theme.colors['content-onmain-primary'],backgroundColor:r.active?r.theme.colors['bg-brand-primary-500']:r.theme.colors['bg-onmain-primary'],borderColor:r.active?r.theme.colors['bg-brand-primary-500']:r.theme.colors['border-onmain-default-large'],colorHover:r.active?r.theme.colors['content-oncolor-primary']:r.theme.colors['content-onmain-primary'],backgroundColorHover:r.active?r.theme.colors['bg-brand-primary-500']:r.theme.colors['bg-onmain-tertiary'],borderColorHover:r.active?r.theme.colors['bg-brand-primary-500']:r.theme.colors['border-onmain-default-large'],colorDisabled:r.theme.colors['content-disabled'],backgroundColorDisabled:r.theme.colors['bg-disabled-large'],borderColorDisabled:r.theme.colors['bg-disabled-large']},r.palette))))},onColored:{filled:e(["",""],(r=>h(o({color:r.active?r.theme.colors['content-brand-primary']:r.theme.colors['content-oncolor-primary'],backgroundColor:r.active?r.theme.colors['bg-onmain-primary']:n(r.theme.colors['bg-brand-primary-500']).lighten(10).toString(),borderColor:r.active?r.theme.colors['bg-onmain-primary']:n(r.theme.colors['bg-brand-primary-500']).lighten(10).toString(),colorHover:r.active?r.theme.colors['content-brand-primary']:r.theme.colors['content-oncolor-primary'],backgroundColorHover:r.active?r.theme.colors['bg-onmain-primary']:n(r.theme.colors['bg-brand-primary-500']).lighten(5).toString(),borderColorHover:r.active?r.theme.colors['bg-onmain-primary']:n(r.theme.colors['bg-brand-primary-500']).lighten(5).toString(),colorDisabled:r.theme.colors['content-disabled'],backgroundColorDisabled:r.theme.colors['bg-disabled-small'],borderColorDisabled:r.theme.colors['bg-disabled-small']},r.palette)))),outline:e(["",""],(r=>h(o({color:r.active?r.theme.colors['content-brand-primary']:r.theme.colors['content-oncolor-primary'],backgroundColor:r.active?r.theme.colors['bg-onmain-primary']:r.theme.colors['bg-brand-primary-500'],borderColor:r.theme.colors['bg-onmain-primary'],colorHover:r.active?r.theme.colors['content-brand-primary']:r.theme.colors['content-oncolor-primary'],backgroundColorHover:r.active?r.theme.colors['bg-onmain-primary']:n(r.theme.colors['bg-brand-primary-500']).darken(3).toString(),borderColorHover:r.theme.colors['bg-onmain-primary'],colorDisabled:r.theme.colors['content-disabled'],backgroundColorDisabled:r.theme.colors['bg-disabled-small'],borderColorDisabled:r.theme.colors['bg-disabled-small']},r.palette))))}};var v=r.button.withConfig({shouldForwardProp:s}).attrs({dynamicSizeDeclaration:function(o,r,e){return{height:'2.8em',fontSize:"".concat(arguments.length<=0?void 0:o).concat(arguments.length<=2?void 0:e)}}}).withConfig({componentId:"fox-ui__sc-26yal1-2"})([""," "," "," "," "," "," ",""],(o=>{var r;var e=o.rounded?8:0;var n=o.left?0:e;var t=o.right?0:e;return"\n display: ".concat('brand'===o.preset?'inline-flex':'inline-block',";\n cursor: ").concat(null!==(r=o.cursor)&&void 0!==r?r:'pointer',";\n isolation: isolate;\n flex-shrink: 0;\n appearance: none;\n padding: 0;\n border: none;\n background-color: transparent;\n text-decoration: none;\n width: max-content;\n &,\n & > ").concat(b,", \n & > ").concat(p," {\n box-sizing: border-box;\n transition-property: color, background-color;\n transition-duration: 150ms;\n transition-timing-function: ease-in;\n }\n & > ").concat(b," {\n border-radius: ").concat(n,"px ").concat(t,"px ").concat(t,"px ").concat(n,"px;\n border-left-style: ").concat(o.left?'none':'solid',";\n border-right-style: ").concat(o.right?'none':'solid',";\n margin-left: ").concat(o.left?-2:0,"px;\n margin-right: ").concat(o.right?-2:0,"px;\n }\n ")}),(o=>{if('brand'===o.preset){var r=o.onColored?g.onColored:g.default;return o.outline?r.outline:r.filled}return o.compact||'compact'===o.tabTheme?d.compact:o.crispyCompact||'crispyCompact'===o.tabTheme?d.crispyCompact:o.crispy||'crispy'===o.tabTheme?d.crispy:d.default}),l,c,a,(o=>o.color&&"color: ".concat(t(o.color,o),";")),(o=>o.borderColor&&"border-color: ".concat(t(o.borderColor,o),";")));export{b as Content,p as Edge,v as Root};
2
+ //# sourceMappingURL=style.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"style.js","sources":["../../../../src/components/Tab/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport tinycolor from 'tinycolor2'\nimport type { ThemedStyledProps, DefaultTheme } from 'styled-components'\nimport { getColor } from 'mixins/color'\nimport { responsiveSize } from 'mixins/size'\nimport { responsiveMargin } from 'mixins/margin'\nimport { focus } from 'mixins/focus'\nimport type { CSSColor, DynamicSizeDeclaration } from 'shared/interfaces'\nimport { createShouldForwardProp } from 'shared/utils/style'\nimport type { StyledTabProps, StyledTabEdgeProps, TabPalette } from './types'\nimport Arrow from './images/arrow.module.svg'\n\nconst shouldForwardTabProp = createShouldForwardProp(\n (propKey) =>\n ![\n 'active',\n 'compact',\n 'crispy',\n 'crispyCompact',\n 'tabTheme',\n 'left',\n 'right',\n 'rounded',\n 'outline',\n 'onColored',\n ].includes(propKey)\n)\n\nconst DEFAULT_STYLES = {\n default: css<StyledTabProps>`\n ${(props) => `\n font-size: 16px;\n font-weight: bold;\n padding-bottom: 12px;\n color: ${props.active ? props.theme.colors.primary : props.theme.colors.mineShaft};\n border-bottom: 2px solid ${props.active ? 'currentcolor' : 'transparent'};\n &:hover {\n color: ${props.theme.colors.primary};\n }\n &.active {\n color: ${props.theme.colors.primary};\n }\n `}\n `,\n compact: css<StyledTabProps>`\n ${(props) => `\n font-size: 16px;\n font-weight: normal;\n padding-bottom: 10px;\n color: ${props.active ? props.theme.colors.primary : props.theme.colors.mineShaft};\n border-bottom: 2px solid ${props.active ? 'currentcolor' : 'transparent'};\n &:hover {\n color: ${props.theme.colors.primary};\n }\n &.active {\n color: ${props.theme.colors.primary};\n }\n `}\n `,\n crispyCompact: css<StyledTabProps>`\n ${(props) => `\n font-size: 12px;\n font-weight: bold;\n padding-bottom: 6px;\n text-transform: uppercase;\n color: ${props.active ? props.theme.colors.primary : props.theme.colors.mineShaft};\n border-bottom: 2px solid ${props.active ? 'currentcolor' : 'transparent'};\n &:hover {\n color: ${props.theme.colors.primary};\n }\n &.active {\n color: ${props.theme.colors.primary};\n }\n `}\n `,\n crispy: css<StyledTabProps>`\n ${(props) => `\n font-size: 12px;\n font-weight: bold;\n padding-bottom: 30px;\n text-transform: uppercase;\n color: ${props.active ? props.theme.colors.primary : props.theme.colors.mineShaft};\n border-bottom: 2px solid ${props.active ? 'currentcolor' : 'transparent'};\n &:hover {\n color: ${props.theme.colors.primary};\n }\n &.active {\n color: ${props.theme.colors.primary};\n }\n `}\n `,\n}\n\nexport const Content = styled.span`\n position: relative;\n z-index: 1;\n display: flex;\n align-items: center;\n flex-grow: 1;\n flex-shrink: 0;\n height: 100%;\n padding: 0 1em;\n border: 1px solid transparent;\n`\n\nexport const Edge = styled(Arrow).withConfig({\n shouldForwardProp: () => false,\n})<StyledTabEdgeProps>`\n flex-shrink: 0;\n height: 100%;\n ${(props) => props.after && 'transform: rotate(180deg);'}\n`\n\nconst template = (palette: TabPalette) => `\n &:hover > ${Content} {\n color: ${palette.colorHover};\n background-color: ${palette.backgroundColorHover};\n border-color: ${palette.borderColorHover};\n }\n &:hover > ${Edge} {\n color: ${palette.backgroundColorHover};\n stroke: ${palette.borderColorHover};\n }\n & > ${Content},\n &:active > ${Content} {\n color: ${palette.color};\n background-color: ${palette.backgroundColor};\n border-color: ${palette.borderColor};\n }\n & > ${Edge},\n &:active > ${Edge} {\n color: ${palette.backgroundColor};\n stroke: ${palette.borderColor};\n }\n &:disabled > ${Content} {\n color: ${palette.colorDisabled};\n background-color: ${palette.backgroundColorDisabled};\n border-color: ${palette.borderColorDisabled};\n }\n &:disabled > ${Edge} {\n color: ${palette.backgroundColorDisabled};\n stroke: ${palette.borderColorDisabled};\n }\n`\n\nconst COLOR_SCHEMA = {\n default: {\n filled: css<StyledTabProps>`\n ${(props) =>\n template({\n color: props.active\n ? props.theme.colors['content-oncolor-primary']\n : props.theme.colors['content-onmain-primary'],\n backgroundColor: props.active\n ? props.theme.colors['bg-brand-primary-500']\n : props.theme.colors['bg-onmain-tertiary'],\n borderColor: props.active\n ? props.theme.colors['bg-brand-primary-500']\n : props.theme.colors['bg-onmain-tertiary'],\n colorHover: props.active\n ? props.theme.colors['content-oncolor-primary']\n : props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.active\n ? props.theme.colors['bg-brand-primary-500']\n : (tinycolor(props.theme.colors['bg-onmain-tertiary']).darken(6).toString() as CSSColor),\n borderColorHover: props.active\n ? props.theme.colors['bg-brand-primary-500']\n : (tinycolor(props.theme.colors['bg-onmain-tertiary']).darken(6).toString() as CSSColor),\n colorDisabled: props.theme.colors['content-disabled'],\n backgroundColorDisabled: props.theme.colors['bg-disabled-large'],\n borderColorDisabled: props.theme.colors['bg-disabled-large'],\n ...props.palette,\n })}\n `,\n outline: css<StyledTabProps>`\n ${(props) => {\n return template({\n color: props.active\n ? props.theme.colors['content-oncolor-primary']\n : props.theme.colors['content-onmain-primary'],\n backgroundColor: props.active\n ? props.theme.colors['bg-brand-primary-500']\n : props.theme.colors['bg-onmain-primary'],\n borderColor: props.active\n ? props.theme.colors['bg-brand-primary-500']\n : props.theme.colors['border-onmain-default-large'],\n colorHover: props.active\n ? props.theme.colors['content-oncolor-primary']\n : props.theme.colors['content-onmain-primary'],\n backgroundColorHover: props.active\n ? props.theme.colors['bg-brand-primary-500']\n : props.theme.colors['bg-onmain-tertiary'],\n borderColorHover: props.active\n ? props.theme.colors['bg-brand-primary-500']\n : props.theme.colors['border-onmain-default-large'],\n colorDisabled: props.theme.colors['content-disabled'],\n backgroundColorDisabled: props.theme.colors['bg-disabled-large'],\n borderColorDisabled: props.theme.colors['bg-disabled-large'],\n ...props.palette,\n })\n }}\n `,\n },\n onColored: {\n filled: css<StyledTabProps>`\n ${(props) =>\n template({\n color: props.active\n ? props.theme.colors['content-brand-primary']\n : props.theme.colors['content-oncolor-primary'],\n backgroundColor: props.active\n ? props.theme.colors['bg-onmain-primary']\n : (tinycolor(props.theme.colors['bg-brand-primary-500']).lighten(10).toString() as CSSColor),\n borderColor: props.active\n ? props.theme.colors['bg-onmain-primary']\n : (tinycolor(props.theme.colors['bg-brand-primary-500']).lighten(10).toString() as CSSColor),\n colorHover: props.active\n ? props.theme.colors['content-brand-primary']\n : props.theme.colors['content-oncolor-primary'],\n backgroundColorHover: props.active\n ? props.theme.colors['bg-onmain-primary']\n : (tinycolor(props.theme.colors['bg-brand-primary-500']).lighten(5).toString() as CSSColor),\n borderColorHover: props.active\n ? props.theme.colors['bg-onmain-primary']\n : (tinycolor(props.theme.colors['bg-brand-primary-500']).lighten(5).toString() as CSSColor),\n colorDisabled: props.theme.colors['content-disabled'],\n backgroundColorDisabled: props.theme.colors['bg-disabled-small'],\n borderColorDisabled: props.theme.colors['bg-disabled-small'],\n ...props.palette,\n })}\n `,\n outline: css<StyledTabProps>`\n ${(props) =>\n template({\n color: props.active\n ? props.theme.colors['content-brand-primary']\n : props.theme.colors['content-oncolor-primary'],\n backgroundColor: props.active\n ? props.theme.colors['bg-onmain-primary']\n : props.theme.colors['bg-brand-primary-500'],\n borderColor: props.theme.colors['bg-onmain-primary'],\n colorHover: props.active\n ? props.theme.colors['content-brand-primary']\n : props.theme.colors['content-oncolor-primary'],\n backgroundColorHover: props.active\n ? props.theme.colors['bg-onmain-primary']\n : (tinycolor(props.theme.colors['bg-brand-primary-500']).darken(3).toString() as CSSColor),\n borderColorHover: props.theme.colors['bg-onmain-primary'],\n colorDisabled: props.theme.colors['content-disabled'],\n backgroundColorDisabled: props.theme.colors['bg-disabled-small'],\n borderColorDisabled: props.theme.colors['bg-disabled-small'],\n ...props.palette,\n })}\n `,\n },\n}\n\nconst tabStyles = (props: ThemedStyledProps<StyledTabProps, DefaultTheme>) => {\n if (props.preset === 'brand') {\n const schema = props.onColored ? COLOR_SCHEMA.onColored : COLOR_SCHEMA.default\n return props.outline ? schema.outline : schema.filled\n }\n\n if (props.compact || props.tabTheme === 'compact') return DEFAULT_STYLES.compact\n if (props.crispyCompact || props.tabTheme === 'crispyCompact') return DEFAULT_STYLES.crispyCompact\n if (props.crispy || props.tabTheme === 'crispy') return DEFAULT_STYLES.crispy\n\n return DEFAULT_STYLES.default\n}\n\nexport const Root = styled.button\n .withConfig<StyledTabProps>({\n shouldForwardProp: shouldForwardTabProp,\n })\n .attrs({\n dynamicSizeDeclaration: (...args: Parameters<DynamicSizeDeclaration>) => {\n return {\n height: '2.8em',\n fontSize: `${args[0]}${args[2]}`,\n }\n },\n })`\n ${(props) => {\n const radius = props.rounded ? 8 : 0\n const leftRadius = props.left ? 0 : radius\n const rightRadius = props.right ? 0 : radius\n\n return `\n display: ${props.preset === 'brand' ? 'inline-flex' : 'inline-block'};\n cursor: ${props.cursor ?? 'pointer'};\n isolation: isolate;\n flex-shrink: 0;\n appearance: none;\n padding: 0;\n border: none;\n background-color: transparent;\n text-decoration: none;\n width: max-content;\n &,\n & > ${Content}, \n & > ${Edge} {\n box-sizing: border-box;\n transition-property: color, background-color;\n transition-duration: 150ms;\n transition-timing-function: ease-in;\n }\n & > ${Content} {\n border-radius: ${leftRadius}px ${rightRadius}px ${rightRadius}px ${leftRadius}px;\n border-left-style: ${props.left ? 'none' : 'solid'};\n border-right-style: ${props.right ? 'none' : 'solid'};\n margin-left: ${props.left ? -2 : 0}px;\n margin-right: ${props.right ? -2 : 0}px;\n }\n `\n }}\n\n ${tabStyles}\n ${focus}\n ${responsiveSize}\n ${responsiveMargin}\n\n ${(props) => props.color && `color: ${getColor(props.color, props)};`}\n ${(props) => props.borderColor && `border-color: ${getColor(props.borderColor, props)};`}\n`\n"],"names":["shouldForwardTabProp","createShouldForwardProp","propKey","includes","DEFAULT_STYLES","default","css","props","active","theme","colors","primary","mineShaft","concat","compact","crispyCompact","crispy","Content","styled","span","withConfig","componentId","Edge","Arrow","shouldForwardProp","after","template","palette","colorHover","backgroundColorHover","borderColorHover","color","backgroundColor","borderColor","colorDisabled","backgroundColorDisabled","borderColorDisabled","COLOR_SCHEMA","filled","_objectSpread","tinycolor","darken","toString","outline","onColored","lighten","Root","button","attrs","dynamicSizeDeclaration","o","r","e","height","fontSize","arguments","length","undefined","_props$cursor","radius","rounded","leftRadius","left","rightRadius","right","preset","cursor","schema","tabTheme","focus","responsiveSize","responsiveMargin","getColor"],"mappings":"0bAYA,IAAMA,EAAuBC,GAC1BC,IACE,CACC,SACA,UACA,SACA,gBACA,WACA,OACA,QACA,UACA,UACA,aACAC,SAASD,KAGf,IAAME,EAAiB,CACrBC,QAASC,EACJC,CAAAA,GAAAA,KAAAA,2GAIQA,EAAMC,OAASD,EAAME,MAAMC,OAAOC,QAAUJ,EAAME,MAAMC,OAAOE,uDAC7CL,EAAMC,OAAS,eAAiB,cAL3D,uCAAAK,OAOWN,EAAME,MAAMC,OAAOC,QAGnBJ,iDAAAA,OAAAA,EAAME,MAAMC,OAAOC,QAV9B,sBAcJG,QAASR,EACJC,CAAAA,GAAAA,KAAAA,6GAIQA,EAAMC,OAASD,EAAME,MAAMC,OAAOC,QAAUJ,EAAME,MAAMC,OAAOE,uDAC7CL,EAAMC,OAAS,eAAiB,cAL3D,uCAAAK,OAOWN,EAAME,MAAMC,OAAOC,QAGnBJ,iDAAAA,OAAAA,EAAME,MAAMC,OAAOC,QAV9B,sBAcJI,cAAeT,EACVC,CAAAA,GAAAA,KAAAA,4IAKQA,EAAMC,OAASD,EAAME,MAAMC,OAAOC,QAAUJ,EAAME,MAAMC,OAAOE,uDAC7CL,EAAMC,OAAS,eAAiB,cAN3D,uCAAAK,OAQWN,EAAME,MAAMC,OAAOC,QAGnBJ,iDAAAA,OAAAA,EAAME,MAAMC,OAAOC,QAX9B,sBAeJK,OAAQV,EACHC,CAAAA,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ezD,IACjB,GAAqB,UAAjBA,EAAM0D,OAAoB,CAC5B,IAAME,EAAS5D,EAAMqC,UAAYP,EAAaO,UAAYP,EAAahC,QACvE,OAAOE,EAAMoC,QAAUwB,EAAOxB,QAAUwB,EAAO7B,OAGjD,OAAI/B,EAAMO,SAA8B,YAAnBP,EAAM6D,SAA+BhE,EAAeU,QACrEP,EAAMQ,eAAoC,kBAAnBR,EAAM6D,SAAqChE,EAAeW,cACjFR,EAAMS,QAA6B,WAAnBT,EAAM6D,SAA8BhE,EAAeY,OAEhEZ,EAAeC,UAkDpBgE,EACAC,EACAC,GAEChE,GAAUA,EAAMwB,wBAAmByC,EAASjE,EAAMwB,MAAOxB,GAnD7C,OAoDZA,GAAUA,EAAM0B,aAAN,iBAAApB,OAAsC2D,EAASjE,EAAM0B,YAAa1B"}
@@ -1,2 +1,2 @@
1
- import{TabsTab as r}from'./TabsTab.js';import{Root as o,Inner as a,Content as s}from'./style.js';import{jsx as e}from'react/jsx-runtime';function l(r){var{children:l,className:t,classNameInner:n,classNameContent:c,borderColor:d,color:m,noBorder:i,style:b,width:h}=r;return e(o,{className:t,style:b,width:h,borderColor:d,color:m,noBorder:i,children:e(a,{className:n,children:e(s,{noBorder:i,className:c,children:l})})})}l.defaultProps={borderColor:'alto',color:'rgba(247, 247, 247, 1)'},l.Tab=r;export{l as Tabs};
1
+ import{Tab as r}from'../Tab/Tab.js';import{Root as o,Inner as a,Content as e}from'./style.js';import{jsx as s}from'react/jsx-runtime';function l(r){var{children:l,className:t,classNameInner:n,classNameContent:c,borderColor:d,color:m,noBorder:i,style:b,width:h}=r;return s(o,{className:t,style:b,width:h,borderColor:d,color:m,noBorder:i,children:s(a,{className:n,children:s(e,{noBorder:i,className:c,children:l})})})}l.defaultProps={borderColor:'alto',color:'rgba(247, 247, 247, 1)'},l.Tab=r;export{l as Tabs};
2
2
  //# sourceMappingURL=Tabs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.js","sources":["../../../../src/components/Tabs/Tabs.tsx"],"sourcesContent":["import { ResponsiveProperty } from 'mixins/responsive-property'\nimport { ColorProperty } from 'mixins/color'\nimport { BaseProps } from 'shared/interfaces'\nimport { TabsTab } from './TabsTab'\nimport * as Styled from './style'\n\nexport interface TabsProps extends BaseProps, ColorProperty, ColorProperty<'borderColor'> {\n /**\n * Primary content.\n */\n /**\n * Children react node\n */\n children?: React.ReactNode\n className?: string\n classNameInner?: string\n classNameContent?: string\n noBorder?: boolean\n width?: ResponsiveProperty<number>\n}\n\nTabs.defaultProps = {\n borderColor: 'alto',\n color: 'rgba(247, 247, 247, 1)',\n}\n\nTabs.Tab = TabsTab\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`Color<'borderColor'>`](#/Миксины)\n */\nexport function Tabs(props: TabsProps) {\n const { children, className, classNameInner, classNameContent, borderColor, color, noBorder, style, width } = props\n\n return (\n <Styled.Root\n className={className}\n style={style}\n width={width}\n borderColor={borderColor}\n color={color}\n noBorder={noBorder}\n >\n <Styled.Inner className={classNameInner}>\n <Styled.Content noBorder={noBorder} className={classNameContent}>\n {children}\n </Styled.Content>\n </Styled.Inner>\n </Styled.Root>\n )\n}\n"],"names":["Tabs","props","children","className","classNameInner","classNameContent","borderColor","color","noBorder","style","width","_jsx","Styled.Root","Styled.Inner","Styled.Content","defaultProps","Tab","TabsTab"],"mappings":"yIAkCO,SAASA,EAAKC,GACnB,IAAMC,SAAEA,EAAFC,UAAYA,EAAZC,eAAuBA,EAAvBC,iBAAuCA,EAAvCC,YAAyDA,EAAzDC,MAAsEA,EAAtEC,SAA6EA,EAA7EC,MAAuFA,EAAvFC,MAA8FA,GAAUT,EAE9G,OACEU,EAACC,EAAD,CACET,UAAWA,EACXM,MAAOA,EACPC,MAAOA,EACPJ,YAAaA,EACbC,MAAOA,EACPC,SAAUA,EANZN,SAQES,EAACE,EAAD,CAAcV,UAAWC,EAAzBF,SACES,EAACG,EAAD,CAAgBN,SAAUA,EAAUL,UAAWE,EAA/CH,SACGA,QA3BXF,EAAKe,aAAe,CAClBT,YAAa,OACbC,MAAO,0BAGTP,EAAKgB,IAAMC"}
1
+ {"version":3,"file":"Tabs.js","sources":["../../../../src/components/Tabs/Tabs.tsx"],"sourcesContent":["import { ResponsiveProperty } from 'mixins/responsive-property'\nimport { ColorProperty } from 'mixins/color'\nimport { BaseProps } from 'shared/interfaces'\nimport { Tab } from 'components/Tab'\nimport * as Styled from './style'\n\nexport interface TabsProps extends BaseProps, ColorProperty, ColorProperty<'borderColor'> {\n /**\n * Primary content.\n */\n /**\n * Children react node\n */\n children?: React.ReactNode\n className?: string\n classNameInner?: string\n classNameContent?: string\n noBorder?: boolean\n width?: ResponsiveProperty<number>\n}\n\nTabs.defaultProps = {\n borderColor: 'alto',\n color: 'rgba(247, 247, 247, 1)',\n}\n\nTabs.Tab = Tab\n\n/**\n *\n * Use only with default preset\n *\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`Color<'borderColor'>`](#/Миксины)\n */\nexport function Tabs(props: TabsProps) {\n const { children, className, classNameInner, classNameContent, borderColor, color, noBorder, style, width } = props\n\n return (\n <Styled.Root\n className={className}\n style={style}\n width={width}\n borderColor={borderColor}\n color={color}\n noBorder={noBorder}\n >\n <Styled.Inner className={classNameInner}>\n <Styled.Content noBorder={noBorder} className={classNameContent}>\n {children}\n </Styled.Content>\n </Styled.Inner>\n </Styled.Root>\n )\n}\n"],"names":["Tabs","props","children","className","classNameInner","classNameContent","borderColor","color","noBorder","style","width","_jsx","Styled.Root","Styled.Inner","Styled.Content","defaultProps","Tab"],"mappings":"sIAqCO,SAASA,EAAKC,GACnB,IAAMC,SAAEA,EAAFC,UAAYA,EAAZC,eAAuBA,EAAvBC,iBAAuCA,EAAvCC,YAAyDA,EAAzDC,MAAsEA,EAAtEC,SAA6EA,EAA7EC,MAAuFA,EAAvFC,MAA8FA,GAAUT,EAE9G,OACEU,EAACC,EAAD,CACET,UAAWA,EACXM,MAAOA,EACPC,MAAOA,EACPJ,YAAaA,EACbC,MAAOA,EACPC,SAAUA,EANZN,SAQES,EAACE,EAAD,CAAcV,UAAWC,EAAzBF,SACES,EAACG,EAAD,CAAgBN,SAAUA,EAAUL,UAAWE,EAA/CH,SACGA,QA9BXF,EAAKe,aAAe,CAClBT,YAAa,OACbC,MAAO,0BAGTP,EAAKgB,IAAMA"}
@@ -1,2 +1,2 @@
1
- import o,{css as r}from'styled-components';import{color as t}from'../../mixins/color.js';import{responsiveProperty as e}from'../../mixins/responsive-property.js';var i=o=>r(["border-bottom:1px solid ",";"],o);var n=r(["color:",";position:relative;&:after{width:initial;opacity:1;}"],(o=>o.theme.colors.primary));var l=o.div.withConfig({shouldForwardProp:o=>'children'===o}).withConfig({componentId:"fox-ui__sc-ggtlgu-0"})(["color:rgba(247,247,247,1);display:flex;align-items:flex-end;justify-content:center;flex-direction:row;"," "," ",""],(o=>o.borderColor&&!o.noBorder?t(o.borderColor,i):null),(o=>o.color?t(o.color):null),e('width'));var a=o.div.withConfig({componentId:"fox-ui__sc-ggtlgu-1"})(["position:relative;display:block;width:auto;height:auto;padding:0;margin:0 -20px;box-sizing:border-box;background:transparent;overflow:visible;max-width:100%;width:100%;&::before,&::after{position:absolute;z-index:1;top:0;bottom:0;display:block;content:'';width:","px;height:100%;}&::before{left:0;background:linear-gradient(-90deg,rgba(247,247,247,0) 0%,currentColor 100%);}&::after{right:0;background:linear-gradient(90deg,rgba(247,247,247,0) 0%,currentColor 100%);}"],20);var s=o.div.withConfig({componentId:"fox-ui__sc-ggtlgu-2"})(["display:block;padding:0;margin:0 auto;white-space:nowrap;box-sizing:border-box;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;color:",";scrollbar-width:none;&::-webkit-scrollbar{height:0;background:transparent;visibility:hidden;}&::-webkit-scrollbar-thumb{height:0px;background:transparent;visibility:hidden;}",""],(o=>o.theme.colors.mineShaft),(o=>o.noBorder?r(["display:flex;justify-content:space-between;width:100%;"]):null));var c=o.div.withConfig({shouldForwardProp:o=>!['themeKey','color','borderColor','active'].includes(o)}).withConfig({componentId:"fox-ui__sc-ggtlgu-3"})(["display:inline-block;margin-bottom:-1px;flex-shrink:0;font-size:16px;font-weight:bold;line-height:20px;padding-bottom:14px;text-decoration:none;cursor:pointer;z-index:2;transition:color 0.2s ease-out;"," "," &:after{opacity:0;width:0;content:'';height:3px;position:absolute;bottom:-1px;z-index:1;left:0;right:0;background-color:currentColor;transition:opacity 0.2s ease-out;}&:hover{color:",";}& + &{margin-left:60px;}"," "," &.active{","}"],(o=>o.color?t(o.color):null),(o=>o.borderColor?t(o.borderColor,i):null),(o=>o.theme.colors.primary),(o=>o.themeKey?(o=>{switch(o){case'compact':return r(["font-weight:normal;& + &{margin-left:20px;}"]);case'crispyCompact':return r(["text-transform:uppercase;font-size:12px;height:16px;line-height:16px;padding-bottom:8px;border-bottom:1px solid ",";& + &{margin-left:18px;}"],(o=>o.theme.colors.mercury));case'crispy':return r(["height:35px;text-transform:uppercase;font-size:12px;& + &{margin-left:32px;}"]);default:return null}})(o.themeKey):null),(o=>o.active?n:null),n);export{s as Content,a as Inner,l as Root,c as Tab};
1
+ import o,{css as r}from'styled-components';import{color as i}from'../../mixins/color.js';import{responsiveProperty as t}from'../../mixins/responsive-property.js';var e=o=>r(["border-bottom:1px solid ",";"],o);var n=o.div.withConfig({shouldForwardProp:o=>'children'===o}).withConfig({componentId:"fox-ui__sc-ggtlgu-0"})(["color:rgba(247,247,247,1);display:flex;align-items:flex-end;justify-content:center;flex-direction:row;& .fox-tab:not(:first-child){margin-left:20px;}"," "," ",""],(o=>o.borderColor&&!o.noBorder?i(o.borderColor,e):null),(o=>o.color?i(o.color):null),t('width'));var l=o.div.withConfig({componentId:"fox-ui__sc-ggtlgu-1"})(["position:relative;display:block;width:auto;height:auto;padding:0;margin:0 -20px;box-sizing:border-box;background:transparent;overflow:visible;max-width:100%;width:100%;&::before,&::after{position:absolute;top:0;bottom:0;display:block;content:'';width:","px;height:100%;}&::before{left:0;background:linear-gradient(-90deg,rgba(247,247,247,0) 0%,currentColor 100%);}&::after{right:0;background:linear-gradient(90deg,rgba(247,247,247,0) 0%,currentColor 100%);}"],20);var a=o.div.withConfig({componentId:"fox-ui__sc-ggtlgu-2"})(["position:relative;z-index:1;display:block;padding:0;margin:0 auto;white-space:nowrap;box-sizing:border-box;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;color:",";scrollbar-width:none;&::-webkit-scrollbar{height:0;background:transparent;visibility:hidden;}&::-webkit-scrollbar-thumb{height:0px;background:transparent;visibility:hidden;}",""],(o=>o.theme.colors.mineShaft),(o=>o.noBorder?r(["display:flex;justify-content:space-between;width:100%;"]):null));export{a as Content,l as Inner,n as Root};
2
2
  //# sourceMappingURL=style.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sources":["../../../../src/components/Tabs/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { color } from 'mixins/color'\nimport { responsiveProperty } from 'mixins/responsive-property'\nimport { TabsProps } from './Tabs'\nimport { TabProps } from './TabsTab'\n\nconst BEFORE_AFTER_SHADOW_WIDTH = 20\n\nconst borderColor = (color: string) => css`\n border-bottom: 1px solid ${color};\n`\n\nconst getThemedCss = (theme: TabProps['theme']) => {\n switch (theme) {\n case 'compact':\n return css`\n font-weight: normal;\n & + & {\n margin-left: 20px;\n }\n `\n case 'crispyCompact':\n return css`\n text-transform: uppercase;\n font-size: 12px;\n height: 16px;\n line-height: 16px;\n padding-bottom: 8px;\n border-bottom: 1px solid ${(props) => props.theme.colors.mercury};\n & + & {\n margin-left: 18px;\n }\n `\n case 'crispy':\n return css`\n height: 35px;\n text-transform: uppercase;\n font-size: 12px;\n & + & {\n margin-left: 32px;\n }\n `\n default:\n return null\n }\n}\n\nconst activeTab = css`\n color: ${(props) => props.theme.colors.primary};\n position: relative;\n &:after {\n width: initial;\n opacity: 1;\n }\n`\n\nexport const Root = styled.div.withConfig({\n shouldForwardProp: (prop) => prop === 'children',\n})<Pick<TabsProps, 'noBorder' | 'borderColor' | 'color' | 'width'>>`\n color: rgba(247, 247, 247, 1);\n display: flex;\n align-items: flex-end;\n justify-content: center;\n flex-direction: row;\n ${(props) => (props.borderColor && !props.noBorder ? color(props.borderColor, borderColor) : null)}\n ${(props) => (props.color ? color(props.color) : null)}\n ${responsiveProperty('width')}\n`\n\nexport const Inner = styled.div`\n position: relative;\n display: block;\n width: auto;\n height: auto;\n padding: 0;\n margin: 0 -20px;\n box-sizing: border-box;\n background: transparent;\n overflow: visible;\n max-width: 100%;\n width: 100%;\n &::before,\n &::after {\n position: absolute;\n z-index: 1;\n top: 0;\n bottom: 0;\n display: block;\n content: '';\n width: ${BEFORE_AFTER_SHADOW_WIDTH}px;\n height: 100%;\n }\n\n &::before {\n left: 0;\n background: linear-gradient(-90deg, rgba(247, 247, 247, 0) 0%, currentColor 100%);\n }\n\n &::after {\n right: 0;\n background: linear-gradient(90deg, rgba(247, 247, 247, 0) 0%, currentColor 100%);\n }\n`\n\nexport const Content = styled.div<Pick<TabsProps, 'noBorder'>>`\n display: block;\n padding: 0;\n margin: 0 auto;\n white-space: nowrap;\n box-sizing: border-box;\n overflow-x: auto;\n overflow-y: hidden;\n -webkit-overflow-scrolling: touch;\n color: ${(props) => props.theme.colors.mineShaft};\n scrollbar-width: none;\n\n &::-webkit-scrollbar {\n height: 0;\n background: transparent;\n visibility: hidden;\n }\n\n &::-webkit-scrollbar-thumb {\n height: 0px;\n background: transparent;\n visibility: hidden;\n }\n\n ${(props) =>\n props.noBorder\n ? css`\n display: flex;\n justify-content: space-between;\n width: 100%;\n `\n : null}\n`\n\nexport const Tab = styled.div.withConfig<TabProps & { themeKey: TabProps['theme'] }>({\n shouldForwardProp: (prop) => !['themeKey', 'color', 'borderColor', 'active'].includes(prop),\n})`\n display: inline-block;\n margin-bottom: -1px;\n flex-shrink: 0;\n font-size: 16px;\n font-weight: bold;\n line-height: 20px;\n padding-bottom: 14px;\n text-decoration: none;\n cursor: pointer;\n z-index: 2;\n transition: color 0.2s ease-out;\n ${(props) => (props.color ? color(props.color) : null)}\n ${(props) => (props.borderColor ? color(props.borderColor, borderColor) : null)}\n &:after {\n opacity: 0;\n width: 0;\n content: '';\n height: 3px;\n position: absolute;\n bottom: -1px;\n z-index: 1;\n left: 0;\n right: 0;\n background-color: currentColor;\n transition: opacity 0.2s ease-out;\n }\n &:hover {\n color: ${(props) => props.theme.colors.primary};\n }\n & + & {\n margin-left: 60px;\n }\n ${(props) => (props.themeKey ? getThemedCss(props.themeKey) : null)}\n ${(props) => (props.active ? activeTab : null)}\n &.active {\n ${activeTab}\n }\n`\n"],"names":["borderColor","color","css","activeTab","props","theme","colors","primary","Root","styled","div","withConfig","shouldForwardProp","prop","componentId","noBorder","responsiveProperty","Inner","Content","mineShaft","Tab","includes","themeKey","mercury","active"],"mappings":"kKAQA,IAAMA,EAAeC,GAAkBC,EAAnB,CAAA,2BAAA,KACSD,GAsC7B,IAAME,EAAYD,EAAH,CAAA,SAAA,yDACHE,GAAUA,EAAMC,MAAMC,OAAOC,UAQlC,IAAMC,EAAOC,EAAOC,IAAIC,WAAW,CACxCC,kBAAoBC,GAAkB,aAATA,IADdF,WAAA,CAAAG,YAAA,uBAAGL,CAAH,CAAA,yGAAA,IAAA,IAAA,KAQZL,GAAWA,EAAMJ,cAAgBI,EAAMW,SAAWd,EAAMG,EAAMJ,YAAaA,GAAe,OAC1FI,GAAWA,EAAMH,MAAQA,EAAMG,EAAMH,OAAS,MAC/Ce,EAAmB,UAGVC,IAAAA,EAAQR,EAAOC,IAAVC,WAAA,CAAAG,YAAA,uBAAGL,CAAH,CAAA,wQAAA,+MA/DgB,IAkGrBS,IAAAA,EAAUT,EAAOC,IAAVC,WAAA,CAAAG,YAAA,uBAAGL,CAAH,CAAA,2JAAA,iLAAA,KASRL,GAAUA,EAAMC,MAAMC,OAAOa,YAepCf,GACDA,EAAMW,SACFb,EADJ,CAAA,2DAMI,OAGD,IAAMkB,EAAMX,EAAOC,IAAIC,WAAuD,CACnFC,kBAAoBC,IAAU,CAAC,WAAY,QAAS,cAAe,UAAUQ,SAASR,KADxEF,WAAA,CAAAG,YAAA,uBAAGL,CAAH,CAAA,2MAAA,IAAA,yLAAA,6BAAA,IAAA,aAAA,MAcXL,GAAWA,EAAMH,MAAQA,EAAMG,EAAMH,OAAS,OAC9CG,GAAWA,EAAMJ,YAAcC,EAAMG,EAAMJ,YAAaA,GAAe,OAe9DI,GAAUA,EAAMC,MAAMC,OAAOC,UAKtCH,GAAWA,EAAMkB,SAjKAjB,CAAAA,IACpB,OAAQA,GACN,IAAK,UACH,OAAOH,EAAP,CAAA,gDAMF,IAAK,gBACH,OAAOA,EAMuBE,CAAAA,mHAAAA,8BAAAA,GAAUA,EAAMC,MAAMC,OAAOiB,UAK7D,IAAK,SACH,OAAOrB,EAAP,CAAA,iFAQF,QACE,OAAO,OA/BSG,CAiKwBD,EAAMkB,UAAY,OAC3DlB,GAAWA,EAAMoB,OAASrB,EAAY,MAErCA"}
1
+ {"version":3,"file":"style.js","sources":["../../../../src/components/Tabs/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { color } from 'mixins/color'\nimport { responsiveProperty } from 'mixins/responsive-property'\nimport { TabsProps } from './Tabs'\n\nconst BEFORE_AFTER_SHADOW_WIDTH = 20\n\nconst borderColor = (color: string) => css`\n border-bottom: 1px solid ${color};\n`\n\nexport const Root = styled.div.withConfig({\n shouldForwardProp: (prop) => prop === 'children',\n})<Pick<TabsProps, 'noBorder' | 'borderColor' | 'color' | 'width'>>`\n color: rgba(247, 247, 247, 1);\n display: flex;\n align-items: flex-end;\n justify-content: center;\n flex-direction: row;\n & .fox-tab:not(:first-child) {\n margin-left: 20px;\n }\n ${(props) => (props.borderColor && !props.noBorder ? color(props.borderColor, borderColor) : null)}\n ${(props) => (props.color ? color(props.color) : null)}\n ${responsiveProperty('width')}\n`\n\nexport const Inner = styled.div`\n position: relative;\n display: block;\n width: auto;\n height: auto;\n padding: 0;\n margin: 0 -20px;\n box-sizing: border-box;\n background: transparent;\n overflow: visible;\n max-width: 100%;\n width: 100%;\n &::before,\n &::after {\n position: absolute;\n top: 0;\n bottom: 0;\n display: block;\n content: '';\n width: ${BEFORE_AFTER_SHADOW_WIDTH}px;\n height: 100%;\n }\n\n &::before {\n left: 0;\n background: linear-gradient(-90deg, rgba(247, 247, 247, 0) 0%, currentColor 100%);\n }\n\n &::after {\n right: 0;\n background: linear-gradient(90deg, rgba(247, 247, 247, 0) 0%, currentColor 100%);\n }\n`\n\nexport const Content = styled.div<Pick<TabsProps, 'noBorder'>>`\n position: relative;\n z-index: 1;\n display: block;\n padding: 0;\n margin: 0 auto;\n white-space: nowrap;\n box-sizing: border-box;\n overflow-x: auto;\n overflow-y: hidden;\n -webkit-overflow-scrolling: touch;\n color: ${(props) => props.theme.colors.mineShaft};\n scrollbar-width: none;\n\n &::-webkit-scrollbar {\n height: 0;\n background: transparent;\n visibility: hidden;\n }\n\n &::-webkit-scrollbar-thumb {\n height: 0px;\n background: transparent;\n visibility: hidden;\n }\n\n ${(props) =>\n props.noBorder\n ? css`\n display: flex;\n justify-content: space-between;\n width: 100%;\n `\n : null}\n`\n"],"names":["borderColor","color","css","Root","styled","div","withConfig","shouldForwardProp","prop","componentId","props","noBorder","responsiveProperty","Inner","Content","theme","colors","mineShaft"],"mappings":"kKAOA,IAAMA,EAAeC,GAAkBC,EAAnB,CAAA,2BAAA,KACSD,GAGtB,IAAME,EAAOC,EAAOC,IAAIC,WAAW,CACxCC,kBAAoBC,GAAkB,aAATA,IADdF,WAAA,CAAAG,YAAA,uBAAGL,CAAH,CAAA,wJAAA,IAAA,IAAA,KAWZM,GAAWA,EAAMV,cAAgBU,EAAMC,SAAWV,EAAMS,EAAMV,YAAaA,GAAe,OAC1FU,GAAWA,EAAMT,MAAQA,EAAMS,EAAMT,OAAS,MAC/CW,EAAmB,UAGVC,IAAAA,EAAQT,EAAOC,IAAVC,WAAA,CAAAG,YAAA,uBAAGL,CAAH,CAAA,8PAAA,+MAtBgB,IAwDrBU,IAAAA,EAAUV,EAAOC,IAAVC,WAAA,CAAAG,YAAA,uBAAGL,CAAH,CAAA,uLAAA,iLAAA,KAWRM,GAAUA,EAAMK,MAAMC,OAAOC,YAepCP,GACDA,EAAMC,SACFT,EADJ,CAAA,2DAMI"}
@@ -1 +1 @@
1
- {"version":3,"file":"Tag.js","sources":["../../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import { ResponsiveNamedProperty } from 'mixins/responsive-property'\nimport { ColorProperty } from 'mixins/color'\nimport { DisplayProperty } from 'mixins/display'\nimport { BaseProps } from 'shared/interfaces'\nimport { DefaultColorNames } from 'theme/colors'\nimport { TextProps } from '../Text'\nimport * as Styled from './style'\n\nexport interface TagProps\n extends BaseProps,\n DisplayProperty,\n ColorProperty,\n ResponsiveNamedProperty<'height'>,\n ResponsiveNamedProperty<'width'> {\n as?: 'button' | 'div' | 'input' | 'label'\n /**\n * Field id\n */\n id?: string\n /**\n * Field name\n */\n name?: string\n /**\n * Input type\n */\n inputType?: 'checkbox' | 'radio'\n /**\n * On change handler\n */\n onChange?(_e: React.ChangeEvent<HTMLInputElement>): void\n /**\n * On click handler\n */\n onClick?(_e: React.MouseEvent<HTMLInputElement>): void\n /**\n * Whether or not Radio is checked\n */\n defaultChecked?: boolean\n /**\n * Value\n */\n value?: string | number\n /** Children are placed before Text */\n /**\n * Children react node\n */\n children?: React.ReactNode\n /** Inner Text content */\n content?: React.ReactNode\n /** Inner Text component props */\n textProps?: TextProps\n /** Checked state */\n checked?: boolean\n /** Disabled state */\n disabled?: boolean\n /** Error state */\n error?: boolean\n /** If as = 'label' could provide for */\n htmlFor?: string\n /**\n * inverse\n */\n inverse?: boolean\n /**\n * Size\n */\n size?: 'l' | 'm' | 's' | 'xs'\n}\n\nTag.defaultProps = {\n display: 'inline-block',\n as: 'button',\n height: 40,\n}\n\nTagInput.defaultProps = {\n display: 'inline-block',\n height: 40,\n}\n\n// Prevent brakechanges\nTag.Input = TagInput\n\nTag.displayName = 'Tag'\n\nfunction TagInput(props: typeof TagInput.defaultProps & TagProps) {\n return <Tag as='input' {...props} />\n}\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Display`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`ResponsiveNamedProperty<'width'>`](#/Миксины)\n * - [`ResponsiveNamedProperty<'height'>`](#/Миксины)\n */\nexport function Tag(props: typeof Tag.defaultProps & TagProps) {\n const {\n as,\n textProps,\n content,\n children,\n htmlFor,\n id,\n name,\n inputType,\n value,\n disabled,\n onChange,\n onClick,\n inverse,\n checked,\n ...restProps\n } = props\n\n const buttonProps = as === 'button' ? { type: 'button' } : {}\n const labelProps = as === 'label' ? { htmlFor } : {}\n const inputProps = as === 'input' ? { htmlFor: id || name } : {}\n\n return (\n <Styled.Root\n as={as === 'input' ? 'label' : as}\n inverse={inverse}\n checked={checked}\n disabled={disabled}\n onClick={as !== 'input' ? onClick : undefined}\n {...labelProps}\n {...buttonProps}\n {...inputProps}\n {...restProps}\n >\n {as === 'input' ? (\n <input\n id={id || name}\n name={name}\n type={inputType || 'checkbox'}\n tabIndex={0}\n onChange={(e) => {\n e.persist()\n\n return onChange && onChange(e)\n }}\n onClick={(e) => {\n e.persist()\n\n return onClick && onClick(e)\n }}\n defaultChecked={props.defaultChecked}\n checked={checked}\n value={value}\n disabled={disabled}\n hidden\n />\n ) : null}\n {children}\n <Styled.Text\n size={14}\n forwardedAs='span'\n color={checked && !inverse ? DefaultColorNames.white : DefaultColorNames.mineShaft}\n {...textProps}\n >\n {content}\n </Styled.Text>\n </Styled.Root>\n )\n}\n"],"names":["TagInput","props","_jsx","Tag","_objectSpread","as","textProps","content","children","htmlFor","id","name","inputType","value","disabled","onChange","onClick","inverse","checked","restProps","_excluded","buttonProps","type","inputProps","_jsxs","Styled.Root","tabIndex","_onChange","_x","apply","this","arguments","toString","e","persist","_onClick","_x2","defaultChecked","hidden","Styled.Text","size","forwardedAs","color","DefaultColorNames","white","mineShaft","defaultProps","display","height","Input","displayName"],"mappings":"sZAsFA,SAASA,EAASC,GAChB,OAAOC,EAACC,EAADC,EAAA,CAAKC,GAAG,SAAYJ,IAWtB,SAASE,EAAIF,GAClB,IAAMI,GACJA,EADIC,UAEJA,EAFIC,QAGJA,EAHIC,SAIJA,EAJIC,QAKJA,EALIC,GAMJA,EANIC,KAOJA,EAPIC,UAQJA,EARIC,MASJA,EATIC,SAUJA,EAVIC,SAWJA,EAXIC,QAYJA,EAZIC,QAaJA,EAbIC,QAcJA,GAEEjB,EADCkB,IACDlB,EAhBJmB,GAkBA,IAAMC,EAAqB,WAAPhB,EAAkB,CAAEiB,KAAM,UAAa,GAE3D,IAAMC,EAAoB,UAAPlB,EAAiB,CAAEI,QAASC,GAAMC,GAAS,GAE9D,OACEa,EAACC,EAADrB,EAAAA,EAAAA,EAAAA,EAAAA,EAAA,CACEC,GAAW,UAAPA,EAAiB,QAAUA,EAC/BY,QAASA,EACTC,QAASA,EACTJ,SAAUA,EACVE,QAAgB,UAAPX,EAAiBW,OAAAA,GATJ,UAAPX,EAAiB,CAAEI,QAAAA,GAAY,IAW1CY,GACAE,GACAJ,GATN,GAAA,CAAAX,SAWGH,CAAO,UAAPA,EACCH,EAAA,QAAA,CACEQ,GAAIA,GAAMC,EACVA,KAAMA,EACNW,KAAMV,GAAa,WACnBc,SAAU,EACVX,SAAQ,SAAAY,GAAA,SAAAZ,EAAAa,GAAA,OAAAD,EAAAE,MAAAC,KAAAC,WAAA,OAAAhB,EAAAiB,SAAA,IAAAL,EAAAK,WAAAjB,EAAA,EAAGkB,IACTA,EAAEC,UAEKnB,GAAYA,EAASkB,MAE9BjB,QAAO,SAAAmB,GAAA,SAAAnB,EAAAoB,GAAA,OAAAD,EAAAN,MAAAC,KAAAC,WAAA,OAAAf,EAAAgB,SAAA,IAAAG,EAAAH,WAAAhB,EAAA,EAAGiB,IACRA,EAAEC,UAEKlB,GAAWA,EAAQiB,MAE5BI,eAAgBpC,EAAMoC,eACtBnB,QAASA,EACTL,MAAOA,EACPC,SAAUA,EACVwB,QAAM,IAEN,KACH9B,EACDN,EAACqC,EAADnC,EAAAA,EAAA,CACEoC,KAAM,GACNC,YAAY,OACZC,MAAOxB,IAAYD,EAAU0B,EAAkBC,MAAQD,EAAkBE,WACrEvC,GAJN,GAAA,CAAAE,SAMGD,SA7FTJ,EAAI2C,aAAe,CACjBC,QAAS,eACT1C,GAAI,SACJ2C,OAAQ,IAGVhD,EAAS8C,aAAe,CACtBC,QAAS,eACTC,OAAQ,IAIV7C,EAAI8C,MAAQjD,EAEZG,EAAI+C,YAAc"}
1
+ {"version":3,"file":"Tag.js","sources":["../../../../src/components/Tag/Tag.tsx"],"sourcesContent":["import { ResponsiveNamedProperty } from 'mixins/responsive-property'\nimport { ColorProperty } from 'mixins/color'\nimport { DisplayProperty } from 'mixins/display'\nimport type { BaseProps, TextProps } from 'shared/interfaces'\nimport { DefaultColorNames } from 'theme/colors'\nimport * as Styled from './style'\n\nexport interface TagProps\n extends BaseProps,\n DisplayProperty,\n ColorProperty,\n ResponsiveNamedProperty<'height'>,\n ResponsiveNamedProperty<'width'> {\n as?: 'button' | 'div' | 'input' | 'label'\n /**\n * Field id\n */\n id?: string\n /**\n * Field name\n */\n name?: string\n /**\n * Input type\n */\n inputType?: 'checkbox' | 'radio'\n /**\n * On change handler\n */\n onChange?(_e: React.ChangeEvent<HTMLInputElement>): void\n /**\n * On click handler\n */\n onClick?(_e: React.MouseEvent<HTMLInputElement>): void\n /**\n * Whether or not Radio is checked\n */\n defaultChecked?: boolean\n /**\n * Value\n */\n value?: string | number\n /** Children are placed before Text */\n /**\n * Children react node\n */\n children?: React.ReactNode\n /** Inner Text content */\n content?: React.ReactNode\n /** Inner Text component props */\n textProps?: TextProps\n /** Checked state */\n checked?: boolean\n /** Disabled state */\n disabled?: boolean\n /** Error state */\n error?: boolean\n /** If as = 'label' could provide for */\n htmlFor?: string\n /**\n * inverse\n */\n inverse?: boolean\n /**\n * Size\n */\n size?: 'l' | 'm' | 's' | 'xs'\n}\n\nTag.defaultProps = {\n display: 'inline-block',\n as: 'button',\n height: 40,\n}\n\nTagInput.defaultProps = {\n display: 'inline-block',\n height: 40,\n}\n\n// Prevent brakechanges\nTag.Input = TagInput\n\nTag.displayName = 'Tag'\n\nfunction TagInput(props: typeof TagInput.defaultProps & TagProps) {\n return <Tag as='input' {...props} />\n}\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Display`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`ResponsiveNamedProperty<'width'>`](#/Миксины)\n * - [`ResponsiveNamedProperty<'height'>`](#/Миксины)\n */\nexport function Tag(props: typeof Tag.defaultProps & TagProps) {\n const {\n as,\n textProps,\n content,\n children,\n htmlFor,\n id,\n name,\n inputType,\n value,\n disabled,\n onChange,\n onClick,\n inverse,\n checked,\n ...restProps\n } = props\n\n const buttonProps = as === 'button' ? { type: 'button' } : {}\n const labelProps = as === 'label' ? { htmlFor } : {}\n const inputProps = as === 'input' ? { htmlFor: id || name } : {}\n\n return (\n <Styled.Root\n as={as === 'input' ? 'label' : as}\n inverse={inverse}\n checked={checked}\n disabled={disabled}\n onClick={as !== 'input' ? onClick : undefined}\n {...labelProps}\n {...buttonProps}\n {...inputProps}\n {...restProps}\n >\n {as === 'input' ? (\n <input\n id={id || name}\n name={name}\n type={inputType || 'checkbox'}\n tabIndex={0}\n onChange={(e) => {\n e.persist()\n\n return onChange && onChange(e)\n }}\n onClick={(e) => {\n e.persist()\n\n return onClick && onClick(e)\n }}\n defaultChecked={props.defaultChecked}\n checked={checked}\n value={value}\n disabled={disabled}\n hidden\n />\n ) : null}\n {children}\n <Styled.Text\n size={14}\n forwardedAs='span'\n color={checked && !inverse ? DefaultColorNames.white : DefaultColorNames.mineShaft}\n {...textProps}\n >\n {content}\n </Styled.Text>\n </Styled.Root>\n )\n}\n"],"names":["TagInput","props","_jsx","Tag","_objectSpread","as","textProps","content","children","htmlFor","id","name","inputType","value","disabled","onChange","onClick","inverse","checked","restProps","_excluded","buttonProps","type","inputProps","_jsxs","Styled.Root","tabIndex","_onChange","_x","apply","this","arguments","toString","e","persist","_onClick","_x2","defaultChecked","hidden","Styled.Text","size","forwardedAs","color","DefaultColorNames","white","mineShaft","defaultProps","display","height","Input","displayName"],"mappings":"sZAqFA,SAASA,EAASC,GAChB,OAAOC,EAACC,EAADC,EAAA,CAAKC,GAAG,SAAYJ,IAWtB,SAASE,EAAIF,GAClB,IAAMI,GACJA,EADIC,UAEJA,EAFIC,QAGJA,EAHIC,SAIJA,EAJIC,QAKJA,EALIC,GAMJA,EANIC,KAOJA,EAPIC,UAQJA,EARIC,MASJA,EATIC,SAUJA,EAVIC,SAWJA,EAXIC,QAYJA,EAZIC,QAaJA,EAbIC,QAcJA,GAEEjB,EADCkB,IACDlB,EAhBJmB,GAkBA,IAAMC,EAAqB,WAAPhB,EAAkB,CAAEiB,KAAM,UAAa,GAE3D,IAAMC,EAAoB,UAAPlB,EAAiB,CAAEI,QAASC,GAAMC,GAAS,GAE9D,OACEa,EAACC,EAADrB,EAAAA,EAAAA,EAAAA,EAAAA,EAAA,CACEC,GAAW,UAAPA,EAAiB,QAAUA,EAC/BY,QAASA,EACTC,QAASA,EACTJ,SAAUA,EACVE,QAAgB,UAAPX,EAAiBW,OAAAA,GATJ,UAAPX,EAAiB,CAAEI,QAAAA,GAAY,IAW1CY,GACAE,GACAJ,GATN,GAAA,CAAAX,SAWGH,CAAO,UAAPA,EACCH,EAAA,QAAA,CACEQ,GAAIA,GAAMC,EACVA,KAAMA,EACNW,KAAMV,GAAa,WACnBc,SAAU,EACVX,SAAQ,SAAAY,GAAA,SAAAZ,EAAAa,GAAA,OAAAD,EAAAE,MAAAC,KAAAC,WAAA,OAAAhB,EAAAiB,SAAA,IAAAL,EAAAK,WAAAjB,EAAA,EAAGkB,IACTA,EAAEC,UAEKnB,GAAYA,EAASkB,MAE9BjB,QAAO,SAAAmB,GAAA,SAAAnB,EAAAoB,GAAA,OAAAD,EAAAN,MAAAC,KAAAC,WAAA,OAAAf,EAAAgB,SAAA,IAAAG,EAAAH,WAAAhB,EAAA,EAAGiB,IACRA,EAAEC,UAEKlB,GAAWA,EAAQiB,MAE5BI,eAAgBpC,EAAMoC,eACtBnB,QAASA,EACTL,MAAOA,EACPC,SAAUA,EACVwB,QAAM,IAEN,KACH9B,EACDN,EAACqC,EAADnC,EAAAA,EAAA,CACEoC,KAAM,GACNC,YAAY,OACZC,MAAOxB,IAAYD,EAAU0B,EAAkBC,MAAQD,EAAkBE,WACrEvC,GAJN,GAAA,CAAAE,SAMGD,SA7FTJ,EAAI2C,aAAe,CACjBC,QAAS,eACT1C,GAAI,SACJ2C,OAAQ,IAGVhD,EAAS8C,aAAe,CACtBC,QAAS,eACTC,OAAQ,IAIV7C,EAAI8C,MAAQjD,EAEZG,EAAI+C,YAAc"}
@@ -1 +1 @@
1
- {"version":3,"file":"style.js","sources":["../../../../src/components/Tag/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { display } from 'mixins/display'\nimport { property, PossibleValues, responsiveNamedProperty } from 'mixins/responsive-property'\nimport { color } from 'mixins/color'\nimport { Text as UiText, TextProps } from '../Text'\nimport { TagProps } from './Tag'\n\nconst WIDTHS: Record<Partial<Exclude<TagProps['size'], 'auto' | undefined>>, number> = {\n l: 220,\n m: 182,\n s: 100,\n xs: 60,\n}\n\nconst chooseWidthValue = (props: TagProps): PossibleValues => {\n if (props.width === 'auto') return 'auto'\n if (typeof props.width === 'number') return props.width\n\n if (props.size && WIDTHS[props.size]) return WIDTHS[props.size]\n\n return 'auto'\n}\n\nconst active = css`\n border-color: transparent;\n background-color: currentColor;\n`\n\nexport const Text = styled(UiText)<TextProps>`\n display: inline-block;\n vertical-align: middle;\n white-space: nowrap;\n text-overflow: ellipsis;\n max-width: 100%;\n overflow: hidden;\n vertical-align: middle;\n transition: color 0.25s ease;\n`\n\nconst disabled = css`\n cursor: not-allowed;\n background-color: rgba(0, 0, 0, 0.04);\n ${Text} {\n color: rgba(0, 0, 0, 0.16);\n }\n`\n\nexport const Root = styled.button.withConfig<TagProps>({\n shouldForwardProp: (prop) => ['children', 'htmlFor', 'className', 'style', 'onClick'].includes(prop),\n})`\n padding: 0px 16px;\n margin-bottom: 10px;\n border-radius: 3px;\n background-color: ${(props) => props.theme.colors.white};\n border: 1px solid ${(props) => props.theme.colors.whiteGray};\n box-sizing: border-box;\n vertical-align: middle;\n transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;\n cursor: pointer;\n text-align: center;\n touch-action: manipulation;\n min-width: 60px;\n\n ${(props) => (props.size ? property(chooseWidthValue(props), 'width') : null)}\n ${(props) => (props.height ? property(props.height, 'line-height') : null)}\n ${(props) => (props.height ? property(props.height, 'height') : null)}\n ${({ heightXS, heightS, heightM, heightL, heightXL }) =>\n responsiveNamedProperty({ sizes: { heightXS, heightS, heightM, heightL, heightXL }, cssProperty: 'height' })}\n\n ${(props) => (props.width ? property(props.width, 'width') : null)}\n ${({ widthXS, widthS, widthM, widthL, widthXL }) =>\n responsiveNamedProperty({ sizes: { widthXS, widthS, widthM, widthL, widthXL }, cssProperty: 'width' })}\n\n ${(props) => (props.display ? display(props.display) : null)}\n ${(props) => (props.color ? color(props.color) : null)}\n\n &:not(:last-child) {\n margin-right: 20px;\n }\n\n ${(props) =>\n !props.disabled\n ? css`\n &:hover:not(:disabled) {\n border-color: currentColor;\n }\n &:active:not(:disabled) {\n ${active}\n ${Text} {\n color: ${(props) => props.theme.colors.white};\n }\n }\n `\n : null}\n\n ${(props) => (props.inverse || props.checked ? active : null)}\n\n &:disabled {\n ${disabled}\n }\n ${(props) => (props.disabled ? disabled : null)}\n`\n"],"names":["WIDTHS","l","m","s","xs","active","css","Text","styled","UiText","withConfig","componentId","disabled","Root","button","shouldForwardProp","prop","includes","props","theme","colors","white","whiteGray","size","property","width","height","_ref","heightXS","heightS","heightM","heightL","heightXL","responsiveNamedProperty","sizes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,OAAWA,EAAXC,OAAmBA,EAAnBC,OAA2BA,EAA3BC,QAAmCA,GAApCL,EAAA,OACFH,EAAwB,CAAEC,MAAO,CAAEG,QAAAA,EAASC,OAAAA,EAAQC,OAAAA,EAAQC,OAAAA,EAAQC,QAAAA,GAAWN,YAAa,aAE3FjB,GAAWA,EAAMwB,QAAUA,EAAQxB,EAAMwB,SAAW,OACpDxB,GAAWA,EAAMyB,MAAQA,EAAMzB,EAAMyB,OAAS,OAM9CzB,GACAA,EAAMN,SAYH,KAXAN,EADJ,CAAA,6EAAA,IAAA,UAAA,OAMUD,EACAE,GACUW,GAAUA,EAAMC,MAAMC,OAAOC,UAMhDH,GAAWA,EAAM0B,SAAW1B,EAAM2B,QAAUxC,EAAS,MAGpDO,GAEDM,GAAWA,EAAMN,SAAWA,EAAW"}
1
+ {"version":3,"file":"style.js","sources":["../../../../src/components/Tag/style.ts"],"sourcesContent":["import styled, { css } from 'styled-components'\nimport { display } from 'mixins/display'\nimport { property, PossibleValues, responsiveNamedProperty } from 'mixins/responsive-property'\nimport { color } from 'mixins/color'\nimport type { TextProps } from 'shared/interfaces'\nimport { Text as UiText } from '../Text'\nimport { TagProps } from './Tag'\n\nconst WIDTHS: Record<Partial<Exclude<TagProps['size'], 'auto' | undefined>>, number> = {\n l: 220,\n m: 182,\n s: 100,\n xs: 60,\n}\n\nconst chooseWidthValue = (props: TagProps): PossibleValues => {\n if (props.width === 'auto') return 'auto'\n if (typeof props.width === 'number') return props.width\n\n if (props.size && WIDTHS[props.size]) return WIDTHS[props.size]\n\n return 'auto'\n}\n\nconst active = css`\n border-color: transparent;\n background-color: currentColor;\n`\n\nexport const Text = styled(UiText)<TextProps>`\n display: inline-block;\n vertical-align: middle;\n white-space: nowrap;\n text-overflow: ellipsis;\n max-width: 100%;\n overflow: hidden;\n vertical-align: middle;\n transition: color 0.25s ease;\n`\n\nconst disabled = css`\n cursor: not-allowed;\n background-color: rgba(0, 0, 0, 0.04);\n ${Text} {\n color: rgba(0, 0, 0, 0.16);\n }\n`\n\nexport const Root = styled.button.withConfig<TagProps>({\n shouldForwardProp: (prop) => ['children', 'htmlFor', 'className', 'style', 'onClick'].includes(prop),\n})`\n padding: 0px 16px;\n margin-bottom: 10px;\n border-radius: 3px;\n background-color: ${(props) => props.theme.colors.white};\n border: 1px solid ${(props) => props.theme.colors.whiteGray};\n box-sizing: border-box;\n vertical-align: middle;\n transition: color 0.25s ease, background 0.25s ease, border-color 0.25s ease;\n cursor: pointer;\n text-align: center;\n touch-action: manipulation;\n min-width: 60px;\n\n ${(props) => (props.size ? property(chooseWidthValue(props), 'width') : null)}\n ${(props) => (props.height ? property(props.height, 'line-height') : null)}\n ${(props) => (props.height ? property(props.height, 'height') : null)}\n ${({ heightXS, heightS, heightM, heightL, heightXL }) =>\n responsiveNamedProperty({ sizes: { heightXS, heightS, heightM, heightL, heightXL }, cssProperty: 'height' })}\n\n ${(props) => (props.width ? property(props.width, 'width') : null)}\n ${({ widthXS, widthS, widthM, widthL, widthXL }) =>\n responsiveNamedProperty({ sizes: { widthXS, widthS, widthM, widthL, widthXL }, cssProperty: 'width' })}\n\n ${(props) => (props.display ? display(props.display) : null)}\n ${(props) => (props.color ? color(props.color) : null)}\n\n &:not(:last-child) {\n margin-right: 20px;\n }\n\n ${(props) =>\n !props.disabled\n ? css`\n &:hover:not(:disabled) {\n border-color: currentColor;\n }\n &:active:not(:disabled) {\n ${active}\n ${Text} {\n color: ${(props) => props.theme.colors.white};\n }\n }\n `\n : null}\n\n ${(props) => (props.inverse || props.checked ? active : null)}\n\n &:disabled {\n ${disabled}\n }\n ${(props) => (props.disabled ? disabled : null)}\n`\n"],"names":["WIDTHS","l","m","s","xs","active","css","Text","styled","UiText","withConfig","componentId","disabled","Root","button","shouldForwardProp","prop","includes","props","theme","colors","white","whiteGray","size","property","width","height","_ref","heightXS","heightS","heightM","heightL","heightXL","responsiveNamedProperty","sizes","cssProperty","_ref2","widthXS","widthS","widthM","widthL","widthXL","display","color","inverse","checked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mCA,GAApCL,EAAA,OACFH,EAAwB,CAAEC,MAAO,CAAEG,QAAAA,EAASC,OAAAA,EAAQC,OAAAA,EAAQC,OAAAA,EAAQC,QAAAA,GAAWN,YAAa,aAE3FjB,GAAWA,EAAMwB,QAAUA,EAAQxB,EAAMwB,SAAW,OACpDxB,GAAWA,EAAMyB,MAAQA,EAAMzB,EAAMyB,OAAS,OAM9CzB,GACAA,EAAMN,SAYH,KAXAN,EADJ,CAAA,6EAAA,IAAA,UAAA,OAMUD,EACAE,GACUW,GAAUA,EAAMC,MAAMC,OAAOC,UAMhDH,GAAWA,EAAM0B,SAAW1B,EAAM2B,QAAUxC,EAAS,MAGpDO,GAEDM,GAAWA,EAAMN,SAAWA,EAAW"}
@@ -1 +1 @@
1
- {"version":3,"file":"Text.js","sources":["../../../../src/components/Text/Text.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { useFallbackTheme } from 'hooks/use-theme'\nimport { useConfigPriority } from 'hooks/use-config-priority'\nimport { useClassname } from 'hooks/useClassname'\nimport { TextHeading } from 'components/Text.Heading'\nimport { TextEllipse } from 'components/Text.Ellipse'\nimport { APPEARANCE } from './constants'\nimport type { TextProps, TextComponent, TextAppearance } from './types'\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Text'\n\nconst Text = forwardRef<HTMLElement, TextProps>((props, ref) => {\n const theme = useFallbackTheme()\n\n const prioritizedProps = useConfigPriority<TextProps>(theme.components?.Text, props)\n const appearanceProps = APPEARANCE[prioritizedProps.appearance as TextAppearance] ?? {}\n const mergedProps: TextProps = { ...appearanceProps, ...prioritizedProps }\n\n const {\n as = 'div',\n weight = 'normal',\n lineHeight = 'm',\n fontStyle = 'normal',\n size = 'm',\n content,\n children,\n ...restProps\n } = mergedProps\n\n const className = useClassname(COMPONENT_NAME, restProps.className)\n\n if (children) {\n return (\n <Styled.Root\n {...restProps}\n ref={ref}\n as={as}\n weight={weight}\n lineHeight={lineHeight}\n fontStyle={fontStyle}\n size={size}\n className={className}\n >\n {children}\n </Styled.Root>\n )\n }\n\n return (\n <Styled.Root\n {...restProps}\n ref={ref}\n as={as}\n weight={weight}\n lineHeight={lineHeight}\n fontStyle={fontStyle}\n size={size}\n className={className}\n dangerouslySetInnerHTML={{ __html: content || '' }}\n />\n )\n}) as TextComponent\n\nText.displayName = COMPONENT_NAME\n\nText.Heading = TextHeading\nText.Ellipse = TextEllipse\n\nexport { Text, COMPONENT_NAME }\n"],"names":["COMPONENT_NAME","Text","forwardRef","props","ref","_theme$components","_APPEARANCE","theme","useFallbackTheme","prioritizedProps","useConfigPriority","components","appearanceProps","APPEARANCE","appearance","mergedProps","_objectSpread","as","weight","lineHeight","fontStyle","size","content","children","restProps","_excluded","className","useClassname","_jsx","Styled.Root","dangerouslySetInnerHTML","__html","displayName","Heading","TextHeading","Ellipse","TextEllipse"],"mappings":"gpBAUMA,IAAAA,EAAiB,OAEjBC,IAAAA,EAAOC,IAAoCC,EAAOC,KAAQ,IAAAC,EAAAC,EAC9D,IAAMC,EAAQC,IAEd,IAAMC,EAAmBC,EAAiB,QAAAL,EAAYE,EAAMI,kBAAlB,IAAAN,SAAYA,EAAkBJ,KAAME,GAC9E,IAAMS,EAAe,UAAGC,EAAWJ,EAAiBK,mBAA/B,IAAAR,EAAAA,EAAgE,GACrF,IAAMS,EAAsBC,EAAAA,EAAA,GAAQJ,GAAoBH,GAExD,IAAMQ,GACJA,EAAK,MADDC,OAEJA,EAAS,SAFLC,WAGJA,EAAa,IAHTC,UAIJA,EAAY,SAJRC,KAKJA,EAAO,IALHC,QAMJA,EANIC,SAOJA,GAEER,EADCS,IACDT,EATJU,GAWA,IAAMC,EAAYC,EApBG,OAoB0BH,EAAUE,WAEzD,OAEIE,EAACC,SACKL,GADN,GAFAD,EAEA,CAEEnB,IAAKA,EACLa,GAAIA,EACJC,OAAQA,EACRC,WAAYA,EACZC,UAAWA,EACXC,KAAMA,EACNK,UAAWA,EARbH,SAUGA,GAML,CAEEnB,IAAKA,EACLa,GAAIA,EACJC,OAAQA,EACRC,WAAYA,EACZC,UAAWA,EACXC,KAAMA,EACNK,UAAWA,EACXI,wBAAyB,CAAEC,OAAQT,GAAW,UAKpDrB,EAAK+B,YAtDkB,OAwDvB/B,EAAKgC,QAAUC,EACfjC,EAAKkC,QAAUC"}
1
+ {"version":3,"file":"Text.js","sources":["../../../../src/components/Text/Text.tsx"],"sourcesContent":["import { forwardRef } from 'react'\nimport { useFallbackTheme } from 'hooks/use-theme'\nimport { useConfigPriority } from 'hooks/use-config-priority'\nimport { useClassname } from 'hooks/useClassname'\nimport { TextHeading } from 'components/Text.Heading'\nimport { TextEllipse } from 'components/Text.Ellipse'\nimport type { TextProps, TypographyAppearance } from 'shared/interfaces'\nimport type { TextComponent } from './types'\nimport { APPEARANCE } from './constants'\nimport * as Styled from './style'\n\nconst COMPONENT_NAME = 'Text'\n\nconst Text = forwardRef<HTMLElement, TextProps>((props, ref) => {\n const theme = useFallbackTheme()\n\n const prioritizedProps = useConfigPriority<TextProps>(theme.components?.Text, props)\n const appearanceProps = APPEARANCE[prioritizedProps.appearance as TypographyAppearance] ?? {}\n const mergedProps: TextProps = { ...appearanceProps, ...prioritizedProps }\n\n const {\n as = 'div',\n weight = 'normal',\n lineHeight = 'm',\n fontStyle = 'normal',\n size = 'm',\n content,\n children,\n ...restProps\n } = mergedProps\n\n const className = useClassname(COMPONENT_NAME, restProps.className)\n\n if (children) {\n return (\n <Styled.Root\n {...restProps}\n ref={ref}\n as={as}\n weight={weight}\n lineHeight={lineHeight}\n fontStyle={fontStyle}\n size={size}\n className={className}\n >\n {children}\n </Styled.Root>\n )\n }\n\n return (\n <Styled.Root\n {...restProps}\n ref={ref}\n as={as}\n weight={weight}\n lineHeight={lineHeight}\n fontStyle={fontStyle}\n size={size}\n className={className}\n dangerouslySetInnerHTML={{ __html: content || '' }}\n />\n )\n}) as TextComponent\n\nText.displayName = COMPONENT_NAME\n\nText.Heading = TextHeading\nText.Ellipse = TextEllipse\n\nexport { Text, COMPONENT_NAME }\n"],"names":["COMPONENT_NAME","Text","forwardRef","props","ref","_theme$components","_APPEARANCE","theme","useFallbackTheme","prioritizedProps","useConfigPriority","components","appearanceProps","APPEARANCE","appearance","mergedProps","_objectSpread","as","weight","lineHeight","fontStyle","size","content","children","restProps","_excluded","className","useClassname","_jsx","Styled.Root","dangerouslySetInnerHTML","__html","displayName","Heading","TextHeading","Ellipse","TextEllipse"],"mappings":"gpBAWMA,IAAAA,EAAiB,OAEjBC,IAAAA,EAAOC,IAAoCC,EAAOC,KAAQ,IAAAC,EAAAC,EAC9D,IAAMC,EAAQC,IAEd,IAAMC,EAAmBC,EAAiB,QAAAL,EAAYE,EAAMI,kBAAlB,IAAAN,SAAYA,EAAkBJ,KAAME,GAC9E,IAAMS,EAAe,UAAGC,EAAWJ,EAAiBK,mBAA/B,IAAAR,EAAAA,EAAsE,GAC3F,IAAMS,EAAsBC,EAAAA,EAAA,GAAQJ,GAAoBH,GAExD,IAAMQ,GACJA,EAAK,MADDC,OAEJA,EAAS,SAFLC,WAGJA,EAAa,IAHTC,UAIJA,EAAY,SAJRC,KAKJA,EAAO,IALHC,QAMJA,EANIC,SAOJA,GAEER,EADCS,IACDT,EATJU,GAWA,IAAMC,EAAYC,EApBG,OAoB0BH,EAAUE,WAEzD,OAEIE,EAACC,SACKL,GADN,GAFAD,EAEA,CAEEnB,IAAKA,EACLa,GAAIA,EACJC,OAAQA,EACRC,WAAYA,EACZC,UAAWA,EACXC,KAAMA,EACNK,UAAWA,EARbH,SAUGA,GAML,CAEEnB,IAAKA,EACLa,GAAIA,EACJC,OAAQA,EACRC,WAAYA,EACZC,UAAWA,EACXC,KAAMA,EACNK,UAAWA,EACXI,wBAAyB,CAAEC,OAAQT,GAAW,UAKpDrB,EAAK+B,YAtDkB,OAwDvB/B,EAAKgC,QAAUC,EACfjC,EAAKkC,QAAUC"}
@@ -1 +1 @@
1
- {"version":3,"file":"constants.js","sources":["../../../../src/components/Text/constants.ts"],"sourcesContent":["import type { TextAppearance, TextProps } from './types'\n\nexport const APPEARANCE: Record<TextAppearance, Partial<Omit<TextProps, 'appearance'>>> = {\n display: {\n sizes: { xxxl: 84, xxl: 76, xl: 68, l: 60, m: 52, s: 44, xs: 36, xxs: 28, xxxs: 20 },\n lineHeight: 1,\n weight: 800,\n fontStyle: 'normal',\n margin: 0,\n },\n heading: {\n sizes: { xxxl: 64, xxl: 56, xl: 48, l: 40, m: 36, s: 32, xs: 28, xxs: 24, xxxs: 20 },\n lineHeight: 1.1,\n weight: 800,\n fontStyle: 'normal',\n margin: 0,\n },\n subheading: {\n sizes: { xxxl: 52, xxl: 46, xl: 40, l: 34, m: 28, s: 24, xs: 20, xxs: 16, xxxs: 12 },\n lineHeight: 1.1,\n weight: 700,\n fontStyle: 'normal',\n margin: 0,\n },\n 'subheading-compact': {\n sizes: { xxxl: 36, xxl: 32, xl: 28, l: 24, m: 20, s: 18, xs: 16, xxs: 14, xxxs: 12 },\n lineHeight: 1.3,\n weight: 800,\n fontStyle: 'normal',\n margin: 0,\n },\n body: {\n sizes: { xxxl: 32, xxl: 28, xl: 24, l: 20, m: 18, s: 16, xs: 14, xxs: 12, xxxs: 10 },\n lineHeight: 1.3,\n weight: 400,\n fontStyle: 'normal',\n margin: 0,\n },\n caption: {\n sizes: { xxxl: 32, xxl: 28, xl: 24, l: 20, m: 18, s: 16, xs: 14, xxs: 12, xxxs: 10 },\n lineHeight: 1.2,\n weight: 400,\n fontStyle: 'normal',\n margin: 0,\n },\n}\n"],"names":["APPEARANCE","display","sizes","xxxl","xxl","xl","l","m","s","xs","xxs","xxxs","lineHeight","weight","fontStyle","margin","heading","subheading","body","caption"],"mappings":"AAEO,IAAMA,EAA6E,CACxFC,QAAS,CACPC,MAAO,CAAEC,KAAM,GAAIC,IAAK,GAAIC,GAAI,GAAIC,EAAG,GAAIC,EAAG,GAAIC,EAAG,GAAIC,GAAI,GAAIC,IAAK,GAAIC,KAAM,IAChFC,WAAY,EACZC,OAAQ,IACRC,UAAW,SACXC,OAAQ,GAEVC,QAAS,CACPd,MAAO,CAAEC,KAAM,GAAIC,IAAK,GAAIC,GAAI,GAAIC,EAAG,GAAIC,EAAG,GAAIC,EAAG,GAAIC,GAAI,GAAIC,IAAK,GAAIC,KAAM,IAChFC,WAAY,IACZC,OAAQ,IACRC,UAAW,SACXC,OAAQ,GAEVE,WAAY,CACVf,MAAO,CAAEC,KAAM,GAAIC,IAAK,GAAIC,GAAI,GAAIC,EAAG,GAAIC,EAAG,GAAIC,EAAG,GAAIC,GAAI,GAAIC,IAAK,GAAIC,KAAM,IAChFC,WAAY,IACZC,OAAQ,IACRC,UAAW,SACXC,OAAQ,GAEV,qBAAsB,CACpBb,MAAO,CAAEC,KAAM,GAAIC,IAAK,GAAIC,GAAI,GAAIC,EAAG,GAAIC,EAAG,GAAIC,EAAG,GAAIC,GAAI,GAAIC,IAAK,GAAIC,KAAM,IAChFC,WAAY,IACZC,OAAQ,IACRC,UAAW,SACXC,OAAQ,GAEVG,KAAM,CACJhB,MAAO,CAAEC,KAAM,GAAIC,IAAK,GAAIC,GAAI,GAAIC,EAAG,GAAIC,EAAG,GAAIC,EAAG,GAAIC,GAAI,GAAIC,IAAK,GAAIC,KAAM,IAChFC,WAAY,IACZC,OAAQ,IACRC,UAAW,SACXC,OAAQ,GAEVI,QAAS,CACPjB,MAAO,CAAEC,KAAM,GAAIC,IAAK,GAAIC,GAAI,GAAIC,EAAG,GAAIC,EAAG,GAAIC,EAAG,GAAIC,GAAI,GAAIC,IAAK,GAAIC,KAAM,IAChFC,WAAY,IACZC,OAAQ,IACRC,UAAW,SACXC,OAAQ"}
1
+ {"version":3,"file":"constants.js","sources":["../../../../src/components/Text/constants.ts"],"sourcesContent":["import type { TypographyAppearance, TextProps } from 'shared/interfaces'\n\nexport const APPEARANCE: Record<TypographyAppearance, Partial<Omit<TextProps, 'appearance'>>> = {\n display: {\n sizes: { xxxl: 84, xxl: 76, xl: 68, l: 60, m: 52, s: 44, xs: 36, xxs: 28, xxxs: 20 },\n lineHeight: 1,\n weight: 800,\n fontStyle: 'normal',\n margin: 0,\n },\n heading: {\n sizes: { xxxl: 64, xxl: 56, xl: 48, l: 40, m: 36, s: 32, xs: 28, xxs: 24, xxxs: 20 },\n lineHeight: 1.1,\n weight: 800,\n fontStyle: 'normal',\n margin: 0,\n },\n subheading: {\n sizes: { xxxl: 52, xxl: 46, xl: 40, l: 34, m: 28, s: 24, xs: 20, xxs: 16, xxxs: 12 },\n lineHeight: 1.1,\n weight: 700,\n fontStyle: 'normal',\n margin: 0,\n },\n 'subheading-compact': {\n sizes: { xxxl: 36, xxl: 32, xl: 28, l: 24, m: 20, s: 18, xs: 16, xxs: 14, xxxs: 12 },\n lineHeight: 1.3,\n weight: 800,\n fontStyle: 'normal',\n margin: 0,\n },\n body: {\n sizes: { xxxl: 32, xxl: 28, xl: 24, l: 20, m: 18, s: 16, xs: 14, xxs: 12, xxxs: 10 },\n lineHeight: 1.3,\n weight: 400,\n fontStyle: 'normal',\n margin: 0,\n },\n caption: {\n sizes: { xxxl: 32, xxl: 28, xl: 24, l: 20, m: 18, s: 16, xs: 14, xxs: 12, xxxs: 10 },\n lineHeight: 1.2,\n weight: 400,\n fontStyle: 'normal',\n margin: 0,\n },\n}\n"],"names":["APPEARANCE","display","sizes","xxxl","xxl","xl","l","m","s","xs","xxs","xxxs","lineHeight","weight","fontStyle","margin","heading","subheading","body","caption"],"mappings":"AAEO,IAAMA,EAAmF,CAC9FC,QAAS,CACPC,MAAO,CAAEC,KAAM,GAAIC,IAAK,GAAIC,GAAI,GAAIC,EAAG,GAAIC,EAAG,GAAIC,EAAG,GAAIC,GAAI,GAAIC,IAAK,GAAIC,KAAM,IAChFC,WAAY,EACZC,OAAQ,IACRC,UAAW,SACXC,OAAQ,GAEVC,QAAS,CACPd,MAAO,CAAEC,KAAM,GAAIC,IAAK,GAAIC,GAAI,GAAIC,EAAG,GAAIC,EAAG,GAAIC,EAAG,GAAIC,GAAI,GAAIC,IAAK,GAAIC,KAAM,IAChFC,WAAY,IACZC,OAAQ,IACRC,UAAW,SACXC,OAAQ,GAEVE,WAAY,CACVf,MAAO,CAAEC,KAAM,GAAIC,IAAK,GAAIC,GAAI,GAAIC,EAAG,GAAIC,EAAG,GAAIC,EAAG,GAAIC,GAAI,GAAIC,IAAK,GAAIC,KAAM,IAChFC,WAAY,IACZC,OAAQ,IACRC,UAAW,SACXC,OAAQ,GAEV,qBAAsB,CACpBb,MAAO,CAAEC,KAAM,GAAIC,IAAK,GAAIC,GAAI,GAAIC,EAAG,GAAIC,EAAG,GAAIC,EAAG,GAAIC,GAAI,GAAIC,IAAK,GAAIC,KAAM,IAChFC,WAAY,IACZC,OAAQ,IACRC,UAAW,SACXC,OAAQ,GAEVG,KAAM,CACJhB,MAAO,CAAEC,KAAM,GAAIC,IAAK,GAAIC,GAAI,GAAIC,EAAG,GAAIC,EAAG,GAAIC,EAAG,GAAIC,GAAI,GAAIC,IAAK,GAAIC,KAAM,IAChFC,WAAY,IACZC,OAAQ,IACRC,UAAW,SACXC,OAAQ,GAEVI,QAAS,CACPjB,MAAO,CAAEC,KAAM,GAAIC,IAAK,GAAIC,GAAI,GAAIC,EAAG,GAAIC,EAAG,GAAIC,EAAG,GAAIC,GAAI,GAAIC,IAAK,GAAIC,KAAM,IAChFC,WAAY,IACZC,OAAQ,IACRC,UAAW,SACXC,OAAQ"}
@@ -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 { responsiveNamedProperty, property } from 'mixins/responsive-property'\nimport { color, ColorValue } from 'mixins/color'\nimport { injectDefaultTheme } from 'shared/utils/inject-theme'\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\nexport const Root = styled.div\n .withConfig<StyledTextProps>({\n shouldForwardProp: (prop) => {\n return ['children', 'className', 'style', 'title', 'dangerouslySetInnerHTML', 'id'].includes(prop)\n },\n })\n .attrs(injectDefaultTheme)<StyledTextProps>`\n ${(props) => `\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 line-height: ${props.lineHeight ? `${LINE_HEIGHT_MAP[props.lineHeight] ?? props.lineHeight}` : 'inherit'};\n margin: ${props.margin ?? 'initial'}${typeof props.margin === 'number' ? 'px' : ''};\n a {\n text-decoration: ${props.underlineLinks ? 'underline' : 'none'};\n &:hover {\n text-decoration: none;\n }\n }\n `}\n\n ${(props) => (props.display ? display(props.display) : null)}\n ${(props) => (props.color ? color(props.color) : color(props.theme.textColor as ColorValue))}\n ${(props) => (props.size ? property(props.size, 'font-size', props.fontUnits ?? 'px', props.sizes) : null)}\n ${({ sizeXXS, sizeXS, sizeS, sizeM, sizeL, sizeXL, fontUnits, sizes }) =>\n responsiveNamedProperty({\n sizes: { sizeXXS, sizeXS, sizeS, sizeM, sizeL, sizeXL },\n cssProperty: 'font-size',\n sizing: fontUnits ?? 'px',\n predefinedSizes: sizes,\n })}\n`\n"],"names":["WEIGHT_MAP","lighter","normal","bold","bolder","LINE_HEIGHT_MAP","l","m","s","xs","Root","styled","div","withConfig","shouldForwardProp","prop","includes","attrs","injectDefaultTheme","componentId","props","_WEIGHT_MAP$props$wei","_LINE_HEIGHT_MAP$prop","_props$margin","fontFamily","concat","transform","weight","fontStyle","textAlign","lineHeight","margin","underlineLinks","display","color","theme","textColor","_props$fontUnits","size","property","fontUnits","sizes","_ref","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","responsiveNamedProperty","cssProperty","sizing","predefinedSizes"],"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MoB,iBAAhC,IAAAH,EAAAA,EAA6C,KAAMjB,EAAMqB,OAAS,QACnGC,IAAA,IAACC,QAAEA,EAAFC,OAAWA,EAAXC,MAAmBA,EAAnBC,MAA0BA,EAA1BC,MAAiCA,EAAjCC,OAAwCA,EAAxCR,UAAgDA,EAAhDC,MAA2DA,GAA5DC,EAAA,OACAO,EAAwB,CACtBR,MAAO,CAAEE,QAAAA,EAASC,OAAAA,EAAQC,MAAAA,EAAOC,MAAAA,EAAOC,MAAAA,EAAOC,OAAAA,GAC/CE,YAAa,YACbC,OAAQX,MAAAA,EAAAA,EAAa,KACrBY,gBAAiBX"}
1
+ {"version":3,"file":"style.js","sources":["../../../../src/components/Text/style.ts"],"sourcesContent":["import styled from 'styled-components'\nimport { display } from 'mixins/display'\nimport { responsiveNamedProperty, property } from 'mixins/responsive-property'\nimport { color } from 'mixins/color'\nimport type { Color } from 'shared/interfaces'\nimport { injectDefaultTheme } from 'shared/utils/inject-theme'\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\nexport const Root = styled.div\n .withConfig<StyledTextProps>({\n shouldForwardProp: (prop) => {\n return ['children', 'className', 'style', 'title', 'dangerouslySetInnerHTML', 'id'].includes(prop)\n },\n })\n .attrs(injectDefaultTheme)<StyledTextProps>`\n ${(props) => `\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 line-height: ${props.lineHeight ? `${LINE_HEIGHT_MAP[props.lineHeight] ?? props.lineHeight}` : 'inherit'};\n margin: ${props.margin ?? 'initial'}${typeof props.margin === 'number' ? 'px' : ''};\n a {\n text-decoration: ${props.underlineLinks ? 'underline' : 'none'};\n &:hover {\n text-decoration: none;\n }\n }\n `}\n\n ${(props) => (props.display ? display(props.display) : null)}\n ${(props) => (props.color ? color(props.color) : color(props.theme.textColor as Color))}\n ${(props) => (props.size ? property(props.size, 'font-size', props.fontUnits ?? 'px', props.sizes) : null)}\n ${({ sizeXXS, sizeXS, sizeS, sizeM, sizeL, sizeXL, fontUnits, sizes }) =>\n responsiveNamedProperty({\n sizes: { sizeXXS, sizeXS, sizeS, sizeM, sizeL, sizeXL },\n cssProperty: 'font-size',\n sizing: fontUnits ?? 'px',\n predefinedSizes: sizes,\n })}\n`\n"],"names":["WEIGHT_MAP","lighter","normal","bold","bolder","LINE_HEIGHT_MAP","l","m","s","xs","Root","styled","div","withConfig","shouldForwardProp","prop","includes","attrs","injectDefaultTheme","componentId","props","_WEIGHT_MAP$props$wei","_LINE_HEIGHT_MAP$prop","_props$margin","fontFamily","concat","transform","weight","fontStyle","textAlign","lineHeight","margin","underlineLinks","display","color","theme","textColor","_props$fontUnits","size","property","fontUnits","sizes","_ref","sizeXXS","sizeXS","sizeS","sizeM","sizeL","sizeXL","responsiveNamedProperty","cssProperty","sizing","predefinedSizes"],"mappings":"qSAQA,IAAMA,EAAa,CACjBC,QAAS,IACTC,OAAQ,IACRC,KAAM,IACNC,OAAQ,KAGV,IAAMC,EAAkB,CACtBC,EAAG,IACHC,EAAG,IACHC,EAAG,KACHC,GAAI,GAGC,IAAMC,EAAOC,EAAOC,IACxBC,WAA4B,CAC3BC,kBAAoBC,GACX,CAAC,WAAY,YAAa,QAAS,QAAS,0BAA2B,MAAMC,SAASD,KAGhGE,MAAMC,GANQL,WAAA,CAAAM,YAAA,uBAAGR,CAAH,CAAA,GAAA,IAAA,IAAA,IAAA,IAAA,KAOZS,IAAD,IAAAC,EAAAC,EAAAC,EAAA,MACEH,SAAAA,OAAAA,EAAMI,WAAN,gBAAAC,OAAmCL,EAAMI,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ellipse/Text.Ellipse.tsx"],"sourcesContent":["import { Component } from 'react'\nimport { Spacer } from '../Spacer/Spacer'\nimport { Anchor } from '../Anchor/Anchor'\nimport { Text, TextProps } from '../Text'\nimport * as Styled from './style'\n\nexport interface TextEllipseProps extends Omit<TextProps, 'content'> {\n /** Toggle text for folded state */\n moreText?: string\n /** Toggle text for unfolded state */\n lessText?: string\n /** Classname */\n className?: string\n /** Html content */\n content: string | string[]\n /** Characters quantity for ellipsed text */\n chars?: number\n /** Wrap text in quotes */\n quoted?: boolean\n /** Flag to show toggler */\n showToggler?: boolean\n}\n\ninterface TextEllipseState {\n isUnFolded: boolean\n isEllipsed: boolean\n}\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`Display`](#/Миксины)\n * - [`ResponsiveNamedProperty<'size'>`](#/Миксины)\n */\nexport class TextEllipse extends Component<TextEllipseProps, TextEllipseState> {\n static displayName = 'Text.Ellipse'\n\n constructor(props: TextEllipseProps) {\n super(props)\n\n this.state = {\n isUnFolded: false,\n isEllipsed: false,\n }\n }\n\n componentDidUpdate({ content }: TextEllipseProps) {\n if (content !== this.props.content && this.state.isUnFolded) {\n this.toggle()\n }\n }\n\n getContent = (props: Omit<TextEllipseProps, 'className' | 'moreText' | 'lessText' | 'showToggler'>) => {\n const { content, chars = 0 } = this.props\n\n if (!content) return ''\n\n let { isEllipsed } = this.state\n let text: string | string[] = typeof content === 'string' ? '' : []\n\n if (!this.state.isUnFolded) {\n if (typeof text === 'string') {\n isEllipsed = chars !== 0 && content.length > chars\n\n text = isEllipsed && chars !== 0 ? `${content.slice(0, chars)}...` : content\n } else {\n let leftChars = chars\n\n for (let index = 0; index < content.length; index++) {\n if (leftChars - content[index].length > 0) {\n leftChars -= content[index].length\n\n text[index] = content[index]\n } else {\n isEllipsed = true\n text[index] = `${content[index].slice(0, leftChars)}...`\n\n break\n }\n }\n }\n } else {\n text = content\n }\n\n if (this.state.isEllipsed !== isEllipsed) setTimeout(() => this.setState({ isEllipsed }))\n\n return typeof text === 'string' ? (\n <Text {...props} content={this.getQuted(text)} />\n ) : (\n <Styled.Ul>\n {text.map((item, index) => (\n <Styled.Li key={index}>\n <Text {...props} display='inline' content={item} />\n </Styled.Li>\n ))}\n </Styled.Ul>\n )\n }\n\n getQuted = (content: string) => (this.props.quoted ? `«${content}»` : content)\n\n toggle = () => {\n this.setState({ isUnFolded: !this.state.isUnFolded })\n }\n\n render() {\n const {\n className = '',\n style,\n moreText = 'Читать полностью',\n lessText = 'Свернуть',\n showToggler = true,\n ...restProps\n } = this.props\n const { isUnFolded, isEllipsed } = this.state\n\n return (\n <div className={className} style={style}>\n {this.getContent(restProps)}\n {showToggler && isEllipsed && (\n <Spacer marginTop={16} marginBottom={1}>\n <Anchor pseudo onClick={this.toggle}>\n {isUnFolded ? lessText : moreText}\n </Anchor>\n </Spacer>\n )}\n </div>\n )\n }\n}\n"],"names":["TextEllipse","Component","constructor","props","super","this","getContent","content","chars","isEllipsed","state","text","isUnFolded","length","slice","leftChars","index","concat","setTimeout","setState","_jsx","Text","getQuted","Styled.Ul","children","map","item","Styled.Li","_objectSpread","display","quoted","toggle","componentDidUpdate","_ref","render","_this$props","className","style","moreText","lessText","showToggler","restProps","_objectWithoutProperties","_excluded","_jsxs","Spacer","marginTop","marginBottom","Anchor","pseudo","onClick","displayName"],"mappings":"+aAmCO,MAAMA,UAAoBC,EAG/BC,YAAYC,GACVC,MAAMD,GAD6BE,KAerCC,WAAcH,IACZ,IAAMI,QAAEA,EAAFC,MAAWA,EAAQ,GAAMH,KAAKF,MAEpC,IAAKI,EAAS,MAAO,GAErB,IAAIE,WAAEA,GAAeJ,KAAKK,MAC1B,IAAIC,EAA6C,iBAAZJ,EAAuB,GAAK,GAEjE,GAAKF,KAAKK,MAAME,WAsBdD,EAAOJ,OArBP,GAAoB,iBAATI,EAGTA,GAFAF,EAAuB,IAAVD,GAAeD,EAAQM,OAASL,IAEd,IAAVA,EAAiBD,GAAA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CAAKR,UAAWA,EAAWC,MAAOA,EAAlCb,SACG,CAAAnB,KAAKC,WAAWmC,GAChBD,GAAe/B,GACdW,EAACyB,EAAD,CAAQC,UAAW,GAAIC,aAAc,EAArCvB,SACEJ,EAAC4B,EAAD,CAAQC,UAAOC,QAAS7C,KAAK0B,OAA7BP,SACGZ,EAAa2B,EAAWD,UAzF1BtC,EACJmD,YAAc"}
1
+ {"version":3,"file":"Text.Ellipse.js","sources":["../../../../src/components/Text.Ellipse/Text.Ellipse.tsx"],"sourcesContent":["import { Component } from 'react'\nimport type { TextProps } from 'shared/interfaces'\nimport { Spacer } from '../Spacer/Spacer'\nimport { Anchor } from '../Anchor/Anchor'\nimport { Text } from '../Text'\nimport * as Styled from './style'\n\nexport interface TextEllipseProps extends Omit<TextProps, 'content'> {\n /** Toggle text for folded state */\n moreText?: string\n /** Toggle text for unfolded state */\n lessText?: string\n /** Classname */\n className?: string\n /** Html content */\n content: string | string[]\n /** Characters quantity for ellipsed text */\n chars?: number\n /** Wrap text in quotes */\n quoted?: boolean\n /** Flag to show toggler */\n showToggler?: boolean\n}\n\ninterface TextEllipseState {\n isUnFolded: boolean\n isEllipsed: boolean\n}\n\n/**\n * Расширен:\n * - [`BaseProps`](#/Миксины)\n * - [`Color`](#/Миксины)\n * - [`Display`](#/Миксины)\n * - [`ResponsiveNamedProperty<'size'>`](#/Миксины)\n */\nexport class TextEllipse extends Component<TextEllipseProps, TextEllipseState> {\n static displayName = 'Text.Ellipse'\n\n constructor(props: TextEllipseProps) {\n super(props)\n\n this.state = {\n isUnFolded: false,\n isEllipsed: false,\n }\n }\n\n componentDidUpdate({ content }: TextEllipseProps) {\n if (content !== this.props.content && this.state.isUnFolded) {\n this.toggle()\n }\n }\n\n getContent = (props: Omit<TextEllipseProps, 'className' | 'moreText' | 'lessText' | 'showToggler'>) => {\n const { content, chars = 0 } = this.props\n\n if (!content) return ''\n\n let { isEllipsed } = this.state\n let text: string | string[] = typeof content === 'string' ? '' : []\n\n if (!this.state.isUnFolded) {\n if (typeof text === 'string') {\n isEllipsed = chars !== 0 && content.length > chars\n\n text = isEllipsed && chars !== 0 ? `${content.slice(0, chars)}...` : content\n } else {\n let leftChars = chars\n\n for (let index = 0; index < content.length; index++) {\n if (leftChars - content[index].length > 0) {\n leftChars -= content[index].length\n\n text[index] = content[index]\n } else {\n isEllipsed = true\n text[index] = `${content[index].slice(0, leftChars)}...`\n\n break\n }\n }\n }\n } else {\n text = content\n }\n\n if (this.state.isEllipsed !== isEllipsed) setTimeout(() => this.setState({ isEllipsed }))\n\n return typeof text === 'string' ? (\n <Text {...props} content={this.getQuted(text)} />\n ) : (\n <Styled.Ul>\n {text.map((item, index) => (\n <Styled.Li key={index}>\n <Text {...props} display='inline' content={item} />\n </Styled.Li>\n ))}\n </Styled.Ul>\n )\n }\n\n getQuted = (content: string) => (this.props.quoted ? `«${content}»` : content)\n\n toggle = () => {\n this.setState({ isUnFolded: !this.state.isUnFolded })\n }\n\n render() {\n const {\n className = '',\n style,\n moreText = 'Читать полностью',\n lessText = 'Свернуть',\n showToggler = true,\n ...restProps\n } = this.props\n const { isUnFolded, isEllipsed } = this.state\n\n return (\n <div className={className} style={style}>\n {this.getContent(restProps)}\n {showToggler && isEllipsed && (\n <Spacer marginTop={16} marginBottom={1}>\n <Anchor pseudo onClick={this.toggle}>\n {isUnFolded ? lessText : moreText}\n </Anchor>\n </Spacer>\n )}\n </div>\n )\n }\n}\n"],"names":["TextEllipse","Component","constructor","props","super","this","getContent","content","chars","isEllipsed","state","text","isUnFolded","length","slice","leftChars","index","concat","setTimeout","setState","_jsx","Text","getQuted","Styled.Ul","children","map","item","Styled.Li","_objectSpread","display","quoted","toggle","componentDidUpdate","_ref","render","_this$props","className","style","moreText","lessText","showToggler","restProps","_objectWithoutProperties","_excluded","_jsxs","Spacer","marginTop","marginBottom","Anchor","pseudo","onClick","displayName"],"mappings":"+aAoCO,MAAMA,UAAoBC,EAG/BC,YAAYC,GACVC,MAAMD,GAD6BE,KA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