react-bootstrap 2.4.0 → 2.5.0-beta.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.
@@ -1566,9 +1566,11 @@ var ThemeProvider_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-boot
1566
1566
 
1567
1567
 
1568
1568
  const DEFAULT_BREAKPOINTS = ['xxl', 'xl', 'lg', 'md', 'sm', 'xs'];
1569
+ const DEFAULT_MIN_BREAKPOINT = 'xs';
1569
1570
  const ThemeContext = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.createContext({
1570
1571
  prefixes: {},
1571
- breakpoints: DEFAULT_BREAKPOINTS
1572
+ breakpoints: DEFAULT_BREAKPOINTS,
1573
+ minBreakpoint: DEFAULT_MIN_BREAKPOINT
1572
1574
  });
1573
1575
  const {
1574
1576
  Consumer,
@@ -1578,6 +1580,7 @@ const {
1578
1580
  function ThemeProvider({
1579
1581
  prefixes = {},
1580
1582
  breakpoints = DEFAULT_BREAKPOINTS,
1583
+ minBreakpoint = DEFAULT_MIN_BREAKPOINT,
1581
1584
  dir,
1582
1585
  children
1583
1586
  }) {
@@ -1585,14 +1588,15 @@ function ThemeProvider({
1585
1588
  prefixes: { ...prefixes
1586
1589
  },
1587
1590
  breakpoints,
1591
+ minBreakpoint,
1588
1592
  dir
1589
- }), [prefixes, breakpoints, dir]);
1593
+ }), [prefixes, breakpoints, minBreakpoint, dir]);
1590
1594
  return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Provider, {
1591
1595
  value: contextValue,
1592
1596
  children: children
1593
1597
  }, void 0, false, {
1594
1598
  fileName: ThemeProvider_jsxFileName,
1595
- lineNumber: 38,
1599
+ lineNumber: 43,
1596
1600
  columnNumber: 10
1597
1601
  }, this);
1598
1602
  }
@@ -1615,6 +1619,12 @@ ThemeProvider.propTypes = {
1615
1619
  */
1616
1620
  breakpoints: prop_types_default().arrayOf((prop_types_default()).string),
1617
1621
 
1622
+ /**
1623
+ * The minimum breakpoint used by your application.
1624
+ * Defaults to the smallest of the standard Bootstrap breakpoints.
1625
+ */
1626
+ minBreakpoint: (prop_types_default()).string,
1627
+
1618
1628
  /**
1619
1629
  * Indicates the directionality of the application's text.
1620
1630
  *
@@ -1634,6 +1644,12 @@ function useBootstrapBreakpoints() {
1634
1644
  } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ThemeContext);
1635
1645
  return breakpoints;
1636
1646
  }
1647
+ function useBootstrapMinBreakpoint() {
1648
+ const {
1649
+ minBreakpoint
1650
+ } = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(ThemeContext);
1651
+ return minBreakpoint;
1652
+ }
1637
1653
  function useIsRTL() {
1638
1654
  const {
1639
1655
  dir
@@ -1659,7 +1675,7 @@ function createBootstrapComponent(Component, opts) {
1659
1675
  bsPrefix: bsPrefix
1660
1676
  }, void 0, false, {
1661
1677
  fileName: ThemeProvider_jsxFileName,
1662
- lineNumber: 95,
1678
+ lineNumber: 111,
1663
1679
  columnNumber: 14
1664
1680
  }, this);
1665
1681
  });
@@ -5608,6 +5624,7 @@ function useCol({
5608
5624
  }) {
5609
5625
  bsPrefix = useBootstrapPrefix(bsPrefix, 'col');
5610
5626
  const breakpoints = useBootstrapBreakpoints();
5627
+ const minBreakpoint = useBootstrapMinBreakpoint();
5611
5628
  const spans = [];
5612
5629
  const classes = [];
5613
5630
  breakpoints.forEach(brkPoint => {
@@ -5627,7 +5644,7 @@ function useCol({
5627
5644
  span = propValue;
5628
5645
  }
5629
5646
 
5630
- const infix = brkPoint !== 'xs' ? `-${brkPoint}` : '';
5647
+ const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : '';
5631
5648
  if (span) spans.push(span === true ? `${bsPrefix}${infix}` : `${bsPrefix}${infix}-${span}`);
5632
5649
  if (order != null) classes.push(`order${infix}-${order}`);
5633
5650
  if (offset != null) classes.push(`offset${infix}-${offset}`);
@@ -5655,7 +5672,7 @@ const Col = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_
5655
5672
  className: classnames_default()(className, !spans.length && bsPrefix)
5656
5673
  }, void 0, false, {
5657
5674
  fileName: Col_jsxFileName,
5658
- lineNumber: 179,
5675
+ lineNumber: 184,
5659
5676
  columnNumber: 7
5660
5677
  }, undefined);
5661
5678
  });
@@ -9533,6 +9550,11 @@ const FormCheck_propTypes = {
9533
9550
  */
9534
9551
  inline: (prop_types_default()).bool,
9535
9552
 
9553
+ /**
9554
+ * Put your checkboxes, radios, and switches on the opposite side.
9555
+ */
9556
+ reverse: (prop_types_default()).bool,
9557
+
9536
9558
  /**
9537
9559
  * Disables the control.
9538
9560
  */
@@ -9571,6 +9593,7 @@ const FormCheck = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
9571
9593
  bsPrefix,
9572
9594
  bsSwitchPrefix,
9573
9595
  inline = false,
9596
+ reverse = false,
9574
9597
  disabled = false,
9575
9598
  isValid = false,
9576
9599
  isInvalid = false,
@@ -9606,7 +9629,7 @@ const FormCheck = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
9606
9629
  as: as
9607
9630
  }, void 0, false, {
9608
9631
  fileName: FormCheck_jsxFileName,
9609
- lineNumber: 161,
9632
+ lineNumber: 168,
9610
9633
  columnNumber: 9
9611
9634
  }, undefined);
9612
9635
 
@@ -9614,14 +9637,14 @@ const FormCheck = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
9614
9637
  value: innerFormContext,
9615
9638
  children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
9616
9639
  style: style,
9617
- className: classnames_default()(className, hasLabel && bsPrefix, inline && `${bsPrefix}-inline`, type === 'switch' && bsSwitchPrefix),
9640
+ className: classnames_default()(className, hasLabel && bsPrefix, inline && `${bsPrefix}-inline`, reverse && `${bsPrefix}-reverse`, type === 'switch' && bsSwitchPrefix),
9618
9641
  children: children || /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(jsx_dev_runtime.Fragment, {
9619
9642
  children: [input, hasLabel && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_FormCheckLabel, {
9620
9643
  title: title,
9621
9644
  children: label
9622
9645
  }, void 0, false, {
9623
9646
  fileName: FormCheck_jsxFileName,
9624
- lineNumber: 187,
9647
+ lineNumber: 195,
9625
9648
  columnNumber: 19
9626
9649
  }, undefined), feedback && /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Feedback, {
9627
9650
  type: feedbackType,
@@ -9629,18 +9652,18 @@ const FormCheck = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
9629
9652
  children: feedback
9630
9653
  }, void 0, false, {
9631
9654
  fileName: FormCheck_jsxFileName,
9632
- lineNumber: 190,
9655
+ lineNumber: 198,
9633
9656
  columnNumber: 19
9634
9657
  }, undefined)]
9635
9658
  }, void 0, true)
9636
9659
  }, void 0, false, {
9637
9660
  fileName: FormCheck_jsxFileName,
9638
- lineNumber: 174,
9661
+ lineNumber: 181,
9639
9662
  columnNumber: 11
9640
9663
  }, undefined)
9641
9664
  }, void 0, false, {
9642
9665
  fileName: FormCheck_jsxFileName,
9643
- lineNumber: 173,
9666
+ lineNumber: 180,
9644
9667
  columnNumber: 9
9645
9668
  }, undefined);
9646
9669
  });
@@ -11579,7 +11602,7 @@ const ModalDialog_propTypes = {
11579
11602
  /**
11580
11603
  * Render a large, extra large or small modal.
11581
11604
  *
11582
- * @type ('sm'|'lg','xl')
11605
+ * @type ('sm'|'lg'|'xl')
11583
11606
  */
11584
11607
  size: (prop_types_default()).string,
11585
11608
 
@@ -12648,205 +12671,6 @@ NavbarToggle.displayName = 'NavbarToggle';
12648
12671
  NavbarToggle.propTypes = NavbarToggle_propTypes;
12649
12672
  NavbarToggle.defaultProps = NavbarToggle_defaultProps;
12650
12673
  /* harmony default export */ const src_NavbarToggle = (NavbarToggle);
12651
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useMediaQuery.js
12652
-
12653
-
12654
- var matchersByWindow = new WeakMap();
12655
-
12656
- var getMatcher = function getMatcher(query, targetWindow) {
12657
- if (!query || !targetWindow) return undefined;
12658
- var matchers = matchersByWindow.get(targetWindow) || new Map();
12659
- matchersByWindow.set(targetWindow, matchers);
12660
- var mql = matchers.get(query);
12661
-
12662
- if (!mql) {
12663
- mql = targetWindow.matchMedia(query);
12664
- mql.refCount = 0;
12665
- matchers.set(mql.media, mql);
12666
- }
12667
-
12668
- return mql;
12669
- };
12670
- /**
12671
- * Match a media query and get updates as the match changes. The media string is
12672
- * passed directly to `window.matchMedia` and run as a Layout Effect, so initial
12673
- * matches are returned before the browser has a chance to paint.
12674
- *
12675
- * ```tsx
12676
- * function Page() {
12677
- * const isWide = useMediaQuery('min-width: 1000px')
12678
- *
12679
- * return isWide ? "very wide" : 'not so wide'
12680
- * }
12681
- * ```
12682
- *
12683
- * Media query lists are also reused globally, hook calls for the same query
12684
- * will only create a matcher once under the hood.
12685
- *
12686
- * @param query A media query
12687
- * @param targetWindow The window to match against, uses the globally available one as a default.
12688
- */
12689
-
12690
-
12691
- function useMediaQuery(query, targetWindow) {
12692
- if (targetWindow === void 0) {
12693
- targetWindow = typeof window === 'undefined' ? undefined : window;
12694
- }
12695
-
12696
- var mql = getMatcher(query, targetWindow);
12697
-
12698
- var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(function () {
12699
- return mql ? mql.matches : false;
12700
- }),
12701
- matches = _useState[0],
12702
- setMatches = _useState[1];
12703
-
12704
- useIsomorphicEffect(function () {
12705
- var mql = getMatcher(query, targetWindow);
12706
-
12707
- if (!mql) {
12708
- return setMatches(false);
12709
- }
12710
-
12711
- var matchers = matchersByWindow.get(targetWindow);
12712
-
12713
- var handleChange = function handleChange() {
12714
- setMatches(mql.matches);
12715
- };
12716
-
12717
- mql.refCount++;
12718
- mql.addListener(handleChange);
12719
- handleChange();
12720
- return function () {
12721
- mql.removeListener(handleChange);
12722
- mql.refCount--;
12723
-
12724
- if (mql.refCount <= 0) {
12725
- matchers == null ? void 0 : matchers.delete(mql.media);
12726
- }
12727
-
12728
- mql = undefined;
12729
- };
12730
- }, [query]);
12731
- return matches;
12732
- }
12733
- ;// CONCATENATED MODULE: ./node_modules/@restart/hooks/esm/useBreakpoint.js
12734
-
12735
-
12736
- /**
12737
- * Create a responsive hook we a set of breakpoint names and widths.
12738
- * You can use any valid css units as well as a numbers (for pixels).
12739
- *
12740
- * **NOTE:** The object key order is important! it's assumed to be in order from smallest to largest
12741
- *
12742
- * ```ts
12743
- * const useBreakpoint = createBreakpointHook({
12744
- * xs: 0,
12745
- * sm: 576,
12746
- * md: 768,
12747
- * lg: 992,
12748
- * xl: 1200,
12749
- * })
12750
- * ```
12751
- *
12752
- * **Watch out!** using string values will sometimes construct media queries using css `calc()` which
12753
- * is NOT supported in media queries by all browsers at the moment. use numbers for
12754
- * the widest range of browser support.
12755
- *
12756
- * @param breakpointValues A object hash of names to breakpoint dimensions
12757
- */
12758
-
12759
- function createBreakpointHook(breakpointValues) {
12760
- var names = Object.keys(breakpointValues);
12761
-
12762
- function and(query, next) {
12763
- if (query === next) {
12764
- return next;
12765
- }
12766
-
12767
- return query ? query + " and " + next : next;
12768
- }
12769
-
12770
- function getNext(breakpoint) {
12771
- return names[Math.min(names.indexOf(breakpoint) + 1, names.length - 1)];
12772
- }
12773
-
12774
- function getMaxQuery(breakpoint) {
12775
- var next = getNext(breakpoint);
12776
- var value = breakpointValues[next];
12777
- if (typeof value === 'number') value = value - 0.2 + "px";else value = "calc(" + value + " - 0.2px)";
12778
- return "(max-width: " + value + ")";
12779
- }
12780
-
12781
- function getMinQuery(breakpoint) {
12782
- var value = breakpointValues[breakpoint];
12783
-
12784
- if (typeof value === 'number') {
12785
- value = value + "px";
12786
- }
12787
-
12788
- return "(min-width: " + value + ")";
12789
- }
12790
- /**
12791
- * Match a set of breakpoints
12792
- *
12793
- * ```tsx
12794
- * const MidSizeOnly = () => {
12795
- * const isMid = useBreakpoint({ lg: 'down', sm: 'up' });
12796
- *
12797
- * if (isMid) return <div>On a Reasonable sized Screen!</div>
12798
- * return null;
12799
- * }
12800
- * ```
12801
- * @param breakpointMap An object map of breakpoints and directions, queries are constructed using "and" to join
12802
- * breakpoints together
12803
- * @param window Optionally specify the target window to match against (useful when rendering into iframes)
12804
- */
12805
-
12806
-
12807
- function useBreakpoint(breakpointOrMap, direction, window) {
12808
- var breakpointMap;
12809
-
12810
- if (typeof breakpointOrMap === 'object') {
12811
- breakpointMap = breakpointOrMap;
12812
- window = direction;
12813
- direction = true;
12814
- } else {
12815
- var _breakpointMap;
12816
-
12817
- direction = direction || true;
12818
- breakpointMap = (_breakpointMap = {}, _breakpointMap[breakpointOrMap] = direction, _breakpointMap);
12819
- }
12820
-
12821
- var query = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useMemo)(function () {
12822
- return Object.entries(breakpointMap).reduce(function (query, _ref) {
12823
- var key = _ref[0],
12824
- direction = _ref[1];
12825
-
12826
- if (direction === 'up' || direction === true) {
12827
- query = and(query, getMinQuery(key));
12828
- }
12829
-
12830
- if (direction === 'down' || direction === true) {
12831
- query = and(query, getMaxQuery(key));
12832
- }
12833
-
12834
- return query;
12835
- }, '');
12836
- }, [JSON.stringify(breakpointMap)]);
12837
- return useMediaQuery(query, window);
12838
- }
12839
-
12840
- return useBreakpoint;
12841
- }
12842
- var useBreakpoint = createBreakpointHook({
12843
- xs: 0,
12844
- sm: 576,
12845
- md: 768,
12846
- lg: 992,
12847
- xl: 1200
12848
- });
12849
- /* harmony default export */ const esm_useBreakpoint = (useBreakpoint);
12850
12674
  ;// CONCATENATED MODULE: ./src/OffcanvasBody.tsx
12851
12675
 
12852
12676
  /* harmony default export */ const OffcanvasBody = (createWithBsPrefix('offcanvas-body'));
@@ -13041,6 +12865,7 @@ var Offcanvas_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstra
13041
12865
 
13042
12866
 
13043
12867
 
12868
+
13044
12869
  const Offcanvas_propTypes = {
13045
12870
  /**
13046
12871
  * @default 'offcanvas'
@@ -13048,9 +12873,10 @@ const Offcanvas_propTypes = {
13048
12873
  bsPrefix: (prop_types_default()).string,
13049
12874
 
13050
12875
  /**
13051
- * Include a backdrop component.
12876
+ * Include a backdrop component. Specify 'static' for a backdrop that doesn't
12877
+ * trigger an "onHide" when clicked.
13052
12878
  */
13053
- backdrop: (prop_types_default()).bool,
12879
+ backdrop: prop_types_default().oneOf(['static', true, false]),
13054
12880
 
13055
12881
  /**
13056
12882
  * Add an optional extra class name to .offcanvas-backdrop.
@@ -13072,6 +12898,12 @@ const Offcanvas_propTypes = {
13072
12898
  */
13073
12899
  placement: prop_types_default().oneOf(['start', 'end', 'top', 'bottom']),
13074
12900
 
12901
+ /**
12902
+ * Hide content outside the viewport from a specified breakpoint and down.
12903
+ * @type {("sm"|"md"|"lg"|"xl"|"xxl")}
12904
+ */
12905
+ responsive: (prop_types_default()).string,
12906
+
13075
12907
  /**
13076
12908
  * When `true` The offcanvas will automatically shift focus to itself when it
13077
12909
  * opens, and replace it to the last focused element when it closes.
@@ -13174,7 +13006,7 @@ function Offcanvas_DialogTransition(props) {
13174
13006
  return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_OffcanvasToggling, { ...props
13175
13007
  }, void 0, false, {
13176
13008
  fileName: Offcanvas_jsxFileName,
13177
- lineNumber: 178,
13009
+ lineNumber: 186,
13178
13010
  columnNumber: 10
13179
13011
  }, this);
13180
13012
  }
@@ -13183,7 +13015,7 @@ function Offcanvas_BackdropTransition(props) {
13183
13015
  return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Fade, { ...props
13184
13016
  }, void 0, false, {
13185
13017
  fileName: Offcanvas_jsxFileName,
13186
- lineNumber: 182,
13018
+ lineNumber: 190,
13187
13019
  columnNumber: 10
13188
13020
  }, this);
13189
13021
  }
@@ -13194,6 +13026,7 @@ const Offcanvas = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
13194
13026
  children,
13195
13027
  'aria-labelledby': ariaLabelledby,
13196
13028
  placement,
13029
+ responsive,
13197
13030
 
13198
13031
  /* BaseModal props */
13199
13032
  show,
@@ -13260,59 +13093,59 @@ const Offcanvas = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_reac
13260
13093
  className: classnames_default()(`${bsPrefix}-backdrop`, backdropClassName)
13261
13094
  }, void 0, false, {
13262
13095
  fileName: Offcanvas_jsxFileName,
13263
- lineNumber: 264,
13096
+ lineNumber: 273,
13264
13097
  columnNumber: 11
13265
13098
  }, undefined), [backdropClassName, bsPrefix]);
13266
13099
 
13267
- const renderDialog = dialogProps => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
13268
- role: "dialog",
13269
- ...dialogProps,
13100
+ const renderDialog = dialogProps => /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", { ...dialogProps,
13270
13101
  ...props,
13271
- className: classnames_default()(className, bsPrefix, `${bsPrefix}-${placement}`),
13102
+ className: classnames_default()(className, responsive ? `${bsPrefix}-${responsive}` : bsPrefix, `${bsPrefix}-${placement}`),
13272
13103
  "aria-labelledby": ariaLabelledby,
13273
13104
  children: children
13274
13105
  }, void 0, false, {
13275
13106
  fileName: Offcanvas_jsxFileName,
13276
- lineNumber: 273,
13107
+ lineNumber: 282,
13277
13108
  columnNumber: 9
13278
13109
  }, undefined);
13279
13110
 
13280
- return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_ModalContext.Provider, {
13281
- value: modalContext,
13282
- children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_Modal, {
13283
- show: show,
13284
- ref: ref,
13285
- backdrop: backdrop,
13286
- container: container,
13287
- keyboard: keyboard,
13288
- autoFocus: autoFocus,
13289
- enforceFocus: enforceFocus && !scroll,
13290
- restoreFocus: restoreFocus,
13291
- restoreFocusOptions: restoreFocusOptions,
13292
- onEscapeKeyDown: onEscapeKeyDown,
13293
- onShow: onShow,
13294
- onHide: handleHide,
13295
- onEnter: handleEnter,
13296
- onEntering: onEntering,
13297
- onEntered: onEntered,
13298
- onExit: onExit,
13299
- onExiting: onExiting,
13300
- onExited: handleExited,
13301
- manager: getModalManager(),
13302
- transition: Offcanvas_DialogTransition,
13303
- backdropTransition: Offcanvas_BackdropTransition,
13304
- renderBackdrop: renderBackdrop,
13305
- renderDialog: renderDialog
13111
+ return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(jsx_dev_runtime.Fragment, {
13112
+ children: [!show && renderDialog({}), /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_ModalContext.Provider, {
13113
+ value: modalContext,
13114
+ children: /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_Modal, {
13115
+ show: show,
13116
+ ref: ref,
13117
+ backdrop: backdrop,
13118
+ container: container,
13119
+ keyboard: keyboard,
13120
+ autoFocus: autoFocus,
13121
+ enforceFocus: enforceFocus && !scroll,
13122
+ restoreFocus: restoreFocus,
13123
+ restoreFocusOptions: restoreFocusOptions,
13124
+ onEscapeKeyDown: onEscapeKeyDown,
13125
+ onShow: onShow,
13126
+ onHide: handleHide,
13127
+ onEnter: handleEnter,
13128
+ onEntering: onEntering,
13129
+ onEntered: onEntered,
13130
+ onExit: onExit,
13131
+ onExiting: onExiting,
13132
+ onExited: handleExited,
13133
+ manager: getModalManager(),
13134
+ transition: Offcanvas_DialogTransition,
13135
+ backdropTransition: Offcanvas_BackdropTransition,
13136
+ renderBackdrop: renderBackdrop,
13137
+ renderDialog: renderDialog
13138
+ }, void 0, false, {
13139
+ fileName: Offcanvas_jsxFileName,
13140
+ lineNumber: 305,
13141
+ columnNumber: 13
13142
+ }, undefined)
13306
13143
  }, void 0, false, {
13307
13144
  fileName: Offcanvas_jsxFileName,
13308
- lineNumber: 290,
13145
+ lineNumber: 304,
13309
13146
  columnNumber: 11
13310
- }, undefined)
13311
- }, void 0, false, {
13312
- fileName: Offcanvas_jsxFileName,
13313
- lineNumber: 289,
13314
- columnNumber: 9
13315
- }, undefined);
13147
+ }, undefined)]
13148
+ }, void 0, true);
13316
13149
  });
13317
13150
  Offcanvas.displayName = 'Offcanvas';
13318
13151
  Offcanvas.propTypes = Offcanvas_propTypes;
@@ -13329,71 +13162,16 @@ var NavbarOffcanvas_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bo
13329
13162
 
13330
13163
 
13331
13164
 
13332
-
13333
-
13334
-
13335
- const NavbarOffcanvas = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef(({
13336
- className,
13337
- bsPrefix,
13338
- backdrop,
13339
- backdropClassName,
13340
- keyboard,
13341
- scroll,
13342
- placement,
13343
- autoFocus,
13344
- enforceFocus,
13345
- restoreFocus,
13346
- restoreFocusOptions,
13347
- onShow,
13348
- onHide,
13349
- onEscapeKeyDown,
13350
- onEnter,
13351
- onEntering,
13352
- onEntered,
13353
- onExit,
13354
- onExiting,
13355
- onExited,
13356
- ...props
13357
- }, ref) => {
13165
+ const NavbarOffcanvas = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef((props, ref) => {
13358
13166
  const context = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useContext)(NavbarContext);
13359
- bsPrefix = useBootstrapPrefix(bsPrefix, 'offcanvas');
13360
- const hasExpandProp = typeof (context == null ? void 0 : context.expand) === 'string';
13361
- const shouldExpand = esm_useBreakpoint(hasExpandProp ? context.expand : 'xs', 'up');
13362
- return hasExpandProp && shouldExpand ? /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("div", {
13363
- ref: ref,
13364
- ...props,
13365
- className: classnames_default()(className, bsPrefix, `${bsPrefix}-${placement}`)
13366
- }, void 0, false, {
13367
- fileName: NavbarOffcanvas_jsxFileName,
13368
- lineNumber: 47,
13369
- columnNumber: 7
13370
- }, undefined) : /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Offcanvas, {
13167
+ return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(src_Offcanvas, {
13371
13168
  ref: ref,
13372
13169
  show: !!(context != null && context.expanded),
13373
- bsPrefix: bsPrefix,
13374
- backdrop: backdrop,
13375
- backdropClassName: backdropClassName,
13376
- keyboard: keyboard,
13377
- scroll: scroll,
13378
- placement: placement,
13379
- autoFocus: autoFocus,
13380
- enforceFocus: enforceFocus,
13381
- restoreFocus: restoreFocus,
13382
- restoreFocusOptions: restoreFocusOptions,
13383
- onShow: onShow,
13384
- onHide: onHide,
13385
- onEscapeKeyDown: onEscapeKeyDown,
13386
- onEnter: onEnter,
13387
- onEntering: onEntering,
13388
- onEntered: onEntered,
13389
- onExit: onExit,
13390
- onExiting: onExiting,
13391
- onExited: onExited,
13392
13170
  ...props
13393
13171
  }, void 0, false, {
13394
13172
  fileName: NavbarOffcanvas_jsxFileName,
13395
- lineNumber: 53,
13396
- columnNumber: 7
13173
+ lineNumber: 12,
13174
+ columnNumber: 12
13397
13175
  }, undefined);
13398
13176
  });
13399
13177
  NavbarOffcanvas.displayName = 'NavbarOffcanvas';
@@ -14038,6 +13816,9 @@ var Overlay_jsxFileName = "/Users/kyletsang/Documents/Kyle/Code/react-bootstrap/
14038
13816
 
14039
13817
 
14040
13818
 
13819
+
13820
+
13821
+
14041
13822
  const Overlay_propTypes = {
14042
13823
  /**
14043
13824
  * A component instance, DOM node, or function that returns either.
@@ -14145,13 +13926,24 @@ const Overlay_Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonj
14145
13926
  ...outerProps
14146
13927
  }, outerRef) => {
14147
13928
  const popperRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)({});
13929
+ const [firstRenderedState, setFirstRenderedState] = useCallbackRef();
14148
13930
  const [ref, modifiers] = useOverlayOffset(outerProps.offset);
14149
13931
  const mergedRef = esm_useMergedRefs(outerRef, ref);
14150
13932
  const actualTransition = transition === true ? src_Fade : transition || undefined;
13933
+ const handleFirstUpdate = useEventCallback(state => {
13934
+ setFirstRenderedState(state);
13935
+ popperConfig == null ? void 0 : popperConfig.onFirstUpdate == null ? void 0 : popperConfig.onFirstUpdate(state);
13936
+ });
13937
+ useIsomorphicEffect(() => {
13938
+ if (firstRenderedState) {
13939
+ popperRef.current.scheduleUpdate == null ? void 0 : popperRef.current.scheduleUpdate();
13940
+ }
13941
+ }, [firstRenderedState]);
14151
13942
  return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(esm_Overlay, { ...outerProps,
14152
13943
  ref: mergedRef,
14153
13944
  popperConfig: { ...popperConfig,
14154
- modifiers: modifiers.concat(popperConfig.modifiers || [])
13945
+ modifiers: modifiers.concat(popperConfig.modifiers || []),
13946
+ onFirstUpdate: handleFirstUpdate
14155
13947
  },
14156
13948
  transition: actualTransition,
14157
13949
  children: (overlayProps, {
@@ -14191,7 +13983,7 @@ const Overlay_Overlay = /*#__PURE__*/external_root_React_commonjs2_react_commonj
14191
13983
  }
14192
13984
  }, void 0, false, {
14193
13985
  fileName: Overlay_jsxFileName,
14194
- lineNumber: 173,
13986
+ lineNumber: 184,
14195
13987
  columnNumber: 7
14196
13988
  }, undefined);
14197
13989
  });
@@ -15062,6 +14854,7 @@ const Row = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_
15062
14854
  }, ref) => {
15063
14855
  const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'row');
15064
14856
  const breakpoints = useBootstrapBreakpoints();
14857
+ const minBreakpoint = useBootstrapMinBreakpoint();
15065
14858
  const sizePrefix = `${decoratedBsPrefix}-cols`;
15066
14859
  const classes = [];
15067
14860
  breakpoints.forEach(brkPoint => {
@@ -15077,7 +14870,7 @@ const Row = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_
15077
14870
  cols = propValue;
15078
14871
  }
15079
14872
 
15080
- const infix = brkPoint !== 'xs' ? `-${brkPoint}` : '';
14873
+ const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : '';
15081
14874
  if (cols != null) classes.push(`${sizePrefix}${infix}-${cols}`);
15082
14875
  });
15083
14876
  return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, {
@@ -15086,7 +14879,7 @@ const Row = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_
15086
14879
  className: classnames_default()(className, decoratedBsPrefix, ...classes)
15087
14880
  }, void 0, false, {
15088
14881
  fileName: Row_jsxFileName,
15089
- lineNumber: 141,
14882
+ lineNumber: 146,
15090
14883
  columnNumber: 7
15091
14884
  }, undefined);
15092
14885
  });
@@ -15342,7 +15135,7 @@ function responsivePropType(propType) {
15342
15135
  xxl: propType
15343
15136
  })]);
15344
15137
  }
15345
- function createUtilityClassName(utilityValues, breakpoints = DEFAULT_BREAKPOINTS) {
15138
+ function createUtilityClassName(utilityValues, breakpoints = DEFAULT_BREAKPOINTS, minBreakpoint = DEFAULT_MIN_BREAKPOINT) {
15346
15139
  const classes = [];
15347
15140
  Object.entries(utilityValues).forEach(([utilName, utilValue]) => {
15348
15141
  if (utilValue != null) {
@@ -15351,7 +15144,7 @@ function createUtilityClassName(utilityValues, breakpoints = DEFAULT_BREAKPOINTS
15351
15144
  const bpValue = utilValue[brkPoint];
15352
15145
 
15353
15146
  if (bpValue != null) {
15354
- const infix = brkPoint !== 'xs' ? `-${brkPoint}` : '';
15147
+ const infix = brkPoint !== minBreakpoint ? `-${brkPoint}` : '';
15355
15148
  classes.push(`${utilName}${infix}-${bpValue}`);
15356
15149
  }
15357
15150
  });
@@ -15397,15 +15190,17 @@ const Stack = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_am
15397
15190
  }, ref) => {
15398
15191
  bsPrefix = useBootstrapPrefix(bsPrefix, direction === 'horizontal' ? 'hstack' : 'vstack');
15399
15192
  const breakpoints = useBootstrapBreakpoints();
15193
+ const minBreakpoint = useBootstrapMinBreakpoint();
15400
15194
  return /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)(Component, { ...props,
15401
15195
  ref: ref,
15402
15196
  className: classnames_default()(className, bsPrefix, ...createUtilityClassName({
15403
15197
  gap,
15404
- breakpoints
15198
+ breakpoints,
15199
+ minBreakpoint
15405
15200
  }))
15406
15201
  }, void 0, false, {
15407
15202
  fileName: Stack_jsxFileName,
15408
- lineNumber: 52,
15203
+ lineNumber: 57,
15409
15204
  columnNumber: 9
15410
15205
  }, undefined);
15411
15206
  });
@@ -15923,8 +15718,9 @@ const Table_propTypes = {
15923
15718
 
15924
15719
  /**
15925
15720
  * Adds zebra-striping to any table row within the `<tbody>`.
15721
+ * Use `columns` to add zebra-striping to any table column.
15926
15722
  */
15927
- striped: (prop_types_default()).bool,
15723
+ striped: prop_types_default().oneOfType([(prop_types_default()).bool, (prop_types_default()).string]),
15928
15724
 
15929
15725
  /**
15930
15726
  * Adds borders on all sides of the table and cells.
@@ -15977,14 +15773,14 @@ const Table = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_am
15977
15773
  ...props
15978
15774
  }, ref) => {
15979
15775
  const decoratedBsPrefix = useBootstrapPrefix(bsPrefix, 'table');
15980
- const classes = classnames_default()(className, decoratedBsPrefix, variant && `${decoratedBsPrefix}-${variant}`, size && `${decoratedBsPrefix}-${size}`, striped && `${decoratedBsPrefix}-striped`, bordered && `${decoratedBsPrefix}-bordered`, borderless && `${decoratedBsPrefix}-borderless`, hover && `${decoratedBsPrefix}-hover`);
15776
+ const classes = classnames_default()(className, decoratedBsPrefix, variant && `${decoratedBsPrefix}-${variant}`, size && `${decoratedBsPrefix}-${size}`, striped && `${decoratedBsPrefix}-${typeof striped === 'string' ? `striped-${striped}` : 'striped'}`, bordered && `${decoratedBsPrefix}-bordered`, borderless && `${decoratedBsPrefix}-borderless`, hover && `${decoratedBsPrefix}-hover`);
15981
15777
 
15982
15778
  const table = /*#__PURE__*/(0,jsx_dev_runtime.jsxDEV)("table", { ...props,
15983
15779
  className: classes,
15984
15780
  ref: ref
15985
15781
  }, void 0, false, {
15986
15782
  fileName: Table_jsxFileName,
15987
- lineNumber: 98,
15783
+ lineNumber: 103,
15988
15784
  columnNumber: 19
15989
15785
  }, undefined);
15990
15786
 
@@ -16000,7 +15796,7 @@ const Table = /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_am
16000
15796
  children: table
16001
15797
  }, void 0, false, {
16002
15798
  fileName: Table_jsxFileName,
16003
- lineNumber: 105,
15799
+ lineNumber: 110,
16004
15800
  columnNumber: 14
16005
15801
  }, undefined);
16006
15802
  }
@@ -16675,7 +16471,7 @@ const ToggleButtonGroup = /*#__PURE__*/external_root_React_commonjs2_react_commo
16675
16471
  const isActive = values.indexOf(inputVal) !== -1;
16676
16472
 
16677
16473
  if (type === 'radio') {
16678
- if (!isActive && onChange) onChange(inputVal, event);
16474
+ if (!isActive) onChange(inputVal, event);
16679
16475
  return;
16680
16476
  }
16681
16477