@doist/reactist 11.0.0 → 11.1.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/dist/reactist.cjs.development.js +298 -286
- package/dist/reactist.cjs.development.js.map +1 -1
- package/dist/reactist.cjs.production.min.js +1 -1
- package/dist/reactist.cjs.production.min.js.map +1 -1
- package/es/components/menu/menu.js +2 -1
- package/es/components/menu/menu.js.map +1 -1
- package/es/index.js +3 -3
- package/es/new-components/alert/alert.js +16 -6
- package/es/new-components/alert/alert.js.map +1 -1
- package/es/new-components/alert/alert.module.css.js +1 -1
- package/es/{components → new-components}/avatar/avatar.js +14 -8
- package/es/new-components/avatar/avatar.js.map +1 -0
- package/es/new-components/avatar/avatar.module.css.js +4 -0
- package/es/new-components/avatar/avatar.module.css.js.map +1 -0
- package/es/{components → new-components}/avatar/utils.js +0 -0
- package/es/new-components/avatar/utils.js.map +1 -0
- package/es/new-components/base-button/base-button.js +1 -1
- package/es/new-components/heading/heading.module.css.js +1 -1
- package/es/new-components/inline/inline.js +2 -2
- package/es/new-components/inline/inline.js.map +1 -1
- package/es/new-components/modal/modal.js +6 -11
- package/es/new-components/modal/modal.js.map +1 -1
- package/es/new-components/notice/notice.js +3 -1
- package/es/new-components/notice/notice.js.map +1 -1
- package/es/new-components/tabs/tabs.module.css.js +1 -1
- package/es/new-components/text/text.module.css.js +1 -1
- package/es/new-components/text-link/text-link.module.css.js +1 -1
- package/lib/components/menu/menu.js +1 -1
- package/lib/components/menu/menu.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/new-components/alert/alert.js +1 -1
- package/lib/new-components/alert/alert.js.map +1 -1
- package/lib/new-components/alert/alert.module.css.js +1 -1
- package/lib/{components/avatar/avatar.test.d.ts → new-components/alert/alert.test.d.ts} +0 -0
- package/lib/{components → new-components}/avatar/avatar.d.ts +6 -3
- package/lib/new-components/avatar/avatar.js +2 -0
- package/lib/new-components/avatar/avatar.js.map +1 -0
- package/lib/new-components/avatar/avatar.module.css.js +2 -0
- package/lib/new-components/avatar/avatar.module.css.js.map +1 -0
- package/lib/{components/avatar/utils.test.d.ts → new-components/avatar/avatar.test.d.ts} +0 -0
- package/lib/new-components/avatar/index.d.ts +1 -0
- package/lib/{components → new-components}/avatar/utils.d.ts +0 -0
- package/lib/{components → new-components}/avatar/utils.js +0 -0
- package/lib/new-components/avatar/utils.js.map +1 -0
- package/lib/new-components/avatar/utils.test.d.ts +1 -0
- package/lib/new-components/base-button/base-button.js +1 -1
- package/lib/new-components/heading/heading.module.css.js +1 -1
- package/lib/new-components/inline/inline.js +1 -1
- package/lib/new-components/inline/inline.js.map +1 -1
- package/lib/new-components/modal/modal.d.ts +2 -1
- package/lib/new-components/modal/modal.js +1 -1
- package/lib/new-components/modal/modal.js.map +1 -1
- package/lib/new-components/notice/notice.js +1 -1
- package/lib/new-components/notice/notice.js.map +1 -1
- package/lib/new-components/notice/notice.test.d.ts +1 -0
- package/lib/new-components/tabs/tabs.module.css.js +1 -1
- package/lib/new-components/text/text.module.css.js +1 -1
- package/lib/new-components/text-link/text-link.module.css.js +1 -1
- package/package.json +1 -1
- package/styles/alert.css +4 -1
- package/styles/alert.module.css.css +1 -1
- package/styles/avatar.css +5 -1
- package/styles/avatar.module.css.css +1 -0
- package/styles/base-field.css +1 -1
- package/styles/checkbox-field.css +1 -1
- package/styles/heading.css +1 -1
- package/styles/heading.module.css.css +1 -1
- package/styles/menu.css +1 -1
- package/styles/password-field.css +1 -1
- package/styles/reactist.css +8 -8
- package/styles/select-field.css +1 -1
- package/styles/switch-field.css +1 -1
- package/styles/tabs.css +1 -1
- package/styles/tabs.module.css.css +1 -1
- package/styles/text-area.css +1 -1
- package/styles/text-field.css +1 -1
- package/styles/text-link.css +1 -1
- package/styles/text-link.module.css.css +1 -1
- package/styles/text.css +1 -1
- package/styles/text.module.css.css +1 -1
- package/es/components/avatar/avatar.js.map +0 -1
- package/es/components/avatar/index.js +0 -6
- package/es/components/avatar/index.js.map +0 -1
- package/es/components/avatar/utils.js.map +0 -1
- package/lib/components/avatar/avatar.js +0 -2
- package/lib/components/avatar/avatar.js.map +0 -1
- package/lib/components/avatar/index.d.ts +0 -2
- package/lib/components/avatar/index.js +0 -2
- package/lib/components/avatar/index.js.map +0 -1
- package/lib/components/avatar/utils.js.map +0 -1
|
@@ -348,7 +348,7 @@ var Inline = /*#__PURE__*/polymorphicComponent(function Inline(_ref, ref) {
|
|
|
348
348
|
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
349
349
|
props = _objectWithoutPropertiesLoose(_ref, _excluded$3);
|
|
350
350
|
|
|
351
|
-
return /*#__PURE__*/React.createElement(Box,
|
|
351
|
+
return /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
352
352
|
as: as,
|
|
353
353
|
display: "flex",
|
|
354
354
|
flexWrap: "wrap",
|
|
@@ -360,7 +360,7 @@ var Inline = /*#__PURE__*/polymorphicComponent(function Inline(_ref, ref) {
|
|
|
360
360
|
justifyContent: mapResponsiveProp(align, function (align) {
|
|
361
361
|
return align === 'left' ? 'flexStart' : align === 'right' ? 'flexEnd' : 'center';
|
|
362
362
|
})
|
|
363
|
-
}), children)
|
|
363
|
+
}), children);
|
|
364
364
|
});
|
|
365
365
|
|
|
366
366
|
var modules_3af3b7ac = {"space-xsmall":"_7b475ead","space-small":"_5641699f","space-medium":"_1a1c63e4","space-large":"_560f80a0","space-xlarge":"_84ffebbc","space-xxlarge":"b60a65cb","tablet-space-xsmall":"d808f5c3","tablet-space-small":"a51c76b3","tablet-space-medium":"_7185a7aa","tablet-space-large":"af82e610","tablet-space-xlarge":"_88b4ff46","tablet-space-xxlarge":"_9de15321","desktop-space-xsmall":"_6fb32d20","desktop-space-small":"_07ee315a","desktop-space-medium":"a270d7ec","desktop-space-large":"ea6ebb29","desktop-space-xlarge":"_35b36178","desktop-space-xxlarge":"_56c7dc23"};
|
|
@@ -462,254 +462,7 @@ var HiddenVisually = /*#__PURE__*/polymorphicComponent(function HiddenVisually(p
|
|
|
462
462
|
}));
|
|
463
463
|
});
|
|
464
464
|
|
|
465
|
-
var _excluded$6 = ["
|
|
466
|
-
var alertIconForTone = {
|
|
467
|
-
info: AlertInfoIcon,
|
|
468
|
-
positive: AlertPositiveIcon,
|
|
469
|
-
caution: AlertCautionIcon,
|
|
470
|
-
critical: AlertCriticalIcon
|
|
471
|
-
};
|
|
472
|
-
|
|
473
|
-
function AlertIcon(_ref) {
|
|
474
|
-
var tone = _ref.tone,
|
|
475
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
476
|
-
|
|
477
|
-
var Icon = alertIconForTone[tone];
|
|
478
|
-
return Icon ? /*#__PURE__*/React.createElement(Icon, Object.assign({}, props)) : null;
|
|
479
|
-
}
|
|
480
|
-
|
|
481
|
-
function AlertInfoIcon(props) {
|
|
482
|
-
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
483
|
-
width: "24",
|
|
484
|
-
height: "24",
|
|
485
|
-
fill: "none",
|
|
486
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
487
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
488
|
-
fillRule: "evenodd",
|
|
489
|
-
clipRule: "evenodd",
|
|
490
|
-
d: "M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zm0-1a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm1.18-11.84a.84.84 0 1 1-1.68 0 .84.84 0 0 1 1.68 0zM12.5 10a.5.5 0 0 1 .5.5V15h1a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1h1v-4h-1a.5.5 0 0 1 0-1h1.5z",
|
|
491
|
-
fill: "currentColor"
|
|
492
|
-
}));
|
|
493
|
-
}
|
|
494
|
-
|
|
495
|
-
function AlertPositiveIcon(props) {
|
|
496
|
-
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
497
|
-
width: "24",
|
|
498
|
-
height: "24",
|
|
499
|
-
fill: "none",
|
|
500
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
501
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
502
|
-
fillRule: "evenodd",
|
|
503
|
-
clipRule: "evenodd",
|
|
504
|
-
d: "M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zm0-1a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm-4.354-8.104a.5.5 0 0 1 .708 0l2.146 2.147 5.146-5.147a.5.5 0 0 1 .708.708l-5.5 5.5a.5.5 0 0 1-.708 0l-2.5-2.5a.5.5 0 0 1 0-.708z",
|
|
505
|
-
fill: "currentColor"
|
|
506
|
-
}));
|
|
507
|
-
}
|
|
508
|
-
|
|
509
|
-
function AlertCautionIcon(props) {
|
|
510
|
-
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
511
|
-
width: "24",
|
|
512
|
-
height: "24",
|
|
513
|
-
fill: "none",
|
|
514
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
515
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
516
|
-
fillRule: "evenodd",
|
|
517
|
-
clipRule: "evenodd",
|
|
518
|
-
d: "m3.254 16.992 7.018-12.03a2 2 0 0 1 3.455 0l7.018 12.03A2 2 0 0 1 19.018 20H4.982a2 2 0 0 1-1.728-3.008zm8.242-11.887a1 1 0 0 0-.36.36l-7.018 12.03A1 1 0 0 0 4.982 19h14.036a1 1 0 0 0 .864-1.504l-7.018-12.03a1 1 0 0 0-1.368-.36zM13 16.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-.014-7.014a.987.987 0 1 0-1.971.055l.236 4.25c.053.945 1.445.945 1.498 0l.236-4.25.001-.027v-.028z",
|
|
519
|
-
fill: "currentColor"
|
|
520
|
-
}));
|
|
521
|
-
}
|
|
522
|
-
|
|
523
|
-
function AlertCriticalIcon(props) {
|
|
524
|
-
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
525
|
-
width: "24",
|
|
526
|
-
height: "24",
|
|
527
|
-
fill: "none",
|
|
528
|
-
xmlns: "http://www.w3.org/2000/svg"
|
|
529
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
530
|
-
fillRule: "evenodd",
|
|
531
|
-
clipRule: "evenodd",
|
|
532
|
-
d: "M12 3.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17zM2.5 12a9.5 9.5 0 1 1 19 0 9.5 9.5 0 0 1-19 0zM13 15.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-.014-7.014A.987.987 0 0 0 12 7.5h-.027l-.028.002a.987.987 0 0 0-.93 1.04l.236 4.25c.053.944 1.445.944 1.498 0l.236-4.25.001-.028v-.027z",
|
|
533
|
-
fill: "currentColor"
|
|
534
|
-
}));
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
function CloseIcon(props) {
|
|
538
|
-
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
539
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
540
|
-
width: "24",
|
|
541
|
-
height: "24"
|
|
542
|
-
}, props), /*#__PURE__*/React.createElement("path", {
|
|
543
|
-
fill: "currentColor",
|
|
544
|
-
d: "M5.146 5.146a.5.5 0 0 1 .708 0L12 11.293l6.146-6.147a.5.5 0 0 1 .638-.057l.07.057a.5.5 0 0 1 0 .708L12.707 12l6.147 6.146a.5.5 0 0 1 .057.638l-.057.07a.5.5 0 0 1-.708 0L12 12.707l-6.146 6.147a.5.5 0 0 1-.638.057l-.07-.057a.5.5 0 0 1 0-.708L11.293 12 5.146 5.854a.5.5 0 0 1-.057-.638z"
|
|
545
|
-
}));
|
|
546
|
-
}
|
|
547
|
-
|
|
548
|
-
var modules_6205a58e = {"container":"ad19f859","tone-info":"_7fd19074","tone-positive":"b6504efb","tone-caution":"_1668c1a3","tone-critical":"_59663dff"};
|
|
549
|
-
|
|
550
|
-
function Alert(_ref) {
|
|
551
|
-
var id = _ref.id,
|
|
552
|
-
children = _ref.children,
|
|
553
|
-
tone = _ref.tone,
|
|
554
|
-
closeLabel = _ref.closeLabel,
|
|
555
|
-
onClose = _ref.onClose;
|
|
556
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
557
|
-
id: id,
|
|
558
|
-
role: "alert",
|
|
559
|
-
"aria-live": "polite",
|
|
560
|
-
padding: "small",
|
|
561
|
-
className: [modules_6205a58e.container, getClassNames(modules_6205a58e, 'tone', tone)]
|
|
562
|
-
}, /*#__PURE__*/React.createElement(Columns, {
|
|
563
|
-
space: "small",
|
|
564
|
-
alignY: "top"
|
|
565
|
-
}, /*#__PURE__*/React.createElement(Column, {
|
|
566
|
-
width: "content"
|
|
567
|
-
}, /*#__PURE__*/React.createElement(AlertIcon, {
|
|
568
|
-
tone: tone
|
|
569
|
-
})), /*#__PURE__*/React.createElement(Column, null, children), onClose != null ? /*#__PURE__*/React.createElement(Column, {
|
|
570
|
-
width: "content"
|
|
571
|
-
}, /*#__PURE__*/React.createElement("button", {
|
|
572
|
-
type: "button",
|
|
573
|
-
onClick: onClose,
|
|
574
|
-
"aria-label": closeLabel
|
|
575
|
-
}, /*#__PURE__*/React.createElement(CloseIcon, null))) : null));
|
|
576
|
-
}
|
|
577
|
-
|
|
578
|
-
var modules_c7f5018f = {"svg":"_51539197","spinner":"_54fbe2b3","tint":"a0c466ed","fill":"_745b73d3"};
|
|
579
|
-
|
|
580
|
-
function Spinner(_ref) {
|
|
581
|
-
var _ref$size = _ref.size,
|
|
582
|
-
size = _ref$size === void 0 ? 24 : _ref$size;
|
|
583
|
-
return /*#__PURE__*/React.createElement("svg", {
|
|
584
|
-
"aria-hidden": true,
|
|
585
|
-
width: size,
|
|
586
|
-
height: size,
|
|
587
|
-
viewBox: "0 0 24 24",
|
|
588
|
-
className: modules_c7f5018f.svg
|
|
589
|
-
}, /*#__PURE__*/React.createElement("g", {
|
|
590
|
-
fill: "none",
|
|
591
|
-
fillRule: "nonzero"
|
|
592
|
-
}, /*#__PURE__*/React.createElement("path", {
|
|
593
|
-
className: modules_c7f5018f.tint,
|
|
594
|
-
d: "M17.945 3.958A9.955 9.955 0 0 0 12 2c-2.19 0-4.217.705-5.865 1.9L5.131 2.16A11.945 11.945 0 0 1 12 0c2.59 0 4.99.82 6.95 2.217l-1.005 1.741z"
|
|
595
|
-
}), /*#__PURE__*/React.createElement("path", {
|
|
596
|
-
className: modules_c7f5018f.fill,
|
|
597
|
-
d: "M5.13 2.16L6.136 3.9A9.987 9.987 0 0 0 2 12c0 5.523 4.477 10 10 10s10-4.477 10-10a9.986 9.986 0 0 0-4.055-8.042l1.006-1.741A11.985 11.985 0 0 1 24 12c0 6.627-5.373 12-12 12S0 18.627 0 12c0-4.073 2.029-7.671 5.13-9.84z"
|
|
598
|
-
})));
|
|
599
|
-
}
|
|
600
|
-
|
|
601
|
-
var _excluded$7 = ["size", "exceptionallySetClassName"];
|
|
602
|
-
var sizeMapping = {
|
|
603
|
-
small: 24,
|
|
604
|
-
medium: 36,
|
|
605
|
-
large: 48
|
|
606
|
-
};
|
|
607
|
-
|
|
608
|
-
function Loading(_ref) {
|
|
609
|
-
var _sizeMapping$size;
|
|
610
|
-
|
|
611
|
-
var _ref$size = _ref.size,
|
|
612
|
-
size = _ref$size === void 0 ? 'small' : _ref$size,
|
|
613
|
-
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
614
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
615
|
-
|
|
616
|
-
var numericSize = (_sizeMapping$size = sizeMapping[size]) !== null && _sizeMapping$size !== void 0 ? _sizeMapping$size : sizeMapping.small;
|
|
617
|
-
var ariaLabel = props['aria-label'] ? props['aria-label'] : !props['aria-labelledby'] ? 'Loading…' : undefined;
|
|
618
|
-
return /*#__PURE__*/React__default.createElement(Box, Object.assign({}, props, {
|
|
619
|
-
"aria-label": ariaLabel,
|
|
620
|
-
className: exceptionallySetClassName,
|
|
621
|
-
display: "flex",
|
|
622
|
-
alignItems: "center",
|
|
623
|
-
justifyContent: "center",
|
|
624
|
-
role: "progressbar"
|
|
625
|
-
}), /*#__PURE__*/React__default.createElement(Spinner, {
|
|
626
|
-
size: numericSize,
|
|
627
|
-
"aria-hidden": true
|
|
628
|
-
}));
|
|
629
|
-
}
|
|
630
|
-
|
|
631
|
-
var modules_1b547e7e = {"container":"_464500ae","tone-info":"_1abfe147","tone-positive":"_36ce9859","tone-caution":"f92214b7","tone-critical":"be6cf28e"};
|
|
632
|
-
|
|
633
|
-
function Notice(_ref) {
|
|
634
|
-
var id = _ref.id,
|
|
635
|
-
children = _ref.children,
|
|
636
|
-
tone = _ref.tone;
|
|
637
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
638
|
-
id: id,
|
|
639
|
-
role: "alert",
|
|
640
|
-
"aria-live": "polite",
|
|
641
|
-
className: [modules_1b547e7e.container, getClassNames(modules_1b547e7e, 'tone', tone)]
|
|
642
|
-
}, /*#__PURE__*/React.createElement(Columns, {
|
|
643
|
-
space: "small",
|
|
644
|
-
alignY: "top"
|
|
645
|
-
}, /*#__PURE__*/React.createElement(Column, {
|
|
646
|
-
width: "content"
|
|
647
|
-
}, /*#__PURE__*/React.createElement(AlertIcon, {
|
|
648
|
-
tone: tone
|
|
649
|
-
})), /*#__PURE__*/React.createElement(Column, null, children)));
|
|
650
|
-
}
|
|
651
|
-
|
|
652
|
-
var modules_949d2ff4 = {"heading":"_2f45487c","weight-light":"a20cbde9","tone-secondary":"_75f44518","tone-danger":"_3952cc59","size-largest":"b71d22ef","size-larger":"f15346e2","size-smaller":"_3cae1428","lineClampMultipleLines":"_347f6fcd","lineClamp-1":"_895c0b16","lineClamp-2":"_2e4808bd","lineClamp-3":"_1bdb7bdc","lineClamp-4":"_159943ea","lineClamp-5":"e44e008d"};
|
|
653
|
-
|
|
654
|
-
var _excluded$8 = ["level", "weight", "size", "tone", "children", "lineClamp", "align", "exceptionallySetClassName"];
|
|
655
|
-
var Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
656
|
-
var level = _ref.level,
|
|
657
|
-
_ref$weight = _ref.weight,
|
|
658
|
-
weight = _ref$weight === void 0 ? 'regular' : _ref$weight,
|
|
659
|
-
size = _ref.size,
|
|
660
|
-
_ref$tone = _ref.tone,
|
|
661
|
-
tone = _ref$tone === void 0 ? 'normal' : _ref$tone,
|
|
662
|
-
children = _ref.children,
|
|
663
|
-
lineClamp = _ref.lineClamp,
|
|
664
|
-
align = _ref.align,
|
|
665
|
-
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
666
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
667
|
-
|
|
668
|
-
// In TypeScript v4.1, this would be properly recognized without needing the type assertion
|
|
669
|
-
// https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types
|
|
670
|
-
var headingElementName = "h" + level;
|
|
671
|
-
var lineClampMultipleLines = typeof lineClamp === 'string' ? parseInt(lineClamp, 10) > 1 : (lineClamp || 0) > 1;
|
|
672
|
-
return /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
673
|
-
className: [exceptionallySetClassName, modules_949d2ff4.heading, weight !== 'regular' ? getClassNames(modules_949d2ff4, 'weight', weight) : null, tone !== 'normal' ? getClassNames(modules_949d2ff4, 'tone', tone) : null, getClassNames(modules_949d2ff4, 'size', size), lineClampMultipleLines ? modules_949d2ff4.lineClampMultipleLines : null, lineClamp ? getClassNames(modules_949d2ff4, 'lineClamp', lineClamp.toString()) : null],
|
|
674
|
-
textAlign: align,
|
|
675
|
-
// Prevents emojis from being cut-off
|
|
676
|
-
// See https://github.com/Doist/reactist/pull/528
|
|
677
|
-
paddingRight: lineClamp ? 'xsmall' : undefined,
|
|
678
|
-
as: headingElementName,
|
|
679
|
-
ref: ref
|
|
680
|
-
}), children);
|
|
681
|
-
});
|
|
682
|
-
|
|
683
|
-
var modules_a9637dd3 = {"text":"c12d1277","size-caption":"c88e1204","size-copy":"_426d67ec","size-subtitle":"f978d6c7","weight-semibold":"_0c31eccd","weight-bold":"aba17bdd","tone-secondary":"_2767b43d","tone-danger":"e8ae531e","lineClampMultipleLines":"dc839422","lineClamp-1":"e2d23135","lineClamp-2":"_7c778b7e","lineClamp-3":"_5ff41166","lineClamp-4":"b7a4998e","lineClamp-5":"_6a7f8803"};
|
|
684
|
-
|
|
685
|
-
var _excluded$9 = ["as", "size", "weight", "tone", "align", "children", "lineClamp", "exceptionallySetClassName"];
|
|
686
|
-
var Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
|
|
687
|
-
var as = _ref.as,
|
|
688
|
-
_ref$size = _ref.size,
|
|
689
|
-
size = _ref$size === void 0 ? 'body' : _ref$size,
|
|
690
|
-
_ref$weight = _ref.weight,
|
|
691
|
-
weight = _ref$weight === void 0 ? 'regular' : _ref$weight,
|
|
692
|
-
_ref$tone = _ref.tone,
|
|
693
|
-
tone = _ref$tone === void 0 ? 'normal' : _ref$tone,
|
|
694
|
-
align = _ref.align,
|
|
695
|
-
children = _ref.children,
|
|
696
|
-
lineClamp = _ref.lineClamp,
|
|
697
|
-
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
698
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
699
|
-
|
|
700
|
-
var lineClampMultipleLines = typeof lineClamp === 'string' ? Number(lineClamp) > 1 : (lineClamp !== null && lineClamp !== void 0 ? lineClamp : 1) > 1;
|
|
701
|
-
return /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
702
|
-
as: as,
|
|
703
|
-
className: [exceptionallySetClassName, modules_a9637dd3.text, size !== 'body' ? getClassNames(modules_a9637dd3, 'size', size) : null, weight !== 'regular' ? getClassNames(modules_a9637dd3, 'weight', weight) : null, tone !== 'normal' ? getClassNames(modules_a9637dd3, 'tone', tone) : null, lineClampMultipleLines ? modules_a9637dd3.lineClampMultipleLines : null, lineClamp ? getClassNames(modules_a9637dd3, 'lineClamp', lineClamp.toString()) : null],
|
|
704
|
-
textAlign: align,
|
|
705
|
-
// Prevents emojis from being cut-off
|
|
706
|
-
// See https://github.com/Doist/reactist/pull/528
|
|
707
|
-
paddingRight: lineClamp ? 'xsmall' : undefined,
|
|
708
|
-
ref: ref
|
|
709
|
-
}), children);
|
|
710
|
-
});
|
|
711
|
-
|
|
712
|
-
var _excluded$a = ["children", "content", "position", "gapSize", "className"];
|
|
465
|
+
var _excluded$6 = ["children", "content", "position", "gapSize", "className"];
|
|
713
466
|
|
|
714
467
|
var SHOW_DELAY = 500;
|
|
715
468
|
var HIDE_DELAY = 100;
|
|
@@ -737,7 +490,7 @@ function Tooltip(_ref) {
|
|
|
737
490
|
_ref$gapSize = _ref.gapSize,
|
|
738
491
|
gapSize = _ref$gapSize === void 0 ? 3 : _ref$gapSize,
|
|
739
492
|
className = _ref.className,
|
|
740
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
493
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$6);
|
|
741
494
|
|
|
742
495
|
var tooltip = useDelayedTooltipState({
|
|
743
496
|
placement: position,
|
|
@@ -822,9 +575,32 @@ function useDelay() {
|
|
|
822
575
|
}, [clearTimeouts]);
|
|
823
576
|
}
|
|
824
577
|
|
|
578
|
+
var modules_c7f5018f = {"svg":"_51539197","spinner":"_54fbe2b3","tint":"a0c466ed","fill":"_745b73d3"};
|
|
579
|
+
|
|
580
|
+
function Spinner(_ref) {
|
|
581
|
+
var _ref$size = _ref.size,
|
|
582
|
+
size = _ref$size === void 0 ? 24 : _ref$size;
|
|
583
|
+
return /*#__PURE__*/React.createElement("svg", {
|
|
584
|
+
"aria-hidden": true,
|
|
585
|
+
width: size,
|
|
586
|
+
height: size,
|
|
587
|
+
viewBox: "0 0 24 24",
|
|
588
|
+
className: modules_c7f5018f.svg
|
|
589
|
+
}, /*#__PURE__*/React.createElement("g", {
|
|
590
|
+
fill: "none",
|
|
591
|
+
fillRule: "nonzero"
|
|
592
|
+
}, /*#__PURE__*/React.createElement("path", {
|
|
593
|
+
className: modules_c7f5018f.tint,
|
|
594
|
+
d: "M17.945 3.958A9.955 9.955 0 0 0 12 2c-2.19 0-4.217.705-5.865 1.9L5.131 2.16A11.945 11.945 0 0 1 12 0c2.59 0 4.99.82 6.95 2.217l-1.005 1.741z"
|
|
595
|
+
}), /*#__PURE__*/React.createElement("path", {
|
|
596
|
+
className: modules_c7f5018f.fill,
|
|
597
|
+
d: "M5.13 2.16L6.136 3.9A9.987 9.987 0 0 0 2 12c0 5.523 4.477 10 10 10s10-4.477 10-10a9.986 9.986 0 0 0-4.055-8.042l1.006-1.741A11.985 11.985 0 0 1 24 12c0 6.627-5.373 12-12 12S0 18.627 0 12c0-4.073 2.029-7.671 5.13-9.84z"
|
|
598
|
+
})));
|
|
599
|
+
}
|
|
600
|
+
|
|
825
601
|
var modules_b9569bce = {"label":"_1f20c88a","baseButton":"_623015f3","size-small":"_062de645","size-normal":"_55e2a6a9","size-large":"cab32a7c","disabled":"e71c191a","iconButton":"_368efc16","startIcon":"d35389c1","endIcon":"_900d41d8","variant-primary":"_7c95e162","variant-secondary":"_9cb889aa","variant-tertiary":"_611b5b28","variant-quaternary":"_80c2bb84","tone-destructive":"ee13c455"};
|
|
826
602
|
|
|
827
|
-
var _excluded$
|
|
603
|
+
var _excluded$7 = ["as", "variant", "tone", "size", "disabled", "loading", "tooltip", "onClick", "exceptionallySetClassName", "children", "startIcon", "endIcon", "icon"];
|
|
828
604
|
|
|
829
605
|
function preventDefault(event) {
|
|
830
606
|
event.preventDefault();
|
|
@@ -859,7 +635,7 @@ var BaseButton = /*#__PURE__*/polymorphicComponent(function BaseButton(_ref, ref
|
|
|
859
635
|
startIcon = _ref.startIcon,
|
|
860
636
|
endIcon = _ref.endIcon,
|
|
861
637
|
icon = _ref.icon,
|
|
862
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
638
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$7);
|
|
863
639
|
|
|
864
640
|
var isDisabled = loading || disabled;
|
|
865
641
|
var buttonElement = /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
@@ -886,7 +662,7 @@ var BaseButton = /*#__PURE__*/polymorphicComponent(function BaseButton(_ref, ref
|
|
|
886
662
|
}, buttonElement) : buttonElement;
|
|
887
663
|
});
|
|
888
664
|
|
|
889
|
-
var _excluded$
|
|
665
|
+
var _excluded$8 = ["variant", "tone", "size", "type", "disabled", "exceptionallySetClassName"];
|
|
890
666
|
/**
|
|
891
667
|
* A semantic button that also looks like a button, and provides all the necessary visual variants.
|
|
892
668
|
* It follows the [WAI-ARIA Button Pattern](https://www.w3.org/TR/wai-aria-practices/#button).
|
|
@@ -907,7 +683,7 @@ var Button = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
|
|
|
907
683
|
_ref$disabled = _ref.disabled,
|
|
908
684
|
disabled = _ref$disabled === void 0 ? false : _ref$disabled,
|
|
909
685
|
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
910
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
686
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$8);
|
|
911
687
|
|
|
912
688
|
return /*#__PURE__*/React.createElement(BaseButton, Object.assign({}, props, {
|
|
913
689
|
as: "button",
|
|
@@ -921,6 +697,241 @@ var Button = /*#__PURE__*/React.forwardRef(function Button(_ref, ref) {
|
|
|
921
697
|
}));
|
|
922
698
|
});
|
|
923
699
|
|
|
700
|
+
var _excluded$9 = ["tone"];
|
|
701
|
+
var alertIconForTone = {
|
|
702
|
+
info: AlertInfoIcon,
|
|
703
|
+
positive: AlertPositiveIcon,
|
|
704
|
+
caution: AlertCautionIcon,
|
|
705
|
+
critical: AlertCriticalIcon
|
|
706
|
+
};
|
|
707
|
+
|
|
708
|
+
function AlertIcon(_ref) {
|
|
709
|
+
var tone = _ref.tone,
|
|
710
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$9);
|
|
711
|
+
|
|
712
|
+
var Icon = alertIconForTone[tone];
|
|
713
|
+
return Icon ? /*#__PURE__*/React.createElement(Icon, Object.assign({}, props)) : null;
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
function AlertInfoIcon(props) {
|
|
717
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
718
|
+
width: "24",
|
|
719
|
+
height: "24",
|
|
720
|
+
fill: "none",
|
|
721
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
722
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
723
|
+
fillRule: "evenodd",
|
|
724
|
+
clipRule: "evenodd",
|
|
725
|
+
d: "M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zm0-1a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm1.18-11.84a.84.84 0 1 1-1.68 0 .84.84 0 0 1 1.68 0zM12.5 10a.5.5 0 0 1 .5.5V15h1a.5.5 0 0 1 0 1h-3a.5.5 0 0 1 0-1h1v-4h-1a.5.5 0 0 1 0-1h1.5z",
|
|
726
|
+
fill: "currentColor"
|
|
727
|
+
}));
|
|
728
|
+
}
|
|
729
|
+
|
|
730
|
+
function AlertPositiveIcon(props) {
|
|
731
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
732
|
+
width: "24",
|
|
733
|
+
height: "24",
|
|
734
|
+
fill: "none",
|
|
735
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
736
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
737
|
+
fillRule: "evenodd",
|
|
738
|
+
clipRule: "evenodd",
|
|
739
|
+
d: "M12 21a9 9 0 1 0 0-18 9 9 0 0 0 0 18zm0-1a8 8 0 1 1 0-16 8 8 0 0 1 0 16zm-4.354-8.104a.5.5 0 0 1 .708 0l2.146 2.147 5.146-5.147a.5.5 0 0 1 .708.708l-5.5 5.5a.5.5 0 0 1-.708 0l-2.5-2.5a.5.5 0 0 1 0-.708z",
|
|
740
|
+
fill: "currentColor"
|
|
741
|
+
}));
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
function AlertCautionIcon(props) {
|
|
745
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
746
|
+
width: "24",
|
|
747
|
+
height: "24",
|
|
748
|
+
fill: "none",
|
|
749
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
750
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
751
|
+
fillRule: "evenodd",
|
|
752
|
+
clipRule: "evenodd",
|
|
753
|
+
d: "m3.254 16.992 7.018-12.03a2 2 0 0 1 3.455 0l7.018 12.03A2 2 0 0 1 19.018 20H4.982a2 2 0 0 1-1.728-3.008zm8.242-11.887a1 1 0 0 0-.36.36l-7.018 12.03A1 1 0 0 0 4.982 19h14.036a1 1 0 0 0 .864-1.504l-7.018-12.03a1 1 0 0 0-1.368-.36zM13 16.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-.014-7.014a.987.987 0 1 0-1.971.055l.236 4.25c.053.945 1.445.945 1.498 0l.236-4.25.001-.027v-.028z",
|
|
754
|
+
fill: "currentColor"
|
|
755
|
+
}));
|
|
756
|
+
}
|
|
757
|
+
|
|
758
|
+
function AlertCriticalIcon(props) {
|
|
759
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
760
|
+
width: "24",
|
|
761
|
+
height: "24",
|
|
762
|
+
fill: "none",
|
|
763
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
764
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
765
|
+
fillRule: "evenodd",
|
|
766
|
+
clipRule: "evenodd",
|
|
767
|
+
d: "M12 3.5a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17zM2.5 12a9.5 9.5 0 1 1 19 0 9.5 9.5 0 0 1-19 0zM13 15.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0zm-.014-7.014A.987.987 0 0 0 12 7.5h-.027l-.028.002a.987.987 0 0 0-.93 1.04l.236 4.25c.053.944 1.445.944 1.498 0l.236-4.25.001-.028v-.027z",
|
|
768
|
+
fill: "currentColor"
|
|
769
|
+
}));
|
|
770
|
+
}
|
|
771
|
+
|
|
772
|
+
function CloseIcon(props) {
|
|
773
|
+
return /*#__PURE__*/React.createElement("svg", Object.assign({
|
|
774
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
775
|
+
width: "24",
|
|
776
|
+
height: "24"
|
|
777
|
+
}, props), /*#__PURE__*/React.createElement("path", {
|
|
778
|
+
fill: "currentColor",
|
|
779
|
+
d: "M5.146 5.146a.5.5 0 0 1 .708 0L12 11.293l6.146-6.147a.5.5 0 0 1 .638-.057l.07.057a.5.5 0 0 1 0 .708L12.707 12l6.147 6.146a.5.5 0 0 1 .057.638l-.057.07a.5.5 0 0 1-.708 0L12 12.707l-6.146 6.147a.5.5 0 0 1-.638.057l-.07-.057a.5.5 0 0 1 0-.708L11.293 12 5.146 5.854a.5.5 0 0 1-.057-.638z"
|
|
780
|
+
}));
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
var modules_6205a58e = {"container":"eb665121","tone-info":"d0373ff9","tone-positive":"bb18dcab","tone-caution":"_0af02331","tone-critical":"f76146f9"};
|
|
784
|
+
|
|
785
|
+
function Alert(_ref) {
|
|
786
|
+
var id = _ref.id,
|
|
787
|
+
children = _ref.children,
|
|
788
|
+
tone = _ref.tone,
|
|
789
|
+
closeLabel = _ref.closeLabel,
|
|
790
|
+
onClose = _ref.onClose;
|
|
791
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
792
|
+
id: id,
|
|
793
|
+
role: "alert",
|
|
794
|
+
"aria-live": "polite",
|
|
795
|
+
borderRadius: "standard",
|
|
796
|
+
className: [modules_6205a58e.container, getClassNames(modules_6205a58e, 'tone', tone)]
|
|
797
|
+
}, /*#__PURE__*/React.createElement(Columns, {
|
|
798
|
+
space: "small",
|
|
799
|
+
alignY: "top"
|
|
800
|
+
}, /*#__PURE__*/React.createElement(Column, {
|
|
801
|
+
width: "content"
|
|
802
|
+
}, /*#__PURE__*/React.createElement(AlertIcon, {
|
|
803
|
+
tone: tone
|
|
804
|
+
})), /*#__PURE__*/React.createElement(Column, null, /*#__PURE__*/React.createElement(Box, {
|
|
805
|
+
paddingY: "xsmall",
|
|
806
|
+
paddingRight: onClose != null && closeLabel != null ? undefined : 'small'
|
|
807
|
+
}, children)), onClose != null && closeLabel != null ? /*#__PURE__*/React.createElement(Column, {
|
|
808
|
+
width: "content"
|
|
809
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
810
|
+
variant: "quaternary",
|
|
811
|
+
size: "small",
|
|
812
|
+
onClick: onClose,
|
|
813
|
+
"aria-label": closeLabel,
|
|
814
|
+
icon: /*#__PURE__*/React.createElement(CloseIcon, null),
|
|
815
|
+
style: {
|
|
816
|
+
// @ts-expect-error not sure how to make TypeScript understand custom CSS properties
|
|
817
|
+
'--reactist-btn-hover-fill': 'transparent'
|
|
818
|
+
}
|
|
819
|
+
})) : null));
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
var _excluded$a = ["size", "exceptionallySetClassName"];
|
|
823
|
+
var sizeMapping = {
|
|
824
|
+
small: 24,
|
|
825
|
+
medium: 36,
|
|
826
|
+
large: 48
|
|
827
|
+
};
|
|
828
|
+
|
|
829
|
+
function Loading(_ref) {
|
|
830
|
+
var _sizeMapping$size;
|
|
831
|
+
|
|
832
|
+
var _ref$size = _ref.size,
|
|
833
|
+
size = _ref$size === void 0 ? 'small' : _ref$size,
|
|
834
|
+
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
835
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$a);
|
|
836
|
+
|
|
837
|
+
var numericSize = (_sizeMapping$size = sizeMapping[size]) !== null && _sizeMapping$size !== void 0 ? _sizeMapping$size : sizeMapping.small;
|
|
838
|
+
var ariaLabel = props['aria-label'] ? props['aria-label'] : !props['aria-labelledby'] ? 'Loading…' : undefined;
|
|
839
|
+
return /*#__PURE__*/React__default.createElement(Box, Object.assign({}, props, {
|
|
840
|
+
"aria-label": ariaLabel,
|
|
841
|
+
className: exceptionallySetClassName,
|
|
842
|
+
display: "flex",
|
|
843
|
+
alignItems: "center",
|
|
844
|
+
justifyContent: "center",
|
|
845
|
+
role: "progressbar"
|
|
846
|
+
}), /*#__PURE__*/React__default.createElement(Spinner, {
|
|
847
|
+
size: numericSize,
|
|
848
|
+
"aria-hidden": true
|
|
849
|
+
}));
|
|
850
|
+
}
|
|
851
|
+
|
|
852
|
+
var modules_1b547e7e = {"container":"_464500ae","tone-info":"_1abfe147","tone-positive":"_36ce9859","tone-caution":"f92214b7","tone-critical":"be6cf28e"};
|
|
853
|
+
|
|
854
|
+
function Notice(_ref) {
|
|
855
|
+
var id = _ref.id,
|
|
856
|
+
children = _ref.children,
|
|
857
|
+
tone = _ref.tone;
|
|
858
|
+
return /*#__PURE__*/React.createElement(Box, {
|
|
859
|
+
id: id,
|
|
860
|
+
role: "alert",
|
|
861
|
+
"aria-live": "polite",
|
|
862
|
+
className: [modules_1b547e7e.container, getClassNames(modules_1b547e7e, 'tone', tone)]
|
|
863
|
+
}, /*#__PURE__*/React.createElement(Columns, {
|
|
864
|
+
space: "small",
|
|
865
|
+
alignY: "top"
|
|
866
|
+
}, /*#__PURE__*/React.createElement(Column, {
|
|
867
|
+
width: "content"
|
|
868
|
+
}, /*#__PURE__*/React.createElement(AlertIcon, {
|
|
869
|
+
tone: tone
|
|
870
|
+
})), /*#__PURE__*/React.createElement(Column, null, /*#__PURE__*/React.createElement(Box, {
|
|
871
|
+
paddingY: "xsmall"
|
|
872
|
+
}, children))));
|
|
873
|
+
}
|
|
874
|
+
|
|
875
|
+
var modules_949d2ff4 = {"heading":"_71a1610c","weight-light":"_63750f40","tone-secondary":"_9ce984cf","tone-danger":"_1acad35e","size-largest":"_3da27a00","size-larger":"df220733","size-smaller":"eb373739","lineClampMultipleLines":"f53cfd2b","lineClamp-1":"e4819fc9","lineClamp-2":"a0ed6177","lineClamp-3":"_180d433e","lineClamp-4":"_40826ad9","lineClamp-5":"_5999b247"};
|
|
876
|
+
|
|
877
|
+
var _excluded$b = ["level", "weight", "size", "tone", "children", "lineClamp", "align", "exceptionallySetClassName"];
|
|
878
|
+
var Heading = /*#__PURE__*/React.forwardRef(function Heading(_ref, ref) {
|
|
879
|
+
var level = _ref.level,
|
|
880
|
+
_ref$weight = _ref.weight,
|
|
881
|
+
weight = _ref$weight === void 0 ? 'regular' : _ref$weight,
|
|
882
|
+
size = _ref.size,
|
|
883
|
+
_ref$tone = _ref.tone,
|
|
884
|
+
tone = _ref$tone === void 0 ? 'normal' : _ref$tone,
|
|
885
|
+
children = _ref.children,
|
|
886
|
+
lineClamp = _ref.lineClamp,
|
|
887
|
+
align = _ref.align,
|
|
888
|
+
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
889
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$b);
|
|
890
|
+
|
|
891
|
+
// In TypeScript v4.1, this would be properly recognized without needing the type assertion
|
|
892
|
+
// https://devblogs.microsoft.com/typescript/announcing-typescript-4-1-beta/#template-literal-types
|
|
893
|
+
var headingElementName = "h" + level;
|
|
894
|
+
var lineClampMultipleLines = typeof lineClamp === 'string' ? parseInt(lineClamp, 10) > 1 : (lineClamp || 0) > 1;
|
|
895
|
+
return /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
896
|
+
className: [exceptionallySetClassName, modules_949d2ff4.heading, weight !== 'regular' ? getClassNames(modules_949d2ff4, 'weight', weight) : null, tone !== 'normal' ? getClassNames(modules_949d2ff4, 'tone', tone) : null, getClassNames(modules_949d2ff4, 'size', size), lineClampMultipleLines ? modules_949d2ff4.lineClampMultipleLines : null, lineClamp ? getClassNames(modules_949d2ff4, 'lineClamp', lineClamp.toString()) : null],
|
|
897
|
+
textAlign: align,
|
|
898
|
+
// Prevents emojis from being cut-off
|
|
899
|
+
// See https://github.com/Doist/reactist/pull/528
|
|
900
|
+
paddingRight: lineClamp ? 'xsmall' : undefined,
|
|
901
|
+
as: headingElementName,
|
|
902
|
+
ref: ref
|
|
903
|
+
}), children);
|
|
904
|
+
});
|
|
905
|
+
|
|
906
|
+
var modules_a9637dd3 = {"text":"c5028ea8","size-caption":"_05d3a546","size-copy":"_100565e3","size-subtitle":"b8f72625","weight-semibold":"_398ecda1","weight-bold":"_8054cd6b","tone-secondary":"_6abd56b1","tone-danger":"_274b4a47","lineClampMultipleLines":"_724b0054","lineClamp-1":"_51ac6ee4","lineClamp-2":"b0742803","lineClamp-3":"dd664c95","lineClamp-4":"b02775b5","lineClamp-5":"da91b300"};
|
|
907
|
+
|
|
908
|
+
var _excluded$c = ["as", "size", "weight", "tone", "align", "children", "lineClamp", "exceptionallySetClassName"];
|
|
909
|
+
var Text = /*#__PURE__*/polymorphicComponent(function Text(_ref, ref) {
|
|
910
|
+
var as = _ref.as,
|
|
911
|
+
_ref$size = _ref.size,
|
|
912
|
+
size = _ref$size === void 0 ? 'body' : _ref$size,
|
|
913
|
+
_ref$weight = _ref.weight,
|
|
914
|
+
weight = _ref$weight === void 0 ? 'regular' : _ref$weight,
|
|
915
|
+
_ref$tone = _ref.tone,
|
|
916
|
+
tone = _ref$tone === void 0 ? 'normal' : _ref$tone,
|
|
917
|
+
align = _ref.align,
|
|
918
|
+
children = _ref.children,
|
|
919
|
+
lineClamp = _ref.lineClamp,
|
|
920
|
+
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
921
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$c);
|
|
922
|
+
|
|
923
|
+
var lineClampMultipleLines = typeof lineClamp === 'string' ? Number(lineClamp) > 1 : (lineClamp !== null && lineClamp !== void 0 ? lineClamp : 1) > 1;
|
|
924
|
+
return /*#__PURE__*/React.createElement(Box, Object.assign({}, props, {
|
|
925
|
+
as: as,
|
|
926
|
+
className: [exceptionallySetClassName, modules_a9637dd3.text, size !== 'body' ? getClassNames(modules_a9637dd3, 'size', size) : null, weight !== 'regular' ? getClassNames(modules_a9637dd3, 'weight', weight) : null, tone !== 'normal' ? getClassNames(modules_a9637dd3, 'tone', tone) : null, lineClampMultipleLines ? modules_a9637dd3.lineClampMultipleLines : null, lineClamp ? getClassNames(modules_a9637dd3, 'lineClamp', lineClamp.toString()) : null],
|
|
927
|
+
textAlign: align,
|
|
928
|
+
// Prevents emojis from being cut-off
|
|
929
|
+
// See https://github.com/Doist/reactist/pull/528
|
|
930
|
+
paddingRight: lineClamp ? 'xsmall' : undefined,
|
|
931
|
+
ref: ref
|
|
932
|
+
}), children);
|
|
933
|
+
});
|
|
934
|
+
|
|
924
935
|
var _excluded$d = ["as", "variant", "tone", "size", "exceptionallySetClassName", "openInNewTab"];
|
|
925
936
|
/**
|
|
926
937
|
* A semantic link that looks like a button, exactly matching the `Button` component in all visual
|
|
@@ -956,7 +967,7 @@ var ButtonLink = /*#__PURE__*/polymorphicComponent(function ButtonLink(_ref, ref
|
|
|
956
967
|
}));
|
|
957
968
|
});
|
|
958
969
|
|
|
959
|
-
var modules_3d05deee = {"container":"
|
|
970
|
+
var modules_3d05deee = {"container":"b55607a1"};
|
|
960
971
|
|
|
961
972
|
var _excluded$e = ["as", "openInNewTab", "exceptionallySetClassName"];
|
|
962
973
|
var TextLink = /*#__PURE__*/polymorphicComponent(function TextLink(_ref, ref) {
|
|
@@ -1516,7 +1527,7 @@ function usePrevious(value) {
|
|
|
1516
1527
|
return ref.current;
|
|
1517
1528
|
}
|
|
1518
1529
|
|
|
1519
|
-
var modules_40c67f5b = {"tab":"
|
|
1530
|
+
var modules_40c67f5b = {"tab":"d7928f1c","tab-normal":"_5d8e72b3","tab-primary":"_8a23756d","tab-secondary":"_88fd4c95","tab-tertiary":"_40c4cce9","tab-plain":"_13722523"};
|
|
1520
1531
|
|
|
1521
1532
|
var _excluded$m = ["color", "variant"],
|
|
1522
1533
|
_excluded2$1 = ["children", "space"],
|
|
@@ -1737,7 +1748,7 @@ function ModalCloseButton(props) {
|
|
|
1737
1748
|
|
|
1738
1749
|
var _React$useState = React.useState(false),
|
|
1739
1750
|
includeInTabOrder = _React$useState[0],
|
|
1740
|
-
|
|
1751
|
+
setIncludeInTabOrder = _React$useState[1];
|
|
1741
1752
|
|
|
1742
1753
|
var _React$useState2 = React.useState(false),
|
|
1743
1754
|
isMounted = _React$useState2[0],
|
|
@@ -1745,7 +1756,7 @@ function ModalCloseButton(props) {
|
|
|
1745
1756
|
|
|
1746
1757
|
React.useEffect(function skipAutoFocus() {
|
|
1747
1758
|
if (isMounted) {
|
|
1748
|
-
|
|
1759
|
+
setIncludeInTabOrder(true);
|
|
1749
1760
|
} else {
|
|
1750
1761
|
setIsMounted(true);
|
|
1751
1762
|
}
|
|
@@ -1844,10 +1855,7 @@ function ModalFooter(_ref4) {
|
|
|
1844
1855
|
className: exceptionallySetClassName,
|
|
1845
1856
|
padding: "large"
|
|
1846
1857
|
})));
|
|
1847
|
-
}
|
|
1848
|
-
// ModalActions
|
|
1849
|
-
//
|
|
1850
|
-
|
|
1858
|
+
}
|
|
1851
1859
|
/**
|
|
1852
1860
|
* A specific version of the ModalFooter, tailored to showing an inline list of actions (buttons).
|
|
1853
1861
|
* @see ModalFooter
|
|
@@ -1860,9 +1868,7 @@ function ModalActions(_ref5) {
|
|
|
1860
1868
|
return /*#__PURE__*/React.createElement(ModalFooter, Object.assign({}, props), /*#__PURE__*/React.createElement(Inline, {
|
|
1861
1869
|
align: "right",
|
|
1862
1870
|
space: "large"
|
|
1863
|
-
},
|
|
1864
|
-
return /*#__PURE__*/React.createElement("div", null, child);
|
|
1865
|
-
})));
|
|
1871
|
+
}, children));
|
|
1866
1872
|
}
|
|
1867
1873
|
|
|
1868
1874
|
function getInitials(name) {
|
|
@@ -1889,8 +1895,10 @@ function emailToIndex(email, maxIndex) {
|
|
|
1889
1895
|
return hash % maxIndex;
|
|
1890
1896
|
}
|
|
1891
1897
|
|
|
1898
|
+
var modules_08f3eeac = {"avatar":"_38a1be89","size-xxs":"d32e92ae","size-xs":"_0667d719","size-s":"cf529fcf","size-m":"_6e268eab","size-l":"d64c62cf","size-xl":"_44fb77de","size-xxl":"_01f85e0e","size-xxxl":"_41a5fe19","tablet-size-xxs":"_6ab1577d","tablet-size-xs":"b52a4963","tablet-size-s":"_714a8419","tablet-size-m":"_81cd4d51","tablet-size-l":"bf0a4edb","tablet-size-xl":"e4f0dabd","tablet-size-xxl":"_67ea065d","tablet-size-xxxl":"_2af7f76f","desktop-size-xxs":"_759081dc","desktop-size-xs":"_8290d1c1","desktop-size-s":"_48ea172d","desktop-size-m":"_758f6641","desktop-size-l":"f9ada088","desktop-size-xl":"d3bb7470","desktop-size-xxl":"_9a312ee3","desktop-size-xxxl":"a1d30c23"};
|
|
1899
|
+
|
|
1900
|
+
var _excluded$o = ["user", "avatarUrl", "size", "className", "colorList", "exceptionallySetClassName"];
|
|
1892
1901
|
var AVATAR_COLORS = ['#fcc652', '#e9952c', '#e16b2d', '#d84b40', '#e8435a', '#e5198a', '#ad3889', '#86389c', '#a8a8a8', '#98be2f', '#5d9d50', '#5f9f85', '#5bbcb6', '#32a3bf', '#2bafeb', '#2d88c3', '#3863cc', '#5e5e5e'];
|
|
1893
|
-
var AVATAR_SIZES = ['xxs', 'xs', 's', 'm', 'l', 'xl', 'xxl', 'xxxl'];
|
|
1894
1902
|
|
|
1895
1903
|
function Avatar(_ref) {
|
|
1896
1904
|
var user = _ref.user,
|
|
@@ -1899,20 +1907,23 @@ function Avatar(_ref) {
|
|
|
1899
1907
|
size = _ref$size === void 0 ? 'l' : _ref$size,
|
|
1900
1908
|
className = _ref.className,
|
|
1901
1909
|
_ref$colorList = _ref.colorList,
|
|
1902
|
-
colorList = _ref$colorList === void 0 ? AVATAR_COLORS : _ref$colorList
|
|
1910
|
+
colorList = _ref$colorList === void 0 ? AVATAR_COLORS : _ref$colorList,
|
|
1911
|
+
exceptionallySetClassName = _ref.exceptionallySetClassName,
|
|
1912
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$o);
|
|
1913
|
+
|
|
1903
1914
|
var userInitials = getInitials(user.name) || getInitials(user.email);
|
|
1904
|
-
var avatarSize = size
|
|
1905
|
-
var avatarClass = classNames("reactist_avatar reactist_avatar_size--" + avatarSize, className);
|
|
1915
|
+
var avatarSize = size ? size : 'l';
|
|
1906
1916
|
var style = avatarUrl ? {
|
|
1907
1917
|
backgroundImage: "url(" + avatarUrl + ")",
|
|
1908
1918
|
textIndent: '-9999px'
|
|
1909
1919
|
} : {
|
|
1910
1920
|
backgroundColor: colorList[emailToIndex(user.email, colorList.length)]
|
|
1911
1921
|
};
|
|
1912
|
-
|
|
1913
|
-
|
|
1922
|
+
var sizeClassName = getClassNames(modules_08f3eeac, 'size', avatarSize);
|
|
1923
|
+
return /*#__PURE__*/React__default.createElement(Box, Object.assign({
|
|
1924
|
+
className: [className, modules_08f3eeac.avatar, sizeClassName, exceptionallySetClassName],
|
|
1914
1925
|
style: style
|
|
1915
|
-
}, userInitials);
|
|
1926
|
+
}, props), userInitials);
|
|
1916
1927
|
}
|
|
1917
1928
|
|
|
1918
1929
|
Avatar.displayName = 'Avatar';
|
|
@@ -1939,7 +1950,7 @@ function Checkbox(_ref) {
|
|
|
1939
1950
|
|
|
1940
1951
|
Checkbox.displayName = 'Checkbox';
|
|
1941
1952
|
|
|
1942
|
-
var _excluded$
|
|
1953
|
+
var _excluded$p = ["type", "variant", "size", "loading", "disabled", "tooltip", "onClick", "children"];
|
|
1943
1954
|
/**
|
|
1944
1955
|
* @deprecated
|
|
1945
1956
|
*/
|
|
@@ -1957,7 +1968,7 @@ var Button$1 = /*#__PURE__*/React__default.forwardRef(function Button(_ref, ref)
|
|
|
1957
1968
|
tooltip = _ref.tooltip,
|
|
1958
1969
|
onClick = _ref.onClick,
|
|
1959
1970
|
children = _ref.children,
|
|
1960
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
1971
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$p);
|
|
1961
1972
|
|
|
1962
1973
|
var className = classNames('reactist_button', variant ? "reactist_button--" + variant : null, size !== 'default' ? "reactist_button--" + size : null, {
|
|
1963
1974
|
'reactist_button--loading': loading
|
|
@@ -1980,7 +1991,7 @@ Button$1.defaultProps = {
|
|
|
1980
1991
|
disabled: false
|
|
1981
1992
|
};
|
|
1982
1993
|
|
|
1983
|
-
var _excluded$
|
|
1994
|
+
var _excluded$q = ["children", "onClick", "tooltip", "className"];
|
|
1984
1995
|
|
|
1985
1996
|
var Box$1 = /*#__PURE__*/function (_React$Component) {
|
|
1986
1997
|
_inheritsLoose(Box, _React$Component);
|
|
@@ -2132,7 +2143,7 @@ var Trigger = /*#__PURE__*/React__default.forwardRef(function Trigger(_ref, ref)
|
|
|
2132
2143
|
onClick = _ref.onClick,
|
|
2133
2144
|
tooltip = _ref.tooltip,
|
|
2134
2145
|
className = _ref.className,
|
|
2135
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2146
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$q);
|
|
2136
2147
|
|
|
2137
2148
|
function handleClick(event) {
|
|
2138
2149
|
event.preventDefault();
|
|
@@ -2269,7 +2280,7 @@ var Input = /*#__PURE__*/React__default.forwardRef(function (props, ref) {
|
|
|
2269
2280
|
});
|
|
2270
2281
|
Input.displayName = 'Input';
|
|
2271
2282
|
|
|
2272
|
-
var _excluded$
|
|
2283
|
+
var _excluded$r = ["children", "className", "translateKey", "isMac"];
|
|
2273
2284
|
// Support for setting up how to translate modifiers globally.
|
|
2274
2285
|
//
|
|
2275
2286
|
|
|
@@ -2353,7 +2364,7 @@ function KeyboardShortcut(_ref) {
|
|
|
2353
2364
|
translateKey = _ref$translateKey === void 0 ? globalTranslateKey : _ref$translateKey,
|
|
2354
2365
|
_ref$isMac = _ref.isMac,
|
|
2355
2366
|
isMac = _ref$isMac === void 0 ? (_navigator$platform$t = (_navigator$platform = navigator.platform) === null || _navigator$platform === void 0 ? void 0 : _navigator$platform.toUpperCase().includes('MAC')) !== null && _navigator$platform$t !== void 0 ? _navigator$platform$t : false : _ref$isMac,
|
|
2356
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2367
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$r);
|
|
2357
2368
|
|
|
2358
2369
|
var shortcuts = typeof children === 'string' ? [children] : children;
|
|
2359
2370
|
return /*#__PURE__*/React.createElement("span", Object.assign({
|
|
@@ -2896,7 +2907,7 @@ function ProgressBar(_ref) {
|
|
|
2896
2907
|
|
|
2897
2908
|
ProgressBar.displayName = 'ProgressBar';
|
|
2898
2909
|
|
|
2899
|
-
var _excluded$
|
|
2910
|
+
var _excluded$s = ["value", "options", "onChange", "disabled", "className", "defaultValue"];
|
|
2900
2911
|
|
|
2901
2912
|
function Select(_ref) {
|
|
2902
2913
|
var value = _ref.value,
|
|
@@ -2908,7 +2919,7 @@ function Select(_ref) {
|
|
|
2908
2919
|
_ref$className = _ref.className,
|
|
2909
2920
|
className = _ref$className === void 0 ? '' : _ref$className,
|
|
2910
2921
|
defaultValue = _ref.defaultValue,
|
|
2911
|
-
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
2922
|
+
otherProps = _objectWithoutPropertiesLoose(_ref, _excluded$s);
|
|
2912
2923
|
|
|
2913
2924
|
var selectClassName = classNames('reactist_select', {
|
|
2914
2925
|
disabled: disabled
|
|
@@ -3164,7 +3175,7 @@ var CloseIcon$1 = function CloseIcon() {
|
|
|
3164
3175
|
}));
|
|
3165
3176
|
};
|
|
3166
3177
|
|
|
3167
|
-
var _excluded$
|
|
3178
|
+
var _excluded$t = ["id", "icon", "title", "subtitle", "children", "customCloseButton", "onClick", "onClose", "closeAltText", "className", "aria-live"];
|
|
3168
3179
|
|
|
3169
3180
|
function Notification(_ref) {
|
|
3170
3181
|
var id = _ref.id,
|
|
@@ -3180,7 +3191,7 @@ function Notification(_ref) {
|
|
|
3180
3191
|
className = _ref.className,
|
|
3181
3192
|
_ref$ariaLive = _ref['aria-live'],
|
|
3182
3193
|
ariaLive = _ref$ariaLive === void 0 ? 'polite' : _ref$ariaLive,
|
|
3183
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3194
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded$t);
|
|
3184
3195
|
|
|
3185
3196
|
var titleId = title ? id + "-title" : null;
|
|
3186
3197
|
var titleIdAttribute = titleId ? {
|
|
@@ -3230,7 +3241,7 @@ function Notification(_ref) {
|
|
|
3230
3241
|
}, customCloseButton !== null && customCloseButton !== void 0 ? customCloseButton : /*#__PURE__*/React__default.createElement(CloseIcon$1, null)) : null);
|
|
3231
3242
|
}
|
|
3232
3243
|
|
|
3233
|
-
var _excluded$
|
|
3244
|
+
var _excluded$u = ["children", "onItemSelect"],
|
|
3234
3245
|
_excluded2$3 = ["exceptionallySetClassName"],
|
|
3235
3246
|
_excluded3$2 = ["handleItemSelect"],
|
|
3236
3247
|
_excluded4$2 = ["exceptionallySetClassName"],
|
|
@@ -3255,10 +3266,11 @@ var MenuContext = /*#__PURE__*/React.createContext( // Reakit gives us no means
|
|
|
3255
3266
|
function Menu(_ref) {
|
|
3256
3267
|
var children = _ref.children,
|
|
3257
3268
|
onItemSelect = _ref.onItemSelect,
|
|
3258
|
-
props = _objectWithoutPropertiesLoose(_ref, _excluded$
|
|
3269
|
+
props = _objectWithoutPropertiesLoose(_ref, _excluded$u);
|
|
3259
3270
|
|
|
3260
3271
|
var state = Reakit.useMenuState(_objectSpread2({
|
|
3261
|
-
loop: true
|
|
3272
|
+
loop: true,
|
|
3273
|
+
unstable_offset: [8, 8]
|
|
3262
3274
|
}, props));
|
|
3263
3275
|
var handleItemSelect = React.useCallback(function handleItemSelect(value) {
|
|
3264
3276
|
if (onItemSelect) onItemSelect(value);
|