@deque/cauldron-react 5.12.0 → 5.13.0-canary.7b5349dc
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/components/Accordion/Accordion.d.ts +0 -15
- package/lib/components/Address/index.d.ts +3 -16
- package/lib/components/Alert/index.d.ts +0 -10
- package/lib/components/Breadcrumb/BreadcrumbItem.d.ts +3 -2
- package/lib/components/ClickOutsideListener/index.d.ts +0 -8
- package/lib/components/Combobox/Combobox.d.ts +1 -0
- package/lib/components/DescriptionList/index.d.ts +0 -17
- package/lib/components/Dialog/index.d.ts +7 -25
- package/lib/components/ExpandCollapsePanel/ExpandCollapsePanel.d.ts +0 -8
- package/lib/components/ExpandCollapsePanel/PanelTrigger.d.ts +0 -10
- package/lib/components/Layout/index.d.ts +0 -7
- package/lib/components/Line/index.d.ts +4 -5
- package/lib/components/Link/index.d.ts +0 -10
- package/lib/components/Loader/index.d.ts +0 -1
- package/lib/components/LoaderOverlay/index.d.ts +0 -1
- package/lib/components/Main/index.d.ts +0 -7
- package/lib/components/MenuBar/index.d.ts +0 -7
- package/lib/components/MenuItem/index.d.ts +0 -10
- package/lib/components/Modal/index.d.ts +0 -10
- package/lib/components/NavBar/NavBar.d.ts +0 -8
- package/lib/components/NavBar/NavItem.d.ts +0 -4
- package/lib/components/OptionsMenu/OptionsMenu.d.ts +1 -13
- package/lib/components/OptionsMenu/OptionsMenuList.d.ts +0 -12
- package/lib/components/OptionsMenu/OptionsMenuWrapper.d.ts +1 -9
- package/lib/components/RadioCardGroup/index.d.ts +0 -17
- package/lib/components/Scrim/index.d.ts +0 -4
- package/lib/components/SideBar/SideBar.d.ts +0 -7
- package/lib/components/SideBar/SideBarItem.d.ts +1 -0
- package/lib/components/SkipLink/index.d.ts +0 -6
- package/lib/components/Stepper/index.d.ts +0 -11
- package/lib/components/Table/Table.d.ts +0 -6
- package/lib/components/Table/TableBody.d.ts +0 -5
- package/lib/components/Table/TableCell.d.ts +0 -5
- package/lib/components/Table/TableFooter.d.ts +0 -5
- package/lib/components/Table/TableHead.d.ts +0 -5
- package/lib/components/Table/TableHeader.d.ts +0 -9
- package/lib/components/Table/TableRow.d.ts +0 -5
- package/lib/components/Tabs/Tabs.d.ts +0 -10
- package/lib/components/Tag/index.d.ts +0 -9
- package/lib/components/TextField/index.d.ts +0 -16
- package/lib/components/Toast/index.d.ts +0 -13
- package/lib/components/Tooltip/index.d.ts +9 -22
- package/lib/components/TopBar/TopBarMenu.d.ts +0 -5
- package/lib/components/TopBar/TopBarTrigger.d.ts +1 -0
- package/lib/components/TwoColumnPanel/ColumnGroupHeader.d.ts +3 -2
- package/lib/components/TwoColumnPanel/ColumnHeader.d.ts +3 -2
- package/lib/components/TwoColumnPanel/ColumnList.d.ts +3 -2
- package/lib/components/Workspace/index.d.ts +0 -11
- package/lib/contexts/theme.d.ts +1 -8
- package/lib/index.d.ts +0 -3
- package/lib/index.js +80 -959
- package/package.json +2 -4
- package/lib/components/Card/Card.d.ts +0 -14
- package/lib/components/Card/CardContent.d.ts +0 -11
- package/lib/components/Card/CardFooter.d.ts +0 -11
- package/lib/components/Card/CardHeader.d.ts +0 -11
- package/lib/components/Card/index.d.ts +0 -4
- package/lib/components/IssuePanel/index.d.ts +0 -17
- package/lib/components/Pointout/index.d.ts +0 -82
- package/lib/propTypes.d.ts +0 -6
package/lib/index.js
CHANGED
|
@@ -4,14 +4,12 @@ Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
4
4
|
|
|
5
5
|
var tslib = require('tslib');
|
|
6
6
|
var React = require('react');
|
|
7
|
-
var PropTypes = require('prop-types');
|
|
8
7
|
var classNames = require('classnames');
|
|
9
8
|
var nextId = require('react-id-generator');
|
|
10
9
|
var keyname = require('keyname');
|
|
11
10
|
var reactDom = require('react-dom');
|
|
12
11
|
var FocusTrap = require('focus-trap-react');
|
|
13
12
|
var reactPopper = require('react-popper');
|
|
14
|
-
var focusable = require('focusable');
|
|
15
13
|
var SyntaxHighlighter = require('react-syntax-highlighter/dist/cjs/light');
|
|
16
14
|
var js = require('react-syntax-highlighter/dist/cjs/languages/hljs/javascript');
|
|
17
15
|
var css = require('react-syntax-highlighter/dist/cjs/languages/hljs/css');
|
|
@@ -21,12 +19,10 @@ var yaml = require('react-syntax-highlighter/dist/cjs/languages/hljs/yaml');
|
|
|
21
19
|
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
22
20
|
|
|
23
21
|
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
24
|
-
var PropTypes__default = /*#__PURE__*/_interopDefaultLegacy(PropTypes);
|
|
25
22
|
var classNames__default = /*#__PURE__*/_interopDefaultLegacy(classNames);
|
|
26
23
|
var nextId__default = /*#__PURE__*/_interopDefaultLegacy(nextId);
|
|
27
24
|
var keyname__default = /*#__PURE__*/_interopDefaultLegacy(keyname);
|
|
28
25
|
var FocusTrap__default = /*#__PURE__*/_interopDefaultLegacy(FocusTrap);
|
|
29
|
-
var focusable__default = /*#__PURE__*/_interopDefaultLegacy(focusable);
|
|
30
26
|
var SyntaxHighlighter__default = /*#__PURE__*/_interopDefaultLegacy(SyntaxHighlighter);
|
|
31
27
|
var js__default = /*#__PURE__*/_interopDefaultLegacy(js);
|
|
32
28
|
var css__default = /*#__PURE__*/_interopDefaultLegacy(css);
|
|
@@ -46,13 +42,6 @@ var Main = /** @class */ (function (_super) {
|
|
|
46
42
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
47
43
|
mainRef: function () { }
|
|
48
44
|
};
|
|
49
|
-
Main.propTypes = {
|
|
50
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
51
|
-
mainRef: PropTypes__default["default"].oneOfType([
|
|
52
|
-
PropTypes__default["default"].func,
|
|
53
|
-
PropTypes__default["default"].shape({ current: PropTypes__default["default"].any })
|
|
54
|
-
])
|
|
55
|
-
};
|
|
56
45
|
return Main;
|
|
57
46
|
}(React.Component));
|
|
58
47
|
|
|
@@ -69,13 +58,6 @@ var Layout = /** @class */ (function (_super) {
|
|
|
69
58
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
70
59
|
layoutRef: function () { }
|
|
71
60
|
};
|
|
72
|
-
Layout.propTypes = {
|
|
73
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
74
|
-
layoutRef: PropTypes__default["default"].oneOfType([
|
|
75
|
-
PropTypes__default["default"].func,
|
|
76
|
-
PropTypes__default["default"].shape({ current: PropTypes__default["default"].any })
|
|
77
|
-
])
|
|
78
|
-
};
|
|
79
61
|
return Layout;
|
|
80
62
|
}(React__default["default"].Component));
|
|
81
63
|
|
|
@@ -111,22 +93,6 @@ var Workspace = /** @class */ (function (_super) {
|
|
|
111
93
|
layoutRef: function () { },
|
|
112
94
|
noSideBar: false
|
|
113
95
|
};
|
|
114
|
-
Workspace.propTypes = {
|
|
115
|
-
children: PropTypes__default["default"].oneOfType([
|
|
116
|
-
PropTypes__default["default"].array,
|
|
117
|
-
PropTypes__default["default"].object,
|
|
118
|
-
PropTypes__default["default"].string
|
|
119
|
-
]).isRequired,
|
|
120
|
-
workspaceRef: PropTypes__default["default"].oneOfType([
|
|
121
|
-
PropTypes__default["default"].func,
|
|
122
|
-
PropTypes__default["default"].shape({ current: PropTypes__default["default"].any })
|
|
123
|
-
]),
|
|
124
|
-
layoutRef: PropTypes__default["default"].oneOfType([
|
|
125
|
-
PropTypes__default["default"].func,
|
|
126
|
-
PropTypes__default["default"].shape({ current: PropTypes__default["default"].any })
|
|
127
|
-
]),
|
|
128
|
-
noSideBar: PropTypes__default["default"].bool
|
|
129
|
-
};
|
|
130
96
|
return Workspace;
|
|
131
97
|
}(React__default["default"].Component));
|
|
132
98
|
|
|
@@ -354,12 +320,6 @@ var Icon = React.forwardRef(function (_a, ref) {
|
|
|
354
320
|
label && React__default["default"].createElement(Offscreen, null, label),
|
|
355
321
|
IconSVG && React__default["default"].createElement(IconSVG, null)));
|
|
356
322
|
});
|
|
357
|
-
Icon.propTypes = {
|
|
358
|
-
label: PropTypes__default["default"].string,
|
|
359
|
-
className: PropTypes__default["default"].string,
|
|
360
|
-
// @ts-expect-error
|
|
361
|
-
type: PropTypes__default["default"].string.isRequired
|
|
362
|
-
};
|
|
363
323
|
Icon.displayName = 'Icon';
|
|
364
324
|
|
|
365
325
|
var PanelTrigger = function (_a) {
|
|
@@ -376,15 +336,6 @@ var PanelTrigger = function (_a) {
|
|
|
376
336
|
: children),
|
|
377
337
|
React__default["default"].createElement(Icon, { type: open ? iconExpanded : iconCollapsed }))));
|
|
378
338
|
};
|
|
379
|
-
PanelTrigger.propTypes = {
|
|
380
|
-
children: PropTypes__default["default"].oneOfType([PropTypes__default["default"].func, PropTypes__default["default"].node]),
|
|
381
|
-
open: PropTypes__default["default"].bool,
|
|
382
|
-
iconExpanded: PropTypes__default["default"].string,
|
|
383
|
-
iconCollapsed: PropTypes__default["default"].string,
|
|
384
|
-
heading: PropTypes__default["default"].shape({
|
|
385
|
-
level: PropTypes__default["default"].number
|
|
386
|
-
})
|
|
387
|
-
};
|
|
388
339
|
PanelTrigger.displayName = 'PanelTrigger';
|
|
389
340
|
var PanelTrigger$1 = React__default["default"].memo(PanelTrigger);
|
|
390
341
|
|
|
@@ -421,8 +372,7 @@ var ExpandCollapsePanel = /** @class */ (function (_super) {
|
|
|
421
372
|
_this.animateOpen = function () {
|
|
422
373
|
var panel = _this.panel.current;
|
|
423
374
|
var animationTiming = _this.props.animationTiming;
|
|
424
|
-
var prefersReducedMotion = matchMedia('(prefers-reduced-motion: reduce)')
|
|
425
|
-
.matches;
|
|
375
|
+
var prefersReducedMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
426
376
|
if (!animationTiming || prefersReducedMotion) {
|
|
427
377
|
_this.setState({ isAnimating: false });
|
|
428
378
|
return;
|
|
@@ -445,8 +395,7 @@ var ExpandCollapsePanel = /** @class */ (function (_super) {
|
|
|
445
395
|
_this.animateClose = function () {
|
|
446
396
|
var panel = _this.panel.current;
|
|
447
397
|
var animationTiming = _this.props.animationTiming;
|
|
448
|
-
var prefersReducedMotion = matchMedia('(prefers-reduced-motion: reduce)')
|
|
449
|
-
.matches;
|
|
398
|
+
var prefersReducedMotion = matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
450
399
|
if (!animationTiming || prefersReducedMotion) {
|
|
451
400
|
_this.setState({ isAnimating: false });
|
|
452
401
|
return;
|
|
@@ -512,13 +461,6 @@ var ExpandCollapsePanel = /** @class */ (function (_super) {
|
|
|
512
461
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
513
462
|
onToggle: function () { }
|
|
514
463
|
};
|
|
515
|
-
ExpandCollapsePanel.propTypes = {
|
|
516
|
-
open: PropTypes__default["default"].bool,
|
|
517
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
518
|
-
className: PropTypes__default["default"].string,
|
|
519
|
-
animationTiming: PropTypes__default["default"].oneOfType([PropTypes__default["default"].number, PropTypes__default["default"].bool]),
|
|
520
|
-
onToggle: PropTypes__default["default"].func
|
|
521
|
-
};
|
|
522
464
|
return ExpandCollapsePanel;
|
|
523
465
|
}(React__default["default"].Component));
|
|
524
466
|
|
|
@@ -559,20 +501,6 @@ var Accordion = function (_a) {
|
|
|
559
501
|
Accordion.displayName = 'Accordion';
|
|
560
502
|
AccordionContent.displayName = 'AccordionContent';
|
|
561
503
|
AccordionTrigger.displayName = 'AccordionTrigger';
|
|
562
|
-
Accordion.propTypes = {
|
|
563
|
-
children: PropTypes__default["default"].node,
|
|
564
|
-
className: PropTypes__default["default"].string
|
|
565
|
-
};
|
|
566
|
-
AccordionTrigger.propTypes = {
|
|
567
|
-
children: PropTypes__default["default"].node,
|
|
568
|
-
heading: PropTypes__default["default"].shape({
|
|
569
|
-
level: PropTypes__default["default"].number
|
|
570
|
-
})
|
|
571
|
-
};
|
|
572
|
-
AccordionContent.propTypes = {
|
|
573
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
574
|
-
className: PropTypes__default["default"].string
|
|
575
|
-
};
|
|
576
504
|
|
|
577
505
|
var Scrim = /** @class */ (function (_super) {
|
|
578
506
|
tslib.__extends(Scrim, _super);
|
|
@@ -635,9 +563,6 @@ var Scrim = /** @class */ (function (_super) {
|
|
|
635
563
|
}
|
|
636
564
|
return (React__default["default"].createElement("div", { ref: function (el) { return (_this.el = el); }, className: "Scrim ".concat(animationClass) }));
|
|
637
565
|
};
|
|
638
|
-
Scrim.propTypes = {
|
|
639
|
-
show: PropTypes__default["default"].bool.isRequired
|
|
640
|
-
};
|
|
641
566
|
return Scrim;
|
|
642
567
|
}(React__default["default"].Component));
|
|
643
568
|
|
|
@@ -707,16 +632,6 @@ var MenuItem = /** @class */ (function (_super) {
|
|
|
707
632
|
onKeyDown: function () { },
|
|
708
633
|
autoClickLink: true
|
|
709
634
|
};
|
|
710
|
-
MenuItem.propTypes = {
|
|
711
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
712
|
-
menuItemRef: PropTypes__default["default"].oneOfType([
|
|
713
|
-
PropTypes__default["default"].func,
|
|
714
|
-
PropTypes__default["default"].shape({ current: PropTypes__default["default"].any })
|
|
715
|
-
]),
|
|
716
|
-
onClick: PropTypes__default["default"].func,
|
|
717
|
-
onKeyDown: PropTypes__default["default"].func,
|
|
718
|
-
autoClickLink: PropTypes__default["default"].bool
|
|
719
|
-
};
|
|
720
635
|
return MenuItem;
|
|
721
636
|
}(React.Component));
|
|
722
637
|
|
|
@@ -837,12 +752,6 @@ var TopBar$1 = /** @class */ (function (_super) {
|
|
|
837
752
|
var _a = this.props, children = _a.children, className = _a.className; _a.thin; _a.hasTrigger; tslib.__rest(_a, ["children", "className", "thin", "hasTrigger"]);
|
|
838
753
|
return (React__default["default"].createElement("ul", { role: "menubar", className: className }, React.Children.map(children, this.renderChild)));
|
|
839
754
|
};
|
|
840
|
-
TopBar.propTypes = {
|
|
841
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
842
|
-
className: PropTypes__default["default"].string,
|
|
843
|
-
thin: PropTypes__default["default"].bool,
|
|
844
|
-
hasTrigger: PropTypes__default["default"].bool
|
|
845
|
-
};
|
|
846
755
|
TopBar.defaultProps = {
|
|
847
756
|
thin: false,
|
|
848
757
|
hasTrigger: false
|
|
@@ -863,10 +772,6 @@ var TopBarTrigger = function (_a) {
|
|
|
863
772
|
return (React__default["default"].createElement(MenuItem, tslib.__assign({ "aria-haspopup": "true", className: classNames__default["default"]('TopBar__menu-trigger', className) }, other), children));
|
|
864
773
|
};
|
|
865
774
|
TopBarTrigger.displayName = 'TopBarTrigger';
|
|
866
|
-
TopBarTrigger.propTypes = {
|
|
867
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
868
|
-
className: PropTypes__default["default"].string
|
|
869
|
-
};
|
|
870
775
|
|
|
871
776
|
var menuAlignment = function (type) {
|
|
872
777
|
switch (type) {
|
|
@@ -883,11 +788,6 @@ var OptionsMenuWrapper = function (_a) {
|
|
|
883
788
|
var className = _a.className, align = _a.align, other = tslib.__rest(_a, ["className", "align"]);
|
|
884
789
|
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('OptionsMenu', menuAlignment(align), className) }, other)));
|
|
885
790
|
};
|
|
886
|
-
OptionsMenuWrapper.propTypes = {
|
|
887
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
888
|
-
className: PropTypes__default["default"].string,
|
|
889
|
-
align: PropTypes__default["default"].oneOf(['left', 'right'])
|
|
890
|
-
};
|
|
891
791
|
|
|
892
792
|
var ClickOutsideListener = /** @class */ (function (_super) {
|
|
893
793
|
tslib.__extends(ClickOutsideListener, _super);
|
|
@@ -955,13 +855,6 @@ var ClickOutsideListener = /** @class */ (function (_super) {
|
|
|
955
855
|
mouseEvent: 'click',
|
|
956
856
|
touchEvent: 'touchend'
|
|
957
857
|
};
|
|
958
|
-
ClickOutsideListener.propTypes = {
|
|
959
|
-
children: PropTypes__default["default"].node,
|
|
960
|
-
target: PropTypes__default["default"].any,
|
|
961
|
-
onClickOutside: PropTypes__default["default"].func.isRequired,
|
|
962
|
-
mouseEvent: PropTypes__default["default"].oneOf(['mousedown', 'click', 'mouseup', false]),
|
|
963
|
-
touchEvent: PropTypes__default["default"].oneOf(['touchstart', 'touchend', false])
|
|
964
|
-
};
|
|
965
858
|
return ClickOutsideListener;
|
|
966
859
|
}(React__default["default"].Component));
|
|
967
860
|
|
|
@@ -1085,18 +978,6 @@ var OptionsMenuList = /** @class */ (function (_super) {
|
|
|
1085
978
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1086
979
|
onClose: function () { }
|
|
1087
980
|
};
|
|
1088
|
-
OptionsMenuList.propTypes = {
|
|
1089
|
-
show: PropTypes__default["default"].bool,
|
|
1090
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
1091
|
-
onClose: PropTypes__default["default"].func,
|
|
1092
|
-
className: PropTypes__default["default"].string,
|
|
1093
|
-
onSelect: PropTypes__default["default"].func,
|
|
1094
|
-
closeOnSelect: PropTypes__default["default"].bool,
|
|
1095
|
-
menuRef: PropTypes__default["default"].oneOfType([
|
|
1096
|
-
PropTypes__default["default"].func,
|
|
1097
|
-
PropTypes__default["default"].shape({ current: PropTypes__default["default"].any })
|
|
1098
|
-
])
|
|
1099
|
-
};
|
|
1100
981
|
return OptionsMenuList;
|
|
1101
982
|
}(React__default["default"].Component));
|
|
1102
983
|
|
|
@@ -1156,19 +1037,6 @@ var OptionsMenu = /** @class */ (function (_super) {
|
|
|
1156
1037
|
onSelect: function () { },
|
|
1157
1038
|
align: 'right'
|
|
1158
1039
|
};
|
|
1159
|
-
OptionsMenu.propTypes = {
|
|
1160
|
-
trigger: PropTypes__default["default"].func,
|
|
1161
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
1162
|
-
onClose: PropTypes__default["default"].func,
|
|
1163
|
-
className: PropTypes__default["default"].string,
|
|
1164
|
-
onSelect: PropTypes__default["default"].func,
|
|
1165
|
-
closeOnSelect: PropTypes__default["default"].bool,
|
|
1166
|
-
menuRef: PropTypes__default["default"].oneOfType([
|
|
1167
|
-
PropTypes__default["default"].func,
|
|
1168
|
-
PropTypes__default["default"].shape({ current: PropTypes__default["default"].any })
|
|
1169
|
-
]),
|
|
1170
|
-
align: PropTypes__default["default"].oneOf(['left', 'right'])
|
|
1171
|
-
};
|
|
1172
1040
|
return OptionsMenu;
|
|
1173
1041
|
}(React.Component));
|
|
1174
1042
|
|
|
@@ -1196,11 +1064,6 @@ var OptionsMenuItemComponent = /** @class */ (function (_super) {
|
|
|
1196
1064
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1197
1065
|
onSelect: function () { }
|
|
1198
1066
|
};
|
|
1199
|
-
OptionsMenuItemComponent.propTypes = {
|
|
1200
|
-
disabled: PropTypes__default["default"].bool,
|
|
1201
|
-
className: PropTypes__default["default"].string,
|
|
1202
|
-
onSelect: PropTypes__default["default"].func
|
|
1203
|
-
};
|
|
1204
1067
|
return OptionsMenuItemComponent;
|
|
1205
1068
|
}(React__default["default"].Component));
|
|
1206
1069
|
var OptionsMenuItem = React__default["default"].forwardRef(function OptionsMenuItem(props, ref) {
|
|
@@ -1215,14 +1078,6 @@ function OptionsMenuTriggerComponent(_a) {
|
|
|
1215
1078
|
var className = _a.className, triggerRef = _a.triggerRef, other = tslib.__rest(_a, ["className", "triggerRef"]);
|
|
1216
1079
|
return (React__default["default"].createElement("button", tslib.__assign({ type: "button", "aria-haspopup": "menu", ref: triggerRef }, other, { className: classNames__default["default"]('OptionsMenu__trigger', className) })));
|
|
1217
1080
|
}
|
|
1218
|
-
OptionsMenuTriggerComponent.propTypes = {
|
|
1219
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
1220
|
-
className: PropTypes__default["default"].string,
|
|
1221
|
-
triggerRef: PropTypes__default["default"].oneOfType([
|
|
1222
|
-
PropTypes__default["default"].func,
|
|
1223
|
-
PropTypes__default["default"].shape({ current: PropTypes__default["default"].any })
|
|
1224
|
-
])
|
|
1225
|
-
};
|
|
1226
1081
|
var OptionsMenuTrigger = React__default["default"].forwardRef(function OptionsMenuTrigger(props, ref) {
|
|
1227
1082
|
return React__default["default"].createElement(OptionsMenuTriggerComponent, tslib.__assign({}, props, { triggerRef: ref }));
|
|
1228
1083
|
});
|
|
@@ -1295,10 +1150,6 @@ var TopBarMenu = /** @class */ (function (_super) {
|
|
|
1295
1150
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
1296
1151
|
menuItemRef: function () { }
|
|
1297
1152
|
};
|
|
1298
|
-
TopBarMenu.propTypes = {
|
|
1299
|
-
id: PropTypes__default["default"].string.isRequired,
|
|
1300
|
-
children: PropTypes__default["default"].node.isRequired
|
|
1301
|
-
};
|
|
1302
1153
|
return TopBarMenu;
|
|
1303
1154
|
}(React__default["default"].Component));
|
|
1304
1155
|
|
|
@@ -1346,13 +1197,6 @@ var NavBar = function (_a) {
|
|
|
1346
1197
|
showNavItems && (React__default["default"].createElement("ul", { onKeyDown: handleKeyDown, id: menuId }, children))));
|
|
1347
1198
|
};
|
|
1348
1199
|
NavBar.displayName = 'NavBar';
|
|
1349
|
-
NavBar.propTypes = {
|
|
1350
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
1351
|
-
className: PropTypes__default["default"].string,
|
|
1352
|
-
collapsed: PropTypes__default["default"].bool,
|
|
1353
|
-
navTriggerLabel: PropTypes__default["default"].string,
|
|
1354
|
-
propId: PropTypes__default["default"].string
|
|
1355
|
-
};
|
|
1356
1200
|
|
|
1357
1201
|
var NavItem = function (_a) {
|
|
1358
1202
|
var children = _a.children, active = _a.active, _b = _a["aria-current"], ariaCurrent = _b === void 0 ? true : _b, other = tslib.__rest(_a, ["children", "active", 'aria-current']);
|
|
@@ -1365,9 +1209,6 @@ var NavItem = function (_a) {
|
|
|
1365
1209
|
}) }, additionalProps, other), children));
|
|
1366
1210
|
};
|
|
1367
1211
|
NavItem.displayName = 'NavItem';
|
|
1368
|
-
NavItem.propTypes = {
|
|
1369
|
-
children: PropTypes__default["default"].node.isRequired
|
|
1370
|
-
};
|
|
1371
1212
|
|
|
1372
1213
|
/**
|
|
1373
1214
|
* Selector for NATURALLY focusable elements
|
|
@@ -1479,12 +1320,6 @@ var SideBar = /** @class */ (function (_super) {
|
|
|
1479
1320
|
className: '',
|
|
1480
1321
|
show: false
|
|
1481
1322
|
};
|
|
1482
|
-
SideBar.propTypes = {
|
|
1483
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
1484
|
-
onDismiss: PropTypes__default["default"].func.isRequired,
|
|
1485
|
-
className: PropTypes__default["default"].string,
|
|
1486
|
-
show: PropTypes__default["default"].bool
|
|
1487
|
-
};
|
|
1488
1323
|
return SideBar;
|
|
1489
1324
|
}(React.Component));
|
|
1490
1325
|
|
|
@@ -1504,10 +1339,6 @@ SideBarItem.displayName = 'SideBarItem';
|
|
|
1504
1339
|
SideBarItem.defaultProps = {
|
|
1505
1340
|
autoClickLink: true
|
|
1506
1341
|
};
|
|
1507
|
-
SideBarItem.propTypes = {
|
|
1508
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
1509
|
-
autoClickLink: PropTypes__default["default"].bool
|
|
1510
|
-
};
|
|
1511
1342
|
|
|
1512
1343
|
/**
|
|
1513
1344
|
* Handles aria-hidden for dialogs.
|
|
@@ -1561,6 +1392,7 @@ var Dialog = /** @class */ (function (_super) {
|
|
|
1561
1392
|
tslib.__extends(Dialog, _super);
|
|
1562
1393
|
function Dialog(props) {
|
|
1563
1394
|
var _this = _super.call(this, props) || this;
|
|
1395
|
+
_this.headingId = nextId__default["default"]('dialog-title-');
|
|
1564
1396
|
_this.close = _this.close.bind(_this);
|
|
1565
1397
|
_this.focusHeading = _this.focusHeading.bind(_this);
|
|
1566
1398
|
_this.handleClickOutside = _this.handleClickOutside.bind(_this);
|
|
@@ -1617,10 +1449,10 @@ var Dialog = /** @class */ (function (_super) {
|
|
|
1617
1449
|
return;
|
|
1618
1450
|
}
|
|
1619
1451
|
setRef(dialogRef, el);
|
|
1620
|
-
} }, other),
|
|
1452
|
+
}, "aria-labelledby": this.headingId }, other),
|
|
1621
1453
|
React__default["default"].createElement("div", { className: "Dialog__inner" },
|
|
1622
1454
|
React__default["default"].createElement("div", { className: "Dialog__header" },
|
|
1623
|
-
React__default["default"].createElement(Heading, { className: "Dialog__heading", ref: function (el) { return (_this.heading = el); }, tabIndex: -1 }, typeof heading === 'object' && 'text' in heading
|
|
1455
|
+
React__default["default"].createElement(Heading, { className: "Dialog__heading", ref: function (el) { return (_this.heading = el); }, tabIndex: -1, id: this.headingId }, typeof heading === 'object' && 'text' in heading
|
|
1624
1456
|
? heading.text
|
|
1625
1457
|
: heading),
|
|
1626
1458
|
close),
|
|
@@ -1652,19 +1484,6 @@ var Dialog = /** @class */ (function (_super) {
|
|
|
1652
1484
|
forceAction: false,
|
|
1653
1485
|
closeButtonText: 'Close'
|
|
1654
1486
|
};
|
|
1655
|
-
Dialog.propTypes = {
|
|
1656
|
-
className: PropTypes__default["default"].string,
|
|
1657
|
-
show: PropTypes__default["default"].bool,
|
|
1658
|
-
dialogRef: PropTypes__default["default"].oneOfType([
|
|
1659
|
-
PropTypes__default["default"].func,
|
|
1660
|
-
PropTypes__default["default"].shape({ current: PropTypes__default["default"].any })
|
|
1661
|
-
]),
|
|
1662
|
-
onClose: PropTypes__default["default"].func,
|
|
1663
|
-
forceAction: PropTypes__default["default"].bool,
|
|
1664
|
-
heading: PropTypes__default["default"].oneOfType([PropTypes__default["default"].object, PropTypes__default["default"].node]).isRequired,
|
|
1665
|
-
closeButtonText: PropTypes__default["default"].string,
|
|
1666
|
-
portal: PropTypes__default["default"].any
|
|
1667
|
-
};
|
|
1668
1487
|
return Dialog;
|
|
1669
1488
|
}(React__default["default"].Component));
|
|
1670
1489
|
var DialogContent = function (_a) {
|
|
@@ -1676,11 +1495,6 @@ var DialogContent = function (_a) {
|
|
|
1676
1495
|
}) }, other), children));
|
|
1677
1496
|
};
|
|
1678
1497
|
DialogContent.displayName = 'DialogContent';
|
|
1679
|
-
DialogContent.propTypes = {
|
|
1680
|
-
className: PropTypes__default["default"].string,
|
|
1681
|
-
children: PropTypes__default["default"].node,
|
|
1682
|
-
align: PropTypes__default["default"].string
|
|
1683
|
-
};
|
|
1684
1498
|
var DialogFooter = function (_a) {
|
|
1685
1499
|
var children = _a.children, className = _a.className, align = _a.align, other = tslib.__rest(_a, ["children", "className", "align"]);
|
|
1686
1500
|
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Dialog__footer', className, {
|
|
@@ -1690,11 +1504,6 @@ var DialogFooter = function (_a) {
|
|
|
1690
1504
|
}) }, other), children));
|
|
1691
1505
|
};
|
|
1692
1506
|
DialogFooter.displayName = 'DialogFooter';
|
|
1693
|
-
DialogFooter.propTypes = {
|
|
1694
|
-
className: PropTypes__default["default"].string,
|
|
1695
|
-
children: PropTypes__default["default"].node,
|
|
1696
|
-
align: PropTypes__default["default"].string
|
|
1697
|
-
};
|
|
1698
1507
|
|
|
1699
1508
|
var Alert = function (_a) {
|
|
1700
1509
|
var children = _a.children, className = _a.className, _b = _a.variant, variant = _b === void 0 ? 'default' : _b, heading = _a.heading, other = tslib.__rest(_a, ["children", "className", "variant", "heading"]);
|
|
@@ -1774,17 +1583,6 @@ var SkipLink = /** @class */ (function (_super) {
|
|
|
1774
1583
|
skipText: 'Skip to',
|
|
1775
1584
|
targetText: 'Main Content'
|
|
1776
1585
|
};
|
|
1777
|
-
SkipLink.propTypes = {
|
|
1778
|
-
// enforce a valid id hash string (example: '#foo')
|
|
1779
|
-
target: function (props, propName, componentName) {
|
|
1780
|
-
var value = props[propName];
|
|
1781
|
-
if (!value || typeof value !== 'string' || value[0] !== '#') {
|
|
1782
|
-
return new Error("Invalid prop ".concat(propName, " supplied to ").concat(componentName, " (must be string starting with \"#\")"));
|
|
1783
|
-
}
|
|
1784
|
-
},
|
|
1785
|
-
skipText: PropTypes__default["default"].string,
|
|
1786
|
-
targetText: PropTypes__default["default"].string
|
|
1787
|
-
};
|
|
1788
1586
|
return SkipLink;
|
|
1789
1587
|
}(React__default["default"].Component));
|
|
1790
1588
|
|
|
@@ -1941,29 +1739,14 @@ function Tooltip(_a) {
|
|
|
1941
1739
|
: null));
|
|
1942
1740
|
}
|
|
1943
1741
|
Tooltip.displayName = 'Tooltip';
|
|
1944
|
-
Tooltip.propTypes = {
|
|
1945
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
1946
|
-
target: PropTypes__default["default"].any.isRequired,
|
|
1947
|
-
association: PropTypes__default["default"].oneOf(['aria-labelledby', 'aria-describedby']),
|
|
1948
|
-
show: PropTypes__default["default"].bool,
|
|
1949
|
-
placement: PropTypes__default["default"].string,
|
|
1950
|
-
variant: PropTypes__default["default"].string,
|
|
1951
|
-
portal: PropTypes__default["default"].any
|
|
1952
|
-
};
|
|
1953
1742
|
var TooltipHead = function (_a) {
|
|
1954
1743
|
var className = _a.className, other = tslib.__rest(_a, ["className"]);
|
|
1955
1744
|
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('TooltipHead', className) }, other)));
|
|
1956
1745
|
};
|
|
1957
|
-
TooltipHead.propTypes = {
|
|
1958
|
-
className: PropTypes__default["default"].string
|
|
1959
|
-
};
|
|
1960
1746
|
var TooltipContent = function (_a) {
|
|
1961
1747
|
var className = _a.className, other = tslib.__rest(_a, ["className"]);
|
|
1962
1748
|
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('TooltipContent', className) }, other)));
|
|
1963
1749
|
};
|
|
1964
|
-
TooltipContent.propTypes = {
|
|
1965
|
-
className: PropTypes__default["default"].string
|
|
1966
|
-
};
|
|
1967
1750
|
|
|
1968
1751
|
/**
|
|
1969
1752
|
* Unfortunately, eslint does not recognize that this Polymorphic component has a displayName set
|
|
@@ -2002,345 +1785,8 @@ var IconButton = React.forwardRef(function (_a, ref) {
|
|
|
2002
1785
|
disabled && React__default["default"].createElement(Offscreen, null, label)),
|
|
2003
1786
|
!disabled && (React__default["default"].createElement(Tooltip, { target: internalRef, placement: tooltipPlacement, variant: tooltipVariant, portal: tooltipPortal, association: "aria-labelledby", hideElementOnHidden: true }, label))));
|
|
2004
1787
|
});
|
|
2005
|
-
IconButton.propTypes = {
|
|
2006
|
-
// @ts-expect-error
|
|
2007
|
-
as: PropTypes__default["default"].elementType,
|
|
2008
|
-
// @ts-expect-error
|
|
2009
|
-
icon: PropTypes__default["default"].string.isRequired,
|
|
2010
|
-
label: PropTypes__default["default"].node.isRequired,
|
|
2011
|
-
// @ts-expect-error
|
|
2012
|
-
tooltipPlacement: PropTypes__default["default"].string,
|
|
2013
|
-
// @ts-expect-error
|
|
2014
|
-
tooltipVariant: PropTypes__default["default"].string,
|
|
2015
|
-
tooltipPortal: PropTypes__default["default"].any,
|
|
2016
|
-
// @ts-expect-error
|
|
2017
|
-
variant: PropTypes__default["default"].string
|
|
2018
|
-
};
|
|
2019
1788
|
IconButton.displayName = 'IconButton';
|
|
2020
1789
|
|
|
2021
|
-
var i = 0;
|
|
2022
|
-
var randomId = function () {
|
|
2023
|
-
var num = Math.floor(Math.random() * 10000) + 1;
|
|
2024
|
-
return "x_".concat(i++, "_").concat(num);
|
|
2025
|
-
};
|
|
2026
|
-
|
|
2027
|
-
/*
|
|
2028
|
-
* Recursively walks React element tree removing any id props for descendant nodes
|
|
2029
|
-
*/
|
|
2030
|
-
function recursivelyRemoveIds(element) {
|
|
2031
|
-
var walker = function (element) {
|
|
2032
|
-
if (!React.isValidElement(element)) {
|
|
2033
|
-
return element;
|
|
2034
|
-
}
|
|
2035
|
-
return React.cloneElement(element, {
|
|
2036
|
-
// we can't remove attributes, but react treats undefined/null as "absent"
|
|
2037
|
-
id: null
|
|
2038
|
-
}, React.Children.map(element.props.children, function (childElement) {
|
|
2039
|
-
return walker(childElement);
|
|
2040
|
-
}));
|
|
2041
|
-
};
|
|
2042
|
-
return Array.isArray(element)
|
|
2043
|
-
? React.Children.map(element, walker)
|
|
2044
|
-
: walker(element);
|
|
2045
|
-
}
|
|
2046
|
-
|
|
2047
|
-
var Pointout = /** @class */ (function (_super) {
|
|
2048
|
-
tslib.__extends(Pointout, _super);
|
|
2049
|
-
function Pointout(props) {
|
|
2050
|
-
var _this = _super.call(this, props) || this;
|
|
2051
|
-
// Mirror the offscreen focus to the visible content
|
|
2052
|
-
_this.attachOffscreenListeners = function () {
|
|
2053
|
-
var _a = _this, offscreenRef = _a.offscreenRef, offscreenContentRef = _a.offscreenContentRef, handleOffscreenFocusIn = _a.handleOffscreenFocusIn, handleOffscreenFocusOut = _a.handleOffscreenFocusOut, handleOffscreenContentFocusIn = _a.handleOffscreenContentFocusIn, handleOffscreenContentFocusOut = _a.handleOffscreenContentFocusOut;
|
|
2054
|
-
if (offscreenRef) {
|
|
2055
|
-
offscreenRef.removeEventListener('focusin', handleOffscreenFocusIn);
|
|
2056
|
-
offscreenRef.addEventListener('focusin', handleOffscreenFocusIn);
|
|
2057
|
-
offscreenRef.removeEventListener('focusout', handleOffscreenFocusOut);
|
|
2058
|
-
offscreenRef.addEventListener('focusout', handleOffscreenFocusOut);
|
|
2059
|
-
}
|
|
2060
|
-
// Manually handle offscreen content since it has a -1 tab index
|
|
2061
|
-
if (offscreenContentRef) {
|
|
2062
|
-
offscreenContentRef.removeEventListener('focusin', handleOffscreenContentFocusIn);
|
|
2063
|
-
offscreenContentRef.addEventListener('focusin', handleOffscreenContentFocusIn);
|
|
2064
|
-
offscreenContentRef.removeEventListener('focusout', handleOffscreenContentFocusOut);
|
|
2065
|
-
offscreenContentRef.addEventListener('focusout', handleOffscreenContentFocusOut);
|
|
2066
|
-
}
|
|
2067
|
-
};
|
|
2068
|
-
_this.handleOffscreenContentFocusIn = function (_a) {
|
|
2069
|
-
var target = _a.target;
|
|
2070
|
-
if (target === _this.offscreenContentRef) {
|
|
2071
|
-
_this.setState({ offscreenContentFocus: true });
|
|
2072
|
-
}
|
|
2073
|
-
};
|
|
2074
|
-
_this.handleOffscreenContentFocusOut = function (_a) {
|
|
2075
|
-
var target = _a.target;
|
|
2076
|
-
if (target === _this.offscreenContentRef) {
|
|
2077
|
-
_this.setState({ offscreenContentFocus: false });
|
|
2078
|
-
}
|
|
2079
|
-
};
|
|
2080
|
-
_this.handleOffscreenFocusIn = function (_a) {
|
|
2081
|
-
var e_1, _b;
|
|
2082
|
-
var target = _a.target;
|
|
2083
|
-
var _c = _this, offscreenRef = _c.offscreenRef, visibleRef = _c.visibleRef, getFocusableElements = _c.getFocusableElements;
|
|
2084
|
-
var offscreenFocusable = getFocusableElements(offscreenRef);
|
|
2085
|
-
var visibleFocusable = getFocusableElements(visibleRef);
|
|
2086
|
-
var elementIndex = offscreenFocusable.findIndex(function (element) { return element === target; });
|
|
2087
|
-
if (elementIndex === -1 || !visibleFocusable[elementIndex]) {
|
|
2088
|
-
return;
|
|
2089
|
-
}
|
|
2090
|
-
try {
|
|
2091
|
-
// Tag focusable elements
|
|
2092
|
-
for (var visibleFocusable_1 = tslib.__values(visibleFocusable), visibleFocusable_1_1 = visibleFocusable_1.next(); !visibleFocusable_1_1.done; visibleFocusable_1_1 = visibleFocusable_1.next()) {
|
|
2093
|
-
var element = visibleFocusable_1_1.value;
|
|
2094
|
-
element.setAttribute('data-focusable', 'true');
|
|
2095
|
-
element.setAttribute('tabindex', '-1');
|
|
2096
|
-
}
|
|
2097
|
-
}
|
|
2098
|
-
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
2099
|
-
finally {
|
|
2100
|
-
try {
|
|
2101
|
-
if (visibleFocusable_1_1 && !visibleFocusable_1_1.done && (_b = visibleFocusable_1.return)) _b.call(visibleFocusable_1);
|
|
2102
|
-
}
|
|
2103
|
-
finally { if (e_1) throw e_1.error; }
|
|
2104
|
-
}
|
|
2105
|
-
visibleFocusable[elementIndex].classList.add('Pointout--focus-active');
|
|
2106
|
-
};
|
|
2107
|
-
_this.handleOffscreenFocusOut = function (_a) {
|
|
2108
|
-
var target = _a.target;
|
|
2109
|
-
var _b = _this, offscreenRef = _b.offscreenRef, visibleRef = _b.visibleRef, getFocusableElements = _b.getFocusableElements;
|
|
2110
|
-
var offscreenFocusable = getFocusableElements(offscreenRef);
|
|
2111
|
-
var visibleFocusable = getFocusableElements(visibleRef);
|
|
2112
|
-
var elementIndex = offscreenFocusable.findIndex(function (element) { return element === target; });
|
|
2113
|
-
if (elementIndex === -1 || !visibleFocusable[elementIndex]) {
|
|
2114
|
-
return;
|
|
2115
|
-
}
|
|
2116
|
-
visibleFocusable[elementIndex].classList.remove('Pointout--focus-active');
|
|
2117
|
-
};
|
|
2118
|
-
_this.positionRelativeToTarget = function () {
|
|
2119
|
-
var _a = _this.props, target = _a.target, portal = _a.portal, arrowPosition = _a.arrowPosition, position = _a.position;
|
|
2120
|
-
if (!target) {
|
|
2121
|
-
return;
|
|
2122
|
-
}
|
|
2123
|
-
var targetNode = (target === null || target === void 0 ? void 0 : target.current) ||
|
|
2124
|
-
target;
|
|
2125
|
-
var portalNode = (portal === null || portal === void 0 ? void 0 : portal.current) ||
|
|
2126
|
-
portal;
|
|
2127
|
-
// eslint-disable-next-line prefer-const
|
|
2128
|
-
var _b = targetNode.getBoundingClientRect(), top = _b.top, left = _b.left, width = _b.width, height = _b.height;
|
|
2129
|
-
if (portalNode && portalNode !== document.body) {
|
|
2130
|
-
// If the portal is not placed on document.body
|
|
2131
|
-
// position the FTPO relative to the portal
|
|
2132
|
-
var rect = portalNode.getBoundingClientRect();
|
|
2133
|
-
top -= rect.top - portalNode.scrollTop;
|
|
2134
|
-
left -= rect.left - portalNode.scrollLeft;
|
|
2135
|
-
}
|
|
2136
|
-
var _c = tslib.__read(arrowPosition.split('-'), 1), arrowBoxSide = _c[0];
|
|
2137
|
-
var style;
|
|
2138
|
-
switch (arrowBoxSide) {
|
|
2139
|
-
case 'right':
|
|
2140
|
-
style = {
|
|
2141
|
-
left: "".concat(left, "px"),
|
|
2142
|
-
top: "".concat(position === 'center'
|
|
2143
|
-
? top + height / 2
|
|
2144
|
-
: position === 'start'
|
|
2145
|
-
? top
|
|
2146
|
-
: top + height, "px")
|
|
2147
|
-
};
|
|
2148
|
-
break;
|
|
2149
|
-
case 'bottom':
|
|
2150
|
-
style = {
|
|
2151
|
-
top: "".concat(top, "px"),
|
|
2152
|
-
left: "".concat(position === 'center'
|
|
2153
|
-
? left + width / 2
|
|
2154
|
-
: position === 'start'
|
|
2155
|
-
? left
|
|
2156
|
-
: left + width, "px")
|
|
2157
|
-
};
|
|
2158
|
-
break;
|
|
2159
|
-
case 'left':
|
|
2160
|
-
style = {
|
|
2161
|
-
left: "".concat(left + width, "px"),
|
|
2162
|
-
top: "".concat(position === 'center'
|
|
2163
|
-
? top + height / 2
|
|
2164
|
-
: position === 'start'
|
|
2165
|
-
? top
|
|
2166
|
-
: top + height, "px")
|
|
2167
|
-
};
|
|
2168
|
-
break;
|
|
2169
|
-
case 'top':
|
|
2170
|
-
default:
|
|
2171
|
-
style = {
|
|
2172
|
-
top: "".concat(top + height, "px"),
|
|
2173
|
-
left: "".concat(position === 'center'
|
|
2174
|
-
? left + width / 2
|
|
2175
|
-
: position === 'start'
|
|
2176
|
-
? left
|
|
2177
|
-
: left + width, "px")
|
|
2178
|
-
};
|
|
2179
|
-
break;
|
|
2180
|
-
}
|
|
2181
|
-
_this.setState({ style: style });
|
|
2182
|
-
};
|
|
2183
|
-
_this.state = { show: true, style: {} };
|
|
2184
|
-
_this.onCloseClick = _this.onCloseClick.bind(_this);
|
|
2185
|
-
return _this;
|
|
2186
|
-
}
|
|
2187
|
-
Pointout.prototype.getFocusableElements = function (root) {
|
|
2188
|
-
return root
|
|
2189
|
-
? Array.from(root.querySelectorAll("".concat(focusable__default["default"], ", [data-focusable]")))
|
|
2190
|
-
: [];
|
|
2191
|
-
};
|
|
2192
|
-
Pointout.prototype.componentDidMount = function () {
|
|
2193
|
-
var _this = this;
|
|
2194
|
-
var _a = this, positionRelativeToTarget = _a.positionRelativeToTarget, attachOffscreenListeners = _a.attachOffscreenListeners;
|
|
2195
|
-
positionRelativeToTarget();
|
|
2196
|
-
this.setState({ headingId: randomId() });
|
|
2197
|
-
// debounce resize event to rAF
|
|
2198
|
-
this.resizeDebounce = function () {
|
|
2199
|
-
if (_this.resizeDebounceId) {
|
|
2200
|
-
cancelAnimationFrame(_this.resizeDebounceId);
|
|
2201
|
-
}
|
|
2202
|
-
_this.resizeDebounceId = requestAnimationFrame(function () {
|
|
2203
|
-
_this.positionRelativeToTarget();
|
|
2204
|
-
});
|
|
2205
|
-
};
|
|
2206
|
-
window.addEventListener('resize', this.resizeDebounce);
|
|
2207
|
-
attachOffscreenListeners();
|
|
2208
|
-
// If the component mounts before fonts have finished loading, ensure that we
|
|
2209
|
-
// reposition the element when all fonts are ready
|
|
2210
|
-
if (document && document.fonts && document.fonts.ready) {
|
|
2211
|
-
// experiemental apis aren't in typescript's lib file :(
|
|
2212
|
-
// https://github.com/Microsoft/TypeScript/issues/30984
|
|
2213
|
-
document.fonts.ready.then(function () { return _this.positionRelativeToTarget(); });
|
|
2214
|
-
}
|
|
2215
|
-
};
|
|
2216
|
-
Pointout.prototype.forceUpdate = function () {
|
|
2217
|
-
var _this = this;
|
|
2218
|
-
_super.prototype.forceUpdate.call(this);
|
|
2219
|
-
requestAnimationFrame(function () { return _this.positionRelativeToTarget(); });
|
|
2220
|
-
};
|
|
2221
|
-
Pointout.prototype.componentWillUnmount = function () {
|
|
2222
|
-
var _a = this, resizeDebounce = _a.resizeDebounce, offscreenRef = _a.offscreenRef, offscreenContentRef = _a.offscreenContentRef, handleOffscreenFocusIn = _a.handleOffscreenFocusIn, handleOffscreenFocusOut = _a.handleOffscreenFocusOut, handleOffscreenContentFocusIn = _a.handleOffscreenContentFocusIn, handleOffscreenContentFocusOut = _a.handleOffscreenContentFocusOut;
|
|
2223
|
-
if (resizeDebounce) {
|
|
2224
|
-
window.removeEventListener('resize', resizeDebounce);
|
|
2225
|
-
}
|
|
2226
|
-
if (offscreenRef) {
|
|
2227
|
-
offscreenRef.removeEventListener('focusin', handleOffscreenFocusIn);
|
|
2228
|
-
offscreenRef.removeEventListener('focusout', handleOffscreenFocusOut);
|
|
2229
|
-
}
|
|
2230
|
-
if (offscreenContentRef) {
|
|
2231
|
-
offscreenContentRef.removeEventListener('focusin', handleOffscreenContentFocusIn);
|
|
2232
|
-
offscreenContentRef.removeEventListener('focusout', handleOffscreenContentFocusOut);
|
|
2233
|
-
}
|
|
2234
|
-
};
|
|
2235
|
-
Pointout.prototype.componentDidUpdate = function (nextProps) {
|
|
2236
|
-
var _a = this, props = _a.props, attachOffscreenListeners = _a.attachOffscreenListeners, positionRelativeToTarget = _a.positionRelativeToTarget;
|
|
2237
|
-
if (props.arrowPosition !== nextProps.arrowPosition ||
|
|
2238
|
-
props.portal !== nextProps.portal ||
|
|
2239
|
-
props.target !== nextProps.target ||
|
|
2240
|
-
props.disableOffscreenPointout !== nextProps.disableOffscreenPointout) {
|
|
2241
|
-
attachOffscreenListeners();
|
|
2242
|
-
positionRelativeToTarget();
|
|
2243
|
-
}
|
|
2244
|
-
};
|
|
2245
|
-
Pointout.prototype.render = function () {
|
|
2246
|
-
var _a, _b;
|
|
2247
|
-
var _this = this;
|
|
2248
|
-
var _c;
|
|
2249
|
-
var _d = this.state, show = _d.show, style = _d.style, offscreenContentFocus = _d.offscreenContentFocus, headingId = _d.headingId;
|
|
2250
|
-
var _e = this.props, heading = _e.heading, ftpoRef = _e.ftpoRef, children = _e.children, noArrow = _e.noArrow, dismissText = _e.dismissText, previousText = _e.previousText, nextText = _e.nextText, showNext = _e.showNext, showPrevious = _e.showPrevious, arrowPosition = _e.arrowPosition, position = _e.position, className = _e.className, target = _e.target, disableOffscreenPointout = _e.disableOffscreenPointout, previousButtonProps = _e.previousButtonProps, nextButtonProps = _e.nextButtonProps, closeButtonProps = _e.closeButtonProps;
|
|
2251
|
-
if (!show || !isBrowser()) {
|
|
2252
|
-
return null;
|
|
2253
|
-
}
|
|
2254
|
-
var portal = this.props.portal || document.body;
|
|
2255
|
-
var FTPO = (React__default["default"].createElement("div", { className: classNames__default["default"](className, 'Pointout', (_a = {
|
|
2256
|
-
'Pointout--no-arrow': noArrow,
|
|
2257
|
-
'Pointout--auto': !!target
|
|
2258
|
-
},
|
|
2259
|
-
_a["Pointout__arrow--".concat(arrowPosition)] = !!arrowPosition && !noArrow,
|
|
2260
|
-
_a["Pointout--".concat(position)] = !!target,
|
|
2261
|
-
_a)), style: style, role: target ? undefined : 'region', "aria-labelledby": heading ? headingId : undefined, "aria-hidden": !!target && !disableOffscreenPointout, ref: function (el) { return (_this.visibleRef = el); } },
|
|
2262
|
-
noArrow ? null : (React__default["default"].createElement("div", { className: classNames__default["default"]('Pointout__arrow', (_b = {},
|
|
2263
|
-
_b["Pointout__arrow--".concat(arrowPosition)] = !!arrowPosition && !noArrow,
|
|
2264
|
-
_b)) },
|
|
2265
|
-
React__default["default"].createElement("div", { className: "Pointout__arrow-pointer" }))),
|
|
2266
|
-
React__default["default"].createElement("div", { className: "Pointout__box" },
|
|
2267
|
-
React__default["default"].createElement("button", tslib.__assign({ className: "Pointout__dismiss", type: "button", "aria-label": dismissText, onClick: this.onCloseClick, tabIndex: !!target && !disableOffscreenPointout ? -1 : 0 }, closeButtonProps),
|
|
2268
|
-
React__default["default"].createElement(Icon, { type: "close", "aria-hidden": "true" })),
|
|
2269
|
-
React__default["default"].createElement("div", { className: classNames__default["default"]('Pointout__content', {
|
|
2270
|
-
'Pointout__content--focus-active': offscreenContentFocus
|
|
2271
|
-
}), tabIndex: !target ? -1 : undefined, ref: ftpoRef },
|
|
2272
|
-
heading &&
|
|
2273
|
-
React__default["default"].cloneElement(heading, {
|
|
2274
|
-
id: target ? null : headingId,
|
|
2275
|
-
className: classNames__default["default"]('Pointout__heading', (_c = heading.props) === null || _c === void 0 ? void 0 : _c.className)
|
|
2276
|
-
}),
|
|
2277
|
-
target ? recursivelyRemoveIds(children) : children),
|
|
2278
|
-
showPrevious && (React__default["default"].createElement("button", tslib.__assign({ className: "Pointout__previous", type: "button", "aria-label": previousText, tabIndex: !!target && !disableOffscreenPointout ? -1 : 0 }, previousButtonProps),
|
|
2279
|
-
React__default["default"].createElement(Icon, { type: "arrow-left", "aria-hidden": "true" }))),
|
|
2280
|
-
showNext && (React__default["default"].createElement("button", tslib.__assign({ className: "Pointout__next", type: "button", "aria-label": nextText, tabIndex: !!target && !disableOffscreenPointout ? -1 : 0 }, nextButtonProps),
|
|
2281
|
-
React__default["default"].createElement(Icon, { type: "arrow-right", "aria-hidden": "true" }))))));
|
|
2282
|
-
if (target && portal && !disableOffscreenPointout) {
|
|
2283
|
-
return (React__default["default"].createElement(React__default["default"].Fragment, null,
|
|
2284
|
-
React__default["default"].createElement("div", { className: "Offscreen", role: "region", "aria-labelledby": heading ? headingId : undefined, ref: function (el) { return (_this.offscreenRef = el); } },
|
|
2285
|
-
React__default["default"].createElement("button", tslib.__assign({ type: "button", "aria-label": dismissText, onClick: this.onCloseClick }, closeButtonProps)),
|
|
2286
|
-
React__default["default"].createElement("div", { className: "Pointout__content", tabIndex: -1, ref: function (el) { return (_this.offscreenContentRef = el); } },
|
|
2287
|
-
heading &&
|
|
2288
|
-
React__default["default"].cloneElement(heading, {
|
|
2289
|
-
id: headingId
|
|
2290
|
-
}),
|
|
2291
|
-
children),
|
|
2292
|
-
showPrevious && (React__default["default"].createElement("button", tslib.__assign({ type: "button", "aria-label": previousText }, previousButtonProps))),
|
|
2293
|
-
showNext && (React__default["default"].createElement("button", tslib.__assign({ type: "button", "aria-label": nextText }, nextButtonProps)))),
|
|
2294
|
-
reactDom.createPortal(FTPO, portal)));
|
|
2295
|
-
}
|
|
2296
|
-
return target && portal ? reactDom.createPortal(FTPO, portal) : FTPO;
|
|
2297
|
-
};
|
|
2298
|
-
Pointout.prototype.onCloseClick = function () {
|
|
2299
|
-
var _a;
|
|
2300
|
-
this.setState({ show: false });
|
|
2301
|
-
(_a = this.props) === null || _a === void 0 ? void 0 : _a.onClose();
|
|
2302
|
-
};
|
|
2303
|
-
Pointout.defaultProps = {
|
|
2304
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2305
|
-
ftpoRef: function () { },
|
|
2306
|
-
noArrow: false,
|
|
2307
|
-
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2308
|
-
onClose: function () { },
|
|
2309
|
-
dismissText: 'dismiss',
|
|
2310
|
-
previousText: 'previous',
|
|
2311
|
-
nextText: 'next',
|
|
2312
|
-
arrowPosition: 'top-left',
|
|
2313
|
-
position: 'center'
|
|
2314
|
-
};
|
|
2315
|
-
Pointout.propTypes = {
|
|
2316
|
-
heading: PropTypes__default["default"].node,
|
|
2317
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
2318
|
-
ftpRef: PropTypes__default["default"].oneOfType([
|
|
2319
|
-
PropTypes__default["default"].func,
|
|
2320
|
-
PropTypes__default["default"].shape({ current: PropTypes__default["default"].any })
|
|
2321
|
-
]),
|
|
2322
|
-
noArrow: function (props, propName) {
|
|
2323
|
-
if (props[propName] === true && typeof props['target'] !== 'undefined') {
|
|
2324
|
-
return new Error('A "target" prop with "noArrow=true" is not currently supported.');
|
|
2325
|
-
}
|
|
2326
|
-
},
|
|
2327
|
-
arrowPosition: PropTypes__default["default"].string,
|
|
2328
|
-
onClose: PropTypes__default["default"].func,
|
|
2329
|
-
dismissText: PropTypes__default["default"].string,
|
|
2330
|
-
className: PropTypes__default["default"].string,
|
|
2331
|
-
target: PropTypes__default["default"].oneOfType([
|
|
2332
|
-
PropTypes__default["default"].func,
|
|
2333
|
-
PropTypes__default["default"].shape({ current: PropTypes__default["default"].any })
|
|
2334
|
-
]),
|
|
2335
|
-
disableOffscreenPointout: PropTypes__default["default"].bool,
|
|
2336
|
-
portal: PropTypes__default["default"].any,
|
|
2337
|
-
previousButtonProps: PropTypes__default["default"].any,
|
|
2338
|
-
nextButtonProps: PropTypes__default["default"].any,
|
|
2339
|
-
closeButtonProps: PropTypes__default["default"].any
|
|
2340
|
-
};
|
|
2341
|
-
return Pointout;
|
|
2342
|
-
}(React__default["default"].Component));
|
|
2343
|
-
|
|
2344
1790
|
/**
|
|
2345
1791
|
* A querySelectorAll that returns a normal array rather than live node list.
|
|
2346
1792
|
*
|
|
@@ -2514,27 +1960,6 @@ var Toast = /** @class */ (function (_super) {
|
|
|
2514
1960
|
show: false,
|
|
2515
1961
|
dismissible: true
|
|
2516
1962
|
};
|
|
2517
|
-
Toast.propTypes = {
|
|
2518
|
-
// the ui to be added as the message of the toast
|
|
2519
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
2520
|
-
// "confirmation", "caution", or "action-needed"
|
|
2521
|
-
type: PropTypes__default["default"].string.isRequired,
|
|
2522
|
-
// function to be exectued when toast is dismissed
|
|
2523
|
-
onDismiss: PropTypes__default["default"].func,
|
|
2524
|
-
// text to be added as the aria-label of the "x" dismiss button (default: "Dismiss")
|
|
2525
|
-
dismissText: PropTypes__default["default"].string,
|
|
2526
|
-
// an optional ref function to get a handle on the toast element
|
|
2527
|
-
toastRef: PropTypes__default["default"].oneOfType([
|
|
2528
|
-
PropTypes__default["default"].func,
|
|
2529
|
-
PropTypes__default["default"].shape({ current: PropTypes__default["default"].any })
|
|
2530
|
-
]),
|
|
2531
|
-
// whether or not to focus the toast
|
|
2532
|
-
focus: PropTypes__default["default"].bool,
|
|
2533
|
-
// whether or not to show the toast
|
|
2534
|
-
show: PropTypes__default["default"].bool,
|
|
2535
|
-
// whether or not the toast is dismissible
|
|
2536
|
-
dismissible: PropTypes__default["default"].bool
|
|
2537
|
-
};
|
|
2538
1963
|
Toast.displayName = 'Toast';
|
|
2539
1964
|
return Toast;
|
|
2540
1965
|
}(React__default["default"].Component));
|
|
@@ -2548,20 +1973,10 @@ var Link = function (_a) {
|
|
|
2548
1973
|
'Button--thin': thin
|
|
2549
1974
|
}) }, other), children));
|
|
2550
1975
|
};
|
|
2551
|
-
Link.propTypes = {
|
|
2552
|
-
children: PropTypes__default["default"].node,
|
|
2553
|
-
className: PropTypes__default["default"].string,
|
|
2554
|
-
variant: PropTypes__default["default"].string,
|
|
2555
|
-
thin: PropTypes__default["default"].bool,
|
|
2556
|
-
linkRef: PropTypes__default["default"].oneOfType([
|
|
2557
|
-
PropTypes__default["default"].func,
|
|
2558
|
-
PropTypes__default["default"].shape({ current: PropTypes__default["default"].any })
|
|
2559
|
-
])
|
|
2560
|
-
};
|
|
2561
1976
|
Link.displayName = 'Link';
|
|
2562
1977
|
|
|
2563
1978
|
var Loader = React__default["default"].forwardRef(function (_a, ref) {
|
|
2564
|
-
var className = _a.className,
|
|
1979
|
+
var className = _a.className, label = _a.label, props = tslib.__rest(_a, ["className", "label"]);
|
|
2565
1980
|
if (label === null || label === void 0 ? void 0 : label.length) {
|
|
2566
1981
|
props['role'] = 'alert';
|
|
2567
1982
|
props.children = React__default["default"].createElement(Offscreen, null, label);
|
|
@@ -2569,13 +1984,16 @@ var Loader = React__default["default"].forwardRef(function (_a, ref) {
|
|
|
2569
1984
|
else {
|
|
2570
1985
|
props['aria-hidden'] = true;
|
|
2571
1986
|
}
|
|
2572
|
-
return (React__default["default"].createElement("div", tslib.__assign({ ref: ref, className: classNames__default["default"]('Loader', className
|
|
1987
|
+
return (React__default["default"].createElement("div", tslib.__assign({ ref: ref, className: classNames__default["default"]('Loader', className) }, props)));
|
|
2573
1988
|
});
|
|
2574
|
-
Loader.propTypes = {
|
|
2575
|
-
className: PropTypes__default["default"].string
|
|
2576
|
-
};
|
|
2577
1989
|
Loader.displayName = 'Loader';
|
|
2578
1990
|
|
|
1991
|
+
var i = 0;
|
|
1992
|
+
var randomId = function () {
|
|
1993
|
+
var num = Math.floor(Math.random() * 10000) + 1;
|
|
1994
|
+
return "x_".concat(i++, "_").concat(num);
|
|
1995
|
+
};
|
|
1996
|
+
|
|
2579
1997
|
/**
|
|
2580
1998
|
* Adds an id to a token list attribute if its not already present in the list
|
|
2581
1999
|
*/
|
|
@@ -2709,65 +2127,53 @@ var RadioGroup = React.forwardRef(function (_a, ref) {
|
|
|
2709
2127
|
inputs.current = [];
|
|
2710
2128
|
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"](className, { 'Radio--inline': inline }), role: "radiogroup", ref: ref }, other), radioButtons));
|
|
2711
2129
|
});
|
|
2712
|
-
RadioGroup.propTypes = {
|
|
2713
|
-
name: PropTypes__default["default"].string,
|
|
2714
|
-
radios: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
|
|
2715
|
-
value: PropTypes__default["default"].string.isRequired,
|
|
2716
|
-
id: PropTypes__default["default"].string.isRequired,
|
|
2717
|
-
label: PropTypes__default["default"].string.isRequired,
|
|
2718
|
-
labelDescription: PropTypes__default["default"].string
|
|
2719
|
-
}).isRequired).isRequired,
|
|
2720
|
-
hasLabel: function (props, _propName, componentName) {
|
|
2721
|
-
if (!props['aria-label'] && !props['aria-labelledby']) {
|
|
2722
|
-
return new Error("".concat(componentName, " must have an \"aria-label\" or \"aria-labelledby\" prop"));
|
|
2723
|
-
}
|
|
2724
|
-
return null;
|
|
2725
|
-
},
|
|
2726
|
-
className: PropTypes__default["default"].string,
|
|
2727
|
-
defaultValue: PropTypes__default["default"].string,
|
|
2728
|
-
onChange: PropTypes__default["default"].func
|
|
2729
|
-
};
|
|
2730
2130
|
RadioGroup.displayName = 'RadioGroup';
|
|
2731
2131
|
|
|
2732
|
-
var
|
|
2733
|
-
var
|
|
2734
|
-
|
|
2735
|
-
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2743
|
-
}
|
|
2744
|
-
|
|
2745
|
-
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2132
|
+
var Panel = React.forwardRef(function (_a, ref) {
|
|
2133
|
+
var _b;
|
|
2134
|
+
var children = _a.children, collapsed = _a.collapsed, className = _a.className, heading = _a.heading, _c = _a.padding, padding = _c === void 0 ? true : _c, other = tslib.__rest(_a, ["children", "collapsed", "className", "heading", "padding"]);
|
|
2135
|
+
var headingId = !heading
|
|
2136
|
+
? undefined
|
|
2137
|
+
: typeof heading === 'object' && 'id' in heading
|
|
2138
|
+
? heading.id
|
|
2139
|
+
: randomId();
|
|
2140
|
+
var Heading = function () {
|
|
2141
|
+
if (!headingId) {
|
|
2142
|
+
return null;
|
|
2143
|
+
}
|
|
2144
|
+
var HeadingComponent = "h".concat(heading &&
|
|
2145
|
+
typeof heading === 'object' &&
|
|
2146
|
+
'level' in heading &&
|
|
2147
|
+
!!heading.level
|
|
2148
|
+
? heading.level
|
|
2149
|
+
: 2);
|
|
2150
|
+
return (React__default["default"].createElement(HeadingComponent, { id: headingId, className: "Panel__Heading" }, heading && typeof heading === 'object' && 'text' in heading
|
|
2151
|
+
? heading.text
|
|
2152
|
+
: heading));
|
|
2153
|
+
};
|
|
2154
|
+
return (React__default["default"].createElement("section", tslib.__assign({ "aria-labelledby": headingId, className: classNames__default["default"]('Panel', className, (_b = {},
|
|
2155
|
+
_b['Panel--collapsed'] = collapsed,
|
|
2156
|
+
_b['Panel--no-padding'] = !padding,
|
|
2157
|
+
_b)), ref: ref }, other),
|
|
2158
|
+
React__default["default"].createElement(Heading, null),
|
|
2159
|
+
children));
|
|
2160
|
+
});
|
|
2161
|
+
Panel.displayName = 'Panel';
|
|
2753
2162
|
|
|
2754
|
-
var
|
|
2755
|
-
var
|
|
2756
|
-
|
|
2757
|
-
}
|
|
2758
|
-
|
|
2759
|
-
|
|
2760
|
-
|
|
2761
|
-
|
|
2163
|
+
var PanelContent = React.forwardRef(function (_a, ref) {
|
|
2164
|
+
var _b;
|
|
2165
|
+
var children = _a.children, className = _a.className, _c = _a.padding, padding = _c === void 0 ? true : _c, otherProps = tslib.__rest(_a, ["children", "className", "padding"]);
|
|
2166
|
+
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Panel__Content', className, (_b = {},
|
|
2167
|
+
_b['Panel__Content--no-padding'] = !padding,
|
|
2168
|
+
_b)), ref: ref }, otherProps), children));
|
|
2169
|
+
});
|
|
2170
|
+
PanelContent.displayName = 'PanelContent';
|
|
2762
2171
|
|
|
2763
|
-
var
|
|
2764
|
-
var className = _a.className,
|
|
2765
|
-
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('
|
|
2766
|
-
};
|
|
2767
|
-
|
|
2768
|
-
CardFooter.propTypes = {
|
|
2769
|
-
className: PropTypes__default["default"].string
|
|
2770
|
-
};
|
|
2172
|
+
var PanelHeader = React.forwardRef(function (_a, ref) {
|
|
2173
|
+
var children = _a.children, className = _a.className, otherProps = tslib.__rest(_a, ["children", "className"]);
|
|
2174
|
+
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Panel__Header', className), ref: ref }, otherProps), children));
|
|
2175
|
+
});
|
|
2176
|
+
PanelHeader.displayName = 'PanelHeader';
|
|
2771
2177
|
|
|
2772
2178
|
var RadioCardGroup = function (_a) {
|
|
2773
2179
|
var name = _a.name, radios = _a.radios, defaultValue = _a.defaultValue, value = _a.value,
|
|
@@ -2801,7 +2207,7 @@ var RadioCardGroup = function (_a) {
|
|
|
2801
2207
|
var isChecked = currentValue === radioValue;
|
|
2802
2208
|
var isFocused = focusIndex === index;
|
|
2803
2209
|
return (React__default["default"].createElement("div", { className: classNames__default["default"]('RadioCard'), key: index },
|
|
2804
|
-
React__default["default"].createElement(
|
|
2210
|
+
React__default["default"].createElement(Panel, { className: classNames__default["default"]('RadioCardGroup__Card RadioCard__overlay', {
|
|
2805
2211
|
'RadioCard__overlay--focused': isFocused,
|
|
2806
2212
|
'RadioCard__overlay--checked': isChecked,
|
|
2807
2213
|
'RadioCard__overlay--disabled': disabled
|
|
@@ -2816,7 +2222,7 @@ var RadioCardGroup = function (_a) {
|
|
|
2816
2222
|
handleChange(radioValue);
|
|
2817
2223
|
onChange(radio, (_a = inputs.current) === null || _a === void 0 ? void 0 : _a[index]);
|
|
2818
2224
|
}, disabled: disabled, checked: isChecked }, other)),
|
|
2819
|
-
React__default["default"].createElement(
|
|
2225
|
+
React__default["default"].createElement(PanelContent, null,
|
|
2820
2226
|
React__default["default"].createElement("div", { className: classNames__default["default"]('RadioCardGroup__Checked') }, isChecked && (React__default["default"].createElement(Icon, { className: classNames__default["default"]('RadioCardGroup__Icon'), type: cardIcon }))),
|
|
2821
2227
|
React__default["default"].createElement("div", { className: classNames__default["default"]('RadioCardGroup__Base') },
|
|
2822
2228
|
React__default["default"].createElement("div", { className: classNames__default["default"]('RadioCardGroup__Image') }, cardImg),
|
|
@@ -2828,24 +2234,6 @@ var RadioCardGroup = function (_a) {
|
|
|
2828
2234
|
inputs.current = [];
|
|
2829
2235
|
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('RadioCardGroup'), role: "radiogroup" }, other), radioButtons));
|
|
2830
2236
|
};
|
|
2831
|
-
RadioCardGroup.propTypes = {
|
|
2832
|
-
name: PropTypes__default["default"].string,
|
|
2833
|
-
radios: PropTypes__default["default"].arrayOf(PropTypes__default["default"].shape({
|
|
2834
|
-
value: PropTypes__default["default"].string.isRequired,
|
|
2835
|
-
id: PropTypes__default["default"].string.isRequired,
|
|
2836
|
-
label: PropTypes__default["default"].string.isRequired,
|
|
2837
|
-
cardImg: PropTypes__default["default"].element.isRequired,
|
|
2838
|
-
cardIcon: PropTypes__default["default"].string.isRequired
|
|
2839
|
-
})).isRequired,
|
|
2840
|
-
hasLabel: function (props, propName, componentName) {
|
|
2841
|
-
if (!props['aria-label'] && !props['aria-labelledby']) {
|
|
2842
|
-
return new Error("".concat(componentName, " must have an \"aria-label\" or \"aria-labelledby\" prop"));
|
|
2843
|
-
}
|
|
2844
|
-
},
|
|
2845
|
-
className: PropTypes__default["default"].string,
|
|
2846
|
-
defaultValue: PropTypes__default["default"].string,
|
|
2847
|
-
onChange: PropTypes__default["default"].func
|
|
2848
|
-
};
|
|
2849
2237
|
RadioCardGroup.displayName = 'RadioCardGroup';
|
|
2850
2238
|
|
|
2851
2239
|
var Checkbox = React.forwardRef(function (_a, ref) {
|
|
@@ -3001,22 +2389,6 @@ var TextField = /** @class */ (function (_super) {
|
|
|
3001
2389
|
requiredText: 'Required',
|
|
3002
2390
|
multiline: false
|
|
3003
2391
|
};
|
|
3004
|
-
TextField.propTypes = {
|
|
3005
|
-
label: PropTypes__default["default"].node.isRequired,
|
|
3006
|
-
id: PropTypes__default["default"].string,
|
|
3007
|
-
error: PropTypes__default["default"].node,
|
|
3008
|
-
defaultValue: PropTypes__default["default"].string,
|
|
3009
|
-
value: PropTypes__default["default"].string,
|
|
3010
|
-
onChange: PropTypes__default["default"].func,
|
|
3011
|
-
fieldRef: PropTypes__default["default"].oneOfType([
|
|
3012
|
-
PropTypes__default["default"].func,
|
|
3013
|
-
PropTypes__default["default"].shape({ current: PropTypes__default["default"].any })
|
|
3014
|
-
]),
|
|
3015
|
-
required: PropTypes__default["default"].bool,
|
|
3016
|
-
requiredText: PropTypes__default["default"].string,
|
|
3017
|
-
multiline: PropTypes__default["default"].bool,
|
|
3018
|
-
'aria-describedby': PropTypes__default["default"].string
|
|
3019
|
-
};
|
|
3020
2392
|
return TextField;
|
|
3021
2393
|
}(React__default["default"].Component));
|
|
3022
2394
|
|
|
@@ -3058,13 +2430,6 @@ var Code = function (_a) {
|
|
|
3058
2430
|
}), tabIndex: scrollableRegion ? 0 : undefined }), children));
|
|
3059
2431
|
};
|
|
3060
2432
|
Code.displayName = 'Code';
|
|
3061
|
-
Code.propTypes = {
|
|
3062
|
-
children: PropTypes__default["default"].string.isRequired,
|
|
3063
|
-
language: PropTypes__default["default"].oneOf(['javascript', 'css', 'html', 'yaml']),
|
|
3064
|
-
className: PropTypes__default["default"].string,
|
|
3065
|
-
tabIndex: PropTypes__default["default"].number,
|
|
3066
|
-
scrollable: PropTypes__default["default"].bool
|
|
3067
|
-
};
|
|
3068
2433
|
|
|
3069
2434
|
function AxeLoader() {
|
|
3070
2435
|
return (React__default["default"].createElement("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", x: "0", y: "0", viewBox: "0 0 800 800" },
|
|
@@ -3095,7 +2460,7 @@ function useSharedRef(ref) {
|
|
|
3095
2460
|
}
|
|
3096
2461
|
|
|
3097
2462
|
var LoaderOverlay = React.forwardRef(function (_a, ref) {
|
|
3098
|
-
var className = _a.className,
|
|
2463
|
+
var className = _a.className, label = _a.label, children = _a.children, focusOnInitialRender = _a.focusOnInitialRender, _b = _a.focusTrap, focusTrap = _b === void 0 ? false : _b, other = tslib.__rest(_a, ["className", "label", "children", "focusOnInitialRender", "focusTrap"]);
|
|
3099
2464
|
var overlayRef = useSharedRef(ref);
|
|
3100
2465
|
React.useEffect(function () {
|
|
3101
2466
|
var isolator = overlayRef.current
|
|
@@ -3126,33 +2491,19 @@ var LoaderOverlay = React.forwardRef(function (_a, ref) {
|
|
|
3126
2491
|
}
|
|
3127
2492
|
: {};
|
|
3128
2493
|
return (React__default["default"].createElement(Wrapper, tslib.__assign({}, wrapperProps),
|
|
3129
|
-
React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Loader__overlay', className,
|
|
3130
|
-
? 'Loader__overlay--large'
|
|
3131
|
-
: variant === 'small'
|
|
3132
|
-
? 'Loader__overlay--small'
|
|
3133
|
-
: ''), ref: overlayRef, tabIndex: -1 }, other),
|
|
2494
|
+
React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Loader__overlay', className), ref: overlayRef, tabIndex: -1 }, other),
|
|
3134
2495
|
React__default["default"].createElement("div", { className: "Loader__overlay__loader" },
|
|
3135
|
-
React__default["default"].createElement(Loader,
|
|
2496
|
+
React__default["default"].createElement(Loader, null),
|
|
3136
2497
|
React__default["default"].createElement(AxeLoader, null)),
|
|
3137
2498
|
label ? (React__default["default"].createElement("span", { className: "Loader__overlay__label" }, label)) : null,
|
|
3138
2499
|
children)));
|
|
3139
2500
|
});
|
|
3140
|
-
LoaderOverlay.propTypes = {
|
|
3141
|
-
className: PropTypes__default["default"].string,
|
|
3142
|
-
variant: PropTypes__default["default"].oneOf(['large', 'small']),
|
|
3143
|
-
label: PropTypes__default["default"].string,
|
|
3144
|
-
focusOnInitialRender: PropTypes__default["default"].bool,
|
|
3145
|
-
children: PropTypes__default["default"].node
|
|
3146
|
-
};
|
|
3147
2501
|
LoaderOverlay.displayName = 'LoaderOverlay';
|
|
3148
2502
|
|
|
3149
2503
|
var Line = function (_a) {
|
|
3150
2504
|
var className = _a.className, other = tslib.__rest(_a, ["className"]);
|
|
3151
2505
|
return (React__default["default"].createElement("hr", tslib.__assign({ className: classNames__default["default"]('Line', className) }, other)));
|
|
3152
2506
|
};
|
|
3153
|
-
Line.propTypes = {
|
|
3154
|
-
className: PropTypes__default["default"].string
|
|
3155
|
-
};
|
|
3156
2507
|
Line.displayName = 'Line';
|
|
3157
2508
|
|
|
3158
2509
|
var TagLabel = function (_a) {
|
|
@@ -3160,19 +2511,11 @@ var TagLabel = function (_a) {
|
|
|
3160
2511
|
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Tag__label', className) }, other), children));
|
|
3161
2512
|
};
|
|
3162
2513
|
TagLabel.displayName = 'TagLabel';
|
|
3163
|
-
TagLabel.propTypes = {
|
|
3164
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
3165
|
-
className: PropTypes__default["default"].string
|
|
3166
|
-
};
|
|
3167
2514
|
var Tag = function (_a) {
|
|
3168
2515
|
var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
|
|
3169
2516
|
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Tag', className) }, other), children));
|
|
3170
2517
|
};
|
|
3171
2518
|
Tag.displayName = 'Tag';
|
|
3172
|
-
Tag.propTypes = {
|
|
3173
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
3174
|
-
className: PropTypes__default["default"].string
|
|
3175
|
-
};
|
|
3176
2519
|
|
|
3177
2520
|
var TagButton = React__default["default"].forwardRef(function (_a, ref) {
|
|
3178
2521
|
var label = _a.label, value = _a.value, icon = _a.icon, className = _a.className, rest = tslib.__rest(_a, ["label", "value", "icon", "className"]);
|
|
@@ -3188,41 +2531,24 @@ var Table = function (_a) {
|
|
|
3188
2531
|
return (React__default["default"].createElement("table", tslib.__assign({ className: classNames__default["default"]('Table', variant === 'border' && 'Table--border', className) }, other), children));
|
|
3189
2532
|
};
|
|
3190
2533
|
Table.displayName = 'Table';
|
|
3191
|
-
Table.propTypes = {
|
|
3192
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
3193
|
-
className: PropTypes__default["default"].string,
|
|
3194
|
-
variant: PropTypes__default["default"].string
|
|
3195
|
-
};
|
|
3196
2534
|
|
|
3197
2535
|
var TableBody = function (_a) {
|
|
3198
2536
|
var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
|
|
3199
2537
|
return (React__default["default"].createElement("tbody", tslib.__assign({ className: classNames__default["default"]('TableBody', className) }, other), children));
|
|
3200
2538
|
};
|
|
3201
2539
|
TableBody.displayName = 'TableBody';
|
|
3202
|
-
TableBody.propTypes = {
|
|
3203
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
3204
|
-
className: PropTypes__default["default"].string
|
|
3205
|
-
};
|
|
3206
2540
|
|
|
3207
2541
|
var TableCell = function (_a) {
|
|
3208
2542
|
var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
|
|
3209
2543
|
return (React__default["default"].createElement("td", tslib.__assign({ className: classNames__default["default"]('TableCell', className) }, other), children));
|
|
3210
2544
|
};
|
|
3211
2545
|
TableCell.displayName = 'TableCell';
|
|
3212
|
-
TableCell.propTypes = {
|
|
3213
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
3214
|
-
className: PropTypes__default["default"].string
|
|
3215
|
-
};
|
|
3216
2546
|
|
|
3217
2547
|
var TableHead = function (_a) {
|
|
3218
2548
|
var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
|
|
3219
2549
|
return (React__default["default"].createElement("thead", tslib.__assign({ className: classNames__default["default"]('TableHead', className) }, other), children));
|
|
3220
2550
|
};
|
|
3221
2551
|
TableHead.displayName = 'TableHead';
|
|
3222
|
-
TableHead.propTypes = {
|
|
3223
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
3224
|
-
className: PropTypes__default["default"].string
|
|
3225
|
-
};
|
|
3226
2552
|
|
|
3227
2553
|
var TableHeader = function (_a) {
|
|
3228
2554
|
var children = _a.children, sortDirection = _a.sortDirection, onSort = _a.onSort, className = _a.className, _b = _a.sortAscendingAnnouncement, sortAscendingAnnouncement = _b === void 0 ? 'sorted ascending' : _b, _c = _a.sortDescendingAnnouncement, sortDescendingAnnouncement = _c === void 0 ? 'sorted descending' : _c, other = tslib.__rest(_a, ["children", "sortDirection", "onSort", "className", "sortAscendingAnnouncement", "sortDescendingAnnouncement"]);
|
|
@@ -3244,45 +2570,24 @@ var TableHeader = function (_a) {
|
|
|
3244
2570
|
React__default["default"].createElement("span", { role: "status", "aria-live": "polite" }, announcement)))) : (children)));
|
|
3245
2571
|
};
|
|
3246
2572
|
TableHeader.displayName = 'TableHeader';
|
|
3247
|
-
TableHeader.propTypes = {
|
|
3248
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
3249
|
-
sortDirection: PropTypes__default["default"].string,
|
|
3250
|
-
onSort: PropTypes__default["default"].func,
|
|
3251
|
-
className: PropTypes__default["default"].string,
|
|
3252
|
-
sortAscendingAnnouncement: PropTypes__default["default"].string,
|
|
3253
|
-
sortDescendingAnnouncement: PropTypes__default["default"].string
|
|
3254
|
-
};
|
|
3255
2573
|
|
|
3256
2574
|
var TableRow = function (_a) {
|
|
3257
2575
|
var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
|
|
3258
2576
|
return (React__default["default"].createElement("tr", tslib.__assign({ className: classNames__default["default"]('TableRow', className) }, other), children));
|
|
3259
2577
|
};
|
|
3260
2578
|
TableRow.displayName = 'TableRow';
|
|
3261
|
-
TableRow.propTypes = {
|
|
3262
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
3263
|
-
className: PropTypes__default["default"].string
|
|
3264
|
-
};
|
|
3265
2579
|
|
|
3266
2580
|
var TableFooter = function (_a) {
|
|
3267
2581
|
var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
|
|
3268
2582
|
return (React__default["default"].createElement("tfoot", tslib.__assign({ className: classNames__default["default"]('TableFooter', className) }, other), children));
|
|
3269
2583
|
};
|
|
3270
2584
|
TableFooter.displayName = 'TableFooter';
|
|
3271
|
-
TableFooter.propTypes = {
|
|
3272
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
3273
|
-
className: PropTypes__default["default"].string
|
|
3274
|
-
};
|
|
3275
2585
|
|
|
3276
2586
|
var Tab = React__default["default"].forwardRef(function (_a, ref) {
|
|
3277
2587
|
var children = _a.children, propId = _a.id; _a.target; var other = tslib.__rest(_a, ["children", "id", "target"]);
|
|
3278
2588
|
return (React__default["default"].createElement("li", tslib.__assign({ id: propId, ref: ref, role: "tab" }, other), children));
|
|
3279
2589
|
});
|
|
3280
2590
|
Tab.displayName = 'Tab';
|
|
3281
|
-
Tab.propTypes = {
|
|
3282
|
-
target: PropTypes__default["default"].any.isRequired,
|
|
3283
|
-
id: PropTypes__default["default"].string,
|
|
3284
|
-
children: PropTypes__default["default"].node
|
|
3285
|
-
};
|
|
3286
2591
|
|
|
3287
2592
|
/**
|
|
3288
2593
|
* Hook to be used similarly to the React.Component#componentDidMount.
|
|
@@ -3398,15 +2703,6 @@ var Tabs = function (_a) {
|
|
|
3398
2703
|
React__default["default"].createElement("ul", tslib.__assign({ role: "tablist", className: "Tablist" }, labelProp, { onKeyDown: handleKeyDown }), tabComponents)));
|
|
3399
2704
|
};
|
|
3400
2705
|
Tabs.displayName = 'Tabs';
|
|
3401
|
-
Tabs.propTypes = {
|
|
3402
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
3403
|
-
'aria-label': PropTypes__default["default"].string,
|
|
3404
|
-
'aria-labelledby': PropTypes__default["default"].string,
|
|
3405
|
-
initialActiveIndex: PropTypes__default["default"].number,
|
|
3406
|
-
thin: PropTypes__default["default"].bool,
|
|
3407
|
-
orientation: PropTypes__default["default"].string,
|
|
3408
|
-
className: PropTypes__default["default"].string
|
|
3409
|
-
};
|
|
3410
2706
|
|
|
3411
2707
|
var TabPanel = React.forwardRef(function (_a, ref) {
|
|
3412
2708
|
var children = _a.children, propId = _a.id, className = _a.className, other = tslib.__rest(_a, ["children", "id", "className"]);
|
|
@@ -3414,16 +2710,7 @@ var TabPanel = React.forwardRef(function (_a, ref) {
|
|
|
3414
2710
|
return (React__default["default"].createElement("div", tslib.__assign({ role: "tabpanel", className: classNames__default["default"]('TabPanel', className), id: id, ref: ref }, other), children));
|
|
3415
2711
|
});
|
|
3416
2712
|
TabPanel.displayName = 'TabPanel';
|
|
3417
|
-
TabPanel.propTypes = {
|
|
3418
|
-
id: PropTypes__default["default"].string,
|
|
3419
|
-
children: PropTypes__default["default"].node,
|
|
3420
|
-
className: PropTypes__default["default"].string
|
|
3421
|
-
};
|
|
3422
2713
|
|
|
3423
|
-
var commonPropTypes = {
|
|
3424
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
3425
|
-
className: PropTypes__default["default"].string
|
|
3426
|
-
};
|
|
3427
2714
|
var DescriptionList = function (_a) {
|
|
3428
2715
|
var children = _a.children, className = _a.className, _b = _a.collapsed, collapsed = _b === void 0 ? false : _b, other = tslib.__rest(_a, ["children", "className", "collapsed"]);
|
|
3429
2716
|
return (React__default["default"].createElement("dl", tslib.__assign({ className: classNames__default["default"]('DescriptionList', className, {
|
|
@@ -3431,25 +2718,21 @@ var DescriptionList = function (_a) {
|
|
|
3431
2718
|
}) }, other), children));
|
|
3432
2719
|
};
|
|
3433
2720
|
DescriptionList.displayName = 'DescriptionList';
|
|
3434
|
-
DescriptionList.propTypes = commonPropTypes;
|
|
3435
2721
|
var DescriptionListItem = function (_a) {
|
|
3436
2722
|
var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
|
|
3437
2723
|
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('DescriptionList__item', className) }, other), children));
|
|
3438
2724
|
};
|
|
3439
2725
|
DescriptionListItem.displayName = 'DescriptionListItem';
|
|
3440
|
-
DescriptionListItem.propTypes = commonPropTypes;
|
|
3441
2726
|
var DescriptionTerm = function (_a) {
|
|
3442
2727
|
var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
|
|
3443
2728
|
return (React__default["default"].createElement("dt", tslib.__assign({ className: classNames__default["default"]('DescriptionList__term', className) }, other), children));
|
|
3444
2729
|
};
|
|
3445
2730
|
DescriptionTerm.displayName = 'DescriptionTerm';
|
|
3446
|
-
DescriptionTerm.propTypes = commonPropTypes;
|
|
3447
2731
|
var DescriptionDetails = function (_a) {
|
|
3448
2732
|
var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
|
|
3449
2733
|
return (React__default["default"].createElement("dd", tslib.__assign({ className: classNames__default["default"]('DescriptionList__details', className) }, other), children));
|
|
3450
2734
|
};
|
|
3451
2735
|
DescriptionDetails.displayName = 'DescriptionDetails';
|
|
3452
|
-
DescriptionDetails.propTypes = commonPropTypes;
|
|
3453
2736
|
|
|
3454
2737
|
var isTooltipProps = function (props) {
|
|
3455
2738
|
return !!props.tooltip;
|
|
@@ -3481,98 +2764,11 @@ var Step = function (props) {
|
|
|
3481
2764
|
children ? (React__default["default"].createElement("div", { className: "Stepper__step-label" }, children)) : null)))));
|
|
3482
2765
|
};
|
|
3483
2766
|
Step.displayName = 'Step';
|
|
3484
|
-
Step.propTypes = {
|
|
3485
|
-
children: PropTypes__default["default"].node,
|
|
3486
|
-
tooltip: PropTypes__default["default"].node,
|
|
3487
|
-
tooltipText: PropTypes__default["default"].string,
|
|
3488
|
-
className: PropTypes__default["default"].string
|
|
3489
|
-
};
|
|
3490
2767
|
var Stepper = function (_a) {
|
|
3491
2768
|
var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
|
|
3492
2769
|
return (React__default["default"].createElement("ol", tslib.__assign({ className: classNames__default["default"]('Stepper', className) }, other), children));
|
|
3493
2770
|
};
|
|
3494
2771
|
Stepper.displayName = 'Stepper';
|
|
3495
|
-
Stepper.propTypes = {
|
|
3496
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
3497
|
-
className: PropTypes__default["default"].string
|
|
3498
|
-
};
|
|
3499
|
-
|
|
3500
|
-
var Panel = React.forwardRef(function (_a, ref) {
|
|
3501
|
-
var _b;
|
|
3502
|
-
var children = _a.children, collapsed = _a.collapsed, className = _a.className, heading = _a.heading, _c = _a.padding, padding = _c === void 0 ? true : _c, other = tslib.__rest(_a, ["children", "collapsed", "className", "heading", "padding"]);
|
|
3503
|
-
var headingId = !heading
|
|
3504
|
-
? undefined
|
|
3505
|
-
: typeof heading === 'object' && 'id' in heading
|
|
3506
|
-
? heading.id
|
|
3507
|
-
: randomId();
|
|
3508
|
-
var Heading = function () {
|
|
3509
|
-
if (!headingId) {
|
|
3510
|
-
return null;
|
|
3511
|
-
}
|
|
3512
|
-
var HeadingComponent = "h".concat(heading &&
|
|
3513
|
-
typeof heading === 'object' &&
|
|
3514
|
-
'level' in heading &&
|
|
3515
|
-
!!heading.level
|
|
3516
|
-
? heading.level
|
|
3517
|
-
: 2);
|
|
3518
|
-
return (React__default["default"].createElement(HeadingComponent, { id: headingId, className: "Panel__Heading" }, heading && typeof heading === 'object' && 'text' in heading
|
|
3519
|
-
? heading.text
|
|
3520
|
-
: heading));
|
|
3521
|
-
};
|
|
3522
|
-
return (React__default["default"].createElement("section", tslib.__assign({ "aria-labelledby": headingId, className: classNames__default["default"]('Panel', className, (_b = {},
|
|
3523
|
-
_b['Panel--collapsed'] = collapsed,
|
|
3524
|
-
_b['Panel--no-padding'] = !padding,
|
|
3525
|
-
_b)), ref: ref }, other),
|
|
3526
|
-
React__default["default"].createElement(Heading, null),
|
|
3527
|
-
children));
|
|
3528
|
-
});
|
|
3529
|
-
Panel.displayName = 'Panel';
|
|
3530
|
-
Panel.propTypes = {
|
|
3531
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
3532
|
-
// @ts-expect-error
|
|
3533
|
-
heading: PropTypes__default["default"].oneOfType([PropTypes__default["default"].object, PropTypes__default["default"].node]),
|
|
3534
|
-
className: PropTypes__default["default"].string,
|
|
3535
|
-
padding: PropTypes__default["default"].bool,
|
|
3536
|
-
collapsed: PropTypes__default["default"].bool
|
|
3537
|
-
};
|
|
3538
|
-
|
|
3539
|
-
var PanelContent = React.forwardRef(function (_a, ref) {
|
|
3540
|
-
var _b;
|
|
3541
|
-
var children = _a.children, className = _a.className, _c = _a.padding, padding = _c === void 0 ? true : _c, otherProps = tslib.__rest(_a, ["children", "className", "padding"]);
|
|
3542
|
-
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Panel__Content', className, (_b = {},
|
|
3543
|
-
_b['Panel__Content--no-padding'] = !padding,
|
|
3544
|
-
_b)), ref: ref }, otherProps), children));
|
|
3545
|
-
});
|
|
3546
|
-
PanelContent.displayName = 'PanelContent';
|
|
3547
|
-
PanelContent.propTypes = {
|
|
3548
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
3549
|
-
className: PropTypes__default["default"].string,
|
|
3550
|
-
padding: PropTypes__default["default"].bool
|
|
3551
|
-
};
|
|
3552
|
-
|
|
3553
|
-
var PanelHeader = React.forwardRef(function (_a, ref) {
|
|
3554
|
-
var children = _a.children, className = _a.className, otherProps = tslib.__rest(_a, ["children", "className"]);
|
|
3555
|
-
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Panel__Header', className), ref: ref }, otherProps), children));
|
|
3556
|
-
});
|
|
3557
|
-
PanelHeader.displayName = 'PanelHeader';
|
|
3558
|
-
PanelHeader.propTypes = {
|
|
3559
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
3560
|
-
className: PropTypes__default["default"].string
|
|
3561
|
-
};
|
|
3562
|
-
|
|
3563
|
-
var IssuePanel = function (_a) {
|
|
3564
|
-
var className = _a.className, _b = _a.title, title = _b === void 0 ? '' : _b, actions = _a.actions, children = _a.children;
|
|
3565
|
-
return (React__default["default"].createElement("div", { className: classNames__default["default"]('IssuePanel', className) },
|
|
3566
|
-
React__default["default"].createElement("div", { className: "IssuePanel__Header" },
|
|
3567
|
-
title && React__default["default"].createElement("div", { className: "IssuePanel__Header-title" }, title),
|
|
3568
|
-
actions && (React__default["default"].createElement("div", { className: "IssuePanel__Header-actions" }, actions))),
|
|
3569
|
-
React__default["default"].createElement("div", { className: "IssuePanel__Content" }, children)));
|
|
3570
|
-
};
|
|
3571
|
-
IssuePanel.displayName = 'IssuePanel';
|
|
3572
|
-
IssuePanel.propTypes = {
|
|
3573
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
3574
|
-
className: PropTypes__default["default"].string
|
|
3575
|
-
};
|
|
3576
2772
|
|
|
3577
2773
|
var ProgressBar = React.forwardRef(function (_a, ref) {
|
|
3578
2774
|
var _b = _a.progress, progress = _b === void 0 ? 0 : _b, _c = _a.progressMax, progressMax = _c === void 0 ? 100 : _c, _d = _a.progressMin, progressMin = _d === void 0 ? 0 : _d, props = tslib.__rest(_a, ["progress", "progressMax", "progressMin"]);
|
|
@@ -3587,19 +2783,11 @@ var Address = function (_a) {
|
|
|
3587
2783
|
return (React__default["default"].createElement("address", tslib.__assign({ className: classNames__default["default"]('Address', className) }, other), children));
|
|
3588
2784
|
};
|
|
3589
2785
|
Address.displayName = 'Address';
|
|
3590
|
-
Address.propTypes = {
|
|
3591
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
3592
|
-
className: PropTypes__default["default"].string
|
|
3593
|
-
};
|
|
3594
2786
|
var AddressLine = function (_a) {
|
|
3595
2787
|
var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
|
|
3596
2788
|
return children ? (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Address__line', className) }, other), children)) : null;
|
|
3597
2789
|
};
|
|
3598
2790
|
AddressLine.displayName = 'AddressLine';
|
|
3599
|
-
AddressLine.propTypes = {
|
|
3600
|
-
children: PropTypes__default["default"].node,
|
|
3601
|
-
className: PropTypes__default["default"].string
|
|
3602
|
-
};
|
|
3603
2791
|
var AddressCityStateZip = function (_a) {
|
|
3604
2792
|
var city = _a.city, state = _a.state, zip = _a.zip, className = _a.className, other = tslib.__rest(_a, ["city", "state", "zip", "className"]);
|
|
3605
2793
|
return city || state || zip ? (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('Address__city-state-zip', className) }, other), [[city, state].filter(Boolean).join(', '), zip]
|
|
@@ -3607,22 +2795,6 @@ var AddressCityStateZip = function (_a) {
|
|
|
3607
2795
|
.join(' '))) : null;
|
|
3608
2796
|
};
|
|
3609
2797
|
AddressCityStateZip.displayName = 'AddressCityStateZip';
|
|
3610
|
-
AddressCityStateZip.propTypes = {
|
|
3611
|
-
city: PropTypes__default["default"].node,
|
|
3612
|
-
state: PropTypes__default["default"].node,
|
|
3613
|
-
zip: PropTypes__default["default"].node,
|
|
3614
|
-
className: PropTypes__default["default"].string
|
|
3615
|
-
};
|
|
3616
|
-
|
|
3617
|
-
/**
|
|
3618
|
-
* This prop type is meant to ensure that a prop can actually be rendered as content.
|
|
3619
|
-
* It should match the ContentNode type in types.ts
|
|
3620
|
-
*/
|
|
3621
|
-
var contentNode = PropTypes__default["default"].oneOfType([
|
|
3622
|
-
PropTypes__default["default"].string,
|
|
3623
|
-
PropTypes__default["default"].number,
|
|
3624
|
-
PropTypes__default["default"].element
|
|
3625
|
-
]);
|
|
3626
2798
|
|
|
3627
2799
|
var Pagination = React__default["default"].forwardRef(function (_a, ref) {
|
|
3628
2800
|
var totalItems = _a.totalItems, _b = _a.itemsPerPage, itemsPerPage = _b === void 0 ? 10 : _b, _c = _a.currentPage, currentPage = _c === void 0 ? 1 : _c, statusLabel = _a.statusLabel, _d = _a.firstPageLabel, firstPageLabel = _d === void 0 ? 'First page' : _d, _e = _a.previousPageLabel, previousPageLabel = _e === void 0 ? 'Previous page' : _e, _f = _a.nextPageLabel, nextPageLabel = _f === void 0 ? 'Next page' : _f, _g = _a.lastPageLabel, lastPageLabel = _g === void 0 ? 'Last page' : _g, _h = _a.tooltipPlacement, tooltipPlacement = _h === void 0 ? 'bottom' : _h, onNextPageClick = _a.onNextPageClick, onPreviousPageClick = _a.onPreviousPageClick, onFirstPageClick = _a.onFirstPageClick, onLastPageClick = _a.onLastPageClick, className = _a.className, _j = _a.thin, thin = _j === void 0 ? false : _j, other = tslib.__rest(_a, ["totalItems", "itemsPerPage", "currentPage", "statusLabel", "firstPageLabel", "previousPageLabel", "nextPageLabel", "lastPageLabel", "tooltipPlacement", "onNextPageClick", "onPreviousPageClick", "onFirstPageClick", "onLastPageClick", "className", "thin"]);
|
|
@@ -3653,24 +2825,6 @@ var Pagination = React__default["default"].forwardRef(function (_a, ref) {
|
|
|
3653
2825
|
React__default["default"].createElement(IconButton, { icon: "chevron-double-right", tooltipPlacement: tooltipPlacement, label: lastPageLabel, "aria-disabled": isLastPage, onClick: isLastPage ? undefined : onLastPageClick })))));
|
|
3654
2826
|
});
|
|
3655
2827
|
Pagination.displayName = 'Pagination';
|
|
3656
|
-
Pagination.propTypes = {
|
|
3657
|
-
totalItems: PropTypes__default["default"].number.isRequired,
|
|
3658
|
-
itemsPerPage: PropTypes__default["default"].number,
|
|
3659
|
-
currentPage: PropTypes__default["default"].number,
|
|
3660
|
-
statusLabel: PropTypes__default["default"].element,
|
|
3661
|
-
firstPageLabel: contentNode,
|
|
3662
|
-
previousPageLabel: contentNode,
|
|
3663
|
-
nextPageLabel: contentNode,
|
|
3664
|
-
lastPageLabel: contentNode,
|
|
3665
|
-
onNextPageClick: PropTypes__default["default"].func,
|
|
3666
|
-
onPreviousPageClick: PropTypes__default["default"].func,
|
|
3667
|
-
onFirstPageClick: PropTypes__default["default"].func,
|
|
3668
|
-
onLastPageClick: PropTypes__default["default"].func,
|
|
3669
|
-
// @ts-expect-error
|
|
3670
|
-
tooltipPlacement: PropTypes__default["default"].string,
|
|
3671
|
-
className: PropTypes__default["default"].string,
|
|
3672
|
-
thin: PropTypes__default["default"].bool
|
|
3673
|
-
};
|
|
3674
2828
|
|
|
3675
2829
|
var usePagination = function (_a) {
|
|
3676
2830
|
var totalItems = _a.totalItems, _b = _a.initialPageSize, initialPageSize = _b === void 0 ? 10 : _b, _c = _a.initialPage, initialPage = _c === void 0 ? 1 : _c;
|
|
@@ -3706,11 +2860,6 @@ var FieldWrap = React__default["default"].forwardRef(function (_a, ref) {
|
|
|
3706
2860
|
return (React__default["default"].createElement(Component, tslib.__assign({ ref: ref, className: classNames__default["default"]('Panel', className) }, props), children));
|
|
3707
2861
|
});
|
|
3708
2862
|
FieldWrap.displayName = 'FieldWrap';
|
|
3709
|
-
FieldWrap.propTypes = {
|
|
3710
|
-
children: PropTypes__default["default"].node.isRequired,
|
|
3711
|
-
className: PropTypes__default["default"].string,
|
|
3712
|
-
as: PropTypes__default["default"].string
|
|
3713
|
-
};
|
|
3714
2863
|
|
|
3715
2864
|
var Breadcrumb = React.forwardRef(function (_a, ref) {
|
|
3716
2865
|
var _b = _a.separator, separator = _b === void 0 ? '/' : _b, className = _a.className, children = _a.children, props = tslib.__rest(_a, ["separator", "className", "children"]);
|
|
@@ -3736,9 +2885,6 @@ function (_a, ref) {
|
|
|
3736
2885
|
var className = _a.className, children = _a.children, props = tslib.__rest(_a, ["className", "children"]);
|
|
3737
2886
|
return (React__default["default"].createElement("span", tslib.__assign({ className: classNames__default["default"]('Breadcrumb__Item', className), ref: ref, "aria-current": "location" }, props), children));
|
|
3738
2887
|
});
|
|
3739
|
-
BreadcrumbItem.propTypes = {
|
|
3740
|
-
className: PropTypes__default["default"].string
|
|
3741
|
-
};
|
|
3742
2888
|
|
|
3743
2889
|
var BreadcrumbLink = React.forwardRef(function (_a, ref) {
|
|
3744
2890
|
var className = _a.className, _b = _a.as, ElementType = _b === void 0 ? 'a' : _b, children = _a.children, props = tslib.__rest(_a, ["className", "as", "children"]);
|
|
@@ -3917,27 +3063,18 @@ var ColumnHeader = React.forwardRef(function (_a, ref) {
|
|
|
3917
3063
|
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('TwoColumnPanel__Header', className) }, props, { ref: ref }), children));
|
|
3918
3064
|
});
|
|
3919
3065
|
ColumnHeader.displayName = 'ColumnHeader';
|
|
3920
|
-
ColumnHeader.propTypes = {
|
|
3921
|
-
className: PropTypes__default["default"].string
|
|
3922
|
-
};
|
|
3923
3066
|
|
|
3924
3067
|
var ColumnGroupHeader = React.forwardRef(function (_a, ref) {
|
|
3925
3068
|
var className = _a.className, children = _a.children, props = tslib.__rest(_a, ["className", "children"]);
|
|
3926
3069
|
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('TwoColumnPanel__GroupHeader', className) }, props, { ref: ref }), children));
|
|
3927
3070
|
});
|
|
3928
3071
|
ColumnGroupHeader.displayName = 'ColumnGroupHeader';
|
|
3929
|
-
ColumnGroupHeader.propTypes = {
|
|
3930
|
-
className: PropTypes__default["default"].string
|
|
3931
|
-
};
|
|
3932
3072
|
|
|
3933
3073
|
var ColumnList = React.forwardRef(function (_a, ref) {
|
|
3934
3074
|
var className = _a.className, children = _a.children, props = tslib.__rest(_a, ["className", "children"]);
|
|
3935
3075
|
return (React__default["default"].createElement("div", tslib.__assign({ className: classNames__default["default"]('TwoColumnPanel__List', className) }, props, { ref: ref }), children));
|
|
3936
3076
|
});
|
|
3937
3077
|
ColumnList.displayName = 'ColumnList';
|
|
3938
|
-
ColumnList.propTypes = {
|
|
3939
|
-
className: PropTypes__default["default"].string
|
|
3940
|
-
};
|
|
3941
3078
|
|
|
3942
3079
|
var iconTypeMap = {
|
|
3943
3080
|
caution: 'caution',
|
|
@@ -3956,18 +3093,6 @@ var Notice = React.forwardRef(function (_a, ref) {
|
|
|
3956
3093
|
children && React__default["default"].createElement("div", { className: "Notice__content" }, children)));
|
|
3957
3094
|
});
|
|
3958
3095
|
Notice.displayName = 'Notice';
|
|
3959
|
-
Notice.propTypes = {
|
|
3960
|
-
children: PropTypes__default["default"].node,
|
|
3961
|
-
type: PropTypes__default["default"].oneOf(['caution', 'info', 'danger']),
|
|
3962
|
-
// @ts-expect-error
|
|
3963
|
-
title: PropTypes__default["default"].oneOfType([
|
|
3964
|
-
PropTypes__default["default"].string,
|
|
3965
|
-
PropTypes__default["default"].number,
|
|
3966
|
-
PropTypes__default["default"].element
|
|
3967
|
-
]),
|
|
3968
|
-
// @ts-expect-error
|
|
3969
|
-
icon: PropTypes__default["default"].string
|
|
3970
|
-
};
|
|
3971
3096
|
|
|
3972
3097
|
/* istanbul ignore next */
|
|
3973
3098
|
var ListboxContext = React.createContext({
|
|
@@ -4382,16 +3507,16 @@ var ComboboxNoResults = function (_a) {
|
|
|
4382
3507
|
return (React__default["default"].createElement("div", { className: "ComboboxListbox__empty", role: "alert", "aria-live": "polite" }, children || 'No results found.'));
|
|
4383
3508
|
};
|
|
4384
3509
|
var Combobox = React.forwardRef(function (_a, ref) {
|
|
4385
|
-
var propId = _a.id, className = _a.className, label = _a.label, children = _a.children, _b = _a.options, options = _b === void 0 ? [] : _b, propValue = _a.value, defaultValue = _a.defaultValue, _c = _a.requiredText, requiredText = _c === void 0 ? 'Required' : _c, error = _a.error, _d = _a.autocomplete, autocomplete = _d === void 0 ? 'manual' : _d, onSelectionChange = _a.onSelectionChange, onActiveChange = _a.onActiveChange, onChange = _a.onChange, onKeyDown = _a.onKeyDown, onFocus = _a.onFocus, onBlur = _a.onBlur, name = _a.name, renderNoResults = _a.renderNoResults, portal = _a.portal, props = tslib.__rest(_a, ["id", "className", "label", "children", "options", "value", "defaultValue", "requiredText", "error", "autocomplete", "onSelectionChange", "onActiveChange", "onChange", "onKeyDown", "onFocus", "onBlur", "name", "renderNoResults", "portal"]);
|
|
4386
|
-
var
|
|
4387
|
-
var
|
|
4388
|
-
var
|
|
4389
|
-
var
|
|
4390
|
-
var
|
|
4391
|
-
var
|
|
4392
|
-
var
|
|
3510
|
+
var propId = _a.id, className = _a.className, label = _a.label, children = _a.children, _b = _a.options, options = _b === void 0 ? [] : _b, propValue = _a.value, defaultValue = _a.defaultValue, _c = _a.requiredText, requiredText = _c === void 0 ? 'Required' : _c, error = _a.error, _d = _a.autocomplete, autocomplete = _d === void 0 ? 'manual' : _d, onSelectionChange = _a.onSelectionChange, onActiveChange = _a.onActiveChange, onChange = _a.onChange, onKeyDown = _a.onKeyDown, onFocus = _a.onFocus, onBlur = _a.onBlur, name = _a.name, renderNoResults = _a.renderNoResults, portal = _a.portal, _e = _a.inputRef, propInputRef = _e === void 0 ? null : _e, ariaDescribedby = _a["aria-describedby"], props = tslib.__rest(_a, ["id", "className", "label", "children", "options", "value", "defaultValue", "requiredText", "error", "autocomplete", "onSelectionChange", "onActiveChange", "onChange", "onKeyDown", "onFocus", "onBlur", "name", "renderNoResults", "portal", "inputRef", 'aria-describedby']);
|
|
3511
|
+
var _f = tslib.__read(React.useState(defaultValue || propValue || ''), 2), value = _f[0], setValue = _f[1];
|
|
3512
|
+
var _g = tslib.__read(React.useState(new Map()), 2), matchingOptions = _g[0], setMatchingOptions = _g[1];
|
|
3513
|
+
var _h = tslib.__read(React.useState(value || ''), 2), selectedValue = _h[0], setSelectedValue = _h[1];
|
|
3514
|
+
var _j = tslib.__read(React.useState(''), 2), formValue = _j[0], setFormValue = _j[1];
|
|
3515
|
+
var _k = tslib.__read(React.useState(false), 2), open = _k[0], setOpen = _k[1];
|
|
3516
|
+
var _l = tslib.__read(React.useState(null), 2), activeDescendant = _l[0], setActiveDescendant = _l[1];
|
|
3517
|
+
var _m = tslib.__read(propId ? [propId] : nextId.useId(1, 'combobox'), 1), id = _m[0];
|
|
4393
3518
|
var comboboxRef = useSharedRef(ref);
|
|
4394
|
-
var inputRef =
|
|
3519
|
+
var inputRef = useSharedRef(propInputRef);
|
|
4395
3520
|
var listboxRef = React.useRef(null);
|
|
4396
3521
|
var isControlled = typeof propValue !== 'undefined';
|
|
4397
3522
|
var isRequired = !!props.required;
|
|
@@ -4562,6 +3687,10 @@ var Combobox = React.forwardRef(function (_a, ref) {
|
|
|
4562
3687
|
}), role: "listbox", "aria-labelledby": "".concat(id, "-label"), id: "".concat(id, "-listbox"), value: selectedValue, onMouseDown: handleComboboxOptionMouseDown, onClick: handleComboboxOptionClick, onSelectionChange: handleSelectionChange, onActiveChange: handleActiveChange, ref: listboxRef, tabIndex: undefined, "aria-activedescendant": undefined },
|
|
4563
3688
|
comboboxOptions,
|
|
4564
3689
|
noMatchingOptions));
|
|
3690
|
+
var errorId = "".concat(id, "-error");
|
|
3691
|
+
var inputProps = tslib.__assign(tslib.__assign({}, props), { 'aria-describedby': error
|
|
3692
|
+
? tokenList(errorId, ariaDescribedby)
|
|
3693
|
+
: ariaDescribedby });
|
|
4565
3694
|
return (React__default["default"].createElement("div", { id: id, className: classNames__default["default"]('Combobox', className), ref: comboboxRef },
|
|
4566
3695
|
name && React__default["default"].createElement("input", { type: "hidden", name: name, value: formValue }),
|
|
4567
3696
|
React__default["default"].createElement("label", { className: classNames__default["default"]('Field__label', {
|
|
@@ -4576,7 +3705,7 @@ var Combobox = React.forwardRef(function (_a, ref) {
|
|
|
4576
3705
|
// We're handling click here to open the listbox when the wrapping element is clicked,
|
|
4577
3706
|
// there's already keyboard handlers to open the listbox on the input element
|
|
4578
3707
|
onClick: handleInputClick },
|
|
4579
|
-
React__default["default"].createElement("input", tslib.__assign({ type: "text", id: "".concat(id, "-input"), ref: inputRef, value: value, role: "combobox", "aria-autocomplete": !isAutoComplete ? 'none' : 'list', "aria-controls": "".concat(id, "-listbox"), "aria-expanded": open, "aria-haspopup": "listbox", "aria-activedescendant": open && activeDescendant ? activeDescendant.element.id : undefined },
|
|
3708
|
+
React__default["default"].createElement("input", tslib.__assign({ type: "text", id: "".concat(id, "-input"), ref: inputRef, value: value, role: "combobox", "aria-autocomplete": !isAutoComplete ? 'none' : 'list', "aria-controls": "".concat(id, "-listbox"), "aria-expanded": open, "aria-haspopup": "listbox", "aria-activedescendant": open && activeDescendant ? activeDescendant.element.id : undefined }, inputProps, { onChange: handleChange, onKeyDown: handleKeyDown, onFocus: handleFocus, onBlur: handleBlur })),
|
|
4580
3709
|
React__default["default"].createElement("span", { className: "Combobox__arrow" })),
|
|
4581
3710
|
React__default["default"].createElement(ComboboxProvider, { autocomplete: autocomplete, inputValue: value, formValue: formValue, selectedValue: selectedValue, matches: !isAutoComplete || defaultAutoCompleteMatches, matchingOptions: matchingOptions, setMatchingOptions: setMatchingOptions, setFormValue: setFormValue }, portal
|
|
4582
3711
|
? reactDom.createPortal(comboboxListbox, portal instanceof HTMLElement
|
|
@@ -4584,7 +3713,7 @@ var Combobox = React.forwardRef(function (_a, ref) {
|
|
|
4584
3713
|
: portal.current ||
|
|
4585
3714
|
/* istanbul ignore next: default fallback value */ document.body)
|
|
4586
3715
|
: comboboxListbox),
|
|
4587
|
-
hasError && (React__default["default"].createElement("div", { className: "Error", id:
|
|
3716
|
+
hasError && (React__default["default"].createElement("div", { className: "Error", id: errorId }, error))));
|
|
4588
3717
|
});
|
|
4589
3718
|
Combobox.displayName = 'Combobox';
|
|
4590
3719
|
|
|
@@ -4632,7 +3761,9 @@ var Popover = React.forwardRef(function (_a, ref) {
|
|
|
4632
3761
|
var placement = (attributes.popper &&
|
|
4633
3762
|
attributes.popper['data-popper-placement']) ||
|
|
4634
3763
|
initialPlacement;
|
|
4635
|
-
var additionalProps = variant === 'prompt'
|
|
3764
|
+
var additionalProps = variant === 'prompt' && !props['aria-label']
|
|
3765
|
+
? { 'aria-labelledby': "".concat(id, "-label") }
|
|
3766
|
+
: {};
|
|
4636
3767
|
// Keep targetElement in sync with target prop
|
|
4637
3768
|
React.useEffect(function () {
|
|
4638
3769
|
var targetElement = target && 'current' in target ? target.current : target;
|
|
@@ -4724,7 +3855,7 @@ var Popover = React.forwardRef(function (_a, ref) {
|
|
|
4724
3855
|
React__default["default"].createElement("div", tslib.__assign({ id: id, className: classNames__default["default"]('Popover', "Popover--".concat(placement), className, {
|
|
4725
3856
|
'Popover--hidden': !show,
|
|
4726
3857
|
'Popover--prompt': variant === 'prompt'
|
|
4727
|
-
}), ref: popoverRef, role: "dialog", style: styles.popper }, attributes.popper,
|
|
3858
|
+
}), ref: popoverRef, role: "dialog", style: styles.popper }, attributes.popper, additionalProps, props),
|
|
4728
3859
|
React__default["default"].createElement("div", { className: "Popover__popoverArrow", ref: setArrowElement, style: styles.arrow }),
|
|
4729
3860
|
React__default["default"].createElement("div", { className: "Popover__borderLeft" }),
|
|
4730
3861
|
variant === 'prompt' ? (React__default["default"].createElement(PromptPopoverContent, { applyButtonText: applyButtonText, onApply: onApply, closeButtonText: closeButtonText, infoText: infoText || '', onClose: handleClosePopover, infoTextId: "".concat(id, "-label") })) : (children)))), (portal && 'current' in portal ? portal.current : portal) || document.body);
|
|
@@ -4790,10 +3921,6 @@ var ThemeProvider = function (_a) {
|
|
|
4790
3921
|
function useThemeContext() {
|
|
4791
3922
|
return React.useContext(ThemeContext);
|
|
4792
3923
|
}
|
|
4793
|
-
ThemeProvider.propTypes = {
|
|
4794
|
-
children: PropTypes__default["default"].any,
|
|
4795
|
-
initialTheme: PropTypes__default["default"].string
|
|
4796
|
-
};
|
|
4797
3924
|
|
|
4798
3925
|
exports.Accordion = Accordion;
|
|
4799
3926
|
exports.AccordionContent = AccordionContent;
|
|
@@ -4809,10 +3936,6 @@ exports.Breadcrumb = Breadcrumb;
|
|
|
4809
3936
|
exports.BreadcrumbItem = BreadcrumbItem;
|
|
4810
3937
|
exports.BreadcrumbLink = BreadcrumbLink;
|
|
4811
3938
|
exports.Button = Button;
|
|
4812
|
-
exports.Card = Card;
|
|
4813
|
-
exports.CardContent = CardContent;
|
|
4814
|
-
exports.CardFooter = CardFooter;
|
|
4815
|
-
exports.CardHeader = CardHeader;
|
|
4816
3939
|
exports.Checkbox = Checkbox;
|
|
4817
3940
|
exports.ClickOutsideListener = ClickOutsideListener;
|
|
4818
3941
|
exports.Code = Code;
|
|
@@ -4835,7 +3958,6 @@ exports.ExpandCollapsePanel = ExpandCollapsePanel;
|
|
|
4835
3958
|
exports.FieldWrap = FieldWrap;
|
|
4836
3959
|
exports.Icon = Icon;
|
|
4837
3960
|
exports.IconButton = IconButton;
|
|
4838
|
-
exports.IssuePanel = IssuePanel;
|
|
4839
3961
|
exports.Layout = Layout;
|
|
4840
3962
|
exports.Line = Line;
|
|
4841
3963
|
exports.Link = Link;
|
|
@@ -4864,7 +3986,6 @@ exports.Panel = Panel;
|
|
|
4864
3986
|
exports.PanelContent = PanelContent;
|
|
4865
3987
|
exports.PanelHeader = PanelHeader;
|
|
4866
3988
|
exports.PanelTrigger = PanelTrigger$1;
|
|
4867
|
-
exports.Pointout = Pointout;
|
|
4868
3989
|
exports.Popover = Popover;
|
|
4869
3990
|
exports.ProgressBar = ProgressBar;
|
|
4870
3991
|
exports.RadioCardGroup = RadioCardGroup;
|