@ovotech/element-native 3.6.0 → 3.7.0-canary-7cc2ffb-179

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.
Files changed (35) hide show
  1. package/dist/components/ActionList/ActionList.d.ts +3 -7
  2. package/dist/components/ActionList/ActionList.js +7 -18
  3. package/dist/components/ActionList/index.d.ts +1 -1
  4. package/dist/components/ActionList/index.js +4 -15
  5. package/dist/components/ActionList/styled.js +1 -1
  6. package/dist/components/NavHeader/NavHeader.d.ts +3 -2
  7. package/dist/components/NavHeader/NavHeader.js +32 -5
  8. package/dist/components/NavHeader/NavHeader.styles.d.ts +238 -3
  9. package/dist/components/NavHeader/NavHeader.styles.js +16 -12
  10. package/dist/components/P/P.d.ts +4 -242
  11. package/dist/components/P/P.js +18 -2
  12. package/dist/components/SkeletonText/SkeletonText.js +3 -1
  13. package/dist/components/Spinner/Spinner.d.ts +8 -0
  14. package/dist/components/Spinner/Spinner.js +82 -0
  15. package/dist/components/Spinner/index.d.ts +1 -0
  16. package/dist/components/Spinner/index.js +5 -0
  17. package/dist/components/Toast/Toast.d.ts +13 -0
  18. package/dist/components/Toast/Toast.js +168 -0
  19. package/dist/components/Toast/index.d.ts +1 -0
  20. package/dist/components/Toast/index.js +6 -0
  21. package/dist/components/index.d.ts +2 -0
  22. package/dist/components/index.js +2 -0
  23. package/dist/esm/components/ActionList/ActionList.js +8 -19
  24. package/dist/esm/components/ActionList/index.js +1 -1
  25. package/dist/esm/components/ActionList/styled.js +1 -1
  26. package/dist/esm/components/NavHeader/NavHeader.js +34 -7
  27. package/dist/esm/components/NavHeader/NavHeader.styles.js +15 -11
  28. package/dist/esm/components/P/P.js +18 -2
  29. package/dist/esm/components/SkeletonText/SkeletonText.js +3 -1
  30. package/dist/esm/components/Spinner/Spinner.js +55 -0
  31. package/dist/esm/components/Spinner/index.js +1 -0
  32. package/dist/esm/components/Toast/Toast.js +140 -0
  33. package/dist/esm/components/Toast/index.js +1 -0
  34. package/dist/esm/components/index.js +2 -0
  35. package/package.json +9 -4
@@ -2,16 +2,12 @@ import { ComponentProps, PropsWithChildren, Ref } from 'react';
2
2
  import { AccessibilityRole, View, ViewProps } from 'react-native';
3
3
  import { IconName } from '../../providers';
4
4
  import { StyledActionList } from './styled';
5
- declare const ACTION_TYPES: {
6
- [key: string]: IconName;
7
- };
8
5
  declare type FullWidthOptions = 'always' | 'never' | 'small';
9
6
  declare type ActionListProps = ComponentProps<typeof StyledActionList>;
10
7
  declare type ActionProps = PropsWithChildren<ViewProps & {
11
8
  accessibilityRole?: AccessibilityRole;
12
- actionType?: keyof typeof ACTION_TYPES;
13
- iconLeft?: IconName | 'off';
14
- iconRight?: IconName | 'off';
9
+ iconLeft?: IconName;
10
+ iconRight?: IconName;
15
11
  inverted?: boolean;
16
12
  inline?: boolean;
17
13
  onPress?: () => void;
@@ -21,5 +17,5 @@ declare type ActionProps = PropsWithChildren<ViewProps & {
21
17
  inList?: boolean;
22
18
  }>;
23
19
  declare const ActionList: ({ children, inverted, ...rest }: ActionListProps) => JSX.Element;
24
- declare const Action: ({ accessibilityRole, actionType, children, fullWidth, inverted, inline, onPress, testID, ...rest }: ActionProps) => JSX.Element;
20
+ declare const Action: import("react").ForwardRefExoticComponent<Pick<ActionProps, "onPress" | "inline" | keyof ViewProps | "fullWidth" | "iconLeft" | "iconRight" | "inverted" | "inList"> & import("react").RefAttributes<View>>;
25
21
  export { ActionList, Action };
@@ -28,12 +28,6 @@ var react_1 = require("react");
28
28
  var react_native_1 = require("react-native");
29
29
  var hooks_1 = require("../../hooks");
30
30
  var styled_1 = require("./styled");
31
- var ACTION_TYPES = {
32
- back: 'chevron-left-small',
33
- // edit: 'arrow-right', /* TODO: add pencil + paper icon */
34
- external: 'new-window',
35
- link: 'chevron-right-small',
36
- };
37
31
  var ActionList = function (_a) {
38
32
  var children = _a.children, inverted = _a.inverted, rest = __rest(_a, ["children", "inverted"]);
39
33
  var childCount = children.length;
@@ -49,21 +43,16 @@ var ActionList = function (_a) {
49
43
  }) })));
50
44
  };
51
45
  exports.ActionList = ActionList;
52
- var ActionWrapper = function (_a) {
46
+ var ActionWrapper = (0, react_1.forwardRef)(function (_a, ref) {
53
47
  var children = _a.children, accessibilityRole = _a.accessibilityRole, _b = _a.activeOpacity, activeOpacity = _b === void 0 ? 0.75 : _b, fullWidth = _a.fullWidth, _c = _a.hasBorder, hasBorder = _c === void 0 ? false : _c, _d = _a.inverted, inverted = _d === void 0 ? false : _d, _e = _a.inline, inline = _e === void 0 ? false : _e, inList = _a.inList, onPress = _a.onPress, testID = _a.testID, rest = __rest(_a, ["children", "accessibilityRole", "activeOpacity", "fullWidth", "hasBorder", "inverted", "inline", "inList", "onPress", "testID"]);
54
- return ((0, jsx_runtime_1.jsx)(styled_1.StyledActionWrapper, __assign({ hasBorder: hasBorder, inverted: inverted, testID: testID }, rest, { children: (0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, __assign({ hitSlop: inline ? 24 : null, activeOpacity: activeOpacity, accessibilityRole: accessibilityRole, onPress: onPress }, { children: (0, jsx_runtime_1.jsx)(styled_1.StyledActionInner, __assign({ fullWidth: fullWidth, inList: inList, inline: inline }, { children: children })) })) })));
55
- };
56
- var Action = function (_a) {
57
- var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'link' : _b, _c = _a.actionType, actionType = _c === void 0 ? 'link' : _c, children = _a.children, _d = _a.fullWidth, fullWidth = _d === void 0 ? 'never' : _d, _e = _a.inverted, inverted = _e === void 0 ? false : _e, _f = _a.inline, inline = _f === void 0 ? false : _f, onPress = _a.onPress, testID = _a.testID, rest = __rest(_a, ["accessibilityRole", "actionType", "children", "fullWidth", "inverted", "inline", "onPress", "testID"]);
48
+ return ((0, jsx_runtime_1.jsx)(styled_1.StyledActionWrapper, __assign({ ref: ref, hasBorder: hasBorder, inverted: inverted, testID: testID }, rest, { children: (0, jsx_runtime_1.jsx)(react_native_1.TouchableOpacity, __assign({ hitSlop: inline ? 24 : null, activeOpacity: activeOpacity, accessibilityRole: accessibilityRole, onPress: onPress }, { children: (0, jsx_runtime_1.jsx)(styled_1.StyledActionInner, __assign({ fullWidth: fullWidth, inList: inList, inline: inline }, { children: children })) })) })));
49
+ });
50
+ var Action = (0, react_1.forwardRef)(function (_a, ref) {
51
+ var _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'link' : _b, children = _a.children, _c = _a.fullWidth, fullWidth = _c === void 0 ? 'never' : _c, _d = _a.inverted, inverted = _d === void 0 ? false : _d, _e = _a.inline, inline = _e === void 0 ? false : _e, onPress = _a.onPress, testID = _a.testID, iconLeft = _a.iconLeft, iconRight = _a.iconRight, rest = __rest(_a, ["accessibilityRole", "children", "fullWidth", "inverted", "inline", "onPress", "testID", "iconLeft", "iconRight"]);
58
52
  var smallAndUp = (0, hooks_1.useBreakpoint)().smallAndUp;
59
- var isBackAction = actionType === 'back';
60
- var updatedIconRight = null;
61
- if (!isBackAction) {
62
- updatedIconRight = ACTION_TYPES[actionType];
63
- }
64
53
  if (fullWidth === 'small') {
65
54
  fullWidth = smallAndUp ? 'never' : 'always';
66
55
  }
67
- return ((0, jsx_runtime_1.jsxs)(ActionWrapper, __assign({ accessibilityRole: accessibilityRole, fullWidth: fullWidth, inverted: inverted, inline: inline, onPress: onPress, testID: testID }, rest, { children: [isBackAction ? ((0, jsx_runtime_1.jsx)(styled_1.StyledLeftIcon, { inverted: inverted, name: ACTION_TYPES.back, size: 16 })) : null, (0, jsx_runtime_1.jsx)(styled_1.StyledActionText, __assign({ smallAndUp: smallAndUp, inverted: inverted, inList: rest === null || rest === void 0 ? void 0 : rest.inList }, { children: children })), updatedIconRight ? ((0, jsx_runtime_1.jsx)(styled_1.StyledRightIcon, { inverted: inverted, name: updatedIconRight, marginTop: actionType === 'link' ? 1 : 0, size: 16 })) : null] })));
68
- };
56
+ return ((0, jsx_runtime_1.jsxs)(ActionWrapper, __assign({ ref: ref, accessibilityRole: accessibilityRole, fullWidth: fullWidth, inverted: inverted, inline: inline, onPress: onPress, testID: testID }, rest, { children: [iconLeft ? ((0, jsx_runtime_1.jsx)(styled_1.StyledLeftIcon, { inverted: inverted, name: iconLeft, size: 16 })) : null, (0, jsx_runtime_1.jsx)(styled_1.StyledActionText, __assign({ smallAndUp: smallAndUp, inverted: inverted, inList: rest === null || rest === void 0 ? void 0 : rest.inList }, { children: children })), iconRight ? ((0, jsx_runtime_1.jsx)(styled_1.StyledRightIcon, { inverted: inverted, name: iconRight, marginTop: iconRight === 'chevron-right-small' ? 1 : 0, size: 16 })) : null] })));
57
+ });
69
58
  exports.Action = Action;
@@ -1 +1 @@
1
- export * from './ActionList';
1
+ export { Action, ActionList } from './ActionList';
@@ -1,17 +1,6 @@
1
1
  "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
2
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./ActionList"), exports);
3
+ exports.ActionList = exports.Action = void 0;
4
+ var ActionList_1 = require("./ActionList");
5
+ Object.defineProperty(exports, "Action", { enumerable: true, get: function () { return ActionList_1.Action; } });
6
+ Object.defineProperty(exports, "ActionList", { enumerable: true, get: function () { return ActionList_1.ActionList; } });
@@ -59,6 +59,6 @@ exports.StyledRightIcon = (0, styled_native_1.default)(Icon_1.Icon)(function (_a
59
59
  });
60
60
  exports.StyledLeftIcon = (0, styled_native_1.default)(Icon_1.Icon)(function (_a) {
61
61
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, inverted = _a.inverted;
62
- return (0, styled_native_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: ", ";\n margin-right: ", ";\n "], ["\n color: ", ";\n margin-right: ", ";\n "])), inverted ? semantic.inverted.message.base : semantic.message.base, core.space[1]);
62
+ return (0, styled_native_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n color: ", ";\n margin-right: ", ";\n margin-top: ", ";\n align-self: start;\n "], ["\n color: ", ";\n margin-right: ", ";\n margin-top: ", ";\n align-self: start;\n "])), inverted ? semantic.inverted.message.base : semantic.message.base, core.space[1], core.space[1]);
63
63
  });
64
64
  var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
@@ -4,6 +4,7 @@ export declare type NavHeaderProps = {
4
4
  scrolled: boolean;
5
5
  rightActionConfig?: RightActionConfig;
6
6
  canGoBack?: boolean;
7
- goBack?: () => void;
7
+ backButtonText?: string;
8
+ onBackButtonPress?: () => void;
8
9
  };
9
- export declare const NavHeader: ({ title, scrolled, rightActionConfig, canGoBack, goBack, }: NavHeaderProps) => JSX.Element;
10
+ export declare const NavHeader: ({ title, scrolled, rightActionConfig, canGoBack, backButtonText, onBackButtonPress, }: NavHeaderProps) => JSX.Element;
@@ -37,21 +37,48 @@ Object.defineProperty(exports, "__esModule", { value: true });
37
37
  exports.NavHeader = void 0;
38
38
  var jsx_runtime_1 = require("react/jsx-runtime");
39
39
  var element_core_1 = require("@ovotech/element-core");
40
+ var react_1 = require("react");
40
41
  var react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
41
42
  var ActionList_1 = require("../ActionList");
42
43
  var IconButton_1 = require("./IconButton");
43
44
  var NavHeader_styles_1 = require("./NavHeader.styles");
44
- var FADE_ANIMATION_DURATION = 250; // ms
45
+ var FADE_ANIMATION_DURATION = 200;
46
+ var ONLY_TITLE_CONTAINER_HEIGHT = 108;
47
+ var TITLE_AND_BACK_CONTAINER_HEIGHT = 92;
45
48
  var NavHeader = function (_a) {
46
- var title = _a.title, scrolled = _a.scrolled, rightActionConfig = _a.rightActionConfig, canGoBack = _a.canGoBack, goBack = _a.goBack;
47
- return ((0, jsx_runtime_1.jsxs)(NavHeader_styles_1.NavContainer, { children: [(0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, __assign({ style: {
49
+ var title = _a.title, scrolled = _a.scrolled, rightActionConfig = _a.rightActionConfig, canGoBack = _a.canGoBack, _b = _a.backButtonText, backButtonText = _b === void 0 ? 'Back' : _b, onBackButtonPress = _a.onBackButtonPress;
50
+ var hasRightAction = !!rightActionConfig;
51
+ var initialContainerHeight = canGoBack
52
+ ? TITLE_AND_BACK_CONTAINER_HEIGHT
53
+ : ONLY_TITLE_CONTAINER_HEIGHT;
54
+ var animatedContainerHeight = (0, react_native_reanimated_1.useSharedValue)(initialContainerHeight);
55
+ var animatedHeightStyle = (0, react_native_reanimated_1.useAnimatedStyle)(function () {
56
+ return {
57
+ height: animatedContainerHeight.value,
58
+ };
59
+ });
60
+ (0, react_1.useEffect)(function () {
61
+ if (scrolled) {
62
+ animatedContainerHeight.value = (0, react_native_reanimated_1.withTiming)(56, {
63
+ duration: FADE_ANIMATION_DURATION,
64
+ easing: react_native_reanimated_1.Easing.linear,
65
+ });
66
+ }
67
+ else {
68
+ animatedContainerHeight.value = (0, react_native_reanimated_1.withTiming)(initialContainerHeight, {
69
+ duration: FADE_ANIMATION_DURATION,
70
+ easing: react_native_reanimated_1.Easing.linear,
71
+ });
72
+ }
73
+ }, [scrolled]);
74
+ return ((0, jsx_runtime_1.jsxs)(NavHeader_styles_1.NavContainer, __assign({ collapsed: scrolled, style: [animatedHeightStyle] }, { children: [(0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, __assign({ style: {
48
75
  width: scrolled ? '33.3%' : '100%',
49
76
  // when back button is off we have small margin top for title, to write less code we can just set height
50
77
  height: !canGoBack ? parseInt(element_core_1.theme.core.space[10]) : undefined,
51
- } }, { children: canGoBack && ((0, jsx_runtime_1.jsx)(ActionList_1.Action, __assign({ actionType: "back", onPress: goBack }, { children: "Back" }))) })), scrolled ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(NavHeader_styles_1.CollapsedTitleWrapper, { children: (0, jsx_runtime_1.jsx)(NavHeader_styles_1.CollapsedTitle, __assign({ numberOfLines: 1, ellipsizeMode: "tail", entering: react_native_reanimated_1.FadeInDown.delay(FADE_ANIMATION_DURATION), exiting: react_native_reanimated_1.FadeOutDown.duration(FADE_ANIMATION_DURATION) }, { children: title })) }), (0, jsx_runtime_1.jsx)(NavHeader_styles_1.IconButtonWrapper, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { rightActionConfig: rightActionConfig, size: "small", animation: react_native_reanimated_1.FadeInDown.delay(FADE_ANIMATION_DURATION) }) })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(NavHeader_styles_1.ExpandedTitle
78
+ } }, { children: canGoBack && ((0, jsx_runtime_1.jsx)(NavHeader_styles_1.ActionWrapper, __assign({ collapsed: scrolled }, { children: (0, jsx_runtime_1.jsx)(ActionList_1.Action, __assign({ iconLeft: "chevron-left-small", inline: true, onPress: onBackButtonPress }, { children: backButtonText })) }))) })), scrolled ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(NavHeader_styles_1.CollapsedTitleWrapper, { children: (0, jsx_runtime_1.jsx)(NavHeader_styles_1.CollapsedTitle, __assign({ numberOfLines: 1, ellipsizeMode: "tail", entering: react_native_reanimated_1.FadeInDown.delay(FADE_ANIMATION_DURATION), exiting: react_native_reanimated_1.FadeOutDown.duration(FADE_ANIMATION_DURATION) }, { children: title })) }), (0, jsx_runtime_1.jsx)(NavHeader_styles_1.IconButtonWrapper, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { rightActionConfig: rightActionConfig, size: "small", animation: react_native_reanimated_1.FadeInDown.delay(FADE_ANIMATION_DURATION) }) })] })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(NavHeader_styles_1.ExpandedTitle
52
79
  // if we don't have right action leave more space for the title text in expanded state
53
80
  , __assign({
54
81
  // if we don't have right action leave more space for the title text in expanded state
55
- fullWidth: !scrolled && !rightActionConfig, numberOfLines: 1, ellipsizeMode: "tail", hasBackButton: canGoBack, entering: react_native_reanimated_1.FadeInUp.delay(FADE_ANIMATION_DURATION), exiting: react_native_reanimated_1.FadeOutUp.duration(FADE_ANIMATION_DURATION) }, { children: title })), (0, jsx_runtime_1.jsx)(NavHeader_styles_1.IconButtonWrapper, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { rightActionConfig: rightActionConfig, size: "large", animation: react_native_reanimated_1.FadeInUp.delay(FADE_ANIMATION_DURATION) }) })] }))] }));
82
+ fullWidth: !scrolled && !hasRightAction, numberOfLines: 1, ellipsizeMode: "tail", hasBackButton: canGoBack, entering: react_native_reanimated_1.FadeInUp.delay(FADE_ANIMATION_DURATION), exiting: react_native_reanimated_1.FadeOutUp.duration(FADE_ANIMATION_DURATION) }, { children: title })), (0, jsx_runtime_1.jsx)(NavHeader_styles_1.IconButtonWrapper, { children: (0, jsx_runtime_1.jsx)(IconButton_1.IconButton, { rightActionConfig: rightActionConfig, size: "large", animation: react_native_reanimated_1.FadeInUp.delay(FADE_ANIMATION_DURATION) }) })] }))] })));
56
83
  };
57
84
  exports.NavHeader = NavHeader;
@@ -1,6 +1,5 @@
1
- import { View } from 'react-native';
2
1
  import Animated from 'react-native-reanimated';
3
- export declare const NavContainer: import("styled-components").StyledComponent<typeof View, {
2
+ export declare const NavContainer: import("styled-components").StyledComponent<typeof Animated.View, {
4
3
  core: {
5
4
  radius: Record<"small" | "medium" | "large" | "max", string>;
6
5
  borderWidth: Record<"small" | "medium" | "large", string>;
@@ -231,7 +230,9 @@ export declare const NavContainer: import("styled-components").StyledComponent<t
231
230
  };
232
231
  };
233
232
  };
234
- }, {}, never>;
233
+ }, {
234
+ collapsed: boolean;
235
+ }, never>;
235
236
  export declare const ExpandedTitle: import("styled-components").StyledComponent<typeof Animated.Text, {
236
237
  core: {
237
238
  radius: Record<"small" | "medium" | "large" | "max", string>;
@@ -1631,3 +1632,237 @@ export declare const StyledIconButtonL: import("styled-components").StyledCompon
1631
1632
  }, {
1632
1633
  $pressed: boolean;
1633
1634
  }, never>;
1635
+ export declare const ActionWrapper: import("styled-components").StyledComponent<typeof import("react-native").View, {
1636
+ core: {
1637
+ radius: Record<"small" | "medium" | "large" | "max", string>;
1638
+ borderWidth: Record<"small" | "medium" | "large", string>;
1639
+ breakpoint: Record<"small" | "medium" | "large", string | number>;
1640
+ mediaQuery: Record<"small" | "medium" | "large", string>;
1641
+ space: Record<0 | 2 | 1 | 3 | 4 | 5 | 10 | 6 | 7 | 8 | 9 | 11 | 12 | 13 | 14 | 15, string>;
1642
+ transition: Record<"medium" | "slow" | "fast", string>;
1643
+ opacity: Record<"solid" | "transparent" | "translucent", string | number>;
1644
+ color: Record<"neutral" | "red" | "orange" | "yellow" | "green" | "blue", {
1645
+ lightest: string;
1646
+ lighter: string;
1647
+ light: string;
1648
+ base: string;
1649
+ dark: string;
1650
+ darker: string;
1651
+ darkest: string;
1652
+ }> & {
1653
+ brand: Record<string, string>;
1654
+ };
1655
+ fontFamily: Record<"body" | "mono" | "heading" | "bodyBold", {
1656
+ native: string;
1657
+ web: string;
1658
+ }>;
1659
+ fontWeight: Record<"bold" | "book" | "black", string | number>;
1660
+ fontSize: Record<"small" | "body" | "label" | "heading1" | "heading2" | "heading3" | "heading4" | "lead", {
1661
+ small: string | number;
1662
+ large: string | number;
1663
+ }>;
1664
+ lineHeight: Record<"small" | "body" | "label" | "heading1" | "heading2" | "heading3" | "heading4" | "lead", {
1665
+ small: string | number;
1666
+ large: string | number;
1667
+ }>;
1668
+ letterSpacing: Record<"base" | "compressed" | "extraCompressed", number>;
1669
+ };
1670
+ semantic: {
1671
+ surface: Record<"base" | "cutout" | "elevated", string>;
1672
+ message: Record<"base" | "link" | "secondary" | "error" | "branded", string>;
1673
+ border: Record<"graphic" | "differentiated" | "functional", string>;
1674
+ focus: Record<"surface" | "outline" | "hover", string>;
1675
+ inverted: Record<"surface" | "border", string> & {
1676
+ message: Record<"base" | "link" | "secondary" | "branded", string>;
1677
+ };
1678
+ success: {
1679
+ border: string;
1680
+ surface: string;
1681
+ surfaceEmphasis: string;
1682
+ message: string;
1683
+ messageOnEmphasis: string;
1684
+ };
1685
+ warning: {
1686
+ border: string;
1687
+ surface: string;
1688
+ surfaceEmphasis: string;
1689
+ message: string;
1690
+ messageOnEmphasis: string;
1691
+ };
1692
+ error: {
1693
+ border: string;
1694
+ surface: string;
1695
+ surfaceEmphasis: string;
1696
+ message: string;
1697
+ messageOnEmphasis: string;
1698
+ };
1699
+ info: {
1700
+ border: string;
1701
+ surface: string;
1702
+ surfaceEmphasis: string;
1703
+ message: string;
1704
+ messageOnEmphasis: string;
1705
+ };
1706
+ data: Record<"branded" | "gas" | "electric", Record<2 | 1 | 3 | 4, string>>;
1707
+ };
1708
+ component: {
1709
+ heading1: {
1710
+ fontFamily: string;
1711
+ fontWeight: string | number;
1712
+ fontSize: {
1713
+ small: string | number;
1714
+ large: string | number;
1715
+ };
1716
+ lineHeight: {
1717
+ small: string | number;
1718
+ large: string | number;
1719
+ };
1720
+ };
1721
+ heading2: {
1722
+ fontFamily: string;
1723
+ fontWeight: string | number;
1724
+ fontSize: {
1725
+ small: string | number;
1726
+ large: string | number;
1727
+ };
1728
+ lineHeight: {
1729
+ small: string | number;
1730
+ large: string | number;
1731
+ };
1732
+ };
1733
+ heading3: {
1734
+ fontFamily: string;
1735
+ fontWeight: string | number;
1736
+ fontSize: {
1737
+ small: string | number;
1738
+ large: string | number;
1739
+ };
1740
+ lineHeight: {
1741
+ small: string | number;
1742
+ large: string | number;
1743
+ };
1744
+ };
1745
+ heading4: {
1746
+ fontFamily: string;
1747
+ fontWeight: string | number;
1748
+ fontSize: {
1749
+ small: string | number;
1750
+ large: string | number;
1751
+ };
1752
+ lineHeight: {
1753
+ small: string | number;
1754
+ large: string | number;
1755
+ };
1756
+ };
1757
+ lead: {
1758
+ fontFamily: string;
1759
+ fontWeight: string | number;
1760
+ fontSize: {
1761
+ small: string | number;
1762
+ large: string | number;
1763
+ };
1764
+ lineHeight: {
1765
+ small: string | number;
1766
+ large: string | number;
1767
+ };
1768
+ };
1769
+ body: {
1770
+ fontFamily: string;
1771
+ fontWeight: string | number;
1772
+ fontSize: {
1773
+ small: string | number;
1774
+ large: string | number;
1775
+ };
1776
+ lineHeight: {
1777
+ small: string | number;
1778
+ large: string | number;
1779
+ };
1780
+ };
1781
+ small: {
1782
+ fontFamily: string;
1783
+ fontWeight: string | number;
1784
+ fontSize: {
1785
+ small: string | number;
1786
+ large: string | number;
1787
+ };
1788
+ lineHeight: {
1789
+ small: string | number;
1790
+ large: string | number;
1791
+ };
1792
+ };
1793
+ label: {
1794
+ fontFamily: string;
1795
+ fontWeight: string | number;
1796
+ fontSize: {
1797
+ small: string | number;
1798
+ large: string | number;
1799
+ };
1800
+ lineHeight: {
1801
+ small: string | number;
1802
+ large: string | number;
1803
+ };
1804
+ };
1805
+ cta: {
1806
+ primary: {
1807
+ message: string;
1808
+ surface: string;
1809
+ messageHover: string;
1810
+ surfaceHover: string;
1811
+ messageFocused: string;
1812
+ surfaceFocused: string;
1813
+ outlineFocused: string;
1814
+ backgroundFocused: string;
1815
+ };
1816
+ secondary: {
1817
+ message: string;
1818
+ surface: string;
1819
+ messageHover: string;
1820
+ surfaceHover: string;
1821
+ messageFocused: string;
1822
+ surfaceFocused: string;
1823
+ outlineFocused: string;
1824
+ backgroundFocused: string;
1825
+ };
1826
+ destructive: {
1827
+ message: string;
1828
+ surface: string;
1829
+ messageHover: string;
1830
+ surfaceHover: string;
1831
+ messageFocused: string;
1832
+ surfaceFocused: string;
1833
+ outlineFocused: string;
1834
+ backgroundFocused: string;
1835
+ };
1836
+ };
1837
+ badge: {
1838
+ variants: {
1839
+ neutral: {
1840
+ foreground: string;
1841
+ background: string;
1842
+ };
1843
+ red: {
1844
+ foreground: string;
1845
+ background: string;
1846
+ };
1847
+ orange: {
1848
+ foreground: string;
1849
+ background: string;
1850
+ };
1851
+ yellow: {
1852
+ foreground: string;
1853
+ background: string;
1854
+ };
1855
+ green: {
1856
+ foreground: string;
1857
+ background: string;
1858
+ };
1859
+ blue: {
1860
+ foreground: string;
1861
+ background: string;
1862
+ };
1863
+ };
1864
+ };
1865
+ };
1866
+ }, {
1867
+ collapsed: boolean;
1868
+ }, never>;
@@ -30,39 +30,43 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
30
30
  return (mod && mod.__esModule) ? mod : { "default": mod };
31
31
  };
32
32
  Object.defineProperty(exports, "__esModule", { value: true });
33
- exports.StyledIconButtonL = exports.StyledIconButtonS = exports.IconButtonWrapper = exports.CollapsedTitle = exports.CollapsedTitleWrapper = exports.ExpandedTitle = exports.NavContainer = void 0;
34
- var react_native_1 = require("react-native");
33
+ exports.ActionWrapper = exports.StyledIconButtonL = exports.StyledIconButtonS = exports.IconButtonWrapper = exports.CollapsedTitle = exports.CollapsedTitleWrapper = exports.ExpandedTitle = exports.NavContainer = void 0;
35
34
  var react_native_reanimated_1 = __importDefault(require("react-native-reanimated"));
36
35
  var styled_native_1 = __importStar(require("../../styled.native"));
37
- exports.NavContainer = (0, styled_native_1.default)(react_native_1.View)(function (_a) {
38
- var _b = _a.theme, semantic = _b.semantic, core = _b.core;
39
- return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n background-color: ", ";\n padding: ", ";\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n "], ["\n width: 100%;\n background-color: ", ";\n padding: ", ";\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n "])), semantic.surface.base, core.space[2]);
36
+ exports.NavContainer = (0, styled_native_1.default)(react_native_reanimated_1.default.View)(function (_a) {
37
+ var _b = _a.theme, semantic = _b.semantic, core = _b.core, collapsed = _a.collapsed;
38
+ return (0, styled_native_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n background-color: ", ";\n padding: ", ";\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n ", "\n "], ["\n width: 100%;\n background-color: ", ";\n padding: ", ";\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n ", "\n "])), semantic.surface.base, core.space[2], collapsed
39
+ ? (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: ", ";\n "], ["\n border-bottom-width: 1px;\n border-bottom-style: solid;\n border-bottom-color: ", ";\n "])), semantic.border.differentiated) : '');
40
40
  });
41
41
  exports.ExpandedTitle = (0, styled_native_1.default)(react_native_reanimated_1.default.Text)(function (_a) {
42
42
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, hasBackButton = _a.hasBackButton, fullWidth = _a.fullWidth;
43
- return (0, styled_native_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n height: ", ";\n color: ", ";\n "], ["\n width: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n height: ", ";\n color: ", ";\n "])), fullWidth ? '100%' : '65%', core.fontFamily.heading.native, core.fontSize.heading1[hasBackButton ? 'small' : 'large'], hasBackButton
43
+ return (0, styled_native_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n width: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n height: ", ";\n color: ", ";\n "], ["\n width: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n height: ", ";\n color: ", ";\n "])), fullWidth ? '100%' : '65%', core.fontFamily.heading.native, core.fontSize.heading1[hasBackButton ? 'small' : 'large'], hasBackButton
44
44
  ? core.lineHeight.heading1.small
45
45
  : core.space[13], hasBackButton ? core.lineHeight.heading1.small : core.space[13], semantic.message.branded);
46
46
  });
47
- exports.CollapsedTitleWrapper = (0, styled_native_1.default)(react_native_reanimated_1.default.View)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n align-items: center;\n justify-content: center;\n width: 33.3%;\n height: ", ";\n"], ["\n align-items: center;\n justify-content: center;\n width: 33.3%;\n height: ", ";\n"])), function (_a) {
47
+ exports.CollapsedTitleWrapper = (0, styled_native_1.default)(react_native_reanimated_1.default.View)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n align-items: center;\n justify-content: center;\n width: 33.3%;\n height: ", ";\n"], ["\n align-items: center;\n justify-content: center;\n width: 33.3%;\n height: ", ";\n"])), function (_a) {
48
48
  var core = _a.theme.core;
49
49
  return core.lineHeight.heading4.small;
50
50
  });
51
51
  exports.CollapsedTitle = (0, styled_native_1.default)(react_native_reanimated_1.default.Text)(function (_a) {
52
52
  var _b = _a.theme, core = _b.core, semantic = _b.semantic;
53
- return (0, styled_native_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "])), core.fontFamily.heading.native, core.fontSize.heading4.small, core.lineHeight.heading4.small, semantic.message.branded);
53
+ return (0, styled_native_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "])), core.fontFamily.heading.native, core.fontSize.heading4.small, core.lineHeight.heading4.small, semantic.message.branded);
54
54
  });
55
- exports.IconButtonWrapper = styled_native_1.default.View(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: 33.3%;\n flex-direction: row;\n justify-content: flex-end;\n"], ["\n width: 33.3%;\n flex-direction: row;\n justify-content: flex-end;\n"])));
55
+ exports.IconButtonWrapper = styled_native_1.default.View(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: 33.3%;\n flex-direction: row;\n justify-content: flex-end;\n"], ["\n width: 33.3%;\n flex-direction: row;\n justify-content: flex-end;\n"])));
56
56
  var iconButtonSharedStyles = (0, styled_native_1.css)(function (_a) {
57
57
  var semantic = _a.theme.semantic;
58
58
  return "\n border-radius: 100px;\n background-color: ".concat(semantic.inverted.surface, ";\n align-items: center;\n justify-content: center;\n");
59
59
  });
60
- exports.StyledIconButtonS = (0, styled_native_1.default)(react_native_reanimated_1.default.View)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n width: 28px;\n height: 28px;\n opacity: ", ";\n ", ";\n"], ["\n width: 28px;\n height: 28px;\n opacity: ", ";\n ", ";\n"])), function (_a) {
60
+ exports.StyledIconButtonS = (0, styled_native_1.default)(react_native_reanimated_1.default.View)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n width: 28px;\n height: 28px;\n opacity: ", ";\n ", ";\n"], ["\n width: 28px;\n height: 28px;\n opacity: ", ";\n ", ";\n"])), function (_a) {
61
61
  var $pressed = _a.$pressed;
62
62
  return ($pressed ? 0.8 : 1);
63
63
  }, iconButtonSharedStyles);
64
- exports.StyledIconButtonL = (0, styled_native_1.default)(react_native_reanimated_1.default.View)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n width: 36px;\n height: 36px;\n opacity: ", ";\n ", ";\n"], ["\n width: 36px;\n height: 36px;\n opacity: ", ";\n ", ";\n"])), function (_a) {
64
+ exports.StyledIconButtonL = (0, styled_native_1.default)(react_native_reanimated_1.default.View)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n width: 36px;\n height: 36px;\n opacity: ", ";\n ", ";\n"], ["\n width: 36px;\n height: 36px;\n opacity: ", ";\n ", ";\n"])), function (_a) {
65
65
  var $pressed = _a.$pressed;
66
66
  return ($pressed ? 0.8 : 1);
67
67
  }, iconButtonSharedStyles);
68
- var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7;
68
+ exports.ActionWrapper = styled_native_1.default.View(function (_a) {
69
+ var core = _a.theme.core, collapsed = _a.collapsed;
70
+ return (0, styled_native_1.css)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n margin-bottom: ", ";\n "], ["\n margin-bottom: ", ";\n "])), collapsed ? '0' : core.space[2]);
71
+ });
72
+ var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9;