@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/es/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as reactNative from 'react-native';
2
2
  import { Platform, Dimensions, StyleSheet as StyleSheet$1, Animated, View, UIManager, LayoutAnimation, TouchableOpacity, Text as Text$1, Easing, Image as Image$1, TouchableWithoutFeedback, Pressable, SafeAreaView, KeyboardAvoidingView, TouchableHighlight, ScrollView, Modal as Modal$1, FlatList, useWindowDimensions, TextInput as TextInput$1, PanResponder, BackHandler, InteractionManager, Keyboard, SectionList, RefreshControl as RefreshControl$1 } from 'react-native';
3
- import React, { useContext, createContext, createElement, useMemo, forwardRef, useEffect, useCallback, useRef, useState, isValidElement, useImperativeHandle, useLayoutEffect } from 'react';
3
+ import React, { useContext, createContext, createElement, useMemo, useCallback, memo, useRef, useEffect, useReducer, forwardRef, useState, isValidElement, useImperativeHandle, useLayoutEffect } from 'react';
4
4
  import { createIconSet } from 'react-native-vector-icons';
5
5
  import { useSafeAreaInsets } from 'react-native-safe-area-context';
6
6
  import { MonthYearPickerViewIOS, MonthYearPickerDialogueAndroid } from '@hero-design/react-native-month-year-picker';
@@ -4502,6 +4502,308 @@ var withTheme = function withTheme(C, themeName) {
4502
4502
 
4503
4503
  var defaultTheme = getTheme$1();
4504
4504
 
4505
+ var urlAlphabet = 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict';
4506
+ var nanoid = function nanoid() {
4507
+ var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 21;
4508
+ var id = '';
4509
+ var i = size;
4510
+ while (i--) {
4511
+ id += urlAlphabet[Math.random() * 64 | 0];
4512
+ }
4513
+ return id;
4514
+ };
4515
+
4516
+ var ACTIONS;
4517
+ (function (ACTIONS) {
4518
+ ACTIONS[ACTIONS["REGISTER_HOST"] = 0] = "REGISTER_HOST";
4519
+ ACTIONS[ACTIONS["DEREGISTER_HOST"] = 1] = "DEREGISTER_HOST";
4520
+ ACTIONS[ACTIONS["ADD_UPDATE_PORTAL"] = 2] = "ADD_UPDATE_PORTAL";
4521
+ ACTIONS[ACTIONS["REMOVE_PORTAL"] = 3] = "REMOVE_PORTAL";
4522
+ })(ACTIONS || (ACTIONS = {}));
4523
+ var INITIAL_STATE = {};
4524
+
4525
+ var PortalStateContext = /*#__PURE__*/createContext(null);
4526
+ var PortalDispatchContext = /*#__PURE__*/createContext(null);
4527
+
4528
+ var usePortal = function usePortal() {
4529
+ var hostName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'root';
4530
+ var dispatch = useContext(PortalDispatchContext);
4531
+ if (dispatch === null) {
4532
+ throw new Error("'PortalDispatchContext' cannot be null, please add 'PortalProvider' to the root component.");
4533
+ } //#region methods
4534
+
4535
+ var registerHost = useCallback(function () {
4536
+ dispatch({
4537
+ type: ACTIONS.REGISTER_HOST,
4538
+ hostName: hostName
4539
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps
4540
+ }, []);
4541
+ var deregisterHost = useCallback(function () {
4542
+ dispatch({
4543
+ type: ACTIONS.DEREGISTER_HOST,
4544
+ hostName: hostName
4545
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps
4546
+ }, []);
4547
+ var addUpdatePortal = useCallback(function (name, node) {
4548
+ dispatch({
4549
+ type: ACTIONS.ADD_UPDATE_PORTAL,
4550
+ hostName: hostName,
4551
+ portalName: name,
4552
+ node: node
4553
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps
4554
+ }, []);
4555
+ var removePortal = useCallback(function (name) {
4556
+ dispatch({
4557
+ type: ACTIONS.REMOVE_PORTAL,
4558
+ hostName: hostName,
4559
+ portalName: name
4560
+ }); // eslint-disable-next-line react-hooks/exhaustive-deps
4561
+ }, []); //#endregion
4562
+
4563
+ return {
4564
+ registerHost: registerHost,
4565
+ deregisterHost: deregisterHost,
4566
+ addPortal: addUpdatePortal,
4567
+ updatePortal: addUpdatePortal,
4568
+ removePortal: removePortal
4569
+ };
4570
+ };
4571
+
4572
+ var PortalComponent = function PortalComponent(_ref) {
4573
+ var _providedName = _ref.name,
4574
+ hostName = _ref.hostName,
4575
+ _providedHandleOnMount = _ref.handleOnMount,
4576
+ _providedHandleOnUnmount = _ref.handleOnUnmount,
4577
+ _providedHandleOnUpdate = _ref.handleOnUpdate,
4578
+ children = _ref.children;
4579
+ //#region hooks
4580
+ var _usePortal = usePortal(hostName),
4581
+ addUpdatePortal = _usePortal.addPortal,
4582
+ removePortal = _usePortal.removePortal; //#endregion
4583
+ //#region variables
4584
+
4585
+ var name = useMemo(function () {
4586
+ return _providedName || nanoid();
4587
+ }, [_providedName]); //#endregion
4588
+ //#region refs
4589
+
4590
+ var handleOnMountRef = useRef();
4591
+ var handleOnUnmountRef = useRef();
4592
+ var handleOnUpdateRef = useRef(); //#endregion
4593
+ //#region callbacks
4594
+
4595
+ var handleOnMount = useCallback(function () {
4596
+ if (_providedHandleOnMount) {
4597
+ _providedHandleOnMount(function () {
4598
+ return addUpdatePortal(name, children);
4599
+ });
4600
+ } else {
4601
+ addUpdatePortal(name, children);
4602
+ } // eslint-disable-next-line react-hooks/exhaustive-deps
4603
+ }, [_providedHandleOnMount, addUpdatePortal]);
4604
+ handleOnMountRef.current = handleOnMount;
4605
+ var handleOnUnmount = useCallback(function () {
4606
+ if (_providedHandleOnUnmount) {
4607
+ _providedHandleOnUnmount(function () {
4608
+ return removePortal(name);
4609
+ });
4610
+ } else {
4611
+ removePortal(name);
4612
+ } // eslint-disable-next-line react-hooks/exhaustive-deps
4613
+ }, [_providedHandleOnUnmount, removePortal]);
4614
+ handleOnUnmountRef.current = handleOnUnmount;
4615
+ var handleOnUpdate = useCallback(function () {
4616
+ if (_providedHandleOnUpdate) {
4617
+ _providedHandleOnUpdate(function () {
4618
+ return addUpdatePortal(name, children);
4619
+ });
4620
+ } else {
4621
+ addUpdatePortal(name, children);
4622
+ } // eslint-disable-next-line react-hooks/exhaustive-deps
4623
+ }, [_providedHandleOnUpdate, addUpdatePortal, children]);
4624
+ handleOnUpdateRef.current = handleOnUpdate; //#endregion
4625
+ //#region effects
4626
+
4627
+ useEffect(function () {
4628
+ var _handleOnMountRef$cur;
4629
+ (_handleOnMountRef$cur = handleOnMountRef.current) === null || _handleOnMountRef$cur === void 0 ? void 0 : _handleOnMountRef$cur.call(handleOnMountRef);
4630
+ return function () {
4631
+ var _handleOnUnmountRef$c;
4632
+ (_handleOnUnmountRef$c = handleOnUnmountRef.current) === null || _handleOnUnmountRef$c === void 0 ? void 0 : _handleOnUnmountRef$c.call(handleOnUnmountRef); // remove callbacks refs
4633
+
4634
+ handleOnMountRef.current = undefined;
4635
+ handleOnUnmountRef.current = undefined;
4636
+ handleOnUpdateRef.current = undefined;
4637
+ };
4638
+ }, []);
4639
+ useEffect(function () {
4640
+ var _handleOnUpdateRef$cu;
4641
+ (_handleOnUpdateRef$cu = handleOnUpdateRef.current) === null || _handleOnUpdateRef$cu === void 0 ? void 0 : _handleOnUpdateRef$cu.call(handleOnUpdateRef);
4642
+ }, [children]); //#endregion
4643
+
4644
+ return null;
4645
+ };
4646
+ var Portal = /*#__PURE__*/memo(PortalComponent);
4647
+ Portal.displayName = 'Portal';
4648
+
4649
+ var usePortalState = function usePortalState(hostName) {
4650
+ var state = useContext(PortalStateContext);
4651
+ if (state === null) {
4652
+ throw new Error("'PortalStateContext' cannot be null, please add 'PortalProvider' to the root component.");
4653
+ }
4654
+ return state[hostName] || [];
4655
+ };
4656
+
4657
+ var PortalHostComponent = function PortalHostComponent(_ref) {
4658
+ var name = _ref.name;
4659
+ //#region hooks
4660
+ var state = usePortalState(name);
4661
+ var _usePortal = usePortal(name),
4662
+ registerHost = _usePortal.registerHost,
4663
+ deregisterHost = _usePortal.deregisterHost; //#endregion
4664
+ //#region effects
4665
+
4666
+ useEffect(function () {
4667
+ registerHost();
4668
+ return function () {
4669
+ deregisterHost();
4670
+ }; // eslint-disable-next-line react-hooks/exhaustive-deps
4671
+ }, []); //#endregion
4672
+ //#region render
4673
+
4674
+ return /*#__PURE__*/React.createElement(React.Fragment, null, state.map(function (item) {
4675
+ return item.node;
4676
+ })); //#endregion
4677
+ };
4678
+
4679
+ var PortalHost = /*#__PURE__*/memo(PortalHostComponent);
4680
+ PortalHost.displayName = 'PortalHost';
4681
+
4682
+ var isLoggingEnabled = false; // __DEV__ global is by default not defined in React Native Web builds
4683
+
4684
+ var isDev = Boolean(typeof __DEV__ !== 'undefined' && __DEV__);
4685
+ var enableLogging = function enableLogging() {
4686
+ if (!isDev) {
4687
+ console.warn('[Portal] could not enable logging on production!');
4688
+ return;
4689
+ }
4690
+ isLoggingEnabled = true;
4691
+ };
4692
+ var print$1 = function print() {};
4693
+ if (isDev) {
4694
+ print$1 = function print(_ref) {
4695
+ var component = _ref.component,
4696
+ method = _ref.method,
4697
+ params = _ref.params;
4698
+ if (!isLoggingEnabled) {
4699
+ return;
4700
+ }
4701
+ var message = '';
4702
+ if (_typeof(params) === 'object') {
4703
+ message = Object.keys(params).map(function (key) {
4704
+ return "".concat(key, ":").concat(params[key]);
4705
+ }).join(' ');
4706
+ } else {
4707
+ message = "".concat(params !== null && params !== void 0 ? params : '');
4708
+ }
4709
+ console.log("[Portal::".concat([component, method].filter(Boolean).join('::'), "]"), message);
4710
+ };
4711
+ }
4712
+ Object.freeze(print$1);
4713
+
4714
+ var registerHost = function registerHost(state, hostName) {
4715
+ if (!(hostName in state)) {
4716
+ state[hostName] = [];
4717
+ }
4718
+ return state;
4719
+ };
4720
+ var deregisterHost = function deregisterHost(state, hostName) {
4721
+ delete state[hostName];
4722
+ return state;
4723
+ };
4724
+ var addUpdatePortal = function addUpdatePortal(state, hostName, portalName, node) {
4725
+ if (!(hostName in state)) {
4726
+ state = registerHost(state, hostName);
4727
+ }
4728
+ /**
4729
+ * updated portal, if it was already added.
4730
+ */
4731
+
4732
+ var index = state[hostName].findIndex(function (item) {
4733
+ return item.name === portalName;
4734
+ });
4735
+ if (index !== -1) {
4736
+ state[hostName][index].node = node;
4737
+ } else {
4738
+ state[hostName].push({
4739
+ name: portalName,
4740
+ node: node
4741
+ });
4742
+ }
4743
+ return state;
4744
+ };
4745
+ var removePortal = function removePortal(state, hostName, portalName) {
4746
+ if (!(hostName in state)) {
4747
+ print$1({
4748
+ component: reducer.name,
4749
+ method: removePortal.name,
4750
+ params: "Failed to remove portal '".concat(portalName, "', '").concat(hostName, "' was not registered!")
4751
+ });
4752
+ return state;
4753
+ }
4754
+ var index = state[hostName].findIndex(function (item) {
4755
+ return item.name === portalName;
4756
+ });
4757
+ if (index !== -1) state[hostName].splice(index, 1);
4758
+ return state;
4759
+ };
4760
+ var reducer = function reducer(state, action) {
4761
+ var type = action.type;
4762
+ var clonedState = _objectSpread2({}, state);
4763
+ switch (type) {
4764
+ case ACTIONS.REGISTER_HOST:
4765
+ return registerHost(clonedState, action.hostName);
4766
+ case ACTIONS.DEREGISTER_HOST:
4767
+ return deregisterHost(clonedState, action.hostName);
4768
+ case ACTIONS.ADD_UPDATE_PORTAL:
4769
+ return addUpdatePortal(clonedState, action.hostName, action.portalName, action.node);
4770
+ case ACTIONS.REMOVE_PORTAL:
4771
+ return removePortal(clonedState, action.hostName, action.portalName);
4772
+ default:
4773
+ return state;
4774
+ }
4775
+ };
4776
+
4777
+ var PortalProviderComponent = function PortalProviderComponent(_ref) {
4778
+ var _ref$rootHostName = _ref.rootHostName,
4779
+ rootHostName = _ref$rootHostName === void 0 ? 'root' : _ref$rootHostName,
4780
+ _ref$shouldAddRootHos = _ref.shouldAddRootHost,
4781
+ shouldAddRootHost = _ref$shouldAddRootHos === void 0 ? true : _ref$shouldAddRootHos,
4782
+ children = _ref.children;
4783
+ var _useReducer = useReducer(reducer, INITIAL_STATE),
4784
+ _useReducer2 = _slicedToArray(_useReducer, 2),
4785
+ state = _useReducer2[0],
4786
+ dispatch = _useReducer2[1];
4787
+ return /*#__PURE__*/React.createElement(PortalDispatchContext.Provider, {
4788
+ value: dispatch
4789
+ }, /*#__PURE__*/React.createElement(PortalStateContext.Provider, {
4790
+ value: state
4791
+ }, children, shouldAddRootHost && /*#__PURE__*/React.createElement(PortalHost, {
4792
+ name: rootHostName
4793
+ })));
4794
+ };
4795
+ var PortalProvider = /*#__PURE__*/memo(PortalProviderComponent);
4796
+ PortalProvider.displayName = 'PortalProvider';
4797
+
4798
+ var index$c = /*#__PURE__*/Object.freeze({
4799
+ __proto__: null,
4800
+ Portal: Portal,
4801
+ PortalHost: PortalHost,
4802
+ PortalProvider: PortalProvider,
4803
+ usePortal: usePortal,
4804
+ enableLogging: enableLogging
4805
+ });
4806
+
4505
4807
  function getDefaultExportFromCjs (x) {
4506
4808
  return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
4507
4809
  }
@@ -6324,7 +6626,7 @@ var StyledText$3 = index$b(Text$1)(function (_ref) {
6324
6626
  });
6325
6627
  });
6326
6628
 
6327
- var _excluded$A = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
6629
+ var _excluded$z = ["children", "fontSize", "fontWeight", "intent", "typeface", "allowFontScaling"];
6328
6630
  var Text = function Text(_ref) {
6329
6631
  var children = _ref.children,
6330
6632
  _ref$fontSize = _ref.fontSize,
@@ -6337,7 +6639,7 @@ var Text = function Text(_ref) {
6337
6639
  typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
6338
6640
  _ref$allowFontScaling = _ref.allowFontScaling,
6339
6641
  allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
6340
- nativeProps = _objectWithoutProperties(_ref, _excluded$A);
6642
+ nativeProps = _objectWithoutProperties(_ref, _excluded$z);
6341
6643
  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.');
6342
6644
  return /*#__PURE__*/React.createElement(StyledText$3, _extends$1({}, nativeProps, {
6343
6645
  themeFontSize: fontSize,
@@ -6367,7 +6669,7 @@ var StyledCaption = index$b(Text$1)(function (_ref) {
6367
6669
  };
6368
6670
  });
6369
6671
 
6370
- var _excluded$z = ["children", "fontWeight", "intent", "allowFontScaling"];
6672
+ var _excluded$y = ["children", "fontWeight", "intent", "allowFontScaling"];
6371
6673
  var Caption = function Caption(_ref) {
6372
6674
  var children = _ref.children,
6373
6675
  _ref$fontWeight = _ref.fontWeight,
@@ -6376,7 +6678,7 @@ var Caption = function Caption(_ref) {
6376
6678
  intent = _ref$intent === void 0 ? 'body' : _ref$intent,
6377
6679
  _ref$allowFontScaling = _ref.allowFontScaling,
6378
6680
  allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
6379
- nativeProps = _objectWithoutProperties(_ref, _excluded$z);
6681
+ nativeProps = _objectWithoutProperties(_ref, _excluded$y);
6380
6682
  return /*#__PURE__*/React.createElement(StyledCaption, _extends$1({}, nativeProps, {
6381
6683
  themeFontWeight: fontWeight,
6382
6684
  themeIntent: intent,
@@ -6395,14 +6697,14 @@ var StyledLabel$1 = index$b(Text$1)(function (_ref) {
6395
6697
  };
6396
6698
  });
6397
6699
 
6398
- var _excluded$y = ["children", "intent", "allowFontScaling"];
6700
+ var _excluded$x = ["children", "intent", "allowFontScaling"];
6399
6701
  var Label = function Label(_ref) {
6400
6702
  var children = _ref.children,
6401
6703
  _ref$intent = _ref.intent,
6402
6704
  intent = _ref$intent === void 0 ? 'body' : _ref$intent,
6403
6705
  _ref$allowFontScaling = _ref.allowFontScaling,
6404
6706
  allowFontScaling = _ref$allowFontScaling === void 0 ? false : _ref$allowFontScaling,
6405
- nativeProps = _objectWithoutProperties(_ref, _excluded$y);
6707
+ nativeProps = _objectWithoutProperties(_ref, _excluded$x);
6406
6708
  return /*#__PURE__*/React.createElement(StyledLabel$1, _extends$1({}, nativeProps, {
6407
6709
  themeIntent: intent,
6408
6710
  allowFontScaling: allowFontScaling
@@ -6423,7 +6725,7 @@ var StyledTitle$1 = index$b(Text$1)(function (_ref) {
6423
6725
  };
6424
6726
  });
6425
6727
 
6426
- var _excluded$x = ["children", "intent", "allowFontScaling", "level", "typeface"];
6728
+ var _excluded$w = ["children", "intent", "allowFontScaling", "level", "typeface"];
6427
6729
  var Title = function Title(_ref) {
6428
6730
  var children = _ref.children,
6429
6731
  _ref$intent = _ref.intent,
@@ -6434,7 +6736,7 @@ var Title = function Title(_ref) {
6434
6736
  level = _ref$level === void 0 ? 'h1' : _ref$level,
6435
6737
  _ref$typeface = _ref.typeface,
6436
6738
  typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
6437
- nativeProps = _objectWithoutProperties(_ref, _excluded$x);
6739
+ nativeProps = _objectWithoutProperties(_ref, _excluded$w);
6438
6740
  return /*#__PURE__*/React.createElement(StyledTitle$1, _extends$1({}, nativeProps, {
6439
6741
  themeLevel: level,
6440
6742
  themeTypeface: typeface,
@@ -6469,7 +6771,7 @@ var StyledBody = index$b(Text$1)(function (_ref) {
6469
6771
  };
6470
6772
  });
6471
6773
 
6472
- var _excluded$w = ["children", "intent", "allowFontScaling", "typeface", "variant"];
6774
+ var _excluded$v = ["children", "intent", "allowFontScaling", "typeface", "variant"];
6473
6775
  var Body = function Body(_ref) {
6474
6776
  var children = _ref.children,
6475
6777
  _ref$intent = _ref.intent,
@@ -6480,7 +6782,7 @@ var Body = function Body(_ref) {
6480
6782
  typeface = _ref$typeface === void 0 ? 'neutral' : _ref$typeface,
6481
6783
  _ref$variant = _ref.variant,
6482
6784
  variant = _ref$variant === void 0 ? 'regular' : _ref$variant,
6483
- nativeProps = _objectWithoutProperties(_ref, _excluded$w);
6785
+ nativeProps = _objectWithoutProperties(_ref, _excluded$v);
6484
6786
  return /*#__PURE__*/React.createElement(StyledBody, _extends$1({}, nativeProps, {
6485
6787
  themeTypeface: typeface,
6486
6788
  themeIntent: intent,
@@ -7010,10 +7312,10 @@ var StyledHeroIcon = index$b(HeroIcon)(function (_ref) {
7010
7312
  };
7011
7313
  });
7012
7314
 
7013
- var _excluded$v = ["style"];
7315
+ var _excluded$u = ["style"];
7014
7316
  var AnimatedIcon = function AnimatedIcon(_ref) {
7015
7317
  var style = _ref.style,
7016
- otherProps = _objectWithoutProperties(_ref, _excluded$v);
7318
+ otherProps = _objectWithoutProperties(_ref, _excluded$u);
7017
7319
  var rotateAnimation = useRef(new Animated.Value(0));
7018
7320
  useEffect(function () {
7019
7321
  var animation = Animated.loop(Animated.timing(rotateAnimation.current, {
@@ -7118,7 +7420,7 @@ var AccordionItem = function AccordionItem(_ref) {
7118
7420
  }, content));
7119
7421
  };
7120
7422
 
7121
- var _excluded$u = ["key"];
7423
+ var _excluded$t = ["key"];
7122
7424
  var Accordion = function Accordion(_ref) {
7123
7425
  var items = _ref.items,
7124
7426
  activeItemKey = _ref.activeItemKey,
@@ -7139,7 +7441,7 @@ var Accordion = function Accordion(_ref) {
7139
7441
  testID: testID
7140
7442
  }, items.map(function (_ref2, index) {
7141
7443
  var key = _ref2.key,
7142
- props = _objectWithoutProperties(_ref2, _excluded$u);
7444
+ props = _objectWithoutProperties(_ref2, _excluded$t);
7143
7445
  var open = _activeItemKey === key;
7144
7446
  return /*#__PURE__*/React.createElement(React.Fragment, {
7145
7447
  key: key
@@ -7537,7 +7839,7 @@ var StyledStatus = index$b(Animated.View)(function (_ref3) {
7537
7839
  };
7538
7840
  });
7539
7841
 
7540
- var _excluded$t = ["children", "visible", "intent", "style", "testID"];
7842
+ var _excluded$s = ["children", "visible", "intent", "style", "testID"];
7541
7843
  var Status = function Status(_ref) {
7542
7844
  var children = _ref.children,
7543
7845
  _ref$visible = _ref.visible,
@@ -7546,7 +7848,7 @@ var Status = function Status(_ref) {
7546
7848
  intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
7547
7849
  style = _ref.style,
7548
7850
  testID = _ref.testID,
7549
- nativeProps = _objectWithoutProperties(_ref, _excluded$t);
7851
+ nativeProps = _objectWithoutProperties(_ref, _excluded$s);
7550
7852
  var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
7551
7853
  opacity = _React$useRef.current;
7552
7854
  var isFirstRendering = React.useRef(true);
@@ -7579,7 +7881,7 @@ var Status = function Status(_ref) {
7579
7881
  }));
7580
7882
  };
7581
7883
 
7582
- var _excluded$s = ["content", "visible", "max", "intent", "style", "testID"];
7884
+ var _excluded$r = ["content", "visible", "max", "intent", "style", "testID"];
7583
7885
  var DEFAULT_MAX_NUMBER = 99;
7584
7886
  var getPaddingState = function getPaddingState(content) {
7585
7887
  return content.length > 1 ? 'wideContent' : 'narrowContent';
@@ -7594,7 +7896,7 @@ var Badge = function Badge(_ref) {
7594
7896
  intent = _ref$intent === void 0 ? 'danger' : _ref$intent,
7595
7897
  style = _ref.style,
7596
7898
  testID = _ref.testID,
7597
- nativeProps = _objectWithoutProperties(_ref, _excluded$s);
7899
+ nativeProps = _objectWithoutProperties(_ref, _excluded$r);
7598
7900
  var _React$useRef = React.useRef(new Animated.Value(visible ? 1 : 0)),
7599
7901
  opacity = _React$useRef.current;
7600
7902
  var isFirstRendering = React.useRef(true);
@@ -7698,7 +8000,7 @@ function omit(keys, obj) {
7698
8000
  return result;
7699
8001
  }
7700
8002
 
7701
- var _excluded$r = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
8003
+ var _excluded$q = ["onTabPress", "renderActiveTabOnly", "selectedTabKey", "tabs"];
7702
8004
  var getInactiveIcon = function getInactiveIcon(icon) {
7703
8005
  var inactiveIcon = "".concat(icon, "-outlined");
7704
8006
  return isHeroIcon(inactiveIcon) ? inactiveIcon : icon;
@@ -7709,7 +8011,7 @@ var BottomNavigation = function BottomNavigation(_ref) {
7709
8011
  renderActiveTabOnly = _ref$renderActiveTabO === void 0 ? false : _ref$renderActiveTabO,
7710
8012
  selectedTabKey = _ref.selectedTabKey,
7711
8013
  tabs = _ref.tabs,
7712
- nativeProps = _objectWithoutProperties(_ref, _excluded$r);
8014
+ nativeProps = _objectWithoutProperties(_ref, _excluded$q);
7713
8015
  var insets = useSafeAreaInsets();
7714
8016
  /**
7715
8017
  * List of loaded tabs, tabs will be loaded when navigated to.
@@ -7795,13 +8097,13 @@ var StyledDivider = index$b(View)(function (_ref) {
7795
8097
  }, horizontalMargin), verticalMargin);
7796
8098
  });
7797
8099
 
7798
- var _excluded$q = ["marginHorizontal", "marginVertical", "style", "testID"];
8100
+ var _excluded$p = ["marginHorizontal", "marginVertical", "style", "testID"];
7799
8101
  var Divider = function Divider(_ref) {
7800
8102
  var marginHorizontal = _ref.marginHorizontal,
7801
8103
  marginVertical = _ref.marginVertical,
7802
8104
  style = _ref.style,
7803
8105
  testID = _ref.testID,
7804
- nativeProps = _objectWithoutProperties(_ref, _excluded$q);
8106
+ nativeProps = _objectWithoutProperties(_ref, _excluded$p);
7805
8107
  return /*#__PURE__*/React.createElement(StyledDivider, _extends$1({}, nativeProps, {
7806
8108
  themeMarginHorizontal: marginHorizontal,
7807
8109
  themeMarginVertical: marginVertical,
@@ -7931,7 +8233,7 @@ var StyledLoadingDot = index$b(View)(function (_ref2) {
7931
8233
  }, themeStyling());
7932
8234
  });
7933
8235
 
7934
- var _excluded$p = ["count", "size", "testID", "themeVariant"];
8236
+ var _excluded$o = ["count", "size", "testID", "themeVariant"];
7935
8237
  var AnimatedLoadingIndicatorWrapper = Animated.createAnimatedComponent(StyledLoadingIndicatorWrapper);
7936
8238
  var AnimatedLoadingDot = Animated.createAnimatedComponent(StyledLoadingDot);
7937
8239
  var renderDotComponent = function renderDotComponent(_ref) {
@@ -7963,7 +8265,7 @@ var LoadingIndicator = function LoadingIndicator(_ref2) {
7963
8265
  size = _ref2$size === void 0 ? 12 : _ref2$size,
7964
8266
  testID = _ref2.testID,
7965
8267
  themeVariant = _ref2.themeVariant,
7966
- nativeProps = _objectWithoutProperties(_ref2, _excluded$p);
8268
+ nativeProps = _objectWithoutProperties(_ref2, _excluded$o);
7967
8269
  var progressAnimation = useRef(new Animated.Value(0));
7968
8270
  useEffect(function () {
7969
8271
  var animation = Animated.loop(Animated.timing(progressAnimation.current, {
@@ -8402,11 +8704,11 @@ var Header = function Header(_ref) {
8402
8704
  })) : null), showDivider ? /*#__PURE__*/React.createElement(Divider, null) : null);
8403
8705
  };
8404
8706
 
8405
- var _excluded$o = ["scrollEventThrottle"];
8707
+ var _excluded$n = ["scrollEventThrottle"];
8406
8708
  var BottomSheetScrollView = function BottomSheetScrollView(_ref) {
8407
8709
  var _ref$scrollEventThrot = _ref.scrollEventThrottle,
8408
8710
  scrollEventThrottle = _ref$scrollEventThrot === void 0 ? 100 : _ref$scrollEventThrot,
8409
- props = _objectWithoutProperties(_ref, _excluded$o);
8711
+ props = _objectWithoutProperties(_ref, _excluded$n);
8410
8712
  var _useContext = useContext(BottomSheetContext),
8411
8713
  setInternalShowDivider = _useContext.setInternalShowDivider;
8412
8714
  var onScrollBeginDrag = useCallback(function (e) {
@@ -8721,7 +9023,7 @@ var borderWidths = {
8721
9023
  var config = _objectSpread2(_objectSpread2(_objectSpread2(_objectSpread2({}, colors), space), radii), borderWidths);
8722
9024
  var flexPropsKey = ['alignContent', 'alignItems', 'alignSelf', 'display', 'flex', 'flexBasis', 'flexDirection', 'flexGrow', 'flexShrink', 'flexWrap', 'justifyContent'];
8723
9025
 
8724
- var _excluded$n = ["theme"];
9026
+ var _excluded$m = ["theme"];
8725
9027
  var getThemeValue = function getThemeValue(theme, key, props) {
8726
9028
  var propConfig = config[key];
8727
9029
  var propValue = props[key];
@@ -8748,18 +9050,18 @@ var mapStylePropToThemeValue = function mapStylePropToThemeValue(theme, props) {
8748
9050
  var configKeys = Object.keys(config);
8749
9051
  var StyledBox = index$b(View)(function (_ref5) {
8750
9052
  var theme = _ref5.theme,
8751
- otherProps = _objectWithoutProperties(_ref5, _excluded$n);
9053
+ otherProps = _objectWithoutProperties(_ref5, _excluded$m);
8752
9054
  var styleProps = pick(configKeys, otherProps);
8753
9055
  var flexProps = pick(_toConsumableArray(flexPropsKey), otherProps);
8754
9056
  return _objectSpread2(_objectSpread2({}, mapStylePropToThemeValue(theme, styleProps)), flexProps);
8755
9057
  });
8756
9058
 
8757
- var _excluded$m = ["children", "style", "testID"];
9059
+ var _excluded$l = ["children", "style", "testID"];
8758
9060
  var Box = function Box(_ref) {
8759
9061
  var children = _ref.children,
8760
9062
  style = _ref.style,
8761
9063
  testID = _ref.testID,
8762
- otherProps = _objectWithoutProperties(_ref, _excluded$m);
9064
+ otherProps = _objectWithoutProperties(_ref, _excluded$l);
8763
9065
  return /*#__PURE__*/React.createElement(StyledBox, _extends$1({}, otherProps, {
8764
9066
  style: style,
8765
9067
  testID: testID
@@ -11395,7 +11697,7 @@ var Calendar = function Calendar(_ref) {
11395
11697
  })));
11396
11698
  };
11397
11699
 
11398
- var _excluded$l = ["rounded", "size", "testID", "style"];
11700
+ var _excluded$k = ["rounded", "size", "testID", "style"];
11399
11701
  var Image = function Image(_ref) {
11400
11702
  var _ref$rounded = _ref.rounded,
11401
11703
  rounded = _ref$rounded === void 0 ? false : _ref$rounded,
@@ -11403,7 +11705,7 @@ var Image = function Image(_ref) {
11403
11705
  size = _ref$size === void 0 ? '6xlarge' : _ref$size,
11404
11706
  testID = _ref.testID,
11405
11707
  style = _ref.style,
11406
- imageNativeProps = _objectWithoutProperties(_ref, _excluded$l);
11708
+ imageNativeProps = _objectWithoutProperties(_ref, _excluded$k);
11407
11709
  var theme = useTheme();
11408
11710
  var imageSize = theme.__hd__.image.sizes[size];
11409
11711
  return /*#__PURE__*/React.createElement(Image$1, _extends$1({
@@ -11605,12 +11907,12 @@ var Indicator = index$b(View)(function (_ref2) {
11605
11907
  };
11606
11908
  });
11607
11909
 
11608
- var _excluded$k = ["intent", "children"];
11910
+ var _excluded$j = ["intent", "children"];
11609
11911
  var DataCard = function DataCard(_ref) {
11610
11912
  var _ref$intent = _ref.intent,
11611
11913
  intent = _ref$intent === void 0 ? 'info' : _ref$intent,
11612
11914
  children = _ref.children,
11613
- nativeProps = _objectWithoutProperties(_ref, _excluded$k);
11915
+ nativeProps = _objectWithoutProperties(_ref, _excluded$j);
11614
11916
  return /*#__PURE__*/React.createElement(StyledDataCard, nativeProps, /*#__PURE__*/React.createElement(Indicator, {
11615
11917
  themeIntent: intent,
11616
11918
  testID: "data-card-indicator"
@@ -11628,11 +11930,11 @@ var StyledCard$1 = index$b(View)(function (_ref) {
11628
11930
  });
11629
11931
  });
11630
11932
 
11631
- var _excluded$j = ["intent", "children"];
11933
+ var _excluded$i = ["intent", "children"];
11632
11934
  var Card = function Card(_ref) {
11633
11935
  var intent = _ref.intent,
11634
11936
  children = _ref.children,
11635
- nativeProps = _objectWithoutProperties(_ref, _excluded$j);
11937
+ nativeProps = _objectWithoutProperties(_ref, _excluded$i);
11636
11938
  return /*#__PURE__*/React.createElement(StyledCard$1, _extends$1({}, nativeProps, {
11637
11939
  themeIntent: intent
11638
11940
  }), children);
@@ -11839,7 +12141,7 @@ var CardCarousel = /*#__PURE__*/forwardRef(function (_ref, ref) {
11839
12141
  });
11840
12142
  CardCarousel.displayName = 'CardCarousel';
11841
12143
 
11842
- var _excluded$i = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination", "pageControlPosition"];
12144
+ var _excluded$h = ["items", "onItemIndexChange", "renderActions", "selectedItemIndex", "style", "shouldShowPagination", "pageControlPosition"];
11843
12145
  function useStateFromProp(initialValue) {
11844
12146
  var _useState = useState(initialValue),
11845
12147
  _useState2 = _slicedToArray(_useState, 2),
@@ -11864,7 +12166,7 @@ var Carousel = function Carousel(_ref) {
11864
12166
  shouldShowPagination = _ref$shouldShowPagina === void 0 ? noop : _ref$shouldShowPagina,
11865
12167
  _ref$pageControlPosit = _ref.pageControlPosition,
11866
12168
  pageControlPosition = _ref$pageControlPosit === void 0 ? 'bottom' : _ref$pageControlPosit,
11867
- nativeProps = _objectWithoutProperties(_ref, _excluded$i);
12169
+ nativeProps = _objectWithoutProperties(_ref, _excluded$h);
11868
12170
  useDeprecation("shouldShowPagination prop has been deprecated", shouldShowPagination !== noop);
11869
12171
  useDeprecation("The use of 'pageControlPosition == bottom' has been deprecated", pageControlPosition === 'bottom');
11870
12172
  var carouselRef = useRef(null);
@@ -12187,7 +12489,7 @@ var StyledErrorAndMaxLengthContainer = index$b(View)(function () {
12187
12489
  };
12188
12490
  });
12189
12491
 
12190
- var _excluded$h = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "hideCharacterCount", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling", "variant"];
12492
+ var _excluded$g = ["label", "prefix", "suffix", "style", "textStyle", "testID", "accessibilityLabelledBy", "error", "required", "editable", "disabled", "loading", "maxLength", "hideCharacterCount", "helpText", "value", "defaultValue", "renderInputValue", "allowFontScaling", "variant"];
12191
12493
  var getState$1 = function getState(_ref) {
12192
12494
  var disabled = _ref.disabled,
12193
12495
  error = _ref.error,
@@ -12239,7 +12541,7 @@ var TextInput = /*#__PURE__*/forwardRef(function (_ref2, ref) {
12239
12541
  allowFontScaling = _ref2$allowFontScalin === void 0 ? false : _ref2$allowFontScalin,
12240
12542
  _ref2$variant = _ref2.variant,
12241
12543
  variant = _ref2$variant === void 0 ? 'text' : _ref2$variant,
12242
- nativeProps = _objectWithoutProperties(_ref2, _excluded$h);
12544
+ nativeProps = _objectWithoutProperties(_ref2, _excluded$g);
12243
12545
  var displayText = (_ref3 = value !== undefined ? value : defaultValue) !== null && _ref3 !== void 0 ? _ref3 : '';
12244
12546
  var isEmptyValue = displayText.length === 0;
12245
12547
  var actualSuffix = loading ? 'loading' : suffix;
@@ -12683,11 +12985,11 @@ var DatePickerIOS = function DatePickerIOS(_ref) {
12683
12985
  }))));
12684
12986
  };
12685
12987
 
12686
- var _excluded$g = ["variant"];
12988
+ var _excluded$f = ["variant"];
12687
12989
  var DatePicker = function DatePicker(_ref) {
12688
12990
  var _ref$variant = _ref.variant,
12689
12991
  variant = _ref$variant === void 0 ? 'default' : _ref$variant,
12690
- props = _objectWithoutProperties(_ref, _excluded$g);
12992
+ props = _objectWithoutProperties(_ref, _excluded$f);
12691
12993
  if (variant === 'calendar') {
12692
12994
  return /*#__PURE__*/React.createElement(DatePickerCalendar, props);
12693
12995
  }
@@ -13121,7 +13423,7 @@ var StyledErrorDescription = index$b(Typography.Body)(function (_ref9) {
13121
13423
  };
13122
13424
  });
13123
13425
 
13124
- var _excluded$f = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"],
13426
+ var _excluded$e = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"],
13125
13427
  _excluded2 = ["visible", "variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
13126
13428
  var renderImage$1 = function renderImage(image) {
13127
13429
  if ( /*#__PURE__*/isValidElement(image)) {
@@ -13147,7 +13449,7 @@ var ErrorPage = function ErrorPage(_ref) {
13147
13449
  onCtaPress = _ref.onCtaPress,
13148
13450
  secondaryCtaText = _ref.secondaryCtaText,
13149
13451
  onSecondaryCtaPress = _ref.onSecondaryCtaPress,
13150
- nativeProps = _objectWithoutProperties(_ref, _excluded$f);
13452
+ nativeProps = _objectWithoutProperties(_ref, _excluded$e);
13151
13453
  var showCta = ctaText && onCtaPress !== undefined;
13152
13454
  var showSecondaryCta = secondaryCtaText && onSecondaryCtaPress !== undefined;
13153
13455
  var showButtonContainer = showCta || showSecondaryCta;
@@ -13306,11 +13608,11 @@ var StyledIconContainer = index$b(Box)(function (_ref4) {
13306
13608
  };
13307
13609
  });
13308
13610
 
13309
- var _excluded$e = ["active"];
13611
+ var _excluded$d = ["active"];
13310
13612
  var AnimatedIcons = Animated.createAnimatedComponent(StyledFABIcon);
13311
13613
  var AnimatedFABIcon = function AnimatedFABIcon(_ref) {
13312
13614
  var active = _ref.active,
13313
- iconProps = _objectWithoutProperties(_ref, _excluded$e);
13615
+ iconProps = _objectWithoutProperties(_ref, _excluded$d);
13314
13616
  var rotateAnimation = useRef(new Animated.Value(active ? 1 : 0));
13315
13617
  useEffect(function () {
13316
13618
  var animation = Animated.spring(rotateAnimation.current, {
@@ -13432,17 +13734,10 @@ var FAB = /*#__PURE__*/forwardRef(function (_ref3, ref) {
13432
13734
  return /*#__PURE__*/React.createElement(StyledFAB$1
13433
13735
  /** Add a small timeout before executing animation to prevent flakiness */, {
13434
13736
  onLayout: function onLayout() {
13435
- setTimeout(function () {
13737
+ return setTimeout(function () {
13436
13738
  return setCanAnimate(true);
13437
13739
  }, 500);
13438
13740
  },
13439
- ref: function ref(_ref4) {
13440
- if (_ref4) {
13441
- _ref4.measureInWindow(function (x, y, width, height) {
13442
- console.log('measureInWindow', x, y, width, height);
13443
- });
13444
- }
13445
- },
13446
13741
  underlayColor: theme.__hd__.fab.colors.buttonPressedBackground,
13447
13742
  onPress: onPress,
13448
13743
  style: [style, {
@@ -13579,7 +13874,8 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
13579
13874
  testID = _ref.testID,
13580
13875
  fabTitle = _ref.fabTitle,
13581
13876
  _ref$fabIcon = _ref.fabIcon,
13582
- fabIcon = _ref$fabIcon === void 0 ? 'add' : _ref$fabIcon;
13877
+ fabIcon = _ref$fabIcon === void 0 ? 'add' : _ref$fabIcon,
13878
+ portalName = _ref.portalName;
13583
13879
  var fabRef = useRef(null);
13584
13880
  var tranlateXAnimation = useRef(new Animated.Value(active ? 1 : 0));
13585
13881
  var titleTranslateYValue = React.useRef(new Animated.Value(0));
@@ -13620,7 +13916,10 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
13620
13916
  inputRange: [0, 1],
13621
13917
  outputRange: [0, 1]
13622
13918
  });
13623
- return /*#__PURE__*/React.createElement(StyledContainer$2, {
13919
+ var Wrapper = portalName ? Portal : React.Fragment;
13920
+ return /*#__PURE__*/React.createElement(Wrapper, {
13921
+ name: portalName
13922
+ }, /*#__PURE__*/React.createElement(StyledContainer$2, {
13624
13923
  testID: testID,
13625
13924
  pointerEvents: "box-none",
13626
13925
  style: style
@@ -13656,7 +13955,9 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
13656
13955
  index: active ? index : items.length - index,
13657
13956
  active: active
13658
13957
  }));
13659
- }))), /*#__PURE__*/React.createElement(StyledFAB, {
13958
+ }))), /*#__PURE__*/React.createElement(Portal, {
13959
+ hostName: "CustomPortalHost"
13960
+ }, /*#__PURE__*/React.createElement(StyledFAB, {
13660
13961
  testID: "fab",
13661
13962
  icon: fabIcon,
13662
13963
  onPress: onPress,
@@ -13664,12 +13965,15 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
13664
13965
  active: active,
13665
13966
  title: fabTitle,
13666
13967
  ref: fabRef
13667
- }));
13968
+ }))));
13668
13969
  });
13669
13970
  ActionGroup.displayName = 'FAB.ActionGroup';
13670
13971
 
13671
13972
  var index$7 = Object.assign(FAB, {
13672
- ActionGroup: ActionGroup
13973
+ ActionGroup: ActionGroup,
13974
+ Portal: Portal,
13975
+ PortalHost: PortalHost,
13976
+ Provider: PortalProvider
13673
13977
  });
13674
13978
 
13675
13979
  var StyledListItemContainer$1 = index$b(TouchableHighlight)(function (_ref) {
@@ -13923,11 +14227,11 @@ var ModalProvider = function ModalProvider(_ref) {
13923
14227
  return /*#__PURE__*/React.createElement(RootSiblingParent, null, children);
13924
14228
  };
13925
14229
 
13926
- var _excluded$d = ["style", "children"];
14230
+ var _excluded$c = ["style", "children"];
13927
14231
  var ModalPresenter = /*#__PURE__*/forwardRef(function (_ref2, ref) {
13928
14232
  var style = _ref2.style,
13929
14233
  children = _ref2.children,
13930
- props = _objectWithoutProperties(_ref2, _excluded$d);
14234
+ props = _objectWithoutProperties(_ref2, _excluded$c);
13931
14235
  var animatedOpacity = useRef(new Animated.Value(0));
13932
14236
  var theme = useTheme();
13933
14237
  React.useEffect(function () {
@@ -14011,7 +14315,7 @@ var showModal = function showModal(content) {
14011
14315
  };
14012
14316
  ModalPresenter.displayName = 'ModalPresenter';
14013
14317
 
14014
- var wrapperStyle$1 = {
14318
+ var wrapperStyle = {
14015
14319
  width: Dimensions.get('window').width,
14016
14320
  height: Dimensions.get('window').height
14017
14321
  };
@@ -14032,11 +14336,11 @@ var Modal = function Modal(_ref) {
14032
14336
  var getModalContent = React.useCallback(function () {
14033
14337
  var isUpdate = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
14034
14338
  return animationType === 'none' ? /*#__PURE__*/React.createElement(View, {
14035
- style: wrapperStyle$1,
14339
+ style: wrapperStyle,
14036
14340
  testID: testID
14037
14341
  }, children) : /*#__PURE__*/React.createElement(ModalContentWrapper, {
14038
14342
  visible: visible,
14039
- style: wrapperStyle$1,
14343
+ style: wrapperStyle,
14040
14344
  animationType: animationType,
14041
14345
  testID: testID,
14042
14346
  onShow: onShow,
@@ -14385,7 +14689,7 @@ var StyledStrokeEnd = index$b(View)(function (_ref6) {
14385
14689
  };
14386
14690
  });
14387
14691
 
14388
- var _excluded$c = ["value", "renderValue", "intent", "style", "testID"];
14692
+ var _excluded$b = ["value", "renderValue", "intent", "style", "testID"];
14389
14693
  var HalfCircle = function HalfCircle(_ref) {
14390
14694
  var type = _ref.type,
14391
14695
  themeIntent = _ref.themeIntent;
@@ -14406,7 +14710,7 @@ var ProgressCircle = function ProgressCircle(_ref2) {
14406
14710
  intent = _ref2$intent === void 0 ? 'primary' : _ref2$intent,
14407
14711
  style = _ref2.style,
14408
14712
  testID = _ref2.testID,
14409
- nativeProps = _objectWithoutProperties(_ref2, _excluded$c);
14713
+ nativeProps = _objectWithoutProperties(_ref2, _excluded$b);
14410
14714
  var theme = useTheme$1();
14411
14715
  var radius = theme.__hd__.progress.sizes.circleDiameter / 2;
14412
14716
  var progressAnimatedValue = useRef(new Animated.Value(0));
@@ -14521,14 +14825,14 @@ var StyledInner = index$b(Animated.View)(function (_ref2) {
14521
14825
  };
14522
14826
  });
14523
14827
 
14524
- var _excluded$b = ["value", "intent", "style", "testID"];
14828
+ var _excluded$a = ["value", "intent", "style", "testID"];
14525
14829
  var ProgressBar = function ProgressBar(_ref) {
14526
14830
  var value = _ref.value,
14527
14831
  _ref$intent = _ref.intent,
14528
14832
  intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
14529
14833
  style = _ref.style,
14530
14834
  testID = _ref.testID,
14531
- nativeProps = _objectWithoutProperties(_ref, _excluded$b);
14835
+ nativeProps = _objectWithoutProperties(_ref, _excluded$a);
14532
14836
  var _useState = useState(0),
14533
14837
  _useState2 = _slicedToArray(_useState, 2),
14534
14838
  width = _useState2[0],
@@ -14719,14 +15023,14 @@ var AnimatedSpinner = function AnimatedSpinner(_ref) {
14719
15023
  }, dotProps))));
14720
15024
  };
14721
15025
 
14722
- var _excluded$a = ["testID", "size", "intent"];
15026
+ var _excluded$9 = ["testID", "size", "intent"];
14723
15027
  var Spinner = function Spinner(_ref) {
14724
15028
  var testID = _ref.testID,
14725
15029
  _ref$size = _ref.size,
14726
15030
  size = _ref$size === void 0 ? 'medium' : _ref$size,
14727
15031
  _ref$intent = _ref.intent,
14728
15032
  intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
14729
- nativeProps = _objectWithoutProperties(_ref, _excluded$a);
15033
+ nativeProps = _objectWithoutProperties(_ref, _excluded$9);
14730
15034
  return /*#__PURE__*/React.createElement(StyledView$1, nativeProps, /*#__PURE__*/React.createElement(StyledSpinnerContainer, {
14731
15035
  testID: testID
14732
15036
  }, /*#__PURE__*/React.createElement(AnimatedSpinner, {
@@ -14759,7 +15063,7 @@ var SwipeableAction = function SwipeableAction(_ref) {
14759
15063
  }, children);
14760
15064
  };
14761
15065
 
14762
- var _excluded$9 = ["children", "state", "onStateChange", "leftActions", "leftActionsWidth", "rightActions", "rightActionsWidth"];
15066
+ var _excluded$8 = ["children", "state", "onStateChange", "leftActions", "leftActionsWidth", "rightActions", "rightActionsWidth"];
14763
15067
  var renderActions = function renderActions(actions, width, progress, direction) {
14764
15068
  var trans = progress.interpolate({
14765
15069
  inputRange: [0, 1],
@@ -14784,7 +15088,7 @@ var Swipeable = function Swipeable(_ref) {
14784
15088
  leftActionsWidth = _ref.leftActionsWidth,
14785
15089
  rightActions = _ref.rightActions,
14786
15090
  rightActionsWidth = _ref.rightActionsWidth,
14787
- swipeableProps = _objectWithoutProperties(_ref, _excluded$9);
15091
+ swipeableProps = _objectWithoutProperties(_ref, _excluded$8);
14788
15092
  var _useWindowDimensions = useWindowDimensions(),
14789
15093
  width = _useWindowDimensions.width;
14790
15094
  var swipeableRef = useRef(null);
@@ -15089,7 +15393,7 @@ var StyledSectionList = index$b(SectionList)(function (_ref4) {
15089
15393
  };
15090
15394
  });
15091
15395
 
15092
- var _excluded$8 = ["keyExtractor", "loading", "onEndReached", "onQueryChange", "sections", "renderItem", "sectionListRef"];
15396
+ var _excluded$7 = ["keyExtractor", "loading", "onEndReached", "onQueryChange", "sections", "renderItem", "sectionListRef"];
15093
15397
  var BaseOptionList = function BaseOptionList(_ref) {
15094
15398
  var keyExtractor = _ref.keyExtractor,
15095
15399
  loading = _ref.loading,
@@ -15098,7 +15402,7 @@ var BaseOptionList = function BaseOptionList(_ref) {
15098
15402
  sections = _ref.sections,
15099
15403
  renderItem = _ref.renderItem,
15100
15404
  sectionListRef = _ref.sectionListRef,
15101
- rest = _objectWithoutProperties(_ref, _excluded$8);
15405
+ rest = _objectWithoutProperties(_ref, _excluded$7);
15102
15406
  var theme = useTheme$1();
15103
15407
  var _useState = useState(false),
15104
15408
  _useState2 = _slicedToArray(_useState, 2),
@@ -15168,7 +15472,7 @@ var Option$2 = function Option(_ref) {
15168
15472
  return highlighted === true ? /*#__PURE__*/React.createElement(List.Item, props) : /*#__PURE__*/React.createElement(List.BasicItem, props);
15169
15473
  };
15170
15474
 
15171
- var _excluded$7 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
15475
+ var _excluded$6 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
15172
15476
  var OptionList$1 = function OptionList(_ref) {
15173
15477
  var keyExtractor = _ref.keyExtractor,
15174
15478
  loading = _ref.loading,
@@ -15179,7 +15483,7 @@ var OptionList$1 = function OptionList(_ref) {
15179
15483
  renderOption = _ref.renderOption,
15180
15484
  value = _ref.value,
15181
15485
  sectionListRef = _ref.sectionListRef,
15182
- rest = _objectWithoutProperties(_ref, _excluded$7);
15486
+ rest = _objectWithoutProperties(_ref, _excluded$6);
15183
15487
  var renderItem = function renderItem(info) {
15184
15488
  var item = info.item;
15185
15489
  var selected = value.includes(info.item.value);
@@ -15367,7 +15671,7 @@ var StyledOptionList = index$b(BaseOptionList)(function (_ref) {
15367
15671
  };
15368
15672
  });
15369
15673
 
15370
- var _excluded$6 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
15674
+ var _excluded$5 = ["keyExtractor", "loading", "onEndReached", "onPress", "onQueryChange", "sections", "renderOption", "value", "sectionListRef"];
15371
15675
  var OptionList = function OptionList(_ref) {
15372
15676
  var keyExtractor = _ref.keyExtractor,
15373
15677
  loading = _ref.loading,
@@ -15378,7 +15682,7 @@ var OptionList = function OptionList(_ref) {
15378
15682
  renderOption = _ref.renderOption,
15379
15683
  value = _ref.value,
15380
15684
  sectionListRef = _ref.sectionListRef,
15381
- rest = _objectWithoutProperties(_ref, _excluded$6);
15685
+ rest = _objectWithoutProperties(_ref, _excluded$5);
15382
15686
  var renderItem = function renderItem(info) {
15383
15687
  var item = info.item;
15384
15688
  var selected = item.value === value;
@@ -15543,7 +15847,7 @@ var StyledGradientContainer = index$b(Box)(function (_ref2) {
15543
15847
  };
15544
15848
  });
15545
15849
 
15546
- var _excluded$5 = ["intent", "variant", "style", "onLayout"];
15850
+ var _excluded$4 = ["intent", "variant", "style", "onLayout"];
15547
15851
  var AnimatedLinearGradient = Animated.createAnimatedComponent(LinearGradient);
15548
15852
  var gradientPositions = {
15549
15853
  start: {
@@ -15575,7 +15879,7 @@ var Skeleton = function Skeleton(_ref) {
15575
15879
  variant = _ref$variant === void 0 ? 'rounded' : _ref$variant,
15576
15880
  style = _ref.style,
15577
15881
  onLayout = _ref.onLayout,
15578
- props = _objectWithoutProperties(_ref, _excluded$5);
15882
+ props = _objectWithoutProperties(_ref, _excluded$4);
15579
15883
  var theme = useTheme();
15580
15884
  var colors = useMemo(function () {
15581
15885
  return getGradientColors(theme, intent);
@@ -15707,7 +16011,7 @@ var StyledSuccessModal = index$b(Modal$1)({
15707
16011
  width: '100%'
15708
16012
  });
15709
16013
 
15710
- var _excluded$4 = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
16014
+ var _excluded$3 = ["variant", "title", "description", "image", "testID", "ctaText", "onCtaPress", "secondaryCtaText", "onSecondaryCtaPress"];
15711
16015
  var renderImage = function renderImage(image) {
15712
16016
  if ( /*#__PURE__*/isValidElement(image)) {
15713
16017
  return /*#__PURE__*/React.cloneElement(image, {
@@ -15733,7 +16037,7 @@ var SuccessPage = function SuccessPage(_ref) {
15733
16037
  onCtaPress = _ref$onCtaPress === void 0 ? noop$1 : _ref$onCtaPress,
15734
16038
  secondaryCtaText = _ref.secondaryCtaText,
15735
16039
  onSecondaryCtaPress = _ref.onSecondaryCtaPress,
15736
- nativeProps = _objectWithoutProperties(_ref, _excluded$4);
16040
+ nativeProps = _objectWithoutProperties(_ref, _excluded$3);
15737
16041
  var showSecondaryButton = secondaryCtaText && onSecondaryCtaPress;
15738
16042
  return /*#__PURE__*/React.createElement(StyledSuccessContainer, _extends$1({
15739
16043
  testID: testID,
@@ -16623,7 +16927,7 @@ var StyledText = index$b(Typography.Caption)(function (_ref3) {
16623
16927
  };
16624
16928
  });
16625
16929
 
16626
- var _excluded$3 = ["content", "variant", "intent", "style", "testID"];
16930
+ var _excluded$2 = ["content", "variant", "intent", "style", "testID"];
16627
16931
  var Tag = function Tag(_ref) {
16628
16932
  var content = _ref.content,
16629
16933
  _ref$variant = _ref.variant,
@@ -16632,7 +16936,7 @@ var Tag = function Tag(_ref) {
16632
16936
  intent = _ref$intent === void 0 ? 'primary' : _ref$intent,
16633
16937
  style = _ref.style,
16634
16938
  testID = _ref.testID,
16635
- nativeProps = _objectWithoutProperties(_ref, _excluded$3);
16939
+ nativeProps = _objectWithoutProperties(_ref, _excluded$2);
16636
16940
  return /*#__PURE__*/React.createElement(StyledView, _extends$1({}, nativeProps, {
16637
16941
  themeIntent: intent,
16638
16942
  themeVariant: variant,
@@ -17249,10 +17553,10 @@ var ToolbarGroup = function ToolbarGroup(_ref) {
17249
17553
  }));
17250
17554
  };
17251
17555
 
17252
- var _excluded$2 = ["children"];
17556
+ var _excluded$1 = ["children"];
17253
17557
  var Toolbar = function Toolbar(_ref) {
17254
17558
  var children = _ref.children,
17255
- rest = _objectWithoutProperties(_ref, _excluded$2);
17559
+ rest = _objectWithoutProperties(_ref, _excluded$1);
17256
17560
  return /*#__PURE__*/React.createElement(ToolbarWrapper, rest, children);
17257
17561
  };
17258
17562
  var index$1 = Object.assign(Toolbar, {
@@ -17271,7 +17575,7 @@ var StyledIconWrapper = index$b(AnimatedBox)(function (_ref) {
17271
17575
  };
17272
17576
  });
17273
17577
 
17274
- var _excluded$1 = ["options", "value", "onChange", "readonly", "disabled"];
17578
+ var _excluded = ["options", "value", "onChange", "readonly", "disabled"];
17275
17579
  var Rate = function Rate(_ref) {
17276
17580
  var options = _ref.options,
17277
17581
  value = _ref.value,
@@ -17280,7 +17584,7 @@ var Rate = function Rate(_ref) {
17280
17584
  readonly = _ref$readonly === void 0 ? false : _ref$readonly,
17281
17585
  _ref$disabled = _ref.disabled,
17282
17586
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
17283
- otherProps = _objectWithoutProperties(_ref, _excluded$1);
17587
+ otherProps = _objectWithoutProperties(_ref, _excluded);
17284
17588
  var valueIndex = useMemo(function () {
17285
17589
  return options.findIndex(function (item) {
17286
17590
  return item.value === value;
@@ -33703,134 +34007,4 @@ var index = Object.assign(RichTextEditorWithRef, {
33703
34007
  Toolbar: EditorToolbar
33704
34008
  });
33705
34009
 
33706
- var _excluded = ["style", "children"];
33707
- var FABModalPresenter = /*#__PURE__*/forwardRef(function (_ref2, ref) {
33708
- var style = _ref2.style,
33709
- children = _ref2.children,
33710
- props = _objectWithoutProperties(_ref2, _excluded);
33711
- var animatedOpacity = useRef(new Animated.Value(0));
33712
- React.useEffect(function () {
33713
- Animated.spring(animatedOpacity.current, {
33714
- toValue: 1,
33715
- useNativeDriver: true
33716
- }).start();
33717
- }, []);
33718
- React.useImperativeHandle(ref, function () {
33719
- return {
33720
- animatedOut: function animatedOut(completion) {
33721
- Animated.spring(animatedOpacity.current, {
33722
- toValue: 0,
33723
- useNativeDriver: true
33724
- }).start(function () {
33725
- completion === null || completion === void 0 ? void 0 : completion();
33726
- });
33727
- }
33728
- };
33729
- });
33730
- return /*#__PURE__*/React.createElement(Box, {
33731
- style: StyleSheet$1.absoluteFill,
33732
- pointerEvents: "box-none"
33733
- }, /*#__PURE__*/React.createElement(Animated.View, _extends$1({
33734
- style: [{
33735
- width: '100%',
33736
- height: '100%',
33737
- justifyContent: 'center',
33738
- alignItems: 'center',
33739
- opacity: animatedOpacity.current
33740
- }, style]
33741
- }, props, {
33742
- pointerEvents: "box-none"
33743
- }), children));
33744
- });
33745
- /**
33746
- * Present a modal on screen immediately.
33747
- *
33748
- * The new presented modal will be on top of existing modals if there are any.
33749
- *
33750
- * @param Content A component to be presented as a modal on screen.
33751
- * This component will be centered horizontally and vertically on screen with
33752
- * a semitransparent black overlay underneath.
33753
- * @param contentProps Props for this modal component.
33754
- * @returns A `ModalHandler` you can use to dismiss the modal.
33755
- */
33756
- var showFABModal = function showFABModal(content) {
33757
- var _ref3 = null;
33758
- var rootSiblings = null;
33759
- var dismiss = function dismiss(onDismiss) {
33760
- if (rootSiblings) {
33761
- var cleanup = function cleanup() {
33762
- var _rootSiblings;
33763
- (_rootSiblings = rootSiblings) === null || _rootSiblings === void 0 ? void 0 : _rootSiblings.destroy();
33764
- rootSiblings = null;
33765
- _ref3 = null;
33766
- onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
33767
- };
33768
- if (_ref3) {
33769
- _ref3.animatedOut(cleanup);
33770
- } else {
33771
- cleanup();
33772
- }
33773
- }
33774
- };
33775
- var update = function update(newContent) {
33776
- var _rootSiblings2;
33777
- (_rootSiblings2 = rootSiblings) === null || _rootSiblings2 === void 0 ? void 0 : _rootSiblings2.update( /*#__PURE__*/React.createElement(FABModalPresenter, {
33778
- ref: function ref(_ref) {
33779
- _ref3 = _ref;
33780
- }
33781
- }, newContent));
33782
- };
33783
- rootSiblings = new RootSiblings( /*#__PURE__*/React.createElement(FABModalPresenter, {
33784
- ref: function ref(_ref) {
33785
- _ref3 = _ref;
33786
- }
33787
- }, content));
33788
- return {
33789
- dismiss: dismiss,
33790
- update: update
33791
- };
33792
- };
33793
- FABModalPresenter.displayName = 'FABModalPresenter';
33794
-
33795
- var wrapperStyle = {
33796
- width: Dimensions.get('window').width,
33797
- height: Dimensions.get('window').height
33798
- };
33799
- var fABModal = function fABModal(_ref) {
33800
- var children = _ref.children,
33801
- onShow = _ref.onShow,
33802
- testID = _ref.testID,
33803
- _ref$visible = _ref.visible,
33804
- visible = _ref$visible === void 0 ? true : _ref$visible;
33805
- var _React$useState = React.useState(),
33806
- _React$useState2 = _slicedToArray(_React$useState, 2),
33807
- modalHandler = _React$useState2[0],
33808
- setModalHandler = _React$useState2[1];
33809
- var getModalContent = React.useCallback(function () {
33810
- return /*#__PURE__*/React.createElement(View, {
33811
- pointerEvents: "box-none",
33812
- style: wrapperStyle,
33813
- testID: testID
33814
- }, children);
33815
- }, [visible, children, onShow, testID]);
33816
- React.useEffect(function () {
33817
- if (visible) {
33818
- // Modal does not exist, create a new one
33819
- if (!modalHandler) {
33820
- var newModalHandler = showFABModal(getModalContent());
33821
- setModalHandler(newModalHandler);
33822
- onShow === null || onShow === void 0 ? void 0 : onShow();
33823
- }
33824
- // Modal already exists, update it
33825
- else {
33826
- modalHandler.update(getModalContent());
33827
- }
33828
- } else {
33829
- modalHandler === null || modalHandler === void 0 ? void 0 : modalHandler.dismiss();
33830
- setModalHandler(undefined);
33831
- }
33832
- }, [getModalContent]);
33833
- return null;
33834
- };
33835
-
33836
- export { Accordion, Alert, Attachment, index$a as Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet$1 as BottomSheet, Box, CompoundButton as Button, Calendar, Card$1 as Card, index$9 as Carousel, Checkbox, Collapse, ContentNavigator, DatePicker, Divider, index$8 as Drawer, Empty, Error$1 as Error, index$7 as FAB, fABModal as FABModal, Icon, Image, List, index$6 as Modal, PageControl, PinInput, Progress, CompoundRadio as Radio, Rate, RefreshControl, index as RichTextEditor, SectionHeading, index$4 as Select, Skeleton, Slider, Spinner, Success, index$5 as Swipeable, index$3 as Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, ThemeSwitcher, TimePicker, Toast, index$1 as Toolbar, Typography, eBensSystemPalette, getTheme$1 as getTheme, jobsSystemPalette, scale, swagDarkSystemPalette, swagSystemPalette, defaultTheme as theme, useAvatarColors, useTheme, walletSystemPalette, withTheme, workSystemPalette };
34010
+ export { Accordion, Alert, Attachment, index$a as Avatar, Badge$1 as Badge, BottomNavigation, BottomSheet$1 as BottomSheet, Box, CompoundButton as Button, Calendar, Card$1 as Card, index$9 as Carousel, Checkbox, Collapse, ContentNavigator, DatePicker, Divider, index$8 as Drawer, Empty, Error$1 as Error, index$7 as FAB, Icon, Image, List, index$6 as Modal, PageControl, PinInput, index$c as Portal, Progress, CompoundRadio as Radio, Rate, RefreshControl, index as RichTextEditor, SectionHeading, index$4 as Select, Skeleton, Slider, Spinner, Success, index$5 as Swipeable, index$3 as Switch, index$2 as Tabs, Tag, TextInput, ThemeProvider, ThemeSwitcher, TimePicker, Toast, index$1 as Toolbar, Typography, eBensSystemPalette, getTheme$1 as getTheme, jobsSystemPalette, scale, swagDarkSystemPalette, swagSystemPalette, defaultTheme as theme, useAvatarColors, useTheme, walletSystemPalette, withTheme, workSystemPalette };