@pingux/astro 1.31.0-alpha.1 → 1.31.0-alpha.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (47) hide show
  1. package/lib/cjs/components/Card/Card.stories.js +29 -2
  2. package/lib/cjs/components/Chip/Chip.js +37 -7
  3. package/lib/cjs/components/Chip/Chip.test.js +8 -0
  4. package/lib/cjs/components/DataTable/DataTable.test.js +0 -2
  5. package/lib/cjs/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +84 -2
  6. package/lib/cjs/components/ListView/ListView.stories.js +2 -1
  7. package/lib/cjs/components/ListViewItem/ListViewItem.js +5 -2
  8. package/lib/cjs/components/MenuItem/MenuItem.js +2 -1
  9. package/lib/cjs/components/OverlayPanel/OverlayPanel.stories.js +14 -7
  10. package/lib/cjs/components/RequirementsList/RequirementsList.js +5 -1
  11. package/lib/cjs/components/RequirementsList/RequirementsList.test.js +2 -2
  12. package/lib/cjs/components/SearchField/SearchField.js +10 -0
  13. package/lib/cjs/components/SearchField/SearchField.test.js +27 -0
  14. package/lib/cjs/components/TabPicker/TabPicker.js +1 -0
  15. package/lib/cjs/components/Table/Table.stories.js +9 -27
  16. package/lib/cjs/components/Table/Table.test.js +9 -1
  17. package/lib/cjs/components/TableCaption/TableCaption.js +43 -0
  18. package/lib/cjs/components/TableCaption/index.js +18 -0
  19. package/lib/cjs/components/Tabs/Tabs.stories.js +4 -2
  20. package/lib/cjs/components/Tabs/Tabs.test.js +6 -4
  21. package/lib/cjs/recipes/LinkedListView.stories.js +424 -0
  22. package/lib/cjs/styles/variants/boxes.js +19 -1
  23. package/lib/cjs/styles/variants/table.js +6 -0
  24. package/lib/components/Card/Card.stories.js +29 -2
  25. package/lib/components/Chip/Chip.js +30 -4
  26. package/lib/components/Chip/Chip.test.js +8 -0
  27. package/lib/components/DataTable/DataTable.test.js +0 -2
  28. package/lib/components/EnvironmentBreadcrumb/EnvironmentBreadcrumb.stories.js +79 -0
  29. package/lib/components/ListView/ListView.stories.js +2 -1
  30. package/lib/components/ListViewItem/ListViewItem.js +5 -2
  31. package/lib/components/MenuItem/MenuItem.js +2 -1
  32. package/lib/components/OverlayPanel/OverlayPanel.stories.js +14 -7
  33. package/lib/components/RequirementsList/RequirementsList.js +5 -1
  34. package/lib/components/RequirementsList/RequirementsList.test.js +2 -2
  35. package/lib/components/SearchField/SearchField.js +10 -0
  36. package/lib/components/SearchField/SearchField.test.js +20 -1
  37. package/lib/components/TabPicker/TabPicker.js +1 -0
  38. package/lib/components/Table/Table.stories.js +7 -27
  39. package/lib/components/Table/Table.test.js +7 -1
  40. package/lib/components/TableCaption/TableCaption.js +27 -0
  41. package/lib/components/TableCaption/index.js +1 -0
  42. package/lib/components/Tabs/Tabs.stories.js +4 -2
  43. package/lib/components/Tabs/Tabs.test.js +6 -4
  44. package/lib/recipes/LinkedListView.stories.js +393 -0
  45. package/lib/styles/variants/boxes.js +19 -1
  46. package/lib/styles/variants/table.js +6 -0
  47. package/package.json +1 -1
@@ -63,11 +63,13 @@ var tabsWithList = [{
63
63
  list: [{
64
64
  key: 'tab1list',
65
65
  name: 'Tab 1 list',
66
- children: 'Tab 1 from list'
66
+ children: 'Tab 1 from list',
67
+ role: 'listitem'
67
68
  }, {
68
69
  key: 'tab2list',
69
70
  name: 'Tab 2 list',
70
- children: 'Tab 2 from list'
71
+ children: 'Tab 2 from list',
72
+ role: 'listitem'
71
73
  }]
72
74
  }];
73
75
  var defaultProps = {
@@ -545,7 +547,7 @@ test('will render tab with list if provided', /*#__PURE__*/(0, _asyncToGenerator
545
547
 
546
548
  expect(_testWrapper.screen.queryByRole('menu')).toBeInTheDocument();
547
549
  testTabPanel(0);
548
- menuItems = _testWrapper.screen.queryAllByRole('menuitemradio');
550
+ menuItems = _testWrapper.screen.queryAllByRole('listitem');
549
551
  expect(menuItems).toHaveLength(tabsWithList[1].list.length);
550
552
  expect(menuItems[0]).not.toHaveFocus();
551
553
 
@@ -596,7 +598,7 @@ test('tab list is accessible via keyboard', function () {
596
598
  expect(_testWrapper.screen.queryByRole('menu')).toBeInTheDocument();
597
599
  testTabPanel(0);
598
600
 
599
- var menuItems = _testWrapper.screen.queryAllByRole('menuitemradio');
601
+ var menuItems = _testWrapper.screen.queryAllByRole('listitem');
600
602
 
601
603
  expect(menuItems).toHaveLength(tabsWithList[1].list.length);
602
604
  expect(menuItems[0]).toHaveFocus();
@@ -0,0 +1,424 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime-corejs3/helpers/interopRequireDefault");
4
+
5
+ var _Object$getOwnPropertyDescriptor = require("@babel/runtime-corejs3/core-js-stable/object/get-own-property-descriptor");
6
+
7
+ var _Object$defineProperty = require("@babel/runtime-corejs3/core-js-stable/object/define-property");
8
+
9
+ var _typeof = require("@babel/runtime-corejs3/helpers/typeof");
10
+
11
+ var _WeakMap = require("@babel/runtime-corejs3/core-js-stable/weak-map");
12
+
13
+ _Object$defineProperty(exports, "__esModule", {
14
+ value: true
15
+ });
16
+
17
+ exports["default"] = exports.Default = void 0;
18
+
19
+ var _concat = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/concat"));
20
+
21
+ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/slicedToArray"));
22
+
23
+ var _extends2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/extends"));
24
+
25
+ var _splice = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/splice"));
26
+
27
+ var _findIndex = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/find-index"));
28
+
29
+ var _forEach = _interopRequireDefault(require("@babel/runtime-corejs3/core-js-stable/instance/for-each"));
30
+
31
+ var _react = _interopRequireWildcard(require("react"));
32
+
33
+ var _collections = require("@react-stately/collections");
34
+
35
+ var _DotsVerticalIcon = _interopRequireDefault(require("mdi-react/DotsVerticalIcon"));
36
+
37
+ var _index = require("../index");
38
+
39
+ var _react2 = require("@emotion/react");
40
+
41
+ function _getRequireWildcardCache(nodeInterop) { if (typeof _WeakMap !== "function") return null; var cacheBabelInterop = new _WeakMap(); var cacheNodeInterop = new _WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
42
+
43
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = _Object$defineProperty && _Object$getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? _Object$getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { _Object$defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
44
+
45
+ var _default = {
46
+ title: 'Recipes/LinkedListView',
47
+ argTypes: {
48
+ loadingState: {
49
+ control: {
50
+ type: 'select'
51
+ }
52
+ },
53
+ disabledKeys: {
54
+ defaultValue: []
55
+ },
56
+ items: {
57
+ control: {
58
+ type: 'none'
59
+ }
60
+ },
61
+ onSelectionChange: {
62
+ control: 'none',
63
+ // eslint-disable-next-line no-console
64
+ defaultValue: console.log
65
+ }
66
+ }
67
+ };
68
+ exports["default"] = _default;
69
+ var testData = [{
70
+ key: 'Default Risk Policy',
71
+ name: 'Default Risk Policy',
72
+ policyId: 'sdfasdfasdf-124123asdf',
73
+ id: '1',
74
+ hasSeparator: false,
75
+ hasInsetSeparator: true,
76
+ chipText: 'default',
77
+ expirationText: 'Expiring On: 2022-12-08',
78
+ childrenObjects: [{
79
+ key: 'Staging Policy',
80
+ name: 'Staging Policy',
81
+ policyId: '23423sdfsdf-124123asdf',
82
+ id: '4',
83
+ expirationText: 'Expiring On: 2022-12-08',
84
+ hasSeparator: true
85
+ }]
86
+ }, {
87
+ key: 'Policy4',
88
+ name: 'Policy4',
89
+ policyId: '9234890324k-124123asdf',
90
+ chipText: 'default',
91
+ id: '2',
92
+ hasSeparator: true
93
+ }, {
94
+ key: 'Policy5',
95
+ name: 'Policy5',
96
+ policyId: 'asdf23zaa-124123asdf',
97
+ id: '3'
98
+ }]; // IMPORTANT PLEASE READ
99
+ // in order for the list portion of this recipe to function correctly,
100
+ // the array of objects that will be used to create
101
+ // the production and staging rows, will need to be flat and sorted.
102
+ // I.e. the staging rows will need to immediately follow the prod row that they correspond to.
103
+ // This flat, sorted array will then be passed into the listview component as the items prop.
104
+ // You may not need these functions if you are able to change the data shape on the back end
105
+ // (which is reccomended for performance reasons)
106
+
107
+ var flattenArray = function flattenArray(array) {
108
+ var newArray = array;
109
+ (0, _forEach["default"])(newArray).call(newArray, function (item) {
110
+ if (item.childrenObjects) {
111
+ var _context;
112
+
113
+ (0, _forEach["default"])(_context = item.childrenObjects).call(_context, function (obj) {
114
+ var newObj = obj;
115
+ newObj.parentId = item.id;
116
+ newArray.push(newObj);
117
+ });
118
+ }
119
+ });
120
+ return newArray;
121
+ };
122
+
123
+ var testSort = function testSort(array) {
124
+ var newArray = array;
125
+ (0, _forEach["default"])(newArray).call(newArray, function (item, i) {
126
+ if (item.parentId) {
127
+ var thisindex = (0, _findIndex["default"])(newArray).call(newArray, function (object) {
128
+ return object.id === item.parentId;
129
+ });
130
+ var element = (0, _splice["default"])(newArray).call(newArray, i, 1)[0];
131
+ (0, _splice["default"])(newArray).call(newArray, thisindex + 1, 0, element);
132
+ }
133
+ });
134
+ return newArray;
135
+ };
136
+
137
+ var unsorted = flattenArray(testData);
138
+ var sorted = testSort(unsorted);
139
+
140
+ var Default = function Default(_ref) {
141
+ var _context2;
142
+
143
+ var args = (0, _extends2["default"])({}, _ref);
144
+
145
+ var _useState = (0, _react.useState)((0, _concat["default"])(_context2 = []).call(_context2, sorted)),
146
+ _useState2 = (0, _slicedToArray2["default"])(_useState, 1),
147
+ theseItems = _useState2[0]; // svg of the bottom portion of the bracket, the portion with the L shaped hook.
148
+
149
+
150
+ var BottomBracket = function BottomBracket() {
151
+ var color = '#CACED3';
152
+ return (0, _react2.jsx)(_index.Box, {
153
+ sx: {
154
+ width: '20px',
155
+ position: 'relative'
156
+ }
157
+ }, (0, _react2.jsx)(_index.Box, {
158
+ flexBasis: "50%"
159
+ }, (0, _react2.jsx)("svg", {
160
+ xmlns: "http://www.w3.org/2000/svg",
161
+ version: "1.1",
162
+ preserveAspectRatio: "none",
163
+ viewBox: "0 0 10 10",
164
+ style: {
165
+ flexGrow: 1
166
+ }
167
+ }, (0, _react2.jsx)("title", null, "bracket-fill"), (0, _react2.jsx)("g", null, (0, _react2.jsx)("title", null, "Layer 1"), (0, _react2.jsx)("line", {
168
+ strokeLinecap: "undefined",
169
+ strokeLinejoin: "undefined",
170
+ y2: "0",
171
+ x2: "0",
172
+ y1: "15",
173
+ x1: "0",
174
+ stroke: color,
175
+ fill: "none"
176
+ }))), (0, _react2.jsx)("svg", {
177
+ width: "17",
178
+ height: "9",
179
+ viewBox: "0 0 17 9",
180
+ fill: "none",
181
+ xmlns: "http://www.w3.org/2000/svg"
182
+ }, (0, _react2.jsx)("g", {
183
+ clipPath: "url(#clip0_1900_8817)"
184
+ }, (0, _react2.jsx)("g", {
185
+ mask: "url(#mask0_1900_8817)"
186
+ }, (0, _react2.jsx)("rect", {
187
+ x: "0.5",
188
+ y: "-54.5",
189
+ width: "20",
190
+ height: "63",
191
+ rx: "4.5",
192
+ stroke: "#CACED3"
193
+ }))), (0, _react2.jsx)("defs", null, (0, _react2.jsx)("clipPath", {
194
+ id: "clip0_1900_8817"
195
+ }, (0, _react2.jsx)("rect", {
196
+ width: "1600",
197
+ height: "917",
198
+ fill: "white",
199
+ transform: "translate(-280 -419)"
200
+ }))))));
201
+ }; // the top portion of the bracket svg, this is basically just a straight vertical line.
202
+
203
+
204
+ var TopBracket = function TopBracket() {
205
+ var color = '#CACED3';
206
+ return (0, _react2.jsx)(_index.Box, {
207
+ width: 15,
208
+ sx: {
209
+ position: 'absolute',
210
+ bottom: 0,
211
+ left: 12,
212
+ top: 55
213
+ }
214
+ }, (0, _react2.jsx)("svg", {
215
+ xmlns: "http://www.w3.org/2000/svg",
216
+ version: "1.1",
217
+ preserveAspectRatio: "none",
218
+ viewBox: "0 0 10 10",
219
+ style: {
220
+ flexGrow: 1
221
+ },
222
+ "data-testid": "isLastLayer"
223
+ }, (0, _react2.jsx)("title", null, "bracket-fill"), (0, _react2.jsx)("g", null, (0, _react2.jsx)("title", null, "Layer 3"), (0, _react2.jsx)("line", {
224
+ strokeLinecap: "undefined",
225
+ strokeLinejoin: "undefined",
226
+ y2: "0",
227
+ x2: "0",
228
+ y1: "10",
229
+ x1: "0",
230
+ stroke: color,
231
+ fill: "none"
232
+ }))));
233
+ }; // the vector shield and key icon.
234
+
235
+
236
+ var ShieldVector = function ShieldVector(props) {
237
+ return (0, _react2.jsx)("svg", (0, _extends2["default"])({
238
+ width: "19",
239
+ height: "23",
240
+ viewBox: "0 0 19 23",
241
+ xmlns: "http://www.w3.org/2000/svg"
242
+ }, props), (0, _react2.jsx)("path", {
243
+ d: "M9.5 7.33342C9.77627 7.33342 10.0412 7.44316 10.2366 7.63851C10.4319 7.83386 10.5417 8.09881 10.5417 8.37508C10.5417 8.65135 10.4319 8.9163 10.2366 9.11165C10.0412 9.307 9.77627 9.41675 9.5 9.41675C9.22373 9.41675 8.95878 9.307 8.76343 9.11165C8.56808 8.9163 8.45833 8.65135 8.45833 8.37508C8.45833 8.09881 8.56808 7.83386 8.76343 7.63851C8.95878 7.44316 9.22373 7.33342 9.5 7.33342ZM18.875 10.4584C18.875 16.2397 14.875 21.6459 9.5 22.9584C4.125 21.6459 0.125 16.2397 0.125 10.4584V4.20842L9.5 0.041748L18.875 4.20842V10.4584ZM9.5 5.25008C8.6712 5.25008 7.87634 5.57932 7.29029 6.16537C6.70424 6.75142 6.375 7.54628 6.375 8.37508C6.375 9.73967 7.23958 10.8959 8.45833 11.323V17.7501H10.5417V15.6667H12.625V13.5834H10.5417V11.323C11.7604 10.8959 12.625 9.73967 12.625 8.37508C12.625 7.54628 12.2958 6.75142 11.7097 6.16537C11.1237 5.57932 10.3288 5.25008 9.5 5.25008Z"
244
+ }));
245
+ }; // reusable piece of code that handles the iconbutton and popover on the right side of the rows
246
+
247
+
248
+ var IconWithPopover = function IconWithPopover() {
249
+ return (0, _react2.jsx)(_index.PopoverMenu, {
250
+ direction: "left"
251
+ }, (0, _react2.jsx)(_index.Box, {
252
+ alignItems: "center",
253
+ alignSelf: "center"
254
+ }, (0, _react2.jsx)(_index.IconButton, {
255
+ "aria-label": "Menu Button"
256
+ }, (0, _react2.jsx)(_index.Icon, {
257
+ icon: _DotsVerticalIcon["default"],
258
+ size: 16,
259
+ color: "Neutral.40",
260
+ m: "0.61px"
261
+ }))), (0, _react2.jsx)(_index.Menu, {
262
+ direction: "left",
263
+ sx: {
264
+ minWidth: '155px',
265
+ minHeight: '144px'
266
+ }
267
+ }, (0, _react2.jsx)(_collections.Item, {
268
+ key: "view"
269
+ }, "View"), (0, _react2.jsx)(_collections.Item, {
270
+ key: "edit"
271
+ }, "Edit"), (0, _react2.jsx)(_collections.Item, {
272
+ key: "rename"
273
+ }, "Rename"), (0, _react2.jsx)(_collections.Item, {
274
+ key: "delete",
275
+ textValue: "delete"
276
+ }, (0, _react2.jsx)(_index.Text, {
277
+ color: "critical.bright"
278
+ }, "Delete"))));
279
+ }; // made these separate components because staging and production both use them.
280
+
281
+
282
+ var DefaultChip = function DefaultChip() {
283
+ return (0, _react2.jsx)(_index.Chip, {
284
+ label: "Default",
285
+ bg: "active",
286
+ sx: {
287
+ marginLeft: '25px',
288
+ alignSelf: 'center',
289
+ alignItems: 'center',
290
+ padding: '3px 5px 2px 5px'
291
+ }
292
+ });
293
+ };
294
+
295
+ var ExprirationChip = function ExprirationChip(props) {
296
+ var expirationText = props.expirationText,
297
+ chipText = props.chipText;
298
+ return (0, _react2.jsx)(_index.Box, {
299
+ sx: !chipText && {
300
+ paddingLeft: '72px'
301
+ },
302
+ flexGrow: 1,
303
+ alignItems: "center",
304
+ alignSelf: "center"
305
+ }, (0, _react2.jsx)(_index.Chip, {
306
+ bg: "white",
307
+ sx: {
308
+ border: 'solid 1px',
309
+ borderColor: 'neutral.80',
310
+ alignSelf: 'center',
311
+ alignItems: 'center',
312
+ padding: '3px 5px 2px 5px'
313
+ },
314
+ textColor: "text.primary",
315
+ textProps: {
316
+ fontSize: 'xs'
317
+ },
318
+ label: expirationText
319
+ }));
320
+ }; // jsx of the production row
321
+
322
+
323
+ var Production = function Production(props) {
324
+ var chipText = props.chipText,
325
+ hasStaging = props.hasStaging,
326
+ policyId = props.policyId,
327
+ name = props.name;
328
+ return (0, _react2.jsx)(_index.Box, {
329
+ isRow: true,
330
+ height: "75px"
331
+ }, (0, _react2.jsx)(_index.Box, {
332
+ alignItems: "center",
333
+ justifyContent: "center",
334
+ sx: {
335
+ position: 'relative'
336
+ }
337
+ }, (0, _react2.jsx)(_index.Icon, {
338
+ icon: ShieldVector,
339
+ color: hasStaging ? 'decorative.7' : 'accent.40',
340
+ size: 24,
341
+ isLinked: hasStaging
342
+ }), hasStaging && (0, _react2.jsx)(TopBracket, null)), (0, _react2.jsx)(_index.Box, {
343
+ isRow: true,
344
+ mr: "auto",
345
+ alignSelf: "center",
346
+ justifyContent: "center",
347
+ ml: "18px",
348
+ alignItems: "center"
349
+ }, (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Text, {
350
+ sx: {
351
+ fontWeight: 1,
352
+ color: 'text.primary',
353
+ fontSize: 'md'
354
+ }
355
+ }, name), (0, _react2.jsx)(_index.Text, {
356
+ sx: {
357
+ fontWeight: 0,
358
+ color: 'text.secondary',
359
+ fontSize: 'sm'
360
+ }
361
+ }, "Policy Id: ", policyId)), chipText && (0, _react2.jsx)(DefaultChip, null)), (0, _react2.jsx)(IconWithPopover, null));
362
+ }; // jsx of the staging row.
363
+
364
+
365
+ var Staging = function Staging(props) {
366
+ var chipText = props.chipText,
367
+ expirationText = props.expirationText,
368
+ policyId = props.policyId,
369
+ name = props.name;
370
+ return (0, _react2.jsx)(_index.Box, {
371
+ isRow: true,
372
+ height: "75px",
373
+ marginLeft: "12px"
374
+ }, (0, _react2.jsx)(BottomBracket, null), (0, _react2.jsx)(_index.Box, {
375
+ isRow: true,
376
+ alignItems: "center",
377
+ justifyContent: "center"
378
+ }, (0, _react2.jsx)(_index.Box, {
379
+ pl: "0px",
380
+ height: "30px",
381
+ flexDirection: "row",
382
+ alignItems: "center"
383
+ }, (0, _react2.jsx)(_index.Separator, {
384
+ orientation: "vertical",
385
+ sx: {
386
+ width: '2px !important',
387
+ backgroundColor: 'decorative.7',
388
+ marginLeft: '2px !important'
389
+ }
390
+ })), (0, _react2.jsx)(_index.Box, null, (0, _react2.jsx)(_index.Text, {
391
+ sx: {
392
+ fontWeight: 1,
393
+ color: 'text.primary',
394
+ fontSize: 'md'
395
+ }
396
+ }, name), (0, _react2.jsx)(_index.Text, {
397
+ sx: {
398
+ fontWeight: 0,
399
+ color: 'text.secondary',
400
+ fontSize: 'sm'
401
+ }
402
+ }, "Policy Id: ", policyId))), chipText && (0, _react2.jsx)(DefaultChip, null), expirationText && (0, _react2.jsx)(ExprirationChip, {
403
+ expirationText: expirationText
404
+ }), (0, _react2.jsx)(IconWithPopover, null));
405
+ };
406
+
407
+ return (0, _react2.jsx)(_index.OverlayProvider, null, (0, _react2.jsx)(_index.ListView, (0, _extends2["default"])({}, args, {
408
+ items: theseItems
409
+ }), function (item) {
410
+ return (0, _react2.jsx)(_collections.Item, (0, _extends2["default"])({}, item, {
411
+ textValue: item.name,
412
+ "data-id": item.key,
413
+ listItemProps: {
414
+ variant: 'boxes.linkedListViewItem'
415
+ }
416
+ }), item.parentId ? (0, _react2.jsx)(Staging, (0, _extends2["default"])({}, item, {
417
+ hasInsetSeparator: true
418
+ })) : (0, _react2.jsx)(Production, (0, _extends2["default"])({
419
+ hasStaging: item.childrenObjects
420
+ }, item)));
421
+ }));
422
+ };
423
+
424
+ exports.Default = Default;
@@ -40,7 +40,9 @@ var card = {
40
40
  p: 'lg',
41
41
  alignItems: 'center',
42
42
  justifyContent: 'center',
43
- flex: '1 1 0'
43
+ flex: '1 1 0',
44
+ fontWeight: 1,
45
+ fontSize: 'md'
44
46
  }; // Used to give a border to radio elements
45
47
 
46
48
  var radioContainer = {
@@ -100,6 +102,21 @@ var listViewItem = _objectSpread(_objectSpread({}, base), {}, {
100
102
  }
101
103
  });
102
104
 
105
+ var linkedListViewItem = _objectSpread(_objectSpread({}, listViewItem), {}, {
106
+ minHeight: '75px',
107
+ '&.has-inset-separator': {
108
+ '&:after': {
109
+ content: '""',
110
+ position: 'absolute',
111
+ width: 'calc(100% - 43px)',
112
+ right: 0,
113
+ bottom: 0,
114
+ borderBottom: '1px solid',
115
+ borderBottomColor: 'line.hairline'
116
+ }
117
+ }
118
+ });
119
+
103
120
  var listBoxSectionTitle = {
104
121
  fontSize: 'sm',
105
122
  fontWeight: '3',
@@ -381,6 +398,7 @@ var _default = {
381
398
  listItem: listItem,
382
399
  listBoxSectionTitle: listBoxSectionTitle,
383
400
  listViewItem: listViewItem,
401
+ linkedListViewItem: linkedListViewItem,
384
402
  radioCheckedContent: radioCheckedContent,
385
403
  radioContainer: radioContainer,
386
404
  scrollbox: scrollbox,
@@ -57,6 +57,11 @@ var tableRow = {
57
57
  width: '100%',
58
58
  flexDirection: 'row !important'
59
59
  };
60
+ var tableCaption = {
61
+ textAlign: 'left',
62
+ marginBottom: 'xs',
63
+ lineHeight: '21px'
64
+ };
60
65
  var table = {
61
66
  width: '100%'
62
67
  };
@@ -65,6 +70,7 @@ var _default = {
65
70
  tableData: tableData,
66
71
  tableBody: tableBody,
67
72
  tableRow: tableRow,
73
+ tableCaption: tableCaption,
68
74
  table: table
69
75
  };
70
76
  exports["default"] = _default;
@@ -22,8 +22,35 @@ export var Default = function Default(args) {
22
22
  return ___EmotionJSX(Card, args);
23
23
  };
24
24
  export var CardRow = function CardRow() {
25
+ var sx = {
26
+ li: {
27
+ display: 'inline',
28
+ flexGrow: 1,
29
+ flexBasis: '0%'
30
+ },
31
+ card: {
32
+ display: 'block'
33
+ }
34
+ };
25
35
  return ___EmotionJSX(Box, {
26
36
  isRow: true,
27
- gap: "md"
28
- }, ___EmotionJSX(Card, null, "First"), ___EmotionJSX(Card, null, "Second"), ___EmotionJSX(Card, null, "Third"));
37
+ gap: "md",
38
+ as: "ul",
39
+ pl: "0px"
40
+ }, ___EmotionJSX(Box, {
41
+ as: "li",
42
+ sx: sx.li
43
+ }, ___EmotionJSX(Card, {
44
+ sx: sx.card
45
+ }, "First")), ___EmotionJSX(Box, {
46
+ as: "li",
47
+ sx: sx.li
48
+ }, ___EmotionJSX(Card, {
49
+ sx: sx.card
50
+ }, "Second")), ___EmotionJSX(Box, {
51
+ as: "li",
52
+ sx: sx.li
53
+ }, ___EmotionJSX(Card, {
54
+ sx: sx.card
55
+ }, "Third")));
29
56
  };
@@ -1,4 +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";
1
9
  import _extends from "@babel/runtime-corejs3/helpers/esm/extends";
10
+ import _defineProperty from "@babel/runtime-corejs3/helpers/esm/defineProperty";
11
+
12
+ 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; }
13
+
14
+ 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; }
15
+
2
16
  import React from 'react';
3
17
  import PropTypes from 'prop-types';
4
18
  import { ChipContext } from './ChipContext';
@@ -18,7 +32,18 @@ var Chip = /*#__PURE__*/React.forwardRef(function (props, ref) {
18
32
  textColor = props.textColor,
19
33
  textProps = props.textProps,
20
34
  label = props.label,
35
+ align = props.align,
21
36
  isUppercase = props.isUppercase;
37
+
38
+ var sx = _objectSpread({}, isUppercase && {
39
+ paddingBottom: '3px'
40
+ });
41
+
42
+ if (align) {
43
+ sx.position = 'absolute';
44
+ sx[align] = '15px';
45
+ }
46
+
22
47
  return ___EmotionJSX(ChipContext.Provider, {
23
48
  value: {
24
49
  bg: bg
@@ -26,9 +51,7 @@ var Chip = /*#__PURE__*/React.forwardRef(function (props, ref) {
26
51
  }, ___EmotionJSX(Box, _extends({
27
52
  isRow: true,
28
53
  variant: "boxes.chip",
29
- sx: isUppercase && {
30
- paddingBottom: '3px'
31
- },
54
+ sx: sx,
32
55
  ref: ref
33
56
  }, props), ___EmotionJSX(Text, _extends({
34
57
  variant: "label",
@@ -53,7 +76,10 @@ Chip.propTypes = {
53
76
  textProps: PropTypes.shape({}),
54
77
 
55
78
  /** When true, display chip label as uppercase. */
56
- isUppercase: PropTypes.bool
79
+ isUppercase: PropTypes.bool,
80
+
81
+ /** Alignment of chip relative to parent container. */
82
+ align: PropTypes.oneOf(['top', 'right', 'bottom', 'left'])
57
83
  };
58
84
  Chip.defaultProps = {
59
85
  textColor: 'white',
@@ -40,4 +40,12 @@ test('renders Chip component with uppercase', function () {
40
40
  isUppercase: isUppercase
41
41
  });
42
42
  expect(screen.queryByText('uppercase')).toHaveStyleRule('text-transform', 'uppercase');
43
+ });
44
+ test('renders Chip component with custom alignment', function () {
45
+ var align = 'right';
46
+ getComponent({
47
+ align: align
48
+ });
49
+ expect(screen.getByTestId(testId)).toHaveStyleRule('position', 'absolute');
50
+ expect(screen.getByTestId(testId)).toHaveStyleRule('right', '15px');
43
51
  });
@@ -943,7 +943,6 @@ describe('Sortable DataTable with useAsyncList', function () {
943
943
  var first = a[sortDescriptor.column];
944
944
  var second = b[sortDescriptor.column]; // eslint-disable-next-line radix
945
945
 
946
- // eslint-disable-next-line radix
947
946
  var cmp = (_parseInt(first) || first) < (_parseInt(second) || second) ? -1 : 1;
948
947
 
949
948
  if (sortDescriptor.direction === 'descending') {
@@ -1139,7 +1138,6 @@ describe('Sortable DataTable with useAsyncList', function () {
1139
1138
  var first = a[sortDescriptor.column];
1140
1139
  var second = b[sortDescriptor.column]; // eslint-disable-next-line radix
1141
1140
 
1142
- // eslint-disable-next-line radix
1143
1141
  var cmp = (_parseInt(first) || first) < (_parseInt(second) || second) ? -1 : 1;
1144
1142
 
1145
1143
  if (sortDescriptor.direction === 'descending') {