@deque/cauldron-react 3.0.1 → 4.0.0-canary.78d6a743
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/{add-user-075c63a1.js → add-user.js} +10 -12
- package/lib/arrow-circle.js +24 -0
- package/lib/{arrow-97011665.js → arrow.js} +13 -16
- package/lib/arrows-alt.js +24 -0
- package/lib/{bolt-e44406fd.js → bolt.js} +11 -12
- package/lib/cauldron.css +8 -8
- package/lib/{caution-e048e1bf.js → caution.js} +10 -12
- package/lib/{check-circle-8b5069b4.js → check-circle.js} +12 -13
- package/lib/{check-shield-8fdb3641.js → check-shield.js} +11 -13
- package/lib/{check-solid-a0682f04.js → check-solid.js} +12 -13
- package/lib/{check-c2912d5e.js → check.js} +12 -13
- package/lib/{checkbox-checked-a262e99c.js → checkbox-checked.js} +12 -13
- package/lib/{checkbox-unchecked-2ad5b4ae.js → checkbox-unchecked.js} +11 -12
- package/lib/chevron-double.js +24 -0
- package/lib/chevron.js +24 -0
- package/lib/{close-31ce4dcf.js → close.js} +12 -13
- package/lib/code.js +25 -0
- package/lib/components/Address/index.d.ts +38 -0
- package/lib/components/Breadcrumb/Breadcrumb.d.ts +11 -0
- package/lib/components/Breadcrumb/BreadcrumbItem.d.ts +5 -0
- package/lib/components/Breadcrumb/BreadcrumbLink.d.ts +6 -0
- package/lib/components/Breadcrumb/index.d.ts +3 -0
- package/lib/components/FieldWrap/index.d.ts +7 -0
- package/lib/components/Icon/types.d.ts +1 -1
- package/lib/components/IconButton/index.d.ts +10 -3
- package/lib/components/IssuePanel/index.d.ts +17 -0
- package/lib/components/Loader/index.d.ts +3 -3
- package/lib/components/LoaderOverlay/axe-loader.d.ts +1 -0
- package/lib/components/LoaderOverlay/index.d.ts +5 -1
- package/lib/components/Pagination/index.d.ts +20 -0
- package/lib/components/Panel/index.d.ts +13 -8
- package/lib/components/RadioGroup/index.d.ts +2 -0
- package/lib/components/SideBar/SideBar.d.ts +1 -0
- package/lib/components/Stepper/index.d.ts +2 -0
- package/lib/components/Table/TableCell.d.ts +2 -2
- package/lib/components/Table/TableHeader.d.ts +8 -3
- package/lib/components/Tabs/Tabs.d.ts +7 -1
- package/lib/components/Tooltip/index.d.ts +1 -1
- package/lib/{copy-d2ade017.js → copy.js} +10 -12
- package/lib/{download-2790e982.js → download.js} +10 -12
- package/lib/exchange.js +24 -0
- package/lib/external-link.js +25 -0
- package/lib/{eye-a0d28243.js → eye.js} +10 -12
- package/lib/{filter-d2057f4c.js → filter.js} +10 -12
- package/lib/{flag-fb248a99.js → flag.js} +12 -13
- package/lib/gears.js +22 -0
- package/lib/{grid-ee446118.js → grid.js} +10 -12
- package/lib/{hamburger-menu-0fc0e266.js → hamburger-menu.js} +10 -11
- package/lib/highlight.js +24 -0
- package/lib/index.d.ts +5 -0
- package/lib/index.js +429 -171
- package/lib/{info-circle-alt-b1a696c7.js → info-circle-alt.js} +10 -12
- package/lib/{info-circle-b43f7a9b.js → info-circle.js} +11 -12
- package/lib/{info-square-f193e281.js → info-square.js} +10 -11
- package/lib/kabob.js +25 -0
- package/lib/{list-8fbd8209.js → list.js} +10 -11
- package/lib/{lock-bd0122db.js → lock.js} +12 -13
- package/lib/magnifying-glass.js +21 -0
- package/lib/{menu-2f2be7c2.js → menu.js} +11 -12
- package/lib/{new-releases-ac749bdd.js → new-releases.js} +13 -15
- package/lib/{new-6c3ac7d7.js → new.js} +11 -12
- package/lib/{no-bb3aa565.js → no.js} +12 -13
- package/lib/{pencil-4843058f.js → pencil.js} +11 -13
- package/lib/{plus-6589e613.js → plus.js} +11 -12
- package/lib/{question-circle-c3c634c4.js → question-circle.js} +11 -13
- package/lib/{radio-checked-006112fe.js → radio-checked.js} +11 -12
- package/lib/{radio-unchecked-a76e2d66.js → radio-unchecked.js} +11 -12
- package/lib/{recycle-0198fb67.js → recycle.js} +11 -12
- package/lib/resend.js +24 -0
- package/lib/robot.js +26 -0
- package/lib/run-again.js +23 -0
- package/lib/{save-edf5fc68.js → save.js} +12 -13
- package/lib/share.js +25 -0
- package/lib/sort-triangle.js +24 -0
- package/lib/{sort-49ec1442.js → sort.js} +11 -13
- package/lib/{star-a1af8d95.js → star.js} +11 -13
- package/lib/sun.js +24 -0
- package/lib/{tag-56c32f4f.js → tag.js} +11 -12
- package/lib/target.js +28 -0
- package/lib/trash.js +24 -0
- package/lib/{triangle-51d7723a.js → triangle.js} +14 -16
- package/lib/{upload-d71f0e44.js → upload.js} +10 -12
- package/lib/utils/polymorphic-type/index.d.ts +40 -0
- package/package.json +4 -4
- package/lib/arrow-circle-7b95a2fd.js +0 -27
- package/lib/arrows-alt-b91e24b7.js +0 -26
- package/lib/chevron-064d5f96.js +0 -26
- package/lib/chevron-double-65975fca.js +0 -26
- package/lib/code-e3365341.js +0 -26
- package/lib/exchange-1d290efb.js +0 -26
- package/lib/external-link-ef122c95.js +0 -26
- package/lib/gears-b9ee1585.js +0 -23
- package/lib/highlight-81bfb759.js +0 -26
- package/lib/kabob-692fdc00.js +0 -26
- package/lib/robot-22863b2b.js +0 -29
- package/lib/run-again-c9777075.js +0 -25
- package/lib/share-70e94257.js +0 -26
- package/lib/sun-408aecdc.js +0 -26
- package/lib/target-50f179e0.js +0 -35
- package/lib/trash-896a3291.js +0 -26
package/lib/index.js
CHANGED
|
@@ -162,6 +162,7 @@ var iconTypes = [
|
|
|
162
162
|
'kabob',
|
|
163
163
|
'list',
|
|
164
164
|
'lock',
|
|
165
|
+
'magnifying-glass',
|
|
165
166
|
'menu',
|
|
166
167
|
'new-releases',
|
|
167
168
|
'new',
|
|
@@ -172,10 +173,12 @@ var iconTypes = [
|
|
|
172
173
|
'radio-checked',
|
|
173
174
|
'radio-unchecked',
|
|
174
175
|
'recycle',
|
|
176
|
+
'resend',
|
|
175
177
|
'robot',
|
|
176
178
|
'run-again',
|
|
177
179
|
'save',
|
|
178
180
|
'share',
|
|
181
|
+
'sort-triangle',
|
|
179
182
|
'sort',
|
|
180
183
|
'star',
|
|
181
184
|
'sun',
|
|
@@ -190,74 +193,81 @@ var iconTypes = [
|
|
|
190
193
|
];
|
|
191
194
|
|
|
192
195
|
function __variableDynamicImportRuntime0__(path) {
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
196
|
+
switch (path) {
|
|
197
|
+
case './icons/add-user.svg': return Promise.resolve().then(function () { return require('./add-user.js'); });
|
|
198
|
+
case './icons/arrow-circle.svg': return Promise.resolve().then(function () { return require('./arrow-circle.js'); });
|
|
199
|
+
case './icons/arrow.svg': return Promise.resolve().then(function () { return require('./arrow.js'); });
|
|
200
|
+
case './icons/arrows-alt.svg': return Promise.resolve().then(function () { return require('./arrows-alt.js'); });
|
|
201
|
+
case './icons/bolt.svg': return Promise.resolve().then(function () { return require('./bolt.js'); });
|
|
202
|
+
case './icons/caution.svg': return Promise.resolve().then(function () { return require('./caution.js'); });
|
|
203
|
+
case './icons/check-circle.svg': return Promise.resolve().then(function () { return require('./check-circle.js'); });
|
|
204
|
+
case './icons/check-shield.svg': return Promise.resolve().then(function () { return require('./check-shield.js'); });
|
|
205
|
+
case './icons/check-solid.svg': return Promise.resolve().then(function () { return require('./check-solid.js'); });
|
|
206
|
+
case './icons/check.svg': return Promise.resolve().then(function () { return require('./check.js'); });
|
|
207
|
+
case './icons/checkbox-checked.svg': return Promise.resolve().then(function () { return require('./checkbox-checked.js'); });
|
|
208
|
+
case './icons/checkbox-unchecked.svg': return Promise.resolve().then(function () { return require('./checkbox-unchecked.js'); });
|
|
209
|
+
case './icons/chevron-double.svg': return Promise.resolve().then(function () { return require('./chevron-double.js'); });
|
|
210
|
+
case './icons/chevron.svg': return Promise.resolve().then(function () { return require('./chevron.js'); });
|
|
211
|
+
case './icons/close.svg': return Promise.resolve().then(function () { return require('./close.js'); });
|
|
212
|
+
case './icons/code.svg': return Promise.resolve().then(function () { return require('./code.js'); });
|
|
213
|
+
case './icons/copy.svg': return Promise.resolve().then(function () { return require('./copy.js'); });
|
|
214
|
+
case './icons/download.svg': return Promise.resolve().then(function () { return require('./download.js'); });
|
|
215
|
+
case './icons/exchange.svg': return Promise.resolve().then(function () { return require('./exchange.js'); });
|
|
216
|
+
case './icons/external-link.svg': return Promise.resolve().then(function () { return require('./external-link.js'); });
|
|
217
|
+
case './icons/eye.svg': return Promise.resolve().then(function () { return require('./eye.js'); });
|
|
218
|
+
case './icons/filter.svg': return Promise.resolve().then(function () { return require('./filter.js'); });
|
|
219
|
+
case './icons/flag.svg': return Promise.resolve().then(function () { return require('./flag.js'); });
|
|
220
|
+
case './icons/gears.svg': return Promise.resolve().then(function () { return require('./gears.js'); });
|
|
221
|
+
case './icons/grid.svg': return Promise.resolve().then(function () { return require('./grid.js'); });
|
|
222
|
+
case './icons/hamburger-menu.svg': return Promise.resolve().then(function () { return require('./hamburger-menu.js'); });
|
|
223
|
+
case './icons/highlight.svg': return Promise.resolve().then(function () { return require('./highlight.js'); });
|
|
224
|
+
case './icons/info-circle-alt.svg': return Promise.resolve().then(function () { return require('./info-circle-alt.js'); });
|
|
225
|
+
case './icons/info-circle.svg': return Promise.resolve().then(function () { return require('./info-circle.js'); });
|
|
226
|
+
case './icons/info-square.svg': return Promise.resolve().then(function () { return require('./info-square.js'); });
|
|
227
|
+
case './icons/kabob.svg': return Promise.resolve().then(function () { return require('./kabob.js'); });
|
|
228
|
+
case './icons/list.svg': return Promise.resolve().then(function () { return require('./list.js'); });
|
|
229
|
+
case './icons/lock.svg': return Promise.resolve().then(function () { return require('./lock.js'); });
|
|
230
|
+
case './icons/magnifying-glass.svg': return Promise.resolve().then(function () { return require('./magnifying-glass.js'); });
|
|
231
|
+
case './icons/menu.svg': return Promise.resolve().then(function () { return require('./menu.js'); });
|
|
232
|
+
case './icons/new-releases.svg': return Promise.resolve().then(function () { return require('./new-releases.js'); });
|
|
233
|
+
case './icons/new.svg': return Promise.resolve().then(function () { return require('./new.js'); });
|
|
234
|
+
case './icons/no.svg': return Promise.resolve().then(function () { return require('./no.js'); });
|
|
235
|
+
case './icons/pencil.svg': return Promise.resolve().then(function () { return require('./pencil.js'); });
|
|
236
|
+
case './icons/plus.svg': return Promise.resolve().then(function () { return require('./plus.js'); });
|
|
237
|
+
case './icons/question-circle.svg': return Promise.resolve().then(function () { return require('./question-circle.js'); });
|
|
238
|
+
case './icons/radio-checked.svg': return Promise.resolve().then(function () { return require('./radio-checked.js'); });
|
|
239
|
+
case './icons/radio-unchecked.svg': return Promise.resolve().then(function () { return require('./radio-unchecked.js'); });
|
|
240
|
+
case './icons/recycle.svg': return Promise.resolve().then(function () { return require('./recycle.js'); });
|
|
241
|
+
case './icons/resend.svg': return Promise.resolve().then(function () { return require('./resend.js'); });
|
|
242
|
+
case './icons/robot.svg': return Promise.resolve().then(function () { return require('./robot.js'); });
|
|
243
|
+
case './icons/run-again.svg': return Promise.resolve().then(function () { return require('./run-again.js'); });
|
|
244
|
+
case './icons/save.svg': return Promise.resolve().then(function () { return require('./save.js'); });
|
|
245
|
+
case './icons/share.svg': return Promise.resolve().then(function () { return require('./share.js'); });
|
|
246
|
+
case './icons/sort-triangle.svg': return Promise.resolve().then(function () { return require('./sort-triangle.js'); });
|
|
247
|
+
case './icons/sort.svg': return Promise.resolve().then(function () { return require('./sort.js'); });
|
|
248
|
+
case './icons/star.svg': return Promise.resolve().then(function () { return require('./star.js'); });
|
|
249
|
+
case './icons/sun.svg': return Promise.resolve().then(function () { return require('./sun.js'); });
|
|
250
|
+
case './icons/tag.svg': return Promise.resolve().then(function () { return require('./tag.js'); });
|
|
251
|
+
case './icons/target.svg': return Promise.resolve().then(function () { return require('./target.js'); });
|
|
252
|
+
case './icons/trash.svg': return Promise.resolve().then(function () { return require('./trash.js'); });
|
|
253
|
+
case './icons/triangle.svg': return Promise.resolve().then(function () { return require('./triangle.js'); });
|
|
254
|
+
case './icons/upload.svg': return Promise.resolve().then(function () { return require('./upload.js'); });
|
|
255
|
+
default: return new Promise(function(resolve, reject) {
|
|
256
|
+
(typeof queueMicrotask === 'function' ? queueMicrotask : setTimeout)(
|
|
257
|
+
reject.bind(null, new Error("Unknown variable dynamic import: " + path))
|
|
258
|
+
);
|
|
259
|
+
})
|
|
250
260
|
}
|
|
251
261
|
}
|
|
252
262
|
var Icon = React.forwardRef(function (_a, ref) {
|
|
253
263
|
var _b;
|
|
254
264
|
var label = _a.label, className = _a.className, type = _a.type, other = tslib.__rest(_a, ["label", "className", "type"]);
|
|
255
265
|
var isMounted = React.useRef(true);
|
|
256
|
-
var _c = type.match(/(.*)-(right|left|up|down)$/) || [
|
|
266
|
+
var _c = tslib.__read(type.match(/(.*)-(right|left|up|down)$/) || [
|
|
257
267
|
'',
|
|
258
268
|
type
|
|
259
|
-
], name = _c[1], direction = _c[2];
|
|
260
|
-
var _d = React.useState(null), IconSVG = _d[0], setIcon = _d[1];
|
|
269
|
+
], 3), name = _c[1], direction = _c[2];
|
|
270
|
+
var _d = tslib.__read(React.useState(null), 2), IconSVG = _d[0], setIcon = _d[1];
|
|
261
271
|
React.useEffect(function () {
|
|
262
272
|
isMounted.current = true;
|
|
263
273
|
// NOTE: we don't want to pollute test output with
|
|
@@ -473,9 +483,9 @@ var TopBar = /** @class */ (function (_super) {
|
|
|
473
483
|
args[_i] = arguments[_i];
|
|
474
484
|
}
|
|
475
485
|
// @ts-ignore we're just spreading the original args
|
|
476
|
-
_this.onKeyDown.apply(_this, args);
|
|
486
|
+
_this.onKeyDown.apply(_this, tslib.__spread(args));
|
|
477
487
|
if (child.props.onKeyDown) {
|
|
478
|
-
(_a = child.props).onKeyDown.apply(_a, args);
|
|
488
|
+
(_a = child.props).onKeyDown.apply(_a, tslib.__spread(args));
|
|
479
489
|
}
|
|
480
490
|
},
|
|
481
491
|
tabIndex: 0,
|
|
@@ -511,7 +521,7 @@ var TopBar = /** @class */ (function (_super) {
|
|
|
511
521
|
};
|
|
512
522
|
TopBar.prototype.onKeyDown = function (e) {
|
|
513
523
|
var key = keyname(e.which);
|
|
514
|
-
var menuItems = tslib.
|
|
524
|
+
var menuItems = tslib.__spread(this.menuItems);
|
|
515
525
|
// account for hidden side bar trigger (hamburger)
|
|
516
526
|
if (this.state.wide && this.props.hasTrigger) {
|
|
517
527
|
menuItems.shift();
|
|
@@ -663,7 +673,7 @@ var ClickOutsideListener = /** @class */ (function (_super) {
|
|
|
663
673
|
return ClickOutsideListener;
|
|
664
674
|
}(React__default.Component));
|
|
665
675
|
|
|
666
|
-
var _a = [38, 40, 9, 13, 32, 27], up = _a[0], down = _a[1], tab = _a[2], enter = _a[3], space = _a[4], esc = _a[5];
|
|
676
|
+
var _a = tslib.__read([38, 40, 9, 13, 32, 27], 6), up = _a[0], down = _a[1], tab = _a[2], enter = _a[3], space = _a[4], esc = _a[5];
|
|
667
677
|
var OptionsMenuList = /** @class */ (function (_super) {
|
|
668
678
|
tslib.__extends(OptionsMenuList, _super);
|
|
669
679
|
function OptionsMenuList(props) {
|
|
@@ -791,7 +801,7 @@ var OptionsMenuList = /** @class */ (function (_super) {
|
|
|
791
801
|
return OptionsMenuList;
|
|
792
802
|
}(React__default.Component));
|
|
793
803
|
|
|
794
|
-
var
|
|
804
|
+
var _a$1 = tslib.__read([40], 1), down$1 = _a$1[0];
|
|
795
805
|
var OptionsMenu = /** @class */ (function (_super) {
|
|
796
806
|
tslib.__extends(OptionsMenu, _super);
|
|
797
807
|
function OptionsMenu(props) {
|
|
@@ -993,8 +1003,8 @@ var NavBar = function (_a) {
|
|
|
993
1003
|
var children = _a.children, className = _a.className, _b = _a.collapsed, collapsed = _b === void 0 ? false : _b, _c = _a.navTriggerLabel, navTriggerLabel = _c === void 0 ? 'MAIN MENU' : _c, propId = _a.propId;
|
|
994
1004
|
var navRef = React.useRef(null);
|
|
995
1005
|
var triggerRef = React.useRef(null);
|
|
996
|
-
var _d = React.useState(false), showDropdown = _d[0], setShowDropdown = _d[1];
|
|
997
|
-
var
|
|
1006
|
+
var _d = tslib.__read(React.useState(false), 2), showDropdown = _d[0], setShowDropdown = _d[1];
|
|
1007
|
+
var _e = tslib.__read([propId] || nextId.useId(1, 'navbar'), 1), menuId = _e[0];
|
|
998
1008
|
var showNavItems = !collapsed || (collapsed && showDropdown);
|
|
999
1009
|
var handleOutSideEvent = function (e) {
|
|
1000
1010
|
var _a;
|
|
@@ -1130,9 +1140,9 @@ var SideBar = /** @class */ (function (_super) {
|
|
|
1130
1140
|
SideBar.prototype.animate = function () {
|
|
1131
1141
|
var _this = this;
|
|
1132
1142
|
var show = this.props.show;
|
|
1133
|
-
var _a = show
|
|
1143
|
+
var _a = tslib.__read(show
|
|
1134
1144
|
? ['SideBar--show', 'SideBar--show SideBar--active']
|
|
1135
|
-
: ['SideBar--show', ''], first = _a[0], second = _a[1];
|
|
1145
|
+
: ['SideBar--show', ''], 2), first = _a[0], second = _a[1];
|
|
1136
1146
|
this.setState({ animateClass: first });
|
|
1137
1147
|
// css3 animations require transition classes to be added on separate tics
|
|
1138
1148
|
setTimeout(function () {
|
|
@@ -1148,11 +1158,11 @@ var SideBar = /** @class */ (function (_super) {
|
|
|
1148
1158
|
var _a = this.state, animateClass = _a.animateClass, wide = _a.wide;
|
|
1149
1159
|
// disabling no-unused-vars to prevent onDismiss from being passed through to dom element
|
|
1150
1160
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
1151
|
-
var _b = this.props, children = _b.children, className = _b.className, show = _b.show, onDismiss = _b.onDismiss, other = tslib.__rest(_b, ["children", "className", "show", "onDismiss"]);
|
|
1161
|
+
var _b = this.props, children = _b.children, className = _b.className, show = _b.show, onDismiss = _b.onDismiss, navProps = _b.navProps, other = tslib.__rest(_b, ["children", "className", "show", "onDismiss", "navProps"]);
|
|
1152
1162
|
/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
|
|
1153
1163
|
return (React__default.createElement(React.Fragment, null,
|
|
1154
1164
|
React__default.createElement(ClickOutsideListener, { onClickOutside: this.handleClickOutside },
|
|
1155
|
-
React__default.createElement("nav",
|
|
1165
|
+
React__default.createElement("nav", tslib.__assign({}, navProps),
|
|
1156
1166
|
React__default.createElement("ul", tslib.__assign({ className: classNames('SideBar', className, animateClass) }, other, { ref: this.navList, onKeyDown: this.onKeyDown }), children))),
|
|
1157
1167
|
React__default.createElement(Scrim, { show: !wide && show })));
|
|
1158
1168
|
/* eslint-enable jsx-a11y/no-noninteractive-element-interactions */
|
|
@@ -1465,15 +1475,15 @@ var fireCustomEvent = function (show, button) {
|
|
|
1465
1475
|
};
|
|
1466
1476
|
function Tooltip(_a) {
|
|
1467
1477
|
var _this = this;
|
|
1468
|
-
var propId = _a.id, _b = _a.placement, initialPlacement = _b === void 0 ? 'auto' : _b, children = _a.children, portal = _a.portal, target = _a.target, _c = _a.association, association = _c === void 0 ? 'aria-describedby' : _c, _d = _a.variant, variant = _d === void 0 ? 'text' : _d, _e = _a.show, showProp = _e === void 0 ? false : _e, _f = _a.hideElementOnHidden, hideElementOnHidden = _f === void 0 ? false : _f, props = tslib.__rest(_a, ["id", "placement", "children", "portal", "target", "association", "variant", "show", "hideElementOnHidden"]);
|
|
1469
|
-
var
|
|
1478
|
+
var propId = _a.id, _b = _a.placement, initialPlacement = _b === void 0 ? 'auto' : _b, children = _a.children, portal = _a.portal, target = _a.target, _c = _a.association, association = _c === void 0 ? 'aria-describedby' : _c, _d = _a.variant, variant = _d === void 0 ? 'text' : _d, _e = _a.show, showProp = _e === void 0 ? false : _e, _f = _a.hideElementOnHidden, hideElementOnHidden = _f === void 0 ? false : _f, className = _a.className, props = tslib.__rest(_a, ["id", "placement", "children", "portal", "target", "association", "variant", "show", "hideElementOnHidden", "className"]);
|
|
1479
|
+
var _g = tslib.__read(propId ? [propId] : nextId.useId(1, 'tooltip'), 1), id = _g[0];
|
|
1470
1480
|
var hovering = React.useRef(false);
|
|
1471
|
-
var
|
|
1472
|
-
var
|
|
1473
|
-
var
|
|
1474
|
-
var
|
|
1475
|
-
var
|
|
1476
|
-
var
|
|
1481
|
+
var _h = tslib.__read(React.useState(initialPlacement), 2), placement = _h[0], setPlacement = _h[1];
|
|
1482
|
+
var _j = tslib.__read(React.useState(!!showProp), 2), showTooltip = _j[0], setShowTooltip = _j[1];
|
|
1483
|
+
var _k = tslib.__read(React.useState(null), 2), targetElement = _k[0], setTargetElement = _k[1];
|
|
1484
|
+
var _l = tslib.__read(React.useState(null), 2), tooltipElement = _l[0], setTooltipElement = _l[1];
|
|
1485
|
+
var _m = tslib.__read(React.useState(null), 2), arrowElement = _m[0], setArrowElement = _m[1];
|
|
1486
|
+
var _o = reactPopper.usePopper(targetElement, tooltipElement, {
|
|
1477
1487
|
placement: initialPlacement,
|
|
1478
1488
|
modifiers: [
|
|
1479
1489
|
{ name: 'preventOverflow', options: { padding: 8 } },
|
|
@@ -1481,7 +1491,7 @@ function Tooltip(_a) {
|
|
|
1481
1491
|
{ name: 'offset', options: { offset: [0, 8] } },
|
|
1482
1492
|
{ name: 'arrow', options: { padding: 5, element: arrowElement } }
|
|
1483
1493
|
]
|
|
1484
|
-
}), styles =
|
|
1494
|
+
}), styles = _o.styles, attributes = _o.attributes, update = _o.update;
|
|
1485
1495
|
var show = function () { return tslib.__awaiter(_this, void 0, void 0, function () {
|
|
1486
1496
|
return tslib.__generator(this, function (_a) {
|
|
1487
1497
|
switch (_a.label) {
|
|
@@ -1554,9 +1564,9 @@ function Tooltip(_a) {
|
|
|
1554
1564
|
return function () {
|
|
1555
1565
|
targetElement.removeEventListener('keyup', handleEscape);
|
|
1556
1566
|
};
|
|
1557
|
-
}, [
|
|
1567
|
+
}, [showProp]);
|
|
1558
1568
|
React.useEffect(function () {
|
|
1559
|
-
if (typeof
|
|
1569
|
+
if (typeof showProp !== undefined) {
|
|
1560
1570
|
targetElement === null || targetElement === void 0 ? void 0 : targetElement.addEventListener('mouseenter', handleTriggerMouseEnter);
|
|
1561
1571
|
targetElement === null || targetElement === void 0 ? void 0 : targetElement.addEventListener('mouseleave', handleTriggerMouseLeave);
|
|
1562
1572
|
targetElement === null || targetElement === void 0 ? void 0 : targetElement.addEventListener('focusin', show);
|
|
@@ -1568,7 +1578,7 @@ function Tooltip(_a) {
|
|
|
1568
1578
|
targetElement === null || targetElement === void 0 ? void 0 : targetElement.removeEventListener('focusin', show);
|
|
1569
1579
|
targetElement === null || targetElement === void 0 ? void 0 : targetElement.removeEventListener('focusout', hide);
|
|
1570
1580
|
};
|
|
1571
|
-
}, [targetElement,
|
|
1581
|
+
}, [targetElement, showProp]);
|
|
1572
1582
|
React.useEffect(function () {
|
|
1573
1583
|
if (tooltipElement) {
|
|
1574
1584
|
tooltipElement === null || tooltipElement === void 0 ? void 0 : tooltipElement.addEventListener('mouseenter', handleTipMouseEnter);
|
|
@@ -1586,7 +1596,7 @@ function Tooltip(_a) {
|
|
|
1586
1596
|
}
|
|
1587
1597
|
}, [targetElement, id]);
|
|
1588
1598
|
return showTooltip || hideElementOnHidden
|
|
1589
|
-
? reactDom.createPortal(React__default.createElement("div", tslib.__assign({ id: id, className: classNames('Tooltip', "Tooltip--" + placement, {
|
|
1599
|
+
? reactDom.createPortal(React__default.createElement("div", tslib.__assign({ id: id, className: classNames('Tooltip', "Tooltip--" + placement, className, {
|
|
1590
1600
|
TooltipInfo: variant === 'info',
|
|
1591
1601
|
'Tooltip--hidden': !showTooltip && hideElementOnHidden,
|
|
1592
1602
|
'Tooltip--big': variant === 'big'
|
|
@@ -1615,21 +1625,52 @@ var TooltipContent = function (_a) {
|
|
|
1615
1625
|
return (React__default.createElement("div", tslib.__assign({ className: classNames('TooltipContent', className) }, other)));
|
|
1616
1626
|
};
|
|
1617
1627
|
|
|
1628
|
+
/**
|
|
1629
|
+
* Unfortunately, eslint does not recognize that this Polymorphic component has a displayName set
|
|
1630
|
+
*
|
|
1631
|
+
* We might be able to remove this if we upgrade eslint and associated plugins
|
|
1632
|
+
* See: https://github.com/dequelabs/cauldron/issues/451
|
|
1633
|
+
*/
|
|
1634
|
+
// eslint-disable-next-line react/display-name
|
|
1618
1635
|
var IconButton = React.forwardRef(function (_a, ref) {
|
|
1619
|
-
var icon = _a.icon, label = _a.label,
|
|
1620
|
-
var
|
|
1621
|
-
React.useImperativeHandle(ref, function () { return
|
|
1636
|
+
var _b = _a.as, Component = _b === void 0 ? 'button' : _b, icon = _a.icon, label = _a.label, _c = _a.tooltipPlacement, tooltipPlacement = _c === void 0 ? 'auto' : _c, tooltipVariant = _a.tooltipVariant, tooltipPortal = _a.tooltipPortal, className = _a.className, _d = _a.variant, variant = _d === void 0 ? 'secondary' : _d, disabled = _a.disabled, _e = _a.tabIndex, tabIndex = _e === void 0 ? 0 : _e, other = tslib.__rest(_a, ["as", "icon", "label", "tooltipPlacement", "tooltipVariant", "tooltipPortal", "className", "variant", "disabled", "tabIndex"]);
|
|
1637
|
+
var internalRef = React.useRef();
|
|
1638
|
+
React.useImperativeHandle(ref, function () { return internalRef.current; });
|
|
1639
|
+
// Configure additional properties based on the type of the Component
|
|
1640
|
+
// for accessibility
|
|
1641
|
+
var accessibilityProps = {};
|
|
1642
|
+
if (Component === 'button') {
|
|
1643
|
+
accessibilityProps.type = 'button';
|
|
1644
|
+
}
|
|
1645
|
+
else {
|
|
1646
|
+
// We don't need to set an anchor's role, since it would be redundant
|
|
1647
|
+
if (Component !== 'a') {
|
|
1648
|
+
accessibilityProps.role = other.href || other.to ? 'link' : 'button';
|
|
1649
|
+
}
|
|
1650
|
+
if (disabled) {
|
|
1651
|
+
accessibilityProps['aria-disabled'] = disabled;
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
React.useEffect(function () {
|
|
1655
|
+
var _a;
|
|
1656
|
+
if (!disabled) {
|
|
1657
|
+
return;
|
|
1658
|
+
}
|
|
1659
|
+
(_a = internalRef.current) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-label', label);
|
|
1660
|
+
}, [disabled]);
|
|
1622
1661
|
return (React__default.createElement(React__default.Fragment, null,
|
|
1623
|
-
React__default.createElement(
|
|
1662
|
+
React__default.createElement(Component, tslib.__assign({ className: classNames(className, {
|
|
1624
1663
|
IconButton: true,
|
|
1625
1664
|
'IconButton--primary': variant === 'primary',
|
|
1626
1665
|
'IconButton--secondary': variant === 'secondary',
|
|
1627
1666
|
'IconButton--error': variant === 'error'
|
|
1628
|
-
}), ref:
|
|
1667
|
+
}), ref: internalRef, disabled: disabled, tabIndex: disabled ? -1 : tabIndex }, accessibilityProps, other),
|
|
1629
1668
|
React__default.createElement(Icon, { type: icon })),
|
|
1630
|
-
!disabled && (React__default.createElement(Tooltip, { target:
|
|
1669
|
+
!disabled && (React__default.createElement(Tooltip, { target: internalRef, placement: tooltipPlacement, variant: tooltipVariant, portal: tooltipPortal, association: "aria-labelledby", hideElementOnHidden: true }, label))));
|
|
1631
1670
|
});
|
|
1632
1671
|
IconButton.propTypes = {
|
|
1672
|
+
// @ts-expect-error
|
|
1673
|
+
as: PropTypes.elementType,
|
|
1633
1674
|
// @ts-expect-error
|
|
1634
1675
|
icon: PropTypes.string.isRequired,
|
|
1635
1676
|
label: PropTypes.string.isRequired,
|
|
@@ -1703,19 +1744,29 @@ var Pointout = /** @class */ (function (_super) {
|
|
|
1703
1744
|
}
|
|
1704
1745
|
};
|
|
1705
1746
|
_this.handleOffscreenFocusIn = function (_a) {
|
|
1747
|
+
var e_1, _b;
|
|
1706
1748
|
var target = _a.target;
|
|
1707
|
-
var
|
|
1749
|
+
var _c = _this, offscreenRef = _c.offscreenRef, visibleRef = _c.visibleRef, getFocusableElements = _c.getFocusableElements;
|
|
1708
1750
|
var offscreenFocusable = getFocusableElements(offscreenRef);
|
|
1709
1751
|
var visibleFocusable = getFocusableElements(visibleRef);
|
|
1710
1752
|
var elementIndex = offscreenFocusable.findIndex(function (element) { return element === target; });
|
|
1711
1753
|
if (elementIndex === -1 || !visibleFocusable[elementIndex]) {
|
|
1712
1754
|
return;
|
|
1713
1755
|
}
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
var
|
|
1717
|
-
|
|
1718
|
-
|
|
1756
|
+
try {
|
|
1757
|
+
// Tag focusable elements
|
|
1758
|
+
for (var visibleFocusable_1 = tslib.__values(visibleFocusable), visibleFocusable_1_1 = visibleFocusable_1.next(); !visibleFocusable_1_1.done; visibleFocusable_1_1 = visibleFocusable_1.next()) {
|
|
1759
|
+
var element = visibleFocusable_1_1.value;
|
|
1760
|
+
element.setAttribute('data-focusable', 'true');
|
|
1761
|
+
element.setAttribute('tabindex', '-1');
|
|
1762
|
+
}
|
|
1763
|
+
}
|
|
1764
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
1765
|
+
finally {
|
|
1766
|
+
try {
|
|
1767
|
+
if (visibleFocusable_1_1 && !visibleFocusable_1_1.done && (_b = visibleFocusable_1["return"])) _b.call(visibleFocusable_1);
|
|
1768
|
+
}
|
|
1769
|
+
finally { if (e_1) throw e_1.error; }
|
|
1719
1770
|
}
|
|
1720
1771
|
visibleFocusable[elementIndex].classList.add('Pointout--focus-active');
|
|
1721
1772
|
};
|
|
@@ -1748,7 +1799,7 @@ var Pointout = /** @class */ (function (_super) {
|
|
|
1748
1799
|
top -= rect.top - portalNode.scrollTop;
|
|
1749
1800
|
left -= rect.left - portalNode.scrollLeft;
|
|
1750
1801
|
}
|
|
1751
|
-
var
|
|
1802
|
+
var _e = tslib.__read(arrowPosition.split('-'), 1), arrowBoxSide = _e[0];
|
|
1752
1803
|
var style;
|
|
1753
1804
|
switch (arrowBoxSide) {
|
|
1754
1805
|
case 'right':
|
|
@@ -2160,22 +2211,21 @@ Link.propTypes = {
|
|
|
2160
2211
|
Link.displayName = 'Link';
|
|
2161
2212
|
|
|
2162
2213
|
function Loader(_a) {
|
|
2163
|
-
var
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
props.
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
props['aria-
|
|
2170
|
-
props['aria-valuemax'] = 100;
|
|
2171
|
-
// According to the ARIA 1.2 spec (https://www.w3.org/TR/wai-aria-1.2/#progressbar),
|
|
2172
|
-
// the aria-valuenow attribute SHOULD be omitted because the "value" of our progress
|
|
2173
|
-
// is "indeterminate".
|
|
2214
|
+
var className = _a.className, _b = _a.variant, variant = _b === void 0 ? 'small' : _b, label = _a.label, props = tslib.__rest(_a, ["className", "variant", "label"]);
|
|
2215
|
+
if (label === null || label === void 0 ? void 0 : label.length) {
|
|
2216
|
+
props['role'] = 'alert';
|
|
2217
|
+
props.children = React__default.createElement(Offscreen, null, label);
|
|
2218
|
+
}
|
|
2219
|
+
else {
|
|
2220
|
+
props['aria-hidden'] = true;
|
|
2174
2221
|
}
|
|
2175
|
-
return React__default.createElement("div", tslib.__assign({
|
|
2222
|
+
return (React__default.createElement("div", tslib.__assign({ className: classNames('Loader', className, variant === 'large'
|
|
2223
|
+
? 'Loader--large'
|
|
2224
|
+
: variant === 'small'
|
|
2225
|
+
? 'Loader--small'
|
|
2226
|
+
: '') }, props)));
|
|
2176
2227
|
}
|
|
2177
2228
|
Loader.propTypes = {
|
|
2178
|
-
label: PropTypes.string,
|
|
2179
2229
|
className: PropTypes.string
|
|
2180
2230
|
};
|
|
2181
2231
|
Loader.displayName = 'Loader';
|
|
@@ -2201,7 +2251,7 @@ var Select = React__default.forwardRef(function (_a, ref) {
|
|
|
2201
2251
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2202
2252
|
var onChangeEvent = onChange !== null && onChange !== void 0 ? onChange : (function () { });
|
|
2203
2253
|
var isControlled = typeof value !== 'undefined';
|
|
2204
|
-
var _c = React.useState(value || defaultValue || ''), currentValue = _c[0], setCurrentValue = _c[1];
|
|
2254
|
+
var _c = tslib.__read(React.useState(value || defaultValue || ''), 2), currentValue = _c[0], setCurrentValue = _c[1];
|
|
2205
2255
|
var handleChange = function (e) {
|
|
2206
2256
|
onChangeEvent(e);
|
|
2207
2257
|
if (isControlled) {
|
|
@@ -2247,7 +2297,7 @@ var Select = React__default.forwardRef(function (_a, ref) {
|
|
|
2247
2297
|
})
|
|
2248
2298
|
: children),
|
|
2249
2299
|
React__default.createElement("div", { className: "arrow-down" })),
|
|
2250
|
-
React__default.createElement("div", { className: "Error"
|
|
2300
|
+
error && (React__default.createElement("div", { id: errorId, className: "Error" }, error))));
|
|
2251
2301
|
/* eslint-disable jsx-a11y/no-onchange */
|
|
2252
2302
|
});
|
|
2253
2303
|
Select.displayName = 'Select';
|
|
@@ -2258,8 +2308,8 @@ var RadioGroup = function (_a) {
|
|
|
2258
2308
|
_b = _a.onChange,
|
|
2259
2309
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
2260
2310
|
onChange = _b === void 0 ? function () { } : _b, className = _a.className, other = tslib.__rest(_a, ["name", "radios", "defaultValue", "value", "onChange", "className"]);
|
|
2261
|
-
var _c = React.useState(value || defaultValue || null), currentValue = _c[0], setCurrentValue = _c[1];
|
|
2262
|
-
var _d = React.useState(null), focusIndex = _d[0], setFocusIndex = _d[1];
|
|
2311
|
+
var _c = tslib.__read(React.useState(value || defaultValue || null), 2), currentValue = _c[0], setCurrentValue = _c[1];
|
|
2312
|
+
var _d = tslib.__read(React.useState(null), 2), focusIndex = _d[0], setFocusIndex = _d[1];
|
|
2263
2313
|
var inputs = React.useRef([]);
|
|
2264
2314
|
var handleChange = function (value) { return setCurrentValue(value); };
|
|
2265
2315
|
var onRadioFocus = function (index) { return setFocusIndex(index); };
|
|
@@ -2280,7 +2330,7 @@ var RadioGroup = function (_a) {
|
|
|
2280
2330
|
setCurrentValue(value);
|
|
2281
2331
|
}, [value]);
|
|
2282
2332
|
var radioButtons = radios.map(function (radio, index) {
|
|
2283
|
-
var label = radio.label, disabled = radio.disabled, radioValue = radio.value, id = radio.id, className = radio.className, other = tslib.__rest(radio, ["label", "disabled", "value", "id", "className"]);
|
|
2333
|
+
var label = radio.label, disabled = radio.disabled, radioValue = radio.value, labelDescription = radio.labelDescription, id = radio.id, className = radio.className, other = tslib.__rest(radio, ["label", "disabled", "value", "labelDescription", "id", "className"]);
|
|
2284
2334
|
var isChecked = currentValue === radioValue;
|
|
2285
2335
|
var isFocused = focusIndex === index;
|
|
2286
2336
|
return (React__default.createElement("div", { className: classNames('Radio is--flex-row', className), key: id },
|
|
@@ -2293,14 +2343,17 @@ var RadioGroup = function (_a) {
|
|
|
2293
2343
|
var _a;
|
|
2294
2344
|
handleChange(radioValue);
|
|
2295
2345
|
onChange(radio, (_a = inputs.current) === null || _a === void 0 ? void 0 : _a[index]);
|
|
2296
|
-
}, disabled: disabled, checked: isChecked }, other)),
|
|
2346
|
+
}, disabled: disabled, checked: isChecked, "aria-describedby": labelDescription && id + "Desc" }, other)),
|
|
2347
|
+
React__default.createElement("label", { htmlFor: id, className: classNames('Field__label', {
|
|
2348
|
+
'Field__label--disabled': disabled
|
|
2349
|
+
}) }, label),
|
|
2297
2350
|
React__default.createElement(Icon, { className: classNames('Radio__overlay', {
|
|
2298
2351
|
'Radio__overlay--focused': isFocused,
|
|
2299
2352
|
'Radio__overlay--disabled': disabled
|
|
2300
2353
|
}), type: isChecked ? 'radio-checked' : 'radio-unchecked', "aria-hidden": "true", onClick: function () { return onRadioClick(index); } }),
|
|
2301
|
-
React__default.createElement("
|
|
2302
|
-
'
|
|
2303
|
-
}) },
|
|
2354
|
+
labelDescription && (React__default.createElement("span", { id: id + "Desc", className: classNames('Field__labelDescription', {
|
|
2355
|
+
'Field__labelDescription--disabled': disabled
|
|
2356
|
+
}) }, labelDescription))));
|
|
2304
2357
|
});
|
|
2305
2358
|
// reset the input refs array
|
|
2306
2359
|
// refs get clobbered every re-render anyway and this supports "dynamic" radios
|
|
@@ -2313,7 +2366,8 @@ RadioGroup.propTypes = {
|
|
|
2313
2366
|
radios: PropTypes.arrayOf(PropTypes.shape({
|
|
2314
2367
|
value: PropTypes.string.isRequired,
|
|
2315
2368
|
id: PropTypes.string.isRequired,
|
|
2316
|
-
label: PropTypes.string.isRequired
|
|
2369
|
+
label: PropTypes.string.isRequired,
|
|
2370
|
+
labelDescription: PropTypes.string
|
|
2317
2371
|
})).isRequired,
|
|
2318
2372
|
hasLabel: function (props, propName, componentName) {
|
|
2319
2373
|
if (!props['aria-label'] && !props['aria-labelledby']) {
|
|
@@ -2328,8 +2382,8 @@ RadioGroup.displayName = 'RadioGroup';
|
|
|
2328
2382
|
|
|
2329
2383
|
var Checkbox = React.forwardRef(function (_a, ref) {
|
|
2330
2384
|
var id = _a.id, label = _a.label, error = _a.error, checkboxRef = _a.checkboxRef, className = _a.className, onChange = _a.onChange, ariaDescribedby = _a["aria-describedby"], _b = _a.disabled, disabled = _b === void 0 ? false : _b, _c = _a.checked, checked = _c === void 0 ? false : _c, other = tslib.__rest(_a, ["id", "label", "error", "checkboxRef", "className", "onChange", 'aria-describedby', "disabled", "checked"]);
|
|
2331
|
-
var _d = React.useState(checked), isChecked = _d[0], setIsChecked = _d[1];
|
|
2332
|
-
var _e = React.useState(false), focused = _e[0], setFocused = _e[1];
|
|
2385
|
+
var _d = tslib.__read(React.useState(checked), 2), isChecked = _d[0], setIsChecked = _d[1];
|
|
2386
|
+
var _e = tslib.__read(React.useState(false), 2), focused = _e[0], setFocused = _e[1];
|
|
2333
2387
|
var checkRef = React.useRef(null);
|
|
2334
2388
|
React.useEffect(function () {
|
|
2335
2389
|
setIsChecked(checked);
|
|
@@ -2350,6 +2404,9 @@ var Checkbox = React.forwardRef(function (_a, ref) {
|
|
|
2350
2404
|
onChange(e);
|
|
2351
2405
|
}
|
|
2352
2406
|
} }, other)),
|
|
2407
|
+
React__default.createElement("label", { className: classNames('Field__label', {
|
|
2408
|
+
'Field__label--disabled': disabled
|
|
2409
|
+
}), htmlFor: id }, label),
|
|
2353
2410
|
React__default.createElement(Icon, { className: classNames('Checkbox__overlay', {
|
|
2354
2411
|
'Checkbox__overlay--disabled': disabled,
|
|
2355
2412
|
'Checkbox__overlay--focused': focused,
|
|
@@ -2362,11 +2419,8 @@ var Checkbox = React.forwardRef(function (_a, ref) {
|
|
|
2362
2419
|
else {
|
|
2363
2420
|
(_b = checkRef.current) === null || _b === void 0 ? void 0 : _b.click();
|
|
2364
2421
|
}
|
|
2365
|
-
} }),
|
|
2366
|
-
|
|
2367
|
-
'Field__label--disabled': disabled
|
|
2368
|
-
}), htmlFor: id }, label)),
|
|
2369
|
-
React__default.createElement("div", { id: errorId, className: "Error" }, error)));
|
|
2422
|
+
} })),
|
|
2423
|
+
error && (React__default.createElement("div", { id: errorId, className: "Error" }, error))));
|
|
2370
2424
|
});
|
|
2371
2425
|
Checkbox.displayName = 'Checkbox';
|
|
2372
2426
|
|
|
@@ -2473,7 +2527,7 @@ var TextField = /** @class */ (function (_super) {
|
|
|
2473
2527
|
_this.input = input;
|
|
2474
2528
|
setRef(fieldRef, input);
|
|
2475
2529
|
} }, other, inputProps)),
|
|
2476
|
-
React__default.createElement("div", { className: "Error", id: this.errorId }, error)));
|
|
2530
|
+
error && (React__default.createElement("div", { className: "Error", id: this.errorId }, error))));
|
|
2477
2531
|
};
|
|
2478
2532
|
TextField.prototype.onChange = function (e) {
|
|
2479
2533
|
var _a, _b;
|
|
@@ -7913,12 +7967,29 @@ Code.propTypes = {
|
|
|
7913
7967
|
className: PropTypes.string
|
|
7914
7968
|
};
|
|
7915
7969
|
|
|
7970
|
+
function AxeLoader() {
|
|
7971
|
+
return (React__default.createElement("svg", { version: "1.1", xmlns: "http://www.w3.org/2000/svg", x: "0", y: "0", viewBox: "0 0 800 800" },
|
|
7972
|
+
React__default.createElement("path", { fill: "currentColor", d: "M641.4 555.6c-27.2-12.1-59.1.2-71.2 27.3-.5 1-.8 2.1-1.2 3.2H160l227.6-394.3 170.1 292.8 32.4-18.8L387.5 117 95 623.6h474c4.9 13.1 14.8 24.4 28.6 30.5 7.1 3.2 14.5 4.7 21.8 4.7 20.7 0 40.4-11.9 49.3-32 12.1-27.1-.1-59.1-27.3-71.2zm1.6 59.8c-5.8 13-21.1 18.9-34 13.1-13-5.8-18.9-21.1-13.1-34 4.3-9.6 13.7-15.3 23.6-15.3 3.5 0 7.1.7 10.4 2.2 13.1 5.7 18.9 21 13.1 34z" }),
|
|
7973
|
+
React__default.createElement("path", { fill: "currentColor", d: "M379 549.9h-27.6v-16.7c-7.4 13.5-22.8 20.2-39 20.2-37.1 0-58.9-28.9-58.9-61.6 0-36.5 26.4-61.4 58.9-61.4 21.1 0 34 11.2 39 20.5V434H379v115.9zm-97.8-57.4c0 14.3 10.3 35.2 35.2 35.2 15.4 0 25.5-8 30.8-18.6 2.7-5.1 4-10.5 4.4-16.2.2-5.5-.8-11.2-3.2-16.2-4.9-11-15.6-20.5-32.3-20.5-22.4 0-35 18.1-35 36.1v.2zM436.2 488.9l-39-54.8h33.3l22.6 35.6 22.6-35.6h32.9l-38.8 54.8 43.2 61h-34L453.1 510l-26.2 39.9h-33.5l42.8-61z" })));
|
|
7974
|
+
}
|
|
7975
|
+
|
|
7916
7976
|
var LoaderOverlay = React__default.forwardRef(function (_a, ref) {
|
|
7917
|
-
var className = _a.className, other = tslib.__rest(_a, ["className"]);
|
|
7918
|
-
return (React__default.createElement("div", tslib.__assign({ className: classNames('Loader__overlay', className
|
|
7977
|
+
var className = _a.className, variant = _a.variant, label = _a.label, other = tslib.__rest(_a, ["className", "variant", "label"]);
|
|
7978
|
+
return (React__default.createElement("div", tslib.__assign({ className: classNames('Loader__overlay', className, variant === 'large'
|
|
7979
|
+
? 'Loader__overlay--large'
|
|
7980
|
+
: variant === 'small'
|
|
7981
|
+
? 'Loader__overlay--small'
|
|
7982
|
+
: ''), ref: ref }, other),
|
|
7983
|
+
React__default.createElement("div", { className: "Loader__overlay__loader" },
|
|
7984
|
+
React__default.createElement(Loader, { variant: variant }),
|
|
7985
|
+
React__default.createElement(AxeLoader, null)),
|
|
7986
|
+
label ? React__default.createElement("span", { className: "Loader__overlay__label" }, label) : null,
|
|
7987
|
+
other.children));
|
|
7919
7988
|
});
|
|
7920
7989
|
LoaderOverlay.propTypes = {
|
|
7921
|
-
className: PropTypes.string
|
|
7990
|
+
className: PropTypes.string,
|
|
7991
|
+
variant: PropTypes.oneOf(['large', 'small']),
|
|
7992
|
+
label: PropTypes.string
|
|
7922
7993
|
};
|
|
7923
7994
|
LoaderOverlay.displayName = 'LoaderOverlay';
|
|
7924
7995
|
|
|
@@ -7991,12 +8062,19 @@ TableHead.propTypes = {
|
|
|
7991
8062
|
};
|
|
7992
8063
|
|
|
7993
8064
|
var TableHeader = function (_a) {
|
|
7994
|
-
var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
|
|
7995
|
-
return (React__default.createElement("th", tslib.__assign({ className: classNames('TableHeader', className
|
|
8065
|
+
var children = _a.children, sortDirection = _a.sortDirection, onSort = _a.onSort, className = _a.className, other = tslib.__rest(_a, ["children", "sortDirection", "onSort", "className"]);
|
|
8066
|
+
return (React__default.createElement("th", tslib.__assign({ "aria-sort": sortDirection, className: classNames('TableHeader', className, {
|
|
8067
|
+
'TableHeader--sort-ascending': sortDirection === 'ascending',
|
|
8068
|
+
'TableHeader--sort-descending': sortDirection === 'descending'
|
|
8069
|
+
}) }, other), !!onSort && !!sortDirection ? (React__default.createElement("button", { onClick: onSort, className: "TableHeader__sort-button", type: "button" },
|
|
8070
|
+
children,
|
|
8071
|
+
React__default.createElement("span", { "aria-hidden": "true" }, sortDirection === 'none' ? (React__default.createElement(Icon, { type: "sort-triangle" })) : sortDirection === 'ascending' ? (React__default.createElement(Icon, { type: "triangle-up" })) : (React__default.createElement(Icon, { type: "triangle-down" }))))) : (children)));
|
|
7996
8072
|
};
|
|
7997
8073
|
TableHeader.displayName = 'TableHeader';
|
|
7998
8074
|
TableHeader.propTypes = {
|
|
7999
8075
|
children: PropTypes.node.isRequired,
|
|
8076
|
+
sortDirection: PropTypes.string,
|
|
8077
|
+
onSort: PropTypes.func,
|
|
8000
8078
|
className: PropTypes.string
|
|
8001
8079
|
};
|
|
8002
8080
|
|
|
@@ -8021,9 +8099,29 @@ Tab.propTypes = {
|
|
|
8021
8099
|
children: PropTypes.node
|
|
8022
8100
|
};
|
|
8023
8101
|
|
|
8102
|
+
/**
|
|
8103
|
+
* Hook to be used similarly to the React.Component#componentDidMount.
|
|
8104
|
+
* Executes the provided `effect` when `dependencies` change but does not
|
|
8105
|
+
* execute the effect initially (on mount) - only on update.
|
|
8106
|
+
*
|
|
8107
|
+
* @param effect {Function} function to be executed when dependencies update
|
|
8108
|
+
* @param dependencies {Any} any valid dependency argument to React.useEffect
|
|
8109
|
+
*/
|
|
8110
|
+
var useDidUpdate = function (effect, dependencies) {
|
|
8111
|
+
var mounted = React__default.useRef(false);
|
|
8112
|
+
React__default.useEffect(function () {
|
|
8113
|
+
if (!mounted.current) {
|
|
8114
|
+
mounted.current = true;
|
|
8115
|
+
return;
|
|
8116
|
+
}
|
|
8117
|
+
effect();
|
|
8118
|
+
}, dependencies);
|
|
8119
|
+
};
|
|
8120
|
+
|
|
8024
8121
|
var Tabs = function (_a) {
|
|
8025
|
-
var children = _a.children, thin = _a.thin, _b = _a.initialActiveIndex, initialActiveIndex =
|
|
8026
|
-
var
|
|
8122
|
+
var children = _a.children, thin = _a.thin, _b = _a.orientation, orientation = _b === void 0 ? 'horizontal' : _b, _c = _a.initialActiveIndex, initialActiveIndex = _c === void 0 ? 0 : _c, className = _a.className, onChange = _a.onChange, labelProp = tslib.__rest(_a, ["children", "thin", "orientation", "initialActiveIndex", "className", "onChange"]);
|
|
8123
|
+
var _d = tslib.__read(React.useState(initialActiveIndex), 2), activeIndex = _d[0], setActiveIndex = _d[1];
|
|
8124
|
+
var tabsRef = React.useRef(null);
|
|
8027
8125
|
var focusedTabRef = React.useRef(null);
|
|
8028
8126
|
var tabs = React__default.Children.toArray(children).filter(function (child) { return child.type === Tab; });
|
|
8029
8127
|
var tabCount = tabs.length;
|
|
@@ -8033,34 +8131,48 @@ var Tabs = function (_a) {
|
|
|
8033
8131
|
var handleKeyDown = function (event) {
|
|
8034
8132
|
var key = event.key;
|
|
8035
8133
|
var newIndex = activeIndex;
|
|
8134
|
+
var forward;
|
|
8135
|
+
var backward;
|
|
8136
|
+
if (orientation === 'horizontal') {
|
|
8137
|
+
forward = 'ArrowRight';
|
|
8138
|
+
backward = 'ArrowLeft';
|
|
8139
|
+
}
|
|
8140
|
+
else {
|
|
8141
|
+
forward = 'ArrowDown';
|
|
8142
|
+
backward = 'ArrowUp';
|
|
8143
|
+
}
|
|
8036
8144
|
switch (key) {
|
|
8037
|
-
case
|
|
8145
|
+
case backward: {
|
|
8038
8146
|
newIndex = activeIndex - 1;
|
|
8039
8147
|
// circularity
|
|
8040
8148
|
if (newIndex === -1) {
|
|
8041
8149
|
newIndex = tabCount - 1;
|
|
8042
8150
|
}
|
|
8043
8151
|
setActiveIndex(newIndex);
|
|
8152
|
+
event.preventDefault();
|
|
8044
8153
|
break;
|
|
8045
8154
|
}
|
|
8046
|
-
case
|
|
8155
|
+
case forward: {
|
|
8047
8156
|
newIndex = activeIndex + 1;
|
|
8048
8157
|
// circularity
|
|
8049
8158
|
if (newIndex === tabCount) {
|
|
8050
8159
|
newIndex = 0;
|
|
8051
8160
|
}
|
|
8052
8161
|
setActiveIndex(newIndex);
|
|
8162
|
+
event.preventDefault();
|
|
8053
8163
|
break;
|
|
8054
8164
|
}
|
|
8055
8165
|
case 'Home': {
|
|
8056
8166
|
newIndex = 0;
|
|
8057
8167
|
setActiveIndex(newIndex);
|
|
8168
|
+
event.preventDefault();
|
|
8058
8169
|
break;
|
|
8059
8170
|
}
|
|
8060
8171
|
case 'End': {
|
|
8061
8172
|
event.preventDefault();
|
|
8062
8173
|
newIndex = tabCount - 1;
|
|
8063
8174
|
setActiveIndex(newIndex);
|
|
8175
|
+
event.preventDefault();
|
|
8064
8176
|
break;
|
|
8065
8177
|
}
|
|
8066
8178
|
}
|
|
@@ -8070,7 +8182,7 @@ var Tabs = function (_a) {
|
|
|
8070
8182
|
var _b;
|
|
8071
8183
|
var _c = child.props, target = _c.target, propId = _c.id, other = tslib.__rest(_c, ["target", "id"]);
|
|
8072
8184
|
var selected = index === activeIndex;
|
|
8073
|
-
var
|
|
8185
|
+
var _d = tslib.__read(propId ? [propId] : nextId.useId(1, 'tab'), 1), id = _d[0];
|
|
8074
8186
|
React.useEffect(function () {
|
|
8075
8187
|
var _a;
|
|
8076
8188
|
(_a = target.current) === null || _a === void 0 ? void 0 : _a.setAttribute('aria-labelledby', id);
|
|
@@ -8088,10 +8200,15 @@ var Tabs = function (_a) {
|
|
|
8088
8200
|
useDidUpdate(function () {
|
|
8089
8201
|
var _a;
|
|
8090
8202
|
(_a = focusedTabRef.current) === null || _a === void 0 ? void 0 : _a.focus();
|
|
8203
|
+
if (typeof onChange === 'function') {
|
|
8204
|
+
onChange({ activeTabIndex: activeIndex, target: focusedTabRef.current });
|
|
8205
|
+
}
|
|
8091
8206
|
}, [activeIndex]);
|
|
8092
8207
|
return (React__default.createElement("div", { className: classNames('Tabs', className, {
|
|
8093
|
-
'Tabs--thin': thin
|
|
8094
|
-
|
|
8208
|
+
'Tabs--thin': thin,
|
|
8209
|
+
'Tabs--vertical': orientation === 'vertical',
|
|
8210
|
+
'Tabs--horizontal': orientation === 'horizontal'
|
|
8211
|
+
}), ref: tabsRef },
|
|
8095
8212
|
React__default.createElement("ul", tslib.__assign({ role: "tablist", className: "Tablist" }, labelProp, { onKeyDown: handleKeyDown }), tabComponents)));
|
|
8096
8213
|
};
|
|
8097
8214
|
Tabs.displayName = 'Tabs';
|
|
@@ -8101,12 +8218,13 @@ Tabs.propTypes = {
|
|
|
8101
8218
|
'aria-labelledby': PropTypes.string,
|
|
8102
8219
|
initialActiveIndex: PropTypes.number,
|
|
8103
8220
|
thin: PropTypes.bool,
|
|
8221
|
+
orientation: PropTypes.string,
|
|
8104
8222
|
className: PropTypes.string
|
|
8105
8223
|
};
|
|
8106
8224
|
|
|
8107
8225
|
var TabPanel = React.forwardRef(function (_a, ref) {
|
|
8108
8226
|
var children = _a.children, propId = _a.id, className = _a.className, other = tslib.__rest(_a, ["children", "id", "className"]);
|
|
8109
|
-
var
|
|
8227
|
+
var _b = tslib.__read(propId ? [propId] : nextId.useId(1, 'tabpanel'), 1), id = _b[0];
|
|
8110
8228
|
return (React__default.createElement("div", tslib.__assign({ role: "tabpanel", className: classNames('TabPanel', className), id: id, ref: ref }, other), children));
|
|
8111
8229
|
});
|
|
8112
8230
|
TabPanel.displayName = 'TabPanel';
|
|
@@ -8160,7 +8278,7 @@ var Step = function (props) {
|
|
|
8160
8278
|
// list items, therefore it is safe to clobber
|
|
8161
8279
|
// it with the contents of the tooltip in the
|
|
8162
8280
|
// tab stop's accessible name.
|
|
8163
|
-
association: "aria-labelledby" },
|
|
8281
|
+
association: "aria-labelledby", "aria-label": isTooltip(props) ? props.tooltipText : undefined },
|
|
8164
8282
|
React__default.createElement("div", { className: "Stepper__step-indicator" }))) : (React__default.createElement(React__default.Fragment, null,
|
|
8165
8283
|
React__default.createElement("div", { className: "Stepper__step-indicator" }),
|
|
8166
8284
|
'children' in props && (React__default.createElement("div", { className: "Stepper__step-label" }, props.children)))))));
|
|
@@ -8169,6 +8287,7 @@ Step.displayName = 'Step';
|
|
|
8169
8287
|
Step.propTypes = {
|
|
8170
8288
|
children: PropTypes.node,
|
|
8171
8289
|
tooltip: PropTypes.node,
|
|
8290
|
+
tooltipText: PropTypes.string,
|
|
8172
8291
|
className: PropTypes.string
|
|
8173
8292
|
};
|
|
8174
8293
|
var Stepper = function (_a) {
|
|
@@ -8182,15 +8301,37 @@ Stepper.propTypes = {
|
|
|
8182
8301
|
};
|
|
8183
8302
|
|
|
8184
8303
|
var Panel = function (_a) {
|
|
8185
|
-
var
|
|
8186
|
-
|
|
8187
|
-
|
|
8188
|
-
|
|
8189
|
-
|
|
8190
|
-
|
|
8304
|
+
var _b;
|
|
8305
|
+
var children = _a.children, collapsed = _a.collapsed, className = _a.className, heading = _a.heading, other = tslib.__rest(_a, ["children", "collapsed", "className", "heading"]);
|
|
8306
|
+
var Heading = "h" + (typeof heading === 'object' && 'level' in heading && !!heading.level
|
|
8307
|
+
? heading.level
|
|
8308
|
+
: 2);
|
|
8309
|
+
var headingId = typeof heading === 'object' && 'id' in heading ? heading.id : randomId();
|
|
8310
|
+
return (React__default.createElement("section", tslib.__assign({ "aria-labelledby": headingId, className: classNames('Panel', className, (_b = {},
|
|
8311
|
+
_b['Panel--collapsed'] = collapsed,
|
|
8312
|
+
_b)) }, other),
|
|
8313
|
+
React__default.createElement(Heading, { id: headingId, className: "Panel__Heading" }, typeof heading === 'object' && 'text' in heading
|
|
8314
|
+
? heading.text
|
|
8315
|
+
: heading),
|
|
8316
|
+
children));
|
|
8191
8317
|
};
|
|
8192
8318
|
Panel.displayName = 'Panel';
|
|
8193
8319
|
Panel.propTypes = {
|
|
8320
|
+
children: PropTypes.node.isRequired,
|
|
8321
|
+
heading: PropTypes.oneOfType([PropTypes.object, PropTypes.node]).isRequired,
|
|
8322
|
+
className: PropTypes.string
|
|
8323
|
+
};
|
|
8324
|
+
|
|
8325
|
+
var IssuePanel = function (_a) {
|
|
8326
|
+
var className = _a.className, _b = _a.title, title = _b === void 0 ? '' : _b, actions = _a.actions, children = _a.children;
|
|
8327
|
+
return (React__default.createElement("div", { className: classNames('IssuePanel', className) },
|
|
8328
|
+
React__default.createElement("div", { className: "IssuePanel__Header" },
|
|
8329
|
+
title && React__default.createElement("div", { className: "IssuePanel__Header-title" }, title),
|
|
8330
|
+
actions && React__default.createElement("div", { className: "IssuePanel__Header-actions" }, actions)),
|
|
8331
|
+
React__default.createElement("div", { className: "IssuePanel__Content" }, children)));
|
|
8332
|
+
};
|
|
8333
|
+
IssuePanel.displayName = 'IssuePanel';
|
|
8334
|
+
IssuePanel.propTypes = {
|
|
8194
8335
|
children: PropTypes.node.isRequired,
|
|
8195
8336
|
className: PropTypes.string
|
|
8196
8337
|
};
|
|
@@ -8203,31 +8344,129 @@ var ProgressBar = React.forwardRef(function (_a, ref) {
|
|
|
8203
8344
|
});
|
|
8204
8345
|
ProgressBar.displayName = 'ProgressBar';
|
|
8205
8346
|
|
|
8206
|
-
|
|
8207
|
-
|
|
8208
|
-
|
|
8209
|
-
|
|
8210
|
-
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
8216
|
-
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
8222
|
-
|
|
8347
|
+
var Address = function (_a) {
|
|
8348
|
+
var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
|
|
8349
|
+
return (React__default.createElement("address", tslib.__assign({ className: classNames('Address', className) }, other), children));
|
|
8350
|
+
};
|
|
8351
|
+
Address.displayName = 'Address';
|
|
8352
|
+
Address.propTypes = {
|
|
8353
|
+
children: PropTypes.node.isRequired,
|
|
8354
|
+
className: PropTypes.string
|
|
8355
|
+
};
|
|
8356
|
+
var AddressLine = function (_a) {
|
|
8357
|
+
var children = _a.children, className = _a.className, other = tslib.__rest(_a, ["children", "className"]);
|
|
8358
|
+
return children ? (React__default.createElement("div", tslib.__assign({ className: classNames('Address__line', className) }, other), children)) : null;
|
|
8359
|
+
};
|
|
8360
|
+
AddressLine.displayName = 'AddressLine';
|
|
8361
|
+
AddressLine.propTypes = {
|
|
8362
|
+
children: PropTypes.node,
|
|
8363
|
+
className: PropTypes.string
|
|
8364
|
+
};
|
|
8365
|
+
var AddressCityStateZip = function (_a) {
|
|
8366
|
+
var city = _a.city, state = _a.state, zip = _a.zip, className = _a.className, other = tslib.__rest(_a, ["city", "state", "zip", "className"]);
|
|
8367
|
+
return city || state || zip ? (React__default.createElement("div", tslib.__assign({ className: classNames('Address__city-state-zip', className) }, other), [[city, state].filter(Boolean).join(', '), zip]
|
|
8368
|
+
.filter(Boolean)
|
|
8369
|
+
.join(' '))) : null;
|
|
8370
|
+
};
|
|
8371
|
+
AddressCityStateZip.displayName = 'AddressCityStateZip';
|
|
8372
|
+
AddressCityStateZip.propTypes = {
|
|
8373
|
+
city: PropTypes.node,
|
|
8374
|
+
state: PropTypes.node,
|
|
8375
|
+
zip: PropTypes.node,
|
|
8376
|
+
className: PropTypes.string
|
|
8377
|
+
};
|
|
8378
|
+
|
|
8379
|
+
var Pagination = React__default.forwardRef(function (_a, ref) {
|
|
8380
|
+
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, other = tslib.__rest(_a, ["totalItems", "itemsPerPage", "currentPage", "statusLabel", "firstPageLabel", "previousPageLabel", "nextPageLabel", "lastPageLabel", "tooltipPlacement", "onNextPageClick", "onPreviousPageClick", "onFirstPageClick", "onLastPageClick", "className"]);
|
|
8381
|
+
var itemStart = currentPage * itemsPerPage - itemsPerPage + 1;
|
|
8382
|
+
var itemEnd = Math.min(itemStart + itemsPerPage - 1, totalItems);
|
|
8383
|
+
var isLastPage = itemEnd === totalItems;
|
|
8384
|
+
var isFirstPage = currentPage === 1;
|
|
8385
|
+
return (React__default.createElement("div", tslib.__assign({ ref: ref, className: classNames('Pagination', className) }, other),
|
|
8386
|
+
React__default.createElement("ul", null,
|
|
8387
|
+
React__default.createElement("li", null, isFirstPage ? (React__default.createElement(TooltipTabstop, { hideElementOnHidden: true, association: "aria-labelledby", tooltip: firstPageLabel, placement: tooltipPlacement },
|
|
8388
|
+
React__default.createElement(Icon, { type: "chevron-double-left" }))) : (React__default.createElement(IconButton, { icon: "chevron-double-left", tooltipPlacement: tooltipPlacement, label: firstPageLabel, onClick: onFirstPageClick }))),
|
|
8389
|
+
React__default.createElement("li", null, isFirstPage ? (React__default.createElement(TooltipTabstop, { hideElementOnHidden: true, association: "aria-labelledby", tooltip: previousPageLabel, placement: tooltipPlacement },
|
|
8390
|
+
React__default.createElement(Icon, { type: "chevron-left" }))) : (React__default.createElement(IconButton, { icon: "chevron-left", tooltipPlacement: tooltipPlacement, label: previousPageLabel, onClick: onPreviousPageClick }))),
|
|
8391
|
+
React__default.createElement("li", null,
|
|
8392
|
+
React__default.createElement("span", { role: "log", "aria-atomic": "true" }, statusLabel || (React__default.createElement("span", null,
|
|
8393
|
+
"Showing ",
|
|
8394
|
+
React__default.createElement("strong", null, itemStart),
|
|
8395
|
+
" of",
|
|
8396
|
+
' ',
|
|
8397
|
+
React__default.createElement("strong", null, itemEnd),
|
|
8398
|
+
" of ",
|
|
8399
|
+
React__default.createElement("strong", null, totalItems))))),
|
|
8400
|
+
React__default.createElement("li", null, isLastPage ? (React__default.createElement(TooltipTabstop, { hideElementOnHidden: true, association: "aria-labelledby", tooltip: nextPageLabel, placement: tooltipPlacement },
|
|
8401
|
+
React__default.createElement(Icon, { type: "chevron-right" }))) : (React__default.createElement(IconButton, { icon: "chevron-right", tooltipPlacement: tooltipPlacement, label: nextPageLabel, onClick: onNextPageClick }))),
|
|
8402
|
+
React__default.createElement("li", null, isLastPage ? (React__default.createElement(TooltipTabstop, { hideElementOnHidden: true, association: "aria-labelledby", tooltip: lastPageLabel, placement: tooltipPlacement },
|
|
8403
|
+
React__default.createElement(Icon, { type: "chevron-double-right" }))) : (React__default.createElement(IconButton, { icon: "chevron-double-right", tooltipPlacement: tooltipPlacement, label: lastPageLabel, onClick: onLastPageClick }))))));
|
|
8404
|
+
});
|
|
8405
|
+
Pagination.displayName = 'Pagination';
|
|
8406
|
+
Pagination.propTypes = {
|
|
8407
|
+
totalItems: PropTypes.number.isRequired,
|
|
8408
|
+
itemsPerPage: PropTypes.number,
|
|
8409
|
+
currentPage: PropTypes.number,
|
|
8410
|
+
statusLabel: PropTypes.element,
|
|
8411
|
+
firstPageLabel: PropTypes.string,
|
|
8412
|
+
previousPageLabel: PropTypes.string,
|
|
8413
|
+
nextPageLabel: PropTypes.string,
|
|
8414
|
+
lastPageLabel: PropTypes.string,
|
|
8415
|
+
onNextPageClick: PropTypes.func,
|
|
8416
|
+
onPreviousPageClick: PropTypes.func,
|
|
8417
|
+
onFirstPageClick: PropTypes.func,
|
|
8418
|
+
onLastPageClick: PropTypes.func,
|
|
8419
|
+
// @ts-expect-error
|
|
8420
|
+
tooltipPlacement: PropTypes.string,
|
|
8421
|
+
className: PropTypes.string
|
|
8223
8422
|
};
|
|
8224
8423
|
|
|
8424
|
+
var FieldWrap = React__default.forwardRef(function (_a, ref) {
|
|
8425
|
+
var children = _a.children, className = _a.className, _b = _a.as, Component = _b === void 0 ? 'div' : _b, props = tslib.__rest(_a, ["children", "className", "as"]);
|
|
8426
|
+
return (React__default.createElement(Component, tslib.__assign({ ref: ref, className: classNames('Panel', className) }, props), children));
|
|
8427
|
+
});
|
|
8428
|
+
FieldWrap.displayName = 'FieldWrap';
|
|
8429
|
+
FieldWrap.propTypes = {
|
|
8430
|
+
children: PropTypes.node.isRequired,
|
|
8431
|
+
className: PropTypes.string,
|
|
8432
|
+
as: PropTypes.string
|
|
8433
|
+
};
|
|
8434
|
+
|
|
8435
|
+
var Breadcrumb = React.forwardRef(function (_a, ref) {
|
|
8436
|
+
var _b = _a.separator, separator = _b === void 0 ? '/' : _b, className = _a.className, children = _a.children, props = tslib.__rest(_a, ["separator", "className", "children"]);
|
|
8437
|
+
var items = React__default.Children.toArray(children);
|
|
8438
|
+
var childrenWithSeparators = [];
|
|
8439
|
+
items.forEach(function (child, index) {
|
|
8440
|
+
if (index !== items.length - 1) {
|
|
8441
|
+
childrenWithSeparators.push(React__default.createElement(React__default.Fragment, null,
|
|
8442
|
+
child,
|
|
8443
|
+
React__default.createElement("span", { className: "Breadcrumb__Separator", "aria-hidden": "true" }, separator)));
|
|
8444
|
+
}
|
|
8445
|
+
else {
|
|
8446
|
+
childrenWithSeparators.push(child);
|
|
8447
|
+
}
|
|
8448
|
+
});
|
|
8449
|
+
return (React__default.createElement("nav", tslib.__assign({ className: classNames('Breadcrumb', className), ref: ref }, props),
|
|
8450
|
+
React__default.createElement("ol", null, childrenWithSeparators.map(function (child, index) { return (React__default.createElement("li", { className: "Breadcrumb__Item", key: "breadcrumb-" + index }, child)); }))));
|
|
8451
|
+
});
|
|
8452
|
+
Breadcrumb.displayName = 'Breadcrumb';
|
|
8453
|
+
|
|
8454
|
+
var BreadcrumbItem = React.forwardRef(function (_a, ref) {
|
|
8455
|
+
var className = _a.className, children = _a.children, props = tslib.__rest(_a, ["className", "children"]);
|
|
8456
|
+
return (React__default.createElement("span", tslib.__assign({ className: classNames('Breadcrumb__Item', className), ref: ref, "aria-current": "location" }, props), children));
|
|
8457
|
+
});
|
|
8458
|
+
|
|
8459
|
+
var BreadcrumbLink = React.forwardRef(function (_a, ref) {
|
|
8460
|
+
var className = _a.className, _b = _a.as, ElementType = _b === void 0 ? 'a' : _b, children = _a.children, props = tslib.__rest(_a, ["className", "as", "children"]);
|
|
8461
|
+
return (React__default.createElement(ElementType, tslib.__assign({ className: classNames('Link', 'Breadcrumb__Link', className), ref: ref }, props), children));
|
|
8462
|
+
});
|
|
8463
|
+
|
|
8225
8464
|
var LIGHT_THEME_CLASS = 'cauldron--theme-light';
|
|
8226
8465
|
var DARK_THEME_CLASS = 'cauldron--theme-dark';
|
|
8227
8466
|
var ThemeContext = React.createContext({});
|
|
8228
8467
|
var ThemeProvider = function (_a) {
|
|
8229
8468
|
var children = _a.children, _b = _a.context, context = _b === void 0 ? document.body : _b, _c = _a.initialTheme, initialTheme = _c === void 0 ? 'light' : _c;
|
|
8230
|
-
var _d = React.useState(initialTheme), theme = _d[0], setTheme = _d[1];
|
|
8469
|
+
var _d = tslib.__read(React.useState(initialTheme), 2), theme = _d[0], setTheme = _d[1];
|
|
8231
8470
|
var getThemeFromContext = function () {
|
|
8232
8471
|
return context.classList.contains(DARK_THEME_CLASS) ? 'dark' : 'light';
|
|
8233
8472
|
};
|
|
@@ -8240,12 +8479,22 @@ var ThemeProvider = function (_a) {
|
|
|
8240
8479
|
}, [context, theme]);
|
|
8241
8480
|
// Use a MutationObserver to track changes to the classes outside of the context of React
|
|
8242
8481
|
var handleMutation = function (mutationList) {
|
|
8243
|
-
|
|
8244
|
-
|
|
8245
|
-
|
|
8246
|
-
mutation
|
|
8247
|
-
|
|
8482
|
+
var e_1, _a;
|
|
8483
|
+
try {
|
|
8484
|
+
for (var mutationList_1 = tslib.__values(mutationList), mutationList_1_1 = mutationList_1.next(); !mutationList_1_1.done; mutationList_1_1 = mutationList_1.next()) {
|
|
8485
|
+
var mutation = mutationList_1_1.value;
|
|
8486
|
+
if (mutation.type === 'attributes' &&
|
|
8487
|
+
mutation.attributeName === 'class') {
|
|
8488
|
+
setTheme(getThemeFromContext());
|
|
8489
|
+
}
|
|
8490
|
+
}
|
|
8491
|
+
}
|
|
8492
|
+
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
8493
|
+
finally {
|
|
8494
|
+
try {
|
|
8495
|
+
if (mutationList_1_1 && !mutationList_1_1.done && (_a = mutationList_1["return"])) _a.call(mutationList_1);
|
|
8248
8496
|
}
|
|
8497
|
+
finally { if (e_1) throw e_1.error; }
|
|
8249
8498
|
}
|
|
8250
8499
|
};
|
|
8251
8500
|
React.useEffect(function () {
|
|
@@ -8271,10 +8520,16 @@ ThemeProvider.propTypes = {
|
|
|
8271
8520
|
initialTheme: PropTypes.string
|
|
8272
8521
|
};
|
|
8273
8522
|
|
|
8523
|
+
exports.Address = Address;
|
|
8524
|
+
exports.AddressCityStateZip = AddressCityStateZip;
|
|
8525
|
+
exports.AddressLine = AddressLine;
|
|
8274
8526
|
exports.Alert = Alert;
|
|
8275
8527
|
exports.AlertActions = AlertActions;
|
|
8276
8528
|
exports.AlertContent = AlertContent;
|
|
8277
8529
|
exports.AriaIsolate = AriaIsolate;
|
|
8530
|
+
exports.Breadcrumb = Breadcrumb;
|
|
8531
|
+
exports.BreadcrumbItem = BreadcrumbItem;
|
|
8532
|
+
exports.BreadcrumbLink = BreadcrumbLink;
|
|
8278
8533
|
exports.Button = Button;
|
|
8279
8534
|
exports.Card = Card;
|
|
8280
8535
|
exports.CardContent = CardContent;
|
|
@@ -8291,8 +8546,10 @@ exports.Dialog = Dialog;
|
|
|
8291
8546
|
exports.DialogContent = DialogContent;
|
|
8292
8547
|
exports.DialogFooter = DialogFooter;
|
|
8293
8548
|
exports.ExpandCollapsePanel = ExpandCollapsePanel;
|
|
8549
|
+
exports.FieldWrap = FieldWrap;
|
|
8294
8550
|
exports.Icon = Icon;
|
|
8295
8551
|
exports.IconButton = IconButton;
|
|
8552
|
+
exports.IssuePanel = IssuePanel;
|
|
8296
8553
|
exports.Layout = Layout;
|
|
8297
8554
|
exports.Line = Line;
|
|
8298
8555
|
exports.Link = Link;
|
|
@@ -8312,6 +8569,7 @@ exports.OptionsMenuItem = OptionsMenuItem;
|
|
|
8312
8569
|
exports.OptionsMenuList = OptionsMenuList;
|
|
8313
8570
|
exports.OptionsMenuTrigger = OptionsMenuTrigger;
|
|
8314
8571
|
exports.OptionsMenuWrapper = OptionsMenuWrapper;
|
|
8572
|
+
exports.Pagination = Pagination;
|
|
8315
8573
|
exports.Panel = Panel;
|
|
8316
8574
|
exports.PanelTrigger = PanelTrigger$1;
|
|
8317
8575
|
exports.Pointout = Pointout;
|