@pingux/astro 1.32.1-alpha.7 → 1.33.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +17 -0
- package/lib/cjs/components/AccordionGridItem/AccordionGridItem.js +4 -1
- package/lib/cjs/components/Text/Text.stories.js +395 -74
- package/lib/cjs/styles/variants/accordion.js +27 -6
- package/lib/cjs/styles/variants/text.js +44 -18
- package/lib/components/AccordionGridItem/AccordionGridItem.js +4 -1
- package/lib/components/Text/Text.stories.js +391 -63
- package/lib/styles/variants/accordion.js +17 -6
- package/lib/styles/variants/text.js +44 -18
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,23 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [1.32.1](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.32.0...@pingux/astro@1.32.1) (2022-10-25)
|
7
|
+
|
8
|
+
|
9
|
+
### Bug Fixes
|
10
|
+
|
11
|
+
* [UIP-5724] Add alt text to user icon in storybook ([a4dd785](https://gitlab.corp.pingidentity.com/ux/pingux/commit/a4dd7854573a3704ddef75178ceab0141fd9b158))
|
12
|
+
* [UIP-5727] Fix and update conditional filter recipe ([904a44b](https://gitlab.corp.pingidentity.com/ux/pingux/commit/904a44bd9971afced3f49cd525c5c4fb7a130f1a))
|
13
|
+
* [UIP-5754] ListView - fix infinity list keyboard navigation ([33275f0](https://gitlab.corp.pingidentity.com/ux/pingux/commit/33275f0bf9f7b40301b3ca6c233b91b7d98f9e7f))
|
14
|
+
* [UIP-5759] Selection shift fix for Logo Tabs recipe ([97490cd](https://gitlab.corp.pingidentity.com/ux/pingux/commit/97490cd7ac37140edb33067531d2e75e506e9bf6))
|
15
|
+
* [UIP-5763] Fix stepper contrast issue ([adb17f7](https://gitlab.corp.pingidentity.com/ux/pingux/commit/adb17f7e51869fcfaf8d748ee44631defedd12f7))
|
16
|
+
* [UIP-5771] ComboBox Fix Focus of Items ([63a6431](https://gitlab.corp.pingidentity.com/ux/pingux/commit/63a6431a9f36cf12596ce542cd2d325401d81d4f))
|
17
|
+
* [UIP-5788] Fix popover for combobox and multivalues field components ([e993be8](https://gitlab.corp.pingidentity.com/ux/pingux/commit/e993be8d86a850c66f8aa126b819591791487ef0))
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
|
6
23
|
# [1.32.0](https://gitlab.corp.pingidentity.com/ux/pingux/compare/@pingux/astro@1.31.1...@pingux/astro@1.32.0) (2022-10-19)
|
7
24
|
|
8
25
|
|
@@ -101,9 +101,12 @@ var AccordionGridItem = function AccordionGridItem(props) {
|
|
101
101
|
delete rowProps.onPointerDown;
|
102
102
|
delete rowProps.onClick;
|
103
103
|
return (0, _react2.jsx)(_Box["default"], (0, _extends2["default"])({
|
104
|
-
as: "div"
|
104
|
+
as: "div",
|
105
|
+
role: "row",
|
106
|
+
tabindex: "0"
|
105
107
|
}, (0, _utils.mergeProps)(rowProps, others), {
|
106
108
|
"aria-selected": isSelected,
|
109
|
+
"aria-expanded": isSelected,
|
107
110
|
className: classNames,
|
108
111
|
variant: "accordion.accordionGridItem",
|
109
112
|
ref: rowRef
|
@@ -10,109 +10,430 @@ _Object$defineProperty(exports, "__esModule", {
|
|
10
10
|
|
11
11
|
exports["default"] = exports.WithCustomWidth = exports.TypographyStyleProps = exports.Default = void 0;
|
12
12
|
|
13
|
-
var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
|
14
|
-
|
15
|
-
var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/objectWithoutProperties"));
|
16
|
-
|
17
13
|
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
|
18
14
|
|
19
|
-
var
|
20
|
-
|
21
|
-
var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
|
15
|
+
var _entries = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/object/entries"));
|
22
16
|
|
23
|
-
var
|
17
|
+
var _map = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/map"));
|
24
18
|
|
25
19
|
var _react = _interopRequireDefault(require("react"));
|
26
20
|
|
27
|
-
var _themeUi = require("theme-ui");
|
28
|
-
|
29
|
-
var _Text = _interopRequireDefault(require("./Text"));
|
30
|
-
|
31
|
-
var _variants = require("../../utils/devUtils/constants/variants.js");
|
32
|
-
|
33
|
-
var _colors = require("../../styles/colors.js");
|
34
|
-
|
35
21
|
var _index = require("../../index");
|
36
22
|
|
37
23
|
var _react2 = require("@emotion/react");
|
38
24
|
|
39
|
-
var _excluded = ["children", "bg"];
|
40
|
-
|
41
|
-
var _context;
|
42
|
-
|
43
25
|
var _default = {
|
44
26
|
title: 'Text',
|
45
|
-
component:
|
27
|
+
component: _index.Text,
|
46
28
|
argTypes: {
|
47
29
|
variant: {
|
48
30
|
control: {
|
49
|
-
type: '
|
50
|
-
options: (0, _values["default"])(_variants.textVariants)
|
31
|
+
type: 'none'
|
51
32
|
},
|
52
|
-
description: 'Text variant.'
|
53
|
-
defaultValue: (0, _values["default"])(_variants.textVariants)[0]
|
33
|
+
description: 'Text variant.'
|
54
34
|
},
|
55
35
|
children: {
|
56
36
|
control: {
|
57
|
-
type: '
|
58
|
-
},
|
59
|
-
table: {
|
60
|
-
type: {
|
61
|
-
summary: 'string'
|
62
|
-
}
|
37
|
+
type: 'none'
|
63
38
|
},
|
64
|
-
description: 'Text value.'
|
65
|
-
defaultValue: 'Hi, this is some text!'
|
39
|
+
description: 'Text value.'
|
66
40
|
},
|
67
41
|
color: {
|
68
42
|
control: {
|
69
|
-
type: '
|
70
|
-
options: (0, _concat["default"])(_context = [undefined]).call(_context, (0, _map["default"])(_colors.flatColorList).call(_colors.flatColorList, function (_ref) {
|
71
|
-
var _ref2 = (0, _slicedToArray2["default"])(_ref, 1),
|
72
|
-
colorName = _ref2[0];
|
73
|
-
|
74
|
-
return colorName;
|
75
|
-
}))
|
76
|
-
},
|
77
|
-
table: {
|
78
|
-
type: {
|
79
|
-
summary: 'string'
|
80
|
-
}
|
43
|
+
type: 'none'
|
81
44
|
},
|
82
|
-
description: 'Text color.'
|
83
|
-
defaultValue: undefined
|
45
|
+
description: 'Text color.'
|
84
46
|
},
|
85
47
|
bg: {
|
86
48
|
control: {
|
87
|
-
type: '
|
88
|
-
options: (0, _map["default"])(_colors.flatColorList).call(_colors.flatColorList, function (_ref3) {
|
89
|
-
var _ref4 = (0, _slicedToArray2["default"])(_ref3, 1),
|
90
|
-
colorName = _ref4[0];
|
91
|
-
|
92
|
-
return colorName;
|
93
|
-
})
|
94
|
-
},
|
95
|
-
table: {
|
96
|
-
type: {
|
97
|
-
summary: 'string'
|
98
|
-
}
|
49
|
+
type: 'none'
|
99
50
|
},
|
100
|
-
description: 'Background color.'
|
101
|
-
defaultValue: 'white'
|
51
|
+
description: 'Background color.'
|
102
52
|
}
|
103
53
|
}
|
104
54
|
};
|
105
55
|
exports["default"] = _default;
|
56
|
+
var sx = {
|
57
|
+
cell: {
|
58
|
+
wordWrap: 'break-word',
|
59
|
+
wordBreak: 'break-word'
|
60
|
+
},
|
61
|
+
tableBody: {
|
62
|
+
borderBottom: 'unset'
|
63
|
+
}
|
64
|
+
};
|
106
65
|
|
107
|
-
var
|
108
|
-
var
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
}),
|
66
|
+
var TableHeading = function TableHeading(_ref) {
|
67
|
+
var title = _ref.title;
|
68
|
+
return (0, _react2.jsx)(_index.TableHead, null, (0, _react2.jsx)(_index.TableRow, {
|
69
|
+
key: "head"
|
70
|
+
}, (0, _react2.jsx)(_index.TableCell, {
|
71
|
+
sx: sx.cell,
|
72
|
+
isHeading: true,
|
73
|
+
width: "30%"
|
74
|
+
}, title), (0, _react2.jsx)(_index.TableCell, {
|
75
|
+
sx: sx.cell,
|
76
|
+
isHeading: true,
|
77
|
+
width: "30%"
|
78
|
+
}, "Weight"), (0, _react2.jsx)(_index.TableCell, {
|
79
|
+
sx: sx.cell,
|
80
|
+
isHeading: true,
|
81
|
+
width: "30%"
|
82
|
+
}, "Size"), (0, _react2.jsx)(_index.TableCell, {
|
83
|
+
sx: sx.cell,
|
84
|
+
isHeading: true
|
85
|
+
}, "Example")));
|
86
|
+
};
|
87
|
+
|
88
|
+
var TableData = function TableData(_ref2) {
|
89
|
+
var variant = _ref2.variant,
|
90
|
+
value = _ref2.value;
|
91
|
+
return (0, _react2.jsx)(_index.TableRow, {
|
92
|
+
sx: {
|
93
|
+
backgroundColor: 'transparent !important',
|
94
|
+
alignItems: 'center'
|
95
|
+
}
|
96
|
+
}, (0, _react2.jsx)(_index.TableCell, {
|
97
|
+
sx: sx.cell,
|
98
|
+
width: "30%"
|
99
|
+
}, (0, _react2.jsx)(_index.Text, null, variant)), (0, _react2.jsx)(_index.TableCell, {
|
100
|
+
sx: sx.cell,
|
101
|
+
width: "30%"
|
102
|
+
}, (0, _react2.jsx)(_index.Text, null, value.weight)), (0, _react2.jsx)(_index.TableCell, {
|
103
|
+
sx: sx.cell,
|
104
|
+
width: "30%"
|
105
|
+
}, (0, _react2.jsx)(_index.Text, null, value.fontSize)), (0, _react2.jsx)(_index.TableCell, {
|
106
|
+
sx: sx.cell
|
107
|
+
}, (0, _react2.jsx)(_index.Text, null, value.example)));
|
108
|
+
};
|
109
|
+
|
110
|
+
var Default = function Default() {
|
111
|
+
var _context, _context2, _context3, _context4, _context5, _context6;
|
112
|
+
|
113
|
+
var fontSizes = {
|
114
|
+
xx: '23px (xx)',
|
115
|
+
lg: '17px (lg)',
|
116
|
+
md: '15px (md)',
|
117
|
+
sm: '13px (sm)',
|
118
|
+
xs: '11px (xs)'
|
119
|
+
};
|
120
|
+
var fontWeights = {
|
121
|
+
'-1': '300 (-1)',
|
122
|
+
'0': '400 (0)',
|
123
|
+
'1': '500 (1)',
|
124
|
+
'3': '700 (3)'
|
125
|
+
};
|
126
|
+
var headingVariants = {
|
127
|
+
H1: {
|
128
|
+
weight: fontWeights[3],
|
129
|
+
fontSize: fontSizes.xx,
|
130
|
+
example: (0, _react2.jsx)(_index.Text, {
|
131
|
+
variant: "H1",
|
132
|
+
as: "H1"
|
133
|
+
}, '<Text variant="H1" as="H1"/>')
|
134
|
+
},
|
135
|
+
H2: {
|
136
|
+
weight: fontWeights[3],
|
137
|
+
fontSize: fontSizes.lg,
|
138
|
+
example: (0, _react2.jsx)(_index.Text, {
|
139
|
+
variant: "H2",
|
140
|
+
as: "H2"
|
141
|
+
}, '<Text variant="H2" as="H2"/>')
|
142
|
+
},
|
143
|
+
H3: {
|
144
|
+
weight: fontWeights[3],
|
145
|
+
fontSize: fontSizes.md,
|
146
|
+
example: (0, _react2.jsx)(_index.Text, {
|
147
|
+
variant: "H3",
|
148
|
+
as: "H3"
|
149
|
+
}, '<Text variant="H3" as="H3"/>')
|
150
|
+
},
|
151
|
+
H4: {
|
152
|
+
weight: fontWeights[3],
|
153
|
+
fontSize: fontSizes.sm,
|
154
|
+
example: (0, _react2.jsx)(_index.Text, {
|
155
|
+
variant: "H4",
|
156
|
+
as: "H4"
|
157
|
+
}, '<Text variant="H4" as="H4"/>')
|
158
|
+
}
|
159
|
+
};
|
160
|
+
var baseAndSubtitleVariants = {
|
161
|
+
'Base (default variant of Text)': {
|
162
|
+
weight: fontWeights[1],
|
163
|
+
fontSize: fontSizes.md,
|
164
|
+
color: 'text.primary',
|
165
|
+
example: (0, _react2.jsx)(_index.Text, {
|
166
|
+
variant: "base"
|
167
|
+
}, '<Text variant="base"/>')
|
168
|
+
},
|
169
|
+
Subtitle: {
|
170
|
+
weight: fontWeights[0],
|
171
|
+
fontSize: fontSizes.sm,
|
172
|
+
color: 'text.secondary',
|
173
|
+
example: (0, _react2.jsx)(_index.Text, {
|
174
|
+
variant: "subtitle"
|
175
|
+
}, '<Text variant="subtitle"/>')
|
176
|
+
}
|
177
|
+
};
|
178
|
+
var largeVariants = {
|
179
|
+
Bold: {
|
180
|
+
weight: fontWeights[3],
|
181
|
+
fontSize: fontSizes.lg,
|
182
|
+
example: (0, _react2.jsx)(_index.Text, {
|
183
|
+
fontSize: "lg",
|
184
|
+
fontWeight: "3"
|
185
|
+
}, '<Text fontSize="lg" fontWeight="3">')
|
186
|
+
},
|
187
|
+
Medium: {
|
188
|
+
weight: fontWeights[1],
|
189
|
+
fontSize: fontSizes.lg,
|
190
|
+
example: (0, _react2.jsx)(_index.Text, {
|
191
|
+
fontSize: "lg",
|
192
|
+
fontWeight: "1"
|
193
|
+
}, '<Text fontSize="lg" fontWeight="1">')
|
194
|
+
},
|
195
|
+
Regular: {
|
196
|
+
weight: fontWeights[0],
|
197
|
+
fontSize: fontSizes.lg,
|
198
|
+
example: (0, _react2.jsx)(_index.Text, {
|
199
|
+
fontSize: "lg",
|
200
|
+
fontWeight: "0"
|
201
|
+
}, '<Text fontSize="lg" fontWeight="0">')
|
202
|
+
}
|
203
|
+
};
|
204
|
+
var mediumVariants = {
|
205
|
+
Bold: {
|
206
|
+
weight: fontWeights[3],
|
207
|
+
fontSize: fontSizes.md,
|
208
|
+
example: (0, _react2.jsx)(_index.Text, {
|
209
|
+
fontSize: "md",
|
210
|
+
fontWeight: "3"
|
211
|
+
}, '<Text fontSize="md" fontWeight="3">')
|
212
|
+
},
|
213
|
+
Medium: {
|
214
|
+
weight: fontWeights[1],
|
215
|
+
fontSize: fontSizes.md,
|
216
|
+
example: (0, _react2.jsx)(_index.Text, {
|
217
|
+
fontSize: "md",
|
218
|
+
fontWeight: "1"
|
219
|
+
}, '<Text fontSize="md" fontWeight="1">')
|
220
|
+
},
|
221
|
+
Regular: {
|
222
|
+
weight: fontWeights[0],
|
223
|
+
fontSize: fontSizes.md,
|
224
|
+
example: (0, _react2.jsx)(_index.Text, {
|
225
|
+
fontSize: "md",
|
226
|
+
fontWeight: "0"
|
227
|
+
}, '<Text fontSize="md" fontWeight="0">')
|
228
|
+
},
|
229
|
+
Light: {
|
230
|
+
weight: fontWeights[-1],
|
231
|
+
fontSize: fontSizes.md,
|
232
|
+
example: (0, _react2.jsx)(_index.Text, {
|
233
|
+
fontSize: "md",
|
234
|
+
fontWeight: "-1"
|
235
|
+
}, '<Text fontSize="md" fontWeight="-1">')
|
236
|
+
}
|
237
|
+
};
|
238
|
+
var smallVariants = {
|
239
|
+
Bold: {
|
240
|
+
weight: fontWeights[3],
|
241
|
+
fontSize: fontSizes.sm,
|
242
|
+
example: (0, _react2.jsx)(_index.Text, {
|
243
|
+
fontSize: "sm",
|
244
|
+
fontWeight: "3"
|
245
|
+
}, '<Text fontSize="sm" fontWeight="3">')
|
246
|
+
},
|
247
|
+
Medium: {
|
248
|
+
weight: fontWeights[1],
|
249
|
+
fontSize: fontSizes.sm,
|
250
|
+
example: (0, _react2.jsx)(_index.Text, {
|
251
|
+
fontSize: "sm",
|
252
|
+
fontWeight: "1"
|
253
|
+
}, '<Text fontSize="sm" fontWeight="1">')
|
254
|
+
},
|
255
|
+
Regular: {
|
256
|
+
weight: fontWeights[0],
|
257
|
+
fontSize: fontSizes.sm,
|
258
|
+
example: (0, _react2.jsx)(_index.Text, {
|
259
|
+
fontSize: "sm",
|
260
|
+
fontWeight: "0"
|
261
|
+
}, '<Text fontSize="sm" fontWeight="0">')
|
262
|
+
},
|
263
|
+
Light: {
|
264
|
+
weight: fontWeights[-1],
|
265
|
+
fontSize: fontSizes.sm,
|
266
|
+
example: (0, _react2.jsx)(_index.Text, {
|
267
|
+
fontSize: "sm",
|
268
|
+
fontWeight: "-1"
|
269
|
+
}, '<Text fontSize="sm" fontWeight="-1">')
|
270
|
+
}
|
271
|
+
};
|
272
|
+
var xsmallVariants = {
|
273
|
+
Bold: {
|
274
|
+
weight: fontWeights[3],
|
275
|
+
fontSize: fontSizes.xs,
|
276
|
+
example: (0, _react2.jsx)(_index.Text, {
|
277
|
+
fontSize: "xs",
|
278
|
+
fontWeight: "3"
|
279
|
+
}, '<Text fontSize="xs" fontWeight="3">')
|
280
|
+
},
|
281
|
+
Medium: {
|
282
|
+
weight: fontWeights[1],
|
283
|
+
fontSize: fontSizes.xs,
|
284
|
+
example: (0, _react2.jsx)(_index.Text, {
|
285
|
+
fontSize: "xs",
|
286
|
+
fontWeight: "1"
|
287
|
+
}, '<Text fontSize="xs" fontWeight="1">')
|
288
|
+
},
|
289
|
+
Regular: {
|
290
|
+
weight: fontWeights[0],
|
291
|
+
fontSize: fontSizes.xs,
|
292
|
+
example: (0, _react2.jsx)(_index.Text, {
|
293
|
+
fontSize: "xs",
|
294
|
+
fontWeight: "0"
|
295
|
+
}, '<Text fontSize="xs" fontWeight="0">')
|
296
|
+
},
|
297
|
+
Light: {
|
298
|
+
weight: fontWeights[-1],
|
299
|
+
fontSize: fontSizes.xs,
|
300
|
+
example: (0, _react2.jsx)(_index.Text, {
|
301
|
+
fontSize: "xs",
|
302
|
+
fontWeight: "-1"
|
303
|
+
}, '<Text fontSize="xs" fontWeight="-1">')
|
304
|
+
}
|
305
|
+
};
|
306
|
+
return (0, _react2.jsx)(_react["default"].Fragment, null, (0, _react2.jsx)(_index.Table, {
|
307
|
+
mb: "xx"
|
308
|
+
}, (0, _react2.jsx)(TableHeading, {
|
309
|
+
title: "Heading"
|
310
|
+
}), (0, _react2.jsx)(_index.TableBody, {
|
311
|
+
sx: sx.tableBody
|
312
|
+
}, (0, _map["default"])(_context = (0, _entries["default"])(headingVariants)).call(_context, function (_ref3) {
|
313
|
+
var _ref4 = (0, _slicedToArray2["default"])(_ref3, 2),
|
314
|
+
key = _ref4[0],
|
315
|
+
value = _ref4[1];
|
316
|
+
|
317
|
+
return (0, _react2.jsx)(TableData, {
|
318
|
+
variant: key,
|
319
|
+
value: value,
|
320
|
+
key: key
|
321
|
+
});
|
322
|
+
}))), (0, _react2.jsx)(_index.Table, {
|
323
|
+
mb: "xx"
|
324
|
+
}, (0, _react2.jsx)(_index.TableHead, null, (0, _react2.jsx)(_index.TableRow, {
|
325
|
+
key: "head"
|
326
|
+
}, (0, _react2.jsx)(_index.TableCell, {
|
327
|
+
sx: sx.cell,
|
328
|
+
isHeading: true,
|
329
|
+
width: "60%"
|
330
|
+
}, "Base and Subtitle"), (0, _react2.jsx)(_index.TableCell, {
|
331
|
+
sx: sx.cell,
|
332
|
+
isHeading: true,
|
333
|
+
width: "20%"
|
334
|
+
}, "Weight"), (0, _react2.jsx)(_index.TableCell, {
|
335
|
+
sx: sx.cell,
|
336
|
+
isHeading: true,
|
337
|
+
width: "30%"
|
338
|
+
}, "Size"), (0, _react2.jsx)(_index.TableCell, {
|
339
|
+
sx: sx.cell,
|
340
|
+
isHeading: true,
|
341
|
+
width: "40%"
|
342
|
+
}, "Color"), (0, _react2.jsx)(_index.TableCell, {
|
343
|
+
sx: sx.cell,
|
344
|
+
isHeading: true
|
345
|
+
}, "Example"))), (0, _react2.jsx)(_index.TableBody, {
|
346
|
+
sx: sx.tableBody
|
347
|
+
}, (0, _map["default"])(_context2 = (0, _entries["default"])(baseAndSubtitleVariants)).call(_context2, function (_ref5) {
|
348
|
+
var _ref6 = (0, _slicedToArray2["default"])(_ref5, 2),
|
349
|
+
key = _ref6[0],
|
350
|
+
value = _ref6[1];
|
351
|
+
|
352
|
+
return (0, _react2.jsx)(_index.TableRow, {
|
353
|
+
sx: {
|
354
|
+
backgroundColor: 'transparent !important'
|
355
|
+
},
|
356
|
+
key: key
|
357
|
+
}, (0, _react2.jsx)(_index.TableCell, {
|
358
|
+
sx: sx.cell,
|
359
|
+
width: "60%"
|
360
|
+
}, (0, _react2.jsx)(_index.Text, null, key)), (0, _react2.jsx)(_index.TableCell, {
|
361
|
+
sx: sx.cell,
|
362
|
+
width: "25%"
|
363
|
+
}, (0, _react2.jsx)(_index.Text, null, value.weight)), (0, _react2.jsx)(_index.TableCell, {
|
364
|
+
sx: sx.cell,
|
365
|
+
width: "35%"
|
366
|
+
}, (0, _react2.jsx)(_index.Text, null, value.fontSize)), (0, _react2.jsx)(_index.TableCell, {
|
367
|
+
sx: sx.cell,
|
368
|
+
width: "45%"
|
369
|
+
}, (0, _react2.jsx)(_index.Text, null, value.color)), (0, _react2.jsx)(_index.TableCell, {
|
370
|
+
sx: sx.cell
|
371
|
+
}, value.example));
|
372
|
+
}))), (0, _react2.jsx)(_index.Table, {
|
373
|
+
mb: "xx"
|
374
|
+
}, (0, _react2.jsx)(TableHeading, {
|
375
|
+
title: "Large"
|
376
|
+
}), (0, _react2.jsx)(_index.TableBody, {
|
377
|
+
sx: sx.tableBody
|
378
|
+
}, (0, _map["default"])(_context3 = (0, _entries["default"])(largeVariants)).call(_context3, function (_ref7) {
|
379
|
+
var _ref8 = (0, _slicedToArray2["default"])(_ref7, 2),
|
380
|
+
key = _ref8[0],
|
381
|
+
value = _ref8[1];
|
382
|
+
|
383
|
+
return (0, _react2.jsx)(TableData, {
|
384
|
+
variant: key,
|
385
|
+
value: value,
|
386
|
+
key: key
|
387
|
+
});
|
388
|
+
}))), (0, _react2.jsx)(_index.Table, {
|
389
|
+
mb: "xx"
|
390
|
+
}, (0, _react2.jsx)(TableHeading, {
|
391
|
+
title: "Medium"
|
392
|
+
}), (0, _react2.jsx)(_index.TableBody, {
|
393
|
+
sx: sx.tableBody
|
394
|
+
}, (0, _map["default"])(_context4 = (0, _entries["default"])(mediumVariants)).call(_context4, function (_ref9) {
|
395
|
+
var _ref10 = (0, _slicedToArray2["default"])(_ref9, 2),
|
396
|
+
key = _ref10[0],
|
397
|
+
value = _ref10[1];
|
398
|
+
|
399
|
+
return (0, _react2.jsx)(TableData, {
|
400
|
+
variant: key,
|
401
|
+
value: value,
|
402
|
+
key: key
|
403
|
+
});
|
404
|
+
}))), (0, _react2.jsx)(_index.Table, {
|
405
|
+
mb: "xx"
|
406
|
+
}, (0, _react2.jsx)(TableHeading, {
|
407
|
+
title: "Small"
|
408
|
+
}), (0, _react2.jsx)(_index.TableBody, {
|
409
|
+
sx: sx.tableBody
|
410
|
+
}, (0, _map["default"])(_context5 = (0, _entries["default"])(smallVariants)).call(_context5, function (_ref11) {
|
411
|
+
var _ref12 = (0, _slicedToArray2["default"])(_ref11, 2),
|
412
|
+
key = _ref12[0],
|
413
|
+
value = _ref12[1];
|
414
|
+
|
415
|
+
return (0, _react2.jsx)(TableData, {
|
416
|
+
variant: key,
|
417
|
+
value: value,
|
418
|
+
key: key
|
419
|
+
});
|
420
|
+
}))), (0, _react2.jsx)(_index.Table, {
|
421
|
+
mb: "xx"
|
422
|
+
}, (0, _react2.jsx)(TableHeading, {
|
423
|
+
title: "XSmall"
|
424
|
+
}), (0, _react2.jsx)(_index.TableBody, {
|
425
|
+
sx: sx.tableBody
|
426
|
+
}, (0, _map["default"])(_context6 = (0, _entries["default"])(xsmallVariants)).call(_context6, function (_ref13) {
|
427
|
+
var _ref14 = (0, _slicedToArray2["default"])(_ref13, 2),
|
428
|
+
key = _ref14[0],
|
429
|
+
value = _ref14[1];
|
430
|
+
|
431
|
+
return (0, _react2.jsx)(TableData, {
|
432
|
+
variant: key,
|
433
|
+
value: value,
|
434
|
+
key: key
|
435
|
+
});
|
436
|
+
}))));
|
116
437
|
};
|
117
438
|
|
118
439
|
exports.Default = Default;
|
@@ -120,7 +441,7 @@ exports.Default = Default;
|
|
120
441
|
var WithCustomWidth = function WithCustomWidth() {
|
121
442
|
return (0, _react2.jsx)(_index.Box, {
|
122
443
|
width: 200
|
123
|
-
}, (0, _react2.jsx)(
|
444
|
+
}, (0, _react2.jsx)(_index.Text, {
|
124
445
|
p: "xl"
|
125
446
|
}, "superlongtextinonelinewithnowhitespacessoitcanbelongerthatanywidth"));
|
126
447
|
};
|
@@ -141,11 +462,11 @@ var TypographyStyleProps = function TypographyStyleProps() {
|
|
141
462
|
return (0, _react2.jsx)(_index.Box, {
|
142
463
|
p: "xx",
|
143
464
|
gap: "md"
|
144
|
-
}, (0, _react2.jsx)(
|
465
|
+
}, (0, _react2.jsx)(_index.Text, {
|
145
466
|
variant: "title"
|
146
|
-
}, "The Text component allows typography style props to be passed in directly."), (0, _react2.jsx)(
|
467
|
+
}, "The Text component allows typography style props to be passed in directly."), (0, _react2.jsx)(_index.Text, textProps, loremText), (0, _react2.jsx)(_index.Separator, null), (0, _react2.jsx)(_index.Text, {
|
147
468
|
variant: "title"
|
148
|
-
}, "Typography styles can also be passed in through the sx prop for the same result."), (0, _react2.jsx)(
|
469
|
+
}, "Typography styles can also be passed in through the sx prop for the same result."), (0, _react2.jsx)(_index.Text, {
|
149
470
|
sx: textProps
|
150
471
|
}, loremText));
|
151
472
|
};
|
@@ -1,12 +1,37 @@
|
|
1
1
|
"use strict";
|
2
2
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
|
4
|
+
|
3
5
|
var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
|
4
6
|
|
7
|
+
var _Object$defineProperties = require("@babel/runtime-corejs3/core-js-stable/object/define-properties");
|
8
|
+
|
9
|
+
var _Object$getOwnPropertyDescriptors = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors");
|
10
|
+
|
11
|
+
var _forEachInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/for-each");
|
12
|
+
|
13
|
+
var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
|
14
|
+
|
15
|
+
var _filterInstanceProperty = require("@babel/runtime-corejs3/core-js-stable/instance/filter");
|
16
|
+
|
17
|
+
var _Object$getOwnPropertySymbols = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols");
|
18
|
+
|
19
|
+
var _Object$keys = require("@babel/runtime-corejs3/core-js-stable/object/keys");
|
20
|
+
|
5
21
|
_Object$defineProperty(exports, "__esModule", {
|
6
22
|
value: true
|
7
23
|
});
|
8
24
|
|
9
25
|
exports["default"] = void 0;
|
26
|
+
|
27
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
28
|
+
|
29
|
+
var _buttons = require("../variants/buttons");
|
30
|
+
|
31
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
32
|
+
|
33
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { (0, _defineProperty2["default"])(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
34
|
+
|
10
35
|
var accordionTitle = {
|
11
36
|
display: 'inline-block !important',
|
12
37
|
overflowWrap: 'break-word',
|
@@ -48,13 +73,9 @@ var accordionGridHeader = {
|
|
48
73
|
color: 'neutral.10',
|
49
74
|
flexGrow: 1,
|
50
75
|
fontWeight: 700,
|
51
|
-
'&.is-focused': {
|
52
|
-
outline: 'none',
|
53
|
-
boxShadow: 'focus',
|
54
|
-
WebkitBoxShadow: 'focus',
|
55
|
-
MozBoxShadow: 'focus',
|
76
|
+
'&.is-focused': _objectSpread(_objectSpread({}, _buttons.defaultFocus), {}, {
|
56
77
|
zIndex: '10'
|
57
|
-
},
|
78
|
+
}),
|
58
79
|
minHeight: '64px',
|
59
80
|
'&.is-hovered': {
|
60
81
|
backgroundColor: 'accent.99'
|
@@ -249,6 +249,28 @@ var timeZone = {
|
|
249
249
|
}
|
250
250
|
}
|
251
251
|
};
|
252
|
+
|
253
|
+
var title = _objectSpread(_objectSpread({}, wordWrap), {}, {
|
254
|
+
fontSize: 'xx',
|
255
|
+
fontWeight: 1,
|
256
|
+
color: 'text.primary',
|
257
|
+
fontFamily: 'standard'
|
258
|
+
});
|
259
|
+
|
260
|
+
var sectionTitle = _objectSpread(_objectSpread({}, wordWrap), {}, {
|
261
|
+
fontSize: 'lg',
|
262
|
+
fontWeight: 2,
|
263
|
+
color: 'text.primary',
|
264
|
+
fontFamily: 'standard'
|
265
|
+
});
|
266
|
+
|
267
|
+
var itemTitle = _objectSpread(_objectSpread({}, wordWrap), {}, {
|
268
|
+
fontSize: 'md',
|
269
|
+
fontWeight: 1,
|
270
|
+
color: 'text.primary',
|
271
|
+
fontFamily: 'standard'
|
272
|
+
});
|
273
|
+
|
252
274
|
var text = {
|
253
275
|
base: base,
|
254
276
|
bodyStrong: _objectSpread(_objectSpread({}, wordWrap), {}, {
|
@@ -290,17 +312,31 @@ var text = {
|
|
290
312
|
}),
|
291
313
|
environmentBreadcrumb: environmentBreadcrumb,
|
292
314
|
fieldHelperText: fieldHelperText,
|
315
|
+
H1: _objectSpread(_objectSpread({}, title), {}, {
|
316
|
+
fontWeight: 3,
|
317
|
+
lineHeight: '28px'
|
318
|
+
}),
|
319
|
+
H2: _objectSpread(_objectSpread({}, sectionTitle), {}, {
|
320
|
+
fontWeight: 3,
|
321
|
+
lineHeight: '21px'
|
322
|
+
}),
|
323
|
+
H3: _objectSpread(_objectSpread({}, itemTitle), {}, {
|
324
|
+
fontWeight: 3,
|
325
|
+
lineHeight: '18px'
|
326
|
+
}),
|
327
|
+
H4: _objectSpread(_objectSpread({}, wordWrap), {}, {
|
328
|
+
fontSize: 'sm',
|
329
|
+
fontWeight: 3,
|
330
|
+
color: 'text.primary',
|
331
|
+
fontFamily: 'standard',
|
332
|
+
lineHeight: '16px'
|
333
|
+
}),
|
293
334
|
inputValue: {
|
294
335
|
fontWeight: 1,
|
295
336
|
color: 'text.primary',
|
296
337
|
fontFamily: 'standard'
|
297
338
|
},
|
298
|
-
itemTitle:
|
299
|
-
fontSize: 'md',
|
300
|
-
fontWeight: 1,
|
301
|
-
color: 'text.primary',
|
302
|
-
fontFamily: 'standard'
|
303
|
-
}),
|
339
|
+
itemTitle: itemTitle,
|
304
340
|
itemSubtitle: _objectSpread(_objectSpread({}, wordWrap), {}, {
|
305
341
|
fontSize: 'sm',
|
306
342
|
fontWeight: 0,
|
@@ -340,12 +376,7 @@ var text = {
|
|
340
376
|
color: 'text.secondary',
|
341
377
|
fontFamily: 'standard'
|
342
378
|
},
|
343
|
-
sectionTitle:
|
344
|
-
fontSize: 'lg',
|
345
|
-
fontWeight: 2,
|
346
|
-
color: 'text.primary',
|
347
|
-
fontFamily: 'standard'
|
348
|
-
}),
|
379
|
+
sectionTitle: sectionTitle,
|
349
380
|
subtitle: _objectSpread(_objectSpread({}, wordWrap), {}, {
|
350
381
|
fontWeight: 0,
|
351
382
|
color: 'text.secondary',
|
@@ -363,12 +394,7 @@ var text = {
|
|
363
394
|
overflow: 'hidden',
|
364
395
|
textOverflow: 'ellipsis'
|
365
396
|
},
|
366
|
-
title:
|
367
|
-
fontSize: 'xx',
|
368
|
-
fontWeight: 1,
|
369
|
-
color: 'text.primary',
|
370
|
-
fontFamily: 'standard'
|
371
|
-
}),
|
397
|
+
title: title,
|
372
398
|
tooltipContent: tooltipContent,
|
373
399
|
timeZone: timeZone
|
374
400
|
};
|
@@ -64,9 +64,12 @@ var AccordionGridItem = function AccordionGridItem(props) {
|
|
64
64
|
delete rowProps.onPointerDown;
|
65
65
|
delete rowProps.onClick;
|
66
66
|
return ___EmotionJSX(Box, _extends({
|
67
|
-
as: "div"
|
67
|
+
as: "div",
|
68
|
+
role: "row",
|
69
|
+
tabindex: "0"
|
68
70
|
}, mergeProps(rowProps, others), {
|
69
71
|
"aria-selected": isSelected,
|
72
|
+
"aria-expanded": isSelected,
|
70
73
|
className: classNames,
|
71
74
|
variant: "accordion.accordionGridItem",
|
72
75
|
ref: rowRef
|
@@ -1,19 +1,8 @@
|
|
1
|
-
import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
|
2
|
-
import _objectWithoutProperties from "@babel/runtime-corejs3/helpers/esm/objectWithoutProperties";
|
3
1
|
import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
2
|
+
import _Object$entries from "@babel/runtime-corejs3/core-js-stable/object/entries";
|
4
3
|
import _mapInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/map";
|
5
|
-
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/concat";
|
6
|
-
import _Object$values from "@babel/runtime-corejs3/core-js-stable/object/values";
|
7
|
-
var _excluded = ["children", "bg"];
|
8
|
-
|
9
|
-
var _context;
|
10
|
-
|
11
4
|
import React from 'react';
|
12
|
-
import {
|
13
|
-
import Text from './Text';
|
14
|
-
import { textVariants } from '../../utils/devUtils/constants/variants.js';
|
15
|
-
import { flatColorList } from '../../styles/colors.js';
|
16
|
-
import { Box } from '../../index';
|
5
|
+
import { Box, Separator, Table, TableCell, TableBody, TableHead, TableRow, Text } from '../../index';
|
17
6
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
18
7
|
export default {
|
19
8
|
title: 'Text',
|
@@ -21,72 +10,411 @@ export default {
|
|
21
10
|
argTypes: {
|
22
11
|
variant: {
|
23
12
|
control: {
|
24
|
-
type: '
|
25
|
-
options: _Object$values(textVariants)
|
13
|
+
type: 'none'
|
26
14
|
},
|
27
|
-
description: 'Text variant.'
|
28
|
-
defaultValue: _Object$values(textVariants)[0]
|
15
|
+
description: 'Text variant.'
|
29
16
|
},
|
30
17
|
children: {
|
31
18
|
control: {
|
32
|
-
type: '
|
19
|
+
type: 'none'
|
33
20
|
},
|
34
|
-
|
35
|
-
type: {
|
36
|
-
summary: 'string'
|
37
|
-
}
|
38
|
-
},
|
39
|
-
description: 'Text value.',
|
40
|
-
defaultValue: 'Hi, this is some text!'
|
21
|
+
description: 'Text value.'
|
41
22
|
},
|
42
23
|
color: {
|
43
24
|
control: {
|
44
|
-
type: '
|
45
|
-
options: _concatInstanceProperty(_context = [undefined]).call(_context, _mapInstanceProperty(flatColorList).call(flatColorList, function (_ref) {
|
46
|
-
var _ref2 = _slicedToArray(_ref, 1),
|
47
|
-
colorName = _ref2[0];
|
48
|
-
|
49
|
-
return colorName;
|
50
|
-
}))
|
25
|
+
type: 'none'
|
51
26
|
},
|
52
|
-
|
53
|
-
type: {
|
54
|
-
summary: 'string'
|
55
|
-
}
|
56
|
-
},
|
57
|
-
description: 'Text color.',
|
58
|
-
defaultValue: undefined
|
27
|
+
description: 'Text color.'
|
59
28
|
},
|
60
29
|
bg: {
|
61
30
|
control: {
|
62
|
-
type: '
|
63
|
-
options: _mapInstanceProperty(flatColorList).call(flatColorList, function (_ref3) {
|
64
|
-
var _ref4 = _slicedToArray(_ref3, 1),
|
65
|
-
colorName = _ref4[0];
|
66
|
-
|
67
|
-
return colorName;
|
68
|
-
})
|
69
|
-
},
|
70
|
-
table: {
|
71
|
-
type: {
|
72
|
-
summary: 'string'
|
73
|
-
}
|
31
|
+
type: 'none'
|
74
32
|
},
|
75
|
-
description: 'Background color.'
|
76
|
-
defaultValue: 'white'
|
33
|
+
description: 'Background color.'
|
77
34
|
}
|
78
35
|
}
|
79
36
|
};
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
37
|
+
var sx = {
|
38
|
+
cell: {
|
39
|
+
wordWrap: 'break-word',
|
40
|
+
wordBreak: 'break-word'
|
41
|
+
},
|
42
|
+
tableBody: {
|
43
|
+
borderBottom: 'unset'
|
44
|
+
}
|
45
|
+
};
|
84
46
|
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
}
|
47
|
+
var TableHeading = function TableHeading(_ref) {
|
48
|
+
var title = _ref.title;
|
49
|
+
return ___EmotionJSX(TableHead, null, ___EmotionJSX(TableRow, {
|
50
|
+
key: "head"
|
51
|
+
}, ___EmotionJSX(TableCell, {
|
52
|
+
sx: sx.cell,
|
53
|
+
isHeading: true,
|
54
|
+
width: "30%"
|
55
|
+
}, title), ___EmotionJSX(TableCell, {
|
56
|
+
sx: sx.cell,
|
57
|
+
isHeading: true,
|
58
|
+
width: "30%"
|
59
|
+
}, "Weight"), ___EmotionJSX(TableCell, {
|
60
|
+
sx: sx.cell,
|
61
|
+
isHeading: true,
|
62
|
+
width: "30%"
|
63
|
+
}, "Size"), ___EmotionJSX(TableCell, {
|
64
|
+
sx: sx.cell,
|
65
|
+
isHeading: true
|
66
|
+
}, "Example")));
|
67
|
+
};
|
68
|
+
|
69
|
+
var TableData = function TableData(_ref2) {
|
70
|
+
var variant = _ref2.variant,
|
71
|
+
value = _ref2.value;
|
72
|
+
return ___EmotionJSX(TableRow, {
|
73
|
+
sx: {
|
74
|
+
backgroundColor: 'transparent !important',
|
75
|
+
alignItems: 'center'
|
76
|
+
}
|
77
|
+
}, ___EmotionJSX(TableCell, {
|
78
|
+
sx: sx.cell,
|
79
|
+
width: "30%"
|
80
|
+
}, ___EmotionJSX(Text, null, variant)), ___EmotionJSX(TableCell, {
|
81
|
+
sx: sx.cell,
|
82
|
+
width: "30%"
|
83
|
+
}, ___EmotionJSX(Text, null, value.weight)), ___EmotionJSX(TableCell, {
|
84
|
+
sx: sx.cell,
|
85
|
+
width: "30%"
|
86
|
+
}, ___EmotionJSX(Text, null, value.fontSize)), ___EmotionJSX(TableCell, {
|
87
|
+
sx: sx.cell
|
88
|
+
}, ___EmotionJSX(Text, null, value.example)));
|
89
|
+
};
|
90
|
+
|
91
|
+
export var Default = function Default() {
|
92
|
+
var _context, _context2, _context3, _context4, _context5, _context6;
|
93
|
+
|
94
|
+
var fontSizes = {
|
95
|
+
xx: '23px (xx)',
|
96
|
+
lg: '17px (lg)',
|
97
|
+
md: '15px (md)',
|
98
|
+
sm: '13px (sm)',
|
99
|
+
xs: '11px (xs)'
|
100
|
+
};
|
101
|
+
var fontWeights = {
|
102
|
+
'-1': '300 (-1)',
|
103
|
+
'0': '400 (0)',
|
104
|
+
'1': '500 (1)',
|
105
|
+
'3': '700 (3)'
|
106
|
+
};
|
107
|
+
var headingVariants = {
|
108
|
+
H1: {
|
109
|
+
weight: fontWeights[3],
|
110
|
+
fontSize: fontSizes.xx,
|
111
|
+
example: ___EmotionJSX(Text, {
|
112
|
+
variant: "H1",
|
113
|
+
as: "H1"
|
114
|
+
}, '<Text variant="H1" as="H1"/>')
|
115
|
+
},
|
116
|
+
H2: {
|
117
|
+
weight: fontWeights[3],
|
118
|
+
fontSize: fontSizes.lg,
|
119
|
+
example: ___EmotionJSX(Text, {
|
120
|
+
variant: "H2",
|
121
|
+
as: "H2"
|
122
|
+
}, '<Text variant="H2" as="H2"/>')
|
123
|
+
},
|
124
|
+
H3: {
|
125
|
+
weight: fontWeights[3],
|
126
|
+
fontSize: fontSizes.md,
|
127
|
+
example: ___EmotionJSX(Text, {
|
128
|
+
variant: "H3",
|
129
|
+
as: "H3"
|
130
|
+
}, '<Text variant="H3" as="H3"/>')
|
131
|
+
},
|
132
|
+
H4: {
|
133
|
+
weight: fontWeights[3],
|
134
|
+
fontSize: fontSizes.sm,
|
135
|
+
example: ___EmotionJSX(Text, {
|
136
|
+
variant: "H4",
|
137
|
+
as: "H4"
|
138
|
+
}, '<Text variant="H4" as="H4"/>')
|
139
|
+
}
|
140
|
+
};
|
141
|
+
var baseAndSubtitleVariants = {
|
142
|
+
'Base (default variant of Text)': {
|
143
|
+
weight: fontWeights[1],
|
144
|
+
fontSize: fontSizes.md,
|
145
|
+
color: 'text.primary',
|
146
|
+
example: ___EmotionJSX(Text, {
|
147
|
+
variant: "base"
|
148
|
+
}, '<Text variant="base"/>')
|
149
|
+
},
|
150
|
+
Subtitle: {
|
151
|
+
weight: fontWeights[0],
|
152
|
+
fontSize: fontSizes.sm,
|
153
|
+
color: 'text.secondary',
|
154
|
+
example: ___EmotionJSX(Text, {
|
155
|
+
variant: "subtitle"
|
156
|
+
}, '<Text variant="subtitle"/>')
|
157
|
+
}
|
158
|
+
};
|
159
|
+
var largeVariants = {
|
160
|
+
Bold: {
|
161
|
+
weight: fontWeights[3],
|
162
|
+
fontSize: fontSizes.lg,
|
163
|
+
example: ___EmotionJSX(Text, {
|
164
|
+
fontSize: "lg",
|
165
|
+
fontWeight: "3"
|
166
|
+
}, '<Text fontSize="lg" fontWeight="3">')
|
167
|
+
},
|
168
|
+
Medium: {
|
169
|
+
weight: fontWeights[1],
|
170
|
+
fontSize: fontSizes.lg,
|
171
|
+
example: ___EmotionJSX(Text, {
|
172
|
+
fontSize: "lg",
|
173
|
+
fontWeight: "1"
|
174
|
+
}, '<Text fontSize="lg" fontWeight="1">')
|
175
|
+
},
|
176
|
+
Regular: {
|
177
|
+
weight: fontWeights[0],
|
178
|
+
fontSize: fontSizes.lg,
|
179
|
+
example: ___EmotionJSX(Text, {
|
180
|
+
fontSize: "lg",
|
181
|
+
fontWeight: "0"
|
182
|
+
}, '<Text fontSize="lg" fontWeight="0">')
|
183
|
+
}
|
184
|
+
};
|
185
|
+
var mediumVariants = {
|
186
|
+
Bold: {
|
187
|
+
weight: fontWeights[3],
|
188
|
+
fontSize: fontSizes.md,
|
189
|
+
example: ___EmotionJSX(Text, {
|
190
|
+
fontSize: "md",
|
191
|
+
fontWeight: "3"
|
192
|
+
}, '<Text fontSize="md" fontWeight="3">')
|
193
|
+
},
|
194
|
+
Medium: {
|
195
|
+
weight: fontWeights[1],
|
196
|
+
fontSize: fontSizes.md,
|
197
|
+
example: ___EmotionJSX(Text, {
|
198
|
+
fontSize: "md",
|
199
|
+
fontWeight: "1"
|
200
|
+
}, '<Text fontSize="md" fontWeight="1">')
|
201
|
+
},
|
202
|
+
Regular: {
|
203
|
+
weight: fontWeights[0],
|
204
|
+
fontSize: fontSizes.md,
|
205
|
+
example: ___EmotionJSX(Text, {
|
206
|
+
fontSize: "md",
|
207
|
+
fontWeight: "0"
|
208
|
+
}, '<Text fontSize="md" fontWeight="0">')
|
209
|
+
},
|
210
|
+
Light: {
|
211
|
+
weight: fontWeights[-1],
|
212
|
+
fontSize: fontSizes.md,
|
213
|
+
example: ___EmotionJSX(Text, {
|
214
|
+
fontSize: "md",
|
215
|
+
fontWeight: "-1"
|
216
|
+
}, '<Text fontSize="md" fontWeight="-1">')
|
217
|
+
}
|
218
|
+
};
|
219
|
+
var smallVariants = {
|
220
|
+
Bold: {
|
221
|
+
weight: fontWeights[3],
|
222
|
+
fontSize: fontSizes.sm,
|
223
|
+
example: ___EmotionJSX(Text, {
|
224
|
+
fontSize: "sm",
|
225
|
+
fontWeight: "3"
|
226
|
+
}, '<Text fontSize="sm" fontWeight="3">')
|
227
|
+
},
|
228
|
+
Medium: {
|
229
|
+
weight: fontWeights[1],
|
230
|
+
fontSize: fontSizes.sm,
|
231
|
+
example: ___EmotionJSX(Text, {
|
232
|
+
fontSize: "sm",
|
233
|
+
fontWeight: "1"
|
234
|
+
}, '<Text fontSize="sm" fontWeight="1">')
|
235
|
+
},
|
236
|
+
Regular: {
|
237
|
+
weight: fontWeights[0],
|
238
|
+
fontSize: fontSizes.sm,
|
239
|
+
example: ___EmotionJSX(Text, {
|
240
|
+
fontSize: "sm",
|
241
|
+
fontWeight: "0"
|
242
|
+
}, '<Text fontSize="sm" fontWeight="0">')
|
243
|
+
},
|
244
|
+
Light: {
|
245
|
+
weight: fontWeights[-1],
|
246
|
+
fontSize: fontSizes.sm,
|
247
|
+
example: ___EmotionJSX(Text, {
|
248
|
+
fontSize: "sm",
|
249
|
+
fontWeight: "-1"
|
250
|
+
}, '<Text fontSize="sm" fontWeight="-1">')
|
251
|
+
}
|
252
|
+
};
|
253
|
+
var xsmallVariants = {
|
254
|
+
Bold: {
|
255
|
+
weight: fontWeights[3],
|
256
|
+
fontSize: fontSizes.xs,
|
257
|
+
example: ___EmotionJSX(Text, {
|
258
|
+
fontSize: "xs",
|
259
|
+
fontWeight: "3"
|
260
|
+
}, '<Text fontSize="xs" fontWeight="3">')
|
261
|
+
},
|
262
|
+
Medium: {
|
263
|
+
weight: fontWeights[1],
|
264
|
+
fontSize: fontSizes.xs,
|
265
|
+
example: ___EmotionJSX(Text, {
|
266
|
+
fontSize: "xs",
|
267
|
+
fontWeight: "1"
|
268
|
+
}, '<Text fontSize="xs" fontWeight="1">')
|
269
|
+
},
|
270
|
+
Regular: {
|
271
|
+
weight: fontWeights[0],
|
272
|
+
fontSize: fontSizes.xs,
|
273
|
+
example: ___EmotionJSX(Text, {
|
274
|
+
fontSize: "xs",
|
275
|
+
fontWeight: "0"
|
276
|
+
}, '<Text fontSize="xs" fontWeight="0">')
|
277
|
+
},
|
278
|
+
Light: {
|
279
|
+
weight: fontWeights[-1],
|
280
|
+
fontSize: fontSizes.xs,
|
281
|
+
example: ___EmotionJSX(Text, {
|
282
|
+
fontSize: "xs",
|
283
|
+
fontWeight: "-1"
|
284
|
+
}, '<Text fontSize="xs" fontWeight="-1">')
|
285
|
+
}
|
286
|
+
};
|
287
|
+
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Table, {
|
288
|
+
mb: "xx"
|
289
|
+
}, ___EmotionJSX(TableHeading, {
|
290
|
+
title: "Heading"
|
291
|
+
}), ___EmotionJSX(TableBody, {
|
292
|
+
sx: sx.tableBody
|
293
|
+
}, _mapInstanceProperty(_context = _Object$entries(headingVariants)).call(_context, function (_ref3) {
|
294
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
295
|
+
key = _ref4[0],
|
296
|
+
value = _ref4[1];
|
297
|
+
|
298
|
+
return ___EmotionJSX(TableData, {
|
299
|
+
variant: key,
|
300
|
+
value: value,
|
301
|
+
key: key
|
302
|
+
});
|
303
|
+
}))), ___EmotionJSX(Table, {
|
304
|
+
mb: "xx"
|
305
|
+
}, ___EmotionJSX(TableHead, null, ___EmotionJSX(TableRow, {
|
306
|
+
key: "head"
|
307
|
+
}, ___EmotionJSX(TableCell, {
|
308
|
+
sx: sx.cell,
|
309
|
+
isHeading: true,
|
310
|
+
width: "60%"
|
311
|
+
}, "Base and Subtitle"), ___EmotionJSX(TableCell, {
|
312
|
+
sx: sx.cell,
|
313
|
+
isHeading: true,
|
314
|
+
width: "20%"
|
315
|
+
}, "Weight"), ___EmotionJSX(TableCell, {
|
316
|
+
sx: sx.cell,
|
317
|
+
isHeading: true,
|
318
|
+
width: "30%"
|
319
|
+
}, "Size"), ___EmotionJSX(TableCell, {
|
320
|
+
sx: sx.cell,
|
321
|
+
isHeading: true,
|
322
|
+
width: "40%"
|
323
|
+
}, "Color"), ___EmotionJSX(TableCell, {
|
324
|
+
sx: sx.cell,
|
325
|
+
isHeading: true
|
326
|
+
}, "Example"))), ___EmotionJSX(TableBody, {
|
327
|
+
sx: sx.tableBody
|
328
|
+
}, _mapInstanceProperty(_context2 = _Object$entries(baseAndSubtitleVariants)).call(_context2, function (_ref5) {
|
329
|
+
var _ref6 = _slicedToArray(_ref5, 2),
|
330
|
+
key = _ref6[0],
|
331
|
+
value = _ref6[1];
|
332
|
+
|
333
|
+
return ___EmotionJSX(TableRow, {
|
334
|
+
sx: {
|
335
|
+
backgroundColor: 'transparent !important'
|
336
|
+
},
|
337
|
+
key: key
|
338
|
+
}, ___EmotionJSX(TableCell, {
|
339
|
+
sx: sx.cell,
|
340
|
+
width: "60%"
|
341
|
+
}, ___EmotionJSX(Text, null, key)), ___EmotionJSX(TableCell, {
|
342
|
+
sx: sx.cell,
|
343
|
+
width: "25%"
|
344
|
+
}, ___EmotionJSX(Text, null, value.weight)), ___EmotionJSX(TableCell, {
|
345
|
+
sx: sx.cell,
|
346
|
+
width: "35%"
|
347
|
+
}, ___EmotionJSX(Text, null, value.fontSize)), ___EmotionJSX(TableCell, {
|
348
|
+
sx: sx.cell,
|
349
|
+
width: "45%"
|
350
|
+
}, ___EmotionJSX(Text, null, value.color)), ___EmotionJSX(TableCell, {
|
351
|
+
sx: sx.cell
|
352
|
+
}, value.example));
|
353
|
+
}))), ___EmotionJSX(Table, {
|
354
|
+
mb: "xx"
|
355
|
+
}, ___EmotionJSX(TableHeading, {
|
356
|
+
title: "Large"
|
357
|
+
}), ___EmotionJSX(TableBody, {
|
358
|
+
sx: sx.tableBody
|
359
|
+
}, _mapInstanceProperty(_context3 = _Object$entries(largeVariants)).call(_context3, function (_ref7) {
|
360
|
+
var _ref8 = _slicedToArray(_ref7, 2),
|
361
|
+
key = _ref8[0],
|
362
|
+
value = _ref8[1];
|
363
|
+
|
364
|
+
return ___EmotionJSX(TableData, {
|
365
|
+
variant: key,
|
366
|
+
value: value,
|
367
|
+
key: key
|
368
|
+
});
|
369
|
+
}))), ___EmotionJSX(Table, {
|
370
|
+
mb: "xx"
|
371
|
+
}, ___EmotionJSX(TableHeading, {
|
372
|
+
title: "Medium"
|
373
|
+
}), ___EmotionJSX(TableBody, {
|
374
|
+
sx: sx.tableBody
|
375
|
+
}, _mapInstanceProperty(_context4 = _Object$entries(mediumVariants)).call(_context4, function (_ref9) {
|
376
|
+
var _ref10 = _slicedToArray(_ref9, 2),
|
377
|
+
key = _ref10[0],
|
378
|
+
value = _ref10[1];
|
379
|
+
|
380
|
+
return ___EmotionJSX(TableData, {
|
381
|
+
variant: key,
|
382
|
+
value: value,
|
383
|
+
key: key
|
384
|
+
});
|
385
|
+
}))), ___EmotionJSX(Table, {
|
386
|
+
mb: "xx"
|
387
|
+
}, ___EmotionJSX(TableHeading, {
|
388
|
+
title: "Small"
|
389
|
+
}), ___EmotionJSX(TableBody, {
|
390
|
+
sx: sx.tableBody
|
391
|
+
}, _mapInstanceProperty(_context5 = _Object$entries(smallVariants)).call(_context5, function (_ref11) {
|
392
|
+
var _ref12 = _slicedToArray(_ref11, 2),
|
393
|
+
key = _ref12[0],
|
394
|
+
value = _ref12[1];
|
395
|
+
|
396
|
+
return ___EmotionJSX(TableData, {
|
397
|
+
variant: key,
|
398
|
+
value: value,
|
399
|
+
key: key
|
400
|
+
});
|
401
|
+
}))), ___EmotionJSX(Table, {
|
402
|
+
mb: "xx"
|
403
|
+
}, ___EmotionJSX(TableHeading, {
|
404
|
+
title: "XSmall"
|
405
|
+
}), ___EmotionJSX(TableBody, {
|
406
|
+
sx: sx.tableBody
|
407
|
+
}, _mapInstanceProperty(_context6 = _Object$entries(xsmallVariants)).call(_context6, function (_ref13) {
|
408
|
+
var _ref14 = _slicedToArray(_ref13, 2),
|
409
|
+
key = _ref14[0],
|
410
|
+
value = _ref14[1];
|
411
|
+
|
412
|
+
return ___EmotionJSX(TableData, {
|
413
|
+
variant: key,
|
414
|
+
value: value,
|
415
|
+
key: key
|
416
|
+
});
|
417
|
+
}))));
|
90
418
|
};
|
91
419
|
export var WithCustomWidth = function WithCustomWidth() {
|
92
420
|
return ___EmotionJSX(Box, {
|
@@ -111,7 +439,7 @@ export var TypographyStyleProps = function TypographyStyleProps() {
|
|
111
439
|
gap: "md"
|
112
440
|
}, ___EmotionJSX(Text, {
|
113
441
|
variant: "title"
|
114
|
-
}, "The Text component allows typography style props to be passed in directly."), ___EmotionJSX(Text, textProps, loremText), ___EmotionJSX(
|
442
|
+
}, "The Text component allows typography style props to be passed in directly."), ___EmotionJSX(Text, textProps, loremText), ___EmotionJSX(Separator, null), ___EmotionJSX(Text, {
|
115
443
|
variant: "title"
|
116
444
|
}, "Typography styles can also be passed in through the sx prop for the same result."), ___EmotionJSX(Text, {
|
117
445
|
sx: textProps
|
@@ -1,3 +1,18 @@
|
|
1
|
+
import _Object$defineProperty from "@babel/runtime-corejs3/core-js-stable/object/define-property";
|
2
|
+
import _Object$defineProperties from "@babel/runtime-corejs3/core-js-stable/object/define-properties";
|
3
|
+
import _Object$getOwnPropertyDescriptors from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptors";
|
4
|
+
import _forEachInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/for-each";
|
5
|
+
import _Object$getOwnPropertyDescriptor from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor";
|
6
|
+
import _filterInstanceProperty from "@babel/runtime-corejs3/core-js-stable/instance/filter";
|
7
|
+
import _Object$getOwnPropertySymbols from "@babel/runtime-corejs3/core-js-stable/object/get-own-property-symbols";
|
8
|
+
import _Object$keys from "@babel/runtime-corejs3/core-js-stable/object/keys";
|
9
|
+
import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
|
10
|
+
|
11
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
12
|
+
|
13
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
14
|
+
|
15
|
+
import { defaultFocus } from '../variants/buttons';
|
1
16
|
var accordionTitle = {
|
2
17
|
display: 'inline-block !important',
|
3
18
|
overflowWrap: 'break-word',
|
@@ -39,13 +54,9 @@ var accordionGridHeader = {
|
|
39
54
|
color: 'neutral.10',
|
40
55
|
flexGrow: 1,
|
41
56
|
fontWeight: 700,
|
42
|
-
'&.is-focused': {
|
43
|
-
outline: 'none',
|
44
|
-
boxShadow: 'focus',
|
45
|
-
WebkitBoxShadow: 'focus',
|
46
|
-
MozBoxShadow: 'focus',
|
57
|
+
'&.is-focused': _objectSpread(_objectSpread({}, defaultFocus), {}, {
|
47
58
|
zIndex: '10'
|
48
|
-
},
|
59
|
+
}),
|
49
60
|
minHeight: '64px',
|
50
61
|
'&.is-hovered': {
|
51
62
|
backgroundColor: 'accent.99'
|
@@ -231,6 +231,28 @@ var timeZone = {
|
|
231
231
|
}
|
232
232
|
}
|
233
233
|
};
|
234
|
+
|
235
|
+
var title = _objectSpread(_objectSpread({}, wordWrap), {}, {
|
236
|
+
fontSize: 'xx',
|
237
|
+
fontWeight: 1,
|
238
|
+
color: 'text.primary',
|
239
|
+
fontFamily: 'standard'
|
240
|
+
});
|
241
|
+
|
242
|
+
var sectionTitle = _objectSpread(_objectSpread({}, wordWrap), {}, {
|
243
|
+
fontSize: 'lg',
|
244
|
+
fontWeight: 2,
|
245
|
+
color: 'text.primary',
|
246
|
+
fontFamily: 'standard'
|
247
|
+
});
|
248
|
+
|
249
|
+
var itemTitle = _objectSpread(_objectSpread({}, wordWrap), {}, {
|
250
|
+
fontSize: 'md',
|
251
|
+
fontWeight: 1,
|
252
|
+
color: 'text.primary',
|
253
|
+
fontFamily: 'standard'
|
254
|
+
});
|
255
|
+
|
234
256
|
export var text = {
|
235
257
|
base: base,
|
236
258
|
bodyStrong: _objectSpread(_objectSpread({}, wordWrap), {}, {
|
@@ -272,17 +294,31 @@ export var text = {
|
|
272
294
|
}),
|
273
295
|
environmentBreadcrumb: environmentBreadcrumb,
|
274
296
|
fieldHelperText: fieldHelperText,
|
297
|
+
H1: _objectSpread(_objectSpread({}, title), {}, {
|
298
|
+
fontWeight: 3,
|
299
|
+
lineHeight: '28px'
|
300
|
+
}),
|
301
|
+
H2: _objectSpread(_objectSpread({}, sectionTitle), {}, {
|
302
|
+
fontWeight: 3,
|
303
|
+
lineHeight: '21px'
|
304
|
+
}),
|
305
|
+
H3: _objectSpread(_objectSpread({}, itemTitle), {}, {
|
306
|
+
fontWeight: 3,
|
307
|
+
lineHeight: '18px'
|
308
|
+
}),
|
309
|
+
H4: _objectSpread(_objectSpread({}, wordWrap), {}, {
|
310
|
+
fontSize: 'sm',
|
311
|
+
fontWeight: 3,
|
312
|
+
color: 'text.primary',
|
313
|
+
fontFamily: 'standard',
|
314
|
+
lineHeight: '16px'
|
315
|
+
}),
|
275
316
|
inputValue: {
|
276
317
|
fontWeight: 1,
|
277
318
|
color: 'text.primary',
|
278
319
|
fontFamily: 'standard'
|
279
320
|
},
|
280
|
-
itemTitle:
|
281
|
-
fontSize: 'md',
|
282
|
-
fontWeight: 1,
|
283
|
-
color: 'text.primary',
|
284
|
-
fontFamily: 'standard'
|
285
|
-
}),
|
321
|
+
itemTitle: itemTitle,
|
286
322
|
itemSubtitle: _objectSpread(_objectSpread({}, wordWrap), {}, {
|
287
323
|
fontSize: 'sm',
|
288
324
|
fontWeight: 0,
|
@@ -322,12 +358,7 @@ export var text = {
|
|
322
358
|
color: 'text.secondary',
|
323
359
|
fontFamily: 'standard'
|
324
360
|
},
|
325
|
-
sectionTitle:
|
326
|
-
fontSize: 'lg',
|
327
|
-
fontWeight: 2,
|
328
|
-
color: 'text.primary',
|
329
|
-
fontFamily: 'standard'
|
330
|
-
}),
|
361
|
+
sectionTitle: sectionTitle,
|
331
362
|
subtitle: _objectSpread(_objectSpread({}, wordWrap), {}, {
|
332
363
|
fontWeight: 0,
|
333
364
|
color: 'text.secondary',
|
@@ -345,12 +376,7 @@ export var text = {
|
|
345
376
|
overflow: 'hidden',
|
346
377
|
textOverflow: 'ellipsis'
|
347
378
|
},
|
348
|
-
title:
|
349
|
-
fontSize: 'xx',
|
350
|
-
fontWeight: 1,
|
351
|
-
color: 'text.primary',
|
352
|
-
fontFamily: 'standard'
|
353
|
-
}),
|
379
|
+
title: title,
|
354
380
|
tooltipContent: tooltipContent,
|
355
381
|
timeZone: timeZone
|
356
382
|
};
|