@laerdal/life-react-components 3.5.2 → 3.6.0-dev.1.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.
- package/dist/Chips/ChoiceChips.cjs +1 -0
- package/dist/Chips/ChoiceChips.cjs.map +1 -1
- package/dist/Chips/ChoiceChips.js +1 -0
- package/dist/Chips/ChoiceChips.js.map +1 -1
- package/dist/ChipsInput/ChipDropdownInput.cjs +1 -1
- package/dist/ChipsInput/ChipDropdownInput.cjs.map +1 -1
- package/dist/ChipsInput/ChipDropdownInput.js +1 -1
- package/dist/ChipsInput/ChipDropdownInput.js.map +1 -1
- package/dist/Dropdown/BasicDropdown.cjs +2 -0
- package/dist/Dropdown/BasicDropdown.cjs.map +1 -1
- package/dist/Dropdown/BasicDropdown.js +2 -0
- package/dist/Dropdown/BasicDropdown.js.map +1 -1
- package/dist/Dropdown/CommonStyling.cjs +1 -1
- package/dist/Dropdown/CommonStyling.cjs.map +1 -1
- package/dist/Dropdown/CommonStyling.js +1 -1
- package/dist/Dropdown/CommonStyling.js.map +1 -1
- package/dist/Dropdown/DropdownButton.cjs +4 -0
- package/dist/Dropdown/DropdownButton.cjs.map +1 -1
- package/dist/Dropdown/DropdownButton.js +4 -0
- package/dist/Dropdown/DropdownButton.js.map +1 -1
- package/dist/Dropdown/DropdownContent.cjs +1 -1
- package/dist/Dropdown/DropdownContent.cjs.map +1 -1
- package/dist/Dropdown/DropdownContent.js +1 -1
- package/dist/Dropdown/DropdownContent.js.map +1 -1
- package/dist/Dropdown/DropdownFilter.cjs +2 -0
- package/dist/Dropdown/DropdownFilter.cjs.map +1 -1
- package/dist/Dropdown/DropdownFilter.js +2 -0
- package/dist/Dropdown/DropdownFilter.js.map +1 -1
- package/dist/Dropdown/index.cjs +0 -12
- package/dist/Dropdown/index.cjs.map +1 -1
- package/dist/Dropdown/index.d.ts +0 -1
- package/dist/Dropdown/index.js +0 -1
- package/dist/Dropdown/index.js.map +1 -1
- package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.cjs +0 -1
- package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.js +0 -1
- package/dist/GlobalNavigationBar/desktop/ExtendedMainMenu.js.map +1 -1
- package/dist/GlobalNavigationBar/desktop/SubMenu.cjs +0 -1
- package/dist/GlobalNavigationBar/desktop/SubMenu.cjs.map +1 -1
- package/dist/GlobalNavigationBar/desktop/SubMenu.js +0 -1
- package/dist/GlobalNavigationBar/desktop/SubMenu.js.map +1 -1
- package/dist/InputFields/QuickSearch.cjs +1 -1
- package/dist/InputFields/QuickSearch.cjs.map +1 -1
- package/dist/InputFields/QuickSearch.js +1 -1
- package/dist/InputFields/QuickSearch.js.map +1 -1
- package/dist/List/ListRow.cjs +1 -1
- package/dist/List/ListRow.cjs.map +1 -1
- package/dist/List/ListRow.d.ts +1 -1
- package/dist/List/ListRow.js +1 -1
- package/dist/List/ListRow.js.map +1 -1
- package/dist/Table/TableBody.cjs +1 -1
- package/dist/Table/TableBody.cjs.map +1 -1
- package/dist/Table/TableBody.js +1 -1
- package/dist/Table/TableBody.js.map +1 -1
- package/dist/Table/TableFooter.cjs +2 -0
- package/dist/Table/TableFooter.cjs.map +1 -1
- package/dist/Table/TableFooter.js +2 -0
- package/dist/Table/TableFooter.js.map +1 -1
- package/dist/styles/typography.cjs +59 -35
- package/dist/styles/typography.cjs.map +1 -1
- package/dist/styles/typography.d.ts +1 -1
- package/dist/styles/typography.js +59 -35
- package/dist/styles/typography.js.map +1 -1
- package/dist/test-utils.cjs +42 -0
- package/dist/test-utils.cjs.map +1 -0
- package/dist/test-utils.d.ts +5 -0
- package/dist/test-utils.js +22 -0
- package/dist/test-utils.js.map +1 -0
- package/package.json +34 -10
|
@@ -17,7 +17,7 @@ declare enum ComponentTextStyle {
|
|
|
17
17
|
Italic = 3,
|
|
18
18
|
UppercaseBold = 4
|
|
19
19
|
}
|
|
20
|
-
type ComponentProps = {
|
|
20
|
+
type ComponentProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'color' | 'className' | 'children'> & {
|
|
21
21
|
color?: string;
|
|
22
22
|
className?: string;
|
|
23
23
|
textStyle?: ComponentTextStyle;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
|
|
1
3
|
import _taggedTemplateLiteral from "@babel/runtime/helpers/esm/taggedTemplateLiteral";
|
|
2
4
|
import _pt from "prop-types";
|
|
5
|
+
var _excluded = ["color", "textStyle", "children", "className"],
|
|
6
|
+
_excluded2 = ["color", "textStyle", "children", "className"],
|
|
7
|
+
_excluded3 = ["color", "textStyle", "children", "className"],
|
|
8
|
+
_excluded4 = ["color", "textStyle", "children", "className"],
|
|
9
|
+
_excluded5 = ["color", "textStyle", "children", "className"],
|
|
10
|
+
_excluded6 = ["color", "textStyle", "children", "className"],
|
|
11
|
+
_excluded7 = ["color", "textStyle", "children", "size", "width"];
|
|
3
12
|
var _templateObject, _templateObject2, _templateObject3, _templateObject4, _templateObject5, _templateObject6, _templateObject7, _templateObject8;
|
|
13
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
14
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
15
|
import React from 'react';
|
|
5
16
|
import styled, { css } from 'styled-components';
|
|
6
17
|
import { COLORS } from '.';
|
|
@@ -58,18 +69,20 @@ var ComponentXL = function ComponentXL(_ref2) {
|
|
|
58
69
|
var color = _ref2.color,
|
|
59
70
|
textStyle = _ref2.textStyle,
|
|
60
71
|
children = _ref2.children,
|
|
61
|
-
className = _ref2.className
|
|
72
|
+
className = _ref2.className,
|
|
73
|
+
rest = _objectWithoutProperties(_ref2, _excluded);
|
|
62
74
|
var fontWeight = componentFontWeight(textStyle);
|
|
63
75
|
var fontStyle = componentFontStyle(textStyle);
|
|
64
|
-
return /*#__PURE__*/_jsx(TypographyBase, {
|
|
76
|
+
return /*#__PURE__*/_jsx(TypographyBase, _objectSpread(_objectSpread({
|
|
65
77
|
className: className,
|
|
66
78
|
$color: color,
|
|
67
79
|
lineHeight: 28,
|
|
68
80
|
$fontSize: 24,
|
|
69
81
|
$fontWeight: fontWeight,
|
|
70
|
-
$fontStyle: fontStyle
|
|
82
|
+
$fontStyle: fontStyle
|
|
83
|
+
}, rest), {}, {
|
|
71
84
|
children: children
|
|
72
|
-
});
|
|
85
|
+
}));
|
|
73
86
|
};
|
|
74
87
|
ComponentXL.propTypes = {
|
|
75
88
|
color: _pt.string,
|
|
@@ -84,18 +97,20 @@ var ComponentL = function ComponentL(_ref3) {
|
|
|
84
97
|
var color = _ref3.color,
|
|
85
98
|
textStyle = _ref3.textStyle,
|
|
86
99
|
children = _ref3.children,
|
|
87
|
-
className = _ref3.className
|
|
100
|
+
className = _ref3.className,
|
|
101
|
+
rest = _objectWithoutProperties(_ref3, _excluded2);
|
|
88
102
|
var fontWeight = componentFontWeight(textStyle);
|
|
89
103
|
var fontStyle = componentFontStyle(textStyle);
|
|
90
|
-
return /*#__PURE__*/_jsx(TypographyBase, {
|
|
104
|
+
return /*#__PURE__*/_jsx(TypographyBase, _objectSpread(_objectSpread({
|
|
91
105
|
className: className,
|
|
92
106
|
$color: color,
|
|
93
107
|
lineHeight: 24,
|
|
94
108
|
$fontSize: 20,
|
|
95
109
|
$fontWeight: fontWeight,
|
|
96
|
-
$fontStyle: fontStyle
|
|
110
|
+
$fontStyle: fontStyle
|
|
111
|
+
}, rest), {}, {
|
|
97
112
|
children: children
|
|
98
|
-
});
|
|
113
|
+
}));
|
|
99
114
|
};
|
|
100
115
|
ComponentL.propTypes = {
|
|
101
116
|
color: _pt.string,
|
|
@@ -110,18 +125,20 @@ var ComponentM = function ComponentM(_ref4) {
|
|
|
110
125
|
var color = _ref4.color,
|
|
111
126
|
textStyle = _ref4.textStyle,
|
|
112
127
|
children = _ref4.children,
|
|
113
|
-
className = _ref4.className
|
|
128
|
+
className = _ref4.className,
|
|
129
|
+
rest = _objectWithoutProperties(_ref4, _excluded3);
|
|
114
130
|
var fontWeight = componentFontWeight(textStyle);
|
|
115
131
|
var fontStyle = componentFontStyle(textStyle);
|
|
116
|
-
return /*#__PURE__*/_jsx(TypographyBase, {
|
|
132
|
+
return /*#__PURE__*/_jsx(TypographyBase, _objectSpread(_objectSpread({
|
|
117
133
|
className: className,
|
|
118
134
|
$color: color,
|
|
119
135
|
lineHeight: 24,
|
|
120
136
|
$fontSize: 18,
|
|
121
137
|
$fontWeight: fontWeight,
|
|
122
|
-
$fontStyle: fontStyle
|
|
138
|
+
$fontStyle: fontStyle
|
|
139
|
+
}, rest), {}, {
|
|
123
140
|
children: children
|
|
124
|
-
});
|
|
141
|
+
}));
|
|
125
142
|
};
|
|
126
143
|
ComponentM.propTypes = {
|
|
127
144
|
color: _pt.string,
|
|
@@ -136,18 +153,20 @@ var ComponentS = function ComponentS(_ref5) {
|
|
|
136
153
|
var color = _ref5.color,
|
|
137
154
|
textStyle = _ref5.textStyle,
|
|
138
155
|
children = _ref5.children,
|
|
139
|
-
className = _ref5.className
|
|
156
|
+
className = _ref5.className,
|
|
157
|
+
rest = _objectWithoutProperties(_ref5, _excluded4);
|
|
140
158
|
var fontWeight = componentFontWeight(textStyle);
|
|
141
159
|
var fontStyle = componentFontStyle(textStyle);
|
|
142
|
-
return /*#__PURE__*/_jsx(TypographyBase, {
|
|
160
|
+
return /*#__PURE__*/_jsx(TypographyBase, _objectSpread(_objectSpread({
|
|
143
161
|
className: className,
|
|
144
162
|
$color: color,
|
|
145
163
|
lineHeight: 20,
|
|
146
164
|
$fontSize: 16,
|
|
147
165
|
$fontWeight: fontWeight,
|
|
148
|
-
$fontStyle: fontStyle
|
|
166
|
+
$fontStyle: fontStyle
|
|
167
|
+
}, rest), {}, {
|
|
149
168
|
children: children
|
|
150
|
-
});
|
|
169
|
+
}));
|
|
151
170
|
};
|
|
152
171
|
ComponentS.propTypes = {
|
|
153
172
|
color: _pt.string,
|
|
@@ -162,20 +181,22 @@ var ComponentXS = function ComponentXS(_ref6) {
|
|
|
162
181
|
var color = _ref6.color,
|
|
163
182
|
textStyle = _ref6.textStyle,
|
|
164
183
|
children = _ref6.children,
|
|
165
|
-
className = _ref6.className
|
|
184
|
+
className = _ref6.className,
|
|
185
|
+
rest = _objectWithoutProperties(_ref6, _excluded5);
|
|
166
186
|
var fontWeight = componentFontWeight(textStyle);
|
|
167
187
|
var fontStyle = componentFontStyle(textStyle);
|
|
168
188
|
var textTransform = componentTextTransformation(textStyle);
|
|
169
|
-
return /*#__PURE__*/_jsx(TypographyBase, {
|
|
189
|
+
return /*#__PURE__*/_jsx(TypographyBase, _objectSpread(_objectSpread({
|
|
170
190
|
className: className,
|
|
171
191
|
$color: color,
|
|
172
192
|
lineHeight: 16,
|
|
173
193
|
$fontSize: 14,
|
|
174
194
|
$fontWeight: fontWeight,
|
|
175
195
|
$fontStyle: fontStyle,
|
|
176
|
-
textTransform: textTransform
|
|
196
|
+
textTransform: textTransform
|
|
197
|
+
}, rest), {}, {
|
|
177
198
|
children: children
|
|
178
|
-
});
|
|
199
|
+
}));
|
|
179
200
|
};
|
|
180
201
|
ComponentXS.propTypes = {
|
|
181
202
|
color: _pt.string,
|
|
@@ -190,20 +211,22 @@ var ComponentXXS = function ComponentXXS(_ref7) {
|
|
|
190
211
|
var color = _ref7.color,
|
|
191
212
|
textStyle = _ref7.textStyle,
|
|
192
213
|
children = _ref7.children,
|
|
193
|
-
className = _ref7.className
|
|
214
|
+
className = _ref7.className,
|
|
215
|
+
rest = _objectWithoutProperties(_ref7, _excluded6);
|
|
194
216
|
var fontWeight = componentFontWeight(textStyle);
|
|
195
217
|
var fontStyle = componentFontStyle(textStyle);
|
|
196
218
|
var textTransform = componentTextTransformation(textStyle);
|
|
197
|
-
return /*#__PURE__*/_jsx(TypographyBase, {
|
|
219
|
+
return /*#__PURE__*/_jsx(TypographyBase, _objectSpread(_objectSpread({
|
|
198
220
|
className: className,
|
|
199
221
|
$color: color,
|
|
200
222
|
lineHeight: 16,
|
|
201
223
|
$fontSize: 12,
|
|
202
224
|
$fontWeight: fontWeight,
|
|
203
225
|
$fontStyle: fontStyle,
|
|
204
|
-
textTransform: textTransform
|
|
226
|
+
textTransform: textTransform
|
|
227
|
+
}, rest), {}, {
|
|
205
228
|
children: children
|
|
206
|
-
});
|
|
229
|
+
}));
|
|
207
230
|
};
|
|
208
231
|
ComponentXXS.propTypes = {
|
|
209
232
|
color: _pt.string,
|
|
@@ -216,7 +239,8 @@ var ComponentResponsive = function ComponentResponsive(_ref8) {
|
|
|
216
239
|
textStyle = _ref8.textStyle,
|
|
217
240
|
children = _ref8.children,
|
|
218
241
|
size = _ref8.size,
|
|
219
|
-
width = _ref8.width
|
|
242
|
+
width = _ref8.width,
|
|
243
|
+
rest = _objectWithoutProperties(_ref8, _excluded7);
|
|
220
244
|
var fontsize = size;
|
|
221
245
|
if (!size) {
|
|
222
246
|
if (width == -1) {
|
|
@@ -231,36 +255,36 @@ var ComponentResponsive = function ComponentResponsive(_ref8) {
|
|
|
231
255
|
}
|
|
232
256
|
switch (fontsize) {
|
|
233
257
|
case Size.XXSmall:
|
|
234
|
-
return /*#__PURE__*/_jsx(ComponentXXS, {
|
|
258
|
+
return /*#__PURE__*/_jsx(ComponentXXS, _objectSpread({
|
|
235
259
|
color: color,
|
|
236
260
|
textStyle: textStyle,
|
|
237
261
|
children: children
|
|
238
|
-
});
|
|
262
|
+
}, rest));
|
|
239
263
|
case Size.XSmall:
|
|
240
|
-
return /*#__PURE__*/_jsx(ComponentXS, {
|
|
264
|
+
return /*#__PURE__*/_jsx(ComponentXS, _objectSpread({
|
|
241
265
|
color: color,
|
|
242
266
|
textStyle: textStyle,
|
|
243
267
|
children: children
|
|
244
|
-
});
|
|
268
|
+
}, rest));
|
|
245
269
|
case Size.Small:
|
|
246
|
-
return /*#__PURE__*/_jsx(ComponentS, {
|
|
270
|
+
return /*#__PURE__*/_jsx(ComponentS, _objectSpread({
|
|
247
271
|
color: color,
|
|
248
272
|
textStyle: textStyle,
|
|
249
273
|
children: children
|
|
250
|
-
});
|
|
274
|
+
}, rest));
|
|
251
275
|
case Size.Medium:
|
|
252
|
-
return /*#__PURE__*/_jsx(ComponentM, {
|
|
276
|
+
return /*#__PURE__*/_jsx(ComponentM, _objectSpread({
|
|
253
277
|
color: color,
|
|
254
278
|
textStyle: textStyle,
|
|
255
279
|
children: children
|
|
256
|
-
});
|
|
280
|
+
}, rest));
|
|
257
281
|
case Size.Large:
|
|
258
282
|
default:
|
|
259
|
-
return /*#__PURE__*/_jsx(ComponentL, {
|
|
283
|
+
return /*#__PURE__*/_jsx(ComponentL, _objectSpread({
|
|
260
284
|
color: color,
|
|
261
285
|
textStyle: textStyle,
|
|
262
286
|
children: children
|
|
263
|
-
});
|
|
287
|
+
}, rest));
|
|
264
288
|
}
|
|
265
289
|
};
|
|
266
290
|
ComponentResponsive.propTypes = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"typography.js","names":["React","styled","css","COLORS","Size","jsx","_jsx","TypographyBase","_ref","$color","lineHeight","$fontSize","$fontWeight","$fontStyle","textTransform","textDecorationLine","fontSize","fontWeight","fontStyle","color","black","ComponentTextStyle","componentFontWeight","textStyle","Bold","UppercaseBold","componentFontStyle","Italic","componentTextTransformation","ComponentStyling","_templateObject","_taggedTemplateLiteral","props","concat","getColor","theme","ComponentXLStyling","ComponentXL","_ref2","children","className","propTypes","_pt","string","oneOf","node","ComponentLStyling","ComponentL","_ref3","ComponentMStyling","ComponentM","_ref4","ComponentSStyling","ComponentS","_ref5","ComponentXSStyling","ComponentXS","_ref6","ComponentXXSStyling","ComponentXXS","_ref7","ComponentResponsive","_ref8","size","width","fontsize","Medium","Small","Large","XXSmall","XSmall","Typography","_templateObject2","QuoteTypography","_templateObject3","NoteTypography","_templateObject4","UpperCaseTypography","_templateObject5","Note","p","_templateObject6","Quote","_templateObject7","UpperCase","_templateObject8"],"sources":["../../src/styles/typography.tsx"],"sourcesContent":["import React from 'react';\r\nimport styled, {css} from 'styled-components';\r\nimport {COLORS} from '.';\r\nimport {Property} from 'csstype';\r\nimport {Size} from '../types';\r\n\r\ninterface ITypographyBase {\r\n $color?: string;\r\n lineHeight: number;\r\n $fontSize: number;\r\n $fontWeight: number;\r\n $fontStyle?: string;\r\n textTransform?: Property.TextTransform;\r\n textDecorationLine?: Property.TextDecorationLine;\r\n}\r\n\r\nexport const TypographyBase = styled('div')<ITypographyBase>(({\r\n $color,\r\n lineHeight,\r\n $fontSize,\r\n $fontWeight,\r\n $fontStyle,\r\n textTransform,\r\n textDecorationLine\r\n }) => ({\r\n fontSize: $fontSize,\r\n fontWeight: $fontWeight,\r\n lineHeight: lineHeight + 'px',\r\n textTransform: textTransform ? textTransform : 'none',\r\n textDecorationLine: textDecorationLine ? textDecorationLine : 'none',\r\n fontStyle: $fontStyle ? $fontStyle : 'normal',\r\n color: $color ? $color : COLORS.black,\r\n}));\r\n\r\nenum ComponentTextStyle {\r\n Regular = 1,\r\n Bold,\r\n Italic,\r\n UppercaseBold,\r\n}\r\n\r\ntype ComponentProps = {\r\n color?: string;\r\n className?: string;\r\n textStyle?: ComponentTextStyle;\r\n children?: React.ReactNode;\r\n};\r\n\r\nconst componentFontWeight = (textStyle?: ComponentTextStyle) => {\r\n let fontWeight = 400;\r\n if (textStyle === ComponentTextStyle.Bold || textStyle === ComponentTextStyle.UppercaseBold) {\r\n fontWeight = 700;\r\n }\r\n return fontWeight;\r\n};\r\n\r\nconst componentFontStyle = (textStyle?: ComponentTextStyle) => {\r\n let fontStyle = textStyle && textStyle === ComponentTextStyle.Italic ? 'italic' : '';\r\n return fontStyle;\r\n};\r\n\r\nconst componentTextTransformation = (textStyle?: ComponentTextStyle): Property.TextTransform => {\r\n let fontStyle: Property.TextTransform = textStyle && textStyle === ComponentTextStyle.UppercaseBold ? 'uppercase' : 'none';\r\n return fontStyle;\r\n};\r\n\r\nconst ComponentStyling = (fontSize: string, lineHeight: string, textStyle: ComponentTextStyle, color: string | undefined | null) => {\r\n return css`\r\n font-size: ${fontSize};\r\n font-weight: ${componentFontWeight(textStyle)};\r\n line-height: ${lineHeight};\r\n font-style: ${componentFontStyle(textStyle)};\r\n ${props => color === null ? '' : `color: ${color || COLORS.getColor('black', props.theme)};`}\r\n `;\r\n};\r\n\r\nconst ComponentXLStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('24px', '28px', textStyle, color);\r\nconst ComponentXL: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} lineHeight={28} $fontSize={24} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentLStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('20px', '24px', textStyle, color);\r\nconst ComponentL: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} lineHeight={24} $fontSize={20} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentMStyling = (textStyle: ComponentTextStyle, color: string | undefined | null) => ComponentStyling('18px', '24px', textStyle, color);\r\nconst ComponentM: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} lineHeight={24} $fontSize={18} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('16px', '20px', textStyle, color);\r\nconst ComponentS: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} lineHeight={20} $fontSize={16} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentXSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('14px', '16px', textStyle, color);\r\nconst ComponentXS: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n let textTransform = componentTextTransformation(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} lineHeight={16} $fontSize={14} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle} textTransform={textTransform}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentXXSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('12px', '16px', textStyle, color);\r\nconst ComponentXXS: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n let textTransform = componentTextTransformation(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} lineHeight={16} $fontSize={12} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle} textTransform={textTransform}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentResponsive: React.FunctionComponent<ComponentProps & { size?: Size; width: number }> = ({\r\n color,\r\n textStyle,\r\n children,\r\n size,\r\n width\r\n }) => {\r\n let fontsize = size;\r\n if (!size) {\r\n if (width == -1) {\r\n fontsize = Size.Medium;\r\n } else if (width < 768) {\r\n fontsize = Size.Small;\r\n } else if (width < 992) {\r\n fontsize = Size.Medium;\r\n } else {\r\n fontsize = Size.Large;\r\n }\r\n }\r\n switch (fontsize) {\r\n case Size.XXSmall:\r\n return <ComponentXXS color={color} textStyle={textStyle} children={children}/>;\r\n case Size.XSmall:\r\n return <ComponentXS color={color} textStyle={textStyle} children={children}/>;\r\n case Size.Small:\r\n return <ComponentS color={color} textStyle={textStyle} children={children}/>;\r\n case Size.Medium:\r\n return <ComponentM color={color} textStyle={textStyle} children={children}/>;\r\n case Size.Large:\r\n default:\r\n return <ComponentL color={color} textStyle={textStyle} children={children}/>;\r\n }\r\n};\r\n\r\nexport const Typography = css`\r\n html {\r\n font-size: 100%;\r\n }\r\n\r\n @media (min-width: 48rem) {\r\n html {\r\n font-size: 112.5%;\r\n }\r\n }\r\n\r\n @media (min-width: 80rem) {\r\n html {\r\n font-size: 125%;\r\n }\r\n }\r\n\r\n h1, h2, h3, h4, h5, h6 {\r\n font-weight: 700;\r\n line-height: 120%;\r\n margin: 0;\r\n }\r\n\r\n h1 {\r\n font-size: 3rem;\r\n }\r\n\r\n h2 {\r\n font-size: 2.5rem;\r\n }\r\n\r\n h3 {\r\n font-size: 2rem;\r\n }\r\n\r\n h4 {\r\n font-size: 1.75rem;\r\n }\r\n\r\n h5 {\r\n font-size: 1.5rem;\r\n }\r\n\r\n h6 {\r\n font-size: 1.25rem;\r\n }\r\n\r\n p {\r\n font-size: 1rem;\r\n line-height: 150%;\r\n margin: 0 0 0.5rem;\r\n }\r\n\r\n p:last-of-type {\r\n margin-bottom: 0;\r\n }\r\n\r\n\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 34rem;\r\n }\r\n\r\n :lang(ja-jp) {\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 30rem;\r\n }\r\n }\r\n\r\n :lang(ko-kr) {\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 30rem;\r\n }\r\n }\r\n\r\n :lang(zh-CN) {\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 30rem;\r\n }\r\n }\r\n`;\r\n\r\nexport const QuoteTypography = css`\r\n font-size: 1.5rem;\r\n line-height: 150%;\r\n margin-bottom: 0.75rem;\r\n`;\r\n\r\nexport const NoteTypography = css`\r\n font-size: 0.75rem;\r\n line-height: 150%;\r\n margin-bottom: 0.375rem;\r\n`;\r\n\r\nexport const UpperCaseTypography = css`\r\n font-size: 0.75rem;\r\n line-height: 150%;\r\n font-weight: 700;\r\n text-transform: uppercase;\r\n`;\r\n\r\nexport const Note = styled.p`\r\n ${NoteTypography}\r\n`;\r\n\r\nexport const Quote = styled.p`\r\n ${QuoteTypography}\r\n`;\r\n\r\nexport const UpperCase = styled.p`\r\n ${UpperCaseTypography}\r\n`;\r\n\r\nexport {\r\n ComponentTextStyle,\r\n ComponentXL,\r\n ComponentL,\r\n ComponentM,\r\n ComponentS,\r\n ComponentXS,\r\n ComponentXXS,\r\n ComponentResponsive\r\n};\r\nexport {\r\n ComponentXLStyling,\r\n ComponentLStyling,\r\n ComponentMStyling,\r\n ComponentSStyling,\r\n ComponentXSStyling,\r\n ComponentXXSStyling\r\n};\r\n"],"mappings":";;;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,OAAOC,MAAM,IAAGC,GAAG,QAAO,mBAAmB;AAC7C,SAAQC,MAAM,QAAO,GAAG;AAExB,SAAQC,IAAI,QAAO,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAY9B,OAAO,IAAMC,cAAc,GAAGN,M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gBAAA,KAAAA,gBAAA,GAAA/C,sBAAA,0GAKrC;AAED,OAAO,IAAMgD,IAAI,GAAG9E,MAAM,CAAC+E,CAAC,CAAAC,gBAAA,KAAAA,gBAAA,GAAAlD,sBAAA,mBACxB4C,cAAc,CACjB;AAED,OAAO,IAAMO,KAAK,GAAGjF,MAAM,CAAC+E,CAAC,CAAAG,gBAAA,KAAAA,gBAAA,GAAApD,sBAAA,mBACzB0C,eAAe,CAClB;AAED,OAAO,IAAMW,SAAS,GAAGnF,MAAM,CAAC+E,CAAC,CAAAK,gBAAA,KAAAA,gBAAA,GAAAtD,sBAAA,mBAC7B8C,mBAAmB,CACtB;AAED,SACExD,kBAAkB,EAClBgB,WAAW,EACXU,UAAU,EACVG,UAAU,EACVG,UAAU,EACVG,WAAW,EACXG,YAAY,EACZE,mBAAmB;AAErB,SACEzB,kBAAkB,EAClBU,iBAAiB,EACjBG,iBAAiB,EACjBG,iBAAiB,EACjBG,kBAAkB,EAClBG,mBAAmB","ignoreList":[]}
|
|
1
|
+
{"version":3,"file":"typography.js","names":["React","styled","css","COLORS","Size","jsx","_jsx","TypographyBase","_ref","$color","lineHeight","$fontSize","$fontWeight","$fontStyle","textTransform","textDecorationLine","fontSize","fontWeight","fontStyle","color","black","ComponentTextStyle","componentFontWeight","textStyle","Bold","UppercaseBold","componentFontStyle","Italic","componentTextTransformation","ComponentStyling","_templateObject","_taggedTemplateLiteral","props","concat","getColor","theme","ComponentXLStyling","ComponentXL","_ref2","children","className","rest","_objectWithoutProperties","_excluded","_objectSpread","propTypes","_pt","string","oneOf","node","ComponentLStyling","ComponentL","_ref3","_excluded2","ComponentMStyling","ComponentM","_ref4","_excluded3","ComponentSStyling","ComponentS","_ref5","_excluded4","ComponentXSStyling","ComponentXS","_ref6","_excluded5","ComponentXXSStyling","ComponentXXS","_ref7","_excluded6","ComponentResponsive","_ref8","size","width","_excluded7","fontsize","Medium","Small","Large","XXSmall","XSmall","Typography","_templateObject2","QuoteTypography","_templateObject3","NoteTypography","_templateObject4","UpperCaseTypography","_templateObject5","Note","p","_templateObject6","Quote","_templateObject7","UpperCase","_templateObject8"],"sources":["../../src/styles/typography.tsx"],"sourcesContent":["import React, { AriaAttributes } from 'react';\r\nimport styled, {css} from 'styled-components';\r\nimport {COLORS} from '.';\r\nimport {Property} from 'csstype';\r\nimport {Size} from '../types';\r\n\r\ninterface ITypographyBase {\r\n $color?: string;\r\n lineHeight: number;\r\n $fontSize: number;\r\n $fontWeight: number;\r\n $fontStyle?: string;\r\n textTransform?: Property.TextTransform;\r\n textDecorationLine?: Property.TextDecorationLine;\r\n}\r\n\r\nexport const TypographyBase = styled('div')<ITypographyBase>(({\r\n $color,\r\n lineHeight,\r\n $fontSize,\r\n $fontWeight,\r\n $fontStyle,\r\n textTransform,\r\n textDecorationLine\r\n }) => ({\r\n fontSize: $fontSize,\r\n fontWeight: $fontWeight,\r\n lineHeight: lineHeight + 'px',\r\n textTransform: textTransform ? textTransform : 'none',\r\n textDecorationLine: textDecorationLine ? textDecorationLine : 'none',\r\n fontStyle: $fontStyle ? $fontStyle : 'normal',\r\n color: $color ? $color : COLORS.black,\r\n}));\r\n\r\nenum ComponentTextStyle {\r\n Regular = 1,\r\n Bold,\r\n Italic,\r\n UppercaseBold,\r\n}\r\n\r\ntype ComponentProps = Omit<React.HTMLAttributes<HTMLDivElement>, 'color' | 'className' | 'children'> & {\r\n color?: string;\r\n className?: string;\r\n textStyle?: ComponentTextStyle;\r\n children?: React.ReactNode;\r\n};\r\n\r\nconst componentFontWeight = (textStyle?: ComponentTextStyle) => {\r\n let fontWeight = 400;\r\n if (textStyle === ComponentTextStyle.Bold || textStyle === ComponentTextStyle.UppercaseBold) {\r\n fontWeight = 700;\r\n }\r\n return fontWeight;\r\n};\r\n\r\nconst componentFontStyle = (textStyle?: ComponentTextStyle) => {\r\n let fontStyle = textStyle && textStyle === ComponentTextStyle.Italic ? 'italic' : '';\r\n return fontStyle;\r\n};\r\n\r\nconst componentTextTransformation = (textStyle?: ComponentTextStyle): Property.TextTransform => {\r\n let fontStyle: Property.TextTransform = textStyle && textStyle === ComponentTextStyle.UppercaseBold ? 'uppercase' : 'none';\r\n return fontStyle;\r\n};\r\n\r\nconst ComponentStyling = (fontSize: string, lineHeight: string, textStyle: ComponentTextStyle, color: string | undefined | null) => {\r\n return css`\r\n font-size: ${fontSize};\r\n font-weight: ${componentFontWeight(textStyle)};\r\n line-height: ${lineHeight};\r\n font-style: ${componentFontStyle(textStyle)};\r\n ${props => color === null ? '' : `color: ${color || COLORS.getColor('black', props.theme)};`}\r\n `;\r\n};\r\n\r\nconst ComponentXLStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('24px', '28px', textStyle, color);\r\nconst ComponentXL: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className, ...rest}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} lineHeight={28} $fontSize={24} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle} {...rest}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentLStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('20px', '24px', textStyle, color);\r\nconst ComponentL: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className, ...rest}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} lineHeight={24} $fontSize={20} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle} {...rest}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentMStyling = (textStyle: ComponentTextStyle, color: string | undefined | null) => ComponentStyling('18px', '24px', textStyle, color);\r\nconst ComponentM: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className, ...rest}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} lineHeight={24} $fontSize={18} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle} {...rest}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('16px', '20px', textStyle, color);\r\nconst ComponentS: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className, ...rest}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} lineHeight={20} $fontSize={16} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle} {...rest}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentXSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('14px', '16px', textStyle, color);\r\nconst ComponentXS: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className, ...rest}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n let textTransform = componentTextTransformation(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} lineHeight={16} $fontSize={14} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle} textTransform={textTransform} {...rest}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentXXSStyling = (textStyle: ComponentTextStyle, color: string | null) => ComponentStyling('12px', '16px', textStyle, color);\r\nconst ComponentXXS: React.FunctionComponent<ComponentProps> = ({color, textStyle, children, className, ...rest}) => {\r\n let fontWeight = componentFontWeight(textStyle);\r\n let fontStyle = componentFontStyle(textStyle);\r\n let textTransform = componentTextTransformation(textStyle);\r\n return (\r\n <TypographyBase className={className} $color={color} lineHeight={16} $fontSize={12} $fontWeight={fontWeight}\r\n $fontStyle={fontStyle} textTransform={textTransform} {...rest}>\r\n {children}\r\n </TypographyBase>\r\n );\r\n};\r\n\r\nconst ComponentResponsive: React.FunctionComponent<ComponentProps & { size?: Size; width: number }> = ({\r\n color,\r\n textStyle,\r\n children,\r\n size,\r\n width, \r\n ...rest\r\n }) => {\r\n let fontsize = size;\r\n if (!size) {\r\n if (width == -1) {\r\n fontsize = Size.Medium;\r\n } else if (width < 768) {\r\n fontsize = Size.Small;\r\n } else if (width < 992) {\r\n fontsize = Size.Medium;\r\n } else {\r\n fontsize = Size.Large;\r\n }\r\n }\r\n switch (fontsize) {\r\n case Size.XXSmall:\r\n return <ComponentXXS color={color} textStyle={textStyle} children={children} {...rest}/>;\r\n case Size.XSmall:\r\n return <ComponentXS color={color} textStyle={textStyle} children={children} {...rest}/>;\r\n case Size.Small:\r\n return <ComponentS color={color} textStyle={textStyle} children={children} {...rest}/>;\r\n case Size.Medium:\r\n return <ComponentM color={color} textStyle={textStyle} children={children} {...rest}/>;\r\n case Size.Large:\r\n default:\r\n return <ComponentL color={color} textStyle={textStyle} children={children} {...rest}/>;\r\n }\r\n};\r\n\r\nexport const Typography = css`\r\n html {\r\n font-size: 100%;\r\n }\r\n\r\n @media (min-width: 48rem) {\r\n html {\r\n font-size: 112.5%;\r\n }\r\n }\r\n\r\n @media (min-width: 80rem) {\r\n html {\r\n font-size: 125%;\r\n }\r\n }\r\n\r\n h1, h2, h3, h4, h5, h6 {\r\n font-weight: 700;\r\n line-height: 120%;\r\n margin: 0;\r\n }\r\n\r\n h1 {\r\n font-size: 3rem;\r\n }\r\n\r\n h2 {\r\n font-size: 2.5rem;\r\n }\r\n\r\n h3 {\r\n font-size: 2rem;\r\n }\r\n\r\n h4 {\r\n font-size: 1.75rem;\r\n }\r\n\r\n h5 {\r\n font-size: 1.5rem;\r\n }\r\n\r\n h6 {\r\n font-size: 1.25rem;\r\n }\r\n\r\n p {\r\n font-size: 1rem;\r\n line-height: 150%;\r\n margin: 0 0 0.5rem;\r\n }\r\n\r\n p:last-of-type {\r\n margin-bottom: 0;\r\n }\r\n\r\n\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 34rem;\r\n }\r\n\r\n :lang(ja-jp) {\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 30rem;\r\n }\r\n }\r\n\r\n :lang(ko-kr) {\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 30rem;\r\n }\r\n }\r\n\r\n :lang(zh-CN) {\r\n h1, h2, h3, h4, h5, h6, p, span {\r\n max-width: 30rem;\r\n }\r\n }\r\n`;\r\n\r\nexport const QuoteTypography = css`\r\n font-size: 1.5rem;\r\n line-height: 150%;\r\n margin-bottom: 0.75rem;\r\n`;\r\n\r\nexport const NoteTypography = css`\r\n font-size: 0.75rem;\r\n line-height: 150%;\r\n margin-bottom: 0.375rem;\r\n`;\r\n\r\nexport const UpperCaseTypography = css`\r\n font-size: 0.75rem;\r\n line-height: 150%;\r\n font-weight: 700;\r\n text-transform: uppercase;\r\n`;\r\n\r\nexport const Note = styled.p`\r\n ${NoteTypography}\r\n`;\r\n\r\nexport const Quote = styled.p`\r\n ${QuoteTypography}\r\n`;\r\n\r\nexport const UpperCase = styled.p`\r\n ${UpperCaseTypography}\r\n`;\r\n\r\nexport {\r\n ComponentTextStyle,\r\n ComponentXL,\r\n ComponentL,\r\n ComponentM,\r\n ComponentS,\r\n ComponentXS,\r\n ComponentXXS,\r\n ComponentResponsive\r\n};\r\nexport {\r\n ComponentXLStyling,\r\n ComponentLStyling,\r\n ComponentMStyling,\r\n ComponentSStyling,\r\n ComponentXSStyling,\r\n ComponentXXSStyling\r\n};\r\n"],"mappings":";;;;;;;;;;;;;;AAAA,OAAOA,KAAK,MAA0B,OAAO;AAC7C,OAAOC,MAAM,IAAGC,GAAG,QAAO,mBAAmB;AAC7C,SAAQC,MAAM,QAAO,GAAG;AAExB,SAAQC,IAAI,QAAO,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAY9B,OAAO,IAAMC,cAAc,GAAGN,MAAM,CAAC,KAAK,CAAC,CAAkB,UAAAO,IAAA;EAAA,IACGC,MAAM,GAAAD,IAAA,CAANC,MAAM;IACNC,UAAU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iB,EACjBI,iBAAiB,EACjBI,iBAAiB,EACjBI,kBAAkB,EAClBI,mBAAmB","ignoreList":[]}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
var _exportNames = {
|
|
8
|
+
render: true
|
|
9
|
+
};
|
|
10
|
+
exports.render = void 0;
|
|
11
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
|
+
var _react = _interopRequireDefault(require("react"));
|
|
13
|
+
var _react2 = require("@testing-library/react");
|
|
14
|
+
Object.keys(_react2).forEach(function (key) {
|
|
15
|
+
if (key === "default" || key === "__esModule") return;
|
|
16
|
+
if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return;
|
|
17
|
+
if (key in exports && exports[key] === _react2[key]) return;
|
|
18
|
+
Object.defineProperty(exports, key, {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _react2[key];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
var _styledComponents = require("styled-components");
|
|
26
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
27
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
28
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2["default"])(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
29
|
+
var AllTheProviders = function AllTheProviders(_ref) {
|
|
30
|
+
var children = _ref.children;
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_styledComponents.ThemeProvider, {
|
|
32
|
+
theme: {},
|
|
33
|
+
children: children
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
var customRender = function customRender(ui, options) {
|
|
37
|
+
return (0, _react2.render)(ui, _objectSpread({
|
|
38
|
+
wrapper: AllTheProviders
|
|
39
|
+
}, options));
|
|
40
|
+
};
|
|
41
|
+
exports.render = customRender;
|
|
42
|
+
//# sourceMappingURL=test-utils.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-utils.cjs","names":["_react","_interopRequireDefault","require","_react2","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_styledComponents","_jsxRuntime","ownKeys","e","r","t","getOwnPropertySymbols","o","filter","getOwnPropertyDescriptor","push","apply","_objectSpread","arguments","length","_defineProperty2","getOwnPropertyDescriptors","defineProperties","AllTheProviders","_ref","children","jsx","ThemeProvider","theme","customRender","ui","options","render","wrapper"],"sources":["../src/test-utils.tsx"],"sourcesContent":["import React, {ReactElement} from 'react'\r\nimport {render, RenderOptions} from '@testing-library/react'\r\nimport {ThemeProvider} from 'styled-components'\r\n\r\nconst AllTheProviders = ({children}: {children: React.ReactNode}) => {\r\n return (\r\n <ThemeProvider theme={{}}>\r\n {children}\r\n </ThemeProvider>\r\n )\r\n}\r\n\r\nconst customRender = (\r\n ui: ReactElement,\r\n options?: Omit<RenderOptions, 'wrapper'>,\r\n) => render(ui, {wrapper: AllTheProviders, ...options})\r\n\r\nexport * from '@testing-library/react'\r\nexport {customRender as render}"],"mappings":";;;;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AAgBAE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AA6B,gBAAA,CAAAd,CAAA,EAAAf,MAAA,CAAA4B,yBAAA,CAAAX,CAAA,KAAAH,OAAA,CAAAd,MAAA,CAAAiB,CAAA,GAAAf,OAAA,WAAAc,CAAA,IAAAhB,MAAA,CAAAS,cAAA,CAAAM,CAAA,EAAAC,CAAA,EAAAhB,MAAA,CAAAqB,wBAAA,CAAAJ,CAAA,EAAAD,CAAA,iBAAAD,CAAA;AAE/C,IAAMe,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAAgD;EAAA,IAA3CC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EAChC,oBACE,IAAAnB,WAAA,CAAAoB,GAAA,EAACrB,iBAAA,CAAAsB,aAAa;IAACC,KAAK,EAAE,CAAC,CAAE;IAAAH,QAAA,EACpBA;EAAQ,CACE,CAAC;AAEpB,CAAC;AAED,IAAMI,YAAY,GAAG,SAAfA,YAAYA,CAChBC,EAAgB,EAChBC,OAAwC;EAAA,OACrC,IAAAC,cAAM,EAACF,EAAE,EAAAb,aAAA;IAAGgB,OAAO,EAAEV;EAAe,GAAKQ,OAAO,CAAC,CAAC;AAAA;AAAA9B,OAAA,CAAA+B,MAAA,GAAAH,YAAA","ignoreList":[]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { RenderOptions } from '@testing-library/react';
|
|
3
|
+
declare const customRender: (ui: ReactElement, options?: Omit<RenderOptions, 'wrapper'>) => import("@testing-library/react").RenderResult<typeof import("@testing-library/dom/types/queries"), HTMLElement, HTMLElement>;
|
|
4
|
+
export * from '@testing-library/react';
|
|
5
|
+
export { customRender as render };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
2
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
3
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { render } from '@testing-library/react';
|
|
6
|
+
import { ThemeProvider } from 'styled-components';
|
|
7
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
|
+
var AllTheProviders = function AllTheProviders(_ref) {
|
|
9
|
+
var children = _ref.children;
|
|
10
|
+
return /*#__PURE__*/_jsx(ThemeProvider, {
|
|
11
|
+
theme: {},
|
|
12
|
+
children: children
|
|
13
|
+
});
|
|
14
|
+
};
|
|
15
|
+
var customRender = function customRender(ui, options) {
|
|
16
|
+
return render(ui, _objectSpread({
|
|
17
|
+
wrapper: AllTheProviders
|
|
18
|
+
}, options));
|
|
19
|
+
};
|
|
20
|
+
export * from '@testing-library/react';
|
|
21
|
+
export { customRender as render };
|
|
22
|
+
//# sourceMappingURL=test-utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"test-utils.js","names":["React","render","ThemeProvider","jsx","_jsx","AllTheProviders","_ref","children","theme","customRender","ui","options","_objectSpread","wrapper"],"sources":["../src/test-utils.tsx"],"sourcesContent":["import React, {ReactElement} from 'react'\r\nimport {render, RenderOptions} from '@testing-library/react'\r\nimport {ThemeProvider} from 'styled-components'\r\n\r\nconst AllTheProviders = ({children}: {children: React.ReactNode}) => {\r\n return (\r\n <ThemeProvider theme={{}}>\r\n {children}\r\n </ThemeProvider>\r\n )\r\n}\r\n\r\nconst customRender = (\r\n ui: ReactElement,\r\n options?: Omit<RenderOptions, 'wrapper'>,\r\n) => render(ui, {wrapper: AllTheProviders, ...options})\r\n\r\nexport * from '@testing-library/react'\r\nexport {customRender as render}"],"mappings":";;;AAAA,OAAOA,KAAK,MAAsB,OAAO;AACzC,SAAQC,MAAM,QAAsB,wBAAwB;AAC5D,SAAQC,aAAa,QAAO,mBAAmB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAE/C,IAAMC,eAAe,GAAG,SAAlBA,eAAeA,CAAAC,IAAA,EAAgD;EAAA,IAA3CC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;EAChC,oBACEH,IAAA,CAACF,aAAa;IAACM,KAAK,EAAE,CAAC,CAAE;IAAAD,QAAA,EACpBA;EAAQ,CACE,CAAC;AAEpB,CAAC;AAED,IAAME,YAAY,GAAG,SAAfA,YAAYA,CAChBC,EAAgB,EAChBC,OAAwC;EAAA,OACrCV,MAAM,CAACS,EAAE,EAAAE,aAAA;IAAGC,OAAO,EAAER;EAAe,GAAKM,OAAO,CAAC,CAAC;AAAA;AAEvD,cAAc,wBAAwB;AACtC,SAAQF,YAAY,IAAIR,MAAM","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@laerdal/life-react-components",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0-dev.1.full",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Erik Martirosyan <erik.martirosyan@laerdal.com>",
|
|
6
6
|
"contributors": [],
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"license": "UNLICENSED",
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
12
|
-
"url": "https://
|
|
12
|
+
"url": "https://github.com/Laerdal-Medical/dcs-life-react-js"
|
|
13
13
|
},
|
|
14
14
|
"main": "dist/index.cjs",
|
|
15
15
|
"module": "dist/index.js",
|
|
@@ -34,10 +34,15 @@
|
|
|
34
34
|
"develop": "yarn build:babel:esm --skip-initial-build --watch --verbose",
|
|
35
35
|
"test": "jest src/",
|
|
36
36
|
"test:coverage": "jest --collectCoverage src/",
|
|
37
|
-
"test-watch": "jest --watch"
|
|
37
|
+
"test-watch": "jest --watch",
|
|
38
|
+
"storybook": "storybook dev -p 6006",
|
|
39
|
+
"build-storybook": "storybook build"
|
|
38
40
|
},
|
|
39
41
|
"eslintConfig": {
|
|
40
|
-
"extends":
|
|
42
|
+
"extends": [
|
|
43
|
+
"react-app",
|
|
44
|
+
"plugin:storybook/recommended"
|
|
45
|
+
]
|
|
41
46
|
},
|
|
42
47
|
"browserslist": {
|
|
43
48
|
"production": [
|
|
@@ -51,11 +56,15 @@
|
|
|
51
56
|
"last 1 safari version"
|
|
52
57
|
]
|
|
53
58
|
},
|
|
59
|
+
"omlet": {
|
|
60
|
+
"exports": {
|
|
61
|
+
".": "src/index.ts"
|
|
62
|
+
}
|
|
63
|
+
},
|
|
54
64
|
"dependencies": {
|
|
55
65
|
"@babel/runtime": "^7.19.0",
|
|
56
66
|
"@laerdal/figma-svg": "^5.0.0",
|
|
57
67
|
"@types/node": "^18.0.6",
|
|
58
|
-
"@types/react": "^18.0.28",
|
|
59
68
|
"animated-scroll-to": "^2.3.0",
|
|
60
69
|
"dayjs": "^1.11.5",
|
|
61
70
|
"nanoid": "3.3.4",
|
|
@@ -64,11 +73,11 @@
|
|
|
64
73
|
"react-dom": "^18.2.0",
|
|
65
74
|
"react-inlinesvg": "^3.0.0",
|
|
66
75
|
"react-modal": "^3.15.1",
|
|
76
|
+
"react-quill": "^2.0.0",
|
|
67
77
|
"react-resize-detector": "^7.1.2",
|
|
68
78
|
"rooks": "^7.1.1",
|
|
69
79
|
"styled-components": "^5.3.5",
|
|
70
|
-
"typescript": "^4.8.2"
|
|
71
|
-
"react-quill": "^2.0.0"
|
|
80
|
+
"typescript": "^4.8.2"
|
|
72
81
|
},
|
|
73
82
|
"devDependencies": {
|
|
74
83
|
"@babel/cli": "^7.18.10",
|
|
@@ -81,12 +90,24 @@
|
|
|
81
90
|
"@babel/preset-react": "^7.18.6",
|
|
82
91
|
"@babel/preset-typescript": "^7.18.6",
|
|
83
92
|
"@babel/runtime": "^7.19.0",
|
|
93
|
+
"@chromatic-com/storybook": "1.4.0",
|
|
94
|
+
"@laerdal/navigation": "^3.2.0",
|
|
95
|
+
"@storybook/addon-essentials": "^8.1.3",
|
|
96
|
+
"@storybook/addon-interactions": "^8.1.3",
|
|
97
|
+
"@storybook/addon-links": "^8.1.3",
|
|
98
|
+
"@storybook/addon-onboarding": "^8.1.3",
|
|
99
|
+
"@storybook/addon-webpack5-compiler-swc": "1.0.2",
|
|
100
|
+
"@storybook/addons": "^7.6.17",
|
|
101
|
+
"@storybook/blocks": "^8.1.3",
|
|
102
|
+
"@storybook/react": "^8.1.3",
|
|
103
|
+
"@storybook/react-webpack5": "^8.1.3",
|
|
104
|
+
"@storybook/test": "^8.1.3",
|
|
84
105
|
"@testing-library/jest-dom": "^5.16.5",
|
|
85
106
|
"@testing-library/react": "13.4.0",
|
|
86
107
|
"@testing-library/user-event": "^14.4.3",
|
|
87
108
|
"@types/jest": "^29.2.3",
|
|
88
109
|
"@types/node": "^18.0.6",
|
|
89
|
-
"@types/react": "^18.
|
|
110
|
+
"@types/react": "^18.3.3",
|
|
90
111
|
"@types/react-datepicker": "^4.4.2",
|
|
91
112
|
"@types/react-modal": "^3.13.1",
|
|
92
113
|
"@types/react-router-dom": "^5.3.3",
|
|
@@ -95,7 +116,7 @@
|
|
|
95
116
|
"babel-plugin-typescript-to-proptypes": "^2.0.0",
|
|
96
117
|
"concurrently": "^5.2.0",
|
|
97
118
|
"cross-env": "^7.0.3",
|
|
98
|
-
"
|
|
119
|
+
"eslint-plugin-storybook": "^0.8.0",
|
|
99
120
|
"history": "^5.3.0",
|
|
100
121
|
"jest": "^29.3.1",
|
|
101
122
|
"jest-environment-jsdom": "^29.2.1",
|
|
@@ -103,7 +124,9 @@
|
|
|
103
124
|
"jest-svg-transformer": "^1.0.0",
|
|
104
125
|
"react-router": "^6.3.0",
|
|
105
126
|
"react-router-dom": "^6.3.0",
|
|
127
|
+
"react-share": "^5.1.0",
|
|
106
128
|
"regenerator-runtime": "^0.13.9",
|
|
129
|
+
"storybook": "^8.1.3",
|
|
107
130
|
"ts-jest": "^29.0.3"
|
|
108
131
|
},
|
|
109
132
|
"peerDependencies": {
|
|
@@ -113,6 +136,7 @@
|
|
|
113
136
|
"react-router-dom": "^6"
|
|
114
137
|
},
|
|
115
138
|
"resolutions": {
|
|
116
|
-
"date-fns": "2.24.0"
|
|
139
|
+
"date-fns": "2.24.0",
|
|
140
|
+
"@types/react": "18.3.3"
|
|
117
141
|
}
|
|
118
142
|
}
|