@hero-design/rn 8.35.0-alpha.0 → 8.35.0-alpha.2
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/.turbo/turbo-build.log +1 -1
- package/es/index.js +352 -180
- package/lib/index.js +351 -178
- package/package.json +3 -3
- package/src/components/FAB/ActionGroup/index.tsx +18 -12
- package/src/components/FAB/index.tsx +4 -0
- package/src/index.ts +2 -0
- package/types/index.d.ts +2 -1
- package/src/components/FAB/ActionGroup/FABModal.tsx +0 -63
- package/src/components/FAB/ActionGroup/FABModalContentWrapper.tsx +0 -31
- package/src/components/FAB/ActionGroup/ModalPresenter/ModalPresenter.tsx +0 -133
- package/src/components/FAB/ActionGroup/ModalPresenter/index.tsx +0 -13
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,
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
7315
|
+
var _excluded$u = ["style"];
|
|
7014
7316
|
var AnimatedIcon = function AnimatedIcon(_ref) {
|
|
7015
7317
|
var style = _ref.style,
|
|
7016
|
-
otherProps = _objectWithoutProperties(_ref, _excluded$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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$
|
|
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, {
|
|
@@ -13563,136 +13865,6 @@ var StyledHeaderText = index$b(Typography.Title)(function (_ref3) {
|
|
|
13563
13865
|
};
|
|
13564
13866
|
});
|
|
13565
13867
|
|
|
13566
|
-
var _excluded$d = ["style", "children"];
|
|
13567
|
-
var FABModalPresenter = /*#__PURE__*/forwardRef(function (_ref2, ref) {
|
|
13568
|
-
var style = _ref2.style,
|
|
13569
|
-
children = _ref2.children,
|
|
13570
|
-
props = _objectWithoutProperties(_ref2, _excluded$d);
|
|
13571
|
-
var animatedOpacity = useRef(new Animated.Value(0));
|
|
13572
|
-
React.useEffect(function () {
|
|
13573
|
-
Animated.spring(animatedOpacity.current, {
|
|
13574
|
-
toValue: 1,
|
|
13575
|
-
useNativeDriver: true
|
|
13576
|
-
}).start();
|
|
13577
|
-
}, []);
|
|
13578
|
-
React.useImperativeHandle(ref, function () {
|
|
13579
|
-
return {
|
|
13580
|
-
animatedOut: function animatedOut(completion) {
|
|
13581
|
-
Animated.spring(animatedOpacity.current, {
|
|
13582
|
-
toValue: 0,
|
|
13583
|
-
useNativeDriver: true
|
|
13584
|
-
}).start(function () {
|
|
13585
|
-
completion === null || completion === void 0 ? void 0 : completion();
|
|
13586
|
-
});
|
|
13587
|
-
}
|
|
13588
|
-
};
|
|
13589
|
-
});
|
|
13590
|
-
return /*#__PURE__*/React.createElement(Box, {
|
|
13591
|
-
style: StyleSheet$1.absoluteFill,
|
|
13592
|
-
pointerEvents: "box-none"
|
|
13593
|
-
}, /*#__PURE__*/React.createElement(Animated.View, _extends$1({
|
|
13594
|
-
style: [{
|
|
13595
|
-
width: '100%',
|
|
13596
|
-
height: '100%',
|
|
13597
|
-
justifyContent: 'center',
|
|
13598
|
-
alignItems: 'center',
|
|
13599
|
-
opacity: animatedOpacity.current
|
|
13600
|
-
}, style]
|
|
13601
|
-
}, props, {
|
|
13602
|
-
pointerEvents: "box-none"
|
|
13603
|
-
}), children));
|
|
13604
|
-
});
|
|
13605
|
-
/**
|
|
13606
|
-
* Present a modal on screen immediately.
|
|
13607
|
-
*
|
|
13608
|
-
* The new presented modal will be on top of existing modals if there are any.
|
|
13609
|
-
*
|
|
13610
|
-
* @param Content A component to be presented as a modal on screen.
|
|
13611
|
-
* This component will be centered horizontally and vertically on screen with
|
|
13612
|
-
* a semitransparent black overlay underneath.
|
|
13613
|
-
* @param contentProps Props for this modal component.
|
|
13614
|
-
* @returns A `ModalHandler` you can use to dismiss the modal.
|
|
13615
|
-
*/
|
|
13616
|
-
var showFABModal = function showFABModal(content) {
|
|
13617
|
-
var _ref3 = null;
|
|
13618
|
-
var rootSiblings = null;
|
|
13619
|
-
var dismiss = function dismiss(onDismiss) {
|
|
13620
|
-
if (rootSiblings) {
|
|
13621
|
-
var cleanup = function cleanup() {
|
|
13622
|
-
var _rootSiblings;
|
|
13623
|
-
(_rootSiblings = rootSiblings) === null || _rootSiblings === void 0 ? void 0 : _rootSiblings.destroy();
|
|
13624
|
-
rootSiblings = null;
|
|
13625
|
-
_ref3 = null;
|
|
13626
|
-
onDismiss === null || onDismiss === void 0 ? void 0 : onDismiss();
|
|
13627
|
-
};
|
|
13628
|
-
if (_ref3) {
|
|
13629
|
-
_ref3.animatedOut(cleanup);
|
|
13630
|
-
} else {
|
|
13631
|
-
cleanup();
|
|
13632
|
-
}
|
|
13633
|
-
}
|
|
13634
|
-
};
|
|
13635
|
-
var update = function update(newContent) {
|
|
13636
|
-
var _rootSiblings2;
|
|
13637
|
-
(_rootSiblings2 = rootSiblings) === null || _rootSiblings2 === void 0 ? void 0 : _rootSiblings2.update( /*#__PURE__*/React.createElement(FABModalPresenter, {
|
|
13638
|
-
ref: function ref(_ref) {
|
|
13639
|
-
_ref3 = _ref;
|
|
13640
|
-
}
|
|
13641
|
-
}, newContent));
|
|
13642
|
-
};
|
|
13643
|
-
rootSiblings = new RootSiblings( /*#__PURE__*/React.createElement(FABModalPresenter, {
|
|
13644
|
-
ref: function ref(_ref) {
|
|
13645
|
-
_ref3 = _ref;
|
|
13646
|
-
}
|
|
13647
|
-
}, content));
|
|
13648
|
-
return {
|
|
13649
|
-
dismiss: dismiss,
|
|
13650
|
-
update: update
|
|
13651
|
-
};
|
|
13652
|
-
};
|
|
13653
|
-
FABModalPresenter.displayName = 'FABModalPresenter';
|
|
13654
|
-
|
|
13655
|
-
var wrapperStyle$1 = {
|
|
13656
|
-
width: Dimensions.get('window').width,
|
|
13657
|
-
height: Dimensions.get('window').height
|
|
13658
|
-
};
|
|
13659
|
-
var fABModal = function fABModal(_ref) {
|
|
13660
|
-
var children = _ref.children,
|
|
13661
|
-
onShow = _ref.onShow,
|
|
13662
|
-
testID = _ref.testID,
|
|
13663
|
-
_ref$visible = _ref.visible,
|
|
13664
|
-
visible = _ref$visible === void 0 ? true : _ref$visible;
|
|
13665
|
-
var _React$useState = React.useState(),
|
|
13666
|
-
_React$useState2 = _slicedToArray(_React$useState, 2),
|
|
13667
|
-
modalHandler = _React$useState2[0],
|
|
13668
|
-
setModalHandler = _React$useState2[1];
|
|
13669
|
-
var getModalContent = React.useCallback(function () {
|
|
13670
|
-
return /*#__PURE__*/React.createElement(View, {
|
|
13671
|
-
pointerEvents: "box-none",
|
|
13672
|
-
style: wrapperStyle$1,
|
|
13673
|
-
testID: testID
|
|
13674
|
-
}, children);
|
|
13675
|
-
}, [visible, children, onShow, testID]);
|
|
13676
|
-
React.useEffect(function () {
|
|
13677
|
-
if (visible) {
|
|
13678
|
-
// Modal does not exist, create a new one
|
|
13679
|
-
if (!modalHandler) {
|
|
13680
|
-
var newModalHandler = showFABModal(getModalContent());
|
|
13681
|
-
setModalHandler(newModalHandler);
|
|
13682
|
-
onShow === null || onShow === void 0 ? void 0 : onShow();
|
|
13683
|
-
}
|
|
13684
|
-
// Modal already exists, update it
|
|
13685
|
-
else {
|
|
13686
|
-
modalHandler.update(getModalContent());
|
|
13687
|
-
}
|
|
13688
|
-
} else {
|
|
13689
|
-
modalHandler === null || modalHandler === void 0 ? void 0 : modalHandler.dismiss();
|
|
13690
|
-
setModalHandler(undefined);
|
|
13691
|
-
}
|
|
13692
|
-
}, [getModalContent]);
|
|
13693
|
-
return null;
|
|
13694
|
-
};
|
|
13695
|
-
|
|
13696
13868
|
var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
13697
13869
|
var headerTitle = _ref.headerTitle,
|
|
13698
13870
|
onPress = _ref.onPress,
|
|
@@ -13743,7 +13915,7 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
13743
13915
|
inputRange: [0, 1],
|
|
13744
13916
|
outputRange: [0, 1]
|
|
13745
13917
|
});
|
|
13746
|
-
return /*#__PURE__*/React.createElement(
|
|
13918
|
+
return /*#__PURE__*/React.createElement(StyledContainer$2, {
|
|
13747
13919
|
testID: testID,
|
|
13748
13920
|
pointerEvents: "box-none",
|
|
13749
13921
|
style: style
|
|
@@ -13787,7 +13959,7 @@ var ActionGroup = /*#__PURE__*/forwardRef(function (_ref, ref) {
|
|
|
13787
13959
|
active: active,
|
|
13788
13960
|
title: fabTitle,
|
|
13789
13961
|
ref: fabRef
|
|
13790
|
-
}))
|
|
13962
|
+
}));
|
|
13791
13963
|
});
|
|
13792
13964
|
ActionGroup.displayName = 'FAB.ActionGroup';
|
|
13793
13965
|
|
|
@@ -33826,4 +33998,4 @@ var index = Object.assign(RichTextEditorWithRef, {
|
|
|
33826
33998
|
Toolbar: EditorToolbar
|
|
33827
33999
|
});
|
|
33828
34000
|
|
|
33829
|
-
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, 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 };
|
|
34001
|
+
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 };
|