@laerdal/life-react-components 1.2.2-dev.23 → 1.2.2-dev.25.full

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 (34) hide show
  1. package/dist/esm/Accordion/AccordionItem.js +28 -3
  2. package/dist/esm/Accordion/AccordionItem.js.map +1 -1
  3. package/dist/esm/Accordion/AccordionMenu.js +32 -6
  4. package/dist/esm/Accordion/AccordionMenu.js.map +1 -1
  5. package/dist/esm/Accordion/__tests__/AccordionMenu.test.js +1 -1
  6. package/dist/esm/Accordion/__tests__/AccordionMenu.test.js.map +1 -1
  7. package/dist/esm/Accordion/styles.js +21 -5
  8. package/dist/esm/Accordion/styles.js.map +1 -1
  9. package/dist/esm/styles/typography.js +25 -6
  10. package/dist/esm/styles/typography.js.map +1 -1
  11. package/dist/js/Accordion/AccordionItem.js +47 -3
  12. package/dist/js/Accordion/AccordionItem.js.map +1 -1
  13. package/dist/js/Accordion/AccordionMenu.d.ts +4 -2
  14. package/dist/js/Accordion/AccordionMenu.js +62 -6
  15. package/dist/js/Accordion/AccordionMenu.js.map +1 -1
  16. package/dist/js/Accordion/__tests__/AccordionMenu.test.js +1 -1
  17. package/dist/js/Accordion/__tests__/AccordionMenu.test.js.map +1 -1
  18. package/dist/js/Accordion/styles.d.ts +2 -0
  19. package/dist/js/Accordion/styles.js +7 -5
  20. package/dist/js/Accordion/styles.js.map +1 -1
  21. package/dist/js/styles/typography.d.ts +1 -0
  22. package/dist/js/styles/typography.js +25 -6
  23. package/dist/js/styles/typography.js.map +1 -1
  24. package/dist/umd/Accordion/AccordionItem.js +32 -3
  25. package/dist/umd/Accordion/AccordionItem.js.map +1 -1
  26. package/dist/umd/Accordion/AccordionMenu.js +32 -6
  27. package/dist/umd/Accordion/AccordionMenu.js.map +1 -1
  28. package/dist/umd/Accordion/__tests__/AccordionMenu.test.js +1 -1
  29. package/dist/umd/Accordion/__tests__/AccordionMenu.test.js.map +1 -1
  30. package/dist/umd/Accordion/styles.js +21 -5
  31. package/dist/umd/Accordion/styles.js.map +1 -1
  32. package/dist/umd/styles/typography.js +25 -6
  33. package/dist/umd/styles/typography.js.map +1 -1
  34. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/Accordion/AccordionItem.tsx"],"names":["onSelect","isActive","isLast","AccordionItem","props","disabled","icon","size","COLORS","undefined"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,QAAMG,aAA+D,GAAIC,KAAD,IAAoC;AAC1G,UAAM;AAAA,MAAA,EAAA;AAAA,MAAA,QAAA;AAAA,MAAA,QAAA;AAAA,MAAA,KAAA;AAAA,MAAA,IAAA;AAAA,MAAA,QAAA;AAAiDF,MAAAA;AAAjD,QAAN,KAAA;AACA,WAAA,aACE,gBAAA,aAAA,CAAA,8BAAA,EAAA;AAAwB,MAAA,EAAE,EAA1B,EAAA;AAAgC,MAAA,gBAAgB,EAAE,CAAA,QAAA,IAAa,CAA/D,MAAA;AAAwE,MAAA,UAAU,EAAEG,QAAQ,IAAI;AAAhG,KAAA,EAAA,aACE,gBAAA,aAAA,CAAA,2BAAA,EAAA;AACE,MAAA,QAAQ,EAAE,CAAA,QAAA,GAAA,CAAA,GAAgB,CAD5B,CAAA;AAEE,MAAA,OAAO,EAAE,MAAM;AACb,YAAI,CAAJ,QAAA,EAAe;AACbL,UAAAA,QAAQ,CAARA,EAAQ,CAARA;AACD;AALL,OAAA;AAOE,MAAA,UAAU,EAAEK,QAAQ,IAAI;AAP1B,KAAA,EAQGC,IAAI,IAAA,aAAI,gBAAA,YAAA,CAAA,IAAA,EAA+C;AAAEC,MAAAA,IAAI,EAAE;AAAR,KAA/C,CARX,EAAA,aASE,gBAAA,aAAA,CAAA,YAAA,EAAA;AAAY,MAAA,KAAK,EAAEF,QAAQ,GAAGG,SAAH,WAAA,GAAwBC;AAAnD,KAAA,EATF,KASE,CATF,EAUGR,QAAQ,GAAA,aAAG,gBAAA,aAAA,CAAA,mBAAA,SAAA,EAAA;AAAuB,MAAA,IAAI,EAAC;AAA5B,KAAA,CAAH,GAAA,aAA2C,gBAAA,aAAA,CAAA,mBAAA,WAAA,EAAA;AAAyB,MAAA,IAAI,EAAC;AAA9B,KAAA,CAVtD,CADF,EAaGA,QAAQ,IAAA,aACP,gBAAA,aAAA,CAAA,yBAAA,EAAA,IAAA,EAAA,aACE,gBAAA,aAAA,CAAA,YAAA,EAAA,IAAA,EAAaG,KAAK,CAhB1B,QAgBQ,CADF,CAdJ,CADF;AAFF,GAAA;;;AALEJ,IAAAA,Q;AACAC,IAAAA,Q;AACAC,IAAAA,M;;oBA4BF,a","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 return (\n <AccordionItemContainer id={id} displaySeparator={!isActive && !isLast} isDisabled={disabled ?? false}>\n <ItemHeaderContainer\n tabIndex={!disabled ? 0 : -1}\n onClick={() => {\n if (!disabled) {\n onSelect(id);\n }\n }}\n isDisabled={disabled ?? false}>\n {icon && React.cloneElement(icon as React.ReactElement, { size: '24px' })}\n <ComponentM color={disabled ? COLORS.neutral_300 : undefined}>{title}</ComponentM>\n {isActive ? <SystemIcons.ChevronUp size=\"24px\" /> : <SystemIcons.ChevronDown size=\"24px\" />}\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"}
1
+ {"version":3,"sources":["../../../src/Accordion/AccordionItem.tsx"],"names":["onSelect","isActive","isLast","AccordionItem","props","supressFocusRef","React","setTabbedHere","disabled","e","icon","size","COLORS","undefined"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAYA,QAAMG,aAA+D,GAAIC,KAAD,IAAoC;AAC1G,UAAM;AAAA,MAAA,EAAA;AAAA,MAAA,QAAA;AAAA,MAAA,QAAA;AAAA,MAAA,KAAA;AAAA,MAAA,IAAA;AAAA,MAAA,QAAA;AAAiDF,MAAAA;AAAjD,QAAN,KAAA;;AAEA,UAAMG,eAAe,GAAGC,gBAAAA,MAAAA,CAAxB,IAAwBA,CAAxB;;AACA,UAAM,CAAA,UAAA,EAAA,aAAA,IAA8BA,gBAAAA,QAAAA,CAApC,KAAoCA,CAApC;;AAEAA,oBAAAA,SAAAA,CAAgB,MAAM;AACpB,OAAC,CAAD,QAAA,IAAcC,aAAa,CAA3B,KAA2B,CAA3B;AADFD,KAAAA,EAEG,CAFHA,QAEG,CAFHA;;AAIA,WAAA,aACE,gBAAA,aAAA,CAAA,8BAAA,EAAA;AAAwB,MAAA,EAAE,EAA1B,EAAA;AAAgC,MAAA,gBAAgB,EAAE,CAAA,QAAA,IAAa,CAA/D,MAAA;AAAwE,MAAA,UAAU,EAAEE,QAAQ,IAAI;AAAhG,KAAA,EAAA,aACE,gBAAA,aAAA,CAAA,2BAAA,EAAA;AACE,MAAA,QAAQ,EAAE,CAAA,QAAA,GAAA,CAAA,GAAgB,CAD5B,CAAA;AAEE,MAAA,OAAO,EAAE,MAAM;AACb,YAAI,CAAJ,QAAA,EAAe;AACbR,UAAAA,QAAQ,CAARA,EAAQ,CAARA;AACD;AALL,OAAA;AAOE,MAAA,SAAS,EAAGS,CAAD,IAAY;AACrB,YAAGA,CAAC,CAADA,GAAAA,IAAH,OAAA,EACET,QAAQ,CAARA,EAAQ,CAARA;AATN,OAAA;AAWE,MAAA,MAAM,EAAE,MAAM;AACZO,QAAAA,aAAa,CAAb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AAA,EAAA,IAAA,EAAaG,KAAK,CAnC1B,QAmCQ,CADF,CAjCJ,CADF;AAVF,GAAA;;;AALEJ,IAAAA,Q;AACAC,IAAAA,Q;AACAC,IAAAA,M;;oBAuDF,a","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} isDisabled={disabled ?? false}>\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 : undefined}>{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"}
@@ -81,18 +81,42 @@
81
81
 
82
82
  const AccordionMenu = ({
83
83
  items,
84
- selectedItemId,
85
- onSelect
84
+ selectedItems,
85
+ setSelectedItems,
86
+ onSelect,
87
+ multipleActive
86
88
  }) => {
89
+ const [builtinSelectedItems, builtinSetSelectedItems] = React.useState([]);
90
+
91
+ const getCollection = () => {
92
+ return selectedItems ? selectedItems : builtinSelectedItems;
93
+ };
94
+
95
+ const getUpdateFunction = () => {
96
+ return setSelectedItems ? setSelectedItems : builtinSetSelectedItems;
97
+ };
98
+
99
+ const onSelected = id => {
100
+ const collection = getCollection();
101
+ const updateFunc = getUpdateFunction();
102
+ const isActive = !!collection.find(x => x == id);
103
+
104
+ if (multipleActive) {
105
+ if (isActive) updateFunc(collection.filter(x => x != id));else updateFunc([...collection, id]);
106
+ } else updateFunc(isActive ? [] : [id]);
107
+
108
+ onSelect && onSelect(id);
109
+ };
110
+
87
111
  return /*#__PURE__*/React.createElement(_styles.AccordionMenuWrapper, null, items.map(item => /*#__PURE__*/React.createElement(_AccordionItem2.default, {
88
112
  key: item.id,
89
113
  disabled: item.disabled,
90
114
  id: item.id,
91
115
  title: item.title,
92
116
  icon: item.icon,
93
- isActive: item.id === selectedItemId,
117
+ isActive: !!getCollection().find(x => x == item.id),
94
118
  isLast: items.indexOf(item) === items.length - 1,
95
- onSelect: onSelect
119
+ onSelect: onSelected
96
120
  }, item.children)));
97
121
  };
98
122
 
@@ -104,8 +128,10 @@
104
128
  icon: _propTypes2.default.node,
105
129
  children: _propTypes2.default.node.isRequired
106
130
  })).isRequired,
107
- selectedItemId: _propTypes2.default.string,
108
- onSelect: _propTypes2.default.func.isRequired
131
+ selectedItems: _propTypes2.default.arrayOf(_propTypes2.default.string),
132
+ setSelectedItems: _propTypes2.default.func,
133
+ onSelect: _propTypes2.default.func,
134
+ multipleActive: _propTypes2.default.bool
109
135
  };
110
136
  exports.default = AccordionMenu;
111
137
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/Accordion/AccordionMenu.tsx"],"names":["items","selectedItemId","onSelect","id","disabled","title","icon","children","AccordionMenu","item"],"mappings":";;;;;;;;;;;;;;;;;;;;;MAAA,K;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkBA,QAAMQ,aAAsD,GAAG,CAAC;AAAA,IAAA,KAAA;AAAA,IAAA,cAAA;AAAyBN,IAAAA;AAAzB,GAAD,KAAyD;AACtH,WAAA,aACE,KAAA,CAAA,aAAA,CAAA,4BAAA,EAAA,IAAA,EACG,KAAK,CAAL,GAAA,CAAWO,IAAD,IAAA,aACT,KAAA,CAAA,aAAA,CAAA,uBAAA,EAAA;AACE,MAAA,GAAG,EAAEA,IAAI,CADX,EAAA;AAEE,MAAA,QAAQ,EAAEA,IAAI,CAFhB,QAAA;AAGE,MAAA,EAAE,EAAEA,IAAI,CAHV,EAAA;AAIE,MAAA,KAAK,EAAEA,IAAI,CAJb,KAAA;AAKE,MAAA,IAAI,EAAEA,IAAI,CALZ,IAAA;AAME,MAAA,QAAQ,EAAEA,IAAI,CAAJA,EAAAA,KANZ,cAAA;AAOE,MAAA,MAAM,EAAET,KAAK,CAALA,OAAAA,CAAAA,IAAAA,MAAwBA,KAAK,CAALA,MAAAA,GAPlC,CAAA;AAQE,MAAA,QAAQ,EAAEE;AARZ,KAAA,EASGO,IAAI,CAZb,QAGM,CADD,CADH,CADF;AADF,GAAA;;;AAbET,IAAAA,K;AAMAG,MAAAA,E;AACAC,MAAAA,Q;AACAC,MAAAA,K;AACAC,MAAAA,I;AACAC,MAAAA,Q;;AATAN,IAAAA,c;AACAC,IAAAA,Q;;oBA+BF,a","sourcesContent":["import * as React from 'react';\nimport AccordionItem from './AccordionItem';\nimport { AccordionMenuWrapper } from './styles';\n\nexport interface AccordionProps {\n items: AccordionItemProps[];\n selectedItemId?: string;\n onSelect: (id: string) => void;\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, selectedItemId, onSelect }: AccordionProps) => {\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={item.id === selectedItemId}\n isLast={items.indexOf(item) === items.length - 1}\n onSelect={onSelect}>\n {item.children}\n </AccordionItem>\n ))}\n </AccordionMenuWrapper>\n );\n};\n\nexport default AccordionMenu;\n"],"file":"AccordionMenu.js"}
1
+ {"version":3,"sources":["../../../src/Accordion/AccordionMenu.tsx"],"names":["items","selectedItems","setSelectedItems","onSelect","multipleActive","id","disabled","title","icon","children","AccordionMenu","React","getCollection","getUpdateFunction","onSelected","collection","updateFunc","isActive","x","item"],"mappings":";;;;;;;;;;;;;;;;;;;;;MAAA,K;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoBA,QAAMU,aAAsD,GAAG,CAAC;AAAA,IAAA,KAAA;AAAA,IAAA,aAAA;AAAA,IAAA,gBAAA;AAAA,IAAA,QAAA;AAAoDN,IAAAA;AAApD,GAAD,KAA0F;AAEvJ,UAAM,CAAA,oBAAA,EAAA,uBAAA,IAAkDO,KAAK,CAALA,QAAAA,CAAxD,EAAwDA,CAAxD;;AAEA,UAAMC,aAAa,GAAG,MAAM;AAC1B,aAAOX,aAAa,GAAA,aAAA,GAApB,oBAAA;AADF,KAAA;;AAIA,UAAMY,iBAAiB,GAAG,MAAM;AAC9B,aAAOX,gBAAgB,GAAA,gBAAA,GAAvB,uBAAA;AADF,KAAA;;AAIA,UAA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H,CADF;AA9BF,GAAA;;;AAfEnB,IAAAA,K;AAQAK,MAAAA,E;AACAC,MAAAA,Q;AACAC,MAAAA,K;AACAC,MAAAA,I;AACAC,MAAAA,Q;;AAXAR,IAAAA,a;AACAC,IAAAA,gB;AACAC,IAAAA,Q;AACAC,IAAAA,c;;oBA4DF,a","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"}
@@ -62,7 +62,7 @@
62
62
  } = (0, _react3.render)( /*#__PURE__*/_react2.default.createElement(_AccordionMenu2.default, {
63
63
  items: accordionItems,
64
64
  onSelect: () => {},
65
- selectedItemId: 'test1_id'
65
+ selectedItems: ['test1_id']
66
66
  }));
67
67
  const headerItem = container.querySelector('#test1_id'); //check item expanded
68
68
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../../src/Accordion/__tests__/AccordionMenu.test.tsx"],"names":["accordionItems","id","title","children","describe","it","queryByText","render","expect","container","headerItem","COLORS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAMA,QAAMA,cAAc,GAAG,CACrB;AACEC,IAAAA,EAAE,EADJ,UAAA;AAEEC,IAAAA,KAAK,EAFP,wBAAA;AAGEC,IAAAA,QAAQ,EAAA,aAAE,gBAAA,aAAA,CAAA,KAAA,EAAA,IAAA,EAAA,eAAA;AAHZ,GADqB,EAMrB;AACEF,IAAAA,EAAE,EADJ,UAAA;AAEEC,IAAAA,KAAK,EAFP,wBAAA;AAGEC,IAAAA,QAAQ,EAAA,aAAE,gBAAA,aAAA,CAAA,KAAA,EAAA,IAAA,EAAA,eAAA;AAHZ,GANqB,CAAvB;AAaAC,EAAAA,QAAQ,CAAA,mBAAA,EAAsB,MAAM;AAClCC,IAAAA,EAAE,CAAA,qCAAA,EAAwC,YAAY;AACpD,YAAM;AAAEC,QAAAA;AAAF,UAAkBC,qBAAM,aAAC,gBAAA,aAAA,CAAA,uBAAA,EAAA;AAAe,QAAA,KAAK,EAApB,cAAA;AAAsC,QAAA,QAAQ,EAAE,MAAM,CAAE;AAAxD,OAAA,CAAPA,CAAxB;AACAC,MAAAA,MAAM,CAACF,WAAW,CAAlBE,wBAAkB,CAAZ,CAANA,CAAAA,WAAAA;AACAA,MAAAA,MAAM,CAACF,WAAW,CAAlBE,wBAAkB,CAAZ,CAANA,CAAAA,WAAAA;AACAA,MAAAA,MAAM,CAACF,WAAW,CAAlBE,eAAkB,CAAZ,CAANA,CAAAA,QAAAA;AAJFH,KAAE,CAAFA;AAOAA,IAAAA,EAAE,CAAA,0CAAA,EAA6C,YAAY;AACzD,YAAM;AAAEI,QAAAA;AAAF,UAAgBF,qBAAM,aAAC,gBAAA,aAAA,CAAA,uBAAA,EAAA;AAAe,QAAA,KAAK,EAApB,cAAA;AAAsC,QAAA,QAAQ,EAAE,MAAM,CAAE;AAAxD,OAAA,CAAPA,CAAtB;AACA,YAAMG,UAAU,GAAGD,SAAS,CAATA,aAAAA,CAAnB,WAAmBA,CAAnB;AACAD,MAAAA,MAAM,CAANA,UAAM,CAANA,CAAAA,WAAAA;AACAA,MAAAA,MAAM,CAACE,UAAU,EAAVA,QAAAA,CAAPF,CAAOE,CAAD,CAANF,CAAAA,eAAAA,CAAAA,YAAAA,EAA8DG,eAA9DH,UAAAA;AACAA,MAAAA,MAAM,CAACE,UAAU,EAAjBF,WAAM,CAANA,CAAAA,SAAAA,CAAAA,wBAAAA;AALFH,KAAE,CAAFA;AAQAA,IAAAA,EAAE,CAAA,0BAAA,EAA6B,YAAY;AACzC,YAAM;AAAEI,QAAAA;AAAF,UAAgBF,qBAAM,aAAC,gBAAA,aAAA,CAAA,uBAAA,EAAA;AAAe,QAAA,KAAK,EAApB,cAAA;AAAsC,QAAA,QAAQ,EAAE,MAAM,CAAtD,CAAA;AAA0D,QAAA,cAAc,EAAE;AAA1E,OAAA,CAAPA,CAAtB;AACA,YAAMG,UAAU,GAAGD,SAAS,CAATA,aAAAA,CAFsB,WAEtBA,CAAnB,CAFyC,CAGzC;;AACAD,MAAAA,MAAM,CAACE,UAAU,EAAVA,QAAAA,CAAPF,CAAOE,CAAD,CAANF,CAAAA,WAAAA;AACAA,MAAAA,MAAM,CAACE,UAAU,EAAVA,QAAAA,CAAAA,CAAAA,GAAPF,WAAM,CAANA,CAAAA,SAAAA,CAAAA,eAAAA;AALFH,KAAE,CAAFA;AAhBFD,GAAQ,CAARA","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={() => {}} selectedItemId={'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"}
1
+ {"version":3,"sources":["../../../../src/Accordion/__tests__/AccordionMenu.test.tsx"],"names":["accordionItems","id","title","children","describe","it","queryByText","render","expect","container","headerItem","COLORS"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAMA,QAAMA,cAAc,GAAG,CACrB;AACEC,IAAAA,EAAE,EADJ,UAAA;AAEEC,IAAAA,KAAK,EAFP,wBAAA;AAGEC,IAAAA,QAAQ,EAAA,aAAE,gBAAA,aAAA,CAAA,KAAA,EAAA,IAAA,EAAA,eAAA;AAHZ,GADqB,EAMrB;AACEF,IAAAA,EAAE,EADJ,UAAA;AAEEC,IAAAA,KAAK,EAFP,wBAAA;AAGEC,IAAAA,QAAQ,EAAA,aAAE,gBAAA,aAAA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AAF,UAAgBF,qBAAM,aAAC,gBAAA,aAAA,CAAA,uBAAA,EAAA;AAAe,QAAA,KAAK,EAApB,cAAA;AAAsC,QAAA,QAAQ,EAAE,MAAM,CAAtD,CAAA;AAA0D,QAAA,aAAa,EAAE,CAAA,UAAA;AAAzE,OAAA,CAAPA,CAAtB;AACA,YAAMG,UAAU,GAAGD,SAAS,CAATA,aAAAA,CAFsB,WAEtBA,CAAnB,CAFyC,CAGzC;;AACAD,MAAAA,MAAM,CAACE,UAAU,EAAVA,QAAAA,CAAPF,CAAOE,CAAD,CAANF,CAAAA,WAAAA;AACAA,MAAAA,MAAM,CAACE,UAAU,EAAVA,QAAAA,CAAAA,CAAAA,GAAPF,WAAM,CAANA,CAAAA,SAAAA,CAAAA,eAAAA;AALFH,KAAE,CAAFA;AAhBFD,GAAQ,CAARA","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"}
@@ -59,16 +59,32 @@
59
59
  svg:last-child {
60
60
  margin-left: auto;
61
61
  }
62
- :focus {
63
- outline: none;
62
+ outline: none;
63
+ ${props => props.tabbedHere ? _styledComponents.css`
64
64
  z-index: ${_zIndexes.Z_INDEXES.focus};
65
- box-shadow: 0px 4px 12px ${_styles.COLORS.primary_500}, 0px 0px 8px ${_styles.COLORS.primary_500};
66
- }
65
+ box-shadow: 0px 4px 12px ${_styles.COLORS.primary_500}, 0px 0px 8px ${_styles.COLORS.primary_500};` : ''}
67
66
 
68
67
  ${props => props.isDisabled ? disabledState : ''}
69
68
  :hover {
70
69
  background: ${_styles.COLORS.primary_20};
71
70
  }
71
+
72
+ :hover .headerLabel {
73
+ color: ${_styles.COLORS.primary_700};
74
+ }
75
+
76
+ :active .headerLabel {
77
+ color: ${_styles.COLORS.primary_800};
78
+ }
79
+
80
+ :hover svg {
81
+ color: ${_styles.COLORS.primary_700};
82
+ }
83
+
84
+ :active svg {
85
+ color: ${_styles.COLORS.primary_800};
86
+ }
87
+
72
88
  :active {
73
89
  background: ${_styles.COLORS.primary_100};
74
90
  }
@@ -77,7 +93,7 @@
77
93
  margin-left: auto;
78
94
  `;
79
95
  const ItemBodyContainer = exports.ItemBodyContainer = _styledComponents2.default.div`
80
- padding: 0px 24px;
96
+ padding: 0px 16px;
81
97
  margin: 12px 0;
82
98
  background: ${_styles.COLORS.white};
83
99
  `;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/Accordion/styles.ts"],"names":["AccordionMenuWrapper","styled","div","AccordionItemContainer","props","COLORS","neutral_100","disabledState","css","white","neutral_300","ItemHeaderContainer","neutral_20","Z_INDEXES","focus","primary_500","primary_20","primary_100","HeaderIconContainer","ItemBodyContainer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,QAAMA,oBAAoB,WAApBA,oBAAoB,GAAGC,2BAAOC,GAAI;AAC/C;AACA;AACA;AACA;AAJO,CAAA;AAOA,QAAMC,sBAAsB,WAAtBA,sBAAsB,GAAGF,2BAAOC,GAAwD;AACrG;AACA;AACA;AACA;AACA,mBAAoBE,KAAD,IAAYA,KAAK,CAALA,gBAAAA,GAA0B,aAAYC,eAAOC,WAA7CF,EAAAA,GAA6D,EAAI;AAChG,YAAaA,KAAD,IAAYA,KAAK,CAALA,UAAAA,GAAAA,aAAAA,GAAmC,SAAW;AAN/D,CAAA;AASP,QAAMG,aAAa,GAAGC,qBAAI;AAC1B,gBAAgBH,eAAOI,KAAM;AAC7B,WAAWJ,eAAOK,WAAY;AAC9B;AACA;AACA,aAAaL,eAAOK,WAAY;AAChC;AANA,CAAA;AASO,QAAMC,mBAAmB,WAAnBA,mBAAmB,GAAGV,2BAAOC,GAA6B;AACvE;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgBG,eAAOO,UAAW;AAClC;AACA;AACA;AACA;AACA;AACA,eAAeC,oBAAUC,KAAM;AAC/B,+BAA+BT,eAAOU,WAAY,iBAAgBV,eAAOU,WAAY;AACrF;AACA;AACA,IAAKX,KAAD,IAAYA,KAAK,CAALA,UAAAA,GAAAA,aAAAA,GAAmC,EAAI;AACvD;AACA,kBAAkBC,eAAOW,UAAW;AACpC;AACA;AACA,kBAAkBX,eAAOY,WAAY;AACrC;AAvBO,CAAA;AA0BA,QAAMC,mBAAmB,WAAnBA,mBAAmB,GAAGjB,2BAAOC,GAAI;AAC9C;AADO,CAAA;AAIA,QAAMiB,iBAAiB,WAAjBA,iBAAiB,GAAGlB,2BAAOC,GAAI;AAC5C;AACA;AACA,gBAAgBG,eAAOI,KAAM;AAHtB,CAAA","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; isDisabled: 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 cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};\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 }>`\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 svg:last-child {\n margin-left: auto;\n }\n :focus {\n outline: none;\n z-index: ${Z_INDEXES.focus};\n box-shadow: 0px 4px 12px ${COLORS.primary_500}, 0px 0px 8px ${COLORS.primary_500};\n }\n\n ${(props) => (props.isDisabled ? disabledState : '')}\n :hover {\n background: ${COLORS.primary_20};\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 24px;\n margin: 12px 0;\n background: ${COLORS.white};\n`;\n"],"file":"styles.js"}
1
+ {"version":3,"sources":["../../../src/Accordion/styles.ts"],"names":["AccordionMenuWrapper","styled","div","AccordionItemContainer","props","COLORS","neutral_100","disabledState","css","white","neutral_300","ItemHeaderContainer","neutral_20","Z_INDEXES","focus","primary_500","primary_20","primary_700","primary_800","primary_100","HeaderIconContainer","ItemBodyContainer"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIO,QAAMA,oBAAoB,WAApBA,oBAAoB,GAAGC,2BAAOC,GAAI;AAC/C;AACA;AACA;AACA;AAJO,CAAA;AAOA,QAAMC,sBAAsB,WAAtBA,sBAAsB,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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; isDisabled: 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 cursor: ${(props) => (props.isDisabled ? 'not-allowed' : 'pointer')};\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 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"}
@@ -390,11 +390,13 @@
390
390
  const ComponentXL = ({
391
391
  color,
392
392
  textStyle,
393
- children
393
+ children,
394
+ className
394
395
  }) => {
395
396
  let fontWeight = componentFontWeight(textStyle);
396
397
  let fontStyle = componentFontStyle(textStyle);
397
398
  return /*#__PURE__*/_react2.default.createElement(TypographyBase, {
399
+ className: className,
398
400
  color: color,
399
401
  lineHeight: 28,
400
402
  fontSize: 24,
@@ -405,6 +407,7 @@
405
407
 
406
408
  ComponentXL.propTypes = {
407
409
  color: _propTypes2.default.string,
410
+ className: _propTypes2.default.string,
408
411
  textStyle: _propTypes2.default.oneOf([1, 2, 3, 4])
409
412
  };
410
413
 
@@ -413,11 +416,13 @@
413
416
  const ComponentL = ({
414
417
  color,
415
418
  textStyle,
416
- children
419
+ children,
420
+ className
417
421
  }) => {
418
422
  let fontWeight = componentFontWeight(textStyle);
419
423
  let fontStyle = componentFontStyle(textStyle);
420
424
  return /*#__PURE__*/_react2.default.createElement(TypographyBase, {
425
+ className: className,
421
426
  color: color,
422
427
  lineHeight: 24,
423
428
  fontSize: 20,
@@ -428,6 +433,7 @@
428
433
 
429
434
  ComponentL.propTypes = {
430
435
  color: _propTypes2.default.string,
436
+ className: _propTypes2.default.string,
431
437
  textStyle: _propTypes2.default.oneOf([1, 2, 3, 4])
432
438
  };
433
439
 
@@ -436,11 +442,13 @@
436
442
  const ComponentM = ({
437
443
  color,
438
444
  textStyle,
439
- children
445
+ children,
446
+ className
440
447
  }) => {
441
448
  let fontWeight = componentFontWeight(textStyle);
442
449
  let fontStyle = componentFontStyle(textStyle);
443
450
  return /*#__PURE__*/_react2.default.createElement(TypographyBase, {
451
+ className: className,
444
452
  color: color,
445
453
  lineHeight: 24,
446
454
  fontSize: 18,
@@ -451,6 +459,7 @@
451
459
 
452
460
  ComponentM.propTypes = {
453
461
  color: _propTypes2.default.string,
462
+ className: _propTypes2.default.string,
454
463
  textStyle: _propTypes2.default.oneOf([1, 2, 3, 4])
455
464
  };
456
465
 
@@ -459,11 +468,13 @@
459
468
  const ComponentS = ({
460
469
  color,
461
470
  textStyle,
462
- children
471
+ children,
472
+ className
463
473
  }) => {
464
474
  let fontWeight = componentFontWeight(textStyle);
465
475
  let fontStyle = componentFontStyle(textStyle);
466
476
  return /*#__PURE__*/_react2.default.createElement(TypographyBase, {
477
+ className: className,
467
478
  color: color,
468
479
  lineHeight: 20,
469
480
  fontSize: 16,
@@ -474,6 +485,7 @@
474
485
 
475
486
  ComponentS.propTypes = {
476
487
  color: _propTypes2.default.string,
488
+ className: _propTypes2.default.string,
477
489
  textStyle: _propTypes2.default.oneOf([1, 2, 3, 4])
478
490
  };
479
491
 
@@ -482,12 +494,14 @@
482
494
  const ComponentXS = ({
483
495
  color,
484
496
  textStyle,
485
- children
497
+ children,
498
+ className
486
499
  }) => {
487
500
  let fontWeight = componentFontWeight(textStyle);
488
501
  let fontStyle = componentFontStyle(textStyle);
489
502
  let textTransform = componentTextTransformation(textStyle);
490
503
  return /*#__PURE__*/_react2.default.createElement(TypographyBase, {
504
+ className: className,
491
505
  color: color,
492
506
  lineHeight: 16,
493
507
  fontSize: 14,
@@ -499,6 +513,7 @@
499
513
 
500
514
  ComponentXS.propTypes = {
501
515
  color: _propTypes2.default.string,
516
+ className: _propTypes2.default.string,
502
517
  textStyle: _propTypes2.default.oneOf([1, 2, 3, 4])
503
518
  };
504
519
 
@@ -507,12 +522,14 @@
507
522
  const ComponentXXS = ({
508
523
  color,
509
524
  textStyle,
510
- children
525
+ children,
526
+ className
511
527
  }) => {
512
528
  let fontWeight = componentFontWeight(textStyle);
513
529
  let fontStyle = componentFontStyle(textStyle);
514
530
  let textTransform = componentTextTransformation(textStyle);
515
531
  return /*#__PURE__*/_react2.default.createElement(TypographyBase, {
532
+ className: className,
516
533
  color: color,
517
534
  lineHeight: 16,
518
535
  fontSize: 12,
@@ -524,6 +541,7 @@
524
541
 
525
542
  ComponentXXS.propTypes = {
526
543
  color: _propTypes2.default.string,
544
+ className: _propTypes2.default.string,
527
545
  textStyle: _propTypes2.default.oneOf([1, 2, 3, 4])
528
546
  };
529
547
 
@@ -587,6 +605,7 @@
587
605
 
588
606
  ComponentResponsive.propTypes = {
589
607
  color: _propTypes2.default.string,
608
+ className: _propTypes2.default.string,
590
609
  textStyle: _propTypes2.default.oneOf([1, 2, 3, 4])
591
610
  };
592
611
  exports.TYPOGRAPHY = TYPOGRAPHY;
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/styles/typography.tsx"],"names":["TYPOGRAPHY","fontFamily","TypographyBase","textDecorationLine","fontSize","fontWeight","lineHeight","textTransform","fontStyle","color","COLORS","black","HeadlineBaseStyling","css","HeadlineBase","HeadlineXLStyling","HeadlineXL","HeadlineLStyling","HeadlineL","HeadlineMStyling","HeadlineM","HeadlineSStyling","HeadlineS","HeadlineXSStyling","HeadlineXS","HeadlineXXSStyling","HeadlineXXS","ParagraphStyling","ParagraphBase","styled","props","ParagraphTextStyle","textStyle","paragraphFontWeight","paragraphFontStyle","paragraphTextDecorationLine","textDecoration","ParagraphBaseStyling","ParagraphXlStyling","ParagraphXL","children","ParagraphLStyling","ParagraphL","ParagraphMStyling","ParagraphM","ParagraphSStyling","ParagraphS","ParagraphXSStyling","ParagraphXS","ComponentTextStyle","componentFontWeight","componentFontStyle","componentTextTransformation","ComponentStyling","ComponentXLStyling","ComponentXL","ComponentLStyling","ComponentL","ComponentMStyling","ComponentM","ComponentSStyling","ComponentS","ComponentXSStyling","ComponentXS","ComponentXXSStyling","ComponentXXS","ComponentResponsive","width","fontsize","Size"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,QAAMA,UAAU,GAAG;AACjBC,IAAAA,UAAU,EAAE;AADK,GAAnB;AAcA,QAAMC,cAAc,GAAG,gCAAA,KAAA,EAA+B,CAAC;AAAA,IAAA,KAAA;AAAA,IAAA,UAAA;AAAA,IAAA,QAAA;AAAA,IAAA,UAAA;AAAA,IAAA,SAAA;AAAA,IAAA,aAAA;AAAqEC,IAAAA;AAArE,GAAD,MAAgG;AACpJF,IAAAA,UAAU,EAAED,UAAU,CAD8H,UAAA;AAEpJI,IAAAA,QAAQ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,U;UAAA,S,GAAA,S;UAAA,S,GAAA,S;UAAA,S,GAAA,S;UAAA,U,GAAA,U;UAAA,W,GAAA,W;UACA,kB,GAAA,kB;UAAA,W,GAAA,W;UAAA,U,GAAA,U;UAAA,U,GAAA,U;UAAA,U,GAAA,U;UAAA,W,GAAA,W;UACA,kB,GAAA,kB;UAAA,W,GAAA,W;UAAA,U,GAAA,U;UAAA,U,GAAA,U;UAAA,U,GAAA,U;UAAA,W,GAAA,W;UAAA,Y,GAAA,Y;UAAA,mB,GAAA,mB;UACA,kB,GAAA,kB;UAAA,iB,GAAA,iB;UAAA,iB,GAAA,iB;UAAA,iB,GAAA,iB;UAAA,kB,GAAA,kB;UAAA,mB,GAAA,mB;UACA,kB,GAAA,kB;UAAA,iB,GAAA,iB;UAAA,iB,GAAA,iB;UAAA,iB,GAAA,iB;UAAA,kB,GAAA,kB;UACA,iB,GAAA,iB;UAAA,gB,GAAA,gB;UAAA,gB,GAAA,gB;UAAA,gB,GAAA,gB;UAAA,iB,GAAA,iB;UAAA,kB,GAAA,kB","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":["TYPOGRAPHY","fontFamily","TypographyBase","textDecorationLine","fontSize","fontWeight","lineHeight","textTransform","fontStyle","color","COLORS","black","HeadlineBaseStyling","css","HeadlineBase","HeadlineXLStyling","HeadlineXL","HeadlineLStyling","HeadlineL","HeadlineMStyling","HeadlineM","HeadlineSStyling","HeadlineS","HeadlineXSStyling","HeadlineXS","HeadlineXXSStyling","HeadlineXXS","ParagraphStyling","ParagraphBase","styled","props","ParagraphTextStyle","textStyle","paragraphFontWeight","paragraphFontStyle","paragraphTextDecorationLine","textDecoration","ParagraphBaseStyling","ParagraphXlStyling","ParagraphXL","children","ParagraphLStyling","ParagraphL","ParagraphMStyling","ParagraphM","ParagraphSStyling","ParagraphS","ParagraphXSStyling","ParagraphXS","ComponentTextStyle","className","componentFontWeight","componentFontStyle","componentTextTransformation","ComponentStyling","ComponentXLStyling","ComponentXL","ComponentLStyling","ComponentL","ComponentMStyling","ComponentM","ComponentSStyling","ComponentS","ComponentXSStyling","ComponentXS","ComponentXXSStyling","ComponentXXS","ComponentResponsive","width","fontsize","Size"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAMA,QAAMA,UAAU,GAAG;AACjBC,IAAAA,UAAU,EAAE;AADK,GAAnB;AAcA,QAAMC,cAAc,GAAG,gCAAA,KAAA,EAA+B,CAAC;AAAA,IAAA,KAAA;AAAA,IAAA,UAAA;AAAA,IAAA,QAAA;AAAA,IAAA,UAAA;AAAA,IAAA,SAAA;AAAA,IAAA,aAAA;AAAqEC,IAAAA;AAArE,GAAD,MAAgG;AACpJF,IAAAA,UAAU,EAAED,UAAU,CAD8H,UAAA;AAEpJI,IAAAA,QAAQ,EAF4I,QAAA;AA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EAAA;AAAY,UAAA,KAAK,EAAjB,KAAA;AAA0B,UAAA,SAAS,EAAnC,SAAA;AAAgD,UAAA,QAAQ,EAAE9B;AAA1D,SAAA,CAAP;;AACF,WAAK8B,YAAL,KAAA;AACA;AACE,eAAA,aAAO,gBAAA,aAAA,CAAA,UAAA,EAAA;AAAY,UAAA,KAAK,EAAjB,KAAA;AAA0B,UAAA,SAAS,EAAnC,SAAA;AAAgD,UAAA,QAAQ,EAAE9B;AAA1D,SAAA,CAAP;AAXJ;AAjBF,GAAA;;;AAtGE/B,IAAAA,K;AACAyC,IAAAA,S;AACAlB,IAAAA,S;;UAoIF,U,GAAA,U;UACA,U,GAAA,U;UAAA,S,GAAA,S;UAAA,S,GAAA,S;UAAA,S,GAAA,S;UAAA,U,GAAA,U;UAAA,W,GAAA,W;UACA,kB,GAAA,kB;UAAA,W,GAAA,W;UAAA,U,GAAA,U;UAAA,U,GAAA,U;UAAA,U,GAAA,U;UAAA,W,GAAA,W;UACA,kB,GAAA,kB;UAAA,W,GAAA,W;UAAA,U,GAAA,U;UAAA,U,GAAA,U;UAAA,U,GAAA,U;UAAA,W,GAAA,W;UAAA,Y,GAAA,Y;UAAA,mB,GAAA,mB;UACA,kB,GAAA,kB;UAAA,iB,GAAA,iB;UAAA,iB,GAAA,iB;UAAA,iB,GAAA,iB;UAAA,kB,GAAA,kB;UAAA,mB,GAAA,mB;UACA,kB,GAAA,kB;UAAA,iB,GAAA,iB;UAAA,iB,GAAA,iB;UAAA,iB,GAAA,iB;UAAA,kB,GAAA,kB;UACA,iB,GAAA,iB;UAAA,gB,GAAA,gB;UAAA,gB,GAAA,gB;UAAA,gB,GAAA,gB;UAAA,iB,GAAA,iB;UAAA,kB,GAAA,kB","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"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@laerdal/life-react-components",
3
- "version": "1.2.2-dev.23",
3
+ "version": "1.2.2-dev.25.full",
4
4
  "private": false,
5
5
  "author": "Thomas Kalve <thomas.kalve@laerdal.com>",
6
6
  "contributors": [