@pingux/astro 1.27.0-alpha.17 → 1.27.0-alpha.18
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/lib/cjs/components/MultivaluesField/MultivaluesField.js +10 -10
- package/lib/cjs/index.js +2 -67
- package/lib/cjs/recipes/FlippableCaretMenuButton.stories.js +30 -38
- package/lib/cjs/recipes/MaskedValue.stories.js +5 -8
- package/lib/cjs/recipes/NeutralInput.stories.js +3 -6
- package/lib/cjs/recipes/OneWayToBidirectionalArrow.stories.js +33 -38
- package/lib/cjs/recipes/RowLineChart.stories.js +70 -58
- package/lib/cjs/styles/variants/variants.js +1 -4
- package/lib/components/MultivaluesField/MultivaluesField.js +10 -10
- package/lib/index.js +1 -4
- package/lib/recipes/FlippableCaretMenuButton.stories.js +30 -38
- package/lib/recipes/MaskedValue.stories.js +5 -8
- package/lib/recipes/NeutralInput.stories.js +3 -6
- package/lib/recipes/OneWayToBidirectionalArrow.stories.js +33 -38
- package/lib/recipes/RowLineChart.stories.js +70 -58
- package/lib/styles/variants/variants.js +1 -3
- package/package.json +1 -1
- package/lib/cjs/components/DataTable/DataTable.js +0 -477
- package/lib/cjs/components/DataTable/DataTable.stories.js +0 -310
- package/lib/cjs/components/DataTable/DataTable.styles.js +0 -156
- package/lib/cjs/components/DataTable/DataTable.test.js +0 -1307
- package/lib/cjs/components/DataTable/DataTableChip.js +0 -63
- package/lib/cjs/components/DataTable/DataTableChip.test.js +0 -38
- package/lib/cjs/components/DataTable/DataTableMenu.js +0 -51
- package/lib/cjs/components/DataTable/DataTableMenu.test.js +0 -20
- package/lib/cjs/components/DataTable/DataTableMultiLine.js +0 -75
- package/lib/cjs/components/DataTable/DataTableMultiLine.test.js +0 -30
- package/lib/cjs/components/DataTable/DataTableVirtualizer.js +0 -188
- package/lib/cjs/components/DataTable/index.js +0 -54
- package/lib/cjs/context/DataTableContext/index.js +0 -31
- package/lib/components/DataTable/DataTable.js +0 -431
- package/lib/components/DataTable/DataTable.stories.js +0 -273
- package/lib/components/DataTable/DataTable.styles.js +0 -137
- package/lib/components/DataTable/DataTable.test.js +0 -1256
- package/lib/components/DataTable/DataTableChip.js +0 -33
- package/lib/components/DataTable/DataTableChip.test.js +0 -31
- package/lib/components/DataTable/DataTableMenu.js +0 -24
- package/lib/components/DataTable/DataTableMenu.test.js +0 -13
- package/lib/components/DataTable/DataTableMultiLine.js +0 -46
- package/lib/components/DataTable/DataTableMultiLine.test.js +0 -22
- package/lib/components/DataTable/DataTableVirtualizer.js +0 -157
- package/lib/components/DataTable/index.js +0 -5
- package/lib/context/DataTableContext/index.js +0 -5
@@ -170,34 +170,6 @@ var zeroData = [{
|
|
170
170
|
id: 12,
|
171
171
|
value: 0
|
172
172
|
}];
|
173
|
-
var sx = {
|
174
|
-
container: {
|
175
|
-
backgroundColor: 'accent.99',
|
176
|
-
alignItems: 'center',
|
177
|
-
justifyContent: 'space-between',
|
178
|
-
pr: '20px'
|
179
|
-
},
|
180
|
-
button: {
|
181
|
-
ml: 'md',
|
182
|
-
pr: 'md'
|
183
|
-
},
|
184
|
-
chartTitleContainer: {
|
185
|
-
ml: '20px',
|
186
|
-
pr: 'md'
|
187
|
-
},
|
188
|
-
chartContainer: {
|
189
|
-
width: '100%',
|
190
|
-
height: '100%'
|
191
|
-
},
|
192
|
-
chart: {
|
193
|
-
width: '50',
|
194
|
-
height: '18'
|
195
|
-
},
|
196
|
-
chartTrendContainer: {
|
197
|
-
ml: 'md',
|
198
|
-
width: '50px'
|
199
|
-
}
|
200
|
-
};
|
201
173
|
|
202
174
|
var Default = function Default() {
|
203
175
|
var _useResizeObserver = (0, _useResizeObserver2["default"])(),
|
@@ -221,7 +193,10 @@ var Default = function Default() {
|
|
221
193
|
}, [isMobile]);
|
222
194
|
var EmptyData = (0, _react2.jsx)(_index.Box, {
|
223
195
|
isRow: true,
|
224
|
-
|
196
|
+
bg: "accent.99",
|
197
|
+
alignItems: "center",
|
198
|
+
justifyContent: "space-between",
|
199
|
+
pr: 20,
|
225
200
|
ref: ref
|
226
201
|
}, (0, _react2.jsx)(_index.Box, {
|
227
202
|
p: "md",
|
@@ -235,7 +210,8 @@ var Default = function Default() {
|
|
235
210
|
alignItems: "center"
|
236
211
|
}, (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
237
212
|
variant: "boxes.expandableRow.lineChart.alignCellRightWrapper",
|
238
|
-
|
213
|
+
ml: 20,
|
214
|
+
pr: 15
|
239
215
|
}, hideIfMobile()), (0, _react2.jsx)(_index.Text, {
|
240
216
|
variant: "expandableRow.lineChart.title"
|
241
217
|
}, "Avg daily sign-ons:")), (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
@@ -248,7 +224,8 @@ var Default = function Default() {
|
|
248
224
|
}, "Past 7 days")), (0, _react2.jsx)(_index.TooltipTrigger, null, (0, _react2.jsx)(_index.Button, (0, _extends2["default"])({
|
249
225
|
variant: "expandableRow.chartWrapper",
|
250
226
|
onPress: (0, _addonActions.action)('seeContributingDataAction'),
|
251
|
-
|
227
|
+
ml: 15,
|
228
|
+
pr: 15,
|
252
229
|
"aria-label": "line-chart button"
|
253
230
|
}, hideIfTablet()), (0, _react2.jsx)(_index.Box, {
|
254
231
|
variant: "boxes.expandableRow.lineChart.divider"
|
@@ -257,9 +234,11 @@ var Default = function Default() {
|
|
257
234
|
}, (0, _react2.jsx)(_index.Box, {
|
258
235
|
variant: "boxes.expandableRow.lineChart.chart"
|
259
236
|
}, (0, _react2.jsx)(_recharts.ResponsiveContainer, {
|
260
|
-
|
237
|
+
width: "100%",
|
238
|
+
height: "100%"
|
261
239
|
}, (0, _react2.jsx)(_recharts.LineChart, {
|
262
|
-
|
240
|
+
width: 50,
|
241
|
+
height: 18,
|
263
242
|
data: chartData
|
264
243
|
}, (0, _react2.jsx)(_recharts.Line, {
|
265
244
|
type: "monotone",
|
@@ -270,7 +249,8 @@ var Default = function Default() {
|
|
270
249
|
variant: "expandableRow.lineChart.chartLabel"
|
271
250
|
}, "No data yet")), (0, _react2.jsx)(_index.Box, {
|
272
251
|
size: "sm",
|
273
|
-
|
252
|
+
ml: 15,
|
253
|
+
width: 50
|
274
254
|
}, (0, _react2.jsx)(_index.Text, {
|
275
255
|
variant: "expandableRow.lineChart.trend"
|
276
256
|
}, "+ 0%"))), (0, _react2.jsx)(_index.Tooltip, null, "See Contributing Data")), (0, _react2.jsx)(_index.Box, {
|
@@ -280,7 +260,10 @@ var Default = function Default() {
|
|
280
260
|
}))));
|
281
261
|
var FullData = (0, _react2.jsx)(_index.Box, {
|
282
262
|
isRow: true,
|
283
|
-
|
263
|
+
bg: "accent.99",
|
264
|
+
alignItems: "center",
|
265
|
+
justifyContent: "space-between",
|
266
|
+
pr: 20,
|
284
267
|
mt: 20
|
285
268
|
}, (0, _react2.jsx)(_index.Box, {
|
286
269
|
p: "md",
|
@@ -294,7 +277,8 @@ var Default = function Default() {
|
|
294
277
|
alignItems: "center"
|
295
278
|
}, (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
296
279
|
variant: "boxes.expandableRow.lineChart.alignCellRightWrapper",
|
297
|
-
|
280
|
+
ml: 20,
|
281
|
+
pr: 15
|
298
282
|
}, hideIfMobile()), (0, _react2.jsx)(_index.Text, {
|
299
283
|
variant: "expandableRow.lineChart.title"
|
300
284
|
}, "Avg daily sign-ons:")), (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
@@ -307,7 +291,8 @@ var Default = function Default() {
|
|
307
291
|
}, "Past 7 days")), (0, _react2.jsx)(_index.TooltipTrigger, null, (0, _react2.jsx)(_index.Button, (0, _extends2["default"])({
|
308
292
|
variant: "expandableRow.chartWrapper",
|
309
293
|
onPress: (0, _addonActions.action)('seeContributingDataAction'),
|
310
|
-
|
294
|
+
ml: 15,
|
295
|
+
pr: 15,
|
311
296
|
"aria-label": "line-chart button"
|
312
297
|
}, hideIfTablet()), (0, _react2.jsx)(_index.Box, {
|
313
298
|
variant: "boxes.expandableRow.lineChart.divider"
|
@@ -317,9 +302,11 @@ var Default = function Default() {
|
|
317
302
|
variant: "boxes.expandableRow.lineChart.chart",
|
318
303
|
width: 50
|
319
304
|
}, (0, _react2.jsx)(_recharts.ResponsiveContainer, {
|
320
|
-
|
305
|
+
width: "100%",
|
306
|
+
height: "100%"
|
321
307
|
}, (0, _react2.jsx)(_recharts.LineChart, {
|
322
|
-
|
308
|
+
width: 50,
|
309
|
+
height: 18,
|
323
310
|
data: chartData
|
324
311
|
}, (0, _react2.jsx)(_recharts.Line, {
|
325
312
|
type: "monotone",
|
@@ -330,7 +317,8 @@ var Default = function Default() {
|
|
330
317
|
variant: "expandableRow.lineChart.chartLabel"
|
331
318
|
}, "12 wk trend")), (0, _react2.jsx)(_index.Box, {
|
332
319
|
size: "sm",
|
333
|
-
|
320
|
+
ml: 15,
|
321
|
+
width: 50
|
334
322
|
}, (0, _react2.jsx)(_index.Text, {
|
335
323
|
variant: "expandableRow.lineChart.trend"
|
336
324
|
}, "+ 8.6%"))), (0, _react2.jsx)(_index.Tooltip, null, "See Contributing Data")), (0, _react2.jsx)(_index.Box, {
|
@@ -340,7 +328,10 @@ var Default = function Default() {
|
|
340
328
|
}))));
|
341
329
|
var PartialData = (0, _react2.jsx)(_index.Box, {
|
342
330
|
isRow: true,
|
343
|
-
|
331
|
+
bg: "accent.99",
|
332
|
+
alignItems: "center",
|
333
|
+
justifyContent: "space-between",
|
334
|
+
pr: 20,
|
344
335
|
mt: 20
|
345
336
|
}, (0, _react2.jsx)(_index.Box, {
|
346
337
|
p: "md",
|
@@ -354,7 +345,8 @@ var Default = function Default() {
|
|
354
345
|
alignItems: "center"
|
355
346
|
}, (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
356
347
|
variant: "boxes.expandableRow.lineChart.alignCellRightWrapper",
|
357
|
-
|
348
|
+
ml: 20,
|
349
|
+
pr: 15
|
358
350
|
}, hideIfMobile()), (0, _react2.jsx)(_index.Text, {
|
359
351
|
variant: "expandableRow.lineChart.title"
|
360
352
|
}, "Avg daily sign-ons:")), (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
@@ -367,7 +359,8 @@ var Default = function Default() {
|
|
367
359
|
}, "Past 7 days")), (0, _react2.jsx)(_index.TooltipTrigger, null, (0, _react2.jsx)(_index.Button, (0, _extends2["default"])({
|
368
360
|
variant: "expandableRow.chartWrapper",
|
369
361
|
onPress: (0, _addonActions.action)('seeContributingDataAction'),
|
370
|
-
|
362
|
+
ml: 15,
|
363
|
+
pr: 15,
|
371
364
|
"aria-label": "line-chart button"
|
372
365
|
}, hideIfTablet()), (0, _react2.jsx)(_index.Box, {
|
373
366
|
variant: "boxes.expandableRow.lineChart.divider"
|
@@ -377,9 +370,11 @@ var Default = function Default() {
|
|
377
370
|
variant: "boxes.expandableRow.lineChart.chart",
|
378
371
|
width: 50
|
379
372
|
}, (0, _react2.jsx)(_recharts.ResponsiveContainer, {
|
380
|
-
|
373
|
+
width: "100%",
|
374
|
+
height: "100%"
|
381
375
|
}, (0, _react2.jsx)(_recharts.LineChart, {
|
382
|
-
|
376
|
+
width: 50,
|
377
|
+
height: 18,
|
383
378
|
data: partialDataData
|
384
379
|
}, (0, _react2.jsx)(_recharts.Line, {
|
385
380
|
type: "monotone",
|
@@ -390,7 +385,8 @@ var Default = function Default() {
|
|
390
385
|
variant: "expandableRow.lineChart.chartLabel"
|
391
386
|
}, "12 wk trend")), (0, _react2.jsx)(_index.Box, {
|
392
387
|
size: "sm",
|
393
|
-
|
388
|
+
ml: 15,
|
389
|
+
width: 50
|
394
390
|
}, (0, _react2.jsx)(_index.Text, {
|
395
391
|
variant: "expandableRow.lineChart.trend"
|
396
392
|
}, "- 8.6%"))), (0, _react2.jsx)(_index.Tooltip, null, "See Contributing Data")), (0, _react2.jsx)(_index.Box, {
|
@@ -400,7 +396,10 @@ var Default = function Default() {
|
|
400
396
|
}))));
|
401
397
|
var ZeroData = (0, _react2.jsx)(_index.Box, {
|
402
398
|
isRow: true,
|
403
|
-
|
399
|
+
bg: "accent.99",
|
400
|
+
alignItems: "center",
|
401
|
+
justifyContent: "space-between",
|
402
|
+
pr: 20,
|
404
403
|
mt: 20
|
405
404
|
}, (0, _react2.jsx)(_index.Box, {
|
406
405
|
p: "md",
|
@@ -414,7 +413,8 @@ var Default = function Default() {
|
|
414
413
|
alignItems: "center"
|
415
414
|
}, (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
416
415
|
variant: "boxes.expandableRow.lineChart.alignCellRightWrapper",
|
417
|
-
|
416
|
+
ml: 20,
|
417
|
+
pr: 15
|
418
418
|
}, hideIfMobile()), (0, _react2.jsx)(_index.Text, {
|
419
419
|
variant: "expandableRow.lineChart.title"
|
420
420
|
}, "Avg daily sign-ons:")), (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
@@ -427,7 +427,8 @@ var Default = function Default() {
|
|
427
427
|
}, "Past 7 days")), (0, _react2.jsx)(_index.TooltipTrigger, null, (0, _react2.jsx)(_index.Button, (0, _extends2["default"])({
|
428
428
|
variant: "expandableRow.chartWrapper",
|
429
429
|
onPress: (0, _addonActions.action)('seeContributingDataAction'),
|
430
|
-
|
430
|
+
ml: 15,
|
431
|
+
pr: 15,
|
431
432
|
"aria-label": "line-chart button"
|
432
433
|
}, hideIfTablet()), (0, _react2.jsx)(_index.Box, {
|
433
434
|
variant: "boxes.expandableRow.lineChart.divider"
|
@@ -437,9 +438,11 @@ var Default = function Default() {
|
|
437
438
|
variant: "boxes.expandableRow.lineChart.chart",
|
438
439
|
width: 50
|
439
440
|
}, (0, _react2.jsx)(_recharts.ResponsiveContainer, {
|
440
|
-
|
441
|
+
width: "100%",
|
442
|
+
height: "100%"
|
441
443
|
}, (0, _react2.jsx)(_recharts.LineChart, {
|
442
|
-
|
444
|
+
width: 50,
|
445
|
+
height: 18,
|
443
446
|
data: zeroData
|
444
447
|
}, (0, _react2.jsx)(_recharts.Line, {
|
445
448
|
type: "monotone",
|
@@ -450,7 +453,8 @@ var Default = function Default() {
|
|
450
453
|
variant: "expandableRow.lineChart.chartLabel"
|
451
454
|
}, "12 wk trend")), (0, _react2.jsx)(_index.Box, {
|
452
455
|
size: "sm",
|
453
|
-
|
456
|
+
ml: 15,
|
457
|
+
width: 50
|
454
458
|
}, (0, _react2.jsx)(_index.Text, {
|
455
459
|
variant: "expandableRow.lineChart.trend"
|
456
460
|
}, "+ 0%"))), (0, _react2.jsx)(_index.Tooltip, null, "See Contributing Data")), (0, _react2.jsx)(_index.Box, {
|
@@ -460,7 +464,10 @@ var Default = function Default() {
|
|
460
464
|
}))));
|
461
465
|
var ZeroValues = (0, _react2.jsx)(_index.Box, {
|
462
466
|
isRow: true,
|
463
|
-
|
467
|
+
bg: "accent.99",
|
468
|
+
alignItems: "center",
|
469
|
+
justifyContent: "space-between",
|
470
|
+
pr: 20,
|
464
471
|
mt: 20
|
465
472
|
}, (0, _react2.jsx)(_index.Box, {
|
466
473
|
p: "md",
|
@@ -474,7 +481,8 @@ var Default = function Default() {
|
|
474
481
|
alignItems: "center"
|
475
482
|
}, (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
476
483
|
variant: "boxes.expandableRow.lineChart.alignCellRightWrapper",
|
477
|
-
|
484
|
+
ml: 20,
|
485
|
+
pr: 15
|
478
486
|
}, hideIfMobile()), (0, _react2.jsx)(_index.Text, {
|
479
487
|
variant: "expandableRow.lineChart.title"
|
480
488
|
}, "Avg daily sign-ons:")), (0, _react2.jsx)(_index.Box, (0, _extends2["default"])({
|
@@ -487,7 +495,8 @@ var Default = function Default() {
|
|
487
495
|
}, "Past 7 days")), (0, _react2.jsx)(_index.TooltipTrigger, null, (0, _react2.jsx)(_index.Button, (0, _extends2["default"])({
|
488
496
|
variant: "expandableRow.chartWrapper",
|
489
497
|
onPress: (0, _addonActions.action)('seeContributingDataAction'),
|
490
|
-
|
498
|
+
ml: 15,
|
499
|
+
pr: 15,
|
491
500
|
"aria-label": "line-chart button"
|
492
501
|
}, hideIfTablet()), (0, _react2.jsx)(_index.Box, {
|
493
502
|
variant: "boxes.expandableRow.lineChart.divider"
|
@@ -497,9 +506,11 @@ var Default = function Default() {
|
|
497
506
|
variant: "boxes.expandableRow.lineChart.chart",
|
498
507
|
width: 50
|
499
508
|
}, (0, _react2.jsx)(_recharts.ResponsiveContainer, {
|
500
|
-
|
509
|
+
width: "100%",
|
510
|
+
height: "100%"
|
501
511
|
}, (0, _react2.jsx)(_recharts.LineChart, {
|
502
|
-
|
512
|
+
width: 50,
|
513
|
+
height: 18,
|
503
514
|
data: zeroValuesData
|
504
515
|
}, (0, _react2.jsx)(_recharts.Line, {
|
505
516
|
type: "monotone",
|
@@ -510,7 +521,8 @@ var Default = function Default() {
|
|
510
521
|
variant: "expandableRow.lineChart.chartLabel"
|
511
522
|
}, "12 wk trend")), (0, _react2.jsx)(_index.Box, {
|
512
523
|
size: "sm",
|
513
|
-
|
524
|
+
ml: 15,
|
525
|
+
width: 50
|
514
526
|
}, (0, _react2.jsx)(_index.Text, {
|
515
527
|
variant: "expandableRow.lineChart.trend"
|
516
528
|
}, "+ 0%"))), (0, _react2.jsx)(_index.Tooltip, null, "See Contributing Data")), (0, _react2.jsx)(_index.Box, {
|
@@ -76,8 +76,6 @@ var _tooltip = _interopRequireDefault(require("./tooltip"));
|
|
76
76
|
|
77
77
|
var _collapsiblePanel = _interopRequireDefault(require("./collapsiblePanel"));
|
78
78
|
|
79
|
-
var _DataTable = _interopRequireDefault(require("./../../components/DataTable/DataTable.styles"));
|
80
|
-
|
81
79
|
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); }
|
82
80
|
|
83
81
|
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; }
|
@@ -109,8 +107,7 @@ var _default = _objectSpread(_objectSpread({
|
|
109
107
|
stepper: _stepper["default"],
|
110
108
|
table: _table["default"]
|
111
109
|
}, tabs), {}, {
|
112
|
-
tooltip: _tooltip["default"]
|
113
|
-
dataTable: _DataTable["default"]
|
110
|
+
tooltip: _tooltip["default"]
|
114
111
|
});
|
115
112
|
|
116
113
|
exports["default"] = _default;
|
@@ -18,7 +18,7 @@ import _slicedToArray from "@babel/runtime-corejs3/helpers/esm/slicedToArray";
|
|
18
18
|
|
19
19
|
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; }
|
20
20
|
|
21
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var
|
21
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context9, _context10; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context9 = ownKeys(Object(source), !0)).call(_context9, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context10 = ownKeys(Object(source))).call(_context10, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
22
22
|
|
23
23
|
import React, { forwardRef, useCallback, useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
|
24
24
|
import PropTypes from 'prop-types';
|
@@ -46,7 +46,7 @@ import FieldHelperText from '../FieldHelperText';
|
|
46
46
|
|
47
47
|
import { jsx as ___EmotionJSX } from "@emotion/react";
|
48
48
|
var MultivaluesField = /*#__PURE__*/forwardRef(function (props, ref) {
|
49
|
-
var
|
49
|
+
var _context6;
|
50
50
|
|
51
51
|
var defaultSelectedKeys = props.defaultSelectedKeys,
|
52
52
|
direction = props.direction,
|
@@ -228,7 +228,7 @@ var MultivaluesField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
228
228
|
setFilterString('');
|
229
229
|
}
|
230
230
|
} else if (hasCustomValue) {
|
231
|
-
var _context3
|
231
|
+
var _context3;
|
232
232
|
|
233
233
|
var _key2 = e.target.value;
|
234
234
|
|
@@ -236,8 +236,8 @@ var MultivaluesField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
236
236
|
return;
|
237
237
|
}
|
238
238
|
|
239
|
-
selectionManager.
|
240
|
-
setCustomItems(_concatInstanceProperty(
|
239
|
+
selectionManager.toggleSelection(_key2);
|
240
|
+
setCustomItems(_concatInstanceProperty(_context3 = []).call(_context3, customItems, [{
|
241
241
|
id: _key2,
|
242
242
|
key: _key2,
|
243
243
|
name: _key2
|
@@ -291,9 +291,9 @@ var MultivaluesField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
291
291
|
};
|
292
292
|
|
293
293
|
var readOnlyInputEntry = ___EmotionJSX(React.Fragment, null, isReadOnly && (readOnlyKeys.length ? _mapInstanceProperty(readOnlyKeys).call(readOnlyKeys, function (key) {
|
294
|
-
var
|
294
|
+
var _context4, _context5;
|
295
295
|
|
296
|
-
var item = _findInstanceProperty(
|
296
|
+
var item = _findInstanceProperty(_context4 = _concatInstanceProperty(_context5 = []).call(_context5, initialItems, customItems)).call(_context4, function (el) {
|
297
297
|
return el.key === key;
|
298
298
|
});
|
299
299
|
|
@@ -329,10 +329,10 @@ var MultivaluesField = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
329
329
|
return null;
|
330
330
|
}));
|
331
331
|
|
332
|
-
var selectedItems = ___EmotionJSX(React.Fragment, null, _mapInstanceProperty(
|
333
|
-
var
|
332
|
+
var selectedItems = ___EmotionJSX(React.Fragment, null, _mapInstanceProperty(_context6 = _Array$from(selectionManager.selectedKeys)).call(_context6, function (key) {
|
333
|
+
var _context7, _context8;
|
334
334
|
|
335
|
-
var item = _findInstanceProperty(
|
335
|
+
var item = _findInstanceProperty(_context7 = _concatInstanceProperty(_context8 = []).call(_context8, initialItems, customItems)).call(_context7, function (el) {
|
336
336
|
return el.key === key;
|
337
337
|
});
|
338
338
|
|
package/lib/index.js
CHANGED
@@ -151,7 +151,4 @@ export * from './components/TooltipTrigger';
|
|
151
151
|
|
152
152
|
export { Item, Section } from '@react-stately/collections';
|
153
153
|
export { OverlayProvider, useOverlayPosition, useOverlayTrigger } from '@react-aria/overlays';
|
154
|
-
export { useOverlayTriggerState } from '@react-stately/overlays';
|
155
|
-
export { default as DataTable } from './components/DataTable';
|
156
|
-
export * from './components/DataTable';
|
157
|
-
export { Cell as DataTableCell, Column as DataTableColumn, Row as DataTableRow, TableBody as DataTableBody, TableHeader as DataTableHeader } from '@react-spectrum/table';
|
154
|
+
export { useOverlayTriggerState } from '@react-stately/overlays';
|
@@ -31,40 +31,6 @@ export default {
|
|
31
31
|
title: 'Recipes/FlippableCaretMenuButton'
|
32
32
|
};
|
33
33
|
var buttonArray = ['Web App', 'Native App', 'Single Page App', 'Non-Interactive', 'Worker', 'Advanced Configuration', 'Built-in admin console for this environment', 'Built-in Application portal'];
|
34
|
-
var sx = {
|
35
|
-
openButton: {
|
36
|
-
height: '30px',
|
37
|
-
borderRadius: 'md',
|
38
|
-
fontSize: '13px',
|
39
|
-
mb: 'sm'
|
40
|
-
},
|
41
|
-
closeIconButton: {
|
42
|
-
position: 'absolute',
|
43
|
-
top: '14px',
|
44
|
-
right: 'sm'
|
45
|
-
},
|
46
|
-
buttonsContainer: {
|
47
|
-
p: 'lg',
|
48
|
-
flexDirection: 'initial !important',
|
49
|
-
alignContent: 'space-between',
|
50
|
-
flexWrap: 'wrap'
|
51
|
-
},
|
52
|
-
selectedButton: {
|
53
|
-
mb: 'sm',
|
54
|
-
mr: '4px',
|
55
|
-
height: '30px',
|
56
|
-
borderRadius: '15px',
|
57
|
-
fontSize: '13px'
|
58
|
-
},
|
59
|
-
unSelectedButton: {
|
60
|
-
mb: 'sm',
|
61
|
-
mr: '4px',
|
62
|
-
borderColor: 'neutral.80',
|
63
|
-
height: '30px',
|
64
|
-
borderRadius: '15px',
|
65
|
-
fontSize: '13px'
|
66
|
-
}
|
67
|
-
};
|
68
34
|
export var Default = function Default() {
|
69
35
|
var buttonRef = useRef();
|
70
36
|
var popoverRef = useRef();
|
@@ -123,9 +89,14 @@ export var Default = function Default() {
|
|
123
89
|
|
124
90
|
return ___EmotionJSX(React.Fragment, null, ___EmotionJSX(Button, {
|
125
91
|
ref: buttonRef,
|
92
|
+
mb: "sm",
|
126
93
|
variant: "inline",
|
127
94
|
onPress: onChange,
|
128
|
-
sx:
|
95
|
+
sx: {
|
96
|
+
height: '30px',
|
97
|
+
borderRadius: '15px',
|
98
|
+
fontSize: '13px'
|
99
|
+
}
|
129
100
|
}, ___EmotionJSX(Box, {
|
130
101
|
isRow: true,
|
131
102
|
alignItems: "center"
|
@@ -148,15 +119,36 @@ export var Default = function Default() {
|
|
148
119
|
onPress: function onPress() {
|
149
120
|
return setIsOpen(false);
|
150
121
|
},
|
151
|
-
sx:
|
122
|
+
sx: {
|
123
|
+
position: 'absolute',
|
124
|
+
top: 14,
|
125
|
+
right: 10
|
126
|
+
}
|
152
127
|
}, ___EmotionJSX(Icon, {
|
153
128
|
icon: CloseIcon
|
154
129
|
})), ___EmotionJSX(Box, {
|
155
|
-
sx:
|
130
|
+
sx: {
|
131
|
+
p: 'lg',
|
132
|
+
flexDirection: 'initial !important',
|
133
|
+
alignContent: 'space-between',
|
134
|
+
flexWrap: 'wrap'
|
135
|
+
}
|
156
136
|
}, _mapInstanceProperty(buttonArray).call(buttonArray, function (item) {
|
157
137
|
return ___EmotionJSX(Button, {
|
138
|
+
mb: "sm",
|
158
139
|
variant: "inline",
|
159
|
-
sx: _includesInstanceProperty(selectedButtons).call(selectedButtons, item) ?
|
140
|
+
sx: _includesInstanceProperty(selectedButtons).call(selectedButtons, item) ? {
|
141
|
+
mr: '4px',
|
142
|
+
height: '30px',
|
143
|
+
borderRadius: '15px',
|
144
|
+
fontSize: '13px'
|
145
|
+
} : {
|
146
|
+
mr: '4px',
|
147
|
+
borderColor: 'neutral.80',
|
148
|
+
height: '30px',
|
149
|
+
borderRadius: '15px',
|
150
|
+
fontSize: '13px'
|
151
|
+
},
|
160
152
|
key: item,
|
161
153
|
onPress: function onPress() {
|
162
154
|
return toggleButton(item);
|
@@ -23,13 +23,6 @@ export default {
|
|
23
23
|
}
|
24
24
|
}
|
25
25
|
};
|
26
|
-
var sx = {
|
27
|
-
showHideButton: {
|
28
|
-
width: 'fit-content',
|
29
|
-
marginLeft: 'sm',
|
30
|
-
alignSelf: 'auto'
|
31
|
-
}
|
32
|
-
};
|
33
26
|
export var Default = function Default(_ref) {
|
34
27
|
var _context;
|
35
28
|
|
@@ -59,7 +52,11 @@ export var Default = function Default(_ref) {
|
|
59
52
|
onPress: function onPress() {
|
60
53
|
return setIsMasked(!isMasked);
|
61
54
|
},
|
62
|
-
sx:
|
55
|
+
sx: {
|
56
|
+
width: 'fit-content',
|
57
|
+
marginLeft: 10,
|
58
|
+
alignSelf: 'auto'
|
59
|
+
}
|
63
60
|
}, ___EmotionJSX(Icon, {
|
64
61
|
icon: isMasked ? EyeOffIcon : EyeIcon
|
65
62
|
}))));
|
@@ -4,13 +4,10 @@ import { jsx as ___EmotionJSX } from "@emotion/react";
|
|
4
4
|
export default {
|
5
5
|
title: 'Recipes/NeutralCheckboxField'
|
6
6
|
};
|
7
|
-
var sx = {
|
8
|
-
checkboxColor: {
|
9
|
-
color: 'neutral.10'
|
10
|
-
}
|
11
|
-
};
|
12
7
|
export var Default = function Default() {
|
13
8
|
return ___EmotionJSX(CheckboxField, {
|
14
|
-
|
9
|
+
controlProps: {
|
10
|
+
color: 'neutral.10'
|
11
|
+
}
|
15
12
|
}, "Click me");
|
16
13
|
};
|