@ovotech/element-native 4.0.3 → 4.0.4-canary-8d6539a-263

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.
@@ -2,19 +2,20 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.IconButton = void 0;
4
4
  var jsx_runtime_1 = require("react/jsx-runtime");
5
- var element_core_1 = require("@ovotech/element-core");
6
5
  var react_native_1 = require("react-native");
6
+ var styled_native_1 = require("../../styled.native");
7
7
  var Icon_1 = require("../Icon");
8
8
  var NavHeader_styles_1 = require("./NavHeader.styles");
9
9
  var IconButton = function (_a) {
10
10
  var size = _a.size, animation = _a.animation, rightActionConfig = _a.rightActionConfig;
11
11
  var ButtonStyled = size === 'small' ? NavHeader_styles_1.StyledIconButtonS : NavHeader_styles_1.StyledIconButtonL;
12
+ var theme = (0, styled_native_1.useTheme)();
12
13
  if (!rightActionConfig || !(rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.iconName)) {
13
14
  return null;
14
15
  }
15
- return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { hitSlop: 44, pressRetentionOffset: 44, onPress: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.onActionPress, children: function (_a) {
16
+ return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { hitSlop: theme.core.space[2], pressRetentionOffset: theme.core.space[2], onPress: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.onActionPress, children: function (_a) {
16
17
  var pressed = _a.pressed;
17
- return ((0, jsx_runtime_1.jsx)(ButtonStyled, { entering: animation, "$pressed": pressed, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: rightActionConfig.iconName, size: size === 'small' ? 16 : 18, color: element_core_1.theme.semantic.inverted.message.base }) }));
18
+ return ((0, jsx_runtime_1.jsx)(ButtonStyled, { entering: animation, "$pressed": pressed, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: rightActionConfig.iconName, size: size === 'small' ? 16 : 18, color: theme.semantic.inverted.message.base }) }));
18
19
  } }));
19
20
  };
20
21
  exports.IconButton = IconButton;
@@ -26,6 +26,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.NavHeader = void 0;
27
27
  var jsx_runtime_1 = require("react/jsx-runtime");
28
28
  var react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
29
+ var styled_native_1 = require("../../styled.native");
29
30
  var ActionList_1 = require("../ActionList");
30
31
  var IconButton_1 = require("./IconButton");
31
32
  var NavHeader_styles_1 = require("./NavHeader.styles");
@@ -34,6 +35,7 @@ var NavHeader = function (_a) {
34
35
  var title = _a.title, scrolled = _a.scrolled, canGoBack = _a.canGoBack, rightActionConfig = _a.rightActionConfig, _b = _a.topOffset, topOffset = _b === void 0 ? 0 : _b, _c = _a.backButtonText, backButtonText = _c === void 0 ? 'Back' : _c, onHeaderHeightChange = _a.onHeaderHeightChange, onBackButtonPress = _a.onBackButtonPress;
35
36
  var hasRightAction = !!rightActionConfig;
36
37
  var hasTitle = title !== undefined && (title === null || title === void 0 ? void 0 : title.length) > 0;
38
+ var theme = (0, styled_native_1.useTheme)();
37
39
  var layoutHeight = (0, react_native_reanimated_1.useSharedValue)(0);
38
40
  var animatedHeightStyle = (0, react_native_reanimated_1.useAnimatedStyle)(function () {
39
41
  return {
@@ -58,6 +60,8 @@ var NavHeader = function (_a) {
58
60
  // content inside NavContainer is the only dynamic part of NavHeader
59
61
  return ((0, jsx_runtime_1.jsx)(NavHeader_styles_1.NavWrapper, { collapsed: scrolled, style: animatedHeightStyle, children: (0, jsx_runtime_1.jsxs)(NavHeader_styles_1.NavContainer, { topOffset: topOffset, onLayout: onLayout, titleVisible: hasTitle, children: [(0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { style: {
60
62
  width: scrolled ? '33.3%' : '100%',
63
+ // Important for maintaining white space above the title on main app screens.
64
+ height: !canGoBack ? theme.core.space[10] : undefined,
61
65
  }, children: canGoBack && ((0, jsx_runtime_1.jsx)(NavHeader_styles_1.ActionWrapper, { collapsed: scrolled, children: (0, jsx_runtime_1.jsx)(ActionList_1.Action, { 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, { titleVisible: hasTitle, children: (0, jsx_runtime_1.jsx)(NavHeader_styles_1.CollapsedTitle, { 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
62
66
  // if we don't have right action leave more space for the title text in expanded state
63
67
  , {
@@ -42,7 +42,9 @@ exports.NavWrapper = (0, styled_native_1.default)(react_native_reanimated_1.defa
42
42
  });
43
43
  exports.NavContainer = styled_native_1.default.View(function (_a) {
44
44
  var core = _a.theme.core, topOffset = _a.topOffset, titleVisible = _a.titleVisible;
45
- return (0, styled_native_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n\n /* NavWrapper zIndex + 1 so it is always on top of the wrapper */\n z-index: ", ";\n width: ", ";\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "], ["\n position: absolute;\n\n /* NavWrapper zIndex + 1 so it is always on top of the wrapper */\n z-index: ", ";\n width: ", ";\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "])), Z_INDEX + 1, titleVisible ? '100%' : '50%', (0, element_core_1.numToPx)(core.space[(topOffset !== null && topOffset !== void 0 ? topOffset : titleVisible) ? 2 : 4]), (0, element_core_1.numToPx)(core.space[titleVisible ? 2 : 4]), (0, element_core_1.numToPx)(core.space[4]), (0, element_core_1.numToPx)(core.space[4]));
45
+ return (0, styled_native_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n\n /* NavWrapper zIndex + 1 so it is always on top of the wrapper */\n z-index: ", ";\n width: ", ";\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "], ["\n position: absolute;\n\n /* NavWrapper zIndex + 1 so it is always on top of the wrapper */\n z-index: ", ";\n width: ", ";\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "])), Z_INDEX + 1, titleVisible ? '100%' : '50%', topOffset
46
+ ? topOffset
47
+ : (0, element_core_1.numToPx)(core.space[titleVisible ? 2 : 4]), (0, element_core_1.numToPx)(core.space[titleVisible ? 2 : 4]), (0, element_core_1.numToPx)(core.space[4]), (0, element_core_1.numToPx)(core.space[4]));
46
48
  });
47
49
  exports.ExpandedTitle = (0, styled_native_1.default)(react_native_reanimated_1.default.Text)(function (_a) {
48
50
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, hasBackButton = _a.hasBackButton, fullWidth = _a.fullWidth, titleVisible = _a.titleVisible;
@@ -1,16 +1,16 @@
1
- import { Dispatch, SetStateAction } from 'react';
1
+ import { ViewProps } from 'react-native';
2
2
  export type Segment = {
3
3
  key: string;
4
4
  label: string;
5
5
  accessibilityLabel?: string;
6
6
  };
7
- type SegmentedControlsProps = {
7
+ type SegmentedControlsProps = ViewProps & {
8
8
  activeSegment: Segment[][number];
9
9
  segments: Segment[];
10
- setActiveSegment: Dispatch<SetStateAction<Segment[][number]>>;
10
+ setActiveSegment: (...args: any[]) => void;
11
11
  inline?: boolean;
12
12
  multipleRows?: boolean;
13
13
  size?: 'small' | 'large';
14
14
  };
15
- export declare const SegmentedControls: ({ activeSegment, setActiveSegment, segments, inline, multipleRows, size, }: SegmentedControlsProps) => JSX.Element;
15
+ export declare const SegmentedControls: ({ activeSegment, setActiveSegment, segments, inline, multipleRows, size, ...rest }: SegmentedControlsProps) => JSX.Element;
16
16
  export {};
@@ -1,4 +1,15 @@
1
1
  "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
2
13
  var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
14
  if (k2 === undefined) k2 = k;
4
15
  var desc = Object.getOwnPropertyDescriptor(m, k);
@@ -22,17 +33,30 @@ var __importStar = (this && this.__importStar) || function (mod) {
22
33
  __setModuleDefault(result, mod);
23
34
  return result;
24
35
  };
36
+ var __rest = (this && this.__rest) || function (s, e) {
37
+ var t = {};
38
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
39
+ t[p] = s[p];
40
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
41
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
42
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
43
+ t[p[i]] = s[p[i]];
44
+ }
45
+ return t;
46
+ };
25
47
  Object.defineProperty(exports, "__esModule", { value: true });
26
48
  exports.SegmentedControls = void 0;
27
49
  var jsx_runtime_1 = require("react/jsx-runtime");
28
50
  var react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
29
51
  var styled_native_1 = __importStar(require("../../styled.native"));
30
52
  var SegmentButton_1 = require("./components/SegmentButton");
53
+ /* These settings were found to be nice and fast whilst maintaining spring */
31
54
  var springSettings = {
32
- damping: 15,
55
+ damping: 25,
56
+ mass: 0.25,
33
57
  };
34
58
  var SegmentedControls = function (_a) {
35
- var activeSegment = _a.activeSegment, setActiveSegment = _a.setActiveSegment, segments = _a.segments, _b = _a.inline, inline = _b === void 0 ? false : _b, multipleRows = _a.multipleRows, _c = _a.size, size = _c === void 0 ? 'large' : _c;
59
+ var activeSegment = _a.activeSegment, setActiveSegment = _a.setActiveSegment, segments = _a.segments, _b = _a.inline, inline = _b === void 0 ? false : _b, multipleRows = _a.multipleRows, _c = _a.size, size = _c === void 0 ? 'large' : _c, rest = __rest(_a, ["activeSegment", "setActiveSegment", "segments", "inline", "multipleRows", "size"]);
36
60
  var animatedX = (0, react_native_reanimated_1.useSharedValue)(0);
37
61
  var animatedY = (0, react_native_reanimated_1.useSharedValue)(0);
38
62
  var animatedHeight = (0, react_native_reanimated_1.useSharedValue)(0);
@@ -53,23 +77,26 @@ var SegmentedControls = function (_a) {
53
77
  borderRadius: theme.core.radius.max,
54
78
  backgroundColor: theme.semantic.surface.elevated,
55
79
  }); }, [animatedX, animatedY, animatedWidth, animatedHeight]);
56
- return ((0, jsx_runtime_1.jsxs)(SegmentsContainer, { "$inline": inline, "$multipleRows": multipleRows, children: [(0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { style: animatedBackgroundStyle }), segments.map(function (segment) { return ((0, jsx_runtime_1.jsx)(SegmentButton_1.SegmentButton, { isSelected: activeSegment.key === segment.key, label: segment.label, accessibilityLabel: segment.accessibilityLabel, onPress: function (x, y, width) {
57
- setActiveSegment(segment);
58
- animatedX.value = (0, react_native_reanimated_1.withSpring)(x, springSettings);
59
- animatedY.value = (0, react_native_reanimated_1.withSpring)(y, springSettings);
60
- animatedWidth.value = width;
61
- }, onLayout: function (width, height, x, y) {
62
- if (activeSegment.key === segment.key) {
63
- animatedX.value = x;
64
- // (adrian.pop) - I couldn't figure out how to make the positioning work once the
65
- // choices go on the second row. The only way I could get it to work
66
- // was to hardcode the denominator to 3 for the single row ones
67
- // and 1.1 for the multiple row ones.
68
- animatedY.value = y - height / (multipleRows ? 1.1 : 3);
69
- animatedHeight.value = height;
80
+ return ((0, jsx_runtime_1.jsxs)(SegmentsContainer, __assign({ "$inline": inline, "$multipleRows": multipleRows }, rest, { children: [(0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { style: animatedBackgroundStyle }), segments.map(function (segment) {
81
+ var _a;
82
+ return ((0, jsx_runtime_1.jsx)(SegmentButton_1.SegmentButton, { isSelected: activeSegment.key === segment.key, label: segment.label, accessibilityLabel: segment.accessibilityLabel, onPress: function (x, y, width) {
83
+ setActiveSegment(segment);
84
+ animatedX.value = (0, react_native_reanimated_1.withSpring)(x, springSettings);
85
+ animatedY.value = (0, react_native_reanimated_1.withSpring)(y, springSettings);
70
86
  animatedWidth.value = width;
71
- }
72
- }, multipleRows: multipleRows, size: size, inline: inline }, segment.key)); })] }));
87
+ }, onLayout: function (width, height, x, y) {
88
+ if (activeSegment.key === segment.key) {
89
+ animatedX.value = x;
90
+ // (adrian.pop) - I couldn't figure out how to make the positioning work once the
91
+ // choices go on the second row. The only way I could get it to work
92
+ // was to hardcode the denominator to 3 for the single row ones
93
+ // and 1.1 for the multiple row ones.
94
+ animatedY.value = y - height / (multipleRows ? 1.1 : 3);
95
+ animatedHeight.value = height;
96
+ animatedWidth.value = width;
97
+ }
98
+ }, multipleRows: multipleRows, size: size, inline: inline, testID: "".concat((_a = rest.testID) !== null && _a !== void 0 ? _a : 'segment', "-").concat(segment.key) }, segment.key));
99
+ })] })));
73
100
  };
74
101
  exports.SegmentedControls = SegmentedControls;
75
102
  var SegmentsContainer = styled_native_1.default.View(function (_a) {
@@ -7,6 +7,7 @@ type SegmentButtonProps = {
7
7
  inline?: boolean;
8
8
  multipleRows?: boolean;
9
9
  size?: 'small' | 'large';
10
+ testID?: string;
10
11
  };
11
- export declare const SegmentButton: ({ accessibilityLabel, inline, isSelected, label, multipleRows, onLayout, onPress, size, }: SegmentButtonProps) => JSX.Element;
12
+ export declare const SegmentButton: ({ accessibilityLabel, inline, isSelected, label, multipleRows, onLayout, onPress, size, testID, }: SegmentButtonProps) => JSX.Element;
12
13
  export {};
@@ -35,7 +35,7 @@ var styled_native_1 = __importDefault(require("../../../styled.native"));
35
35
  var P_1 = require("../../P");
36
36
  var AnimatedP = react_native_reanimated_1.default.createAnimatedComponent(P_1.P);
37
37
  var SegmentButton = function (_a) {
38
- var accessibilityLabel = _a.accessibilityLabel, inline = _a.inline, isSelected = _a.isSelected, label = _a.label, multipleRows = _a.multipleRows, onLayout = _a.onLayout, onPress = _a.onPress, _b = _a.size, size = _b === void 0 ? 'large' : _b;
38
+ var accessibilityLabel = _a.accessibilityLabel, inline = _a.inline, isSelected = _a.isSelected, label = _a.label, multipleRows = _a.multipleRows, onLayout = _a.onLayout, onPress = _a.onPress, _b = _a.size, size = _b === void 0 ? 'large' : _b, testID = _a.testID;
39
39
  var xRef = (0, react_1.useRef)(0);
40
40
  var yRef = (0, react_1.useRef)(0);
41
41
  var widthRef = (0, react_1.useRef)(0);
@@ -76,7 +76,7 @@ var SegmentButton = function (_a) {
76
76
  return ((0, jsx_runtime_1.jsx)(react_native_1.Pressable, { onLayout: handleLayout, onPress: handlePress, accessible: true, accessibilityRole: "checkbox", accessibilityState: { selected: isSelected }, accessibilityLabel: accessibilityLabel, hitSlop: {
77
77
  top: hitslopVal,
78
78
  bottom: hitslopVal,
79
- }, style: { flexGrow: inline || multipleRows ? undefined : 1 }, children: (0, jsx_runtime_1.jsxs)(SSegmentsWrapper, { "$isSelected": isSelected, "$size": size, children: [(0, jsx_runtime_1.jsx)(SSegmentText, { style: {
79
+ }, style: { flexGrow: inline || multipleRows ? undefined : 1 }, testID: testID, children: (0, jsx_runtime_1.jsxs)(SSegmentsWrapper, { "$isSelected": isSelected, "$size": size, children: [(0, jsx_runtime_1.jsx)(SSegmentText, { style: {
80
80
  opacity: 0,
81
81
  fontWeight: '900',
82
82
  }, "$isSelected": false, children: label }), (0, jsx_runtime_1.jsx)(SSegmentText, { style: animatedStyleNormal, "$isSelected": false, numberOfLines: 1, adjustsFontSizeToFit: true, children: label }), (0, jsx_runtime_1.jsx)(SSegmentText, { style: animatedStyleBold, "$isSelected": true, numberOfLines: 1, adjustsFontSizeToFit: true, children: label })] }) }));
@@ -1,2 +1,2 @@
1
- import { SegmentedControls } from './SegmentedControls';
2
- export { SegmentedControls };
1
+ import { Segment, SegmentedControls } from './SegmentedControls';
2
+ export { Segment, SegmentedControls };
@@ -1,15 +1,16 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { theme } from '@ovotech/element-core';
3
2
  import { Pressable } from 'react-native';
3
+ import { useTheme } from '../../styled.native';
4
4
  import { Icon } from '../Icon';
5
5
  import { StyledIconButtonL, StyledIconButtonS } from './NavHeader.styles';
6
6
  export var IconButton = function (_a) {
7
7
  var size = _a.size, animation = _a.animation, rightActionConfig = _a.rightActionConfig;
8
8
  var ButtonStyled = size === 'small' ? StyledIconButtonS : StyledIconButtonL;
9
+ var theme = useTheme();
9
10
  if (!rightActionConfig || !(rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.iconName)) {
10
11
  return null;
11
12
  }
12
- return (_jsx(Pressable, { hitSlop: 44, pressRetentionOffset: 44, onPress: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.onActionPress, children: function (_a) {
13
+ return (_jsx(Pressable, { hitSlop: theme.core.space[2], pressRetentionOffset: theme.core.space[2], onPress: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.onActionPress, children: function (_a) {
13
14
  var pressed = _a.pressed;
14
15
  return (_jsx(ButtonStyled, { entering: animation, "$pressed": pressed, children: _jsx(Icon, { name: rightActionConfig.iconName, size: size === 'small' ? 16 : 18, color: theme.semantic.inverted.message.base }) }));
15
16
  } }));
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import Animated, { Easing, FadeInDown, FadeInUp, FadeOutDown, FadeOutUp, useAnimatedStyle, useSharedValue, withTiming, } from 'react-native-reanimated';
3
+ import { useTheme } from '../../styled.native';
3
4
  import { Action } from '../ActionList';
4
5
  import { IconButton } from './IconButton';
5
6
  import { ActionWrapper, CollapsedTitle, CollapsedTitleWrapper, ExpandedTitle, IconButtonWrapper, NavContainer, NavWrapper, } from './NavHeader.styles';
@@ -8,6 +9,7 @@ export var NavHeader = function (_a) {
8
9
  var title = _a.title, scrolled = _a.scrolled, canGoBack = _a.canGoBack, rightActionConfig = _a.rightActionConfig, _b = _a.topOffset, topOffset = _b === void 0 ? 0 : _b, _c = _a.backButtonText, backButtonText = _c === void 0 ? 'Back' : _c, onHeaderHeightChange = _a.onHeaderHeightChange, onBackButtonPress = _a.onBackButtonPress;
9
10
  var hasRightAction = !!rightActionConfig;
10
11
  var hasTitle = title !== undefined && (title === null || title === void 0 ? void 0 : title.length) > 0;
12
+ var theme = useTheme();
11
13
  var layoutHeight = useSharedValue(0);
12
14
  var animatedHeightStyle = useAnimatedStyle(function () {
13
15
  return {
@@ -32,6 +34,8 @@ export var NavHeader = function (_a) {
32
34
  // content inside NavContainer is the only dynamic part of NavHeader
33
35
  return (_jsx(NavWrapper, { collapsed: scrolled, style: animatedHeightStyle, children: _jsxs(NavContainer, { topOffset: topOffset, onLayout: onLayout, titleVisible: hasTitle, children: [_jsx(Animated.View, { style: {
34
36
  width: scrolled ? '33.3%' : '100%',
37
+ // Important for maintaining white space above the title on main app screens.
38
+ height: !canGoBack ? theme.core.space[10] : undefined,
35
39
  }, children: canGoBack && (_jsx(ActionWrapper, { collapsed: scrolled, children: _jsx(Action, { iconLeft: "chevron-left-small", inline: true, onPress: onBackButtonPress, children: backButtonText }) })) }), scrolled ? (_jsxs(_Fragment, { children: [_jsx(CollapsedTitleWrapper, { titleVisible: hasTitle, children: _jsx(CollapsedTitle, { numberOfLines: 1, ellipsizeMode: "tail", entering: FadeInDown.delay(FADE_ANIMATION_DURATION), exiting: FadeOutDown.duration(FADE_ANIMATION_DURATION), children: title }) }), _jsx(IconButtonWrapper, { children: _jsx(IconButton, { rightActionConfig: rightActionConfig, size: "small", animation: FadeInDown.delay(FADE_ANIMATION_DURATION) }) })] })) : (_jsxs(_Fragment, { children: [_jsx(ExpandedTitle
36
40
  // if we don't have right action leave more space for the title text in expanded state
37
41
  , {
@@ -13,7 +13,9 @@ export var NavWrapper = styled(Animated.View)(function (_a) {
13
13
  });
14
14
  export var NavContainer = styled.View(function (_a) {
15
15
  var core = _a.theme.core, topOffset = _a.topOffset, titleVisible = _a.titleVisible;
16
- return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n\n /* NavWrapper zIndex + 1 so it is always on top of the wrapper */\n z-index: ", ";\n width: ", ";\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "], ["\n position: absolute;\n\n /* NavWrapper zIndex + 1 so it is always on top of the wrapper */\n z-index: ", ";\n width: ", ";\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "])), Z_INDEX + 1, titleVisible ? '100%' : '50%', numToPx(core.space[(topOffset !== null && topOffset !== void 0 ? topOffset : titleVisible) ? 2 : 4]), numToPx(core.space[titleVisible ? 2 : 4]), numToPx(core.space[4]), numToPx(core.space[4]));
16
+ return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n\n /* NavWrapper zIndex + 1 so it is always on top of the wrapper */\n z-index: ", ";\n width: ", ";\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "], ["\n position: absolute;\n\n /* NavWrapper zIndex + 1 so it is always on top of the wrapper */\n z-index: ", ";\n width: ", ";\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "])), Z_INDEX + 1, titleVisible ? '100%' : '50%', topOffset
17
+ ? topOffset
18
+ : numToPx(core.space[titleVisible ? 2 : 4]), numToPx(core.space[titleVisible ? 2 : 4]), numToPx(core.space[4]), numToPx(core.space[4]));
17
19
  });
18
20
  export var ExpandedTitle = styled(Animated.Text)(function (_a) {
19
21
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, hasBackButton = _a.hasBackButton, fullWidth = _a.fullWidth, titleVisible = _a.titleVisible;
@@ -1,12 +1,36 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __rest = (this && this.__rest) || function (s, e) {
13
+ var t = {};
14
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
+ t[p] = s[p];
16
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
+ t[p[i]] = s[p[i]];
20
+ }
21
+ return t;
22
+ };
1
23
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
24
  import Animated, { useAnimatedStyle, useSharedValue, withSpring, } from 'react-native-reanimated';
3
25
  import styled, { useTheme } from '../../styled.native';
4
26
  import { SegmentButton } from './components/SegmentButton';
27
+ /* These settings were found to be nice and fast whilst maintaining spring */
5
28
  var springSettings = {
6
- damping: 15,
29
+ damping: 25,
30
+ mass: 0.25,
7
31
  };
8
32
  export var SegmentedControls = function (_a) {
9
- var activeSegment = _a.activeSegment, setActiveSegment = _a.setActiveSegment, segments = _a.segments, _b = _a.inline, inline = _b === void 0 ? false : _b, multipleRows = _a.multipleRows, _c = _a.size, size = _c === void 0 ? 'large' : _c;
33
+ var activeSegment = _a.activeSegment, setActiveSegment = _a.setActiveSegment, segments = _a.segments, _b = _a.inline, inline = _b === void 0 ? false : _b, multipleRows = _a.multipleRows, _c = _a.size, size = _c === void 0 ? 'large' : _c, rest = __rest(_a, ["activeSegment", "setActiveSegment", "segments", "inline", "multipleRows", "size"]);
10
34
  var animatedX = useSharedValue(0);
11
35
  var animatedY = useSharedValue(0);
12
36
  var animatedHeight = useSharedValue(0);
@@ -27,23 +51,26 @@ export var SegmentedControls = function (_a) {
27
51
  borderRadius: theme.core.radius.max,
28
52
  backgroundColor: theme.semantic.surface.elevated,
29
53
  }); }, [animatedX, animatedY, animatedWidth, animatedHeight]);
30
- return (_jsxs(SegmentsContainer, { "$inline": inline, "$multipleRows": multipleRows, children: [_jsx(Animated.View, { style: animatedBackgroundStyle }), segments.map(function (segment) { return (_jsx(SegmentButton, { isSelected: activeSegment.key === segment.key, label: segment.label, accessibilityLabel: segment.accessibilityLabel, onPress: function (x, y, width) {
31
- setActiveSegment(segment);
32
- animatedX.value = withSpring(x, springSettings);
33
- animatedY.value = withSpring(y, springSettings);
34
- animatedWidth.value = width;
35
- }, onLayout: function (width, height, x, y) {
36
- if (activeSegment.key === segment.key) {
37
- animatedX.value = x;
38
- // (adrian.pop) - I couldn't figure out how to make the positioning work once the
39
- // choices go on the second row. The only way I could get it to work
40
- // was to hardcode the denominator to 3 for the single row ones
41
- // and 1.1 for the multiple row ones.
42
- animatedY.value = y - height / (multipleRows ? 1.1 : 3);
43
- animatedHeight.value = height;
54
+ return (_jsxs(SegmentsContainer, __assign({ "$inline": inline, "$multipleRows": multipleRows }, rest, { children: [_jsx(Animated.View, { style: animatedBackgroundStyle }), segments.map(function (segment) {
55
+ var _a;
56
+ return (_jsx(SegmentButton, { isSelected: activeSegment.key === segment.key, label: segment.label, accessibilityLabel: segment.accessibilityLabel, onPress: function (x, y, width) {
57
+ setActiveSegment(segment);
58
+ animatedX.value = withSpring(x, springSettings);
59
+ animatedY.value = withSpring(y, springSettings);
44
60
  animatedWidth.value = width;
45
- }
46
- }, multipleRows: multipleRows, size: size, inline: inline }, segment.key)); })] }));
61
+ }, onLayout: function (width, height, x, y) {
62
+ if (activeSegment.key === segment.key) {
63
+ animatedX.value = x;
64
+ // (adrian.pop) - I couldn't figure out how to make the positioning work once the
65
+ // choices go on the second row. The only way I could get it to work
66
+ // was to hardcode the denominator to 3 for the single row ones
67
+ // and 1.1 for the multiple row ones.
68
+ animatedY.value = y - height / (multipleRows ? 1.1 : 3);
69
+ animatedHeight.value = height;
70
+ animatedWidth.value = width;
71
+ }
72
+ }, multipleRows: multipleRows, size: size, inline: inline, testID: "".concat((_a = rest.testID) !== null && _a !== void 0 ? _a : 'segment', "-").concat(segment.key) }, segment.key));
73
+ })] })));
47
74
  };
48
75
  var SegmentsContainer = styled.View(function (_a) {
49
76
  var _b = _a.theme, core = _b.core, semantic = _b.semantic, $inline = _a.$inline, $multipleRows = _a.$multipleRows;
@@ -6,7 +6,7 @@ import styled from '../../../styled.native';
6
6
  import { P } from '../../P';
7
7
  var AnimatedP = Animated.createAnimatedComponent(P);
8
8
  export var SegmentButton = function (_a) {
9
- var accessibilityLabel = _a.accessibilityLabel, inline = _a.inline, isSelected = _a.isSelected, label = _a.label, multipleRows = _a.multipleRows, onLayout = _a.onLayout, onPress = _a.onPress, _b = _a.size, size = _b === void 0 ? 'large' : _b;
9
+ var accessibilityLabel = _a.accessibilityLabel, inline = _a.inline, isSelected = _a.isSelected, label = _a.label, multipleRows = _a.multipleRows, onLayout = _a.onLayout, onPress = _a.onPress, _b = _a.size, size = _b === void 0 ? 'large' : _b, testID = _a.testID;
10
10
  var xRef = useRef(0);
11
11
  var yRef = useRef(0);
12
12
  var widthRef = useRef(0);
@@ -47,7 +47,7 @@ export var SegmentButton = function (_a) {
47
47
  return (_jsx(Pressable, { onLayout: handleLayout, onPress: handlePress, accessible: true, accessibilityRole: "checkbox", accessibilityState: { selected: isSelected }, accessibilityLabel: accessibilityLabel, hitSlop: {
48
48
  top: hitslopVal,
49
49
  bottom: hitslopVal,
50
- }, style: { flexGrow: inline || multipleRows ? undefined : 1 }, children: _jsxs(SSegmentsWrapper, { "$isSelected": isSelected, "$size": size, children: [_jsx(SSegmentText, { style: {
50
+ }, style: { flexGrow: inline || multipleRows ? undefined : 1 }, testID: testID, children: _jsxs(SSegmentsWrapper, { "$isSelected": isSelected, "$size": size, children: [_jsx(SSegmentText, { style: {
51
51
  opacity: 0,
52
52
  fontWeight: '900',
53
53
  }, "$isSelected": false, children: label }), _jsx(SSegmentText, { style: animatedStyleNormal, "$isSelected": false, numberOfLines: 1, adjustsFontSizeToFit: true, children: label }), _jsx(SSegmentText, { style: animatedStyleBold, "$isSelected": true, numberOfLines: 1, adjustsFontSizeToFit: true, children: label })] }) }));
@@ -11,7 +11,7 @@ var __assign = (this && this.__assign) || function () {
11
11
  };
12
12
  import { jsx as _jsx } from "react/jsx-runtime";
13
13
  import { createContext, useContext } from 'react';
14
- import { Address, Advice, Archive, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Award, Battery, CalBook, Cal, CaretArrowDown, CaretArrowLeft, CaretArrowRight, CaretArrowUp, ChartFilled, Chart, CheckCircle, Check, ChevronDown, ChevronLeftSmallFirst, ChevronLeftSmall, ChevronLeft, ChevronRightSmallLast, ChevronRightSmall, ChevronRight, ChevronUp, CloseCircle, Cross, Doc, Dollar, Download, EcoHome, Eco, Edit, ElectricCar, ElectricHome, Electricity, EnergyAdvice, Equals, Euro, Gas, GlobeAddress, HelpFilled, Help, Hide, HomeFilled, Home, HydroPower, Info, Link, Logo, MailOpen, Mail, Menu, MessageFilled, Message, Minus, Mobile, NewWindow, PaymentCardFilled, PaymentCard, Phone, Plus, Pound, Pricing, Search, Security, Show, SmartHome, SmartMeter, Solar, StarFilled, Star, Sun, Torch, Trees, Tune, UserFilled, User, Wallet, WarmHome, Warning, WebAddress, WindPower, } from './icons';
14
+ import { Address, Advice, Archive, ArrowDown, ArrowLeft, ArrowRight, ArrowUp, Award, Battery, CalBook, Cal, CaretArrowDown, CaretArrowLeft, CaretArrowRight, CaretArrowUp, ChartFilled, Chart, CheckCircle, Check, ChevronDown, ChevronLeftSmallFirst, ChevronLeftSmall, ChevronLeft, ChevronRightSmallLast, ChevronRightSmall, ChevronRight, ChevronUp, CloseCircle, Cross, Doc, Dollar, Download, EcoHome, Eco, Edit, ElectricCar, ElectricHome, Electricity, EnergyAdvice, Equals, Euro, Gas, GlobeAddress, HelpFilled, Help, Hide, HomeFilled, Home, HydroPower, Info, Link, Logo, MailOpen, Mail, Menu, MessageFilled, Message, Minus, Mobile, NewWindow, PaymentCardFilled, PaymentCard, Phone, Plus, Pound, Pricing, Search, Security, ShopFilled, Shop, Show, SmartHome, SmartMeter, Solar, StarFilled, Star, Sun, Torch, Trees, Tune, UserFilled, User, Wallet, WarmHome, Warning, WebAddress, WindPower, } from './icons';
15
15
  var defaultIcons = {
16
16
  address: Address,
17
17
  advice: Advice,
@@ -81,6 +81,8 @@ var defaultIcons = {
81
81
  pricing: Pricing,
82
82
  search: Search,
83
83
  security: Security,
84
+ 'shop-filled': ShopFilled,
85
+ shop: Shop,
84
86
  show: Show,
85
87
  'smart-home': SmartHome,
86
88
  'smart-meter': SmartMeter,
@@ -0,0 +1,14 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import Svg, { Path } from 'react-native-svg';
14
+ export var Shop = function (props) { return (_jsxs(Svg, __assign({ viewBox: "0 0 16 16" }, props, { children: [_jsx(Path, { fill: "currentColor", d: "M13.425 11.06 14.5 6.19h-1.8l-1.51-3.495-1.375.595 1.25 2.9h-6.19L6.19 3.3l-1.365-.62L3.23 6.19H1.505l1.5 6.81h9.19l-.4-1.5H4.21l-.84-3.81h9.265l-.84 3.81 1.63-.44Z" }), _jsx(Path, { fill: "currentColor", d: "M4.755 10.495h1.5V8.73H6.25l-1.495.4v1.365ZM7.255 10.495h1.5V8.73H8.75l-1.495.4v1.365ZM9.755 10.495h1.5V8.73h-.005l-1.495.4v1.365Z" })] }))); };
@@ -0,0 +1,14 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import Svg, { Path } from 'react-native-svg';
14
+ export var ShopFilled = function (props) { return (_jsxs(Svg, __assign({ viewBox: "0 0 16 16" }, props, { children: [_jsx(Path, { fill: "currentColor", d: "m13.39 11.122 1.13-4.857-1.8-.02-1.47-3.513-1.381.58 1.217 2.913-6.19-.07L6.244 3.28l-1.358-.636-1.635 3.492-1.725-.02 1.422 6.827 9.19.105-.383-1.505-7.585-.087-.796-3.819 9.264.106-.883 3.8 1.635-.421Z" }), _jsx(Path, { fill: "currentColor", d: "m12.636 7.742-9.264-.107.797 3.818 7.583.087.884-3.798Z" })] }))); };
@@ -66,6 +66,8 @@ export * from './Pound';
66
66
  export * from './Pricing';
67
67
  export * from './Search';
68
68
  export * from './Security';
69
+ export * from './ShopFilled';
70
+ export * from './Shop';
69
71
  export * from './Show';
70
72
  export * from './SmartHome';
71
73
  export * from './SmartMeter';
@@ -84,6 +84,8 @@ var defaultIcons = {
84
84
  pricing: icons_1.Pricing,
85
85
  search: icons_1.Search,
86
86
  security: icons_1.Security,
87
+ 'shop-filled': icons_1.ShopFilled,
88
+ shop: icons_1.Shop,
87
89
  show: icons_1.Show,
88
90
  'smart-home': icons_1.SmartHome,
89
91
  'smart-meter': icons_1.SmartMeter,
@@ -0,0 +1,2 @@
1
+ import { SvgProps } from 'react-native-svg';
2
+ export declare const Shop: (props: SvgProps) => JSX.Element;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.Shop = void 0;
38
+ var jsx_runtime_1 = require("react/jsx-runtime");
39
+ var react_native_svg_1 = __importStar(require("react-native-svg"));
40
+ var Shop = function (props) { return ((0, jsx_runtime_1.jsxs)(react_native_svg_1.default, __assign({ viewBox: "0 0 16 16" }, props, { children: [(0, jsx_runtime_1.jsx)(react_native_svg_1.Path, { fill: "currentColor", d: "M13.425 11.06 14.5 6.19h-1.8l-1.51-3.495-1.375.595 1.25 2.9h-6.19L6.19 3.3l-1.365-.62L3.23 6.19H1.505l1.5 6.81h9.19l-.4-1.5H4.21l-.84-3.81h9.265l-.84 3.81 1.63-.44Z" }), (0, jsx_runtime_1.jsx)(react_native_svg_1.Path, { fill: "currentColor", d: "M4.755 10.495h1.5V8.73H6.25l-1.495.4v1.365ZM7.255 10.495h1.5V8.73H8.75l-1.495.4v1.365ZM9.755 10.495h1.5V8.73h-.005l-1.495.4v1.365Z" })] }))); };
41
+ exports.Shop = Shop;
@@ -0,0 +1,2 @@
1
+ import { SvgProps } from 'react-native-svg';
2
+ export declare const ShopFilled: (props: SvgProps) => JSX.Element;
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
14
+ if (k2 === undefined) k2 = k;
15
+ var desc = Object.getOwnPropertyDescriptor(m, k);
16
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
17
+ desc = { enumerable: true, get: function() { return m[k]; } };
18
+ }
19
+ Object.defineProperty(o, k2, desc);
20
+ }) : (function(o, m, k, k2) {
21
+ if (k2 === undefined) k2 = k;
22
+ o[k2] = m[k];
23
+ }));
24
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
25
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
26
+ }) : function(o, v) {
27
+ o["default"] = v;
28
+ });
29
+ var __importStar = (this && this.__importStar) || function (mod) {
30
+ if (mod && mod.__esModule) return mod;
31
+ var result = {};
32
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
33
+ __setModuleDefault(result, mod);
34
+ return result;
35
+ };
36
+ Object.defineProperty(exports, "__esModule", { value: true });
37
+ exports.ShopFilled = void 0;
38
+ var jsx_runtime_1 = require("react/jsx-runtime");
39
+ var react_native_svg_1 = __importStar(require("react-native-svg"));
40
+ var ShopFilled = function (props) { return ((0, jsx_runtime_1.jsxs)(react_native_svg_1.default, __assign({ viewBox: "0 0 16 16" }, props, { children: [(0, jsx_runtime_1.jsx)(react_native_svg_1.Path, { fill: "currentColor", d: "m13.39 11.122 1.13-4.857-1.8-.02-1.47-3.513-1.381.58 1.217 2.913-6.19-.07L6.244 3.28l-1.358-.636-1.635 3.492-1.725-.02 1.422 6.827 9.19.105-.383-1.505-7.585-.087-.796-3.819 9.264.106-.883 3.8 1.635-.421Z" }), (0, jsx_runtime_1.jsx)(react_native_svg_1.Path, { fill: "currentColor", d: "m12.636 7.742-9.264-.107.797 3.818 7.583.087.884-3.798Z" })] }))); };
41
+ exports.ShopFilled = ShopFilled;
@@ -66,6 +66,8 @@ export * from './Pound';
66
66
  export * from './Pricing';
67
67
  export * from './Search';
68
68
  export * from './Security';
69
+ export * from './ShopFilled';
70
+ export * from './Shop';
69
71
  export * from './Show';
70
72
  export * from './SmartHome';
71
73
  export * from './SmartMeter';
@@ -82,6 +82,8 @@ __exportStar(require("./Pound"), exports);
82
82
  __exportStar(require("./Pricing"), exports);
83
83
  __exportStar(require("./Search"), exports);
84
84
  __exportStar(require("./Security"), exports);
85
+ __exportStar(require("./ShopFilled"), exports);
86
+ __exportStar(require("./Shop"), exports);
85
87
  __exportStar(require("./Show"), exports);
86
88
  __exportStar(require("./SmartHome"), exports);
87
89
  __exportStar(require("./SmartMeter"), exports);
@@ -1,5 +1,5 @@
1
1
  import { FunctionComponent } from 'react';
2
2
  import { SvgProps } from 'react-native-svg';
3
- export type IconName = 'address' | 'advice' | 'archive' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'award' | 'battery' | 'cal-book' | 'cal' | 'caret-arrow-down' | 'caret-arrow-left' | 'caret-arrow-right' | 'caret-arrow-up' | 'chart-filled' | 'chart' | 'check-circle' | 'check' | 'chevron-down' | 'chevron-left-small-first' | 'chevron-left-small' | 'chevron-left' | 'chevron-right-small-last' | 'chevron-right-small' | 'chevron-right' | 'chevron-up' | 'close-circle' | 'cross' | 'doc' | 'dollar' | 'download' | 'eco-home' | 'eco' | 'edit' | 'electric-car' | 'electric-home' | 'electricity' | 'energy-advice' | 'equals' | 'euro' | 'gas' | 'globe-address' | 'help-filled' | 'help' | 'hide' | 'home-filled' | 'home' | 'hydro-power' | 'info' | 'link' | 'logo' | 'mail-open' | 'mail' | 'menu' | 'message-filled' | 'message' | 'minus' | 'mobile' | 'new-window' | 'payment-card-filled' | 'payment-card' | 'phone' | 'plus' | 'pound' | 'pricing' | 'search' | 'security' | 'show' | 'smart-home' | 'smart-meter' | 'solar' | 'star-filled' | 'star' | 'sun' | 'torch' | 'trees' | 'tune' | 'user-filled' | 'user' | 'wallet' | 'warm-home' | 'warning' | 'web-address' | 'wind-power';
3
+ export type IconName = 'address' | 'advice' | 'archive' | 'arrow-down' | 'arrow-left' | 'arrow-right' | 'arrow-up' | 'award' | 'battery' | 'cal-book' | 'cal' | 'caret-arrow-down' | 'caret-arrow-left' | 'caret-arrow-right' | 'caret-arrow-up' | 'chart-filled' | 'chart' | 'check-circle' | 'check' | 'chevron-down' | 'chevron-left-small-first' | 'chevron-left-small' | 'chevron-left' | 'chevron-right-small-last' | 'chevron-right-small' | 'chevron-right' | 'chevron-up' | 'close-circle' | 'cross' | 'doc' | 'dollar' | 'download' | 'eco-home' | 'eco' | 'edit' | 'electric-car' | 'electric-home' | 'electricity' | 'energy-advice' | 'equals' | 'euro' | 'gas' | 'globe-address' | 'help-filled' | 'help' | 'hide' | 'home-filled' | 'home' | 'hydro-power' | 'info' | 'link' | 'logo' | 'mail-open' | 'mail' | 'menu' | 'message-filled' | 'message' | 'minus' | 'mobile' | 'new-window' | 'payment-card-filled' | 'payment-card' | 'phone' | 'plus' | 'pound' | 'pricing' | 'search' | 'security' | 'shop-filled' | 'shop' | 'show' | 'smart-home' | 'smart-meter' | 'solar' | 'star-filled' | 'star' | 'sun' | 'torch' | 'trees' | 'tune' | 'user-filled' | 'user' | 'wallet' | 'warm-home' | 'warning' | 'web-address' | 'wind-power';
4
4
  export type IconNameExtended = IconName | string;
5
5
  export type IconsType = Record<string, FunctionComponent<SvgProps>>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ovotech/element-native",
3
- "version": "4.0.3",
3
+ "version": "4.0.4-canary-8d6539a-263",
4
4
  "main": "dist/index.js",
5
5
  "module": "dist/esm/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -14,10 +14,10 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@backpackapp-io/react-native-toast": "^0.10.0",
17
+ "@ovotech/element-core": "3.0.1-canary-8d6539a-263",
17
18
  "deepmerge": "^4.2.2",
18
19
  "lodash.groupby": "^4.6.0",
19
- "react-native-reanimated-carousel": "^3.5.1",
20
- "@ovotech/element-core": "3.0.1"
20
+ "react-native-reanimated-carousel": "^3.5.1"
21
21
  },
22
22
  "devDependencies": {
23
23
  "@babel/core": "^7.11.5",