@hero-design/rn 8.35.0-alpha.1 → 8.35.0-alpha.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/index.js CHANGED
@@ -4533,6 +4533,308 @@ var withTheme = function withTheme(C, themeName) {
4533
4533
 
4534
4534
  var defaultTheme = getTheme$1();
4535
4535
 
4536
+ var urlAlphabet = 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
4537
+ var nanoid = function nanoid() {
4538
+ var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 21;
4539
+ var id = '';
4540
+ var i = size;
4541
+ while (i--) {
4542
+ id += urlAlphabet[Math.random() * 64 | 0];
4543
+ }
4544
+ return id;
4545
+ };
4546
+
4547
+ var ACTIONS;
4548
+ (function (ACTIONS) {
4549
+ ACTIONS[ACTIONS["REGISTER_HOST"] = 0] = "REGISTER_HOST";
4550
+ ACTIONS[ACTIONS["DEREGISTER_HOST"] = 1] = "DEREGISTER_HOST";
4551
+ ACTIONS[ACTIONS["ADD_UPDATE_PORTAL"] = 2] = "ADD_UPDATE_PORTAL";
4552
+ ACTIONS[ACTIONS["REMOVE_PORTAL"] = 3] = "REMOVE_PORTAL";
4553
+ })(ACTIONS || (ACTIONS = {}));
4554
+ var INITIAL_STATE = {};
4555
+
4556
+ var PortalStateContext = /*#__PURE__*/React.createContext(null);
4557
+ var PortalDispatchContext = /*#__PURE__*/React.createContext(null);
4558
+
4559
+ var usePortal = function usePortal() {
4560
+ var hostName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'root';
4561
+ var dispatch = React.useContext(PortalDispatchContext);
4562
+ if (dispatch === null) {
4563
+ throw new Error("'PortalDispatchContext' cannot be null, please add 'PortalProvider' to the root component.");
4564
+ } //#region methods
4565
+
4566
+ var registerHost = React.useCallback(function () {
4567
+ dispatch({
4568
+ type: ACTIONS.REGISTER_HOST,
4569
+ hostName: hostName
4570
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps
4571
+ }, []);
4572
+ var deregisterHost = React.useCallback(function () {
4573
+ dispatch({
4574
+ type: ACTIONS.DEREGISTER_HOST,
4575
+ hostName: hostName
4576
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps
4577
+ }, []);
4578
+ var addUpdatePortal = React.useCallback(function (name, node) {
4579
+ dispatch({
4580
+ type: ACTIONS.ADD_UPDATE_PORTAL,
4581
+ hostName: hostName,
4582
+ portalName: name,
4583
+ node: node
4584
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps
4585
+ }, []);
4586
+ var removePortal = React.useCallback(function (name) {
4587
+ dispatch({
4588
+ type: ACTIONS.REMOVE_PORTAL,
4589
+ hostName: hostName,
4590
+ portalName: name
4591
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps
4592
+ }, []); //#endregion
4593
+
4594
+ return {
4595
+ registerHost: registerHost,
4596
+ deregisterHost: deregisterHost,
4597
+ addPortal: addUpdatePortal,
4598
+ updatePortal: addUpdatePortal,
4599
+ removePortal: removePortal
4600
+ };
4601
+ };
4602
+
4603
+ var PortalComponent = function PortalComponent(_ref) {
4604
+ var _providedName = _ref.name,
4605
+ hostName = _ref.hostName,
4606
+ _providedHandleOnMount = _ref.handleOnMount,
4607
+ _providedHandleOnUnmount = _ref.handleOnUnmount,
4608
+ _providedHandleOnUpdate = _ref.handleOnUpdate,
4609
+ children = _ref.children;
4610
+ //#region hooks
4611
+ var _usePortal = usePortal(hostName),
4612
+ addUpdatePortal = _usePortal.addPortal,
4613
+ removePortal = _usePortal.removePortal; //#endregion
4614
+ //#region variables
4615
+
4616
+ var name = React.useMemo(function () {
4617
+ return _providedName || nanoid();
4618
+ }, [_providedName]); //#endregion
4619
+ //#region refs
4620
+
4621
+ var handleOnMountRef = React.useRef();
4622
+ var handleOnUnmountRef = React.useRef();
4623
+ var handleOnUpdateRef = React.useRef(); //#endregion
4624
+ //#region callbacks
4625
+
4626
+ var handleOnMount = React.useCallback(function () {
4627
+ if (_providedHandleOnMount) {
4628
+ _providedHandleOnMount(function () {
4629
+ return addUpdatePortal(name, children);
4630
+ });
4631
+ } else {
4632
+ addUpdatePortal(name, children);
4633
+ } // eslint-disable-next-line react-hooks/exhaustive-deps
4634
+ }, [_providedHandleOnMount, addUpdatePortal]);
4635
+ handleOnMountRef.current = handleOnMount;
4636
+ var handleOnUnmount = React.useCallback(function () {
4637
+ if (_providedHandleOnUnmount) {
4638
+ _providedHandleOnUnmount(function () {
4639
+ return removePortal(name);
4640
+ });
4641
+ } else {
4642
+ removePortal(name);
4643
+ } // eslint-disable-next-line react-hooks/exhaustive-deps
4644
+ }, [_providedHandleOnUnmount, removePortal]);
4645
+ handleOnUnmountRef.current = handleOnUnmount;
4646
+ var handleOnUpdate = React.useCallback(function () {
4647
+ if (_providedHandleOnUpdate) {
4648
+ _providedHandleOnUpdate(function () {
4649
+ return addUpdatePortal(name, children);
4650
+ });
4651
+ } else {
4652
+ addUpdatePortal(name, children);
4653
+ } // eslint-disable-next-line react-hooks/exhaustive-deps
4654
+ }, [_providedHandleOnUpdate, addUpdatePortal, children]);
4655
+ handleOnUpdateRef.current = handleOnUpdate; //#endregion
4656
+ //#region effects
4657
+
4658
+ React.useEffect(function () {
4659
+ var _handleOnMountRef$cur;
4660
+ (_handleOnMountRef$cur = handleOnMountRef.current) === null || _handleOnMountRef$cur === void 0 ? void 0 : _handleOnMountRef$cur.call(handleOnMountRef);
4661
+ return function () {
4662
+ var _handleOnUnmountRef$c;
4663
+ (_handleOnUnmountRef$c = handleOnUnmountRef.current) === null || _handleOnUnmountRef$c === void 0 ? void 0 : _handleOnUnmountRef$c.call(handleOnUnmountRef); // remove callbacks refs
4664
+
4665
+ handleOnMountRef.current = undefined;
4666
+ handleOnUnmountRef.current = undefined;
4667
+ handleOnUpdateRef.current = undefined;
4668
+ };
4669
+ }, []);
4670
+ React.useEffect(function () {
4671
+ var _handleOnUpdateRef$cu;
4672
+ (_handleOnUpdateRef$cu = handleOnUpdateRef.current) === null || _handleOnUpdateRef$cu === void 0 ? void 0 : _handleOnUpdateRef$cu.call(handleOnUpdateRef);
4673
+ }, [children]); //#endregion
4674
+
4675
+ return null;
4676
+ };
4677
+ var Portal = /*#__PURE__*/React.memo(PortalComponent);
4678
+ Portal.displayName = 'Portal';
4679
+
4680
+ var usePortalState = function usePortalState(hostName) {
4681
+ var state = React.useContext(PortalStateContext);
4682
+ if (state === null) {
4683
+ throw new Error("'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component.");
4684
+ }
4685
+ return state[hostName] || [];
4686
+ };
4687
+
4688
+ var PortalHostComponent = function PortalHostComponent(_ref) {
4689
+ var name = _ref.name;
4690
+ //#region hooks
4691
+ var state = usePortalState(name);
4692
+ var _usePortal = usePortal(name),
4693
+ registerHost = _usePortal.registerHost,
4694
+ deregisterHost = _usePortal.deregisterHost; //#endregion
4695
+ //#region effects
4696
+
4697
+ React.useEffect(function () {
4698
+ registerHost();
4699
+ return function () {
4700
+ deregisterHost();
4701
+ }; // eslint-disable-next-line react-hooks/exhaustive-deps
4702
+ }, []); //#endregion
4703
+ //#region render
4704
+
4705
+ return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, state.map(function (item) {
4706
+ return item.node;
4707
+ })); //#endregion
4708
+ };
4709
+
4710
+ var PortalHost = /*#__PURE__*/React.memo(PortalHostComponent);
4711
+ PortalHost.displayName = 'PortalHost';
4712
+
4713
+ var isLoggingEnabled = false; // __DEV__ global is by default not defined in React Native Web builds
4714
+
4715
+ var isDev = Boolean(typeof __DEV__ !== 'undefined' && __DEV__);
4716
+ var enableLogging = function enableLogging() {
4717
+ if (!isDev) {
4718
+ console.warn('[Portal] could not enable logging on production!');
4719
+ return;
4720
+ }
4721
+ isLoggingEnabled = true;
4722
+ };
4723
+ var print$1 = function print() {};
4724
+ if (isDev) {
4725
+ print$1 = function print(_ref) {
4726
+ var component = _ref.component,
4727
+ method = _ref.method,
4728
+ params = _ref.params;
4729
+ if (!isLoggingEnabled) {
4730
+ return;
4731
+ }
4732
+ var message = '';
4733
+ if (_typeof(params) === 'object') {
4734
+ message = Object.keys(params).map(function (key) {
4735
+ return "".concat(key, ":").concat(params[key]);
4736
+ }).join(' ');
4737
+ } else {
4738
+ message = "".concat(params !== null && params !== void 0 ? params : '');
4739
+ }
4740
+ console.log("[Portal::".concat([component, method].filter(Boolean).join('::'), "]"), message);
4741
+ };
4742
+ }
4743
+ Object.freeze(print$1);
4744
+
4745
+ var registerHost = function registerHost(state, hostName) {
4746
+ if (!(hostName in state)) {
4747
+ state[hostName] = [];
4748
+ }
4749
+ return state;
4750
+ };
4751
+ var deregisterHost = function deregisterHost(state, hostName) {
4752
+ delete state[hostName];
4753
+ return state;
4754
+ };
4755
+ var addUpdatePortal = function addUpdatePortal(state, hostName, portalName, node) {
4756
+ if (!(hostName in state)) {
4757
+ state = registerHost(state, hostName);
4758
+ }
4759
+ /**
4760
+ * updated portal, if it was already added.
4761
+ */
4762
+
4763
+ var index = state[hostName].findIndex(function (item) {
4764
+ return item.name === portalName;
4765
+ });
4766
+ if (index !== -1) {
4767
+ state[hostName][index].node = node;
4768
+ } else {
4769
+ state[hostName].push({
4770
+ name: portalName,
4771
+ node: node
4772
+ });
4773
+ }
4774
+ return state;
4775
+ };
4776
+ var removePortal = function removePortal(state, hostName, portalName) {
4777
+ if (!(hostName in state)) {
4778
+ print$1({
4779
+ component: reducer.name,
4780
+ method: removePortal.name,
4781
+ params: "Failed to remove portal '".concat(portalName, "', '").concat(hostName, "' was not registered!")
4782
+ });
4783
+ return state;
4784
+ }
4785
+ var index = state[hostName].findIndex(function (item) {
4786
+ return item.name === portalName;
4787
+ });
4788
+ if (index !== -1) state[hostName].splice(index, 1);
4789
+ return state;
4790
+ };
4791
+ var reducer = function reducer(state, action) {
4792
+ var type = action.type;
4793
+ var clonedState = _objectSpread2({}, state);
4794
+ switch (type) {
4795
+ case ACTIONS.REGISTER_HOST:
4796
+ return registerHost(clonedState, action.hostName);
4797
+ case ACTIONS.DEREGISTER_HOST:
4798
+ return deregisterHost(clonedState, action.hostName);
4799
+ case ACTIONS.ADD_UPDATE_PORTAL:
4800
+ return addUpdatePortal(clonedState, action.hostName, action.portalName, action.node);
4801
+ case ACTIONS.REMOVE_PORTAL:
4802
+ return removePortal(clonedState, action.hostName, action.portalName);
4803
+ default:
4804
+ return state;
4805
+ }
4806
+ };
4807
+
4808
+ var PortalProviderComponent = function PortalProviderComponent(_ref) {
4809
+ var _ref$rootHostName = _ref.rootHostName,
4810
+ rootHostName = _ref$rootHostName === void 0 ? 'root' : _ref$rootHostName,
4811
+ _ref$shouldAddRootHos = _ref.shouldAddRootHost,
4812
+ shouldAddRootHost = _ref$shouldAddRootHos === void 0 ? true : _ref$shouldAddRootHos,
4813
+ children = _ref.children;
4814
+ var _useReducer = React.useReducer(reducer, INITIAL_STATE),
4815
+ _useReducer2 = _slicedToArray(_useReducer, 2),
4816
+ state = _useReducer2[0],
4817
+ dispatch = _useReducer2[1];
4818
+ return /*#__PURE__*/React__default["default"].createElement(PortalDispatchContext.Provider, {
4819
+ value: dispatch
4820
+ }, /*#__PURE__*/React__default["default"].createElement(PortalStateContext.Provider, {
4821
+ value: state
4822
+ }, children, shouldAddRootHost && /*#__PURE__*/React__default["default"].createElement(PortalHost, {
4823
+ name: rootHostName
4824
+ })));
4825
+ };
4826
+ var PortalProvider = /*#__PURE__*/React.memo(PortalProviderComponent);
4827
+ PortalProvider.displayName = 'PortalProvider';
4828
+
4829
+ var index$c = /*#__PURE__*/Object.freeze({
4830
+ __proto__: null,
4831
+ Portal: Portal,
4832
+ PortalHost: PortalHost,
4833
+ PortalProvider: PortalProvider,
4834
+ usePortal: usePortal,
4835
+ enableLogging: enableLogging
4836
+ });
4837
+
4536
4838
  function getDefaultExportFromCjs (x) {
4537
4839
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
4538
4840
  }
@@ -6355,7 +6657,7 @@ var StyledText$3 = index$b(reactNative.Text)(function (_ref) {
6355
6657
  });
6356
6658
  });
6357
6659
 
6358
- var _excluded$A = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
6660
+ var _excluded$z = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
6359
6661
  var Text = function Text(_ref) {
6360
6662
  var children = _ref.children,
6361
6663
  _ref$fontSize = _ref.fontSize,
@@ -6368,7 +6670,7 @@ var Text = function Text(_ref) {
6368
6670
  typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
6369
6671
  _ref$allowFontScaling = _ref.allowFontScaling,
6370
6672
  allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
6371
- nativeProps = _objectWithoutProperties(_ref, _excluded$A);
6673
+ nativeProps = _objectWithoutProperties(_ref, _excluded$z);
6372
6674
  useDeprecation('Typography.Text is deprecated and will be removed in the next major release, please refer to https://design.employmenthero.com/mobile/Components/typography for the appropriate alternatives.');
6373
6675
  return /*#__PURE__*/React__default["default"].createElement(StyledText$3, _extends$1({}, nativeProps, {
6374
6676
  themeFontSize: fontSize,
@@ -6398,7 +6700,7 @@ var StyledCaption = index$b(reactNative.Text)(function (_ref) {
6398
6700
  };
6399
6701
  });
6400
6702
 
6401
- var _excluded$z = ["children", "fontWeight", "intent", "allowFontScaling"];
6703
+ var _excluded$y = ["children", "fontWeight", "intent", "allowFontScaling"];
6402
6704
  var Caption = function Caption(_ref) {
6403
6705
  var children = _ref.children,
6404
6706
  _ref$fontWeight = _ref.fontWeight,
@@ -6407,7 +6709,7 @@ var Caption = function Caption(_ref) {
6407
6709
  intent = _ref$intent === void 0 ? 'body' : _ref$intent,
6408
6710
  _ref$allowFontScaling = _ref.allowFontScaling,
6409
6711
  allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
6410
- nativeProps = _objectWithoutProperties(_ref, _excluded$z);
6712
+ nativeProps = _objectWithoutProperties(_ref, _excluded$y);
6411
6713
  return /*#__PURE__*/React__default["default"].createElement(StyledCaption, _extends$1({}, nativeProps, {
6412
6714
  themeFontWeight: fontWeight,
6413
6715
  themeIntent: intent,
@@ -6426,14 +6728,14 @@ var StyledLabel$1 = index$b(reactNative.Text)(function (_ref) {
6426
6728
  };
6427
6729
  });
6428
6730
 
6429
- var _excluded$y = ["children", "intent", "allowFontScaling"];
6731
+ var _excluded$x = ["children", "intent", "allowFontScaling"];
6430
6732
  var Label = function Label(_ref) {
6431
6733
  var children = _ref.children,
6432
6734
  _ref$intent = _ref.intent,
6433
6735
  intent = _ref$intent === void 0 ? 'body' : _ref$intent,
6434
6736
  _ref$allowFontScaling = _ref.allowFontScaling,
6435
6737
  allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
6436
- nativeProps = _objectWithoutProperties(_ref, _excluded$y);
6738
+ nativeProps = _objectWithoutProperties(_ref, _excluded$x);
6437
6739
  return /*#__PURE__*/React__default["default"].createElement(StyledLabel$1, _extends$1({}, nativeProps, {
6438
6740
  themeIntent: intent,
6439
6741
  allowFontScaling: allowFontScaling
@@ -6454,7 +6756,7 @@ var StyledTitle$1 = index$b(reactNative.Text)(function (_ref) {
6454
6756
  };
6455
6757
  });
6456
6758
 
6457
- var _excluded$x = ["children", "intent", "allowFontScaling", "level", "typeface"];
6759
+ var _excluded$w = ["children", "intent", "allowFontScaling", "level", "typeface"];
6458
6760
  var Title = function Title(_ref) {
6459
6761
  var children = _ref.children,
6460
6762
  _ref$intent = _ref.intent,
@@ -6465,7 +6767,7 @@ var Title = function Title(_ref) {
6465
6767
  level = _ref$level === void 0 ? 'h1' : _ref$level,
6466
6768
  _ref$typeface = _ref.typeface,
6467
6769
  typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
6468
- nativeProps = _objectWithoutProperties(_ref, _excluded$x);
6770
+ nativeProps = _objectWithoutProperties(_ref, _excluded$w);
6469
6771
  return /*#__PURE__*/React__default["default"].createElement(StyledTitle$1, _extends$1({}, nativeProps, {
6470
6772
  themeLevel: level,
6471
6773
  themeTypeface: typeface,
@@ -6500,7 +6802,7 @@ var StyledBody = index$b(reactNative.Text)(function (_ref) {
6500
6802
  };
6501
6803
  });
6502
6804
 
6503
- var _excluded$w = ["children", "intent", "allowFontScaling", "typeface", "variant"];
6805
+ var _excluded$v = ["children", "intent", "allowFontScaling", "typeface", "variant"];
6504
6806
  var Body = function Body(_ref) {
6505
6807
  var children = _ref.children,
6506
6808
  _ref$intent = _ref.intent,
@@ -6511,7 +6813,7 @@ var Body = function Body(_ref) {
6511
6813
  typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
6512
6814
  _ref$variant = _ref.variant,
6513
6815
  variant = _ref$variant === void 0 ? 'regular' : _ref$variant,
6514
- nativeProps = _objectWithoutProperties(_ref, _excluded$w);
6816
+ nativeProps = _objectWithoutProperties(_ref, _excluded$v);
6515
6817
  return /*#__PURE__*/React__default["default"].createElement(StyledBody, _extends$1({}, nativeProps, {
6516
6818
  themeTypeface: typeface,
6517
6819
  themeIntent: intent,
@@ -7041,10 +7343,10 @@ var StyledHeroIcon = index$b(HeroIcon)(function (_ref) {
7041
7343
  };
7042
7344
  });
7043
7345
 
7044
- var _excluded$v = ["style"];
7346
+ var _excluded$u = ["style"];
7045
7347
  var AnimatedIcon = function AnimatedIcon(_ref) {
7046
7348
  var style = _ref.style,
7047
- otherProps = _objectWithoutProperties(_ref, _excluded$v);
7349
+ otherProps = _objectWithoutProperties(_ref, _excluded$u);
7048
7350
  var rotateAnimation = React.useRef(new reactNative.Animated.Value(0));
7049
7351
  React.useEffect(function () {
7050
7352
  var animation = reactNative.Animated.loop(reactNative.Animated.timing(rotateAnimation.current, {
@@ -7149,7 +7451,7 @@ var AccordionItem = function AccordionItem(_ref) {
7149
7451
  }, content));
7150
7452
  };
7151
7453
 
7152
- var _excluded$u = ["key"];
7454
+ var _excluded$t = ["key"];
7153
7455
  var Accordion = function Accordion(_ref) {
7154
7456
  var items = _ref.items,
7155
7457
  activeItemKey = _ref.activeItemKey,
@@ -7170,7 +7472,7 @@ var Accordion = function Accordion(_ref) {
7170
7472
  testID: testID
7171
7473
  }, items.map(function (_ref2, index) {
7172
7474
  var key = _ref2.key,
7173
- props = _objectWithoutProperties(_ref2, _excluded$u);
7475
+ props = _objectWithoutProperties(_ref2, _excluded$t);
7174
7476
  var open = _activeItemKey === key;
7175
7477
  return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, {
7176
7478
  key: key
@@ -7568,7 +7870,7 @@ var StyledStatus = index$b(reactNative.Animated.View)(function (_ref3) {
7568
7870
  };
7569
7871
  });
7570
7872
 
7571
- var _excluded$t = ["children", "visible", "intent", "style", "testID"];
7873
+ var _excluded$s = ["children", "visible", "intent", "style", "testID"];
7572
7874
  var Status = function Status(_ref) {
7573
7875
  var children = _ref.children,
7574
7876
  _ref$visible = _ref.visible,
@@ -7577,7 +7879,7 @@ var Status = function Status(_ref) {
7577
7879
  intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
7578
7880
  style = _ref.style,
7579
7881
  testID = _ref.testID,
7580
- nativeProps = _objectWithoutProperties(_ref, _excluded$t);
7882
+ nativeProps = _objectWithoutProperties(_ref, _excluded$s);
7581
7883
  var _React$useRef = React__default["default"].useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
7582
7884
  opacity = _React$useRef.current;
7583
7885
  var isFirstRendering = React__default["default"].useRef(true);
@@ -7610,7 +7912,7 @@ var Status = function Status(_ref) {
7610
7912
  }));
7611
7913
  };
7612
7914
 
7613
- var _excluded$s = ["content", "visible", "max", "intent", "style", "testID"];
7915
+ var _excluded$r = ["content", "visible", "max", "intent", "style", "testID"];
7614
7916
  var DEFAULT_MAX_NUMBER = 99;
7615
7917
  var getPaddingState = function getPaddingState(content) {
7616
7918
  return content.length > 1 ? 'wideContent' : 'narrowContent';
@@ -7625,7 +7927,7 @@ var Badge = function Badge(_ref) {
7625
7927
  intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
7626
7928
  style = _ref.style,
7627
7929
  testID = _ref.testID,
7628
- nativeProps = _objectWithoutProperties(_ref, _excluded$s);
7930
+ nativeProps = _objectWithoutProperties(_ref, _excluded$r);
7629
7931
  var _React$useRef = React__default["default"].useRef(new reactNative.Animated.Value(visible ? 1 : 0)),
7630
7932
  opacity = _React$useRef.current;
7631
7933
  var isFirstRendering = React__default["default"].useRef(true);
@@ -7729,7 +8031,7 @@ function omit(keys, obj) {
7729
8031
  return result;
7730
8032
  }
7731
8033
 
7732
- var _excluded$r = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
8034
+ var _excluded$q = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
7733
8035
  var getInactiveIcon = function getInactiveIcon(icon) {
7734
8036
  var inactiveIcon = "".concat(icon, "-outlined");
7735
8037
  return isHeroIcon(inactiveIcon) ? inactiveIcon : icon;
@@ -7740,7 +8042,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
7740
8042
  renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
7741
8043
  selectedTabKey = _ref.selectedTabKey,
7742
8044
  tabs = _ref.tabs,
7743
- nativeProps = _objectWithoutProperties(_ref, _excluded$r);
8045
+ nativeProps = _objectWithoutProperties(_ref, _excluded$q);
7744
8046
  var insets = reactNativeSafeAreaContext.useSafeAreaInsets();
7745
8047
  /**
7746
8048
  * List of loaded tabs, tabs will be loaded when navigated to.
@@ -7826,13 +8128,13 @@ var StyledDivider = index$b(reactNative.View)(function (_ref) {
7826
8128
  }, horizontalMargin), verticalMargin);
7827
8129
  });
7828
8130
 
7829
- var _excluded$q = ["marginHorizontal", "marginVertical", "style", "testID"];
8131
+ var _excluded$p = ["marginHorizontal", "marginVertical", "style", "testID"];
7830
8132
  var Divider = function Divider(_ref) {
7831
8133
  var marginHorizontal = _ref.marginHorizontal,
7832
8134
  marginVertical = _ref.marginVertical,
7833
8135
  style = _ref.style,
7834
8136
  testID = _ref.testID,
7835
- nativeProps = _objectWithoutProperties(_ref, _excluded$q);
8137
+ nativeProps = _objectWithoutProperties(_ref, _excluded$p);
7836
8138
  return /*#__PURE__*/React__default["default"].createElement(StyledDivider, _extends$1({}, nativeProps, {
7837
8139
  themeMarginHorizontal: marginHorizontal,
7838
8140
  themeMarginVertical: marginVertical,
@@ -7962,7 +8264,7 @@ var StyledLoadingDot = index$b(reactNative.View)(function (_ref2) {
7962
8264
  }, themeStyling());
7963
8265
  });
7964
8266
 
7965
- var _excluded$p = ["count", "size", "testID", "themeVariant"];
8267
+ var _excluded$o = ["count", "size", "testID", "themeVariant"];
7966
8268
  var AnimatedLoadingIndicatorWrapper = reactNative.Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
7967
8269
  var AnimatedLoadingDot = reactNative.Animated.createAnimatedComponent(StyledLoadingDot);
7968
8270
  var renderDotComponent = function renderDotComponent(_ref) {
@@ -7994,7 +8296,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
7994
8296
  size = _ref2$size === void 0 ? 12 : _ref2$size,
7995
8297
  testID = _ref2.testID,
7996
8298
  themeVariant = _ref2.themeVariant,
7997
- nativeProps = _objectWithoutProperties(_ref2, _excluded$p);
8299
+ nativeProps = _objectWithoutProperties(_ref2, _excluded$o);
7998
8300
  var progressAnimation = React.useRef(new reactNative.Animated.Value(0));
7999
8301
  React.useEffect(function () {
8000
8302
  var animation = reactNative.Animated.loop(reactNative.Animated.timing(progressAnimation.current, {
@@ -8433,11 +8735,11 @@ var Header = function Header(_ref) {
8433
8735
  })) : null), showDivider ? /*#__PURE__*/React__default["default"].createElement(Divider, null) : null);
8434
8736
  };
8435
8737
 
8436
- var _excluded$o = ["scrollEventThrottle"];
8738
+ var _excluded$n = ["scrollEventThrottle"];
8437
8739
  var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
8438
8740
  var _ref$scrollEventThrot = _ref.scrollEventThrottle,
8439
8741
  scrollEventThrottle = _ref$scrollEventThrot === void 0 ? 100 : _ref$scrollEventThrot,
8440
- props = _objectWithoutProperties(_ref, _excluded$o);
8742
+ props = _objectWithoutProperties(_ref, _excluded$n);
8441
8743
  var _useContext = React.useContext(BottomSheetContext),
8442
8744
  setInternalShowDivider = _useContext.setInternalShowDivider;
8443
8745
  var onScrollBeginDrag = React.useCallback(function (e) {
@@ -8752,7 +9054,7 @@ var borderWidths = {
8752
9054
  var config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, colors), space), radii), borderWidths);
8753
9055
  var flexPropsKey = ['alignContent', 'alignItems', 'alignSelf', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'justifyContent'];
8754
9056
 
8755
- var _excluded$n = ["theme"];
9057
+ var _excluded$m = ["theme"];
8756
9058
  var getThemeValue = function getThemeValue(theme, key, props) {
8757
9059
  var propConfig = config[key];
8758
9060
  var propValue = props[key];
@@ -8779,18 +9081,18 @@ var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
8779
9081
  var configKeys = Object.keys(config);
8780
9082
  var StyledBox = index$b(reactNative.View)(function (_ref5) {
8781
9083
  var theme = _ref5.theme,
8782
- otherProps = _objectWithoutProperties(_ref5, _excluded$n);
9084
+ otherProps = _objectWithoutProperties(_ref5, _excluded$m);
8783
9085
  var styleProps = pick(configKeys, otherProps);
8784
9086
  var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
8785
9087
  return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
8786
9088
  });
8787
9089
 
8788
- var _excluded$m = ["children", "style", "testID"];
9090
+ var _excluded$l = ["children", "style", "testID"];
8789
9091
  var Box = function Box(_ref) {
8790
9092
  var children = _ref.children,
8791
9093
  style = _ref.style,
8792
9094
  testID = _ref.testID,
8793
- otherProps = _objectWithoutProperties(_ref, _excluded$m);
9095
+ otherProps = _objectWithoutProperties(_ref, _excluded$l);
8794
9096
  return /*#__PURE__*/React__default["default"].createElement(StyledBox, _extends$1({}, otherProps, {
8795
9097
  style: style,
8796
9098
  testID: testID
@@ -11426,7 +11728,7 @@ var Calendar = function Calendar(_ref) {
11426
11728
  })));
11427
11729
  };
11428
11730
 
11429
- var _excluded$l = ["rounded", "size", "testID", "style"];
11731
+ var _excluded$k = ["rounded", "size", "testID", "style"];
11430
11732
  var Image = function Image(_ref) {
11431
11733
  var _ref$rounded = _ref.rounded,
11432
11734
  rounded = _ref$rounded === void 0 ? false : _ref$rounded,
@@ -11434,7 +11736,7 @@ var Image = function Image(_ref) {
11434
11736
  size = _ref$size === void 0 ? '6xlarge' : _ref$size,
11435
11737
  testID = _ref.testID,
11436
11738
  style = _ref.style,
11437
- imageNativeProps = _objectWithoutProperties(_ref, _excluded$l);
11739
+ imageNativeProps = _objectWithoutProperties(_ref, _excluded$k);
11438
11740
  var theme = useTheme();
11439
11741
  var imageSize = theme.__hd__.image.sizes[size];
11440
11742
  return /*#__PURE__*/React__default["default"].createElement(reactNative.Image, _extends$1({
@@ -11636,12 +11938,12 @@ var Indicator = index$b(reactNative.View)(function (_ref2) {
11636
11938
  };
11637
11939
  });
11638
11940
 
11639
- var _excluded$k = ["intent", "children"];
11941
+ var _excluded$j = ["intent", "children"];
11640
11942
  var DataCard = function DataCard(_ref) {
11641
11943
  var _ref$intent = _ref.intent,
11642
11944
  intent = _ref$intent === void 0 ? 'info' : _ref$intent,
11643
11945
  children = _ref.children,
11644
- nativeProps = _objectWithoutProperties(_ref, _excluded$k);
11946
+ nativeProps = _objectWithoutProperties(_ref, _excluded$j);
11645
11947
  return /*#__PURE__*/React__default["default"].createElement(StyledDataCard, nativeProps, /*#__PURE__*/React__default["default"].createElement(Indicator, {
11646
11948
  themeIntent: intent,
11647
11949
  testID: "data-card-indicator"
@@ -11659,11 +11961,11 @@ var StyledCard$1 = index$b(reactNative.View)(function (_ref) {
11659
11961
  });
11660
11962
  });
11661
11963
 
11662
- var _excluded$j = ["intent", "children"];
11964
+ var _excluded$i = ["intent", "children"];
11663
11965
  var Card = function Card(_ref) {
11664
11966
  var intent = _ref.intent,
11665
11967
  children = _ref.children,
11666
- nativeProps = _objectWithoutProperties(_ref, _excluded$j);
11968
+ nativeProps = _objectWithoutProperties(_ref, _excluded$i);
11667
11969
  return /*#__PURE__*/React__default["default"].createElement(StyledCard$1, _extends$1({}, nativeProps, {
11668
11970
  themeIntent: intent
11669
11971
  }), children);
@@ -11870,7 +12172,7 @@ var CardCarousel = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
11870
12172
  });
11871
12173
  CardCarousel.displayName = 'CardCarousel';
11872
12174
 
11873
- var _excluded$i = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination", "pageControlPosition"];
12175
+ var _excluded$h = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination", "pageControlPosition"];
11874
12176
  function useStateFromProp(initialValue) {
11875
12177
  var _useState = React.useState(initialValue),
11876
12178
  _useState2 = _slicedToArray(_useState, 2),
@@ -11895,7 +12197,7 @@ var Carousel = function Carousel(_ref) {
11895
12197
  shouldShowPagination = _ref$shouldShowPagina === void 0 ? noop : _ref$shouldShowPagina,
11896
12198
  _ref$pageControlPosit = _ref.pageControlPosition,
11897
12199
  pageControlPosition = _ref$pageControlPosit === void 0 ? 'bottom' : _ref$pageControlPosit,
11898
- nativeProps = _objectWithoutProperties(_ref, _excluded$i);
12200
+ nativeProps = _objectWithoutProperties(_ref, _excluded$h);
11899
12201
  useDeprecation("shouldShowPagination prop has been deprecated", shouldShowPagination !== noop);
11900
12202
  useDeprecation("The use of 'pageControlPosition == bottom' has been deprecated", pageControlPosition === 'bottom');
11901
12203
  var carouselRef = React.useRef(null);
@@ -12218,7 +12520,7 @@ var StyledErrorAndMaxLengthContainer = index$b(reactNative.View)(function () {
12218
12520
  };
12219
12521
  });
12220
12522
 
12221
- var _excluded$h = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "hideCharacterCount", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling", "variant"];
12523
+ var _excluded$g = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "hideCharacterCount", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling", "variant"];
12222
12524
  var getState$1 = function getState(_ref) {
12223
12525
  var disabled = _ref.disabled,
12224
12526
  error = _ref.error,
@@ -12270,7 +12572,7 @@ var TextInput = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
12270
12572
  allowFontScaling = _ref2$allowFontScalin === void 0 ? false : _ref2$allowFontScalin,
12271
12573
  _ref2$variant = _ref2.variant,
12272
12574
  variant = _ref2$variant === void 0 ? 'text' : _ref2$variant,
12273
- nativeProps = _objectWithoutProperties(_ref2, _excluded$h);
12575
+ nativeProps = _objectWithoutProperties(_ref2, _excluded$g);
12274
12576
  var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
12275
12577
  var isEmptyValue = displayText.length === 0;
12276
12578
  var actualSuffix = loading ? 'loading' : suffix;
@@ -12714,11 +13016,11 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
12714
13016
  }))));
12715
13017
  };
12716
13018
 
12717
- var _excluded$g = ["variant"];
13019
+ var _excluded$f = ["variant"];
12718
13020
  var DatePicker = function DatePicker(_ref) {
12719
13021
  var _ref$variant = _ref.variant,
12720
13022
  variant = _ref$variant === void 0 ? 'default' : _ref$variant,
12721
- props = _objectWithoutProperties(_ref, _excluded$g);
13023
+ props = _objectWithoutProperties(_ref, _excluded$f);
12722
13024
  if (variant === 'calendar') {
12723
13025
  return /*#__PURE__*/React__default["default"].createElement(DatePickerCalendar, props);
12724
13026
  }
@@ -13152,7 +13454,7 @@ var StyledErrorDescription = index$b(Typography.Body)(function (_ref9) {
13152
13454
  };
13153
13455
  });
13154
13456
 
13155
- var _excluded$f = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"],
13457
+ var _excluded$e = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"],
13156
13458
  _excluded2 = ["visible", "variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
13157
13459
  var renderImage$1 = function renderImage(image) {
13158
13460
  if ( /*#__PURE__*/React.isValidElement(image)) {
@@ -13178,7 +13480,7 @@ var ErrorPage = function ErrorPage(_ref) {
13178
13480
  onCtaPress = _ref.onCtaPress,
13179
13481
  secondaryCtaText = _ref.secondaryCtaText,
13180
13482
  onSecondaryCtaPress = _ref.onSecondaryCtaPress,
13181
- nativeProps = _objectWithoutProperties(_ref, _excluded$f);
13483
+ nativeProps = _objectWithoutProperties(_ref, _excluded$e);
13182
13484
  var showCta = ctaText && onCtaPress !== undefined;
13183
13485
  var showSecondaryCta = secondaryCtaText && onSecondaryCtaPress !== undefined;
13184
13486
  var showButtonContainer = showCta || showSecondaryCta;
@@ -13337,11 +13639,11 @@ var StyledIconContainer = index$b(Box)(function (_ref4) {
13337
13639
  };
13338
13640
  });
13339
13641
 
13340
- var _excluded$e = ["active"];
13642
+ var _excluded$d = ["active"];
13341
13643
  var AnimatedIcons = reactNative.Animated.createAnimatedComponent(StyledFABIcon);
13342
13644
  var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
13343
13645
  var active = _ref.active,
13344
- iconProps = _objectWithoutProperties(_ref, _excluded$e);
13646
+ iconProps = _objectWithoutProperties(_ref, _excluded$d);
13345
13647
  var rotateAnimation = React.useRef(new reactNative.Animated.Value(active ? 1 : 0));
13346
13648
  React.useEffect(function () {
13347
13649
  var animation = reactNative.Animated.spring(rotateAnimation.current, {
@@ -13463,17 +13765,10 @@ var FAB = /*#__PURE__*/React.forwardRef(function (_ref3, ref) {
13463
13765
  return /*#__PURE__*/React__default["default"].createElement(StyledFAB$1
13464
13766
  /** Add a small timeout before executing animation to prevent flakiness */, {
13465
13767
  onLayout: function onLayout() {
13466
- setTimeout(function () {
13768
+ return setTimeout(function () {
13467
13769
  return setCanAnimate(true);
13468
13770
  }, 500);
13469
13771
  },
13470
- ref: function ref(_ref4) {
13471
- if (_ref4) {
13472
- _ref4.measureInWindow(function (x, y, width, height) {
13473
- console.log('measureInWindow', x, y, width, height);
13474
- });
13475
- }
13476
- },
13477
13772
  underlayColor: theme.__hd__.fab.colors.buttonPressedBackground,
13478
13773
  onPress: onPress,
13479
13774
  style: [style, {
@@ -13610,7 +13905,8 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
13610
13905
  testID = _ref.testID,
13611
13906
  fabTitle = _ref.fabTitle,
13612
13907
  _ref$fabIcon = _ref.fabIcon,
13613
- fabIcon = _ref$fabIcon === void 0 ? 'add' : _ref$fabIcon;
13908
+ fabIcon = _ref$fabIcon === void 0 ? 'add' : _ref$fabIcon,
13909
+ portalName = _ref.portalName;
13614
13910
  var fabRef = React.useRef(null);
13615
13911
  var tranlateXAnimation = React.useRef(new reactNative.Animated.Value(active ? 1 : 0));
13616
13912
  var titleTranslateYValue = React__default["default"].useRef(new reactNative.Animated.Value(0));
@@ -13651,7 +13947,10 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
13651
13947
  inputRange: [0, 1],
13652
13948
  outputRange: [0, 1]
13653
13949
  });
13654
- return /*#__PURE__*/React__default["default"].createElement(StyledContainer$2, {
13950
+ var Wrapper = portalName ? Portal : React__default["default"].Fragment;
13951
+ return /*#__PURE__*/React__default["default"].createElement(Wrapper, {
13952
+ name: portalName
13953
+ }, /*#__PURE__*/React__default["default"].createElement(StyledContainer$2, {
13655
13954
  testID: testID,
13656
13955
  pointerEvents: "box-none",
13657
13956
  style: style
@@ -13687,7 +13986,9 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
13687
13986
  index: active ? index : items.length - index,
13688
13987
  active: active
13689
13988
  }));
13690
- }))), /*#__PURE__*/React__default["default"].createElement(StyledFAB, {
13989
+ }))), /*#__PURE__*/React__default["default"].createElement(Portal, {
13990
+ hostName: "CustomPortalHost"
13991
+ }, /*#__PURE__*/React__default["default"].createElement(StyledFAB, {
13691
13992
  testID: "fab",
13692
13993
  icon: fabIcon,
13693
13994
  onPress: onPress,
@@ -13695,12 +13996,15 @@ var ActionGroup = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
13695
13996
  active: active,
13696
13997
  title: fabTitle,
13697
13998
  ref: fabRef
13698
- }));
13999
+ }))));
13699
14000
  });
13700
14001
  ActionGroup.displayName = 'FAB.ActionGroup';
13701
14002
 
13702
14003
  var index$7 = Object.assign(FAB, {
13703
- ActionGroup: ActionGroup
14004
+ ActionGroup: ActionGroup,
14005
+ Portal: Portal,
14006
+ PortalHost: PortalHost,
14007
+ Provider: PortalProvider
13704
14008
  });
13705
14009
 
13706
14010
  var StyledListItemContainer$1 = index$b(reactNative.TouchableHighlight)(function (_ref) {
@@ -13954,11 +14258,11 @@ var ModalProvider = function ModalProvider(_ref) {
13954
14258
  return /*#__PURE__*/React__default["default"].createElement(RootSiblings.RootSiblingParent, null, children);
13955
14259
  };
13956
14260
 
13957
- var _excluded$d = ["style", "children"];
14261
+ var _excluded$c = ["style", "children"];
13958
14262
  var ModalPresenter = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
13959
14263
  var style = _ref2.style,
13960
14264
  children = _ref2.children,
13961
- props = _objectWithoutProperties(_ref2, _excluded$d);
14265
+ props = _objectWithoutProperties(_ref2, _excluded$c);
13962
14266
  var animatedOpacity = React.useRef(new reactNative.Animated.Value(0));
13963
14267
  var theme = useTheme();
13964
14268
  React__default["default"].useEffect(function () {
@@ -14042,7 +14346,7 @@ var showModal = function showModal(content) {
14042
14346
  };
14043
14347
  ModalPresenter.displayName = 'ModalPresenter';
14044
14348
 
14045
- var wrapperStyle$1 = {
14349
+ var wrapperStyle = {
14046
14350
  width: reactNative.Dimensions.get('window').width,
14047
14351
  height: reactNative.Dimensions.get('window').height
14048
14352
  };
@@ -14063,11 +14367,11 @@ var Modal = function Modal(_ref) {
14063
14367
  var getModalContent = React__default["default"].useCallback(function () {
14064
14368
  var isUpdate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
14065
14369
  return animationType === 'none' ? /*#__PURE__*/React__default["default"].createElement(reactNative.View, {
14066
- style: wrapperStyle$1,
14370
+ style: wrapperStyle,
14067
14371
  testID: testID
14068
14372
  }, children) : /*#__PURE__*/React__default["default"].createElement(ModalContentWrapper, {
14069
14373
  visible: visible,
14070
- style: wrapperStyle$1,
14374
+ style: wrapperStyle,
14071
14375
  animationType: animationType,
14072
14376
  testID: testID,
14073
14377
  onShow: onShow,
@@ -14416,7 +14720,7 @@ var StyledStrokeEnd = index$b(reactNative.View)(function (_ref6) {
14416
14720
  };
14417
14721
  });
14418
14722
 
14419
- var _excluded$c = ["value", "renderValue", "intent", "style", "testID"];
14723
+ var _excluded$b = ["value", "renderValue", "intent", "style", "testID"];
14420
14724
  var HalfCircle = function HalfCircle(_ref) {
14421
14725
  var type = _ref.type,
14422
14726
  themeIntent = _ref.themeIntent;
@@ -14437,7 +14741,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
14437
14741
  intent = _ref2$intent === void 0 ? 'primary' : _ref2$intent,
14438
14742
  style = _ref2.style,
14439
14743
  testID = _ref2.testID,
14440
- nativeProps = _objectWithoutProperties(_ref2, _excluded$c);
14744
+ nativeProps = _objectWithoutProperties(_ref2, _excluded$b);
14441
14745
  var theme = useTheme$1();
14442
14746
  var radius = theme.__hd__.progress.sizes.circleDiameter / 2;
14443
14747
  var progressAnimatedValue = React.useRef(new reactNative.Animated.Value(0));
@@ -14552,14 +14856,14 @@ var StyledInner = index$b(reactNative.Animated.View)(function (_ref2) {
14552
14856
  };
14553
14857
  });
14554
14858
 
14555
- var _excluded$b = ["value", "intent", "style", "testID"];
14859
+ var _excluded$a = ["value", "intent", "style", "testID"];
14556
14860
  var ProgressBar = function ProgressBar(_ref) {
14557
14861
  var value = _ref.value,
14558
14862
  _ref$intent = _ref.intent,
14559
14863
  intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
14560
14864
  style = _ref.style,
14561
14865
  testID = _ref.testID,
14562
- nativeProps = _objectWithoutProperties(_ref, _excluded$b);
14866
+ nativeProps = _objectWithoutProperties(_ref, _excluded$a);
14563
14867
  var _useState = React.useState(0),
14564
14868
  _useState2 = _slicedToArray(_useState, 2),
14565
14869
  width = _useState2[0],
@@ -14750,14 +15054,14 @@ var AnimatedSpinner = function AnimatedSpinner(_ref) {
14750
15054
  }, dotProps))));
14751
15055
  };
14752
15056
 
14753
- var _excluded$a = ["testID", "size", "intent"];
15057
+ var _excluded$9 = ["testID", "size", "intent"];
14754
15058
  var Spinner = function Spinner(_ref) {
14755
15059
  var testID = _ref.testID,
14756
15060
  _ref$size = _ref.size,
14757
15061
  size = _ref$size === void 0 ? 'medium' : _ref$size,
14758
15062
  _ref$intent = _ref.intent,
14759
15063
  intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
14760
- nativeProps = _objectWithoutProperties(_ref, _excluded$a);
15064
+ nativeProps = _objectWithoutProperties(_ref, _excluded$9);
14761
15065
  return /*#__PURE__*/React__default["default"].createElement(StyledView$1, nativeProps, /*#__PURE__*/React__default["default"].createElement(StyledSpinnerContainer, {
14762
15066
  testID: testID
14763
15067
  }, /*#__PURE__*/React__default["default"].createElement(AnimatedSpinner, {
@@ -14790,7 +15094,7 @@ var SwipeableAction = function SwipeableAction(_ref) {
14790
15094
  }, children);
14791
15095
  };
14792
15096
 
14793
- var _excluded$9 = ["children", "state", "onStateChange", "leftActions", "leftActionsWidth", "rightActions", "rightActionsWidth"];
15097
+ var _excluded$8 = ["children", "state", "onStateChange", "leftActions", "leftActionsWidth", "rightActions", "rightActionsWidth"];
14794
15098
  var renderActions = function renderActions(actions, width, progress, direction) {
14795
15099
  var trans = progress.interpolate({
14796
15100
  inputRange: [0, 1],
@@ -14815,7 +15119,7 @@ var Swipeable = function Swipeable(_ref) {
14815
15119
  leftActionsWidth = _ref.leftActionsWidth,
14816
15120
  rightActions = _ref.rightActions,
14817
15121
  rightActionsWidth = _ref.rightActionsWidth,
14818
- swipeableProps = _objectWithoutProperties(_ref, _excluded$9);
15122
+ swipeableProps = _objectWithoutProperties(_ref, _excluded$8);
14819
15123
  var _useWindowDimensions = reactNative.useWindowDimensions(),
14820
15124
  width = _useWindowDimensions.width;
14821
15125
  var swipeableRef = React.useRef(null);
@@ -15120,7 +15424,7 @@ var StyledSectionList = index$b(reactNative.SectionList)(function (_ref4) {
15120
15424
  };
15121
15425
  });
15122
15426
 
15123
- var _excluded$8 = ["keyExtractor", "loading", "onEndReached", "onQueryChange", "sections", "renderItem", "sectionListRef"];
15427
+ var _excluded$7 = ["keyExtractor", "loading", "onEndReached", "onQueryChange", "sections", "renderItem", "sectionListRef"];
15124
15428
  var BaseOptionList = function BaseOptionList(_ref) {
15125
15429
  var keyExtractor = _ref.keyExtractor,
15126
15430
  loading = _ref.loading,
@@ -15129,7 +15433,7 @@ var BaseOptionList = function BaseOptionList(_ref) {
15129
15433
  sections = _ref.sections,
15130
15434
  renderItem = _ref.renderItem,
15131
15435
  sectionListRef = _ref.sectionListRef,
15132
- rest = _objectWithoutProperties(_ref, _excluded$8);
15436
+ rest = _objectWithoutProperties(_ref, _excluded$7);
15133
15437
  var theme = useTheme$1();
15134
15438
  var _useState = React.useState(false),
15135
15439
  _useState2 = _slicedToArray(_useState, 2),
@@ -15199,7 +15503,7 @@ var Option$2 = function Option(_ref) {
15199
15503
  return highlighted === true ? /*#__PURE__*/React__default["default"].createElement(List.Item, props) : /*#__PURE__*/React__default["default"].createElement(List.BasicItem, props);
15200
15504
  };
15201
15505
 
15202
- var _excluded$7 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
15506
+ var _excluded$6 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
15203
15507
  var OptionList$1 = function OptionList(_ref) {
15204
15508
  var keyExtractor = _ref.keyExtractor,
15205
15509
  loading = _ref.loading,
@@ -15210,7 +15514,7 @@ var OptionList$1 = function OptionList(_ref) {
15210
15514
  renderOption = _ref.renderOption,
15211
15515
  value = _ref.value,
15212
15516
  sectionListRef = _ref.sectionListRef,
15213
- rest = _objectWithoutProperties(_ref, _excluded$7);
15517
+ rest = _objectWithoutProperties(_ref, _excluded$6);
15214
15518
  var renderItem = function renderItem(info) {
15215
15519
  var item = info.item;
15216
15520
  var selected = value.includes(info.item.value);
@@ -15398,7 +15702,7 @@ var StyledOptionList = index$b(BaseOptionList)(function (_ref) {
15398
15702
  };
15399
15703
  });
15400
15704
 
15401
- var _excluded$6 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
15705
+ var _excluded$5 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
15402
15706
  var OptionList = function OptionList(_ref) {
15403
15707
  var keyExtractor = _ref.keyExtractor,
15404
15708
  loading = _ref.loading,
@@ -15409,7 +15713,7 @@ var OptionList = function OptionList(_ref) {
15409
15713
  renderOption = _ref.renderOption,
15410
15714
  value = _ref.value,
15411
15715
  sectionListRef = _ref.sectionListRef,
15412
- rest = _objectWithoutProperties(_ref, _excluded$6);
15716
+ rest = _objectWithoutProperties(_ref, _excluded$5);
15413
15717
  var renderItem = function renderItem(info) {
15414
15718
  var item = info.item;
15415
15719
  var selected = item.value === value;
@@ -15574,7 +15878,7 @@ var StyledGradientContainer = index$b(Box)(function (_ref2) {
15574
15878
  };
15575
15879
  });
15576
15880
 
15577
- var _excluded$5 = ["intent", "variant", "style", "onLayout"];
15881
+ var _excluded$4 = ["intent", "variant", "style", "onLayout"];
15578
15882
  var AnimatedLinearGradient = reactNative.Animated.createAnimatedComponent(LinearGradient__default["default"]);
15579
15883
  var gradientPositions = {
15580
15884
  start: {
@@ -15606,7 +15910,7 @@ var Skeleton = function Skeleton(_ref) {
15606
15910
  variant = _ref$variant === void 0 ? 'rounded' : _ref$variant,
15607
15911
  style = _ref.style,
15608
15912
  onLayout = _ref.onLayout,
15609
- props = _objectWithoutProperties(_ref, _excluded$5);
15913
+ props = _objectWithoutProperties(_ref, _excluded$4);
15610
15914
  var theme = useTheme();
15611
15915
  var colors = React.useMemo(function () {
15612
15916
  return getGradientColors(theme, intent);
@@ -15738,7 +16042,7 @@ var StyledSuccessModal = index$b(reactNative.Modal)({
15738
16042
  width: '100%'
15739
16043
  });
15740
16044
 
15741
- var _excluded$4 = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
16045
+ var _excluded$3 = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
15742
16046
  var renderImage = function renderImage(image) {
15743
16047
  if ( /*#__PURE__*/React.isValidElement(image)) {
15744
16048
  return /*#__PURE__*/React__default["default"].cloneElement(image, {
@@ -15764,7 +16068,7 @@ var SuccessPage = function SuccessPage(_ref) {
15764
16068
  onCtaPress = _ref$onCtaPress === void 0 ? noop$1 : _ref$onCtaPress,
15765
16069
  secondaryCtaText = _ref.secondaryCtaText,
15766
16070
  onSecondaryCtaPress = _ref.onSecondaryCtaPress,
15767
- nativeProps = _objectWithoutProperties(_ref, _excluded$4);
16071
+ nativeProps = _objectWithoutProperties(_ref, _excluded$3);
15768
16072
  var showSecondaryButton = secondaryCtaText && onSecondaryCtaPress;
15769
16073
  return /*#__PURE__*/React__default["default"].createElement(StyledSuccessContainer, _extends$1({
15770
16074
  testID: testID,
@@ -16654,7 +16958,7 @@ var StyledText = index$b(Typography.Caption)(function (_ref3) {
16654
16958
  };
16655
16959
  });
16656
16960
 
16657
- var _excluded$3 = ["content", "variant", "intent", "style", "testID"];
16961
+ var _excluded$2 = ["content", "variant", "intent", "style", "testID"];
16658
16962
  var Tag = function Tag(_ref) {
16659
16963
  var content = _ref.content,
16660
16964
  _ref$variant = _ref.variant,
@@ -16663,7 +16967,7 @@ var Tag = function Tag(_ref) {
16663
16967
  intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
16664
16968
  style = _ref.style,
16665
16969
  testID = _ref.testID,
16666
- nativeProps = _objectWithoutProperties(_ref, _excluded$3);
16970
+ nativeProps = _objectWithoutProperties(_ref, _excluded$2);
16667
16971
  return /*#__PURE__*/React__default["default"].createElement(StyledView, _extends$1({}, nativeProps, {
16668
16972
  themeIntent: intent,
16669
16973
  themeVariant: variant,
@@ -17280,10 +17584,10 @@ var ToolbarGroup = function ToolbarGroup(_ref) {
17280
17584
  }));
17281
17585
  };
17282
17586
 
17283
- var _excluded$2 = ["children"];
17587
+ var _excluded$1 = ["children"];
17284
17588
  var Toolbar = function Toolbar(_ref) {
17285
17589
  var children = _ref.children,
17286
- rest = _objectWithoutProperties(_ref, _excluded$2);
17590
+ rest = _objectWithoutProperties(_ref, _excluded$1);
17287
17591
  return /*#__PURE__*/React__default["default"].createElement(ToolbarWrapper, rest, children);
17288
17592
  };
17289
17593
  var index$1 = Object.assign(Toolbar, {
@@ -17302,7 +17606,7 @@ var StyledIconWrapper = index$b(AnimatedBox)(function (_ref) {
17302
17606
  };
17303
17607
  });
17304
17608
 
17305
- var _excluded$1 = ["options", "value", "onChange", "readonly", "disabled"];
17609
+ var _excluded = ["options", "value", "onChange", "readonly", "disabled"];
17306
17610
  var Rate = function Rate(_ref) {
17307
17611
  var options = _ref.options,
17308
17612
  value = _ref.value,
@@ -17311,7 +17615,7 @@ var Rate = function Rate(_ref) {
17311
17615
  readonly = _ref$readonly === void 0 ? false : _ref$readonly,
17312
17616
  _ref$disabled = _ref.disabled,
17313
17617
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
17314
- otherProps = _objectWithoutProperties(_ref, _excluded$1);
17618
+ otherProps = _objectWithoutProperties(_ref, _excluded);
17315
17619
  var valueIndex = React.useMemo(function () {
17316
17620
  return options.findIndex(function (item) {
17317
17621
  return item.value === value;
@@ -33734,136 +34038,6 @@ var index = Object.assign(RichTextEditorWithRef, {
33734
34038
  Toolbar: EditorToolbar
33735
34039
  });
33736
34040
 
33737
- var _excluded = ["style", "children"];
33738
- var FABModalPresenter = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
33739
- var style = _ref2.style,
33740
- children = _ref2.children,
33741
- props = _objectWithoutProperties(_ref2, _excluded);
33742
- var animatedOpacity = React.useRef(new reactNative.Animated.Value(0));
33743
- React__default["default"].useEffect(function () {
33744
- reactNative.Animated.spring(animatedOpacity.current, {
33745
- toValue: 1,
33746
- useNativeDriver: true
33747
- }).start();
33748
- }, []);
33749
- React__default["default"].useImperativeHandle(ref, function () {
33750
- return {
33751
- animatedOut: function animatedOut(completion) {
33752
- reactNative.Animated.spring(animatedOpacity.current, {
33753
- toValue: 0,
33754
- useNativeDriver: true
33755
- }).start(function () {
33756
- completion === null || completion === void 0 ? void 0 : completion();
33757
- });
33758
- }
33759
- };
33760
- });
33761
- return /*#__PURE__*/React__default["default"].createElement(Box, {
33762
- style: reactNative.StyleSheet.absoluteFill,
33763
- pointerEvents: "box-none"
33764
- }, /*#__PURE__*/React__default["default"].createElement(reactNative.Animated.View, _extends$1({
33765
- style: [{
33766
- width: '100%',
33767
- height: '100%',
33768
- justifyContent: 'center',
33769
- alignItems: 'center',
33770
- opacity: animatedOpacity.current
33771
- }, style]
33772
- }, props, {
33773
- pointerEvents: "box-none"
33774
- }), children));
33775
- });
33776
- /**
33777
- * Present a modal on screen immediately.
33778
- *
33779
- * The new presented modal will be on top of existing modals if there are any.
33780
- *
33781
- * @param Content A component to be presented as a modal on screen.
33782
- * This component will be centered horizontally and vertically on screen with
33783
- * a semitransparent black overlay underneath.
33784
- * @param contentProps Props for this modal component.
33785
- * @returns A `ModalHandler` you can use to dismiss the modal.
33786
- */
33787
- var showFABModal = function showFABModal(content) {
33788
- var _ref3 = null;
33789
- var rootSiblings = null;
33790
- var dismiss = function dismiss(onDismiss) {
33791
- if (rootSiblings) {
33792
- var cleanup = function cleanup() {
33793
- var _rootSiblings;
33794
- (_rootSiblings = rootSiblings) === null || _rootSiblings === void 0 ? void 0 : _rootSiblings.destroy();
33795
- rootSiblings = null;
33796
- _ref3 = null;
33797
- onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
33798
- };
33799
- if (_ref3) {
33800
- _ref3.animatedOut(cleanup);
33801
- } else {
33802
- cleanup();
33803
- }
33804
- }
33805
- };
33806
- var update = function update(newContent) {
33807
- var _rootSiblings2;
33808
- (_rootSiblings2 = rootSiblings) === null || _rootSiblings2 === void 0 ? void 0 : _rootSiblings2.update( /*#__PURE__*/React__default["default"].createElement(FABModalPresenter, {
33809
- ref: function ref(_ref) {
33810
- _ref3 = _ref;
33811
- }
33812
- }, newContent));
33813
- };
33814
- rootSiblings = new RootSiblings__default["default"]( /*#__PURE__*/React__default["default"].createElement(FABModalPresenter, {
33815
- ref: function ref(_ref) {
33816
- _ref3 = _ref;
33817
- }
33818
- }, content));
33819
- return {
33820
- dismiss: dismiss,
33821
- update: update
33822
- };
33823
- };
33824
- FABModalPresenter.displayName = 'FABModalPresenter';
33825
-
33826
- var wrapperStyle = {
33827
- width: reactNative.Dimensions.get('window').width,
33828
- height: reactNative.Dimensions.get('window').height
33829
- };
33830
- var fABModal = function fABModal(_ref) {
33831
- var children = _ref.children,
33832
- onShow = _ref.onShow,
33833
- testID = _ref.testID,
33834
- _ref$visible = _ref.visible,
33835
- visible = _ref$visible === void 0 ? true : _ref$visible;
33836
- var _React$useState = React__default["default"].useState(),
33837
- _React$useState2 = _slicedToArray(_React$useState, 2),
33838
- modalHandler = _React$useState2[0],
33839
- setModalHandler = _React$useState2[1];
33840
- var getModalContent = React__default["default"].useCallback(function () {
33841
- return /*#__PURE__*/React__default["default"].createElement(reactNative.View, {
33842
- pointerEvents: "box-none",
33843
- style: wrapperStyle,
33844
- testID: testID
33845
- }, children);
33846
- }, [visible, children, onShow, testID]);
33847
- React__default["default"].useEffect(function () {
33848
- if (visible) {
33849
- // Modal does not exist, create a new one
33850
- if (!modalHandler) {
33851
- var newModalHandler = showFABModal(getModalContent());
33852
- setModalHandler(newModalHandler);
33853
- onShow === null || onShow === void 0 ? void 0 : onShow();
33854
- }
33855
- // Modal already exists, update it
33856
- else {
33857
- modalHandler.update(getModalContent());
33858
- }
33859
- } else {
33860
- modalHandler === null || modalHandler === void 0 ? void 0 : modalHandler.dismiss();
33861
- setModalHandler(undefined);
33862
- }
33863
- }, [getModalContent]);
33864
- return null;
33865
- };
33866
-
33867
34041
  exports.Accordion = Accordion;
33868
34042
  exports.Alert = Alert;
33869
34043
  exports.Attachment = Attachment;
@@ -33885,13 +34059,13 @@ exports.Drawer = index$8;
33885
34059
  exports.Empty = Empty;
33886
34060
  exports.Error = Error$1;
33887
34061
  exports.FAB = index$7;
33888
- exports.FABModal = fABModal;
33889
34062
  exports.Icon = Icon;
33890
34063
  exports.Image = Image;
33891
34064
  exports.List = List;
33892
34065
  exports.Modal = index$6;
33893
34066
  exports.PageControl = PageControl;
33894
34067
  exports.PinInput = PinInput;
34068
+ exports.Portal = index$c;
33895
34069
  exports.Progress = Progress;
33896
34070
  exports.Radio = CompoundRadio;
33897
34071
  exports.Rate = Rate;