react-bootstrap 2.7.3 → 2.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/cjs/AbstractNav.d.ts +15 -0
- package/cjs/AbstractNavItem.d.ts +19 -0
- package/cjs/AccordionCollapse.d.ts +1 -1
- package/cjs/AccordionCollapse.js +1 -1
- package/cjs/AccordionToggle.d.ts +11 -0
- package/cjs/Alert.d.ts +1 -1
- package/cjs/Card.d.ts +2 -2
- package/cjs/CardColumns.d.ts +2 -0
- package/cjs/CardContext.d.ts +6 -0
- package/cjs/CardDeck.d.ts +2 -0
- package/cjs/Form.d.ts +10 -4
- package/cjs/FormContext.js +2 -0
- package/cjs/FormFile.d.ts +23 -0
- package/cjs/FormFileInput.d.ts +10 -0
- package/cjs/FormFileLabel.d.ts +7 -0
- package/cjs/InputGroup.js +0 -6
- package/cjs/Jumbotron.d.ts +7 -0
- package/cjs/Media.d.ts +8 -0
- package/cjs/Modal.d.ts +1 -1
- package/cjs/ModalTitle.d.ts +1 -1
- package/cjs/Nav.d.ts +1 -1
- package/cjs/Navbar.d.ts +1 -1
- package/cjs/NavbarContext.js +2 -0
- package/cjs/NavbarOffcanvas.d.ts +1 -1
- package/cjs/Offcanvas.d.ts +1 -1
- package/cjs/OffcanvasTitle.d.ts +1 -1
- package/cjs/PageItem.d.ts +2 -0
- package/cjs/PageItem.js +4 -1
- package/cjs/Pagination.js +0 -8
- package/cjs/PopoverContent.d.ts +5 -0
- package/cjs/PopoverTitle.d.ts +5 -0
- package/cjs/ProgressBar.js +1 -1
- package/cjs/ResponsiveEmbed.d.ts +9 -0
- package/cjs/SafeAnchor.d.ts +17 -0
- package/cjs/SelectableContext.d.ts +5 -0
- package/cjs/TabContext.d.ts +12 -0
- package/cjs/Tabs.d.ts +1 -1
- package/cjs/Tooltip.d.ts +4 -2
- package/cjs/Tooltip.js +5 -1
- package/cjs/TransitionWrapper.d.ts +3 -3
- package/cjs/TransitionWrapper.js +3 -1
- package/cjs/divWithClassName.d.ts +1 -1
- package/cjs/useOverlayOffset.js +15 -5
- package/cjs/usePopperMarginModifiers.d.ts +4 -0
- package/dist/react-bootstrap.js +691 -480
- package/dist/react-bootstrap.min.js +1 -1
- package/dist/react-bootstrap.min.js.LICENSE.txt +3 -3
- package/esm/AbstractNav.d.ts +15 -0
- package/esm/AbstractNavItem.d.ts +19 -0
- package/esm/AccordionCollapse.d.ts +1 -1
- package/esm/AccordionCollapse.js +1 -1
- package/esm/AccordionToggle.d.ts +11 -0
- package/esm/Alert.d.ts +1 -1
- package/esm/Card.d.ts +2 -2
- package/esm/CardColumns.d.ts +2 -0
- package/esm/CardContext.d.ts +6 -0
- package/esm/CardDeck.d.ts +2 -0
- package/esm/Form.d.ts +10 -4
- package/esm/FormFile.d.ts +23 -0
- package/esm/FormFileInput.d.ts +10 -0
- package/esm/FormFileLabel.d.ts +7 -0
- package/esm/InputGroup.js +0 -6
- package/esm/Jumbotron.d.ts +7 -0
- package/esm/Media.d.ts +8 -0
- package/esm/Modal.d.ts +1 -1
- package/esm/ModalTitle.d.ts +1 -1
- package/esm/Nav.d.ts +1 -1
- package/esm/Navbar.d.ts +1 -1
- package/esm/NavbarOffcanvas.d.ts +1 -1
- package/esm/Offcanvas.d.ts +1 -1
- package/esm/OffcanvasTitle.d.ts +1 -1
- package/esm/PageItem.d.ts +2 -0
- package/esm/PageItem.js +4 -1
- package/esm/Pagination.js +0 -8
- package/esm/PopoverContent.d.ts +5 -0
- package/esm/PopoverTitle.d.ts +5 -0
- package/esm/ProgressBar.js +1 -1
- package/esm/ResponsiveEmbed.d.ts +9 -0
- package/esm/SafeAnchor.d.ts +17 -0
- package/esm/SelectableContext.d.ts +5 -0
- package/esm/TabContext.d.ts +12 -0
- package/esm/Tabs.d.ts +1 -1
- package/esm/Tooltip.d.ts +4 -2
- package/esm/Tooltip.js +5 -1
- package/esm/TransitionWrapper.d.ts +3 -3
- package/esm/TransitionWrapper.js +3 -1
- package/esm/divWithClassName.d.ts +1 -1
- package/esm/useOverlayOffset.js +15 -5
- package/esm/usePopperMarginModifiers.d.ts +4 -0
- package/package.json +7 -7
package/dist/react-bootstrap.js
CHANGED
|
@@ -15,9 +15,9 @@ return /******/ (() => { // webpackBootstrap
|
|
|
15
15
|
/***/ ((module, exports) => {
|
|
16
16
|
|
|
17
17
|
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
Copyright (c) 2018 Jed Watson.
|
|
19
|
+
Licensed under the MIT License (MIT), see
|
|
20
|
+
http://jedwatson.github.io/classnames
|
|
21
21
|
*/
|
|
22
22
|
/* global define */
|
|
23
23
|
|
|
@@ -25,6 +25,7 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
|
25
25
|
'use strict';
|
|
26
26
|
|
|
27
27
|
var hasOwn = {}.hasOwnProperty;
|
|
28
|
+
var nativeCodeString = '[native code]';
|
|
28
29
|
function classNames() {
|
|
29
30
|
var classes = [];
|
|
30
31
|
for (var i = 0; i < arguments.length; i++) {
|
|
@@ -41,14 +42,14 @@ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
44
|
} else if (argType === 'object') {
|
|
44
|
-
if (arg.toString
|
|
45
|
-
for (var key in arg) {
|
|
46
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
47
|
-
classes.push(key);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
} else {
|
|
45
|
+
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
51
46
|
classes.push(arg.toString());
|
|
47
|
+
continue;
|
|
48
|
+
}
|
|
49
|
+
for (var key in arg) {
|
|
50
|
+
if (hasOwn.call(arg, key) && arg[key]) {
|
|
51
|
+
classes.push(key);
|
|
52
|
+
}
|
|
52
53
|
}
|
|
53
54
|
}
|
|
54
55
|
}
|
|
@@ -882,91 +883,91 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
882
883
|
|
|
883
884
|
// EXPORTS
|
|
884
885
|
__webpack_require__.d(__webpack_exports__, {
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
886
|
+
Accordion: () => (/* reexport */ src_Accordion),
|
|
887
|
+
AccordionButton: () => (/* reexport */ src_AccordionButton),
|
|
888
|
+
AccordionCollapse: () => (/* reexport */ src_AccordionCollapse),
|
|
889
|
+
AccordionContext: () => (/* reexport */ AccordionContext),
|
|
890
|
+
Alert: () => (/* reexport */ src_Alert),
|
|
891
|
+
Anchor: () => (/* reexport */ src_Anchor),
|
|
892
|
+
Badge: () => (/* reexport */ src_Badge),
|
|
893
|
+
Breadcrumb: () => (/* reexport */ src_Breadcrumb),
|
|
894
|
+
BreadcrumbItem: () => (/* reexport */ src_BreadcrumbItem),
|
|
895
|
+
Button: () => (/* reexport */ src_Button),
|
|
896
|
+
ButtonGroup: () => (/* reexport */ src_ButtonGroup),
|
|
897
|
+
ButtonToolbar: () => (/* reexport */ src_ButtonToolbar),
|
|
898
|
+
Card: () => (/* reexport */ src_Card),
|
|
899
|
+
CardGroup: () => (/* reexport */ CardGroup),
|
|
900
|
+
CardImg: () => (/* reexport */ src_CardImg),
|
|
901
|
+
Carousel: () => (/* reexport */ src_Carousel),
|
|
902
|
+
CarouselItem: () => (/* reexport */ src_CarouselItem),
|
|
903
|
+
CloseButton: () => (/* reexport */ src_CloseButton),
|
|
904
|
+
Col: () => (/* reexport */ src_Col),
|
|
905
|
+
Collapse: () => (/* reexport */ src_Collapse),
|
|
906
|
+
Container: () => (/* reexport */ src_Container),
|
|
907
|
+
Dropdown: () => (/* reexport */ src_Dropdown),
|
|
908
|
+
DropdownButton: () => (/* reexport */ src_DropdownButton),
|
|
909
|
+
Fade: () => (/* reexport */ src_Fade),
|
|
910
|
+
Figure: () => (/* reexport */ src_Figure),
|
|
911
|
+
FloatingLabel: () => (/* reexport */ src_FloatingLabel),
|
|
912
|
+
Form: () => (/* reexport */ src_Form),
|
|
913
|
+
FormCheck: () => (/* reexport */ src_FormCheck),
|
|
914
|
+
FormControl: () => (/* reexport */ src_FormControl),
|
|
915
|
+
FormFloating: () => (/* reexport */ FormFloating),
|
|
916
|
+
FormGroup: () => (/* reexport */ src_FormGroup),
|
|
917
|
+
FormLabel: () => (/* reexport */ src_FormLabel),
|
|
918
|
+
FormSelect: () => (/* reexport */ src_FormSelect),
|
|
919
|
+
FormText: () => (/* reexport */ src_FormText),
|
|
920
|
+
Image: () => (/* reexport */ src_Image),
|
|
921
|
+
InputGroup: () => (/* reexport */ src_InputGroup),
|
|
922
|
+
ListGroup: () => (/* reexport */ src_ListGroup),
|
|
923
|
+
ListGroupItem: () => (/* reexport */ src_ListGroupItem),
|
|
924
|
+
Modal: () => (/* reexport */ src_Modal),
|
|
925
|
+
ModalBody: () => (/* reexport */ ModalBody),
|
|
926
|
+
ModalDialog: () => (/* reexport */ src_ModalDialog),
|
|
927
|
+
ModalFooter: () => (/* reexport */ ModalFooter),
|
|
928
|
+
ModalHeader: () => (/* reexport */ src_ModalHeader),
|
|
929
|
+
ModalTitle: () => (/* reexport */ ModalTitle),
|
|
930
|
+
Nav: () => (/* reexport */ src_Nav),
|
|
931
|
+
NavDropdown: () => (/* reexport */ src_NavDropdown),
|
|
932
|
+
NavItem: () => (/* reexport */ src_NavItem),
|
|
933
|
+
NavLink: () => (/* reexport */ src_NavLink),
|
|
934
|
+
Navbar: () => (/* reexport */ src_Navbar),
|
|
935
|
+
NavbarBrand: () => (/* reexport */ src_NavbarBrand),
|
|
936
|
+
Offcanvas: () => (/* reexport */ src_Offcanvas),
|
|
937
|
+
OffcanvasBody: () => (/* reexport */ OffcanvasBody),
|
|
938
|
+
OffcanvasHeader: () => (/* reexport */ src_OffcanvasHeader),
|
|
939
|
+
OffcanvasTitle: () => (/* reexport */ OffcanvasTitle),
|
|
940
|
+
Overlay: () => (/* reexport */ src_Overlay),
|
|
941
|
+
OverlayTrigger: () => (/* reexport */ src_OverlayTrigger),
|
|
942
|
+
PageItem: () => (/* reexport */ src_PageItem),
|
|
943
|
+
Pagination: () => (/* reexport */ src_Pagination),
|
|
944
|
+
Placeholder: () => (/* reexport */ src_Placeholder),
|
|
945
|
+
PlaceholderButton: () => (/* reexport */ src_PlaceholderButton),
|
|
946
|
+
Popover: () => (/* reexport */ src_Popover),
|
|
947
|
+
PopoverBody: () => (/* reexport */ PopoverBody),
|
|
948
|
+
PopoverHeader: () => (/* reexport */ PopoverHeader),
|
|
949
|
+
ProgressBar: () => (/* reexport */ src_ProgressBar),
|
|
950
|
+
Ratio: () => (/* reexport */ src_Ratio),
|
|
951
|
+
Row: () => (/* reexport */ src_Row),
|
|
952
|
+
SSRProvider: () => (/* reexport */ SSRProvider),
|
|
953
|
+
Spinner: () => (/* reexport */ src_Spinner),
|
|
954
|
+
SplitButton: () => (/* reexport */ src_SplitButton),
|
|
955
|
+
Stack: () => (/* reexport */ src_Stack),
|
|
956
|
+
Tab: () => (/* reexport */ src_Tab),
|
|
957
|
+
TabContainer: () => (/* reexport */ src_TabContainer),
|
|
958
|
+
TabContent: () => (/* reexport */ TabContent),
|
|
959
|
+
TabPane: () => (/* reexport */ src_TabPane),
|
|
960
|
+
Table: () => (/* reexport */ src_Table),
|
|
961
|
+
Tabs: () => (/* reexport */ src_Tabs),
|
|
962
|
+
ThemeProvider: () => (/* reexport */ src_ThemeProvider),
|
|
963
|
+
Toast: () => (/* reexport */ src_Toast),
|
|
964
|
+
ToastBody: () => (/* reexport */ ToastBody),
|
|
965
|
+
ToastContainer: () => (/* reexport */ src_ToastContainer),
|
|
966
|
+
ToastHeader: () => (/* reexport */ src_ToastHeader),
|
|
967
|
+
ToggleButton: () => (/* reexport */ src_ToggleButton),
|
|
968
|
+
ToggleButtonGroup: () => (/* reexport */ src_ToggleButtonGroup),
|
|
969
|
+
Tooltip: () => (/* reexport */ src_Tooltip),
|
|
970
|
+
useAccordionButton: () => (/* reexport */ useAccordionButton)
|
|
970
971
|
});
|
|
971
972
|
|
|
972
973
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
@@ -1599,6 +1600,10 @@ var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_
|
|
|
1599
1600
|
;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/TransitionGroupContext.js
|
|
1600
1601
|
|
|
1601
1602
|
/* harmony default export */ const TransitionGroupContext = (external_root_React_commonjs2_react_commonjs_react_amd_react_default().createContext(null));
|
|
1603
|
+
;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/utils/reflow.js
|
|
1604
|
+
var forceReflow = function forceReflow(node) {
|
|
1605
|
+
return node.scrollTop;
|
|
1606
|
+
};
|
|
1602
1607
|
;// CONCATENATED MODULE: ./node_modules/react-transition-group/esm/Transition.js
|
|
1603
1608
|
|
|
1604
1609
|
|
|
@@ -1608,6 +1613,7 @@ var external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_
|
|
|
1608
1613
|
|
|
1609
1614
|
|
|
1610
1615
|
|
|
1616
|
+
|
|
1611
1617
|
var UNMOUNTED = 'unmounted';
|
|
1612
1618
|
var EXITED = 'exited';
|
|
1613
1619
|
var ENTERING = 'entering';
|
|
@@ -1808,6 +1814,13 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
1808
1814
|
// nextStatus will always be ENTERING or EXITING.
|
|
1809
1815
|
this.cancelNextCallback();
|
|
1810
1816
|
if (nextStatus === ENTERING) {
|
|
1817
|
+
if (this.props.unmountOnExit || this.props.mountOnEnter) {
|
|
1818
|
+
var node = this.props.nodeRef ? this.props.nodeRef.current : external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().findDOMNode(this); // https://github.com/reactjs/react-transition-group/pull/749
|
|
1819
|
+
// With unmountOnExit or mountOnEnter, the enter animation should happen at the transition between `exited` and `entering`.
|
|
1820
|
+
// To make the animation happen, we have to separate each rendering and avoid being processed as batched.
|
|
1821
|
+
|
|
1822
|
+
if (node) forceReflow(node);
|
|
1823
|
+
}
|
|
1811
1824
|
this.performEnter(mounting);
|
|
1812
1825
|
} else {
|
|
1813
1826
|
this.performExit();
|
|
@@ -2264,7 +2277,9 @@ const TransitionWrapper = /*#__PURE__*/external_root_React_commonjs2_react_commo
|
|
|
2264
2277
|
onExiting: handleExiting,
|
|
2265
2278
|
addEndListener: handleAddEndListener,
|
|
2266
2279
|
nodeRef: nodeRef,
|
|
2267
|
-
children: typeof children === 'function' ? (status, innerProps) =>
|
|
2280
|
+
children: typeof children === 'function' ? (status, innerProps) =>
|
|
2281
|
+
// TODO: Types for RTG missing innerProps, so need to cast.
|
|
2282
|
+
children(status, {
|
|
2268
2283
|
...innerProps,
|
|
2269
2284
|
ref: attachRef
|
|
2270
2285
|
}) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, {
|
|
@@ -2481,7 +2496,7 @@ const AccordionCollapse_propTypes = {
|
|
|
2481
2496
|
};
|
|
2482
2497
|
|
|
2483
2498
|
/**
|
|
2484
|
-
* This component accepts all of [`Collapse`'s props](/utilities/transitions
|
|
2499
|
+
* This component accepts all of [`Collapse`'s props](/docs/utilities/transitions#collapse-1).
|
|
2485
2500
|
*/
|
|
2486
2501
|
const AccordionCollapse = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
|
|
2487
2502
|
as: Component = 'div',
|
|
@@ -3466,18 +3481,16 @@ function Anchor_objectWithoutPropertiesLoose(source, excluded) {
|
|
|
3466
3481
|
}
|
|
3467
3482
|
return target;
|
|
3468
3483
|
}
|
|
3469
|
-
|
|
3470
3484
|
/* eslint-disable jsx-a11y/no-static-element-interactions */
|
|
3471
|
-
|
|
3472
3485
|
/* eslint-disable jsx-a11y/anchor-has-content */
|
|
3473
3486
|
|
|
3474
3487
|
|
|
3475
3488
|
|
|
3476
3489
|
|
|
3490
|
+
|
|
3477
3491
|
function Anchor_isTrivialHref(href) {
|
|
3478
3492
|
return !href || href.trim() === '#';
|
|
3479
3493
|
}
|
|
3480
|
-
|
|
3481
3494
|
/**
|
|
3482
3495
|
* An generic `<a>` component that covers a few A11y cases, ensuring that
|
|
3483
3496
|
* cases where the `href` is missing or trivial like "#" are treated like buttons.
|
|
@@ -4066,6 +4079,10 @@ const Button_propTypes = {
|
|
|
4066
4079
|
* `'outline-primary', 'outline-secondary', 'outline-success', 'outline-danger', 'outline-warning', 'outline-info', 'outline-dark', 'outline-light'`
|
|
4067
4080
|
*/
|
|
4068
4081
|
variant: (prop_types_default()).string,
|
|
4082
|
+
/**
|
|
4083
|
+
* Callback fired when the button is clicked.
|
|
4084
|
+
*/
|
|
4085
|
+
onClick: (prop_types_default()).func,
|
|
4069
4086
|
/**
|
|
4070
4087
|
* Specifies a large or small button.
|
|
4071
4088
|
*
|
|
@@ -4116,7 +4133,7 @@ const Button_Button = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_
|
|
|
4116
4133
|
className: classnames_default()(className, prefix, active && 'active', variant && `${prefix}-${variant}`, size && `${prefix}-${size}`, props.href && disabled && 'disabled')
|
|
4117
4134
|
}, void 0, false, {
|
|
4118
4135
|
fileName: Button_jsxFileName,
|
|
4119
|
-
lineNumber:
|
|
4136
|
+
lineNumber: 100,
|
|
4120
4137
|
columnNumber: 9
|
|
4121
4138
|
}, undefined);
|
|
4122
4139
|
});
|
|
@@ -5402,37 +5419,56 @@ function isShadowRoot(node) {
|
|
|
5402
5419
|
var math_max = Math.max;
|
|
5403
5420
|
var math_min = Math.min;
|
|
5404
5421
|
var round = Math.round;
|
|
5422
|
+
;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/utils/userAgent.js
|
|
5423
|
+
function getUAString() {
|
|
5424
|
+
var uaData = navigator.userAgentData;
|
|
5425
|
+
if (uaData != null && uaData.brands && Array.isArray(uaData.brands)) {
|
|
5426
|
+
return uaData.brands.map(function (item) {
|
|
5427
|
+
return item.brand + "/" + item.version;
|
|
5428
|
+
}).join(' ');
|
|
5429
|
+
}
|
|
5430
|
+
return navigator.userAgent;
|
|
5431
|
+
}
|
|
5432
|
+
;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/isLayoutViewport.js
|
|
5433
|
+
|
|
5434
|
+
function isLayoutViewport() {
|
|
5435
|
+
return !/^((?!chrome|android).)*safari/i.test(getUAString());
|
|
5436
|
+
}
|
|
5405
5437
|
;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getBoundingClientRect.js
|
|
5406
5438
|
|
|
5407
5439
|
|
|
5408
|
-
|
|
5440
|
+
|
|
5441
|
+
|
|
5442
|
+
function getBoundingClientRect(element, includeScale, isFixedStrategy) {
|
|
5409
5443
|
if (includeScale === void 0) {
|
|
5410
5444
|
includeScale = false;
|
|
5411
5445
|
}
|
|
5412
|
-
|
|
5446
|
+
if (isFixedStrategy === void 0) {
|
|
5447
|
+
isFixedStrategy = false;
|
|
5448
|
+
}
|
|
5449
|
+
var clientRect = element.getBoundingClientRect();
|
|
5413
5450
|
var scaleX = 1;
|
|
5414
5451
|
var scaleY = 1;
|
|
5415
|
-
if (isHTMLElement(element)
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
}
|
|
5452
|
+
if (includeScale && isHTMLElement(element)) {
|
|
5453
|
+
scaleX = element.offsetWidth > 0 ? round(clientRect.width) / element.offsetWidth || 1 : 1;
|
|
5454
|
+
scaleY = element.offsetHeight > 0 ? round(clientRect.height) / element.offsetHeight || 1 : 1;
|
|
5455
|
+
}
|
|
5456
|
+
var _ref = isElement(element) ? getWindow(element) : window,
|
|
5457
|
+
visualViewport = _ref.visualViewport;
|
|
5458
|
+
var addVisualOffsets = !isLayoutViewport() && isFixedStrategy;
|
|
5459
|
+
var x = (clientRect.left + (addVisualOffsets && visualViewport ? visualViewport.offsetLeft : 0)) / scaleX;
|
|
5460
|
+
var y = (clientRect.top + (addVisualOffsets && visualViewport ? visualViewport.offsetTop : 0)) / scaleY;
|
|
5461
|
+
var width = clientRect.width / scaleX;
|
|
5462
|
+
var height = clientRect.height / scaleY;
|
|
5427
5463
|
return {
|
|
5428
|
-
width:
|
|
5429
|
-
height:
|
|
5430
|
-
top:
|
|
5431
|
-
right:
|
|
5432
|
-
bottom:
|
|
5433
|
-
left:
|
|
5434
|
-
x:
|
|
5435
|
-
y:
|
|
5464
|
+
width: width,
|
|
5465
|
+
height: height,
|
|
5466
|
+
top: y,
|
|
5467
|
+
right: x + width,
|
|
5468
|
+
bottom: y + height,
|
|
5469
|
+
left: x,
|
|
5470
|
+
x: x,
|
|
5471
|
+
y: y
|
|
5436
5472
|
};
|
|
5437
5473
|
}
|
|
5438
5474
|
;// CONCATENATED MODULE: ./node_modules/@popperjs/core/lib/dom-utils/getLayoutRect.js
|
|
@@ -5530,6 +5566,7 @@ function getParentNode(element) {
|
|
|
5530
5566
|
|
|
5531
5567
|
|
|
5532
5568
|
|
|
5569
|
+
|
|
5533
5570
|
function getTrueOffsetParent(element) {
|
|
5534
5571
|
if (!isHTMLElement(element) ||
|
|
5535
5572
|
// https://github.com/popperjs/popper-core/issues/837
|
|
@@ -5541,8 +5578,8 @@ function getTrueOffsetParent(element) {
|
|
|
5541
5578
|
// return the containing block
|
|
5542
5579
|
|
|
5543
5580
|
function getContainingBlock(element) {
|
|
5544
|
-
var isFirefox =
|
|
5545
|
-
var isIE =
|
|
5581
|
+
var isFirefox = /firefox/i.test(getUAString());
|
|
5582
|
+
var isIE = /Trident/i.test(getUAString());
|
|
5546
5583
|
if (isIE && isHTMLElement(element)) {
|
|
5547
5584
|
// In IE 9, 10 and 11 fixed elements containing block is always established by the viewport
|
|
5548
5585
|
var elementCss = dom_utils_getComputedStyle_getComputedStyle(element);
|
|
@@ -5752,10 +5789,9 @@ var unsetSides = {
|
|
|
5752
5789
|
// Zooming can change the DPR, but it seems to report a value that will
|
|
5753
5790
|
// cleanly divide the values into the appropriate subpixels.
|
|
5754
5791
|
|
|
5755
|
-
function roundOffsetsByDPR(_ref) {
|
|
5792
|
+
function roundOffsetsByDPR(_ref, win) {
|
|
5756
5793
|
var x = _ref.x,
|
|
5757
5794
|
y = _ref.y;
|
|
5758
|
-
var win = window;
|
|
5759
5795
|
var dpr = win.devicePixelRatio || 1;
|
|
5760
5796
|
return {
|
|
5761
5797
|
x: round(x * dpr) / dpr || 0,
|
|
@@ -5828,7 +5864,7 @@ function mapToStyles(_ref2) {
|
|
|
5828
5864
|
var _ref4 = roundOffsets === true ? roundOffsetsByDPR({
|
|
5829
5865
|
x: x,
|
|
5830
5866
|
y: y
|
|
5831
|
-
}) : {
|
|
5867
|
+
}, getWindow(popper)) : {
|
|
5832
5868
|
x: x,
|
|
5833
5869
|
y: y
|
|
5834
5870
|
};
|
|
@@ -5981,31 +6017,20 @@ function getWindowScrollBarX(element) {
|
|
|
5981
6017
|
|
|
5982
6018
|
|
|
5983
6019
|
|
|
5984
|
-
|
|
6020
|
+
|
|
6021
|
+
function getViewportRect(element, strategy) {
|
|
5985
6022
|
var win = getWindow(element);
|
|
5986
6023
|
var html = getDocumentElement(element);
|
|
5987
6024
|
var visualViewport = win.visualViewport;
|
|
5988
6025
|
var width = html.clientWidth;
|
|
5989
6026
|
var height = html.clientHeight;
|
|
5990
6027
|
var x = 0;
|
|
5991
|
-
var y = 0;
|
|
5992
|
-
// can be obscured underneath it.
|
|
5993
|
-
// Also, `html.clientHeight` adds the bottom bar height in Safari iOS, even
|
|
5994
|
-
// if it isn't open, so if this isn't available, the popper will be detected
|
|
5995
|
-
// to overflow the bottom of the screen too early.
|
|
5996
|
-
|
|
6028
|
+
var y = 0;
|
|
5997
6029
|
if (visualViewport) {
|
|
5998
6030
|
width = visualViewport.width;
|
|
5999
|
-
height = visualViewport.height;
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
// Safari returns a number <= 0, usually < -1 when pinch-zoomed
|
|
6003
|
-
// Feature detection fails in mobile emulation mode in Chrome.
|
|
6004
|
-
// Math.abs(win.innerWidth / visualViewport.scale - visualViewport.width) <
|
|
6005
|
-
// 0.001
|
|
6006
|
-
// Fallback here: "Not Safari" userAgent
|
|
6007
|
-
|
|
6008
|
-
if (!/^((?!chrome|android).)*safari/i.test(navigator.userAgent)) {
|
|
6031
|
+
height = visualViewport.height;
|
|
6032
|
+
var layoutViewport = isLayoutViewport();
|
|
6033
|
+
if (layoutViewport || !layoutViewport && strategy === 'fixed') {
|
|
6009
6034
|
x = visualViewport.offsetLeft;
|
|
6010
6035
|
y = visualViewport.offsetTop;
|
|
6011
6036
|
}
|
|
@@ -6119,8 +6144,8 @@ function rectToClientRect(rect) {
|
|
|
6119
6144
|
|
|
6120
6145
|
|
|
6121
6146
|
|
|
6122
|
-
function getInnerBoundingClientRect(element) {
|
|
6123
|
-
var rect = getBoundingClientRect(element);
|
|
6147
|
+
function getInnerBoundingClientRect(element, strategy) {
|
|
6148
|
+
var rect = getBoundingClientRect(element, false, strategy === 'fixed');
|
|
6124
6149
|
rect.top = rect.top + element.clientTop;
|
|
6125
6150
|
rect.left = rect.left + element.clientLeft;
|
|
6126
6151
|
rect.bottom = rect.top + element.clientHeight;
|
|
@@ -6131,8 +6156,8 @@ function getInnerBoundingClientRect(element) {
|
|
|
6131
6156
|
rect.y = rect.top;
|
|
6132
6157
|
return rect;
|
|
6133
6158
|
}
|
|
6134
|
-
function getClientRectFromMixedType(element, clippingParent) {
|
|
6135
|
-
return clippingParent === viewport ? rectToClientRect(getViewportRect(element)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
6159
|
+
function getClientRectFromMixedType(element, clippingParent, strategy) {
|
|
6160
|
+
return clippingParent === viewport ? rectToClientRect(getViewportRect(element, strategy)) : isElement(clippingParent) ? getInnerBoundingClientRect(clippingParent, strategy) : rectToClientRect(getDocumentRect(getDocumentElement(element)));
|
|
6136
6161
|
} // A "clipping parent" is an overflowable container with the characteristic of
|
|
6137
6162
|
// clipping (or hiding) overflowing elements with a position different from
|
|
6138
6163
|
// `initial`
|
|
@@ -6151,18 +6176,18 @@ function getClippingParents(element) {
|
|
|
6151
6176
|
} // Gets the maximum area that the element is visible in due to any number of
|
|
6152
6177
|
// clipping parents
|
|
6153
6178
|
|
|
6154
|
-
function getClippingRect(element, boundary, rootBoundary) {
|
|
6179
|
+
function getClippingRect(element, boundary, rootBoundary, strategy) {
|
|
6155
6180
|
var mainClippingParents = boundary === 'clippingParents' ? getClippingParents(element) : [].concat(boundary);
|
|
6156
6181
|
var clippingParents = [].concat(mainClippingParents, [rootBoundary]);
|
|
6157
6182
|
var firstClippingParent = clippingParents[0];
|
|
6158
6183
|
var clippingRect = clippingParents.reduce(function (accRect, clippingParent) {
|
|
6159
|
-
var rect = getClientRectFromMixedType(element, clippingParent);
|
|
6184
|
+
var rect = getClientRectFromMixedType(element, clippingParent, strategy);
|
|
6160
6185
|
accRect.top = math_max(rect.top, accRect.top);
|
|
6161
6186
|
accRect.right = math_min(rect.right, accRect.right);
|
|
6162
6187
|
accRect.bottom = math_min(rect.bottom, accRect.bottom);
|
|
6163
6188
|
accRect.left = math_max(rect.left, accRect.left);
|
|
6164
6189
|
return accRect;
|
|
6165
|
-
}, getClientRectFromMixedType(element, firstClippingParent));
|
|
6190
|
+
}, getClientRectFromMixedType(element, firstClippingParent, strategy));
|
|
6166
6191
|
clippingRect.width = clippingRect.right - clippingRect.left;
|
|
6167
6192
|
clippingRect.height = clippingRect.bottom - clippingRect.top;
|
|
6168
6193
|
clippingRect.x = clippingRect.left;
|
|
@@ -6247,6 +6272,8 @@ function detectOverflow(state, options) {
|
|
|
6247
6272
|
var _options = options,
|
|
6248
6273
|
_options$placement = _options.placement,
|
|
6249
6274
|
placement = _options$placement === void 0 ? state.placement : _options$placement,
|
|
6275
|
+
_options$strategy = _options.strategy,
|
|
6276
|
+
strategy = _options$strategy === void 0 ? state.strategy : _options$strategy,
|
|
6250
6277
|
_options$boundary = _options.boundary,
|
|
6251
6278
|
boundary = _options$boundary === void 0 ? clippingParents : _options$boundary,
|
|
6252
6279
|
_options$rootBoundary = _options.rootBoundary,
|
|
@@ -6261,7 +6288,7 @@ function detectOverflow(state, options) {
|
|
|
6261
6288
|
var altContext = elementContext === popper ? reference : popper;
|
|
6262
6289
|
var popperRect = state.rects.popper;
|
|
6263
6290
|
var element = state.elements[altBoundary ? altContext : elementContext];
|
|
6264
|
-
var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary);
|
|
6291
|
+
var clippingClientRect = getClippingRect(isElement(element) ? element : element.contextElement || getDocumentElement(state.elements.popper), boundary, rootBoundary, strategy);
|
|
6265
6292
|
var referenceClientRect = getBoundingClientRect(state.elements.reference);
|
|
6266
6293
|
var popperOffsets = computeOffsets({
|
|
6267
6294
|
reference: referenceClientRect,
|
|
@@ -6761,7 +6788,7 @@ function getCompositeRect(elementOrVirtualElement, offsetParent, isFixed) {
|
|
|
6761
6788
|
var isOffsetParentAnElement = isHTMLElement(offsetParent);
|
|
6762
6789
|
var offsetParentIsScaled = isHTMLElement(offsetParent) && isElementScaled(offsetParent);
|
|
6763
6790
|
var documentElement = getDocumentElement(offsetParent);
|
|
6764
|
-
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled);
|
|
6791
|
+
var rect = getBoundingClientRect(elementOrVirtualElement, offsetParentIsScaled, isFixed);
|
|
6765
6792
|
var scroll = {
|
|
6766
6793
|
scrollLeft: 0,
|
|
6767
6794
|
scrollTop: 0
|
|
@@ -7070,9 +7097,10 @@ var createPopper = /*#__PURE__*/(/* unused pure expression or super */ null && (
|
|
|
7070
7097
|
|
|
7071
7098
|
|
|
7072
7099
|
|
|
7073
|
-
// For the common JS build we will turn this file into a bundle with no imports.
|
|
7074
|
-
// This is b/c the Popper lib is all esm files, and would break in a common js only environment
|
|
7075
7100
|
|
|
7101
|
+
|
|
7102
|
+
// For the common JS build we will turn this file into a bundle with no imports.
|
|
7103
|
+
// This is b/c the Popper lib is all esm files, and would break in a common js only environment
|
|
7076
7104
|
const popper_createPopper = popperGenerator({
|
|
7077
7105
|
defaultModifiers: [modifiers_hide, modifiers_popperOffsets, modifiers_computeStyles, eventListeners, modifiers_offset, modifiers_flip, modifiers_preventOverflow, modifiers_arrow]
|
|
7078
7106
|
});
|
|
@@ -7100,7 +7128,9 @@ const disabledApplyStylesModifier = {
|
|
|
7100
7128
|
enabled: false,
|
|
7101
7129
|
phase: 'afterWrite',
|
|
7102
7130
|
fn: () => undefined
|
|
7103
|
-
};
|
|
7131
|
+
};
|
|
7132
|
+
|
|
7133
|
+
// until docjs supports type exports...
|
|
7104
7134
|
|
|
7105
7135
|
const ariaDescribedByModifier = {
|
|
7106
7136
|
name: 'ariaDescribedBy',
|
|
@@ -7152,7 +7182,6 @@ const EMPTY_MODIFIERS = [];
|
|
|
7152
7182
|
*
|
|
7153
7183
|
* @returns {UsePopperState} The popper state
|
|
7154
7184
|
*/
|
|
7155
|
-
|
|
7156
7185
|
function usePopper(referenceElement, popperElement, _ref = {}) {
|
|
7157
7186
|
let {
|
|
7158
7187
|
enabled = true,
|
|
@@ -7239,7 +7268,8 @@ function usePopper(referenceElement, popperElement, _ref = {}) {
|
|
|
7239
7268
|
}
|
|
7240
7269
|
}));
|
|
7241
7270
|
}
|
|
7242
|
-
};
|
|
7271
|
+
};
|
|
7272
|
+
// This is only run once to _create_ the popper
|
|
7243
7273
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
7244
7274
|
}, [enabled, referenceElement, popperElement]);
|
|
7245
7275
|
return popperState;
|
|
@@ -7283,6 +7313,7 @@ const InitialTriggerEvents = {
|
|
|
7283
7313
|
mouseup: 'mousedown',
|
|
7284
7314
|
pointerup: 'pointerdown'
|
|
7285
7315
|
};
|
|
7316
|
+
|
|
7286
7317
|
/**
|
|
7287
7318
|
* The `useClickOutside` hook registers your callback on the document that fires
|
|
7288
7319
|
* when a pointer event is registered outside of the provided ref or element.
|
|
@@ -7293,7 +7324,6 @@ const InitialTriggerEvents = {
|
|
|
7293
7324
|
* @param {boolean=} options.disabled
|
|
7294
7325
|
* @param {string=} options.clickTrigger The DOM event name (click, mousedown, etc) to attach listeners on
|
|
7295
7326
|
*/
|
|
7296
|
-
|
|
7297
7327
|
function useClickOutside(ref, onClickOutside = useClickOutside_noop, {
|
|
7298
7328
|
disabled,
|
|
7299
7329
|
clickTrigger = 'click'
|
|
@@ -7319,17 +7349,19 @@ function useClickOutside(ref, onClickOutside = useClickOutside_noop, {
|
|
|
7319
7349
|
});
|
|
7320
7350
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
7321
7351
|
if (disabled || ref == null) return undefined;
|
|
7322
|
-
const doc = ownerDocument(getRefTarget(ref));
|
|
7323
|
-
// https://github.com/facebook/react/issues/20074
|
|
7352
|
+
const doc = ownerDocument(getRefTarget(ref));
|
|
7324
7353
|
|
|
7354
|
+
// Store the current event to avoid triggering handlers immediately
|
|
7355
|
+
// https://github.com/facebook/react/issues/20074
|
|
7325
7356
|
let currentEvent = (doc.defaultView || window).event;
|
|
7326
7357
|
let removeInitialTriggerListener = null;
|
|
7327
7358
|
if (InitialTriggerEvents[clickTrigger]) {
|
|
7328
7359
|
removeInitialTriggerListener = esm_listen(doc, InitialTriggerEvents[clickTrigger], handleInitialMouse, true);
|
|
7329
|
-
}
|
|
7360
|
+
}
|
|
7361
|
+
|
|
7362
|
+
// Use capture for this listener so it fires before React's listener, to
|
|
7330
7363
|
// avoid false positives in the contains() check below if the target DOM
|
|
7331
7364
|
// element is removed in the React mouse callback.
|
|
7332
|
-
|
|
7333
7365
|
const removeMouseCaptureListener = esm_listen(doc, clickTrigger, handleMouseCapture, true);
|
|
7334
7366
|
const removeMouseListener = esm_listen(doc, clickTrigger, e => {
|
|
7335
7367
|
// skip if this event is the same as the one running when we added the handlers
|
|
@@ -7357,8 +7389,9 @@ function toModifierMap(modifiers) {
|
|
|
7357
7389
|
const result = {};
|
|
7358
7390
|
if (!Array.isArray(modifiers)) {
|
|
7359
7391
|
return modifiers || result;
|
|
7360
|
-
}
|
|
7392
|
+
}
|
|
7361
7393
|
|
|
7394
|
+
// eslint-disable-next-line no-unused-expressions
|
|
7362
7395
|
modifiers == null ? void 0 : modifiers.forEach(m => {
|
|
7363
7396
|
result[m.name] = m;
|
|
7364
7397
|
});
|
|
@@ -7439,6 +7472,7 @@ function DropdownMenu_objectWithoutPropertiesLoose(source, excluded) {
|
|
|
7439
7472
|
|
|
7440
7473
|
|
|
7441
7474
|
const DropdownMenu_noop = () => {};
|
|
7475
|
+
|
|
7442
7476
|
/**
|
|
7443
7477
|
* @memberOf Dropdown
|
|
7444
7478
|
* @param {object} options
|
|
@@ -7449,7 +7483,6 @@ const DropdownMenu_noop = () => {};
|
|
|
7449
7483
|
* @param {string} options.rootCloseEvent The pointer event to listen for when determining "clicks outside" the menu for triggering a close.
|
|
7450
7484
|
* @param {object} options.popperConfig Options passed to the [`usePopper`](/api/usePopper) hook.
|
|
7451
7485
|
*/
|
|
7452
|
-
|
|
7453
7486
|
function useDropdownMenu(options = {}) {
|
|
7454
7487
|
const context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(esm_DropdownContext);
|
|
7455
7488
|
const [arrowElement, attachArrowRef] = useCallbackRef();
|
|
@@ -7514,7 +7547,6 @@ function useDropdownMenu(options = {}) {
|
|
|
7514
7547
|
const defaultProps = {
|
|
7515
7548
|
usePopper: true
|
|
7516
7549
|
};
|
|
7517
|
-
|
|
7518
7550
|
/**
|
|
7519
7551
|
* Also exported as `<Dropdown.Menu>` from `Dropdown`.
|
|
7520
7552
|
*
|
|
@@ -7533,23 +7565,35 @@ function DropdownMenu(_ref) {
|
|
|
7533
7565
|
}
|
|
7534
7566
|
DropdownMenu.displayName = 'DropdownMenu';
|
|
7535
7567
|
DropdownMenu.defaultProps = defaultProps;
|
|
7536
|
-
/** @component */
|
|
7537
7568
|
|
|
7569
|
+
/** @component */
|
|
7538
7570
|
/* harmony default export */ const esm_DropdownMenu = (DropdownMenu);
|
|
7539
|
-
;// CONCATENATED MODULE: ./node_modules/@react-aria/ssr/dist/
|
|
7540
|
-
|
|
7541
|
-
|
|
7542
|
-
|
|
7543
|
-
|
|
7544
|
-
|
|
7545
|
-
|
|
7546
|
-
|
|
7547
|
-
|
|
7548
|
-
|
|
7549
|
-
|
|
7550
|
-
|
|
7551
|
-
|
|
7552
|
-
|
|
7571
|
+
;// CONCATENATED MODULE: ./node_modules/@react-aria/ssr/dist/import.mjs
|
|
7572
|
+
|
|
7573
|
+
|
|
7574
|
+
/*
|
|
7575
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
7576
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7577
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7578
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
7579
|
+
*
|
|
7580
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
7581
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
7582
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
7583
|
+
* governing permissions and limitations under the License.
|
|
7584
|
+
*/ /*
|
|
7585
|
+
* Copyright 2020 Adobe. All rights reserved.
|
|
7586
|
+
* This file is licensed to you under the Apache License, Version 2.0 (the "License");
|
|
7587
|
+
* you may not use this file except in compliance with the License. You may obtain a copy
|
|
7588
|
+
* of the License at http://www.apache.org/licenses/LICENSE-2.0
|
|
7589
|
+
*
|
|
7590
|
+
* Unless required by applicable law or agreed to in writing, software distributed under
|
|
7591
|
+
* the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
|
|
7592
|
+
* OF ANY KIND, either express or implied. See the License for the specific language
|
|
7593
|
+
* governing permissions and limitations under the License.
|
|
7594
|
+
*/ // We must avoid a circular dependency with @react-aria/utils, and this useLayoutEffect is
|
|
7595
|
+
// guarded by a check that it only runs on the client side.
|
|
7596
|
+
// eslint-disable-next-line rulesdir/useLayoutEffectRule
|
|
7553
7597
|
|
|
7554
7598
|
// Default context value to use in case there is no SSRProvider. This is fine for
|
|
7555
7599
|
// client-only apps. In order to support multiple copies of React Aria potentially
|
|
@@ -7557,45 +7601,93 @@ $parcel$export($704cf1d3b684cc5c$exports, "useIsSSR", () => $704cf1d3b684cc5c$ex
|
|
|
7557
7601
|
// will reset this to zero for consistency between server and client, so in the
|
|
7558
7602
|
// SSR case multiple copies of React Aria is not supported.
|
|
7559
7603
|
const $704cf1d3b684cc5c$var$defaultContext = {
|
|
7560
|
-
|
|
7561
|
-
|
|
7604
|
+
prefix: String(Math.round(Math.random() * 10000000000)),
|
|
7605
|
+
current: 0,
|
|
7606
|
+
isSSR: false
|
|
7562
7607
|
};
|
|
7563
|
-
const $704cf1d3b684cc5c$var$SSRContext = /*#__PURE__*/
|
|
7608
|
+
const $704cf1d3b684cc5c$var$SSRContext = /*#__PURE__*/ (0, external_root_React_commonjs2_react_commonjs_react_amd_react_).createContext($704cf1d3b684cc5c$var$defaultContext);
|
|
7564
7609
|
function $704cf1d3b684cc5c$export$9f8ac96af4b1b2ae(props) {
|
|
7565
|
-
|
|
7566
|
-
|
|
7567
|
-
|
|
7568
|
-
|
|
7569
|
-
|
|
7570
|
-
|
|
7571
|
-
|
|
7572
|
-
|
|
7573
|
-
|
|
7574
|
-
|
|
7575
|
-
|
|
7576
|
-
|
|
7577
|
-
|
|
7578
|
-
|
|
7579
|
-
|
|
7580
|
-
|
|
7581
|
-
|
|
7582
|
-
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => defaultId || `react-aria${ctx.prefix}-${++ctx.current}`, [defaultId]);
|
|
7583
|
-
}
|
|
7584
|
-
function $704cf1d3b684cc5c$export$535bd6ca7f90a273() {
|
|
7585
|
-
let cur = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)($704cf1d3b684cc5c$var$SSRContext);
|
|
7586
|
-
let isInSSRContext = cur !== $704cf1d3b684cc5c$var$defaultContext;
|
|
7587
|
-
let [isSSR, setIsSSR] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(isInSSRContext);
|
|
7588
|
-
// If on the client, and the component was initially server rendered,
|
|
7589
|
-
// then schedule a layout effect to update the component after hydration.
|
|
7590
|
-
if (typeof window !== 'undefined' && isInSSRContext)
|
|
7591
|
-
// This if statement technically breaks the rules of hooks, but is safe
|
|
7610
|
+
let cur = (0, external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)($704cf1d3b684cc5c$var$SSRContext);
|
|
7611
|
+
let counter = $704cf1d3b684cc5c$var$useCounter(cur === $704cf1d3b684cc5c$var$defaultContext);
|
|
7612
|
+
let [isSSR, setIsSSR] = (0, external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(true);
|
|
7613
|
+
let value = (0, external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(()=>({
|
|
7614
|
+
// If this is the first SSRProvider, start with an empty string prefix, otherwise
|
|
7615
|
+
// append and increment the counter.
|
|
7616
|
+
prefix: cur === $704cf1d3b684cc5c$var$defaultContext ? "" : `${cur.prefix}-${counter}`,
|
|
7617
|
+
current: 0,
|
|
7618
|
+
isSSR: isSSR
|
|
7619
|
+
}), [
|
|
7620
|
+
cur,
|
|
7621
|
+
counter,
|
|
7622
|
+
isSSR
|
|
7623
|
+
]);
|
|
7624
|
+
// If on the client, and the component was initially server rendered,
|
|
7625
|
+
// then schedule a layout effect to update the component after hydration.
|
|
7626
|
+
if (typeof window !== "undefined") // This if statement technically breaks the rules of hooks, but is safe
|
|
7592
7627
|
// because the condition never changes after mounting.
|
|
7593
7628
|
// eslint-disable-next-line react-hooks/rules-of-hooks
|
|
7594
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(()
|
|
7595
|
-
|
|
7629
|
+
(0, external_root_React_commonjs2_react_commonjs_react_amd_react_.useLayoutEffect)(()=>{
|
|
7630
|
+
setIsSSR(false);
|
|
7596
7631
|
}, []);
|
|
7597
|
-
|
|
7632
|
+
return /*#__PURE__*/ (0, external_root_React_commonjs2_react_commonjs_react_amd_react_).createElement($704cf1d3b684cc5c$var$SSRContext.Provider, {
|
|
7633
|
+
value: value
|
|
7634
|
+
}, props.children);
|
|
7635
|
+
}
|
|
7636
|
+
let $704cf1d3b684cc5c$var$canUseDOM = Boolean(typeof window !== "undefined" && window.document && window.document.createElement);
|
|
7637
|
+
let $704cf1d3b684cc5c$var$componentIds = new WeakMap();
|
|
7638
|
+
function $704cf1d3b684cc5c$var$useCounter(isDisabled = false) {
|
|
7639
|
+
let ctx = (0, external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)($704cf1d3b684cc5c$var$SSRContext);
|
|
7640
|
+
let ref = (0, external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
7641
|
+
if (ref.current === null && !isDisabled) {
|
|
7642
|
+
var _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED, _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner;
|
|
7643
|
+
// In strict mode, React renders components twice, and the ref will be reset to null on the second render.
|
|
7644
|
+
// This means our id counter will be incremented twice instead of once. This is a problem because on the
|
|
7645
|
+
// server, components are only rendered once and so ids generated on the server won't match the client.
|
|
7646
|
+
// In React 18, useId was introduced to solve this, but it is not available in older versions. So to solve this
|
|
7647
|
+
// we need to use some React internals to access the underlying Fiber instance, which is stable between renders.
|
|
7648
|
+
// This is exposed as ReactCurrentOwner in development, which is all we need since StrictMode only runs in development.
|
|
7649
|
+
// To ensure that we only increment the global counter once, we store the starting id for this component in
|
|
7650
|
+
// a weak map associated with the Fiber. On the second render, we reset the global counter to this value.
|
|
7651
|
+
// Since React runs the second render immediately after the first, this is safe.
|
|
7652
|
+
// @ts-ignore
|
|
7653
|
+
let currentOwner = (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED = (0, external_root_React_commonjs2_react_commonjs_react_amd_react_).__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED === void 0 ? void 0 : (_React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner = _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner) === null || _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner === void 0 ? void 0 : _React___SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED_ReactCurrentOwner.current;
|
|
7654
|
+
if (currentOwner) {
|
|
7655
|
+
let prevComponentValue = $704cf1d3b684cc5c$var$componentIds.get(currentOwner);
|
|
7656
|
+
if (prevComponentValue == null) // On the first render, and first call to useId, store the id and state in our weak map.
|
|
7657
|
+
$704cf1d3b684cc5c$var$componentIds.set(currentOwner, {
|
|
7658
|
+
id: ctx.current,
|
|
7659
|
+
state: currentOwner.memoizedState
|
|
7660
|
+
});
|
|
7661
|
+
else if (currentOwner.memoizedState !== prevComponentValue.state) {
|
|
7662
|
+
// On the second render, the memoizedState gets reset by React.
|
|
7663
|
+
// Reset the counter, and remove from the weak map so we don't
|
|
7664
|
+
// do this for subsequent useId calls.
|
|
7665
|
+
ctx.current = prevComponentValue.id;
|
|
7666
|
+
$704cf1d3b684cc5c$var$componentIds.delete(currentOwner);
|
|
7667
|
+
}
|
|
7668
|
+
}
|
|
7669
|
+
ref.current = ++ctx.current;
|
|
7670
|
+
}
|
|
7671
|
+
return ref.current;
|
|
7598
7672
|
}
|
|
7673
|
+
function $704cf1d3b684cc5c$export$619500959fc48b26(defaultId) {
|
|
7674
|
+
let ctx = (0, external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)($704cf1d3b684cc5c$var$SSRContext);
|
|
7675
|
+
// If we are rendering in a non-DOM environment, and there's no SSRProvider,
|
|
7676
|
+
// provide a warning to hint to the developer to add one.
|
|
7677
|
+
if (ctx === $704cf1d3b684cc5c$var$defaultContext && !$704cf1d3b684cc5c$var$canUseDOM) console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");
|
|
7678
|
+
let counter = $704cf1d3b684cc5c$var$useCounter(!!defaultId);
|
|
7679
|
+
return defaultId || `react-aria${ctx.prefix}-${counter}`;
|
|
7680
|
+
}
|
|
7681
|
+
function $704cf1d3b684cc5c$export$535bd6ca7f90a273() {
|
|
7682
|
+
let cur = (0, $89yE2$useContext)($704cf1d3b684cc5c$var$SSRContext);
|
|
7683
|
+
return cur.isSSR;
|
|
7684
|
+
}
|
|
7685
|
+
|
|
7686
|
+
|
|
7687
|
+
|
|
7688
|
+
|
|
7689
|
+
|
|
7690
|
+
//# sourceMappingURL=module.js.map
|
|
7599
7691
|
|
|
7600
7692
|
;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/DropdownToggle.js
|
|
7601
7693
|
|
|
@@ -7609,13 +7701,13 @@ const isRoleMenu = el => {
|
|
|
7609
7701
|
return ((_el$getAttribute = el.getAttribute('role')) == null ? void 0 : _el$getAttribute.toLowerCase()) === 'menu';
|
|
7610
7702
|
};
|
|
7611
7703
|
const DropdownToggle_noop = () => {};
|
|
7704
|
+
|
|
7612
7705
|
/**
|
|
7613
7706
|
* Wires up Dropdown toggle functionality, returning a set a props to attach
|
|
7614
7707
|
* to the element that functions as the dropdown toggle (generally a button).
|
|
7615
7708
|
*
|
|
7616
7709
|
* @memberOf Dropdown
|
|
7617
7710
|
*/
|
|
7618
|
-
|
|
7619
7711
|
function useDropdownToggle() {
|
|
7620
7712
|
const id = $704cf1d3b684cc5c$export$619500959fc48b26();
|
|
7621
7713
|
const {
|
|
@@ -7632,10 +7724,11 @@ function useDropdownToggle() {
|
|
|
7632
7724
|
ref: setToggle || DropdownToggle_noop,
|
|
7633
7725
|
onClick: handleClick,
|
|
7634
7726
|
'aria-expanded': !!show
|
|
7635
|
-
};
|
|
7727
|
+
};
|
|
7728
|
+
|
|
7729
|
+
// This is maybe better down in an effect, but
|
|
7636
7730
|
// the component is going to update anyway when the menu element
|
|
7637
7731
|
// is set so might return new props.
|
|
7638
|
-
|
|
7639
7732
|
if (menuElement && isRoleMenu(menuElement)) {
|
|
7640
7733
|
props['aria-haspopup'] = true;
|
|
7641
7734
|
}
|
|
@@ -7644,7 +7737,6 @@ function useDropdownToggle() {
|
|
|
7644
7737
|
toggle
|
|
7645
7738
|
}];
|
|
7646
7739
|
}
|
|
7647
|
-
|
|
7648
7740
|
/**
|
|
7649
7741
|
* Also exported as `<Dropdown.Toggle>` from `Dropdown`.
|
|
7650
7742
|
*
|
|
@@ -7660,8 +7752,8 @@ function DropdownToggle({
|
|
|
7660
7752
|
});
|
|
7661
7753
|
}
|
|
7662
7754
|
DropdownToggle.displayName = 'DropdownToggle';
|
|
7663
|
-
/** @component */
|
|
7664
7755
|
|
|
7756
|
+
/** @component */
|
|
7665
7757
|
/* harmony default export */ const esm_DropdownToggle = (DropdownToggle);
|
|
7666
7758
|
;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/SelectableContext.js
|
|
7667
7759
|
|
|
@@ -7707,7 +7799,6 @@ function DropdownItem_objectWithoutPropertiesLoose(source, excluded) {
|
|
|
7707
7799
|
|
|
7708
7800
|
|
|
7709
7801
|
|
|
7710
|
-
|
|
7711
7802
|
/**
|
|
7712
7803
|
* Create a dropdown item. Returns a set of props for the dropdown item component
|
|
7713
7804
|
* including an `onClick` handler that prevents selection when the item is disabled
|
|
@@ -7769,13 +7860,13 @@ DropdownItem.displayName = 'DropdownItem';
|
|
|
7769
7860
|
|
|
7770
7861
|
const Context = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext)(canUseDOM ? window : undefined);
|
|
7771
7862
|
const WindowProvider = Context.Provider;
|
|
7863
|
+
|
|
7772
7864
|
/**
|
|
7773
7865
|
* The document "window" placed in React context. Helpful for determining
|
|
7774
7866
|
* SSR context, or when rendering into an iframe.
|
|
7775
7867
|
*
|
|
7776
7868
|
* @returns the current window
|
|
7777
7869
|
*/
|
|
7778
|
-
|
|
7779
7870
|
function useWindow() {
|
|
7780
7871
|
return (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(Context);
|
|
7781
7872
|
}
|
|
@@ -7801,17 +7892,17 @@ function useRefWithUpdate() {
|
|
|
7801
7892
|
const forceUpdate = useForceUpdate();
|
|
7802
7893
|
const ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
7803
7894
|
const attachRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useCallback)(element => {
|
|
7804
|
-
ref.current = element;
|
|
7805
|
-
|
|
7895
|
+
ref.current = element;
|
|
7896
|
+
// ensure that a menu set triggers an update for consumers
|
|
7806
7897
|
forceUpdate();
|
|
7807
7898
|
}, [forceUpdate]);
|
|
7808
7899
|
return [ref, attachRef];
|
|
7809
7900
|
}
|
|
7901
|
+
|
|
7810
7902
|
/**
|
|
7811
7903
|
* @displayName Dropdown
|
|
7812
7904
|
* @public
|
|
7813
7905
|
*/
|
|
7814
|
-
|
|
7815
7906
|
function Dropdown({
|
|
7816
7907
|
defaultShow,
|
|
7817
7908
|
show: rawShow,
|
|
@@ -7823,10 +7914,11 @@ function Dropdown({
|
|
|
7823
7914
|
children
|
|
7824
7915
|
}) {
|
|
7825
7916
|
const window = useWindow();
|
|
7826
|
-
const [show, onToggle] = useUncontrolledProp(rawShow, defaultShow, rawOnToggle);
|
|
7917
|
+
const [show, onToggle] = useUncontrolledProp(rawShow, defaultShow, rawOnToggle);
|
|
7918
|
+
|
|
7919
|
+
// We use normal refs instead of useCallbackRef in order to populate the
|
|
7827
7920
|
// the value as quickly as possible, otherwise the effect to focus the element
|
|
7828
7921
|
// may run before the state value is set
|
|
7829
|
-
|
|
7830
7922
|
const [menuRef, setMenu] = useRefWithUpdate();
|
|
7831
7923
|
const menuElement = menuRef.current;
|
|
7832
7924
|
const [toggleRef, setToggle] = useRefWithUpdate();
|
|
@@ -7881,7 +7973,8 @@ function Dropdown({
|
|
|
7881
7973
|
if (show) maybeFocusFirst();else if (focusInDropdown.current) {
|
|
7882
7974
|
focusInDropdown.current = false;
|
|
7883
7975
|
focusToggle();
|
|
7884
|
-
}
|
|
7976
|
+
}
|
|
7977
|
+
// only `show` should be changing
|
|
7885
7978
|
}, [show, focusInDropdown, focusToggle, maybeFocusFirst]);
|
|
7886
7979
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
7887
7980
|
lastSourceEvent.current = null;
|
|
@@ -7900,9 +7993,10 @@ function Dropdown({
|
|
|
7900
7993
|
} = event;
|
|
7901
7994
|
const target = event.target;
|
|
7902
7995
|
const fromMenu = (_menuRef$current = menuRef.current) == null ? void 0 : _menuRef$current.contains(target);
|
|
7903
|
-
const fromToggle = (_toggleRef$current = toggleRef.current) == null ? void 0 : _toggleRef$current.contains(target);
|
|
7904
|
-
// in inscrutability
|
|
7996
|
+
const fromToggle = (_toggleRef$current = toggleRef.current) == null ? void 0 : _toggleRef$current.contains(target);
|
|
7905
7997
|
|
|
7998
|
+
// Second only to https://github.com/twbs/bootstrap/blob/8cfbf6933b8a0146ac3fbc369f19e520bd1ebdac/js/src/dropdown.js#L400
|
|
7999
|
+
// in inscrutability
|
|
7906
8000
|
const isInput = /input|textarea/i.test(target.tagName);
|
|
7907
8001
|
if (isInput && (key === ' ' || key !== 'Escape' && fromMenu || key === 'Escape' && target.type === 'search')) {
|
|
7908
8002
|
return;
|
|
@@ -9716,13 +9810,6 @@ const InputGroup_propTypes = {
|
|
|
9716
9810
|
hasValidation: (prop_types_default()).bool,
|
|
9717
9811
|
as: (prop_types_default()).elementType
|
|
9718
9812
|
};
|
|
9719
|
-
|
|
9720
|
-
/**
|
|
9721
|
-
*
|
|
9722
|
-
* @property {InputGroupText} Text
|
|
9723
|
-
* @property {InputGroupRadio} Radio
|
|
9724
|
-
* @property {InputGroupCheckbox} Checkbox
|
|
9725
|
-
*/
|
|
9726
9813
|
const InputGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
|
|
9727
9814
|
bsPrefix,
|
|
9728
9815
|
size,
|
|
@@ -9745,12 +9832,12 @@ const InputGroup = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_rea
|
|
|
9745
9832
|
className: classnames_default()(className, bsPrefix, size && `${bsPrefix}-${size}`, hasValidation && 'has-validation')
|
|
9746
9833
|
}, void 0, false, {
|
|
9747
9834
|
fileName: InputGroup_jsxFileName,
|
|
9748
|
-
lineNumber:
|
|
9835
|
+
lineNumber: 79,
|
|
9749
9836
|
columnNumber: 11
|
|
9750
9837
|
}, undefined)
|
|
9751
9838
|
}, void 0, false, {
|
|
9752
9839
|
fileName: InputGroup_jsxFileName,
|
|
9753
|
-
lineNumber:
|
|
9840
|
+
lineNumber: 78,
|
|
9754
9841
|
columnNumber: 9
|
|
9755
9842
|
}, undefined);
|
|
9756
9843
|
});
|
|
@@ -9806,11 +9893,13 @@ function useNavItem({
|
|
|
9806
9893
|
if (navContext) {
|
|
9807
9894
|
if (!role && navContext.role === 'tablist') props.role = 'tab';
|
|
9808
9895
|
const contextControllerId = navContext.getControllerId(key != null ? key : null);
|
|
9809
|
-
const contextControlledId = navContext.getControlledId(key != null ? key : null);
|
|
9896
|
+
const contextControlledId = navContext.getControlledId(key != null ? key : null);
|
|
9810
9897
|
|
|
9898
|
+
// @ts-ignore
|
|
9811
9899
|
props[dataAttr('event-key')] = key;
|
|
9812
9900
|
props.id = contextControllerId || id;
|
|
9813
9901
|
isActive = active == null && key != null ? navContext.activeKey === key : active;
|
|
9902
|
+
|
|
9814
9903
|
/**
|
|
9815
9904
|
* Simplified scenario for `mountOnEnter`.
|
|
9816
9905
|
*
|
|
@@ -9820,7 +9909,6 @@ function useNavItem({
|
|
|
9820
9909
|
*
|
|
9821
9910
|
* @see https://github.com/react-restart/ui/pull/40#issuecomment-1009971561
|
|
9822
9911
|
*/
|
|
9823
|
-
|
|
9824
9912
|
if (isActive || !(tabContext != null && tabContext.unmountOnExit) && !(tabContext != null && tabContext.mountOnEnter)) props['aria-controls'] = contextControlledId;
|
|
9825
9913
|
}
|
|
9826
9914
|
if (props.role === 'tab') {
|
|
@@ -9857,8 +9945,9 @@ const NavItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_
|
|
|
9857
9945
|
const [props, meta] = useNavItem(Object.assign({
|
|
9858
9946
|
key: makeEventKey(eventKey, options.href),
|
|
9859
9947
|
active
|
|
9860
|
-
}, options));
|
|
9948
|
+
}, options));
|
|
9861
9949
|
|
|
9950
|
+
// @ts-ignore
|
|
9862
9951
|
props[dataAttr('active')] = meta.isActive;
|
|
9863
9952
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(Component, Object.assign({}, options, props, {
|
|
9864
9953
|
ref: ref
|
|
@@ -9891,7 +9980,6 @@ function Nav_objectWithoutPropertiesLoose(source, excluded) {
|
|
|
9891
9980
|
|
|
9892
9981
|
|
|
9893
9982
|
|
|
9894
|
-
|
|
9895
9983
|
// eslint-disable-next-line @typescript-eslint/no-empty-function
|
|
9896
9984
|
const Nav_noop = () => {};
|
|
9897
9985
|
const EVENT_KEY_ATTR = dataAttr('event-key');
|
|
@@ -9905,7 +9993,6 @@ const Nav = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_
|
|
|
9905
9993
|
onKeyDown
|
|
9906
9994
|
} = _ref,
|
|
9907
9995
|
props = Nav_objectWithoutPropertiesLoose(_ref, Nav_excluded);
|
|
9908
|
-
|
|
9909
9996
|
// A ref and forceUpdate for refocus, b/c we only want to trigger when needed
|
|
9910
9997
|
// and don't want to reset the set in the effect
|
|
9911
9998
|
const forceUpdate = useForceUpdate();
|
|
@@ -9915,8 +10002,8 @@ const Nav = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_
|
|
|
9915
10002
|
let getControlledId, getControllerId;
|
|
9916
10003
|
if (tabContext) {
|
|
9917
10004
|
role = role || 'tablist';
|
|
9918
|
-
activeKey = tabContext.activeKey;
|
|
9919
|
-
|
|
10005
|
+
activeKey = tabContext.activeKey;
|
|
10006
|
+
// TODO: do we need to duplicate these?
|
|
9920
10007
|
getControlledId = tabContext.getControlledId;
|
|
9921
10008
|
getControllerId = tabContext.getControllerId;
|
|
9922
10009
|
}
|
|
@@ -10220,11 +10307,11 @@ function getBodyScrollbarWidth(ownerDocument = document) {
|
|
|
10220
10307
|
|
|
10221
10308
|
|
|
10222
10309
|
const OPEN_DATA_ATTRIBUTE = dataAttr('modal-open');
|
|
10310
|
+
|
|
10223
10311
|
/**
|
|
10224
10312
|
* Manages a stack of Modals as well as ensuring
|
|
10225
10313
|
* body scrolling is is disabled and padding accounted for
|
|
10226
10314
|
*/
|
|
10227
|
-
|
|
10228
10315
|
class ModalManager {
|
|
10229
10316
|
constructor({
|
|
10230
10317
|
ownerDocument,
|
|
@@ -10242,16 +10329,19 @@ class ModalManager {
|
|
|
10242
10329
|
getElement() {
|
|
10243
10330
|
return (this.ownerDocument || document).body;
|
|
10244
10331
|
}
|
|
10245
|
-
setModalAttributes(_modal) {
|
|
10332
|
+
setModalAttributes(_modal) {
|
|
10333
|
+
// For overriding
|
|
10246
10334
|
}
|
|
10247
|
-
removeModalAttributes(_modal) {
|
|
10335
|
+
removeModalAttributes(_modal) {
|
|
10336
|
+
// For overriding
|
|
10248
10337
|
}
|
|
10249
10338
|
setContainerStyle(containerState) {
|
|
10250
10339
|
const style = {
|
|
10251
10340
|
overflow: 'hidden'
|
|
10252
|
-
};
|
|
10253
|
-
// because we will override it
|
|
10341
|
+
};
|
|
10254
10342
|
|
|
10343
|
+
// we are only interested in the actual `style` here
|
|
10344
|
+
// because we will override it
|
|
10255
10345
|
const paddingProp = this.isRTL ? 'paddingLeft' : 'paddingRight';
|
|
10256
10346
|
const container = this.getElement();
|
|
10257
10347
|
containerState.style = {
|
|
@@ -10299,9 +10389,10 @@ class ModalManager {
|
|
|
10299
10389
|
if (modalIdx === -1) {
|
|
10300
10390
|
return;
|
|
10301
10391
|
}
|
|
10302
|
-
this.modals.splice(modalIdx, 1);
|
|
10303
|
-
// clean up the container
|
|
10392
|
+
this.modals.splice(modalIdx, 1);
|
|
10304
10393
|
|
|
10394
|
+
// if that was the last modal in a container,
|
|
10395
|
+
// clean up the container
|
|
10305
10396
|
if (!this.modals.length && this.handleContainerOverflow) {
|
|
10306
10397
|
this.removeContainerStyle(this.state);
|
|
10307
10398
|
}
|
|
@@ -10345,8 +10436,137 @@ function useWaitForDOMRef(ref, onResolved) {
|
|
|
10345
10436
|
}, [ref, resolvedRef]);
|
|
10346
10437
|
return resolvedRef;
|
|
10347
10438
|
}
|
|
10439
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/NoopTransition.js
|
|
10440
|
+
|
|
10441
|
+
|
|
10442
|
+
|
|
10443
|
+
function NoopTransition({
|
|
10444
|
+
children,
|
|
10445
|
+
in: inProp,
|
|
10446
|
+
onExited,
|
|
10447
|
+
mountOnEnter,
|
|
10448
|
+
unmountOnExit
|
|
10449
|
+
}) {
|
|
10450
|
+
const ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
10451
|
+
const hasEnteredRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(inProp);
|
|
10452
|
+
const handleExited = useEventCallback(onExited);
|
|
10453
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
10454
|
+
if (inProp) hasEnteredRef.current = true;else {
|
|
10455
|
+
handleExited(ref.current);
|
|
10456
|
+
}
|
|
10457
|
+
}, [inProp, handleExited]);
|
|
10458
|
+
const combinedRef = esm_useMergedRefs(ref, children.ref);
|
|
10459
|
+
const child = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(children, {
|
|
10460
|
+
ref: combinedRef
|
|
10461
|
+
});
|
|
10462
|
+
if (inProp) return child;
|
|
10463
|
+
if (unmountOnExit) {
|
|
10464
|
+
return null;
|
|
10465
|
+
}
|
|
10466
|
+
if (!hasEnteredRef.current && mountOnEnter) {
|
|
10467
|
+
return null;
|
|
10468
|
+
}
|
|
10469
|
+
return child;
|
|
10470
|
+
}
|
|
10471
|
+
/* harmony default export */ const esm_NoopTransition = (NoopTransition);
|
|
10472
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/ImperativeTransition.js
|
|
10473
|
+
|
|
10474
|
+
|
|
10475
|
+
|
|
10476
|
+
|
|
10477
|
+
|
|
10478
|
+
|
|
10479
|
+
function useTransition({
|
|
10480
|
+
in: inProp,
|
|
10481
|
+
onTransition
|
|
10482
|
+
}) {
|
|
10483
|
+
const ref = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
10484
|
+
const isInitialRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(true);
|
|
10485
|
+
const handleTransition = useEventCallback(onTransition);
|
|
10486
|
+
useIsomorphicEffect(() => {
|
|
10487
|
+
if (!ref.current) {
|
|
10488
|
+
return undefined;
|
|
10489
|
+
}
|
|
10490
|
+
let stale = false;
|
|
10491
|
+
handleTransition({
|
|
10492
|
+
in: inProp,
|
|
10493
|
+
element: ref.current,
|
|
10494
|
+
initial: isInitialRef.current,
|
|
10495
|
+
isStale: () => stale
|
|
10496
|
+
});
|
|
10497
|
+
return () => {
|
|
10498
|
+
stale = true;
|
|
10499
|
+
};
|
|
10500
|
+
}, [inProp, handleTransition]);
|
|
10501
|
+
useIsomorphicEffect(() => {
|
|
10502
|
+
isInitialRef.current = false;
|
|
10503
|
+
// this is for strict mode
|
|
10504
|
+
return () => {
|
|
10505
|
+
isInitialRef.current = true;
|
|
10506
|
+
};
|
|
10507
|
+
}, []);
|
|
10508
|
+
return ref;
|
|
10509
|
+
}
|
|
10510
|
+
/**
|
|
10511
|
+
* Adapts an imperative transition function to a subset of the RTG `<Transition>` component API.
|
|
10512
|
+
*
|
|
10513
|
+
* ImperativeTransition does not support mounting options or `appear` at the moment, meaning
|
|
10514
|
+
* that it always acts like: `mountOnEnter={true} unmountOnExit={true} appear={true}`
|
|
10515
|
+
*/
|
|
10516
|
+
function ImperativeTransition({
|
|
10517
|
+
children,
|
|
10518
|
+
in: inProp,
|
|
10519
|
+
onExited,
|
|
10520
|
+
onEntered,
|
|
10521
|
+
transition
|
|
10522
|
+
}) {
|
|
10523
|
+
const [exited, setExited] = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(!inProp);
|
|
10524
|
+
|
|
10525
|
+
// TODO: I think this needs to be in an effect
|
|
10526
|
+
if (inProp && exited) {
|
|
10527
|
+
setExited(false);
|
|
10528
|
+
}
|
|
10529
|
+
const ref = useTransition({
|
|
10530
|
+
in: !!inProp,
|
|
10531
|
+
onTransition: options => {
|
|
10532
|
+
const onFinish = () => {
|
|
10533
|
+
if (options.isStale()) return;
|
|
10534
|
+
if (options.in) {
|
|
10535
|
+
onEntered == null ? void 0 : onEntered(options.element, options.initial);
|
|
10536
|
+
} else {
|
|
10537
|
+
setExited(true);
|
|
10538
|
+
onExited == null ? void 0 : onExited(options.element);
|
|
10539
|
+
}
|
|
10540
|
+
};
|
|
10541
|
+
Promise.resolve(transition(options)).then(onFinish, error => {
|
|
10542
|
+
if (!options.in) setExited(true);
|
|
10543
|
+
throw error;
|
|
10544
|
+
});
|
|
10545
|
+
}
|
|
10546
|
+
});
|
|
10547
|
+
const combinedRef = esm_useMergedRefs(ref, children.ref);
|
|
10548
|
+
return exited && !inProp ? null : /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.cloneElement)(children, {
|
|
10549
|
+
ref: combinedRef
|
|
10550
|
+
});
|
|
10551
|
+
}
|
|
10552
|
+
function renderTransition(Component, runTransition, props) {
|
|
10553
|
+
if (Component) {
|
|
10554
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(Component, Object.assign({}, props));
|
|
10555
|
+
}
|
|
10556
|
+
if (runTransition) {
|
|
10557
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(ImperativeTransition, Object.assign({}, props, {
|
|
10558
|
+
transition: runTransition
|
|
10559
|
+
}));
|
|
10560
|
+
}
|
|
10561
|
+
return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_NoopTransition, Object.assign({}, props));
|
|
10562
|
+
}
|
|
10563
|
+
;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/utils.js
|
|
10564
|
+
/* eslint-disable import/prefer-default-export */
|
|
10565
|
+
function isEscKey(e) {
|
|
10566
|
+
return e.code === 'Escape' || e.keyCode === 27;
|
|
10567
|
+
}
|
|
10348
10568
|
;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/Modal.js
|
|
10349
|
-
const Modal_excluded = ["show", "role", "className", "style", "children", "backdrop", "keyboard", "onBackdropClick", "onEscapeKeyDown", "transition", "backdropTransition", "autoFocus", "enforceFocus", "restoreFocus", "restoreFocusOptions", "renderDialog", "renderBackdrop", "manager", "container", "onShow", "onHide", "onExit", "onExited", "onExiting", "onEnter", "onEntering", "onEntered"];
|
|
10569
|
+
const Modal_excluded = ["show", "role", "className", "style", "children", "backdrop", "keyboard", "onBackdropClick", "onEscapeKeyDown", "transition", "runTransition", "backdropTransition", "runBackdropTransition", "autoFocus", "enforceFocus", "restoreFocus", "restoreFocusOptions", "renderDialog", "renderBackdrop", "manager", "container", "onShow", "onHide", "onExit", "onExited", "onExiting", "onEnter", "onEntering", "onEntered"];
|
|
10350
10570
|
function Modal_objectWithoutPropertiesLoose(source, excluded) {
|
|
10351
10571
|
if (source == null) return {};
|
|
10352
10572
|
var target = {};
|
|
@@ -10359,7 +10579,6 @@ function Modal_objectWithoutPropertiesLoose(source, excluded) {
|
|
|
10359
10579
|
}
|
|
10360
10580
|
return target;
|
|
10361
10581
|
}
|
|
10362
|
-
|
|
10363
10582
|
/* eslint-disable @typescript-eslint/no-use-before-define, react/prop-types */
|
|
10364
10583
|
|
|
10365
10584
|
|
|
@@ -10378,6 +10597,9 @@ function Modal_objectWithoutPropertiesLoose(source, excluded) {
|
|
|
10378
10597
|
|
|
10379
10598
|
|
|
10380
10599
|
|
|
10600
|
+
|
|
10601
|
+
|
|
10602
|
+
|
|
10381
10603
|
let manager;
|
|
10382
10604
|
function getManager(window) {
|
|
10383
10605
|
if (!manager) manager = new esm_ModalManager({
|
|
@@ -10416,7 +10638,9 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
|
|
|
10416
10638
|
onBackdropClick,
|
|
10417
10639
|
onEscapeKeyDown,
|
|
10418
10640
|
transition,
|
|
10641
|
+
runTransition,
|
|
10419
10642
|
backdropTransition,
|
|
10643
|
+
runBackdropTransition,
|
|
10420
10644
|
autoFocus = true,
|
|
10421
10645
|
enforceFocus = true,
|
|
10422
10646
|
restoreFocus = true,
|
|
@@ -10445,9 +10669,9 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
|
|
|
10445
10669
|
if (canUseDOM && !prevShow && show) {
|
|
10446
10670
|
lastFocusRef.current = activeElement();
|
|
10447
10671
|
}
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
|
|
10672
|
+
|
|
10673
|
+
// TODO: I think this needs to be in an effect
|
|
10674
|
+
if (show && exited) {
|
|
10451
10675
|
setExited(false);
|
|
10452
10676
|
}
|
|
10453
10677
|
const handleShow = useEventCallback(() => {
|
|
@@ -10459,9 +10683,10 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
|
|
|
10459
10683
|
() => setTimeout(handleEnforceFocus), true);
|
|
10460
10684
|
if (onShow) {
|
|
10461
10685
|
onShow();
|
|
10462
|
-
}
|
|
10463
|
-
// modals before this one is shown.
|
|
10686
|
+
}
|
|
10464
10687
|
|
|
10688
|
+
// autofocus after onShow to not trigger a focus event for previous
|
|
10689
|
+
// modals before this one is shown.
|
|
10465
10690
|
if (autoFocus) {
|
|
10466
10691
|
const currentActiveElement = activeElement(document);
|
|
10467
10692
|
if (modal.dialog && currentActiveElement && !contains_contains(modal.dialog, currentActiveElement)) {
|
|
@@ -10476,30 +10701,33 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
|
|
|
10476
10701
|
removeFocusListenerRef.current == null ? void 0 : removeFocusListenerRef.current();
|
|
10477
10702
|
if (restoreFocus) {
|
|
10478
10703
|
var _lastFocusRef$current;
|
|
10479
|
-
|
|
10480
10704
|
// Support: <=IE11 doesn't support `focus()` on svg elements (RB: #917)
|
|
10481
10705
|
(_lastFocusRef$current = lastFocusRef.current) == null ? void 0 : _lastFocusRef$current.focus == null ? void 0 : _lastFocusRef$current.focus(restoreFocusOptions);
|
|
10482
10706
|
lastFocusRef.current = null;
|
|
10483
10707
|
}
|
|
10484
|
-
});
|
|
10708
|
+
});
|
|
10709
|
+
|
|
10710
|
+
// TODO: try and combine these effects: https://github.com/react-bootstrap/react-overlays/pull/794#discussion_r409954120
|
|
10711
|
+
|
|
10485
10712
|
// Show logic when:
|
|
10486
10713
|
// - show is `true` _and_ `container` has resolved
|
|
10487
|
-
|
|
10488
10714
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
10489
10715
|
if (!show || !container) return;
|
|
10490
10716
|
handleShow();
|
|
10491
|
-
}, [show, container, /* should never change: */
|
|
10492
|
-
|
|
10717
|
+
}, [show, container, /* should never change: */handleShow]);
|
|
10718
|
+
|
|
10719
|
+
// Hide cleanup logic when:
|
|
10493
10720
|
// - `exited` switches to true
|
|
10494
10721
|
// - component unmounts;
|
|
10495
|
-
|
|
10496
10722
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
10497
10723
|
if (!exited) return;
|
|
10498
10724
|
handleHide();
|
|
10499
10725
|
}, [exited, handleHide]);
|
|
10500
10726
|
useWillUnmount(() => {
|
|
10501
10727
|
handleHide();
|
|
10502
|
-
});
|
|
10728
|
+
});
|
|
10729
|
+
|
|
10730
|
+
// --------------------------------
|
|
10503
10731
|
|
|
10504
10732
|
const handleEnforceFocus = useEventCallback(() => {
|
|
10505
10733
|
if (!enforceFocus || !isMounted() || !modal.isTopModal()) {
|
|
@@ -10520,7 +10748,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
|
|
|
10520
10748
|
}
|
|
10521
10749
|
});
|
|
10522
10750
|
const handleDocumentKeyDown = useEventCallback(e => {
|
|
10523
|
-
if (keyboard && e
|
|
10751
|
+
if (keyboard && isEscKey(e) && modal.isTopModal()) {
|
|
10524
10752
|
onEscapeKeyDown == null ? void 0 : onEscapeKeyDown(e);
|
|
10525
10753
|
if (!e.defaultPrevented) {
|
|
10526
10754
|
onHide();
|
|
@@ -10533,8 +10761,7 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
|
|
|
10533
10761
|
setExited(true);
|
|
10534
10762
|
onExited == null ? void 0 : onExited(...args);
|
|
10535
10763
|
};
|
|
10536
|
-
|
|
10537
|
-
if (!container || !(show || Transition && !exited)) {
|
|
10764
|
+
if (!container) {
|
|
10538
10765
|
return null;
|
|
10539
10766
|
}
|
|
10540
10767
|
const dialogProps = Object.assign({
|
|
@@ -10552,34 +10779,32 @@ const Modal = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react
|
|
|
10552
10779
|
role: 'document'
|
|
10553
10780
|
})
|
|
10554
10781
|
}));
|
|
10555
|
-
|
|
10556
|
-
|
|
10557
|
-
|
|
10558
|
-
|
|
10559
|
-
|
|
10560
|
-
|
|
10561
|
-
|
|
10562
|
-
|
|
10563
|
-
|
|
10564
|
-
|
|
10565
|
-
|
|
10566
|
-
|
|
10567
|
-
|
|
10568
|
-
}
|
|
10782
|
+
dialog = renderTransition(transition, runTransition, {
|
|
10783
|
+
unmountOnExit: true,
|
|
10784
|
+
mountOnEnter: true,
|
|
10785
|
+
appear: true,
|
|
10786
|
+
in: !!show,
|
|
10787
|
+
onExit,
|
|
10788
|
+
onExiting,
|
|
10789
|
+
onExited: handleHidden,
|
|
10790
|
+
onEnter,
|
|
10791
|
+
onEntering,
|
|
10792
|
+
onEntered,
|
|
10793
|
+
children: dialog
|
|
10794
|
+
});
|
|
10569
10795
|
let backdropElement = null;
|
|
10570
10796
|
if (backdrop) {
|
|
10571
|
-
const BackdropTransition = backdropTransition;
|
|
10572
10797
|
backdropElement = renderBackdrop({
|
|
10573
10798
|
ref: modal.setBackdropRef,
|
|
10574
10799
|
onClick: handleBackdropClick
|
|
10575
10800
|
});
|
|
10576
|
-
|
|
10577
|
-
|
|
10578
|
-
|
|
10579
|
-
|
|
10580
|
-
|
|
10581
|
-
|
|
10582
|
-
}
|
|
10801
|
+
backdropElement = renderTransition(backdropTransition, runBackdropTransition, {
|
|
10802
|
+
in: !!show,
|
|
10803
|
+
appear: true,
|
|
10804
|
+
mountOnEnter: true,
|
|
10805
|
+
unmountOnExit: true,
|
|
10806
|
+
children: backdropElement
|
|
10807
|
+
});
|
|
10583
10808
|
}
|
|
10584
10809
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(jsx_runtime.Fragment, {
|
|
10585
10810
|
children: /*#__PURE__*/external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().createPortal( /*#__PURE__*/(0,jsx_runtime.jsxs)(jsx_runtime.Fragment, {
|
|
@@ -11426,7 +11651,7 @@ const Nav_propTypes = {
|
|
|
11426
11651
|
/**
|
|
11427
11652
|
* The visual variant of the nav items.
|
|
11428
11653
|
*
|
|
11429
|
-
* @type {('tabs'|'pills')}
|
|
11654
|
+
* @type {('tabs'| 'pills' | 'underline')}
|
|
11430
11655
|
*/
|
|
11431
11656
|
variant: (prop_types_default()).string,
|
|
11432
11657
|
/**
|
|
@@ -12617,9 +12842,8 @@ NavDropdown.propTypes = NavDropdown_propTypes;
|
|
|
12617
12842
|
|
|
12618
12843
|
|
|
12619
12844
|
|
|
12620
|
-
const escapeKeyCode = 27;
|
|
12621
|
-
const useRootClose_noop = () => {};
|
|
12622
12845
|
|
|
12846
|
+
const useRootClose_noop = () => {};
|
|
12623
12847
|
/**
|
|
12624
12848
|
* The `useRootClose` hook registers your callback on the document
|
|
12625
12849
|
* when rendered. Powers the `<Overlay/>` component. This is used achieve modal
|
|
@@ -12642,15 +12866,16 @@ function useRootClose(ref, onRootClose, {
|
|
|
12642
12866
|
clickTrigger
|
|
12643
12867
|
});
|
|
12644
12868
|
const handleKeyUp = useEventCallback(e => {
|
|
12645
|
-
if (e
|
|
12869
|
+
if (isEscKey(e)) {
|
|
12646
12870
|
onClose(e);
|
|
12647
12871
|
}
|
|
12648
12872
|
});
|
|
12649
12873
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
12650
12874
|
if (disabled || ref == null) return undefined;
|
|
12651
|
-
const doc = ownerDocument(getRefTarget(ref));
|
|
12652
|
-
// https://github.com/facebook/react/issues/20074
|
|
12875
|
+
const doc = ownerDocument(getRefTarget(ref));
|
|
12653
12876
|
|
|
12877
|
+
// Store the current event to avoid triggering handlers immediately
|
|
12878
|
+
// https://github.com/facebook/react/issues/20074
|
|
12654
12879
|
let currentEvent = (doc.defaultView || window).event;
|
|
12655
12880
|
const removeKeyupListener = esm_listen(doc, 'keyup', e => {
|
|
12656
12881
|
// skip if this event is the same as the one running when we added the handlers
|
|
@@ -12677,7 +12902,6 @@ function useRootClose(ref, onRootClose, {
|
|
|
12677
12902
|
|
|
12678
12903
|
|
|
12679
12904
|
|
|
12680
|
-
|
|
12681
12905
|
/**
|
|
12682
12906
|
* Built on top of `Popper.js`, the overlay component is
|
|
12683
12907
|
* great for custom tooltip overlays.
|
|
@@ -12689,7 +12913,8 @@ const Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_
|
|
|
12689
12913
|
placement,
|
|
12690
12914
|
containerPadding,
|
|
12691
12915
|
popperConfig = {},
|
|
12692
|
-
transition: Transition
|
|
12916
|
+
transition: Transition,
|
|
12917
|
+
runTransition
|
|
12693
12918
|
} = props;
|
|
12694
12919
|
const [rootElement, attachRef] = useCallbackRef();
|
|
12695
12920
|
const [arrowElement, attachArrowRef] = useCallbackRef();
|
|
@@ -12706,19 +12931,20 @@ const Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_
|
|
|
12706
12931
|
arrowElement,
|
|
12707
12932
|
popperConfig
|
|
12708
12933
|
}));
|
|
12709
|
-
|
|
12710
|
-
|
|
12711
|
-
|
|
12712
|
-
setExited(
|
|
12934
|
+
|
|
12935
|
+
// TODO: I think this needs to be in an effect
|
|
12936
|
+
if (props.show && exited) {
|
|
12937
|
+
setExited(false);
|
|
12713
12938
|
}
|
|
12714
12939
|
const handleHidden = (...args) => {
|
|
12715
12940
|
setExited(true);
|
|
12716
12941
|
if (props.onExited) {
|
|
12717
12942
|
props.onExited(...args);
|
|
12718
12943
|
}
|
|
12719
|
-
};
|
|
12944
|
+
};
|
|
12720
12945
|
|
|
12721
|
-
|
|
12946
|
+
// Don't un-render the overlay while it's transitioning out.
|
|
12947
|
+
const mountOverlay = props.show || !exited;
|
|
12722
12948
|
esm_useRootClose(rootElement, props.onHide, {
|
|
12723
12949
|
disabled: !props.rootClose || props.rootCloseDisabled,
|
|
12724
12950
|
clickTrigger: props.rootCloseEvent
|
|
@@ -12727,6 +12953,13 @@ const Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_
|
|
|
12727
12953
|
// Don't bother showing anything if we don't have to.
|
|
12728
12954
|
return null;
|
|
12729
12955
|
}
|
|
12956
|
+
const {
|
|
12957
|
+
onExit,
|
|
12958
|
+
onExiting,
|
|
12959
|
+
onEnter,
|
|
12960
|
+
onEntering,
|
|
12961
|
+
onEntered
|
|
12962
|
+
} = props;
|
|
12730
12963
|
let child = props.children(Object.assign({}, popper.attributes.popper, {
|
|
12731
12964
|
style: popper.styles.popper,
|
|
12732
12965
|
ref: mergedRef
|
|
@@ -12739,26 +12972,19 @@ const Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_
|
|
|
12739
12972
|
ref: attachArrowRef
|
|
12740
12973
|
})
|
|
12741
12974
|
});
|
|
12742
|
-
|
|
12743
|
-
|
|
12744
|
-
|
|
12745
|
-
|
|
12746
|
-
|
|
12747
|
-
|
|
12748
|
-
|
|
12749
|
-
|
|
12750
|
-
|
|
12751
|
-
|
|
12752
|
-
|
|
12753
|
-
|
|
12754
|
-
|
|
12755
|
-
onExited: handleHidden,
|
|
12756
|
-
onEnter: onEnter,
|
|
12757
|
-
onEntering: onEntering,
|
|
12758
|
-
onEntered: onEntered,
|
|
12759
|
-
children: child
|
|
12760
|
-
});
|
|
12761
|
-
}
|
|
12975
|
+
child = renderTransition(Transition, runTransition, {
|
|
12976
|
+
in: !!props.show,
|
|
12977
|
+
appear: true,
|
|
12978
|
+
mountOnEnter: true,
|
|
12979
|
+
unmountOnExit: true,
|
|
12980
|
+
children: child,
|
|
12981
|
+
onExit,
|
|
12982
|
+
onExiting,
|
|
12983
|
+
onExited: handleHidden,
|
|
12984
|
+
onEnter,
|
|
12985
|
+
onEntering,
|
|
12986
|
+
onEntered
|
|
12987
|
+
});
|
|
12762
12988
|
return container ? /*#__PURE__*/external_root_ReactDOM_commonjs2_react_dom_commonjs_react_dom_amd_react_dom_default().createPortal(child, container) : null;
|
|
12763
12989
|
});
|
|
12764
12990
|
Overlay.displayName = 'Overlay';
|
|
@@ -12904,28 +13130,142 @@ Popover.propTypes = Popover_propTypes;
|
|
|
12904
13130
|
// https://github.com/twbs/bootstrap/blob/5c32767e0e0dbac2d934bcdee03719a65d3f1187/js/src/popover.js#L28
|
|
12905
13131
|
POPPER_OFFSET: [0, 8]
|
|
12906
13132
|
}));
|
|
13133
|
+
;// CONCATENATED MODULE: ./src/Tooltip.tsx
|
|
13134
|
+
var Tooltip_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Tooltip.tsx";
|
|
13135
|
+
|
|
13136
|
+
|
|
13137
|
+
|
|
13138
|
+
|
|
13139
|
+
|
|
13140
|
+
|
|
13141
|
+
|
|
13142
|
+
const Tooltip_propTypes = {
|
|
13143
|
+
/**
|
|
13144
|
+
* @default 'tooltip'
|
|
13145
|
+
*/
|
|
13146
|
+
bsPrefix: (prop_types_default()).string,
|
|
13147
|
+
/**
|
|
13148
|
+
* An html id attribute, necessary for accessibility
|
|
13149
|
+
* @type {string}
|
|
13150
|
+
* @required
|
|
13151
|
+
*/
|
|
13152
|
+
id: (prop_types_default()).string,
|
|
13153
|
+
/**
|
|
13154
|
+
* Sets the direction the Tooltip is positioned towards.
|
|
13155
|
+
*
|
|
13156
|
+
* > This is generally provided by the `Overlay` component positioning the tooltip
|
|
13157
|
+
*/
|
|
13158
|
+
placement: prop_types_default().oneOf(['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']),
|
|
13159
|
+
/**
|
|
13160
|
+
* An Overlay injected set of props for positioning the tooltip arrow.
|
|
13161
|
+
*
|
|
13162
|
+
* > This is generally provided by the `Overlay` component positioning the tooltip
|
|
13163
|
+
*
|
|
13164
|
+
* @type {{ ref: ReactRef, style: Object }}
|
|
13165
|
+
*/
|
|
13166
|
+
arrowProps: prop_types_default().shape({
|
|
13167
|
+
ref: (prop_types_default()).any,
|
|
13168
|
+
style: (prop_types_default()).object
|
|
13169
|
+
}),
|
|
13170
|
+
/**
|
|
13171
|
+
* Whether or not Popper has done its initial measurement and positioning.
|
|
13172
|
+
*/
|
|
13173
|
+
hasDoneInitialMeasure: (prop_types_default()).bool,
|
|
13174
|
+
/** @private */
|
|
13175
|
+
popper: (prop_types_default()).object,
|
|
13176
|
+
/** @private */
|
|
13177
|
+
show: (prop_types_default()).any
|
|
13178
|
+
};
|
|
13179
|
+
const Tooltip = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
|
|
13180
|
+
bsPrefix,
|
|
13181
|
+
placement = 'right',
|
|
13182
|
+
className,
|
|
13183
|
+
style,
|
|
13184
|
+
children,
|
|
13185
|
+
arrowProps,
|
|
13186
|
+
hasDoneInitialMeasure,
|
|
13187
|
+
popper,
|
|
13188
|
+
show,
|
|
13189
|
+
...props
|
|
13190
|
+
}, ref) => {
|
|
13191
|
+
bsPrefix = useBootstrapPrefix(bsPrefix, 'tooltip');
|
|
13192
|
+
const isRTL = useIsRTL();
|
|
13193
|
+
const [primaryPlacement] = (placement == null ? void 0 : placement.split('-')) || [];
|
|
13194
|
+
const bsDirection = getOverlayDirection(primaryPlacement, isRTL);
|
|
13195
|
+
let computedStyle = style;
|
|
13196
|
+
if (show && !hasDoneInitialMeasure) {
|
|
13197
|
+
computedStyle = {
|
|
13198
|
+
...style,
|
|
13199
|
+
...getInitialPopperStyles(popper == null ? void 0 : popper.strategy)
|
|
13200
|
+
};
|
|
13201
|
+
}
|
|
13202
|
+
return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
|
|
13203
|
+
ref: ref,
|
|
13204
|
+
style: computedStyle,
|
|
13205
|
+
role: "tooltip",
|
|
13206
|
+
"x-placement": primaryPlacement,
|
|
13207
|
+
className: classnames_default()(className, bsPrefix, `bs-tooltip-${bsDirection}`),
|
|
13208
|
+
...props,
|
|
13209
|
+
children: [/*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
|
|
13210
|
+
className: "tooltip-arrow",
|
|
13211
|
+
...arrowProps
|
|
13212
|
+
}, void 0, false, {
|
|
13213
|
+
fileName: Tooltip_jsxFileName,
|
|
13214
|
+
lineNumber: 119,
|
|
13215
|
+
columnNumber: 9
|
|
13216
|
+
}, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
|
|
13217
|
+
className: `${bsPrefix}-inner`,
|
|
13218
|
+
children: children
|
|
13219
|
+
}, void 0, false, {
|
|
13220
|
+
fileName: Tooltip_jsxFileName,
|
|
13221
|
+
lineNumber: 120,
|
|
13222
|
+
columnNumber: 9
|
|
13223
|
+
}, undefined)]
|
|
13224
|
+
}, void 0, true, {
|
|
13225
|
+
fileName: Tooltip_jsxFileName,
|
|
13226
|
+
lineNumber: 111,
|
|
13227
|
+
columnNumber: 7
|
|
13228
|
+
}, undefined);
|
|
13229
|
+
});
|
|
13230
|
+
Tooltip.propTypes = Tooltip_propTypes;
|
|
13231
|
+
Tooltip.displayName = 'Tooltip';
|
|
13232
|
+
/* harmony default export */ const src_Tooltip = (Object.assign(Tooltip, {
|
|
13233
|
+
// Default tooltip offset.
|
|
13234
|
+
// https://github.com/twbs/bootstrap/blob/beca2a6c7f6bc88b6449339fc76edcda832c59e5/js/src/tooltip.js#L65
|
|
13235
|
+
TOOLTIP_OFFSET: [0, 6]
|
|
13236
|
+
}));
|
|
12907
13237
|
;// CONCATENATED MODULE: ./src/useOverlayOffset.tsx
|
|
12908
13238
|
|
|
12909
13239
|
|
|
12910
13240
|
|
|
12911
13241
|
|
|
12912
13242
|
|
|
13243
|
+
|
|
12913
13244
|
// This is meant for internal use.
|
|
12914
|
-
// This applies a custom offset to the overlay if it's a popover.
|
|
13245
|
+
// This applies a custom offset to the overlay if it's a popover or tooltip.
|
|
12915
13246
|
function useOverlayOffset(customOffset) {
|
|
12916
13247
|
const overlayRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
12917
13248
|
const popoverClass = useBootstrapPrefix(undefined, 'popover');
|
|
13249
|
+
const tooltipClass = useBootstrapPrefix(undefined, 'tooltip');
|
|
12918
13250
|
const offset = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
|
|
12919
13251
|
name: 'offset',
|
|
12920
13252
|
options: {
|
|
12921
13253
|
offset: () => {
|
|
12922
|
-
if (
|
|
12923
|
-
return customOffset
|
|
13254
|
+
if (customOffset) {
|
|
13255
|
+
return customOffset;
|
|
12924
13256
|
}
|
|
12925
|
-
|
|
13257
|
+
if (overlayRef.current) {
|
|
13258
|
+
if (hasClass(overlayRef.current, popoverClass)) {
|
|
13259
|
+
return src_Popover.POPPER_OFFSET;
|
|
13260
|
+
}
|
|
13261
|
+
if (hasClass(overlayRef.current, tooltipClass)) {
|
|
13262
|
+
return src_Tooltip.TOOLTIP_OFFSET;
|
|
13263
|
+
}
|
|
13264
|
+
}
|
|
13265
|
+
return [0, 0];
|
|
12926
13266
|
}
|
|
12927
13267
|
}
|
|
12928
|
-
}), [customOffset, popoverClass]);
|
|
13268
|
+
}), [customOffset, popoverClass, tooltipClass]);
|
|
12929
13269
|
return [overlayRef, [offset]];
|
|
12930
13270
|
}
|
|
12931
13271
|
;// CONCATENATED MODULE: ./src/Overlay.tsx
|
|
@@ -13330,7 +13670,11 @@ const PageItem_propTypes = {
|
|
|
13330
13670
|
/** The HTML href attribute for the `PageItem`. */
|
|
13331
13671
|
href: (prop_types_default()).string,
|
|
13332
13672
|
/** A callback function for when this component is clicked. */
|
|
13333
|
-
onClick: (prop_types_default()).func
|
|
13673
|
+
onClick: (prop_types_default()).func,
|
|
13674
|
+
/** custom style for the inner component of the PageItem */
|
|
13675
|
+
linkStyle: (prop_types_default()).object,
|
|
13676
|
+
/** custom className for the inner component of the PageItem */
|
|
13677
|
+
linkClassName: (prop_types_default()).string
|
|
13334
13678
|
};
|
|
13335
13679
|
const PageItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
|
|
13336
13680
|
active = false,
|
|
@@ -13339,6 +13683,8 @@ const PageItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react
|
|
|
13339
13683
|
style,
|
|
13340
13684
|
activeLabel = '(current)',
|
|
13341
13685
|
children,
|
|
13686
|
+
linkStyle,
|
|
13687
|
+
linkClassName,
|
|
13342
13688
|
...props
|
|
13343
13689
|
}, ref) => {
|
|
13344
13690
|
const Component = active || disabled ? 'span' : esm_Anchor;
|
|
@@ -13350,24 +13696,25 @@ const PageItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react
|
|
|
13350
13696
|
disabled
|
|
13351
13697
|
}),
|
|
13352
13698
|
children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
|
|
13353
|
-
className:
|
|
13699
|
+
className: classnames_default()('page-link', linkClassName),
|
|
13700
|
+
style: linkStyle,
|
|
13354
13701
|
...props,
|
|
13355
13702
|
children: [children, active && activeLabel && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("span", {
|
|
13356
13703
|
className: "visually-hidden",
|
|
13357
13704
|
children: activeLabel
|
|
13358
13705
|
}, void 0, false, {
|
|
13359
13706
|
fileName: PageItem_jsxFileName,
|
|
13360
|
-
lineNumber:
|
|
13707
|
+
lineNumber: 73,
|
|
13361
13708
|
columnNumber: 15
|
|
13362
13709
|
}, undefined)]
|
|
13363
13710
|
}, void 0, true, {
|
|
13364
13711
|
fileName: PageItem_jsxFileName,
|
|
13365
|
-
lineNumber:
|
|
13712
|
+
lineNumber: 66,
|
|
13366
13713
|
columnNumber: 11
|
|
13367
13714
|
}, undefined)
|
|
13368
13715
|
}, void 0, false, {
|
|
13369
13716
|
fileName: PageItem_jsxFileName,
|
|
13370
|
-
lineNumber:
|
|
13717
|
+
lineNumber: 61,
|
|
13371
13718
|
columnNumber: 9
|
|
13372
13719
|
}, undefined);
|
|
13373
13720
|
});
|
|
@@ -13386,19 +13733,19 @@ function createButton(name, defaultValue, label = name) {
|
|
|
13386
13733
|
children: children || defaultValue
|
|
13387
13734
|
}, void 0, false, {
|
|
13388
13735
|
fileName: PageItem_jsxFileName,
|
|
13389
|
-
lineNumber:
|
|
13736
|
+
lineNumber: 90,
|
|
13390
13737
|
columnNumber: 9
|
|
13391
13738
|
}, this), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("span", {
|
|
13392
13739
|
className: "visually-hidden",
|
|
13393
13740
|
children: label
|
|
13394
13741
|
}, void 0, false, {
|
|
13395
13742
|
fileName: PageItem_jsxFileName,
|
|
13396
|
-
lineNumber:
|
|
13743
|
+
lineNumber: 91,
|
|
13397
13744
|
columnNumber: 9
|
|
13398
13745
|
}, this)]
|
|
13399
13746
|
}, void 0, true, {
|
|
13400
13747
|
fileName: PageItem_jsxFileName,
|
|
13401
|
-
lineNumber:
|
|
13748
|
+
lineNumber: 89,
|
|
13402
13749
|
columnNumber: 7
|
|
13403
13750
|
}, this));
|
|
13404
13751
|
Button.displayName = name;
|
|
@@ -13429,15 +13776,6 @@ const Pagination_propTypes = {
|
|
|
13429
13776
|
*/
|
|
13430
13777
|
size: prop_types_default().oneOf(['sm', 'lg'])
|
|
13431
13778
|
};
|
|
13432
|
-
|
|
13433
|
-
/**
|
|
13434
|
-
* @property {PageItem} Item
|
|
13435
|
-
* @property {PageItem} First
|
|
13436
|
-
* @property {PageItem} Prev
|
|
13437
|
-
* @property {PageItem} Ellipsis
|
|
13438
|
-
* @property {PageItem} Next
|
|
13439
|
-
* @property {PageItem} Last
|
|
13440
|
-
*/
|
|
13441
13779
|
const Pagination = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
|
|
13442
13780
|
bsPrefix,
|
|
13443
13781
|
className,
|
|
@@ -13451,7 +13789,7 @@ const Pagination = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_rea
|
|
|
13451
13789
|
className: classnames_default()(className, decoratedBsPrefix, size && `${decoratedBsPrefix}-${size}`)
|
|
13452
13790
|
}, void 0, false, {
|
|
13453
13791
|
fileName: Pagination_jsxFileName,
|
|
13454
|
-
lineNumber:
|
|
13792
|
+
lineNumber: 35,
|
|
13455
13793
|
columnNumber: 7
|
|
13456
13794
|
}, undefined);
|
|
13457
13795
|
});
|
|
@@ -13586,7 +13924,7 @@ var ProgressBar_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootst
|
|
|
13586
13924
|
const ROUND_PRECISION = 1000;
|
|
13587
13925
|
|
|
13588
13926
|
/**
|
|
13589
|
-
* Validate that children, if any, are instances of
|
|
13927
|
+
* Validate that children, if any, are instances of `ProgressBar`.
|
|
13590
13928
|
*/
|
|
13591
13929
|
function onlyProgressBar(props, propName, componentName) {
|
|
13592
13930
|
const children = props[propName];
|
|
@@ -14229,33 +14567,6 @@ const Stack = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_am
|
|
|
14229
14567
|
Stack.displayName = 'Stack';
|
|
14230
14568
|
Stack.propTypes = Stack_propTypes;
|
|
14231
14569
|
/* harmony default export */ const src_Stack = (Stack);
|
|
14232
|
-
;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/NoopTransition.js
|
|
14233
|
-
|
|
14234
|
-
function NoopTransition({
|
|
14235
|
-
children,
|
|
14236
|
-
in: inProp,
|
|
14237
|
-
mountOnEnter,
|
|
14238
|
-
unmountOnExit
|
|
14239
|
-
}) {
|
|
14240
|
-
const hasEnteredRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(inProp);
|
|
14241
|
-
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(() => {
|
|
14242
|
-
if (inProp) hasEnteredRef.current = true;
|
|
14243
|
-
}, [inProp]);
|
|
14244
|
-
if (inProp) return children; // not in
|
|
14245
|
-
//
|
|
14246
|
-
// if (!mountOnEnter && !unmountOnExit) {
|
|
14247
|
-
// return children;
|
|
14248
|
-
// }
|
|
14249
|
-
|
|
14250
|
-
if (unmountOnExit) {
|
|
14251
|
-
return null;
|
|
14252
|
-
}
|
|
14253
|
-
if (!hasEnteredRef.current && mountOnEnter) {
|
|
14254
|
-
return null;
|
|
14255
|
-
}
|
|
14256
|
-
return children;
|
|
14257
|
-
}
|
|
14258
|
-
/* harmony default export */ const esm_NoopTransition = (NoopTransition);
|
|
14259
14570
|
;// CONCATENATED MODULE: ./node_modules/@restart/ui/esm/TabPanel.js
|
|
14260
14571
|
const TabPanel_excluded = ["active", "eventKey", "mountOnEnter", "transition", "unmountOnExit", "role", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited"],
|
|
14261
14572
|
_excluded2 = ["activeKey", "getControlledId", "getControllerId"],
|
|
@@ -14353,9 +14664,9 @@ const TabPanel = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react
|
|
|
14353
14664
|
mountOnEnter,
|
|
14354
14665
|
unmountOnExit,
|
|
14355
14666
|
transition: Transition = esm_NoopTransition
|
|
14356
|
-
}] = useTabPanel(props);
|
|
14667
|
+
}] = useTabPanel(props);
|
|
14668
|
+
// We provide an empty the TabContext so `<Nav>`s in `<TabPanel>`s don't
|
|
14357
14669
|
// conflict with the top level one.
|
|
14358
|
-
|
|
14359
14670
|
return /*#__PURE__*/(0,jsx_runtime.jsx)(esm_TabContext.Provider, {
|
|
14360
14671
|
value: null,
|
|
14361
14672
|
children: /*#__PURE__*/(0,jsx_runtime.jsx)(esm_SelectableContext.Provider, {
|
|
@@ -14804,7 +15115,7 @@ const Tabs_propTypes = {
|
|
|
14804
15115
|
/**
|
|
14805
15116
|
* Navigation style
|
|
14806
15117
|
*
|
|
14807
|
-
* @type {('tabs'| 'pills')}
|
|
15118
|
+
* @type {('tabs'| 'pills' | 'underline')}
|
|
14808
15119
|
*/
|
|
14809
15120
|
variant: (prop_types_default()).string,
|
|
14810
15121
|
/**
|
|
@@ -15436,106 +15747,6 @@ ToggleButtonGroup.propTypes = ToggleButtonGroup_propTypes;
|
|
|
15436
15747
|
/* harmony default export */ const src_ToggleButtonGroup = (Object.assign(ToggleButtonGroup, {
|
|
15437
15748
|
Button: src_ToggleButton
|
|
15438
15749
|
}));
|
|
15439
|
-
;// CONCATENATED MODULE: ./src/Tooltip.tsx
|
|
15440
|
-
var Tooltip_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Tooltip.tsx";
|
|
15441
|
-
|
|
15442
|
-
|
|
15443
|
-
|
|
15444
|
-
|
|
15445
|
-
|
|
15446
|
-
|
|
15447
|
-
|
|
15448
|
-
const Tooltip_propTypes = {
|
|
15449
|
-
/**
|
|
15450
|
-
* @default 'tooltip'
|
|
15451
|
-
*/
|
|
15452
|
-
bsPrefix: (prop_types_default()).string,
|
|
15453
|
-
/**
|
|
15454
|
-
* An html id attribute, necessary for accessibility
|
|
15455
|
-
* @type {string}
|
|
15456
|
-
* @required
|
|
15457
|
-
*/
|
|
15458
|
-
id: (prop_types_default()).string,
|
|
15459
|
-
/**
|
|
15460
|
-
* Sets the direction the Tooltip is positioned towards.
|
|
15461
|
-
*
|
|
15462
|
-
* > This is generally provided by the `Overlay` component positioning the tooltip
|
|
15463
|
-
*/
|
|
15464
|
-
placement: prop_types_default().oneOf(['auto-start', 'auto', 'auto-end', 'top-start', 'top', 'top-end', 'right-start', 'right', 'right-end', 'bottom-end', 'bottom', 'bottom-start', 'left-end', 'left', 'left-start']),
|
|
15465
|
-
/**
|
|
15466
|
-
* An Overlay injected set of props for positioning the tooltip arrow.
|
|
15467
|
-
*
|
|
15468
|
-
* > This is generally provided by the `Overlay` component positioning the tooltip
|
|
15469
|
-
*
|
|
15470
|
-
* @type {{ ref: ReactRef, style: Object }}
|
|
15471
|
-
*/
|
|
15472
|
-
arrowProps: prop_types_default().shape({
|
|
15473
|
-
ref: (prop_types_default()).any,
|
|
15474
|
-
style: (prop_types_default()).object
|
|
15475
|
-
}),
|
|
15476
|
-
/**
|
|
15477
|
-
* Whether or not Popper has done its initial measurement and positioning.
|
|
15478
|
-
*/
|
|
15479
|
-
hasDoneInitialMeasure: (prop_types_default()).bool,
|
|
15480
|
-
/** @private */
|
|
15481
|
-
popper: (prop_types_default()).object,
|
|
15482
|
-
/** @private */
|
|
15483
|
-
show: (prop_types_default()).any
|
|
15484
|
-
};
|
|
15485
|
-
const Tooltip = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
|
|
15486
|
-
bsPrefix,
|
|
15487
|
-
placement = 'right',
|
|
15488
|
-
className,
|
|
15489
|
-
style,
|
|
15490
|
-
children,
|
|
15491
|
-
arrowProps,
|
|
15492
|
-
hasDoneInitialMeasure,
|
|
15493
|
-
popper,
|
|
15494
|
-
show,
|
|
15495
|
-
...props
|
|
15496
|
-
}, ref) => {
|
|
15497
|
-
bsPrefix = useBootstrapPrefix(bsPrefix, 'tooltip');
|
|
15498
|
-
const isRTL = useIsRTL();
|
|
15499
|
-
const [primaryPlacement] = (placement == null ? void 0 : placement.split('-')) || [];
|
|
15500
|
-
const bsDirection = getOverlayDirection(primaryPlacement, isRTL);
|
|
15501
|
-
let computedStyle = style;
|
|
15502
|
-
if (show && !hasDoneInitialMeasure) {
|
|
15503
|
-
computedStyle = {
|
|
15504
|
-
...style,
|
|
15505
|
-
...getInitialPopperStyles(popper == null ? void 0 : popper.strategy)
|
|
15506
|
-
};
|
|
15507
|
-
}
|
|
15508
|
-
return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
|
|
15509
|
-
ref: ref,
|
|
15510
|
-
style: computedStyle,
|
|
15511
|
-
role: "tooltip",
|
|
15512
|
-
"x-placement": primaryPlacement,
|
|
15513
|
-
className: classnames_default()(className, bsPrefix, `bs-tooltip-${bsDirection}`),
|
|
15514
|
-
...props,
|
|
15515
|
-
children: [/*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
|
|
15516
|
-
className: "tooltip-arrow",
|
|
15517
|
-
...arrowProps
|
|
15518
|
-
}, void 0, false, {
|
|
15519
|
-
fileName: Tooltip_jsxFileName,
|
|
15520
|
-
lineNumber: 119,
|
|
15521
|
-
columnNumber: 9
|
|
15522
|
-
}, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
|
|
15523
|
-
className: `${bsPrefix}-inner`,
|
|
15524
|
-
children: children
|
|
15525
|
-
}, void 0, false, {
|
|
15526
|
-
fileName: Tooltip_jsxFileName,
|
|
15527
|
-
lineNumber: 120,
|
|
15528
|
-
columnNumber: 9
|
|
15529
|
-
}, undefined)]
|
|
15530
|
-
}, void 0, true, {
|
|
15531
|
-
fileName: Tooltip_jsxFileName,
|
|
15532
|
-
lineNumber: 111,
|
|
15533
|
-
columnNumber: 7
|
|
15534
|
-
}, undefined);
|
|
15535
|
-
});
|
|
15536
|
-
Tooltip.propTypes = Tooltip_propTypes;
|
|
15537
|
-
Tooltip.displayName = 'Tooltip';
|
|
15538
|
-
/* harmony default export */ const src_Tooltip = (Tooltip);
|
|
15539
15750
|
;// CONCATENATED MODULE: ./src/index.tsx
|
|
15540
15751
|
|
|
15541
15752
|
|