@laerdal/life-react-components 1.2.2-dev.23.full → 1.2.2-dev.26
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/Accordion/AccordionItem.js +29 -5
- package/dist/esm/Accordion/AccordionItem.js.map +1 -1
- package/dist/esm/Accordion/AccordionMenu.js +32 -6
- package/dist/esm/Accordion/AccordionMenu.js.map +1 -1
- package/dist/esm/Accordion/__tests__/AccordionMenu.test.js +1 -1
- package/dist/esm/Accordion/__tests__/AccordionMenu.test.js.map +1 -1
- package/dist/esm/Accordion/styles.js +22 -6
- package/dist/esm/Accordion/styles.js.map +1 -1
- package/dist/esm/styles/typography.js +25 -6
- package/dist/esm/styles/typography.js.map +1 -1
- package/dist/js/Accordion/AccordionItem.js +48 -5
- package/dist/js/Accordion/AccordionItem.js.map +1 -1
- package/dist/js/Accordion/AccordionMenu.d.ts +4 -2
- package/dist/js/Accordion/AccordionMenu.js +62 -6
- package/dist/js/Accordion/AccordionMenu.js.map +1 -1
- package/dist/js/Accordion/__tests__/AccordionMenu.test.js +1 -1
- package/dist/js/Accordion/__tests__/AccordionMenu.test.js.map +1 -1
- package/dist/js/Accordion/styles.d.ts +2 -1
- package/dist/js/Accordion/styles.js +10 -8
- package/dist/js/Accordion/styles.js.map +1 -1
- package/dist/js/styles/typography.d.ts +1 -0
- package/dist/js/styles/typography.js +25 -6
- package/dist/js/styles/typography.js.map +1 -1
- package/dist/umd/Accordion/AccordionItem.js +33 -5
- package/dist/umd/Accordion/AccordionItem.js.map +1 -1
- package/dist/umd/Accordion/AccordionMenu.js +32 -6
- package/dist/umd/Accordion/AccordionMenu.js.map +1 -1
- package/dist/umd/Accordion/__tests__/AccordionMenu.test.js +1 -1
- package/dist/umd/Accordion/__tests__/AccordionMenu.test.js.map +1 -1
- package/dist/umd/Accordion/styles.js +22 -6
- package/dist/umd/Accordion/styles.js.map +1 -1
- package/dist/umd/styles/typography.js +25 -6
- package/dist/umd/styles/typography.js.map +1 -1
- package/package.json +1 -1
|
@@ -14,10 +14,14 @@ const AccordionItem = props => {
|
|
|
14
14
|
disabled,
|
|
15
15
|
isLast
|
|
16
16
|
} = props;
|
|
17
|
+
const supressFocusRef = React.useRef(null);
|
|
18
|
+
const [tabbedHere, setTabbedHere] = React.useState(false);
|
|
19
|
+
React.useEffect(() => {
|
|
20
|
+
!!disabled && setTabbedHere(false);
|
|
21
|
+
}, [disabled]);
|
|
17
22
|
return /*#__PURE__*/React.createElement(AccordionItemContainer, {
|
|
18
23
|
id: id,
|
|
19
|
-
displaySeparator: !isActive && !isLast
|
|
20
|
-
isDisabled: disabled ?? false
|
|
24
|
+
displaySeparator: !isActive && !isLast
|
|
21
25
|
}, /*#__PURE__*/React.createElement(ItemHeaderContainer, {
|
|
22
26
|
tabIndex: !disabled ? 0 : -1,
|
|
23
27
|
onClick: () => {
|
|
@@ -25,15 +29,35 @@ const AccordionItem = props => {
|
|
|
25
29
|
onSelect(id);
|
|
26
30
|
}
|
|
27
31
|
},
|
|
32
|
+
onKeyDown: e => {
|
|
33
|
+
if (e.key == 'Enter') onSelect(id);
|
|
34
|
+
},
|
|
35
|
+
onBlur: () => {
|
|
36
|
+
setTabbedHere(false);
|
|
37
|
+
supressFocusRef.current = false;
|
|
38
|
+
},
|
|
39
|
+
onFocus: () => {
|
|
40
|
+
if (!disabled) {
|
|
41
|
+
if (!supressFocusRef.current) setTabbedHere(true);else supressFocusRef.current = false;
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
onMouseDown: () => {
|
|
45
|
+
if (!disabled && !tabbedHere) supressFocusRef.current = true;
|
|
46
|
+
},
|
|
47
|
+
tabbedHere: tabbedHere,
|
|
48
|
+
isActive: isActive,
|
|
28
49
|
isDisabled: disabled ?? false
|
|
29
50
|
}, icon && /*#__PURE__*/React.cloneElement(icon, {
|
|
30
51
|
size: '24px'
|
|
31
52
|
}), /*#__PURE__*/React.createElement(ComponentM, {
|
|
32
|
-
|
|
53
|
+
className: "headerLabel",
|
|
54
|
+
color: isActive ? COLORS.neutral_800 : disabled ? COLORS.neutral_300 : COLORS.neutral_600
|
|
33
55
|
}, title), isActive ? /*#__PURE__*/React.createElement(SystemIcons.ChevronUp, {
|
|
34
|
-
|
|
56
|
+
color: COLORS.neutral_800,
|
|
57
|
+
size: "20px"
|
|
35
58
|
}) : /*#__PURE__*/React.createElement(SystemIcons.ChevronDown, {
|
|
36
|
-
|
|
59
|
+
color: COLORS.neutral_600,
|
|
60
|
+
size: "20px"
|
|
37
61
|
})), isActive && /*#__PURE__*/React.createElement(ItemBodyContainer, null, /*#__PURE__*/React.createElement(ComponentS, null, props.children)));
|
|
38
62
|
};
|
|
39
63
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Accordion/AccordionItem.tsx"],"names":["React","COLORS","ComponentM","ComponentS","SystemIcons","AccordionItemContainer","ItemBodyContainer","ItemHeaderContainer","AccordionItem","props","id","onSelect","isActive","title","icon","disabled","isLast","cloneElement","size","neutral_300","
|
|
1
|
+
{"version":3,"sources":["../../../src/Accordion/AccordionItem.tsx"],"names":["React","COLORS","ComponentM","ComponentS","SystemIcons","AccordionItemContainer","ItemBodyContainer","ItemHeaderContainer","AccordionItem","props","id","onSelect","isActive","title","icon","disabled","isLast","supressFocusRef","useRef","tabbedHere","setTabbedHere","useState","useEffect","e","key","current","cloneElement","size","neutral_800","neutral_300","neutral_600","children"],"mappings":";AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,MAAT,EAAiBC,UAAjB,EAA6BC,UAA7B,QAA+C,IAA/C;AACA,SAASC,WAAT,QAA4B,UAA5B;AAEA,SAASC,sBAAT,EAAsDC,iBAAtD,EAAyEC,mBAAzE,QAAoG,UAApG;;AAQA,MAAMC,aAA+D,GAAIC,KAAD,IAAoC;AAC1G,QAAM;AAAEC,IAAAA,EAAF;AAAMC,IAAAA,QAAN;AAAgBC,IAAAA,QAAhB;AAA0BC,IAAAA,K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,eAAe,CAACQ,OAAhB,GAA0B,IAA1B;AAC/B,KAvBH;AAwBE,IAAA,UAAU,EAAEN,UAxBd;AAyBE,IAAA,QAAQ,EAAEP,QAzBZ;AA0BE,IAAA,UAAU,EAAEG,QAAQ,IAAI;AA1B1B,KA2BGD,IAAI,iBAAId,KAAK,CAAC0B,YAAN,CAAmBZ,IAAnB,EAA+C;AAAEa,IAAAA,IAAI,EAAE;AAAR,GAA/C,CA3BX,eA4BE,oBAAC,UAAD;AAAY,IAAA,SAAS,EAAC,aAAtB;AAAoC,IAAA,KAAK,EAAEf,QAAQ,GAAGX,MAAM,CAAC2B,WAAV,GAAwBb,QAAQ,GAAGd,MAAM,CAAC4B,WAAV,GAAwB5B,MAAM,CAAC6B;AAAlH,KAAgIjB,KAAhI,CA5BF,EA6BGD,QAAQ,gBAAG,oBAAC,WAAD,CAAa,SAAb;AAAuB,IAAA,KAAK,EAAEX,MAAM,CAAC2B,WAArC;AAAkD,IAAA,IAAI,EAAC;AAAvD,IAAH,gBAAsE,oBAAC,WAAD,CAAa,WAAb;AAAyB,IAAA,KAAK,EAAE3B,MAAM,CAAC6B,WAAvC;AAAoD,IAAA,IAAI,EAAC;AAAzD,IA7BjF,CADF,EAgCGlB,QAAQ,iBACP,oBAAC,iBAAD,qBACE,oBAAC,UAAD,QAAaH,KAAK,CAACsB,QAAnB,CADF,CAjCJ,CADF;AAwCD,CAlDD;;;AALEpB,EAAAA,Q;AACAC,EAAAA,Q;AACAI,EAAAA,M;;AAuDF,eAAeR,aAAf","sourcesContent":["import React from 'react';\nimport { COLORS, ComponentM, ComponentS } from '..';\nimport { SystemIcons } from '../icons';\nimport { AccordionItemProps } from './AccordionMenu';\nimport { AccordionItemContainer, HeaderIconContainer, ItemBodyContainer, ItemHeaderContainer } from './styles';\n\ninterface AccordionItemPropsInner extends AccordionItemProps {\n onSelect: (id: string) => void;\n isActive: boolean;\n isLast: boolean;\n}\n\nconst AccordionItem: React.FunctionComponent<AccordionItemPropsInner> = (props: AccordionItemPropsInner) => {\n const { id, onSelect, isActive, title, icon, disabled, isLast } = props;\n\n const supressFocusRef = React.useRef<any>(null);\n const [tabbedHere, setTabbedHere] = React.useState<boolean>(false);\n\n React.useEffect(() => {\n !!disabled && setTabbedHere(false);\n }, [disabled]);\n\n return (\n <AccordionItemContainer id={id} displaySeparator={!isActive && !isLast}>\n <ItemHeaderContainer\n tabIndex={!disabled ? 0 : -1}\n onClick={() => {\n if (!disabled) {\n onSelect(id);\n }\n }}\n onKeyDown={(e: any) => {\n if(e.key == 'Enter')\n onSelect(id);\n }}\n onBlur={() => {\n setTabbedHere(false);\n supressFocusRef.current = false;\n }}\n onFocus={() => {\n if(!disabled) {\n if (!supressFocusRef.current) setTabbedHere(true);\n else supressFocusRef.current = false;\n }\n }}\n onMouseDown={() => {\n if (!disabled && !tabbedHere) supressFocusRef.current = true;\n }}\n tabbedHere={tabbedHere}\n isActive={isActive}\n isDisabled={disabled ?? false}>\n {icon && React.cloneElement(icon as React.ReactElement, { size: '24px' })}\n <ComponentM className=\"headerLabel\" color={isActive ? COLORS.neutral_800 : disabled ? COLORS.neutral_300 : COLORS.neutral_600}>{title}</ComponentM>\n {isActive ? <SystemIcons.ChevronUp color={COLORS.neutral_800} size=\"20px\" /> : <SystemIcons.ChevronDown color={COLORS.neutral_600} size=\"20px\" />}\n </ItemHeaderContainer>\n {isActive && (\n <ItemBodyContainer>\n <ComponentS>{props.children}</ComponentS>\n </ItemBodyContainer>\n )}\n </AccordionItemContainer>\n );\n};\n\nexport default AccordionItem;\n"],"file":"AccordionItem.js"}
|
|
@@ -5,18 +5,42 @@ import { AccordionMenuWrapper } from './styles';
|
|
|
5
5
|
|
|
6
6
|
const AccordionMenu = ({
|
|
7
7
|
items,
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
selectedItems,
|
|
9
|
+
setSelectedItems,
|
|
10
|
+
onSelect,
|
|
11
|
+
multipleActive
|
|
10
12
|
}) => {
|
|
13
|
+
const [builtinSelectedItems, builtinSetSelectedItems] = React.useState([]);
|
|
14
|
+
|
|
15
|
+
const getCollection = () => {
|
|
16
|
+
return selectedItems ? selectedItems : builtinSelectedItems;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const getUpdateFunction = () => {
|
|
20
|
+
return setSelectedItems ? setSelectedItems : builtinSetSelectedItems;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const onSelected = id => {
|
|
24
|
+
const collection = getCollection();
|
|
25
|
+
const updateFunc = getUpdateFunction();
|
|
26
|
+
const isActive = !!collection.find(x => x == id);
|
|
27
|
+
|
|
28
|
+
if (multipleActive) {
|
|
29
|
+
if (isActive) updateFunc(collection.filter(x => x != id));else updateFunc([...collection, id]);
|
|
30
|
+
} else updateFunc(isActive ? [] : [id]);
|
|
31
|
+
|
|
32
|
+
onSelect && onSelect(id);
|
|
33
|
+
};
|
|
34
|
+
|
|
11
35
|
return /*#__PURE__*/React.createElement(AccordionMenuWrapper, null, items.map(item => /*#__PURE__*/React.createElement(AccordionItem, {
|
|
12
36
|
key: item.id,
|
|
13
37
|
disabled: item.disabled,
|
|
14
38
|
id: item.id,
|
|
15
39
|
title: item.title,
|
|
16
40
|
icon: item.icon,
|
|
17
|
-
isActive: item.id
|
|
41
|
+
isActive: !!getCollection().find(x => x == item.id),
|
|
18
42
|
isLast: items.indexOf(item) === items.length - 1,
|
|
19
|
-
onSelect:
|
|
43
|
+
onSelect: onSelected
|
|
20
44
|
}, item.children)));
|
|
21
45
|
};
|
|
22
46
|
|
|
@@ -28,8 +52,10 @@ AccordionMenu.propTypes = {
|
|
|
28
52
|
icon: _pt.node,
|
|
29
53
|
children: _pt.node.isRequired
|
|
30
54
|
})).isRequired,
|
|
31
|
-
|
|
32
|
-
|
|
55
|
+
selectedItems: _pt.arrayOf(_pt.string),
|
|
56
|
+
setSelectedItems: _pt.func,
|
|
57
|
+
onSelect: _pt.func,
|
|
58
|
+
multipleActive: _pt.bool
|
|
33
59
|
};
|
|
34
60
|
export default AccordionMenu;
|
|
35
61
|
//# sourceMappingURL=AccordionMenu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Accordion/AccordionMenu.tsx"],"names":["React","AccordionItem","AccordionMenuWrapper","AccordionMenu","items","
|
|
1
|
+
{"version":3,"sources":["../../../src/Accordion/AccordionMenu.tsx"],"names":["React","AccordionItem","AccordionMenuWrapper","AccordionMenu","items","selectedItems","setSelectedItems","onSelect","multipleActive","builtinSelectedItems","builtinSetSelectedItems","useState","getCollection","getUpdateFunction","onSelected","id","collection","updateFunc","isActive","find","x","filter","map","item","disabled","title","icon","indexOf","length","children"],"mappings":";AAAA,OAAO,KAAKA,KAAZ,MAAuB,OAAvB;AACA,OAAOC,aAAP,MAA0B,iBAA1B;AACA,SAASC,oBAAT,QAAqC,UAArC;;AAkBA,MAAMC,aAAsD,GAAG,CAAC;AAAEC,EAAAA,KAAF;AAASC,EAAAA,aAAT;AAAwBC,EAAAA,gBAAxB;AAA0CC,EAAAA,QAA1C;AAAoDC,EAAAA;AAApD,CAAD,KAA0F;AAEvJ,QAAM,CAACC,oBAAD,EAAuBC,uBAAvB,IAAkDV,KAAK,CAACW,QAAN,CAAyB,EAAzB,CAAxD;;AAEA,QAAMC,aAAa,GAAG,MAAM;AAC1B,WAAOP,aAAa,GAAGA,aAAH,GAAmBI,oBAAvC;AACD,GAFD;;AAIA,QAAMI,iBAAiB,GAAG,MAAM;AAC9B,WAAOP,gBAAgB,GAAGA,gBAAH,GAAsBI,uBAA7C;AACD,GAFD;;AAIA,QAAMI,UAAU,GAAIC,EAAD,IAAgB;AACjC,UAAMC,UAAU,GAAGJ,aAAa,EAAhC;AACA,UAAMK,UAAU,GAAGJ,iBAAiB,EAApC;AAEA,UAAMK,QAAQ,GAAG,CAAC,CAACF,UAAU,CAACG,IAAX,CAAgBC,CAAC,IAAIA,CAAC,IAAIL,EAA1B,CAAnB;;AACA,QAAGP,cAAH,EAAmB;AACjB,UAAGU,QAAH,EACED,UAAU,CAACD,UAAU,CAACK,MAAX,CAAkBD,CAAC,IAAIA,CAAC,IAAIL,EAA5B,CAAD,CAAV,CADF,KAIEE,UAAU,CAAC,CAAC,GAAGD,UAAJ,EAAgBD,EAAhB,CAAD,CAAV;AACH,KAND,MAQEE,UAAU,CAACC,QAAQ,GAAG,EAAH,GAAQ,CAACH,EAAD,CAAjB,CAAV;;AAEFR,IAAAA,QAAQ,IAAIA,QAAQ,CAACQ,EAAD,CAApB;AACD,GAhBD;;AAkBA,sBACE,oBAAC,oBAAD,QACGX,KAAK,CAACkB,GAAN,CAAWC,IAAD,iBACT,oBAAC,aAAD;AACE,IAAA,GAAG,EAAEA,IAAI,CAACR,EADZ;AAEE,IAAA,QAAQ,EAAEQ,IAAI,CAACC,QAFjB;AAGE,IAAA,EAAE,EAAED,IAAI,CAACR,EAHX;AAIE,IAAA,KAAK,EAAEQ,IAAI,CAACE,KAJd;AAKE,IAAA,IAAI,EAAEF,IAAI,CAACG,IALb;AAME,IAAA,QAAQ,EAAE,CAAC,CAACd,aAAa,GAAGO,IAAhB,CAAqBC,CAAC,IAAIA,CAAC,IAAIG,IAAI,CAACR,EAApC,CANd;AAOE,IAAA,MAAM,EAAEX,KAAK,CAACuB,OAAN,CAAcJ,IAAd,MAAwBnB,KAAK,CAACwB,MAAN,GAAe,CAPjD;AAQE,IAAA,QAAQ,EAAEd;AARZ,KASGS,IAAI,CAACM,QATR,CADD,CADH,CADF;AAiBD,CA/CD;;;AAfEzB,EAAAA,K;AAQAW,IAAAA,E;AACAS,IAAAA,Q;AACAC,IAAAA,K;AACAC,IAAAA,I;AACAG,IAAAA,Q;;AAXAxB,EAAAA,a;AACAC,EAAAA,gB;AACAC,EAAAA,Q;AACAC,EAAAA,c;;AA4DF,eAAeL,aAAf","sourcesContent":["import * as React from 'react';\nimport AccordionItem from './AccordionItem';\nimport { AccordionMenuWrapper } from './styles';\n\nexport interface AccordionProps {\n items: AccordionItemProps[];\n selectedItems?: string[];\n setSelectedItems?: (a: string[]) => void;\n onSelect?: (id: string) => void;\n multipleActive?: boolean;\n}\n\nexport interface AccordionItemProps {\n id: string;\n disabled?: boolean;\n title: string;\n icon?: React.ReactNode;\n children: React.ReactNode;\n}\n\nconst AccordionMenu: React.FunctionComponent<AccordionProps> = ({ items, selectedItems, setSelectedItems, onSelect, multipleActive }: AccordionProps) => {\n\n const [builtinSelectedItems, builtinSetSelectedItems] = React.useState<string[]>([]);\n\n const getCollection = () => {\n return selectedItems ? selectedItems : builtinSelectedItems;\n };\n\n const getUpdateFunction = () => {\n return setSelectedItems ? setSelectedItems : builtinSetSelectedItems;\n }\n\n const onSelected = (id: string) => {\n const collection = getCollection();\n const updateFunc = getUpdateFunction();\n\n const isActive = !!collection.find(x => x == id);\n if(multipleActive) {\n if(isActive)\n updateFunc(collection.filter(x => x != id));\n \n else \n updateFunc([...collection, id]);\n }\n else\n updateFunc(isActive ? [] : [id]);\n\n onSelect && onSelect(id);\n };\n\n return (\n <AccordionMenuWrapper>\n {items.map((item) => (\n <AccordionItem\n key={item.id}\n disabled={item.disabled}\n id={item.id}\n title={item.title}\n icon={item.icon}\n isActive={!!getCollection().find(x => x == item.id)}\n isLast={items.indexOf(item) === items.length - 1}\n onSelect={onSelected}>\n {item.children}\n </AccordionItem>\n ))}\n </AccordionMenuWrapper>\n );\n};\n\nexport default AccordionMenu;\n"],"file":"AccordionMenu.js"}
|
|
@@ -42,7 +42,7 @@ describe('<AccordionMenu />', () => {
|
|
|
42
42
|
} = render( /*#__PURE__*/React.createElement(AccordionMenu, {
|
|
43
43
|
items: accordionItems,
|
|
44
44
|
onSelect: () => {},
|
|
45
|
-
|
|
45
|
+
selectedItems: ['test1_id']
|
|
46
46
|
}));
|
|
47
47
|
const headerItem = container.querySelector('#test1_id'); //check item expanded
|
|
48
48
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/Accordion/__tests__/AccordionMenu.test.tsx"],"names":["React","render","COLORS","AccordionMenu","accordionItems","id","title","children","describe","it","queryByText","expect","toBeDefined","toBeNull","container","headerItem","querySelector","toHaveStyleRule","neutral_20","textContent","toContain"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,MAAT,QAAuB,wBAAvB;AACA,OAAO,wBAAP;AACA,SAASC,MAAT,QAAuB,cAAvB;AACA,OAAOC,aAAP,MAA0B,kBAA1B;AAEA,MAAMC,cAAc,GAAG,CACrB;AACEC,EAAAA,EAAE,EAAE,UADN;AAEEC,EAAAA,KAAK,EAAE,wBAFT;AAGEC,EAAAA,QAAQ,eAAE;AAHZ,CADqB,EAMrB;AACEF,EAAAA,EAAE,EAAE,UADN;AAEEC,EAAAA,KAAK,EAAE,wBAFT;AAGEC,EAAAA,QAAQ,eAAE;AAHZ,CANqB,CAAvB;AAaAC,QAAQ,CAAC,mBAAD,EAAsB,MAAM;AAClCC,EAAAA,EAAE,CAAC,qCAAD,EAAwC,YAAY;AACpD,UAAM;AAAEC,MAAAA;AAAF,QAAkBT,MAAM,eAAC,oBAAC,aAAD;AAAe,MAAA,KAAK,EAAEG,cAAtB;AAAsC,MAAA,QAAQ,EAAE,MAAM,CAAE;AAAxD,MAAD,CAA9B;AACAO,IAAAA,MAAM,CAACD,WAAW,CAAC,wBAAD,CAAZ,CAAN,CAA8CE,WAA9C;AACAD,IAAAA,MAAM,CAACD,WAAW,CAAC,wBAAD,CAAZ,CAAN,CAA8CE,WAA9C;AACAD,IAAAA,MAAM,CAACD,WAAW,CAAC,eAAD,CAAZ,CAAN,CAAqCG,QAArC;AACD,GALC,CAAF;AAOAJ,EAAAA,EAAE,CAAC,0CAAD,EAA6C,YAAY;AACzD,UAAM;AAAEK,MAAAA;AAAF,QAAgBb,MAAM,eAAC,oBAAC,aAAD;AAAe,MAAA,KAAK,EAAEG,cAAtB;AAAsC,MAAA,QAAQ,EAAE,MAAM,CAAE;AAAxD,MAAD,CAA5B;AACA,UAAMW,UAAU,GAAGD,SAAS,CAACE,aAAV,CAAwB,WAAxB,CAAnB;AACAL,IAAAA,MAAM,CAACI,UAAD,CAAN,CAAmBH,WAAnB;AACAD,IAAAA,MAAM,CAACI,UAAU,EAAER,QAAZ,CAAqB,CAArB,CAAD,CAAN,CAAgCU,eAAhC,CAAgD,YAAhD,EAA8Df,MAAM,CAACgB,UAArE;AACAP,IAAAA,MAAM,CAACI,UAAU,EAAEI,WAAb,CAAN,CAAgCC,SAAhC,CAA0C,wBAA1C;AACD,GANC,CAAF;AAQAX,EAAAA,EAAE,CAAC,0BAAD,EAA6B,YAAY;AACzC,UAAM;AAAEK,MAAAA;AAAF,QAAgBb,MAAM,eAAC,oBAAC,aAAD;AAAe,MAAA,KAAK,EAAEG,cAAtB;AAAsC,MAAA,QAAQ,EAAE,MAAM,CAAE,CAAxD;AAA0D,MAAA,
|
|
1
|
+
{"version":3,"sources":["../../../../src/Accordion/__tests__/AccordionMenu.test.tsx"],"names":["React","render","COLORS","AccordionMenu","accordionItems","id","title","children","describe","it","queryByText","expect","toBeDefined","toBeNull","container","headerItem","querySelector","toHaveStyleRule","neutral_20","textContent","toContain"],"mappings":"AAAA,OAAOA,KAAP,MAAkB,OAAlB;AACA,SAASC,MAAT,QAAuB,wBAAvB;AACA,OAAO,wBAAP;AACA,SAASC,MAAT,QAAuB,cAAvB;AACA,OAAOC,aAAP,MAA0B,kBAA1B;AAEA,MAAMC,cAAc,GAAG,CACrB;AACEC,EAAAA,EAAE,EAAE,UADN;AAEEC,EAAAA,KAAK,EAAE,wBAFT;AAGEC,EAAAA,QAAQ,eAAE;AAHZ,CADqB,EAMrB;AACEF,EAAAA,EAAE,EAAE,UADN;AAEEC,EAAAA,KAAK,EAAE,wBAFT;AAGEC,EAAAA,QAAQ,eAAE;AAHZ,CANqB,CAAvB;AAaAC,QAAQ,CAAC,mBAAD,EAAsB,MAAM;AAClCC,EAAAA,EAAE,CAAC,qCAAD,EAAwC,YAAY;AACpD,UAAM;AAAEC,MAAAA;AAAF,QAAkBT,MAAM,eAAC,oB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,CAACI,UAAU,EAAER,QAAZ,CAAqB,CAArB,CAAD,CAAN,CAAgCK,WAAhC;AACAD,IAAAA,MAAM,CAACI,UAAU,EAAER,QAAZ,CAAqB,CAArB,GAAyBY,WAA1B,CAAN,CAA6CC,SAA7C,CAAuD,eAAvD;AACD,GANC,CAAF;AAOD,CAvBO,CAAR","sourcesContent":["import React from 'react';\nimport { render } from '@testing-library/react';\nimport 'jest-styled-components';\nimport { COLORS } from '../../styles';\nimport AccordionMenu from '../AccordionMenu';\n\nconst accordionItems = [\n {\n id: 'test1_id',\n title: 'Item label with text 1',\n children: <div>content test1</div>,\n },\n {\n id: 'test2_id',\n title: 'Item label with text 2',\n children: <div>content test2</div>,\n },\n];\n\ndescribe('<AccordionMenu />', () => {\n it('Check correct text placed on labels', async () => {\n const { queryByText } = render(<AccordionMenu items={accordionItems} onSelect={() => {}}></AccordionMenu>);\n expect(queryByText('Item label with text 1')).toBeDefined();\n expect(queryByText('Item label with text 2')).toBeDefined();\n expect(queryByText('content test1')).toBeNull();\n });\n\n it('Check item label element color and label', async () => {\n const { container } = render(<AccordionMenu items={accordionItems} onSelect={() => {}}></AccordionMenu>);\n const headerItem = container.querySelector('#test2_id');\n expect(headerItem).toBeDefined();\n expect(headerItem?.children[0]).toHaveStyleRule('background', COLORS.neutral_20);\n expect(headerItem?.textContent).toContain('Item label with text 2');\n });\n\n it('Check expanded item text', async () => {\n const { container } = render(<AccordionMenu items={accordionItems} onSelect={() => {}} selectedItems={['test1_id']}></AccordionMenu>);\n const headerItem = container.querySelector('#test1_id');\n //check item expanded\n expect(headerItem?.children[1]).toBeDefined();\n expect(headerItem?.children[1]?.textContent).toContain('content test1');\n });\n});\n"],"file":"AccordionMenu.test.js"}
|
|
@@ -13,7 +13,6 @@ export const AccordionItemContainer = styled.div`
|
|
|
13
13
|
flex-direction: column;
|
|
14
14
|
box-sizing: border-box;
|
|
15
15
|
border-bottom: ${props => props.displaySeparator ? `1px solid ${COLORS.neutral_100}` : ''};
|
|
16
|
-
cursor: ${props => props.isDisabled ? 'not-allowed' : 'pointer'};
|
|
17
16
|
`;
|
|
18
17
|
const disabledState = css`
|
|
19
18
|
background: ${COLORS.white}!important;
|
|
@@ -31,19 +30,36 @@ export const ItemHeaderContainer = styled.div`
|
|
|
31
30
|
padding: 12px 16px 11px 16px;
|
|
32
31
|
cursor: pointer;
|
|
33
32
|
background: ${COLORS.neutral_20};
|
|
33
|
+
cursor: ${props => props.isDisabled ? 'not-allowed' : 'pointer'};
|
|
34
34
|
svg:last-child {
|
|
35
35
|
margin-left: auto;
|
|
36
36
|
}
|
|
37
|
-
:
|
|
38
|
-
|
|
37
|
+
outline: none;
|
|
38
|
+
${props => props.tabbedHere ? css`
|
|
39
39
|
z-index: ${Z_INDEXES.focus};
|
|
40
|
-
box-shadow: 0px 4px 12px ${COLORS.primary_500}, 0px 0px 8px ${COLORS.primary_500}
|
|
41
|
-
}
|
|
40
|
+
box-shadow: 0px 4px 12px ${COLORS.primary_500}, 0px 0px 8px ${COLORS.primary_500};` : ''}
|
|
42
41
|
|
|
43
42
|
${props => props.isDisabled ? disabledState : ''}
|
|
44
43
|
:hover {
|
|
45
44
|
background: ${COLORS.primary_20};
|
|
46
45
|
}
|
|
46
|
+
|
|
47
|
+
:hover .headerLabel {
|
|
48
|
+
color: ${COLORS.primary_700};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
:active .headerLabel {
|
|
52
|
+
color: ${COLORS.primary_800};
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
:hover svg {
|
|
56
|
+
color: ${COLORS.primary_700};
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
:active svg {
|
|
60
|
+
color: ${COLORS.primary_800};
|
|
61
|
+
}
|
|
62
|
+
|
|
47
63
|
:active {
|
|
48
64
|
background: ${COLORS.primary_100};
|
|
49
65
|
}
|
|
@@ -52,7 +68,7 @@ export const HeaderIconContainer = styled.div`
|
|
|
52
68
|
margin-left: auto;
|
|
53
69
|
`;
|
|
54
70
|
export const ItemBodyContainer = styled.div`
|
|
55
|
-
padding: 0px
|
|
71
|
+
padding: 0px 16px;
|
|
56
72
|
margin: 12px 0;
|
|
57
73
|
background: ${COLORS.white};
|
|
58
74
|
`;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/Accordion/styles.ts"],"names":["styled","css","COLORS","Z_INDEXES","AccordionMenuWrapper","div","AccordionItemContainer","props","displaySeparator","neutral_100","
|
|
1
|
+
{"version":3,"sources":["../../../src/Accordion/styles.ts"],"names":["styled","css","COLORS","Z_INDEXES","AccordionMenuWrapper","div","AccordionItemContainer","props","displaySeparator","neutral_100","disabledState","white","neutral_300","ItemHeaderContainer","neutral_20","isDisabled","tabbedHere","focus","primary_500","primary_20","primary_700","primary_800","primary_100","HeaderIconContainer","ItemBodyContainer"],"mappings":"AAAA,OAAOA,MAAP,IAAiBC,GAAjB,QAA4B,mBAA5B;AACA,SAASC,MAAT,QAAuB,WAAvB;AACA,SAASC,SAAT,QAA0B,qBAA1B;AAEA,OAAO,MAAMC,oBAAoB,GAAGJ,MAAM,CAACK,GAAI;AAC/C;AACA;AACA;AACA;AACA,CALO;AAOP,OAAO,MAAMC,sBAAsB,GAAGN,MAAM,CAACK,GAAoC;AACjF;AACA;AACA;AACA;AACA,mBAAoBE,KAAD,IAAYA,KAAK,CAACC,gBAAN,GAA0B,aAAYN,MAAM,CAACO,WAAY,EAAzD,GAA6D,EAAI;AAChG,CANO;AAQP,MAAMC,aAAa,GAAGT,GAAI;AAC1B,gBAAgBC,MAAM,CAACS,KAAM;AAC7B,WAAWT,MAAM,CAACU,WAAY;AAC9B;AACA;AACA,aAAaV,MAAM,CAACU,WAAY;AAChC;AACA,CAPA;AASA,OAAO,MAAMC,mBAAmB,GAAGb,MAAM,CAACK,GAAqE;AAC/G;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgBH,MAAM,CAACY,UAAW;AAClC,YAAaP,KAAD,IAAYA,KAAK,CAACQ,UAAN,GAAmB,aAAnB,GAAmC,SAAW;AACtE;AACA;AACA;AACA;AACA,IAAIR,KAAK,IAAIA,KAAK,CAACS,UAAN,GAAmBf,GAAI;AACpC,eAAeE,SAAS,CAACc,KAAM;AAC/B,+BAA+Bf,MAAM,CAACgB,WAAY,iBAAgBhB,MAAM,CAACgB,WAAY,GAFxE,GAE6E,EAAG;AAC7F;AACA,IAAKX,KAAD,IAAYA,KAAK,CAACQ,UAAN,GAAmBL,aAAnB,GAAmC,EAAI;AACvD;AACA,kBAAkBR,MAAM,CAACiB,UAAW;AACpC;AACA;AACA;AACA,aAAajB,MAAM,CAACkB,WAAY;AAChC;AACA;AACA;AACA,aAAalB,MAAM,CAACmB,WAAY;AAChC;AACA;AACA;AACA,aAAanB,MAAM,CAACkB,WAAY;AAChC;AACA;AACA;AACA,aAAalB,MAAM,CAACmB,WAAY;AAChC;AACA;AACA;AACA,kBAAkBnB,MAAM,CAACoB,WAAY;AACrC;AACA,CAzCO;AA2CP,OAAO,MAAMC,mBAAmB,GAAGvB,MAAM,CAACK,GAAI;AAC9C;AACA,CAFO;AAIP,OAAO,MAAMmB,iBAAiB,GAAGxB,MAAM,CAACK,GAAI;AAC5C;AACA;AACA,gBAAgBH,MAAM,CAACS,KAAM;AAC7B,CAJO","sourcesContent":["import styled, { css } from 'styled-components';\nimport { COLORS } from '../styles';\nimport { Z_INDEXES } from '../styles/z-indexes';\n\nexport const AccordionMenuWrapper = styled.div`\n min-width: 320px;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n`;\n\nexport const AccordionItemContainer = styled.div<{ displaySeparator: boolean; }>`\n width: 100%;\n display: flex;\n flex-direction: column;\n box-sizing: border-box;\n border-bottom: ${(props) => (props.displaySeparator ? `1px solid ${COLORS.neutral_100}` : '')};\n`;\n\nconst disabledState = css`\n background: ${COLORS.white}!important;\n color: ${COLORS.neutral_300};\n pointer-events: none;\n svg {\n color: ${COLORS.neutral_300}!important;\n }\n`;\n\nexport const ItemHeaderContainer = styled.div<{ isDisabled: boolean, isActive: boolean, tabbedHere: boolean }>`\n position: relative;\n display: flex;\n align-items: center;\n gap: 8px;\n padding: 12px 16px 11px 16px;\n cursor: pointer;\n background: ${COLORS.neutral_20};\n cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};\n svg:last-child {\n margin-left: auto;\n }\n outline: none;\n ${props => props.tabbedHere ? css`\n z-index: ${Z_INDEXES.focus};\n box-shadow: 0px 4px 12px ${COLORS.primary_500}, 0px 0px 8px ${COLORS.primary_500};` : ''}\n\n ${(props) => (props.isDisabled ? disabledState : '')}\n :hover {\n background: ${COLORS.primary_20};\n }\n\n :hover .headerLabel {\n color: ${COLORS.primary_700};\n }\n\n :active .headerLabel {\n color: ${COLORS.primary_800};\n }\n\n :hover svg {\n color: ${COLORS.primary_700};\n }\n\n :active svg {\n color: ${COLORS.primary_800};\n }\n\n :active {\n background: ${COLORS.primary_100};\n }\n`;\n\nexport const HeaderIconContainer = styled.div`\n margin-left: auto;\n`;\n\nexport const ItemBodyContainer = styled.div`\n padding: 0px 16px;\n margin: 12px 0;\n background: ${COLORS.white};\n`;\n"],"file":"styles.js"}
|
|
@@ -363,11 +363,13 @@ const ComponentXLStyling = (textStyle, color) => ComponentStyling('24px', '28px'
|
|
|
363
363
|
const ComponentXL = ({
|
|
364
364
|
color,
|
|
365
365
|
textStyle,
|
|
366
|
-
children
|
|
366
|
+
children,
|
|
367
|
+
className
|
|
367
368
|
}) => {
|
|
368
369
|
let fontWeight = componentFontWeight(textStyle);
|
|
369
370
|
let fontStyle = componentFontStyle(textStyle);
|
|
370
371
|
return /*#__PURE__*/React.createElement(TypographyBase, {
|
|
372
|
+
className: className,
|
|
371
373
|
color: color,
|
|
372
374
|
lineHeight: 28,
|
|
373
375
|
fontSize: 24,
|
|
@@ -378,6 +380,7 @@ const ComponentXL = ({
|
|
|
378
380
|
|
|
379
381
|
ComponentXL.propTypes = {
|
|
380
382
|
color: _pt.string,
|
|
383
|
+
className: _pt.string,
|
|
381
384
|
textStyle: _pt.oneOf([1, 2, 3, 4])
|
|
382
385
|
};
|
|
383
386
|
|
|
@@ -386,11 +389,13 @@ const ComponentLStyling = (textStyle, color) => ComponentStyling('20px', '24px',
|
|
|
386
389
|
const ComponentL = ({
|
|
387
390
|
color,
|
|
388
391
|
textStyle,
|
|
389
|
-
children
|
|
392
|
+
children,
|
|
393
|
+
className
|
|
390
394
|
}) => {
|
|
391
395
|
let fontWeight = componentFontWeight(textStyle);
|
|
392
396
|
let fontStyle = componentFontStyle(textStyle);
|
|
393
397
|
return /*#__PURE__*/React.createElement(TypographyBase, {
|
|
398
|
+
className: className,
|
|
394
399
|
color: color,
|
|
395
400
|
lineHeight: 24,
|
|
396
401
|
fontSize: 20,
|
|
@@ -401,6 +406,7 @@ const ComponentL = ({
|
|
|
401
406
|
|
|
402
407
|
ComponentL.propTypes = {
|
|
403
408
|
color: _pt.string,
|
|
409
|
+
className: _pt.string,
|
|
404
410
|
textStyle: _pt.oneOf([1, 2, 3, 4])
|
|
405
411
|
};
|
|
406
412
|
|
|
@@ -409,11 +415,13 @@ const ComponentMStyling = (textStyle, color) => ComponentStyling('18px', '24px',
|
|
|
409
415
|
const ComponentM = ({
|
|
410
416
|
color,
|
|
411
417
|
textStyle,
|
|
412
|
-
children
|
|
418
|
+
children,
|
|
419
|
+
className
|
|
413
420
|
}) => {
|
|
414
421
|
let fontWeight = componentFontWeight(textStyle);
|
|
415
422
|
let fontStyle = componentFontStyle(textStyle);
|
|
416
423
|
return /*#__PURE__*/React.createElement(TypographyBase, {
|
|
424
|
+
className: className,
|
|
417
425
|
color: color,
|
|
418
426
|
lineHeight: 24,
|
|
419
427
|
fontSize: 18,
|
|
@@ -424,6 +432,7 @@ const ComponentM = ({
|
|
|
424
432
|
|
|
425
433
|
ComponentM.propTypes = {
|
|
426
434
|
color: _pt.string,
|
|
435
|
+
className: _pt.string,
|
|
427
436
|
textStyle: _pt.oneOf([1, 2, 3, 4])
|
|
428
437
|
};
|
|
429
438
|
|
|
@@ -432,11 +441,13 @@ const ComponentSStyling = (textStyle, color) => ComponentStyling('16px', '20px',
|
|
|
432
441
|
const ComponentS = ({
|
|
433
442
|
color,
|
|
434
443
|
textStyle,
|
|
435
|
-
children
|
|
444
|
+
children,
|
|
445
|
+
className
|
|
436
446
|
}) => {
|
|
437
447
|
let fontWeight = componentFontWeight(textStyle);
|
|
438
448
|
let fontStyle = componentFontStyle(textStyle);
|
|
439
449
|
return /*#__PURE__*/React.createElement(TypographyBase, {
|
|
450
|
+
className: className,
|
|
440
451
|
color: color,
|
|
441
452
|
lineHeight: 20,
|
|
442
453
|
fontSize: 16,
|
|
@@ -447,6 +458,7 @@ const ComponentS = ({
|
|
|
447
458
|
|
|
448
459
|
ComponentS.propTypes = {
|
|
449
460
|
color: _pt.string,
|
|
461
|
+
className: _pt.string,
|
|
450
462
|
textStyle: _pt.oneOf([1, 2, 3, 4])
|
|
451
463
|
};
|
|
452
464
|
|
|
@@ -455,12 +467,14 @@ const ComponentXSStyling = (textStyle, color) => ComponentStyling('14px', '16px'
|
|
|
455
467
|
const ComponentXS = ({
|
|
456
468
|
color,
|
|
457
469
|
textStyle,
|
|
458
|
-
children
|
|
470
|
+
children,
|
|
471
|
+
className
|
|
459
472
|
}) => {
|
|
460
473
|
let fontWeight = componentFontWeight(textStyle);
|
|
461
474
|
let fontStyle = componentFontStyle(textStyle);
|
|
462
475
|
let textTransform = componentTextTransformation(textStyle);
|
|
463
476
|
return /*#__PURE__*/React.createElement(TypographyBase, {
|
|
477
|
+
className: className,
|
|
464
478
|
color: color,
|
|
465
479
|
lineHeight: 16,
|
|
466
480
|
fontSize: 14,
|
|
@@ -472,6 +486,7 @@ const ComponentXS = ({
|
|
|
472
486
|
|
|
473
487
|
ComponentXS.propTypes = {
|
|
474
488
|
color: _pt.string,
|
|
489
|
+
className: _pt.string,
|
|
475
490
|
textStyle: _pt.oneOf([1, 2, 3, 4])
|
|
476
491
|
};
|
|
477
492
|
|
|
@@ -480,12 +495,14 @@ const ComponentXXSStyling = (textStyle, color) => ComponentStyling('12px', '16px
|
|
|
480
495
|
const ComponentXXS = ({
|
|
481
496
|
color,
|
|
482
497
|
textStyle,
|
|
483
|
-
children
|
|
498
|
+
children,
|
|
499
|
+
className
|
|
484
500
|
}) => {
|
|
485
501
|
let fontWeight = componentFontWeight(textStyle);
|
|
486
502
|
let fontStyle = componentFontStyle(textStyle);
|
|
487
503
|
let textTransform = componentTextTransformation(textStyle);
|
|
488
504
|
return /*#__PURE__*/React.createElement(TypographyBase, {
|
|
505
|
+
className: className,
|
|
489
506
|
color: color,
|
|
490
507
|
lineHeight: 16,
|
|
491
508
|
fontSize: 12,
|
|
@@ -497,6 +514,7 @@ const ComponentXXS = ({
|
|
|
497
514
|
|
|
498
515
|
ComponentXXS.propTypes = {
|
|
499
516
|
color: _pt.string,
|
|
517
|
+
className: _pt.string,
|
|
500
518
|
textStyle: _pt.oneOf([1, 2, 3, 4])
|
|
501
519
|
};
|
|
502
520
|
|
|
@@ -560,6 +578,7 @@ const ComponentResponsive = ({
|
|
|
560
578
|
|
|
561
579
|
ComponentResponsive.propTypes = {
|
|
562
580
|
color: _pt.string,
|
|
581
|
+
className: _pt.string,
|
|
563
582
|
textStyle: _pt.oneOf([1, 2, 3, 4])
|
|
564
583
|
};
|
|
565
584
|
export { TYPOGRAPHY };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/styles/typography.tsx"],"names":["React","styled","css","COLORS","Size","TYPOGRAPHY","fontFamily","TypographyBase","color","lineHeight","fontSize","fontWeight","fontStyle","textTransform","textDecorationLine","black","HeadlineBaseStyling","HeadlineBase","HeadlineXLStyling","HeadlineXL","HeadlineLStyling","HeadlineL","HeadlineMStyling","HeadlineM","HeadlineSStyling","HeadlineS","HeadlineXSStyling","HeadlineXS","HeadlineXXSStyling","HeadlineXXS","ParagraphStyling","ParagraphBase","props","marginBetweenParagraphs","ParagraphTextStyle","paragraphFontWeight","textStyle","Bold","paragraphFontStyle","Italic","paragraphTextDecorationLine","textDecoration","Underline","ParagraphBaseStyling","ParagraphXlStyling","ParagraphXL","children","ParagraphLStyling","ParagraphL","ParagraphMStyling","ParagraphM","ParagraphSStyling","ParagraphS","ParagraphXSStyling","ParagraphXS","ComponentTextStyle","componentFontWeight","UppercaseBold","componentFontStyle","componentTextTransformation","ComponentStyling","ComponentXLStyling","ComponentXL","ComponentLStyling","ComponentL","ComponentMStyling","ComponentM","ComponentSStyling","ComponentS","ComponentXSStyling","ComponentXS","ComponentXXSStyling","ComponentXXS","ComponentResponsive","size","width","fontsize","Small","Medium","Large","XXSmall","XSmall"],"mappings":";AAAA,OAAOA,KAAP,MAAyC,OAAzC;AACA,OAAOC,MAAP,IAAiBC,GAAjB,QAA4B,mBAA5B;AACA,SAASC,MAAT,QAAuB,GAAvB;AAEA,SAASC,IAAT,QAAqB,UAArB;AAEA,MAAMC,UAAU,GAAG;AACjBC,EAAAA,UAAU,EAAE;AADK,CAAnB;AAcA,MAAMC,cAAc,GAAGN,MAAM,CAAC,KAAD,CAAN,CAA+B,CAAC;AAAEO,EAAAA,KAAF;AAASC,EAAAA,UAAT;AAAqBC,EAAAA,QAArB;AAA+BC,EAAAA,UAA/B;AAA2CC,EAAAA,SAA3C;AAAsDC,EAAAA,aAAtD;AAAqEC,EAAAA;AAArE,CAAD,MAAgG;AACpJR,EAAAA,UAAU,EAAED,UAAU,CAACC,UAD6H;AAEpJI,EAAAA,QAAQ,EAAEA,QAF0I;AAGpJC,EAAAA,UAAU,EAAEA,UAHwI;AAIpJF,EAAAA,UAAU,EAAEA,UAAU,GAAG,IAJ2H;AAKpJI,EAAAA,aAAa,EAAEA,aAAa,GAAGA,aAAH,GAAmB,MALqG;AAMpJC,EAAAA,kBAAkB,EAAEA,kBAAkB,GAAGA,kBAAH,GAAwB,MANsF;AAOpJF,EAAAA,SAAS,EAAEA,SAAS,GAAGA,SAAH,GAAe,QAPiH;AAQpJJ,EAAAA,KAAK,EAAEA,KAAK,G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,iBAAnE,EAAsFE,kBAAtF;AACA,SAASnC,iBAAT,EAA4BE,gBAA5B,EAA8CE,gBAA9C,EAAgEE,gBAAhE,EAAkFE,iBAAlF,EAAqGE,kBAArG","sourcesContent":["import React, { FunctionComponent } from 'react';\nimport styled, { css } from 'styled-components';\nimport { COLORS } from '.';\nimport { Property } from 'csstype';\nimport { Size } from '../types';\n\nconst TYPOGRAPHY = {\n fontFamily: 'Lato, sans-serif',\n};\n\ninterface ITypographyBase {\n color?: string;\n lineHeight: number;\n fontSize: number;\n fontWeight: number;\n fontStyle?: string;\n textTransform?: Property.TextTransform;\n textDecorationLine?: Property.TextDecorationLine;\n}\n\nconst TypographyBase = styled('div')<ITypographyBase>(({ color, lineHeight, fontSize, fontWeight, fontStyle, textTransform, textDecorationLine }) => ({\n fontFamily: TYPOGRAPHY.fontFamily,\n fontSize: fontSize,\n fontWeight: fontWeight,\n lineHeight: lineHeight + 'px',\n textTransform: textTransform ? textTransform : 'none',\n textDecorationLine: textDecorationLine ? textDecorationLine : 'none',\n fontStyle: fontStyle ? fontStyle : 'normal',\n color: color ? color : COLORS.black,\n}));\n\ninterface IHeadline {\n color?: string;\n}\n\ninterface IHeadlineBase {\n color?: string;\n lineHeight: number;\n fontSize: number;\n}\n\nconst HeadlineBaseStyling = (fontSize: string, lineHeight: string, color: string) => {\n return css`\n font-family: ${TYPOGRAPHY.fontFamily};\n font-size: ${fontSize};\n line-height: ${lineHeight};\n font-weight: 700;\n color: ${color};\n `;\n}\nconst HeadlineBase = styled(TypographyBase)<IHeadlineBase>(({ color, lineHeight, fontSize }) => ({\n fontSize: fontSize,\n fontWeight: 700,\n lineHeight: lineHeight,\n color: color,\n}));\n\nconst HeadlineXLStyling = (color: string) => HeadlineBaseStyling('48px', '64px', color);\nconst HeadlineXL = styled(HeadlineBase)<IHeadline>(({ color }) => ({\n fontSize: '48px',\n lineHeight: '64px',\n color: color,\n}));\n\nconst HeadlineLStyling = (color: string) => HeadlineBaseStyling('40px', '52px', color);\nconst HeadlineL = styled(HeadlineBase)<IHeadline>(({ color }) => ({\n fontSize: '40px',\n lineHeight: '52px',\n color: color,\n}));\n\nconst HeadlineMStyling = (color: string) => HeadlineBaseStyling('32px', '40px', color);\nconst HeadlineM = styled(HeadlineBase)<IHeadline>(({ color }) => ({\n fontSize: '32px',\n lineHeight: '40px',\n color: color,\n}));\n\nconst HeadlineSStyling = (color: string) => HeadlineBaseStyling('28px', '36px', color);\nconst HeadlineS = styled(HeadlineBase)<IHeadline>(({ color }) => ({\n fontSize: '28px',\n lineHeight: '36px',\n color: color,\n}));\n\nconst HeadlineXSStyling = (color: string) => HeadlineBaseStyling('24px', '32px', color);\nconst HeadlineXS = styled(HeadlineBase)<IHeadline>(({ color }) => ({\n fontSize: '24px',\n lineHeight: '32px',\n color: color,\n}));\n\nconst HeadlineXXSStyling = (color: string) => HeadlineBaseStyling('20px', '24px', color);\nconst HeadlineXXS = styled(HeadlineBase)<IHeadline>(({ color }) => ({\n fontSize: '20px',\n lineHeight: '24px',\n color: color,\n}));\n\nconst ParagraphStyling = css`\n :lang(ja-jp) > h1,\n h2,\n h3,\n h4,\n p,\n span {\n max-width: 30em;\n }\n :lang(ko-kr) > h1,\n h2,\n h3,\n h4,\n p,\n span {\n max-width: 30em;\n }\n :lang(zh-CN) > h1,\n h2,\n h3,\n h4,\n p,\n span {\n max-width: 30em;\n }\n h1,\n h2,\n h3,\n h4,\n p,\n span {\n max-width: 34em;\n }\n`;\n\ninterface IParagraphBase {\n color?: string;\n lineHeight: number;\n fontSize: number;\n marginBetweenParagraphs?: string;\n}\n\nconst ParagraphBase = styled(TypographyBase)<IParagraphBase>`\n p {\n margin-block-start: 0;\n margin-block-end: 0;\n }\n p:not(:only-of-type) {\n margin-bottom: ${(props) => props.marginBetweenParagraphs || '0'};\n }\n ${ParagraphStyling}\n`;\n\ninterface IParagraph {\n color?: string;\n}\n\nenum ParagraphTextStyle {\n Regular = 1,\n Bold,\n Italic,\n Underline,\n}\n\ntype ParagraphProps = {\n color?: string;\n textStyle?: ParagraphTextStyle;\n};\n\nconst paragraphFontWeight = (textStyle?: ParagraphTextStyle) => {\n let fontWeight = 400;\n if (textStyle === ParagraphTextStyle.Bold) {\n fontWeight = 700;\n }\n return fontWeight;\n};\n\nconst paragraphFontStyle = (textStyle?: ParagraphTextStyle) => {\n let fontStyle = textStyle && textStyle === ParagraphTextStyle.Italic ? 'italic' : '';\n return fontStyle;\n};\n\nconst paragraphTextDecorationLine = (textStyle?: ParagraphTextStyle): Property.TextDecorationLine => {\n let textDecoration: Property.TextDecorationLine = textStyle && textStyle === ParagraphTextStyle.Underline ? 'underline' : 'none';\n return textDecoration;\n};\n\nconst ParagraphBaseStyling = (fontSize: string, lineHeight: string, textStyle: ParagraphTextStyle, color: string) => {\n return css`\n font-family: ${TYPOGRAPHY.fontFamily};\n font-size: ${fontSize};\n font-weight: ${paragraphFontWeight(textStyle)};\n line-height: ${lineHeight};\n font-style: ${paragraphFontStyle(textStyle)};\n color: ${color};\n `;\n}\n\nconst ParagraphXlStyling = (textStyle: ParagraphTextStyle, color: string) => ParagraphBaseStyling('24px', '36px', textStyle, color);\nconst ParagraphXL: FunctionComponent<ParagraphProps> = ({ color, textStyle, children }) => {\n let fontWeight = paragraphFontWeight(textStyle);\n let fontStyle = paragraphFontStyle(textStyle);\n let textDecorationLine = paragraphTextDecorationLine(textStyle);\n return (\n <ParagraphBase color={color} lineHeight={36} fontSize={24} fontWeight={fontWeight} fontStyle={fontStyle} textDecorationLine={textDecorationLine} marginBetweenParagraphs=\"18px\">\n {children}\n </ParagraphBase>\n );\n};\n\nconst ParagraphLStyling = (textStyle: ParagraphTextStyle, color: string) => ParagraphBaseStyling('20px', '32px', textStyle, color);\nconst ParagraphL: FunctionComponent<ParagraphProps> = ({ color, textStyle, children }) => {\n let fontWeight = paragraphFontWeight(textStyle);\n let fontStyle = paragraphFontStyle(textStyle);\n let textDecorationLine = paragraphTextDecorationLine(textStyle);\n return (\n <ParagraphBase color={color} lineHeight={32} fontSize={20} fontWeight={fontWeight} fontStyle={fontStyle} textDecorationLine={textDecorationLine} marginBetweenParagraphs=\"16px\">\n {children}\n </ParagraphBase>\n );\n};\n\nconst ParagraphMStyling = (textStyle: ParagraphTextStyle, color: string) => ParagraphBaseStyling('18px', '28px', textStyle, color);\nconst ParagraphM: FunctionComponent<ParagraphProps> = ({ color, textStyle, children }) => {\n let fontWeight = paragraphFontWeight(textStyle);\n let fontStyle = paragraphFontStyle(textStyle);\n let textDecorationLine = paragraphTextDecorationLine(textStyle);\n return (\n <ParagraphBase color={color} lineHeight={28} fontSize={18} fontWeight={fontWeight} fontStyle={fontStyle} textDecorationLine={textDecorationLine} marginBetweenParagraphs=\"14px\">\n {children}\n </ParagraphBase>\n );\n};\n\nconst ParagraphSStyling = (textStyle: ParagraphTextStyle, color: string) => ParagraphBaseStyling('16px', '24px', textStyle, color);\nconst ParagraphS: FunctionComponent<ParagraphProps> = ({ color, textStyle, children }) => {\n let fontWeight = paragraphFontWeight(textStyle);\n let fontStyle = paragraphFontStyle(textStyle);\n let textDecorationLine = paragraphTextDecorationLine(textStyle);\n return (\n <ParagraphBase color={color} lineHeight={24} fontSize={16} fontWeight={fontWeight} fontStyle={fontStyle} textDecorationLine={textDecorationLine} marginBetweenParagraphs=\"12px\">\n {children}\n </ParagraphBase>\n );\n};\n\nconst ParagraphXSStyling = (textStyle: ParagraphTextStyle, color: string) => ParagraphBaseStyling('14px', '20px', textStyle, color);\nconst ParagraphXS: FunctionComponent<ParagraphProps> = ({ color, textStyle, children }) => {\n let fontWeight = paragraphFontWeight(textStyle);\n let fontStyle = paragraphFontStyle(textStyle);\n let textDecorationLine = paragraphTextDecorationLine(textStyle);\n return (\n <ParagraphBase color={color} lineHeight={20} fontSize={14} fontWeight={fontWeight} fontStyle={fontStyle} textDecorationLine={textDecorationLine} marginBetweenParagraphs=\"10px\">\n {children}\n </ParagraphBase>\n );\n};\n\nenum ComponentTextStyle {\n Regular = 1,\n Bold,\n Italic,\n UppercaseBold,\n}\n\ntype ComponentProps = {\n color?: string;\n textStyle?: ComponentTextStyle;\n};\n\nconst componentFontWeight = (textStyle?: ComponentTextStyle) => {\n let fontWeight = 400;\n if (textStyle === ComponentTextStyle.Bold || textStyle === ComponentTextStyle.UppercaseBold) {\n fontWeight = 700;\n }\n return fontWeight;\n};\n\nconst componentFontStyle = (textStyle?: ComponentTextStyle) => {\n let fontStyle = textStyle && textStyle === ComponentTextStyle.Italic ? 'italic' : '';\n return fontStyle;\n};\n\nconst componentTextTransformation = (textStyle?: ComponentTextStyle): Property.TextTransform => {\n let fontStyle: Property.TextTransform = textStyle && textStyle === ComponentTextStyle.UppercaseBold ? 'uppercase' : 'none';\n return fontStyle;\n};\n\nconst ComponentStyling = (fontSize: string, lineHeight: string, textStyle: ComponentTextStyle, color: string | undefined | null) => {\n return css`\n font-family: ${TYPOGRAPHY.fontFamily};\n font-size: ${fontSize};\n font-weight: ${componentFontWeight(textStyle)};\n line-height: ${lineHeight};\n font-style: ${componentFontStyle(textStyle)};\n ${color === null ? '' : `color: ${(color || COLORS.black)};`}\n `;\n};\n\nconst ComponentXLStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('24px', '28px', textStyle, color);\nconst ComponentXL: FunctionComponent<ComponentProps> = ({ color, textStyle, children }) => {\n let fontWeight = componentFontWeight(textStyle);\n let fontStyle = componentFontStyle(textStyle);\n return (\n <TypographyBase color={color} lineHeight={28} fontSize={24} fontWeight={fontWeight} fontStyle={fontStyle}>\n {children}\n </TypographyBase>\n );\n};\n\nconst ComponentLStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('20px', '24px', textStyle, color);\nconst ComponentL: FunctionComponent<ComponentProps> = ({ color, textStyle, children }) => {\n let fontWeight = componentFontWeight(textStyle);\n let fontStyle = componentFontStyle(textStyle);\n return (\n <TypographyBase color={color} lineHeight={24} fontSize={20} fontWeight={fontWeight} fontStyle={fontStyle}>\n {children}\n </TypographyBase>\n );\n};\n\nconst ComponentMStyling = (textStyle: ComponentTextStyle, color: string | undefined | null) => ComponentStyling('18px', '24px', textStyle, color);\nconst ComponentM: FunctionComponent<ComponentProps> = ({ color, textStyle, children }) => {\n let fontWeight = componentFontWeight(textStyle);\n let fontStyle = componentFontStyle(textStyle);\n return (\n <TypographyBase color={color} lineHeight={24} fontSize={18} fontWeight={fontWeight} fontStyle={fontStyle}>\n {children}\n </TypographyBase>\n );\n};\n\nconst ComponentSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('16px', '20px', textStyle, color);\nconst ComponentS: FunctionComponent<ComponentProps> = ({ color, textStyle, children }) => {\n let fontWeight = componentFontWeight(textStyle);\n let fontStyle = componentFontStyle(textStyle);\n return (\n <TypographyBase color={color} lineHeight={20} fontSize={16} fontWeight={fontWeight} fontStyle={fontStyle}>\n {children}\n </TypographyBase>\n );\n};\n\nconst ComponentXSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('14px', '16px', textStyle, color);\nconst ComponentXS: FunctionComponent<ComponentProps> = ({ color, textStyle, children }) => {\n let fontWeight = componentFontWeight(textStyle);\n let fontStyle = componentFontStyle(textStyle);\n let textTransform = componentTextTransformation(textStyle);\n return (\n <TypographyBase color={color} lineHeight={16} fontSize={14} fontWeight={fontWeight} fontStyle={fontStyle} textTransform={textTransform}>\n {children}\n </TypographyBase>\n );\n};\n\nconst ComponentXXSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('12px', '16px', textStyle, color);\nconst ComponentXXS: FunctionComponent<ComponentProps> = ({ color, textStyle, children }) => {\n let fontWeight = componentFontWeight(textStyle);\n let fontStyle = componentFontStyle(textStyle);\n let textTransform = componentTextTransformation(textStyle);\n return (\n <TypographyBase color={color} lineHeight={16} fontSize={12} fontWeight={fontWeight} fontStyle={fontStyle} textTransform={textTransform}>\n {children}\n </TypographyBase>\n );\n};\n\nconst ComponentResponsive: FunctionComponent<ComponentProps & { size?: Size; width: number }> = ({\n color,\n textStyle,\n children,\n size,\n width,\n}) => {\n let fontsize = size;\n if (!size) {\n if (width < 768) {\n fontsize = Size.Small;\n } else if (width < 992) {\n fontsize = Size.Medium;\n } else {\n fontsize = Size.Large;\n }\n }\n switch (fontsize) {\n case Size.XXSmall:\n return <ComponentXXS color={color} textStyle={textStyle} children={children} />;\n case Size.XSmall:\n return <ComponentXS color={color} textStyle={textStyle} children={children} />;\n case Size.Small:\n return <ComponentS color={color} textStyle={textStyle} children={children} />;\n case Size.Medium:\n return <ComponentM color={color} textStyle={textStyle} children={children} />;\n case Size.Large:\n default:\n return <ComponentL color={color} textStyle={textStyle} children={children} />;\n }\n};\n\nexport { TYPOGRAPHY };\nexport { HeadlineXL, HeadlineL, HeadlineM, HeadlineS, HeadlineXS, HeadlineXXS };\nexport { ParagraphTextStyle, ParagraphXL, ParagraphL, ParagraphM, ParagraphS, ParagraphXS };\nexport { ComponentTextStyle, ComponentXL, ComponentL, ComponentM, ComponentS, ComponentXS, ComponentXXS, ComponentResponsive };\nexport { ComponentXLStyling, ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentXSStyling, ComponentXXSStyling };\nexport { ParagraphXlStyling, ParagraphLStyling, ParagraphMStyling, ParagraphSStyling, ParagraphXSStyling };\nexport { HeadlineXLStyling, HeadlineLStyling, HeadlineMStyling, HeadlineSStyling, HeadlineXSStyling, HeadlineXXSStyling };\n"],"file":"typography.js"}
|
|
1
|
+
{"version":3,"sources":["../../../src/styles/typography.tsx"],"names":["React","styled","css","COLORS","Size","TYPOGRAPHY","fontFamily","TypographyBase","color","lineHeight","fontSize","fontWeight","fontStyle","textTransform","textDecorationLine","black","HeadlineBaseStyling","HeadlineBase","HeadlineXLStyling","HeadlineXL","HeadlineLStyling","HeadlineL","HeadlineMStyling","HeadlineM","HeadlineSStyling","HeadlineS","HeadlineXSStyling","HeadlineXS","HeadlineXXSStyling","HeadlineXXS","ParagraphStyling","ParagraphBase","props","marginBetweenParagraphs","ParagraphTextStyle","paragraphFontWeight","textStyle","Bold","paragraphFontStyle","Italic","paragraphTextDecorationLine","textDecoration","Underline","ParagraphBaseStyling","ParagraphXlStyling","ParagraphXL","children","ParagraphLStyling","ParagraphL","ParagraphMStyling","ParagraphM","ParagraphSStyling","ParagraphS","ParagraphXSStyling","ParagraphXS","ComponentTextStyle","componentFontWeight","UppercaseBold","componentFontStyle","componentTextTransformation","ComponentStyling","ComponentXLStyling","ComponentXL","className","ComponentLStyling","ComponentL","ComponentMStyling","ComponentM","ComponentSStyling","ComponentS","ComponentXSStyling","ComponentXS","ComponentXXSStyling","ComponentXXS","ComponentResponsive","size","width","fontsize","Small","Medium","Large","XXSmall","XSmall"],"mappings":";AAAA,OAAOA,KAAP,MAAyC,OAAzC;AACA,OAAOC,MAAP,IAAiBC,GAAjB,QAA4B,mBAA5B;AACA,SAASC,MAAT,QAAuB,GAAvB;AAEA,SAASC,IAAT,QAAqB,UAArB;AAEA,MAAMC,UAAU,GAAG;AACjBC,EAAAA,UAAU,EAAE;AADK,CAAnB;AAcA,MAAMC,cAAc,GAAGN,MAAM,CAAC,KAAD,CAAN,CAA+B,CAAC;AAAEO,EAAAA,KAAF;AAASC,EAAAA,UAAT;AAAqBC,EAAAA,QAArB;AAA+BC,EAAAA,UAA/B;AAA2CC,EAAAA,SAA3C;AAAsDC,EAAAA,aAAtD;AAAqEC,EAAAA;AAArE,CAAD,MAAgG;AACpJR,EAAAA,UAAU,EAAED,UAAU,CAACC,UAD6H;AAEpJI,EAAAA,QAAQ,EAAEA,QAF0I;AAGpJC,EAAAA,UAAU,EAAEA,UAHwI;AAIpJF,EAAAA,UAAU,EAAEA,UAAU,GAAG,IAJ2H;AAKpJI,EAAAA,aAAa,EAAEA,aAAa,GAAGA,aAAH,GAAmB,MALqG;AAMpJC,EAAAA,kBAAkB,EAAEA,kBAAkB,GAAGA,kBAAH,GAAwB,MANsF;AAOpJF,EAAAA,SAAS,EAAEA,SAAS,GAAGA,SAAH,GAAe,QAPiH;AAQpJJ,EAAAA,KAAK,EAAEA,KAA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AASc,UAAT,EAAqBE,SAArB,EAAgCE,SAAhC,EAA2CE,SAA3C,EAAsDE,UAAtD,EAAkEE,WAAlE;AACA,SAASK,kBAAT,EAA6BW,WAA7B,EAA0CG,UAA1C,EAAsDE,UAAtD,EAAkEE,UAAlE,EAA8EE,WAA9E;AACA,SAASC,kBAAT,EAA6BO,WAA7B,EAA0CG,UAA1C,EAAsDE,UAAtD,EAAkEE,UAAlE,EAA8EE,WAA9E,EAA2FE,YAA3F,EAAyGC,mBAAzG;AACA,SAASb,kBAAT,EAA6BG,iBAA7B,EAAgDE,iBAAhD,EAAmEE,iBAAnE,EAAsFE,kBAAtF,EAA0GE,mBAA1G;AACA,SAAS5B,kBAAT,EAA6BG,iBAA7B,EAAgDE,iBAAhD,EAAmEE,iBAAnE,EAAsFE,kBAAtF;AACA,SAASnC,iBAAT,EAA4BE,gBAA5B,EAA8CE,gBAA9C,EAAgEE,gBAAhE,EAAkFE,iBAAlF,EAAqGE,kBAArG","sourcesContent":["import React, { FunctionComponent } from 'react';\nimport styled, { css } from 'styled-components';\nimport { COLORS } from '.';\nimport { Property } from 'csstype';\nimport { Size } from '../types';\n\nconst TYPOGRAPHY = {\n fontFamily: 'Lato, sans-serif',\n};\n\ninterface ITypographyBase {\n color?: string;\n lineHeight: number;\n fontSize: number;\n fontWeight: number;\n fontStyle?: string;\n textTransform?: Property.TextTransform;\n textDecorationLine?: Property.TextDecorationLine;\n}\n\nconst TypographyBase = styled('div')<ITypographyBase>(({ color, lineHeight, fontSize, fontWeight, fontStyle, textTransform, textDecorationLine }) => ({\n fontFamily: TYPOGRAPHY.fontFamily,\n fontSize: fontSize,\n fontWeight: fontWeight,\n lineHeight: lineHeight + 'px',\n textTransform: textTransform ? textTransform : 'none',\n textDecorationLine: textDecorationLine ? textDecorationLine : 'none',\n fontStyle: fontStyle ? fontStyle : 'normal',\n color: color ? color : COLORS.black,\n}));\n\ninterface IHeadline {\n color?: string;\n}\n\ninterface IHeadlineBase {\n color?: string;\n lineHeight: number;\n fontSize: number;\n}\n\nconst HeadlineBaseStyling = (fontSize: string, lineHeight: string, color: string) => {\n return css`\n font-family: ${TYPOGRAPHY.fontFamily};\n font-size: ${fontSize};\n line-height: ${lineHeight};\n font-weight: 700;\n color: ${color};\n `;\n}\nconst HeadlineBase = styled(TypographyBase)<IHeadlineBase>(({ color, lineHeight, fontSize }) => ({\n fontSize: fontSize,\n fontWeight: 700,\n lineHeight: lineHeight,\n color: color,\n}));\n\nconst HeadlineXLStyling = (color: string) => HeadlineBaseStyling('48px', '64px', color);\nconst HeadlineXL = styled(HeadlineBase)<IHeadline>(({ color }) => ({\n fontSize: '48px',\n lineHeight: '64px',\n color: color,\n}));\n\nconst HeadlineLStyling = (color: string) => HeadlineBaseStyling('40px', '52px', color);\nconst HeadlineL = styled(HeadlineBase)<IHeadline>(({ color }) => ({\n fontSize: '40px',\n lineHeight: '52px',\n color: color,\n}));\n\nconst HeadlineMStyling = (color: string) => HeadlineBaseStyling('32px', '40px', color);\nconst HeadlineM = styled(HeadlineBase)<IHeadline>(({ color }) => ({\n fontSize: '32px',\n lineHeight: '40px',\n color: color,\n}));\n\nconst HeadlineSStyling = (color: string) => HeadlineBaseStyling('28px', '36px', color);\nconst HeadlineS = styled(HeadlineBase)<IHeadline>(({ color }) => ({\n fontSize: '28px',\n lineHeight: '36px',\n color: color,\n}));\n\nconst HeadlineXSStyling = (color: string) => HeadlineBaseStyling('24px', '32px', color);\nconst HeadlineXS = styled(HeadlineBase)<IHeadline>(({ color }) => ({\n fontSize: '24px',\n lineHeight: '32px',\n color: color,\n}));\n\nconst HeadlineXXSStyling = (color: string) => HeadlineBaseStyling('20px', '24px', color);\nconst HeadlineXXS = styled(HeadlineBase)<IHeadline>(({ color }) => ({\n fontSize: '20px',\n lineHeight: '24px',\n color: color,\n}));\n\nconst ParagraphStyling = css`\n :lang(ja-jp) > h1,\n h2,\n h3,\n h4,\n p,\n span {\n max-width: 30em;\n }\n :lang(ko-kr) > h1,\n h2,\n h3,\n h4,\n p,\n span {\n max-width: 30em;\n }\n :lang(zh-CN) > h1,\n h2,\n h3,\n h4,\n p,\n span {\n max-width: 30em;\n }\n h1,\n h2,\n h3,\n h4,\n p,\n span {\n max-width: 34em;\n }\n`;\n\ninterface IParagraphBase {\n color?: string;\n lineHeight: number;\n fontSize: number;\n marginBetweenParagraphs?: string;\n}\n\nconst ParagraphBase = styled(TypographyBase)<IParagraphBase>`\n p {\n margin-block-start: 0;\n margin-block-end: 0;\n }\n p:not(:only-of-type) {\n margin-bottom: ${(props) => props.marginBetweenParagraphs || '0'};\n }\n ${ParagraphStyling}\n`;\n\ninterface IParagraph {\n color?: string;\n}\n\nenum ParagraphTextStyle {\n Regular = 1,\n Bold,\n Italic,\n Underline,\n}\n\ntype ParagraphProps = {\n color?: string;\n textStyle?: ParagraphTextStyle;\n};\n\nconst paragraphFontWeight = (textStyle?: ParagraphTextStyle) => {\n let fontWeight = 400;\n if (textStyle === ParagraphTextStyle.Bold) {\n fontWeight = 700;\n }\n return fontWeight;\n};\n\nconst paragraphFontStyle = (textStyle?: ParagraphTextStyle) => {\n let fontStyle = textStyle && textStyle === ParagraphTextStyle.Italic ? 'italic' : '';\n return fontStyle;\n};\n\nconst paragraphTextDecorationLine = (textStyle?: ParagraphTextStyle): Property.TextDecorationLine => {\n let textDecoration: Property.TextDecorationLine = textStyle && textStyle === ParagraphTextStyle.Underline ? 'underline' : 'none';\n return textDecoration;\n};\n\nconst ParagraphBaseStyling = (fontSize: string, lineHeight: string, textStyle: ParagraphTextStyle, color: string) => {\n return css`\n font-family: ${TYPOGRAPHY.fontFamily};\n font-size: ${fontSize};\n font-weight: ${paragraphFontWeight(textStyle)};\n line-height: ${lineHeight};\n font-style: ${paragraphFontStyle(textStyle)};\n color: ${color};\n `;\n}\n\nconst ParagraphXlStyling = (textStyle: ParagraphTextStyle, color: string) => ParagraphBaseStyling('24px', '36px', textStyle, color);\nconst ParagraphXL: FunctionComponent<ParagraphProps> = ({ color, textStyle, children }) => {\n let fontWeight = paragraphFontWeight(textStyle);\n let fontStyle = paragraphFontStyle(textStyle);\n let textDecorationLine = paragraphTextDecorationLine(textStyle);\n return (\n <ParagraphBase color={color} lineHeight={36} fontSize={24} fontWeight={fontWeight} fontStyle={fontStyle} textDecorationLine={textDecorationLine} marginBetweenParagraphs=\"18px\">\n {children}\n </ParagraphBase>\n );\n};\n\nconst ParagraphLStyling = (textStyle: ParagraphTextStyle, color: string) => ParagraphBaseStyling('20px', '32px', textStyle, color);\nconst ParagraphL: FunctionComponent<ParagraphProps> = ({ color, textStyle, children }) => {\n let fontWeight = paragraphFontWeight(textStyle);\n let fontStyle = paragraphFontStyle(textStyle);\n let textDecorationLine = paragraphTextDecorationLine(textStyle);\n return (\n <ParagraphBase color={color} lineHeight={32} fontSize={20} fontWeight={fontWeight} fontStyle={fontStyle} textDecorationLine={textDecorationLine} marginBetweenParagraphs=\"16px\">\n {children}\n </ParagraphBase>\n );\n};\n\nconst ParagraphMStyling = (textStyle: ParagraphTextStyle, color: string) => ParagraphBaseStyling('18px', '28px', textStyle, color);\nconst ParagraphM: FunctionComponent<ParagraphProps> = ({ color, textStyle, children }) => {\n let fontWeight = paragraphFontWeight(textStyle);\n let fontStyle = paragraphFontStyle(textStyle);\n let textDecorationLine = paragraphTextDecorationLine(textStyle);\n return (\n <ParagraphBase color={color} lineHeight={28} fontSize={18} fontWeight={fontWeight} fontStyle={fontStyle} textDecorationLine={textDecorationLine} marginBetweenParagraphs=\"14px\">\n {children}\n </ParagraphBase>\n );\n};\n\nconst ParagraphSStyling = (textStyle: ParagraphTextStyle, color: string) => ParagraphBaseStyling('16px', '24px', textStyle, color);\nconst ParagraphS: FunctionComponent<ParagraphProps> = ({ color, textStyle, children }) => {\n let fontWeight = paragraphFontWeight(textStyle);\n let fontStyle = paragraphFontStyle(textStyle);\n let textDecorationLine = paragraphTextDecorationLine(textStyle);\n return (\n <ParagraphBase color={color} lineHeight={24} fontSize={16} fontWeight={fontWeight} fontStyle={fontStyle} textDecorationLine={textDecorationLine} marginBetweenParagraphs=\"12px\">\n {children}\n </ParagraphBase>\n );\n};\n\nconst ParagraphXSStyling = (textStyle: ParagraphTextStyle, color: string) => ParagraphBaseStyling('14px', '20px', textStyle, color);\nconst ParagraphXS: FunctionComponent<ParagraphProps> = ({ color, textStyle, children }) => {\n let fontWeight = paragraphFontWeight(textStyle);\n let fontStyle = paragraphFontStyle(textStyle);\n let textDecorationLine = paragraphTextDecorationLine(textStyle);\n return (\n <ParagraphBase color={color} lineHeight={20} fontSize={14} fontWeight={fontWeight} fontStyle={fontStyle} textDecorationLine={textDecorationLine} marginBetweenParagraphs=\"10px\">\n {children}\n </ParagraphBase>\n );\n};\n\nenum ComponentTextStyle {\n Regular = 1,\n Bold,\n Italic,\n UppercaseBold,\n}\n\ntype ComponentProps = {\n color?: string;\n className?: string;\n textStyle?: ComponentTextStyle;\n};\n\nconst componentFontWeight = (textStyle?: ComponentTextStyle) => {\n let fontWeight = 400;\n if (textStyle === ComponentTextStyle.Bold || textStyle === ComponentTextStyle.UppercaseBold) {\n fontWeight = 700;\n }\n return fontWeight;\n};\n\nconst componentFontStyle = (textStyle?: ComponentTextStyle) => {\n let fontStyle = textStyle && textStyle === ComponentTextStyle.Italic ? 'italic' : '';\n return fontStyle;\n};\n\nconst componentTextTransformation = (textStyle?: ComponentTextStyle): Property.TextTransform => {\n let fontStyle: Property.TextTransform = textStyle && textStyle === ComponentTextStyle.UppercaseBold ? 'uppercase' : 'none';\n return fontStyle;\n};\n\nconst ComponentStyling = (fontSize: string, lineHeight: string, textStyle: ComponentTextStyle, color: string | undefined | null) => {\n return css`\n font-family: ${TYPOGRAPHY.fontFamily};\n font-size: ${fontSize};\n font-weight: ${componentFontWeight(textStyle)};\n line-height: ${lineHeight};\n font-style: ${componentFontStyle(textStyle)};\n ${color === null ? '' : `color: ${(color || COLORS.black)};`}\n `;\n};\n\nconst ComponentXLStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('24px', '28px', textStyle, color);\nconst ComponentXL: FunctionComponent<ComponentProps> = ({ color, textStyle, children, className }) => {\n let fontWeight = componentFontWeight(textStyle);\n let fontStyle = componentFontStyle(textStyle);\n return (\n <TypographyBase className={className} color={color} lineHeight={28} fontSize={24} fontWeight={fontWeight} fontStyle={fontStyle}>\n {children}\n </TypographyBase>\n );\n};\n\nconst ComponentLStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('20px', '24px', textStyle, color);\nconst ComponentL: FunctionComponent<ComponentProps> = ({ color, textStyle, children, className }) => {\n let fontWeight = componentFontWeight(textStyle);\n let fontStyle = componentFontStyle(textStyle);\n return (\n <TypographyBase className={className} color={color} lineHeight={24} fontSize={20} fontWeight={fontWeight} fontStyle={fontStyle}>\n {children}\n </TypographyBase>\n );\n};\n\nconst ComponentMStyling = (textStyle: ComponentTextStyle, color: string | undefined | null) => ComponentStyling('18px', '24px', textStyle, color);\nconst ComponentM: FunctionComponent<ComponentProps> = ({ color, textStyle, children, className }) => {\n let fontWeight = componentFontWeight(textStyle);\n let fontStyle = componentFontStyle(textStyle);\n return (\n <TypographyBase className={className} color={color} lineHeight={24} fontSize={18} fontWeight={fontWeight} fontStyle={fontStyle}>\n {children}\n </TypographyBase>\n );\n};\n\nconst ComponentSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('16px', '20px', textStyle, color);\nconst ComponentS: FunctionComponent<ComponentProps> = ({ color, textStyle, children, className }) => {\n let fontWeight = componentFontWeight(textStyle);\n let fontStyle = componentFontStyle(textStyle);\n return (\n <TypographyBase className={className} color={color} lineHeight={20} fontSize={16} fontWeight={fontWeight} fontStyle={fontStyle}>\n {children}\n </TypographyBase>\n );\n};\n\nconst ComponentXSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('14px', '16px', textStyle, color);\nconst ComponentXS: FunctionComponent<ComponentProps> = ({ color, textStyle, children, className }) => {\n let fontWeight = componentFontWeight(textStyle);\n let fontStyle = componentFontStyle(textStyle);\n let textTransform = componentTextTransformation(textStyle);\n return (\n <TypographyBase className={className} color={color} lineHeight={16} fontSize={14} fontWeight={fontWeight} fontStyle={fontStyle} textTransform={textTransform}>\n {children}\n </TypographyBase>\n );\n};\n\nconst ComponentXXSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('12px', '16px', textStyle, color);\nconst ComponentXXS: FunctionComponent<ComponentProps> = ({ color, textStyle, children, className }) => {\n let fontWeight = componentFontWeight(textStyle);\n let fontStyle = componentFontStyle(textStyle);\n let textTransform = componentTextTransformation(textStyle);\n return (\n <TypographyBase className={className} color={color} lineHeight={16} fontSize={12} fontWeight={fontWeight} fontStyle={fontStyle} textTransform={textTransform}>\n {children}\n </TypographyBase>\n );\n};\n\nconst ComponentResponsive: FunctionComponent<ComponentProps & { size?: Size; width: number }> = ({\n color,\n textStyle,\n children,\n size,\n width,\n}) => {\n let fontsize = size;\n if (!size) {\n if (width < 768) {\n fontsize = Size.Small;\n } else if (width < 992) {\n fontsize = Size.Medium;\n } else {\n fontsize = Size.Large;\n }\n }\n switch (fontsize) {\n case Size.XXSmall:\n return <ComponentXXS color={color} textStyle={textStyle} children={children} />;\n case Size.XSmall:\n return <ComponentXS color={color} textStyle={textStyle} children={children} />;\n case Size.Small:\n return <ComponentS color={color} textStyle={textStyle} children={children} />;\n case Size.Medium:\n return <ComponentM color={color} textStyle={textStyle} children={children} />;\n case Size.Large:\n default:\n return <ComponentL color={color} textStyle={textStyle} children={children} />;\n }\n};\n\nexport { TYPOGRAPHY };\nexport { HeadlineXL, HeadlineL, HeadlineM, HeadlineS, HeadlineXS, HeadlineXXS };\nexport { ParagraphTextStyle, ParagraphXL, ParagraphL, ParagraphM, ParagraphS, ParagraphXS };\nexport { ComponentTextStyle, ComponentXL, ComponentL, ComponentM, ComponentS, ComponentXS, ComponentXXS, ComponentResponsive };\nexport { ComponentXLStyling, ComponentLStyling, ComponentMStyling, ComponentSStyling, ComponentXSStyling, ComponentXXSStyling };\nexport { ParagraphXlStyling, ParagraphLStyling, ParagraphMStyling, ParagraphSStyling, ParagraphXSStyling };\nexport { HeadlineXLStyling, HeadlineLStyling, HeadlineMStyling, HeadlineSStyling, HeadlineXSStyling, HeadlineXXSStyling };\n"],"file":"typography.js"}
|