@ovotech/element-native 5.6.0 → 5.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/styles.d.ts +3 -1734
- package/dist/components/ActionList/ActionListItems/DataListItem.js +3 -1
- package/dist/components/ActionList/ActionListItems/ToggleListItem.js +3 -4
- package/dist/components/ActionList/ActionListItems/styles.d.ts +22 -10404
- package/dist/components/ActionList/ActionListItems/styles.js +18 -16
- package/dist/components/ActionList/styled.d.ts +12 -6936
- package/dist/components/Badge/Badge.d.ts +1 -578
- package/dist/components/BottomActionBar/BottomActionBar.d.ts +12 -0
- package/dist/components/BottomActionBar/BottomActionBar.js +80 -0
- package/dist/components/BottomActionBar/OverlayProvider.d.ts +8 -0
- package/dist/components/BottomActionBar/OverlayProvider.js +38 -0
- package/dist/components/BottomActionBar/index.d.ts +2 -0
- package/dist/components/BottomActionBar/index.js +7 -0
- package/dist/components/Button/Button.styles.d.ts +5 -2312
- package/dist/components/Card/Card.styles.d.ts +3 -1734
- package/dist/components/Cards/AccountCard/AccountCard.styles.d.ts +8 -4624
- package/dist/components/Cards/BalanceCard/BalanceCard.styles.d.ts +15 -8670
- package/dist/components/Cards/DisruptiveCard/DisruptiveCard.styles.d.ts +1 -578
- package/dist/components/Cards/HeroImageCard/HeroImageCard.styles.d.ts +3 -1734
- package/dist/components/Cards/IconDataCard/IconDataCard.styles.d.ts +4 -2312
- package/dist/components/Cards/IconTextCard/IconTextCard.styles.d.ts +3 -1734
- package/dist/components/Cards/IllustrationTextCard/IllustrationTextCard.styles.d.ts +5 -2890
- package/dist/components/Cards/IllustrationTextCard/IllustrationTextCard.styles.js +1 -2
- package/dist/components/Cards/LinkTextCard/LinkTextCard.styles.d.ts +5 -2890
- package/dist/components/Cards/OfferCard/OfferCard.d.ts +22 -0
- package/dist/components/Cards/OfferCard/OfferCard.js +36 -0
- package/dist/components/Cards/OfferCard/OfferCard.styles.d.ts +34 -0
- package/dist/components/Cards/OfferCard/OfferCard.styles.js +61 -0
- package/dist/components/Cards/OfferCard/index.d.ts +1 -0
- package/dist/components/Cards/OfferCard/index.js +17 -0
- package/dist/components/Cards/ProgressBarCard/ProgressBarCard.styles.d.ts +9 -5202
- package/dist/components/Cards/QuickLinkCard/QuickLinkCard.styles.d.ts +5 -2890
- package/dist/components/Cards/ServicesImageCard/ServicesImageCard.styles.d.ts +5 -2890
- package/dist/components/Cards/shared.styles.d.ts +10 -5780
- package/dist/components/Checkbox/styled.d.ts +6 -3468
- package/dist/components/CurrencyInput/styled.d.ts +4 -2312
- package/dist/components/DataTable/styles.d.ts +13 -7514
- package/dist/components/Disclosure/Disclosure.d.ts +1 -578
- package/dist/components/Em/Em.d.ts +1 -578
- package/dist/components/EmptyState/styles.d.ts +2 -1156
- package/dist/components/ErrorText/ErrorText.d.ts +1 -578
- package/dist/components/Grid/Col.d.ts +1 -578
- package/dist/components/HintText/HintText.d.ts +1 -578
- package/dist/components/Input/styled.d.ts +3 -1734
- package/dist/components/LabelText/LabelText.d.ts +1 -578
- package/dist/components/LargeValueReference/styles.d.ts +3 -1734
- package/dist/components/LineThrough/LineThrough.d.ts +1 -578
- package/dist/components/List/styled.d.ts +4 -2312
- package/dist/components/Margin/Margin.d.ts +1 -578
- package/dist/components/NavHeader/NavHeader.styles.d.ts +11 -6358
- package/dist/components/Notification/Notification.d.ts +2 -2
- package/dist/components/Notification/Notification.js +20 -12
- package/dist/components/Notification/Notification.styles.d.ts +13 -5202
- package/dist/components/Notification/Notification.styles.js +21 -2
- package/dist/components/PasswordInput/PasswordInput.styled.d.ts +1 -578
- package/dist/components/Radio/Radio.d.ts +2 -2
- package/dist/components/Radio/Radio.js +5 -43
- package/dist/components/Radio/Radio.styles.d.ts +9 -0
- package/dist/components/Radio/Radio.styles.js +74 -0
- package/dist/components/RadioCard/RadioCard.styles.d.ts +5 -2890
- package/dist/components/Rail/Rail.d.ts +12 -0
- package/dist/components/Rail/Rail.js +58 -0
- package/dist/components/Rail/RailIndicator.d.ts +7 -0
- package/dist/components/Rail/RailIndicator.js +81 -0
- package/dist/components/Rail/index.d.ts +1 -0
- package/dist/components/Rail/index.js +5 -0
- package/dist/components/Rail/styles.d.ts +13 -0
- package/dist/components/Rail/styles.js +55 -0
- package/dist/components/Rail/useRailPaging.d.ts +13 -0
- package/dist/components/Rail/useRailPaging.js +95 -0
- package/dist/components/SelectField/styled.d.ts +8 -4624
- package/dist/components/Strong/Strong.d.ts +1 -578
- package/dist/components/SubLabelText/SubLabelText.d.ts +1 -578
- package/dist/components/Tabs/Tab.d.ts +1 -578
- package/dist/components/Toast/Toast.d.ts +10 -4
- package/dist/components/Toast/Toast.js +40 -27
- package/dist/components/Toggle/styles.d.ts +4 -2312
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +2 -0
- package/dist/esm/components/ActionList/ActionListItems/DataListItem.js +3 -1
- package/dist/esm/components/ActionList/ActionListItems/ToggleListItem.js +5 -6
- package/dist/esm/components/ActionList/ActionListItems/styles.js +17 -15
- package/dist/esm/components/BottomActionBar/BottomActionBar.js +40 -0
- package/dist/esm/components/BottomActionBar/OverlayProvider.js +30 -0
- package/dist/esm/components/BottomActionBar/index.js +2 -0
- package/dist/esm/components/Cards/IllustrationTextCard/IllustrationTextCard.styles.js +1 -2
- package/dist/esm/components/Cards/OfferCard/OfferCard.js +32 -0
- package/dist/esm/components/Cards/OfferCard/OfferCard.styles.js +55 -0
- package/dist/esm/components/Cards/OfferCard/index.js +1 -0
- package/dist/esm/components/Notification/Notification.js +21 -13
- package/dist/esm/components/Notification/Notification.styles.js +20 -1
- package/dist/esm/components/Radio/Radio.js +4 -39
- package/dist/esm/components/Radio/Radio.styles.js +38 -0
- package/dist/esm/components/Rail/Rail.js +21 -0
- package/dist/esm/components/Rail/RailIndicator.js +44 -0
- package/dist/esm/components/Rail/index.js +1 -0
- package/dist/esm/components/Rail/styles.js +49 -0
- package/dist/esm/components/Rail/useRailPaging.js +92 -0
- package/dist/esm/components/Toast/Toast.js +40 -27
- package/dist/esm/components/index.js +2 -0
- package/dist/styled.native.d.ts +1 -3463
- package/package.json +2 -2
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.useOverlayContext = exports.BottomActionBarOverlayProvider = void 0;
|
|
7
|
+
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
8
|
+
const react_1 = __importDefault(require("react"));
|
|
9
|
+
const react_native_1 = require("react-native");
|
|
10
|
+
const styled_native_1 = __importDefault(require("../../styled.native"));
|
|
11
|
+
const OverlayContext = react_1.default.createContext(null);
|
|
12
|
+
const StyledView = styled_native_1.default.View({
|
|
13
|
+
flex: 1,
|
|
14
|
+
});
|
|
15
|
+
const BottomActionBarOverlayProvider = ({ children }) => {
|
|
16
|
+
const [entries, setEntries] = react_1.default.useState([]);
|
|
17
|
+
const api = react_1.default.useMemo(() => ({
|
|
18
|
+
mount: (key, node) => {
|
|
19
|
+
setEntries(prev => {
|
|
20
|
+
const next = prev.filter(e => e.key !== key);
|
|
21
|
+
next.push({ key, node });
|
|
22
|
+
return next;
|
|
23
|
+
});
|
|
24
|
+
},
|
|
25
|
+
unmount: key => {
|
|
26
|
+
setEntries(prev => prev.filter(e => e.key !== key));
|
|
27
|
+
},
|
|
28
|
+
}), []);
|
|
29
|
+
return ((0, jsx_runtime_1.jsx)(OverlayContext.Provider, { value: api, children: (0, jsx_runtime_1.jsxs)(StyledView, { children: [children, (0, jsx_runtime_1.jsx)(react_native_1.View, { style: react_native_1.StyleSheet.absoluteFill, pointerEvents: "box-none", children: entries.map(e => ((0, jsx_runtime_1.jsx)(react_1.default.Fragment, { children: e.node }, e.key))) })] }) }));
|
|
30
|
+
};
|
|
31
|
+
exports.BottomActionBarOverlayProvider = BottomActionBarOverlayProvider;
|
|
32
|
+
const useOverlayContext = () => {
|
|
33
|
+
const ctx = react_1.default.useContext(OverlayContext);
|
|
34
|
+
if (!ctx)
|
|
35
|
+
throw new Error('BottomActionOverlayProvider is missing above in the tree');
|
|
36
|
+
return ctx;
|
|
37
|
+
};
|
|
38
|
+
exports.useOverlayContext = useOverlayContext;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BottomActionBarOverlayProvider = exports.BottomActionBar = void 0;
|
|
4
|
+
var BottomActionBar_1 = require("./BottomActionBar");
|
|
5
|
+
Object.defineProperty(exports, "BottomActionBar", { enumerable: true, get: function () { return BottomActionBar_1.BottomActionBar; } });
|
|
6
|
+
var OverlayProvider_1 = require("./OverlayProvider");
|
|
7
|
+
Object.defineProperty(exports, "BottomActionBarOverlayProvider", { enumerable: true, get: function () { return OverlayProvider_1.BottomActionBarOverlayProvider; } });
|