react-bootstrap 2.7.4 → 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/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/FormFile.d.ts +23 -0
- package/cjs/FormFileInput.d.ts +10 -0
- package/cjs/FormFileLabel.d.ts +7 -0
- 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/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/PopoverContent.d.ts +5 -0
- package/cjs/PopoverTitle.d.ts +5 -0
- 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 +233 -219
- package/dist/react-bootstrap.min.js +1 -1
- package/esm/AbstractNav.d.ts +15 -0
- package/esm/AbstractNavItem.d.ts +19 -0
- 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/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/PopoverContent.d.ts +5 -0
- package/esm/PopoverTitle.d.ts +5 -0
- 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 +1 -1
package/dist/react-bootstrap.js
CHANGED
|
@@ -883,91 +883,91 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
883
883
|
|
|
884
884
|
// EXPORTS
|
|
885
885
|
__webpack_require__.d(__webpack_exports__, {
|
|
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
|
-
|
|
970
|
-
|
|
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)
|
|
971
971
|
});
|
|
972
972
|
|
|
973
973
|
// EXTERNAL MODULE: ./node_modules/classnames/index.js
|
|
@@ -1575,20 +1575,7 @@ function style(node, property) {
|
|
|
1575
1575
|
node.style.cssText += ";" + css;
|
|
1576
1576
|
}
|
|
1577
1577
|
/* harmony default export */ const css = (style);
|
|
1578
|
-
;// CONCATENATED MODULE: ./node_modules
|
|
1579
|
-
function esm_objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(source, excluded) {
|
|
1580
|
-
if (source == null) return {};
|
|
1581
|
-
var target = {};
|
|
1582
|
-
var sourceKeys = Object.keys(source);
|
|
1583
|
-
var key, i;
|
|
1584
|
-
for (i = 0; i < sourceKeys.length; i++) {
|
|
1585
|
-
key = sourceKeys[i];
|
|
1586
|
-
if (excluded.indexOf(key) >= 0) continue;
|
|
1587
|
-
target[key] = source[key];
|
|
1588
|
-
}
|
|
1589
|
-
return target;
|
|
1590
|
-
}
|
|
1591
|
-
;// CONCATENATED MODULE: ./node_modules/react-transition-group/node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
1578
|
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js
|
|
1592
1579
|
function _setPrototypeOf(o, p) {
|
|
1593
1580
|
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
|
|
1594
1581
|
o.__proto__ = p;
|
|
@@ -1596,7 +1583,7 @@ function _setPrototypeOf(o, p) {
|
|
|
1596
1583
|
};
|
|
1597
1584
|
return _setPrototypeOf(o, p);
|
|
1598
1585
|
}
|
|
1599
|
-
;// CONCATENATED MODULE: ./node_modules
|
|
1586
|
+
;// CONCATENATED MODULE: ./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js
|
|
1600
1587
|
|
|
1601
1588
|
function inheritsLoose_inheritsLoose(subClass, superClass) {
|
|
1602
1589
|
subClass.prototype = Object.create(superClass.prototype);
|
|
@@ -1973,7 +1960,7 @@ var Transition = /*#__PURE__*/function (_React$Component) {
|
|
|
1973
1960
|
_onExiting = _this$props.onExiting,
|
|
1974
1961
|
_onExited = _this$props.onExited,
|
|
1975
1962
|
_nodeRef = _this$props.nodeRef,
|
|
1976
|
-
childProps =
|
|
1963
|
+
childProps = objectWithoutPropertiesLoose_objectWithoutPropertiesLoose(_this$props, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
|
|
1977
1964
|
return /*#__PURE__*/(
|
|
1978
1965
|
// allows for nested Transitions
|
|
1979
1966
|
external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(TransitionGroupContext.Provider, {
|
|
@@ -2290,7 +2277,9 @@ const TransitionWrapper = /*#__PURE__*/external_root_React_commonjs2_react_commo
|
|
|
2290
2277
|
onExiting: handleExiting,
|
|
2291
2278
|
addEndListener: handleAddEndListener,
|
|
2292
2279
|
nodeRef: nodeRef,
|
|
2293
|
-
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, {
|
|
2294
2283
|
...innerProps,
|
|
2295
2284
|
ref: attachRef
|
|
2296
2285
|
}) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().cloneElement(children, {
|
|
@@ -4090,6 +4079,10 @@ const Button_propTypes = {
|
|
|
4090
4079
|
* `'outline-primary', 'outline-secondary', 'outline-success', 'outline-danger', 'outline-warning', 'outline-info', 'outline-dark', 'outline-light'`
|
|
4091
4080
|
*/
|
|
4092
4081
|
variant: (prop_types_default()).string,
|
|
4082
|
+
/**
|
|
4083
|
+
* Callback fired when the button is clicked.
|
|
4084
|
+
*/
|
|
4085
|
+
onClick: (prop_types_default()).func,
|
|
4093
4086
|
/**
|
|
4094
4087
|
* Specifies a large or small button.
|
|
4095
4088
|
*
|
|
@@ -4140,7 +4133,7 @@ const Button_Button = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_
|
|
|
4140
4133
|
className: classnames_default()(className, prefix, active && 'active', variant && `${prefix}-${variant}`, size && `${prefix}-${size}`, props.href && disabled && 'disabled')
|
|
4141
4134
|
}, void 0, false, {
|
|
4142
4135
|
fileName: Button_jsxFileName,
|
|
4143
|
-
lineNumber:
|
|
4136
|
+
lineNumber: 100,
|
|
4144
4137
|
columnNumber: 9
|
|
4145
4138
|
}, undefined);
|
|
4146
4139
|
});
|
|
@@ -5290,7 +5283,7 @@ function useForceUpdate() {
|
|
|
5290
5283
|
|
|
5291
5284
|
const DropdownContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext(null);
|
|
5292
5285
|
/* harmony default export */ const esm_DropdownContext = (DropdownContext);
|
|
5293
|
-
;// CONCATENATED MODULE: ./node_modules
|
|
5286
|
+
;// CONCATENATED MODULE: ./node_modules/dequal/dist/index.mjs
|
|
5294
5287
|
var has = Object.prototype.hasOwnProperty;
|
|
5295
5288
|
|
|
5296
5289
|
function find(iter, tar, key) {
|
|
@@ -11658,7 +11651,7 @@ const Nav_propTypes = {
|
|
|
11658
11651
|
/**
|
|
11659
11652
|
* The visual variant of the nav items.
|
|
11660
11653
|
*
|
|
11661
|
-
* @type {('tabs'|'pills')}
|
|
11654
|
+
* @type {('tabs'| 'pills' | 'underline')}
|
|
11662
11655
|
*/
|
|
11663
11656
|
variant: (prop_types_default()).string,
|
|
11664
11657
|
/**
|
|
@@ -13137,28 +13130,142 @@ Popover.propTypes = Popover_propTypes;
|
|
|
13137
13130
|
// https://github.com/twbs/bootstrap/blob/5c32767e0e0dbac2d934bcdee03719a65d3f1187/js/src/popover.js#L28
|
|
13138
13131
|
POPPER_OFFSET: [0, 8]
|
|
13139
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
|
+
}));
|
|
13140
13237
|
;// CONCATENATED MODULE: ./src/useOverlayOffset.tsx
|
|
13141
13238
|
|
|
13142
13239
|
|
|
13143
13240
|
|
|
13144
13241
|
|
|
13145
13242
|
|
|
13243
|
+
|
|
13146
13244
|
// This is meant for internal use.
|
|
13147
|
-
// 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.
|
|
13148
13246
|
function useOverlayOffset(customOffset) {
|
|
13149
13247
|
const overlayRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
|
|
13150
13248
|
const popoverClass = useBootstrapPrefix(undefined, 'popover');
|
|
13249
|
+
const tooltipClass = useBootstrapPrefix(undefined, 'tooltip');
|
|
13151
13250
|
const offset = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(() => ({
|
|
13152
13251
|
name: 'offset',
|
|
13153
13252
|
options: {
|
|
13154
13253
|
offset: () => {
|
|
13155
|
-
if (
|
|
13156
|
-
return customOffset
|
|
13254
|
+
if (customOffset) {
|
|
13255
|
+
return customOffset;
|
|
13256
|
+
}
|
|
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
|
+
}
|
|
13157
13264
|
}
|
|
13158
|
-
return
|
|
13265
|
+
return [0, 0];
|
|
13159
13266
|
}
|
|
13160
13267
|
}
|
|
13161
|
-
}), [customOffset, popoverClass]);
|
|
13268
|
+
}), [customOffset, popoverClass, tooltipClass]);
|
|
13162
13269
|
return [overlayRef, [offset]];
|
|
13163
13270
|
}
|
|
13164
13271
|
;// CONCATENATED MODULE: ./src/Overlay.tsx
|
|
@@ -13563,7 +13670,11 @@ const PageItem_propTypes = {
|
|
|
13563
13670
|
/** The HTML href attribute for the `PageItem`. */
|
|
13564
13671
|
href: (prop_types_default()).string,
|
|
13565
13672
|
/** A callback function for when this component is clicked. */
|
|
13566
|
-
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
|
|
13567
13678
|
};
|
|
13568
13679
|
const PageItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
|
|
13569
13680
|
active = false,
|
|
@@ -13572,6 +13683,8 @@ const PageItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react
|
|
|
13572
13683
|
style,
|
|
13573
13684
|
activeLabel = '(current)',
|
|
13574
13685
|
children,
|
|
13686
|
+
linkStyle,
|
|
13687
|
+
linkClassName,
|
|
13575
13688
|
...props
|
|
13576
13689
|
}, ref) => {
|
|
13577
13690
|
const Component = active || disabled ? 'span' : esm_Anchor;
|
|
@@ -13583,24 +13696,25 @@ const PageItem = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react
|
|
|
13583
13696
|
disabled
|
|
13584
13697
|
}),
|
|
13585
13698
|
children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
|
|
13586
|
-
className:
|
|
13699
|
+
className: classnames_default()('page-link', linkClassName),
|
|
13700
|
+
style: linkStyle,
|
|
13587
13701
|
...props,
|
|
13588
13702
|
children: [children, active && activeLabel && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("span", {
|
|
13589
13703
|
className: "visually-hidden",
|
|
13590
13704
|
children: activeLabel
|
|
13591
13705
|
}, void 0, false, {
|
|
13592
13706
|
fileName: PageItem_jsxFileName,
|
|
13593
|
-
lineNumber:
|
|
13707
|
+
lineNumber: 73,
|
|
13594
13708
|
columnNumber: 15
|
|
13595
13709
|
}, undefined)]
|
|
13596
13710
|
}, void 0, true, {
|
|
13597
13711
|
fileName: PageItem_jsxFileName,
|
|
13598
|
-
lineNumber:
|
|
13712
|
+
lineNumber: 66,
|
|
13599
13713
|
columnNumber: 11
|
|
13600
13714
|
}, undefined)
|
|
13601
13715
|
}, void 0, false, {
|
|
13602
13716
|
fileName: PageItem_jsxFileName,
|
|
13603
|
-
lineNumber:
|
|
13717
|
+
lineNumber: 61,
|
|
13604
13718
|
columnNumber: 9
|
|
13605
13719
|
}, undefined);
|
|
13606
13720
|
});
|
|
@@ -13619,19 +13733,19 @@ function createButton(name, defaultValue, label = name) {
|
|
|
13619
13733
|
children: children || defaultValue
|
|
13620
13734
|
}, void 0, false, {
|
|
13621
13735
|
fileName: PageItem_jsxFileName,
|
|
13622
|
-
lineNumber:
|
|
13736
|
+
lineNumber: 90,
|
|
13623
13737
|
columnNumber: 9
|
|
13624
13738
|
}, this), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("span", {
|
|
13625
13739
|
className: "visually-hidden",
|
|
13626
13740
|
children: label
|
|
13627
13741
|
}, void 0, false, {
|
|
13628
13742
|
fileName: PageItem_jsxFileName,
|
|
13629
|
-
lineNumber:
|
|
13743
|
+
lineNumber: 91,
|
|
13630
13744
|
columnNumber: 9
|
|
13631
13745
|
}, this)]
|
|
13632
13746
|
}, void 0, true, {
|
|
13633
13747
|
fileName: PageItem_jsxFileName,
|
|
13634
|
-
lineNumber:
|
|
13748
|
+
lineNumber: 89,
|
|
13635
13749
|
columnNumber: 7
|
|
13636
13750
|
}, this));
|
|
13637
13751
|
Button.displayName = name;
|
|
@@ -15001,7 +15115,7 @@ const Tabs_propTypes = {
|
|
|
15001
15115
|
/**
|
|
15002
15116
|
* Navigation style
|
|
15003
15117
|
*
|
|
15004
|
-
* @type {('tabs'| 'pills')}
|
|
15118
|
+
* @type {('tabs'| 'pills' | 'underline')}
|
|
15005
15119
|
*/
|
|
15006
15120
|
variant: (prop_types_default()).string,
|
|
15007
15121
|
/**
|
|
@@ -15633,106 +15747,6 @@ ToggleButtonGroup.propTypes = ToggleButtonGroup_propTypes;
|
|
|
15633
15747
|
/* harmony default export */ const src_ToggleButtonGroup = (Object.assign(ToggleButtonGroup, {
|
|
15634
15748
|
Button: src_ToggleButton
|
|
15635
15749
|
}));
|
|
15636
|
-
;// CONCATENATED MODULE: ./src/Tooltip.tsx
|
|
15637
|
-
var Tooltip_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/src/Tooltip.tsx";
|
|
15638
|
-
|
|
15639
|
-
|
|
15640
|
-
|
|
15641
|
-
|
|
15642
|
-
|
|
15643
|
-
|
|
15644
|
-
|
|
15645
|
-
const Tooltip_propTypes = {
|
|
15646
|
-
/**
|
|
15647
|
-
* @default 'tooltip'
|
|
15648
|
-
*/
|
|
15649
|
-
bsPrefix: (prop_types_default()).string,
|
|
15650
|
-
/**
|
|
15651
|
-
* An html id attribute, necessary for accessibility
|
|
15652
|
-
* @type {string}
|
|
15653
|
-
* @required
|
|
15654
|
-
*/
|
|
15655
|
-
id: (prop_types_default()).string,
|
|
15656
|
-
/**
|
|
15657
|
-
* Sets the direction the Tooltip is positioned towards.
|
|
15658
|
-
*
|
|
15659
|
-
* > This is generally provided by the `Overlay` component positioning the tooltip
|
|
15660
|
-
*/
|
|
15661
|
-
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']),
|
|
15662
|
-
/**
|
|
15663
|
-
* An Overlay injected set of props for positioning the tooltip arrow.
|
|
15664
|
-
*
|
|
15665
|
-
* > This is generally provided by the `Overlay` component positioning the tooltip
|
|
15666
|
-
*
|
|
15667
|
-
* @type {{ ref: ReactRef, style: Object }}
|
|
15668
|
-
*/
|
|
15669
|
-
arrowProps: prop_types_default().shape({
|
|
15670
|
-
ref: (prop_types_default()).any,
|
|
15671
|
-
style: (prop_types_default()).object
|
|
15672
|
-
}),
|
|
15673
|
-
/**
|
|
15674
|
-
* Whether or not Popper has done its initial measurement and positioning.
|
|
15675
|
-
*/
|
|
15676
|
-
hasDoneInitialMeasure: (prop_types_default()).bool,
|
|
15677
|
-
/** @private */
|
|
15678
|
-
popper: (prop_types_default()).object,
|
|
15679
|
-
/** @private */
|
|
15680
|
-
show: (prop_types_default()).any
|
|
15681
|
-
};
|
|
15682
|
-
const Tooltip = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
|
|
15683
|
-
bsPrefix,
|
|
15684
|
-
placement = 'right',
|
|
15685
|
-
className,
|
|
15686
|
-
style,
|
|
15687
|
-
children,
|
|
15688
|
-
arrowProps,
|
|
15689
|
-
hasDoneInitialMeasure,
|
|
15690
|
-
popper,
|
|
15691
|
-
show,
|
|
15692
|
-
...props
|
|
15693
|
-
}, ref) => {
|
|
15694
|
-
bsPrefix = useBootstrapPrefix(bsPrefix, 'tooltip');
|
|
15695
|
-
const isRTL = useIsRTL();
|
|
15696
|
-
const [primaryPlacement] = (placement == null ? void 0 : placement.split('-')) || [];
|
|
15697
|
-
const bsDirection = getOverlayDirection(primaryPlacement, isRTL);
|
|
15698
|
-
let computedStyle = style;
|
|
15699
|
-
if (show && !hasDoneInitialMeasure) {
|
|
15700
|
-
computedStyle = {
|
|
15701
|
-
...style,
|
|
15702
|
-
...getInitialPopperStyles(popper == null ? void 0 : popper.strategy)
|
|
15703
|
-
};
|
|
15704
|
-
}
|
|
15705
|
-
return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
|
|
15706
|
-
ref: ref,
|
|
15707
|
-
style: computedStyle,
|
|
15708
|
-
role: "tooltip",
|
|
15709
|
-
"x-placement": primaryPlacement,
|
|
15710
|
-
className: classnames_default()(className, bsPrefix, `bs-tooltip-${bsDirection}`),
|
|
15711
|
-
...props,
|
|
15712
|
-
children: [/*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
|
|
15713
|
-
className: "tooltip-arrow",
|
|
15714
|
-
...arrowProps
|
|
15715
|
-
}, void 0, false, {
|
|
15716
|
-
fileName: Tooltip_jsxFileName,
|
|
15717
|
-
lineNumber: 119,
|
|
15718
|
-
columnNumber: 9
|
|
15719
|
-
}, undefined), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
|
|
15720
|
-
className: `${bsPrefix}-inner`,
|
|
15721
|
-
children: children
|
|
15722
|
-
}, void 0, false, {
|
|
15723
|
-
fileName: Tooltip_jsxFileName,
|
|
15724
|
-
lineNumber: 120,
|
|
15725
|
-
columnNumber: 9
|
|
15726
|
-
}, undefined)]
|
|
15727
|
-
}, void 0, true, {
|
|
15728
|
-
fileName: Tooltip_jsxFileName,
|
|
15729
|
-
lineNumber: 111,
|
|
15730
|
-
columnNumber: 7
|
|
15731
|
-
}, undefined);
|
|
15732
|
-
});
|
|
15733
|
-
Tooltip.propTypes = Tooltip_propTypes;
|
|
15734
|
-
Tooltip.displayName = 'Tooltip';
|
|
15735
|
-
/* harmony default export */ const src_Tooltip = (Tooltip);
|
|
15736
15750
|
;// CONCATENATED MODULE: ./src/index.tsx
|
|
15737
15751
|
|
|
15738
15752
|
|